@botiverse/raft-ui 0.9.2 → 0.9.4
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 +18 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.mjs +63 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [0.9.4](https://github.com/botiverse/raft-design/compare/v0.9.3...v0.9.4) (2026-10-20)
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- Clickable text no longer sits underlined at rest: it underlines on hover in its own colour and never turns pink. This covers `TextLink` (both emphases; `strong` no longer turns its underline pink on hover), `MessageItemSenderButton`, `@` mentions, the forwarded-bundle and translation text actions, empty-state description links (now semibold so they stand apart from the hint text), the video-preview failure action and toast actions. Disabled ones do not underline. Rendered Markdown links are the one exception: they keep a faint underline at rest (link blue at 40%), because colour alone is below 3:1 against body text, and on hover the underline goes full strength and the text darkens. ([#594](https://github.com/botiverse/raft-design/pull/594))
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `MessageItemSenderButton` shows its hover state again when the app wraps it, for example in a tooltip trigger. ([#594](https://github.com/botiverse/raft-design/pull/594))
|
|
10
|
+
- A `SelectItem` with a `SelectItemDescription` is named by its `SelectItemText` alone and described by the description, so screen readers no longer read the two run together as the option's name. Items without a description are unchanged. ([#575](https://github.com/botiverse/raft-design/pull/575))
|
|
11
|
+
|
|
12
|
+
## [0.9.3](https://github.com/botiverse/raft-design/compare/v0.9.2...v0.9.3) (2026-10-20)
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Message reference chips sit on the sentence's baseline. Chips with a leading icon (task, joint channel, thread, link) sat 3px high and text-only chips like `#general` 1px high, which also pushed lines apart (26px instead of 24px). Height, colors and padding are unchanged. ([#583](https://github.com/botiverse/raft-design/pull/583))
|
|
17
|
+
- `InlineCode` in a message centres its letters in the fill (they sat about 0.6px low). ([#583](https://github.com/botiverse/raft-design/pull/583))
|
|
18
|
+
|
|
1
19
|
## [0.9.2](https://github.com/botiverse/raft-design/compare/v0.9.1...v0.9.2) (2026-10-19)
|
|
2
20
|
|
|
3
21
|
### Fixed
|
package/dist/index.d.mts
CHANGED
|
@@ -1617,14 +1617,14 @@ export declare function SelectItemLeading({ className, ...props }: SelectItemLea
|
|
|
1617
1617
|
type SelectItemIndicatorProps = StyledProps<Select$1.ItemIndicator.Props>;
|
|
1618
1618
|
export declare function SelectItemIndicator({ className, children, ...props }: SelectItemIndicatorProps): import("react").JSX.Element;
|
|
1619
1619
|
type SelectItemTextProps = StyledProps<Select$1.ItemText.Props>;
|
|
1620
|
-
export declare function SelectItemText({ className, ...props }: SelectItemTextProps): import("react").JSX.Element;
|
|
1620
|
+
export declare function SelectItemText({ className, id, ...props }: SelectItemTextProps): import("react").JSX.Element;
|
|
1621
1621
|
type SelectItemDescriptionProps = StyledProps<ComponentPropsWithRef<"span">>;
|
|
1622
1622
|
/**
|
|
1623
1623
|
* A second line under an option's label: what it means, not its name again.
|
|
1624
1624
|
* It sits beside `SelectItemText`, not inside it, so the selected value in the
|
|
1625
1625
|
* trigger stays the label alone. The option grows to fit it.
|
|
1626
1626
|
*/
|
|
1627
|
-
export declare function SelectItemDescription({ className, ...props }: SelectItemDescriptionProps): import("react").JSX.Element;
|
|
1627
|
+
export declare function SelectItemDescription({ className, id, ...props }: SelectItemDescriptionProps): import("react").JSX.Element;
|
|
1628
1628
|
type SelectLabelProps = StyledProps<Select$1.Label.Props>;
|
|
1629
1629
|
export declare function SelectLabel({ className, ...props }: SelectLabelProps): import("react").JSX.Element;
|
|
1630
1630
|
type SelectGroupProps = StyledProps<Select$1.Group.Props>;
|
|
@@ -1993,6 +1993,7 @@ declare const messageItem: import("tailwind-variants/lite").TVReturnType<{
|
|
|
1993
1993
|
content: string[];
|
|
1994
1994
|
header: string;
|
|
1995
1995
|
sender: string[];
|
|
1996
|
+
senderButton: string[];
|
|
1996
1997
|
senderBadges: string[];
|
|
1997
1998
|
meta: string[];
|
|
1998
1999
|
time: string[];
|
|
@@ -2018,6 +2019,7 @@ declare const messageItem: import("tailwind-variants/lite").TVReturnType<{
|
|
|
2018
2019
|
content: string[];
|
|
2019
2020
|
header: string;
|
|
2020
2021
|
sender: string[];
|
|
2022
|
+
senderButton: string[];
|
|
2021
2023
|
senderBadges: string[];
|
|
2022
2024
|
meta: string[];
|
|
2023
2025
|
time: string[];
|
|
@@ -2043,6 +2045,7 @@ declare const messageItem: import("tailwind-variants/lite").TVReturnType<{
|
|
|
2043
2045
|
content: string[];
|
|
2044
2046
|
header: string;
|
|
2045
2047
|
sender: string[];
|
|
2048
|
+
senderButton: string[];
|
|
2046
2049
|
senderBadges: string[];
|
|
2047
2050
|
meta: string[];
|
|
2048
2051
|
time: string[];
|
package/dist/index.mjs
CHANGED
|
@@ -844,13 +844,13 @@ function FormSection({ className, render, title, status, description, children,
|
|
|
844
844
|
const textLinkVariants = tv({
|
|
845
845
|
base: [
|
|
846
846
|
"rounded-[2px]",
|
|
847
|
-
"
|
|
847
|
+
"decoration-[1.5px] underline-offset-[3px] not-disabled:hover:underline",
|
|
848
848
|
"outline-none focus-visible:shadow-focus",
|
|
849
|
-
"disabled:cursor-not-allowed disabled:text-foreground-disabled
|
|
849
|
+
"disabled:cursor-not-allowed disabled:text-foreground-disabled"
|
|
850
850
|
],
|
|
851
851
|
variants: { variant: {
|
|
852
852
|
muted: ["font-medium text-foreground-muted", "hover:text-foreground"],
|
|
853
|
-
strong: ["font-semibold text-foreground"
|
|
853
|
+
strong: ["font-semibold text-foreground"]
|
|
854
854
|
} },
|
|
855
855
|
defaultVariants: { variant: "muted" }
|
|
856
856
|
});
|
|
@@ -5554,13 +5554,25 @@ function SelectList({ className, ...props }) {
|
|
|
5554
5554
|
...props
|
|
5555
5555
|
});
|
|
5556
5556
|
}
|
|
5557
|
+
const SelectItemPartsContext = createContext(null);
|
|
5557
5558
|
function SelectItem({ className, ...props }) {
|
|
5558
5559
|
const chrome = useSelectChrome();
|
|
5559
5560
|
const { item } = select({ chrome });
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5561
|
+
const [textId, setTextId] = useState();
|
|
5562
|
+
const [descriptionId, setDescriptionId] = useState();
|
|
5563
|
+
const parts = useMemo(() => ({
|
|
5564
|
+
setTextId,
|
|
5565
|
+
setDescriptionId
|
|
5566
|
+
}), []);
|
|
5567
|
+
return /* @__PURE__ */ jsx(SelectItemPartsContext.Provider, {
|
|
5568
|
+
value: parts,
|
|
5569
|
+
children: /* @__PURE__ */ jsx(Select$1.Item, {
|
|
5570
|
+
"data-slot": "select-item",
|
|
5571
|
+
className: item({ className }),
|
|
5572
|
+
"aria-labelledby": descriptionId && textId ? textId : void 0,
|
|
5573
|
+
"aria-describedby": descriptionId,
|
|
5574
|
+
...props
|
|
5575
|
+
})
|
|
5564
5576
|
});
|
|
5565
5577
|
}
|
|
5566
5578
|
function SelectItemLeading({ className, ...props }) {
|
|
@@ -5584,9 +5596,17 @@ function SelectItemIndicator({ className, children, ...props }) {
|
|
|
5584
5596
|
children: children ?? defaultIndicator
|
|
5585
5597
|
});
|
|
5586
5598
|
}
|
|
5587
|
-
function SelectItemText({ className, ...props }) {
|
|
5599
|
+
function SelectItemText({ className, id, ...props }) {
|
|
5588
5600
|
const { itemText } = select();
|
|
5601
|
+
const generatedId = useId();
|
|
5602
|
+
const textId = id ?? generatedId;
|
|
5603
|
+
const setTextId = useContext(SelectItemPartsContext)?.setTextId;
|
|
5604
|
+
useLayoutEffect(() => {
|
|
5605
|
+
setTextId?.(textId);
|
|
5606
|
+
return () => setTextId?.(void 0);
|
|
5607
|
+
}, [setTextId, textId]);
|
|
5589
5608
|
return /* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
5609
|
+
id: textId,
|
|
5590
5610
|
"data-slot": "select-item-text",
|
|
5591
5611
|
className: itemText({ className }),
|
|
5592
5612
|
...props
|
|
@@ -5597,9 +5617,17 @@ function SelectItemText({ className, ...props }) {
|
|
|
5597
5617
|
* It sits beside `SelectItemText`, not inside it, so the selected value in the
|
|
5598
5618
|
* trigger stays the label alone. The option grows to fit it.
|
|
5599
5619
|
*/
|
|
5600
|
-
function SelectItemDescription({ className, ...props }) {
|
|
5620
|
+
function SelectItemDescription({ className, id, ...props }) {
|
|
5601
5621
|
const { itemDescription } = select();
|
|
5622
|
+
const generatedId = useId();
|
|
5623
|
+
const descriptionId = id ?? generatedId;
|
|
5624
|
+
const setDescriptionId = useContext(SelectItemPartsContext)?.setDescriptionId;
|
|
5625
|
+
useLayoutEffect(() => {
|
|
5626
|
+
setDescriptionId?.(descriptionId);
|
|
5627
|
+
return () => setDescriptionId?.(void 0);
|
|
5628
|
+
}, [setDescriptionId, descriptionId]);
|
|
5602
5629
|
return /* @__PURE__ */ jsx("span", {
|
|
5630
|
+
id: descriptionId,
|
|
5603
5631
|
"data-slot": "select-item-description",
|
|
5604
5632
|
className: itemDescription({ className }),
|
|
5605
5633
|
...props
|
|
@@ -6473,7 +6501,7 @@ const inlineCode = tv({
|
|
|
6473
6501
|
"inline border-0 px-1 align-baseline",
|
|
6474
6502
|
"[font-size:0.875em] leading-[1.3em] font-normal",
|
|
6475
6503
|
"wrap-anywhere",
|
|
6476
|
-
"rounded-sticker bg-fill-muted
|
|
6504
|
+
"rounded-sticker bg-fill-muted pt-[calc(1px-0.0275em)] pb-[calc(1px+0.0275em)] text-foreground"
|
|
6477
6505
|
] }
|
|
6478
6506
|
} },
|
|
6479
6507
|
defaultVariants: { appearance: "default" }
|
|
@@ -6508,7 +6536,9 @@ const markdown = tv({
|
|
|
6508
6536
|
paragraph: ["mb-1 last:mb-0"],
|
|
6509
6537
|
link: [
|
|
6510
6538
|
"select-text underline decoration-2 underline-offset-2",
|
|
6511
|
-
"rounded-[2px]
|
|
6539
|
+
"rounded-[2px]",
|
|
6540
|
+
"text-foreground-link hover:text-[color-mix(in_oklab,var(--foreground-link)_80%,var(--foreground))]",
|
|
6541
|
+
"decoration-foreground-link/40 hover:decoration-current",
|
|
6512
6542
|
"outline-none focus-visible:shadow-focus"
|
|
6513
6543
|
],
|
|
6514
6544
|
mark: searchHit,
|
|
@@ -6722,6 +6752,11 @@ function MarkdownCheckbox({ className, ...props }) {
|
|
|
6722
6752
|
}
|
|
6723
6753
|
//#endregion
|
|
6724
6754
|
//#region src/components/message-item/message-item.recipe.ts
|
|
6755
|
+
const sender = [
|
|
6756
|
+
"min-w-0 shrink-0 truncate",
|
|
6757
|
+
"text-subhead font-bold text-foreground",
|
|
6758
|
+
"rounded-[2px] outline-none focus-visible:shadow-focus"
|
|
6759
|
+
];
|
|
6725
6760
|
const messageItem = tv({
|
|
6726
6761
|
slots: {
|
|
6727
6762
|
root: [
|
|
@@ -6748,12 +6783,11 @@ const messageItem = tv({
|
|
|
6748
6783
|
],
|
|
6749
6784
|
content: ["min-w-0 flex-1", "text-body text-foreground"],
|
|
6750
6785
|
header: "mb-px flex min-w-0 items-center gap-1.5 overflow-hidden",
|
|
6751
|
-
sender
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
"
|
|
6755
|
-
"
|
|
6756
|
-
"rounded-[2px] outline-none focus-visible:shadow-focus"
|
|
6786
|
+
sender,
|
|
6787
|
+
senderButton: [
|
|
6788
|
+
...sender,
|
|
6789
|
+
"cursor-pointer",
|
|
6790
|
+
"decoration-[1.5px] underline-offset-[3px] hover:underline"
|
|
6757
6791
|
],
|
|
6758
6792
|
senderBadges: ["inline-flex shrink-0 items-center gap-1"],
|
|
6759
6793
|
meta: ["min-w-0 truncate", "text-caption text-foreground-hint"],
|
|
@@ -6926,10 +6960,10 @@ function MessageItemSender({ className, render, ...props }) {
|
|
|
6926
6960
|
});
|
|
6927
6961
|
}
|
|
6928
6962
|
function MessageItemSenderButton({ className, render, ...props }) {
|
|
6929
|
-
const {
|
|
6963
|
+
const { senderButton } = messageItem();
|
|
6930
6964
|
const defaultProps = {
|
|
6931
6965
|
type: "button",
|
|
6932
|
-
className:
|
|
6966
|
+
className: senderButton({ className })
|
|
6933
6967
|
};
|
|
6934
6968
|
return useRender({
|
|
6935
6969
|
defaultTagName: "button",
|
|
@@ -7352,7 +7386,7 @@ function MessageReactionTooltipMeta({ className, render, ...props }) {
|
|
|
7352
7386
|
//#endregion
|
|
7353
7387
|
//#region src/components/message-item/message-reference.recipe.ts
|
|
7354
7388
|
const chip = (fill) => [
|
|
7355
|
-
"
|
|
7389
|
+
"items-baseline gap-0.5 rounded-sticker px-1.5 py-px has-[>svg]:pl-[3px]",
|
|
7356
7390
|
"[font-size:0.875em] leading-5 font-semibold",
|
|
7357
7391
|
"[&_svg]:size-3.5 [&_svg]:text-foreground-muted",
|
|
7358
7392
|
fill
|
|
@@ -7381,11 +7415,7 @@ const messageReference = tv({
|
|
|
7381
7415
|
"bg-brand inset-ring-[1.5px] inset-ring-sticker-ink ring-[1.5px] ring-sticker-edge",
|
|
7382
7416
|
"hover:press-overlay-sticker"
|
|
7383
7417
|
] },
|
|
7384
|
-
secondary: { root: [
|
|
7385
|
-
"inline cursor-pointer font-bold text-foreground",
|
|
7386
|
-
"underline decoration-foreground-hint decoration-[1.5px] underline-offset-[3px]",
|
|
7387
|
-
"hover:decoration-foreground"
|
|
7388
|
-
] },
|
|
7418
|
+
secondary: { root: ["inline cursor-pointer font-bold text-foreground", "decoration-foreground decoration-[1.5px] underline-offset-[3px] hover:underline"] },
|
|
7389
7419
|
accent: { root: linkChip("bg-attention-soft") },
|
|
7390
7420
|
muted: { root: linkChip("bg-inactive-soft") },
|
|
7391
7421
|
info: { root: linkChip("bg-info-soft") },
|
|
@@ -8836,7 +8866,7 @@ const messageVideoPreview = tv({ slots: {
|
|
|
8836
8866
|
failureTitle: [],
|
|
8837
8867
|
failureAction: [
|
|
8838
8868
|
"inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-white/75 [font:inherit]",
|
|
8839
|
-
"hover:text-white",
|
|
8869
|
+
"decoration-[1.5px] underline-offset-[3px] hover:text-white hover:underline",
|
|
8840
8870
|
"outline-1 outline-offset-2 outline-transparent focus-visible:outline-white",
|
|
8841
8871
|
"[&_svg]:size-[13px]"
|
|
8842
8872
|
],
|
|
@@ -8960,7 +8990,7 @@ const messageForwardedBundle = tv({
|
|
|
8960
8990
|
items: ["relative", ""],
|
|
8961
8991
|
footerAction: [
|
|
8962
8992
|
"inline-flex items-center gap-1 rounded-[2px] text-footnote font-semibold text-foreground",
|
|
8963
|
-
"
|
|
8993
|
+
"decoration-[1.5px] underline-offset-[3px] hover:underline",
|
|
8964
8994
|
"outline-none focus-visible:shadow-focus"
|
|
8965
8995
|
]
|
|
8966
8996
|
},
|
|
@@ -9490,16 +9520,14 @@ const messageTranslation = tv({ slots: {
|
|
|
9490
9520
|
translationProgressTrack: ["h-1"],
|
|
9491
9521
|
translationAction: [
|
|
9492
9522
|
"inline-flex items-center gap-1",
|
|
9493
|
-
"underline",
|
|
9494
9523
|
"rounded-[2px] font-sans text-caption font-semibold text-foreground",
|
|
9495
|
-
"decoration-[1.5px] underline-offset-[3px] hover:
|
|
9524
|
+
"decoration-[1.5px] underline-offset-[3px] hover:underline",
|
|
9496
9525
|
"outline-none focus-visible:shadow-focus"
|
|
9497
9526
|
],
|
|
9498
9527
|
translationRetryAction: [
|
|
9499
9528
|
"inline-flex items-center gap-1",
|
|
9500
|
-
"underline",
|
|
9501
9529
|
"rounded-[2px] font-sans text-caption font-semibold text-foreground",
|
|
9502
|
-
"decoration-[1.5px] underline-offset-[3px] hover:
|
|
9530
|
+
"decoration-[1.5px] underline-offset-[3px] hover:underline",
|
|
9503
9531
|
"outline-none focus-visible:shadow-focus"
|
|
9504
9532
|
]
|
|
9505
9533
|
} });
|
|
@@ -12113,7 +12141,8 @@ const emptyState = tv({ slots: {
|
|
|
12113
12141
|
title: ["mb-2 w-full max-w-full text-center text-balance", "font-sans text-headline font-bold text-foreground-muted"],
|
|
12114
12142
|
description: [
|
|
12115
12143
|
"mx-auto w-full text-center text-pretty",
|
|
12116
|
-
"[&>a]:
|
|
12144
|
+
"[&>a]:font-semibold [&>a]:decoration-[1.5px] [&>a]:underline-offset-[3px]",
|
|
12145
|
+
"[&>a]:hover:text-foreground [&>a]:hover:underline",
|
|
12117
12146
|
"max-w-[300px] text-callout text-foreground-hint"
|
|
12118
12147
|
],
|
|
12119
12148
|
actions: ["mt-5"]
|
|
@@ -12568,7 +12597,7 @@ const toastStyles = tv({
|
|
|
12568
12597
|
"relative inset-auto order-1 size-auto shrink-0 whitespace-nowrap",
|
|
12569
12598
|
"border-0 bg-transparent p-0 shadow-none",
|
|
12570
12599
|
"font-sans text-callout font-bold text-foreground-on-hud",
|
|
12571
|
-
"
|
|
12600
|
+
"decoration-[1.5px] underline-offset-[3px] not-disabled:hover:underline",
|
|
12572
12601
|
"after:absolute after:-inset-x-2 after:-inset-y-3 after:rounded-control after:content-['']",
|
|
12573
12602
|
"active:after:bg-foreground-on-hud/15",
|
|
12574
12603
|
"focus-visible:outline-2 focus-visible:outline-foreground-on-hud",
|
|
@@ -12664,7 +12693,7 @@ const toastAction = tv({ slots: {
|
|
|
12664
12693
|
"relative order-2 inline-flex shrink-0 items-center justify-center whitespace-nowrap select-none",
|
|
12665
12694
|
"border-0 bg-transparent p-0",
|
|
12666
12695
|
"font-sans text-callout font-bold text-foreground-on-hud",
|
|
12667
|
-
"
|
|
12696
|
+
"decoration-[1.5px] underline-offset-[3px] not-disabled:not-aria-disabled:hover:underline",
|
|
12668
12697
|
"after:absolute after:-inset-x-2 after:-inset-y-3 after:rounded-control after:content-['']",
|
|
12669
12698
|
"active:after:bg-foreground-on-hud/15",
|
|
12670
12699
|
"outline-1 outline-offset-2 outline-transparent focus-visible:outline-2 focus-visible:outline-foreground-on-hud",
|