@websolutespa/ask-ui 1.0.2 → 1.0.4
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/dist/components/accordion.d.mts +25 -0
- package/dist/components/accordion.mjs +55 -0
- package/dist/components/ai-elements/attachments.d.mts +94 -0
- package/dist/components/ai-elements/attachments.mjs +174 -0
- package/dist/components/ai-elements/conversation.d.mts +51 -0
- package/dist/components/ai-elements/conversation.mjs +85 -0
- package/dist/components/ai-elements/message.d.mts +89 -0
- package/dist/components/ai-elements/message.mjs +175 -0
- package/dist/components/ai-elements/prompt-input.d.mts +277 -0
- package/dist/components/ai-elements/prompt-input.mjs +703 -0
- package/dist/components/ai-elements/speech-input.d.mts +64 -0
- package/dist/components/ai-elements/speech-input.mjs +153 -0
- package/dist/components/alert-dialog.d.mts +60 -0
- package/dist/components/alert-dialog.mjs +101 -0
- package/dist/components/alert.d.mts +28 -0
- package/dist/components/alert.mjs +43 -0
- package/dist/components/aspect-ratio.d.mts +9 -0
- package/dist/components/aspect-ratio.mjs +12 -0
- package/dist/components/avatar.d.mts +34 -0
- package/dist/components/avatar.mjs +51 -0
- package/dist/components/badge.d.mts +19 -0
- package/dist/components/badge.mjs +27 -0
- package/dist/components/breadcrumb.d.mts +38 -0
- package/dist/components/breadcrumb.mjs +70 -0
- package/dist/components/button-group.d.mts +28 -0
- package/dist/components/button-group.mjs +38 -0
- package/dist/components/button.d.mts +21 -0
- package/dist/components/button.mjs +47 -0
- package/dist/components/calendar.d.mts +30 -0
- package/dist/components/calendar.mjs +109 -0
- package/dist/components/card.d.mts +37 -0
- package/dist/components/card.mjs +56 -0
- package/dist/components/carousel.d.mts +56 -0
- package/dist/components/carousel.mjs +132 -0
- package/dist/components/chart.d.mts +78 -0
- package/dist/components/chart.mjs +146 -0
- package/dist/components/checkbox.d.mts +11 -0
- package/dist/components/checkbox.mjs +21 -0
- package/dist/components/collapsible.d.mts +15 -0
- package/dist/components/collapsible.mjs +24 -0
- package/dist/components/combobox.d.mts +81 -0
- package/dist/components/combobox.mjs +163 -0
- package/dist/components/command.d.mts +54 -0
- package/dist/components/command.mjs +88 -0
- package/dist/components/context-menu.d.mts +85 -0
- package/dist/components/context-menu.mjs +125 -0
- package/dist/components/dialog.d.mts +51 -0
- package/dist/components/dialog.mjs +96 -0
- package/dist/components/direction.d.mts +15 -0
- package/dist/components/direction.mjs +14 -0
- package/dist/components/drawer.d.mts +47 -0
- package/dist/components/drawer.mjs +79 -0
- package/dist/components/dropdown-menu.d.mts +87 -0
- package/dist/components/dropdown-menu.mjs +131 -0
- package/dist/components/empty.d.mts +35 -0
- package/dist/components/empty.mjs +59 -0
- package/dist/components/field.d.mts +64 -0
- package/dist/components/field.mjs +110 -0
- package/dist/components/hover-card.d.mts +22 -0
- package/dist/components/hover-card.mjs +33 -0
- package/dist/components/input-group.d.mts +43 -0
- package/dist/components/input-group.mjs +79 -0
- package/dist/components/input-otp.d.mts +28 -0
- package/dist/components/input-otp.mjs +47 -0
- package/dist/components/input.d.mts +11 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/item.d.mts +62 -0
- package/dist/components/item.mjs +117 -0
- package/dist/components/kbd.d.mts +13 -0
- package/dist/components/kbd.mjs +19 -0
- package/dist/components/label.d.mts +11 -0
- package/dist/components/label.mjs +15 -0
- package/dist/components/menubar.d.mts +90 -0
- package/dist/components/menubar.mjs +135 -0
- package/dist/components/native-select.d.mts +21 -0
- package/dist/components/native-select.mjs +37 -0
- package/dist/components/navigation-menu.d.mts +46 -0
- package/dist/components/navigation-menu.mjs +80 -0
- package/dist/components/pagination.d.mts +45 -0
- package/dist/components/pagination.mjs +80 -0
- package/dist/components/popover.d.mts +34 -0
- package/dist/components/popover.mjs +56 -0
- package/dist/components/progress.d.mts +12 -0
- package/dist/components/progress.mjs +20 -0
- package/dist/components/radio-group.d.mts +15 -0
- package/dist/components/radio-group.mjs +27 -0
- package/dist/components/resizable.d.mts +20 -0
- package/dist/components/resizable.mjs +28 -0
- package/dist/components/scroll-area.d.mts +17 -0
- package/dist/components/scroll-area.mjs +37 -0
- package/dist/components/select.d.mts +53 -0
- package/dist/components/select.mjs +100 -0
- package/dist/components/separator.d.mts +13 -0
- package/dist/components/separator.mjs +17 -0
- package/dist/components/sheet.d.mts +42 -0
- package/dist/components/sheet.mjs +90 -0
- package/dist/components/sidebar.d.mts +167 -0
- package/dist/components/sidebar.mjs +374 -0
- package/dist/components/skeleton.d.mts +9 -0
- package/dist/components/skeleton.mjs +12 -0
- package/dist/components/slider.d.mts +15 -0
- package/dist/components/slider.mjs +36 -0
- package/dist/components/sonner.d.mts +9 -0
- package/dist/components/sonner.mjs +30 -0
- package/dist/components/spinner.d.mts +9 -0
- package/dist/components/spinner.mjs +14 -0
- package/dist/components/switch.d.mts +14 -0
- package/dist/components/switch.mjs +20 -0
- package/dist/components/table.d.mts +38 -0
- package/dist/components/table.mjs +67 -0
- package/dist/components/tabs.d.mts +30 -0
- package/dist/components/tabs.mjs +46 -0
- package/dist/components/textarea.d.mts +10 -0
- package/dist/components/textarea.mjs +13 -0
- package/dist/components/toggle-group.d.mts +28 -0
- package/dist/components/toggle-group.mjs +51 -0
- package/dist/components/toggle.d.mts +19 -0
- package/dist/components/toggle.mjs +37 -0
- package/dist/components/tooltip.d.mts +23 -0
- package/dist/components/tooltip.mjs +36 -0
- package/dist/exports/components.d.mts +61 -2248
- package/dist/exports/components.mjs +60 -4481
- package/dist/exports/hooks.d.mts +1 -3
- package/dist/exports/hooks.mjs +1 -1
- package/dist/exports/lib.d.mts +1 -1
- package/dist/exports/lib.mjs +1 -1
- package/dist/hooks/use-mobile.d.mts +4 -0
- package/dist/{use-mobile-SSHtEcOs.mjs → hooks/use-mobile.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{utils-CCM7KiiI.d.mts → lib/utils.d.mts} +1 -1
- package/dist/{utils-XdqGR1qq.mjs → lib/utils.mjs} +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Tabs } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
+
|
|
7
|
+
//#region src/components/tabs.d.ts
|
|
8
|
+
declare function Tabs$1({
|
|
9
|
+
className,
|
|
10
|
+
orientation,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof Tabs.Root>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
declare const tabsListVariants: (props?: ({
|
|
14
|
+
variant?: "line" | "default" | null | undefined;
|
|
15
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
16
|
+
declare function TabsList({
|
|
17
|
+
className,
|
|
18
|
+
variant,
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof Tabs.List> & VariantProps<typeof tabsListVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
21
|
+
declare function TabsTrigger({
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}: React.ComponentProps<typeof Tabs.Trigger>): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
declare function TabsContent({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof Tabs.Content>): _$react_jsx_runtime0.JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { Tabs } from "radix-ui";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
//#region src/components/tabs.tsx
|
|
8
|
+
function Tabs$1({ className, orientation = "horizontal", ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
10
|
+
"data-slot": "tabs",
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
default: "bg-muted",
|
|
19
|
+
line: "gap-1 bg-transparent"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { variant: "default" }
|
|
22
|
+
});
|
|
23
|
+
function TabsList({ className, variant = "default", ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(Tabs.List, {
|
|
25
|
+
"data-slot": "tabs-list",
|
|
26
|
+
"data-variant": variant,
|
|
27
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function TabsTrigger({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(Tabs.Trigger, {
|
|
33
|
+
"data-slot": "tabs-trigger",
|
|
34
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function TabsContent({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(Tabs.Content, {
|
|
40
|
+
"data-slot": "tabs-content",
|
|
41
|
+
className: cn("flex-1 text-sm outline-none", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/textarea.d.ts
|
|
5
|
+
declare function Textarea({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<'textarea'>): _$react_jsx_runtime0.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Textarea };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/textarea.tsx
|
|
5
|
+
function Textarea({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
7
|
+
"data-slot": "textarea",
|
|
8
|
+
className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Textarea };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { toggleVariants } from "./toggle.mjs";
|
|
2
|
+
import { ToggleGroup } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { VariantProps } from "class-variance-authority";
|
|
6
|
+
|
|
7
|
+
//#region src/components/toggle-group.d.ts
|
|
8
|
+
declare function ToggleGroup$1({
|
|
9
|
+
className,
|
|
10
|
+
variant,
|
|
11
|
+
size,
|
|
12
|
+
spacing,
|
|
13
|
+
orientation,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof ToggleGroup.Root> & VariantProps<typeof toggleVariants> & {
|
|
17
|
+
spacing?: number;
|
|
18
|
+
orientation?: 'horizontal' | 'vertical';
|
|
19
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
+
declare function ToggleGroupItem({
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
variant,
|
|
24
|
+
size,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof ToggleGroup.Item> & VariantProps<typeof toggleVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ToggleGroup$1 as ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { toggleVariants } from "./toggle.mjs";
|
|
4
|
+
import { ToggleGroup } from "radix-ui";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/toggle-group.tsx
|
|
8
|
+
const ToggleGroupContext = React.createContext({
|
|
9
|
+
size: "default",
|
|
10
|
+
variant: "default",
|
|
11
|
+
spacing: 0,
|
|
12
|
+
orientation: "horizontal"
|
|
13
|
+
});
|
|
14
|
+
function ToggleGroup$1({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(ToggleGroup.Root, {
|
|
16
|
+
"data-slot": "toggle-group",
|
|
17
|
+
"data-variant": variant,
|
|
18
|
+
"data-size": size,
|
|
19
|
+
"data-spacing": spacing,
|
|
20
|
+
"data-orientation": orientation,
|
|
21
|
+
style: { "--gap": spacing },
|
|
22
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=0]:data-[variant=outline]:shadow-xs data-vertical:flex-col data-vertical:items-stretch", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
25
|
+
value: {
|
|
26
|
+
variant,
|
|
27
|
+
size,
|
|
28
|
+
spacing,
|
|
29
|
+
orientation
|
|
30
|
+
},
|
|
31
|
+
children
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
36
|
+
const context = React.useContext(ToggleGroupContext);
|
|
37
|
+
return /* @__PURE__ */ jsx(ToggleGroup.Item, {
|
|
38
|
+
"data-slot": "toggle-group-item",
|
|
39
|
+
"data-variant": context.variant || variant,
|
|
40
|
+
"data-size": context.size || size,
|
|
41
|
+
"data-spacing": context.spacing,
|
|
42
|
+
className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
43
|
+
variant: context.variant || variant,
|
|
44
|
+
size: context.size || size
|
|
45
|
+
}), className),
|
|
46
|
+
...props,
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ToggleGroup$1 as ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Toggle } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
+
|
|
7
|
+
//#region src/components/toggle.d.ts
|
|
8
|
+
declare const toggleVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
|
+
declare function Toggle$1({
|
|
13
|
+
className,
|
|
14
|
+
variant,
|
|
15
|
+
size,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Toggle$1 as Toggle, toggleVariants };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { Toggle } from "radix-ui";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
//#region src/components/toggle.tsx
|
|
8
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-transparent",
|
|
12
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-muted"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
16
|
+
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
17
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function Toggle$1({ className, variant = "default", size = "default", ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Toggle.Root, {
|
|
27
|
+
"data-slot": "toggle",
|
|
28
|
+
className: cn(toggleVariants({
|
|
29
|
+
variant,
|
|
30
|
+
size,
|
|
31
|
+
className
|
|
32
|
+
})),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Toggle$1 as Toggle, toggleVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Tooltip } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/tooltip.d.ts
|
|
6
|
+
declare function TooltipProvider({
|
|
7
|
+
delayDuration,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof Tooltip.Provider>): _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function Tooltip$1({
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof Tooltip.Root>): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
declare function TooltipTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof Tooltip.Trigger>): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
+
declare function TooltipContent({
|
|
17
|
+
className,
|
|
18
|
+
sideOffset,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof Tooltip.Content>): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
import { Tooltip } from "radix-ui";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/tooltip.tsx
|
|
7
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, {
|
|
9
|
+
"data-slot": "tooltip-provider",
|
|
10
|
+
delayDuration,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function Tooltip$1({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Tooltip.Root, {
|
|
16
|
+
"data-slot": "tooltip",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function TooltipTrigger({ ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
22
|
+
"data-slot": "tooltip-trigger",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsxs(Tooltip.Content, {
|
|
28
|
+
"data-slot": "tooltip-content",
|
|
29
|
+
sideOffset,
|
|
30
|
+
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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),
|
|
31
|
+
...props,
|
|
32
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
|
|
33
|
+
}) });
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|