harebear-ui 0.8.1 → 0.10.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/AGENTS.md +2 -2
- package/dist/components/admin/app-nav.d.ts +15 -1
- package/dist/components/admin/app-nav.js +28 -11
- package/dist/components/admin/avatar-upload.d.ts +32 -0
- package/dist/components/admin/avatar-upload.js +121 -0
- package/dist/components/admin/category.d.ts +17 -0
- package/dist/components/admin/category.js +35 -0
- package/dist/components/admin/celebration.d.ts +7 -0
- package/dist/components/admin/celebration.js +61 -0
- package/dist/components/admin/checklist-editor.d.ts +20 -0
- package/dist/components/admin/checklist-editor.js +69 -0
- package/dist/components/admin/color-swatch-picker.d.ts +15 -0
- package/dist/components/admin/color-swatch-picker.js +68 -0
- package/dist/components/admin/comment-thread.d.ts +26 -0
- package/dist/components/admin/comment-thread.js +68 -0
- package/dist/components/admin/copy-field.d.ts +3 -1
- package/dist/components/admin/copy-field.js +10 -5
- package/dist/components/admin/date-time-picker.d.ts +20 -0
- package/dist/components/admin/date-time-picker.js +97 -0
- package/dist/components/admin/detail-sheet.d.ts +18 -0
- package/dist/components/admin/detail-sheet.js +80 -0
- package/dist/components/admin/markdown-editor.d.ts +12 -0
- package/dist/components/admin/markdown-editor.js +46 -0
- package/dist/components/admin/page-header.d.ts +3 -1
- package/dist/components/admin/page-header.js +17 -9
- package/dist/components/admin/page.d.ts +16 -0
- package/dist/components/admin/page.js +42 -0
- package/dist/components/admin/prompt-dialog.d.ts +19 -0
- package/dist/components/admin/prompt-dialog.js +83 -0
- package/dist/components/admin/settings.d.ts +4 -2
- package/dist/components/admin/settings.js +37 -30
- package/dist/components/admin/time-zone-picker.d.ts +12 -0
- package/dist/components/admin/time-zone-picker.js +31 -0
- package/dist/components/admin/user-chip.d.ts +34 -3
- package/dist/components/admin/user-chip.js +66 -7
- package/dist/components/admin/user-menu.d.ts +6 -1
- package/dist/components/admin/user-menu.js +22 -10
- package/dist/components/ai/ask-box.d.ts +14 -2
- package/dist/components/ai/ask-box.js +90 -54
- package/dist/components/ai/assistant.d.ts +13 -3
- package/dist/components/ai/assistant.js +36 -8
- package/dist/components/ai/code-block.d.ts +10 -3
- package/dist/components/ai/code-block.js +57 -8
- package/dist/components/ai/conversation-list.d.ts +13 -3
- package/dist/components/ai/conversation-list.js +15 -26
- package/dist/components/ai/markdown.d.ts +13 -0
- package/dist/components/ai/markdown.js +41 -0
- package/dist/components/auth/auth.d.ts +41 -5
- package/dist/components/auth/auth.js +167 -159
- package/dist/components/data/agenda-row.d.ts +26 -0
- package/dist/components/data/agenda-row.js +62 -0
- package/dist/components/data/day-strip.d.ts +27 -0
- package/dist/components/data/day-strip.js +78 -0
- package/dist/components/data/sectioned-list.d.ts +21 -6
- package/dist/components/data/sectioned-list.js +44 -21
- package/dist/components/data/task-row.d.ts +3 -0
- package/dist/components/data/task-row.js +6 -14
- package/dist/components/layout/collapse.js +1 -1
- package/dist/components/layout/text.d.ts +3 -3
- package/dist/components/layout/text.js +6 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/check-circle.js +1 -1
- package/dist/components/ui/code-block.js +2 -2
- package/dist/components/ui/combobox.js +1 -0
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/password-input.d.ts +8 -0
- package/dist/components/ui/password-input.js +32 -0
- package/dist/components/ui/sonner.d.ts +2 -2
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/index.js +21 -5
- package/dist/lib/internal/date.js +8 -0
- package/dist/lib/{toast-clearance.js → internal/toast-clearance.js} +1 -1
- package/dist/styles.css +31 -1
- package/docs/COMPONENTS.md +302 -28
- package/docs/ROADMAP.md +13 -11
- package/llms.txt +10 -8
- package/package.json +3 -1
- package/skills/harebear-ui/SKILL.md +5 -3
|
@@ -6,13 +6,12 @@ import * as React from "react";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { ChevronDownIcon, PlusIcon } from "lucide-react";
|
|
8
8
|
// src/components/data/sectioned-list.tsx
|
|
9
|
-
/** How long a ticked row stays in place (so the check is seen) before it folds away. */
|
|
10
|
-
const LINGER_MS = 600;
|
|
11
9
|
/**
|
|
12
10
|
* A to-do list: one add box, sections with headings, done items folded into a "Show N done" toggle, an empty
|
|
13
|
-
* state. Rows fold in and out with Collapse, so nothing jumps.
|
|
11
|
+
* state. Rows fold in and out with Collapse, so nothing jumps. `renderItem` draws other rows (AgendaRow), so a week
|
|
12
|
+
* agenda is one SectionedList with a section per day.
|
|
14
13
|
*/
|
|
15
|
-
function SectionedList({ sections, onToggle, onOpen, onAdd, addPlaceholder = "Add a to-do", empty, defaultShowDone = false, className, ...props }) {
|
|
14
|
+
function SectionedList({ sections, onToggle, renderItem, lingerMs = 600, onOpen, onAdd, addPlaceholder = "Add a to-do", addChips, empty, defaultShowDone = false, className, ...props }) {
|
|
16
15
|
const [showDone, setShowDone] = React.useState(defaultShowDone);
|
|
17
16
|
const [lingering, setLingering] = React.useState(/* @__PURE__ */ new Set());
|
|
18
17
|
const timers = React.useRef(/* @__PURE__ */ new Map());
|
|
@@ -31,14 +30,14 @@ function SectionedList({ sections, onToggle, onOpen, onAdd, addPlaceholder = "Ad
|
|
|
31
30
|
next.delete(id);
|
|
32
31
|
return next;
|
|
33
32
|
});
|
|
34
|
-
},
|
|
33
|
+
}, lingerMs));
|
|
35
34
|
}
|
|
36
35
|
onToggle(id, done);
|
|
37
36
|
};
|
|
38
37
|
const shown = (item) => !item.done || lingering.has(item.id);
|
|
39
38
|
const done = sections.flatMap((s) => s.items.filter((i) => i.done && !lingering.has(i.id)));
|
|
40
39
|
const anyOpen = sections.some((s) => s.items.some(shown));
|
|
41
|
-
const row = (item) => /* @__PURE__ */ jsx(TaskRow, {
|
|
40
|
+
const row = (item) => renderItem ? renderItem(item, (v) => toggle(item.id, v)) : /* @__PURE__ */ jsx(TaskRow, {
|
|
42
41
|
title: item.title,
|
|
43
42
|
meta: item.meta,
|
|
44
43
|
checked: !!item.done,
|
|
@@ -54,25 +53,44 @@ function SectionedList({ sections, onToggle, onOpen, onAdd, addPlaceholder = "Ad
|
|
|
54
53
|
children: [
|
|
55
54
|
onAdd && /* @__PURE__ */ jsx(AddBox, {
|
|
56
55
|
placeholder: addPlaceholder,
|
|
57
|
-
onAdd
|
|
56
|
+
onAdd,
|
|
57
|
+
chips: addChips
|
|
58
58
|
}),
|
|
59
59
|
sections.map((section) => {
|
|
60
|
-
const
|
|
60
|
+
const hasOpen = section.items.some(shown);
|
|
61
61
|
return /* @__PURE__ */ jsx(Collapse, {
|
|
62
|
-
open:
|
|
62
|
+
open: hasOpen || section.empty != null,
|
|
63
63
|
children: /* @__PURE__ */ jsxs("section", {
|
|
64
|
+
id: section.id,
|
|
64
65
|
"aria-label": typeof section.title === "string" ? section.title : void 0,
|
|
65
|
-
children: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
children: [
|
|
67
|
+
(section.title || section.action) && /* @__PURE__ */ jsxs("div", {
|
|
68
|
+
className: "flex min-w-0 items-center gap-2 px-2 pb-1",
|
|
69
|
+
children: [section.title && /* @__PURE__ */ jsx("h2", {
|
|
70
|
+
className: "min-w-0 text-[13px] font-semibold text-muted-foreground",
|
|
71
|
+
children: section.title
|
|
72
|
+
}), section.action && /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: "ml-auto flex shrink-0 items-center max-md:[&>*]:min-h-11",
|
|
74
|
+
children: section.action
|
|
75
|
+
})]
|
|
76
|
+
}),
|
|
77
|
+
section.empty != null && /* @__PURE__ */ jsx(Collapse, {
|
|
78
|
+
open: !hasOpen,
|
|
79
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
80
|
+
"data-slot": "sectioned-list-section-empty",
|
|
81
|
+
className: "px-2 py-2.5 text-sm text-muted-foreground",
|
|
82
|
+
children: section.empty
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx("ul", {
|
|
86
|
+
className: "flex flex-col",
|
|
87
|
+
children: section.items.map((item) => /* @__PURE__ */ jsx(Collapse, {
|
|
88
|
+
open: shown(item),
|
|
89
|
+
role: "listitem",
|
|
90
|
+
children: row(item)
|
|
91
|
+
}, item.id))
|
|
92
|
+
})
|
|
93
|
+
]
|
|
76
94
|
})
|
|
77
95
|
}, section.id);
|
|
78
96
|
}),
|
|
@@ -102,7 +120,7 @@ function SectionedList({ sections, onToggle, onOpen, onAdd, addPlaceholder = "Ad
|
|
|
102
120
|
]
|
|
103
121
|
});
|
|
104
122
|
}
|
|
105
|
-
function AddBox({ placeholder, onAdd }) {
|
|
123
|
+
function AddBox({ placeholder, onAdd, chips }) {
|
|
106
124
|
const [value, setValue] = React.useState("");
|
|
107
125
|
const id = React.useId();
|
|
108
126
|
return /* @__PURE__ */ jsxs("form", {
|
|
@@ -132,6 +150,11 @@ function AddBox({ placeholder, onAdd }) {
|
|
|
132
150
|
placeholder,
|
|
133
151
|
autoComplete: "off",
|
|
134
152
|
className: "h-full min-w-0 flex-1 bg-transparent text-[15px] text-foreground outline-none placeholder:text-muted-foreground"
|
|
153
|
+
}),
|
|
154
|
+
chips && value.trim() && /* @__PURE__ */ jsx("div", {
|
|
155
|
+
"data-slot": "sectioned-list-add-chips",
|
|
156
|
+
className: "flex shrink-0 items-center gap-1.5",
|
|
157
|
+
children: chips(value)
|
|
135
158
|
})
|
|
136
159
|
]
|
|
137
160
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { CategoryColor } from "../admin/category.js";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
export interface TaskRowAssignee {
|
|
3
4
|
name: string;
|
|
4
5
|
avatarUrl?: string;
|
|
6
|
+
/** Category colour behind the initials when there is no photo. */
|
|
7
|
+
color?: CategoryColor;
|
|
5
8
|
}
|
|
6
9
|
export interface TaskRowProps extends Omit<React.ComponentProps<"div">, "title"> {
|
|
7
10
|
title: React.ReactNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar.js";
|
|
2
|
+
import { MemberAvatar } from "../admin/user-chip.js";
|
|
4
3
|
import { CheckCircle } from "../ui/check-circle.js";
|
|
5
4
|
import { cn } from "../../lib/utils.js";
|
|
6
5
|
import * as React from "react";
|
|
@@ -40,19 +39,12 @@ function TaskRow({ title, meta, checked, onCheckedChange, assignee, important, o
|
|
|
40
39
|
children: meta
|
|
41
40
|
})]
|
|
42
41
|
}),
|
|
43
|
-
assignee && /* @__PURE__ */
|
|
42
|
+
assignee && /* @__PURE__ */ jsx(MemberAvatar, {
|
|
44
43
|
size: "sm",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
src: assignee.avatarUrl,
|
|
50
|
-
alt: ""
|
|
51
|
-
}), /* @__PURE__ */ jsx(AvatarFallback, {
|
|
52
|
-
"aria-hidden": "true",
|
|
53
|
-
className: "group-data-[size=sm]/avatar:text-xs",
|
|
54
|
-
children: initials(assignee.name)
|
|
55
|
-
})]
|
|
44
|
+
name: assignee.name,
|
|
45
|
+
avatarUrl: assignee.avatarUrl,
|
|
46
|
+
color: assignee.color,
|
|
47
|
+
title: assignee.name
|
|
56
48
|
})
|
|
57
49
|
]
|
|
58
50
|
});
|
|
@@ -16,7 +16,7 @@ function Collapse({ open, contentClassName, className, children, ...props }) {
|
|
|
16
16
|
className: cn("grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none", open ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0", className),
|
|
17
17
|
...props,
|
|
18
18
|
children: /* @__PURE__ */ jsx("div", {
|
|
19
|
-
className: cn("min-h-0 overflow-
|
|
19
|
+
className: cn("min-h-0 min-w-0 overflow-x-visible overflow-y-clip", contentClassName),
|
|
20
20
|
children
|
|
21
21
|
})
|
|
22
22
|
});
|
|
@@ -29,9 +29,9 @@ export interface TextProps extends Omit<React.ComponentProps<"span">, "ref"> {
|
|
|
29
29
|
/** Text with props instead of classes: size, tone, weight, mono, truncate, lines. */
|
|
30
30
|
declare function Text({ size, tone, weight, mono, truncate, lines, tabular, as: As, className, ...props }: TextProps): React.JSX.Element;
|
|
31
31
|
export interface HeadingProps extends React.ComponentProps<"h3"> {
|
|
32
|
-
/** 3: a section title in a card. 4: a small uppercase label over a group. */
|
|
33
|
-
level?: 3 | 4;
|
|
32
|
+
/** 2: a page section title under the page's h1. 3: a section title in a card. 4: a small uppercase label over a group. */
|
|
33
|
+
level?: 2 | 3 | 4;
|
|
34
34
|
}
|
|
35
|
-
/** Section heading inside a card or panel. */
|
|
35
|
+
/** Section heading on a page (2) or inside a card or panel (3, 4). */
|
|
36
36
|
declare function Heading({ level, className, ...props }: HeadingProps): React.JSX.Element;
|
|
37
37
|
export { Heading, Text };
|
|
@@ -36,8 +36,13 @@ function Text({ size = "base", tone = "default", weight = "normal", mono, trunca
|
|
|
36
36
|
...props
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
/** Section heading inside a card or panel. */
|
|
39
|
+
/** Section heading on a page (2) or inside a card or panel (3, 4). */
|
|
40
40
|
function Heading({ level = 3, className, ...props }) {
|
|
41
|
+
if (level === 2) return /* @__PURE__ */ jsx("h2", {
|
|
42
|
+
"data-slot": "heading",
|
|
43
|
+
className: cn("text-lg leading-snug font-semibold", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
41
46
|
if (level === 4) return /* @__PURE__ */ jsx("h4", {
|
|
42
47
|
"data-slot": "heading",
|
|
43
48
|
className: cn("text-xs font-medium tracking-wide text-muted-foreground uppercase", className),
|
|
@@ -21,7 +21,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
21
21
|
function AvatarFallback({ className, ...props }) {
|
|
22
22
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
23
23
|
"data-slot": "avatar-fallback",
|
|
24
|
-
className: cn("flex size-full items-center justify-center rounded-full bg-primary-soft text-[13px] font-semibold text-primary group-data-[size=sm]/avatar:text-
|
|
24
|
+
className: cn("flex size-full items-center justify-center rounded-full bg-primary-soft text-[13px] font-semibold text-primary group-data-[size=sm]/avatar:text-xs group-data-[size=lg]/avatar:text-lg", className),
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -5,7 +5,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { Slot } from "radix-ui";
|
|
7
7
|
// src/components/ui/button.tsx
|
|
8
|
-
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,color,box-shadow,border-color] outline-none select-none focus-visible:ring-4 focus-visible:ring-ring/20 focus-visible:border-ring active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[18px]", {
|
|
8
|
+
const buttonVariants = cva("group/button relative inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,color,box-shadow,border-color] outline-none select-none focus-visible:ring-4 focus-visible:ring-ring/20 focus-visible:border-ring active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[18px] pointer-coarse:after:absolute pointer-coarse:after:inset-[min(0px,calc(50%-1.375rem))]", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--primary),black_10%)]",
|
|
@@ -24,7 +24,7 @@ function CheckCircle({ tone = "default", className, onCheckedChange, onAnimation
|
|
|
24
24
|
setPop(false);
|
|
25
25
|
onAnimationEnd?.(e);
|
|
26
26
|
},
|
|
27
|
-
className: cn("peer relative grid size-6 shrink-0 place-items-center rounded-full border-2 border-muted-foreground/45 bg-card text-primary-foreground transition-[background-color,border-color
|
|
27
|
+
className: cn("peer relative grid size-6 shrink-0 place-items-center rounded-full border-2 border-muted-foreground/45 bg-card text-primary-foreground transition-[background-color,border-color] outline-none after:absolute after:-inset-3 hover:border-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary focus-visible:outline-solid motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 data-[tone=important]:border-warning data-[tone=important]:bg-warning/10 data-checked:border-primary data-checked:bg-primary motion-safe:data-[pop]:animate-check-pop", className),
|
|
28
28
|
...props,
|
|
29
29
|
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
30
30
|
"data-slot": "check-circle-indicator",
|
|
@@ -39,7 +39,7 @@ function CodeBlockTitle({ className, ...props }) {
|
|
|
39
39
|
function CodeBlockActions({ className, ...props }) {
|
|
40
40
|
return /* @__PURE__ */ jsx("div", {
|
|
41
41
|
"data-slot": "code-block-actions",
|
|
42
|
-
className: cn("-my-1 ms-auto -me-1.5 flex shrink-0 items-center gap-1 [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:top-2 [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-1.5 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-1.5 [[data-slot=code-block]>&]:pointer-coarse:opacity-100 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10", className),
|
|
42
|
+
className: cn("-my-1 ms-auto -me-1.5 flex shrink-0 items-center gap-1 pointer-coarse:my-0 [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:top-2 [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-1.5 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-1.5 [[data-slot=code-block]>&]:pointer-coarse:opacity-100 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10", className),
|
|
43
43
|
...props
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -57,7 +57,7 @@ function CodeBlockCopyButton({ value, variant = "ghost", size = "icon-xs", type
|
|
|
57
57
|
variant,
|
|
58
58
|
size,
|
|
59
59
|
"aria-label": copied ? "Copied" : "Copy",
|
|
60
|
-
className: cn(className),
|
|
60
|
+
className: cn("pointer-coarse:size-11", className),
|
|
61
61
|
onClick: (event) => {
|
|
62
62
|
onClick?.(event);
|
|
63
63
|
navigator.clipboard.writeText(value).then(() => setCopied(true)).catch(() => {});
|
|
@@ -49,6 +49,7 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
|
|
|
49
49
|
variant: "ghost",
|
|
50
50
|
asChild: true,
|
|
51
51
|
"data-slot": "input-group-button",
|
|
52
|
+
"aria-label": "Show options",
|
|
52
53
|
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
53
54
|
disabled,
|
|
54
55
|
children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
|
|
@@ -10,7 +10,7 @@ function InputGroup({ className, ...props }) {
|
|
|
10
10
|
return /* @__PURE__ */ jsx("div", {
|
|
11
11
|
"data-slot": "input-group",
|
|
12
12
|
role: "group",
|
|
13
|
-
className: cn("group/input-group relative flex h-10 w-full min-w-0 items-center rounded-md border border-transparent bg-muted transition-[border-color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:bg-card has-[[data-slot=input-group-control]:focus-visible]:ring-4 has-[[data-slot=input-group-control]:focus-visible]:ring-primary/15 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
13
|
+
className: cn("group/input-group relative flex h-10 pointer-coarse:h-11 w-full min-w-0 items-center rounded-md border border-transparent bg-muted transition-[border-color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:bg-card has-[[data-slot=input-group-control]:focus-visible]:ring-4 has-[[data-slot=input-group-control]:focus-visible]:ring-primary/15 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
14
14
|
...props
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -6,7 +6,7 @@ function Input({ className, type, ...props }) {
|
|
|
6
6
|
return /* @__PURE__ */ jsx("input", {
|
|
7
7
|
type,
|
|
8
8
|
"data-slot": "input",
|
|
9
|
-
className: cn("h-10 w-full min-w-0 py-1 file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground [&::-webkit-search-cancel-button]:hidden rounded-md border border-transparent bg-muted px-3.5 text-base transition-[border-color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-4 aria-invalid:ring-destructive/15 md:text-sm", className),
|
|
9
|
+
className: cn("h-10 pointer-coarse:h-11 w-full min-w-0 py-1 file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground [&::-webkit-search-cancel-button]:hidden rounded-md border border-transparent bg-muted px-3.5 text-base transition-[border-color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-4 aria-invalid:ring-destructive/15 md:text-sm", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
function Kbd({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("kbd", {
|
|
7
7
|
"data-slot": "kbd",
|
|
8
|
-
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-[6px] border bg-card px-1.5 font-mono text-
|
|
8
|
+
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-[6px] border bg-card px-1.5 font-mono text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PasswordInputProps extends Omit<React.ComponentProps<"input">, "type"> {
|
|
3
|
+
/** Classes for the wrapping div. `className` goes to the input. */
|
|
4
|
+
wrapperClassName?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Password `Input` with a Show/Hide button that switches it to plain text. Props go to the input. */
|
|
7
|
+
declare function PasswordInput({ className, wrapperClassName, disabled, ...props }: PasswordInputProps): React.JSX.Element;
|
|
8
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { Input } from "./input.js";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
8
|
+
// src/components/ui/password-input.tsx
|
|
9
|
+
/** Password `Input` with a Show/Hide button that switches it to plain text. Props go to the input. */
|
|
10
|
+
function PasswordInput({ className, wrapperClassName, disabled, ...props }) {
|
|
11
|
+
const [shown, setShown] = React.useState(false);
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
"data-slot": "password-input",
|
|
14
|
+
className: cn("relative", wrapperClassName),
|
|
15
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
16
|
+
type: shown ? "text" : "password",
|
|
17
|
+
disabled,
|
|
18
|
+
className: cn("pr-12", className),
|
|
19
|
+
...props
|
|
20
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
21
|
+
type: "button",
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
size: "icon-sm",
|
|
24
|
+
disabled,
|
|
25
|
+
"aria-label": shown ? "Hide password" : "Show password",
|
|
26
|
+
onClick: () => setShown((s) => !s),
|
|
27
|
+
className: "absolute top-1/2 right-1 -translate-y-1/2 text-muted-foreground after:absolute after:-inset-1.5",
|
|
28
|
+
children: shown ? /* @__PURE__ */ jsx(EyeOffIcon, {}) : /* @__PURE__ */ jsx(EyeIcon, {})
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export { PasswordInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExternalToast, ToasterProps } from "sonner";
|
|
1
|
+
import { ExternalToast, ToasterProps, toast } from "sonner";
|
|
2
2
|
declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
|
|
3
3
|
export interface ToastUndoOptions extends Omit<ExternalToast, "action"> {
|
|
4
4
|
/** Called when Undo is pressed. The toast closes. */
|
|
@@ -13,4 +13,4 @@ export interface ToastUndoOptions extends Omit<ExternalToast, "action"> {
|
|
|
13
13
|
* Uses the mounted <Toaster />. Returns the toast id (pass it to `toast.dismiss` from sonner).
|
|
14
14
|
*/
|
|
15
15
|
declare function toastUndo(message: React.ReactNode, { onUndo, undoLabel, duration, ...options }: ToastUndoOptions): string | number;
|
|
16
|
-
export { Toaster, toastUndo };
|
|
16
|
+
export { Toaster, toast, toastUndo };
|
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Toggle as Toggle$1 } from "radix-ui";
|
|
6
6
|
// src/components/ui/toggle.tsx
|
|
7
|
-
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
7
|
+
const toggleVariants = cva("group/toggle relative inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 pointer-coarse:after:absolute pointer-coarse:after:inset-[min(0px,calc(50%-1.375rem))]", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-transparent",
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, Me
|
|
|
42
42
|
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./components/ui/native-select.js";
|
|
43
43
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from "./components/ui/navigation-menu.js";
|
|
44
44
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.js";
|
|
45
|
+
import { PasswordInput, PasswordInputProps } from "./components/ui/password-input.js";
|
|
45
46
|
import { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "./components/ui/popover.js";
|
|
46
47
|
import { Progress } from "./components/ui/progress.js";
|
|
47
48
|
import { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle } from "./components/ui/questionnaire.js";
|
|
@@ -54,7 +55,7 @@ import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHe
|
|
|
54
55
|
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, useSidebarOptional } from "./components/ui/sidebar.js";
|
|
55
56
|
import { Skeleton } from "./components/ui/skeleton.js";
|
|
56
57
|
import { Slider } from "./components/ui/slider.js";
|
|
57
|
-
import { ToastUndoOptions, Toaster, toastUndo } from "./components/ui/sonner.js";
|
|
58
|
+
import { ToastUndoOptions, Toaster, toast, toastUndo } from "./components/ui/sonner.js";
|
|
58
59
|
import { Spinner } from "./components/ui/spinner.js";
|
|
59
60
|
import { Switch } from "./components/ui/switch.js";
|
|
60
61
|
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/ui/table.js";
|
|
@@ -67,21 +68,33 @@ import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigg
|
|
|
67
68
|
import { ActivityFeed, ActivityItem } from "./components/admin/activity-feed.js";
|
|
68
69
|
import { AppNav, AppNavAction, AppNavGroup, AppNavPlace, AppNavProps } from "./components/admin/app-nav.js";
|
|
69
70
|
import { AppBrand, AppBrandProps, AppNavItem, AppNavSection, AppShell, AppShellProps } from "./components/admin/app-shell.js";
|
|
71
|
+
import { AvatarUpload, AvatarUploadProps, cropImageToSquare } from "./components/admin/avatar-upload.js";
|
|
70
72
|
import { Callout } from "./components/admin/callout.js";
|
|
73
|
+
import { CategoryColor, CategoryDot, CategoryDotProps, categoryBg } from "./components/admin/category.js";
|
|
74
|
+
import { Celebration, CelebrationProps, celebrate } from "./components/admin/celebration.js";
|
|
75
|
+
import { ChecklistEditor, ChecklistEditorProps, ChecklistItem } from "./components/admin/checklist-editor.js";
|
|
76
|
+
import { ColorSwatchPicker, ColorSwatchPickerProps } from "./components/admin/color-swatch-picker.js";
|
|
77
|
+
import { CommentThread, CommentThreadComment, CommentThreadProps } from "./components/admin/comment-thread.js";
|
|
71
78
|
import { ConfirmDialog, ConfirmDialogProps } from "./components/admin/confirm-dialog.js";
|
|
72
79
|
import { CopyField, CopyFieldProps } from "./components/admin/copy-field.js";
|
|
80
|
+
import { DateTimePicker, DateTimePickerProps, DateTimeValue } from "./components/admin/date-time-picker.js";
|
|
81
|
+
import { DetailSheet, DetailSheetProps } from "./components/admin/detail-sheet.js";
|
|
73
82
|
import { FocusLayout, FocusLayoutProps } from "./components/admin/focus-layout.js";
|
|
74
83
|
import { KeyValueGrid, KeyValueItem } from "./components/admin/key-value-grid.js";
|
|
75
84
|
import { LinkTile, LinkTileProps } from "./components/admin/link-tile.js";
|
|
85
|
+
import { MarkdownEditor, MarkdownEditorProps } from "./components/admin/markdown-editor.js";
|
|
76
86
|
import { PageHeader, PageHeaderProps } from "./components/admin/page-header.js";
|
|
87
|
+
import { Page, PageProps, PageSection, PageSectionProps } from "./components/admin/page.js";
|
|
88
|
+
import { PromptDialog, PromptDialogProps } from "./components/admin/prompt-dialog.js";
|
|
77
89
|
import { SearchInput, SearchInputProps } from "./components/admin/search-input.js";
|
|
78
90
|
import { SettingsRow, SettingsRowProps, SettingsSection, SettingsSectionProps } from "./components/admin/settings.js";
|
|
79
91
|
import { SidebarCollapseButton, SidebarLayout, SidebarLayoutProps } from "./components/admin/sidebar-layout.js";
|
|
80
92
|
import { StatCard, StatCardProps } from "./components/admin/stat-card.js";
|
|
81
93
|
import { StatusBadge, StatusBadgeProps, StatusDot, StatusDotProps, StatusTone } from "./components/admin/status.js";
|
|
94
|
+
import { TimeZonePicker, TimeZonePickerProps } from "./components/admin/time-zone-picker.js";
|
|
82
95
|
import { Timeline, TimelineItem } from "./components/admin/timeline.js";
|
|
83
96
|
import { UsageMeter, UsageMeterProps } from "./components/admin/usage-meter.js";
|
|
84
|
-
import { UserChip, UserChipProps, initials } from "./components/admin/user-chip.js";
|
|
97
|
+
import { AvatarStack, AvatarStackProps, MemberAvatar, MemberAvatarProps, UserChip, UserChipProps, VisibilityBadge, VisibilityBadgeProps, initials } from "./components/admin/user-chip.js";
|
|
85
98
|
import { UserMenu, UserMenuProps } from "./components/admin/user-menu.js";
|
|
86
99
|
import { Collapse, CollapseProps } from "./components/layout/collapse.js";
|
|
87
100
|
import { MediaItem, MediaItemProps } from "./components/layout/media-item.js";
|
|
@@ -89,8 +102,10 @@ import { Metric, MetricGroup, MetricProps } from "./components/layout/metric.js"
|
|
|
89
102
|
import { ShowMore, ShowMoreProps } from "./components/layout/show-more.js";
|
|
90
103
|
import { Grid, GridCols, GridProps, ResponsiveGridCols, Row, RowProps, Stack, StackAlign, StackJustify, StackProps, StackSpace } from "./components/layout/stack.js";
|
|
91
104
|
import { Heading, HeadingProps, Text, TextProps, TextTone } from "./components/layout/text.js";
|
|
105
|
+
import { AgendaRow, AgendaRowProps, AgendaRowWho } from "./components/data/agenda-row.js";
|
|
92
106
|
import { BarList, BarListItem } from "./components/data/bar-list.js";
|
|
93
107
|
import { DataTable, DataTableColumnDef, DataTableFeatures, DataTableProps, createDataTableColumnHelper, dataTableFeatures } from "./components/data/data-table.js";
|
|
108
|
+
import { DayStrip, DayStripDay, DayStripProps } from "./components/data/day-strip.js";
|
|
94
109
|
import { SectionedList, SectionedListItem, SectionedListProps, SectionedListSection } from "./components/data/sectioned-list.js";
|
|
95
110
|
import { Sparkline, SparklineProps, smoothPath } from "./components/data/sparkline.js";
|
|
96
111
|
import { StatusBarDatum, StatusBars, StatusBarsProps } from "./components/data/status-bars.js";
|
|
@@ -99,20 +114,21 @@ import { TrendChart, TrendChartProps, TrendLegend, TrendSeries } from "./compone
|
|
|
99
114
|
import { ActionReceipt, ActionReceiptProps } from "./components/ai/action-receipt.js";
|
|
100
115
|
import { ApprovalCard, ApprovalCardProps, ApprovalResult, ApprovalResultProps } from "./components/ai/approval.js";
|
|
101
116
|
import { AskBox, AskBoxProps } from "./components/ai/ask-box.js";
|
|
102
|
-
import { AssistantContextValue, AssistantDock, AssistantDockProps, AssistantMessage, AssistantPage, AssistantProvider, AssistantProviderProps, AssistantSendContext, useAssistant, useAssistantPage } from "./components/ai/assistant.js";
|
|
117
|
+
import { AssistantContextValue, AssistantDock, AssistantDockProps, AssistantMessage, AssistantPage, AssistantProvider, AssistantProviderProps, AssistantSendContext, AssistantSendOptions, useAssistant, useAssistantPage } from "./components/ai/assistant.js";
|
|
103
118
|
import { ChatPanel, ChatPanelProps, ChatShell, ChatShellProps } from "./components/ai/chat-shell.js";
|
|
104
119
|
import { AssistantAvatar, ChatMessage, ChatMessageProps, ChatThread, ChatThreadProps, MessageActions, MessageActionsProps, ToolCall, ToolCallProps, TypingIndicator, TypingIndicatorProps } from "./components/ai/chat.js";
|
|
105
|
-
import { CodeSnippet, CodeSnippetProps, InlineCode, InlineCodeProps, Prose } from "./components/ai/code-block.js";
|
|
106
|
-
import { Conversation, ConversationGroup, ConversationList, ConversationListProps, NewConversationButton, NewConversationButtonProps, formatWhen, groupByDate } from "./components/ai/conversation-list.js";
|
|
120
|
+
import { CodeSnippet, CodeSnippetProps, InlineCode, InlineCodeProps, Prose, ProseBlockquote } from "./components/ai/code-block.js";
|
|
121
|
+
import { Conversation, ConversationGroup, ConversationList, ConversationListProps, GroupByDateOptions, NewConversationButton, NewConversationButtonProps, formatWhen, groupByDate } from "./components/ai/conversation-list.js";
|
|
107
122
|
import { DictationButton, DictationButtonProps, SpeechSource, SpeechSourceHandlers, UseDictationOptions, browserSpeechSource, useDictation } from "./components/ai/dictation.js";
|
|
123
|
+
import { Markdown, MarkdownProps } from "./components/ai/markdown.js";
|
|
108
124
|
import { ModelOption, ModelPicker, ModelPickerProps } from "./components/ai/model-picker.js";
|
|
109
125
|
import { PromptInput, PromptInputChip, PromptInputChipProps, PromptInputProps, PromptInputSelect, PromptInputSelectOption, PromptInputSelectProps } from "./components/ai/prompt-input.js";
|
|
110
126
|
import { ToolGroup, ToolGroupProps, ToolStatus, ToolStatusIcon, ToolStep, ToolStepProps } from "./components/ai/tool-steps.js";
|
|
111
|
-
import { AppleIcon, AuthLayout, AuthLayoutProps, AuthProvider, GitHubIcon, GoogleIcon, LoginForm, LoginFormProps, LoginValues, SignupForm, SignupFormProps, SignupValues } from "./components/auth/auth.js";
|
|
127
|
+
import { AppleIcon, AuthForm, AuthFormProps, AuthLayout, AuthLayoutProps, AuthProvider, GitHubIcon, GoogleIcon, LoginForm, LoginFormProps, LoginValues, NewPasswordForm, NewPasswordFormProps, SignupForm, SignupFormProps, SignupValues } from "./components/auth/auth.js";
|
|
112
128
|
import { useCopyToClipboard } from "./hooks/use-copy-to-clipboard.js";
|
|
113
129
|
import { useHighlightedCode } from "./hooks/use-highlighted-code.js";
|
|
114
130
|
import { useMediaQuery } from "./hooks/use-media-query.js";
|
|
115
131
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
116
132
|
import { highlightCode, loadHighlighter } from "./lib/highlighter.js";
|
|
117
133
|
import { cn } from "./lib/utils.js";
|
|
118
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionReceipt, type ActionReceiptProps, ActivityFeed, type ActivityItem, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, AppNav, type AppNavAction, type AppNavGroup, type AppNavItem, type AppNavPlace, type AppNavProps, type AppNavSection, AppShell, type AppShellProps, AppleIcon, ApprovalCard, type ApprovalCardProps, ApprovalResult, type ApprovalResultProps, AskBox, type AskBoxProps, AspectRatio, AssistantAvatar, type AssistantContextValue, AssistantDock, type AssistantDockProps, type AssistantMessage, type AssistantPage, AssistantProvider, type AssistantProviderProps, type AssistantSendContext, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, type AuthLayoutProps, type AuthProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatPanel, type ChatPanelProps, ChatShell, type ChatShellProps, ChatThread, type ChatThreadProps, CheckCircle, type CheckCircleProps, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, type CodeSnippetProps, Collapse, type CollapseProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type Conversation, type ConversationGroup, ConversationList, type ConversationListProps, CopyField, type CopyFieldProps, DataTable, type DataTableColumnDef, type DataTableFeatures, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictationButton, type DictationButtonProps, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FocusLayout, type FocusLayoutProps, GitHubIcon, GoogleIcon, Grid, type GridCols, type GridProps, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, type InlineCodeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, type KeyValueItem, Label, LinkTile, type LinkTileProps, LoginForm, type LoginFormProps, type LoginValues, Marker, MarkerContent, MarkerIcon, MediaItem, type MediaItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, type MessageActionsProps, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, Metric, MetricGroup, type MetricProps, type ModelOption, ModelPicker, type ModelPickerProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, type NewConversationButtonProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, type PromptInputChipProps, type PromptInputProps, PromptInputSelect, type PromptInputSelectOption, type PromptInputSelectProps, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedThemeMode, type ResponsiveGridCols, Row, type RowProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, SectionedList, type SectionedListItem, type SectionedListProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, type SidebarLayoutProps, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, type SignupFormProps, type SignupValues, Skeleton, Slider, Sparkline, type SparklineProps, type SpeechSource, type SpeechSourceHandlers, Spinner, Stack, type StackAlign, type StackJustify, type StackProps, type StackSpace, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusBarDatum, StatusBars, type StatusBarsProps, StatusDot, type StatusDotProps, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskRow, type TaskRowAssignee, type TaskRowProps, Text, type TextProps, type TextTone, Textarea, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, ThemeToggle, Timeline, type TimelineItem, type ToastUndoOptions, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, type ToolCallProps, ToolGroup, type ToolGroupProps, type ToolStatus, ToolStatusIcon, ToolStep, type ToolStepProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, type TrendChartProps, TrendLegend, type TrendSeries, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseDictationOptions, UserChip, type UserChipProps, UserMenu, type UserMenuProps, badgeVariants, browserSpeechSource, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toastUndo, toggleVariants, useAssistant, useAssistantPage, useCarousel, useComboboxAnchor, useCopyToClipboard, useDictation, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
|
|
134
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionReceipt, type ActionReceiptProps, ActivityFeed, type ActivityItem, AgendaRow, type AgendaRowProps, type AgendaRowWho, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, AppNav, type AppNavAction, type AppNavGroup, type AppNavItem, type AppNavPlace, type AppNavProps, type AppNavSection, AppShell, type AppShellProps, AppleIcon, ApprovalCard, type ApprovalCardProps, ApprovalResult, type ApprovalResultProps, AskBox, type AskBoxProps, AspectRatio, AssistantAvatar, type AssistantContextValue, AssistantDock, type AssistantDockProps, type AssistantMessage, type AssistantPage, AssistantProvider, type AssistantProviderProps, type AssistantSendContext, type AssistantSendOptions, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthForm, type AuthFormProps, AuthLayout, type AuthLayoutProps, type AuthProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarStack, type AvatarStackProps, AvatarUpload, type AvatarUploadProps, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CategoryColor, CategoryDot, type CategoryDotProps, Celebration, type CelebrationProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatPanel, type ChatPanelProps, ChatShell, type ChatShellProps, ChatThread, type ChatThreadProps, CheckCircle, type CheckCircleProps, Checkbox, ChecklistEditor, type ChecklistEditorProps, type ChecklistItem, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, type CodeSnippetProps, Collapse, type CollapseProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorSwatchPicker, type ColorSwatchPickerProps, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommentThread, type CommentThreadComment, type CommentThreadProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type Conversation, type ConversationGroup, ConversationList, type ConversationListProps, CopyField, type CopyFieldProps, DataTable, type DataTableColumnDef, type DataTableFeatures, type DataTableProps, DateTimePicker, type DateTimePickerProps, type DateTimeValue, DayStrip, type DayStripDay, type DayStripProps, DetailSheet, type DetailSheetProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictationButton, type DictationButtonProps, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FocusLayout, type FocusLayoutProps, GitHubIcon, GoogleIcon, Grid, type GridCols, type GridProps, type GroupByDateOptions, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, type InlineCodeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, type KeyValueItem, Label, LinkTile, type LinkTileProps, LoginForm, type LoginFormProps, type LoginValues, Markdown, MarkdownEditor, type MarkdownEditorProps, type MarkdownProps, Marker, MarkerContent, MarkerIcon, MediaItem, type MediaItemProps, MemberAvatar, type MemberAvatarProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, type MessageActionsProps, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, Metric, MetricGroup, type MetricProps, type ModelOption, ModelPicker, type ModelPickerProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewConversationButton, type NewConversationButtonProps, NewPasswordForm, type NewPasswordFormProps, Page, PageHeader, type PageHeaderProps, type PageProps, PageSection, type PageSectionProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptDialog, type PromptDialogProps, PromptInput, PromptInputChip, type PromptInputChipProps, type PromptInputProps, PromptInputSelect, type PromptInputSelectOption, type PromptInputSelectProps, Prose, ProseBlockquote, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedThemeMode, type ResponsiveGridCols, Row, type RowProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, SectionedList, type SectionedListItem, type SectionedListProps, type SectionedListSection, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShowMore, type ShowMoreProps, Sidebar, SidebarCollapseButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, type SidebarLayoutProps, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, type SignupFormProps, type SignupValues, Skeleton, Slider, Sparkline, type SparklineProps, type SpeechSource, type SpeechSourceHandlers, Spinner, Stack, type StackAlign, type StackJustify, type StackProps, type StackSpace, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusBarDatum, StatusBars, type StatusBarsProps, StatusDot, type StatusDotProps, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskRow, type TaskRowAssignee, type TaskRowProps, Text, type TextProps, type TextTone, Textarea, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, ThemeToggle, TimeZonePicker, type TimeZonePickerProps, Timeline, type TimelineItem, type ToastUndoOptions, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, type ToolCallProps, ToolGroup, type ToolGroupProps, type ToolStatus, ToolStatusIcon, ToolStep, type ToolStepProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, type TrendChartProps, TrendLegend, type TrendSeries, TypingIndicator, type TypingIndicatorProps, UsageMeter, type UsageMeterProps, type UseDictationOptions, UserChip, type UserChipProps, UserMenu, type UserMenuProps, VisibilityBadge, type VisibilityBadgeProps, badgeVariants, browserSpeechSource, buttonGroupVariants, buttonVariants, categoryBg, celebrate, cn, createDataTableColumnHelper, cropImageToSquare, dataTableFeatures, formatWhen, groupByDate, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toast, toastUndo, toggleVariants, useAssistant, useAssistantPage, useCarousel, useComboboxAnchor, useCopyToClipboard, useDictation, useDirection, useHighlightedCode, useIsMobile, useMediaQuery, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useSidebarOptional, useTheme };
|