@radix-ui/react-slider 1.1.2 → 1.2.0-rc.10
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 +31 -19
- package/dist/index.d.ts +31 -19
- package/dist/index.js +526 -580
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +495 -566
- package/dist/index.mjs.map +7 -1
- package/package.json +16 -16
- package/dist/index.d.ts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
|
+
|
|
4
|
+
type Scope<C = any> = {
|
|
5
|
+
[scopeName: string]: React.Context<C>[];
|
|
6
|
+
} | undefined;
|
|
7
|
+
type ScopeHook = (scope: Scope) => {
|
|
8
|
+
[__scopeProp: string]: Scope;
|
|
9
|
+
};
|
|
10
|
+
interface CreateScope {
|
|
11
|
+
scopeName: string;
|
|
12
|
+
(): ScopeHook;
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
type Direction = 'ltr' | 'rtl';
|
|
5
|
-
|
|
6
|
-
|
|
16
|
+
declare const createSliderScope: CreateScope;
|
|
17
|
+
interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
|
|
7
18
|
name?: string;
|
|
8
19
|
disabled?: boolean;
|
|
9
20
|
orientation?: React.AriaAttributes['aria-orientation'];
|
|
@@ -18,7 +29,7 @@ export interface SliderProps extends Omit<SliderHorizontalProps | SliderVertical
|
|
|
18
29
|
onValueCommit?(value: number[]): void;
|
|
19
30
|
inverted?: boolean;
|
|
20
31
|
}
|
|
21
|
-
|
|
32
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
22
33
|
type SliderOrientationPrivateProps = {
|
|
23
34
|
min: number;
|
|
24
35
|
max: number;
|
|
@@ -40,7 +51,7 @@ interface SliderHorizontalProps extends SliderOrientationProps {
|
|
|
40
51
|
}
|
|
41
52
|
interface SliderVerticalProps extends SliderOrientationProps {
|
|
42
53
|
}
|
|
43
|
-
type PrimitiveDivProps =
|
|
54
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
44
55
|
type SliderImplPrivateProps = {
|
|
45
56
|
onSlideStart(event: React.PointerEvent): void;
|
|
46
57
|
onSlideMove(event: React.PointerEvent): void;
|
|
@@ -51,22 +62,23 @@ type SliderImplPrivateProps = {
|
|
|
51
62
|
};
|
|
52
63
|
interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {
|
|
53
64
|
}
|
|
54
|
-
type PrimitiveSpanProps =
|
|
55
|
-
|
|
65
|
+
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
66
|
+
interface SliderTrackProps extends PrimitiveSpanProps {
|
|
56
67
|
}
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|
|
69
|
+
interface SliderRangeProps extends PrimitiveSpanProps {
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
declare const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
72
|
+
interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
|
|
62
73
|
}
|
|
63
|
-
|
|
74
|
+
declare const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
|
|
64
75
|
interface SliderThumbImplProps extends PrimitiveSpanProps {
|
|
65
76
|
index: number;
|
|
77
|
+
name?: string;
|
|
66
78
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
declare const Root: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
80
|
+
declare const Track: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|
|
81
|
+
declare const Range: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
82
|
+
declare const Thumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
|
|
71
83
|
|
|
72
|
-
|
|
84
|
+
export { Range, Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Thumb, Track, createSliderScope };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
|
+
|
|
4
|
+
type Scope<C = any> = {
|
|
5
|
+
[scopeName: string]: React.Context<C>[];
|
|
6
|
+
} | undefined;
|
|
7
|
+
type ScopeHook = (scope: Scope) => {
|
|
8
|
+
[__scopeProp: string]: Scope;
|
|
9
|
+
};
|
|
10
|
+
interface CreateScope {
|
|
11
|
+
scopeName: string;
|
|
12
|
+
(): ScopeHook;
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
type Direction = 'ltr' | 'rtl';
|
|
5
|
-
|
|
6
|
-
|
|
16
|
+
declare const createSliderScope: CreateScope;
|
|
17
|
+
interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
|
|
7
18
|
name?: string;
|
|
8
19
|
disabled?: boolean;
|
|
9
20
|
orientation?: React.AriaAttributes['aria-orientation'];
|
|
@@ -18,7 +29,7 @@ export interface SliderProps extends Omit<SliderHorizontalProps | SliderVertical
|
|
|
18
29
|
onValueCommit?(value: number[]): void;
|
|
19
30
|
inverted?: boolean;
|
|
20
31
|
}
|
|
21
|
-
|
|
32
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
22
33
|
type SliderOrientationPrivateProps = {
|
|
23
34
|
min: number;
|
|
24
35
|
max: number;
|
|
@@ -40,7 +51,7 @@ interface SliderHorizontalProps extends SliderOrientationProps {
|
|
|
40
51
|
}
|
|
41
52
|
interface SliderVerticalProps extends SliderOrientationProps {
|
|
42
53
|
}
|
|
43
|
-
type PrimitiveDivProps =
|
|
54
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
44
55
|
type SliderImplPrivateProps = {
|
|
45
56
|
onSlideStart(event: React.PointerEvent): void;
|
|
46
57
|
onSlideMove(event: React.PointerEvent): void;
|
|
@@ -51,22 +62,23 @@ type SliderImplPrivateProps = {
|
|
|
51
62
|
};
|
|
52
63
|
interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {
|
|
53
64
|
}
|
|
54
|
-
type PrimitiveSpanProps =
|
|
55
|
-
|
|
65
|
+
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
66
|
+
interface SliderTrackProps extends PrimitiveSpanProps {
|
|
56
67
|
}
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|
|
69
|
+
interface SliderRangeProps extends PrimitiveSpanProps {
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
declare const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
72
|
+
interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
|
|
62
73
|
}
|
|
63
|
-
|
|
74
|
+
declare const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
|
|
64
75
|
interface SliderThumbImplProps extends PrimitiveSpanProps {
|
|
65
76
|
index: number;
|
|
77
|
+
name?: string;
|
|
66
78
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
declare const Root: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
80
|
+
declare const Track: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
|
|
81
|
+
declare const Range: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
82
|
+
declare const Thumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
|
|
71
83
|
|
|
72
|
-
|
|
84
|
+
export { Range, Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Thumb, Track, createSliderScope };
|