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

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.
@@ -153,9 +153,8 @@ declare class CommandItemState {
153
153
  readonly "data-selected": "" | undefined;
154
154
  readonly "data-command-item": "";
155
155
  readonly role: "option";
156
- readonly onpointerdown: (e: PointerEvent) => void;
157
156
  readonly onpointermove: () => void;
158
- readonly onpointerup: (e: PointerEvent) => void;
157
+ readonly onclick: () => void;
159
158
  };
160
159
  }
161
160
  type CommandLoadingStateProps = WithRefProps<ReadableBoxedValues<{
@@ -236,7 +236,7 @@ class CommandRootState {
236
236
  if (!grandparent)
237
237
  return;
238
238
  const firstChildOfParent = getFirstNonCommentChild(grandparent);
239
- if (firstChildOfParent && firstChildOfParent.dataset.value === item.dataset.value) {
239
+ if (firstChildOfParent && firstChildOfParent.dataset?.value === item.dataset?.value) {
240
240
  item
241
241
  ?.closest(GROUP_SELECTOR)
242
242
  ?.querySelector(GROUP_HEADING_SELECTOR)
@@ -696,21 +696,11 @@ class CommandItemState {
696
696
  return;
697
697
  this.#select();
698
698
  };
699
- #onpointerdown = (e) => {
699
+ #onclick = () => {
700
700
  if (this.#disabled.current)
701
701
  return;
702
- if (e.pointerType === "touch" || e.button !== 0)
703
- return e.preventDefault();
704
702
  this.#onSelect();
705
703
  };
706
- #onpointerup = (e) => {
707
- if (this.#disabled.current)
708
- return;
709
- if (e.pointerType === "touch") {
710
- e.preventDefault();
711
- this.#onSelect();
712
- }
713
- };
714
704
  props = $derived.by(() => ({
715
705
  id: this.id.current,
716
706
  "aria-disabled": getAriaDisabled(this.#disabled.current),
@@ -719,9 +709,8 @@ class CommandItemState {
719
709
  "data-selected": getDataSelected(this.isSelected),
720
710
  [ITEM_ATTR]: "",
721
711
  role: "option",
722
- onpointerdown: this.#onpointerdown,
723
712
  onpointermove: this.#onpointermove,
724
- onpointerup: this.#onpointerup,
713
+ onclick: this.#onclick,
725
714
  }));
726
715
  }
727
716
  class CommandLoadingState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "1.0.0-next.27",
3
+ "version": "1.0.0-next.28",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",