@radix-ui/react-slider 1.2.0-rc.5 → 1.2.0-rc.7
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/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +556 -544
- package/dist/index.js.map +3 -3
- package/dist/index.mjs.map +2 -2
- package/package.json +14 -14
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
3
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
type Scope<C = any> = {
|
|
6
5
|
[scopeName: string]: React.Context<C>[];
|
|
7
6
|
} | undefined;
|
|
8
|
-
|
|
7
|
+
type ScopeHook = (scope: Scope) => {
|
|
9
8
|
[__scopeProp: string]: Scope;
|
|
10
9
|
};
|
|
11
10
|
interface CreateScope {
|
|
@@ -13,7 +12,7 @@ interface CreateScope {
|
|
|
13
12
|
(): ScopeHook;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
type Direction = 'ltr' | 'rtl';
|
|
17
16
|
declare const createSliderScope: CreateScope;
|
|
18
17
|
interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
|
|
19
18
|
name?: string;
|
|
@@ -31,7 +30,7 @@ interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps,
|
|
|
31
30
|
inverted?: boolean;
|
|
32
31
|
}
|
|
33
32
|
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
34
|
-
|
|
33
|
+
type SliderOrientationPrivateProps = {
|
|
35
34
|
min: number;
|
|
36
35
|
max: number;
|
|
37
36
|
inverted: boolean;
|
|
@@ -52,8 +51,8 @@ interface SliderHorizontalProps extends SliderOrientationProps {
|
|
|
52
51
|
}
|
|
53
52
|
interface SliderVerticalProps extends SliderOrientationProps {
|
|
54
53
|
}
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
55
|
+
type SliderImplPrivateProps = {
|
|
57
56
|
onSlideStart(event: React.PointerEvent): void;
|
|
58
57
|
onSlideMove(event: React.PointerEvent): void;
|
|
59
58
|
onSlideEnd(event: React.PointerEvent): void;
|
|
@@ -63,7 +62,7 @@ declare type SliderImplPrivateProps = {
|
|
|
63
62
|
};
|
|
64
63
|
interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {
|
|
65
64
|
}
|
|
66
|
-
|
|
65
|
+
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
67
66
|
interface SliderTrackProps extends PrimitiveSpanProps {
|
|
68
67
|
}
|
|
69
68
|
declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
3
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
type Scope<C = any> = {
|
|
6
5
|
[scopeName: string]: React.Context<C>[];
|
|
7
6
|
} | undefined;
|
|
8
|
-
|
|
7
|
+
type ScopeHook = (scope: Scope) => {
|
|
9
8
|
[__scopeProp: string]: Scope;
|
|
10
9
|
};
|
|
11
10
|
interface CreateScope {
|
|
@@ -13,7 +12,7 @@ interface CreateScope {
|
|
|
13
12
|
(): ScopeHook;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
type Direction = 'ltr' | 'rtl';
|
|
17
16
|
declare const createSliderScope: CreateScope;
|
|
18
17
|
interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
|
|
19
18
|
name?: string;
|
|
@@ -31,7 +30,7 @@ interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps,
|
|
|
31
30
|
inverted?: boolean;
|
|
32
31
|
}
|
|
33
32
|
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
34
|
-
|
|
33
|
+
type SliderOrientationPrivateProps = {
|
|
35
34
|
min: number;
|
|
36
35
|
max: number;
|
|
37
36
|
inverted: boolean;
|
|
@@ -52,8 +51,8 @@ interface SliderHorizontalProps extends SliderOrientationProps {
|
|
|
52
51
|
}
|
|
53
52
|
interface SliderVerticalProps extends SliderOrientationProps {
|
|
54
53
|
}
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
55
|
+
type SliderImplPrivateProps = {
|
|
57
56
|
onSlideStart(event: React.PointerEvent): void;
|
|
58
57
|
onSlideMove(event: React.PointerEvent): void;
|
|
59
58
|
onSlideEnd(event: React.PointerEvent): void;
|
|
@@ -63,7 +62,7 @@ declare type SliderImplPrivateProps = {
|
|
|
63
62
|
};
|
|
64
63
|
interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {
|
|
65
64
|
}
|
|
66
|
-
|
|
65
|
+
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
67
66
|
interface SliderTrackProps extends PrimitiveSpanProps {
|
|
68
67
|
}
|
|
69
68
|
declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|