@tangle-network/ui 11.16.11 → 11.19.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/CHANGELOG.md +29 -0
- package/dist/index.d.ts +14 -1
- package/dist/index.js +14 -1
- package/dist/primitives/alert-dialog.d.ts +34 -0
- package/dist/primitives/alert-dialog.js +68 -0
- package/dist/primitives/badge.d.ts +7 -0
- package/dist/primitives/badge.js +3 -3
- package/dist/primitives/checkbox.d.ts +12 -0
- package/dist/primitives/checkbox.js +34 -0
- package/dist/primitives/chip.d.ts +38 -0
- package/dist/primitives/chip.js +41 -0
- package/dist/primitives/collapsible.d.ts +12 -0
- package/dist/primitives/collapsible.js +13 -0
- package/dist/primitives/context-menu.d.ts +36 -0
- package/dist/primitives/context-menu.js +86 -0
- package/dist/primitives/icon-tile.d.ts +32 -0
- package/dist/primitives/icon-tile.js +49 -0
- package/dist/primitives/popover.d.ts +15 -0
- package/dist/primitives/popover.js +25 -0
- package/dist/primitives/separator.d.ts +11 -0
- package/dist/primitives/separator.js +21 -0
- package/dist/primitives/sheet.d.ts +28 -0
- package/dist/primitives/sheet.js +70 -0
- package/dist/primitives/slider.d.ts +14 -0
- package/dist/primitives/slider.js +37 -0
- package/dist/primitives/tag.d.ts +36 -0
- package/dist/primitives/tag.js +42 -0
- package/dist/primitives/theme-toggle.js +8 -0
- package/dist/primitives/tone.d.ts +40 -0
- package/dist/primitives/tone.js +106 -0
- package/dist/primitives/tooltip.d.ts +16 -0
- package/dist/primitives/tooltip.js +32 -0
- package/dist/primitives.d.ts +14 -1
- package/dist/primitives.js +14 -1
- package/package.json +9 -2
- package/src/primitives/alert-dialog.tsx +139 -0
- package/src/primitives/badge.tsx +17 -4
- package/src/primitives/checkbox-separator-sheet-tooltip.stories.tsx +92 -0
- package/src/primitives/checkbox-separator-sheet-tooltip.test.tsx +107 -0
- package/src/primitives/checkbox.tsx +42 -0
- package/src/primitives/chip.test.tsx +178 -0
- package/src/primitives/chip.tsx +108 -0
- package/src/primitives/collapsible.tsx +16 -0
- package/src/primitives/context-menu.tsx +168 -0
- package/src/primitives/icon-tile.stories.tsx +74 -0
- package/src/primitives/icon-tile.tsx +96 -0
- package/src/primitives/index.ts +69 -0
- package/src/primitives/popover-collapsible-alert-dialog-context-menu-slider.stories.tsx +124 -0
- package/src/primitives/popover-collapsible-alert-dialog-context-menu-slider.test.tsx +165 -0
- package/src/primitives/popover.tsx +45 -0
- package/src/primitives/separator.tsx +30 -0
- package/src/primitives/sheet.tsx +134 -0
- package/src/primitives/slider.tsx +71 -0
- package/src/primitives/tag-chip.stories.tsx +226 -0
- package/src/primitives/tag.tsx +94 -0
- package/src/primitives/theme-toggle.test.tsx +2 -1
- package/src/primitives/theme-toggle.tsx +2 -0
- package/src/primitives/tone.ts +130 -0
- package/src/primitives/tooltip.tsx +54 -0
- package/src/stories/theme-showcase.stories.tsx +2 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { TONE_CLASSES, toneFor } from "./tone.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/icon-tile.tsx
|
|
6
|
+
const SIZE = {
|
|
7
|
+
xs: "size-5 rounded-[5px] text-[10px] [&_svg]:size-3",
|
|
8
|
+
sm: "size-6 rounded-md text-[11px] [&_svg]:size-3.5",
|
|
9
|
+
md: "size-8 rounded-md text-xs [&_svg]:size-4",
|
|
10
|
+
lg: "size-10 rounded-lg text-sm [&_svg]:size-5"
|
|
11
|
+
};
|
|
12
|
+
/** Up to two initials: the first letters of the first two words, or of the one word. */
|
|
13
|
+
function initialsOf(name) {
|
|
14
|
+
const words = name.trim().split(/[\s._-]+/u).filter(Boolean);
|
|
15
|
+
if (words.length === 0) return "";
|
|
16
|
+
const first = (word) => Array.from(word)[0] ?? "";
|
|
17
|
+
return (words.length === 1 ? Array.from(words[0]).slice(0, 2).join("") : first(words[0]) + first(words[1])).toLocaleUpperCase();
|
|
18
|
+
}
|
|
19
|
+
const IconTile = React.forwardRef(({ className, tone, size = "md", src, icon, name, label, ...props }, ref) => {
|
|
20
|
+
const [failedSrc, setFailedSrc] = React.useState(null);
|
|
21
|
+
const imgRef = React.useRef(null);
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
const img = imgRef.current;
|
|
24
|
+
if (img?.complete && img.naturalWidth === 0 && src) setFailedSrc(src);
|
|
25
|
+
}, [src]);
|
|
26
|
+
const resolvedTone = tone ?? (name ? toneFor(name) : "violet");
|
|
27
|
+
const classes = TONE_CLASSES[resolvedTone];
|
|
28
|
+
const showImage = Boolean(src) && failedSrc !== src;
|
|
29
|
+
const initials = name ? initialsOf(name) : "";
|
|
30
|
+
return /* @__PURE__ */ jsx("span", {
|
|
31
|
+
ref,
|
|
32
|
+
role: label ? "img" : void 0,
|
|
33
|
+
"aria-label": label,
|
|
34
|
+
"aria-hidden": label ? void 0 : true,
|
|
35
|
+
className: cn("inline-flex shrink-0 select-none items-center justify-center overflow-hidden border font-semibold", SIZE[size], showImage ? "border-[var(--border-subtle)] bg-[var(--surface-neutral-bg)]" : classes.surface, !showImage && icon ? classes.icon : null, className),
|
|
36
|
+
...props,
|
|
37
|
+
children: showImage ? /* @__PURE__ */ jsx("img", {
|
|
38
|
+
ref: imgRef,
|
|
39
|
+
src,
|
|
40
|
+
alt: "",
|
|
41
|
+
className: "size-full object-cover",
|
|
42
|
+
onError: () => setFailedSrc(src ?? null),
|
|
43
|
+
draggable: false
|
|
44
|
+
}) : icon ? icon : initials
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
IconTile.displayName = "IconTile";
|
|
48
|
+
//#endregion
|
|
49
|
+
export { IconTile, initialsOf };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
//#region src/primitives/popover.d.ts
|
|
4
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
5
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
/**
|
|
9
|
+
* A floating card anchored to its trigger, on the same surface, border and
|
|
10
|
+
* shadow as `DropdownMenuContent`. Width defaults to 18rem; pass a width class
|
|
11
|
+
* for wider content and keep long text wrapping inside it.
|
|
12
|
+
*/
|
|
13
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
6
|
+
//#region src/primitives/popover.tsx
|
|
7
|
+
const Popover = PopoverPrimitive.Root;
|
|
8
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
9
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
10
|
+
const PopoverClose = PopoverPrimitive.Close;
|
|
11
|
+
/**
|
|
12
|
+
* A floating card anchored to its trigger, on the same surface, border and
|
|
13
|
+
* shadow as `DropdownMenuContent`. Width defaults to 18rem; pass a width class
|
|
14
|
+
* for wider content and keep long text wrapping inside it.
|
|
15
|
+
*/
|
|
16
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
17
|
+
ref,
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
className: cn("z-50 w-72 max-w-[calc(100vw-2rem)] origin-(--radix-popover-content-transform-origin) rounded-xl border border-border bg-card p-4 text-foreground shadow-[var(--shadow-card)] outline-hidden", "data-[state=closed]:animate-out data-[state=open]:animate-in", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "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", "motion-reduce:animate-none", className),
|
|
21
|
+
...props
|
|
22
|
+
}) }));
|
|
23
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
//#region src/primitives/separator.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A hairline rule on the border token. Decorative by default, so assistive
|
|
6
|
+
* technology skips it; pass `decorative={false}` when it separates groups a
|
|
7
|
+
* screen reader should announce.
|
|
8
|
+
*/
|
|
9
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Separator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
6
|
+
//#region src/primitives/separator.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A hairline rule on the border token. Decorative by default, so assistive
|
|
9
|
+
* technology skips it; pass `decorative={false}` when it separates groups a
|
|
10
|
+
* screen reader should announce.
|
|
11
|
+
*/
|
|
12
|
+
const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
13
|
+
ref,
|
|
14
|
+
decorative,
|
|
15
|
+
orientation,
|
|
16
|
+
className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className),
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Separator };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
//#region src/primitives/sheet.d.ts
|
|
5
|
+
/** A dialog that slides in from an edge: a mobile nav drawer or a side panel. */
|
|
6
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
7
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
10
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SheetContent: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
12
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
14
|
+
/** Hide only the built-in close button; Escape and outside clicks still dismiss. */
|
|
15
|
+
hideCloseButton?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare function SheetHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
18
|
+
declare namespace SheetHeader {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
declare function SheetFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
22
|
+
declare namespace SheetFooter {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
26
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { focusRing } from "../lib/focus.js";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
8
|
+
import { X } from "lucide-react";
|
|
9
|
+
//#region src/primitives/sheet.tsx
|
|
10
|
+
/** A dialog that slides in from an edge: a mobile nav drawer or a side panel. */
|
|
11
|
+
const Sheet = SheetPrimitive.Root;
|
|
12
|
+
const SheetTrigger = SheetPrimitive.Trigger;
|
|
13
|
+
const SheetClose = SheetPrimitive.Close;
|
|
14
|
+
const SheetPortal = SheetPrimitive.Portal;
|
|
15
|
+
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SheetPrimitive.Overlay, {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("fixed inset-0 z-50 bg-black/40", "data-[state=closed]:animate-out data-[state=open]:animate-in", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
|
|
18
|
+
...props
|
|
19
|
+
}));
|
|
20
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
21
|
+
const sheetVariants = cva([
|
|
22
|
+
"fixed z-50 flex flex-col gap-4 border-border bg-card shadow-lg",
|
|
23
|
+
"data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
24
|
+
"data-[state=closed]:duration-200 data-[state=open]:duration-300 ease-out motion-reduce:animate-none"
|
|
25
|
+
], {
|
|
26
|
+
variants: { side: {
|
|
27
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
28
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
29
|
+
top: "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
30
|
+
bottom: "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
31
|
+
} },
|
|
32
|
+
defaultVariants: { side: "right" }
|
|
33
|
+
});
|
|
34
|
+
const SheetContent = React.forwardRef(({ className, children, side = "right", hideCloseButton = false, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn(sheetVariants({ side }), className),
|
|
37
|
+
...props,
|
|
38
|
+
children: [children, !hideCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
39
|
+
className: cn("absolute top-4 right-4 rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus-visible:opacity-100 disabled:pointer-events-none", focusRing),
|
|
40
|
+
children: [/* @__PURE__ */ jsx(X, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
children: "Close"
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
})] }));
|
|
46
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
47
|
+
const SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn("flex flex-col gap-1.5 p-4 pr-10", className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
SheetHeader.displayName = "SheetHeader";
|
|
52
|
+
const SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
SheetFooter.displayName = "SheetFooter";
|
|
57
|
+
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SheetPrimitive.Title, {
|
|
58
|
+
ref,
|
|
59
|
+
className: cn("font-semibold text-base text-foreground leading-tight", className),
|
|
60
|
+
...props
|
|
61
|
+
}));
|
|
62
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
63
|
+
const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SheetPrimitive.Description, {
|
|
64
|
+
ref,
|
|
65
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
66
|
+
...props
|
|
67
|
+
}));
|
|
68
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
//#region src/primitives/slider.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Range input with one thumb per value. A single value renders one thumb; an
|
|
6
|
+
* array of two renders a range. The thumbs are what assistive technology
|
|
7
|
+
* focuses, so the names go on them: `aria-label` / `aria-labelledby` name a
|
|
8
|
+
* single thumb, and `thumbLabels` names each thumb of a range.
|
|
9
|
+
*/
|
|
10
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
11
|
+
thumbLabels?: string[];
|
|
12
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Slider };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { focusRing } from "../lib/focus.js";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
7
|
+
//#region src/primitives/slider.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Range input with one thumb per value. A single value renders one thumb; an
|
|
10
|
+
* array of two renders a range. The thumbs are what assistive technology
|
|
11
|
+
* focuses, so the names go on them: `aria-label` / `aria-labelledby` name a
|
|
12
|
+
* single thumb, and `thumbLabels` names each thumb of a range.
|
|
13
|
+
*/
|
|
14
|
+
const Slider = React.forwardRef(({ className, defaultValue, value, min = 0, max = 100, thumbLabels, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, ref) => {
|
|
15
|
+
const values = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min];
|
|
16
|
+
const single = values.length === 1;
|
|
17
|
+
return /* @__PURE__ */ jsxs(SliderPrimitive.Root, {
|
|
18
|
+
ref,
|
|
19
|
+
defaultValue,
|
|
20
|
+
value,
|
|
21
|
+
min,
|
|
22
|
+
max,
|
|
23
|
+
className: cn("relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50", "data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
|
|
26
|
+
className: "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5",
|
|
27
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full" })
|
|
28
|
+
}), values.map((_, index) => /* @__PURE__ */ jsx(SliderPrimitive.Thumb, {
|
|
29
|
+
"aria-label": thumbLabels?.[index] ?? (single ? ariaLabel : void 0),
|
|
30
|
+
"aria-labelledby": single && !thumbLabels?.[index] ? ariaLabelledBy : void 0,
|
|
31
|
+
className: cn("block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm transition-[box-shadow] disabled:pointer-events-none", focusRing)
|
|
32
|
+
}, index))]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Slider };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Tone } from "./tone.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/primitives/tag.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A static label for what something IS: a category, a kind, a named value.
|
|
6
|
+
*
|
|
7
|
+
* Tags are squared-off (`rounded-md`) where `StatusPill` is fully round, so a
|
|
8
|
+
* category and a state never share a silhouette even before colour is read.
|
|
9
|
+
* For a state, use `StatusPill`. For a label the user presses, use `Chip`.
|
|
10
|
+
*
|
|
11
|
+
* `onRemove` adds a native remove button after the label — the removable
|
|
12
|
+
* variant, for a recipient, an applied filter or an attached item. The tag
|
|
13
|
+
* itself stays non-interactive, so the remove button is the only tab stop.
|
|
14
|
+
* Removing a tag unmounts its focused button; move focus to the next tag or
|
|
15
|
+
* the input that adds tags, or keyboard focus falls to the page.
|
|
16
|
+
*/
|
|
17
|
+
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
/** Categorical tone, or `neutral` (the default) for an uncategorised label. */
|
|
20
|
+
tone?: Tone;
|
|
21
|
+
/** `soft` fills the tag; `outline` keeps only the border, for dense rows. */
|
|
22
|
+
emphasis?: "soft" | "outline";
|
|
23
|
+
size?: "sm" | "md";
|
|
24
|
+
/** A leading glyph, drawn in the tone's icon colour. Decorative. */
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
/** Shows a remove button; called when it is pressed. */
|
|
27
|
+
onRemove?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name of the remove button. Defaults to "Remove <label>" when
|
|
30
|
+
* the label is a string; pass it when the label is not plain text.
|
|
31
|
+
*/
|
|
32
|
+
removeLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Tag };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { focusRing } from "../lib/focus.js";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { TONE_CLASSES } from "./tone.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { X } from "lucide-react";
|
|
7
|
+
//#region src/primitives/tag.tsx
|
|
8
|
+
const SIZE = {
|
|
9
|
+
sm: "h-6 gap-1 px-2 text-xs [&_svg]:size-3",
|
|
10
|
+
md: "h-7 gap-1.5 px-2.5 text-sm [&_svg]:size-3.5"
|
|
11
|
+
};
|
|
12
|
+
const Tag = React.forwardRef(({ className, children, tone = "neutral", emphasis = "soft", size = "sm", icon, onRemove, removeLabel, ...props }, ref) => {
|
|
13
|
+
const classes = TONE_CLASSES[tone];
|
|
14
|
+
const label = removeLabel ?? (typeof children === "string" ? `Remove ${children}` : "Remove");
|
|
15
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("inline-flex min-w-0 max-w-full shrink-0 items-center rounded-md border font-medium", SIZE[size], emphasis === "outline" ? classes.outline : classes.surface, onRemove && (size === "sm" ? "pr-0.5" : "pr-1"), className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
icon ? /* @__PURE__ */ jsx("span", {
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
className: cn("inline-flex shrink-0", classes.icon),
|
|
23
|
+
children: icon
|
|
24
|
+
}) : null,
|
|
25
|
+
/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "min-w-0 truncate",
|
|
27
|
+
title: typeof children === "string" ? children : void 0,
|
|
28
|
+
children
|
|
29
|
+
}),
|
|
30
|
+
onRemove ? /* @__PURE__ */ jsx("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
"aria-label": label,
|
|
33
|
+
onClick: onRemove,
|
|
34
|
+
className: cn("relative inline-flex shrink-0 items-center justify-center rounded-sm opacity-70 transition-[opacity,background-color] duration-150 ease-out hover:bg-[color-mix(in_srgb,currentColor_14%,transparent)] hover:opacity-100 before:absolute before:-inset-1.5 before:content-['']", size === "sm" ? "size-5" : "size-6", focusRing),
|
|
35
|
+
children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true" })
|
|
36
|
+
}) : null
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
Tag.displayName = "Tag";
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Tag };
|
|
@@ -12,9 +12,17 @@ const namedModes = [
|
|
|
12
12
|
dark: "arena",
|
|
13
13
|
light: "arena-light"
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
dark: "super",
|
|
17
|
+
light: "super-light"
|
|
18
|
+
},
|
|
15
19
|
{
|
|
16
20
|
dark: "tangle-dark",
|
|
17
21
|
light: "tangle-light"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
dark: "agents",
|
|
25
|
+
light: "agents-light"
|
|
18
26
|
}
|
|
19
27
|
];
|
|
20
28
|
let preference;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/primitives/tone.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Categorical tones: the colours that tell KINDS of things apart — an entity,
|
|
4
|
+
* a file type, a channel, a capability. A category never reports a state; that
|
|
5
|
+
* is `StatusPill`'s job, on its own success / warning / danger / info / neutral
|
|
6
|
+
* triples. See "Color Roles" in the brand guidelines.
|
|
7
|
+
*
|
|
8
|
+
* Each tone reads one matched family from `@tangle-network/brand`
|
|
9
|
+
* (`--tone-<name>-{bg,bg-hover,bg-selected,border,border-selected,text,icon}`),
|
|
10
|
+
* solved so the text and icon clear their floors on every fill in both themes.
|
|
11
|
+
*
|
|
12
|
+
* Every class below is written out in full: Tailwind and the sandbox-ui style
|
|
13
|
+
* bundle read this file statically, so an interpolated class name would never
|
|
14
|
+
* be generated.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CATEGORY_TONES: readonly ["violet", "orange", "teal", "blue", "pink", "brown", "cyan", "lime"];
|
|
17
|
+
export type CategoryTone = (typeof CATEGORY_TONES)[number];
|
|
18
|
+
/** A categorical tone, or `neutral` for a label that is not a category. */
|
|
19
|
+
export type Tone = CategoryTone | "neutral";
|
|
20
|
+
export interface ToneClasses {
|
|
21
|
+
/** Resting fill, border and label colour. */
|
|
22
|
+
surface: string;
|
|
23
|
+
/** Border only; the label keeps the tone's text colour. */
|
|
24
|
+
outline: string;
|
|
25
|
+
/** Hover fill for an interactive surface. */
|
|
26
|
+
hover: string;
|
|
27
|
+
/** Fill and border of a selected chip. */
|
|
28
|
+
selected: string;
|
|
29
|
+
/** The glyph colour, for an icon beside a label or inside a tile. */
|
|
30
|
+
icon: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const TONE_CLASSES: Record<Tone, ToneClasses>;
|
|
33
|
+
/**
|
|
34
|
+
* A stable categorical tone for a key — an account id, a channel, a project
|
|
35
|
+
* name — for things that need telling apart but have no category of their own.
|
|
36
|
+
* The same key always gets the same tone, in every product and session.
|
|
37
|
+
* Distinct keys can share a tone, so the label or glyph must still name it.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toneFor(key: string): CategoryTone;
|
|
40
|
+
//#endregion
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//#region src/primitives/tone.ts
|
|
2
|
+
/**
|
|
3
|
+
* Categorical tones: the colours that tell KINDS of things apart — an entity,
|
|
4
|
+
* a file type, a channel, a capability. A category never reports a state; that
|
|
5
|
+
* is `StatusPill`'s job, on its own success / warning / danger / info / neutral
|
|
6
|
+
* triples. See "Color Roles" in the brand guidelines.
|
|
7
|
+
*
|
|
8
|
+
* Each tone reads one matched family from `@tangle-network/brand`
|
|
9
|
+
* (`--tone-<name>-{bg,bg-hover,bg-selected,border,border-selected,text,icon}`),
|
|
10
|
+
* solved so the text and icon clear their floors on every fill in both themes.
|
|
11
|
+
*
|
|
12
|
+
* Every class below is written out in full: Tailwind and the sandbox-ui style
|
|
13
|
+
* bundle read this file statically, so an interpolated class name would never
|
|
14
|
+
* be generated.
|
|
15
|
+
*/
|
|
16
|
+
const CATEGORY_TONES = [
|
|
17
|
+
"violet",
|
|
18
|
+
"orange",
|
|
19
|
+
"teal",
|
|
20
|
+
"blue",
|
|
21
|
+
"pink",
|
|
22
|
+
"brown",
|
|
23
|
+
"cyan",
|
|
24
|
+
"lime"
|
|
25
|
+
];
|
|
26
|
+
const TONE_CLASSES = {
|
|
27
|
+
violet: {
|
|
28
|
+
surface: "border-[var(--tone-violet-border)] bg-[var(--tone-violet-bg)] text-[var(--tone-violet-text)]",
|
|
29
|
+
outline: "border-[var(--tone-violet-border)] bg-transparent text-[var(--tone-violet-text)]",
|
|
30
|
+
hover: "hover:bg-[var(--tone-violet-bg-hover)]",
|
|
31
|
+
selected: "border-[var(--tone-violet-border-selected)] bg-[var(--tone-violet-bg-selected)]",
|
|
32
|
+
icon: "text-[var(--tone-violet-icon)]"
|
|
33
|
+
},
|
|
34
|
+
orange: {
|
|
35
|
+
surface: "border-[var(--tone-orange-border)] bg-[var(--tone-orange-bg)] text-[var(--tone-orange-text)]",
|
|
36
|
+
outline: "border-[var(--tone-orange-border)] bg-transparent text-[var(--tone-orange-text)]",
|
|
37
|
+
hover: "hover:bg-[var(--tone-orange-bg-hover)]",
|
|
38
|
+
selected: "border-[var(--tone-orange-border-selected)] bg-[var(--tone-orange-bg-selected)]",
|
|
39
|
+
icon: "text-[var(--tone-orange-icon)]"
|
|
40
|
+
},
|
|
41
|
+
teal: {
|
|
42
|
+
surface: "border-[var(--tone-teal-border)] bg-[var(--tone-teal-bg)] text-[var(--tone-teal-text)]",
|
|
43
|
+
outline: "border-[var(--tone-teal-border)] bg-transparent text-[var(--tone-teal-text)]",
|
|
44
|
+
hover: "hover:bg-[var(--tone-teal-bg-hover)]",
|
|
45
|
+
selected: "border-[var(--tone-teal-border-selected)] bg-[var(--tone-teal-bg-selected)]",
|
|
46
|
+
icon: "text-[var(--tone-teal-icon)]"
|
|
47
|
+
},
|
|
48
|
+
blue: {
|
|
49
|
+
surface: "border-[var(--tone-blue-border)] bg-[var(--tone-blue-bg)] text-[var(--tone-blue-text)]",
|
|
50
|
+
outline: "border-[var(--tone-blue-border)] bg-transparent text-[var(--tone-blue-text)]",
|
|
51
|
+
hover: "hover:bg-[var(--tone-blue-bg-hover)]",
|
|
52
|
+
selected: "border-[var(--tone-blue-border-selected)] bg-[var(--tone-blue-bg-selected)]",
|
|
53
|
+
icon: "text-[var(--tone-blue-icon)]"
|
|
54
|
+
},
|
|
55
|
+
pink: {
|
|
56
|
+
surface: "border-[var(--tone-pink-border)] bg-[var(--tone-pink-bg)] text-[var(--tone-pink-text)]",
|
|
57
|
+
outline: "border-[var(--tone-pink-border)] bg-transparent text-[var(--tone-pink-text)]",
|
|
58
|
+
hover: "hover:bg-[var(--tone-pink-bg-hover)]",
|
|
59
|
+
selected: "border-[var(--tone-pink-border-selected)] bg-[var(--tone-pink-bg-selected)]",
|
|
60
|
+
icon: "text-[var(--tone-pink-icon)]"
|
|
61
|
+
},
|
|
62
|
+
brown: {
|
|
63
|
+
surface: "border-[var(--tone-brown-border)] bg-[var(--tone-brown-bg)] text-[var(--tone-brown-text)]",
|
|
64
|
+
outline: "border-[var(--tone-brown-border)] bg-transparent text-[var(--tone-brown-text)]",
|
|
65
|
+
hover: "hover:bg-[var(--tone-brown-bg-hover)]",
|
|
66
|
+
selected: "border-[var(--tone-brown-border-selected)] bg-[var(--tone-brown-bg-selected)]",
|
|
67
|
+
icon: "text-[var(--tone-brown-icon)]"
|
|
68
|
+
},
|
|
69
|
+
cyan: {
|
|
70
|
+
surface: "border-[var(--tone-cyan-border)] bg-[var(--tone-cyan-bg)] text-[var(--tone-cyan-text)]",
|
|
71
|
+
outline: "border-[var(--tone-cyan-border)] bg-transparent text-[var(--tone-cyan-text)]",
|
|
72
|
+
hover: "hover:bg-[var(--tone-cyan-bg-hover)]",
|
|
73
|
+
selected: "border-[var(--tone-cyan-border-selected)] bg-[var(--tone-cyan-bg-selected)]",
|
|
74
|
+
icon: "text-[var(--tone-cyan-icon)]"
|
|
75
|
+
},
|
|
76
|
+
lime: {
|
|
77
|
+
surface: "border-[var(--tone-lime-border)] bg-[var(--tone-lime-bg)] text-[var(--tone-lime-text)]",
|
|
78
|
+
outline: "border-[var(--tone-lime-border)] bg-transparent text-[var(--tone-lime-text)]",
|
|
79
|
+
hover: "hover:bg-[var(--tone-lime-bg-hover)]",
|
|
80
|
+
selected: "border-[var(--tone-lime-border-selected)] bg-[var(--tone-lime-bg-selected)]",
|
|
81
|
+
icon: "text-[var(--tone-lime-icon)]"
|
|
82
|
+
},
|
|
83
|
+
neutral: {
|
|
84
|
+
surface: "border-[var(--surface-neutral-border)] bg-[var(--surface-neutral-bg)] text-[var(--text-secondary)]",
|
|
85
|
+
outline: "border-[var(--border-default)] bg-transparent text-[var(--text-secondary)]",
|
|
86
|
+
hover: "hover:bg-[color-mix(in_srgb,var(--surface-neutral-bg),var(--text-primary)_6%)]",
|
|
87
|
+
selected: "border-[var(--text-dim)] bg-[color-mix(in_srgb,var(--surface-neutral-bg),var(--text-primary)_12%)] text-[var(--text-primary)]",
|
|
88
|
+
icon: "text-[var(--text-dim)]"
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* A stable categorical tone for a key — an account id, a channel, a project
|
|
93
|
+
* name — for things that need telling apart but have no category of their own.
|
|
94
|
+
* The same key always gets the same tone, in every product and session.
|
|
95
|
+
* Distinct keys can share a tone, so the label or glyph must still name it.
|
|
96
|
+
*/
|
|
97
|
+
function toneFor(key) {
|
|
98
|
+
let hash = 2166136261;
|
|
99
|
+
for (let i = 0; i < key.length; i++) {
|
|
100
|
+
hash ^= key.charCodeAt(i);
|
|
101
|
+
hash = Math.imul(hash, 16777619);
|
|
102
|
+
}
|
|
103
|
+
return CATEGORY_TONES[(hash >>> 0) % CATEGORY_TONES.length];
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { CATEGORY_TONES, TONE_CLASSES, toneFor };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
//#region src/primitives/tooltip.d.ts
|
|
4
|
+
declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
5
|
+
declare namespace TooltipProvider {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
9
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* Inverse-surface label for a control whose name is otherwise only an icon.
|
|
12
|
+
* It is supplementary: the trigger still needs its own accessible name.
|
|
13
|
+
*/
|
|
14
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6
|
+
//#region src/primitives/tooltip.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Wrap an app (or a toolbar) once. The open delay applies to the first tooltip;
|
|
9
|
+
* moving between triggers inside `skipDelayDuration` opens the next one at
|
|
10
|
+
* once, which keeps an icon rail fast to scan.
|
|
11
|
+
*/
|
|
12
|
+
const TooltipProvider = ({ delayDuration = 400, skipDelayDuration = 300, ...props }) => /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
13
|
+
delayDuration,
|
|
14
|
+
skipDelayDuration,
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
TooltipProvider.displayName = "TooltipProvider";
|
|
18
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
19
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
20
|
+
/**
|
|
21
|
+
* Inverse-surface label for a control whose name is otherwise only an icon.
|
|
22
|
+
* It is supplementary: the trigger still needs its own accessible name.
|
|
23
|
+
*/
|
|
24
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 6, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
25
|
+
ref,
|
|
26
|
+
sideOffset,
|
|
27
|
+
className: cn("z-50 max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-2.5 py-1.5 text-background text-xs leading-snug shadow-md", "data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "duration-150 ease-out motion-reduce:animate-none", className),
|
|
28
|
+
...props
|
|
29
|
+
}) }));
|
|
30
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/primitives.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { Button, ButtonProps, buttonVariants } from "./primitives/button.js";
|
|
|
2
2
|
import { ArtifactPane, ArtifactPaneProps } from "./primitives/artifact-pane.js";
|
|
3
3
|
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardTitleProps } from "./primitives/card.js";
|
|
4
4
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./primitives/dialog.js";
|
|
5
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./primitives/alert-dialog.js";
|
|
6
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./primitives/collapsible.js";
|
|
7
|
+
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./primitives/context-menu.js";
|
|
8
|
+
import { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from "./primitives/popover.js";
|
|
9
|
+
import { Slider } from "./primitives/slider.js";
|
|
5
10
|
import { Input, InputProps, Textarea, TextareaProps } from "./primitives/input.js";
|
|
6
11
|
import { Badge, BadgeProps, badgeVariants } from "./primitives/badge.js";
|
|
7
12
|
import { Avatar, AvatarFallback, AvatarImage } from "./primitives/avatar.js";
|
|
@@ -12,6 +17,10 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./primitives/tabs.js";
|
|
|
12
17
|
import { SegmentedControl, SegmentedControlOption, SegmentedControlProps } from "./primitives/segmented-control.js";
|
|
13
18
|
import { Progress } from "./primitives/progress.js";
|
|
14
19
|
import { Switch } from "./primitives/switch.js";
|
|
20
|
+
import { Checkbox } from "./primitives/checkbox.js";
|
|
21
|
+
import { Separator } from "./primitives/separator.js";
|
|
22
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from "./primitives/sheet.js";
|
|
23
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./primitives/tooltip.js";
|
|
15
24
|
import { Skeleton, SkeletonCard, SkeletonTable } from "./primitives/skeleton.js";
|
|
16
25
|
import { TextShimmer, TextShimmerProps } from "./primitives/text-shimmer.js";
|
|
17
26
|
import { Toast, ToastContainer, ToastProvider, useToast } from "./primitives/toast.js";
|
|
@@ -29,7 +38,11 @@ import { Heading, HeadingProps, HeadingVariant } from "./primitives/heading.js";
|
|
|
29
38
|
import { PageShell, PageShellProps } from "./primitives/page-shell.js";
|
|
30
39
|
import { PageHeader, PageHeaderProps } from "./primitives/page-header.js";
|
|
31
40
|
import { StatusPill, StatusPillProps, StatusTone } from "./primitives/status-pill.js";
|
|
41
|
+
import { CATEGORY_TONES, CategoryTone, TONE_CLASSES, Tone, ToneClasses, toneFor } from "./primitives/tone.js";
|
|
42
|
+
import { Tag, TagProps } from "./primitives/tag.js";
|
|
43
|
+
import { Chip, ChipProps } from "./primitives/chip.js";
|
|
44
|
+
import { IconTile, IconTileProps, initialsOf } from "./primitives/icon-tile.js";
|
|
32
45
|
import { Metric, MetricProps, MetricStrip, MetricStripProps } from "./primitives/metric-strip.js";
|
|
33
46
|
import { FilterField, FilterFieldProps, Toolbar, ToolbarProps } from "./primitives/toolbar.js";
|
|
34
47
|
import { Logo, LogoProps, TangleKnot } from "@tangle-network/brand";
|
|
35
|
-
export { ArtifactPane, type ArtifactPaneProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, CodeBlock, type CodeBlockProps, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FilterField, type FilterFieldProps, Heading, type HeadingProps, type HeadingVariant, InlineCode, type InlineCodeProps, Input, type InputProps, Label, Logo, type LogoProps, Metric, type MetricProps, MetricStrip, type MetricStripProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Progress, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, type Toast, ToastContainer, ToastProvider, Toolbar, type ToolbarProps, type UploadFile, UploadProgress, type UploadProgressProps, badgeVariants, buttonVariants, useTheme, useToast };
|
|
48
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ArtifactPane, type ArtifactPaneProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, CATEGORY_TONES, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FilterField, type FilterFieldProps, Heading, type HeadingProps, type HeadingVariant, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, Input, type InputProps, Label, Logo, type LogoProps, Metric, type MetricProps, MetricStrip, type MetricStripProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, badgeVariants, buttonVariants, initialsOf, toneFor, useTheme, useToast };
|