@konopskidev/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +182 -2
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +101 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +14 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment.js +102 -0
- package/dist/components/ui/attachment.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +51 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +29 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +72 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble.js +73 -0
- package/dist/components/ui/bubble.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +40 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +22 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +61 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +111 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +26 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +76 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +132 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +21 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/code-block.d.ts +27 -0
- package/dist/components/ui/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block.js +123 -0
- package/dist/components/ui/code-block.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +174 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +90 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +125 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +98 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +12 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +16 -0
- package/dist/components/ui/direction.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +78 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +130 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +60 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +112 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +32 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +79 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +11 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +25 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +121 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +20 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/marker.js +41 -0
- package/dist/components/ui/marker.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/message-scroller.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +61 -0
- package/dist/components/ui/message-scroller.js.map +1 -0
- package/dist/components/ui/message.d.ts +11 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/message.js +50 -0
- package/dist/components/ui/message.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +9 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +39 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +81 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +81 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +23 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/questionnaire.d.ts +20 -0
- package/dist/components/ui/questionnaire.d.ts.map +1 -0
- package/dist/components/ui/questionnaire.js +172 -0
- package/dist/components/ui/questionnaire.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +27 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +102 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +380 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +13 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +8 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +40 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +14 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +35 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +22 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +67 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +48 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +37 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +11 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +53 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +37 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +38 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/trace.d.ts +19 -0
- package/dist/components/ui/trace.d.ts.map +1 -0
- package/dist/components/ui/trace.js +76 -0
- package/dist/components/ui/trace.js.map +1 -0
- package/dist/hooks/use-highlighted-code.d.ts +3 -0
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +22 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +67 -0
- package/dist/lib/get-placeholder.d.ts +6 -0
- package/dist/lib/get-placeholder.d.ts.map +1 -0
- package/dist/lib/get-placeholder.js +12 -0
- package/dist/lib/get-placeholder.js.map +1 -0
- package/dist/lib/highlighter.d.ts +10 -0
- package/dist/lib/highlighter.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +1 -0
- package/package.json +150 -4
- package/src/styles/base.css +70 -0
- package/src/styles/globals.css +33 -0
- package/src/styles/prose.css +105 -0
- package/src/styles/theme.css +108 -0
- package/src/styles/tokens.css +129 -0
- package/src/styles/utilities.css +57 -0
- package/src/styles/variants.css +649 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/ui/kbd.tsx
|
|
4
|
+
function Kbd({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
6
|
+
"data-slot": "kbd",
|
|
7
|
+
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function KbdGroup({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
13
|
+
"data-slot": "kbd-group",
|
|
14
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export { Kbd, KbdGroup };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../../../src/components/ui/kbd.tsx"],"sourcesContent":["import { cn } from 'cn';\n\nfunction Kbd({ className, ...props }: React.ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn('inline-flex items-center gap-1', className)}\n {...props}\n />\n );\n}\n\nexport { Kbd, KbdGroup };\n"],"mappings":";;;AAEA,SAAS,IAAI,EAAE,WAAW,GAAG,SAAsC;CACjE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,yWACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kCAAkC,SAAS;EACzD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAWvF;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { Label } from "radix-ui";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/ui/label.tsx
|
|
6
|
+
function Label$1({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Label.Root, {
|
|
8
|
+
"data-slot": "label",
|
|
9
|
+
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),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export { Label$1 as Label };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","names":["Label","LabelPrimitive"],"sources":["../../../src/components/ui/label.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { Label as LabelPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n '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',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;AAIA,SAASA,QAAM,EAAE,WAAW,GAAG,SAA2D;CACxF,OACE,oBAACC,MAAe,MAAhB;EACE,aAAU;EACV,WAAW,GACT,uNACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const markerVariants: (props?: ({
|
|
4
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Marker({ className, variant, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof markerVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
10
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|
|
12
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/marker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,cAAc;;8EAYnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAC5B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,qBAWF;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBASxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3E;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { Slot } from "radix-ui";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
// src/components/ui/marker.tsx
|
|
7
|
+
var markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
|
|
8
|
+
default: "",
|
|
9
|
+
separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
10
|
+
border: "border-b border-border pb-2"
|
|
11
|
+
} } });
|
|
12
|
+
function Marker({ className, variant = "default", asChild = false, ...props }) {
|
|
13
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
14
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
15
|
+
"data-slot": "marker",
|
|
16
|
+
"data-variant": variant,
|
|
17
|
+
className: cn(markerVariants({
|
|
18
|
+
variant,
|
|
19
|
+
className
|
|
20
|
+
})),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function MarkerIcon({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("span", {
|
|
26
|
+
"data-slot": "marker-icon",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function MarkerContent({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("span", {
|
|
34
|
+
"data-slot": "marker-content",
|
|
35
|
+
className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.js","names":[],"sources":["../../../src/components/ui/marker.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from 'cn';\nimport { Slot } from 'radix-ui';\nimport * as React from 'react';\n\nconst markerVariants = cva(\n \"group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground\",\n {\n variants: {\n variant: {\n default: '',\n separator:\n 'before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border',\n border: 'border-b border-border pb-2',\n },\n },\n },\n);\n\nfunction Marker({\n className,\n variant = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> &\n VariantProps<typeof markerVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot.Root : 'div';\n\n return (\n <Comp\n data-slot=\"marker\"\n data-variant={variant}\n className={cn(markerVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\nfunction MarkerIcon({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"marker-icon\"\n aria-hidden=\"true\"\n className={cn(\"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n />\n );\n}\n\nfunction MarkerContent({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"marker-content\"\n className={cn(\n 'min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Marker, MarkerIcon, MarkerContent, markerVariants };\n"],"mappings":";;;;;;AAKA,IAAM,iBAAiB,IACrB,4MACA,EACE,UAAU,EACR,SAAS;CACP,SAAS;CACT,WACE;CACF,QAAQ;AACV,EACF,EACF,CACF;AAEA,SAAS,OAAO,EACd,WACA,UAAU,WACV,UAAU,OACV,GAAG,SAIA;CACH,MAAM,OAAO,UAAU,KAAK,OAAO;CAEnC,OACE,oBAAC,MAAD;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAS;EAAU,CAAC,CAAC;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAuC;CACzE,OACE,oBAAC,QAAD;EACE,aAAU;EACV,eAAY;EACZ,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAuC;CAC5E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GACT,kMACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Menubar as MenubarPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
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> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: 'default' | 'destructive';
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
declare function MenubarRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
|
|
24
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
25
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
|
26
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
|
|
30
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
31
|
+
//# sourceMappingURL=menubar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAQ3F;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAEpF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAEtF;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,qBAExF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,qBAEhG;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAWvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAe,EACf,WAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAgBvD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,qBAaA;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,YAAY,CAAC,GAAG;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBAoBA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBAmBA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,qBASA;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,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW7E;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,qBAElF;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,CAAC;CACjB,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,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
+
import { Menubar } from "radix-ui";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
// src/components/ui/menubar.tsx
|
|
9
|
+
function Menubar$1({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Menubar.Root, {
|
|
11
|
+
"data-slot": "menubar",
|
|
12
|
+
className: cn("flex h-8 items-center gap-0.5 rounded-sm border p-[3px]", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function MenubarMenu({ ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Menubar.Menu, {
|
|
18
|
+
"data-slot": "menubar-menu",
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function MenubarGroup({ ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Menubar.Group, {
|
|
24
|
+
"data-slot": "menubar-group",
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function MenubarPortal({ ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Menubar.Portal, {
|
|
30
|
+
"data-slot": "menubar-portal",
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function MenubarRadioGroup({ ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(Menubar.RadioGroup, {
|
|
36
|
+
"data-slot": "menubar-radio-group",
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function MenubarTrigger({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Menubar.Trigger, {
|
|
42
|
+
"data-slot": "menubar-trigger",
|
|
43
|
+
className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(Menubar.Content, {
|
|
49
|
+
"data-slot": "menubar-content",
|
|
50
|
+
align,
|
|
51
|
+
alignOffset,
|
|
52
|
+
sideOffset,
|
|
53
|
+
className: cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border border-border bg-popover p-1 text-popover-foreground 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", className),
|
|
54
|
+
...props
|
|
55
|
+
}) });
|
|
56
|
+
}
|
|
57
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx(Menubar.Item, {
|
|
59
|
+
"data-slot": "menubar-item",
|
|
60
|
+
"data-inset": inset,
|
|
61
|
+
"data-variant": variant,
|
|
62
|
+
className: cn("group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-sm 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 dark:data-[variant=destructive]:focus:bg-destructive/20 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),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsxs(Menubar.CheckboxItem, {
|
|
68
|
+
"data-slot": "menubar-checkbox-item",
|
|
69
|
+
"data-inset": inset,
|
|
70
|
+
className: cn("relative flex cursor-default items-center gap-1.5 rounded-sm py-1 pr-1.5 pl-7 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 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
71
|
+
checked,
|
|
72
|
+
...props,
|
|
73
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
75
|
+
children: /* @__PURE__ */ jsx(Menubar.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
76
|
+
}), children]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function MenubarRadioItem({ className, children, inset, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsxs(Menubar.RadioItem, {
|
|
81
|
+
"data-slot": "menubar-radio-item",
|
|
82
|
+
"data-inset": inset,
|
|
83
|
+
className: cn("relative flex cursor-default items-center gap-1.5 rounded-sm py-1 pr-1.5 pl-7 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),
|
|
84
|
+
...props,
|
|
85
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
87
|
+
children: /* @__PURE__ */ jsx(Menubar.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
88
|
+
}), children]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx(Menubar.Label, {
|
|
93
|
+
"data-slot": "menubar-label",
|
|
94
|
+
"data-inset": inset,
|
|
95
|
+
className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function MenubarSeparator({ className, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsx(Menubar.Separator, {
|
|
101
|
+
"data-slot": "menubar-separator",
|
|
102
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function MenubarShortcut({ className, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsx("span", {
|
|
108
|
+
"data-slot": "menubar-shortcut",
|
|
109
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function MenubarSub({ ...props }) {
|
|
114
|
+
return /* @__PURE__ */ jsx(Menubar.Sub, {
|
|
115
|
+
"data-slot": "menubar-sub",
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsxs(Menubar.SubTrigger, {
|
|
121
|
+
"data-slot": "menubar-sub-trigger",
|
|
122
|
+
"data-inset": inset,
|
|
123
|
+
className: cn("flex cursor-default items-center gap-1.5 rounded-sm px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
|
|
124
|
+
...props,
|
|
125
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function MenubarSubContent({ className, ...props }) {
|
|
129
|
+
return /* @__PURE__ */ jsx(Menubar.SubContent, {
|
|
130
|
+
"data-slot": "menubar-sub-content",
|
|
131
|
+
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border border-border bg-popover p-1 text-popover-foreground shadow-lg 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),
|
|
132
|
+
...props
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
export { Menubar$1 as Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=menubar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.js","names":["Menubar","MenubarPrimitive"],"sources":["../../../src/components/ui/menubar.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { Menubar as MenubarPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n return (\n <MenubarPrimitive.Root\n data-slot=\"menubar\"\n className={cn('flex h-8 items-center gap-0.5 rounded-sm border p-[3px]', className)}\n {...props}\n />\n );\n}\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />;\n}\n\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n return (\n <MenubarPrimitive.Trigger\n data-slot=\"menubar-trigger\"\n className={cn(\n 'flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MenubarContent({\n className,\n align = 'start',\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n return (\n <MenubarPortal>\n <MenubarPrimitive.Content\n data-slot=\"menubar-content\"\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border border-border bg-popover p-1 text-popover-foreground 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',\n className,\n )}\n {...props}\n />\n </MenubarPortal>\n );\n}\n\nfunction MenubarItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <MenubarPrimitive.Item\n data-slot=\"menubar-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-sm 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 dark:data-[variant=destructive]:focus:bg-destructive/20 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!\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.CheckboxItem\n data-slot=\"menubar-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'relative flex cursor-default items-center gap-1.5 rounded-sm py-1 pr-1.5 pl-7 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 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n );\n}\n\nfunction MenubarRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.RadioItem\n data-slot=\"menubar-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-sm py-1 pr-1.5 pl-7 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\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n );\n}\n\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.Label\n data-slot=\"menubar-label\"\n data-inset={inset}\n className={cn('px-1.5 py-1 text-sm font-medium data-inset:pl-7', className)}\n {...props}\n />\n );\n}\n\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n return (\n <MenubarPrimitive.Separator\n data-slot=\"menubar-separator\"\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction MenubarShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"menubar-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nfunction MenubarSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.SubTrigger\n data-slot=\"menubar-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-sm px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n );\n}\n\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n return (\n <MenubarPrimitive.SubContent\n data-slot=\"menubar-sub-content\"\n className={cn(\n 'z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border border-border bg-popover p-1 text-popover-foreground shadow-lg 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',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Button } from './button.js';
|
|
4
|
+
declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>): React.JSX.Element;
|
|
5
|
+
declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>): React.JSX.Element;
|
|
6
|
+
declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>): React.JSX.Element;
|
|
7
|
+
declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>): React.JSX.Element;
|
|
8
|
+
declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>): React.JSX.Element;
|
|
9
|
+
declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React.ComponentProps<typeof MessageScrollerPrimitive.Button> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): React.JSX.Element;
|
|
10
|
+
export { MessageScrollerProvider, MessageScroller, MessageScrollerViewport, MessageScrollerContent, MessageScrollerItem, MessageScrollerButton, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };
|
|
11
|
+
//# sourceMappingURL=message-scroller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-scroller.d.ts","sourceRoot":"","sources":["../../../src/components/ui/message-scroller.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,IAAI,wBAAwB,EAC3C,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,iBAAS,uBAAuB,CAC9B,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,qBAGtE;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,qBAW5D;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,qBAWhE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,OAAO,CAAC,qBAQ/D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,YAAoB,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,IAAI,CAAC,qBAY5D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAiB,EACjB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAqB,EACrB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,wBAAwB,CAAC,MAAM,CAAC,GAC7D,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,qBAyB9D;AAED,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,GAC7B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { ArrowDownIcon } from "lucide-react";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { MessageScroller, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
7
|
+
// src/components/ui/message-scroller.tsx
|
|
8
|
+
function MessageScrollerProvider(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(MessageScroller.Provider, { ...props });
|
|
10
|
+
}
|
|
11
|
+
function MessageScroller$1({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(MessageScroller.Root, {
|
|
13
|
+
"data-slot": "message-scroller",
|
|
14
|
+
className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function MessageScrollerViewport({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(MessageScroller.Viewport, {
|
|
20
|
+
"data-slot": "message-scroller-viewport",
|
|
21
|
+
className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function MessageScrollerContent({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(MessageScroller.Content, {
|
|
27
|
+
"data-slot": "message-scroller-content",
|
|
28
|
+
className: cn("flex h-max min-h-full flex-col gap-6", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(MessageScroller.Item, {
|
|
34
|
+
"data-slot": "message-scroller-item",
|
|
35
|
+
scrollAnchor,
|
|
36
|
+
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(MessageScroller.Button, {
|
|
42
|
+
"data-slot": "message-scroller-button",
|
|
43
|
+
"data-direction": direction,
|
|
44
|
+
"data-variant": variant,
|
|
45
|
+
"data-size": size,
|
|
46
|
+
direction,
|
|
47
|
+
className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
|
|
48
|
+
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
49
|
+
variant,
|
|
50
|
+
size
|
|
51
|
+
}),
|
|
52
|
+
...props,
|
|
53
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ArrowDownIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "sr-only",
|
|
55
|
+
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
56
|
+
})] })
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export { MessageScroller$1 as MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=message-scroller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-scroller.js","names":["MessageScrollerPrimitive","MessageScroller","_Fragment"],"sources":["../../../src/components/ui/message-scroller.tsx"],"sourcesContent":["import {\n MessageScroller as MessageScrollerPrimitive,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n} from '@shadcn/react/message-scroller';\nimport { cn } from 'cn';\nimport { ArrowDownIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from './button';\n\nfunction MessageScrollerProvider(\n props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,\n) {\n return <MessageScrollerPrimitive.Provider {...props} />;\n}\n\nfunction MessageScroller({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {\n return (\n <MessageScrollerPrimitive.Root\n data-slot=\"message-scroller\"\n className={cn(\n 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageScrollerViewport({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {\n return (\n <MessageScrollerPrimitive.Viewport\n data-slot=\"message-scroller-viewport\"\n className={cn(\n 'size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageScrollerContent({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {\n return (\n <MessageScrollerPrimitive.Content\n data-slot=\"message-scroller-content\"\n className={cn('flex h-max min-h-full flex-col gap-6', className)}\n {...props}\n />\n );\n}\n\nfunction MessageScrollerItem({\n className,\n scrollAnchor = false,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Item>) {\n return (\n <MessageScrollerPrimitive.Item\n data-slot=\"message-scroller-item\"\n scrollAnchor={scrollAnchor}\n className={cn(\n 'min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageScrollerButton({\n direction = 'end',\n className,\n children,\n render,\n variant = 'secondary',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n return (\n <MessageScrollerPrimitive.Button\n data-slot=\"message-scroller-button\"\n data-direction={direction}\n data-variant={variant}\n data-size={size}\n direction={direction}\n className={cn(\n 'absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180',\n className,\n )}\n render={render ?? <Button variant={variant} size={size} />}\n {...props}\n >\n {children ?? (\n <>\n <ArrowDownIcon />\n <span className=\"sr-only\">\n {direction === 'end' ? 'Scroll to end' : 'Scroll to start'}\n </span>\n </>\n )}\n </MessageScrollerPrimitive.Button>\n );\n}\n\nexport {\n MessageScrollerProvider,\n MessageScroller,\n MessageScrollerViewport,\n MessageScrollerContent,\n MessageScrollerItem,\n MessageScrollerButton,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n};\n"],"mappings":";;;;;;;AAYA,SAAS,wBACP,OACA;CACA,OAAO,oBAACA,gBAAyB,UAA1B,EAAmC,GAAI,MAAQ,CAAA;AACxD;AAEA,SAASC,kBAAgB,EACvB,WACA,GAAG,SAC0D;CAC7D,OACE,oBAACD,gBAAyB,MAA1B;EACE,aAAU;EACV,WAAW,GACT,mFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,wBAAwB,EAC/B,WACA,GAAG,SAC8D;CACjE,OACE,oBAACA,gBAAyB,UAA1B;EACE,aAAU;EACV,WAAW,GACT,iQACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,gBAAyB,SAA1B;EACE,aAAU;EACV,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,oBAAoB,EAC3B,WACA,eAAe,OACf,GAAG,SAC0D;CAC7D,OACE,oBAACA,gBAAyB,MAA1B;EACE,aAAU;EACI;EACd,WAAW,GACT,kFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,sBAAsB,EAC7B,YAAY,OACZ,WACA,UACA,QACA,UAAU,aACV,OAAO,WACP,GAAG,SAE4D;CAC/D,OACE,oBAACA,gBAAyB,QAA1B;EACE,aAAU;EACV,kBAAgB;EAChB,gBAAc;EACd,aAAW;EACA;EACX,WAAW,GACT,yuBACA,SACF;EACA,QAAQ,UAAU,oBAAC,QAAD;GAAiB;GAAe;EAAO,CAAA;EACzD,GAAI;EAEH,UAAA,YACC,qBAAAE,UAAA,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,cAAc,QAAQ,kBAAkB;EACrC,CAAA,CACN,EAAA,CAAA;CAE2B,CAAA;AAErC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function MessageGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
3
|
+
declare function Message({ className, align, ...props }: React.ComponentProps<'div'> & {
|
|
4
|
+
align?: 'start' | 'end';
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function MessageAvatar({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
7
|
+
declare function MessageContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
8
|
+
declare function MessageHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
9
|
+
declare function MessageFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
10
|
+
export { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader };
|
|
11
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/components/ui/message.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQzE;AAED,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,KAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CAAE,qBAY3D;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW3E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/ui/message.tsx
|
|
5
|
+
function MessageGroup({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "message-group",
|
|
8
|
+
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function Message({ className, align = "start", ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-slot": "message",
|
|
15
|
+
"data-align": align,
|
|
16
|
+
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function MessageAvatar({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
"data-slot": "message-avatar",
|
|
23
|
+
className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function MessageContent({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
"data-slot": "message-content",
|
|
30
|
+
className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function MessageHeader({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"data-slot": "message-header",
|
|
37
|
+
className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function MessageFooter({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
"data-slot": "message-footer",
|
|
44
|
+
className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","names":[],"sources":["../../../src/components/ui/message.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport * as React from 'react';\n\nfunction MessageGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-group\"\n className={cn('flex min-w-0 flex-col gap-2', className)}\n {...props}\n />\n );\n}\n\nfunction Message({\n className,\n align = 'start',\n ...props\n}: React.ComponentProps<'div'> & { align?: 'start' | 'end' }) {\n return (\n <div\n data-slot=\"message\"\n data-align={align}\n className={cn(\n 'group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageAvatar({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-avatar\"\n className={cn(\n 'flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-content\"\n className={cn(\n 'flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-header\"\n className={cn(\n 'flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction MessageFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-footer\"\n className={cn(\n 'flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader };\n"],"mappings":";;;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,QAAQ,EACf,WACA,QAAQ,SACR,GAAG,SACyD;CAC5D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GACT,8FACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sKACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,4GACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,mIACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,8KACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
|
|
3
|
+
size?: 'sm' | 'default';
|
|
4
|
+
};
|
|
5
|
+
declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
6
|
+
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<'option'>): React.JSX.Element;
|
|
7
|
+
declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<'optgroup'>): React.JSX.Element;
|
|
8
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
9
|
+
//# sourceMappingURL=native-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/native-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAuBjF;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAQlF;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAQtF;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/ui/native-select.tsx
|
|
6
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
|
|
9
|
+
"data-slot": "native-select-wrapper",
|
|
10
|
+
"data-size": size,
|
|
11
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
12
|
+
"data-slot": "native-select",
|
|
13
|
+
"data-size": size,
|
|
14
|
+
className: "h-8 w-full min-w-0 appearance-none rounded-sm border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm focus-ring transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-sm data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
15
|
+
...props
|
|
16
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
17
|
+
className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
"data-slot": "native-select-icon"
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function NativeSelectOption({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("option", {
|
|
25
|
+
"data-slot": "native-select-option",
|
|
26
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("optgroup", {
|
|
32
|
+
"data-slot": "native-select-optgroup",
|
|
33
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=native-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-select.js","names":[],"sources":["../../../src/components/ui/native-select.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { ChevronDownIcon } from 'lucide-react';\nimport * as React from 'react';\n\ntype NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default';\n};\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn(\n 'group/native-select relative w-fit has-[select:disabled]:opacity-50',\n className,\n )}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className=\"h-8 w-full min-w-0 appearance-none rounded-sm border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm focus-ring transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-sm data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\"\n {...props}\n />\n <ChevronDownIcon\n className=\"pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n );\n}\n\nfunction NativeSelectOption({ className, ...props }: React.ComponentProps<'option'>) {\n return (\n <option\n data-slot=\"native-select-option\"\n className={cn('bg-[Canvas] text-[CanvasText]', className)}\n {...props}\n />\n );\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: React.ComponentProps<'optgroup'>) {\n return (\n <optgroup\n data-slot=\"native-select-optgroup\"\n className={cn('bg-[Canvas] text-[CanvasText]', className)}\n {...props}\n />\n );\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption };\n"],"mappings":";;;;;AAQA,SAAS,aAAa,EAAE,WAAW,OAAO,WAAW,GAAG,SAA4B;CAClF,OACE,qBAAC,OAAD;EACE,WAAW,GACT,uEACA,SACF;EACA,aAAU;EACV,aAAW;EANb,UAAA,CAQE,oBAAC,UAAD;GACE,aAAU;GACV,aAAW;GACX,WAAU;GACV,GAAI;EACL,CAAA,GACD,oBAAC,iBAAD;GACE,WAAU;GACV,eAAY;GACZ,aAAU;EACX,CAAA,CACE;;AAET;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAyC;CACnF,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAA2C;CACvF,OACE,oBAAC,YAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
4
|
+
viewport?: boolean;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): React.JSX.Element;
|
|
7
|
+
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): React.JSX.Element;
|
|
8
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): React.JSX.Element;
|
|
10
|
+
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): React.JSX.Element;
|
|
11
|
+
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): React.JSX.Element;
|
|
12
|
+
declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): React.JSX.Element;
|
|
13
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): React.JSX.Element;
|
|
14
|
+
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
|
|
15
|
+
//# sourceMappingURL=navigation-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/navigation-menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,QAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,GAAG;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,qBAeA;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,qBAQ3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,qBAQ3D;AAED,QAAA,MAAM,0BAA0B,oFAE/B,CAAC;AAEF,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,OAAO,CAAC,qBAe9D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,OAAO,CAAC,qBAW9D;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,qBAa/D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,qBAW3D;AAED,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,SAAS,CAAC,qBAahE;AAED,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,GAC3B,CAAC"}
|