@lenso/primitives 0.4.0 → 0.6.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import * as stylex from "@stylexjs/stylex";
|
|
2
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
4
|
export type ResizeHandleOrientation = "horizontal" | "vertical";
|
|
4
5
|
export type ResizeHandleChangeReason = "keyboard" | "pointer";
|
|
@@ -20,7 +21,6 @@ export type ResizeHandleProps = ResizeHandleElementProps & {
|
|
|
20
21
|
"aria-label"?: string;
|
|
21
22
|
"aria-labelledby"?: string;
|
|
22
23
|
"aria-controls": string;
|
|
23
|
-
className?: string | ((state: ResizeHandleState) => string | undefined);
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
inverted?: boolean;
|
|
26
26
|
max: number;
|
|
@@ -32,6 +32,7 @@ export type ResizeHandleProps = ResizeHandleElementProps & {
|
|
|
32
32
|
ref?: React.Ref<HTMLElement>;
|
|
33
33
|
step?: number;
|
|
34
34
|
value: number;
|
|
35
|
+
xstyle?: stylex.StyleXStyles;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
38
|
* A layout-independent, focusable window splitter.
|
|
@@ -39,5 +40,5 @@ export type ResizeHandleProps = ResizeHandleElementProps & {
|
|
|
39
40
|
* Consumers own pane layout and persistence. The handle owns pointer capture,
|
|
40
41
|
* keyboard adjustment, bounded values, and WAI-ARIA separator semantics.
|
|
41
42
|
*/
|
|
42
|
-
export declare function ResizeHandle({
|
|
43
|
+
export declare function ResizeHandle({ disabled, inverted, max, min, onCollapseToggle, onValueChange, onValueCommit, orientation, ref, render, step, value, xstyle, ...props }: ResizeHandleProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
43
44
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import * as stylex from "@stylexjs/stylex";
|
|
3
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
6
|
//#region src/resize-handle/index.tsx
|
|
@@ -15,7 +16,7 @@ function coordinate(event, orientation) {
|
|
|
15
16
|
* Consumers own pane layout and persistence. The handle owns pointer capture,
|
|
16
17
|
* keyboard adjustment, bounded values, and WAI-ARIA separator semantics.
|
|
17
18
|
*/
|
|
18
|
-
function ResizeHandle({
|
|
19
|
+
function ResizeHandle({ disabled = false, inverted = false, max, min, onCollapseToggle, onValueChange, onValueCommit, orientation = "vertical", ref, render, step = 16, value, xstyle, ...props }) {
|
|
19
20
|
const elementRef = React.useRef(null);
|
|
20
21
|
const dragRef = React.useRef(null);
|
|
21
22
|
const restoreDocumentRef = React.useRef(null);
|
|
@@ -161,7 +162,7 @@ function ResizeHandle({ className, disabled = false, inverted = false, max, min,
|
|
|
161
162
|
defaultTagName: "div",
|
|
162
163
|
props: {
|
|
163
164
|
...mergeProps(internalProps, props, protectedProps),
|
|
164
|
-
className:
|
|
165
|
+
className: stylex.props(xstyle).className,
|
|
165
166
|
"data-slot": "resize-handle"
|
|
166
167
|
},
|
|
167
168
|
ref: ref ? [elementRef, ref] : elementRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lenso/primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Headless product primitives for Lenso UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@base-ui/react": ">=1.7.0 <2.0.0",
|
|
46
|
+
"@stylexjs/stylex": ">=0.19.0 <1.0.0",
|
|
46
47
|
"react": ">=19.2.0 <20.0.0"
|
|
47
48
|
},
|
|
48
49
|
"scripts": {
|