@zag-js/slider 0.49.0 → 0.51.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.
- package/dist/index.d.mts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +1 -872
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -853
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/slider.connect.ts +15 -15
- package/src/slider.machine.ts +13 -32
- package/src/slider.types.ts +10 -5
package/dist/index.d.mts
CHANGED
|
@@ -81,33 +81,43 @@ interface PublicContext extends DirectionProperty, CommonProperties {
|
|
|
81
81
|
getAriaValueText?(details: ValueTextDetails): string;
|
|
82
82
|
/**
|
|
83
83
|
* The minimum value of the slider
|
|
84
|
+
* @default 0
|
|
84
85
|
*/
|
|
85
86
|
min: number;
|
|
86
87
|
/**
|
|
87
88
|
* The maximum value of the slider
|
|
89
|
+
* @default 100
|
|
88
90
|
*/
|
|
89
91
|
max: number;
|
|
90
92
|
/**
|
|
91
93
|
* The step value of the slider
|
|
94
|
+
* @default 1
|
|
92
95
|
*/
|
|
93
96
|
step: number;
|
|
94
97
|
/**
|
|
95
98
|
* The minimum permitted steps between multiple thumbs.
|
|
99
|
+
* @default 0
|
|
96
100
|
*/
|
|
97
101
|
minStepsBetweenThumbs: number;
|
|
98
102
|
/**
|
|
99
103
|
* The orientation of the slider
|
|
104
|
+
* @default "horizontal"
|
|
100
105
|
*/
|
|
101
106
|
orientation: "vertical" | "horizontal";
|
|
102
107
|
/**
|
|
108
|
+
* The origin of the slider range
|
|
103
109
|
* - "start": Useful when the value represents an absolute value
|
|
104
110
|
* - "center": Useful when the value represents an offset (relative)
|
|
111
|
+
*
|
|
112
|
+
* @default "start"
|
|
105
113
|
*/
|
|
106
114
|
origin?: "start" | "center";
|
|
107
115
|
/**
|
|
108
116
|
* The alignment of the slider thumb relative to the track
|
|
109
117
|
* - `center`: the thumb will extend beyond the bounds of the slider track.
|
|
110
118
|
* - `contain`: the thumb will be contained within the bounds of the track.
|
|
119
|
+
*
|
|
120
|
+
* @default "contain"
|
|
111
121
|
*/
|
|
112
122
|
thumbAlignment?: "contain" | "center";
|
|
113
123
|
/**
|
|
@@ -130,11 +140,6 @@ type ComputedContext = Readonly<{
|
|
|
130
140
|
* Whether the slider is interactive
|
|
131
141
|
*/
|
|
132
142
|
isInteractive: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* @computed
|
|
135
|
-
* The raw value of the space between each thumb
|
|
136
|
-
*/
|
|
137
|
-
spacing: number;
|
|
138
143
|
/**
|
|
139
144
|
* @computed
|
|
140
145
|
* Whether the slider is vertical
|
|
@@ -254,8 +259,8 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
254
259
|
|
|
255
260
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
256
261
|
|
|
257
|
-
declare const props: ("invalid" | "value" | "
|
|
258
|
-
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "invalid" | "value" | "
|
|
262
|
+
declare const props: ("invalid" | "value" | "dir" | "id" | "getRootNode" | "form" | "name" | "disabled" | "step" | "aria-label" | "aria-labelledby" | "max" | "min" | "origin" | "orientation" | "ids" | "readOnly" | "onValueChange" | "onValueChangeEnd" | "onFocusChange" | "getAriaValueText" | "minStepsBetweenThumbs" | "thumbAlignment" | "thumbSize")[];
|
|
263
|
+
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "invalid" | "value" | "dir" | "id" | "getRootNode" | "form" | "name" | "disabled" | "step" | "aria-label" | "aria-labelledby" | "max" | "min" | "origin" | "orientation" | "ids" | "readOnly" | "onValueChange" | "onValueChangeEnd" | "onFocusChange" | "getAriaValueText" | "minStepsBetweenThumbs" | "thumbAlignment" | "thumbSize">];
|
|
259
264
|
declare const thumbProps: (keyof ThumbProps)[];
|
|
260
265
|
declare const splitThumbProps: <Props extends ThumbProps>(props: Props) => [ThumbProps, Omit<Props, keyof ThumbProps>];
|
|
261
266
|
|
package/dist/index.d.ts
CHANGED
|
@@ -81,33 +81,43 @@ interface PublicContext extends DirectionProperty, CommonProperties {
|
|
|
81
81
|
getAriaValueText?(details: ValueTextDetails): string;
|
|
82
82
|
/**
|
|
83
83
|
* The minimum value of the slider
|
|
84
|
+
* @default 0
|
|
84
85
|
*/
|
|
85
86
|
min: number;
|
|
86
87
|
/**
|
|
87
88
|
* The maximum value of the slider
|
|
89
|
+
* @default 100
|
|
88
90
|
*/
|
|
89
91
|
max: number;
|
|
90
92
|
/**
|
|
91
93
|
* The step value of the slider
|
|
94
|
+
* @default 1
|
|
92
95
|
*/
|
|
93
96
|
step: number;
|
|
94
97
|
/**
|
|
95
98
|
* The minimum permitted steps between multiple thumbs.
|
|
99
|
+
* @default 0
|
|
96
100
|
*/
|
|
97
101
|
minStepsBetweenThumbs: number;
|
|
98
102
|
/**
|
|
99
103
|
* The orientation of the slider
|
|
104
|
+
* @default "horizontal"
|
|
100
105
|
*/
|
|
101
106
|
orientation: "vertical" | "horizontal";
|
|
102
107
|
/**
|
|
108
|
+
* The origin of the slider range
|
|
103
109
|
* - "start": Useful when the value represents an absolute value
|
|
104
110
|
* - "center": Useful when the value represents an offset (relative)
|
|
111
|
+
*
|
|
112
|
+
* @default "start"
|
|
105
113
|
*/
|
|
106
114
|
origin?: "start" | "center";
|
|
107
115
|
/**
|
|
108
116
|
* The alignment of the slider thumb relative to the track
|
|
109
117
|
* - `center`: the thumb will extend beyond the bounds of the slider track.
|
|
110
118
|
* - `contain`: the thumb will be contained within the bounds of the track.
|
|
119
|
+
*
|
|
120
|
+
* @default "contain"
|
|
111
121
|
*/
|
|
112
122
|
thumbAlignment?: "contain" | "center";
|
|
113
123
|
/**
|
|
@@ -130,11 +140,6 @@ type ComputedContext = Readonly<{
|
|
|
130
140
|
* Whether the slider is interactive
|
|
131
141
|
*/
|
|
132
142
|
isInteractive: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* @computed
|
|
135
|
-
* The raw value of the space between each thumb
|
|
136
|
-
*/
|
|
137
|
-
spacing: number;
|
|
138
143
|
/**
|
|
139
144
|
* @computed
|
|
140
145
|
* Whether the slider is vertical
|
|
@@ -254,8 +259,8 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
254
259
|
|
|
255
260
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
256
261
|
|
|
257
|
-
declare const props: ("invalid" | "value" | "
|
|
258
|
-
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "invalid" | "value" | "
|
|
262
|
+
declare const props: ("invalid" | "value" | "dir" | "id" | "getRootNode" | "form" | "name" | "disabled" | "step" | "aria-label" | "aria-labelledby" | "max" | "min" | "origin" | "orientation" | "ids" | "readOnly" | "onValueChange" | "onValueChangeEnd" | "onFocusChange" | "getAriaValueText" | "minStepsBetweenThumbs" | "thumbAlignment" | "thumbSize")[];
|
|
263
|
+
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "invalid" | "value" | "dir" | "id" | "getRootNode" | "form" | "name" | "disabled" | "step" | "aria-label" | "aria-labelledby" | "max" | "min" | "origin" | "orientation" | "ids" | "readOnly" | "onValueChange" | "onValueChangeEnd" | "onFocusChange" | "getAriaValueText" | "minStepsBetweenThumbs" | "thumbAlignment" | "thumbSize">];
|
|
259
264
|
declare const thumbProps: (keyof ThumbProps)[];
|
|
260
265
|
declare const splitThumbProps: <Props extends ThumbProps>(props: Props) => [ThumbProps, Omit<Props, keyof ThumbProps>];
|
|
261
266
|
|