bits-ui 2.6.0 → 2.6.2

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.
@@ -85,6 +85,7 @@ declare class TabsContentState {
85
85
  readonly "data-value": string;
86
86
  readonly "data-state": "active" | "inactive";
87
87
  readonly "aria-labelledby": string | undefined;
88
+ readonly "data-orientation": "horizontal" | "vertical";
88
89
  };
89
90
  }
90
91
  export declare function useTabsRoot(props: TabsRootStateProps): TabsRootState;
@@ -159,6 +159,7 @@ class TabsContentState {
159
159
  "data-value": this.opts.value.current,
160
160
  "data-state": getTabDataState(this.#isActive),
161
161
  "aria-labelledby": this.#ariaLabelledBy,
162
+ "data-orientation": getDataOrientation(this.root.opts.orientation.current),
162
163
  [tabsAttrs.content]: "",
163
164
  ...attachRef(this.opts.ref),
164
165
  }));
@@ -2,7 +2,7 @@ export type ScrollLockProps = {
2
2
  /**
3
3
  * Whether to prevent body scrolling when the content is open.
4
4
  *
5
- * @defaultValue true
5
+ * @default true
6
6
  */
7
7
  preventScroll?: boolean;
8
8
  /**
@@ -12,7 +12,7 @@ export type ScrollLockProps = {
12
12
  * greater than the transition duration to prevent content from shifting during
13
13
  * the transition.
14
14
  *
15
- * @defaultValue null
15
+ * @default null
16
16
  */
17
17
  restoreScrollDelay?: number | null;
18
18
  };
@@ -4,5 +4,7 @@
4
4
 
5
5
  let { preventScroll = true, restoreScrollDelay = null }: ScrollLockProps = $props();
6
6
 
7
- useBodyScrollLock(preventScroll, () => restoreScrollDelay);
7
+ if (preventScroll) {
8
+ useBodyScrollLock(preventScroll, () => restoreScrollDelay);
9
+ }
8
10
  </script>
@@ -16,7 +16,9 @@ export function useFloating(options) {
16
16
  let x = $state(0);
17
17
  let y = $state(0);
18
18
  const floating = box(null);
19
+ // svelte-ignore state_referenced_locally
19
20
  let strategy = $state(strategyOption);
21
+ // svelte-ignore state_referenced_locally
20
22
  let placement = $state(placementOption);
21
23
  let middlewareData = $state({});
22
24
  let isPositioned = $state(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",