bits-ui 2.11.4 → 2.11.6

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.
@@ -70,7 +70,6 @@ export declare class MenuContentState {
70
70
  onItemEnter(): boolean;
71
71
  onItemLeave(e: BitsPointerEvent): void;
72
72
  onTriggerLeave(): boolean;
73
- onOpenAutoFocus: (e: Event) => void;
74
73
  handleInteractOutside(e: PointerEvent): void;
75
74
  readonly snippetProps: {
76
75
  open: boolean;
@@ -182,6 +182,7 @@ export class MenuContentState {
182
182
  if (e.defaultPrevented || this.#isSub)
183
183
  return;
184
184
  if (this.parentMenu.triggerNode && isTabbable(this.parentMenu.triggerNode)) {
185
+ e.preventDefault();
185
186
  this.parentMenu.triggerNode.focus();
186
187
  }
187
188
  };
@@ -293,13 +294,6 @@ export class MenuContentState {
293
294
  return true;
294
295
  return false;
295
296
  }
296
- onOpenAutoFocus = (e) => {
297
- if (e.defaultPrevented)
298
- return;
299
- e.preventDefault();
300
- const contentNode = this.parentMenu.contentNode;
301
- contentNode?.focus();
302
- };
303
297
  handleInteractOutside(e) {
304
298
  if (!isElementOrSVGElement(e.target))
305
299
  return;
@@ -5,7 +5,7 @@
5
5
  import HiddenInput from "../../utilities/hidden-input.svelte";
6
6
 
7
7
  let {
8
- value = $bindable(""),
8
+ value = $bindable(),
9
9
  autocomplete,
10
10
  }: { value?: string } & Omit<HTMLInputAttributes, "value"> = $props();
11
11
 
@@ -304,7 +304,7 @@ export declare class SelectGroupHeadingState {
304
304
  };
305
305
  }
306
306
  interface SelectHiddenInputStateOpts extends ReadableBoxedValues<{
307
- value: string;
307
+ value: string | undefined;
308
308
  }> {
309
309
  }
310
310
  export declare class SelectHiddenInputState {
@@ -318,7 +318,7 @@ export declare class SelectHiddenInputState {
318
318
  readonly disabled: true | undefined;
319
319
  readonly required: true | undefined;
320
320
  readonly name: string;
321
- readonly value: string;
321
+ readonly value: string | undefined;
322
322
  readonly onfocus: (e: BitsFocusEvent) => void;
323
323
  };
324
324
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.11.4",
3
+ "version": "2.11.6",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",