@botiverse/raft-ui 0.71.0 → 0.73.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 +31 -0
- package/dist/components/activity-inbox/activity-inbox-shell.d.mts +6 -3
- package/dist/components/activity-inbox/activity-inbox-shell.mjs +33 -14
- package/dist/components/activity-inbox/activity-inbox-shell.recipe.mjs +6 -1
- package/dist/components/announcement-dialog/announcement-dialog.d.mts +2 -1
- package/dist/components/announcement-dialog/announcement-dialog.mjs +5 -4
- package/dist/components/choice-list/choice-list.mjs +4 -1
- package/dist/components/choice-list/choice-list.recipe.mjs +2 -2
- package/dist/components/combobox-select/combobox-select.css +2 -0
- package/dist/components/composer/composer-suggestion-list.d.mts +5 -2
- package/dist/components/composer/composer-suggestion-list.mjs +10 -8
- package/dist/components/dialog/dialog.d.mts +5 -3
- package/dist/components/dialog/dialog.mjs +16 -10
- package/dist/components/files/files.d.mts +5 -2
- package/dist/components/files/files.mjs +11 -2
- package/dist/components/files/files.recipe.mjs +1 -1
- package/dist/components/filter-chip/filter-chip.mjs +2 -1
- package/dist/components/icons/action-icons.d.mts +8 -4
- package/dist/components/icons/action-icons.mjs +20 -12
- package/dist/components/icons/object-icons.d.mts +4 -1
- package/dist/components/icons/object-icons.mjs +8 -5
- package/dist/components/markdown/markdown-parts.d.mts +1 -1
- package/dist/components/markdown/markdown-parts.mjs +1 -1
- package/dist/components/message-action-card/message-action-card-content.recipe.mjs +2 -1
- package/dist/components/message-action-card/message-action-card.d.mts +6 -4
- package/dist/components/message-action-card/message-action-card.mjs +14 -27
- package/dist/components/message-list/message-list.mjs +3 -3
- package/dist/components/mobile-nav/mobile-nav-server.d.mts +4 -2
- package/dist/components/mobile-nav/mobile-nav-server.mjs +9 -5
- package/dist/components/notification-center/notification-center.d.mts +5 -2
- package/dist/components/notification-center/notification-center.mjs +10 -8
- package/dist/components/panel/panel-action.mjs +1 -1
- package/dist/components/panel/panel.d.mts +10 -2
- package/dist/components/panel/panel.mjs +26 -3
- package/dist/components/panel/panel.recipe.mjs +2 -1
- package/dist/components/search/search.d.mts +5 -3
- package/dist/components/search/search.mjs +9 -10
- package/dist/components/search/search.recipe.mjs +1 -1
- package/dist/components/segmented-control/segmented-control.mjs +1 -1
- package/dist/components/sidebar/sidebar.mjs +1 -1
- package/dist/components/tabs/tabs.mjs +1 -1
- package/dist/components/tasks/tasks-panel.d.mts +6 -2
- package/dist/components/tasks/tasks-panel.mjs +10 -7
- package/dist/components/tasks/tasks-panel.recipe.mjs +1 -1
- package/dist/components/toggle-group/toggle-group.mjs +1 -1
- package/dist/components/virtual-list/styles/virtual-list.css +3 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/use-scrollbar-size.d.mts +3 -0
- package/dist/lib/use-scrollbar-size.mjs +3 -0
- package/dist/styles.css +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## [0.73.0](https://github.com/botiverse/raft-design/compare/v0.72.0...v0.73.0) (2026-11-08)
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- **Every region that scrolls is a ScrollArea**: `PanelScrollViewport`, `ActivityInboxViewport`, `SearchShellViewport`, `NotificationCenterScroller`, `FilesViewport`, `TasksPanelViewport`, ChoiceList's scroller, `MobileNavServerPopoverList`, `ComposerSuggestionList`, `AnnouncementDialogBody`, `MessageActionCardScopeListViewport` and `DialogNav` show ScrollArea's overlay scrollbar instead of the platform's. Native scrolling stays only in the places scroll-area.md lists, each with its reason, and a test fails on any other. ([#1055](https://github.com/botiverse/raft-design/pull/1055))
|
|
6
|
+
- Why: one look for scrollbars on every platform and theme, and a scrollbar that takes no room from a list's 8px inset (Artea, #proj-raft-ui:#209).
|
|
7
|
+
- Affects: **keyboard order**: a `PanelScrollViewport` whose content overflows is now a Tab stop of its own, before the controls inside it (a scrolling region must be reachable by keyboard). Check tests that depend on Tab order when upgrading. `PanelScrollViewport`'s `data-slot` (`panel-scroll-viewport`) replaces ScrollArea's own `scroll-area` on that element, so a selector for `[data-slot=scroll-area]` doesn't match it. On a phone MessageList keeps its native scroller. ChoiceList, DialogNav, the mobile server list and the composer suggestions keep their scroller out of the Tab order (`tabIndex={-1}`), since their rows take focus. `scrollbar-list` and `useScrollbarSize` are now only for a native scroller that can't be a ScrollArea.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/components/scroll-area/
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **FilterChipRemove**: on a touch screen its 44px tap area no longer reaches over the chip's label. It grows 10px up and down, 6px toward the label (exactly to its edge) and 14px outward, so a tap on the label's end no longer clears the filter. ([#1054](https://github.com/botiverse/raft-design/pull/1054))
|
|
13
|
+
- Why: the tap area grew 10px on every side, across the 6px gap and 4px into the label (Remy, #proj-workspace:#221).
|
|
14
|
+
- Affects: touch screens. Keep the next control 16px from the chip (was 12), since the tap area now reaches 10px past the chip's end.
|
|
15
|
+
- Docs: https://raft-design.botiverse.build/components/filter-chip/
|
|
16
|
+
- **ArtifactIcon** is pinned to Lucide's `file-code` by a test, so a Lucide upgrade that changes that icon fails instead of letting the rail drift from the Artifact chip. ([#1054](https://github.com/botiverse/raft-design/pull/1054))
|
|
17
|
+
|
|
18
|
+
## [0.72.0](https://github.com/botiverse/raft-design/compare/v0.71.0...v0.72.0) (2026-11-07)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **ArtifactIcon** is Lucide's `file-code`, a page with a folded corner and `< >`: the same icon as an HTML Artifact's link chip in messages, so the rail and the chips use one icon. **FollowArtifactIcon** and **UnfollowArtifactIcon** draw that page with the plus or minus at the bottom-right, at least 1.6 units clear of the page. ([#1052](https://github.com/botiverse/raft-design/pull/1052))
|
|
23
|
+
- Why: xxchan found the old page-with-lines icon plain and hard to tell apart, and after several rounds of proposals chose the chip's icon (#proj-workspace:#222).
|
|
24
|
+
- Affects: every place that shows these three icons (the Artifacts rail item, Artifact menus, the mobile server popover). Names, props and the small heavier minus are unchanged.
|
|
25
|
+
- Docs: https://raft-design.botiverse.build/components/icons/
|
|
26
|
+
|
|
27
|
+
### Design System
|
|
28
|
+
|
|
29
|
+
- **A toast holds its page height while it shows**, so content above it moves up only; the keyboard isn't held. ([#1051](https://github.com/botiverse/raft-design/pull/1051))
|
|
30
|
+
- Docs: https://raft-design.botiverse.build/components/toast/
|
|
31
|
+
|
|
1
32
|
## [0.71.0](https://github.com/botiverse/raft-design/compare/v0.70.0...v0.71.0) (2026-11-06)
|
|
2
33
|
|
|
3
34
|
### Design System
|
|
@@ -4,9 +4,12 @@ import { ComponentPropsWithRef } from "react";
|
|
|
4
4
|
export type ActivityInboxPanelProps = ComponentPropsWithRef<typeof Panel>;
|
|
5
5
|
export declare function ActivityInboxPanel({ className, ...props }: ActivityInboxPanelProps): import("react").JSX.Element;
|
|
6
6
|
export type ActivityInboxViewportProps = ComponentPropsWithRef<"div">;
|
|
7
|
-
/** The list's scroller
|
|
8
|
-
*
|
|
9
|
-
|
|
7
|
+
/** The list's scroller, a ScrollArea container with absolute gutters: the
|
|
8
|
+
* overlay scrollbar takes no room, so the item cells' fills sit 8px from both
|
|
9
|
+
* edges with or without it (design/patterns/lists.md), and the scroller lays
|
|
10
|
+
* out its own column of items. `ref`, `className` and the native props are
|
|
11
|
+
* the scrolling element's; a frame around it holds the scrollbar. */
|
|
12
|
+
export declare function ActivityInboxViewport({ children, className, ref, style, ...props }: ActivityInboxViewportProps): import("react").JSX.Element;
|
|
10
13
|
export type ActivityInboxLoadingMoreProps = ComponentPropsWithRef<"div">;
|
|
11
14
|
export declare function ActivityInboxLoadingMore({ className, ...props }: ActivityInboxLoadingMoreProps): import("react").JSX.Element;
|
|
12
15
|
//#endregion
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn } from "../../cn.mjs";
|
|
2
|
+
import { ScrollAreaGutters } from "../scroll-area/scroll-area-gutters.mjs";
|
|
3
|
+
import { useScrollAreaContainer } from "../scroll-area/use-scroll-area-container.mjs";
|
|
2
4
|
import { Panel } from "../panel/panel.mjs";
|
|
3
|
-
import { useScrollbarSize } from "../../lib/use-scrollbar-size.mjs";
|
|
4
5
|
import { activityInboxShell } from "./activity-inbox-shell.recipe.mjs";
|
|
5
|
-
import {
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
//#region src/components/activity-inbox/activity-inbox-shell.tsx
|
|
7
9
|
function ActivityInboxPanel({ className, ...props }) {
|
|
8
10
|
const { panel } = activityInboxShell();
|
|
@@ -14,17 +16,34 @@ function ActivityInboxPanel({ className, ...props }) {
|
|
|
14
16
|
...props
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
/** The list's scroller
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
/** The list's scroller, a ScrollArea container with absolute gutters: the
|
|
20
|
+
* overlay scrollbar takes no room, so the item cells' fills sit 8px from both
|
|
21
|
+
* edges with or without it (design/patterns/lists.md), and the scroller lays
|
|
22
|
+
* out its own column of items. `ref`, `className` and the native props are
|
|
23
|
+
* the scrolling element's; a frame around it holds the scrollbar. */
|
|
24
|
+
function ActivityInboxViewport({ children, className, ref, style, ...props }) {
|
|
25
|
+
const { frame, viewport } = activityInboxShell();
|
|
26
|
+
const { containerProps, frameProps, guttersProps } = useScrollAreaContainer({
|
|
27
|
+
containerRef: ref,
|
|
28
|
+
guttersPosition: "absolute",
|
|
29
|
+
overscroll: "contain"
|
|
30
|
+
});
|
|
31
|
+
const ownStyle = useMemo(() => ({
|
|
32
|
+
...containerProps.style,
|
|
33
|
+
...style
|
|
34
|
+
}), [containerProps.style, style]);
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
...frameProps,
|
|
37
|
+
"data-slot": "activity-inbox-viewport-frame",
|
|
38
|
+
className: frame({ className: frameProps.className }),
|
|
39
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
40
|
+
"data-slot": "activity-inbox-viewport",
|
|
41
|
+
...containerProps,
|
|
42
|
+
...props,
|
|
43
|
+
style: ownStyle,
|
|
44
|
+
className: viewport({ className: cn(containerProps.className, className) }),
|
|
45
|
+
children
|
|
46
|
+
}), /* @__PURE__ */ jsx(ScrollAreaGutters, { ...guttersProps })]
|
|
28
47
|
});
|
|
29
48
|
}
|
|
30
49
|
function ActivityInboxLoadingMore({ className, ...props }) {
|
|
@@ -7,7 +7,12 @@ const activityInboxShell = tv({ slots: {
|
|
|
7
7
|
"bg-layer-canvas font-sans text-foreground",
|
|
8
8
|
listColumnMargin
|
|
9
9
|
],
|
|
10
|
-
|
|
10
|
+
frame: ["min-h-0 flex-1"],
|
|
11
|
+
viewport: [
|
|
12
|
+
"relative flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto *:shrink-0",
|
|
13
|
+
"outline-none focus-visible:shadow-focus",
|
|
14
|
+
"bg-layer-canvas px-0 pt-2 pb-[calc(8px+env(safe-area-inset-bottom,0px))]"
|
|
15
|
+
],
|
|
11
16
|
loadingMore: ["py-3 text-center", "text-caption text-foreground-hint"]
|
|
12
17
|
} });
|
|
13
18
|
//#endregion
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/button.mjs";
|
|
2
2
|
import "../button/index.mjs";
|
|
3
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
3
4
|
import { Dialog, DialogClose, DialogContentProps, DialogTitleProps, DialogTrigger } from "../dialog/dialog.mjs";
|
|
4
5
|
import "../dialog/index.mjs";
|
|
5
6
|
import { ComponentPropsWithRef } from "react";
|
|
6
7
|
//#region src/components/announcement-dialog/announcement-dialog.d.ts
|
|
7
8
|
export declare function AnnouncementDialogContent({ className, initialFocus, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
8
|
-
export declare function AnnouncementDialogBody({ className, ...props }:
|
|
9
|
+
export declare function AnnouncementDialogBody({ className, ...props }: ScrollAreaProps): import("react").JSX.Element;
|
|
9
10
|
export declare function AnnouncementDialogHeader({ className, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
10
11
|
export declare function AnnouncementDialogLabel({ className, children, ...props }: ComponentPropsWithRef<"div">): import("react").JSX.Element;
|
|
11
12
|
export declare function AnnouncementDialogTitle({ className, ...props }: DialogTitleProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { tv } from "../../lib/tv.mjs";
|
|
2
2
|
import { Button } from "../button/button.mjs";
|
|
3
|
+
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
3
4
|
import { Dialog, DialogClose, DialogContent, DialogTitle, DialogTrigger } from "../dialog/dialog.mjs";
|
|
4
5
|
import { useCallback, useRef } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -7,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
8
|
const announcement = tv({ slots: {
|
|
8
9
|
content: ["@container/announcement max-w-xl gap-0 overflow-clip p-0"],
|
|
9
10
|
body: [
|
|
10
|
-
"min-h-0 max-h-[70dvh]
|
|
11
|
+
"min-h-0 max-h-[70dvh] pb-5",
|
|
11
12
|
"[&_[data-slot=announcement-picture]+[data-slot=announcement-text]]:mt-5",
|
|
12
13
|
"px-(--surface-inset) pt-(--surface-inset)"
|
|
13
14
|
],
|
|
@@ -43,10 +44,10 @@ function AnnouncementDialogContent({ className, initialFocus, ref, ...props }) {
|
|
|
43
44
|
}
|
|
44
45
|
function AnnouncementDialogBody({ className, ...props }) {
|
|
45
46
|
const { body } = announcement();
|
|
46
|
-
return /* @__PURE__ */ jsx(
|
|
47
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
47
48
|
"data-slot": "announcement-body",
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
...props,
|
|
50
|
+
className: body({ className })
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
function AnnouncementDialogHeader({ className, ...props }) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button } from "../button/button.mjs";
|
|
2
|
+
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
2
3
|
import { Checkbox } from "../checkbox/checkbox.mjs";
|
|
3
4
|
import { useOverflowTitle } from "../../lib/use-overflow-title.mjs";
|
|
4
5
|
import { InputGroup, InputGroupAddon, InputGroupInput } from "../input-group/input-group.mjs";
|
|
@@ -255,8 +256,10 @@ function ChoiceList(props) {
|
|
|
255
256
|
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
256
257
|
"data-slot": "choice-list-frame",
|
|
257
258
|
className: slots.frame(),
|
|
258
|
-
children: [/* @__PURE__ */ jsx(
|
|
259
|
+
children: [/* @__PURE__ */ jsx(ScrollArea, {
|
|
259
260
|
"data-slot": "choice-list-scroller",
|
|
261
|
+
overscroll: "contain",
|
|
262
|
+
tabIndex: -1,
|
|
260
263
|
className: slots.scroller(),
|
|
261
264
|
children: items.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
262
265
|
"data-slot": "choice-list-note",
|
|
@@ -31,11 +31,11 @@ const choiceList = tv({
|
|
|
31
31
|
footer: ["shrink-0 border-t border-line-seam p-1"]
|
|
32
32
|
},
|
|
33
33
|
variants: {
|
|
34
|
-
scroll: { true: { scroller: ["max-h-72
|
|
34
|
+
scroll: { true: { scroller: ["max-h-72"] } },
|
|
35
35
|
fill: { true: {
|
|
36
36
|
root: ["flex min-h-0 flex-1 flex-col"],
|
|
37
37
|
frame: ["min-h-0 flex-1"],
|
|
38
|
-
scroller: ["flex-1
|
|
38
|
+
scroller: ["flex-1"]
|
|
39
39
|
} },
|
|
40
40
|
hasAction: { true: { item: ["pr-11"] } }
|
|
41
41
|
}
|
|
@@ -181,6 +181,8 @@
|
|
|
181
181
|
var(--elevation-float);
|
|
182
182
|
outline: 0;
|
|
183
183
|
}
|
|
184
|
+
/* Native scroll, an allowed exception (scroll-area.md#native-scrolling): Base UI
|
|
185
|
+
owns the list element and its children (items can be a function of each item). */
|
|
184
186
|
.r-combobox-select__list {
|
|
185
187
|
box-sizing: border-box;
|
|
186
188
|
max-height: var(--combobox-select-list-max-height, 16rem);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from "../../lib/tv.mjs";
|
|
2
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
2
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
4
|
//#region src/components/composer/composer-suggestion-list.d.ts
|
|
4
5
|
declare const composerSuggestionList: import("tailwind-variants/lite").TVReturnType<{
|
|
@@ -113,8 +114,10 @@ declare const composerSuggestionList: import("tailwind-variants/lite").TVReturnT
|
|
|
113
114
|
aside: string[];
|
|
114
115
|
meta: string[];
|
|
115
116
|
}>>;
|
|
116
|
-
export type ComposerSuggestionListProps =
|
|
117
|
-
|
|
117
|
+
export type ComposerSuggestionListProps = ScrollAreaProps;
|
|
118
|
+
/** The suggestions' popup, a ScrollArea: `ref`, `className`, `render` and
|
|
119
|
+
* the native props (the listbox's role and id) are the scrolling element's. */
|
|
120
|
+
export declare function ComposerSuggestionList({ className, ...props }: ComposerSuggestionListProps): import("react").JSX.Element;
|
|
118
121
|
type ComposerSuggestionListVariantProps = VariantProps<typeof composerSuggestionList>;
|
|
119
122
|
export type ComposerSuggestionGroupProps = useRender.ComponentProps<"div"> & Pick<ComposerSuggestionListVariantProps, "separated">;
|
|
120
123
|
export declare function ComposerSuggestionGroup({ separated, className, render, ...props }: ComposerSuggestionGroupProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { tv } from "../../lib/tv.mjs";
|
|
2
|
+
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
6
|
//#region src/components/composer/composer-suggestion-list.tsx
|
|
5
7
|
const composerSuggestionList = tv({
|
|
6
8
|
slots: {
|
|
7
9
|
root: [
|
|
8
|
-
"absolute inset-x-0 bottom-full w-auto
|
|
10
|
+
"absolute inset-x-0 bottom-full w-auto",
|
|
9
11
|
"mb-2 max-h-60 overflow-x-hidden rounded-container p-1",
|
|
10
12
|
"bg-layer-popover text-foreground ring-1 ring-line-seam shadow-float"
|
|
11
13
|
],
|
|
@@ -47,16 +49,16 @@ const composerSuggestionList = tv({
|
|
|
47
49
|
metaVariant: "text"
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
|
-
|
|
52
|
+
/** The suggestions' popup, a ScrollArea: `ref`, `className`, `render` and
|
|
53
|
+
* the native props (the listbox's role and id) are the scrolling element's. */
|
|
54
|
+
function ComposerSuggestionList({ className, ...props }) {
|
|
51
55
|
const { root } = composerSuggestionList();
|
|
52
|
-
|
|
56
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
53
57
|
"data-slot": "composer-suggestion-list",
|
|
58
|
+
overscroll: "contain",
|
|
59
|
+
tabIndex: -1,
|
|
60
|
+
...props,
|
|
54
61
|
className: root({ className })
|
|
55
|
-
};
|
|
56
|
-
return useRender({
|
|
57
|
-
defaultTagName: "div",
|
|
58
|
-
render,
|
|
59
|
-
props: mergeProps(defaultProps, props)
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
64
|
function ComposerSuggestionGroup({ separated, className, render, ...props }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StyledProps } from "../../lib/styled-props.mjs";
|
|
2
2
|
import { ButtonProps } from "../button/button.mjs";
|
|
3
3
|
import "../button/index.mjs";
|
|
4
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
4
5
|
import { PanelActionProps } from "../panel/panel-action.mjs";
|
|
5
6
|
import { Dialog } from "@base-ui/react/dialog";
|
|
6
7
|
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
@@ -78,8 +79,9 @@ export type DialogSurfaceProps = useRender.ComponentProps<"div">;
|
|
|
78
79
|
* DialogContent draws the same frame for a Base UI dialog.
|
|
79
80
|
*/
|
|
80
81
|
export declare function DialogSurface({ className, render, children, ...props }: DialogSurfaceProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
81
|
-
export type DialogNavProps =
|
|
82
|
-
/** The section list of a wide (`size="wide"`) dialog, inside a `bar` body
|
|
83
|
-
|
|
82
|
+
export type DialogNavProps = Omit<ScrollAreaProps, "contentClassName">;
|
|
83
|
+
/** The section list of a wide (`size="wide"`) dialog, inside a `bar` body: a
|
|
84
|
+
* `<nav>` that is a ScrollArea, its rows in the area's content element. */
|
|
85
|
+
export declare function DialogNav({ className, render, ...props }: DialogNavProps): import("react").JSX.Element;
|
|
84
86
|
//#endregion
|
|
85
87
|
export { Dialog$1 as Dialog };
|
|
@@ -7,6 +7,7 @@ import { useThemeScopeProps } from "../../lib/theme/theme-scope.mjs";
|
|
|
7
7
|
import { useParentOverlayKind, withOverlayLayer } from "../../lib/overlay-depth.mjs";
|
|
8
8
|
import { Button } from "../button/button.mjs";
|
|
9
9
|
import { DialogSheetHeadContext, DialogSheetReset, dialogSheet, useDialogSheet, useInDialogSheetHead } from "./dialog-sheet-context.mjs";
|
|
10
|
+
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
10
11
|
import { TextLink } from "../text-link/text-link.mjs";
|
|
11
12
|
import { PanelAction } from "../panel/panel-action.mjs";
|
|
12
13
|
import { Dialog } from "@base-ui/react/dialog";
|
|
@@ -354,17 +355,22 @@ function DialogSurface({ className, render, children, ...props }) {
|
|
|
354
355
|
}, props, { children: /* @__PURE__ */ jsx(DialogSheetReset, { children }) })
|
|
355
356
|
});
|
|
356
357
|
}
|
|
357
|
-
const dialogNav = tv({ slots: {
|
|
358
|
-
|
|
358
|
+
const dialogNav = tv({ slots: {
|
|
359
|
+
root: ["shrink-0", "w-52 border-r border-line-seam py-2 max-md:hidden"],
|
|
360
|
+
content: ["flex flex-col gap-0.5"]
|
|
361
|
+
} });
|
|
362
|
+
/** The section list of a wide (`size="wide"`) dialog, inside a `bar` body: a
|
|
363
|
+
* `<nav>` that is a ScrollArea, its rows in the area's content element. */
|
|
359
364
|
function DialogNav({ className, render, ...props }) {
|
|
360
|
-
const { root } = dialogNav();
|
|
361
|
-
return
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
},
|
|
365
|
+
const { root, content } = dialogNav();
|
|
366
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
367
|
+
"data-slot": "dialog-nav",
|
|
368
|
+
overscroll: "contain",
|
|
369
|
+
tabIndex: -1,
|
|
370
|
+
...props,
|
|
371
|
+
render: render ?? /* @__PURE__ */ jsx("nav", {}),
|
|
372
|
+
className: root({ className }),
|
|
373
|
+
contentClassName: content()
|
|
368
374
|
});
|
|
369
375
|
}
|
|
370
376
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/button.mjs";
|
|
2
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
2
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
4
|
//#region src/components/files/files.d.ts
|
|
4
5
|
type FileTag = "button" | "div" | "img" | "section" | "span";
|
|
@@ -6,8 +7,10 @@ type DataAttributes = Record<`data-${string}`, string | undefined>;
|
|
|
6
7
|
type FileSlotProps<Tag extends FileTag> = useRender.ComponentProps<Tag> & DataAttributes;
|
|
7
8
|
export type FilesPanelProps = FileSlotProps<"section">;
|
|
8
9
|
export declare function FilesPanel(props: FilesPanelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
-
export type FilesViewportProps =
|
|
10
|
-
|
|
10
|
+
export type FilesViewportProps = ScrollAreaProps & DataAttributes;
|
|
11
|
+
/** The files' scroller, a ScrollArea: `ref`, `className`, `render`, `onScroll`
|
|
12
|
+
* and the native props are the scrolling element's. */
|
|
13
|
+
export declare function FilesViewport({ className, ...props }: FilesViewportProps): import("react").JSX.Element;
|
|
11
14
|
export type FilesListProps = FileSlotProps<"div">;
|
|
12
15
|
export declare function FilesList(props: FilesListProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
13
16
|
export type FileRowProps = FileSlotProps<"div">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button } from "../button/button.mjs";
|
|
2
|
+
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
2
3
|
import { files } from "./files.recipe.mjs";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -19,8 +20,16 @@ function useFileSlot(slotName, dataSlot, defaultTagName, props) {
|
|
|
19
20
|
function FilesPanel(props) {
|
|
20
21
|
return useFileSlot("panel", "files-panel", "section", props);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
/** The files' scroller, a ScrollArea: `ref`, `className`, `render`, `onScroll`
|
|
24
|
+
* and the native props are the scrolling element's. */
|
|
25
|
+
function FilesViewport({ className, ...props }) {
|
|
26
|
+
const { viewport } = files();
|
|
27
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
28
|
+
"data-slot": "files-viewport",
|
|
29
|
+
overscroll: "contain",
|
|
30
|
+
...props,
|
|
31
|
+
className: viewport({ className })
|
|
32
|
+
});
|
|
24
33
|
}
|
|
25
34
|
function FilesList(props) {
|
|
26
35
|
return useFileSlot("list", "files-list", "div", props);
|
|
@@ -2,7 +2,7 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
2
2
|
//#region src/components/files/files.recipe.ts
|
|
3
3
|
const files = tv({ slots: {
|
|
4
4
|
panel: ["flex min-h-0 flex-1 flex-col", "bg-layer-canvas text-foreground"],
|
|
5
|
-
viewport: ["min-h-0 flex-1
|
|
5
|
+
viewport: ["min-h-0 flex-1"],
|
|
6
6
|
list: ["flex flex-col gap-2 px-(--surface-inset) py-3", "max-md:px-4"],
|
|
7
7
|
row: [
|
|
8
8
|
"group/file-row flex w-full min-w-0 gap-3 px-3",
|
|
@@ -17,7 +17,8 @@ const filterChip = tv({ slots: {
|
|
|
17
17
|
remove: [
|
|
18
18
|
...chipRemoveBase,
|
|
19
19
|
"relative size-6",
|
|
20
|
-
"after:absolute after:content-['']
|
|
20
|
+
"after:absolute after:content-['']",
|
|
21
|
+
"pointer-coarse:after:-inset-y-2.5 pointer-coarse:after:-left-1.5 pointer-coarse:after:-right-3.5"
|
|
21
22
|
]
|
|
22
23
|
} });
|
|
23
24
|
/**
|
|
@@ -17,12 +17,16 @@ export declare function LeavePrivateChannelIcon(props: ActionIconProps): import(
|
|
|
17
17
|
export declare function JoinJointChannelIcon(props: ActionIconProps): import("react").JSX.Element;
|
|
18
18
|
/** Leave a joint channel: Lucide's git-branch, with a minus. */
|
|
19
19
|
export declare function LeaveJointChannelIcon(props: ActionIconProps): import("react").JSX.Element;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Follow an Artifact: ArtifactIcon's page with a plus in the bottom-right corner. The page's
|
|
22
|
+
* right and bottom edges stop 1.6 short of the plus, and the `< >` sits 1.5 higher so its
|
|
23
|
+
* point clears it by as much.
|
|
24
|
+
*/
|
|
21
25
|
export declare function FollowArtifactIcon(props: ActionIconProps): import("react").JSX.Element;
|
|
22
26
|
/**
|
|
23
|
-
* Unfollow an Artifact:
|
|
24
|
-
* heavier
|
|
25
|
-
*
|
|
27
|
+
* Unfollow an Artifact: the same cut page, with a minus. Below 18px the minus is drawn
|
|
28
|
+
* heavier (stroke 3, on whole pixels at 16px), so it reads as a mark beside the page's cut
|
|
29
|
+
* edges rather than one more piece of the outline; at 20 and 24 it is the plain minus.
|
|
26
30
|
*/
|
|
27
31
|
export declare function UnfollowArtifactIcon(props: ActionIconProps): import("react").JSX.Element;
|
|
28
32
|
/** Add a comment: CommentIcon at 24, its bubble cut short of a plus in the bottom-right corner. */
|
|
@@ -242,7 +242,11 @@ function LeaveJointChannelIcon(props) {
|
|
|
242
242
|
]
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
/**
|
|
245
|
+
/**
|
|
246
|
+
* Follow an Artifact: ArtifactIcon's page with a plus in the bottom-right corner. The page's
|
|
247
|
+
* right and bottom edges stop 1.6 short of the plus, and the `< >` sits 1.5 higher so its
|
|
248
|
+
* point clears it by as much.
|
|
249
|
+
*/
|
|
246
250
|
function FollowArtifactIcon(props) {
|
|
247
251
|
return /* @__PURE__ */ jsxs("svg", {
|
|
248
252
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -258,17 +262,19 @@ function FollowArtifactIcon(props) {
|
|
|
258
262
|
strokeWidth: 2,
|
|
259
263
|
...props,
|
|
260
264
|
children: [
|
|
261
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
262
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
263
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
264
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
265
|
+
/* @__PURE__ */ jsx("path", { d: "M20 12.5V8a2.4 2.4 0 0 0-.706-1.704l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8" }),
|
|
266
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }),
|
|
267
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11 8 13.5l2 2.5" }),
|
|
268
|
+
/* @__PURE__ */ jsx("path", { d: "m14 11 2 2.5-2 2.5" }),
|
|
269
|
+
/* @__PURE__ */ jsx("path", { d: "M19 16v6" }),
|
|
270
|
+
/* @__PURE__ */ jsx("path", { d: "M16 19h6" })
|
|
265
271
|
]
|
|
266
272
|
});
|
|
267
273
|
}
|
|
268
274
|
/**
|
|
269
|
-
* Unfollow an Artifact:
|
|
270
|
-
* heavier
|
|
271
|
-
*
|
|
275
|
+
* Unfollow an Artifact: the same cut page, with a minus. Below 18px the minus is drawn
|
|
276
|
+
* heavier (stroke 3, on whole pixels at 16px), so it reads as a mark beside the page's cut
|
|
277
|
+
* edges rather than one more piece of the outline; at 20 and 24 it is the plain minus.
|
|
272
278
|
*/
|
|
273
279
|
function UnfollowArtifactIcon(props) {
|
|
274
280
|
return /* @__PURE__ */ jsxs("svg", {
|
|
@@ -286,17 +292,19 @@ function UnfollowArtifactIcon(props) {
|
|
|
286
292
|
strokeWidth: 2,
|
|
287
293
|
...props,
|
|
288
294
|
children: [
|
|
289
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
290
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
295
|
+
/* @__PURE__ */ jsx("path", { d: "M20 12.5V8a2.4 2.4 0 0 0-.706-1.704l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8" }),
|
|
296
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }),
|
|
297
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11 8 13.5l2 2.5" }),
|
|
298
|
+
/* @__PURE__ */ jsx("path", { d: "m14 11 2 2.5-2 2.5" }),
|
|
291
299
|
/* @__PURE__ */ jsx("path", {
|
|
292
300
|
"data-icon-mark": "default",
|
|
293
|
-
d: "
|
|
301
|
+
d: "M16 19h6"
|
|
294
302
|
}),
|
|
295
303
|
/* @__PURE__ */ jsx("path", {
|
|
296
304
|
"data-icon-mark": "small",
|
|
297
305
|
display: "none",
|
|
298
306
|
strokeWidth: 3,
|
|
299
|
-
d: "
|
|
307
|
+
d: "M17.5 19.5h4"
|
|
300
308
|
})
|
|
301
309
|
]
|
|
302
310
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SVGProps } from "react";
|
|
2
2
|
//#region src/components/icons/object-icons.d.ts
|
|
3
3
|
export type ObjectIconProps = SVGProps<SVGSVGElement>;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* An Artifact: Lucide's file-code, drawn here unchanged, so the icon for Artifacts is the
|
|
6
|
+
* one an HTML Artifact's chip shows in a message (a page with a folded corner and a `< >`).
|
|
7
|
+
*/
|
|
5
8
|
export declare function ArtifactIcon(props: ObjectIconProps): import("react").JSX.Element;
|
|
6
9
|
//#endregion
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
//#region src/components/icons/object-icons.tsx
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* An Artifact: Lucide's file-code, drawn here unchanged, so the icon for Artifacts is the
|
|
5
|
+
* one an HTML Artifact's chip shows in a message (a page with a folded corner and a `< >`).
|
|
6
|
+
*/
|
|
4
7
|
function ArtifactIcon(props) {
|
|
5
8
|
return /* @__PURE__ */ jsxs("svg", {
|
|
6
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16,10 +19,10 @@ function ArtifactIcon(props) {
|
|
|
16
19
|
strokeWidth: 2,
|
|
17
20
|
...props,
|
|
18
21
|
children: [
|
|
19
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
20
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
21
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
22
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
22
|
+
/* @__PURE__ */ jsx("path", { d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }),
|
|
23
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5a1 1 0 0 0 1 1h5" }),
|
|
24
|
+
/* @__PURE__ */ jsx("path", { d: "M10 12.5 8 15l2 2.5" }),
|
|
25
|
+
/* @__PURE__ */ jsx("path", { d: "m14 12.5 2 2.5-2 2.5" })
|
|
23
26
|
]
|
|
24
27
|
});
|
|
25
28
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
1
2
|
import { CheckboxProps } from "../checkbox/checkbox.mjs";
|
|
2
3
|
import "../checkbox/index.mjs";
|
|
3
4
|
import { InlineCodeProps } from "../inline-code/inline-code.mjs";
|
|
4
5
|
import "../inline-code/index.mjs";
|
|
5
|
-
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
6
6
|
import { ComponentPropsWithRef } from "react";
|
|
7
7
|
//#region src/components/markdown/markdown-parts.d.ts
|
|
8
8
|
declare const HEADING_TAGS: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Checkbox } from "../checkbox/checkbox.mjs";
|
|
2
1
|
import { ScrollArea } from "../scroll-area/scroll-area.mjs";
|
|
2
|
+
import { Checkbox } from "../checkbox/checkbox.mjs";
|
|
3
3
|
import { InlineCode } from "../inline-code/inline-code.mjs";
|
|
4
4
|
import { markdown } from "./markdown.recipe.mjs";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -24,7 +24,8 @@ const messageActionCardContent = tv({ slots: {
|
|
|
24
24
|
"@max-sm/action-card:min-h-0 @max-sm/action-card:py-0"
|
|
25
25
|
],
|
|
26
26
|
scopeList: ["mt-0 stack-y-1.5"],
|
|
27
|
-
scopeListViewport: ["
|
|
27
|
+
scopeListViewport: ["max-h-[136px]"],
|
|
28
|
+
scopeListViewportContent: ["stack-y-1.5 pr-1"],
|
|
28
29
|
scopeListLabel: ["text-footnote font-medium text-foreground-hint"],
|
|
29
30
|
scope: ["min-w-0 border p-1.5", "rounded-control border-line-hairline bg-layer-card px-2.5 py-2"],
|
|
30
31
|
scopeName: ["break-all font-mono", "text-mono-meta font-normal text-foreground"],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ScrollAreaProps } from "../scroll-area/types.mjs";
|
|
1
2
|
import { BadgeProps } from "../badge/badge.mjs";
|
|
2
3
|
import "../badge/index.mjs";
|
|
3
4
|
import { ComponentProps, ReactNode } from "react";
|
|
@@ -38,10 +39,11 @@ export declare function MessageActionCardPropertyValue({ className, render, ...p
|
|
|
38
39
|
export declare function MessageActionCardScopeList({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
39
40
|
export declare function MessageActionCardScopeListLabel({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
40
41
|
/**
|
|
41
|
-
* Scrolls a long permission list
|
|
42
|
-
* keyboard users can scroll it; a short list adds no empty stop
|
|
42
|
+
* Scrolls a long permission list: a ScrollArea, so it is a Tab stop only while
|
|
43
|
+
* it overflows (keyboard users can scroll it; a short list adds no empty stop),
|
|
44
|
+
* and its overlay scrollbar takes no room from the rows.
|
|
43
45
|
*/
|
|
44
|
-
export declare function MessageActionCardScopeListViewport({ className,
|
|
46
|
+
export declare function MessageActionCardScopeListViewport({ className, ...props }: MessageActionCardScopeListViewportProps): import("react").JSX.Element;
|
|
45
47
|
export declare function MessageActionCardScope({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
46
48
|
export declare function MessageActionCardScopeName({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
47
49
|
export declare function MessageActionCardScopeDescription({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -67,7 +69,7 @@ export type MessageActionCardCollapseTriggerProps = Omit<ComponentProps<typeof C
|
|
|
67
69
|
className?: string;
|
|
68
70
|
"aria-label": string;
|
|
69
71
|
};
|
|
70
|
-
export type MessageActionCardScopeListViewportProps =
|
|
72
|
+
export type MessageActionCardScopeListViewportProps = Omit<ScrollAreaProps, "contentClassName" | "aria-label"> & {
|
|
71
73
|
/** Names the scroll area for screen readers, e.g. "Permissions". */
|
|
72
74
|
"aria-label": string;
|
|
73
75
|
};
|