@graftwork/ui 1.1.1 → 1.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/accordion.d.ts +21 -0
  3. package/dist/components/accordion.js +17 -0
  4. package/dist/components/alert-dialog.d.ts +10 -0
  5. package/dist/components/alert-dialog.js +32 -0
  6. package/dist/components/alert.d.ts +11 -0
  7. package/dist/components/alert.js +13 -0
  8. package/dist/components/avatar.d.ts +26 -0
  9. package/dist/components/avatar.js +33 -0
  10. package/dist/components/badge.d.ts +10 -0
  11. package/dist/components/badge.js +27 -0
  12. package/dist/components/breadcrumb.d.ts +15 -0
  13. package/dist/components/breadcrumb.js +11 -0
  14. package/dist/components/card.js +1 -1
  15. package/dist/components/checkbox.d.ts +22 -0
  16. package/dist/components/checkbox.js +29 -0
  17. package/dist/components/collapsible.d.ts +15 -0
  18. package/dist/components/collapsible.js +13 -0
  19. package/dist/components/combobox.d.ts +19 -0
  20. package/dist/components/combobox.js +14 -0
  21. package/dist/components/dialog.d.ts +36 -0
  22. package/dist/components/dialog.js +67 -0
  23. package/dist/components/dropdown-menu.d.ts +27 -0
  24. package/dist/components/dropdown-menu.js +49 -0
  25. package/dist/components/empty.d.ts +12 -0
  26. package/dist/components/empty.js +6 -0
  27. package/dist/components/input-group.d.ts +16 -0
  28. package/dist/components/input-group.js +14 -0
  29. package/dist/components/kbd.d.ts +4 -0
  30. package/dist/components/kbd.js +6 -0
  31. package/dist/components/label.d.ts +4 -0
  32. package/dist/components/label.js +7 -0
  33. package/dist/components/pagination.d.ts +19 -0
  34. package/dist/components/pagination.js +30 -0
  35. package/dist/components/popover.d.ts +13 -0
  36. package/dist/components/popover.js +28 -0
  37. package/dist/components/progress.d.ts +9 -0
  38. package/dist/components/progress.js +8 -0
  39. package/dist/components/radio-group.d.ts +18 -0
  40. package/dist/components/radio-group.js +12 -0
  41. package/dist/components/separator.d.ts +5 -0
  42. package/dist/components/separator.js +6 -0
  43. package/dist/components/sheet.d.ts +20 -0
  44. package/dist/components/sheet.js +38 -0
  45. package/dist/components/skeleton.d.ts +2 -0
  46. package/dist/components/skeleton.js +14 -0
  47. package/dist/components/slider.d.ts +12 -0
  48. package/dist/components/slider.js +8 -0
  49. package/dist/components/spinner.d.ts +14 -0
  50. package/dist/components/spinner.js +15 -0
  51. package/dist/components/switch.d.ts +8 -0
  52. package/dist/components/switch.js +8 -0
  53. package/dist/components/table.js +1 -1
  54. package/dist/components/tabs.d.ts +17 -0
  55. package/dist/components/tabs.js +18 -0
  56. package/dist/components/textarea.d.ts +16 -0
  57. package/dist/components/textarea.js +8 -0
  58. package/dist/components/toast.d.ts +24 -0
  59. package/dist/components/toast.js +28 -0
  60. package/dist/components/toggle.d.ts +14 -0
  61. package/dist/components/toggle.js +37 -0
  62. package/dist/components/tooltip.d.ts +6 -0
  63. package/dist/components/tooltip.js +24 -0
  64. package/dist/index.d.ts +30 -0
  65. package/dist/index.js +30 -0
  66. package/dist/lib/utils.d.ts +1 -1
  67. package/dist/lib/utils.js +6 -1
  68. package/dist/styles.css +11 -1
  69. package/package.json +3 -3
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ export function Empty({ icon, title, description, action, level = 2, className, ...props }) {
4
+ const Heading = `h${level}`;
5
+ return (_jsxs("div", { "data-slot": "empty", className: cn("flex flex-col items-center justify-center gap-4 rounded-lg border border-dashed border-border-default px-6 py-12 text-center", className), ...props, children: [icon ? (_jsx("span", { "aria-hidden": true, className: "flex size-12 items-center justify-center rounded-full bg-surface-subtle text-icon-default [&_svg]:size-6", children: icon })) : null, _jsxs("div", { className: "flex max-w-sm flex-col gap-1", children: [_jsx(Heading, { className: "text-lg leading-heading font-semibold text-text-default", children: title }), description ? _jsx("p", { className: "text-body text-text-secondary", children: description }) : null] }), action ? _jsx("div", { className: "flex flex-wrap justify-center gap-2", children: action }) : null] }));
6
+ }
@@ -0,0 +1,16 @@
1
+ import type * as React from "react";
2
+ import { type TextFieldProps } from "react-aria-components";
3
+ export type InputGroupProps = Omit<TextFieldProps, "className" | "style" | "children"> & {
4
+ /** Visible label. Required: placeholders never replace labels. */
5
+ label: string;
6
+ description?: string;
7
+ errorMessage?: string;
8
+ placeholder?: string;
9
+ /** Shown inside the border, before the text. */
10
+ startAddon?: React.ReactNode;
11
+ /** Shown inside the border, after the text. */
12
+ endAddon?: React.ReactNode;
13
+ className?: string;
14
+ inputRef?: React.Ref<HTMLInputElement>;
15
+ };
16
+ export declare function InputGroup({ label, description, errorMessage, placeholder, startAddon, endAddon, className, inputRef, ...props }: InputGroupProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Group, Input as InputPrimitive, TextField } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { FieldDescription, FieldErrorText, FieldLabel, fieldControl } from "./field.js";
6
+ const addon = "flex shrink-0 items-center gap-1 text-text-secondary [&_svg]:size-4 [&_svg]:text-icon-default";
7
+ export function InputGroup({ label, description, errorMessage, placeholder, startAddon, endAddon, className, inputRef, ...props }) {
8
+ return (_jsxs(TextField, { "data-slot": "input-group-field", className: cn("group/input-group flex flex-col gap-1", className), ...props, children: [_jsxs(FieldLabel, { children: [label, props.isRequired ? _jsx("span", { className: "text-text-secondary", children: " (required)" }) : null] }), description ? _jsx(FieldDescription, { children: description }) : null, _jsxs(Group, { "data-slot": "input-group", className: cn(fieldControl, "focus-ring-within flex items-center gap-2", "group-data-invalid/input-group:border-2 group-data-invalid/input-group:border-border-input-invalid",
9
+ // Disabled fades the input and border, not the addons: axe can't tell an addon belongs to a
10
+ // disabled control, so faded addon text would fail contrast.
11
+ "data-disabled:opacity-100 group-data-disabled/input-group:cursor-not-allowed group-data-disabled/input-group:border-border-default"), children: [startAddon ? (_jsx("span", { "data-slot": "input-group-start", className: addon, children: startAddon })) : null, _jsx(InputPrimitive, { ref: inputRef, "data-slot": "input", placeholder: placeholder,
12
+ // eslint-disable-next-line graftwork/no-outline-removal -- the wrapping Group draws the ring (focus-ring-within).
13
+ className: "min-h-target-min min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-placeholder disabled:cursor-not-allowed disabled:opacity-50" }), endAddon ? (_jsx("span", { "data-slot": "input-group-end", className: cn(addon, "-me-2"), children: endAddon })) : null] }), _jsx(FieldErrorText, { children: errorMessage })] }));
14
+ }
@@ -0,0 +1,4 @@
1
+ import type * as React from "react";
2
+ import { Keyboard } from "react-aria-components";
3
+ export type KbdProps = React.ComponentProps<typeof Keyboard>;
4
+ export declare function Kbd({ className, ...props }: KbdProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Keyboard } from "react-aria-components";
3
+ import { cn } from "../lib/utils.js";
4
+ export function Kbd({ className, ...props }) {
5
+ return (_jsx(Keyboard, { "data-slot": "kbd", className: cn("inline-flex h-6 min-w-6 items-center justify-center rounded-sm border border-border-input bg-surface-subtle px-1.5 font-sans text-sm font-medium text-text-default", className), ...props }));
6
+ }
@@ -0,0 +1,4 @@
1
+ import type * as React from "react";
2
+ import { Label as LabelPrimitive } from "react-aria-components";
3
+ export type LabelProps = React.ComponentProps<typeof LabelPrimitive>;
4
+ export declare function Label({ className, ...props }: LabelProps): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Label as LabelPrimitive } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ export function Label({ className, ...props }) {
6
+ return (_jsx(LabelPrimitive, { "data-slot": "label", className: cn("text-sm font-medium text-text-default", className), ...props }));
7
+ }
@@ -0,0 +1,19 @@
1
+ import type * as React from "react";
2
+ export type PaginationProps = {
3
+ /** The current page, starting at 1. */
4
+ page: number;
5
+ pageCount: number;
6
+ /** URL for a page. With it, each page is a real link. */
7
+ getHref?: (page: number) => string;
8
+ /** Called when a page is chosen. */
9
+ onPageChange?: (page: number) => void;
10
+ /** Pages shown either side of the current one. Defaults to 1. */
11
+ siblingCount?: number;
12
+ /** Names the navigation landmark. Defaults to "Pagination". */
13
+ "aria-label"?: string;
14
+ className?: string;
15
+ };
16
+ type Item = number | "gap-start" | "gap-end";
17
+ export declare function pageItems(page: number, pageCount: number, siblingCount?: number): Item[];
18
+ export declare function Pagination({ page, pageCount, getHref, onPageChange, siblingCount, "aria-label": label, className, }: PaginationProps): React.JSX.Element;
19
+ export {};
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
4
+ import { Link } from "react-aria-components";
5
+ import { cn } from "../lib/utils.js";
6
+ import { buttonVariants } from "./button.js";
7
+ export function pageItems(page, pageCount, siblingCount = 1) {
8
+ const first = Math.max(2, page - siblingCount);
9
+ const last = Math.min(pageCount - 1, page + siblingCount);
10
+ const items = [1];
11
+ if (first > 2)
12
+ items.push("gap-start");
13
+ for (let p = first; p <= last; p++)
14
+ items.push(p);
15
+ if (last < pageCount - 1)
16
+ items.push("gap-end");
17
+ if (pageCount > 1)
18
+ items.push(pageCount);
19
+ return items;
20
+ }
21
+ export function Pagination({ page, pageCount, getHref, onPageChange, siblingCount = 1, "aria-label": label = "Pagination", className, }) {
22
+ const link = (target, content, extra = {}) => (_jsx(Link, { href: getHref?.(target), onPress: () => onPageChange?.(target), isDisabled: extra.disabled, "aria-label": extra.label, "aria-current": extra.current ? "page" : undefined, className: cn(buttonVariants({ variant: extra.current ? "primary" : "ghost", size: "sm" }), "min-w-8 px-2 no-underline", !extra.current && "text-text-default"), children: content }));
23
+ return (_jsx("nav", { "aria-label": label, "data-slot": "pagination", className: cn("flex", className), children: _jsxs("ul", { className: "flex flex-wrap items-center gap-1", children: [_jsx("li", { children: link(page - 1, _jsxs(_Fragment, { children: [_jsx(ChevronLeftIcon, { "aria-hidden": true }), _jsx("span", { className: "max-sm:sr-only", children: "Previous" })] }), {
24
+ label: "Previous page",
25
+ disabled: page <= 1,
26
+ }) }), pageItems(page, pageCount, siblingCount).map((item) => typeof item === "number" ? (_jsx("li", { children: link(item, item, { label: `Page ${item}`, current: item === page }) }, item)) : (_jsx("li", { "aria-hidden": true, className: "flex min-w-8 justify-center text-text-secondary", children: "\u2026" }, item))), _jsx("li", { children: link(page + 1, _jsxs(_Fragment, { children: [_jsx("span", { className: "max-sm:sr-only", children: "Next" }), _jsx(ChevronRightIcon, { "aria-hidden": true })] }), {
27
+ label: "Next page",
28
+ disabled: page >= pageCount,
29
+ }) })] }) }));
30
+ }
@@ -0,0 +1,13 @@
1
+ import type * as React from "react";
2
+ import { type DialogProps as DialogPrimitiveProps, type DialogTriggerProps, Heading, type PopoverProps as PopoverPrimitiveProps } from "react-aria-components";
3
+ export declare function Popover(props: DialogTriggerProps): React.JSX.Element;
4
+ /** Shared look for floating panels: Popover, DropdownMenu, Select and Combobox lists. */
5
+ export declare const floatingPanel: string;
6
+ export type PopoverContentProps = Omit<PopoverPrimitiveProps, "className" | "style" | "children"> & {
7
+ className?: string;
8
+ /** Accessible name when there's no PopoverTitle. */
9
+ "aria-label"?: string;
10
+ children: DialogPrimitiveProps["children"];
11
+ };
12
+ export declare function PopoverContent({ className, children, offset, "aria-label": ariaLabel, ...props }: PopoverContentProps): React.JSX.Element;
13
+ export declare function PopoverTitle({ className, level, ...props }: Omit<React.ComponentProps<typeof Heading>, "slot">): React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog as DialogPrimitive, DialogTrigger, Heading, OverlayArrow, Popover as PopoverPrimitive, } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ /*
6
+ * Adapted from shadcn/ui (aria-nova). Copyright (c) 2023 shadcn. MIT licence.
7
+ *
8
+ * Figma contract: Popover, PopoverContent { placement }, PopoverTitle
9
+ *
10
+ * <Popover>
11
+ * <Button variant="secondary">Filters</Button>
12
+ * <PopoverContent><PopoverTitle>Filters</PopoverTitle>…</PopoverContent>
13
+ * </Popover>
14
+ *
15
+ * Non-modal: focus moves in, Escape or clicking outside closes it, and focus
16
+ * returns to the trigger. Give it a PopoverTitle or an aria-label.
17
+ */
18
+ export function Popover(props) {
19
+ return _jsx(DialogTrigger, { ...props });
20
+ }
21
+ /** Shared look for floating panels: Popover, DropdownMenu, Select and Combobox lists. */
22
+ export const floatingPanel = cn("focus-ring rounded-md border border-border-default bg-surface-overlay text-text-default shadow-md", "transition-opacity duration-(--gw-motion-duration-fade) data-entering:opacity-0 data-exiting:opacity-0");
23
+ export function PopoverContent({ className, children, offset = 8, "aria-label": ariaLabel, ...props }) {
24
+ return (_jsxs(PopoverPrimitive, { "data-slot": "popover", offset: offset, className: cn(floatingPanel, "w-72 max-w-[calc(100vw-2rem)]"), ...props, children: [_jsx(OverlayArrow, { "data-slot": "popover-arrow", className: "group", children: _jsx("svg", { "aria-hidden": true, width: 12, height: 12, viewBox: "0 0 12 12", className: "block fill-surface-overlay stroke-border-default group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90", children: _jsx("path", { d: "M0 0 L6 6 L12 0" }) }) }), _jsx(DialogPrimitive, { "data-slot": "popover-dialog", "aria-label": ariaLabel, className: cn("focus-ring flex flex-col gap-3 p-4 text-body", className), children: children })] }));
25
+ }
26
+ export function PopoverTitle({ className, level = 2, ...props }) {
27
+ return (_jsx(Heading, { slot: "title", level: level, "data-slot": "popover-title", className: cn("text-md leading-heading font-semibold", className), ...props }));
28
+ }
@@ -0,0 +1,9 @@
1
+ import { type ProgressBarProps as ProgressBarPrimitiveProps } from "react-aria-components";
2
+ export type ProgressProps = Omit<ProgressBarPrimitiveProps, "className" | "style" | "children"> & {
3
+ /** Visible label. */
4
+ label: string;
5
+ /** Show the percentage next to the label. Defaults to true. */
6
+ showValue?: boolean;
7
+ className?: string;
8
+ };
9
+ export declare function Progress({ label, showValue, className, ...props }: ProgressProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ProgressBar } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { FieldLabel } from "./field.js";
6
+ export function Progress({ label, showValue = true, className, ...props }) {
7
+ return (_jsx(ProgressBar, { "data-slot": "progress", className: cn("flex w-full flex-col gap-1", className), ...props, children: ({ percentage, valueText, isIndeterminate }) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [_jsx(FieldLabel, { children: label }), showValue && !isIndeterminate ? _jsx("span", { className: "text-sm text-text-secondary tabular-nums", children: valueText }) : null] }), _jsx("div", { className: "relative h-2 w-full overflow-hidden rounded-full bg-surface-subtle outline outline-1 -outline-offset-1 outline-border-input", children: _jsx("div", { "data-slot": "progress-fill", className: cn("absolute inset-y-0 start-0 rounded-full bg-action-primary-bg", isIndeterminate && "w-1/3 animate-pulse motion-reduce:animate-none"), style: isIndeterminate ? undefined : { width: `${percentage ?? 0}%` } }) })] })) }));
8
+ }
@@ -0,0 +1,18 @@
1
+ import type * as React from "react";
2
+ import { type RadioGroupProps as RadioGroupPrimitiveProps, type RadioProps as RadioPrimitiveProps } from "react-aria-components";
3
+ export type RadioGroupProps = Omit<RadioGroupPrimitiveProps, "className" | "style" | "children"> & {
4
+ /** Visible label for the group. */
5
+ label: string;
6
+ description?: string;
7
+ errorMessage?: string;
8
+ className?: string;
9
+ /** Radio elements. */
10
+ children: React.ReactNode;
11
+ };
12
+ export declare function RadioGroup({ label, description, errorMessage, className, children, orientation, ...props }: RadioGroupProps): React.JSX.Element;
13
+ export type RadioProps = Omit<RadioPrimitiveProps, "className" | "style" | "children"> & {
14
+ /** Visible label. */
15
+ children: React.ReactNode;
16
+ className?: string;
17
+ };
18
+ export declare function Radio({ className, children, ...props }: RadioProps): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { composeRenderProps, Radio as RadioPrimitive, RadioGroup as RadioGroupPrimitive, } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { selectionIndicator, selectionRow } from "./checkbox.js";
6
+ import { FieldDescription, FieldErrorText, FieldLabel } from "./field.js";
7
+ export function RadioGroup({ label, description, errorMessage, className, children, orientation = "vertical", ...props }) {
8
+ return (_jsxs(RadioGroupPrimitive, { "data-slot": "radio-group", orientation: orientation, className: cn("flex flex-col gap-1", className), ...props, children: [_jsxs(FieldLabel, { elementType: "span", children: [label, props.isRequired ? _jsx("span", { className: "text-text-secondary", children: " (required)" }) : null] }), description ? _jsx(FieldDescription, { children: description }) : null, _jsx("div", { className: cn("flex", orientation === "horizontal" ? "flex-row flex-wrap gap-x-6" : "flex-col"), children: children }), _jsx(FieldErrorText, { children: errorMessage })] }));
9
+ }
10
+ export function Radio({ className, children, ...props }) {
11
+ return (_jsx(RadioPrimitive, { "data-slot": "radio", className: cn(selectionRow, className), ...props, children: composeRenderProps(children, (label, { isSelected }) => (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "radio-indicator", className: cn(selectionIndicator, "size-5 rounded-full", "group-data-selected/selection:border-action-primary-bg"), children: isSelected ? _jsx("span", { className: "size-2.5 rounded-full bg-action-primary-bg" }) : null }), _jsx("span", { children: label })] }))) }));
12
+ }
@@ -0,0 +1,5 @@
1
+ import { type SeparatorProps as SeparatorPrimitiveProps } from "react-aria-components";
2
+ export type SeparatorProps = Omit<SeparatorPrimitiveProps, "className" | "style"> & {
3
+ className?: string;
4
+ };
5
+ export declare function Separator({ orientation, className, ...props }: SeparatorProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Separator as SeparatorPrimitive } from "react-aria-components";
3
+ import { cn } from "../lib/utils.js";
4
+ export function Separator({ orientation = "horizontal", className, ...props }) {
5
+ return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: cn("shrink-0 border-0 bg-border-default", orientation === "horizontal" ? "h-px w-full" : "w-px self-stretch", className), ...props }));
6
+ }
@@ -0,0 +1,20 @@
1
+ import type * as React from "react";
2
+ import { type DialogProps as DialogPrimitiveProps, type DialogTriggerProps, type ModalOverlayProps } from "react-aria-components";
3
+ import { DialogBody, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "./dialog.js";
4
+ export declare function Sheet(props: DialogTriggerProps): React.JSX.Element;
5
+ export type SheetSide = "right" | "left" | "top" | "bottom";
6
+ export type SheetContentProps = Omit<ModalOverlayProps, "className" | "style" | "children"> & {
7
+ /** Which edge it slides in from. Defaults to right. */
8
+ side?: SheetSide;
9
+ /** Show a close button in the corner. Defaults to true. */
10
+ showCloseButton?: boolean;
11
+ className?: string;
12
+ children: DialogPrimitiveProps["children"];
13
+ };
14
+ export declare function SheetContent({ side, showCloseButton, className, children, isDismissable, ...props }: SheetContentProps): React.JSX.Element;
15
+ export declare const SheetHeader: typeof DialogHeader;
16
+ export declare const SheetTitle: typeof DialogTitle;
17
+ export declare const SheetDescription: typeof DialogDescription;
18
+ export declare const SheetBody: typeof DialogBody;
19
+ /** Sits at the bottom of the sheet. */
20
+ export declare function SheetFooter({ className, ...props }: React.ComponentProps<typeof DialogFooter>): React.JSX.Element;
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { XIcon } from "lucide-react";
4
+ import { Button as ButtonPrimitive, Dialog as DialogPrimitive, Modal, ModalOverlay, } from "react-aria-components";
5
+ import { cn } from "../lib/utils.js";
6
+ import { Dialog, DialogBody, DialogDescription, DialogFooter, DialogHeader, DialogTitle, modalOverlay, useDialogDescription, } from "./dialog.js";
7
+ /*
8
+ * Adapted from shadcn/ui (aria-nova). Copyright (c) 2023 shadcn. MIT licence.
9
+ *
10
+ * Figma contract: Sheet, SheetContent { side: right | left | top | bottom; showCloseButton }, SheetHeader,
11
+ * SheetTitle, SheetDescription, SheetBody, SheetFooter
12
+ *
13
+ * A dialog that slides in from the edge of the screen, for longer tasks like
14
+ * filters or editing a record. Same structure and focus handling as Dialog.
15
+ */
16
+ export function Sheet(props) {
17
+ return _jsx(Dialog, { ...props });
18
+ }
19
+ const sides = {
20
+ right: "inset-y-0 right-0 h-full w-full max-w-md border-l data-entering:translate-x-full data-exiting:translate-x-full",
21
+ left: "inset-y-0 left-0 h-full w-full max-w-md border-r data-entering:-translate-x-full data-exiting:-translate-x-full",
22
+ top: "inset-x-0 top-0 max-h-[80dvh] w-full border-b data-entering:-translate-y-full data-exiting:-translate-y-full",
23
+ bottom: "inset-x-0 bottom-0 max-h-[80dvh] w-full border-t data-entering:translate-y-full data-exiting:translate-y-full",
24
+ };
25
+ export function SheetContent({ side = "right", showCloseButton = true, className, children, isDismissable = true, ...props }) {
26
+ const description = useDialogDescription();
27
+ return (_jsx(ModalOverlay, { "data-slot": "sheet-overlay", isDismissable: isDismissable, className: cn(modalOverlay, "block p-0"), ...props, children: _jsx(Modal, { "data-slot": "sheet", "data-side": side, className: cn("fixed overflow-y-auto border-border-default bg-surface-overlay text-body text-text-default shadow-lg",
28
+ // Slides under normal motion; under reduced motion the global rule leaves only the overlay's fade.
29
+ "transition-transform duration-(--gw-motion-duration-normal) motion-reduce:transition-none", sides[side]), children: _jsx(DialogPrimitive, { "data-slot": "sheet-dialog", "aria-describedby": description.descriptionId, className: cn("focus-ring relative flex min-h-full flex-col gap-4 p-6", className), children: (renderProps) => (_jsxs(description.Provider, { value: description.setDescriptionId, children: [typeof children === "function" ? children(renderProps) : children, showCloseButton ? (_jsx(ButtonPrimitive, { slot: "close", "aria-label": "Close", "data-slot": "sheet-close", className: "focus-ring hit-area absolute top-4 right-4 flex size-8 cursor-pointer items-center justify-center rounded-md text-icon-default hover:bg-action-ghost-bg-hover", children: _jsx(XIcon, { "aria-hidden": true, className: "size-4" }) })) : null] })) }) }) }));
30
+ }
31
+ export const SheetHeader = DialogHeader;
32
+ export const SheetTitle = DialogTitle;
33
+ export const SheetDescription = DialogDescription;
34
+ export const SheetBody = DialogBody;
35
+ /** Sits at the bottom of the sheet. */
36
+ export function SheetFooter({ className, ...props }) {
37
+ return _jsx(DialogFooter, { className: cn("mt-auto", className), ...props });
38
+ }
@@ -0,0 +1,2 @@
1
+ import type * as React from "react";
2
+ export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ /*
4
+ * Adapted from shadcn/ui (aria-nova). Copyright (c) 2023 shadcn. MIT licence.
5
+ *
6
+ * Figma contract: Skeleton { className sets the size and shape }
7
+ *
8
+ * A placeholder shape while content loads. It's hidden from assistive tech:
9
+ * mark the region that's loading with aria-busy="true", and announce when it's
10
+ * ready if that matters.
11
+ */
12
+ export function Skeleton({ className, ...props }) {
13
+ return (_jsx("div", { "data-slot": "skeleton", "aria-hidden": true, className: cn("animate-pulse rounded-md bg-surface-subtle motion-reduce:animate-none", className), ...props }));
14
+ }
@@ -0,0 +1,12 @@
1
+ import { type SliderProps as SliderPrimitiveProps } from "react-aria-components";
2
+ export type SliderProps<T extends number | number[] = number> = Omit<SliderPrimitiveProps<T>, "className" | "style" | "children" | "orientation"> & {
3
+ /** Visible label. */
4
+ label: string;
5
+ description?: string;
6
+ /** Show the current value next to the label. Defaults to true. */
7
+ showValue?: boolean;
8
+ /** Accessible names for the thumbs of a range, e.g. ["Minimum", "Maximum"]. */
9
+ thumbLabels?: string[];
10
+ className?: string;
11
+ };
12
+ export declare function Slider<T extends number | number[] = number>({ label, description, showValue, thumbLabels, className, ...props }: SliderProps<T>): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Slider as SliderPrimitive, SliderFill, SliderOutput, SliderThumb, SliderTrack, } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { FieldDescription, FieldLabel } from "./field.js";
6
+ export function Slider({ label, description, showValue = true, thumbLabels, className, ...props }) {
7
+ return (_jsxs(SliderPrimitive, { "data-slot": "slider", className: cn("flex flex-col gap-1", className), ...props, children: [_jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [_jsx(FieldLabel, { children: label }), showValue ? (_jsx(SliderOutput, { "data-slot": "slider-output", className: "text-sm text-text-secondary tabular-nums" })) : null] }), description ? _jsx(FieldDescription, { children: description }) : null, _jsx(SliderTrack, { "data-slot": "slider-track", className: "group/track relative flex h-target-min w-full items-center", children: ({ state }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: "absolute inset-x-0 h-1.5 rounded-full bg-border-input" }), _jsx(SliderFill, { "data-slot": "slider-fill", className: "before:absolute before:inset-x-0 before:top-1/2 before:h-1.5 before:-translate-y-1/2 before:rounded-full before:bg-action-primary-bg" }), state.values.map((_, index) => (_jsx(SliderThumb, { index: index, "aria-label": thumbLabels?.[index], "data-slot": "slider-thumb", className: cn("hit-area top-1/2 size-5 cursor-grab rounded-full border-2 border-action-primary-bg bg-surface-default", "data-dragging:cursor-grabbing data-focus-visible:focus-ring-drawn", "group-data-disabled/track:cursor-not-allowed group-data-disabled/track:opacity-50") }, index)))] })) })] }));
8
+ }
@@ -0,0 +1,14 @@
1
+ declare const sizes: {
2
+ readonly sm: "size-4";
3
+ readonly md: "size-6";
4
+ readonly lg: "size-8";
5
+ };
6
+ export type SpinnerProps = {
7
+ /** Read out to screen readers. Defaults to "Loading". */
8
+ label?: string;
9
+ /** Defaults to md. */
10
+ size?: keyof typeof sizes;
11
+ className?: string;
12
+ };
13
+ export declare function Spinner({ label, size, className }: SpinnerProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LoaderCircleIcon } from "lucide-react";
3
+ import { cn } from "../lib/utils.js";
4
+ /*
5
+ * Adapted from shadcn/ui (aria-nova). Copyright (c) 2023 shadcn. MIT licence.
6
+ *
7
+ * Figma contract: Spinner { size: sm | md | lg; label }
8
+ *
9
+ * Shows that something is loading. It has role="status" and a label, which
10
+ * screen readers announce. Under reduced motion it stops turning.
11
+ */
12
+ const sizes = { sm: "size-4", md: "size-6", lg: "size-8" };
13
+ export function Spinner({ label = "Loading", size = "md", className }) {
14
+ return (_jsx("span", { "data-slot": "spinner", role: "status", "aria-label": label, className: cn("inline-flex text-icon-brand", className), children: _jsx(LoaderCircleIcon, { "aria-hidden": true, className: cn("animate-spin motion-reduce:animate-none", sizes[size]) }) }));
15
+ }
@@ -0,0 +1,8 @@
1
+ import type * as React from "react";
2
+ import { type SwitchProps as SwitchPrimitiveProps } from "react-aria-components";
3
+ export type SwitchProps = Omit<SwitchPrimitiveProps, "className" | "style" | "children"> & {
4
+ /** Visible label. */
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ };
8
+ export declare function Switch({ className, children, ...props }: SwitchProps): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { composeRenderProps, Switch as SwitchPrimitive, } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { selectionRow } from "./checkbox.js";
6
+ export function Switch({ className, children, ...props }) {
7
+ return (_jsx(SwitchPrimitive, { "data-slot": "switch", className: cn(selectionRow, className), ...props, children: composeRenderProps(children, (label) => (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "switch-track", className: cn("flex h-6 w-10 shrink-0 items-center rounded-full border-2 border-border-input bg-surface-default p-0.5", "transition-colors duration-(--gw-motion-duration-fast)", "group-data-selected/selection:border-action-primary-bg group-data-selected/selection:bg-action-primary-bg", "group-data-focus-visible/selection:focus-ring-drawn"), children: _jsx("span", { "data-slot": "switch-thumb", className: cn("size-4 rounded-full bg-icon-default transition-transform duration-(--gw-motion-duration-fast)", "group-data-selected/selection:translate-x-4 group-data-selected/selection:bg-text-on-primary") }) }), _jsx("span", { children: label })] }))) }));
8
+ }
@@ -5,7 +5,7 @@ import { Cell as CellPrimitive, Column as ColumnPrimitive, Row as RowPrimitive,
5
5
  import { cn } from "../lib/utils.js";
6
6
  const DensityContext = React.createContext("comfortable");
7
7
  export function Table({ className, density = "comfortable", ...props }) {
8
- return (_jsx(DensityContext.Provider, { value: density, children: _jsx("div", { "data-slot": "table-container", className: "w-full overflow-x-auto rounded-md border border-border-default", children: _jsx(TablePrimitive, { "data-slot": "table", "data-density": density, className: cn("w-full border-collapse text-left text-md text-text-default", className), ...props }) }) }));
8
+ return (_jsx(DensityContext.Provider, { value: density, children: _jsx("div", { "data-slot": "table-container", className: "w-full overflow-x-auto rounded-md border border-border-default", children: _jsx(TablePrimitive, { "data-slot": "table", "data-density": density, className: cn("w-full border-collapse text-left text-body text-text-default", className), ...props }) }) }));
9
9
  }
10
10
  export function TableHeader({ className, ...props }) {
11
11
  return (_jsx(TableHeaderPrimitive, { "data-slot": "table-header", className: cn("border-b border-border-default bg-surface-subtle", className), ...props }));
@@ -0,0 +1,17 @@
1
+ import { type TabListProps as TabListPrimitiveProps, type TabPanelProps as TabPanelPrimitiveProps, type TabProps as TabPrimitiveProps, type TabsProps as TabsPrimitiveProps } from "react-aria-components";
2
+ export type TabsProps = Omit<TabsPrimitiveProps, "className" | "style"> & {
3
+ className?: string;
4
+ };
5
+ export declare function Tabs({ className, ...props }: TabsProps): import("react").JSX.Element;
6
+ export type TabListProps<T extends object> = Omit<TabListPrimitiveProps<T>, "className" | "style"> & {
7
+ className?: string;
8
+ };
9
+ export declare function TabList<T extends object>({ className, ...props }: TabListProps<T>): import("react").JSX.Element;
10
+ export type TabProps = Omit<TabPrimitiveProps, "className" | "style"> & {
11
+ className?: string;
12
+ };
13
+ export declare function Tab({ className, ...props }: TabProps): import("react").JSX.Element;
14
+ export type TabPanelProps = Omit<TabPanelPrimitiveProps, "className" | "style"> & {
15
+ className?: string;
16
+ };
17
+ export declare function TabPanel({ className, ...props }: TabPanelProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Tab as TabPrimitive, TabList as TabListPrimitive, TabPanel as TabPanelPrimitive, Tabs as TabsPrimitive, } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ export function Tabs({ className, ...props }) {
6
+ return (_jsx(TabsPrimitive, { "data-slot": "tabs", className: cn("flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row", className), ...props }));
7
+ }
8
+ export function TabList({ className, ...props }) {
9
+ return (_jsx(TabListPrimitive, { "data-slot": "tab-list", className: cn("group/tablist flex data-[orientation=horizontal]:overflow-x-auto data-[orientation=horizontal]:border-b data-[orientation=horizontal]:border-border-default", "data-[orientation=vertical]:flex-col data-[orientation=vertical]:border-e data-[orientation=vertical]:border-border-default", className), ...props }));
10
+ }
11
+ export function Tab({ className, ...props }) {
12
+ return (_jsx(TabPrimitive, { "data-slot": "tab", className: cn("relative flex min-h-target-min cursor-pointer items-center px-4 text-md font-medium whitespace-nowrap text-text-secondary outline-none", "hover:text-text-default data-selected:text-text-default", "data-focus-visible:outline-2 data-focus-visible:outline-solid data-focus-visible:-outline-offset-2 data-focus-visible:outline-focus-ring", "data-disabled:cursor-not-allowed data-disabled:opacity-50",
13
+ // The selected bar: a shape cue, not only colour.
14
+ "after:absolute after:bg-transparent data-selected:after:bg-action-primary-bg", "group-data-[orientation=horizontal]/tablist:after:inset-x-0 group-data-[orientation=horizontal]/tablist:after:-bottom-px group-data-[orientation=horizontal]/tablist:after:h-0.5", "group-data-[orientation=vertical]/tablist:after:inset-y-0 group-data-[orientation=vertical]/tablist:after:-end-px group-data-[orientation=vertical]/tablist:after:w-0.5", className), ...props }));
15
+ }
16
+ export function TabPanel({ className, ...props }) {
17
+ return _jsx(TabPanelPrimitive, { "data-slot": "tab-panel", className: cn("focus-ring flex-1 rounded-sm text-body", className), ...props });
18
+ }
@@ -0,0 +1,16 @@
1
+ import type * as React from "react";
2
+ import { type TextFieldProps } from "react-aria-components";
3
+ export type TextareaProps = Omit<TextFieldProps, "className" | "style" | "children"> & {
4
+ /** Visible label. Required: placeholders never replace labels. */
5
+ label: string;
6
+ /** Help text under the label, linked to the textarea. */
7
+ description?: string;
8
+ /** Shown as text under the textarea when isInvalid is true, and linked to it. */
9
+ errorMessage?: string;
10
+ placeholder?: string;
11
+ /** Minimum visible lines. The textarea grows with its content. Defaults to 3. */
12
+ rows?: number;
13
+ className?: string;
14
+ textareaRef?: React.Ref<HTMLTextAreaElement>;
15
+ };
16
+ export declare function Textarea({ label, description, errorMessage, placeholder, rows, className, textareaRef, ...props }: TextareaProps): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { TextArea as TextAreaPrimitive, TextField } from "react-aria-components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { FieldDescription, FieldErrorText, FieldLabel, fieldControl } from "./field.js";
6
+ export function Textarea({ label, description, errorMessage, placeholder, rows = 3, className, textareaRef, ...props }) {
7
+ return (_jsxs(TextField, { "data-slot": "textarea-field", className: cn("flex flex-col gap-1", className), ...props, children: [_jsxs(FieldLabel, { children: [label, props.isRequired ? _jsx("span", { className: "text-text-secondary", children: " (required)" }) : null] }), description ? _jsx(FieldDescription, { children: description }) : null, _jsx(TextAreaPrimitive, { ref: textareaRef, "data-slot": "textarea", rows: rows, placeholder: placeholder, className: cn(fieldControl, "focus-ring field-sizing-content py-2 leading-body placeholder:text-text-placeholder") }), _jsx(FieldErrorText, { children: errorMessage })] }));
8
+ }
@@ -0,0 +1,24 @@
1
+ import type * as React from "react";
2
+ import { UNSTABLE_ToastQueue as ToastQueue } from "react-aria-components";
3
+ export type ToastVariant = "info" | "success" | "warning" | "error";
4
+ export type ToastContent = {
5
+ title: string;
6
+ description?: string;
7
+ /** Sets the icon. Defaults to info. */
8
+ variant?: ToastVariant;
9
+ };
10
+ /** The app-wide queue <Toaster /> shows. */
11
+ export declare const toastQueue: ToastQueue<ToastContent>;
12
+ /**
13
+ * Shows a toast. Returns its key, for toastQueue.close(key).
14
+ * timeout is in milliseconds; errors default to staying until dismissed.
15
+ */
16
+ export declare function toast(content: ToastContent, options?: {
17
+ timeout?: number;
18
+ }): string;
19
+ export type ToasterProps = {
20
+ /** Names the landmark. Defaults to "Notifications". */
21
+ "aria-label"?: string;
22
+ className?: string;
23
+ };
24
+ export declare function Toaster({ "aria-label": label, className }: ToasterProps): React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon } from "lucide-react";
4
+ import { Button as ButtonPrimitive, Text, UNSTABLE_Toast as ToastPrimitive, UNSTABLE_ToastContent as ToastContentPrimitive, UNSTABLE_ToastQueue as ToastQueue, UNSTABLE_ToastRegion as ToastRegion, } from "react-aria-components";
5
+ import { cn } from "../lib/utils.js";
6
+ /** The app-wide queue <Toaster /> shows. */
7
+ export const toastQueue = new ToastQueue({ maxVisibleToasts: 3 });
8
+ /**
9
+ * Shows a toast. Returns its key, for toastQueue.close(key).
10
+ * timeout is in milliseconds; errors default to staying until dismissed.
11
+ */
12
+ export function toast(content, options = {}) {
13
+ const timeout = options.timeout ?? (content.variant === "error" ? undefined : 8000);
14
+ return toastQueue.add(content, { timeout });
15
+ }
16
+ const icons = {
17
+ info: { icon: InfoIcon, className: "text-text-info" },
18
+ success: { icon: CircleCheckIcon, className: "text-text-success" },
19
+ warning: { icon: TriangleAlertIcon, className: "text-text-warning" },
20
+ error: { icon: CircleAlertIcon, className: "text-text-error" },
21
+ };
22
+ export function Toaster({ "aria-label": label = "Notifications", className }) {
23
+ return (_jsx(ToastRegion, { queue: toastQueue, "aria-label": label, "data-slot": "toaster", className: cn("fixed end-4 bottom-4 z-50 flex w-[min(24rem,calc(100vw-2rem))] flex-col-reverse gap-2 outline-none", "data-focus-visible:focus-ring-drawn rounded-lg", className), children: ({ toast: item }) => {
24
+ const variant = item.content.variant ?? "info";
25
+ const { icon: Icon, className: iconClass } = icons[variant];
26
+ return (_jsxs(ToastPrimitive, { toast: item, "data-slot": "toast", "data-variant": variant, className: cn("flex items-start gap-3 rounded-md border border-border-default bg-surface-overlay p-4 text-body text-text-default shadow-lg outline-none", "data-focus-visible:focus-ring-drawn"), children: [_jsx(Icon, { "aria-hidden": true, className: cn("mt-0.5 size-5 shrink-0", iconClass) }), _jsxs(ToastContentPrimitive, { className: "flex min-w-0 flex-1 flex-col gap-1", children: [_jsx(Text, { slot: "title", className: "font-semibold", children: item.content.title }), item.content.description ? (_jsx(Text, { slot: "description", className: "text-text-secondary", children: item.content.description })) : null] }), _jsx(ButtonPrimitive, { slot: "close", "aria-label": "Dismiss", className: "focus-ring hit-area -m-1 flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-icon-default hover:bg-action-ghost-bg-hover", children: _jsx(XIcon, { "aria-hidden": true, className: "size-4" }) })] }));
27
+ } }));
28
+ }
@@ -0,0 +1,14 @@
1
+ import { type ToggleButtonProps as TogglePrimitiveProps } from "react-aria-components";
2
+ export declare const toggleVariants: (props?: ({
3
+ variant?: "secondary" | "ghost" | null | undefined;
4
+ size?: "sm" | "md" | "lg" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export type ToggleVariant = "ghost" | "secondary";
7
+ export type ToggleProps = Omit<TogglePrimitiveProps, "className" | "style"> & {
8
+ /** Visual style. Defaults to ghost. */
9
+ variant?: ToggleVariant;
10
+ /** Visual size. Every size keeps a hit area of at least 44 × 44px. Defaults to md. */
11
+ size?: "sm" | "md" | "lg";
12
+ className?: string;
13
+ };
14
+ export declare function Toggle({ className, variant, size, children, ...props }: ToggleProps): import("react").JSX.Element;
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { composeRenderProps, ToggleButton as TogglePrimitive, } from "react-aria-components";
5
+ import { cn } from "../lib/utils.js";
6
+ /*
7
+ * Adapted from shadcn/ui (aria-nova). Copyright (c) 2023 shadcn. MIT licence.
8
+ *
9
+ * Figma contract: Toggle { variant: ghost | secondary; size: sm | md | lg; isSelected; isDisabled }
10
+ *
11
+ * A button that stays pressed, like Bold in a text editor. Give icon-only
12
+ * toggles an aria-label.
13
+ */
14
+ export const toggleVariants = cva([
15
+ "focus-ring hit-area inline-flex shrink-0 cursor-pointer items-center justify-center gap-2",
16
+ "rounded-md border border-transparent font-medium whitespace-nowrap text-text-default select-none",
17
+ "transition-colors duration-(--gw-motion-duration-fast)",
18
+ "hover:bg-action-ghost-bg-hover data-selected:bg-action-secondary-bg-hover data-selected:border-border-input",
19
+ "disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50",
20
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
21
+ ], {
22
+ variants: {
23
+ variant: {
24
+ ghost: "bg-transparent",
25
+ secondary: "border-border-input bg-action-secondary-bg",
26
+ },
27
+ size: {
28
+ sm: "h-8 min-w-8 px-2 text-sm [&_svg]:size-4",
29
+ md: "h-10 min-w-10 px-3 text-md [&_svg]:size-4",
30
+ lg: "h-11 min-w-11 px-4 text-lg [&_svg]:size-5",
31
+ },
32
+ },
33
+ defaultVariants: { variant: "ghost", size: "md" },
34
+ });
35
+ export function Toggle({ className, variant = "ghost", size = "md", children, ...props }) {
36
+ return (_jsx(TogglePrimitive, { "data-slot": "toggle", "data-variant": variant, "data-size": size, className: cn(toggleVariants({ variant, size }), className), ...props, children: composeRenderProps(children, (c) => c) }));
37
+ }
@@ -0,0 +1,6 @@
1
+ import { type TooltipProps as TooltipPrimitiveProps, type TooltipTriggerComponentProps } from "react-aria-components";
2
+ export declare function Tooltip({ delay, closeDelay, ...props }: TooltipTriggerComponentProps): import("react").JSX.Element;
3
+ export type TooltipContentProps = Omit<TooltipPrimitiveProps, "className" | "style"> & {
4
+ className?: string;
5
+ };
6
+ export declare function TooltipContent({ className, offset, ...props }: TooltipContentProps): import("react").JSX.Element;