@botiverse/raft-ui 0.83.0 → 0.85.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 +125 -0
- package/dist/cn.d.mts +2 -0
- package/dist/cn.mjs +21 -1
- package/dist/components/alert-dialog/alert-dialog.mjs +2 -2
- package/dist/components/app-link-card/app-link-card.mjs +19 -37
- package/dist/components/app-shell/app-shell.mjs +2 -2
- package/dist/components/avatar/avatar.mjs +1 -1
- package/dist/components/banner/banner.mjs +15 -2
- package/dist/components/button/button-split.mjs +2 -2
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/choice-list/choice-list.recipe.mjs +1 -1
- package/dist/components/code-block/code-block.recipe.mjs +2 -2
- package/dist/components/combobox/combobox.mjs +1 -1
- package/dist/components/combobox-select/combobox-select.css +1 -1
- package/dist/components/comment/comment.recipe.mjs +2 -2
- package/dist/components/composer/composer-attachment.recipe.mjs +5 -5
- package/dist/components/composer/composer-drop-overlay.mjs +2 -2
- package/dist/components/composer/composer-drop-overlay.recipe.mjs +1 -1
- package/dist/components/composer/sortable-composer-attachments.mjs +1 -1
- package/dist/components/context-menu/context-menu.mjs +1 -1
- package/dist/components/conversation-panel/conversation-panel-empty-state.mjs +1 -1
- package/dist/components/dialog/dialog.mjs +4 -4
- package/dist/components/drag/drag-lift.d.mts +3 -2
- package/dist/components/drag/drag-lift.mjs +3 -2
- package/dist/components/drag/drag.recipe.mjs +1 -1
- package/dist/components/drawer/drawer.recipe.mjs +4 -4
- package/dist/components/dropdown-menu/dropdown-menu.mjs +1 -1
- package/dist/components/file-preview/file-preview.recipe.mjs +1 -1
- package/dist/components/fit-toolbar/fit-toolbar.d.mts +63 -8
- package/dist/components/fit-toolbar/fit-toolbar.mjs +310 -43
- package/dist/components/fit-toolbar/fit-toolbar.recipe.mjs +21 -7
- package/dist/components/fit-toolbar/index.d.mts +2 -2
- package/dist/components/inbox-item/inbox-item.recipe.mjs +7 -7
- package/dist/components/lightbox/index.d.mts +2 -2
- package/dist/components/lightbox/lightbox.d.mts +70 -4
- package/dist/components/lightbox/lightbox.mjs +285 -91
- package/dist/components/list-row/list-row.d.mts +14 -1
- package/dist/components/list-row/list-row.mjs +4 -2
- package/dist/components/list-row/list-row.recipe.d.mts +12 -0
- package/dist/components/list-row/list-row.recipe.mjs +19 -7
- package/dist/components/message-action-card/message-action-card-content.recipe.mjs +3 -3
- package/dist/components/message-action-card/message-action-card.mjs +7 -3
- package/dist/components/message-action-card/message-action-card.recipe.mjs +2 -6
- package/dist/components/message-attachment/message-image-gallery.recipe.mjs +1 -1
- package/dist/components/message-embed/index.d.mts +2 -1
- package/dist/components/message-embed/message-embed.d.mts +8 -1
- package/dist/components/message-embed/message-embed.mjs +2 -2
- package/dist/components/message-embed/message-embed.recipe.d.mts +160 -0
- package/dist/components/message-embed/message-embed.recipe.mjs +49 -10
- package/dist/components/message-forwarded-bundle/message-forwarded-bundle.mjs +1 -0
- package/dist/components/message-forwarded-bundle/message-forwarded-bundle.recipe.mjs +1 -1
- package/dist/components/message-item/message-item.recipe.mjs +2 -2
- package/dist/components/message-list/message-list.recipe.mjs +2 -2
- package/dist/components/message-quoted-preview/message-quoted-preview.mjs +2 -0
- package/dist/components/message-replies/message-replies.mjs +1 -1
- package/dist/components/message-replies/message-replies.recipe.mjs +1 -1
- package/dist/components/mobile-nav/mobile-nav.mjs +2 -2
- package/dist/components/notification-center/notification-center.mjs +1 -1
- package/dist/components/panel/panel-header.recipe.mjs +1 -1
- package/dist/components/panel/panel-split-action.recipe.mjs +2 -2
- package/dist/components/popover/popover.d.mts +11 -2
- package/dist/components/popover/popover.mjs +51 -38
- package/dist/components/preview-card/preview-card.d.mts +5 -1
- package/dist/components/preview-card/preview-card.mjs +25 -28
- package/dist/components/pull-to-refresh/pull-to-refresh-indicator.mjs +1 -1
- package/dist/components/resizable/resizable.recipe.mjs +1 -1
- package/dist/components/save-status/save-status.d.mts +16 -9
- package/dist/components/save-status/save-status.mjs +19 -30
- package/dist/components/scroll-area/scroll-area.css +1 -0
- package/dist/components/segmented-control/segmented-control.mjs +45 -8
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/selection-toolbar/selection-toolbar.recipe.mjs +1 -1
- package/dist/components/sidebar/sidebar.recipe.mjs +1 -1
- package/dist/components/tabs/tabs.mjs +4 -4
- package/dist/components/task-board/task-board.d.mts +5 -0
- package/dist/components/task-board/task-board.mjs +8 -1
- package/dist/components/task-dnd/task-dnd.d.mts +10 -1
- package/dist/components/task-dnd/task-dnd.mjs +2 -1
- package/dist/components/task-dnd/task-dnd.recipe.mjs +2 -2
- package/dist/components/thread-panel/thread-panel.recipe.mjs +1 -1
- package/dist/components/toast/toast.mjs +5 -5
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/lib/laid-out-children.mjs +32 -0
- package/dist/lib/list-cell.mjs +1 -1
- package/dist/lib/stacked-actions.mjs +7 -4
- package/dist/lint/no-raw-z-index.mjs +142 -0
- package/dist/lint/prefer-scroll-area.mjs +1 -1
- package/dist/lint/recommended.json +2 -1
- package/dist/lint.d.mts +8 -2
- package/dist/lint.mjs +16 -3
- package/dist/styles.css +28 -0
- package/dist/wip.d.mts +4 -2
- package/dist/wip.mjs +3 -2
- package/package.json +1 -1
- package/skills/raft-ui-guide/SKILL.md +1 -0
|
@@ -7,7 +7,6 @@ const listRow = tv({
|
|
|
7
7
|
"group/list-row flex w-full min-w-0 items-center gap-3 py-3 text-left",
|
|
8
8
|
"font-sans no-underline",
|
|
9
9
|
"[--list-row-ink:var(--foreground)] [--list-row-ink-2:var(--foreground-muted)] [--list-row-ink-3:var(--foreground-hint)]",
|
|
10
|
-
"[--list-row-status-space:0px]",
|
|
11
10
|
"text-(--list-row-ink)",
|
|
12
11
|
"not-disabled:not-aria-disabled:data-[tone=unread]:[--list-row-ink-2:var(--foreground)]",
|
|
13
12
|
"not-disabled:not-aria-disabled:data-[tone=muted]:[--list-row-ink:var(--foreground-muted)]",
|
|
@@ -19,7 +18,7 @@ const listRow = tv({
|
|
|
19
18
|
"aria-disabled:[--list-row-ink-2:var(--foreground-disabled)] aria-disabled:[--list-row-ink-3:var(--foreground-disabled)]"
|
|
20
19
|
],
|
|
21
20
|
icon: ["flex shrink-0 items-center justify-center", "text-(--list-row-ink-3) [&>svg]:size-5 [&>svg]:shrink-0"],
|
|
22
|
-
body: ["flex min-w-0 flex-1 flex-col gap-0.5"
|
|
21
|
+
body: ["flex min-w-0 flex-1 flex-col gap-0.5"],
|
|
23
22
|
line: ["flex min-w-0 items-center gap-2"],
|
|
24
23
|
title: [
|
|
25
24
|
"min-w-0 flex-1 truncate",
|
|
@@ -35,17 +34,17 @@ const listRow = tv({
|
|
|
35
34
|
variants: {
|
|
36
35
|
variant: {
|
|
37
36
|
default: { root: "min-h-16 pointer-coarse:min-h-14 pointer-coarse:py-2 [--list-row-rule-start:63px]" },
|
|
38
|
-
plain: { root: [
|
|
39
|
-
"py-(--settings-row-inset) pb-[calc(var(--settings-row-inset)+var(--list-row-status-space))]",
|
|
40
|
-
"has-[>[data-slot=list-row-body]>[data-slot=save-status]]:[--list-row-status-space:calc(--spacing(1)+var(--text-footnote--line-height))]",
|
|
41
|
-
"[--list-row-rule-start:16px]"
|
|
42
|
-
] },
|
|
37
|
+
plain: { root: ["py-(--settings-row-inset)", "[--list-row-rule-start:16px]"] },
|
|
43
38
|
entry: { root: "" }
|
|
44
39
|
},
|
|
45
40
|
interactive: {
|
|
46
41
|
true: {},
|
|
47
42
|
false: {}
|
|
48
43
|
},
|
|
44
|
+
attached: {
|
|
45
|
+
true: {},
|
|
46
|
+
false: {}
|
|
47
|
+
},
|
|
49
48
|
cell: {
|
|
50
49
|
false: { root: [
|
|
51
50
|
"relative px-4",
|
|
@@ -67,6 +66,7 @@ const listRow = tv({
|
|
|
67
66
|
compoundVariants: [
|
|
68
67
|
{
|
|
69
68
|
cell: false,
|
|
69
|
+
attached: false,
|
|
70
70
|
variant: ["default", "plain"],
|
|
71
71
|
class: { root: [
|
|
72
72
|
"before:pointer-events-none before:absolute before:top-0 before:right-0 before:hidden",
|
|
@@ -74,6 +74,17 @@ const listRow = tv({
|
|
|
74
74
|
"[[data-slot=list-row]+&]:before:block [li+li>&]:before:block"
|
|
75
75
|
] }
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
variant: "plain",
|
|
79
|
+
attached: true,
|
|
80
|
+
class: { root: "pt-0" }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
variant: "plain",
|
|
84
|
+
attached: true,
|
|
85
|
+
interactive: true,
|
|
86
|
+
class: { root: "min-h-control" }
|
|
87
|
+
},
|
|
77
88
|
{
|
|
78
89
|
cell: false,
|
|
79
90
|
interactive: true,
|
|
@@ -92,6 +103,7 @@ const listRow = tv({
|
|
|
92
103
|
defaultVariants: {
|
|
93
104
|
variant: "default",
|
|
94
105
|
interactive: true,
|
|
106
|
+
attached: false,
|
|
95
107
|
cell: false,
|
|
96
108
|
wrap: false
|
|
97
109
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from "../../lib/tv.mjs";
|
|
2
2
|
//#region src/components/message-action-card/message-action-card-content.recipe.ts
|
|
3
3
|
const messageActionCardContent = tv({ slots: {
|
|
4
|
-
root: ["
|
|
4
|
+
root: ["flex flex-col gap-2 pt-0"],
|
|
5
5
|
panel: [
|
|
6
6
|
"h-(--collapsible-panel-height) overflow-hidden",
|
|
7
7
|
"transition-[height] duration-200 ease-out motion-reduce:transition-none",
|
|
@@ -44,8 +44,8 @@ const messageActionCardContent = tv({ slots: {
|
|
|
44
44
|
"[&>svg]:mt-[calc((1lh-14px)/2)] [&>svg]:text-foreground-muted"
|
|
45
45
|
],
|
|
46
46
|
completion: ["inline-flex items-center gap-1.5 text-footnote text-foreground-muted", "[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-foreground"],
|
|
47
|
-
actions: ["
|
|
48
|
-
actionsNote: ["min-w-0
|
|
47
|
+
actions: ["mt-1"],
|
|
48
|
+
actionsNote: ["min-w-0 basis-full", "text-footnote text-foreground-muted"]
|
|
49
49
|
} });
|
|
50
50
|
//#endregion
|
|
51
51
|
export { messageActionCardContent };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
2
2
|
import { Badge } from "../badge/badge.mjs";
|
|
3
|
+
import { messageCard } from "../message-embed/message-embed.recipe.mjs";
|
|
3
4
|
import { useLabelValueFit } from "../../lib/label-value-fit.mjs";
|
|
4
5
|
import { MessageEmbed, MessageEmbedContent, MessageEmbedHeader } from "../message-embed/message-embed.mjs";
|
|
5
6
|
import { messageActionCard } from "./message-action-card.recipe.mjs";
|
|
@@ -25,6 +26,7 @@ function MessageActionCard({ className, render, open, defaultOpen = true, onOpen
|
|
|
25
26
|
defaultOpen,
|
|
26
27
|
onOpenChange,
|
|
27
28
|
render: /* @__PURE__ */ jsx(MessageEmbed, {
|
|
29
|
+
size: "item",
|
|
28
30
|
className: root({ className }),
|
|
29
31
|
render,
|
|
30
32
|
...props
|
|
@@ -36,7 +38,7 @@ function MessageActionCardContent({ className, render, ...props }) {
|
|
|
36
38
|
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
37
39
|
className: panel(),
|
|
38
40
|
children: /* @__PURE__ */ jsx(MessageEmbedContent, {
|
|
39
|
-
className: root({ className }),
|
|
41
|
+
className: messageCard().inset({ className: root({ className }) }),
|
|
40
42
|
render,
|
|
41
43
|
...props
|
|
42
44
|
})
|
|
@@ -129,8 +131,9 @@ function MessageActionCardCollapseTrigger({ className, ...props }) {
|
|
|
129
131
|
}
|
|
130
132
|
function MessageActionCardHeader({ className, render, ...props }) {
|
|
131
133
|
const { header } = messageActionCard();
|
|
134
|
+
const { inset, heading } = messageCard();
|
|
132
135
|
return /* @__PURE__ */ jsx(MessageEmbedHeader, {
|
|
133
|
-
className: header({ className }),
|
|
136
|
+
className: inset({ className: heading({ className: header({ className }) }) }),
|
|
134
137
|
render,
|
|
135
138
|
...props
|
|
136
139
|
});
|
|
@@ -290,10 +293,11 @@ function MessageActionCardCompletion({ className, render, ...props }) {
|
|
|
290
293
|
}
|
|
291
294
|
function MessageActionCardActions({ className, render, ...props }) {
|
|
292
295
|
const { actions } = messageActionCardContent();
|
|
296
|
+
const { actionRow } = messageCard();
|
|
293
297
|
return useRender({
|
|
294
298
|
defaultTagName: "div",
|
|
295
299
|
render,
|
|
296
|
-
props: mergeProps({ className: actions({ className }) }, props),
|
|
300
|
+
props: mergeProps({ className: actionRow({ className: actions({ className }) }) }, props),
|
|
297
301
|
state: { slot: "message-action-card-actions" }
|
|
298
302
|
});
|
|
299
303
|
}
|
|
@@ -2,12 +2,8 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
2
2
|
//#region src/components/message-action-card/message-action-card.recipe.ts
|
|
3
3
|
const messageActionCard = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
root: ["
|
|
6
|
-
header: [
|
|
7
|
-
"flex items-start",
|
|
8
|
-
"gap-2 px-3 pt-3 pb-2 group-data-closed/action-card:pb-3",
|
|
9
|
-
"text-subhead font-bold text-foreground"
|
|
10
|
-
],
|
|
5
|
+
root: ["group/action-card mt-2"],
|
|
6
|
+
header: ["flex items-start", "gap-2 pb-2 group-data-closed/action-card:pb-3"],
|
|
11
7
|
headerIcon: [
|
|
12
8
|
"flex shrink-0 items-center justify-center",
|
|
13
9
|
"[&>svg]:shrink-0",
|
|
@@ -13,7 +13,7 @@ const messageImageGallery = tv({
|
|
|
13
13
|
"outline-none focus-visible:keyboard:inset-ring-2 focus-visible:keyboard:inset-ring-foreground"
|
|
14
14
|
],
|
|
15
15
|
action: [
|
|
16
|
-
"absolute z-
|
|
16
|
+
"absolute z-raised hidden items-center justify-center",
|
|
17
17
|
"focus:flex",
|
|
18
18
|
"group-hover/img:flex",
|
|
19
19
|
"right-[calc(var(--control-embedded-inset)-1px)] bottom-[calc(var(--control-embedded-inset)-1px)] size-8 rounded-chip border-[1.5px] border-line-strong",
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { MessageEmbed, MessageEmbedContent, MessageEmbedContentProps, MessageEmbedFooter, MessageEmbedFooterProps, MessageEmbedHeader, MessageEmbedHeaderProps, MessageEmbedProps } from "./message-embed.mjs";
|
|
2
|
-
|
|
2
|
+
import { messageCard, messageEmbed } from "./message-embed.recipe.mjs";
|
|
3
|
+
export { MessageEmbed, MessageEmbedContent, type MessageEmbedContentProps, MessageEmbedFooter, type MessageEmbedFooterProps, MessageEmbedHeader, type MessageEmbedHeaderProps, type MessageEmbedProps, messageCard, messageEmbed };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
2
|
//#region src/components/message-embed/message-embed.d.ts
|
|
3
3
|
type DivProps = useRender.ComponentProps<"div">;
|
|
4
|
-
export declare function MessageEmbed({ interactive, className, render, ...props }: MessageEmbedProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
4
|
+
export declare function MessageEmbed({ interactive, size, className, render, ...props }: MessageEmbedProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
5
5
|
export declare function MessageEmbedHeader({ className, render, ...props }: DivProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
6
6
|
export declare function MessageEmbedContent({ className, render, ...props }: DivProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
7
|
export declare function MessageEmbedFooter({ className, render, ...props }: DivProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -13,6 +13,13 @@ export type MessageEmbedProps = DivProps & {
|
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
interactive?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The card's width, one of the two a card in a message has
|
|
18
|
+
* (cards-in-messages.md): `item` for a card that opens one thing, at most
|
|
19
|
+
* 400px and the message's width on a phone; `content` for a card that
|
|
20
|
+
* shows other messages, at most 560px. Unset, the card sets no width.
|
|
21
|
+
*/
|
|
22
|
+
size?: "item" | "content";
|
|
16
23
|
};
|
|
17
24
|
export type MessageEmbedHeaderProps = DivProps;
|
|
18
25
|
export type MessageEmbedContentProps = DivProps;
|
|
@@ -2,8 +2,8 @@ import { messageEmbed } from "./message-embed.recipe.mjs";
|
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/message-embed/message-embed.tsx
|
|
5
|
-
function MessageEmbed({ interactive = false, className, render, ...props }) {
|
|
6
|
-
const { root } = messageEmbed();
|
|
5
|
+
function MessageEmbed({ interactive = false, size, className, render, ...props }) {
|
|
6
|
+
const { root } = messageEmbed({ size });
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
"data-interactive": interactive ? "true" : void 0,
|
|
9
9
|
className: root({ className })
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
//#region src/components/message-embed/message-embed.recipe.d.ts
|
|
2
|
+
export declare const messageEmbed: import("tailwind-variants/lite").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
item: {
|
|
5
|
+
root: string[];
|
|
6
|
+
};
|
|
7
|
+
content: {
|
|
8
|
+
root: string[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
root: string[];
|
|
13
|
+
header: string[];
|
|
14
|
+
content: string[];
|
|
15
|
+
footer: string[];
|
|
16
|
+
}, undefined, {
|
|
17
|
+
size: {
|
|
18
|
+
item: {
|
|
19
|
+
root: string[];
|
|
20
|
+
};
|
|
21
|
+
content: {
|
|
22
|
+
root: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
root: string[];
|
|
27
|
+
header: string[];
|
|
28
|
+
content: string[];
|
|
29
|
+
footer: string[];
|
|
30
|
+
}, import("tailwind-variants/lite").TVReturnTypeLike<{
|
|
31
|
+
size: {
|
|
32
|
+
item: {
|
|
33
|
+
root: string[];
|
|
34
|
+
};
|
|
35
|
+
content: {
|
|
36
|
+
root: string[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
root: string[];
|
|
41
|
+
header: string[];
|
|
42
|
+
content: string[];
|
|
43
|
+
footer: string[];
|
|
44
|
+
}>>;
|
|
45
|
+
export declare const messageCard: import("tailwind-variants/lite").TVReturnType<{
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: {
|
|
48
|
+
actionGroup?: import("tailwind-variants/lite").ClassValue;
|
|
49
|
+
actionRow?: import("tailwind-variants/lite").ClassValue;
|
|
50
|
+
actions?: import("tailwind-variants/lite").ClassValue;
|
|
51
|
+
body?: import("tailwind-variants/lite").ClassValue;
|
|
52
|
+
eyebrow?: import("tailwind-variants/lite").ClassValue;
|
|
53
|
+
heading?: import("tailwind-variants/lite").ClassValue;
|
|
54
|
+
inset?: import("tailwind-variants/lite").ClassValue;
|
|
55
|
+
meta?: import("tailwind-variants/lite").ClassValue;
|
|
56
|
+
popover?: import("tailwind-variants/lite").ClassValue;
|
|
57
|
+
source?: import("tailwind-variants/lite").ClassValue;
|
|
58
|
+
sourceFooter?: import("tailwind-variants/lite").ClassValue;
|
|
59
|
+
sourceHost?: import("tailwind-variants/lite").ClassValue;
|
|
60
|
+
sourceHostText?: import("tailwind-variants/lite").ClassValue;
|
|
61
|
+
sourceIcon?: import("tailwind-variants/lite").ClassValue;
|
|
62
|
+
sourceName?: import("tailwind-variants/lite").ClassValue;
|
|
63
|
+
title?: import("tailwind-variants/lite").ClassValue;
|
|
64
|
+
} | import("tailwind-variants/lite").ClassValue;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
[x: string]: {
|
|
68
|
+
[x: string]: {
|
|
69
|
+
actionGroup?: import("tailwind-variants/lite").ClassValue;
|
|
70
|
+
actionRow?: import("tailwind-variants/lite").ClassValue;
|
|
71
|
+
actions?: import("tailwind-variants/lite").ClassValue;
|
|
72
|
+
body?: import("tailwind-variants/lite").ClassValue;
|
|
73
|
+
eyebrow?: import("tailwind-variants/lite").ClassValue;
|
|
74
|
+
heading?: import("tailwind-variants/lite").ClassValue;
|
|
75
|
+
inset?: import("tailwind-variants/lite").ClassValue;
|
|
76
|
+
meta?: import("tailwind-variants/lite").ClassValue;
|
|
77
|
+
popover?: import("tailwind-variants/lite").ClassValue;
|
|
78
|
+
source?: import("tailwind-variants/lite").ClassValue;
|
|
79
|
+
sourceFooter?: import("tailwind-variants/lite").ClassValue;
|
|
80
|
+
sourceHost?: import("tailwind-variants/lite").ClassValue;
|
|
81
|
+
sourceHostText?: import("tailwind-variants/lite").ClassValue;
|
|
82
|
+
sourceIcon?: import("tailwind-variants/lite").ClassValue;
|
|
83
|
+
sourceName?: import("tailwind-variants/lite").ClassValue;
|
|
84
|
+
title?: import("tailwind-variants/lite").ClassValue;
|
|
85
|
+
} | import("tailwind-variants/lite").ClassValue;
|
|
86
|
+
};
|
|
87
|
+
} | {}, {
|
|
88
|
+
source: string[];
|
|
89
|
+
sourceIcon: string[];
|
|
90
|
+
sourceName: string[];
|
|
91
|
+
sourceHost: string[];
|
|
92
|
+
sourceHostText: string[];
|
|
93
|
+
sourceFooter: string[];
|
|
94
|
+
body: string[];
|
|
95
|
+
eyebrow: string[];
|
|
96
|
+
title: string[];
|
|
97
|
+
heading: string[];
|
|
98
|
+
meta: string[];
|
|
99
|
+
actions: string[];
|
|
100
|
+
actionRow: string[];
|
|
101
|
+
actionGroup: string[];
|
|
102
|
+
inset: string[];
|
|
103
|
+
popover: string[];
|
|
104
|
+
}, undefined, {
|
|
105
|
+
[key: string]: {
|
|
106
|
+
[key: string]: {
|
|
107
|
+
actionGroup?: import("tailwind-variants/lite").ClassValue;
|
|
108
|
+
actionRow?: import("tailwind-variants/lite").ClassValue;
|
|
109
|
+
actions?: import("tailwind-variants/lite").ClassValue;
|
|
110
|
+
body?: import("tailwind-variants/lite").ClassValue;
|
|
111
|
+
eyebrow?: import("tailwind-variants/lite").ClassValue;
|
|
112
|
+
heading?: import("tailwind-variants/lite").ClassValue;
|
|
113
|
+
inset?: import("tailwind-variants/lite").ClassValue;
|
|
114
|
+
meta?: import("tailwind-variants/lite").ClassValue;
|
|
115
|
+
popover?: import("tailwind-variants/lite").ClassValue;
|
|
116
|
+
source?: import("tailwind-variants/lite").ClassValue;
|
|
117
|
+
sourceFooter?: import("tailwind-variants/lite").ClassValue;
|
|
118
|
+
sourceHost?: import("tailwind-variants/lite").ClassValue;
|
|
119
|
+
sourceHostText?: import("tailwind-variants/lite").ClassValue;
|
|
120
|
+
sourceIcon?: import("tailwind-variants/lite").ClassValue;
|
|
121
|
+
sourceName?: import("tailwind-variants/lite").ClassValue;
|
|
122
|
+
title?: import("tailwind-variants/lite").ClassValue;
|
|
123
|
+
} | import("tailwind-variants/lite").ClassValue;
|
|
124
|
+
};
|
|
125
|
+
} | {}, {
|
|
126
|
+
source: string[];
|
|
127
|
+
sourceIcon: string[];
|
|
128
|
+
sourceName: string[];
|
|
129
|
+
sourceHost: string[];
|
|
130
|
+
sourceHostText: string[];
|
|
131
|
+
sourceFooter: string[];
|
|
132
|
+
body: string[];
|
|
133
|
+
eyebrow: string[];
|
|
134
|
+
title: string[];
|
|
135
|
+
heading: string[];
|
|
136
|
+
meta: string[];
|
|
137
|
+
actions: string[];
|
|
138
|
+
actionRow: string[];
|
|
139
|
+
actionGroup: string[];
|
|
140
|
+
inset: string[];
|
|
141
|
+
popover: string[];
|
|
142
|
+
}, import("tailwind-variants/lite").TVReturnTypeLike<unknown, {
|
|
143
|
+
source: string[];
|
|
144
|
+
sourceIcon: string[];
|
|
145
|
+
sourceName: string[];
|
|
146
|
+
sourceHost: string[];
|
|
147
|
+
sourceHostText: string[];
|
|
148
|
+
sourceFooter: string[];
|
|
149
|
+
body: string[];
|
|
150
|
+
eyebrow: string[];
|
|
151
|
+
title: string[];
|
|
152
|
+
heading: string[];
|
|
153
|
+
meta: string[];
|
|
154
|
+
actions: string[];
|
|
155
|
+
actionRow: string[];
|
|
156
|
+
actionGroup: string[];
|
|
157
|
+
inset: string[];
|
|
158
|
+
popover: string[];
|
|
159
|
+
}>>;
|
|
160
|
+
//#endregion
|
|
@@ -1,15 +1,54 @@
|
|
|
1
1
|
import { tv } from "../../lib/tv.mjs";
|
|
2
2
|
//#region src/components/message-embed/message-embed.recipe.ts
|
|
3
|
-
const messageEmbed = tv({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
const messageEmbed = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"group block min-w-0 text-left",
|
|
7
|
+
"rounded-container border border-line-hairline bg-layer-card",
|
|
8
|
+
"outline-none focus-visible:shadow-focus",
|
|
9
|
+
"data-[interactive=true]:hover:overlay-subtle data-[interactive=true]:active:overlay-medium",
|
|
10
|
+
"not-data-[frame=bar]:*:data-[slot=message-embed-content]:first:rounded-t-[calc(var(--radius-container)-1px)] not-data-[frame=bar]:*:data-[slot=message-embed-content]:first:overflow-clip",
|
|
11
|
+
"not-data-[frame=bar]:*:data-[slot=message-embed-content]:last:rounded-b-[calc(var(--radius-container)-1px)] not-data-[frame=bar]:*:data-[slot=message-embed-content]:last:overflow-clip"
|
|
12
|
+
],
|
|
13
|
+
header: ["min-w-0", "px-3 py-2"],
|
|
14
|
+
content: ["min-w-0"],
|
|
15
|
+
footer: ["min-w-0", "px-3 py-2"]
|
|
16
|
+
},
|
|
17
|
+
variants: { size: {
|
|
18
|
+
item: { root: ["w-full max-w-[400px] max-md:max-w-none"] },
|
|
19
|
+
content: { root: ["w-full max-w-[560px]"] }
|
|
20
|
+
} }
|
|
21
|
+
});
|
|
22
|
+
const messageCard = tv({ slots: {
|
|
23
|
+
source: [
|
|
24
|
+
"flex min-w-0 items-center gap-1.5",
|
|
25
|
+
"border-b border-line-hairline px-3 py-2",
|
|
26
|
+
"font-sans text-caption text-foreground-muted"
|
|
9
27
|
],
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
28
|
+
sourceIcon: ["inline-flex size-4 shrink-0 items-center justify-center", "*:size-full *:shrink-0 [&>img]:rounded-[2px] [&>img]:object-cover"],
|
|
29
|
+
sourceName: ["min-w-0 truncate", "font-semibold text-foreground"],
|
|
30
|
+
sourceHost: ["flex min-w-0 items-baseline", "before:shrink-0 before:pe-1.5 before:content-['·']"],
|
|
31
|
+
sourceHostText: ["min-w-0 truncate"],
|
|
32
|
+
sourceFooter: [
|
|
33
|
+
"m-0 truncate",
|
|
34
|
+
"border-t border-line-hairline px-3 py-2",
|
|
35
|
+
"font-sans text-caption text-foreground-muted"
|
|
36
|
+
],
|
|
37
|
+
body: ["flex min-w-0 flex-col gap-1.5", "p-3"],
|
|
38
|
+
eyebrow: ["m-0 truncate", "font-mono text-mono-meta text-foreground-muted"],
|
|
39
|
+
title: [
|
|
40
|
+
"m-0 line-clamp-2",
|
|
41
|
+
"font-sans text-subhead font-bold text-foreground",
|
|
42
|
+
"[&_a]:rounded-[2px] [&_a]:decoration-[1.5px] [&_a]:underline-offset-[3px] [&_a]:hover:underline",
|
|
43
|
+
"[&_a]:outline-none [&_a]:focus-visible:shadow-focus"
|
|
44
|
+
],
|
|
45
|
+
heading: ["font-sans text-subhead font-bold text-foreground"],
|
|
46
|
+
meta: ["flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1", "m-0 font-sans text-callout text-foreground-muted"],
|
|
47
|
+
actions: ["flex flex-wrap items-center justify-end gap-2", "px-3 pb-3"],
|
|
48
|
+
actionRow: ["flex flex-wrap items-center justify-end gap-2"],
|
|
49
|
+
actionGroup: ["flex min-w-0 max-w-full flex-wrap items-center justify-end gap-2", "ms-auto"],
|
|
50
|
+
inset: ["p-3"],
|
|
51
|
+
popover: ["w-[400px] max-w-(--available-width)"]
|
|
13
52
|
} });
|
|
14
53
|
//#endregion
|
|
15
|
-
export { messageEmbed };
|
|
54
|
+
export { messageCard, messageEmbed };
|
|
@@ -56,6 +56,7 @@ function MessageForwardedBundle({ className, fullWidth = false, render, ...props
|
|
|
56
56
|
return /* @__PURE__ */ jsx(MessageForwardedBundleFoldContext.Provider, {
|
|
57
57
|
value: fold,
|
|
58
58
|
children: /* @__PURE__ */ jsx(MessageEmbed, {
|
|
59
|
+
size: fullWidth ? void 0 : "content",
|
|
59
60
|
className: root({ className }),
|
|
60
61
|
render,
|
|
61
62
|
...props
|
|
@@ -2,7 +2,7 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
2
2
|
//#region src/components/message-forwarded-bundle/message-forwarded-bundle.recipe.ts
|
|
3
3
|
const messageForwardedBundle = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
root: ["mt-1
|
|
5
|
+
root: ["mt-1"],
|
|
6
6
|
header: ["flex flex-wrap items-center justify-between", "gap-2"],
|
|
7
7
|
headerContent: ["flex min-w-0 items-center", "gap-2"],
|
|
8
8
|
headerLabel: ["inline-flex shrink-0 items-center", "gap-1 text-footnote font-bold text-foreground-muted [&_svg]:size-3.5"],
|
|
@@ -81,7 +81,7 @@ const messageItem = tv({
|
|
|
81
81
|
"dark:shadow-[0_0_0_3px_var(--mi-row-fill,transparent),0_0_0_3px_var(--layer-canvas)]"
|
|
82
82
|
],
|
|
83
83
|
edited: ["ms-1 whitespace-nowrap", "text-caption text-foreground-hint"],
|
|
84
|
-
trailing: ["absolute end-0 bottom-0 z-
|
|
84
|
+
trailing: ["absolute end-0 bottom-0 z-raised flex h-lh items-center", "select-none! **:select-none!"],
|
|
85
85
|
body: [
|
|
86
86
|
"wrap-break-word select-text",
|
|
87
87
|
"**:select-text",
|
|
@@ -93,7 +93,7 @@ const messageItem = tv({
|
|
|
93
93
|
attachments: ["stack-y-2", "mt-2"],
|
|
94
94
|
footer: ["mt-1.5 flex flex-wrap items-center gap-1.5"],
|
|
95
95
|
toolbar: [
|
|
96
|
-
"absolute z-
|
|
96
|
+
"absolute z-control flex items-center",
|
|
97
97
|
"opacity-(--mi-toolbar-opacity,0)",
|
|
98
98
|
"[pointer-events:var(--mi-toolbar-pe,none)]",
|
|
99
99
|
"top-[-18px] md:pointer-fine:top-[calc(-1*(var(--control-height)+8px)/2)] right-3 gap-1 overflow-visible rounded-container p-1",
|
|
@@ -14,7 +14,7 @@ const messageList = tv({
|
|
|
14
14
|
dateDividerRule: ["flex-1", "min-w-3 border-t border-line-hairline"],
|
|
15
15
|
dateDividerChip: ["inline-flex items-center", "font-mono text-mono-meta whitespace-nowrap text-foreground-hint"],
|
|
16
16
|
endFade: [
|
|
17
|
-
"pointer-events-none absolute inset-x-0 bottom-0 z-
|
|
17
|
+
"pointer-events-none absolute inset-x-0 bottom-0 z-raised",
|
|
18
18
|
"h-timeline-section",
|
|
19
19
|
"bg-linear-to-t from-layer-canvas to-transparent"
|
|
20
20
|
],
|
|
@@ -35,7 +35,7 @@ const messageList = tv({
|
|
|
35
35
|
});
|
|
36
36
|
const messageListJump = tv({
|
|
37
37
|
slots: {
|
|
38
|
-
controls: ["absolute inset-x-0 z-
|
|
38
|
+
controls: ["absolute inset-x-0 z-float mx-auto", "flex w-fit max-w-[calc(100%-1.5rem)] flex-wrap items-center justify-center gap-x-2 gap-y-3"],
|
|
39
39
|
group: ["inline-flex shrink-0 items-stretch", "*:data-[slot=message-list-jump-pill]:rounded-e-none"],
|
|
40
40
|
dismiss: [
|
|
41
41
|
"rounded-s-none border-s-0",
|
|
@@ -7,6 +7,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
7
7
|
function MessageQuotedPreview({ className, render, ...props }) {
|
|
8
8
|
const { root } = messageQuotedPreview();
|
|
9
9
|
return /* @__PURE__ */ jsx(MessageEmbed, {
|
|
10
|
+
"data-frame": "bar",
|
|
10
11
|
className: root({ className }),
|
|
11
12
|
render,
|
|
12
13
|
...props
|
|
@@ -126,6 +127,7 @@ function MessageQuotedPreviewAttachment({ className, render, ...props }) {
|
|
|
126
127
|
function MessageQuotedPreviewLoading({ className, render, ...props }) {
|
|
127
128
|
const { loading } = messageQuotedPreview();
|
|
128
129
|
return /* @__PURE__ */ jsx(MessageEmbed, {
|
|
130
|
+
"data-frame": "bar",
|
|
129
131
|
className: loading({ className }),
|
|
130
132
|
render,
|
|
131
133
|
...props
|
|
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
//#region src/components/message-replies/message-replies.tsx
|
|
7
7
|
function MessageReplies({ className, render, ...props }) {
|
|
8
8
|
const { root } = messageReplies();
|
|
9
|
-
const { root: embedRoot } = messageEmbed();
|
|
9
|
+
const { root: embedRoot } = messageEmbed({ size: "content" });
|
|
10
10
|
const defaultProps = { className: embedRoot({ className: root({ className }) }) };
|
|
11
11
|
return useRender({
|
|
12
12
|
defaultTagName: "button",
|
|
@@ -4,7 +4,7 @@ const messageReplies = tv({ slots: {
|
|
|
4
4
|
root: [
|
|
5
5
|
"group/message-replies flex min-w-0 w-full flex-col text-left",
|
|
6
6
|
"transition-colors focus-visible:keyboard:outline-1 focus-visible:keyboard:outline-line-strong",
|
|
7
|
-
"mt-2
|
|
7
|
+
"mt-2 gap-1 border-0 px-2.5 py-2",
|
|
8
8
|
"bg-fill-muted text-foreground-muted hover:overlay-subtle active:overlay-medium",
|
|
9
9
|
"focus-visible:outline-none focus-visible:shadow-focus"
|
|
10
10
|
],
|
|
@@ -17,8 +17,8 @@ const mobileNav = tv({ slots: {
|
|
|
17
17
|
"[&_svg]:shrink-0",
|
|
18
18
|
"isolate min-w-0 flex-col justify-start gap-[7px] border-0 px-0 pt-1 pb-0",
|
|
19
19
|
"font-sans text-[10px]/3 font-semibold text-foreground-hint",
|
|
20
|
-
"*:relative *:z-
|
|
21
|
-
"before:pointer-events-none before:absolute before:top-0 before:left-1/2 before:z-
|
|
20
|
+
"*:relative *:z-raised [&_svg]:size-[22px] [&_svg]:stroke-2",
|
|
21
|
+
"before:pointer-events-none before:absolute before:top-0 before:left-1/2 before:z-base before:-translate-x-1/2",
|
|
22
22
|
"before:h-[30px] before:w-14 before:rounded-control before:border-[1.5px] before:border-transparent before:content-['']",
|
|
23
23
|
"active:before:bg-fill-medium",
|
|
24
24
|
"data-[selected=true]:font-bold data-[selected=true]:text-foreground",
|
|
@@ -162,7 +162,7 @@ function NotificationCenterPopup({ viewport = "desktop", size = "md", className,
|
|
|
162
162
|
side,
|
|
163
163
|
sideOffset,
|
|
164
164
|
sticky,
|
|
165
|
-
className: "isolate z-
|
|
165
|
+
className: "isolate z-popup outline-none",
|
|
166
166
|
children: /* @__PURE__ */ jsx(Popover.Popup, {
|
|
167
167
|
"aria-label": props["aria-label"] ?? "Notification center",
|
|
168
168
|
"data-slot": "notification-center-popup",
|
|
@@ -61,7 +61,7 @@ const panelHeader = tv({
|
|
|
61
61
|
"flex h-(--shell-header-height,var(--header-height)) shrink-0 items-center gap-3 max-md:gap-2",
|
|
62
62
|
panelHeadEdges,
|
|
63
63
|
"border-b border-line-seam bg-layer-canvas text-foreground",
|
|
64
|
-
"max-md:sticky max-md:top-0 max-md:z-
|
|
64
|
+
"max-md:sticky max-md:top-0 max-md:z-chrome"
|
|
65
65
|
]
|
|
66
66
|
}, {
|
|
67
67
|
slots: ["sectionHeader"],
|
|
@@ -21,7 +21,7 @@ const panelSplitAction = tv({ base: [
|
|
|
21
21
|
const splitActionMainParts = [
|
|
22
22
|
"pointer-events-auto rounded-e-none",
|
|
23
23
|
"after:end-0",
|
|
24
|
-
"focus-visible:z-
|
|
24
|
+
"focus-visible:z-raised aria-pressed:z-raised data-pressed:z-raised",
|
|
25
25
|
"bg-(--split-action-main-tint,transparent)",
|
|
26
26
|
"group-hover/split-action:bg-fill-subtle",
|
|
27
27
|
"hover:bg-fill-medium active:bg-fill-medium"
|
|
@@ -40,7 +40,7 @@ const panelSplitActionMenu = tv({
|
|
|
40
40
|
"pointer-events-auto min-w-0 rounded-s-none px-0",
|
|
41
41
|
"w-6 me-5 md:pointer-fine:w-5 md:pointer-fine:me-0",
|
|
42
42
|
"after:start-0 after:inset-e-[-21.5px] md:pointer-fine:after:-end-[calc(var(--spacing-control-hit)+1.5px)]",
|
|
43
|
-
"focus-visible:z-
|
|
43
|
+
"focus-visible:z-raised",
|
|
44
44
|
"[[data-split-action-main][data-pressed]~&]:[--split-action-menu-tint:var(--fill-subtle)]",
|
|
45
45
|
"[[data-split-action-main][aria-pressed=true]~&]:[--split-action-menu-tint:var(--fill-subtle)]",
|
|
46
46
|
"bg-(--split-action-menu-tint,transparent)",
|
|
@@ -13,8 +13,17 @@ export declare function PopoverPopup({ className, ...props }: PopoverPopupProps)
|
|
|
13
13
|
export type PopoverContentProps = StyledProps<Popover.Popup.Props> & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "anchor" | "arrowPadding" | "collisionAvoidance" | "collisionBoundary" | "collisionPadding" | "disableAnchorTracking" | "positionMethod" | "side" | "sideOffset" | "sticky"> & {
|
|
14
14
|
container?: PopoverPortalProps["container"];
|
|
15
15
|
portalProps?: PopoverPortalProps;
|
|
16
|
+
/**
|
|
17
|
+
* `item` for a popover about an app's item, such as the question before
|
|
18
|
+
* its link previews are shown: 400px, and `PopoverBody`, `PopoverTitle`
|
|
19
|
+
* and `PopoverActions` take a card's parts and 12px inset, like the item
|
|
20
|
+
* card (PreviewCard `size="item"`). Choose it by what the popover is
|
|
21
|
+
* about, not by its parts.
|
|
22
|
+
* @default "default"
|
|
23
|
+
*/
|
|
24
|
+
size?: "default" | "item";
|
|
16
25
|
};
|
|
17
|
-
export declare function PopoverContent({ align, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, container, portalProps, className, ...props }: PopoverContentProps): import("react").JSX.Element;
|
|
26
|
+
export declare function PopoverContent({ align, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, container, portalProps, size, className, ...props }: PopoverContentProps): import("react").JSX.Element;
|
|
18
27
|
export type PopoverViewportProps = StyledProps<Popover.Viewport.Props>;
|
|
19
28
|
export declare function PopoverViewport({ className, ...props }: PopoverViewportProps): import("react").JSX.Element;
|
|
20
29
|
export type PopoverHeaderProps = ComponentPropsWithRef<"div">;
|
|
@@ -32,7 +41,7 @@ export declare function PopoverArrow({ className, ...props }: PopoverArrowProps)
|
|
|
32
41
|
export type PopoverBackdropProps = StyledProps<Popover.Backdrop.Props>;
|
|
33
42
|
export declare function PopoverBackdrop({ className, ...props }: PopoverBackdropProps): import("react").JSX.Element;
|
|
34
43
|
export type PopoverBodyProps = ComponentPropsWithRef<"div">;
|
|
35
|
-
/** The panel's text: a `PopoverTitle` and a `PopoverDescription`, 16px in from its edges. */
|
|
44
|
+
/** The panel's text: a `PopoverTitle` and a `PopoverDescription`, 16px in from its edges (12px in a `size="item"` popover). */
|
|
36
45
|
export declare function PopoverBody({ className, ...props }: PopoverBodyProps): import("react").JSX.Element;
|
|
37
46
|
export type PopoverActionsProps = ComponentPropsWithRef<"div">;
|
|
38
47
|
/** The panel's buttons, at its end, under `PopoverBody`: the way out first, then the confirm button. */
|