@lssm/lib.ui-kit-web 1.7.4 → 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.d.ts.map +1 -1
- package/dist/ui/accordion.js +3 -4
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert-dialog.d.ts.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 +5 -5
- package/dist/ui/badge.d.ts.map +1 -1
- 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.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.d.ts.map +1 -1
- 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.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.d.ts.map +1 -1
- 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-state.d.ts.map +1 -1
- package/dist/ui/empty.d.ts +9 -9
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +6 -6
- package/dist/ui/empty.js.map +1 -1
- package/dist/ui/field.d.ts +14 -14
- package/dist/ui/field.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/ui/hover-card.js +1 -2
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/input-group.d.ts +10 -10
- package/dist/ui/input-group.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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/FeatureGrid.d.ts.map +1 -1
- package/dist/ui/marketing/Hero.d.ts +2 -2
- package/dist/ui/marketing/Hero.d.ts.map +1 -1
- package/dist/ui/marketing/PricingTable.d.ts +2 -2
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts +17 -17
- 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/SearchAndFilter.js +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/molecules/SkeletonList.d.ts.map +1 -1
- package/dist/ui/nav-layout.d.ts +7 -7
- 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/organisms/ListPage/ListPage.d.ts.map +1 -1
- package/dist/ui/page-header.d.ts +2 -2
- package/dist/ui/page-header.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/ui/popover.js +1 -2
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.d.ts.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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/ui/scroll-area.js +2 -3
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/section.d.ts +2 -2
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/ui/sonner.js +0 -1
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/stack.d.ts +19 -19
- 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/stat-card-group.d.ts.map +1 -1
- package/dist/ui/stepper.d.ts +4 -4
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/switch.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/ui/typography.js +11 -11
- package/dist/ui/typography.js.map +1 -1
- package/dist/ui/use-toast.d.ts.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/command.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
6
5
|
import "react";
|
|
@@ -9,14 +8,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
8
|
import { Command as Command$1 } from "cmdk";
|
|
10
9
|
|
|
11
10
|
//#region ui/command.tsx
|
|
12
|
-
function Command({ className
|
|
11
|
+
function Command({ className, ...props }) {
|
|
13
12
|
return /* @__PURE__ */ jsx(Command$1, {
|
|
14
13
|
"data-slot": "command",
|
|
15
14
|
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
16
15
|
...props
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true
|
|
18
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
|
|
20
19
|
return /* @__PURE__ */ jsxs(Dialog, {
|
|
21
20
|
...props,
|
|
22
21
|
children: [/* @__PURE__ */ jsxs(DialogHeader, {
|
|
@@ -32,7 +31,7 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
|
|
|
32
31
|
})]
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
|
-
function CommandInput({ className
|
|
34
|
+
function CommandInput({ className, ...props }) {
|
|
36
35
|
return /* @__PURE__ */ jsxs("div", {
|
|
37
36
|
"data-slot": "command-input-wrapper",
|
|
38
37
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
@@ -43,7 +42,7 @@ function CommandInput({ className,...props }) {
|
|
|
43
42
|
})]
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
|
-
function CommandList({ className
|
|
45
|
+
function CommandList({ className, ...props }) {
|
|
47
46
|
return /* @__PURE__ */ jsx(Command$1.List, {
|
|
48
47
|
"data-slot": "command-list",
|
|
49
48
|
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
@@ -57,28 +56,28 @@ function CommandEmpty({ ...props }) {
|
|
|
57
56
|
...props
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
function CommandGroup({ className
|
|
59
|
+
function CommandGroup({ className, ...props }) {
|
|
61
60
|
return /* @__PURE__ */ jsx(Command$1.Group, {
|
|
62
61
|
"data-slot": "command-group",
|
|
63
62
|
className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
|
|
64
63
|
...props
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
|
-
function CommandSeparator({ className
|
|
66
|
+
function CommandSeparator({ className, ...props }) {
|
|
68
67
|
return /* @__PURE__ */ jsx(Command$1.Separator, {
|
|
69
68
|
"data-slot": "command-separator",
|
|
70
69
|
className: cn("bg-border -mx-1 h-px", className),
|
|
71
70
|
...props
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
|
-
function CommandItem({ className
|
|
73
|
+
function CommandItem({ className, ...props }) {
|
|
75
74
|
return /* @__PURE__ */ jsx(Command$1.Item, {
|
|
76
75
|
"data-slot": "command-item",
|
|
77
76
|
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
78
77
|
...props
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
function CommandShortcut({ className
|
|
80
|
+
function CommandShortcut({ className, ...props }) {
|
|
82
81
|
return /* @__PURE__ */ jsx("span", {
|
|
83
82
|
"data-slot": "command-shortcut",
|
|
84
83
|
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
package/dist/ui/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../ui/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\n\nimport { cn } from './utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from './dialog';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../ui/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\n\nimport { cn } from './utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from './dialog';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;;;AAeA,SAAS,QAAQ,EACf,WACA,GAAG,SAC6C;AAChD,QACE,oBAACA;EACC,aAAU;EACV,WAAW,GACT,6FACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,cAAc,EACrB,QAAQ,mBACR,cAAc,kCACd,UACA,WACA,kBAAkB,MAClB,GAAG,SAMF;AACD,QACE,qBAAC;EAAO,GAAI;aACV,qBAAC;GAAa,WAAU;cACtB,oBAAC,yBAAa,QAAoB,EAClC,oBAAC,+BAAmB,cAAgC;IACvC,EACf,oBAAC;GACC,WAAW,GAAG,uBAAuB,UAAU;GAC9B;aAEjB,oBAAC;IAAQ,WAAU;IAChB;KACO;IACI;GACT;;AAIb,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;AACtD,QACE,qBAAC;EACC,aAAU;EACV,WAAU;aAEV,oBAAC,cAAW,WAAU,+BAA+B,EACrD,oBAACA,UAAiB;GAChB,aAAU;GACV,WAAW,GACT,4JACA,UACD;GACD,GAAI;IACJ;GACE;;AAIV,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,UAAiB;EAChB,aAAU;EACV,WAAW,GACT,+DACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QACE,oBAACA,UAAiB;EAChB,aAAU;EACV,WAAU;EACV,GAAI;GACJ;;AAIN,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;AACtD,QACE,oBAACA,UAAiB;EAChB,aAAU;EACV,WAAW,GACT,0NACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;AAC1D,QACE,oBAACA,UAAiB;EAChB,aAAU;EACV,WAAW,GAAG,wBAAwB,UAAU;EAChD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAACA,UAAiB;EAChB,aAAU;EACV,WAAW,GACT,uYACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,WACA,GAAG,SAC4B;AAC/B,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime231 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region ui/confirm-dialog.d.ts
|
|
5
5
|
interface ConfirmDialogProps {
|
|
@@ -25,7 +25,7 @@ declare function ConfirmDialog({
|
|
|
25
25
|
isLoading,
|
|
26
26
|
onConfirm,
|
|
27
27
|
trigger
|
|
28
|
-
}: ConfirmDialogProps):
|
|
28
|
+
}: ConfirmDialogProps): react_jsx_runtime231.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ConfirmDialog, ConfirmDialogProps };
|
|
31
31
|
//# sourceMappingURL=confirm-dialog.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime244 from "react/jsx-runtime";
|
|
3
3
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4
4
|
|
|
5
5
|
//#region ui/context-menu.d.ts
|
|
@@ -27,7 +27,7 @@ declare const ContextMenuShortcut: {
|
|
|
27
27
|
({
|
|
28
28
|
className,
|
|
29
29
|
...props
|
|
30
|
-
}: React$1.HTMLAttributes<HTMLSpanElement>):
|
|
30
|
+
}: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime244.JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
33
|
//#endregion
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import { cn } from "./utils.js";
|
|
5
4
|
import * as React$1 from "react";
|
|
6
5
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
@@ -14,32 +13,32 @@ const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
|
14
13
|
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
15
14
|
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
16
15
|
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
17
|
-
const ContextMenuSubTrigger = React$1.forwardRef(({ className, inset, children
|
|
16
|
+
const ContextMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
|
|
18
17
|
ref,
|
|
19
18
|
className: cn("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-base outline-hidden select-none", inset && "pl-8", className),
|
|
20
19
|
...props,
|
|
21
20
|
children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })]
|
|
22
21
|
}));
|
|
23
22
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
24
|
-
const ContextMenuSubContent = React$1.forwardRef(({ className
|
|
23
|
+
const ContextMenuSubContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
|
|
25
24
|
ref,
|
|
26
25
|
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 overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
27
26
|
...props
|
|
28
27
|
}));
|
|
29
28
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
30
|
-
const ContextMenuContent = React$1.forwardRef(({ className
|
|
29
|
+
const ContextMenuContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
|
|
31
30
|
ref,
|
|
32
31
|
className: cn("bg-popover text-popover-foreground animate-in fade-in-80 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 overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
33
32
|
...props
|
|
34
33
|
}) }));
|
|
35
34
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
36
|
-
const ContextMenuItem = React$1.forwardRef(({ className, inset
|
|
35
|
+
const ContextMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
|
|
37
36
|
ref,
|
|
38
37
|
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50", inset && "pl-8", className),
|
|
39
38
|
...props
|
|
40
39
|
}));
|
|
41
40
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
42
|
-
const ContextMenuCheckboxItem = React$1.forwardRef(({ className, children, checked
|
|
41
|
+
const ContextMenuCheckboxItem = React$1.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
|
|
43
42
|
ref,
|
|
44
43
|
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
45
44
|
checked,
|
|
@@ -50,7 +49,7 @@ const ContextMenuCheckboxItem = React$1.forwardRef(({ className, children, check
|
|
|
50
49
|
}), children]
|
|
51
50
|
}));
|
|
52
51
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
53
|
-
const ContextMenuRadioItem = React$1.forwardRef(({ className, children
|
|
52
|
+
const ContextMenuRadioItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
|
|
54
53
|
ref,
|
|
55
54
|
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
56
55
|
...props,
|
|
@@ -60,19 +59,19 @@ const ContextMenuRadioItem = React$1.forwardRef(({ className, children,...props
|
|
|
60
59
|
}), children]
|
|
61
60
|
}));
|
|
62
61
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
63
|
-
const ContextMenuLabel = React$1.forwardRef(({ className, inset
|
|
62
|
+
const ContextMenuLabel = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
|
|
64
63
|
ref,
|
|
65
64
|
className: cn("text-foreground px-2 py-1.5 text-base font-semibold", inset && "pl-8", className),
|
|
66
65
|
...props
|
|
67
66
|
}));
|
|
68
67
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
69
|
-
const ContextMenuSeparator = React$1.forwardRef(({ className
|
|
68
|
+
const ContextMenuSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
|
|
70
69
|
ref,
|
|
71
70
|
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
72
71
|
...props
|
|
73
72
|
}));
|
|
74
73
|
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
75
|
-
const ContextMenuShortcut = ({ className
|
|
74
|
+
const ContextMenuShortcut = ({ className, ...props }) => {
|
|
76
75
|
return /* @__PURE__ */ jsx("span", {
|
|
77
76
|
className: cn("text-muted-foreground ml-auto text-sm tracking-widest", className),
|
|
78
77
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.js","names":["React"],"sources":["../../ui/context-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from './utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\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-base outline-hidden select-none',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 overflow-hidden rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground animate-in fade-in-80 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 overflow-hidden rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'text-foreground px-2 py-1.5 text-base font-semibold',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-sm tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-menu.js","names":["React"],"sources":["../../ui/context-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from './utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\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-base outline-hidden select-none',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\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 overflow-hidden rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground animate-in fade-in-80 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 overflow-hidden rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-base outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'text-foreground px-2 py-1.5 text-base font-semibold',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-sm tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,cAAc,qBAAqB;AAEzC,MAAM,qBAAqB,qBAAqB;AAEhD,MAAM,mBAAmB,qBAAqB;AAE9C,MAAM,oBAAoB,qBAAqB;AAE/C,MAAM,iBAAiB,qBAAqB;AAE5C,MAAM,wBAAwB,qBAAqB;AAEnD,MAAM,wBAAwBA,QAAM,YAKjC,EAAE,WAAW,OAAO,UAAU,GAAG,SAAS,QAC3C,qBAAC,qBAAqB;CACf;CACL,WAAW,GACT,kNACA,SAAS,QACT,UACD;CACD,GAAI;YAEH,UACD,oBAAC,gBAAa,WAAU,oBAAoB;EACZ,CAClC;AACF,sBAAsB,cAAc,qBAAqB,WAAW;AAEpE,MAAM,wBAAwBA,QAAM,YAGjC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB;CACf;CACL,WAAW,GACT,qbACA,UACD;CACD,GAAI;EACJ,CACF;AACF,sBAAsB,cAAc,qBAAqB,WAAW;AAEpE,MAAM,qBAAqBA,QAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,oBACpB,oBAAC,qBAAqB;CACf;CACL,WAAW,GACT,2cACA,UACD;CACD,GAAI;EACJ,GAC0B,CAC9B;AACF,mBAAmB,cAAc,qBAAqB,QAAQ;AAE9D,MAAM,kBAAkBA,QAAM,YAK3B,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,qBAAqB;CACf;CACL,WAAW,GACT,iNACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,gBAAgB,cAAc,qBAAqB,KAAK;AAExD,MAAM,0BAA0BA,QAAM,YAGnC,EAAE,WAAW,UAAU,SAAS,GAAG,SAAS,QAC7C,qBAAC,qBAAqB;CACf;CACL,WAAW,GACT,sNACA,UACD;CACQ;CACT,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,qBAAqB,2BACpB,oBAAC,SAAM,WAAU,YAAY,GACM;GAChC,EACN;EACiC,CACpC;AACF,wBAAwB,cACtB,qBAAqB,aAAa;AAEpC,MAAM,uBAAuBA,QAAM,YAGhC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,qBAAqB;CACf;CACL,WAAW,GACT,sNACA,UACD;CACD,GAAI;YAEJ,oBAAC;EAAK,WAAU;YACd,oBAAC,qBAAqB,2BACpB,oBAAC,UAAO,WAAU,yBAAyB,GACR;GAChC,EACN;EAC8B,CACjC;AACF,qBAAqB,cAAc,qBAAqB,UAAU;AAElE,MAAM,mBAAmBA,QAAM,YAK5B,EAAE,WAAW,OAAO,GAAG,SAAS,QACjC,oBAAC,qBAAqB;CACf;CACL,WAAW,GACT,uDACA,SAAS,QACT,UACD;CACD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,qBAAqB,MAAM;AAE1D,MAAM,uBAAuBA,QAAM,YAGhC,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB;CACf;CACL,WAAW,GAAG,6BAA6B,UAAU;CACrD,GAAI;EACJ,CACF;AACF,qBAAqB,cAAc,qBAAqB,UAAU;AAElE,MAAM,uBAAuB,EAC3B,WACA,GAAG,YACwC;AAC3C,QACE,oBAAC;EACC,WAAW,GACT,yDACA,UACD;EACD,GAAI;GACJ;;AAGN,oBAAoB,cAAc"}
|
package/dist/ui/cta.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type CtaProps = ButtonProps & {
|
|
|
9
9
|
href?: string;
|
|
10
10
|
children?: React$1.ReactNode;
|
|
11
11
|
};
|
|
12
|
-
declare const Cta: React$1.ForwardRefExoticComponent<Omit<CtaProps, "ref"> & React$1.RefAttributes<
|
|
12
|
+
declare const Cta: React$1.ForwardRefExoticComponent<Omit<CtaProps, "ref"> & React$1.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Cta, CtaProps };
|
|
15
15
|
//# sourceMappingURL=cta.d.ts.map
|
package/dist/ui/cta.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as React$1 from "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region ui/cta.tsx
|
|
7
|
-
const Cta = React$1.forwardRef(({ capture, ctaName, className, as = "button", href, onClick, size = "lg", children
|
|
7
|
+
const Cta = React$1.forwardRef(({ capture, ctaName, className, as = "button", href, onClick, size = "lg", children, ...props }, ref) => {
|
|
8
8
|
const handleClick = (e) => {
|
|
9
9
|
if (ctaName && capture) try {
|
|
10
10
|
capture(ctaName);
|
package/dist/ui/cta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cta.js","names":["React","handleClick: React.MouseEventHandler<\n HTMLButtonElement | HTMLAnchorElement\n >"],"sources":["../../ui/cta.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button, type ButtonProps } from './button';\nimport { cn } from './utils';\n\nexport type CtaProps = ButtonProps & {\n capture?: (cta: string) => void;\n ctaName?: string;\n as?: 'button' | 'a';\n href?: string;\n children?: React.ReactNode;\n};\n\nexport const Cta = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n CtaProps\n>(\n (\n {\n capture,\n ctaName,\n className,\n as = 'button',\n href,\n onClick,\n size = 'lg',\n children,\n ...props\n },\n ref\n ) => {\n const handleClick: React.MouseEventHandler<\n HTMLButtonElement | HTMLAnchorElement\n > = (e) => {\n if (ctaName && capture) {\n try {\n capture(ctaName);\n } catch {}\n }\n onClick?.(e as any);\n };\n\n if (as === 'a') {\n return (\n <Button\n asChild\n size={size}\n className={cn('min-h-[44px]', className)}\n {...props}\n >\n {}\n <a href={href} onClick={handleClick} ref={ref as any}>\n {children}\n </a>\n </Button>\n );\n }\n\n return (\n <Button\n size={size}\n className={cn('min-h-[44px]', className)}\n onClick={handleClick as any}\n ref={ref as any}\n {...props}\n >\n {children}\n </Button>\n );\n }\n);\nCta.displayName = 'Cta';\n"],"mappings":";;;;;;AAYA,MAAa,MAAMA,QAAM,YAKrB,EACE,SACA,SACA,WACA,KAAK,UACL,MACA,SACA,OAAO,MACP,
|
|
1
|
+
{"version":3,"file":"cta.js","names":["React","handleClick: React.MouseEventHandler<\n HTMLButtonElement | HTMLAnchorElement\n >"],"sources":["../../ui/cta.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button, type ButtonProps } from './button';\nimport { cn } from './utils';\n\nexport type CtaProps = ButtonProps & {\n capture?: (cta: string) => void;\n ctaName?: string;\n as?: 'button' | 'a';\n href?: string;\n children?: React.ReactNode;\n};\n\nexport const Cta = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n CtaProps\n>(\n (\n {\n capture,\n ctaName,\n className,\n as = 'button',\n href,\n onClick,\n size = 'lg',\n children,\n ...props\n },\n ref\n ) => {\n const handleClick: React.MouseEventHandler<\n HTMLButtonElement | HTMLAnchorElement\n > = (e) => {\n if (ctaName && capture) {\n try {\n capture(ctaName);\n } catch {}\n }\n onClick?.(e as any);\n };\n\n if (as === 'a') {\n return (\n <Button\n asChild\n size={size}\n className={cn('min-h-[44px]', className)}\n {...props}\n >\n {}\n <a href={href} onClick={handleClick} ref={ref as any}>\n {children}\n </a>\n </Button>\n );\n }\n\n return (\n <Button\n size={size}\n className={cn('min-h-[44px]', className)}\n onClick={handleClick as any}\n ref={ref as any}\n {...props}\n >\n {children}\n </Button>\n );\n }\n);\nCta.displayName = 'Cta';\n"],"mappings":";;;;;;AAYA,MAAa,MAAMA,QAAM,YAKrB,EACE,SACA,SACA,WACA,KAAK,UACL,MACA,SACA,OAAO,MACP,UACA,GAAG,SAEL,QACG;CACH,MAAMC,eAED,MAAM;AACT,MAAI,WAAW,QACb,KAAI;AACF,WAAQ,QAAQ;UACV;AAEV,YAAU,EAAS;;AAGrB,KAAI,OAAO,IACT,QACE,oBAAC;EACC;EACM;EACN,WAAW,GAAG,gBAAgB,UAAU;EACxC,GAAI;YAGJ,oBAAC;GAAQ;GAAM,SAAS;GAAkB;GACvC;IACC;GACG;AAIb,QACE,oBAAC;EACO;EACN,WAAW,GAAG,gBAAgB,UAAU;EACxC,SAAS;EACJ;EACL,GAAI;EAEH;GACM;EAGd;AACD,IAAI,cAAc"}
|
package/dist/ui/date-picker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime196 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ui/date-picker.d.ts
|
|
4
4
|
interface DatePickerProps {
|
|
@@ -20,7 +20,7 @@ declare function DatePicker({
|
|
|
20
20
|
placeholder,
|
|
21
21
|
className,
|
|
22
22
|
language
|
|
23
|
-
}: DatePickerProps):
|
|
23
|
+
}: DatePickerProps): react_jsx_runtime196.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { DatePicker, DatePickerProps };
|
|
26
26
|
//# sourceMappingURL=date-picker.d.ts.map
|
package/dist/ui/date-picker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","names":["React"],"sources":["../../ui/date-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CalendarIcon } from 'lucide-react';\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\nimport { Button } from './button';\nimport { Calendar } from './calendar';\nimport { Input } from './input';\nimport { cn } from './utils';\n\nexport interface DatePickerProps {\n value: Date | null;\n onChange: (date: Date | null) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n placeholder?: string;\n className?: string;\n language?: string;\n}\n\nexport function DatePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n placeholder = 'Select date',\n className,\n language,\n}: DatePickerProps) {\n const [open, setOpen] = React.useState(false);\n const [month, setMonth] = React.useState<Date>(value ?? new Date());\n const [textValue, setTextValue] = React.useState<string>(formatDate(value));\n\n React.useEffect(() => {\n setTextValue(formatDate(value));\n if (value) setMonth(value);\n }, [value]);\n\n function formatDate(date: Date | null | undefined) {\n if (!date) return '';\n return date.toLocaleDateString(language, {\n day: '2-digit',\n month: 'long',\n year: 'numeric',\n });\n }\n\n function isValidDate(date: Date | undefined) {\n if (!date) return false;\n return !isNaN(date.getTime());\n }\n\n function isWithinRange(date: Date) {\n if (minDate && date < minDate) return false;\n if (maxDate && date > maxDate) return false;\n return true;\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <div className={cn('relative w-full', className)}>\n <Input\n value={textValue}\n placeholder={placeholder}\n onChange={(e) => {\n const nextText = e.currentTarget.value;\n setTextValue(nextText);\n const parsed = new Date(nextText);\n if (isValidDate(parsed) && isWithinRange(parsed)) {\n onChange(parsed);\n setMonth(parsed);\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setOpen(true);\n }\n }}\n disabled={disabled}\n className={cn('pr-10')}\n />\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n disabled={disabled}\n aria-label=\"Open date picker\"\n >\n <CalendarIcon className=\"size-4\" />\n </Button>\n </PopoverTrigger>\n </div>\n <PopoverContent\n className=\"w-auto overflow-hidden p-0\"\n align=\"end\"\n sideOffset={10}\n alignOffset={-8}\n >\n <Calendar\n mode=\"single\"\n selected={value ?? undefined}\n captionLayout=\"dropdown\"\n month={month}\n onMonthChange={setMonth}\n onSelect={(d) => {\n onChange(d ?? null);\n setTextValue(formatDate(d ?? null));\n if (d) setOpen(false);\n }}\n fromDate={minDate}\n toDate={maxDate}\n initialFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-picker.js","names":["React"],"sources":["../../ui/date-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CalendarIcon } from 'lucide-react';\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\nimport { Button } from './button';\nimport { Calendar } from './calendar';\nimport { Input } from './input';\nimport { cn } from './utils';\n\nexport interface DatePickerProps {\n value: Date | null;\n onChange: (date: Date | null) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n placeholder?: string;\n className?: string;\n language?: string;\n}\n\nexport function DatePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n placeholder = 'Select date',\n className,\n language,\n}: DatePickerProps) {\n const [open, setOpen] = React.useState(false);\n const [month, setMonth] = React.useState<Date>(value ?? new Date());\n const [textValue, setTextValue] = React.useState<string>(formatDate(value));\n\n React.useEffect(() => {\n setTextValue(formatDate(value));\n if (value) setMonth(value);\n }, [value]);\n\n function formatDate(date: Date | null | undefined) {\n if (!date) return '';\n return date.toLocaleDateString(language, {\n day: '2-digit',\n month: 'long',\n year: 'numeric',\n });\n }\n\n function isValidDate(date: Date | undefined) {\n if (!date) return false;\n return !isNaN(date.getTime());\n }\n\n function isWithinRange(date: Date) {\n if (minDate && date < minDate) return false;\n if (maxDate && date > maxDate) return false;\n return true;\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <div className={cn('relative w-full', className)}>\n <Input\n value={textValue}\n placeholder={placeholder}\n onChange={(e) => {\n const nextText = e.currentTarget.value;\n setTextValue(nextText);\n const parsed = new Date(nextText);\n if (isValidDate(parsed) && isWithinRange(parsed)) {\n onChange(parsed);\n setMonth(parsed);\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setOpen(true);\n }\n }}\n disabled={disabled}\n className={cn('pr-10')}\n />\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n disabled={disabled}\n aria-label=\"Open date picker\"\n >\n <CalendarIcon className=\"size-4\" />\n </Button>\n </PopoverTrigger>\n </div>\n <PopoverContent\n className=\"w-auto overflow-hidden p-0\"\n align=\"end\"\n sideOffset={10}\n alignOffset={-8}\n >\n <Calendar\n mode=\"single\"\n selected={value ?? undefined}\n captionLayout=\"dropdown\"\n month={month}\n onMonthChange={setMonth}\n onSelect={(d) => {\n onChange(d ?? null);\n setTextValue(formatDate(d ?? null));\n if (d) setOpen(false);\n }}\n fromDate={minDate}\n toDate={maxDate}\n initialFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAqBA,SAAgB,WAAW,EACzB,OACA,UACA,UACA,SACA,SACA,cAAc,eACd,WACA,YACkB;CAClB,MAAM,CAAC,MAAM,WAAWA,QAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAe,yBAAS,IAAI,MAAM,CAAC;CACnE,MAAM,CAAC,WAAW,gBAAgBA,QAAM,SAAiB,WAAW,MAAM,CAAC;AAE3E,SAAM,gBAAgB;AACpB,eAAa,WAAW,MAAM,CAAC;AAC/B,MAAI,MAAO,UAAS,MAAM;IACzB,CAAC,MAAM,CAAC;CAEX,SAAS,WAAW,MAA+B;AACjD,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,KAAK,mBAAmB,UAAU;GACvC,KAAK;GACL,OAAO;GACP,MAAM;GACP,CAAC;;CAGJ,SAAS,YAAY,MAAwB;AAC3C,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,CAAC,MAAM,KAAK,SAAS,CAAC;;CAG/B,SAAS,cAAc,MAAY;AACjC,MAAI,WAAW,OAAO,QAAS,QAAO;AACtC,MAAI,WAAW,OAAO,QAAS,QAAO;AACtC,SAAO;;AAGT,QACE,qBAAC;EAAc;EAAM,cAAc;aACjC,qBAAC;GAAI,WAAW,GAAG,mBAAmB,UAAU;cAC9C,oBAAC;IACC,OAAO;IACM;IACb,WAAW,MAAM;KACf,MAAM,WAAW,EAAE,cAAc;AACjC,kBAAa,SAAS;KACtB,MAAM,SAAS,IAAI,KAAK,SAAS;AACjC,SAAI,YAAY,OAAO,IAAI,cAAc,OAAO,EAAE;AAChD,eAAS,OAAO;AAChB,eAAS,OAAO;;;IAGpB,YAAY,MAAM;AAChB,SAAI,EAAE,QAAQ,aAAa;AACzB,QAAE,gBAAgB;AAClB,cAAQ,KAAK;;;IAGP;IACV,WAAW,GAAG,QAAQ;KACtB,EACF,oBAAC;IAAe;cACd,oBAAC;KACC,MAAK;KACL,SAAQ;KACR,MAAK;KACL,WAAU;KACA;KACV,cAAW;eAEX,oBAAC,gBAAa,WAAU,WAAW;MAC5B;KACM;IACb,EACN,oBAAC;GACC,WAAU;GACV,OAAM;GACN,YAAY;GACZ,aAAa;aAEb,oBAAC;IACC,MAAK;IACL,UAAU,SAAS;IACnB,eAAc;IACP;IACP,eAAe;IACf,WAAW,MAAM;AACf,cAAS,KAAK,KAAK;AACnB,kBAAa,WAAW,KAAK,KAAK,CAAC;AACnC,SAAI,EAAG,SAAQ,MAAM;;IAEvB,UAAU;IACV,QAAQ;IACR;KACA;IACa;GACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime234 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ui/date-range-picker.d.ts
|
|
4
4
|
interface DateRange {
|
|
@@ -20,7 +20,7 @@ declare function DateRangePicker({
|
|
|
20
20
|
minDate,
|
|
21
21
|
maxDate,
|
|
22
22
|
className
|
|
23
|
-
}: DateRangePickerProps):
|
|
23
|
+
}: DateRangePickerProps): react_jsx_runtime234.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { DateRange, DateRangePicker, DateRangePickerProps };
|
|
26
26
|
//# sourceMappingURL=date-range-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker.js","names":["React"],"sources":["../../ui/date-range-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\nimport { Button } from './button';\nimport { Calendar } from './calendar';\nimport { cn } from './utils';\n\nexport interface DateRange {\n start: Date | null;\n end: Date | null;\n}\n\nexport interface DateRangePickerProps {\n value: DateRange;\n onChange: (range: DateRange) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n className?: string;\n}\n\nexport function DateRangePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n className,\n}: DateRangePickerProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n className={cn(\n 'w-full justify-start text-left font-normal',\n className\n )}\n >\n {value.start && value.end ? (\n `${value.start.toLocaleDateString()} - ${value.end.toLocaleDateString()}`\n ) : (\n <span className=\"opacity-50\">Select date range</span>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"range\"\n selected={\n value.start && value.end\n ? { from: value.start, to: value.end }\n : undefined\n }\n onSelect={(range: any) => {\n const start = range?.from ?? null;\n const end = range?.to ?? null;\n onChange({ start, end });\n }}\n fromDate={minDate}\n toDate={maxDate}\n numberOfMonths={2}\n initialFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-range-picker.js","names":["React"],"sources":["../../ui/date-range-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\nimport { Button } from './button';\nimport { Calendar } from './calendar';\nimport { cn } from './utils';\n\nexport interface DateRange {\n start: Date | null;\n end: Date | null;\n}\n\nexport interface DateRangePickerProps {\n value: DateRange;\n onChange: (range: DateRange) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n className?: string;\n}\n\nexport function DateRangePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n className,\n}: DateRangePickerProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n className={cn(\n 'w-full justify-start text-left font-normal',\n className\n )}\n >\n {value.start && value.end ? (\n `${value.start.toLocaleDateString()} - ${value.end.toLocaleDateString()}`\n ) : (\n <span className=\"opacity-50\">Select date range</span>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"range\"\n selected={\n value.start && value.end\n ? { from: value.start, to: value.end }\n : undefined\n }\n onSelect={(range: any) => {\n const start = range?.from ?? null;\n const end = range?.to ?? null;\n onChange({ start, end });\n }}\n fromDate={minDate}\n toDate={maxDate}\n numberOfMonths={2}\n initialFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,gBAAgB,EAC9B,OACA,UACA,UACA,SACA,SACA,aACuB;CACvB,MAAM,CAAC,MAAM,WAAWA,QAAM,SAAS,MAAM;AAE7C,QACE,qBAAC;EAAc;EAAM,cAAc;aACjC,oBAAC;GAAe;aACd,oBAAC;IACC,MAAK;IACL,SAAQ;IACE;IACV,WAAW,GACT,8CACA,UACD;cAEA,MAAM,SAAS,MAAM,MACpB,GAAG,MAAM,MAAM,oBAAoB,CAAC,KAAK,MAAM,IAAI,oBAAoB,KAEvE,oBAAC;KAAK,WAAU;eAAa;MAAwB;KAEhD;IACM,EACjB,oBAAC;GAAe,WAAU;GAAa,OAAM;aAC3C,oBAAC;IACC,MAAK;IACL,UACE,MAAM,SAAS,MAAM,MACjB;KAAE,MAAM,MAAM;KAAO,IAAI,MAAM;KAAK,GACpC;IAEN,WAAW,UAAe;AAGxB,cAAS;MAAE,OAFG,OAAO,QAAQ;MAEX,KADN,OAAO,MAAM;MACF,CAAC;;IAE1B,UAAU;IACV,QAAQ;IACR,gBAAgB;IAChB;KACA;IACa;GACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ui/datetime-picker.d.ts
|
|
4
4
|
interface DateTimePickerProps {
|
|
@@ -22,7 +22,7 @@ declare function DateTimePicker({
|
|
|
22
22
|
timePlaceholder,
|
|
23
23
|
is24Hour,
|
|
24
24
|
className
|
|
25
|
-
}: DateTimePickerProps):
|
|
25
|
+
}: DateTimePickerProps): react_jsx_runtime0.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { DateTimePicker, DateTimePickerProps };
|
|
28
28
|
//# sourceMappingURL=datetime-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime-picker.d.ts","names":[],"sources":["../../ui/datetime-picker.tsx"],"sourcesContent":[],"mappings":";;;UAOiB,mBAAA;SACR;mBACU;EAFF,QAAA,CAAA,EAAA,OAAA;EACR,OAAA,CAAA,EAGG,IAHH;EACU,OAAA,CAAA,EAGP,IAHO;EAEP,eAAA,CAAA,EAAA,MAAA;EACA,eAAA,CAAA,EAAA,MAAA;EAAI,QAAA,CAAA,EAAA,OAAA;EAOA,SAAA,CAAA,EAAA,MAAc;;AAE5B,iBAFc,cAAA,CAEd;EAAA,KAAA;EAAA,QAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA,eAAA;EAAA,eAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAQC,mBARD,CAAA,EAQoB,
|
|
1
|
+
{"version":3,"file":"datetime-picker.d.ts","names":[],"sources":["../../ui/datetime-picker.tsx"],"sourcesContent":[],"mappings":";;;UAOiB,mBAAA;SACR;mBACU;EAFF,QAAA,CAAA,EAAA,OAAA;EACR,OAAA,CAAA,EAGG,IAHH;EACU,OAAA,CAAA,EAGP,IAHO;EAEP,eAAA,CAAA,EAAA,MAAA;EACA,eAAA,CAAA,EAAA,MAAA;EAAI,QAAA,CAAA,EAAA,OAAA;EAOA,SAAA,CAAA,EAAA,MAAc;;AAE5B,iBAFc,cAAA,CAEd;EAAA,KAAA;EAAA,QAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA,eAAA;EAAA,eAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAQC,mBARD,CAAA,EAQoB,kBAAA,CAAA,GAAA,CAAA,OARpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime-picker.js","names":[],"sources":["../../ui/datetime-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DatePicker } from './date-picker';\nimport { TimePicker } from './time-picker';\nimport { cn } from './utils';\n\nexport interface DateTimePickerProps {\n value: Date | null;\n onChange: (date: Date | null) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n datePlaceholder?: string;\n timePlaceholder?: string;\n is24Hour?: boolean;\n className?: string;\n}\n\nexport function DateTimePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n datePlaceholder,\n timePlaceholder,\n is24Hour,\n className,\n}: DateTimePickerProps) {\n const handleDate = (d: Date | null) => {\n if (!d) return;\n const next = new Date(d);\n if (value) next.setHours(value.getHours(), value.getMinutes(), 0, 0);\n onChange(next);\n };\n const handleTime = (t: Date | null) => {\n if (!t) return;\n const next = new Date(value ?? new Date());\n next.setHours(t.getHours(), t.getMinutes(), 0, 0);\n onChange(next);\n };\n\n return (\n <div className={cn('flex gap-2', className)}>\n <DatePicker\n value={value}\n onChange={handleDate}\n disabled={disabled}\n minDate={minDate}\n maxDate={maxDate}\n placeholder={datePlaceholder}\n />\n <TimePicker\n value={value}\n onChange={handleTime}\n disabled={disabled}\n is24Hour={is24Hour}\n placeholder={timePlaceholder}\n />\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"datetime-picker.js","names":[],"sources":["../../ui/datetime-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { DatePicker } from './date-picker';\nimport { TimePicker } from './time-picker';\nimport { cn } from './utils';\n\nexport interface DateTimePickerProps {\n value: Date | null;\n onChange: (date: Date | null) => void;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n datePlaceholder?: string;\n timePlaceholder?: string;\n is24Hour?: boolean;\n className?: string;\n}\n\nexport function DateTimePicker({\n value,\n onChange,\n disabled,\n minDate,\n maxDate,\n datePlaceholder,\n timePlaceholder,\n is24Hour,\n className,\n}: DateTimePickerProps) {\n const handleDate = (d: Date | null) => {\n if (!d) return;\n const next = new Date(d);\n if (value) next.setHours(value.getHours(), value.getMinutes(), 0, 0);\n onChange(next);\n };\n const handleTime = (t: Date | null) => {\n if (!t) return;\n const next = new Date(value ?? new Date());\n next.setHours(t.getHours(), t.getMinutes(), 0, 0);\n onChange(next);\n };\n\n return (\n <div className={cn('flex gap-2', className)}>\n <DatePicker\n value={value}\n onChange={handleDate}\n disabled={disabled}\n minDate={minDate}\n maxDate={maxDate}\n placeholder={datePlaceholder}\n />\n <TimePicker\n value={value}\n onChange={handleTime}\n disabled={disabled}\n is24Hour={is24Hour}\n placeholder={timePlaceholder}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,eAAe,EAC7B,OACA,UACA,UACA,SACA,SACA,iBACA,iBACA,UACA,aACsB;CACtB,MAAM,cAAc,MAAmB;AACrC,MAAI,CAAC,EAAG;EACR,MAAM,OAAO,IAAI,KAAK,EAAE;AACxB,MAAI,MAAO,MAAK,SAAS,MAAM,UAAU,EAAE,MAAM,YAAY,EAAE,GAAG,EAAE;AACpE,WAAS,KAAK;;CAEhB,MAAM,cAAc,MAAmB;AACrC,MAAI,CAAC,EAAG;EACR,MAAM,OAAO,IAAI,KAAK,yBAAS,IAAI,MAAM,CAAC;AAC1C,OAAK,SAAS,EAAE,UAAU,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE;AACjD,WAAS,KAAK;;AAGhB,QACE,qBAAC;EAAI,WAAW,GAAG,cAAc,UAAU;aACzC,oBAAC;GACQ;GACP,UAAU;GACA;GACD;GACA;GACT,aAAa;IACb,EACF,oBAAC;GACQ;GACP,UAAU;GACA;GACA;GACV,aAAa;IACb;GACE"}
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
3
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
4
|
|
|
5
5
|
//#region ui/dialog.d.ts
|
|
6
6
|
declare function Dialog({
|
|
7
7
|
...props
|
|
8
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Root>):
|
|
8
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime19.JSX.Element;
|
|
9
9
|
declare function DialogTrigger({
|
|
10
10
|
...props
|
|
11
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Trigger>):
|
|
11
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime19.JSX.Element;
|
|
12
12
|
declare function DialogPortal({
|
|
13
13
|
...props
|
|
14
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Portal>):
|
|
14
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime19.JSX.Element;
|
|
15
15
|
declare function DialogClose({
|
|
16
16
|
...props
|
|
17
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Close>):
|
|
17
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime19.JSX.Element;
|
|
18
18
|
declare function DialogOverlay({
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Overlay>):
|
|
21
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime19.JSX.Element;
|
|
22
22
|
declare function DialogContent({
|
|
23
23
|
className,
|
|
24
24
|
children,
|
|
@@ -26,23 +26,23 @@ declare function DialogContent({
|
|
|
26
26
|
...props
|
|
27
27
|
}: React$1.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
28
28
|
showCloseButton?: boolean;
|
|
29
|
-
}):
|
|
29
|
+
}): react_jsx_runtime19.JSX.Element;
|
|
30
30
|
declare function DialogHeader({
|
|
31
31
|
className,
|
|
32
32
|
...props
|
|
33
|
-
}: React$1.ComponentProps<'div'>):
|
|
33
|
+
}: React$1.ComponentProps<'div'>): react_jsx_runtime19.JSX.Element;
|
|
34
34
|
declare function DialogFooter({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: React$1.ComponentProps<'div'>):
|
|
37
|
+
}: React$1.ComponentProps<'div'>): react_jsx_runtime19.JSX.Element;
|
|
38
38
|
declare function DialogTitle({
|
|
39
39
|
className,
|
|
40
40
|
...props
|
|
41
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Title>):
|
|
41
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime19.JSX.Element;
|
|
42
42
|
declare function DialogDescription({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: React$1.ComponentProps<typeof DialogPrimitive.Description>):
|
|
45
|
+
}: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime19.JSX.Element;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
48
48
|
//# sourceMappingURL=dialog.d.ts.map
|
package/dist/ui/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../../ui/dialog.tsx"],"sourcesContent":[],"mappings":";;;;;iBAQS,MAAA;;GAEN,OAAA,CAAM,sBAAsB,eAAA,CAAgB,QAAK,
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../../ui/dialog.tsx"],"sourcesContent":[],"mappings":";;;;;iBAQS,MAAA;;GAEN,OAAA,CAAM,sBAAsB,eAAA,CAAgB,QAAK,mBAAA,CAAA,GAAA,CAAA;iBAI3C,aAAA;;GAEN,OAAA,CAAM,sBAAsB,eAAA,CAAgB,WAAQ,mBAAA,CAAA,GAAA,CAAA;iBAI9C,YAAA;;GAEN,OAAA,CAAM,sBAAsB,eAAA,CAAgB,UAAO,mBAAA,CAAA,GAAA,CAAA;AAnBI,iBAuBjD,WAAA,CAlBM;EAAA,GAAA;AAAA,CAAA,EAoBZ,OAAA,CAAM,cApBM,CAAA,OAoBgB,eAAA,CAAgB,KApBhC,CAAA,CAAA,EAoBsC,mBAAA,CAAA,GAAA,CAAA,OApBtC;iBAwBN,aAAA,CAtBsC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyB5C,OAAA,CAAM,cAzBsC,CAAA,OAyBhB,eAAA,CAAgB,OAzBA,CAAA,CAAA,EAyBQ,mBAAA,CAAA,GAAA,CAAA,OAzBR;iBAsCtC,aAAA,CAtCA;EAAA,SAAA;EAAA,QAAA;EAAA,eAAA;EAAA,GAAA;CAAA,EA2CN,OAAA,CAAM,cA3CA,CAAA,OA2CsB,eAAA,CAAgB,OA3CtC,CAAA,GAAA;EAA2C,eAAA,CAAA,EAAA,OAAA;CAAA,CAAA,EA6CnD,mBAAA,CAAA,GAAA,CAAA,OA7CmD;AAAA,iBAwE3C,YAAA,CApEa;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoEyB,OAAA,CAAM,cApE/B,CAAA,KAAA,CAAA,CAAA,EAoEoD,mBAAA,CAAA,GAAA,CAAA,OApEpD;iBA8Eb,YAAA,CA5EsC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4EA,OAAA,CAAM,cA5EN,CAAA,KAAA,CAAA,CAAA,EA4E2B,mBAAA,CAAA,GAAA,CAAA,OA5E3B;iBAyFtC,WAAA,CAzFA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA4FN,OAAA,CAAM,cA5FA,CAAA,OA4FsB,eAAA,CAAgB,KA5FtC,CAAA,CAAA,EA4F4C,mBAAA,CAAA,GAAA,CAAA,OA5F5C;iBAsGA,iBAAA,CAtG8C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyGpD,OAAA,CAAM,cAzG8C,CAAA,OAyGxB,eAAA,CAAgB,WAzGQ,CAAA,CAAA,EAyGI,mBAAA,CAAA,GAAA,CAAA,OAzGJ"}
|
package/dist/ui/dialog.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 { XIcon } from "lucide-react";
|
|
@@ -32,14 +31,14 @@ function DialogClose({ ...props }) {
|
|
|
32
31
|
...props
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
|
-
function DialogOverlay({ className
|
|
34
|
+
function DialogOverlay({ className, ...props }) {
|
|
36
35
|
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
37
36
|
"data-slot": "dialog-overlay",
|
|
38
37
|
className: cn("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", className),
|
|
39
38
|
...props
|
|
40
39
|
});
|
|
41
40
|
}
|
|
42
|
-
function DialogContent({ className, children, showCloseButton = true
|
|
41
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
43
42
|
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
44
43
|
"data-slot": "dialog-portal",
|
|
45
44
|
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
@@ -57,28 +56,28 @@ function DialogContent({ className, children, showCloseButton = true,...props })
|
|
|
57
56
|
})]
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
function DialogHeader({ className
|
|
59
|
+
function DialogHeader({ className, ...props }) {
|
|
61
60
|
return /* @__PURE__ */ jsx("div", {
|
|
62
61
|
"data-slot": "dialog-header",
|
|
63
62
|
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
64
63
|
...props
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
|
-
function DialogFooter({ className
|
|
66
|
+
function DialogFooter({ className, ...props }) {
|
|
68
67
|
return /* @__PURE__ */ jsx("div", {
|
|
69
68
|
"data-slot": "dialog-footer",
|
|
70
69
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
71
70
|
...props
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
|
-
function DialogTitle({ className
|
|
73
|
+
function DialogTitle({ className, ...props }) {
|
|
75
74
|
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
76
75
|
"data-slot": "dialog-title",
|
|
77
76
|
className: cn("text-lg leading-none font-semibold", className),
|
|
78
77
|
...props
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
function DialogDescription({ className
|
|
80
|
+
function DialogDescription({ className, ...props }) {
|
|
82
81
|
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
83
82
|
"data-slot": "dialog-description",
|
|
84
83
|
className: cn("text-muted-foreground text-sm", className),
|
package/dist/ui/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":[],"sources":["../../ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from './utils';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-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 DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.js","names":[],"sources":["../../ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from './utils';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-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 DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;;;AAQA,SAAS,OAAO,EACd,GAAG,SACiD;AACpD,QAAO,oBAAC,gBAAgB;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,cAAc,EACrB,GAAG,SACoD;AACvD,QAAO,oBAAC,gBAAgB;EAAQ,aAAU;EAAiB,GAAI;GAAS;;AAG1E,SAAS,aAAa,EACpB,GAAG,SACmD;AACtD,QAAO,oBAAC,gBAAgB;EAAO,aAAU;EAAgB,GAAI;GAAS;;AAGxE,SAAS,YAAY,EACnB,GAAG,SACkD;AACrD,QAAO,oBAAC,gBAAgB;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,WACA,GAAG,SACoD;AACvD,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GACT,0JACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,cAAc,EACrB,WACA,UACA,kBAAkB,MAClB,GAAG,SAGF;AACD,QACE,qBAAC;EAAa,aAAU;aACtB,oBAAC,kBAAgB,EACjB,qBAAC,gBAAgB;GACf,aAAU;GACV,WAAW,GACT,+WACA,UACD;GACD,GAAI;cAEH,UACA,mBACC,qBAAC,gBAAgB;IACf,aAAU;IACV,WAAU;eAEV,oBAAC,UAAQ,EACT,oBAAC;KAAK,WAAU;eAAU;MAAY;KAChB;IAEF;GACb;;AAInB,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GAAG,gDAAgD,UAAU;EACxE,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,0DACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;AACrD,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GAAG,sCAAsC,UAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;AAC3D,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ"}
|