@botiverse/raft-ui 0.21.0 → 0.21.1
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 +52 -0
- package/dist/{touch-drag-B7uLTWXe.mjs → inbox-item.recipe-DelZxRmY.mjs} +321 -7
- package/dist/{index-CP05_pvu.d.mts → index-jTmbN7ov.d.mts} +55 -2
- package/dist/index.d.mts +2 -24
- package/dist/index.mjs +8 -245
- package/dist/styles.css +11 -2
- package/dist/wip.d.mts +14 -2
- package/dist/wip.mjs +25 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
## [0.21.1](https://github.com/botiverse/raft-design/compare/v0.21.0...v0.21.1) (2026-10-22)
|
|
2
|
+
|
|
3
|
+
### Design System
|
|
4
|
+
|
|
5
|
+
- **Chips**: the ink at a chip's two ends sits the same distance from its fill's edges. A chip keeps its total padding and its width, and splits the padding between its ends so each end makes up for the empty space its own content brings. A smaller note after a chip's label centers on the label's letters, and the label stays on the sentence's baseline. It applies to MessageReferenceChip, MessageReferencePending, MessageReferenceUnavailable, MessageReactionChip, MessageItemSavedIndicator, MessageForwardedBundleAttachment, TaskChip and TaskCardStatus, and to the new MessageReferenceSuffix. ([#700](https://github.com/botiverse/raft-design/pull/700))
|
|
6
|
+
- Why: the chips split their padding as if every end were the same, so an icon or a status pixel sat closer to its edge than the last letter did to the other (3.6px against 7px in a reference chip), and the end after the text looked empty; each chip's padding is now set from where its ink is drawn.
|
|
7
|
+
- Affects: the padding at each end, left / right, totals unchanged; see Fixed below.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/foundations/alignment/#chips
|
|
9
|
+
- **A control and its label**: a settings row is the exception to the first-line rule. The leading icon, avatar or tile and the trailing switch, checkbox, radio, value or chevron of a `ListRow variant="plain"` center on the whole row, with or without a description, as they did in 0.20. A checkbox or radio beside wrapping text in a `<label>` row still sits on that text's first line. It applies to ListRow. ([#703](https://github.com/botiverse/raft-design/pull/703))
|
|
10
|
+
- Why: a setting reads as one unit, and with its controls on the title's first line they belonged to the title instead of the row; settings rows center them on the row again.
|
|
11
|
+
- Docs: https://raft-design.botiverse.build/foundations/alignment/#a-control-and-its-label
|
|
12
|
+
- **Timeline rhythm: the edge that messages scroll under fades**: the bottom edge of a message list, over the composer, fades from the panel's color to transparent over the section step, at all times, instead of cutting the message under it. The line of who is about to post sits on the same fade and has none of its own. It applies to the new MessageListEndFade. ([#699](https://github.com/botiverse/raft-design/pull/699))
|
|
13
|
+
- Why: a message scrolled under the composer was cut off by a hard edge; the edge now fades, as a tab bar fades on the side that hides tabs.
|
|
14
|
+
- Affects: fade height `timeline-section` 24px, `layer-canvas` to transparent.
|
|
15
|
+
- Docs: https://raft-design.botiverse.build/foundations/spacing/#timeline-rhythm
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **MessageReferenceSuffix**: a short note after a reference chip's label, in muted Space Mono, such as `msg` on a link to a message. Put it inside `MessageReferenceChip`, after `MessageReferenceLabel`. ([#700](https://github.com/botiverse/raft-design/pull/700))
|
|
20
|
+
- Why: a note in a span of the caller's own sat on the label's baseline, 0.3px low beside a 12.25px label and 0.75px low beside a 14px one, and its descenders made it look lower still; the part keeps the label's baseline in the layout and draws the note a quarter of the size difference higher, so the middles of the two x-heights meet.
|
|
21
|
+
- Affects: `text-label` (11px) in `foreground-hint`, line height 1; drawn `(label size - 1em) / 4` higher.
|
|
22
|
+
- Docs: https://raft-design.botiverse.build/components/message-item/
|
|
23
|
+
- **MessageListEndFade**: the fade over a message list's bottom edge. Put it beside `MessageList`, in the same positioned parent (`ConversationPanelBody` is one), like the jump controls; it lies under them, is hidden from assistive technology and takes no pointer events. ([#699](https://github.com/botiverse/raft-design/pull/699))
|
|
24
|
+
- Why: see Timeline rhythm: the edge that messages scroll under fades, above.
|
|
25
|
+
- Affects: 24px tall (`h-timeline-section`), `layer-canvas` to transparent upward, `z-index` 5.
|
|
26
|
+
- Docs: https://raft-design.botiverse.build/components/message-list/
|
|
27
|
+
- **SegmentedControl** `variant="on-frame"`, for a control in the frame (a top bar). `variant="default"` is unchanged and stays the default. ([#693](https://github.com/botiverse/raft-design/pull/693))
|
|
28
|
+
- Why: a yellow sticker on the yellow frame did not read as selected, and a white segment beside it looked chosen instead; in the frame the selected segment takes the frame's active colors, as a selected rail item does.
|
|
29
|
+
- Affects: track `fill-frame-medium`; other segments `foreground-on-frame-muted`, with `foreground-on-frame` on hover and `overlay-frame-medium` on hover and press; the selected segment `layer-frame-active` with a `line-frame-active` edge and `foreground-on-frame-active` text (white on the yellow frame, yellow on the dark one).
|
|
30
|
+
- Docs: https://raft-design.botiverse.build/components/segmented-control/
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- **ListRow** `variant="plain"` with a description: the leading icon, avatar or tile and the trailing switch, checkbox, radio, value or chevron center on the whole row again, as in 0.20, instead of on the title's first line. With a title alone, nothing changes. This reverts the 0.21.0 change to ListRow. ([#703](https://github.com/botiverse/raft-design/pull/703))
|
|
35
|
+
- Why: see A control and its label above.
|
|
36
|
+
- Affects: the ends move without changing size, so row heights are unchanged (54px on a phone for a one-line row with a switch).
|
|
37
|
+
- Docs: https://raft-design.botiverse.build/components/list-row/
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **MessageReferenceChip**, **MessageReferencePending**, **MessageReferenceUnavailable**, **MessageReactionChip**, **MessageItemSavedIndicator**, **MessageForwardedBundleAttachment**, **TaskChip** and **TaskCardStatus**: the ink at both ends sits the same distance from the edges; each chip keeps its total padding and its width. ([#700](https://github.com/botiverse/raft-design/pull/700))
|
|
42
|
+
- Why: see Chips above.
|
|
43
|
+
- Affects: padding left / right: MessageReferenceChip, MessageReferencePending and MessageReferenceUnavailable with an icon 3px / 6px → 4.5px / 4.5px (without an icon unchanged, 6px / 6px); MessageReactionChip 6px / 8px → 7px / 7px; MessageItemSavedIndicator and MessageForwardedBundleAttachment 6px / 6px → 5.5px / 6.5px (their bookmark and file icons are drawn inside their boxes); TaskChip 6px / 8px → 7px / 7px, `size="sm"` 4px / 6px → 5px / 5px and `variant="inline"` 3px / 6px → 4.5px / 4.5px; TaskCardStatus 6px / 8px → 7px / 7px.
|
|
44
|
+
- Docs: https://raft-design.botiverse.build/foundations/alignment/#chips
|
|
45
|
+
- **MessageReferencePending**, and any reference chip, holding a `Spinner`: the spinner centers on the middle of the label's line, as an icon does. ([#700](https://github.com/botiverse/raft-design/pull/700))
|
|
46
|
+
- Why: the chip centered only `svg` icons on the label's line, and a spinner is not one, so it sat on the baseline, 5–6px below the middle of the label's line.
|
|
47
|
+
- Docs: https://raft-design.botiverse.build/components/message-item/
|
|
48
|
+
- **MessageQuotedPreviewChannel** and **MessageQuotedPreviewThread**: the icon sits on the first line of the name when a long name wraps, instead of in the middle of both lines. ([#700](https://github.com/botiverse/raft-design/pull/700))
|
|
49
|
+
- Why: the icon was centered on the whole name, so it slid between the lines of a wrapped name; it now follows A mark that leads text, like the other components.
|
|
50
|
+
- Affects: the icon (14px) is placed `(1lh - 14px) / 2` from the top of the name's first line.
|
|
51
|
+
- Docs: https://raft-design.botiverse.build/foundations/alignment/#a-mark-that-leads-text
|
|
52
|
+
|
|
1
53
|
## [0.21.0](https://github.com/botiverse/raft-design/compare/v0.20.1...v0.21.0) (2026-10-22)
|
|
2
54
|
|
|
3
55
|
0.20.1 was not published to npm. This release includes its changes, listed under [0.20.1](https://github.com/botiverse/raft-design/blob/v0.21.0/packages/ui/CHANGELOG.md#0201-2026-10-22) in the changelog.
|
|
@@ -2,7 +2,7 @@ import { cn } from "./cn.mjs";
|
|
|
2
2
|
import { Dialog } from "@base-ui/react/dialog";
|
|
3
3
|
import { Check, Minus, X } from "lucide-react";
|
|
4
4
|
import { tv } from "tailwind-variants/lite";
|
|
5
|
-
import { Children, Fragment, createContext, isValidElement, use, useCallback, useContext, useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
|
+
import { Children, Fragment, createContext, isValidElement, use, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Button } from "@base-ui/react/button";
|
|
8
8
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -13,6 +13,8 @@ import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
|
13
13
|
import { Avatar } from "@base-ui/react";
|
|
14
14
|
import { Menu } from "@base-ui/react/menu";
|
|
15
15
|
import { flushSync } from "react-dom";
|
|
16
|
+
import { Radio } from "@base-ui/react/radio";
|
|
17
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
16
18
|
import { Toggle } from "@base-ui/react/toggle";
|
|
17
19
|
import { Toolbar } from "@base-ui/react/toolbar";
|
|
18
20
|
import { PointerSensor, TouchSensor, useSensor } from "@dnd-kit/core";
|
|
@@ -1817,6 +1819,138 @@ function useOverflowTitle(ref, title) {
|
|
|
1817
1819
|
}, [own, ref]);
|
|
1818
1820
|
}
|
|
1819
1821
|
//#endregion
|
|
1822
|
+
//#region src/components/segmented-control/segmented-control.tsx
|
|
1823
|
+
const segmentedControl = tv$1({
|
|
1824
|
+
slots: {
|
|
1825
|
+
root: ["inline-flex shrink-0 items-center", "w-fit flex-nowrap gap-[3px] rounded-[11px] bg-fill-muted p-[3px]"],
|
|
1826
|
+
item: [
|
|
1827
|
+
"inline-flex min-w-0 shrink-0 items-center gap-1.5",
|
|
1828
|
+
"outline-none disabled:pointer-events-none",
|
|
1829
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1830
|
+
"h-8 justify-center rounded-control border-[1.5px] border-transparent bg-transparent px-3",
|
|
1831
|
+
"font-sans text-callout font-semibold text-foreground-muted",
|
|
1832
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
1833
|
+
"hover:bg-fill-medium active:bg-fill-medium",
|
|
1834
|
+
"data-checked:border-sticker-ink data-checked:bg-brand data-checked:font-bold data-checked:text-sticker-ink data-checked:ring-[1.5px] data-checked:ring-sticker-edge",
|
|
1835
|
+
"data-checked:hover:bg-brand data-checked:active:bg-brand data-checked:active:overlay-sticker-medium",
|
|
1836
|
+
"focus-visible:shadow-focus",
|
|
1837
|
+
"data-disabled:cursor-not-allowed data-disabled:text-foreground-disabled data-disabled:hover:bg-transparent"
|
|
1838
|
+
],
|
|
1839
|
+
label: ["truncate"],
|
|
1840
|
+
count: ["font-mono", "text-mono-meta font-normal"]
|
|
1841
|
+
},
|
|
1842
|
+
variants: {
|
|
1843
|
+
variant: {
|
|
1844
|
+
default: {},
|
|
1845
|
+
"on-frame": { root: [
|
|
1846
|
+
"bg-fill-frame-medium",
|
|
1847
|
+
"**:data-[slot=segmented-control-item]:text-foreground-on-frame-muted **:data-[slot=segmented-control-item]:hover:text-foreground-on-frame",
|
|
1848
|
+
"**:data-[slot=segmented-control-item]:hover:bg-transparent **:data-[slot=segmented-control-item]:hover:overlay-frame-medium **:data-[slot=segmented-control-item]:active:bg-transparent **:data-[slot=segmented-control-item]:active:overlay-frame-medium",
|
|
1849
|
+
"**:data-[slot=segmented-control-item]:data-checked:border-line-frame-active **:data-[slot=segmented-control-item]:data-checked:bg-layer-frame-active **:data-[slot=segmented-control-item]:data-checked:text-foreground-on-frame-active",
|
|
1850
|
+
"**:data-[slot=segmented-control-item]:data-checked:hover:bg-layer-frame-active **:data-[slot=segmented-control-item]:data-checked:hover:bg-none **:data-[slot=segmented-control-item]:data-checked:active:bg-layer-frame-active"
|
|
1851
|
+
] }
|
|
1852
|
+
},
|
|
1853
|
+
iconsOnlyBelow: {
|
|
1854
|
+
xs: { root: ["@max-xs:**:data-[slot=segmented-control-item]:relative @max-xs:**:data-[slot=segmented-control-item]:w-8 @max-xs:**:data-[slot=segmented-control-item]:px-0", "@max-xs:**:data-[slot=segmented-control-label]:sr-only @max-xs:**:data-[slot=segmented-control-count]:sr-only"] },
|
|
1855
|
+
sm: { root: ["@max-sm:**:data-[slot=segmented-control-item]:relative @max-sm:**:data-[slot=segmented-control-item]:w-8 @max-sm:**:data-[slot=segmented-control-item]:px-0", "@max-sm:**:data-[slot=segmented-control-label]:sr-only @max-sm:**:data-[slot=segmented-control-count]:sr-only"] },
|
|
1856
|
+
md: { root: ["@max-md:**:data-[slot=segmented-control-item]:relative @max-md:**:data-[slot=segmented-control-item]:w-8 @max-md:**:data-[slot=segmented-control-item]:px-0", "@max-md:**:data-[slot=segmented-control-label]:sr-only @max-md:**:data-[slot=segmented-control-count]:sr-only"] },
|
|
1857
|
+
lg: { root: ["@max-lg:**:data-[slot=segmented-control-item]:relative @max-lg:**:data-[slot=segmented-control-item]:w-8 @max-lg:**:data-[slot=segmented-control-item]:px-0", "@max-lg:**:data-[slot=segmented-control-label]:sr-only @max-lg:**:data-[slot=segmented-control-count]:sr-only"] },
|
|
1858
|
+
xl: { root: ["@max-xl:**:data-[slot=segmented-control-item]:relative @max-xl:**:data-[slot=segmented-control-item]:w-8 @max-xl:**:data-[slot=segmented-control-item]:px-0", "@max-xl:**:data-[slot=segmented-control-label]:sr-only @max-xl:**:data-[slot=segmented-control-count]:sr-only"] },
|
|
1859
|
+
"2xl": { root: ["@max-2xl:**:data-[slot=segmented-control-item]:relative @max-2xl:**:data-[slot=segmented-control-item]:w-8 @max-2xl:**:data-[slot=segmented-control-item]:px-0", "@max-2xl:**:data-[slot=segmented-control-label]:sr-only @max-2xl:**:data-[slot=segmented-control-count]:sr-only"] }
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
const SegmentedControlIconsOnlyContext = createContext(false);
|
|
1864
|
+
function SegmentedControl({ disabled = false, iconsOnlyBelow, variant = "default", className, ...props }) {
|
|
1865
|
+
const { root } = segmentedControl({
|
|
1866
|
+
iconsOnlyBelow,
|
|
1867
|
+
variant
|
|
1868
|
+
});
|
|
1869
|
+
return /* @__PURE__ */ jsx(SegmentedControlIconsOnlyContext, {
|
|
1870
|
+
value: iconsOnlyBelow !== void 0,
|
|
1871
|
+
children: /* @__PURE__ */ jsx(RadioGroup, {
|
|
1872
|
+
disabled,
|
|
1873
|
+
"data-slot": "segmented-control",
|
|
1874
|
+
className: root({ className }),
|
|
1875
|
+
...props
|
|
1876
|
+
})
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
function SegmentedControlItem({ className, ...props }) {
|
|
1880
|
+
const { item } = segmentedControl();
|
|
1881
|
+
const iconsOnly = use(SegmentedControlIconsOnlyContext);
|
|
1882
|
+
const radio = /* @__PURE__ */ jsx(Radio.Root, {
|
|
1883
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
1884
|
+
nativeButton: true,
|
|
1885
|
+
"data-slot": "segmented-control-item",
|
|
1886
|
+
className: item({ className: `group/segmented-control-item ${className ?? ""}`.trim() }),
|
|
1887
|
+
...props
|
|
1888
|
+
});
|
|
1889
|
+
return iconsOnly ? /* @__PURE__ */ jsx(SegmentedControlItemTooltip, { children: radio }) : radio;
|
|
1890
|
+
}
|
|
1891
|
+
function SegmentedControlItemTooltip({ children }) {
|
|
1892
|
+
const [text, setText] = useState("");
|
|
1893
|
+
const triggerRef = useRef(null);
|
|
1894
|
+
const handleOpenChange = useCallback((open, details) => {
|
|
1895
|
+
if (!open) return;
|
|
1896
|
+
const label = triggerRef.current?.querySelector("[data-slot=segmented-control-label]");
|
|
1897
|
+
if (!label || label.getBoundingClientRect().width > 1) {
|
|
1898
|
+
details.cancel();
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
setText(label.textContent ?? "");
|
|
1902
|
+
}, []);
|
|
1903
|
+
return /* @__PURE__ */ jsxs(Tooltip$1, {
|
|
1904
|
+
onOpenChange: handleOpenChange,
|
|
1905
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
1906
|
+
ref: triggerRef,
|
|
1907
|
+
render: children
|
|
1908
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: text })]
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1911
|
+
function SegmentedControlLabel({ className, ...props }) {
|
|
1912
|
+
const { label } = segmentedControl();
|
|
1913
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1914
|
+
"data-slot": "segmented-control-label",
|
|
1915
|
+
className: label({ className }),
|
|
1916
|
+
...props
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
function SegmentedControlCount({ className, ...props }) {
|
|
1920
|
+
const { count } = segmentedControl();
|
|
1921
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1922
|
+
"data-slot": "segmented-control-count",
|
|
1923
|
+
className: count({ className }),
|
|
1924
|
+
...props
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* The same track for choices that are places, not values: each segment is a
|
|
1929
|
+
* link to another URL (a language, a version of the page), so it can be
|
|
1930
|
+
* opened in a new tab and copied. Name it with `aria-label`.
|
|
1931
|
+
*/
|
|
1932
|
+
function SegmentedControlNav({ variant = "default", className, ...props }) {
|
|
1933
|
+
const { root } = segmentedControl({ variant });
|
|
1934
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
1935
|
+
"data-slot": "segmented-control",
|
|
1936
|
+
className: root({ className }),
|
|
1937
|
+
...props
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
/** One segment of a `SegmentedControlNav`: a link, `<a>` unless `render` gives a router link. */
|
|
1941
|
+
function SegmentedControlLink({ current = false, className, render, ...props }) {
|
|
1942
|
+
const { item } = segmentedControl();
|
|
1943
|
+
return useRender({
|
|
1944
|
+
render: render ?? /* @__PURE__ */ jsx("a", {}),
|
|
1945
|
+
props: mergeProps({
|
|
1946
|
+
"data-slot": "segmented-control-item",
|
|
1947
|
+
"aria-current": current ? "page" : void 0,
|
|
1948
|
+
...current ? { "data-checked": "" } : {},
|
|
1949
|
+
className: item({ className: `group/segmented-control-item ${className ?? ""}`.trim() })
|
|
1950
|
+
}, props)
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
//#endregion
|
|
1820
1954
|
//#region src/components/avatar/avatar.tsx
|
|
1821
1955
|
const avatar = tv$1({
|
|
1822
1956
|
slots: {
|
|
@@ -2524,7 +2658,7 @@ const messageFooter = tv$1({
|
|
|
2524
2658
|
savedIndicator: [
|
|
2525
2659
|
"inline-flex min-w-0 max-w-full items-center gap-1 overflow-hidden whitespace-nowrap select-none",
|
|
2526
2660
|
"[&_svg]:shrink-0",
|
|
2527
|
-
"h-[22px] rounded-chip
|
|
2661
|
+
"h-[22px] rounded-chip pr-[6.5px] pl-[5.5px]",
|
|
2528
2662
|
"text-caption font-semibold text-foreground-muted",
|
|
2529
2663
|
"bg-fill-muted hover:overlay-medium active:overlay-medium",
|
|
2530
2664
|
"outline-none focus-visible:shadow-focus",
|
|
@@ -2636,7 +2770,7 @@ const messageReaction = tv$1({ slots: {
|
|
|
2636
2770
|
chip: [
|
|
2637
2771
|
"inline-flex min-w-0 max-w-full items-center overflow-hidden whitespace-nowrap",
|
|
2638
2772
|
"transition-colors",
|
|
2639
|
-
"h-6 gap-1 rounded-chip
|
|
2773
|
+
"h-6 gap-1 rounded-chip px-[7px] text-callout text-foreground",
|
|
2640
2774
|
"bg-fill-muted hover:overlay-medium active:overlay-medium",
|
|
2641
2775
|
"data-pressed:bg-attention-soft",
|
|
2642
2776
|
"has-data-[slot=message-reaction-error-indicator]:bg-warning-soft",
|
|
@@ -2865,12 +2999,17 @@ function MessageReactionTooltipMeta({ className, render, ...props }) {
|
|
|
2865
2999
|
//#endregion
|
|
2866
3000
|
//#region src/components/message-item/message-reference.recipe.ts
|
|
2867
3001
|
const chip = (fill) => [
|
|
2868
|
-
"items-baseline gap-0.5 rounded-sticker px-1.5 py-px has-[>svg]:
|
|
3002
|
+
"items-baseline gap-0.5 rounded-sticker px-1.5 py-px has-[>svg]:px-[4.5px]",
|
|
2869
3003
|
"[font-size:0.875em] leading-5 font-semibold",
|
|
3004
|
+
"[--message-reference-em:1em]",
|
|
2870
3005
|
"[&_svg]:size-3.5 [&_svg]:text-foreground-muted",
|
|
2871
3006
|
fill
|
|
2872
3007
|
];
|
|
2873
3008
|
const linkChip = (fill) => [...chip(fill), "text-foreground cursor-pointer hover:overlay-medium active:overlay-medium"];
|
|
3009
|
+
const SUFFIX_LIFT = {
|
|
3010
|
+
"x-height": "top-[calc((1em-var(--message-reference-em))/4)]",
|
|
3011
|
+
icon: "top-[calc(0.25em-var(--message-reference-em)*0.35)]"
|
|
3012
|
+
}["x-height"];
|
|
2874
3013
|
const messageReference = tv$1({
|
|
2875
3014
|
slots: {
|
|
2876
3015
|
root: [
|
|
@@ -2880,11 +3019,17 @@ const messageReference = tv$1({
|
|
|
2880
3019
|
"max-w-full truncate select-text no-underline",
|
|
2881
3020
|
"outline-none focus-visible:shadow-focus",
|
|
2882
3021
|
"[&_svg]:size-[0.857em] [&_svg]:shrink-0 [&_svg]:self-center",
|
|
3022
|
+
"*:data-[slot=spinner]:self-center",
|
|
2883
3023
|
"has-[>[data-slot=message-reference-indicator]]:relative has-[>[data-slot=message-reference-indicator]]:mr-2",
|
|
2884
3024
|
"has-[>[data-slot=message-reference-indicator]]:inline-block",
|
|
2885
3025
|
"has-[>[data-slot=message-reference-indicator]]:overflow-visible"
|
|
2886
3026
|
],
|
|
2887
3027
|
chipLabel: "min-w-0 truncate",
|
|
3028
|
+
suffix: [
|
|
3029
|
+
"relative shrink-0",
|
|
3030
|
+
SUFFIX_LIFT,
|
|
3031
|
+
"font-mono text-label leading-none font-normal text-foreground-hint"
|
|
3032
|
+
],
|
|
2888
3033
|
indicator: ["pointer-events-none absolute -right-1.5 top-0 inline-flex size-2 shrink-0 items-center justify-center", "*:data-[slot=status]:size-full"]
|
|
2889
3034
|
},
|
|
2890
3035
|
variants: { variant: {
|
|
@@ -2942,6 +3087,18 @@ function MessageReferenceLabel({ className, render, ...props }) {
|
|
|
2942
3087
|
state: { slot: "message-reference-label" }
|
|
2943
3088
|
});
|
|
2944
3089
|
}
|
|
3090
|
+
/** A short note after a chip's label in muted machine type, such as `msg` on a
|
|
3091
|
+
* link to a message. It lines up with the label by the middle of its letters. */
|
|
3092
|
+
function MessageReferenceSuffix({ className, render, ...props }) {
|
|
3093
|
+
const { suffix } = messageReference();
|
|
3094
|
+
const defaultProps = { className: suffix({ className }) };
|
|
3095
|
+
return useRender({
|
|
3096
|
+
defaultTagName: "span",
|
|
3097
|
+
render,
|
|
3098
|
+
props: mergeProps(defaultProps, props),
|
|
3099
|
+
state: { slot: "message-reference-suffix" }
|
|
3100
|
+
});
|
|
3101
|
+
}
|
|
2945
3102
|
function MessageReferencePending({ className, render, ...props }) {
|
|
2946
3103
|
const { root } = messageReference({ variant: "pending" });
|
|
2947
3104
|
return useReferenceRender(root({ className }), render, props);
|
|
@@ -3122,8 +3279,8 @@ const messageQuotedPreview = tv$1({ slots: {
|
|
|
3122
3279
|
"has-data-[slot=message-quoted-preview-author-delegated-by]:flex-wrap",
|
|
3123
3280
|
"gap-1.5 p-0 pb-0.5"
|
|
3124
3281
|
],
|
|
3125
|
-
channel: ["inline-flex items-
|
|
3126
|
-
thread: ["inline-flex items-
|
|
3282
|
+
channel: ["inline-flex items-start", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5 [&_svg]:lead-icon"],
|
|
3283
|
+
thread: ["inline-flex items-start", "gap-1 text-footnote font-semibold text-foreground-hint [&_svg]:size-3.5 [&_svg]:lead-icon"],
|
|
3127
3284
|
author: ["inline-flex min-w-0 items-center", "gap-1.5"],
|
|
3128
3285
|
authorName: ["truncate", "text-footnote font-bold text-foreground-muted"],
|
|
3129
3286
|
authorMeta: ["truncate", "text-caption text-foreground-hint"],
|
|
@@ -3297,6 +3454,11 @@ const messageList = tv$1({
|
|
|
3297
3454
|
],
|
|
3298
3455
|
dateDividerRule: ["flex-1", "min-w-3 border-t border-line-hairline"],
|
|
3299
3456
|
dateDividerChip: ["inline-flex items-center", "font-mono text-mono-meta whitespace-nowrap text-foreground-hint"],
|
|
3457
|
+
endFade: [
|
|
3458
|
+
"pointer-events-none absolute inset-x-0 bottom-0 z-5",
|
|
3459
|
+
"h-timeline-section",
|
|
3460
|
+
"bg-linear-to-t from-layer-canvas to-transparent"
|
|
3461
|
+
],
|
|
3300
3462
|
notice: ["text-center", "pt-timeline-lead pb-timeline-row font-mono text-mono-meta"],
|
|
3301
3463
|
historyLimited: [
|
|
3302
3464
|
"inline-flex items-center",
|
|
@@ -3426,6 +3588,19 @@ function MessageListHistoryLimited({ className, render, ...props }) {
|
|
|
3426
3588
|
props: mergeProps(defaultProps, props)
|
|
3427
3589
|
});
|
|
3428
3590
|
}
|
|
3591
|
+
function MessageListEndFade({ className, render, ...props }) {
|
|
3592
|
+
const { endFade } = messageList();
|
|
3593
|
+
const defaultProps = {
|
|
3594
|
+
"data-slot": "message-list-end-fade",
|
|
3595
|
+
"aria-hidden": true,
|
|
3596
|
+
className: endFade({ className })
|
|
3597
|
+
};
|
|
3598
|
+
return useRender({
|
|
3599
|
+
defaultTagName: "div",
|
|
3600
|
+
render,
|
|
3601
|
+
props: mergeProps(defaultProps, props)
|
|
3602
|
+
});
|
|
3603
|
+
}
|
|
3429
3604
|
//#endregion
|
|
3430
3605
|
//#region src/components/message-list/message-list-jump.tsx
|
|
3431
3606
|
function MessageListJumpControls({ className, render, side = "bottom", ...props }) {
|
|
@@ -3586,4 +3761,143 @@ function useMouseOnlyPointerSensor(distance) {
|
|
|
3586
3761
|
return useSensor(MouseOnlyPointerSensor, options);
|
|
3587
3762
|
}
|
|
3588
3763
|
//#endregion
|
|
3589
|
-
|
|
3764
|
+
//#region src/components/inbox-item/inbox-item.recipe.ts
|
|
3765
|
+
const inboxItem = tv$1({
|
|
3766
|
+
slots: {
|
|
3767
|
+
item: [
|
|
3768
|
+
"relative grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-3 p-3 text-left",
|
|
3769
|
+
"has-data-[slot=inbox-item-selection]:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
3770
|
+
"has-data-[slot=inbox-item-leading]:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
3771
|
+
"has-data-[slot=inbox-item-selection]:has-data-[slot=inbox-item-leading]:grid-cols-[auto_auto_minmax(0,1fr)_auto]",
|
|
3772
|
+
"transition-colors",
|
|
3773
|
+
"gap-x-3 gap-y-0 rounded-none border-0 bg-transparent px-4 py-3 shadow-none",
|
|
3774
|
+
"before:pointer-events-none before:absolute before:top-0 before:right-0 before:left-4 before:hidden before:border-t before:border-line-hairline",
|
|
3775
|
+
"[[data-slot=inbox-item]+&]:before:block has-data-[slot=inbox-item-selection]:before:left-11",
|
|
3776
|
+
"has-data-[slot=inbox-item-leading]:before:left-16",
|
|
3777
|
+
"has-data-[slot=inbox-item-selection]:has-data-[slot=inbox-item-leading]:before:left-23",
|
|
3778
|
+
"hover:bg-fill-subtle not-data-[active=true]:active:bg-fill-medium",
|
|
3779
|
+
"not-data-[active=true]:data-popup-open:bg-fill-subtle not-data-[active=true]:has-data-popup-open:bg-fill-subtle",
|
|
3780
|
+
"data-[active=true]:bg-info-soft data-[active=true]:hover:bg-info-soft",
|
|
3781
|
+
"data-disabled:pointer-events-none data-disabled:hover:bg-transparent",
|
|
3782
|
+
"has-[[data-slot=inbox-item-open]:focus-visible]:keyboard:inset-ring-2 has-[[data-slot=inbox-item-open]:focus-visible]:keyboard:inset-ring-foreground",
|
|
3783
|
+
"not-data-[density=compact]:has-data-[slot=inbox-item-trailing]:[--inbox-item-content-display:grid] not-data-[density=compact]:has-data-[slot=inbox-item-trailing]:[--inbox-item-content-end:-1]"
|
|
3784
|
+
],
|
|
3785
|
+
itemTrigger: ["absolute inset-0 z-0 outline-none"],
|
|
3786
|
+
itemLeading: ["pointer-events-none relative z-10 flex size-9 shrink-0 items-center justify-center"],
|
|
3787
|
+
itemLeadingBadge: [
|
|
3788
|
+
"absolute -right-0.5 -bottom-0.5 z-10 inline-flex size-3.5 items-center justify-center",
|
|
3789
|
+
"rounded-[3px] border border-sticker-ink outline-2 outline-layer-canvas outline-solid",
|
|
3790
|
+
"bg-layer-canvas bg-[linear-gradient(var(--info-soft),var(--info-soft))] text-foreground",
|
|
3791
|
+
"[&_svg]:size-2.5 [&_svg]:shrink-0"
|
|
3792
|
+
],
|
|
3793
|
+
itemSelection: ["relative z-10 mt-0.5 flex size-4 shrink-0 items-center justify-center"],
|
|
3794
|
+
itemContent: [
|
|
3795
|
+
"pointer-events-none relative z-10 min-w-0 flex-1 text-left",
|
|
3796
|
+
"-col-start-3 col-end-(--inbox-item-content-end) row-start-1",
|
|
3797
|
+
"[display:var(--inbox-item-content-display,block)] grid-cols-subgrid"
|
|
3798
|
+
],
|
|
3799
|
+
itemContext: [
|
|
3800
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3801
|
+
"flex min-w-0 items-center",
|
|
3802
|
+
"mb-0.5 gap-1.5 py-0",
|
|
3803
|
+
"text-caption text-foreground-hint"
|
|
3804
|
+
],
|
|
3805
|
+
itemSubtitle: [
|
|
3806
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3807
|
+
"min-w-0",
|
|
3808
|
+
"mt-0.5 mb-0 py-0",
|
|
3809
|
+
"text-caption text-foreground-hint"
|
|
3810
|
+
],
|
|
3811
|
+
itemHeading: [
|
|
3812
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3813
|
+
"flex min-w-0 items-start gap-2",
|
|
3814
|
+
"mb-0"
|
|
3815
|
+
],
|
|
3816
|
+
itemTitle: [
|
|
3817
|
+
"relative line-clamp-2 min-w-0 flex-1 pl-[18px]",
|
|
3818
|
+
"[&>svg]:absolute [&>svg]:top-[calc((1lh-14px)/2)] [&>svg]:left-0 [&>svg]:size-3.5",
|
|
3819
|
+
"font-sans text-subhead font-semibold text-foreground-muted",
|
|
3820
|
+
"group-data-[unread=true]/inbox-item:font-bold group-data-[unread=true]/inbox-item:text-foreground",
|
|
3821
|
+
"[&>svg]:text-foreground-hint"
|
|
3822
|
+
],
|
|
3823
|
+
itemTrailing: [
|
|
3824
|
+
"pointer-events-none relative z-10 col-[-2/-1] row-start-1",
|
|
3825
|
+
"flex shrink-0",
|
|
3826
|
+
"mt-0 flex-col items-end gap-2 pt-px",
|
|
3827
|
+
"max-md:flex-col max-md:items-end max-md:gap-2",
|
|
3828
|
+
"after:hidden after:size-[9px] after:shrink-0 after:rounded-[2px] after:border-[1.5px] after:border-sticker-ink after:bg-attention-400",
|
|
3829
|
+
"group-data-[unread=true]/inbox-item:after:block",
|
|
3830
|
+
"*:not-data-[reveal=hover]:opacity-[calc(1-var(--inbox-item-reveal-aside,0)*var(--inbox-item-revealed,0))] after:opacity-[calc(1-var(--inbox-item-reveal-aside,0)*var(--inbox-item-revealed,0))]",
|
|
3831
|
+
"*:not-data-[reveal=hover]:mr-(--inbox-item-aside-room,0px) after:mr-(--inbox-item-aside-room,0px)",
|
|
3832
|
+
"*:not-data-[reveal=hover]:transition-opacity after:transition-opacity",
|
|
3833
|
+
"pointer-fine:has-[>[data-reveal=hover]]:[--inbox-item-reveal-aside:1]",
|
|
3834
|
+
"pointer-coarse:has-[>[data-reveal=hover]]:[--inbox-item-aside-room:--spacing(11)]",
|
|
3835
|
+
"group-hover/inbox-item:[--inbox-item-revealed:1] group-focus-within/inbox-item:[--inbox-item-revealed:1]",
|
|
3836
|
+
"group-data-[active=true]/inbox-item:[--inbox-item-revealed:1] group-data-popup-open/inbox-item:[--inbox-item-revealed:1]",
|
|
3837
|
+
"has-[>[data-reveal=hover]_[data-popup-open]]:[--inbox-item-revealed:1]"
|
|
3838
|
+
],
|
|
3839
|
+
itemMarks: ["flex h-5 shrink-0 items-center justify-end gap-1.5", "text-foreground-hint"],
|
|
3840
|
+
itemHoverTarget: ["pointer-events-auto"],
|
|
3841
|
+
itemTimestamp: ["shrink-0 whitespace-nowrap text-right tabular-nums", "font-mono text-mono-meta text-foreground-hint"],
|
|
3842
|
+
itemBody: [
|
|
3843
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3844
|
+
"line-clamp-2",
|
|
3845
|
+
"mt-0.5 text-callout text-foreground-muted"
|
|
3846
|
+
],
|
|
3847
|
+
itemMessage: [
|
|
3848
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3849
|
+
"min-w-0",
|
|
3850
|
+
"mt-0.5 line-clamp-2 text-callout text-foreground-muted"
|
|
3851
|
+
],
|
|
3852
|
+
itemSender: ["font-semibold text-foreground"],
|
|
3853
|
+
itemMetadata: [
|
|
3854
|
+
"col-span-full nth-[-n+2]:col-[1/2]",
|
|
3855
|
+
"flex min-h-5 flex-wrap items-center gap-1.5",
|
|
3856
|
+
"mt-2"
|
|
3857
|
+
],
|
|
3858
|
+
itemActions: [
|
|
3859
|
+
"pointer-events-auto flex shrink-0 items-center",
|
|
3860
|
+
"order-last gap-0.5",
|
|
3861
|
+
"*:data-[slot=panel-action]:h-8 *:data-[slot=panel-action]:min-w-8 [&>[data-slot=panel-action]>svg]:size-[18px]",
|
|
3862
|
+
"*:data-[slot=panel-toggle-action]:h-8 *:data-[slot=panel-toggle-action]:min-w-8 [&>[data-slot=panel-toggle-action]>svg]:size-[18px]",
|
|
3863
|
+
"[&>[data-slot=panel-toggle-action][data-pressed]]:border-transparent",
|
|
3864
|
+
"[&>[data-slot=panel-toggle-action][data-pressed]]:bg-transparent",
|
|
3865
|
+
"[&>[data-slot=panel-toggle-action][data-pressed]]:text-foreground",
|
|
3866
|
+
"[&>[data-slot=panel-toggle-action][data-pressed]]:hover:bg-fill-medium [&>[data-slot=panel-toggle-action][data-pressed]]:active:bg-fill-medium",
|
|
3867
|
+
"pointer-coarse:gap-3",
|
|
3868
|
+
"pointer-coarse:*:data-[slot=panel-action]:after:absolute pointer-coarse:*:data-[slot=panel-action]:after:-inset-1.5",
|
|
3869
|
+
"pointer-coarse:*:data-[slot=panel-toggle-action]:after:absolute pointer-coarse:*:data-[slot=panel-toggle-action]:after:-inset-1.5"
|
|
3870
|
+
]
|
|
3871
|
+
},
|
|
3872
|
+
variants: {
|
|
3873
|
+
density: { compact: {
|
|
3874
|
+
item: ["items-center"],
|
|
3875
|
+
itemTitle: ["line-clamp-1", "pl-0 has-[>svg]:pl-[18px]"],
|
|
3876
|
+
itemTrailing: [
|
|
3877
|
+
"gap-0 pt-0",
|
|
3878
|
+
"max-md:gap-0",
|
|
3879
|
+
"group-data-[unread=true]/inbox-item:after:hidden"
|
|
3880
|
+
],
|
|
3881
|
+
itemTimestamp: ["leading-5"],
|
|
3882
|
+
itemBody: ["line-clamp-1", "mt-0"],
|
|
3883
|
+
itemMessage: ["line-clamp-1", "mt-0"]
|
|
3884
|
+
} },
|
|
3885
|
+
reveal: { hover: { itemActions: [
|
|
3886
|
+
"absolute top-0 right-0 z-10",
|
|
3887
|
+
"pointer-events-none opacity-0 transition-opacity",
|
|
3888
|
+
"group-hover/inbox-item:pointer-events-auto group-hover/inbox-item:opacity-100",
|
|
3889
|
+
"group-focus-within/inbox-item:pointer-events-auto group-focus-within/inbox-item:opacity-100",
|
|
3890
|
+
"group-data-[active=true]/inbox-item:pointer-events-auto group-data-[active=true]/inbox-item:opacity-100",
|
|
3891
|
+
"group-data-popup-open/inbox-item:pointer-events-auto group-data-popup-open/inbox-item:opacity-100",
|
|
3892
|
+
"has-data-popup-open:pointer-events-auto has-data-popup-open:opacity-100",
|
|
3893
|
+
"pointer-coarse:pointer-events-auto pointer-coarse:opacity-100 pointer-coarse:only:static"
|
|
3894
|
+
] } }
|
|
3895
|
+
},
|
|
3896
|
+
compoundVariants: [{
|
|
3897
|
+
density: "compact",
|
|
3898
|
+
reveal: "hover",
|
|
3899
|
+
class: { itemActions: ["top-1/2 -translate-y-1/2", "pointer-coarse:only:translate-y-0"] }
|
|
3900
|
+
}]
|
|
3901
|
+
});
|
|
3902
|
+
//#endregion
|
|
3903
|
+
export { MessageReactionPickerStatic as $, DialogHeader as $n, observeTruncation as $t, MessageEmbedFooter as A, ScrollAreaContent as An, MessageItemEmbedded as At, MessageReferenceChip as B, TooltipContent as Bn, AvatarFallback as Bt, MessageQuotedPreviewLoading as C, PanelBody as Cn, MessageItemSenderButton as Ct, MessageQuotedPreviewUnavailable as D, PanelScrollViewport as Dn, MessageItemBody as Dt, MessageQuotedPreviewTimestamp as E, PanelScrollContent as En, MessageItemAttachments as Et, MessageTextSelectionToolbarSeparator as F, useMobileViewport as Fn, MessageItemGutter as Ft, MessageReferenceText as G, textLinkVariants as Gn, SegmentedControlCount as Gt, MessageReferenceLabel as H, TooltipProvider as Hn, AvatarGroupCount as Ht, MessageMultiSelect as I, Checkbox$1 as In, MessageItem as It, MessageReactionChip as J, DialogBody as Jn, SegmentedControlLink as Jt, MessageReferenceUnavailable as K, Badge as Kn, SegmentedControlItem as Kt, MessageMultiSelectCheckbox as L, CheckboxIndicator as Ln, searchHit as Lt, messageEmbed as M, ScrollAreaScrollbar as Mn, MessageItemSearchMatch as Mt, MessageTextSelectionToolbar as N, ScrollAreaThumb as Nn, MessageItemAvatarSlot as Nt, MessageEmbed as O, PanelSection as On, MessageItemContent as Ot, MessageTextSelectionToolbarButton as P, ScrollAreaViewport as Pn, MessageItemContinuationTime as Pt, MessageReactionPickerContent as Q, DialogFooter as Qn, measureElement as Qt, MessageMultiSelectToolbar as R, PRESENCE_COLOR as Rn, Avatar$1 as Rt, MessageQuotedPreviewHeader as S, Panel as Sn, MessageItemSenderBadges as St, MessageQuotedPreviewThread as T, PanelHeaderRoot as Tn, MessageItemTime as Tt, MessageReferencePending as U, TooltipTrigger as Un, AvatarImage as Ut, MessageReferenceIndicator as V, TooltipPortal as Vn, AvatarGroup as Vt, MessageReferenceSuffix as W, TextLink as Wn, SegmentedControl as Wt, MessageReactionErrorIndicator as X, DialogContent as Xn, useOverflowTitle as Xt, MessageReactionCount as Y, DialogClose as Yn, SegmentedControlNav as Yt, MessageReactionGlyph as Z, DialogDescription as Zn, measureContent as Zt, MessageQuotedPreviewAuthorDelegatedBy as _, DropdownMenuSubmenu as _n, controlIconInset as _r, MessageItemDelegatedByName as _t, MessageListJumpPill as a, DropdownMenuFooter as an, DialogTrigger as ar, MessageReactionTooltipNameText as at, MessageQuotedPreviewChannel as b, Kbd as bn, decisionWidth as br, MessageItemMeta as bt, MessageListDateDivider as c, DropdownMenuItemLabel as cn, Spinner as cr, MessageItemBadge as ct, MessageListNotice as d, DropdownMenuPortal as dn, withOverlayLayer as dr, MessageItemSavedIndicator as dt, readNow as en, DialogNav as er, MessageReactionQuickButton as et, MessageList as f, DropdownMenuRadioGroup as fn, resolveThemeScopeProps as fr, MessageItemToolbar as ft, MessageQuotedPreviewAuthor as g, DropdownMenuShortcut as gn, tv$1 as gr, MessageItemDelegatedByButton as gt, MessageQuotedPreviewAttachments as h, DropdownMenuSeparator as hn, ThemeStateContext as hr, MessageItemDelegatedBy as ht, MessageListJumpControls as i, DropdownMenuContent as in, DialogTitle as ir, MessageReactionTooltipName as it, MessageEmbedHeader as j, ScrollAreaCorner as jn, MessageItemFooter as jt, MessageEmbedContent as k, ScrollArea$1 as kn, MessageItemEdited as kt, MessageListEndFade as l, DropdownMenuLabel as ln, defaultNativeButton as lr, MessageItemBadgeSeparator as lt, MessageQuotedPreviewAttachment as m, DropdownMenuRadioItemIndicator as mn, useTheme as mr, MessageItemDelegatedAvatar as mt, useHoldThenMoveTouchSensor as n, DropdownMenuCheckboxItem as nn, DialogPortal as nr, MessageReactionTooltipContent as nt, MessageListJumpPillDismiss as o, DropdownMenuItem as on, Button$1 as or, MessageReactionTooltipNames as ot, MessageQuotedPreview as p, DropdownMenuRadioItem as pn, useThemeScopeProps as pr, MessageItemToolbarButton as pt, MessageReactionAddButton as q, Dialog$1 as qn, SegmentedControlLabel as qt, useMouseOnlyPointerSensor as r, DropdownMenuCheckboxItemIndicator as rn, DialogSurface as rr, MessageReactionTooltipMeta as rt, MessageListJumpPillGroup as s, DropdownMenuItemCount as sn, buttonVariants as sr, MessageReactionTooltipSeparator as st, inboxItem as t, DropdownMenu as tn, DialogOverlay as tr, MessageReactionQuickRow as tt, MessageListHistoryLimited as u, DropdownMenuPopup as un, useParentOverlayKind as ur, MessageItemReadReceipt as ut, MessageQuotedPreviewAuthorMeta as v, DropdownMenuSubmenuTrigger as vn, headEdgePull as vr, MessageItemHeader as vt, MessageQuotedPreviewText as w, PanelFooter as wn, MessageItemSenderGroup as wt, MessageQuotedPreviewContent as x, KbdGroup as xn, MessageItemSender as xt, MessageQuotedPreviewAuthorName as y, DropdownMenuTrigger as yn, headEdges as yr, MessageItemInlineStatus as yt, MessageMultiSelectToolbarActions as z, Tooltip$1 as zn, AvatarBadge as zt };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Dialog } from "@base-ui/react/dialog";
|
|
2
2
|
import { VariantProps } from "tailwind-variants/lite";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, ElementType, ReactNode } from "react";
|
|
3
|
+
import { CSSProperties, ComponentPropsWithRef, ElementType, ReactElement, ReactNode } from "react";
|
|
4
4
|
import { Button } from "@base-ui/react/button";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { Tooltip } from "@base-ui/react/tooltip";
|
|
7
7
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
8
8
|
import { Avatar } from "@base-ui/react";
|
|
9
9
|
import { Menu } from "@base-ui/react/menu";
|
|
10
|
+
import { Radio } from "@base-ui/react/radio";
|
|
11
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
10
12
|
import { Toggle } from "@base-ui/react/toggle";
|
|
11
13
|
import { Toolbar } from "@base-ui/react/toolbar";
|
|
12
14
|
//#region src/lib/styled-props.d.ts
|
|
@@ -609,6 +611,51 @@ type TooltipContentProps = StyledProps<Tooltip.Popup.Props> & Pick<Tooltip.Posit
|
|
|
609
611
|
};
|
|
610
612
|
declare function TooltipContent({ align, alignOffset, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking, positionMethod, side, sideOffset, sticky, container, portalProps, className, children, ...props }: TooltipContentProps): import("react").JSX.Element;
|
|
611
613
|
//#endregion
|
|
614
|
+
//#region src/components/segmented-control/segmented-control.d.ts
|
|
615
|
+
/**
|
|
616
|
+
* Container widths (Tailwind's `@xs` 20rem to `@2xl` 42rem) below which the
|
|
617
|
+
* segments show only their icons.
|
|
618
|
+
*/
|
|
619
|
+
type SegmentedControlIconsOnlyBelow = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
620
|
+
type SegmentedControlProps<T extends string = string> = StyledProps<RadioGroup.Props<T>> & {
|
|
621
|
+
/**
|
|
622
|
+
* When the nearest `@container` ancestor (the row the control sits in) is
|
|
623
|
+
* narrower than this width, every segment shows only its icon (give each
|
|
624
|
+
* one). Its label stays the accessible name and shows in a tooltip.
|
|
625
|
+
*/
|
|
626
|
+
iconsOnlyBelow?: SegmentedControlIconsOnlyBelow;
|
|
627
|
+
/** `on-frame` in the yellow frame; see `SegmentedControlNav`. */
|
|
628
|
+
variant?: "default" | "on-frame";
|
|
629
|
+
};
|
|
630
|
+
declare function SegmentedControl<T extends string = string>({ disabled, iconsOnlyBelow, variant, className, ...props }: SegmentedControlProps<T>): import("react").JSX.Element;
|
|
631
|
+
type SegmentedControlItemProps<T extends string = string> = StyledProps<Radio.Root.Props<T>>;
|
|
632
|
+
declare function SegmentedControlItem<T extends string = string>({ className, ...props }: SegmentedControlItemProps<T>): import("react").JSX.Element;
|
|
633
|
+
type SegmentedControlLabelProps = ComponentPropsWithRef<"span">;
|
|
634
|
+
declare function SegmentedControlLabel({ className, ...props }: SegmentedControlLabelProps): import("react").JSX.Element;
|
|
635
|
+
type SegmentedControlCountProps = ComponentPropsWithRef<"span">;
|
|
636
|
+
declare function SegmentedControlCount({ className, ...props }: SegmentedControlCountProps): import("react").JSX.Element;
|
|
637
|
+
type SegmentedControlNavProps = ComponentPropsWithRef<"nav"> & {
|
|
638
|
+
/**
|
|
639
|
+
* `on-frame` in the frame (a top bar): the track the frame's medium fill and
|
|
640
|
+
* the current segment in the frame's active colours (white on the yellow
|
|
641
|
+
* frame, yellow on the dark one), since a yellow sticker on yellow would
|
|
642
|
+
* not read as selected.
|
|
643
|
+
*/
|
|
644
|
+
variant?: "default" | "on-frame";
|
|
645
|
+
};
|
|
646
|
+
/**
|
|
647
|
+
* The same track for choices that are places, not values: each segment is a
|
|
648
|
+
* link to another URL (a language, a version of the page), so it can be
|
|
649
|
+
* opened in a new tab and copied. Name it with `aria-label`.
|
|
650
|
+
*/
|
|
651
|
+
declare function SegmentedControlNav({ variant, className, ...props }: SegmentedControlNavProps): import("react").JSX.Element;
|
|
652
|
+
type SegmentedControlLinkProps = useRender.ComponentProps<"a"> & {
|
|
653
|
+
/** The segment for the page being shown: `aria-current="page"`, drawn as the selected segment. */
|
|
654
|
+
current?: boolean;
|
|
655
|
+
};
|
|
656
|
+
/** One segment of a `SegmentedControlNav`: a link, `<a>` unless `render` gives a router link. */
|
|
657
|
+
declare function SegmentedControlLink({ current, className, render, ...props }: SegmentedControlLinkProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
658
|
+
//#endregion
|
|
612
659
|
//#region src/components/avatar/avatar.d.ts
|
|
613
660
|
declare const avatar: import("tailwind-variants/lite").TVReturnType<{
|
|
614
661
|
type: {
|
|
@@ -1040,6 +1087,10 @@ type MessageReferenceChipProps = SpanProps$1 & {
|
|
|
1040
1087
|
declare function MessageReferenceChip({ className, render, variant, ...props }: MessageReferenceChipProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1041
1088
|
type MessageReferenceLabelProps = useRender.ComponentProps<"span">;
|
|
1042
1089
|
declare function MessageReferenceLabel({ className, render, ...props }: MessageReferenceLabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1090
|
+
type MessageReferenceSuffixProps = useRender.ComponentProps<"span">;
|
|
1091
|
+
/** A short note after a chip's label in muted machine type, such as `msg` on a
|
|
1092
|
+
* link to a message. It lines up with the label by the middle of its letters. */
|
|
1093
|
+
declare function MessageReferenceSuffix({ className, render, ...props }: MessageReferenceSuffixProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1043
1094
|
type MessageReferencePendingProps = SpanProps$1;
|
|
1044
1095
|
declare function MessageReferencePending({ className, render, ...props }: MessageReferencePendingProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1045
1096
|
type MessageReferenceUnavailableProps = SpanProps$1;
|
|
@@ -1119,6 +1170,8 @@ type MessageListNoticeProps = useRender.ComponentProps<"div"> & {
|
|
|
1119
1170
|
declare function MessageListNotice({ className, render, tone, ...props }: MessageListNoticeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1120
1171
|
type MessageListHistoryLimitedProps = useRender.ComponentProps<"span">;
|
|
1121
1172
|
declare function MessageListHistoryLimited({ className, render, ...props }: MessageListHistoryLimitedProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1173
|
+
type MessageListEndFadeProps = useRender.ComponentProps<"div">;
|
|
1174
|
+
declare function MessageListEndFade({ className, render, ...props }: MessageListEndFadeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1122
1175
|
//#endregion
|
|
1123
1176
|
//#region src/components/message-list/message-list-jump.d.ts
|
|
1124
1177
|
type MessageListJumpControlsProps = useRender.ComponentProps<"div"> & {
|
|
@@ -1137,4 +1190,4 @@ type MessageListJumpPillDismissProps = StyledProps<Button.Props> & DataAttribute
|
|
|
1137
1190
|
};
|
|
1138
1191
|
declare function MessageListJumpPillDismiss({ className, children, render, nativeButton, ...props }: MessageListJumpPillDismissProps): import("react").JSX.Element;
|
|
1139
1192
|
//#endregion
|
|
1140
|
-
export {
|
|
1193
|
+
export { MessageTextSelectionToolbarSeparator as $, DialogHeaderProps as $i, MessageItemAvatarSlotProps as $n, DropdownMenuItemCount as $r, MessageReactionTooltipSeparator as $t, MessageQuotedPreviewAuthorNameProps as A, KbdProps as Ai, MessageItemSenderBadgesProps as An, SegmentedControlNav as Ar, MessageReactionCountProps as At, MessageQuotedPreviewProps as B, textLinkVariants as Bi, MessageItemBody as Bn, TooltipProviderProps as Br, MessageReactionQuickButtonProps as Bt, MessageQuotedPreviewAttachmentsProps as C, DropdownMenuSubmenuTrigger as Ci, MessageItemHeaderProps as Cn, SegmentedControlIconsOnlyBelow as Cr, MessageReferenceChipVariant as Ct, MessageQuotedPreviewAuthorMeta as D, Kbd as Di, MessageItemMetaProps as Dn, SegmentedControlLabelProps as Dr, MessageReactionChip as Dt, MessageQuotedPreviewAuthorDelegatedByProps as E, DropdownMenuTriggerProps as Ei, MessageItemMeta as En, SegmentedControlLabel as Er, MessageReactionAddButtonProps as Et, MessageQuotedPreviewContentProps as F, Checkbox$1 as Fi, MessageItemSenderProps as Fn, TooltipContentProps as Fr, MessageReactionPickerContent as Ft, MessageQuotedPreviewTimestamp as G, DialogCloseProps as Gi, MessageItemEditedProps as Gn, DropdownMenuCheckboxItemIndicator as Gr, MessageReactionTooltipMeta as Gt, MessageQuotedPreviewTextProps as H, DialogBody as Hi, MessageItemContent as Hn, TooltipTriggerProps as Hr, MessageReactionQuickRowProps as Ht, MessageQuotedPreviewHeader as I, CheckboxProps as Ii, MessageItemTime as In, TooltipPortal as Ir, MessageReactionPickerContentProps as It, MessageQuotedPreviewUnavailableProps as J, DialogDescription as Ji, MessageItemFooter as Jn, DropdownMenuContent as Jr, MessageReactionTooltipNameProps as Jt, MessageQuotedPreviewTimestampProps as K, DialogContent as Ki, MessageItemEmbedded as Kn, DropdownMenuCheckboxItemIndicatorProps as Kr, MessageReactionTooltipMetaProps as Kt, MessageQuotedPreviewHeaderProps as L, Presence as Li, MessageItemTimeProps as Ln, TooltipPortalProps as Lr, MessageReactionPickerStatic as Lt, MessageQuotedPreviewChannel as M, BadgeProps as Mi, MessageItemSenderButtonProps as Mn, SegmentedControlProps as Mr, MessageReactionErrorIndicatorProps as Mt, MessageQuotedPreviewChannelProps as N, CheckboxIndicator as Ni, MessageItemSenderGroup as Nn, Tooltip$1 as Nr, MessageReactionGlyph as Nt, MessageQuotedPreviewAuthorMetaProps as O, KbdGroup as Oi, MessageItemSender as On, SegmentedControlLink as Or, MessageReactionChipProps as Ot, MessageQuotedPreviewContent as P, CheckboxIndicatorProps as Pi, MessageItemSenderGroupProps as Pn, TooltipContent as Pr, MessageReactionGlyphProps as Pt, MessageTextSelectionToolbarProps as Q, DialogHeader as Qi, MessageItemAvatarSlot as Qn, DropdownMenuItem as Qr, MessageReactionTooltipNamesProps as Qt, MessageQuotedPreviewLoading as R, TextLink as Ri, MessageItemAttachments as Rn, TooltipProps as Rr, MessageReactionPickerStaticProps as Rt, MessageQuotedPreviewAttachments as S, DropdownMenuSubmenuProps as Si, MessageItemHeader as Sn, SegmentedControlCountProps as Sr, MessageReferenceUnavailableProps as St, MessageQuotedPreviewAuthorDelegatedBy as T, DropdownMenuTrigger as Ti, MessageItemInlineStatusProps as Tn, SegmentedControlItemProps as Tr, MessageReactionAddButton as Tt, MessageQuotedPreviewThread as U, DialogBodyProps as Ui, MessageItemContentProps as Un, DropdownMenu as Ur, MessageReactionTooltipContent as Ut, MessageQuotedPreviewText as V, Dialog$1 as Vi, MessageItemBodyProps as Vn, TooltipTrigger as Vr, MessageReactionQuickRow as Vt, MessageQuotedPreviewThreadProps as W, DialogClose as Wi, MessageItemEdited as Wn, DropdownMenuCheckboxItem as Wr, MessageReactionTooltipContentProps as Wt, MessageTextSelectionToolbarButton as X, DialogFooter as Xi, MessageItemSearchMatch as Xn, DropdownMenuFooter as Xr, MessageReactionTooltipNameTextProps as Xt, MessageTextSelectionToolbar as Y, DialogDescriptionProps as Yi, MessageItemFooterProps as Yn, DropdownMenuContentProps as Yr, MessageReactionTooltipNameText as Yt, MessageTextSelectionToolbarButtonProps as Z, DialogFooterProps as Zi, MessageItemSearchMatchProps as Zn, DropdownMenuFooterProps as Zr, MessageReactionTooltipNames as Zt, MessageList as _, buttonVariants as _a, DropdownMenuSeparator as _i, MessageItemDelegatedByButton as _n, AvatarImageProps as _r, MessageReferenceSuffix as _t, MessageListJumpPillDismissProps as a, DialogPortalProps as aa, DropdownMenuLabelProps as ai, MessageItemBadgeStatus as an, MessageItemProps as ar, MessageMultiSelectToolbar as at, MessageQuotedPreviewAttachment as b, StyledProps as ba, DropdownMenuShortcutProps as bi, MessageItemDelegatedByNameProps as bn, SegmentedControl as br, MessageReferenceTextProps as bt, MessageListJumpPillProps as c, DialogSurfaceProps as ca, DropdownMenuPortal as ci, MessageItemSavedIndicator as cn, AvatarBadgeOffset as cr, MessageMultiSelectToolbarProps as ct, MessageListEndFade as d, DialogTrigger as da, DropdownMenuRadioGroup as di, MessageItemToolbarButton as dn, AvatarFallbackProps as dr, MessageReferenceIndicator as dt, DialogNav as ea, DropdownMenuItemCountProps as ei, MessageReactionTooltipSeparatorProps as en, MessageItemContinuationTime as er, MessageTextSelectionToolbarSeparatorProps as et, MessageListEndFadeProps as f, DialogTriggerProps as fa, DropdownMenuRadioGroupProps as fi, MessageItemToolbarButtonProps as fn, AvatarGroup as fr, MessageReferenceIndicatorProps as ft, MessageListNoticeProps as g, DeprecatedButtonSize as ga, DropdownMenuRadioItemProps as gi, MessageItemDelegatedBy as gn, AvatarImage as gr, MessageReferencePendingProps as gt, MessageListNotice as h, ButtonSize as ha, DropdownMenuRadioItemIndicatorProps as hi, MessageItemDelegatedAvatarProps as hn, AvatarGroupProps as hr, MessageReferencePending as ht, MessageListJumpPillDismiss as i, DialogPortal as ia, DropdownMenuLabel as ii, MessageItemBadgeSeparatorProps as in, MessageItem as ir, MessageMultiSelectProps as it, MessageQuotedPreviewAuthorProps as j, Badge as ji, MessageItemSenderButton as jn, SegmentedControlNavProps as jr, MessageReactionErrorIndicator as jt, MessageQuotedPreviewAuthorName as k, KbdGroupProps as ki, MessageItemSenderBadges as kn, SegmentedControlLinkProps as kr, MessageReactionCount as kt, MessageListDateDivider as l, DialogTitle as la, DropdownMenuPortalProps as li, MessageItemSavedIndicatorProps as ln, AvatarBadgeProps as lr, MessageReferenceChip as lt, MessageListHistoryLimitedProps as m, ButtonProps as ma, DropdownMenuRadioItemIndicator as mi, MessageItemDelegatedAvatar as mn, AvatarGroupCountProps as mr, MessageReferenceLabelProps as mt, MessageListJumpControlsProps as n, DialogOverlay as na, DropdownMenuItemLabelProps as ni, MessageItemBadgeProps as nn, MessageItemGutter as nr, MessageMultiSelectCheckbox as nt, MessageListJumpPillGroup as o, DialogProps as oa, DropdownMenuPopup as oi, MessageItemReadReceipt as on, Avatar$1 as or, MessageMultiSelectToolbarActions as ot, MessageListHistoryLimited as p, Button$1 as pa, DropdownMenuRadioItem as pi, MessageItemToolbarProps as pn, AvatarGroupCount as pr, MessageReferenceLabel as pt, MessageQuotedPreviewUnavailable as q, DialogContentProps as qi, MessageItemEmbeddedProps as qn, DropdownMenuCheckboxItemProps as qr, MessageReactionTooltipName as qt, MessageListJumpPill as r, DialogOverlayProps as ra, DropdownMenuItemProps as ri, MessageItemBadgeSeparator as rn, MessageItemGutterProps as rr, MessageMultiSelectCheckboxProps as rt, MessageListJumpPillGroupProps as s, DialogSurface as sa, DropdownMenuPopupProps as si, MessageItemReadReceiptProps as sn, AvatarBadge as sr, MessageMultiSelectToolbarActionsProps as st, MessageListJumpControls as t, DialogNavProps as ta, DropdownMenuItemLabel as ti, MessageItemBadge as tn, MessageItemContinuationTimeProps as tr, MessageMultiSelect as tt, MessageListDateDividerProps as u, DialogTitleProps as ua, DropdownMenuProps as ui, MessageItemToolbar as un, AvatarFallback as ur, MessageReferenceChipProps as ut, MessageListProps as v, VariantProps as va, DropdownMenuSeparatorProps as vi, MessageItemDelegatedByButtonProps as vn, AvatarProps as vr, MessageReferenceSuffixProps as vt, MessageQuotedPreviewAuthor as w, DropdownMenuSubmenuTriggerProps as wi, MessageItemInlineStatus as wn, SegmentedControlItem as wr, MessageReferenceTextVariant as wt, MessageQuotedPreviewAttachmentProps as x, DropdownMenuSubmenu as xi, MessageItemDelegatedByProps as xn, SegmentedControlCount as xr, MessageReferenceUnavailable as xt, MessageQuotedPreview as y, DataAttributes as ya, DropdownMenuShortcut as yi, MessageItemDelegatedByName as yn, AvatarSize as yr, MessageReferenceText as yt, MessageQuotedPreviewLoadingProps as z, TextLinkProps as zi, MessageItemAttachmentsProps as zn, TooltipProvider as zr, MessageReactionQuickButton as zt };
|