@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 CHANGED
@@ -1,9 +1,20 @@
1
- import * as React from "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
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
- export const createSliderScope: import("@radix-ui/react-context").CreateScope;
6
- export interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
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
- export const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
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 = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
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 = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
55
- export interface SliderTrackProps extends PrimitiveSpanProps {
65
+ type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
66
+ interface SliderTrackProps extends PrimitiveSpanProps {
56
67
  }
57
- export const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
58
- export interface SliderRangeProps extends PrimitiveSpanProps {
68
+ declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
69
+ interface SliderRangeProps extends PrimitiveSpanProps {
59
70
  }
60
- export const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
61
- export interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
71
+ declare const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
72
+ interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
62
73
  }
63
- export const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
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
- export const Root: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
68
- export const Track: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
69
- export const Range: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
70
- export const Thumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
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
- //# sourceMappingURL=index.d.ts.map
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 "react";
2
- import * as Radix from "@radix-ui/react-primitive";
3
- import { Primitive } from "@radix-ui/react-primitive";
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
- export const createSliderScope: import("@radix-ui/react-context").CreateScope;
6
- export interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
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
- export const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
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 = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
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 = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
55
- export interface SliderTrackProps extends PrimitiveSpanProps {
65
+ type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
66
+ interface SliderTrackProps extends PrimitiveSpanProps {
56
67
  }
57
- export const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
58
- export interface SliderRangeProps extends PrimitiveSpanProps {
68
+ declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
69
+ interface SliderRangeProps extends PrimitiveSpanProps {
59
70
  }
60
- export const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
61
- export interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
71
+ declare const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
72
+ interface SliderThumbProps extends Omit<SliderThumbImplProps, 'index'> {
62
73
  }
63
- export const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
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
- export const Root: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
68
- export const Track: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
69
- export const Range: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
70
- export const Thumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
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
- //# sourceMappingURL=index.d.ts.map
84
+ export { Range, Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Thumb, Track, createSliderScope };