bits-ui 1.0.0-next.25 → 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.
@@ -358,17 +358,13 @@ class ScrollAreaScrollbarXState {
358
358
  if (!this.ref.current)
359
359
  return;
360
360
  if (this.#mounted.current) {
361
- afterTick(() => {
362
- this.computedStyle = getComputedStyle(this.ref.current);
363
- });
361
+ this.computedStyle = getComputedStyle(this.ref.current);
364
362
  }
365
363
  });
366
364
  $effect(() => {
367
365
  // Ensure when a user scrolls down and then the scrollbar is hidden
368
366
  // that when it shows again it will be positioned correctly.
369
- afterTick(() => {
370
- this.onResize();
371
- });
367
+ this.onResize();
372
368
  });
373
369
  }
374
370
  onThumbPointerDown = (pointerPos) => {
@@ -449,17 +445,13 @@ class ScrollAreaScrollbarYState {
449
445
  if (!this.ref.current)
450
446
  return;
451
447
  if (this.#mounted.current) {
452
- afterTick(() => {
453
- this.computedStyle = getComputedStyle(this.ref.current);
454
- });
448
+ this.computedStyle = getComputedStyle(this.ref.current);
455
449
  }
456
450
  });
457
451
  $effect(() => {
458
452
  // Ensure when a user scrolls down and then the scrollbar is hidden
459
453
  // that when it shows again it will be positioned correctly.
460
- afterTick(() => {
461
- this.onResize();
462
- });
454
+ this.onResize();
463
455
  });
464
456
  }
465
457
  onThumbPointerDown = (pointerPos) => {
@@ -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.25",
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",