bits-ui 2.8.11 → 2.8.12

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.
@@ -62,7 +62,7 @@ export declare class CheckboxRootState {
62
62
  readonly attachment: RefAttachment;
63
63
  constructor(opts: CheckboxRootStateOpts, group: CheckboxGroupState | null);
64
64
  onkeydown(e: BitsKeyboardEvent): void;
65
- onclick(_: BitsMouseEvent): void;
65
+ onclick(e: BitsMouseEvent): void;
66
66
  readonly snippetProps: {
67
67
  checked: boolean;
68
68
  indeterminate: boolean;
@@ -76,7 +76,7 @@ export declare class CheckboxRootState {
76
76
  readonly "aria-required": "true" | "false";
77
77
  readonly "data-disabled": "" | undefined;
78
78
  readonly "data-state": "checked" | "indeterminate" | "unchecked";
79
- readonly onclick: (_: BitsMouseEvent) => void;
79
+ readonly onclick: (e: BitsMouseEvent) => void;
80
80
  readonly onkeydown: (e: BitsKeyboardEvent) => void;
81
81
  };
82
82
  }
@@ -143,9 +143,10 @@ export class CheckboxRootState {
143
143
  this.opts.checked.current = !this.opts.checked.current;
144
144
  }
145
145
  }
146
- onclick(_) {
146
+ onclick(e) {
147
147
  if (this.opts.disabled.current)
148
148
  return;
149
+ e.preventDefault();
149
150
  this.#toggle();
150
151
  }
151
152
  snippetProps = $derived.by(() => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.8.11",
3
+ "version": "2.8.12",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",