@fluentui/react-slider 9.0.0-beta.1 → 9.0.0-beta.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/CHANGELOG.json +430 -1
- package/CHANGELOG.md +123 -2
- package/dist/react-slider.d.ts +33 -142
- package/lib/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.js +7 -7
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.types.d.ts +26 -55
- package/lib/components/Slider/Slider.types.js.map +1 -1
- package/lib/components/Slider/index.d.ts +2 -2
- package/lib/components/Slider/index.js +2 -2
- package/lib/components/Slider/index.js.map +1 -1
- package/lib/components/Slider/renderSlider.d.ts +1 -1
- package/lib/components/Slider/renderSlider.js +10 -8
- package/lib/components/Slider/renderSlider.js.map +1 -1
- package/lib/components/Slider/useSlider.d.ts +2 -6
- package/lib/components/Slider/useSlider.js +50 -80
- package/lib/components/Slider/useSlider.js.map +1 -1
- package/lib/components/Slider/useSliderState.d.ts +1 -2
- package/lib/components/Slider/useSliderState.js +49 -184
- package/lib/components/Slider/useSliderState.js.map +1 -1
- package/lib/components/Slider/useSliderStyles.d.ts +10 -30
- package/lib/components/Slider/useSliderStyles.js +151 -305
- package/lib/components/Slider/useSliderStyles.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Slider.js +1 -1
- package/lib-commonjs/Slider.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.js +8 -8
- package/lib-commonjs/components/Slider/Slider.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.types.d.ts +26 -55
- package/lib-commonjs/components/Slider/Slider.types.js.map +1 -1
- package/lib-commonjs/components/Slider/index.d.ts +2 -2
- package/lib-commonjs/components/Slider/index.js +12 -6
- package/lib-commonjs/components/Slider/index.js.map +1 -1
- package/lib-commonjs/components/Slider/renderSlider.d.ts +1 -1
- package/lib-commonjs/components/Slider/renderSlider.js +14 -14
- package/lib-commonjs/components/Slider/renderSlider.js.map +1 -1
- package/lib-commonjs/components/Slider/useSlider.d.ts +2 -6
- package/lib-commonjs/components/Slider/useSlider.js +53 -84
- package/lib-commonjs/components/Slider/useSlider.js.map +1 -1
- package/lib-commonjs/components/Slider/useSliderState.d.ts +1 -2
- package/lib-commonjs/components/Slider/useSliderState.js +53 -191
- package/lib-commonjs/components/Slider/useSliderState.js.map +1 -1
- package/lib-commonjs/components/Slider/useSliderStyles.d.ts +10 -30
- package/lib-commonjs/components/Slider/useSliderStyles.js +154 -308
- package/lib-commonjs/components/Slider/useSliderStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +0 -1
- package/lib-commonjs/index.js +1 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +20 -14
- package/lib/RangedSlider.d.ts +0 -1
- package/lib/RangedSlider.js +0 -2
- package/lib/RangedSlider.js.map +0 -1
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/RangedSlider/RangedSlider.d.ts +0 -6
- package/lib/components/RangedSlider/RangedSlider.js +0 -15
- package/lib/components/RangedSlider/RangedSlider.js.map +0 -1
- package/lib/components/RangedSlider/RangedSlider.types.d.ts +0 -53
- package/lib/components/RangedSlider/RangedSlider.types.js +0 -2
- package/lib/components/RangedSlider/RangedSlider.types.js.map +0 -1
- package/lib/components/RangedSlider/index.d.ts +0 -6
- package/lib/components/RangedSlider/index.js +0 -7
- package/lib/components/RangedSlider/index.js.map +0 -1
- package/lib/components/RangedSlider/renderRangedSlider.d.ts +0 -5
- package/lib/components/RangedSlider/renderRangedSlider.js +0 -20
- package/lib/components/RangedSlider/renderRangedSlider.js.map +0 -1
- package/lib/components/RangedSlider/useRangedSlider.d.ts +0 -6
- package/lib/components/RangedSlider/useRangedSlider.js +0 -116
- package/lib/components/RangedSlider/useRangedSlider.js.map +0 -1
- package/lib/components/RangedSlider/useRangedSliderState.d.ts +0 -2
- package/lib/components/RangedSlider/useRangedSliderState.js +0 -271
- package/lib/components/RangedSlider/useRangedSliderState.js.map +0 -1
- package/lib/components/RangedSlider/useRangedSliderStyles.d.ts +0 -4
- package/lib/components/RangedSlider/useRangedSliderStyles.js +0 -92
- package/lib/components/RangedSlider/useRangedSliderStyles.js.map +0 -1
- package/lib/utils/calculateSteps.d.ts +0 -5
- package/lib/utils/calculateSteps.js +0 -27
- package/lib/utils/calculateSteps.js.map +0 -1
- package/lib/utils/findClosestThumb.d.ts +0 -4
- package/lib/utils/findClosestThumb.js +0 -7
- package/lib/utils/findClosestThumb.js.map +0 -1
- package/lib/utils/getKeydownValue.d.ts +0 -6
- package/lib/utils/getKeydownValue.js +0 -35
- package/lib/utils/getKeydownValue.js.map +0 -1
- package/lib/utils/getMarkPercent.d.ts +0 -12
- package/lib/utils/getMarkPercent.js +0 -27
- package/lib/utils/getMarkPercent.js.map +0 -1
- package/lib/utils/getMarkValues.d.ts +0 -13
- package/lib/utils/getMarkValues.js +0 -29
- package/lib/utils/getMarkValues.js.map +0 -1
- package/lib/utils/getPercent.d.ts +0 -8
- package/lib/utils/getPercent.js +0 -11
- package/lib/utils/getPercent.js.map +0 -1
- package/lib/utils/index.d.ts +0 -9
- package/lib/utils/index.js +0 -10
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/on.d.ts +0 -11
- package/lib/utils/on.js +0 -17
- package/lib/utils/on.js.map +0 -1
- package/lib/utils/renderMarks.d.ts +0 -13
- package/lib/utils/renderMarks.js +0 -31
- package/lib/utils/renderMarks.js.map +0 -1
- package/lib/utils/validateRangedThumbValues.d.ts +0 -4
- package/lib/utils/validateRangedThumbValues.js +0 -13
- package/lib/utils/validateRangedThumbValues.js.map +0 -1
- package/lib-commonjs/RangedSlider.d.ts +0 -1
- package/lib-commonjs/RangedSlider.js +0 -10
- package/lib-commonjs/RangedSlider.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/RangedSlider.d.ts +0 -6
- package/lib-commonjs/components/RangedSlider/RangedSlider.js +0 -26
- package/lib-commonjs/components/RangedSlider/RangedSlider.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/RangedSlider.types.d.ts +0 -53
- package/lib-commonjs/components/RangedSlider/RangedSlider.types.js +0 -6
- package/lib-commonjs/components/RangedSlider/RangedSlider.types.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/index.d.ts +0 -6
- package/lib-commonjs/components/RangedSlider/index.js +0 -20
- package/lib-commonjs/components/RangedSlider/index.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/renderRangedSlider.d.ts +0 -5
- package/lib-commonjs/components/RangedSlider/renderRangedSlider.js +0 -32
- package/lib-commonjs/components/RangedSlider/renderRangedSlider.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/useRangedSlider.d.ts +0 -6
- package/lib-commonjs/components/RangedSlider/useRangedSlider.js +0 -128
- package/lib-commonjs/components/RangedSlider/useRangedSlider.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/useRangedSliderState.d.ts +0 -2
- package/lib-commonjs/components/RangedSlider/useRangedSliderState.js +0 -286
- package/lib-commonjs/components/RangedSlider/useRangedSliderState.js.map +0 -1
- package/lib-commonjs/components/RangedSlider/useRangedSliderStyles.d.ts +0 -4
- package/lib-commonjs/components/RangedSlider/useRangedSliderStyles.js +0 -104
- package/lib-commonjs/components/RangedSlider/useRangedSliderStyles.js.map +0 -1
- package/lib-commonjs/utils/calculateSteps.d.ts +0 -5
- package/lib-commonjs/utils/calculateSteps.js +0 -37
- package/lib-commonjs/utils/calculateSteps.js.map +0 -1
- package/lib-commonjs/utils/findClosestThumb.d.ts +0 -4
- package/lib-commonjs/utils/findClosestThumb.js +0 -16
- package/lib-commonjs/utils/findClosestThumb.js.map +0 -1
- package/lib-commonjs/utils/getKeydownValue.d.ts +0 -6
- package/lib-commonjs/utils/getKeydownValue.js +0 -45
- package/lib-commonjs/utils/getKeydownValue.js.map +0 -1
- package/lib-commonjs/utils/getMarkPercent.d.ts +0 -12
- package/lib-commonjs/utils/getMarkPercent.js +0 -36
- package/lib-commonjs/utils/getMarkPercent.js.map +0 -1
- package/lib-commonjs/utils/getMarkValues.d.ts +0 -13
- package/lib-commonjs/utils/getMarkValues.js +0 -39
- package/lib-commonjs/utils/getMarkValues.js.map +0 -1
- package/lib-commonjs/utils/getPercent.d.ts +0 -8
- package/lib-commonjs/utils/getPercent.js +0 -20
- package/lib-commonjs/utils/getPercent.js.map +0 -1
- package/lib-commonjs/utils/index.d.ts +0 -9
- package/lib-commonjs/utils/index.js +0 -26
- package/lib-commonjs/utils/index.js.map +0 -1
- package/lib-commonjs/utils/on.d.ts +0 -11
- package/lib-commonjs/utils/on.js +0 -26
- package/lib-commonjs/utils/on.js.map +0 -1
- package/lib-commonjs/utils/renderMarks.d.ts +0 -13
- package/lib-commonjs/utils/renderMarks.js +0 -42
- package/lib-commonjs/utils/renderMarks.js.map +0 -1
- package/lib-commonjs/utils/validateRangedThumbValues.d.ts +0 -4
- package/lib-commonjs/utils/validateRangedThumbValues.js +0 -23
- package/lib-commonjs/utils/validateRangedThumbValues.js.map +0 -1
package/dist/react-slider.d.ts
CHANGED
|
@@ -1,86 +1,22 @@
|
|
|
1
|
-
import { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
-
import { ComponentState } from '@fluentui/react-utilities';
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
4
|
-
import { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
|
5
4
|
import * as React_2 from 'react';
|
|
6
|
-
|
|
7
|
-
export declare const lowerThumbClassName: string;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The RangedSlider component allows users to quickly select a range by dragging a lower or upper thumb across a rail.
|
|
11
|
-
*/
|
|
12
|
-
export declare const RangedSlider: ForwardRefComponent<RangedSliderProps>;
|
|
13
|
-
|
|
14
|
-
export declare interface RangedSliderCommons extends Omit<SliderCommons, 'value' | 'defaultValue' | 'origin' | 'onChange'> {
|
|
15
|
-
/**
|
|
16
|
-
* The starting value for an uncontrolled RangedSlider. The first value is always lower than the second value.
|
|
17
|
-
* Mutually exclusive with `value` prop.
|
|
18
|
-
*/
|
|
19
|
-
defaultValue?: [number, number];
|
|
20
|
-
/**
|
|
21
|
-
* The current value of the controlled RangedSlider. The first value is always lower than the second value.
|
|
22
|
-
* Mutually exclusive with `defaultValue` prop.
|
|
23
|
-
*/
|
|
24
|
-
value?: [number, number];
|
|
25
|
-
/**
|
|
26
|
-
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
27
|
-
*/
|
|
28
|
-
onChange?: (ev: React_2.PointerEvent<HTMLDivElement> | React_2.KeyboardEvent<HTMLDivElement>, data: {
|
|
29
|
-
value: [number, number];
|
|
30
|
-
}) => void;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export declare interface RangedSliderProps extends Omit<ComponentProps<RangedSliderSlots>, 'onChange' | 'defaultValue'>, RangedSliderCommons {
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare type RangedSliderSlots = Omit<SliderSlots, 'thumb' | 'thumbWrapper' | 'input'> & {
|
|
37
|
-
/**
|
|
38
|
-
* The lower draggable icon used to select a given value in the RangedSlider.
|
|
39
|
-
*/
|
|
40
|
-
lowerThumb: IntrinsicShorthandProps<'div'>;
|
|
41
|
-
/**
|
|
42
|
-
* The wrapper around the RangedSlider's lower thumb.
|
|
43
|
-
* It is primarily used to handle the dragging animation from translateX.
|
|
44
|
-
*/
|
|
45
|
-
lowerThumbWrapper: IntrinsicShorthandProps<'div'>;
|
|
46
|
-
/**
|
|
47
|
-
* The upper draggable icon used to select a given value in the RangedSlider.
|
|
48
|
-
*/
|
|
49
|
-
upperThumb: IntrinsicShorthandProps<'div'>;
|
|
50
|
-
/**
|
|
51
|
-
* The wrapper around the RangedSlider's upper thumb.
|
|
52
|
-
* It is primarily used to handle the dragging animation from translateX.
|
|
53
|
-
*/
|
|
54
|
-
upperThumbWrapper: IntrinsicShorthandProps<'div'>;
|
|
55
|
-
/**
|
|
56
|
-
* The hidden input for the Slider's lower thumb.
|
|
57
|
-
*/
|
|
58
|
-
lowerInput: IntrinsicShorthandProps<'input'>;
|
|
59
|
-
/**
|
|
60
|
-
* The hidden input for the Slider's upper thumb.
|
|
61
|
-
*/
|
|
62
|
-
upperInput: IntrinsicShorthandProps<'input'>;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export declare interface RangedSliderState extends ComponentState<RangedSliderSlots>, RangedSliderCommons {
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Render the final JSX of RangedSlider
|
|
70
|
-
*/
|
|
71
|
-
export declare const renderRangedSlider: (state: RangedSliderState) => JSX.Element;
|
|
5
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
72
6
|
|
|
73
7
|
/**
|
|
74
8
|
* Render the final JSX of Slider
|
|
75
9
|
*/
|
|
76
|
-
export declare const
|
|
10
|
+
export declare const renderSlider_unstable: (state: SliderState) => JSX.Element;
|
|
77
11
|
|
|
78
12
|
/**
|
|
79
13
|
* The Slider component allows users to quickly select a value by dragging a thumb across a rail.
|
|
80
14
|
*/
|
|
81
15
|
export declare const Slider: ForwardRefComponent<SliderProps>;
|
|
82
16
|
|
|
83
|
-
export declare
|
|
17
|
+
export declare const sliderClassName = "fui-Slider";
|
|
18
|
+
|
|
19
|
+
declare type SliderCommons = {
|
|
84
20
|
/**
|
|
85
21
|
* The starting value for an uncontrolled Slider.
|
|
86
22
|
* Mutually exclusive with `value` prop.
|
|
@@ -107,14 +43,6 @@ export declare type SliderCommons = {
|
|
|
107
43
|
* @default 1
|
|
108
44
|
*/
|
|
109
45
|
step?: number;
|
|
110
|
-
/**
|
|
111
|
-
* The number of steps that the Slider's value will change by during a key press. When provided, the `keyboardSteps`
|
|
112
|
-
* will be separated from the pointer `steps` allowing for the value to go outside of pointer related
|
|
113
|
-
* snapping values.
|
|
114
|
-
*
|
|
115
|
-
* @default `step` or 1
|
|
116
|
-
*/
|
|
117
|
-
keyboardStep?: number;
|
|
118
46
|
/**
|
|
119
47
|
* Whether to render the Slider as disabled.
|
|
120
48
|
*
|
|
@@ -126,18 +54,6 @@ export declare type SliderCommons = {
|
|
|
126
54
|
* @default `false` (renders horizontally)
|
|
127
55
|
*/
|
|
128
56
|
vertical?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* When enabled, small marks are displayed across the Slider, showing potential steps.
|
|
131
|
-
*
|
|
132
|
-
* - If `true`, marks are visible at each `step`.
|
|
133
|
-
* - If `number[]`, marks will be displayed at each provided number. Numbers must be in ascending order.
|
|
134
|
-
* - If `{}[]`, mark is shown at the value location and displays any provided custom labels and marks.
|
|
135
|
-
*/
|
|
136
|
-
marks?: boolean | (number | {
|
|
137
|
-
value: number;
|
|
138
|
-
label?: string | JSX.Element;
|
|
139
|
-
mark?: JSX.Element;
|
|
140
|
-
})[];
|
|
141
57
|
/**
|
|
142
58
|
* The starting origin point for the Slider.
|
|
143
59
|
* @default min
|
|
@@ -151,89 +67,64 @@ export declare type SliderCommons = {
|
|
|
151
67
|
/**
|
|
152
68
|
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
153
69
|
*/
|
|
154
|
-
onChange?: (ev: React_2.
|
|
155
|
-
value: number;
|
|
156
|
-
}) => void;
|
|
70
|
+
onChange?: (ev: React_2.ChangeEvent<HTMLInputElement>, data: SliderOnChangeData) => void;
|
|
157
71
|
/**
|
|
158
72
|
* The Slider's current value label to be read by the screen reader.
|
|
159
73
|
*/
|
|
160
|
-
|
|
74
|
+
getAriaValueText?: (value: number) => string;
|
|
161
75
|
};
|
|
162
76
|
|
|
163
|
-
export declare type
|
|
77
|
+
export declare type SliderOnChangeData = {
|
|
78
|
+
value: number;
|
|
79
|
+
};
|
|
164
80
|
|
|
165
|
-
|
|
166
|
-
* Array of all shorthand properties listed in sliderShorthandProps
|
|
167
|
-
*/
|
|
168
|
-
export declare const sliderShorthandProps: (keyof SliderSlots)[];
|
|
81
|
+
export declare type SliderProps = Omit<ComponentProps<Partial<SliderSlots>, 'input'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & SliderCommons;
|
|
169
82
|
|
|
170
83
|
export declare type SliderSlots = {
|
|
171
84
|
/**
|
|
172
85
|
* The root of the Slider.
|
|
86
|
+
* The root slot receives the `className` and `style` specified directly on the `<Slider>`.
|
|
87
|
+
* All other native props will be applied to the primary slot, `input`.
|
|
173
88
|
*/
|
|
174
|
-
root:
|
|
89
|
+
root: NonNullable<Slot<'div'>>;
|
|
175
90
|
/**
|
|
176
91
|
* The Slider's base. It is used to visibly display the min and max selectable values.
|
|
177
92
|
*/
|
|
178
|
-
rail:
|
|
179
|
-
/**
|
|
180
|
-
* The wrapper around the Slider component.
|
|
181
|
-
*/
|
|
182
|
-
sliderWrapper: IntrinsicShorthandProps<'div'>;
|
|
183
|
-
/**
|
|
184
|
-
* The wrapper around the Slider's track. It is primarily used to handle the positioning of the track.
|
|
185
|
-
*/
|
|
186
|
-
trackWrapper: IntrinsicShorthandProps<'div'>;
|
|
187
|
-
/**
|
|
188
|
-
* The bar showing the current selected area adjacent to the Slider's thumb.
|
|
189
|
-
*/
|
|
190
|
-
track: IntrinsicShorthandProps<'div'>;
|
|
191
|
-
/**
|
|
192
|
-
* The wrapper holding the marks and mark labels for the Slider.
|
|
193
|
-
*/
|
|
194
|
-
marksWrapper: IntrinsicShorthandProps<'div'>;
|
|
195
|
-
/**
|
|
196
|
-
* The wrapper around the Slider's thumb. It is primarily used to handle the dragging animation from translateX.
|
|
197
|
-
*/
|
|
198
|
-
thumbWrapper: IntrinsicShorthandProps<'div'>;
|
|
93
|
+
rail: NonNullable<Slot<'div'>>;
|
|
199
94
|
/**
|
|
200
95
|
* The draggable icon used to select a given value from the Slider.
|
|
201
96
|
* This is the element containing `role = 'slider'`.
|
|
202
97
|
*/
|
|
203
|
-
thumb:
|
|
204
|
-
/**
|
|
205
|
-
* The area in which the Slider's rail allows for the thumb to be dragged.
|
|
206
|
-
*/
|
|
207
|
-
activeRail: IntrinsicShorthandProps<'div'>;
|
|
98
|
+
thumb: NonNullable<Slot<'div'>>;
|
|
208
99
|
/**
|
|
209
100
|
* The hidden input for the Slider.
|
|
101
|
+
* This is the PRIMARY slot: all native properties specified directly on `<Slider>` will be applied to this slot,
|
|
102
|
+
* except `className` and `style`, which remain on the root slot.
|
|
103
|
+
*
|
|
210
104
|
*/
|
|
211
|
-
input:
|
|
105
|
+
input: NonNullable<Slot<'input'>> & {
|
|
106
|
+
/**
|
|
107
|
+
* Orient is a non standard attribute that allows for vertical orientation in Firefox. It is set internally
|
|
108
|
+
* when `vertical` is set to true.
|
|
109
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#non_standard_attributes
|
|
110
|
+
* Webkit/Chromium support for vertical inputs is provided via -webkit-appearance css property
|
|
111
|
+
*/
|
|
112
|
+
orient?: 'horizontal' | 'vertical';
|
|
113
|
+
};
|
|
212
114
|
};
|
|
213
115
|
|
|
214
116
|
export declare type SliderState = ComponentState<SliderSlots> & SliderCommons;
|
|
215
117
|
|
|
216
|
-
export declare const upperThumbClassName: string;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Given user props, returns state and render function for a RangedSlider.
|
|
220
|
-
*/
|
|
221
|
-
export declare const useRangedSlider: (props: RangedSliderProps, ref: React_2.Ref<HTMLElement>) => RangedSliderState;
|
|
222
|
-
|
|
223
|
-
export declare const useRangedSliderState: (state: RangedSliderState) => RangedSliderState;
|
|
224
|
-
|
|
225
|
-
export declare const useRangedSliderStyles: (state: RangedSliderState) => RangedSliderState;
|
|
226
|
-
|
|
227
118
|
/**
|
|
228
119
|
* Given user props, returns state and render function for a Slider.
|
|
229
120
|
*/
|
|
230
|
-
export declare const
|
|
121
|
+
export declare const useSlider_unstable: (props: SliderProps, ref: React_2.Ref<HTMLInputElement>) => SliderState;
|
|
231
122
|
|
|
232
|
-
export declare const
|
|
123
|
+
export declare const useSliderState_unstable: (state: SliderState) => SliderState;
|
|
233
124
|
|
|
234
125
|
/**
|
|
235
126
|
* Apply styling to the Slider slots based on the state
|
|
236
127
|
*/
|
|
237
|
-
export declare const
|
|
128
|
+
export declare const useSliderStyles_unstable: (state: SliderState) => SliderState;
|
|
238
129
|
|
|
239
130
|
export { }
|
package/lib/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"../src/","sources":["Slider.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Slider/index';\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useSlider_unstable } from './useSlider';
|
|
3
|
+
import { renderSlider_unstable } from './renderSlider';
|
|
4
|
+
import { useSliderStyles_unstable } from './useSliderStyles';
|
|
5
5
|
/**
|
|
6
6
|
* The Slider component allows users to quickly select a value by dragging a thumb across a rail.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return
|
|
9
|
+
export const Slider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useSlider_unstable(props, ref);
|
|
11
|
+
useSliderStyles_unstable(state);
|
|
12
|
+
return renderSlider_unstable(state);
|
|
13
13
|
});
|
|
14
14
|
Slider.displayName = 'Slider';
|
|
15
15
|
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AAEA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CANuD,CAAjD;AAOP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useSlider_unstable } from './useSlider';\nimport { renderSlider_unstable } from './renderSlider';\nimport { useSliderStyles_unstable } from './useSliderStyles';\nimport type { SliderProps } from './Slider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The Slider component allows users to quickly select a value by dragging a thumb across a rail.\n */\nexport const Slider: ForwardRefComponent<SliderProps> = React.forwardRef((props, ref) => {\n const state = useSlider_unstable(props, ref);\n\n useSliderStyles_unstable(state);\n\n return renderSlider_unstable(state);\n});\nSlider.displayName = 'Slider';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,49 +1,38 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ComponentState, ComponentProps,
|
|
2
|
+
import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';
|
|
3
3
|
export declare type SliderSlots = {
|
|
4
4
|
/**
|
|
5
5
|
* The root of the Slider.
|
|
6
|
+
* The root slot receives the `className` and `style` specified directly on the `<Slider>`.
|
|
7
|
+
* All other native props will be applied to the primary slot, `input`.
|
|
6
8
|
*/
|
|
7
|
-
root:
|
|
9
|
+
root: NonNullable<Slot<'div'>>;
|
|
8
10
|
/**
|
|
9
11
|
* The Slider's base. It is used to visibly display the min and max selectable values.
|
|
10
12
|
*/
|
|
11
|
-
rail:
|
|
12
|
-
/**
|
|
13
|
-
* The wrapper around the Slider component.
|
|
14
|
-
*/
|
|
15
|
-
sliderWrapper: IntrinsicShorthandProps<'div'>;
|
|
16
|
-
/**
|
|
17
|
-
* The wrapper around the Slider's track. It is primarily used to handle the positioning of the track.
|
|
18
|
-
*/
|
|
19
|
-
trackWrapper: IntrinsicShorthandProps<'div'>;
|
|
20
|
-
/**
|
|
21
|
-
* The bar showing the current selected area adjacent to the Slider's thumb.
|
|
22
|
-
*/
|
|
23
|
-
track: IntrinsicShorthandProps<'div'>;
|
|
24
|
-
/**
|
|
25
|
-
* The wrapper holding the marks and mark labels for the Slider.
|
|
26
|
-
*/
|
|
27
|
-
marksWrapper: IntrinsicShorthandProps<'div'>;
|
|
28
|
-
/**
|
|
29
|
-
* The wrapper around the Slider's thumb. It is primarily used to handle the dragging animation from translateX.
|
|
30
|
-
*/
|
|
31
|
-
thumbWrapper: IntrinsicShorthandProps<'div'>;
|
|
13
|
+
rail: NonNullable<Slot<'div'>>;
|
|
32
14
|
/**
|
|
33
15
|
* The draggable icon used to select a given value from the Slider.
|
|
34
16
|
* This is the element containing `role = 'slider'`.
|
|
35
17
|
*/
|
|
36
|
-
thumb:
|
|
37
|
-
/**
|
|
38
|
-
* The area in which the Slider's rail allows for the thumb to be dragged.
|
|
39
|
-
*/
|
|
40
|
-
activeRail: IntrinsicShorthandProps<'div'>;
|
|
18
|
+
thumb: NonNullable<Slot<'div'>>;
|
|
41
19
|
/**
|
|
42
20
|
* The hidden input for the Slider.
|
|
21
|
+
* This is the PRIMARY slot: all native properties specified directly on `<Slider>` will be applied to this slot,
|
|
22
|
+
* except `className` and `style`, which remain on the root slot.
|
|
23
|
+
*
|
|
43
24
|
*/
|
|
44
|
-
input:
|
|
25
|
+
input: NonNullable<Slot<'input'>> & {
|
|
26
|
+
/**
|
|
27
|
+
* Orient is a non standard attribute that allows for vertical orientation in Firefox. It is set internally
|
|
28
|
+
* when `vertical` is set to true.
|
|
29
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#non_standard_attributes
|
|
30
|
+
* Webkit/Chromium support for vertical inputs is provided via -webkit-appearance css property
|
|
31
|
+
*/
|
|
32
|
+
orient?: 'horizontal' | 'vertical';
|
|
33
|
+
};
|
|
45
34
|
};
|
|
46
|
-
|
|
35
|
+
declare type SliderCommons = {
|
|
47
36
|
/**
|
|
48
37
|
* The starting value for an uncontrolled Slider.
|
|
49
38
|
* Mutually exclusive with `value` prop.
|
|
@@ -70,14 +59,6 @@ export declare type SliderCommons = {
|
|
|
70
59
|
* @default 1
|
|
71
60
|
*/
|
|
72
61
|
step?: number;
|
|
73
|
-
/**
|
|
74
|
-
* The number of steps that the Slider's value will change by during a key press. When provided, the `keyboardSteps`
|
|
75
|
-
* will be separated from the pointer `steps` allowing for the value to go outside of pointer related
|
|
76
|
-
* snapping values.
|
|
77
|
-
*
|
|
78
|
-
* @default `step` or 1
|
|
79
|
-
*/
|
|
80
|
-
keyboardStep?: number;
|
|
81
62
|
/**
|
|
82
63
|
* Whether to render the Slider as disabled.
|
|
83
64
|
*
|
|
@@ -89,18 +70,6 @@ export declare type SliderCommons = {
|
|
|
89
70
|
* @default `false` (renders horizontally)
|
|
90
71
|
*/
|
|
91
72
|
vertical?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* When enabled, small marks are displayed across the Slider, showing potential steps.
|
|
94
|
-
*
|
|
95
|
-
* - If `true`, marks are visible at each `step`.
|
|
96
|
-
* - If `number[]`, marks will be displayed at each provided number. Numbers must be in ascending order.
|
|
97
|
-
* - If `{}[]`, mark is shown at the value location and displays any provided custom labels and marks.
|
|
98
|
-
*/
|
|
99
|
-
marks?: boolean | (number | {
|
|
100
|
-
value: number;
|
|
101
|
-
label?: string | JSX.Element;
|
|
102
|
-
mark?: JSX.Element;
|
|
103
|
-
})[];
|
|
104
73
|
/**
|
|
105
74
|
* The starting origin point for the Slider.
|
|
106
75
|
* @default min
|
|
@@ -114,13 +83,15 @@ export declare type SliderCommons = {
|
|
|
114
83
|
/**
|
|
115
84
|
* Triggers a callback when the value has been changed. This will be called on every individual step.
|
|
116
85
|
*/
|
|
117
|
-
onChange?: (ev: React.
|
|
118
|
-
value: number;
|
|
119
|
-
}) => void;
|
|
86
|
+
onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: SliderOnChangeData) => void;
|
|
120
87
|
/**
|
|
121
88
|
* The Slider's current value label to be read by the screen reader.
|
|
122
89
|
*/
|
|
123
|
-
|
|
90
|
+
getAriaValueText?: (value: number) => string;
|
|
91
|
+
};
|
|
92
|
+
export declare type SliderOnChangeData = {
|
|
93
|
+
value: number;
|
|
124
94
|
};
|
|
125
|
-
export declare type SliderProps = Omit<ComponentProps<SliderSlots>, 'onChange' | '
|
|
95
|
+
export declare type SliderProps = Omit<ComponentProps<Partial<SliderSlots>, 'input'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & SliderCommons;
|
|
126
96
|
export declare type SliderState = ComponentState<SliderSlots> & SliderCommons;
|
|
97
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.types.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"Slider.types.js","sourceRoot":"../src/","sources":["components/Slider/Slider.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities';\n\nexport type SliderSlots = {\n /**\n * The root of the Slider.\n * The root slot receives the `className` and `style` specified directly on the `<Slider>`.\n * All other native props will be applied to the primary slot, `input`.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The Slider's base. It is used to visibly display the min and max selectable values.\n */\n rail: NonNullable<Slot<'div'>>;\n\n /**\n * The draggable icon used to select a given value from the Slider.\n * This is the element containing `role = 'slider'`.\n */\n thumb: NonNullable<Slot<'div'>>;\n\n /**\n * The hidden input for the Slider.\n * This is the PRIMARY slot: all native properties specified directly on `<Slider>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n *\n */\n input: NonNullable<Slot<'input'>> & {\n /**\n * Orient is a non standard attribute that allows for vertical orientation in Firefox. It is set internally\n * when `vertical` is set to true.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#non_standard_attributes\n * Webkit/Chromium support for vertical inputs is provided via -webkit-appearance css property\n */\n orient?: 'horizontal' | 'vertical';\n };\n};\n\ntype SliderCommons = {\n /**\n * The starting value for an uncontrolled Slider.\n * Mutually exclusive with `value` prop.\n */\n defaultValue?: number;\n\n /**\n * The current value of the controlled Slider.\n * Mutually exclusive with `defaultValue` prop.\n */\n value?: number;\n\n /**\n * The min value of the Slider.\n * @default 0\n */\n min?: number;\n\n /**\n * The max value of the Slider.\n * @default 100\n */\n max?: number;\n\n /**\n * The number of steps that the Slider's `value` will increment upon change. When provided, the Slider\n * will snap to the closest available value. This must be a positive value.\n * @default 1\n */\n step?: number;\n\n /**\n * Whether to render the Slider as disabled.\n *\n * @default `false` (renders enabled)\n */\n disabled?: boolean;\n\n /**\n * Whether to render the Slider vertically.\n * @default `false` (renders horizontally)\n */\n vertical?: boolean;\n\n /**\n * The starting origin point for the Slider.\n * @default min\n */\n origin?: number;\n\n /**\n * The size of the Slider.\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n\n /**\n * Triggers a callback when the value has been changed. This will be called on every individual step.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: SliderOnChangeData) => void;\n\n /**\n * The Slider's current value label to be read by the screen reader.\n */\n getAriaValueText?: (value: number) => string;\n};\n\nexport type SliderOnChangeData = {\n value: number;\n};\n\nexport type SliderProps = Omit<\n ComponentProps<Partial<SliderSlots>, 'input'>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> &\n SliderCommons;\n\nexport type SliderState = ComponentState<SliderSlots> & SliderCommons;\n"]}
|
|
@@ -2,5 +2,5 @@ export * from './Slider';
|
|
|
2
2
|
export * from './Slider.types';
|
|
3
3
|
export * from './renderSlider';
|
|
4
4
|
export * from './useSlider';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { useSliderState_unstable } from './useSliderState';
|
|
6
|
+
export { sliderClassName, useSliderStyles_unstable } from './useSliderStyles';
|
|
@@ -2,6 +2,6 @@ export * from './Slider';
|
|
|
2
2
|
export * from './Slider.types';
|
|
3
3
|
export * from './renderSlider';
|
|
4
4
|
export * from './useSlider';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { useSliderState_unstable } from './useSliderState';
|
|
6
|
+
export { sliderClassName, useSliderStyles_unstable } from './useSliderStyles';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Slider/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export * from './Slider';\nexport * from './Slider.types';\nexport * from './renderSlider';\nexport * from './useSlider';\nexport { useSliderState_unstable } from './useSliderState';\nexport { sliderClassName, useSliderStyles_unstable } from './useSliderStyles';\n"]}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { getSlots } from '@fluentui/react-utilities';
|
|
4
|
-
import { sliderShorthandProps } from './useSlider';
|
|
5
3
|
/**
|
|
6
4
|
* Render the final JSX of Slider
|
|
7
5
|
*/
|
|
8
6
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
|
7
|
+
export const renderSlider_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
}, /*#__PURE__*/React.createElement(slots.input, { ...slotProps.input
|
|
14
|
+
}), /*#__PURE__*/React.createElement(slots.rail, { ...slotProps.rail
|
|
15
|
+
}), /*#__PURE__*/React.createElement(slots.thumb, { ...slotProps.thumb
|
|
16
|
+
}));
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=renderSlider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["components/Slider/renderSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;AAC1D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAHF,CADF;AAOD,CAVM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SliderState, SliderSlots } from './Slider.types';\n\n/**\n * Render the final JSX of Slider\n */\nexport const renderSlider_unstable = (state: SliderState) => {\n const { slots, slotProps } = getSlots<SliderSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.rail {...slotProps.rail} />\n <slots.thumb {...slotProps.thumb} />\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SliderProps,
|
|
3
|
-
/**
|
|
4
|
-
* Array of all shorthand properties listed in sliderShorthandProps
|
|
5
|
-
*/
|
|
6
|
-
export declare const sliderShorthandProps: (keyof SliderSlots)[];
|
|
2
|
+
import { SliderProps, SliderState } from './Slider.types';
|
|
7
3
|
/**
|
|
8
4
|
* Given user props, returns state and render function for a Slider.
|
|
9
5
|
*/
|
|
10
|
-
export declare const
|
|
6
|
+
export declare const useSlider_unstable: (props: SliderProps, ref: React.Ref<HTMLInputElement>) => SliderState;
|
|
@@ -1,105 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useSliderState } from './useSliderState';
|
|
4
|
-
/**
|
|
5
|
-
* Array of all shorthand properties listed in sliderShorthandProps
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export var sliderShorthandProps = ['root', 'activeRail', 'input', 'rail', 'sliderWrapper', 'thumb', 'thumbWrapper', 'track', 'trackWrapper', 'marksWrapper'];
|
|
1
|
+
import { getPartitionedNativeProps, resolveShorthand, useId } from '@fluentui/react-utilities';
|
|
2
|
+
import { useSliderState_unstable } from './useSliderState';
|
|
9
3
|
/**
|
|
10
4
|
* Given user props, returns state and render function for a Slider.
|
|
11
5
|
*/
|
|
12
6
|
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
size: size,
|
|
51
|
-
step: step,
|
|
52
|
-
vertical: vertical,
|
|
53
|
-
value: value,
|
|
7
|
+
export const useSlider_unstable = (props, ref) => {
|
|
8
|
+
const nativeProps = getPartitionedNativeProps({
|
|
9
|
+
props,
|
|
10
|
+
primarySlotTagName: 'input',
|
|
11
|
+
excludedPropNames: ['onChange', 'size']
|
|
12
|
+
});
|
|
13
|
+
const {
|
|
14
|
+
// Props
|
|
15
|
+
value,
|
|
16
|
+
defaultValue,
|
|
17
|
+
min = 0,
|
|
18
|
+
max = 100,
|
|
19
|
+
step,
|
|
20
|
+
disabled,
|
|
21
|
+
getAriaValueText,
|
|
22
|
+
vertical,
|
|
23
|
+
size = 'medium',
|
|
24
|
+
origin,
|
|
25
|
+
onChange,
|
|
26
|
+
// Slots
|
|
27
|
+
root,
|
|
28
|
+
input,
|
|
29
|
+
rail,
|
|
30
|
+
thumb
|
|
31
|
+
} = props;
|
|
32
|
+
const state = {
|
|
33
|
+
getAriaValueText,
|
|
34
|
+
defaultValue,
|
|
35
|
+
disabled,
|
|
36
|
+
max,
|
|
37
|
+
min,
|
|
38
|
+
origin,
|
|
39
|
+
size,
|
|
40
|
+
step,
|
|
41
|
+
vertical,
|
|
42
|
+
value,
|
|
43
|
+
onChange,
|
|
54
44
|
components: {
|
|
55
|
-
activeRail: 'div',
|
|
56
45
|
input: 'input',
|
|
57
|
-
marksWrapper: 'div',
|
|
58
46
|
rail: 'div',
|
|
59
47
|
root: 'div',
|
|
60
|
-
|
|
61
|
-
thumb: 'div',
|
|
62
|
-
thumbWrapper: 'div',
|
|
63
|
-
track: 'div',
|
|
64
|
-
trackWrapper: 'div'
|
|
48
|
+
thumb: 'div'
|
|
65
49
|
},
|
|
66
|
-
root:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})),
|
|
71
|
-
activeRail: resolveShorthand(activeRail, {
|
|
72
|
-
required: true
|
|
50
|
+
root: resolveShorthand(root, {
|
|
51
|
+
required: true,
|
|
52
|
+
defaultProps: { ...nativeProps.root
|
|
53
|
+
}
|
|
73
54
|
}),
|
|
74
55
|
input: resolveShorthand(input, {
|
|
75
56
|
required: true,
|
|
76
57
|
defaultProps: {
|
|
77
|
-
|
|
58
|
+
id: useId('slider-', props.id),
|
|
59
|
+
ref,
|
|
60
|
+
...nativeProps.primary,
|
|
61
|
+
type: 'range',
|
|
62
|
+
orient: vertical ? 'vertical' : undefined
|
|
78
63
|
}
|
|
79
64
|
}),
|
|
80
|
-
marksWrapper: resolveShorthand(marksWrapper, {
|
|
81
|
-
required: true
|
|
82
|
-
}),
|
|
83
65
|
rail: resolveShorthand(rail, {
|
|
84
66
|
required: true
|
|
85
67
|
}),
|
|
86
|
-
sliderWrapper: resolveShorthand(sliderWrapper, {
|
|
87
|
-
required: true
|
|
88
|
-
}),
|
|
89
68
|
thumb: resolveShorthand(thumb, {
|
|
90
69
|
required: true
|
|
91
|
-
}),
|
|
92
|
-
thumbWrapper: resolveShorthand(thumbWrapper, {
|
|
93
|
-
required: true
|
|
94
|
-
}),
|
|
95
|
-
track: resolveShorthand(track, {
|
|
96
|
-
required: true
|
|
97
|
-
}),
|
|
98
|
-
trackWrapper: resolveShorthand(trackWrapper, {
|
|
99
|
-
required: true
|
|
100
70
|
})
|
|
101
71
|
};
|
|
102
|
-
|
|
72
|
+
useSliderState_unstable(state);
|
|
103
73
|
return state;
|
|
104
74
|
};
|
|
105
75
|
//# sourceMappingURL=useSlider.js.map
|