@wix/site-ui 1.354.0 → 1.355.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 +1 -1
- package/dist/DirectionProvider/index.d.ts +30 -0
- package/dist/DirectionProvider/index.js +17 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/dist/6534.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "1.355.0",
|
|
4
4
|
"description": "Pure UI components for the Wix site builder",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"registry": "https://registry.npmjs.org/",
|
|
96
96
|
"access": "public"
|
|
97
97
|
},
|
|
98
|
-
"falconPackageHash": "
|
|
98
|
+
"falconPackageHash": "9ac45e039b2da9367a821d7eb970eac9e0dd12a674d261ca162f86d7"
|
|
99
99
|
}
|