@music-vine/cadence 2.6.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -44
- package/dist/components/accordion.d.ts +71 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/badge.d.ts +62 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +42 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/button.d.ts +117 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +3 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +56 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel-dots.d.ts +17 -0
- package/dist/components/carousel-dots.d.ts.map +1 -0
- package/dist/components/carousel-dots.js +1 -1
- package/dist/components/carousel-dots.js.map +1 -1
- package/dist/components/carousel.d.ts +99 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +2 -2
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.d.ts +34 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/context-menu.d.ts +126 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +6 -6
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.d.ts +85 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.d.ts +90 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input.d.ts +69 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +61 -57
- package/dist/components/input.js.map +2 -2
- package/dist/components/label.d.ts +36 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/popover.d.ts +61 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/price-tag.d.ts +31 -0
- package/dist/components/price-tag.d.ts.map +1 -0
- package/dist/components/price-tag.js.map +1 -1
- package/dist/components/radio-group.d.ts +15 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.d.ts +33 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/scroll-drum.d.ts +96 -0
- package/dist/components/scroll-drum.d.ts.map +1 -0
- package/dist/components/scroll-drum.js +63 -34
- package/dist/components/scroll-drum.js.map +2 -2
- package/dist/components/select.d.ts +49 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +35 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/skeleton.d.ts +44 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/slider.d.ts +21 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stacking-card.d.ts +89 -0
- package/dist/components/stacking-card.d.ts.map +1 -0
- package/dist/components/stacking-card.js +3 -3
- package/dist/components/stacking-card.js.map +2 -2
- package/dist/components/tabs.d.ts +46 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.d.ts +34 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/toast.d.ts +67 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.js.map +2 -2
- package/dist/components/toggle-button.d.ts +54 -0
- package/dist/components/toggle-button.d.ts.map +1 -0
- package/dist/components/toggle-button.js.map +1 -1
- package/dist/components/typography/heading.d.ts +20 -0
- package/dist/components/typography/heading.d.ts.map +1 -0
- package/dist/components/typography/heading.js.map +1 -1
- package/dist/components/typography/index.d.ts +5 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/list.d.ts +23 -0
- package/dist/components/typography/list.d.ts.map +1 -0
- package/dist/components/typography/list.js +1 -1
- package/dist/components/typography/list.js.map +2 -2
- package/dist/components/typography/prose.d.ts +8 -0
- package/dist/components/typography/prose.d.ts.map +1 -0
- package/dist/components/typography/text.d.ts +13 -0
- package/dist/components/typography/text.d.ts.map +1 -0
- package/dist/icons/custom/boards-indicator.d.ts +6 -0
- package/dist/icons/custom/boards-indicator.d.ts.map +1 -0
- package/dist/icons/custom/boards-indicator.js +7 -2
- package/dist/icons/custom/boards-indicator.js.map +2 -2
- package/dist/icons/custom/download-history.d.ts +5 -0
- package/dist/icons/custom/download-history.d.ts.map +1 -0
- package/dist/icons/custom/download-history.js +3 -4
- package/dist/icons/custom/download-history.js.map +2 -2
- package/dist/icons/custom/exclamation-mark-in-octagon.d.ts +5 -0
- package/dist/icons/custom/exclamation-mark-in-octagon.d.ts.map +1 -0
- package/dist/icons/custom/exclamation-mark-in-octagon.js +6 -3
- package/dist/icons/custom/exclamation-mark-in-octagon.js.map +2 -2
- package/dist/icons/custom/horizontal-orientation.d.ts +5 -0
- package/dist/icons/custom/horizontal-orientation.d.ts.map +1 -0
- package/dist/icons/custom/horizontal-orientation.js +4 -3
- package/dist/icons/custom/horizontal-orientation.js.map +2 -2
- package/dist/icons/custom/lightning-bolt.d.ts +5 -0
- package/dist/icons/custom/lightning-bolt.d.ts.map +1 -0
- package/dist/icons/custom/lightning-bolt.js +24 -27
- package/dist/icons/custom/lightning-bolt.js.map +2 -2
- package/dist/icons/custom/music-file.d.ts +5 -0
- package/dist/icons/custom/music-file.d.ts.map +1 -0
- package/dist/icons/custom/music-file.js +17 -0
- package/dist/icons/custom/music-file.js.map +7 -0
- package/dist/icons/custom/pin.d.ts +5 -0
- package/dist/icons/custom/pin.d.ts.map +1 -0
- package/dist/icons/custom/pin.js +4 -1
- package/dist/icons/custom/pin.js.map +2 -2
- package/dist/icons/custom/premium-star.d.ts +11 -0
- package/dist/icons/custom/premium-star.d.ts.map +1 -0
- package/dist/icons/custom/premium-star.js +3 -1
- package/dist/icons/custom/premium-star.js.map +2 -2
- package/dist/icons/custom/social/discord.d.ts +5 -0
- package/dist/icons/custom/social/discord.d.ts.map +1 -0
- package/dist/icons/custom/social/discord.js +3 -4
- package/dist/icons/custom/social/discord.js.map +2 -2
- package/dist/icons/custom/social/index.d.ts +4 -0
- package/dist/icons/custom/social/index.d.ts.map +1 -0
- package/dist/icons/custom/social/tiktok.d.ts +5 -0
- package/dist/icons/custom/social/tiktok.d.ts.map +1 -0
- package/dist/icons/custom/social/tiktok.js +3 -4
- package/dist/icons/custom/social/tiktok.js.map +2 -2
- package/dist/icons/custom/social/twitter-x.d.ts +5 -0
- package/dist/icons/custom/social/twitter-x.d.ts.map +1 -0
- package/dist/icons/custom/social/twitter-x.js +19 -22
- package/dist/icons/custom/social/twitter-x.js.map +2 -2
- package/dist/icons/custom/square-aspect-ratio.d.ts +5 -0
- package/dist/icons/custom/square-aspect-ratio.d.ts.map +1 -0
- package/dist/icons/custom/square-aspect-ratio.js +4 -1
- package/dist/icons/custom/square-aspect-ratio.js.map +2 -2
- package/dist/icons/custom/tick-in-circle.d.ts +8 -0
- package/dist/icons/custom/tick-in-circle.d.ts.map +1 -0
- package/dist/icons/custom/tick-in-circle.js +25 -25
- package/dist/icons/custom/tick-in-circle.js.map +2 -2
- package/dist/icons/custom/tick-small.d.ts +5 -0
- package/dist/icons/custom/tick-small.d.ts.map +1 -0
- package/dist/icons/custom/tick-small.js +8 -10
- package/dist/icons/custom/tick-small.js.map +2 -2
- package/dist/icons/custom/tick.d.ts +5 -0
- package/dist/icons/custom/tick.d.ts.map +1 -0
- package/dist/icons/custom/tick.js +2 -2
- package/dist/icons/custom/tick.js.map +2 -2
- package/dist/icons/custom/types.d.ts +3 -0
- package/dist/icons/custom/types.d.ts.map +1 -0
- package/dist/icons/custom/types.js +1 -0
- package/dist/icons/custom/types.js.map +7 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.d.ts +5 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.d.ts.map +1 -0
- package/dist/icons/custom/ultra-wide-aspect-ratio.js +4 -1
- package/dist/icons/custom/ultra-wide-aspect-ratio.js.map +2 -2
- package/dist/icons/custom/uppbeat-credit.d.ts +5 -0
- package/dist/icons/custom/uppbeat-credit.d.ts.map +1 -0
- package/dist/icons/custom/uppbeat-credit.js +2 -4
- package/dist/icons/custom/uppbeat-credit.js.map +2 -2
- package/dist/icons/custom/vertical-orientation.d.ts +5 -0
- package/dist/icons/custom/vertical-orientation.d.ts.map +1 -0
- package/dist/icons/custom/vertical-orientation.js +4 -1
- package/dist/icons/custom/vertical-orientation.js.map +2 -2
- package/dist/icons/custom/view-credit-note.d.ts +5 -0
- package/dist/icons/custom/view-credit-note.d.ts.map +1 -0
- package/dist/icons/custom/view-credit-note.js +4 -1
- package/dist/icons/custom/view-credit-note.js.map +2 -2
- package/dist/icons/index.d.ts +28 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -5
- package/dist/icons/index.js.map +2 -2
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +7 -17
- package/dist/lib/utils.js.map +2 -2
- package/dist/styles/index.css +16 -3
- package/dist/styles/storybook.css +2 -2
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/theme/index.d.ts +142 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +1 -1
- package/dist/theme/index.js.map +2 -2
- package/package.json +4 -9
- package/{tailwind.config.v4.css → tailwind.config.css} +35 -14
- package/dist/styles/index.v4.css +0 -49
- package/tailwind.config.ts +0 -313
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ContextMenu
|
|
3
|
+
*
|
|
4
|
+
* Right-click context menu with full keyboard navigation and accessibility.
|
|
5
|
+
* Built on Radix UI Context Menu primitive.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://ui.shadcn.com/docs/components/context-menu Shadcn Context Menu}
|
|
8
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/context-menu Radix Context Menu}
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Basic context menu
|
|
12
|
+
* <ContextMenu>
|
|
13
|
+
* <ContextMenuTrigger>Right click here</ContextMenuTrigger>
|
|
14
|
+
* <ContextMenuContent>
|
|
15
|
+
* <ContextMenuItem>Edit</ContextMenuItem>
|
|
16
|
+
* <ContextMenuItem>Duplicate</ContextMenuItem>
|
|
17
|
+
* <ContextMenuSeparator />
|
|
18
|
+
* <ContextMenuItem>Delete</ContextMenuItem>
|
|
19
|
+
* </ContextMenuContent>
|
|
20
|
+
* </ContextMenu>
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With submenus and keyboard shortcuts
|
|
24
|
+
* <ContextMenu>
|
|
25
|
+
* <ContextMenuTrigger>Right click</ContextMenuTrigger>
|
|
26
|
+
* <ContextMenuContent>
|
|
27
|
+
* <ContextMenuItem>
|
|
28
|
+
* Copy <ContextMenuShortcut>⌘C</ContextMenuShortcut>
|
|
29
|
+
* </ContextMenuItem>
|
|
30
|
+
* <ContextMenuSub>
|
|
31
|
+
* <ContextMenuSubTrigger>Share</ContextMenuSubTrigger>
|
|
32
|
+
* <ContextMenuSubContent>
|
|
33
|
+
* <ContextMenuItem>Email</ContextMenuItem>
|
|
34
|
+
* <ContextMenuItem>Messages</ContextMenuItem>
|
|
35
|
+
* </ContextMenuSubContent>
|
|
36
|
+
* </ContextMenuSub>
|
|
37
|
+
* </ContextMenuContent>
|
|
38
|
+
* </ContextMenu>
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // With checkbox and radio items
|
|
42
|
+
* <ContextMenuContent>
|
|
43
|
+
* <ContextMenuCheckboxItem checked={showToolbar}>
|
|
44
|
+
* Show Toolbar
|
|
45
|
+
* </ContextMenuCheckboxItem>
|
|
46
|
+
* <ContextMenuRadioGroup value={view}>
|
|
47
|
+
* <ContextMenuLabel>View</ContextMenuLabel>
|
|
48
|
+
* <ContextMenuRadioItem value="grid">Grid</ContextMenuRadioItem>
|
|
49
|
+
* <ContextMenuRadioItem value="list">List</ContextMenuRadioItem>
|
|
50
|
+
* </ContextMenuRadioGroup>
|
|
51
|
+
* </ContextMenuContent>
|
|
52
|
+
*/
|
|
53
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
54
|
+
import type * as React from "react";
|
|
55
|
+
import type { Ref } from "react";
|
|
56
|
+
/** Root component that manages context menu state. */
|
|
57
|
+
declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
58
|
+
/** Element that triggers the context menu on right-click. */
|
|
59
|
+
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
60
|
+
/** Groups related menu items together. */
|
|
61
|
+
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
/** Portal for rendering menu content outside the DOM hierarchy. */
|
|
63
|
+
declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
64
|
+
/** Container for nested submenu structure. */
|
|
65
|
+
declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
66
|
+
/** Container for radio item selection group. */
|
|
67
|
+
declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
/**
|
|
69
|
+
* Trigger for opening a submenu. Shows chevron indicator.
|
|
70
|
+
* @param inset - Add left padding to align with items that have icons
|
|
71
|
+
*/
|
|
72
|
+
interface ContextMenuSubTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger>, "ref"> {
|
|
73
|
+
inset?: boolean;
|
|
74
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>>;
|
|
75
|
+
}
|
|
76
|
+
declare const ContextMenuSubTrigger: ({ className, inset, children, ref, ...props }: ContextMenuSubTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
/** Content container for submenu items. Animated on open/close. */
|
|
78
|
+
interface ContextMenuSubContentProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>, "ref"> {
|
|
79
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubContent>>;
|
|
80
|
+
}
|
|
81
|
+
declare const ContextMenuSubContent: ({ className, ref, ...props }: ContextMenuSubContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
/** Main content container for the context menu. Renders in a portal with overlay. */
|
|
83
|
+
interface ContextMenuContentProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>, "ref"> {
|
|
84
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Content>>;
|
|
85
|
+
}
|
|
86
|
+
declare const ContextMenuContent: ({ className, ref, ...props }: ContextMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
/**
|
|
88
|
+
* Clickable menu item. Closes menu on selection.
|
|
89
|
+
* @param inset - Add left padding to align with items that have icons
|
|
90
|
+
*/
|
|
91
|
+
interface ContextMenuItemProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item>, "ref"> {
|
|
92
|
+
inset?: boolean;
|
|
93
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Item>>;
|
|
94
|
+
}
|
|
95
|
+
declare const ContextMenuItem: ({ className, inset, ref, ...props }: ContextMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
/** Toggleable checkbox menu item with check indicator when selected. */
|
|
97
|
+
interface ContextMenuCheckboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>, "ref"> {
|
|
98
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>;
|
|
99
|
+
}
|
|
100
|
+
declare const ContextMenuCheckboxItem: ({ className, children, checked, ref, ...props }: ContextMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
/** Radio option within a ContextMenuRadioGroup. Shows dot indicator when selected. */
|
|
102
|
+
interface ContextMenuRadioItemProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>, "ref"> {
|
|
103
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.RadioItem>>;
|
|
104
|
+
}
|
|
105
|
+
declare const ContextMenuRadioItem: ({ className, children, ref, ...props }: ContextMenuRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
/**
|
|
107
|
+
* Non-interactive label for grouping menu items.
|
|
108
|
+
* @param inset - Add left padding to align with items that have icons
|
|
109
|
+
*/
|
|
110
|
+
interface ContextMenuLabelProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label>, "ref"> {
|
|
111
|
+
inset?: boolean;
|
|
112
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Label>>;
|
|
113
|
+
}
|
|
114
|
+
declare const ContextMenuLabel: ({ className, inset, ref, ...props }: ContextMenuLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
/** Visual divider between menu item groups. */
|
|
116
|
+
interface ContextMenuSeparatorProps extends Omit<React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>, "ref"> {
|
|
117
|
+
ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Separator>>;
|
|
118
|
+
}
|
|
119
|
+
declare const ContextMenuSeparator: ({ className, ref, ...props }: ContextMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
120
|
+
/** Displays keyboard shortcut hint aligned to the right of a menu item. */
|
|
121
|
+
declare const ContextMenuShortcut: {
|
|
122
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
123
|
+
displayName: string;
|
|
124
|
+
};
|
|
125
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
|
|
126
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,sDAAsD;AACtD,QAAA,MAAM,WAAW,iDAA4B,CAAC;AAE9C,6DAA6D;AAC7D,QAAA,MAAM,kBAAkB,sHAA+B,CAAC;AAExD,0CAA0C;AAC1C,QAAA,MAAM,gBAAgB,mHA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oB,CAAC,SAAS,CAAC,EACrE,KAAK,CACN;IACD,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC;CACpE;AAED,QAAA,MAAM,oBAAoB,GAAI,8BAI3B,yBAAyB,4CAM3B,CAAC;AAEF,2EAA2E;AAC3E,QAAA,MAAM,mBAAmB;8BAGtB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAQvC,CAAC;AAGF,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAC"}
|
|
@@ -18,7 +18,7 @@ const ContextMenuSubTrigger = ({
|
|
|
18
18
|
ContextMenuPrimitive.SubTrigger,
|
|
19
19
|
{
|
|
20
20
|
className: cn(
|
|
21
|
-
"flex cursor-default select-none items-center rounded-
|
|
21
|
+
"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[state=open]:bg-gray-50 data-[state=open]:text-gray-950 dark:data-[state=open]:bg-gray-900 dark:data-[state=open]:text-white dark:focus:bg-gray-900 dark:focus:text-white",
|
|
22
22
|
inset && "pl-8",
|
|
23
23
|
className
|
|
24
24
|
),
|
|
@@ -38,7 +38,7 @@ const ContextMenuSubContent = ({
|
|
|
38
38
|
ContextMenuPrimitive.SubContent,
|
|
39
39
|
{
|
|
40
40
|
className: cn(
|
|
41
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-
|
|
41
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border border-gray-150 bg-white p-1 text-gray-950 shadow-md data-[state=open]:animate-in dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",
|
|
42
42
|
className
|
|
43
43
|
),
|
|
44
44
|
ref,
|
|
@@ -54,7 +54,7 @@ const ContextMenuContent = ({
|
|
|
54
54
|
{
|
|
55
55
|
className: cn(
|
|
56
56
|
// Browser-style context menu styling - slim and clean
|
|
57
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 z-50 min-w-[8rem] origin-
|
|
57
|
+
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border border-gray-150 border-solid bg-white p-2 text-gray-950 shadow-lg outline-hidden data-[state=open]:animate-in data-[state=closed]:opacity-0 data-[state=open]:opacity-100 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50",
|
|
58
58
|
className
|
|
59
59
|
),
|
|
60
60
|
ref,
|
|
@@ -71,7 +71,7 @@ const ContextMenuItem = ({
|
|
|
71
71
|
{
|
|
72
72
|
className: cn(
|
|
73
73
|
// Browser-style menu item - slim padding, subtle hover
|
|
74
|
-
"relative flex cursor-default select-none items-center rounded px-2 py-1 text-sm outline-
|
|
74
|
+
"relative flex cursor-default select-none items-center rounded px-2 py-1 text-sm outline-hidden transition-colors hover:bg-gray-50 focus:bg-gray-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-800 dark:hover:bg-gray-800",
|
|
75
75
|
inset && "pl-8",
|
|
76
76
|
className
|
|
77
77
|
),
|
|
@@ -90,7 +90,7 @@ const ContextMenuCheckboxItem = ({
|
|
|
90
90
|
{
|
|
91
91
|
checked,
|
|
92
92
|
className: cn(
|
|
93
|
-
"relative flex cursor-default select-none items-center rounded-
|
|
93
|
+
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white",
|
|
94
94
|
className
|
|
95
95
|
),
|
|
96
96
|
ref,
|
|
@@ -110,7 +110,7 @@ const ContextMenuRadioItem = ({
|
|
|
110
110
|
ContextMenuPrimitive.RadioItem,
|
|
111
111
|
{
|
|
112
112
|
className: cn(
|
|
113
|
-
"relative flex cursor-default select-none items-center rounded-
|
|
113
|
+
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white",
|
|
114
114
|
className
|
|
115
115
|
),
|
|
116
116
|
ref,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/context-menu.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module ContextMenu\n *\n * Right-click context menu with full keyboard navigation and accessibility.\n * Built on Radix UI Context Menu primitive.\n *\n * @see {@link https://ui.shadcn.com/docs/components/context-menu Shadcn Context Menu}\n * @see {@link https://www.radix-ui.com/primitives/docs/components/context-menu Radix Context Menu}\n *\n * @example\n * // Basic context menu\n * <ContextMenu>\n * <ContextMenuTrigger>Right click here</ContextMenuTrigger>\n * <ContextMenuContent>\n * <ContextMenuItem>Edit</ContextMenuItem>\n * <ContextMenuItem>Duplicate</ContextMenuItem>\n * <ContextMenuSeparator />\n * <ContextMenuItem>Delete</ContextMenuItem>\n * </ContextMenuContent>\n * </ContextMenu>\n *\n * @example\n * // With submenus and keyboard shortcuts\n * <ContextMenu>\n * <ContextMenuTrigger>Right click</ContextMenuTrigger>\n * <ContextMenuContent>\n * <ContextMenuItem>\n * Copy <ContextMenuShortcut>\u2318C</ContextMenuShortcut>\n * </ContextMenuItem>\n * <ContextMenuSub>\n * <ContextMenuSubTrigger>Share</ContextMenuSubTrigger>\n * <ContextMenuSubContent>\n * <ContextMenuItem>Email</ContextMenuItem>\n * <ContextMenuItem>Messages</ContextMenuItem>\n * </ContextMenuSubContent>\n * </ContextMenuSub>\n * </ContextMenuContent>\n * </ContextMenu>\n *\n * @example\n * // With checkbox and radio items\n * <ContextMenuContent>\n * <ContextMenuCheckboxItem checked={showToolbar}>\n * Show Toolbar\n * </ContextMenuCheckboxItem>\n * <ContextMenuRadioGroup value={view}>\n * <ContextMenuLabel>View</ContextMenuLabel>\n * <ContextMenuRadioItem value=\"grid\">Grid</ContextMenuRadioItem>\n * <ContextMenuRadioItem value=\"list\">List</ContextMenuRadioItem>\n * </ContextMenuRadioGroup>\n * </ContextMenuContent>\n */\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\n/** Root component that manages context menu state. */\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/** Element that triggers the context menu on right-click. */\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/** Groups related menu items together. */\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/** Portal for rendering menu content outside the DOM hierarchy. */\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\n/** Container for nested submenu structure. */\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/** Container for radio item selection group. */\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/**\n * Trigger for opening a submenu. Shows chevron indicator.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuSubTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>>;\n}\n\nconst ContextMenuSubTrigger = ({\n className,\n inset,\n children,\n ref,\n ...props\n}: ContextMenuSubTriggerProps) => (\n <ContextMenuPrimitive.SubTrigger\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-gray-50 focus:text-gray-950 data-[state=open]:bg-gray-50 data-[state=open]:text-gray-950 dark:data-[state=open]:bg-gray-900 dark:data-[state=open]:text-white dark:focus:bg-gray-900 dark:focus:text-white\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n);\n\n/** Content container for submenu items. Animated on open/close. */\ninterface ContextMenuSubContentProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubContent>>;\n}\n\nconst ContextMenuSubContent = ({\n className,\n ref,\n ...props\n}: ContextMenuSubContentProps) => (\n <ContextMenuPrimitive.SubContent\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border border-gray-150 bg-white p-1 text-gray-950 shadow-md data-[state=open]:animate-in dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Main content container for the context menu. Renders in a portal with overlay. */\ninterface ContextMenuContentProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Content>>;\n}\n\nconst ContextMenuContent = ({\n className,\n ref,\n ...props\n}: ContextMenuContentProps) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n className={cn(\n // Browser-style context menu styling - slim and clean\n \"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-lg border border-gray-150 border-solid bg-white p-2 text-gray-950 shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:opacity-0 data-[state=open]:opacity-100 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n);\n\n/**\n * Clickable menu item. Closes menu on selection.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Item>>;\n}\n\nconst ContextMenuItem = ({\n className,\n inset,\n ref,\n ...props\n}: ContextMenuItemProps) => (\n <ContextMenuPrimitive.Item\n className={cn(\n // Browser-style menu item - slim padding, subtle hover\n \"relative flex cursor-default select-none items-center rounded px-2 py-1 text-sm outline-none transition-colors hover:bg-gray-50 focus:bg-gray-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-800 dark:hover:bg-gray-800\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Toggleable checkbox menu item with check indicator when selected. */\ninterface ContextMenuCheckboxItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>;\n}\n\nconst ContextMenuCheckboxItem = ({\n className,\n children,\n checked,\n ref,\n ...props\n}: ContextMenuCheckboxItemProps) => (\n <ContextMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white\",\n className\n )}\n ref={ref}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n);\n\n/** Radio option within a ContextMenuRadioGroup. Shows dot indicator when selected. */\ninterface ContextMenuRadioItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.RadioItem>>;\n}\n\nconst ContextMenuRadioItem = ({\n className,\n children,\n ref,\n ...props\n}: ContextMenuRadioItemProps) => (\n <ContextMenuPrimitive.RadioItem\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white\",\n className\n )}\n ref={ref}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n);\n\n/**\n * Non-interactive label for grouping menu items.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuLabelProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Label>>;\n}\n\nconst ContextMenuLabel = ({\n className,\n inset,\n ref,\n ...props\n}: ContextMenuLabelProps) => (\n <ContextMenuPrimitive.Label\n className={cn(\n \"px-2 py-1.5 font-semibold text-gray-950 text-sm dark:text-gray-50\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Visual divider between menu item groups. */\ninterface ContextMenuSeparatorProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Separator>>;\n}\n\nconst ContextMenuSeparator = ({\n className,\n ref,\n ...props\n}: ContextMenuSeparatorProps) => (\n <ContextMenuPrimitive.Separator\n className={cn(\"-mx-1 my-1 h-px bg-gray-150 dark:bg-gray-800\", className)}\n ref={ref}\n {...props}\n />\n);\n\n/** Displays keyboard shortcut hint aligned to the right of a menu item. */\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\n \"ml-auto text-gray-600 text-xs tracking-widest dark:text-gray-500\",\n className\n )}\n {...props}\n />\n);\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module ContextMenu\n *\n * Right-click context menu with full keyboard navigation and accessibility.\n * Built on Radix UI Context Menu primitive.\n *\n * @see {@link https://ui.shadcn.com/docs/components/context-menu Shadcn Context Menu}\n * @see {@link https://www.radix-ui.com/primitives/docs/components/context-menu Radix Context Menu}\n *\n * @example\n * // Basic context menu\n * <ContextMenu>\n * <ContextMenuTrigger>Right click here</ContextMenuTrigger>\n * <ContextMenuContent>\n * <ContextMenuItem>Edit</ContextMenuItem>\n * <ContextMenuItem>Duplicate</ContextMenuItem>\n * <ContextMenuSeparator />\n * <ContextMenuItem>Delete</ContextMenuItem>\n * </ContextMenuContent>\n * </ContextMenu>\n *\n * @example\n * // With submenus and keyboard shortcuts\n * <ContextMenu>\n * <ContextMenuTrigger>Right click</ContextMenuTrigger>\n * <ContextMenuContent>\n * <ContextMenuItem>\n * Copy <ContextMenuShortcut>\u2318C</ContextMenuShortcut>\n * </ContextMenuItem>\n * <ContextMenuSub>\n * <ContextMenuSubTrigger>Share</ContextMenuSubTrigger>\n * <ContextMenuSubContent>\n * <ContextMenuItem>Email</ContextMenuItem>\n * <ContextMenuItem>Messages</ContextMenuItem>\n * </ContextMenuSubContent>\n * </ContextMenuSub>\n * </ContextMenuContent>\n * </ContextMenu>\n *\n * @example\n * // With checkbox and radio items\n * <ContextMenuContent>\n * <ContextMenuCheckboxItem checked={showToolbar}>\n * Show Toolbar\n * </ContextMenuCheckboxItem>\n * <ContextMenuRadioGroup value={view}>\n * <ContextMenuLabel>View</ContextMenuLabel>\n * <ContextMenuRadioItem value=\"grid\">Grid</ContextMenuRadioItem>\n * <ContextMenuRadioItem value=\"list\">List</ContextMenuRadioItem>\n * </ContextMenuRadioGroup>\n * </ContextMenuContent>\n */\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\n/** Root component that manages context menu state. */\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/** Element that triggers the context menu on right-click. */\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/** Groups related menu items together. */\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/** Portal for rendering menu content outside the DOM hierarchy. */\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\n/** Container for nested submenu structure. */\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/** Container for radio item selection group. */\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/**\n * Trigger for opening a submenu. Shows chevron indicator.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuSubTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>>;\n}\n\nconst ContextMenuSubTrigger = ({\n className,\n inset,\n children,\n ref,\n ...props\n}: ContextMenuSubTriggerProps) => (\n <ContextMenuPrimitive.SubTrigger\n className={cn(\n \"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[state=open]:bg-gray-50 data-[state=open]:text-gray-950 dark:data-[state=open]:bg-gray-900 dark:data-[state=open]:text-white dark:focus:bg-gray-900 dark:focus:text-white\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n);\n\n/** Content container for submenu items. Animated on open/close. */\ninterface ContextMenuSubContentProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.SubContent>>;\n}\n\nconst ContextMenuSubContent = ({\n className,\n ref,\n ...props\n}: ContextMenuSubContentProps) => (\n <ContextMenuPrimitive.SubContent\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border border-gray-150 bg-white p-1 text-gray-950 shadow-md data-[state=open]:animate-in dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Main content container for the context menu. Renders in a portal with overlay. */\ninterface ContextMenuContentProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Content>>;\n}\n\nconst ContextMenuContent = ({\n className,\n ref,\n ...props\n}: ContextMenuContentProps) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n className={cn(\n // Browser-style context menu styling - slim and clean\n \"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border border-gray-150 border-solid bg-white p-2 text-gray-950 shadow-lg outline-hidden data-[state=open]:animate-in data-[state=closed]:opacity-0 data-[state=open]:opacity-100 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n);\n\n/**\n * Clickable menu item. Closes menu on selection.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Item>>;\n}\n\nconst ContextMenuItem = ({\n className,\n inset,\n ref,\n ...props\n}: ContextMenuItemProps) => (\n <ContextMenuPrimitive.Item\n className={cn(\n // Browser-style menu item - slim padding, subtle hover\n \"relative flex cursor-default select-none items-center rounded px-2 py-1 text-sm outline-hidden transition-colors hover:bg-gray-50 focus:bg-gray-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-800 dark:hover:bg-gray-800\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Toggleable checkbox menu item with check indicator when selected. */\ninterface ContextMenuCheckboxItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>;\n}\n\nconst ContextMenuCheckboxItem = ({\n className,\n children,\n checked,\n ref,\n ...props\n}: ContextMenuCheckboxItemProps) => (\n <ContextMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white\",\n className\n )}\n ref={ref}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n);\n\n/** Radio option within a ContextMenuRadioGroup. Shows dot indicator when selected. */\ninterface ContextMenuRadioItemProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.RadioItem>>;\n}\n\nconst ContextMenuRadioItem = ({\n className,\n children,\n ref,\n ...props\n}: ContextMenuRadioItemProps) => (\n <ContextMenuPrimitive.RadioItem\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-gray-50 focus:text-gray-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900 dark:focus:text-white\",\n className\n )}\n ref={ref}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n);\n\n/**\n * Non-interactive label for grouping menu items.\n * @param inset - Add left padding to align with items that have icons\n */\ninterface ContextMenuLabelProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label>,\n \"ref\"\n > {\n inset?: boolean;\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Label>>;\n}\n\nconst ContextMenuLabel = ({\n className,\n inset,\n ref,\n ...props\n}: ContextMenuLabelProps) => (\n <ContextMenuPrimitive.Label\n className={cn(\n \"px-2 py-1.5 font-semibold text-gray-950 text-sm dark:text-gray-50\",\n inset && \"pl-8\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Visual divider between menu item groups. */\ninterface ContextMenuSeparatorProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>,\n \"ref\"\n > {\n ref?: Ref<React.ElementRef<typeof ContextMenuPrimitive.Separator>>;\n}\n\nconst ContextMenuSeparator = ({\n className,\n ref,\n ...props\n}: ContextMenuSeparatorProps) => (\n <ContextMenuPrimitive.Separator\n className={cn(\"-mx-1 my-1 h-px bg-gray-150 dark:bg-gray-800\", className)}\n ref={ref}\n {...props}\n />\n);\n\n/** Displays keyboard shortcut hint aligned to the right of a menu item. */\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\n \"ml-auto text-gray-600 text-xs tracking-widest dark:text-gray-500\",\n className\n )}\n {...props}\n />\n);\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n"],
|
|
5
5
|
"mappings": "AAiGE,SAUE,KAVF;AA7CF,YAAY,0BAA0B;AACtC,SAAS,OAAO,cAAc,cAAc;AAI5C,SAAS,UAAU;AAGnB,MAAM,cAAc,qBAAqB;AAGzC,MAAM,qBAAqB,qBAAqB;AAGhD,MAAM,mBAAmB,qBAAqB;AAG9C,MAAM,oBAAoB,qBAAqB;AAG/C,MAAM,iBAAiB,qBAAqB;AAG5C,MAAM,wBAAwB,qBAAqB;AAenD,MAAM,wBAAwB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,gBAAa,WAAU,mBAAk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AAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,gEACd,8BAAC,qBAAqB,eAArB,EACC,8BAAC,UAAO,WAAU,wBAAuB,GAC3C,GACF;AAAA,MACC;AAAA;AAAA;AACH;AAgBF,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA;AACN;AAYF,MAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACC,WAAW,GAAG,gDAAgD,SAAS;AAAA,IACvE;AAAA,IACC,GAAG;AAAA;AACN;AAIF,MAAM,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN;AAEF,oBAAoB,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Dialog
|
|
3
|
+
*
|
|
4
|
+
* Modal dialog overlay for focused user interaction. Built on Radix UI Dialog primitive.
|
|
5
|
+
* Includes backdrop overlay, close button, and focus trapping.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://ui.shadcn.com/docs/components/dialog Shadcn Dialog}
|
|
8
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/dialog Radix Dialog}
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Basic dialog
|
|
12
|
+
* <Dialog>
|
|
13
|
+
* <DialogTrigger asChild>
|
|
14
|
+
* <Button>Open Dialog</Button>
|
|
15
|
+
* </DialogTrigger>
|
|
16
|
+
* <DialogContent>
|
|
17
|
+
* <DialogHeader>
|
|
18
|
+
* <DialogTitle>Are you sure?</DialogTitle>
|
|
19
|
+
* <DialogDescription>
|
|
20
|
+
* This action cannot be undone.
|
|
21
|
+
* </DialogDescription>
|
|
22
|
+
* </DialogHeader>
|
|
23
|
+
* <DialogFooter>
|
|
24
|
+
* <Button>Confirm</Button>
|
|
25
|
+
* </DialogFooter>
|
|
26
|
+
* </DialogContent>
|
|
27
|
+
* </Dialog>
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Controlled dialog
|
|
31
|
+
* const [open, setOpen] = useState(false);
|
|
32
|
+
*
|
|
33
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
34
|
+
* <DialogContent>
|
|
35
|
+
* <DialogHeader>
|
|
36
|
+
* <DialogTitle>Edit Profile</DialogTitle>
|
|
37
|
+
* </DialogHeader>
|
|
38
|
+
* <form onSubmit={() => setOpen(false)}>
|
|
39
|
+
* ...
|
|
40
|
+
* </form>
|
|
41
|
+
* </DialogContent>
|
|
42
|
+
* </Dialog>
|
|
43
|
+
*/
|
|
44
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
45
|
+
import type * as React from "react";
|
|
46
|
+
import type { Ref } from "react";
|
|
47
|
+
/** Root component that manages dialog open/closed state. */
|
|
48
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
49
|
+
/** Element that opens the dialog when clicked. Use `asChild` to wrap custom buttons. */
|
|
50
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
/** Portal for rendering dialog outside the DOM hierarchy. */
|
|
52
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
53
|
+
/** Closes the dialog when clicked. Use `asChild` to wrap custom close buttons. */
|
|
54
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
55
|
+
/** Semi-transparent backdrop behind the dialog. Animated fade on open/close. */
|
|
56
|
+
declare const DialogOverlay: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {
|
|
57
|
+
ref?: Ref<React.ElementRef<typeof DialogPrimitive.Overlay>>;
|
|
58
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Main dialog container. Centered on screen with close button.
|
|
61
|
+
* Includes overlay, focus trap, and Escape key handling.
|
|
62
|
+
*/
|
|
63
|
+
declare const DialogContent: ({ className, children, ref, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
|
64
|
+
ref?: Ref<React.ElementRef<typeof DialogPrimitive.Content>>;
|
|
65
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
/** Header section for dialog title and description. Centered on mobile, left-aligned on desktop. */
|
|
67
|
+
declare const DialogHeader: {
|
|
68
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
/** Footer section for action buttons. Stacks on mobile, horizontal on desktop. */
|
|
72
|
+
declare const DialogFooter: {
|
|
73
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
/** Dialog title with Echo typography. Required for accessibility. */
|
|
77
|
+
declare const DialogTitle: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {
|
|
78
|
+
ref?: Ref<React.ElementRef<typeof DialogPrimitive.Title>>;
|
|
79
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
/** Accessible description text below the title. */
|
|
81
|
+
declare const DialogDescription: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
|
|
82
|
+
ref?: Ref<React.ElementRef<typeof DialogPrimitive.Description>>;
|
|
83
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
85
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,4DAA4D;AAC5D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,wFAAwF;AACxF,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,6DAA6D;AAC7D,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,kFAAkF;AAClF,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,gFAAgF;AAChF,QAAA,MAAM,aAAa,GAAI,8BAIpB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,4CASA,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,aAAa,GAAI,wCAKpB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,4CAuBA,CAAC;AAEF,oGAAoG;AACpG,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,kFAAkF;AAClF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,qEAAqE;AACrE,QAAA,MAAM,WAAW,GAAI,8BAIlB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CAC3D,4CASA,CAAC;AAEF,mDAAmD;AACnD,QAAA,MAAM,iBAAiB,GAAI,8BAIxB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,GAAG;IACtE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;CACjE,4CAMA,CAAC;AAEF,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -46,7 +46,7 @@ const DialogContent = ({
|
|
|
46
46
|
DialogPrimitive.Close,
|
|
47
47
|
{
|
|
48
48
|
asChild: true,
|
|
49
|
-
className: "absolute top-4 right-4 opacity-100 ring-offset-white transition-opacity hover:opacity-100 focus:outline-
|
|
49
|
+
className: "absolute top-4 right-4 opacity-100 ring-offset-white transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 dark:ring-offset-gray-950 dark:data-[state=open]:bg-gray-800 dark:data-[state=open]:text-gray-400 dark:focus:ring-gray-300",
|
|
50
50
|
children: /* @__PURE__ */ jsxs(Button, { "aria-label": "Close", size: "icon", variant: "transparent", children: [
|
|
51
51
|
/* @__PURE__ */ jsx(X, { className: "h-5 w-5" }),
|
|
52
52
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/dialog.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module Dialog\n *\n * Modal dialog overlay for focused user interaction. Built on Radix UI Dialog primitive.\n * Includes backdrop overlay, close button, and focus trapping.\n *\n * @see {@link https://ui.shadcn.com/docs/components/dialog Shadcn Dialog}\n * @see {@link https://www.radix-ui.com/primitives/docs/components/dialog Radix Dialog}\n *\n * @example\n * // Basic dialog\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Are you sure?</DialogTitle>\n * <DialogDescription>\n * This action cannot be undone.\n * </DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n *\n * @example\n * // Controlled dialog\n * const [open, setOpen] = useState(false);\n *\n * <Dialog open={open} onOpenChange={setOpen}>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Edit Profile</DialogTitle>\n * </DialogHeader>\n * <form onSubmit={() => setOpen(false)}>\n * ...\n * </form>\n * </DialogContent>\n * </Dialog>\n */\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\n\nimport { cn } from \"../lib/utils\";\nimport { Button } from \"./button\";\nimport { headingVariants } from \"./typography/heading\";\nimport { textVariants } from \"./typography/text\";\n\n/** Root component that manages dialog open/closed state. */\nconst Dialog = DialogPrimitive.Root;\n\n/** Element that opens the dialog when clicked. Use `asChild` to wrap custom buttons. */\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/** Portal for rendering dialog outside the DOM hierarchy. */\nconst DialogPortal = DialogPrimitive.Portal;\n\n/** Closes the dialog when clicked. Use `asChild` to wrap custom close buttons. */\nconst DialogClose = DialogPrimitive.Close;\n\n/** Semi-transparent backdrop behind the dialog. Animated fade on open/close. */\nconst DialogOverlay = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Overlay>>;\n}) => (\n <DialogPrimitive.Overlay\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60 data-[state=closed]:animate-out data-[state=open]:animate-in\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/**\n * Main dialog container. Centered on screen with close button.\n * Includes overlay, focus trap, and Escape key handling.\n */\nconst DialogContent = ({\n className,\n children,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Content>>;\n}) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-150 border-solid bg-white p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg dark:border-gray-800 dark:bg-gray-950\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n asChild\n className=\"absolute top-4 right-4 opacity-100 ring-offset-white transition-opacity hover:opacity-100 focus:outline-
|
|
4
|
+
"sourcesContent": ["/**\n * @module Dialog\n *\n * Modal dialog overlay for focused user interaction. Built on Radix UI Dialog primitive.\n * Includes backdrop overlay, close button, and focus trapping.\n *\n * @see {@link https://ui.shadcn.com/docs/components/dialog Shadcn Dialog}\n * @see {@link https://www.radix-ui.com/primitives/docs/components/dialog Radix Dialog}\n *\n * @example\n * // Basic dialog\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Are you sure?</DialogTitle>\n * <DialogDescription>\n * This action cannot be undone.\n * </DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n *\n * @example\n * // Controlled dialog\n * const [open, setOpen] = useState(false);\n *\n * <Dialog open={open} onOpenChange={setOpen}>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Edit Profile</DialogTitle>\n * </DialogHeader>\n * <form onSubmit={() => setOpen(false)}>\n * ...\n * </form>\n * </DialogContent>\n * </Dialog>\n */\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\n\nimport { cn } from \"../lib/utils\";\nimport { Button } from \"./button\";\nimport { headingVariants } from \"./typography/heading\";\nimport { textVariants } from \"./typography/text\";\n\n/** Root component that manages dialog open/closed state. */\nconst Dialog = DialogPrimitive.Root;\n\n/** Element that opens the dialog when clicked. Use `asChild` to wrap custom buttons. */\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/** Portal for rendering dialog outside the DOM hierarchy. */\nconst DialogPortal = DialogPrimitive.Portal;\n\n/** Closes the dialog when clicked. Use `asChild` to wrap custom close buttons. */\nconst DialogClose = DialogPrimitive.Close;\n\n/** Semi-transparent backdrop behind the dialog. Animated fade on open/close. */\nconst DialogOverlay = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Overlay>>;\n}) => (\n <DialogPrimitive.Overlay\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60 data-[state=closed]:animate-out data-[state=open]:animate-in\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/**\n * Main dialog container. Centered on screen with close button.\n * Includes overlay, focus trap, and Escape key handling.\n */\nconst DialogContent = ({\n className,\n children,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Content>>;\n}) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={cn(\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-150 border-solid bg-white p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg dark:border-gray-800 dark:bg-gray-950\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n asChild\n className=\"absolute top-4 right-4 opacity-100 ring-offset-white transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 dark:ring-offset-gray-950 dark:data-[state=open]:bg-gray-800 dark:data-[state=open]:text-gray-400 dark:focus:ring-gray-300\"\n >\n <Button aria-label=\"Close\" size=\"icon\" variant=\"transparent\">\n <X className=\"h-5 w-5\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n);\n\n/** Header section for dialog title and description. Centered on mobile, left-aligned on desktop. */\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\n/** Footer section for action buttons. Stacks on mobile, horizontal on desktop. */\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\n/** Dialog title with Echo typography. Required for accessibility. */\nconst DialogTitle = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Title>>;\n}) => (\n <DialogPrimitive.Title\n className={cn(\n headingVariants({ variant: \"h5\", fontFamily: \"brand\" }),\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Accessible description text below the title. */\nconst DialogDescription = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {\n ref?: Ref<React.ElementRef<typeof DialogPrimitive.Description>>;\n}) => (\n <DialogPrimitive.Description\n className={cn(textVariants(), \"text-sm\", className)}\n ref={ref}\n {...props}\n />\n);\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],
|
|
5
5
|
"mappings": "AAyEE,cAqCM,YArCN;AA9BF,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAIlB,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAG7B,MAAM,SAAS,gBAAgB;AA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EACA,GAAG;AACL,MAGE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC,WAAW;AAAA,MACT,gBAAgB,EAAE,SAAS,MAAM,YAAY,QAAQ,CAAC;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA;AACN;AAIF,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAGE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC,WAAW,GAAG,aAAa,GAAG,WAAW,SAAS;AAAA,IAClD;AAAA,IACC,GAAG;AAAA;AACN;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Drawer
|
|
3
|
+
*
|
|
4
|
+
* Bottom sheet drawer for mobile-friendly interactions. Built on Vaul library.
|
|
5
|
+
* Supports drag-to-dismiss, snap points, and background scaling.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://ui.shadcn.com/docs/components/drawer Shadcn Drawer}
|
|
8
|
+
* @see {@link https://vaul.emilkowal.ski/ Vaul Documentation}
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Basic drawer
|
|
12
|
+
* <Drawer>
|
|
13
|
+
* <DrawerTrigger asChild>
|
|
14
|
+
* <Button>Open Drawer</Button>
|
|
15
|
+
* </DrawerTrigger>
|
|
16
|
+
* <DrawerContent>
|
|
17
|
+
* <DrawerHeader>
|
|
18
|
+
* <DrawerTitle>Settings</DrawerTitle>
|
|
19
|
+
* <DrawerDescription>Adjust your preferences</DrawerDescription>
|
|
20
|
+
* </DrawerHeader>
|
|
21
|
+
* <div className="p-4">Content here</div>
|
|
22
|
+
* <DrawerFooter>
|
|
23
|
+
* <DrawerClose asChild>
|
|
24
|
+
* <Button variant="outline">Close</Button>
|
|
25
|
+
* </DrawerClose>
|
|
26
|
+
* </DrawerFooter>
|
|
27
|
+
* </DrawerContent>
|
|
28
|
+
* </Drawer>
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // Controlled drawer with custom handle
|
|
32
|
+
* const [open, setOpen] = useState(false);
|
|
33
|
+
*
|
|
34
|
+
* <Drawer open={open} onOpenChange={setOpen}>
|
|
35
|
+
* <DrawerContent handleColor="dark">
|
|
36
|
+
* <DrawerTitle>Menu</DrawerTitle>
|
|
37
|
+
* </DrawerContent>
|
|
38
|
+
* </Drawer>
|
|
39
|
+
*/
|
|
40
|
+
import type * as React from "react";
|
|
41
|
+
import type { Ref } from "react";
|
|
42
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
43
|
+
/**
|
|
44
|
+
* Root drawer component. Scales background by default.
|
|
45
|
+
* @param shouldScaleBackground - Scale page content when drawer opens (default: true)
|
|
46
|
+
*/
|
|
47
|
+
declare const Drawer: {
|
|
48
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
/** Element that opens the drawer when clicked. Use `asChild` to wrap custom triggers. */
|
|
52
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
/** Portal for rendering drawer outside the DOM hierarchy. */
|
|
54
|
+
declare const DrawerPortal: typeof import("vaul").Portal;
|
|
55
|
+
/** Closes the drawer when clicked. Use `asChild` to wrap custom close buttons. */
|
|
56
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
57
|
+
/** Semi-transparent backdrop behind the drawer. */
|
|
58
|
+
declare const DrawerOverlay: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & {
|
|
59
|
+
ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Overlay>>;
|
|
60
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
/**
|
|
62
|
+
* Main drawer content container. Slides up from bottom with drag handle.
|
|
63
|
+
* @param handleColor - Handle bar color: `"default"`, `"dark"`, `"light"`, or `"custom"`
|
|
64
|
+
* @param customHandleColor - Tailwind class for custom handle color (when handleColor="custom")
|
|
65
|
+
*/
|
|
66
|
+
declare const DrawerContent: ({ className, children, handleColor, customHandleColor, ref, ...props }: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {
|
|
67
|
+
handleColor?: "default" | "dark" | "light" | "custom";
|
|
68
|
+
customHandleColor?: string;
|
|
69
|
+
ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Content>>;
|
|
70
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
/** Header section for drawer title and description. Centered on mobile, left-aligned on desktop. */
|
|
72
|
+
declare const DrawerHeader: {
|
|
73
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
/** Footer section for action buttons, pushed to bottom of drawer. */
|
|
77
|
+
declare const DrawerFooter: {
|
|
78
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
81
|
+
/** Drawer title with semibold weight. Required for accessibility. */
|
|
82
|
+
declare const DrawerTitle: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> & {
|
|
83
|
+
ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Title>>;
|
|
84
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
/** Muted description text below the title. */
|
|
86
|
+
declare const DrawerDescription: ({ className, ref, ...props }: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> & {
|
|
87
|
+
ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Description>>;
|
|
88
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, };
|
|
90
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAIjD;;;GAGG;AACH,QAAA,MAAM,MAAM;0CAGT,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;;CAKnD,CAAC;AAIF,yFAAyF;AACzF,QAAA,MAAM,aAAa,+HAA0B,CAAC;AAE9C,6DAA6D;AAC7D,QAAA,MAAM,YAAY,8BAAyB,CAAC;AAE5C,kFAAkF;AAClF,QAAA,MAAM,WAAW,6HAAwB,CAAC;AAE1C,mDAAmD;AACnD,QAAA,MAAM,aAAa,GAAI,8BAIpB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,4CAMA,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,aAAa,GAAI,wEAOpB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAClE,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,4CAoCA,CAAC;AAEF,oGAAoG;AACpG,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKtC,CAAC;AAIF,qEAAqE;AACrE,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKtC,CAAC;AAIF,qEAAqE;AACrE,QAAA,MAAM,WAAW,GAAI,8BAIlB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CAC3D,4CASA,CAAC;AAEF,8CAA8C;AAC9C,QAAA,MAAM,iBAAiB,GAAI,8BAIxB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,GAAG;IACtE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;CACjE,4CAMA,CAAC;AAEF,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/drawer.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module Drawer\n *\n * Bottom sheet drawer for mobile-friendly interactions. Built on Vaul library.\n * Supports drag-to-dismiss, snap points, and background scaling.\n *\n * @see {@link https://ui.shadcn.com/docs/components/drawer Shadcn Drawer}\n * @see {@link https://vaul.emilkowal.ski/ Vaul Documentation}\n *\n * @example\n * // Basic drawer\n * <Drawer>\n * <DrawerTrigger asChild>\n * <Button>Open Drawer</Button>\n * </DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader>\n * <DrawerTitle>Settings</DrawerTitle>\n * <DrawerDescription>Adjust your preferences</DrawerDescription>\n * </DrawerHeader>\n * <div className=\"p-4\">Content here</div>\n * <DrawerFooter>\n * <DrawerClose asChild>\n * <Button variant=\"outline\">Close</Button>\n * </DrawerClose>\n * </DrawerFooter>\n * </DrawerContent>\n * </Drawer>\n *\n * @example\n * // Controlled drawer with custom handle\n * const [open, setOpen] = useState(false);\n *\n * <Drawer open={open} onOpenChange={setOpen}>\n * <DrawerContent handleColor=\"dark\">\n * <DrawerTitle>Menu</DrawerTitle>\n * </DrawerContent>\n * </Drawer>\n */\n\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../lib/utils\";\n\n/**\n * Root drawer component. Scales background by default.\n * @param shouldScaleBackground - Scale page content when drawer opens (default: true)\n */\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n);\n\nDrawer.displayName = \"Drawer\";\n\n/** Element that opens the drawer when clicked. Use `asChild` to wrap custom triggers. */\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/** Portal for rendering drawer outside the DOM hierarchy. */\nconst DrawerPortal = DrawerPrimitive.Portal;\n\n/** Closes the drawer when clicked. Use `asChild` to wrap custom close buttons. */\nconst DrawerClose = DrawerPrimitive.Close;\n\n/** Semi-transparent backdrop behind the drawer. */\nconst DrawerOverlay = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Overlay>>;\n}) => (\n <DrawerPrimitive.Overlay\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n ref={ref}\n {...props}\n />\n);\n\n/**\n * Main drawer content container. Slides up from bottom with drag handle.\n * @param handleColor - Handle bar color: `\"default\"`, `\"dark\"`, `\"light\"`, or `\"custom\"`\n * @param customHandleColor - Tailwind class for custom handle color (when handleColor=\"custom\")\n */\nconst DrawerContent = ({\n className,\n children,\n handleColor = \"default\",\n customHandleColor,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {\n handleColor?: \"default\" | \"dark\" | \"light\" | \"custom\";\n customHandleColor?: string;\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Content>>;\n}) => {\n const getHandleColorClass = () => {\n switch (handleColor) {\n case \"dark\":\n return \"bg-gray-300 dark:bg-gray-700\";\n case \"light\":\n return \"bg-gray-100 dark:bg-gray-900\";\n case \"custom\":\n return customHandleColor ?? \"bg-gray-200 dark:bg-gray-800\";\n case \"default\":\n default:\n return \"bg-gray-200 dark:bg-gray-800\";\n }\n };\n\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n className={cn(\n \"fixed inset-x-0 bottom-0 z-[9999] mt-16 flex h-auto flex-col rounded-t-[20px] border border-gray-200 bg-white px-6 pt-10 pb-12 dark:border-gray-800 dark:bg-gray-900\",\n className\n )}\n ref={ref}\n {...props}\n >\n <div\n className={cn(\n \"absolute top-2 right-0 left-0 mx-auto h-1 w-[100px] rounded-full\",\n getHandleColorClass()\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n};\n\n/** Header section for drawer title and description. Centered on mobile, left-aligned on desktop. */\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n);\n\nDrawerHeader.displayName = \"DrawerHeader\";\n\n/** Footer section for action buttons, pushed to bottom of drawer. */\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n);\n\nDrawerFooter.displayName = \"DrawerFooter\";\n\n/** Drawer title with semibold weight. Required for accessibility. */\nconst DrawerTitle = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Title>>;\n}) => (\n <DrawerPrimitive.Title\n className={cn(\n \"font-semibold text-lg leading-none tracking-tight\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Muted description text below the title. */\nconst DrawerDescription = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Description>>;\n}) => (\n <DrawerPrimitive.Description\n className={cn(\"text-gray-500 text-sm dark:text-gray-400\", className)}\n ref={ref}\n {...props}\n />\n);\n\nexport {\n Drawer,\n
|
|
4
|
+
"sourcesContent": ["/**\n * @module Drawer\n *\n * Bottom sheet drawer for mobile-friendly interactions. Built on Vaul library.\n * Supports drag-to-dismiss, snap points, and background scaling.\n *\n * @see {@link https://ui.shadcn.com/docs/components/drawer Shadcn Drawer}\n * @see {@link https://vaul.emilkowal.ski/ Vaul Documentation}\n *\n * @example\n * // Basic drawer\n * <Drawer>\n * <DrawerTrigger asChild>\n * <Button>Open Drawer</Button>\n * </DrawerTrigger>\n * <DrawerContent>\n * <DrawerHeader>\n * <DrawerTitle>Settings</DrawerTitle>\n * <DrawerDescription>Adjust your preferences</DrawerDescription>\n * </DrawerHeader>\n * <div className=\"p-4\">Content here</div>\n * <DrawerFooter>\n * <DrawerClose asChild>\n * <Button variant=\"outline\">Close</Button>\n * </DrawerClose>\n * </DrawerFooter>\n * </DrawerContent>\n * </Drawer>\n *\n * @example\n * // Controlled drawer with custom handle\n * const [open, setOpen] = useState(false);\n *\n * <Drawer open={open} onOpenChange={setOpen}>\n * <DrawerContent handleColor=\"dark\">\n * <DrawerTitle>Menu</DrawerTitle>\n * </DrawerContent>\n * </Drawer>\n */\n\nimport type * as React from \"react\";\nimport type { Ref } from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../lib/utils\";\n\n/**\n * Root drawer component. Scales background by default.\n * @param shouldScaleBackground - Scale page content when drawer opens (default: true)\n */\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n);\n\nDrawer.displayName = \"Drawer\";\n\n/** Element that opens the drawer when clicked. Use `asChild` to wrap custom triggers. */\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/** Portal for rendering drawer outside the DOM hierarchy. */\nconst DrawerPortal = DrawerPrimitive.Portal;\n\n/** Closes the drawer when clicked. Use `asChild` to wrap custom close buttons. */\nconst DrawerClose = DrawerPrimitive.Close;\n\n/** Semi-transparent backdrop behind the drawer. */\nconst DrawerOverlay = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Overlay>>;\n}) => (\n <DrawerPrimitive.Overlay\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n ref={ref}\n {...props}\n />\n);\n\n/**\n * Main drawer content container. Slides up from bottom with drag handle.\n * @param handleColor - Handle bar color: `\"default\"`, `\"dark\"`, `\"light\"`, or `\"custom\"`\n * @param customHandleColor - Tailwind class for custom handle color (when handleColor=\"custom\")\n */\nconst DrawerContent = ({\n className,\n children,\n handleColor = \"default\",\n customHandleColor,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {\n handleColor?: \"default\" | \"dark\" | \"light\" | \"custom\";\n customHandleColor?: string;\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Content>>;\n}) => {\n const getHandleColorClass = () => {\n switch (handleColor) {\n case \"dark\":\n return \"bg-gray-300 dark:bg-gray-700\";\n case \"light\":\n return \"bg-gray-100 dark:bg-gray-900\";\n case \"custom\":\n return customHandleColor ?? \"bg-gray-200 dark:bg-gray-800\";\n case \"default\":\n default:\n return \"bg-gray-200 dark:bg-gray-800\";\n }\n };\n\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n className={cn(\n \"fixed inset-x-0 bottom-0 z-[9999] mt-16 flex h-auto flex-col rounded-t-[20px] border border-gray-200 bg-white px-6 pt-10 pb-12 dark:border-gray-800 dark:bg-gray-900\",\n className\n )}\n ref={ref}\n {...props}\n >\n <div\n className={cn(\n \"absolute top-2 right-0 left-0 mx-auto h-1 w-[100px] rounded-full\",\n getHandleColorClass()\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n};\n\n/** Header section for drawer title and description. Centered on mobile, left-aligned on desktop. */\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n);\n\nDrawerHeader.displayName = \"DrawerHeader\";\n\n/** Footer section for action buttons, pushed to bottom of drawer. */\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n);\n\nDrawerFooter.displayName = \"DrawerFooter\";\n\n/** Drawer title with semibold weight. Required for accessibility. */\nconst DrawerTitle = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Title>>;\n}) => (\n <DrawerPrimitive.Title\n className={cn(\n \"font-semibold text-lg leading-none tracking-tight\",\n className\n )}\n ref={ref}\n {...props}\n />\n);\n\n/** Muted description text below the title. */\nconst DrawerDescription = ({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> & {\n ref?: Ref<React.ElementRef<typeof DrawerPrimitive.Description>>;\n}) => (\n <DrawerPrimitive.Description\n className={cn(\"text-gray-500 text-sm dark:text-gray-400\", className)}\n ref={ref}\n {...props}\n />\n);\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n};\n"],
|
|
5
5
|
"mappings": "AAsDE,cAkEI,YAlEJ;AAZF,SAAS,UAAU,uBAAuB;AAE1C,SAAS,UAAU;AAMnB,MAAM,SAAS,CAAC;AAAA,EACd,wBAAwB;AAAA,EACxB,GAAG;AACL,MACE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACC,GAAG;AAAA;AACN;AAGF,OAAO,cAAc;AAGrB,MAAM,gBAAgB,gBAAgB;AAGtC,MAAM,eAAe,gBAAgB;AAGrC,MAAM,cAAc,gBAAgB;AAGpC,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAGE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC,WAAW,GAAG,kCAAkC,SAAS;AAAA,IACzD;AAAA,IACC,GAAG;AAAA;AACN;AAQF,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAIM;AACJ,QAAM,sBAAsB,MAAM;AAChC,YAAQ,aAAa;AAAA,MACnB,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO,qBAAqB;AAAA,MAC9B,KAAK;AAAA,MACL;AACE,eAAO;AAAA,IACX;AAAA,EACF;AAEA,SACE,qBAAC,gBACC;AAAA,wBAAC,iBAAc;AAAA,IACf;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEJ;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,oBAAoB;AAAA,cACtB;AAAA;AAAA,UACF;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAGA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,6CAA6C,SAAS;AAAA,IACnE,GAAG;AAAA;AACN;AAGF,aAAa,cAAc;AAG3B,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,mCAAmC,SAAS;AAAA,IACzD,GAAG;AAAA;AACN;AAGF,aAAa,cAAc;AAG3B,MAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAGE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA;AACN;AAIF,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAGE;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC,WAAW,GAAG,4CAA4C,SAAS;AAAA,IACnE;AAAA,IACC,GAAG;AAAA;AACN;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cadence UI Components
|
|
3
|
+
*
|
|
4
|
+
* Import components from this module:
|
|
5
|
+
* @example
|
|
6
|
+
* import { Button, Input } from '@music-vine/cadence/ui';
|
|
7
|
+
*/
|
|
8
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, } from "./accordion";
|
|
9
|
+
export { Badge, type BadgeProps, badgeVariants } from "./badge";
|
|
10
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "./breadcrumb";
|
|
11
|
+
export { Button, type ButtonFontSize, type ButtonProps, type ButtonSize, buttonVariants, Loading, loadingVariants, type ResponsiveButtonFontSize, type ResponsiveButtonSize, } from "./button";
|
|
12
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card";
|
|
13
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, } from "./carousel";
|
|
14
|
+
export { CarouselDots } from "./carousel-dots";
|
|
15
|
+
export { Checkbox, DummyCheckbox } from "./checkbox";
|
|
16
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from "./context-menu";
|
|
17
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./dialog";
|
|
18
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, } from "./drawer";
|
|
19
|
+
export { ClearInputButton, Input, type InputProps, inputVariants, } from "./input";
|
|
20
|
+
export { Label } from "./label";
|
|
21
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from "./popover";
|
|
22
|
+
export { PriceTag, type PriceTagProps } from "./price-tag";
|
|
23
|
+
export { RadioGroup, RadioGroupItem } from "./radio-group";
|
|
24
|
+
export { FadeAway, ScrollArea, ScrollBar } from "./scroll-area";
|
|
25
|
+
export { ScrollDrum, ScrollDrumColumn, type ScrollDrumColumnProps, ScrollDrumGroup, type ScrollDrumGroupProps, type ScrollDrumProps, } from "./scroll-drum";
|
|
26
|
+
export { Select, SelectContent, SelectContentPopper, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./select";
|
|
27
|
+
export { Separator } from "./separator";
|
|
28
|
+
export { Skeleton, SkeletonFragment } from "./skeleton";
|
|
29
|
+
export { Slider, type SliderProps, sliderVariants } from "./slider";
|
|
30
|
+
export { StackingCard, StackingCardCheck, StackingCardContent, StackingCardDescription, StackingCardGroup, StackingCardHeader, StackingCardList, StackingCardListItem, StackingCardTitle, } from "./stacking-card";
|
|
31
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
|
|
32
|
+
export { Textarea, type TextareaProps, textareaVariants } from "./textarea";
|
|
33
|
+
export { type GlobalToastOptions, Toaster, type ToasterProps, toast, } from "./toast";
|
|
34
|
+
export { ToggleButton, type ToggleButtonProps } from "./toggle-button";
|
|
35
|
+
export { Alpha, Bravo, Charlie, Delta, Echo, Foxtrot, Heading, type HeadingProps, headingVariants, List, ListItem, type ListItemProps, ListItemTick, type ListProps, listVariants, Prose, Text, type TextProps, textVariants, } from "./typography";
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,G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