orbital-ds 0.1.1 → 0.2.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/contract.json +38 -0
- package/dist/styles.css +89 -9
- package/dist/themes/zyro.css +189 -0
- package/dist/ui/accordion.d.ts +9 -0
- package/dist/ui/accordion.js +79 -0
- package/dist/ui/alert-dialog.d.ts +23 -0
- package/dist/ui/alert-dialog.js +173 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/alert.js +77 -0
- package/dist/ui/aspect-ratio.d.ts +7 -0
- package/dist/ui/aspect-ratio.js +22 -0
- package/dist/ui/attachment.d.ts +26 -0
- package/dist/ui/attachment.js +197 -0
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/bubble.d.ts +19 -0
- package/dist/ui/bubble.js +115 -0
- package/dist/ui/button-group.d.ts +15 -0
- package/dist/ui/button-group.js +82 -0
- package/dist/ui/button.d.ts +5 -3
- package/dist/ui/button.js +9 -6
- package/dist/ui/calendar.d.ts +15 -0
- package/dist/ui/calendar.js +190 -0
- package/dist/ui/card.js +4 -4
- package/dist/ui/carousel.d.ts +33 -0
- package/dist/ui/carousel.js +199 -0
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/combobox.d.ts +26 -0
- package/dist/ui/combobox.js +281 -0
- package/dist/ui/command.d.ts +22 -0
- package/dist/ui/command.js +183 -0
- package/dist/ui/context-menu.d.ts +31 -0
- package/dist/ui/context-menu.js +242 -0
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/direction.d.ts +1 -0
- package/dist/ui/direction.js +8 -0
- package/dist/ui/drawer.d.ts +18 -0
- package/dist/ui/drawer.js +208 -0
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.js +13 -9
- package/dist/ui/empty.d.ts +15 -0
- package/dist/ui/empty.js +102 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/field.js +217 -0
- package/dist/ui/hover-card.d.ts +8 -0
- package/dist/ui/hover-card.js +45 -0
- package/dist/ui/input-group.d.ts +22 -0
- package/dist/ui/input-group.js +145 -0
- package/dist/ui/input-otp.d.ts +13 -0
- package/dist/ui/input-otp.js +82 -0
- package/dist/ui/input.js +1 -1
- package/dist/ui/item.d.ts +26 -0
- package/dist/ui/item.js +195 -0
- package/dist/ui/kbd.d.ts +6 -0
- package/dist/ui/kbd.js +29 -0
- package/dist/ui/marker.d.ts +13 -0
- package/dist/ui/marker.js +71 -0
- package/dist/ui/menubar.d.ts +31 -0
- package/dist/ui/menubar.js +259 -0
- package/dist/ui/message-scroller.d.ts +16 -0
- package/dist/ui/message-scroller.js +120 -0
- package/dist/ui/message.d.ts +12 -0
- package/dist/ui/message.js +90 -0
- package/dist/ui/native-select.d.ts +10 -0
- package/dist/ui/native-select.js +63 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/navigation-menu.js +162 -0
- package/dist/ui/pagination.d.ts +22 -0
- package/dist/ui/pagination.js +128 -0
- package/dist/ui/popover.js +2 -2
- package/dist/ui/questionnaire.d.ts +24 -0
- package/dist/ui/questionnaire.js +331 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +39 -0
- package/dist/ui/resizable.d.ts +10 -0
- package/dist/ui/resizable.js +46 -0
- package/dist/ui/scroll-area.js +1 -1
- package/dist/ui/select.js +5 -5
- package/dist/ui/sheet.js +4 -4
- package/dist/ui/sidebar.js +4 -4
- package/dist/ui/slider.d.ts +6 -0
- package/dist/ui/slider.js +53 -0
- package/dist/ui/spinner.d.ts +5 -0
- package/dist/ui/spinner.js +9 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/switch.js +32 -0
- package/dist/ui/table.js +2 -2
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toast.d.ts +19 -0
- package/dist/ui/toast.js +193 -0
- package/dist/ui/toggle-group.d.ts +14 -0
- package/dist/ui/toggle-group.js +77 -0
- package/dist/ui/toggle.d.ts +12 -0
- package/dist/ui/toggle.js +43 -0
- package/dist/ui/tooltip.js +3 -3
- package/docs/CONTRACT.md +113 -0
- package/package.json +133 -95
- package/scripts/doctor.mjs +142 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Separator } from './separator.js';
|
|
6
|
+
import '@base-ui/react/separator';
|
|
7
|
+
|
|
8
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
10
|
+
declare const itemVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
12
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
declare const itemMediaVariants: (props?: ({
|
|
16
|
+
variant?: "default" | "image" | "icon" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
19
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
20
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
21
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
22
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
23
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
24
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
package/dist/ui/item.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import { Separator } from "./separator";
|
|
7
|
+
function ItemGroup({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
role: "list",
|
|
12
|
+
"data-slot": "item-group",
|
|
13
|
+
className: cn(
|
|
14
|
+
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function ItemSeparator({
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
Separator,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "item-separator",
|
|
29
|
+
orientation: "horizontal",
|
|
30
|
+
className: cn("my-2", className),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
const itemVariants = cva(
|
|
36
|
+
"group/item flex w-full flex-wrap items-center rounded-2xl border text-sm transition-colors duration-(--ds-motion-fast) outline-none focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
default: "border-transparent",
|
|
41
|
+
outline: "border-border",
|
|
42
|
+
muted: "border-transparent bg-muted/50"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
46
|
+
sm: "gap-3.5 px-3.5 py-3",
|
|
47
|
+
xs: "gap-2.5 px-3 py-2.5 in-data-[slot=dropdown-menu-content]:p-0"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
function Item({
|
|
57
|
+
className,
|
|
58
|
+
variant = "default",
|
|
59
|
+
size = "default",
|
|
60
|
+
render,
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
return useRender({
|
|
64
|
+
defaultTagName: "div",
|
|
65
|
+
props: mergeProps(
|
|
66
|
+
{
|
|
67
|
+
className: cn(itemVariants({ variant, size, className }))
|
|
68
|
+
},
|
|
69
|
+
props
|
|
70
|
+
),
|
|
71
|
+
render,
|
|
72
|
+
state: {
|
|
73
|
+
slot: "item",
|
|
74
|
+
variant,
|
|
75
|
+
size
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const itemMediaVariants = cva(
|
|
80
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
81
|
+
{
|
|
82
|
+
variants: {
|
|
83
|
+
variant: {
|
|
84
|
+
default: "bg-transparent",
|
|
85
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
86
|
+
image: "size-10 overflow-hidden rounded-lg group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 group-data-[size=xs]/item:rounded-md [&_img]:size-full [&_img]:object-cover"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
variant: "default"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
function ItemMedia({
|
|
95
|
+
className,
|
|
96
|
+
variant = "default",
|
|
97
|
+
...props
|
|
98
|
+
}) {
|
|
99
|
+
return /* @__PURE__ */ jsx(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
"data-slot": "item-media",
|
|
103
|
+
"data-variant": variant,
|
|
104
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
105
|
+
...props
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function ItemContent({ className, ...props }) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "item-content",
|
|
114
|
+
className: cn(
|
|
115
|
+
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0.5 [&+[data-slot=item-content]]:flex-none",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function ItemTitle({ className, ...props }) {
|
|
123
|
+
return /* @__PURE__ */ jsx(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "item-title",
|
|
127
|
+
className: cn(
|
|
128
|
+
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function ItemDescription({ className, ...props }) {
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
"p",
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "item-description",
|
|
140
|
+
className: cn(
|
|
141
|
+
"line-clamp-2 text-left text-sm font-normal text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function ItemActions({ className, ...props }) {
|
|
149
|
+
return /* @__PURE__ */ jsx(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "item-actions",
|
|
153
|
+
className: cn("flex items-center gap-2", className),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function ItemHeader({ className, ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "item-header",
|
|
163
|
+
className: cn(
|
|
164
|
+
"flex basis-full items-center justify-between gap-2",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function ItemFooter({ className, ...props }) {
|
|
172
|
+
return /* @__PURE__ */ jsx(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
"data-slot": "item-footer",
|
|
176
|
+
className: cn(
|
|
177
|
+
"flex basis-full items-center justify-between gap-2",
|
|
178
|
+
className
|
|
179
|
+
),
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
export {
|
|
185
|
+
Item,
|
|
186
|
+
ItemActions,
|
|
187
|
+
ItemContent,
|
|
188
|
+
ItemDescription,
|
|
189
|
+
ItemFooter,
|
|
190
|
+
ItemGroup,
|
|
191
|
+
ItemHeader,
|
|
192
|
+
ItemMedia,
|
|
193
|
+
ItemSeparator,
|
|
194
|
+
ItemTitle
|
|
195
|
+
};
|
package/dist/ui/kbd.d.ts
ADDED
package/dist/ui/kbd.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
function Kbd({ className, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"kbd",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "kbd",
|
|
8
|
+
className: cn(
|
|
9
|
+
"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",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function KbdGroup({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
"kbd",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "kbd-group",
|
|
21
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
Kbd,
|
|
28
|
+
KbdGroup
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const markerVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "separator" | "border" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
11
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const markerVariants = cva(
|
|
7
|
+
"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",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "",
|
|
12
|
+
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",
|
|
13
|
+
border: "border-b border-border pb-2"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
function Marker({
|
|
19
|
+
className,
|
|
20
|
+
variant = "default",
|
|
21
|
+
render,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return useRender({
|
|
25
|
+
defaultTagName: "div",
|
|
26
|
+
props: mergeProps(
|
|
27
|
+
{
|
|
28
|
+
className: cn(markerVariants({ variant, className }))
|
|
29
|
+
},
|
|
30
|
+
props
|
|
31
|
+
),
|
|
32
|
+
render,
|
|
33
|
+
state: {
|
|
34
|
+
slot: "marker",
|
|
35
|
+
variant
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function MarkerIcon({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "marker-icon",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
className: cn(
|
|
46
|
+
"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function MarkerContent({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "marker-content",
|
|
58
|
+
className: cn(
|
|
59
|
+
"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",
|
|
60
|
+
className
|
|
61
|
+
),
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
Marker,
|
|
68
|
+
MarkerContent,
|
|
69
|
+
MarkerIcon,
|
|
70
|
+
markerVariants
|
|
71
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menu } from '@base-ui/react/menu';
|
|
3
|
+
import { Menubar as Menubar$1 } from '@base-ui/react/menubar';
|
|
4
|
+
import { DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenu, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './dropdown-menu.js';
|
|
5
|
+
|
|
6
|
+
declare function Menubar({ className, ...props }: Menubar$1.Props): React.JSX.Element;
|
|
7
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>): React.JSX.Element;
|
|
8
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof DropdownMenuGroup>): React.JSX.Element;
|
|
9
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPortal>): React.JSX.Element;
|
|
10
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof DropdownMenuTrigger>): React.JSX.Element;
|
|
11
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
|
|
12
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuItem>): React.JSX.Element;
|
|
13
|
+
declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: Menu.CheckboxItem.Props & {
|
|
14
|
+
inset?: boolean;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuRadioGroup>): React.JSX.Element;
|
|
17
|
+
declare function MenubarRadioItem({ className, children, inset, ...props }: Menu.RadioItem.Props & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuLabel> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuSeparator>): React.JSX.Element;
|
|
24
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<typeof DropdownMenuShortcut>): React.JSX.Element;
|
|
25
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof DropdownMenuSub>): React.JSX.Element;
|
|
26
|
+
declare function MenubarSubTrigger({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuSubContent>): React.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
4
|
+
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenu,
|
|
8
|
+
DropdownMenuContent,
|
|
9
|
+
DropdownMenuGroup,
|
|
10
|
+
DropdownMenuItem,
|
|
11
|
+
DropdownMenuLabel,
|
|
12
|
+
DropdownMenuPortal,
|
|
13
|
+
DropdownMenuRadioGroup,
|
|
14
|
+
DropdownMenuSeparator,
|
|
15
|
+
DropdownMenuShortcut,
|
|
16
|
+
DropdownMenuSub,
|
|
17
|
+
DropdownMenuSubContent,
|
|
18
|
+
DropdownMenuSubTrigger,
|
|
19
|
+
DropdownMenuTrigger
|
|
20
|
+
} from "./dropdown-menu";
|
|
21
|
+
import { CheckIcon } from "lucide-react";
|
|
22
|
+
function Menubar({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
MenubarPrimitive,
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "menubar",
|
|
27
|
+
className: cn("flex h-9 items-center rounded-control border p-1", className),
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function MenubarMenu({ ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(DropdownMenu, { "data-slot": "menubar-menu", ...props });
|
|
34
|
+
}
|
|
35
|
+
function MenubarGroup({
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsx(DropdownMenuGroup, { "data-slot": "menubar-group", ...props });
|
|
39
|
+
}
|
|
40
|
+
function MenubarPortal({
|
|
41
|
+
...props
|
|
42
|
+
}) {
|
|
43
|
+
return /* @__PURE__ */ jsx(DropdownMenuPortal, { "data-slot": "menubar-portal", ...props });
|
|
44
|
+
}
|
|
45
|
+
function MenubarTrigger({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
DropdownMenuTrigger,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "menubar-trigger",
|
|
53
|
+
className: cn(
|
|
54
|
+
"flex items-center rounded-xl px-2 py-0.75 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function MenubarContent({
|
|
62
|
+
className,
|
|
63
|
+
align = "start",
|
|
64
|
+
alignOffset = -4,
|
|
65
|
+
sideOffset = 8,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
DropdownMenuContent,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "menubar-content",
|
|
72
|
+
align,
|
|
73
|
+
alignOffset,
|
|
74
|
+
sideOffset,
|
|
75
|
+
className: cn("min-w-48 rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function MenubarItem({
|
|
81
|
+
className,
|
|
82
|
+
inset,
|
|
83
|
+
variant = "default",
|
|
84
|
+
...props
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
DropdownMenuItem,
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "menubar-item",
|
|
90
|
+
"data-inset": inset,
|
|
91
|
+
"data-variant": variant,
|
|
92
|
+
className: cn(
|
|
93
|
+
"group/menubar-item gap-2.5 rounded-xl px-3 py-2 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 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:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function MenubarCheckboxItem({
|
|
101
|
+
className,
|
|
102
|
+
children,
|
|
103
|
+
checked,
|
|
104
|
+
inset,
|
|
105
|
+
...props
|
|
106
|
+
}) {
|
|
107
|
+
return /* @__PURE__ */ jsxs(
|
|
108
|
+
MenuPrimitive.CheckboxItem,
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "menubar-checkbox-item",
|
|
111
|
+
"data-inset": inset,
|
|
112
|
+
className: cn(
|
|
113
|
+
"relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-3 pl-9.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
checked,
|
|
117
|
+
...props,
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
120
|
+
CheckIcon,
|
|
121
|
+
{}
|
|
122
|
+
) }) }),
|
|
123
|
+
children
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function MenubarRadioGroup({
|
|
129
|
+
...props
|
|
130
|
+
}) {
|
|
131
|
+
return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
132
|
+
}
|
|
133
|
+
function MenubarRadioItem({
|
|
134
|
+
className,
|
|
135
|
+
children,
|
|
136
|
+
inset,
|
|
137
|
+
...props
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ jsxs(
|
|
140
|
+
MenuPrimitive.RadioItem,
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "menubar-radio-item",
|
|
143
|
+
"data-inset": inset,
|
|
144
|
+
className: cn(
|
|
145
|
+
"relative flex cursor-default items-center gap-2.5 rounded-xl py-2 pr-3 pl-9.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
146
|
+
className
|
|
147
|
+
),
|
|
148
|
+
...props,
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
151
|
+
CheckIcon,
|
|
152
|
+
{}
|
|
153
|
+
) }) }),
|
|
154
|
+
children
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function MenubarLabel({
|
|
160
|
+
className,
|
|
161
|
+
inset,
|
|
162
|
+
...props
|
|
163
|
+
}) {
|
|
164
|
+
return /* @__PURE__ */ jsx(
|
|
165
|
+
DropdownMenuLabel,
|
|
166
|
+
{
|
|
167
|
+
"data-slot": "menubar-label",
|
|
168
|
+
"data-inset": inset,
|
|
169
|
+
className: cn(
|
|
170
|
+
"px-3.5 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
|
|
171
|
+
className
|
|
172
|
+
),
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function MenubarSeparator({
|
|
178
|
+
className,
|
|
179
|
+
...props
|
|
180
|
+
}) {
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
DropdownMenuSeparator,
|
|
183
|
+
{
|
|
184
|
+
"data-slot": "menubar-separator",
|
|
185
|
+
className: cn("-mx-1 my-1 h-px bg-border/50", className),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function MenubarShortcut({
|
|
191
|
+
className,
|
|
192
|
+
...props
|
|
193
|
+
}) {
|
|
194
|
+
return /* @__PURE__ */ jsx(
|
|
195
|
+
DropdownMenuShortcut,
|
|
196
|
+
{
|
|
197
|
+
"data-slot": "menubar-shortcut",
|
|
198
|
+
className: cn(
|
|
199
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
|
|
200
|
+
className
|
|
201
|
+
),
|
|
202
|
+
...props
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function MenubarSub({
|
|
207
|
+
...props
|
|
208
|
+
}) {
|
|
209
|
+
return /* @__PURE__ */ jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
|
|
210
|
+
}
|
|
211
|
+
function MenubarSubTrigger({
|
|
212
|
+
className,
|
|
213
|
+
inset,
|
|
214
|
+
...props
|
|
215
|
+
}) {
|
|
216
|
+
return /* @__PURE__ */ jsx(
|
|
217
|
+
DropdownMenuSubTrigger,
|
|
218
|
+
{
|
|
219
|
+
"data-slot": "menubar-sub-trigger",
|
|
220
|
+
"data-inset": inset,
|
|
221
|
+
className: cn(
|
|
222
|
+
"gap-2 rounded-xl px-3 py-2 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
223
|
+
className
|
|
224
|
+
),
|
|
225
|
+
...props
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
function MenubarSubContent({
|
|
230
|
+
className,
|
|
231
|
+
...props
|
|
232
|
+
}) {
|
|
233
|
+
return /* @__PURE__ */ jsx(
|
|
234
|
+
DropdownMenuSubContent,
|
|
235
|
+
{
|
|
236
|
+
"data-slot": "menubar-sub-content",
|
|
237
|
+
className: cn("min-w-32 rounded-2xl bg-popover p-1 text-popover-foreground shadow-popover ring-1 ring-foreground/5 duration-(--ds-motion-fast) 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),
|
|
238
|
+
...props
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
export {
|
|
243
|
+
Menubar,
|
|
244
|
+
MenubarCheckboxItem,
|
|
245
|
+
MenubarContent,
|
|
246
|
+
MenubarGroup,
|
|
247
|
+
MenubarItem,
|
|
248
|
+
MenubarLabel,
|
|
249
|
+
MenubarMenu,
|
|
250
|
+
MenubarPortal,
|
|
251
|
+
MenubarRadioGroup,
|
|
252
|
+
MenubarRadioItem,
|
|
253
|
+
MenubarSeparator,
|
|
254
|
+
MenubarShortcut,
|
|
255
|
+
MenubarSub,
|
|
256
|
+
MenubarSubContent,
|
|
257
|
+
MenubarSubTrigger,
|
|
258
|
+
MenubarTrigger
|
|
259
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
3
|
+
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
4
|
+
import { Button } from './button.js';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
import '@base-ui/react/use-render';
|
|
7
|
+
import 'class-variance-authority';
|
|
8
|
+
|
|
9
|
+
declare function MessageScrollerProvider(props: React.ComponentProps<typeof MessageScroller$1.Provider>): React.JSX.Element;
|
|
10
|
+
declare function MessageScroller({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Root>): React.JSX.Element;
|
|
11
|
+
declare function MessageScrollerViewport({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Viewport>): React.JSX.Element;
|
|
12
|
+
declare function MessageScrollerContent({ className, ...props }: React.ComponentProps<typeof MessageScroller$1.Content>): React.JSX.Element;
|
|
13
|
+
declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React.ComponentProps<typeof MessageScroller$1.Item>): React.JSX.Element;
|
|
14
|
+
declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React.ComponentProps<typeof MessageScroller$1.Button> & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport };
|