@blocknote/ariakit 0.46.2 → 0.47.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.
@@ -25,6 +25,7 @@ export const TextInput = forwardRef<
25
25
  onChange,
26
26
  onSubmit,
27
27
  autoComplete,
28
+ "aria-activedescendant": ariaActivedescendant,
28
29
  rightSection,
29
30
  ...rest
30
31
  } = props;
@@ -52,6 +53,7 @@ export const TextInput = forwardRef<
52
53
  onChange={onChange}
53
54
  onSubmit={onSubmit}
54
55
  autoComplete={autoComplete}
56
+ aria-activedescendant={ariaActivedescendant}
55
57
  />
56
58
  {rightSection}
57
59
  </div>
@@ -22,10 +22,9 @@ export const SuggestionMenuItem = forwardRef<
22
22
  itemRef.current.closest(".bn-suggestion-menu, #ai-suggestion-menu")!,
23
23
  );
24
24
 
25
- if (overflow === "top") {
26
- itemRef.current.scrollIntoView(true);
27
- } else if (overflow === "bottom") {
28
- itemRef.current.scrollIntoView(false);
25
+
26
+ if (overflow !== "none") {
27
+ itemRef.current.scrollIntoView({ block: "nearest" });
29
28
  }
30
29
  }, [isSelected]);
31
30
 
@@ -22,10 +22,9 @@ export const GridSuggestionMenuItem = forwardRef<
22
22
  itemRef.current.closest(".bn-grid-suggestion-menu")!,
23
23
  );
24
24
 
25
- if (overflow === "top") {
26
- itemRef.current.scrollIntoView(true);
27
- } else if (overflow === "bottom") {
28
- itemRef.current.scrollIntoView(false);
25
+
26
+ if (overflow !== "none") {
27
+ itemRef.current.scrollIntoView({ block: "nearest" });
29
28
  }
30
29
  }, [isSelected]);
31
30
 
@@ -1,4 +1,4 @@
1
- export declare const TextInput: import("react").ForwardRefExoticComponent<{
1
+ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<{
2
2
  className?: string;
3
3
  name: string;
4
4
  label?: string;
@@ -13,4 +13,6 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<{
13
13
  onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
14
14
  onSubmit?: () => void;
15
15
  autoComplete?: import("react").HTMLInputAutoCompleteAttribute;
16
- } & import("react").RefAttributes<HTMLInputElement>>;
16
+ "aria-activedescendant"?: string;
17
+ ref?: import("react").ForwardedRef<HTMLInputElement>;
18
+ }, "ref"> & import("react").RefAttributes<HTMLInputElement>>;