bits-ui 1.0.0-next.26 → 1.0.0-next.27

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.
@@ -82,8 +82,7 @@ declare class ToolbarGroupItemState {
82
82
  readonly "data-toolbar-item": "";
83
83
  readonly "data-toolbar-group-item": "";
84
84
  readonly disabled: true | undefined;
85
- readonly onpointerdown: (e: PointerEvent) => void;
86
- readonly onpointerup: (e: PointerEvent) => void;
85
+ readonly onclick: () => void;
87
86
  readonly onkeydown: (e: KeyboardEvent) => void;
88
87
  };
89
88
  }
@@ -133,21 +133,11 @@ class ToolbarGroupItemState {
133
133
  return;
134
134
  this.#group.toggleItem(this.#value.current);
135
135
  };
136
- #onpointerdown = (e) => {
136
+ #onclick = () => {
137
137
  if (this.#isDisabled)
138
138
  return;
139
- if (e.pointerType === "touch" || e.button !== 0)
140
- return e.preventDefault();
141
139
  this.toggleItem();
142
140
  };
143
- #onpointerup = (e) => {
144
- if (this.#isDisabled)
145
- return;
146
- if (e.pointerType === "touch") {
147
- e.preventDefault();
148
- this.toggleItem();
149
- }
150
- };
151
141
  #onkeydown = (e) => {
152
142
  if (this.#isDisabled)
153
143
  return;
@@ -180,8 +170,7 @@ class ToolbarGroupItemState {
180
170
  [GROUP_ITEM_ATTR]: "",
181
171
  disabled: getDisabled(this.#isDisabled),
182
172
  //
183
- onpointerdown: this.#onpointerdown,
184
- onpointerup: this.#onpointerup,
173
+ onclick: this.#onclick,
185
174
  onkeydown: this.#onkeydown,
186
175
  }));
187
176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "1.0.0-next.26",
3
+ "version": "1.0.0-next.27",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",