@vuer-ai/vuer-uikit 0.0.96 → 0.0.98
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 +106 -7
- package/cli/dial-cli.js +49 -7
- package/dist/SyncScroll/SyncScroll.cjs +10 -10
- package/dist/SyncScroll/SyncScroll.mjs +3 -3
- package/dist/SyncScroll/index.cjs +10 -10
- package/dist/SyncScroll/index.mjs +3 -3
- package/dist/chunk-3HEZVWRW.mjs +62 -0
- package/dist/chunk-4KWGGESI.cjs +494 -0
- package/dist/{chunk-CCMKL2OA.cjs → chunk-7GWDO25E.cjs} +2 -2
- package/dist/chunk-A5LCX2UQ.cjs +208 -0
- package/dist/chunk-BEJIZ56L.mjs +300 -0
- package/dist/chunk-C7VGRU3O.mjs +283 -0
- package/dist/{chunk-LONOMMFA.cjs → chunk-LJMNHTTG.cjs} +21 -21
- package/dist/chunk-O66RESRR.cjs +285 -0
- package/dist/{chunk-RINTUFYQ.cjs → chunk-RMK6W774.cjs} +24 -19
- package/dist/{chunk-BFQ2WL5U.mjs → chunk-TTYSYGVE.mjs} +2 -2
- package/dist/chunk-VA3PEYFM.mjs +489 -0
- package/dist/chunk-VBBJSIY7.cjs +308 -0
- package/dist/{chunk-AIINOWEH.mjs → chunk-W4JCKCW7.mjs} +5 -5
- package/dist/chunk-WWGF6TBZ.mjs +206 -0
- package/dist/chunk-ZGN4UEJR.cjs +679 -0
- package/dist/chunk-ZQLRMOUW.mjs +661 -0
- package/dist/dial/DialPanel.cjs +24 -24
- package/dist/dial/DialPanel.mjs +23 -23
- package/dist/dial/DialProvider.cjs +3 -3
- package/dist/dial/DialProvider.d.cts +1 -0
- package/dist/dial/DialProvider.d.ts +1 -0
- package/dist/dial/DialProvider.example.cjs +72 -0
- package/dist/dial/DialProvider.example.d.cts +7 -0
- package/dist/dial/DialProvider.example.d.ts +7 -0
- package/dist/dial/DialProvider.example.mjs +68 -0
- package/dist/dial/DialProvider.mjs +1 -1
- package/dist/dial/index.cjs +42 -42
- package/dist/dial/index.mjs +23 -23
- package/dist/dial/wrapped-inputs/ControlledInputs.cjs +27 -27
- package/dist/dial/wrapped-inputs/ControlledInputs.mjs +23 -23
- package/dist/dial/wrapped-inputs/DialInputs.cjs +34 -34
- package/dist/dial/wrapped-inputs/DialInputs.mjs +23 -23
- package/dist/dial/wrapped-inputs/DialVectorInput.cjs +24 -24
- package/dist/dial/wrapped-inputs/DialVectorInput.mjs +23 -23
- package/dist/dial/wrapped-inputs/index.cjs +39 -39
- package/dist/dial/wrapped-inputs/index.mjs +23 -23
- package/dist/highlight-cursor/cursor-provider.cjs +3 -3
- package/dist/highlight-cursor/cursor-provider.mjs +2 -2
- package/dist/highlight-cursor/enhanced-components.cjs +10 -10
- package/dist/highlight-cursor/enhanced-components.mjs +5 -5
- package/dist/highlight-cursor/index.cjs +16 -16
- package/dist/highlight-cursor/index.mjs +6 -6
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +190 -190
- package/dist/index.mjs +23 -23
- package/dist/ui/UIKitBadge.cjs +6 -6
- package/dist/ui/UIKitBadge.mjs +2 -2
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.mjs +1 -1
- package/dist/ui/button.cjs +1 -1
- package/dist/ui/button.mjs +1 -1
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.mjs +1 -1
- package/dist/ui/checkbox.cjs +1 -1
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.cjs +1 -1
- package/dist/ui/collapsible.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown.cjs +1 -1
- package/dist/ui/dropdown.mjs +1 -1
- package/dist/ui/index.cjs +107 -107
- package/dist/ui/index.mjs +17 -17
- package/dist/ui/inputs/color-input.cjs +1 -1
- package/dist/ui/inputs/color-input.mjs +1 -1
- package/dist/ui/inputs/index.cjs +11 -11
- package/dist/ui/inputs/index.mjs +3 -3
- package/dist/ui/inputs/input-numbers.cjs +1 -1
- package/dist/ui/inputs/input-numbers.mjs +1 -1
- package/dist/ui/inputs/input.cjs +1 -1
- package/dist/ui/inputs/input.d.cts +1 -1
- package/dist/ui/inputs/input.d.ts +1 -1
- package/dist/ui/inputs/input.mjs +1 -1
- package/dist/ui/inputs/number-inputs/CmInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/CmInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/DegInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/DegInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/InchInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/InchInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/IntInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/IntInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/KVectorInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/KVectorInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/RadInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/RadInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/TimeInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/TimeInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/Vec3Input.cjs +1 -1
- package/dist/ui/inputs/number-inputs/Vec3Input.mjs +1 -1
- package/dist/ui/inputs/number-inputs/VectorInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/VectorInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/index.cjs +11 -11
- package/dist/ui/inputs/number-inputs/index.mjs +3 -3
- package/dist/ui/inputs/presets-input.cjs +1 -1
- package/dist/ui/inputs/presets-input.mjs +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/layout.cjs +1 -1
- package/dist/ui/layout.mjs +1 -1
- package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +1 -1
- package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/dock-layout/index.cjs +1 -1
- package/dist/ui/layouts/dock-layout/index.mjs +1 -1
- package/dist/ui/layouts/index.cjs +2 -2
- package/dist/ui/layouts/index.mjs +2 -2
- package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.mjs +1 -1
- package/dist/ui/modal.cjs +1 -1
- package/dist/ui/modal.mjs +1 -1
- package/dist/ui/navigation.cjs +1 -1
- package/dist/ui/navigation.mjs +1 -1
- package/dist/ui/pagination.cjs +1 -1
- package/dist/ui/pagination.mjs +1 -1
- package/dist/ui/panel.cjs +1 -1
- package/dist/ui/panel.mjs +1 -1
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +26 -26
- package/dist/ui/sidebar.mjs +2 -2
- package/dist/ui/simple-tree-view.cjs +1 -1
- package/dist/ui/simple-tree-view.mjs +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.mjs +1 -1
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.mjs +1 -1
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.mjs +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +1 -1
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/theme/ThemeToggles.cjs +1 -1
- package/dist/ui/theme/ThemeToggles.mjs +1 -1
- package/dist/ui/theme/index.cjs +1 -1
- package/dist/ui/theme/index.mjs +1 -1
- package/dist/ui/toggle-buttons.cjs +1 -1
- package/dist/ui/toggle-buttons.mjs +1 -1
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.mjs +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.mjs +1 -1
- package/dist/ui/toolbar.cjs +1 -1
- package/dist/ui/toolbar.mjs +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.mjs +1 -1
- package/dist/ui/tree-view/TreeSearchBar.cjs +1 -1
- package/dist/ui/tree-view/TreeSearchBar.mjs +1 -1
- package/dist/ui/tree-view/TreeView.cjs +1 -1
- package/dist/ui/tree-view/TreeView.mjs +1 -1
- package/dist/ui/tree-view/index.cjs +6 -6
- package/dist/ui/tree-view/index.mjs +2 -2
- package/dist/ui/tree-view-legacy.cjs +9 -9
- package/dist/ui/tree-view-legacy.mjs +5 -5
- package/dist/ui/waterfall/CursorOverlay.cjs +1 -1
- package/dist/ui/waterfall/CursorOverlay.mjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.cjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.mjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.cjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.mjs +1 -1
- package/dist/ui/waterfall/Wedges.cjs +1 -1
- package/dist/ui/waterfall/Wedges.mjs +1 -1
- package/dist/ui/waterfall/index.cjs +8 -8
- package/dist/ui/waterfall/index.mjs +7 -7
- package/package.json +28 -2
- package/src/SyncScroll/README.md +283 -0
- package/src/SyncScroll/SyncScroll.tsx +361 -0
- package/src/SyncScroll/index.ts +22 -0
- package/src/SyncScroll/useSyncScroll.tsx +226 -0
- package/src/cli/dial-cli.ts +1133 -0
- package/src/dial/DialPanel.tsx +208 -0
- package/src/dial/DialProvider.example.tsx +80 -0
- package/src/dial/DialProvider.tsx +138 -0
- package/src/dial/index.ts +26 -0
- package/src/dial/wrapped-inputs/ControlledInputs.tsx +176 -0
- package/src/dial/wrapped-inputs/DialInputs.tsx +401 -0
- package/src/dial/wrapped-inputs/DialVectorInput.tsx +125 -0
- package/src/dial/wrapped-inputs/index.ts +25 -0
- package/src/highlight-cursor/cursor-context.tsx +23 -0
- package/src/highlight-cursor/cursor-provider.tsx +264 -0
- package/src/highlight-cursor/enhanced-components.tsx +16 -0
- package/src/highlight-cursor/index.ts +21 -0
- package/src/highlight-cursor/tabs-cursor-context.tsx +121 -0
- package/src/highlight-cursor/types.ts +40 -0
- package/src/highlight-cursor/with-cursor.tsx +144 -0
- package/src/hooks/clientOnly.tsx +54 -0
- package/src/hooks/cn.ts +33 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useDocument.tsx +18 -0
- package/src/hooks/useDragSelect.ts +116 -0
- package/src/hooks/useIsMobile.ts +35 -0
- package/src/hooks/useLocalStorage.ts +122 -0
- package/src/hooks/useLocation.tsx +95 -0
- package/src/hooks/useQueryParams.tsx +31 -0
- package/src/hooks/useWindow.tsx +18 -0
- package/src/index.css +5 -0
- package/src/index.ts +5 -0
- package/src/styles/.editorconfig +0 -0
- package/src/styles/theme.css +152 -0
- package/src/styles/toast.css +67 -0
- package/src/styles/variables.css +229 -0
- package/src/ui/UIKitBadge.tsx +171 -0
- package/src/ui/avatar.tsx +221 -0
- package/src/ui/badge.tsx +74 -0
- package/src/ui/button.tsx +143 -0
- package/src/ui/card.tsx +146 -0
- package/src/ui/checkbox.tsx +78 -0
- package/src/ui/collapsible.tsx +43 -0
- package/src/ui/drag-selectable/DragSelectProvider.tsx +178 -0
- package/src/ui/drag-selectable/createSelectable.tsx +43 -0
- package/src/ui/drag-selectable/index.ts +2 -0
- package/src/ui/drawer.tsx +137 -0
- package/src/ui/dropdown.tsx +707 -0
- package/src/ui/icons/MouseCursorIcons.tsx +39 -0
- package/src/ui/icons/cursor.tsx +38 -0
- package/src/ui/icons/index.ts +2 -0
- package/src/ui/index.ts +45 -0
- package/src/ui/inputs/color-input.tsx +61 -0
- package/src/ui/inputs/index.tsx +5 -0
- package/src/ui/inputs/input-numbers.tsx +394 -0
- package/src/ui/inputs/input.tsx +155 -0
- package/src/ui/inputs/number-inputs/CmInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/DegInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/EulerDegInput.tsx +14 -0
- package/src/ui/inputs/number-inputs/EulerInput.tsx +30 -0
- package/src/ui/inputs/number-inputs/EulerRadInput.tsx +14 -0
- package/src/ui/inputs/number-inputs/InchInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/IntInput.tsx +46 -0
- package/src/ui/inputs/number-inputs/KVectorInput.tsx +20 -0
- package/src/ui/inputs/number-inputs/QuaternionInput.tsx +27 -0
- package/src/ui/inputs/number-inputs/RadInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/TimeInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/Vec3Input.tsx +26 -0
- package/src/ui/inputs/number-inputs/VectorInput.tsx +38 -0
- package/src/ui/inputs/number-inputs/index.ts +38 -0
- package/src/ui/inputs/presets-input.tsx +59 -0
- package/src/ui/label.tsx +35 -0
- package/src/ui/layout.tsx +43 -0
- package/src/ui/layouts/dock-layout/DockLayoutView.tsx +128 -0
- package/src/ui/layouts/dock-layout/LayoutSlots.tsx +85 -0
- package/src/ui/layouts/dock-layout/index.tsx +2 -0
- package/src/ui/layouts/index.ts +2 -0
- package/src/ui/layouts/liquid-layout/LayoutSlots.tsx +82 -0
- package/src/ui/layouts/liquid-layout/LiquidLayoutView.tsx +76 -0
- package/src/ui/layouts/liquid-layout/index.ts +1 -0
- package/src/ui/modal.tsx +211 -0
- package/src/ui/navigation.tsx +86 -0
- package/src/ui/pagination.tsx +129 -0
- package/src/ui/panel.tsx +146 -0
- package/src/ui/popover.tsx +112 -0
- package/src/ui/radio-group.tsx +63 -0
- package/src/ui/resizable.tsx +52 -0
- package/src/ui/select.tsx +365 -0
- package/src/ui/separator.tsx +26 -0
- package/src/ui/sheet.tsx +257 -0
- package/src/ui/sidebar.tsx +695 -0
- package/src/ui/simple-tree-view.tsx +604 -0
- package/src/ui/skeleton.tsx +15 -0
- package/src/ui/slider.tsx +204 -0
- package/src/ui/switch.tsx +45 -0
- package/src/ui/table.tsx +99 -0
- package/src/ui/tabs.tsx +192 -0
- package/src/ui/textarea.tsx +55 -0
- package/src/ui/theme/ThemeProvider.tsx +319 -0
- package/src/ui/theme/ThemeToggles.tsx +84 -0
- package/src/ui/theme/index.ts +21 -0
- package/src/ui/theme/themeScript.tsx +179 -0
- package/src/ui/theme/types.ts +61 -0
- package/src/ui/toast.tsx +30 -0
- package/src/ui/toggle-buttons.tsx +290 -0
- package/src/ui/toggle-group.tsx +236 -0
- package/src/ui/toggle.tsx +94 -0
- package/src/ui/toolbar.tsx +54 -0
- package/src/ui/tooltip.tsx +171 -0
- package/src/ui/tree-view/TreeSearchBar.tsx +88 -0
- package/src/ui/tree-view/TreeView.tsx +232 -0
- package/src/ui/tree-view/hooks.tsx +289 -0
- package/src/ui/tree-view/index.ts +4 -0
- package/src/ui/tree-view/types.ts +23 -0
- package/src/ui/tree-view-legacy.tsx +644 -0
- package/src/ui/version-badge.tsx +0 -0
- package/src/ui/waterfall/CursorOverlay.tsx +96 -0
- package/src/ui/waterfall/NavigationControls.tsx +42 -0
- package/src/ui/waterfall/Tick.tsx +51 -0
- package/src/ui/waterfall/TimeRuleEventDot.tsx +19 -0
- package/src/ui/waterfall/TimelineEvent.tsx +60 -0
- package/src/ui/waterfall/TimelineProcessBar.tsx +207 -0
- package/src/ui/waterfall/Wedges.tsx +67 -0
- package/src/ui/waterfall/WheelZoomContext.tsx +128 -0
- package/src/ui/waterfall/hooks/useTimelineState.tsx +134 -0
- package/src/ui/waterfall/hooks/useViewport.tsx +293 -0
- package/src/ui/waterfall/index.tsx +326 -0
- package/src/ui/waterfall/types.ts +20 -0
- package/src/ui/waterfall/utils.ts +91 -0
- package/dist/chunk-W2YAQV5N.mjs +0 -57
- package/dist/{chunk-QLCEHV4Q.mjs → chunk-2OZK5DY5.mjs} +2 -2
- package/dist/{chunk-Z35DNFRZ.cjs → chunk-7IS37C3P.cjs} +2 -2
- package/dist/{chunk-4AOAH77D.mjs → chunk-A2PCEL5S.mjs} +2 -2
- package/dist/{chunk-K4VD5PPY.mjs → chunk-BIUDC66P.mjs} +1 -1
- package/dist/{chunk-RKJR6RZU.cjs → chunk-OYNLQTHW.cjs} +1 -1
- package/dist/{chunk-VE3XLQLO.cjs → chunk-QUFZWF4E.cjs} +2 -2
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
|
|
5
|
+
import { cn, createClientOnlyComponent } from "../hooks";
|
|
6
|
+
|
|
7
|
+
function DropdownMenuRoot({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
8
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function DropdownMenuFallback({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
12
|
+
return <div data-slot="dropdown-menu" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const DropdownMenu = createClientOnlyComponent(DropdownMenuRoot, DropdownMenuFallback);
|
|
16
|
+
|
|
17
|
+
function DropdownMenuPortalRoot({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
18
|
+
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function DropdownMenuPortalFallback({ children }: { children?: React.ReactNode }) {
|
|
22
|
+
return <div data-slot="dropdown-menu-portal">{children}</div>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const DropdownMenuPortal = createClientOnlyComponent(
|
|
26
|
+
DropdownMenuPortalRoot,
|
|
27
|
+
DropdownMenuPortalFallback,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
function DropdownMenuTriggerRoot({
|
|
31
|
+
...props
|
|
32
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
33
|
+
return (
|
|
34
|
+
<DropdownMenuPrimitive.Trigger
|
|
35
|
+
data-slot="dropdown-menu-trigger"
|
|
36
|
+
className="text-text-primary hover:text-text-highlight disabled:text-text-tertiary active:text-text-secondary"
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function DropdownMenuTriggerFallback({
|
|
43
|
+
asChild,
|
|
44
|
+
children,
|
|
45
|
+
...props
|
|
46
|
+
}: ComponentProps<"button"> & { asChild?: boolean }) {
|
|
47
|
+
if (asChild) {
|
|
48
|
+
return <>{children}</>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<button
|
|
53
|
+
data-slot="dropdown-menu-trigger"
|
|
54
|
+
className="text-text-primary hover:text-text-highlight disabled:text-text-tertiary active:text-text-secondary"
|
|
55
|
+
{...props}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</button>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const DropdownMenuTrigger = createClientOnlyComponent(
|
|
63
|
+
DropdownMenuTriggerRoot,
|
|
64
|
+
DropdownMenuTriggerFallback,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
function DropdownMenuContentRoot({
|
|
68
|
+
className,
|
|
69
|
+
sideOffset = 4,
|
|
70
|
+
...props
|
|
71
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
72
|
+
return (
|
|
73
|
+
<DropdownMenuPrimitive.Portal>
|
|
74
|
+
<DropdownMenuPrimitive.Content
|
|
75
|
+
data-slot="dropdown-menu-content"
|
|
76
|
+
sideOffset={sideOffset}
|
|
77
|
+
className={cn(
|
|
78
|
+
[
|
|
79
|
+
"bg-bg-primary",
|
|
80
|
+
"p-md",
|
|
81
|
+
"data-[state=open]:animate-in",
|
|
82
|
+
"data-[state=closed]:animate-out",
|
|
83
|
+
"data-[state=closed]:fade-out-0",
|
|
84
|
+
"data-[state=open]:fade-in-0",
|
|
85
|
+
"data-[state=closed]:zoom-out-95",
|
|
86
|
+
"data-[state=open]:zoom-in-95",
|
|
87
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
88
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
89
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
90
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
91
|
+
"relative",
|
|
92
|
+
"z-50",
|
|
93
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
94
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
95
|
+
"overflow-x-hidden",
|
|
96
|
+
"overflow-y-auto",
|
|
97
|
+
"rounded-uk-md",
|
|
98
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
99
|
+
"liquid:liquid-bg",
|
|
100
|
+
],
|
|
101
|
+
className,
|
|
102
|
+
)}
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
</DropdownMenuPrimitive.Portal>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function DropdownMenuContentFallback({ className, ...props }: ComponentProps<"div">) {
|
|
110
|
+
return (
|
|
111
|
+
<div
|
|
112
|
+
data-slot="dropdown-menu-content"
|
|
113
|
+
className={cn(
|
|
114
|
+
[
|
|
115
|
+
"bg-bg-primary",
|
|
116
|
+
"p-md",
|
|
117
|
+
"relative",
|
|
118
|
+
"z-50",
|
|
119
|
+
"overflow-x-hidden",
|
|
120
|
+
"overflow-y-auto",
|
|
121
|
+
"rounded-uk-md",
|
|
122
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
123
|
+
"liquid:liquid-bg",
|
|
124
|
+
],
|
|
125
|
+
className,
|
|
126
|
+
)}
|
|
127
|
+
{...props}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const DropdownMenuContent = createClientOnlyComponent(
|
|
133
|
+
DropdownMenuContentRoot,
|
|
134
|
+
DropdownMenuContentFallback,
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
function DropdownMenuGroupRoot({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
141
|
+
return (
|
|
142
|
+
<DropdownMenuPrimitive.Group
|
|
143
|
+
data-slot="dropdown-menu-group"
|
|
144
|
+
className={cn("space-y-xs", className)}
|
|
145
|
+
{...props}
|
|
146
|
+
/>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function DropdownMenuGroupFallback({ className, ...props }: ComponentProps<"div">) {
|
|
151
|
+
return <div data-slot="dropdown-menu-group" className={cn("space-y-xs", className)} {...props} />;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const DropdownMenuGroup = createClientOnlyComponent(
|
|
155
|
+
DropdownMenuGroupRoot,
|
|
156
|
+
DropdownMenuGroupFallback,
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
function DropdownMenuItemRoot({
|
|
160
|
+
className,
|
|
161
|
+
inset,
|
|
162
|
+
variant = "default",
|
|
163
|
+
...props
|
|
164
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
165
|
+
inset?: boolean;
|
|
166
|
+
variant?: "default" | "destructive";
|
|
167
|
+
}) {
|
|
168
|
+
return (
|
|
169
|
+
<DropdownMenuPrimitive.Item
|
|
170
|
+
data-slot="dropdown-menu-item"
|
|
171
|
+
data-inset={inset}
|
|
172
|
+
data-variant={variant}
|
|
173
|
+
className={cn(
|
|
174
|
+
[
|
|
175
|
+
"w-full",
|
|
176
|
+
"flex",
|
|
177
|
+
"gap-md",
|
|
178
|
+
"items-center",
|
|
179
|
+
"px-sm",
|
|
180
|
+
"py-xs",
|
|
181
|
+
"relative",
|
|
182
|
+
"cursor-default",
|
|
183
|
+
"rounded-uk-xs",
|
|
184
|
+
"text-uk-sm",
|
|
185
|
+
"leading-uk-xs",
|
|
186
|
+
"outline-hidden",
|
|
187
|
+
"select-none",
|
|
188
|
+
"hover:bg-bg-tertiary",
|
|
189
|
+
"data-[disabled]:pointer-events-none",
|
|
190
|
+
"data-[disabled]:text-bg-quaternary",
|
|
191
|
+
"[&_svg]:pointer-events-none",
|
|
192
|
+
"[&_svg]:shrink-0",
|
|
193
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
194
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
195
|
+
],
|
|
196
|
+
className,
|
|
197
|
+
)}
|
|
198
|
+
{...props}
|
|
199
|
+
/>
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function DropdownMenuItemFallback({
|
|
204
|
+
className,
|
|
205
|
+
inset,
|
|
206
|
+
variant = "default",
|
|
207
|
+
...props
|
|
208
|
+
}: ComponentProps<"div"> & {
|
|
209
|
+
inset?: boolean;
|
|
210
|
+
variant?: "default" | "destructive";
|
|
211
|
+
asChild?: boolean;
|
|
212
|
+
}) {
|
|
213
|
+
return (
|
|
214
|
+
<div
|
|
215
|
+
data-slot="dropdown-menu-item"
|
|
216
|
+
data-inset={inset}
|
|
217
|
+
data-variant={variant}
|
|
218
|
+
className={cn(
|
|
219
|
+
[
|
|
220
|
+
"w-full",
|
|
221
|
+
"flex",
|
|
222
|
+
"gap-md",
|
|
223
|
+
"items-center",
|
|
224
|
+
"px-sm",
|
|
225
|
+
"py-xs",
|
|
226
|
+
"relative",
|
|
227
|
+
"cursor-default",
|
|
228
|
+
"rounded-uk-xs",
|
|
229
|
+
"text-uk-sm",
|
|
230
|
+
"leading-uk-xs",
|
|
231
|
+
"outline-hidden",
|
|
232
|
+
"select-none",
|
|
233
|
+
"hover:bg-bg-tertiary",
|
|
234
|
+
"[&_svg]:pointer-events-none",
|
|
235
|
+
"[&_svg]:shrink-0",
|
|
236
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
237
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
238
|
+
],
|
|
239
|
+
className,
|
|
240
|
+
)}
|
|
241
|
+
{...props}
|
|
242
|
+
/>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const DropdownMenuItem = createClientOnlyComponent(
|
|
247
|
+
DropdownMenuItemRoot as never,
|
|
248
|
+
DropdownMenuItemFallback,
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
function DropdownMenuCheckboxItemRoot({
|
|
252
|
+
className,
|
|
253
|
+
children,
|
|
254
|
+
checked,
|
|
255
|
+
...props
|
|
256
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
257
|
+
return (
|
|
258
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
259
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
260
|
+
className={cn(
|
|
261
|
+
[
|
|
262
|
+
"w-full",
|
|
263
|
+
"flex",
|
|
264
|
+
"gap-md",
|
|
265
|
+
"items-center",
|
|
266
|
+
"pr-md",
|
|
267
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
268
|
+
"py-xs",
|
|
269
|
+
"relative",
|
|
270
|
+
"cursor-default",
|
|
271
|
+
"rounded-uk-xs",
|
|
272
|
+
"text-uk-sm",
|
|
273
|
+
"leading-uk-xs",
|
|
274
|
+
"outline-hidden",
|
|
275
|
+
"select-none",
|
|
276
|
+
"hover:bg-bg-tertiary",
|
|
277
|
+
"data-[disabled]:pointer-events-none",
|
|
278
|
+
"data-[disabled]:text-bg-quaternary",
|
|
279
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
280
|
+
"[&_svg]:pointer-events-none",
|
|
281
|
+
"[&_svg]:shrink-0",
|
|
282
|
+
],
|
|
283
|
+
className,
|
|
284
|
+
)}
|
|
285
|
+
checked={checked}
|
|
286
|
+
{...props}
|
|
287
|
+
>
|
|
288
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
289
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
290
|
+
<CheckIcon className="size-4" />
|
|
291
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
292
|
+
</span>
|
|
293
|
+
{children}
|
|
294
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function DropdownMenuCheckboxItemFallback({
|
|
299
|
+
className,
|
|
300
|
+
children,
|
|
301
|
+
checked,
|
|
302
|
+
...props
|
|
303
|
+
}: ComponentProps<"div"> & { checked?: boolean; asChild?: boolean }) {
|
|
304
|
+
return (
|
|
305
|
+
<div
|
|
306
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
307
|
+
className={cn(
|
|
308
|
+
[
|
|
309
|
+
"w-full",
|
|
310
|
+
"flex",
|
|
311
|
+
"gap-md",
|
|
312
|
+
"items-center",
|
|
313
|
+
"pr-md",
|
|
314
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
315
|
+
"py-xs",
|
|
316
|
+
"relative",
|
|
317
|
+
"cursor-default",
|
|
318
|
+
"rounded-uk-xs",
|
|
319
|
+
"text-uk-sm",
|
|
320
|
+
"leading-uk-xs",
|
|
321
|
+
"outline-hidden",
|
|
322
|
+
"select-none",
|
|
323
|
+
"hover:bg-bg-tertiary",
|
|
324
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
325
|
+
"[&_svg]:pointer-events-none",
|
|
326
|
+
"[&_svg]:shrink-0",
|
|
327
|
+
],
|
|
328
|
+
className,
|
|
329
|
+
)}
|
|
330
|
+
{...props}
|
|
331
|
+
>
|
|
332
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
333
|
+
{checked && <CheckIcon className="size-4" />}
|
|
334
|
+
</span>
|
|
335
|
+
{children}
|
|
336
|
+
</div>
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const DropdownMenuCheckboxItem = createClientOnlyComponent(
|
|
341
|
+
DropdownMenuCheckboxItemRoot as never,
|
|
342
|
+
DropdownMenuCheckboxItemFallback,
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
function DropdownMenuRadioGroupRoot({
|
|
346
|
+
...props
|
|
347
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
348
|
+
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function DropdownMenuRadioGroupFallback({ ...props }: ComponentProps<"div">) {
|
|
352
|
+
return <div data-slot="dropdown-menu-radio-group" {...props} />;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const DropdownMenuRadioGroup = createClientOnlyComponent(
|
|
356
|
+
DropdownMenuRadioGroupRoot,
|
|
357
|
+
DropdownMenuRadioGroupFallback,
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
function DropdownMenuRadioItemRoot({
|
|
361
|
+
className,
|
|
362
|
+
children,
|
|
363
|
+
...props
|
|
364
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
365
|
+
return (
|
|
366
|
+
<DropdownMenuPrimitive.RadioItem
|
|
367
|
+
data-slot="dropdown-menu-radio-item"
|
|
368
|
+
className={cn(
|
|
369
|
+
[
|
|
370
|
+
"w-full",
|
|
371
|
+
"hover:bg-bg-tertiary",
|
|
372
|
+
"outline-hidden",
|
|
373
|
+
"relative",
|
|
374
|
+
"flex",
|
|
375
|
+
"cursor-default",
|
|
376
|
+
"select-none",
|
|
377
|
+
"items-center",
|
|
378
|
+
"gap-md",
|
|
379
|
+
"rounded-uk-xs",
|
|
380
|
+
"py-xs",
|
|
381
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
382
|
+
"pr-md",
|
|
383
|
+
"text-uk-sm",
|
|
384
|
+
"leading-uk-xs",
|
|
385
|
+
"data-[disabled]:pointer-events-none",
|
|
386
|
+
"data-[disabled]:text-bg-quaternary",
|
|
387
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
388
|
+
"[&_svg]:pointer-events-none",
|
|
389
|
+
"[&_svg]:shrink-0",
|
|
390
|
+
],
|
|
391
|
+
className,
|
|
392
|
+
)}
|
|
393
|
+
{...props}
|
|
394
|
+
>
|
|
395
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
396
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
397
|
+
<CircleIcon className="size-2 fill-current" />
|
|
398
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
399
|
+
</span>
|
|
400
|
+
{children}
|
|
401
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function DropdownMenuRadioItemFallback({
|
|
406
|
+
className,
|
|
407
|
+
children,
|
|
408
|
+
...props
|
|
409
|
+
}: ComponentProps<"div"> & { asChild?: boolean }) {
|
|
410
|
+
return (
|
|
411
|
+
<div
|
|
412
|
+
data-slot="dropdown-menu-radio-item"
|
|
413
|
+
className={cn(
|
|
414
|
+
[
|
|
415
|
+
"w-full",
|
|
416
|
+
"hover:bg-bg-tertiary",
|
|
417
|
+
"outline-hidden",
|
|
418
|
+
"relative",
|
|
419
|
+
"flex",
|
|
420
|
+
"cursor-default",
|
|
421
|
+
"select-none",
|
|
422
|
+
"items-center",
|
|
423
|
+
"gap-md",
|
|
424
|
+
"rounded-uk-xs",
|
|
425
|
+
"py-xs",
|
|
426
|
+
"pl-[calc(var(--spacing-xl)*1.8)]",
|
|
427
|
+
"pr-md",
|
|
428
|
+
"text-uk-sm",
|
|
429
|
+
"leading-uk-xs",
|
|
430
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
431
|
+
"[&_svg]:pointer-events-none",
|
|
432
|
+
"[&_svg]:shrink-0",
|
|
433
|
+
],
|
|
434
|
+
className,
|
|
435
|
+
)}
|
|
436
|
+
{...props}
|
|
437
|
+
>
|
|
438
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
439
|
+
<CircleIcon className="size-2 fill-current" />
|
|
440
|
+
</span>
|
|
441
|
+
{children}
|
|
442
|
+
</div>
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
const DropdownMenuRadioItem = createClientOnlyComponent(
|
|
447
|
+
DropdownMenuRadioItemRoot as never,
|
|
448
|
+
DropdownMenuRadioItemFallback,
|
|
449
|
+
);
|
|
450
|
+
|
|
451
|
+
function DropdownMenuLabelRoot({
|
|
452
|
+
className,
|
|
453
|
+
inset,
|
|
454
|
+
...props
|
|
455
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
456
|
+
inset?: boolean;
|
|
457
|
+
}) {
|
|
458
|
+
return (
|
|
459
|
+
<DropdownMenuPrimitive.Label
|
|
460
|
+
data-slot="dropdown-menu-label"
|
|
461
|
+
data-inset={inset}
|
|
462
|
+
className={cn("text-text-secondary text-uk-sm leading-uk-xs pb-lg pt-xs px-sm", className)}
|
|
463
|
+
{...props}
|
|
464
|
+
/>
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function DropdownMenuLabelFallback({
|
|
469
|
+
className,
|
|
470
|
+
inset,
|
|
471
|
+
...props
|
|
472
|
+
}: ComponentProps<"div"> & {
|
|
473
|
+
inset?: boolean;
|
|
474
|
+
}) {
|
|
475
|
+
return (
|
|
476
|
+
<div
|
|
477
|
+
data-slot="dropdown-menu-label"
|
|
478
|
+
data-inset={inset}
|
|
479
|
+
className={cn("text-text-secondary text-uk-sm leading-uk-xs px-2 py-1.5", className)}
|
|
480
|
+
{...props}
|
|
481
|
+
/>
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const DropdownMenuLabel = createClientOnlyComponent(
|
|
486
|
+
DropdownMenuLabelRoot,
|
|
487
|
+
DropdownMenuLabelFallback,
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
function DropdownMenuSeparatorRoot({
|
|
491
|
+
className,
|
|
492
|
+
...props
|
|
493
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
494
|
+
return (
|
|
495
|
+
<DropdownMenuPrimitive.Separator
|
|
496
|
+
data-slot="dropdown-menu-separator"
|
|
497
|
+
className={cn("bg-line-primary my-lg pointer-events-none h-px", className)}
|
|
498
|
+
{...props}
|
|
499
|
+
/>
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function DropdownMenuSeparatorFallback({ className, ...props }: ComponentProps<"div">) {
|
|
504
|
+
return (
|
|
505
|
+
<div
|
|
506
|
+
data-slot="dropdown-menu-separator"
|
|
507
|
+
className={cn("bg-line-primary my-lg pointer-events-none h-px", className)}
|
|
508
|
+
{...props}
|
|
509
|
+
/>
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const DropdownMenuSeparator = createClientOnlyComponent(
|
|
514
|
+
DropdownMenuSeparatorRoot,
|
|
515
|
+
DropdownMenuSeparatorFallback,
|
|
516
|
+
);
|
|
517
|
+
|
|
518
|
+
function DropdownMenuShortcut({ className, ...props }: ComponentProps<"span">) {
|
|
519
|
+
return (
|
|
520
|
+
<span
|
|
521
|
+
data-slot="dropdown-menu-shortcut"
|
|
522
|
+
className={cn("text-text-tertiary text-uk-sm leading-uk-xs ml-auto", className)}
|
|
523
|
+
{...props}
|
|
524
|
+
/>
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
function DropdownMenuSubRoot({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
529
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
function DropdownMenuSubFallback({ ...props }: ComponentProps<"div">) {
|
|
533
|
+
return <div data-slot="dropdown-menu-sub" {...props} />;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
const DropdownMenuSub = createClientOnlyComponent(DropdownMenuSubRoot, DropdownMenuSubFallback);
|
|
537
|
+
|
|
538
|
+
function DropdownMenuSubTriggerRoot({
|
|
539
|
+
className,
|
|
540
|
+
inset,
|
|
541
|
+
children,
|
|
542
|
+
...props
|
|
543
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
544
|
+
inset?: boolean;
|
|
545
|
+
}) {
|
|
546
|
+
return (
|
|
547
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
548
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
549
|
+
data-inset={inset}
|
|
550
|
+
className={cn(
|
|
551
|
+
"w-full",
|
|
552
|
+
"flex",
|
|
553
|
+
"gap-md",
|
|
554
|
+
"items-center",
|
|
555
|
+
"px-sm",
|
|
556
|
+
"py-xs",
|
|
557
|
+
"relative",
|
|
558
|
+
"cursor-default",
|
|
559
|
+
"rounded-uk-xs",
|
|
560
|
+
"text-uk-sm",
|
|
561
|
+
"leading-uk-xs",
|
|
562
|
+
"outline-hidden",
|
|
563
|
+
"select-none",
|
|
564
|
+
"hover:bg-bg-tertiary",
|
|
565
|
+
"data-[state=open]:bg-bg-tertiary",
|
|
566
|
+
"data-[disabled]:pointer-events-none",
|
|
567
|
+
"data-[disabled]:text-bg-quaternary",
|
|
568
|
+
"[&_svg]:pointer-events-none",
|
|
569
|
+
"[&_svg]:shrink-0",
|
|
570
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
571
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
572
|
+
className,
|
|
573
|
+
)}
|
|
574
|
+
{...props}
|
|
575
|
+
>
|
|
576
|
+
{children}
|
|
577
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
578
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
function DropdownMenuSubTriggerFallback({
|
|
583
|
+
className,
|
|
584
|
+
inset,
|
|
585
|
+
children,
|
|
586
|
+
...props
|
|
587
|
+
}: ComponentProps<"div"> & {
|
|
588
|
+
inset?: boolean;
|
|
589
|
+
asChild?: boolean;
|
|
590
|
+
}) {
|
|
591
|
+
return (
|
|
592
|
+
<div
|
|
593
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
594
|
+
data-inset={inset}
|
|
595
|
+
className={cn(
|
|
596
|
+
"w-full",
|
|
597
|
+
"flex",
|
|
598
|
+
"gap-md",
|
|
599
|
+
"items-center",
|
|
600
|
+
"px-sm",
|
|
601
|
+
"py-xs",
|
|
602
|
+
"relative",
|
|
603
|
+
"cursor-default",
|
|
604
|
+
"rounded-uk-xs",
|
|
605
|
+
"text-uk-sm",
|
|
606
|
+
"leading-uk-xs",
|
|
607
|
+
"outline-hidden",
|
|
608
|
+
"select-none",
|
|
609
|
+
"hover:bg-bg-tertiary",
|
|
610
|
+
"[&_svg]:pointer-events-none",
|
|
611
|
+
"[&_svg]:shrink-0",
|
|
612
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
613
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
614
|
+
className,
|
|
615
|
+
)}
|
|
616
|
+
{...props}
|
|
617
|
+
>
|
|
618
|
+
{children}
|
|
619
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
620
|
+
</div>
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
const DropdownMenuSubTrigger = createClientOnlyComponent(
|
|
625
|
+
DropdownMenuSubTriggerRoot,
|
|
626
|
+
DropdownMenuSubTriggerFallback,
|
|
627
|
+
);
|
|
628
|
+
|
|
629
|
+
function DropdownMenuSubContentRoot({
|
|
630
|
+
className,
|
|
631
|
+
...props
|
|
632
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
633
|
+
return (
|
|
634
|
+
<DropdownMenuPrimitive.SubContent
|
|
635
|
+
data-slot="dropdown-menu-sub-content"
|
|
636
|
+
className={cn(
|
|
637
|
+
"bg-bg-primary",
|
|
638
|
+
"p-md",
|
|
639
|
+
"data-[state=open]:animate-in",
|
|
640
|
+
"data-[state=closed]:animate-out",
|
|
641
|
+
"data-[state=closed]:fade-out-0",
|
|
642
|
+
"data-[state=open]:fade-in-0",
|
|
643
|
+
"data-[state=closed]:zoom-out-95",
|
|
644
|
+
"data-[state=open]:zoom-in-95",
|
|
645
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
646
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
647
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
648
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
649
|
+
"relative",
|
|
650
|
+
"z-50",
|
|
651
|
+
"max-h-(--radix-dropdown-menu-content-available-height)",
|
|
652
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
653
|
+
"overflow-x-hidden",
|
|
654
|
+
"overflow-y-auto",
|
|
655
|
+
"rounded-uk-md",
|
|
656
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
657
|
+
"liquid:liquid-bg",
|
|
658
|
+
className,
|
|
659
|
+
)}
|
|
660
|
+
{...props}
|
|
661
|
+
/>
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
function DropdownMenuSubContentFallback({ className, ...props }: ComponentProps<"div">) {
|
|
666
|
+
return (
|
|
667
|
+
<div
|
|
668
|
+
data-slot="dropdown-menu-sub-content"
|
|
669
|
+
className={cn(
|
|
670
|
+
"bg-bg-primary",
|
|
671
|
+
"p-md",
|
|
672
|
+
"relative",
|
|
673
|
+
"z-50",
|
|
674
|
+
"overflow-x-hidden",
|
|
675
|
+
"overflow-y-auto",
|
|
676
|
+
"rounded-uk-md",
|
|
677
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
678
|
+
"liquid:liquid-bg",
|
|
679
|
+
className,
|
|
680
|
+
)}
|
|
681
|
+
{...props}
|
|
682
|
+
/>
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
const DropdownMenuSubContent = createClientOnlyComponent(
|
|
687
|
+
DropdownMenuSubContentRoot,
|
|
688
|
+
DropdownMenuSubContentFallback,
|
|
689
|
+
);
|
|
690
|
+
|
|
691
|
+
export {
|
|
692
|
+
DropdownMenu,
|
|
693
|
+
DropdownMenuPortal,
|
|
694
|
+
DropdownMenuTrigger,
|
|
695
|
+
DropdownMenuContent,
|
|
696
|
+
DropdownMenuGroup,
|
|
697
|
+
DropdownMenuLabel,
|
|
698
|
+
DropdownMenuItem,
|
|
699
|
+
DropdownMenuCheckboxItem,
|
|
700
|
+
DropdownMenuRadioGroup,
|
|
701
|
+
DropdownMenuRadioItem,
|
|
702
|
+
DropdownMenuSeparator,
|
|
703
|
+
DropdownMenuShortcut,
|
|
704
|
+
DropdownMenuSub,
|
|
705
|
+
DropdownMenuSubTrigger,
|
|
706
|
+
DropdownMenuSubContent,
|
|
707
|
+
};
|