@recanica/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 +9 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.js +65 -0
- package/dist/components/alert-dialog.d.ts +18 -0
- package/dist/components/alert-dialog.js +178 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.js +66 -0
- package/dist/components/app-shell.d.ts +15 -0
- package/dist/components/app-shell.js +27 -0
- package/dist/components/aspect-ratio.d.ts +3 -0
- package/dist/components/aspect-ratio.js +11 -0
- package/dist/components/attachment.d.ts +24 -0
- package/dist/components/attachment.js +192 -0
- package/dist/components/avatar.d.ts +11 -0
- package/dist/components/avatar.js +104 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +63 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.js +103 -0
- package/dist/components/bubble.d.ts +17 -0
- package/dist/components/bubble.js +110 -0
- package/dist/components/button-group.d.ts +11 -0
- package/dist/components/button-group.js +76 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.js +59 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.js +195 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.js +90 -0
- package/dist/components/carousel.d.ts +19 -0
- package/dist/components/carousel.js +199 -0
- package/dist/components/chart.d.ts +44 -0
- package/dist/components/chart.js +253 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +33 -0
- package/dist/components/choice-card.d.ts +18 -0
- package/dist/components/choice-card.js +43 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/collapsible.js +35 -0
- package/dist/components/combobox.d.ts +24 -0
- package/dist/components/combobox.js +297 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.js +177 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.js +224 -0
- package/dist/components/dialog.d.ts +17 -0
- package/dist/components/dialog.js +147 -0
- package/dist/components/direction.d.ts +7 -0
- package/dist/components/direction.js +15 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.js +129 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.js +232 -0
- package/dist/components/empty.d.ts +11 -0
- package/dist/components/empty.js +102 -0
- package/dist/components/field.d.ts +52 -0
- package/dist/components/field.js +261 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/form.js +126 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.js +39 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.js +160 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.js +67 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.js +25 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.js +187 -0
- package/dist/components/kbd.d.ts +3 -0
- package/dist/components/kbd.js +31 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.js +23 -0
- package/dist/components/layout.d.ts +34 -0
- package/dist/components/layout.js +46 -0
- package/dist/components/loader.d.ts +38 -0
- package/dist/components/loader.js +90 -0
- package/dist/components/marker.d.ts +11 -0
- package/dist/components/marker.js +66 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.js +252 -0
- package/dist/components/message-scroller.d.ts +10 -0
- package/dist/components/message-scroller.js +118 -0
- package/dist/components/message.d.ts +10 -0
- package/dist/components/message.js +90 -0
- package/dist/components/native-select.d.ts +7 -0
- package/dist/components/native-select.js +71 -0
- package/dist/components/nav-item.d.ts +17 -0
- package/dist/components/nav-item.js +36 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.js +170 -0
- package/dist/components/page.d.ts +80 -0
- package/dist/components/page.js +84 -0
- package/dist/components/pagination.d.ts +13 -0
- package/dist/components/pagination.js +122 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/popover.js +81 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.js +32 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +46 -0
- package/dist/components/resizable.d.ts +7 -0
- package/dist/components/resizable.js +47 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area.js +61 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +179 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.js +27 -0
- package/dist/components/sheet.d.ts +14 -0
- package/dist/components/sheet.js +128 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.js +650 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +15 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.js +64 -0
- package/dist/components/sonner.d.ts +3 -0
- package/dist/components/sonner.js +38 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +17 -0
- package/dist/components/stat.d.ts +47 -0
- package/dist/components/stat.js +120 -0
- package/dist/components/surface.d.ts +28 -0
- package/dist/components/surface.js +39 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +34 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.js +115 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +92 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +22 -0
- package/dist/components/toggle-group.d.ts +9 -0
- package/dist/components/toggle-group.js +69 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.js +44 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.js +56 -0
- package/dist/components/web-section.d.ts +40 -0
- package/dist/components/web-section.js +72 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/package.json +79 -3
- package/README.md +0 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@recanica/ui/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",
|
|
10
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
11
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function KbdGroup({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"kbd",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "kbd-group",
|
|
23
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
Kbd,
|
|
30
|
+
KbdGroup
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@recanica/ui/lib/utils";
|
|
4
|
+
import { Label as LabelPrimitive } from "radix-ui";
|
|
5
|
+
function Label({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
LabelPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "label",
|
|
13
|
+
className: cn(
|
|
14
|
+
"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",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
Label
|
|
23
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Layout parts: the page-level shapes Recanica pages repeat. Use these instead of writing the grid or flex by hand.
|
|
4
|
+
* CenteredPage — one thing in the middle of the screen (sign-in, verify, success, 404)
|
|
5
|
+
* SplitLayout — main content with a side panel (cart, checkout, detail + summary)
|
|
6
|
+
* TopBar — sticky, blurred header bar
|
|
7
|
+
* ListRow — a row in a bordered list; interactive when it's a link or button
|
|
8
|
+
* IconBadge — an icon in a circle (success, empty and feature states)
|
|
9
|
+
*/
|
|
10
|
+
declare function CenteredPage({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
|
|
11
|
+
/** Two children: the main content, then the side panel (22rem, sticky on desktop). Stacks on small screens. */
|
|
12
|
+
declare function SplitLayout({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function TopBar({ className, ...props }: React.ComponentProps<"header">): React.JSX.Element;
|
|
14
|
+
type ListRowProps<T extends React.ElementType> = {
|
|
15
|
+
as?: T;
|
|
16
|
+
className?: string;
|
|
17
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className">;
|
|
18
|
+
/** A row in a list (use inside a Surface or a divide-y list). Rendered as a link or button, it gets the hover state. */
|
|
19
|
+
declare function ListRow<T extends React.ElementType = "div">({ as, className, ...props }: ListRowProps<T>): React.JSX.Element;
|
|
20
|
+
declare const iconBadgeSize: {
|
|
21
|
+
readonly sm: "size-8 [&_svg]:size-4";
|
|
22
|
+
readonly md: "size-10 [&_svg]:size-5";
|
|
23
|
+
readonly lg: "size-12 [&_svg]:size-6";
|
|
24
|
+
};
|
|
25
|
+
declare const iconBadgeTone: {
|
|
26
|
+
readonly brand: "bg-brand text-brand-foreground";
|
|
27
|
+
readonly muted: "bg-muted text-muted-foreground";
|
|
28
|
+
readonly success: "bg-success/12 text-success";
|
|
29
|
+
};
|
|
30
|
+
declare function IconBadge({ size, tone, className, ...props }: React.ComponentProps<"span"> & {
|
|
31
|
+
size?: keyof typeof iconBadgeSize;
|
|
32
|
+
tone?: keyof typeof iconBadgeTone;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
export { CenteredPage, SplitLayout, TopBar, ListRow, IconBadge };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@recanica/ui/lib/utils";
|
|
3
|
+
function CenteredPage({ className, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("main", { "data-slot": "centered-page", className: cn("flex min-h-svh items-center justify-center bg-background px-gutter py-12", className), ...props });
|
|
5
|
+
}
|
|
6
|
+
function SplitLayout({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "split-layout",
|
|
11
|
+
className: cn("mx-auto grid max-w-content gap-10 lg:grid-cols-[minmax(0,1fr)_22rem] lg:items-start [&>*:last-child]:lg:sticky [&>*:last-child]:lg:top-20", className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function TopBar({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("header", { "data-slot": "top-bar", className: cn("sticky top-0 z-40 border-b bg-background/80 backdrop-blur-md", className), ...props });
|
|
18
|
+
}
|
|
19
|
+
function ListRow({ as, className, ...props }) {
|
|
20
|
+
const Tag = as ?? "div";
|
|
21
|
+
const interactive = as !== void 0 && as !== "div" && as !== "li";
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Tag,
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "list-row",
|
|
26
|
+
className: cn(
|
|
27
|
+
"flex flex-wrap items-center gap-x-4 gap-y-2 px-(--spacing-inset) py-(--spacing-inset-sm)",
|
|
28
|
+
interactive && "group transition-colors outline-none hover:bg-accent focus-visible:bg-accent",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
const iconBadgeSize = { sm: "size-8 [&_svg]:size-4", md: "size-10 [&_svg]:size-5", lg: "size-12 [&_svg]:size-6" };
|
|
36
|
+
const iconBadgeTone = { brand: "bg-brand text-brand-foreground", muted: "bg-muted text-muted-foreground", success: "bg-success/12 text-success" };
|
|
37
|
+
function IconBadge({ size = "lg", tone = "brand", className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "icon-badge", className: cn("inline-flex shrink-0 items-center justify-center rounded-full", iconBadgeSize[size], iconBadgeTone[tone], className), ...props });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
CenteredPage,
|
|
42
|
+
IconBadge,
|
|
43
|
+
ListRow,
|
|
44
|
+
SplitLayout,
|
|
45
|
+
TopBar
|
|
46
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Loader — shows the project's logo while something loads.
|
|
4
|
+
*
|
|
5
|
+
* Logo, in order of preference:
|
|
6
|
+
* 1. the `logo` prop
|
|
7
|
+
* 2. the project logo set once with <LoaderProvider logo={<YourLogo />}> at the app root
|
|
8
|
+
* 3. the Recanica mark
|
|
9
|
+
* Or `logo="shapes"` (or <LoaderProvider logo="shapes">) for a neutral filler of five shapes.
|
|
10
|
+
*
|
|
11
|
+
* Ten animations, all monochrome, transform/opacity only, and still under prefers-reduced-motion.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LOADER_ANIMATIONS: readonly ["pulse", "breathe", "spin", "orbit", "bounce", "flip", "reveal", "ring", "ripple", "sway"];
|
|
14
|
+
export type LoaderAnimation = (typeof LOADER_ANIMATIONS)[number];
|
|
15
|
+
type LoaderLogo = React.ReactNode | "shapes";
|
|
16
|
+
declare function LoaderProvider({ logo, animation, children }: {
|
|
17
|
+
logo?: LoaderLogo;
|
|
18
|
+
animation?: LoaderAnimation;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
declare const sizes: {
|
|
22
|
+
readonly sm: "size-6";
|
|
23
|
+
readonly md: "size-10";
|
|
24
|
+
readonly lg: "size-16";
|
|
25
|
+
readonly xl: "size-24";
|
|
26
|
+
};
|
|
27
|
+
declare function Loader({ logo, animation, size, label, className, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
28
|
+
logo?: LoaderLogo;
|
|
29
|
+
animation?: LoaderAnimation;
|
|
30
|
+
size?: keyof typeof sizes;
|
|
31
|
+
/** Announced to screen readers. */
|
|
32
|
+
label?: string;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
/** Full-area loading state: centred loader with an optional line of text. */
|
|
35
|
+
declare function LoaderOverlay({ text, className, ...props }: React.ComponentProps<typeof Loader> & {
|
|
36
|
+
text?: string;
|
|
37
|
+
}): React.JSX.Element;
|
|
38
|
+
export { Loader, LoaderOverlay, LoaderProvider };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "@recanica/ui/lib/utils";
|
|
5
|
+
const LOADER_ANIMATIONS = ["pulse", "breathe", "spin", "orbit", "bounce", "flip", "reveal", "ring", "ripple", "sway"];
|
|
6
|
+
const LoaderContext = React.createContext({});
|
|
7
|
+
function LoaderProvider({ logo, animation, children }) {
|
|
8
|
+
const value = React.useMemo(() => ({ logo, animation }), [logo, animation]);
|
|
9
|
+
return /* @__PURE__ */ jsx(LoaderContext.Provider, { value, children });
|
|
10
|
+
}
|
|
11
|
+
function RecanicaMark(props) {
|
|
12
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 40 48", fill: "none", "aria-hidden": true, ...props, children: [
|
|
13
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "2", width: "36", height: "44", rx: "7", stroke: "currentColor", strokeWidth: "3" }),
|
|
14
|
+
/* @__PURE__ */ jsx("path", { d: "M9.5 46V21a10.5 10.5 0 0 1 21 0v25", stroke: "currentColor", strokeWidth: "3" }),
|
|
15
|
+
/* @__PURE__ */ jsx("circle", { cx: "20", cy: "30.5", r: "5", fill: "currentColor" })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
function LoaderShapes({ animation }) {
|
|
19
|
+
const shapes = [
|
|
20
|
+
/* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "5" }, "c"),
|
|
21
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "1", width: "10", height: "10", rx: "2" }, "s"),
|
|
22
|
+
/* @__PURE__ */ jsx("path", { d: "M6 1.5 11 10.5H1Z" }, "t"),
|
|
23
|
+
/* @__PURE__ */ jsx("path", { d: "M6 .8 11.2 6 6 11.2.8 6Z" }, "d"),
|
|
24
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "3.5", width: "10", height: "5", rx: "2.5" }, "p")
|
|
25
|
+
];
|
|
26
|
+
const anim = animation === "breathe" || animation === "pulse" || animation === "flip" || animation === "sway" ? animClass[animation] : "animate-loader-wave";
|
|
27
|
+
return /* @__PURE__ */ jsx("span", { className: "flex items-center gap-[12%]", children: shapes.map((s, i) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": true, "data-loader-motion": true, className: cn("size-[16%] shrink-0", anim), style: { animationDelay: `${i * 0.12}s` }, children: s }, i)) });
|
|
28
|
+
}
|
|
29
|
+
const animClass = {
|
|
30
|
+
pulse: "animate-loader-pulse",
|
|
31
|
+
breathe: "animate-loader-breathe",
|
|
32
|
+
spin: "animate-loader-spin",
|
|
33
|
+
orbit: "",
|
|
34
|
+
bounce: "animate-loader-bounce",
|
|
35
|
+
flip: "animate-loader-flip",
|
|
36
|
+
reveal: "animate-loader-reveal",
|
|
37
|
+
ring: "",
|
|
38
|
+
ripple: "",
|
|
39
|
+
sway: "animate-loader-sway"
|
|
40
|
+
};
|
|
41
|
+
const sizes = { sm: "size-6", md: "size-10", lg: "size-16", xl: "size-24" };
|
|
42
|
+
function Loader({
|
|
43
|
+
logo,
|
|
44
|
+
animation,
|
|
45
|
+
size = "md",
|
|
46
|
+
label = "Loading",
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
const ctx = React.useContext(LoaderContext);
|
|
51
|
+
const chosen = logo ?? ctx.logo;
|
|
52
|
+
const anim = animation ?? ctx.animation ?? "pulse";
|
|
53
|
+
const isShapes = chosen === "shapes";
|
|
54
|
+
const mark = isShapes ? null : chosen ?? /* @__PURE__ */ jsx(RecanicaMark, { className: "h-full w-auto" });
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
role: "status",
|
|
59
|
+
"aria-live": "polite",
|
|
60
|
+
"data-slot": "loader",
|
|
61
|
+
"data-animation": anim,
|
|
62
|
+
className: cn("relative inline-flex shrink-0 items-center justify-center text-foreground", sizes[size], className),
|
|
63
|
+
...props,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label }),
|
|
66
|
+
isShapes ? /* @__PURE__ */ jsx(LoaderShapes, { animation: anim }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
+
anim === "ripple" && /* @__PURE__ */ jsx("span", { "data-loader-motion": true, className: "absolute inset-0 animate-loader-ripple rounded-full border border-foreground/40", "aria-hidden": true }),
|
|
68
|
+
anim === "ring" && /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 40 40", className: "absolute inset-0 size-full -rotate-90", "aria-hidden": true, children: [
|
|
69
|
+
/* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "18", fill: "none", stroke: "currentColor", strokeOpacity: "0.15", strokeWidth: "1.5" }),
|
|
70
|
+
/* @__PURE__ */ jsx("circle", { "data-loader-motion": true, cx: "20", cy: "20", r: "18", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", pathLength: 100, strokeDasharray: "25 100", className: "animate-loader-ring" })
|
|
71
|
+
] }),
|
|
72
|
+
anim === "orbit" && /* @__PURE__ */ jsx("span", { "data-loader-motion": true, className: "absolute inset-0 animate-loader-orbit", "aria-hidden": true, children: /* @__PURE__ */ jsx("span", { className: "absolute top-0 left-1/2 size-[12%] -translate-x-1/2 rounded-full bg-foreground" }) }),
|
|
73
|
+
/* @__PURE__ */ jsx("span", { "data-loader-motion": true, className: cn("flex items-center justify-center [&>*]:max-h-full [&>*]:max-w-full", anim === "ring" || anim === "orbit" || anim === "ripple" ? "size-[50%]" : "size-[70%]", animClass[anim]), children: mark })
|
|
74
|
+
] })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function LoaderOverlay({ text, className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "loader-overlay", className: cn("flex min-h-40 w-full flex-col items-center justify-center gap-4", className), children: [
|
|
81
|
+
/* @__PURE__ */ jsx(Loader, { size: "lg", ...props }),
|
|
82
|
+
text && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: text })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
LOADER_ANIMATIONS,
|
|
87
|
+
Loader,
|
|
88
|
+
LoaderOverlay,
|
|
89
|
+
LoaderProvider
|
|
90
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const markerVariants: (props?: ({
|
|
4
|
+
variant?: "border" | "default" | "separator" | 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 };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@recanica/ui/lib/utils";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
|
+
const markerVariants = cva(
|
|
6
|
+
"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",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "",
|
|
11
|
+
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",
|
|
12
|
+
border: "border-b border-border pb-2"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
function Marker({
|
|
18
|
+
className,
|
|
19
|
+
variant = "default",
|
|
20
|
+
asChild = false,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Comp,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "marker",
|
|
28
|
+
"data-variant": variant,
|
|
29
|
+
className: cn(markerVariants({ variant, className })),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function MarkerIcon({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "marker-icon",
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
className: cn(
|
|
41
|
+
"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function MarkerContent({ className, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "marker-content",
|
|
53
|
+
className: cn(
|
|
54
|
+
"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",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
Marker,
|
|
63
|
+
MarkerContent,
|
|
64
|
+
MarkerIcon,
|
|
65
|
+
markerVariants
|
|
66
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
|
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
|
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): React.JSX.Element;
|
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
|
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
|
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@recanica/ui/lib/utils";
|
|
4
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
+
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
6
|
+
function Menubar({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
MenubarPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "menubar",
|
|
14
|
+
className: cn(
|
|
15
|
+
"flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function MenubarMenu({
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
26
|
+
}
|
|
27
|
+
function MenubarGroup({
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
31
|
+
}
|
|
32
|
+
function MenubarPortal({
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
36
|
+
}
|
|
37
|
+
function MenubarRadioGroup({
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
41
|
+
}
|
|
42
|
+
function MenubarTrigger({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
MenubarPrimitive.Trigger,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "menubar-trigger",
|
|
50
|
+
className: cn(
|
|
51
|
+
"flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function MenubarContent({
|
|
59
|
+
className,
|
|
60
|
+
align = "start",
|
|
61
|
+
alignOffset = -4,
|
|
62
|
+
sideOffset = 8,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
|
|
66
|
+
MenubarPrimitive.Content,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "menubar-content",
|
|
69
|
+
align,
|
|
70
|
+
alignOffset,
|
|
71
|
+
sideOffset,
|
|
72
|
+
className: cn(
|
|
73
|
+
"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
) });
|
|
79
|
+
}
|
|
80
|
+
function MenubarItem({
|
|
81
|
+
className,
|
|
82
|
+
inset,
|
|
83
|
+
variant = "default",
|
|
84
|
+
...props
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
MenubarPrimitive.Item,
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "menubar-item",
|
|
90
|
+
"data-inset": inset,
|
|
91
|
+
"data-variant": variant,
|
|
92
|
+
className: cn(
|
|
93
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function MenubarCheckboxItem({
|
|
101
|
+
className,
|
|
102
|
+
children,
|
|
103
|
+
checked,
|
|
104
|
+
...props
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ jsxs(
|
|
107
|
+
MenubarPrimitive.CheckboxItem,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "menubar-checkbox-item",
|
|
110
|
+
className: cn(
|
|
111
|
+
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
checked,
|
|
115
|
+
...props,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
118
|
+
children
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function MenubarRadioItem({
|
|
124
|
+
className,
|
|
125
|
+
children,
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(
|
|
129
|
+
MenubarPrimitive.RadioItem,
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "menubar-radio-item",
|
|
132
|
+
className: cn(
|
|
133
|
+
"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
134
|
+
className
|
|
135
|
+
),
|
|
136
|
+
...props,
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
139
|
+
children
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function MenubarLabel({
|
|
145
|
+
className,
|
|
146
|
+
inset,
|
|
147
|
+
...props
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ jsx(
|
|
150
|
+
MenubarPrimitive.Label,
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "menubar-label",
|
|
153
|
+
"data-inset": inset,
|
|
154
|
+
className: cn(
|
|
155
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
156
|
+
className
|
|
157
|
+
),
|
|
158
|
+
...props
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function MenubarSeparator({
|
|
163
|
+
className,
|
|
164
|
+
...props
|
|
165
|
+
}) {
|
|
166
|
+
return /* @__PURE__ */ jsx(
|
|
167
|
+
MenubarPrimitive.Separator,
|
|
168
|
+
{
|
|
169
|
+
"data-slot": "menubar-separator",
|
|
170
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
171
|
+
...props
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function MenubarShortcut({
|
|
176
|
+
className,
|
|
177
|
+
...props
|
|
178
|
+
}) {
|
|
179
|
+
return /* @__PURE__ */ jsx(
|
|
180
|
+
"span",
|
|
181
|
+
{
|
|
182
|
+
"data-slot": "menubar-shortcut",
|
|
183
|
+
className: cn(
|
|
184
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
185
|
+
className
|
|
186
|
+
),
|
|
187
|
+
...props
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
function MenubarSub({
|
|
192
|
+
...props
|
|
193
|
+
}) {
|
|
194
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
195
|
+
}
|
|
196
|
+
function MenubarSubTrigger({
|
|
197
|
+
className,
|
|
198
|
+
inset,
|
|
199
|
+
children,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsxs(
|
|
203
|
+
MenubarPrimitive.SubTrigger,
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "menubar-sub-trigger",
|
|
206
|
+
"data-inset": inset,
|
|
207
|
+
className: cn(
|
|
208
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
209
|
+
className
|
|
210
|
+
),
|
|
211
|
+
...props,
|
|
212
|
+
children: [
|
|
213
|
+
children,
|
|
214
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function MenubarSubContent({
|
|
220
|
+
className,
|
|
221
|
+
...props
|
|
222
|
+
}) {
|
|
223
|
+
return /* @__PURE__ */ jsx(
|
|
224
|
+
MenubarPrimitive.SubContent,
|
|
225
|
+
{
|
|
226
|
+
"data-slot": "menubar-sub-content",
|
|
227
|
+
className: cn(
|
|
228
|
+
"z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
229
|
+
className
|
|
230
|
+
),
|
|
231
|
+
...props
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
export {
|
|
236
|
+
Menubar,
|
|
237
|
+
MenubarCheckboxItem,
|
|
238
|
+
MenubarContent,
|
|
239
|
+
MenubarGroup,
|
|
240
|
+
MenubarItem,
|
|
241
|
+
MenubarLabel,
|
|
242
|
+
MenubarMenu,
|
|
243
|
+
MenubarPortal,
|
|
244
|
+
MenubarRadioGroup,
|
|
245
|
+
MenubarRadioItem,
|
|
246
|
+
MenubarSeparator,
|
|
247
|
+
MenubarShortcut,
|
|
248
|
+
MenubarSub,
|
|
249
|
+
MenubarSubContent,
|
|
250
|
+
MenubarSubTrigger,
|
|
251
|
+
MenubarTrigger
|
|
252
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
3
|
+
import { Button } from "@recanica/ui/components/button";
|
|
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, };
|