@wix/site-ui 1.354.0 → 1.356.0

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.
package/dist/6534.js CHANGED
@@ -5,4 +5,4 @@ function useDirection() {
5
5
  const context = __rspack_external_react.useContext(DirectionContext);
6
6
  return context?.direction ?? 'ltr';
7
7
  }
8
- export { useDirection };
8
+ export { DirectionContext, useDirection };
@@ -0,0 +1,30 @@
1
+ import * as React_2 from 'react';
2
+
3
+ /**
4
+ * Enables RTL behavior for Base UI components.
5
+ *
6
+ * Documentation: [Base UI Direction Provider](https://base-ui.com/react/utils/direction-provider)
7
+ */
8
+ export declare const DirectionProvider: React_2.FC<DirectionProvider.Props>;
9
+
10
+ export declare namespace DirectionProvider {
11
+ export type State = DirectionProviderState;
12
+ export type Props = DirectionProviderProps;
13
+ }
14
+
15
+ export declare interface DirectionProviderProps {
16
+ children?: React_2.ReactNode;
17
+ /**
18
+ * The reading direction of the text
19
+ * @default 'ltr'
20
+ */
21
+ direction?: TextDirection | undefined;
22
+ }
23
+
24
+ declare interface DirectionProviderState {}
25
+
26
+ export declare type TextDirection = 'ltr' | 'rtl';
27
+
28
+ export declare function useDirection(): TextDirection;
29
+
30
+ export { }
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { DirectionContext } from "../6534.js";
3
+ import * as __rspack_external_react from "react";
4
+ const DirectionProvider_DirectionProvider = function(props) {
5
+ const { direction = 'ltr' } = props;
6
+ const contextValue = __rspack_external_react.useMemo(()=>({
7
+ direction
8
+ }), [
9
+ direction
10
+ ]);
11
+ return /*#__PURE__*/ jsx(DirectionContext.Provider, {
12
+ value: contextValue,
13
+ children: props.children
14
+ });
15
+ };
16
+ if ("production" !== process.env.NODE_ENV) DirectionProvider_DirectionProvider.displayName = "DirectionProvider";
17
+ export { DirectionProvider_DirectionProvider as DirectionProvider };
package/dist/index.d.ts CHANGED
@@ -5506,6 +5506,29 @@ declare const direction = "data-direction";
5506
5506
  */
5507
5507
  declare const direction_2 = "data-direction";
5508
5508
 
5509
+ /**
5510
+ * Enables RTL behavior for Base UI components.
5511
+ *
5512
+ * Documentation: [Base UI Direction Provider](https://base-ui.com/react/utils/direction-provider)
5513
+ */
5514
+ export declare const DirectionProvider: React_2.FC<DirectionProvider.Props>;
5515
+
5516
+ export declare namespace DirectionProvider {
5517
+ export type State = DirectionProviderState;
5518
+ export type Props = DirectionProviderProps;
5519
+ }
5520
+
5521
+ export declare interface DirectionProviderProps {
5522
+ children?: React_2.ReactNode;
5523
+ /**
5524
+ * The reading direction of the text
5525
+ * @default 'ltr'
5526
+ */
5527
+ direction?: TextDirection | undefined;
5528
+ }
5529
+
5530
+ declare interface DirectionProviderState {}
5531
+
5509
5532
  /**
5510
5533
  * Present when the component's value has changed (when wrapped in Field.Root).
5511
5534
  */
@@ -19387,6 +19410,8 @@ export declare interface TabsTabState {
19387
19410
 
19388
19411
  export declare type TabsTabValue = any | null;
19389
19412
 
19413
+ export declare type TextDirection = 'ltr' | 'rtl';
19414
+
19390
19415
  export declare interface ThumbMetadata {
19391
19416
  inputId: string | undefined;
19392
19417
  }
@@ -21486,6 +21511,8 @@ declare function useComboboxFilter(options?: ComboboxFilterOptions): Filter;
21486
21511
  */
21487
21512
  declare const useCoreFilter: typeof getFilter;
21488
21513
 
21514
+ export declare function useDirection(): TextDirection;
21515
+
21489
21516
  /**
21490
21517
  * Returns the internally filtered items.
21491
21518
  * Treat the result as read-only: it is internal state and may be a shared frozen array.
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ export { Collapsible } from "./Collapsible/index.js";
14
14
  export { Combobox } from "./Combobox/index.js";
15
15
  export { ContextMenu } from "./ContextMenu/index.js";
16
16
  export { Dialog } from "./Dialog/index.js";
17
+ export { DirectionProvider } from "./DirectionProvider/index.js";
17
18
  export { Drawer } from "./Drawer/index.js";
18
19
  export { Field } from "./Field/index.js";
19
20
  export { Fieldset } from "./Fieldset/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-ui",
3
- "version": "1.354.0",
3
+ "version": "1.356.0",
4
4
  "description": "Pure UI components for the Wix site builder",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
39
39
  "build-storybook": "NODE_OPTIONS=--max-old-space-size=8192 storybook build"
40
40
  },
41
41
  "dependencies": {
42
- "@wix/wix-ui-icons-common": "^3.173.0",
42
+ "@wix/wix-ui-icons-common": "^3.195.0",
43
43
  "clsx": "2.0.0"
44
44
  },
45
45
  "peerDependencies": {
@@ -95,5 +95,5 @@
95
95
  "registry": "https://registry.npmjs.org/",
96
96
  "access": "public"
97
97
  },
98
- "falconPackageHash": "f15a7ac772436725c2571b48b0217465c66e0adb1932229bbe7e1568"
98
+ "falconPackageHash": "f5eadc1653fc40ab24bf0f418641ccd0d86d53331c45b4d9d2ffb725"
99
99
  }