@nadicodeai/ui 0.3.1 → 0.4.1

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.
Files changed (124) hide show
  1. package/AGENTS.md +2 -1
  2. package/README.md +4 -2
  3. package/dist/components/accordion.d.ts +15 -5
  4. package/dist/components/accordion.d.ts.map +1 -1
  5. package/dist/components/accordion.js +34 -9
  6. package/dist/components/ai-elements/chain-of-thought.js +1 -1
  7. package/dist/components/ai-elements/mic-selector.js +1 -1
  8. package/dist/components/ai-elements/plan.d.ts +3 -2
  9. package/dist/components/ai-elements/plan.d.ts.map +1 -1
  10. package/dist/components/ai-elements/reasoning.js +1 -1
  11. package/dist/components/ai-elements/stack-trace.js +1 -1
  12. package/dist/components/ai-elements/transcription.js +1 -1
  13. package/dist/components/ai-elements/voice-selector.d.ts +2 -1
  14. package/dist/components/ai-elements/voice-selector.d.ts.map +1 -1
  15. package/dist/components/ai-elements/voice-selector.js +1 -1
  16. package/dist/components/alert-dialog.d.ts +10 -9
  17. package/dist/components/alert-dialog.d.ts.map +1 -1
  18. package/dist/components/alert-dialog.js +16 -13
  19. package/dist/components/aspect-ratio.d.ts +3 -2
  20. package/dist/components/aspect-ratio.d.ts.map +1 -1
  21. package/dist/components/aspect-ratio.js +6 -3
  22. package/dist/components/avatar.d.ts +5 -5
  23. package/dist/components/avatar.d.ts.map +1 -1
  24. package/dist/components/avatar.js +5 -5
  25. package/dist/components/badge.js +1 -1
  26. package/dist/components/breadcrumb.js +1 -1
  27. package/dist/components/button-group.js +1 -1
  28. package/dist/components/button.d.ts +4 -2
  29. package/dist/components/button.d.ts.map +1 -1
  30. package/dist/components/button.js +21 -17
  31. package/dist/components/checkbox.d.ts +2 -3
  32. package/dist/components/checkbox.d.ts.map +1 -1
  33. package/dist/components/checkbox.js +3 -3
  34. package/dist/components/collapsible.d.ts +8 -4
  35. package/dist/components/collapsible.d.ts.map +1 -1
  36. package/dist/components/collapsible.js +16 -6
  37. package/dist/components/command.d.ts +4 -3
  38. package/dist/components/command.d.ts.map +1 -1
  39. package/dist/components/command.js +13 -12
  40. package/dist/components/context-menu.d.ts +24 -15
  41. package/dist/components/context-menu.d.ts.map +1 -1
  42. package/dist/components/context-menu.js +38 -28
  43. package/dist/components/dialog.d.ts +10 -9
  44. package/dist/components/dialog.d.ts.map +1 -1
  45. package/dist/components/dialog.js +11 -10
  46. package/dist/components/direction.d.ts +6 -5
  47. package/dist/components/direction.d.ts.map +1 -1
  48. package/dist/components/direction.js +3 -4
  49. package/dist/components/drawer.d.ts +22 -10
  50. package/dist/components/drawer.d.ts.map +1 -1
  51. package/dist/components/drawer.js +70 -12
  52. package/dist/components/dropdown-menu.d.ts +25 -16
  53. package/dist/components/dropdown-menu.d.ts.map +1 -1
  54. package/dist/components/dropdown-menu.js +40 -30
  55. package/dist/components/form.d.ts +3 -3
  56. package/dist/components/form.d.ts.map +1 -1
  57. package/dist/components/form.js +1 -1
  58. package/dist/components/hover-card.d.ts +8 -4
  59. package/dist/components/hover-card.d.ts.map +1 -1
  60. package/dist/components/hover-card.js +12 -7
  61. package/dist/components/item.js +1 -1
  62. package/dist/components/label.d.ts +1 -2
  63. package/dist/components/label.d.ts.map +1 -1
  64. package/dist/components/label.js +1 -2
  65. package/dist/components/menubar.d.ts +21 -18
  66. package/dist/components/menubar.d.ts.map +1 -1
  67. package/dist/components/menubar.js +25 -23
  68. package/dist/components/navigation-menu.d.ts +16 -12
  69. package/dist/components/navigation-menu.d.ts.map +1 -1
  70. package/dist/components/navigation-menu.js +16 -13
  71. package/dist/components/popover.d.ts +11 -8
  72. package/dist/components/popover.d.ts.map +1 -1
  73. package/dist/components/popover.js +33 -12
  74. package/dist/components/progress.d.ts +7 -4
  75. package/dist/components/progress.d.ts.map +1 -1
  76. package/dist/components/progress.js +17 -5
  77. package/dist/components/radio-group.d.ts +4 -4
  78. package/dist/components/radio-group.d.ts.map +1 -1
  79. package/dist/components/radio-group.js +4 -4
  80. package/dist/components/scroll-area.d.ts +3 -3
  81. package/dist/components/scroll-area.d.ts.map +1 -1
  82. package/dist/components/scroll-area.js +2 -4
  83. package/dist/components/select.d.ts +11 -11
  84. package/dist/components/select.d.ts.map +1 -1
  85. package/dist/components/select.js +14 -18
  86. package/dist/components/separator.d.ts +2 -3
  87. package/dist/components/separator.d.ts.map +1 -1
  88. package/dist/components/separator.js +3 -3
  89. package/dist/components/sheet.d.ts +8 -7
  90. package/dist/components/sheet.d.ts.map +1 -1
  91. package/dist/components/sheet.js +10 -12
  92. package/dist/components/sidebar.js +1 -1
  93. package/dist/components/slider.d.ts +2 -3
  94. package/dist/components/slider.d.ts.map +1 -1
  95. package/dist/components/slider.js +10 -7
  96. package/dist/components/switch.d.ts +3 -4
  97. package/dist/components/switch.d.ts.map +1 -1
  98. package/dist/components/switch.js +2 -2
  99. package/dist/components/tabs.d.ts +5 -6
  100. package/dist/components/tabs.d.ts.map +1 -1
  101. package/dist/components/tabs.js +5 -5
  102. package/dist/components/theme-mode-switcher.js +1 -1
  103. package/dist/components/toggle-group.d.ts +12 -4
  104. package/dist/components/toggle-group.d.ts.map +1 -1
  105. package/dist/components/toggle-group.js +29 -7
  106. package/dist/components/toggle.d.ts +3 -3
  107. package/dist/components/toggle.d.ts.map +1 -1
  108. package/dist/components/toggle.js +9 -8
  109. package/dist/components/tooltip.d.ts +8 -6
  110. package/dist/components/tooltip.d.ts.map +1 -1
  111. package/dist/components/tooltip.js +7 -6
  112. package/dist/hooks/use-controllable-state.d.ts +9 -0
  113. package/dist/hooks/use-controllable-state.d.ts.map +1 -0
  114. package/dist/hooks/use-controllable-state.js +25 -0
  115. package/dist/lib/base-render.d.ts +14 -0
  116. package/dist/lib/base-render.d.ts.map +1 -0
  117. package/dist/lib/base-render.js +16 -0
  118. package/dist/lib/slot.d.ts +8 -0
  119. package/dist/lib/slot.d.ts.map +1 -0
  120. package/dist/lib/slot.js +17 -0
  121. package/docs/agents/nadicodeai-ui.md +1 -1
  122. package/docs/migration/base-ui-migration.md +49 -0
  123. package/llms.txt +2 -2
  124. package/package.json +3 -6
@@ -1,34 +1,92 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Drawer as DrawerPrimitive } from "vaul";
3
+ import * as React from "react";
4
+ import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
+ import { withAsChildRender } from "../lib/base-render.js";
3
6
  import { cn } from "../lib/utils.js";
4
- function Drawer({ ...props }) {
5
- return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
7
+ const drawerDirectionToSwipeDirection = {
8
+ bottom: "down",
9
+ left: "left",
10
+ right: "right",
11
+ top: "up",
12
+ };
13
+ const DrawerContext = React.createContext(null);
14
+ function useDrawer() {
15
+ const context = React.useContext(DrawerContext);
16
+ if (!context) {
17
+ throw new Error("useDrawer must be used within a Drawer.");
18
+ }
19
+ return context;
20
+ }
21
+ function Drawer({ activeSnapPoint, direction, modal = true, onSnapPointChange, setActiveSnapPoint, showSwipeHandle = false, snapPoints, snapPoint, swipeDirection = "down", ...props }) {
22
+ const resolvedSnapPoint = snapPoint ?? activeSnapPoint;
23
+ const resolvedSwipeDirection = direction
24
+ ? drawerDirectionToSwipeDirection[direction]
25
+ : swipeDirection;
26
+ const handleSnapPointChange = onSnapPointChange ?? setActiveSnapPoint;
27
+ const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
28
+ const contextValue = React.useMemo(() => ({
29
+ hasSnapPoints,
30
+ modal,
31
+ showSwipeHandle,
32
+ swipeDirection: resolvedSwipeDirection,
33
+ }), [hasSnapPoints, modal, resolvedSwipeDirection, showSwipeHandle]);
34
+ return (_jsx(DrawerContext.Provider, { value: contextValue, children: _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", modal: modal, onSnapPointChange: handleSnapPointChange, snapPoint: resolvedSnapPoint, snapPoints: snapPoints, swipeDirection: resolvedSwipeDirection, ...props }) }));
6
35
  }
7
36
  function DrawerTrigger({ ...props }) {
8
- return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
37
+ return (_jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...withAsChildRender(props) }));
9
38
  }
10
39
  function DrawerPortal({ ...props }) {
11
40
  return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
12
41
  }
13
42
  function DrawerClose({ ...props }) {
14
- return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
43
+ return (_jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...withAsChildRender(props) }));
15
44
  }
16
45
  function DrawerOverlay({ className, ...props }) {
17
- return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 bg-foreground/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
46
+ return (_jsx(DrawerPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn("fixed inset-0 z-50 min-h-dvh bg-foreground/50 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute", className), ...props }));
47
+ }
48
+ function DrawerSwipeHandle({ className, ...props }) {
49
+ return (_jsx("div", { "data-slot": "drawer-swipe-handle", "aria-hidden": "true", className: cn("relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing", className), ...props }));
18
50
  }
19
51
  function DrawerContent({ className, children, ...props }) {
20
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), ...props, children: [_jsx("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
52
+ const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
53
+ const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
54
+ return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && (_jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined })), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto", children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-swipe-axis": swipeAxis, "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
55
+ // Base.
56
+ "group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b",
57
+ // Nested.
58
+ "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
59
+ // Bleed.
60
+ "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
61
+ // Sizing.
62
+ "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
63
+ // Stack.
64
+ "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]",
65
+ // Transitions.
66
+ "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
67
+ // Axis: y.
68
+ "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
69
+ // Axis: x.
70
+ "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
71
+ // Direction: down.
72
+ "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]",
73
+ // Direction: up.
74
+ "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]",
75
+ // Direction: left.
76
+ "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
77
+ // Direction: right.
78
+ "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
21
79
  }
22
80
  function DrawerHeader({ className, ...props }) {
23
- return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", className), ...props }));
81
+ return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", className), ...props }));
24
82
  }
25
83
  function DrawerFooter({ className, ...props }) {
26
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
84
+ return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className), ...props }));
27
85
  }
28
86
  function DrawerTitle({ className, ...props }) {
29
- return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("font-semibold text-foreground", className), ...props }));
87
+ return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-base font-medium text-foreground", className), ...props }));
30
88
  }
31
89
  function DrawerDescription({ className, ...props }) {
32
- return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props }));
90
+ return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn("text-sm text-balance text-muted-foreground", className), ...props }));
33
91
  }
34
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
92
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1,26 +1,35 @@
1
1
  import * as React from "react";
2
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
3
- declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
- declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
5
- declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
6
- declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
7
- declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
8
- declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
2
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
+ import { type WithAsChild } from "../lib/base-render";
4
+ declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
5
+ declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
6
+ declare function DropdownMenuTrigger({ ...props }: WithAsChild<MenuPrimitive.Trigger.Props>): React.JSX.Element;
7
+ declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
8
+ declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): React.JSX.Element;
9
+ declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
9
10
  inset?: boolean;
11
+ }): React.JSX.Element;
12
+ type DropdownMenuSelectEventHandler = (event: Event) => void;
13
+ type DropdownMenuItemProps = WithAsChild<Omit<MenuPrimitive.Item.Props, "onClick" | "onSelect">> & {
14
+ inset?: boolean;
15
+ onClick?: MenuPrimitive.Item.Props["onClick"];
16
+ onSelect?: DropdownMenuSelectEventHandler;
10
17
  variant?: "default" | "destructive";
18
+ };
19
+ declare function DropdownMenuItem({ className, inset, onClick, onSelect, variant, ...props }: DropdownMenuItemProps): React.JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, asChild, ...props }: WithAsChild<MenuPrimitive.SubmenuTrigger.Props> & {
22
+ inset?: boolean;
11
23
  }): React.JSX.Element;
12
- declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
13
- declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
14
- declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
15
- declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
24
+ declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
25
+ declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
16
26
  inset?: boolean;
17
27
  }): React.JSX.Element;
18
- declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
19
- declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
20
- declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
21
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
28
+ declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): React.JSX.Element;
29
+ declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
22
30
  inset?: boolean;
23
31
  }): React.JSX.Element;
24
- declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
32
+ declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): React.JSX.Element;
33
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
25
34
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
26
35
  //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAIhE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,qBAEzD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,qBAI3D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,qBAO5D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,qBAc5D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,qBAI1D;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,C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T,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,qBAYlD;AAED,iBAAS,wBAAwB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,GAAG;IACpC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAwBA;AAED,iBAAS,sBAAsB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,qBAO3E;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG;IACjC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAuBA;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,qBAQ/B;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;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,CAAA"}
@@ -1,51 +1,61 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
4
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
4
+ import { withAsChildRender } from "../lib/base-render.js";
5
5
  import { cn } from "../lib/utils.js";
6
+ import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
7
  function DropdownMenu({ ...props }) {
7
- return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
8
+ return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
8
9
  }
9
10
  function DropdownMenuPortal({ ...props }) {
10
- return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
11
+ return _jsx(MenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
11
12
  }
12
13
  function DropdownMenuTrigger({ ...props }) {
13
- return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
14
+ return (_jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...withAsChildRender(props) }));
14
15
  }
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("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 bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
16
+ function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
17
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
17
18
  }
18
19
  function DropdownMenuGroup({ ...props }) {
19
- return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
20
+ return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
20
21
  }
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("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
23
- }
24
- function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
25
- return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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] }));
22
+ function DropdownMenuLabel({ className, inset, ...props }) {
23
+ return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className), ...props }));
24
+ }
25
+ function DropdownMenuItem({ className, inset, onClick, onSelect, variant = "default", ...props }) {
26
+ const handleClick = (event) => {
27
+ onSelect?.(event.nativeEvent);
28
+ if (event.nativeEvent.defaultPrevented) {
29
+ event.preventBaseUIHandler?.();
30
+ event.preventDefault();
31
+ return;
32
+ }
33
+ onClick?.(event);
34
+ };
35
+ return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className), onClick: handleClick, ...withAsChildRender(props) }));
26
36
  }
27
- function DropdownMenuRadioGroup({ ...props }) {
28
- return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
37
+ function DropdownMenuSub({ ...props }) {
38
+ return _jsx(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
29
39
  }
30
- function DropdownMenuRadioItem({ className, children, ...props }) {
31
- return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground 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] }));
40
+ function DropdownMenuSubTrigger({ className, inset, children, asChild, ...props }) {
41
+ return (_jsx(MenuPrimitive.SubmenuTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...withAsChildRender({ asChild, children, ...props }), children: !asChild && (_jsxs(_Fragment, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] })) }));
32
42
  }
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 }));
43
+ function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
44
+ return (_jsx(DropdownMenuContent, { "data-slot": "dropdown-menu-sub-content", className: cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, ...props }));
35
45
  }
36
- function DropdownMenuSeparator({ className, ...props }) {
37
- return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
46
+ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
47
+ return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 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 right-2 flex items-center justify-center", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
38
48
  }
39
- function DropdownMenuShortcut({ className, ...props }) {
40
- return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
49
+ function DropdownMenuRadioGroup({ ...props }) {
50
+ return (_jsx(MenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
41
51
  }
42
- function DropdownMenuSub({ ...props }) {
43
- return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
52
+ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
53
+ return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 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 right-2 flex items-center justify-center", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
44
54
  }
45
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
46
- return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
55
+ function DropdownMenuSeparator({ className, ...props }) {
56
+ return (_jsx(MenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
47
57
  }
48
- function DropdownMenuSubContent({ className, ...props }) {
49
- return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }));
58
+ function DropdownMenuShortcut({ className, ...props }) {
59
+ return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className), ...props }));
50
60
  }
51
61
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
- import type { Label as LabelPrimitive } from "radix-ui";
3
- import { Slot } from "radix-ui";
2
+ import { Slot } from "../lib/slot";
4
3
  import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
4
+ import { Label } from "./label";
5
5
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
6
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
7
7
  declare const useFormField: () => {
@@ -17,7 +17,7 @@ declare const useFormField: () => {
17
17
  formMessageId: string;
18
18
  };
19
19
  declare function FormItem({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
- declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
20
+ declare function FormLabel({ className, ...props }: React.ComponentProps<typeof Label>): React.JSX.Element;
21
21
  declare function FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>): React.JSX.Element;
22
22
  declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
23
23
  declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAKxB,QAAA,MAAM,IAAI,0YAAe,CAAA;AAazB,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAA;AAUD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYrE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAYlD;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAgBxE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EA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EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,4BAkBtE;AAED,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAA"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Slot } from "radix-ui";
4
+ import { Slot } from "../lib/slot.js";
5
5
  import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
6
6
  import { cn } from "../lib/utils.js";
7
7
  import { Label } from "./label.js";
@@ -1,7 +1,11 @@
1
1
  import * as React from "react";
2
- import { HoverCard as HoverCardPrimitive } from "radix-ui";
3
- declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
4
- declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
5
- declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
2
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
3
+ import { type WithAsChild } from "../lib/base-render";
4
+ declare function HoverCard({ closeDelay, openDelay, ...props }: PreviewCardPrimitive.Root.Props & {
5
+ closeDelay?: number;
6
+ openDelay?: number;
7
+ }): React.JSX.Element;
8
+ declare function HoverCardTrigger({ closeDelay, delay, ...props }: WithAsChild<PreviewCardPrimitive.Trigger.Props>): React.JSX.Element;
9
+ declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
6
10
  export { HoverCard, HoverCardTrigger, HoverCardContent };
7
11
  //# sourceMappingURL=hover-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAI1D,iBAAS,SAAS,CAAC,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAEtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAIzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAezD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAEjF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAUvE,iBAAS,SAAS,CAAC,EACjB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,GAAG;IACnC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,qBAWA;AAED,iBAAS,gBAAgB,CAAC,EACxB,UAAU,EACV,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,qBAWjD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CACF,oBAAoB,CAAC,UAAU,CAAC,KAAK,EACrC,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAChD,qBAqBF;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,14 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { HoverCard as HoverCardPrimitive } from "radix-ui";
3
+ import * as React from "react";
4
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
5
+ import { withAsChildRender } from "../lib/base-render.js";
4
6
  import { cn } from "../lib/utils.js";
5
- function HoverCard({ ...props }) {
6
- return _jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
7
+ const HoverCardDelayContext = React.createContext({});
8
+ function HoverCard({ closeDelay, openDelay, ...props }) {
9
+ const contextValue = React.useMemo(() => ({ closeDelay, openDelay }), [closeDelay, openDelay]);
10
+ return (_jsx(HoverCardDelayContext.Provider, { value: contextValue, children: _jsx(PreviewCardPrimitive.Root, { "data-slot": "hover-card", ...props }) }));
7
11
  }
8
- function HoverCardTrigger({ ...props }) {
9
- return (_jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props }));
12
+ function HoverCardTrigger({ closeDelay, delay, ...props }) {
13
+ const delayContext = React.useContext(HoverCardDelayContext);
14
+ return (_jsx(PreviewCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", closeDelay: closeDelay ?? delayContext.closeDelay, delay: delay ?? delayContext.openDelay, ...withAsChildRender(props) }));
10
15
  }
11
- function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
12
- return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, { "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
16
+ function HoverCardContent({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) {
17
+ return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
13
18
  }
14
19
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
- import { Slot } from "radix-ui";
4
+ import { Slot } from "../lib/slot.js";
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { Separator } from "./separator.js";
7
7
  function ItemGroup({ className, ...props }) {
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import { Label as LabelPrimitive } from "radix-ui";
3
- declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
2
+ declare function Label({ className, ...props }: React.ComponentProps<"label">): React.JSX.Element;
4
3
  export { Label };
5
4
  //# sourceMappingURL=label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAIlD,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAWlD;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAWpE;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,8 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Label as LabelPrimitive } from "radix-ui";
4
3
  import { cn } from "../lib/utils.js";
5
4
  function Label({ className, ...props }) {
6
- return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
5
+ return (_jsx("label", { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
7
6
  }
8
7
  export { Label };
@@ -1,27 +1,30 @@
1
1
  import * as React from "react";
2
- import { Menubar as MenubarPrimitive } from "radix-ui";
3
- declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
4
- declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
5
- declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
6
- declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
7
- declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
8
- declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
9
- declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
10
- declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
2
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
+ import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu";
5
+ declare function Menubar({ className, ...props }: MenubarPrimitive.Props): React.JSX.Element;
6
+ declare function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>): React.JSX.Element;
7
+ declare function MenubarGroup({ ...props }: React.ComponentProps<typeof DropdownMenuGroup>): React.JSX.Element;
8
+ declare function MenubarPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPortal>): React.JSX.Element;
9
+ declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof DropdownMenuTrigger>): React.JSX.Element;
10
+ declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
11
+ declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuItem>): React.JSX.Element;
12
+ declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
11
13
  inset?: boolean;
12
- variant?: "default" | "destructive";
13
14
  }): React.JSX.Element;
14
- declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
15
- declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): React.JSX.Element;
16
- declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
15
+ declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuRadioGroup>): React.JSX.Element;
16
+ declare function MenubarRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
17
17
  inset?: boolean;
18
18
  }): React.JSX.Element;
19
- declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
20
- declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
21
- declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
22
- declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
19
+ declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuLabel> & {
23
20
  inset?: boolean;
24
21
  }): React.JSX.Element;
25
- declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
22
+ declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuSeparator>): React.JSX.Element;
23
+ declare function MenubarShortcut({ className, ...props }: React.ComponentProps<typeof DropdownMenuShortcut>): React.JSX.Element;
24
+ declare function MenubarSub({ ...props }: React.ComponentProps<typeof DropdownMenuSub>): React.JSX.Element;
25
+ declare function MenubarSubTrigger({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
26
+ inset?: boolean;
27
+ }): React.JSX.Element;
28
+ declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuSubContent>): React.JSX.Element;
26
29
  export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
27
30
  //# sourceMappingURL=menubar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAItD,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAWpD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAEpD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAErD;AAED,iBAAS,aAAa,CAAC,EACr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BAYA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,qBAQzD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAED,iBAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,qBAEnD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,qBAeA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,qBAW1D;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,CAAA"}
1
+ {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGpE,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,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