@carbon/react 1.90.0 → 1.91.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +986 -926
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +27 -2
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +27 -4
- package/es/components/Breadcrumb/Breadcrumb.js +2 -1
- package/es/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -12
- package/es/components/ComboButton/index.js +1 -1
- package/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/es/components/Copy/Copy.d.ts +1 -1
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/CopyButton/CopyButton.d.ts +1 -1
- package/es/components/CopyButton/CopyButton.js +1 -1
- package/es/components/DataTable/DataTable.d.ts +60 -15
- package/es/components/DataTable/DataTable.js +106 -179
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DatePicker/DatePicker.d.ts +0 -12
- package/es/components/DatePicker/DatePicker.js +3 -3
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/es/components/DatePicker/plugins/rangePlugin.js +18 -14
- package/es/components/Dropdown/Dropdown.js +1 -12
- package/es/components/FeatureFlags/index.js +1 -0
- package/es/components/IconButton/index.js +1 -1
- package/es/components/Menu/MenuItem.d.ts +1 -1
- package/es/components/Menu/MenuItem.js +5 -5
- package/es/components/Modal/Modal.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/es/components/MultiSelect/MultiSelect.js +1 -12
- package/es/components/Notification/Notification.d.ts +6 -6
- package/es/components/Notification/Notification.js +6 -6
- package/es/components/OverflowMenu/OverflowMenu.js +1 -1
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/PaginationNav/PaginationNav.d.ts +20 -0
- package/es/components/PaginationNav/PaginationNav.js +34 -5
- package/es/components/Popover/index.js +1 -1
- package/es/components/Search/Search.d.ts +4 -2
- package/es/components/Search/Search.js +5 -4
- package/es/components/Slider/Slider.d.ts +144 -188
- package/es/components/Slider/Slider.js +787 -710
- package/es/components/Slider/index.d.ts +2 -2
- package/es/components/Tabs/Tabs.d.ts +4 -0
- package/es/components/TextArea/TextArea.js +13 -6
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/TextInput/PasswordInput.js +2 -2
- package/es/components/TextInput/TextInput.js +2 -2
- package/es/components/TextInput/util.d.ts +17 -5
- package/es/components/TextInput/util.js +2 -7
- package/es/components/UIShell/HeaderPanel.d.ts +1 -1
- package/es/index.d.ts +27 -24
- package/es/index.js +43 -41
- package/es/internal/defaultItemToString.d.ts +7 -0
- package/es/internal/defaultItemToString.js +17 -0
- package/es/internal/index.d.ts +1 -0
- package/es/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/es/prop-types/deprecateValuesWithin.js +6 -6
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +10 -10
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +27 -2
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +27 -4
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -1
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -1
- package/lib/components/ComboBox/ComboBox.js +3 -14
- package/lib/components/ComboButton/index.js +1 -1
- package/lib/components/ComposedModal/ComposedModal.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/lib/components/Copy/Copy.d.ts +1 -1
- package/lib/components/Copy/Copy.js +1 -1
- package/lib/components/CopyButton/CopyButton.d.ts +1 -1
- package/lib/components/CopyButton/CopyButton.js +1 -1
- package/lib/components/DataTable/DataTable.d.ts +60 -15
- package/lib/components/DataTable/DataTable.js +106 -179
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/Table.js +1 -1
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +3 -3
- package/lib/components/DatePicker/DatePicker.d.ts +0 -12
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/lib/components/DatePicker/plugins/rangePlugin.js +18 -16
- package/lib/components/Dropdown/Dropdown.js +3 -14
- package/lib/components/FeatureFlags/index.js +1 -0
- package/lib/components/IconButton/index.js +1 -1
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +6 -6
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -8
- package/lib/components/MultiSelect/MultiSelect.js +2 -13
- package/lib/components/Notification/Notification.d.ts +6 -6
- package/lib/components/Notification/Notification.js +6 -6
- package/lib/components/OverflowMenu/OverflowMenu.js +1 -1
- package/lib/components/OverflowMenu/next/index.js +1 -1
- package/lib/components/PaginationNav/PaginationNav.d.ts +20 -0
- package/lib/components/PaginationNav/PaginationNav.js +34 -5
- package/lib/components/Popover/index.js +1 -1
- package/lib/components/Search/Search.d.ts +4 -2
- package/lib/components/Search/Search.js +5 -4
- package/lib/components/Slider/Slider.d.ts +144 -188
- package/lib/components/Slider/Slider.js +784 -709
- package/lib/components/Slider/index.d.ts +2 -2
- package/lib/components/Tabs/Tabs.d.ts +4 -0
- package/lib/components/TextArea/TextArea.js +13 -6
- package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +1 -1
- package/lib/components/TextInput/TextInput.js +1 -1
- package/lib/components/TextInput/util.d.ts +17 -5
- package/lib/components/TextInput/util.js +2 -7
- package/lib/components/UIShell/HeaderPanel.d.ts +1 -1
- package/lib/index.d.ts +27 -24
- package/lib/index.js +95 -28
- package/lib/internal/defaultItemToString.d.ts +7 -0
- package/lib/internal/defaultItemToString.js +19 -0
- package/lib/internal/index.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/lib/prop-types/deprecateValuesWithin.js +6 -8
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +10 -12
- package/package.json +8 -7
- package/telemetry.yml +1 -2
- package/es/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -21
- package/es/components/Slider/index.js +0 -14
- package/es/internal/createClassWrapper.js +0 -23
- package/lib/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -23
- package/lib/components/Slider/index.js +0 -20
- package/lib/internal/createClassWrapper.js +0 -25
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { type InputHTMLAttributes, type KeyboardEventHandler, type ReactNode } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import { TranslateWithId } from '../../types/common';
|
|
9
10
|
declare const translationIds: {
|
|
10
11
|
readonly autoCorrectAnnouncement: "carbon.slider.auto-correct-announcement";
|
|
@@ -163,191 +164,146 @@ export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
163
164
|
*/
|
|
164
165
|
warnText?: ReactNode;
|
|
165
166
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
167
|
+
export declare const Slider: {
|
|
168
|
+
(props: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
169
|
+
propTypes: {
|
|
170
|
+
/**
|
|
171
|
+
* The `ariaLabel` for the `<input>`.
|
|
172
|
+
*/
|
|
173
|
+
ariaLabelInput: PropTypes.Requireable<string>;
|
|
174
|
+
/**
|
|
175
|
+
* The child nodes.
|
|
176
|
+
*/
|
|
177
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
178
|
+
/**
|
|
179
|
+
* The CSS class name for the slider.
|
|
180
|
+
*/
|
|
181
|
+
className: PropTypes.Requireable<string>;
|
|
182
|
+
/**
|
|
183
|
+
* `true` to disable this slider.
|
|
184
|
+
*/
|
|
185
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
186
|
+
/**
|
|
187
|
+
* The callback to format the label associated with the minimum/maximum value.
|
|
188
|
+
*/
|
|
189
|
+
formatLabel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
190
|
+
/**
|
|
191
|
+
* `true` to hide the number input box.
|
|
192
|
+
*/
|
|
193
|
+
hideTextInput: PropTypes.Requireable<boolean>;
|
|
194
|
+
/**
|
|
195
|
+
* The ID of the `<input>`.
|
|
196
|
+
*/
|
|
197
|
+
id: PropTypes.Requireable<string>;
|
|
198
|
+
/**
|
|
199
|
+
* The `type` attribute of the `<input>`.
|
|
200
|
+
*/
|
|
201
|
+
inputType: PropTypes.Requireable<string>;
|
|
202
|
+
/**
|
|
203
|
+
* `Specify whether the Slider is currently invalid
|
|
204
|
+
*/
|
|
205
|
+
invalid: PropTypes.Requireable<boolean>;
|
|
206
|
+
/**
|
|
207
|
+
* Provide the text that is displayed when the Slider is in an invalid state
|
|
208
|
+
*/
|
|
209
|
+
invalidText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
210
|
+
/**
|
|
211
|
+
* The label for the slider.
|
|
212
|
+
*/
|
|
213
|
+
labelText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
214
|
+
/**
|
|
215
|
+
* Specify whether you want the underlying label to be visually hidden
|
|
216
|
+
*/
|
|
217
|
+
hideLabel: PropTypes.Requireable<boolean>;
|
|
218
|
+
/**
|
|
219
|
+
* `true` to use the light version.
|
|
220
|
+
*/
|
|
221
|
+
light: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
|
|
222
|
+
/**
|
|
223
|
+
* The maximum value.
|
|
224
|
+
*/
|
|
225
|
+
max: PropTypes.Validator<number>;
|
|
226
|
+
/**
|
|
227
|
+
* The label associated with the maximum value.
|
|
228
|
+
*/
|
|
229
|
+
maxLabel: PropTypes.Requireable<string>;
|
|
230
|
+
/**
|
|
231
|
+
* The minimum value.
|
|
232
|
+
*/
|
|
233
|
+
min: PropTypes.Validator<number>;
|
|
234
|
+
/**
|
|
235
|
+
* The label associated with the minimum value.
|
|
236
|
+
*/
|
|
237
|
+
minLabel: PropTypes.Requireable<string>;
|
|
238
|
+
/**
|
|
239
|
+
* The `name` attribute of the `<input>`.
|
|
240
|
+
*/
|
|
241
|
+
name: PropTypes.Requireable<string>;
|
|
242
|
+
/**
|
|
243
|
+
* Provide an optional function to be called when the input element
|
|
244
|
+
* loses focus
|
|
245
|
+
*/
|
|
246
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
247
|
+
/**
|
|
248
|
+
* The callback to get notified of change in value.
|
|
249
|
+
*/
|
|
250
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
251
|
+
/**
|
|
252
|
+
* Provide an optional function to be called when a key is pressed in the number input.
|
|
253
|
+
*/
|
|
254
|
+
onInputKeyUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
255
|
+
/**
|
|
256
|
+
* The callback to get notified of value on handle release.
|
|
257
|
+
*/
|
|
258
|
+
onRelease: PropTypes.Requireable<(...args: any[]) => any>;
|
|
259
|
+
/**
|
|
260
|
+
* Whether the slider should be read-only
|
|
261
|
+
*/
|
|
262
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
263
|
+
/**
|
|
264
|
+
* `true` to specify if the control is required.
|
|
265
|
+
*/
|
|
266
|
+
required: PropTypes.Requireable<boolean>;
|
|
267
|
+
/**
|
|
268
|
+
* A value determining how much the value should increase/decrease by moving the thumb by mouse. If a value other than 1 is provided and the input is *not* hidden, the new step requirement should be added to a visible label. Values outside the `step` increment will be considered invalid.
|
|
269
|
+
*/
|
|
270
|
+
step: PropTypes.Requireable<number>;
|
|
271
|
+
/**
|
|
272
|
+
* A value determining how much the value should increase/decrease by Shift+arrow keys,
|
|
273
|
+
* which will be `(max - min) / stepMultiplier`.
|
|
274
|
+
*/
|
|
275
|
+
stepMultiplier: PropTypes.Requireable<number>;
|
|
276
|
+
/**
|
|
277
|
+
* Supply a method to translate internal strings with your i18n tool of
|
|
278
|
+
* choice. Translation keys are available on the `translationIds` field for
|
|
279
|
+
* this component.
|
|
280
|
+
*/
|
|
281
|
+
translateWithId: PropTypes.Requireable<(...args: any[]) => any>;
|
|
282
|
+
/**
|
|
283
|
+
* The `ariaLabel` for the upper bound `<input>` when there are two handles.
|
|
284
|
+
*/
|
|
285
|
+
unstable_ariaLabelInputUpper: PropTypes.Requireable<string>;
|
|
286
|
+
/**
|
|
287
|
+
* The `name` attribute of the upper bound `<input>` when there are two handles.
|
|
288
|
+
*/
|
|
289
|
+
unstable_nameUpper: PropTypes.Requireable<string>;
|
|
290
|
+
/**
|
|
291
|
+
* The upper bound when there are two handles.
|
|
292
|
+
*/
|
|
293
|
+
unstable_valueUpper: PropTypes.Requireable<number>;
|
|
294
|
+
/**
|
|
295
|
+
* The value of the slider. When there are two handles, value is the lower
|
|
296
|
+
* bound.
|
|
297
|
+
*/
|
|
298
|
+
value: PropTypes.Validator<number>;
|
|
299
|
+
/**
|
|
300
|
+
* `Specify whether the Slider is in a warn state
|
|
301
|
+
*/
|
|
302
|
+
warn: PropTypes.Requireable<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* Provide the text that is displayed when the Slider is in a warn state
|
|
305
|
+
*/
|
|
306
|
+
warnText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
186
307
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
filledTrackRef: RefObject<HTMLDivElement | null>;
|
|
190
|
-
element: HTMLDivElement | null;
|
|
191
|
-
inputId: string;
|
|
192
|
-
track: HTMLDivElement | null | undefined;
|
|
193
|
-
constructor(props: any);
|
|
194
|
-
/**
|
|
195
|
-
* Sets up initial slider position and value in response to component mount.
|
|
196
|
-
*/
|
|
197
|
-
componentDidMount(): void;
|
|
198
|
-
/**
|
|
199
|
-
* Handles firing of `onChange` and `onRelease` callbacks to parent in
|
|
200
|
-
* response to state changes.
|
|
201
|
-
*
|
|
202
|
-
* @param {*} prevProps prevProps
|
|
203
|
-
* @param {*} prevState The previous Slider state, used to see if callbacks
|
|
204
|
-
* should be called.
|
|
205
|
-
*/
|
|
206
|
-
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
207
|
-
/**
|
|
208
|
-
* Rounds a given value to the nearest step defined by the slider's `step`
|
|
209
|
-
* prop.
|
|
210
|
-
*
|
|
211
|
-
* @param value - The value to adjust to the nearest step. Defaults to `0`.
|
|
212
|
-
* @returns The value rounded to the precision determined by the step.
|
|
213
|
-
*/
|
|
214
|
-
nearestStepValue(value?: number): number;
|
|
215
|
-
handleDrag: (event: Event) => void;
|
|
216
|
-
/**
|
|
217
|
-
* Sets up "drag" event handlers and calls `this.onDrag` in case dragging
|
|
218
|
-
* started on somewhere other than the thumb without a corresponding "move"
|
|
219
|
-
* event.
|
|
220
|
-
*/
|
|
221
|
-
onDragStart: (evt: MouseEvent<HTMLDivElement> | TouchEvent<HTMLDivElement>) => void;
|
|
222
|
-
/**
|
|
223
|
-
* Removes "drag" and "drag stop" event handlers and calls sets the flag
|
|
224
|
-
* indicating that the `onRelease` callback should be called.
|
|
225
|
-
*/
|
|
226
|
-
onDragStop: () => void;
|
|
227
|
-
/**
|
|
228
|
-
* Handles a "drag" event by recalculating the value/thumb and setting state
|
|
229
|
-
* accordingly.
|
|
230
|
-
*
|
|
231
|
-
* @param evt The event.
|
|
232
|
-
* @param activeHandle The first drag event call, we may have an explicit
|
|
233
|
-
* activeHandle value, which is to be used before state is used.
|
|
234
|
-
*/
|
|
235
|
-
_onDrag: (evt: globalThis.MouseEvent | globalThis.TouchEvent, activeHandle?: HandlePosition) => void;
|
|
236
|
-
/**
|
|
237
|
-
* Throttles calls to `this._onDrag` by limiting events to being processed at
|
|
238
|
-
* most once every `EVENT_THROTTLE` milliseconds.
|
|
239
|
-
*/
|
|
240
|
-
onDrag: import("es-toolkit/compat").DebouncedFunc<(evt: globalThis.MouseEvent | globalThis.TouchEvent, activeHandle?: HandlePosition) => void>;
|
|
241
|
-
/**
|
|
242
|
-
* Handles a `keydown` event by recalculating the value/thumb and setting
|
|
243
|
-
* state accordingly.
|
|
244
|
-
*/
|
|
245
|
-
onKeyDown: (evt: KeyboardEvent<HTMLDivElement>) => void;
|
|
246
|
-
/**
|
|
247
|
-
* Provides the two-way binding for the input field of the Slider. It also
|
|
248
|
-
* Handles a change to the input field by recalculating the value/thumb and
|
|
249
|
-
* setting state accordingly.
|
|
250
|
-
*/
|
|
251
|
-
onChange: (evt: ChangeEvent<HTMLInputElement>) => void;
|
|
252
|
-
/**
|
|
253
|
-
* Checks for validity of input value after clicking out of the input. It also
|
|
254
|
-
* Handles state change to isValid state.
|
|
255
|
-
*/
|
|
256
|
-
onBlur: (evt: FocusEvent<HTMLInputElement>) => void;
|
|
257
|
-
onInputKeyDown: (evt: KeyboardEvent<HTMLInputElement>) => void;
|
|
258
|
-
processNewInputValue: (input: HTMLInputElement) => void;
|
|
259
|
-
calcLeftPercent: ({ clientX, value, range }: CalcLeftPercentProps) => number;
|
|
260
|
-
/**
|
|
261
|
-
* Calculates the discrete value (snapped to the nearest step) along
|
|
262
|
-
* with the corresponding handle position percentage.
|
|
263
|
-
*/
|
|
264
|
-
calcDiscreteValueAndPercent: ({ leftPercent, }: {
|
|
265
|
-
/** The percentage representing the position on the track. */
|
|
266
|
-
leftPercent: number;
|
|
267
|
-
}) => {
|
|
268
|
-
discreteValue: number;
|
|
269
|
-
discretePercent: number;
|
|
270
|
-
};
|
|
271
|
-
/**
|
|
272
|
-
* Calculates the slider's value and handle position based on either a
|
|
273
|
-
* mouse/touch event or an explicit value.
|
|
274
|
-
*/
|
|
275
|
-
calcValue: ({ clientX, value, useRawValue, }: {
|
|
276
|
-
/** The x-coordinate from a mouse/touch event. */
|
|
277
|
-
clientX?: number;
|
|
278
|
-
/** Value to base the calculations on (if no `clientX`). */
|
|
279
|
-
value?: number;
|
|
280
|
-
/** Whether to bypass the stepping logic and use the raw value. */
|
|
281
|
-
useRawValue?: boolean;
|
|
282
|
-
}) => {
|
|
283
|
-
value: number | undefined;
|
|
284
|
-
left: number;
|
|
285
|
-
};
|
|
286
|
-
calcDistanceToHandle: (handle: HandlePosition, clientX: number) => number;
|
|
287
|
-
/**
|
|
288
|
-
* Calculates a new slider value based on the current value, a change delta,
|
|
289
|
-
* and a step.
|
|
290
|
-
*
|
|
291
|
-
* @param currentValue - The starting value from which the slider is moving.
|
|
292
|
-
* @param delta - The amount to adjust the current value by.
|
|
293
|
-
* @param step - The step. Defaults to `1`.
|
|
294
|
-
* @returns The new slider value, rounded to the same number of decimal places
|
|
295
|
-
* as the step.
|
|
296
|
-
*/
|
|
297
|
-
calcValueForDelta: (currentValue: number, delta: number, step?: number) => number;
|
|
298
|
-
/**
|
|
299
|
-
* Sets state relevant to the given handle position.
|
|
300
|
-
*
|
|
301
|
-
* Guards against setting either lower or upper values beyond its counterpart.
|
|
302
|
-
*/
|
|
303
|
-
setValueLeftForHandle: (handle: HandlePosition, { value: newValue, left: newLeft }: {
|
|
304
|
-
value: number;
|
|
305
|
-
left: number;
|
|
306
|
-
}) => void;
|
|
307
|
-
setValueForHandle: (handle: HandlePosition, value: number | string) => void;
|
|
308
|
-
isValidValueForPosition: ({ handle, value: newValue, min, max, }: {
|
|
309
|
-
handle: HandlePosition;
|
|
310
|
-
value: number;
|
|
311
|
-
min: number;
|
|
312
|
-
max: number;
|
|
313
|
-
}) => boolean;
|
|
314
|
-
isValidValue: ({ value, min, max, }: {
|
|
315
|
-
value: number;
|
|
316
|
-
min: number;
|
|
317
|
-
max: number;
|
|
318
|
-
}) => boolean;
|
|
319
|
-
getAdjustedValueForPosition: ({ handle, value: newValue, min, max, }: {
|
|
320
|
-
handle: HandlePosition;
|
|
321
|
-
value: number;
|
|
322
|
-
min: number;
|
|
323
|
-
max: number;
|
|
324
|
-
}) => number;
|
|
325
|
-
getAdjustedValue: ({ value, min, max, }: {
|
|
326
|
-
value: number;
|
|
327
|
-
min: number;
|
|
328
|
-
max: number;
|
|
329
|
-
}) => number;
|
|
330
|
-
/**
|
|
331
|
-
* Get the bounding rect for the requested handles' DOM element.
|
|
332
|
-
*
|
|
333
|
-
* If the bounding rect is not available, a new, empty DOMRect is returned.
|
|
334
|
-
*/
|
|
335
|
-
getHandleBoundingRect: (handle: HandlePosition) => DOMRect;
|
|
336
|
-
getClientXFromEvent(event: globalThis.MouseEvent | globalThis.TouchEvent): number | undefined;
|
|
337
|
-
hasTwoHandles(): boolean;
|
|
338
|
-
static getDerivedStateFromProps(props: SliderProps, state: Slider['state']): Partial<{
|
|
339
|
-
value: number;
|
|
340
|
-
valueUpper: number | undefined;
|
|
341
|
-
left: number;
|
|
342
|
-
leftUpper: number;
|
|
343
|
-
needsOnRelease: boolean;
|
|
344
|
-
isValid: boolean;
|
|
345
|
-
isValidUpper: boolean;
|
|
346
|
-
activeHandle: undefined;
|
|
347
|
-
correctedValue: null;
|
|
348
|
-
correctedPosition: null;
|
|
349
|
-
isRtl: boolean;
|
|
350
|
-
}> | null;
|
|
351
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
352
|
-
}
|
|
353
|
-
export default Slider;
|
|
308
|
+
};
|
|
309
|
+
export {};
|