@alpaca-editor/core 1.0.3956 → 1.0.3960
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/build.css +1 -1
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +23 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/dialog.js +37 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +7 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +63 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/config/config.js +79 -63
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +3 -3
- package/dist/editor/ContentTree.js +1 -1
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +6 -2
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +1 -1
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/ImageEditor.js +16 -6
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +4 -4
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MobileLayout.js +3 -3
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureEditor.js +29 -15
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/Titlebar.js +6 -11
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/GhostWriter.js +1 -1
- package/dist/editor/ai/GhostWriter.js.map +1 -1
- package/dist/editor/client/EditorClient.d.ts +4 -2
- package/dist/editor/client/EditorClient.js +32 -11
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +4 -1
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/operations.js +2 -2
- package/dist/editor/client/pageModelBuilder.js +3 -6
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/commands/itemCommands.d.ts +2 -0
- package/dist/editor/commands/itemCommands.js +180 -0
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/menubar/ActiveUsers.js +98 -4
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/{ActionsMenu.d.ts → ItemActionsMenu.d.ts} +1 -1
- package/dist/editor/menubar/ItemActionsMenu.js +23 -0
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +2 -2
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/LanguageSelector.d.ts +1 -2
- package/dist/editor/menubar/LanguageSelector.js +23 -23
- package/dist/editor/menubar/LanguageSelector.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +7 -8
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/PageViewerControls.js +22 -19
- package/dist/editor/menubar/PageViewerControls.js.map +1 -1
- package/dist/editor/menubar/PreviewSecondaryControls.js +2 -3
- package/dist/editor/menubar/PreviewSecondaryControls.js.map +1 -1
- package/dist/editor/menubar/User.js +1 -1
- package/dist/editor/menubar/User.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +36 -31
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.d.ts +1 -0
- package/dist/editor/menubar/WorkflowButton.js +41 -0
- package/dist/editor/menubar/WorkflowButton.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js +5 -5
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +2 -2
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.d.ts +2 -1
- package/dist/editor/page-viewer/EditorForm.js +61 -49
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.d.ts +2 -1
- package/dist/editor/page-viewer/PageViewer.js +28 -44
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Comments.js +9 -9
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +3 -3
- package/dist/editor/services/contentService.d.ts +18 -0
- package/dist/editor/services/contentService.js +6 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +5 -0
- package/dist/editor/services/editService.js +4 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +2 -1
- package/dist/editor/services/systemService.js +4 -1
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +26 -10
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/Divider.d.ts +6 -0
- package/dist/editor/sidebar/Divider.js +6 -0
- package/dist/editor/sidebar/Divider.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +16 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/SEOInfo.d.ts +1 -0
- package/dist/editor/sidebar/SEOInfo.js +169 -0
- package/dist/editor/sidebar/SEOInfo.js.map +1 -0
- package/dist/editor/sidebar/Sidebar.js +1 -1
- package/dist/editor/sidebar/Sidebar.js.map +1 -1
- package/dist/editor/sidebar/SidebarView.d.ts +3 -2
- package/dist/editor/sidebar/SidebarView.js +22 -60
- package/dist/editor/sidebar/SidebarView.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +66 -20
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/Icons.d.ts +4 -0
- package/dist/editor/ui/Icons.js +15 -3
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/Section.js +1 -1
- package/dist/editor/ui/Section.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.d.ts +1 -2
- package/dist/editor/ui/SimpleIconButton.js +8 -13
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.js +2 -2
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/SimpleToolbar.js +1 -1
- package/dist/editor/ui/SimpleToolbar.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +4 -0
- package/dist/editor/ui/Splitter.js +6 -7
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/views/CompareView.js +16 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/SingleEditView.d.ts +2 -1
- package/dist/editor/views/SingleEditView.js +2 -2
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/page-wizard/steps/ContentStep.js +1 -1
- package/dist/page-wizard/steps/ContentStep.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +8 -6
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -8
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/styles.css +1519 -543
- package/dist/tour/Tour.js +79 -10
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +55 -45
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/types.d.ts +19 -1
- package/package.json +13 -5
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/button.tsx +3 -3
- package/src/components/ui/command.tsx +184 -0
- package/src/components/ui/dialog.tsx +143 -0
- package/src/components/ui/dropdown-menu.tsx +257 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/menubar.tsx +276 -0
- package/src/components/ui/popover.tsx +113 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/tooltip.tsx +61 -0
- package/src/config/config.tsx +102 -65
- package/src/config/types.ts +3 -3
- package/src/editor/ContentTree.tsx +1 -1
- package/src/editor/Editor.tsx +8 -2
- package/src/editor/FieldList.tsx +2 -2
- package/src/editor/FieldListField.tsx +1 -1
- package/src/editor/ImageEditor.tsx +44 -21
- package/src/editor/MainLayout.tsx +21 -16
- package/src/editor/MobileLayout.tsx +3 -2
- package/src/editor/PictureEditor.tsx +74 -45
- package/src/editor/Titlebar.tsx +12 -24
- package/src/editor/ai/GhostWriter.tsx +1 -1
- package/src/editor/client/EditorClient.tsx +55 -13
- package/src/editor/client/editContext.ts +5 -0
- package/src/editor/client/operations.ts +2 -2
- package/src/editor/client/pageModelBuilder.ts +3 -7
- package/src/editor/commands/itemCommands.tsx +272 -0
- package/src/editor/field-types/MultiLineText.tsx +1 -1
- package/src/editor/field-types/SingleLineText.tsx +1 -1
- package/src/editor/menubar/ActiveUsers.tsx +271 -5
- package/src/editor/menubar/ItemActionsMenu.tsx +89 -0
- package/src/editor/menubar/ItemLanguageVersion.tsx +7 -5
- package/src/editor/menubar/LanguageSelector.tsx +105 -134
- package/src/editor/menubar/PageSelector.tsx +25 -27
- package/src/editor/menubar/PageViewerControls.tsx +126 -78
- package/src/editor/menubar/PreviewSecondaryControls.tsx +0 -2
- package/src/editor/menubar/User.tsx +2 -2
- package/src/editor/menubar/VersionSelector.tsx +124 -99
- package/src/editor/menubar/WorkflowButton.tsx +115 -0
- package/src/editor/page-editor-chrome/FrameMenu.tsx +5 -5
- package/src/editor/page-editor-chrome/SuggestionHighlightings.tsx +2 -2
- package/src/editor/page-viewer/EditorForm.tsx +112 -87
- package/src/editor/page-viewer/PageViewer.tsx +75 -92
- package/src/editor/page-viewer/PageViewerFrame.tsx +1 -1
- package/src/editor/reviews/Comments.tsx +19 -20
- package/src/editor/reviews/SuggestedEdit.tsx +3 -3
- package/src/editor/services/contentService.ts +28 -0
- package/src/editor/services/editService.ts +12 -0
- package/src/editor/services/systemService.ts +5 -2
- package/src/editor/sidebar/ComponentTree.tsx +34 -12
- package/src/editor/sidebar/Divider.tsx +22 -0
- package/src/editor/sidebar/LeftToolbar.tsx +36 -0
- package/src/editor/sidebar/SEOInfo.tsx +265 -0
- package/src/editor/sidebar/Sidebar.tsx +1 -0
- package/src/editor/sidebar/SidebarView.tsx +77 -111
- package/src/editor/sidebar/ViewSelector.tsx +211 -43
- package/src/editor/ui/Icons.tsx +155 -10
- package/src/editor/ui/Section.tsx +1 -1
- package/src/editor/ui/SimpleIconButton.tsx +30 -28
- package/src/editor/ui/SimpleTabs.tsx +3 -3
- package/src/editor/ui/SimpleToolbar.tsx +1 -1
- package/src/editor/ui/Splitter.tsx +14 -7
- package/src/editor/views/CompareView.tsx +23 -11
- package/src/editor/views/SingleEditView.tsx +3 -0
- package/src/page-wizard/steps/ContentStep.tsx +0 -1
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +18 -13
- package/src/splash-screen/RecentPages.tsx +4 -10
- package/src/tour/Tour.tsx +125 -34
- package/src/tour/default-tour.tsx +55 -45
- package/src/types.ts +21 -1
- package/styles.css +301 -1
- package/dist/editor/menubar/ActionsMenu.js +0 -49
- package/dist/editor/menubar/ActionsMenu.js.map +0 -1
- package/dist/editor/menubar/SecondaryControls.d.ts +0 -1
- package/dist/editor/menubar/SecondaryControls.js +0 -17
- package/dist/editor/menubar/SecondaryControls.js.map +0 -1
- package/src/editor/menubar/ActionsMenu.tsx +0 -94
- package/src/editor/menubar/SecondaryControls.tsx +0 -45
package/build.css
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
9
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
10
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
11
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
19
|
+
const Comp = asChild ? Slot : "span";
|
|
20
|
+
return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
export { Badge, badgeVariants };
|
|
23
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,GAAG,CACvB,gZAAgZ,EAChZ;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,gFAAgF;YAClF,SAAS,EACP,sFAAsF;YACxF,WAAW,EACT,2KAA2K;YAC7K,OAAO,EACL,wEAAwE;SAC3E;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAEF,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAEkD;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAErC,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,EACjB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded
|
|
5
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default: "bg-theme-secondary text-primary-foreground shadow-xs hover:bg-theme-secondary/80",
|
|
@@ -13,8 +13,8 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
13
13
|
link: "text-primary underline-offset-4 hover:underline",
|
|
14
14
|
},
|
|
15
15
|
size: {
|
|
16
|
-
default: "h-8 px-7 py-5 has-[>svg]:px-3
|
|
17
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
16
|
+
default: "h-8 px-7 py-5 has-[>svg]:px-3",
|
|
17
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5 text-xs",
|
|
18
18
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
19
19
|
icon: "size-9",
|
|
20
20
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACxB,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACxB,0bAA0b,EAC1b;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,kFAAkF;YACpF,WAAW,EACT,6JAA6J;YAC/J,OAAO,EACL,6HAA6H;YAC/H,SAAS,EACP,wEAAwE;YAC1E,KAAK,EACH,sEAAsE;YACxE,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,+BAA+B;YACxC,EAAE,EAAE,uDAAuD;YAC3D,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,QAAQ;SACf;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAEF,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAIP;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvC,OAAO,CACL,KAAC,IAAI,iBACO,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,gBAAgB,EAChB,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAC7C,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
+
import { Dialog } from "./dialog";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
+
import { SearchIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog";
|
|
7
|
+
function Command({ className, ...props }) {
|
|
8
|
+
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
|
|
11
|
+
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), showCloseButton: showCloseButton, children: _jsx(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", children: children }) })] }));
|
|
12
|
+
}
|
|
13
|
+
function CommandInput({ className, ...props }) {
|
|
14
|
+
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent p-1.5 text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
|
|
15
|
+
}
|
|
16
|
+
function CommandList({ className, ...props }) {
|
|
17
|
+
return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function CommandEmpty({ ...props }) {
|
|
20
|
+
return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
|
|
21
|
+
}
|
|
22
|
+
function CommandGroup({ className, ...props }) {
|
|
23
|
+
return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", 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), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function CommandSeparator({ className, ...props }) {
|
|
26
|
+
return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("bg-border -mx-1 h-px", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function CommandItem({ className, ...props }) {
|
|
29
|
+
return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", 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-sm 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), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function CommandShortcut({ className, ...props }) {
|
|
32
|
+
return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
35
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,UAAU,CAAC;AAElB,SAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACsC;IAC9C,OAAO,CACL,KAAC,gBAAgB,iBACL,SAAS,EACnB,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,KAAK,GAAG,iBAAiB,EACzB,WAAW,GAAG,gCAAgC,EAC9C,QAAQ,EACR,SAAS,EACT,eAAe,GAAG,IAAI,EACtB,GAAG,KAAK,EAMT;IACC,OAAO,CACL,MAAC,MAAM,OAAK,KAAK,aACf,MAAC,YAAY,IAAC,SAAS,EAAC,SAAS,aAC/B,KAAC,WAAW,cAAE,KAAK,GAAe,EAClC,KAAC,iBAAiB,cAAE,WAAW,GAAqB,IACvC,EACf,KAAC,aAAa,IACZ,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAC/C,eAAe,EAAE,eAAe,YAEhC,KAA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S,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,gBAAgB,CAAC,IAAI,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,qYAAqY,EACrY,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACqB;IAC7B,OAAO,CACL,4BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACX,uDAAuD,EACvD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
function Dialog({ ...props }) {
|
|
7
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function DialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogClose({ ...props }) {
|
|
16
|
+
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
17
|
+
}
|
|
18
|
+
function DialogOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", 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), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
22
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("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", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", 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", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
23
|
+
}
|
|
24
|
+
function DialogHeader({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function DialogFooter({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DialogTitle({ className, ...props }) {
|
|
31
|
+
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function DialogDescription({ className, ...props }) {
|
|
34
|
+
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
37
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,MAAM,CAAC,EACd,GAAG,KAAK,EAC0C;IAClD,OAAO,KAAC,eAAe,CAAC,IAAI,iBAAW,QAAQ,KAAK,KAAK,GAAI,CAAC;AAChE,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EAC6C;IACrD,OAAO,KAAC,eAAe,CAAC,OAAO,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAC;AAC3E,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EAC4C;IACpD,OAAO,KAAC,eAAe,CAAC,MAAM,iBAAW,eAAe,KAAK,KAAK,GAAI,CAAC;AACzE,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EAC2C;IACnD,OAAO,KAAC,eAAe,CAAC,KAAK,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AACvE,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EAC6C;IACrD,OAAO,CACL,KAAC,eAAe,CAAC,OAAO,iBACZ,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CACX,wJAAwJ,EACxJ,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,GAAG,KAAK,EAGT;IACC,OAA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Y,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
function DropdownMenu({ ...props }) {
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DropdownMenuPortal({ ...props }) {
|
|
10
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
16
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, 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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function DropdownMenuGroup({ ...props }) {
|
|
19
|
+
return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
22
|
+
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-xs 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", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
25
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm 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), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
26
|
+
}
|
|
27
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
31
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm 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), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
34
|
+
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
37
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
40
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuSub({ ...props }) {
|
|
43
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
44
|
+
}
|
|
45
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
46
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, 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-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", 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-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
52
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACgD;IACxD,OAAO,KAAC,qBAAqB,CAAC,IAAI,iBAAW,eAAe,KAAK,KAAK,GAAI,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,KAAC,qBAAqB,CAAC,MAAM,iBAAW,sBAAsB,KAAK,KAAK,GAAI,CAC7E,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACmD;IAC3D,OAAO,CACL,KAAC,qBAAqB,CAAC,OAAO,iBAClB,uBAAuB,KAC7B,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EACmD;IAC3D,OAAO,CACL,KAAC,qBAAqB,CAAC,MAAM,cAC3B,KAAC,qBAAqB,CAAC,OAAO,iBAClB,u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ACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,gBAAgB,IAAC,SAAS,EAAC,gBAAgB,GAAG,IACd,CACpC,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACsD;IAC9D,OAAO,CACL,KAAC,qBAAqB,CAAC,UAAU,iBACrB,2BAA2B,EACrC,SAAS,EAAE,EAAE,CACX,+eAA+e,EAC/e,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
function Input({ className, type, ...props }) {
|
|
4
|
+
return (_jsx("input", { type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Input };
|
|
7
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,icAAic,EACjc,+EAA+E,EAC/E,wGAAwG,EACxG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
function Menubar({ className, ...props }) {
|
|
7
|
+
return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function MenubarMenu({ ...props }) {
|
|
10
|
+
return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
11
|
+
}
|
|
12
|
+
function MenubarGroup({ ...props }) {
|
|
13
|
+
return _jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
14
|
+
}
|
|
15
|
+
function MenubarPortal({ ...props }) {
|
|
16
|
+
return _jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
17
|
+
}
|
|
18
|
+
function MenubarRadioGroup({ ...props }) {
|
|
19
|
+
return (_jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props }));
|
|
20
|
+
}
|
|
21
|
+
function MenubarTrigger({ className, ...props }) {
|
|
22
|
+
return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
|
25
|
+
return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in 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-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md", className), ...props }) }));
|
|
26
|
+
}
|
|
27
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
28
|
+
return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm 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", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
31
|
+
return (_jsxs(MenubarPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", 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), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
function MenubarRadioItem({ className, children, ...props }) {
|
|
34
|
+
return (_jsxs(MenubarPrimitive.RadioItem, { "data-slot": "menubar-radio-item", 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), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
35
|
+
}
|
|
36
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
37
|
+
return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function MenubarSeparator({ className, ...props }) {
|
|
40
|
+
return (_jsx(MenubarPrimitive.Separator, { "data-slot": "menubar-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function MenubarShortcut({ className, ...props }) {
|
|
43
|
+
return (_jsx("span", { "data-slot": "menubar-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
function MenubarSub({ ...props }) {
|
|
46
|
+
return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
47
|
+
}
|
|
48
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
49
|
+
return (_jsxs(MenubarPrimitive.SubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, 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-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] }));
|
|
50
|
+
}
|
|
51
|
+
function MenubarSubContent({ className, ...props }) {
|
|
52
|
+
return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", 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-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
|
|
53
|
+
}
|
|
54
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
55
|
+
//# sourceMappingURL=menubar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.js","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,gBAAgB,CAAC,IAAI,iBACV,SAAS,EACnB,SAAS,EAAE,EAAE,CACX,2EAA2E,EAC3E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EAC2C;IACnD,OAAO,KAAC,gBAAgB,CAAC,IAAI,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AACvE,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EAC4C;IACpD,OAAO,KAAC,gBAAgB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AAS,EACT,GAAG,KAAK,EACqB;IAC7B,OAAO,CACL,4BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACX,uDAAuD,EACvD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EAC0C;IAClD,OAAO,KAAC,gBAAgB,CAAC,GAAG,iBAAW,aAAa,KAAK,KAAK,GAAI,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EAGT;IACC,OAAO,CACL,MAAC,gBAAgB,CAAC,UAAU,iBAChB,qBAAqB,gBACnB,KAAK,EACjB,SAAS,EAAE,EAAE,CACX,8NAA8N,EAC9N,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,gBAAgB,IAAC,SAAS,EAAC,iBAAiB,GAAG,IACpB,CAC/B,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACiD;IACzD,OAAO,CACL,KAAC,gBAAgB,CAAC,UAAU,iBAChB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,yeAAye,EACze,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
declare const Popover: React.FC<React.ComponentProps<typeof PopoverPrimitive.Root> & {
|
|
5
|
+
enableIframeClickDetection?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
// Custom hook to handle iframe and document interactions for closing popovers
|
|
7
|
+
function useIframeClickDetection(isOpen, onShouldClose) {
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
if (!isOpen)
|
|
10
|
+
return;
|
|
11
|
+
const handleDocumentInteraction = () => {
|
|
12
|
+
// Close popover on any significant document interaction
|
|
13
|
+
onShouldClose();
|
|
14
|
+
};
|
|
15
|
+
const handleIframeInteraction = (event) => {
|
|
16
|
+
// Delay to ensure this happens after popover state updates
|
|
17
|
+
setTimeout(onShouldClose, 50);
|
|
18
|
+
};
|
|
19
|
+
// Listen for iframe focus events which indicate user clicked in iframe
|
|
20
|
+
const iframes = document.querySelectorAll("iframe");
|
|
21
|
+
iframes.forEach((iframe) => {
|
|
22
|
+
// Use capture phase to catch events before they're handled
|
|
23
|
+
iframe.addEventListener("mousedown", handleIframeInteraction, true);
|
|
24
|
+
iframe.contentWindow?.addEventListener("focus", handleIframeInteraction, true);
|
|
25
|
+
});
|
|
26
|
+
// Also listen for window blur which can indicate focus moved to iframe
|
|
27
|
+
window.addEventListener("blur", handleDocumentInteraction);
|
|
28
|
+
return () => {
|
|
29
|
+
window.removeEventListener("blur", handleDocumentInteraction);
|
|
30
|
+
iframes.forEach((iframe) => {
|
|
31
|
+
iframe.removeEventListener("mousedown", handleIframeInteraction, true);
|
|
32
|
+
iframe.contentWindow?.removeEventListener("focus", handleIframeInteraction, true);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}, [isOpen, onShouldClose]);
|
|
36
|
+
}
|
|
37
|
+
const PopoverRoot = PopoverPrimitive.Root;
|
|
38
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
39
|
+
// Enhanced Popover component with iframe click detection
|
|
40
|
+
const Popover = ({ enableIframeClickDetection = true, ...props }) => {
|
|
41
|
+
const [internalOpen, setInternalOpen] = React.useState(false);
|
|
42
|
+
const isControlled = props.open !== undefined;
|
|
43
|
+
const isOpen = isControlled ? props.open : internalOpen;
|
|
44
|
+
const handleOpenChange = React.useCallback((open) => {
|
|
45
|
+
if (isControlled) {
|
|
46
|
+
props.onOpenChange?.(open);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
setInternalOpen(open);
|
|
50
|
+
}
|
|
51
|
+
}, [isControlled, props.onOpenChange]);
|
|
52
|
+
// Use iframe click detection if enabled
|
|
53
|
+
useIframeClickDetection(Boolean(enableIframeClickDetection && isOpen), () => handleOpenChange(false));
|
|
54
|
+
return (_jsx(PopoverRoot, { ...props, open: isOpen, onOpenChange: handleOpenChange }));
|
|
55
|
+
};
|
|
56
|
+
Popover.displayName = "Popover";
|
|
57
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, 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 w-72 rounded-md border p-4 shadow-md outline-none", className), ...props }) })));
|
|
58
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
59
|
+
function PopoverAnchor({ ...props }) {
|
|
60
|
+
return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
61
|
+
}
|
|
62
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
63
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/components/ui/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,8EAA8E;AAC9E,SAAS,uBAAuB,CAAC,MAAe,EAAE,aAAyB;IACzE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,yBAAyB,GAAG,GAAG,EAAE;YACrC,wDAAwD;YACxD,aAAa,EAAE,CAAC;QAClB,CAAC,CAAC;QAEF,MAAM,uBAAuB,GAAG,CAAC,KAAY,EAAE,EAAE;YAC/C,2DAA2D;YAC3D,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,uEAAuE;QACvE,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpD,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,2DAA2D;YAC3D,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,uBAAuB,EAAE,IAAI,CAAC,CA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
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
function Switch({ className, ...props }) {
|
|
6
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0") }) }));
|
|
7
|
+
}
|
|
8
|
+
export { Switch };
|
|
9
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EAC0C;IAClD,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,iBACT,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,2WAA2W,EAC3W,SAAS,CACV,KACG,KAAK,YAET,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,0QAA0Q,CAC3Q,GACD,GACmB,CACxB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
6
|
+
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
7
|
+
}
|
|
8
|
+
function Tooltip({ ...props }) {
|
|
9
|
+
return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) }));
|
|
10
|
+
}
|
|
11
|
+
function TooltipTrigger({ ...props }) {
|
|
12
|
+
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
15
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
|
|
16
|
+
}
|
|
17
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
18
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,eAAe,CAAC,EACvB,aAAa,GAAG,CAAC,EACjB,GAAG,KAAK,EAC+C;IACvD,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,iBACd,kBAAkB,EAC5B,aAAa,EAAE,aAAa,KACxB,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,eAAe,cACd,KAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,KAAK,KAAK,GAAI,GACxC,CACnB,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EAC8C;IACtD,OAAO,KAAC,gBAAgB,CAAC,OAAO,iBAAW,iBAAiB,KAAK,KAAK,GAAI,CAAC;AAC7E,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAU,GAAG,CAAC,EACd,QAAQ,EACR,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,KAAC,gBAAgB,CAAC,MAAM,cACtB,MAAC,gBAAgB,CAAC,OAAO,iBACb,iBAAiB,EAC3B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,waAAwa,EACxa,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,gBAAgB,CAAC,KAAK,IAAC,SAAS,EAAC,8FAA8F,GAAG,IAC1G,GACH,CAC3B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|