@botiverse/raft-ui 0.47.0 → 0.48.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 +19 -0
- package/dist/foundation.css +4 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +23 -3
- package/dist/styles.css +5 -0
- package/dist/tokens.json +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [0.48.0](https://github.com/botiverse/raft-design/compare/v0.47.1...v0.48.0) (2026-10-28)
|
|
2
|
+
|
|
3
|
+
### Design System
|
|
4
|
+
|
|
5
|
+
- **Hover and press on an ink sticker:** the server tile (rail header, sidebar header) is ink, and ink over ink doesn't show, so it hovers, presses and shows its open list with 6% paper, in light and dark. ([#875](https://github.com/botiverse/raft-design/pull/875))
|
|
6
|
+
- Docs: https://raft-design.botiverse.build/foundations/states/
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Token **`sticker-ink-medium`** (6% paper in both modes) and the utility `overlay-sticker-ink-medium`. ([#875](https://github.com/botiverse/raft-design/pull/875))
|
|
11
|
+
|
|
12
|
+
## [0.47.1](https://github.com/botiverse/raft-design/compare/v0.47.0...v0.47.1) (2026-10-28)
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **SelectActionItem:** when its action adds items above the row and the list stays open, the row keeps the highlight, so the next arrow key goes on from the row instead of from whatever item now sits at its old position. ([#873](https://github.com/botiverse/raft-design/pull/873))
|
|
17
|
+
- **SelectActionItem:** the docs no longer ask for `aria-expanded`, which ARIA does not allow on an option; remove it where you added it. ([#873](https://github.com/botiverse/raft-design/pull/873))
|
|
18
|
+
- Docs: https://raft-design.botiverse.build/components/select/
|
|
19
|
+
|
|
1
20
|
## [0.47.0](https://github.com/botiverse/raft-design/compare/v0.46.0...v0.47.0) (2026-10-28)
|
|
2
21
|
|
|
3
22
|
### Changed
|
package/dist/foundation.css
CHANGED
|
@@ -364,6 +364,10 @@
|
|
|
364
364
|
colour badges, the selected segment on press): hover and press, 10% ink in
|
|
365
365
|
both modes. */
|
|
366
366
|
--sticker-medium: oklch(0.1813 0.005 17.62 / 0.1);
|
|
367
|
+
/* Hover tier medium on an ink sticker (the server tile in the rail or the
|
|
368
|
+
sidebar header): hover, press and open, 6% paper in both modes, since ink
|
|
369
|
+
laid over ink doesn't show. */
|
|
370
|
+
--sticker-ink-medium: oklch(1 0 0 / 0.06);
|
|
367
371
|
--presence-online: oklch(0.8272 0.1354 130.07);
|
|
368
372
|
/* Yellow for an agent at work, and for Status variant="primary". The value of
|
|
369
373
|
brand in Raft Yellow, but its own, so a theme that grays the brand (Boring
|
package/dist/index.d.mts
CHANGED
|
@@ -1157,8 +1157,9 @@ type SelectActionItemProps = StyledProps<Omit<Select$1.Item.Props, "value" | "la
|
|
|
1157
1157
|
/**
|
|
1158
1158
|
* An action row inside the list, placed last after a `SelectSeparator`, such as
|
|
1159
1159
|
* Show All. It is reached by the arrow keys and typeahead like an item, but
|
|
1160
|
-
* pressing it runs `onAction` instead of choosing a value.
|
|
1161
|
-
*
|
|
1160
|
+
* pressing it runs `onAction` instead of choosing a value. It is an option to
|
|
1161
|
+
* assistive technology, so it takes no `aria-expanded`: its label says what it
|
|
1162
|
+
* does.
|
|
1162
1163
|
*/
|
|
1163
1164
|
export declare function SelectActionItem({ className, onAction, closeOnAction, ...props }: SelectActionItemProps): import("react").JSX.Element;
|
|
1164
1165
|
type SelectLabelProps = StyledProps<Select$1.Label.Props>;
|
package/dist/index.mjs
CHANGED
|
@@ -4211,7 +4211,7 @@ const select = tv({
|
|
|
4211
4211
|
itemText: ["min-w-0 flex-1 line-clamp-2 wrap-anywhere"],
|
|
4212
4212
|
itemDescription: [
|
|
4213
4213
|
"order-last min-w-0 basis-full wrap-anywhere",
|
|
4214
|
-
"[[data-slot=select-item-leading]~&]:ps-[calc(--spacing(4)
|
|
4214
|
+
"[[data-slot=select-item-leading]~&]:ps-[calc(--spacing(4)+(--spacing(2.5)))]",
|
|
4215
4215
|
"font-sans text-caption font-normal text-foreground-hint"
|
|
4216
4216
|
],
|
|
4217
4217
|
label: ["m-0", "font-sans text-footnote font-semibold text-foreground-muted"],
|
|
@@ -4277,6 +4277,24 @@ function findActionValue(value) {
|
|
|
4277
4277
|
if (value instanceof SelectActionValue) return value;
|
|
4278
4278
|
if (Array.isArray(value)) return value.find((entry) => entry instanceof SelectActionValue);
|
|
4279
4279
|
}
|
|
4280
|
+
/**
|
|
4281
|
+
* Base UI keeps the highlight by position. When an action adds items above its
|
|
4282
|
+
* row, the same position then holds another item while focus stays on the row,
|
|
4283
|
+
* and the next arrow key starts from the wrong place. Once the list has
|
|
4284
|
+
* re-rendered, focus the list and then the row again: the row's focus handler
|
|
4285
|
+
* re-reads its position and moves the highlight back to it.
|
|
4286
|
+
*/
|
|
4287
|
+
function keepActionHighlighted(event) {
|
|
4288
|
+
const target = event.target;
|
|
4289
|
+
if (!(target instanceof Element)) return;
|
|
4290
|
+
const row = target.closest("[data-slot=\"select-action-item\"]");
|
|
4291
|
+
if (!row) return;
|
|
4292
|
+
requestAnimationFrame(() => {
|
|
4293
|
+
if (!row.isConnected || row.hasAttribute("data-highlighted")) return;
|
|
4294
|
+
row.closest("[role=\"listbox\"]")?.focus({ preventScroll: true });
|
|
4295
|
+
row.focus({ preventScroll: true });
|
|
4296
|
+
});
|
|
4297
|
+
}
|
|
4280
4298
|
function Select({ chrome = "default", onValueChange, onOpenChange, isItemEqualToValue, itemToStringLabel, itemToStringValue, ...props }) {
|
|
4281
4299
|
const pendingActionClose = useRef(void 0);
|
|
4282
4300
|
const handleValueChange = useCallback((next, details) => {
|
|
@@ -4290,6 +4308,7 @@ function Select({ chrome = "default", onValueChange, onOpenChange, isItemEqualTo
|
|
|
4290
4308
|
if (details.reason !== "item-press") return;
|
|
4291
4309
|
pendingActionClose.current = action.closeOnActionRef.current;
|
|
4292
4310
|
action.onActionRef.current?.(details.event);
|
|
4311
|
+
if (!action.closeOnActionRef.current) keepActionHighlighted(details.event);
|
|
4293
4312
|
}, [onValueChange]);
|
|
4294
4313
|
const handleOpenChange = useCallback((open, details) => {
|
|
4295
4314
|
const closeOnAction = pendingActionClose.current;
|
|
@@ -4505,8 +4524,9 @@ function SelectItemDescription({ className, id, ...props }) {
|
|
|
4505
4524
|
/**
|
|
4506
4525
|
* An action row inside the list, placed last after a `SelectSeparator`, such as
|
|
4507
4526
|
* Show All. It is reached by the arrow keys and typeahead like an item, but
|
|
4508
|
-
* pressing it runs `onAction` instead of choosing a value.
|
|
4509
|
-
*
|
|
4527
|
+
* pressing it runs `onAction` instead of choosing a value. It is an option to
|
|
4528
|
+
* assistive technology, so it takes no `aria-expanded`: its label says what it
|
|
4529
|
+
* does.
|
|
4510
4530
|
*/
|
|
4511
4531
|
function SelectActionItem({ className, onAction, closeOnAction = false, ...props }) {
|
|
4512
4532
|
const chrome = useSelectChrome();
|
package/dist/styles.css
CHANGED
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
--color-sticker-paper: var(--sticker-paper);
|
|
306
306
|
--color-sticker-edge: var(--sticker-edge);
|
|
307
307
|
--color-sticker-medium: var(--sticker-medium);
|
|
308
|
+
--color-sticker-ink-medium: var(--sticker-ink-medium);
|
|
308
309
|
--color-presence-online: var(--presence-online);
|
|
309
310
|
--color-presence-busy: var(--presence-busy);
|
|
310
311
|
--color-presence-busy-soft: var(--presence-busy-soft);
|
|
@@ -830,6 +831,10 @@ textarea:-webkit-autofill:disabled {
|
|
|
830
831
|
background-image: linear-gradient(var(--sticker-medium), var(--sticker-medium));
|
|
831
832
|
}
|
|
832
833
|
|
|
834
|
+
@utility overlay-sticker-ink-medium {
|
|
835
|
+
background-image: linear-gradient(var(--sticker-ink-medium), var(--sticker-ink-medium));
|
|
836
|
+
}
|
|
837
|
+
|
|
833
838
|
@utility overlay-frame-medium {
|
|
834
839
|
background-image: linear-gradient(var(--fill-frame-medium), var(--fill-frame-medium));
|
|
835
840
|
}
|
package/dist/tokens.json
CHANGED
|
@@ -2849,6 +2849,14 @@
|
|
|
2849
2849
|
"components": [0.1813, 0.005, 17.62],
|
|
2850
2850
|
"alpha": 0.1
|
|
2851
2851
|
}
|
|
2852
|
+
},
|
|
2853
|
+
"ink-medium": {
|
|
2854
|
+
"$description": "Hover tier medium on an ink sticker (the server tile in the rail or the sidebar header): hover, press and open, 6% paper in both modes, since ink laid over ink doesn't show.",
|
|
2855
|
+
"$value": {
|
|
2856
|
+
"colorSpace": "oklch",
|
|
2857
|
+
"components": [1, 0, 0],
|
|
2858
|
+
"alpha": 0.06
|
|
2859
|
+
}
|
|
2852
2860
|
}
|
|
2853
2861
|
},
|
|
2854
2862
|
"presence": {
|