@botiverse/raft-ui 0.89.0 → 0.90.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
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [0.90.0](https://github.com/botiverse/raft-design/compare/v0.89.0...v0.90.0) (2026-11-10)
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- **`FitToolbarSearch`'s least width is capped at 120px** ([FitToolbar › Behavior](https://raft-design.botiverse.build/components/fit-toolbar/#behavior)). `FIT_SEARCH_MAX_LEAST` is now 120 (was 160): the search icon, the field's side padding and "Search…", the same cap at every width. The measured least width is still the icon and the whole placeholder when that is smaller; a longer placeholder ends in an ellipsis.
|
|
6
|
+
- Why: slock's Members › Agents at 375px left "Agents ▾" under 160px and the search collapsed to its icon (Jasper, 2026-11-10, #proj-raft-ui:f9756e85).
|
|
7
|
+
- Affects: a search whose placeholder takes more than 120px ("Search tasks" takes about 140px) now keeps its field down to 120px with the placeholder cut, and the toolbar's earlier steps stop sooner. An explicit `minWidth` is unchanged and not capped.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/components/fit-toolbar/
|
|
9
|
+
|
|
1
10
|
## [0.89.0](https://github.com/botiverse/raft-design/compare/v0.88.0...v0.89.0) (2026-11-10)
|
|
2
11
|
|
|
3
12
|
### Changed
|
|
@@ -244,9 +244,13 @@ export declare function FitToolbarPicker({ trigger, icon, children, value, label
|
|
|
244
244
|
* and its whole placeholder, or this, whichever is smaller. A longer
|
|
245
245
|
* placeholder is cut with an ellipsis instead of collapsing the field to its
|
|
246
246
|
* button, since it is only a hint and goes once the person types (Jasper,
|
|
247
|
-
* 2026-11-10, #proj-raft-ui:f9756e85).
|
|
247
|
+
* 2026-11-10, #proj-raft-ui:f9756e85). 120px is the icon, the side padding
|
|
248
|
+
* and "Search…", the same at every width: at 160px, slock's Members › Agents
|
|
249
|
+
* at 375px left "Agents ▾" under 160px and the search collapsed (Jasper,
|
|
250
|
+
* 2026-11-10). A smaller measured width still wins; an explicit `minWidth`
|
|
251
|
+
* isn't capped.
|
|
248
252
|
*/
|
|
249
|
-
export declare const FIT_SEARCH_MAX_LEAST =
|
|
253
|
+
export declare const FIT_SEARCH_MAX_LEAST = 120;
|
|
250
254
|
export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "value" | "defaultValue" | "onValueChange" | "aria-label" | "render"> & {
|
|
251
255
|
/** Its accessible name ("Search tasks"): the field's and, once it is an icon, the button's, and the button's tooltip. */
|
|
252
256
|
"aria-label": string;
|
|
@@ -260,7 +264,7 @@ export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "va
|
|
|
260
264
|
* The least it may be, in px, before the toolbar gives way. By default it
|
|
261
265
|
* is measured: what its search icon and its whole placeholder (or, with
|
|
262
266
|
* none, its `aria-label`) take, in the field's own font, so the empty field
|
|
263
|
-
* shows what it is for, up to `FIT_SEARCH_MAX_LEAST` (
|
|
267
|
+
* shows what it is for, up to `FIT_SEARCH_MAX_LEAST` (120px): a longer
|
|
264
268
|
* placeholder ends in an ellipsis. A number given here isn't capped.
|
|
265
269
|
*/
|
|
266
270
|
minWidth?: number;
|
|
@@ -281,7 +285,7 @@ export type FitToolbarSearchProps = Omit<InputGroupInputProps, "className" | "va
|
|
|
281
285
|
/**
|
|
282
286
|
* The search field of a list's toolbar: it fills the rest of its line and
|
|
283
287
|
* keeps at least the room its icon and its whole placeholder take, up to
|
|
284
|
-
*
|
|
288
|
+
* 120px (measured, or `minWidth`), so the toolbar's other steps come before
|
|
285
289
|
* it is squeezed. From `collapseOrder` on it is a search icon button at the
|
|
286
290
|
* start of the line, which opens the field in the scope's place, More and the
|
|
287
291
|
* primary action kept at the line's end; the
|
|
@@ -878,13 +878,17 @@ function coverScope(root, search) {
|
|
|
878
878
|
* and its whole placeholder, or this, whichever is smaller. A longer
|
|
879
879
|
* placeholder is cut with an ellipsis instead of collapsing the field to its
|
|
880
880
|
* button, since it is only a hint and goes once the person types (Jasper,
|
|
881
|
-
* 2026-11-10, #proj-raft-ui:f9756e85).
|
|
881
|
+
* 2026-11-10, #proj-raft-ui:f9756e85). 120px is the icon, the side padding
|
|
882
|
+
* and "Search…", the same at every width: at 160px, slock's Members › Agents
|
|
883
|
+
* at 375px left "Agents ▾" under 160px and the search collapsed (Jasper,
|
|
884
|
+
* 2026-11-10). A smaller measured width still wins; an explicit `minWidth`
|
|
885
|
+
* isn't capped.
|
|
882
886
|
*/
|
|
883
|
-
const FIT_SEARCH_MAX_LEAST =
|
|
887
|
+
const FIT_SEARCH_MAX_LEAST = 120;
|
|
884
888
|
/**
|
|
885
889
|
* The search field of a list's toolbar: it fills the rest of its line and
|
|
886
890
|
* keeps at least the room its icon and its whole placeholder take, up to
|
|
887
|
-
*
|
|
891
|
+
* 120px (measured, or `minWidth`), so the toolbar's other steps come before
|
|
888
892
|
* it is squeezed. From `collapseOrder` on it is a search icon button at the
|
|
889
893
|
* start of the line, which opens the field in the scope's place, More and the
|
|
890
894
|
* primary action kept at the line's end; the
|
|
@@ -938,7 +942,7 @@ function FitToolbarSearch({ "aria-label": label, value, defaultValue = "", onVal
|
|
|
938
942
|
words.style.paddingInlineEnd = style.paddingInlineEnd;
|
|
939
943
|
const whole = Math.ceil(copy.getBoundingClientRect().width);
|
|
940
944
|
if (whole <= 0) return;
|
|
941
|
-
const width = Math.min(whole,
|
|
945
|
+
const width = Math.min(whole, 120);
|
|
942
946
|
wrapper.current?.style.setProperty("--fit-search-min", `${width}px`);
|
|
943
947
|
setMeasured(width);
|
|
944
948
|
};
|