Watch
0
0
Fork
You've already forked hyperhive
0

frontend: preact 11.2.0

All four packages move from preact 10.29.8 to 11.2.0. The new types need four
small changes in swarm-ui and the shared dropdown: a ref that may be empty is
typed RefObject<T | null>, HTMLAttributes is imported from preact instead of
read from the JSX namespace, and TextField's type is the five kinds it is
used with, asserted once for the input's new union. npm-deps-hash follows the
lockfile.
This commit is contained in:
iris 2026-11-06 22:38:56 +01:00
commit d76d54c412
2 changed files with 23 additions and 20 deletions

View file

@ -45,7 +45,7 @@ export function Popover({
onClose: () => void;
/** The element the popover hangs under. A click on it is not an outside
* click, so its own toggle handler stays in charge of closing. */
anchorRef: RefObject<HTMLElement>;
anchorRef: RefObject<HTMLElement | null>;
/** `aria-label` for the floating box. */
label: string;
children: ComponentChildren;

View file

@ -29,7 +29,7 @@ export function TextField({
label: string;
value: string;
onInput: (value: string) => void;
type?: string;
type?: "text" | "password" | "number" | "url" | "datetime-local";
pattern?: string;
title?: string;
required?: boolean;
@ -46,7 +46,10 @@ export function TextField({
<input
id={id}
class="ui-form-control"
type={type}
// preact 11 types `type` as a union that ties each kind to its own
// `list` and `role` attributes; the field takes any of its kinds and
// passes `list` only for suggestions, so the union is asserted here.
type={type as "text"}
value={value}
pattern={pattern}
title={title}