@radix-ui/react-slider 1.2.0-rc.2 → 1.2.0-rc.4

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