1 | import { View } from '../core/view';
|
2 | import { Property, CoercibleProperty } from '../core/properties';
|
3 | import { EventData } from '../../data/observable';
|
4 | import type { SliderBase } from './slider-common';
|
5 |
|
6 | /**
|
7 | * Represents a slider component.
|
8 | */
|
9 | export class Slider extends View {
|
10 | static readonly accessibilityDecrementEvent = 'accessibilityDecrement';
|
11 | static readonly accessibilityIncrementEvent = 'accessibilityIncrement';
|
12 |
|
13 | /**
|
14 | * Gets the native [android widget](http://developer.android.com/reference/android/widget/SeekBar.html) that represents the user interface for this component. Valid only when running on Android OS.
|
15 | */
|
16 | android: any /* android.widget.SeekBar */;
|
17 |
|
18 | /**
|
19 | * Gets the native iOS [UISlider](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISlider_Class/) that represents the user interface for this component. Valid only when running on iOS.
|
20 | */
|
21 | ios: any /* UISlider */;
|
22 |
|
23 | /**
|
24 | * Gets or sets a slider current value. The default value is 0.
|
25 | */
|
26 | value: number;
|
27 |
|
28 | /**
|
29 | * Gets or sets a slider min value. The default value is 0.
|
30 | */
|
31 | minValue: number;
|
32 |
|
33 | /**
|
34 | * Gets or sets a slider max value. The default value is 100.
|
35 | */
|
36 | maxValue: number;
|
37 |
|
38 | /**
|
39 | * Increase/Decrease step size for iOS Increment-/Decrement events
|
40 | */
|
41 | accessibilityStep: number;
|
42 | }
|
43 |
|
44 | /**
|
45 | * Represents the observable property backing the value property of each Slider instance.
|
46 | */
|
47 | export const valueProperty: CoercibleProperty<Slider, number>;
|
48 |
|
49 | /**
|
50 | * Represents the observable property backing the minValue property of each Slider instance.
|
51 | */
|
52 | export const minValueProperty: Property<Slider, number>;
|
53 |
|
54 | /**
|
55 | * Represents the observable property backing the maxValue property of each Slider instance.
|
56 | */
|
57 | export const maxValueProperty: CoercibleProperty<Slider, number>;
|
58 |
|
59 | /**
|
60 | * Represents the observable property backing the accessibilityStep property of each Slider instance.
|
61 | */
|
62 | export const accessibilityStepProperty: Property<SliderBase, number>;
|
63 |
|
64 | interface AccessibilityIncrementEventData extends EventData {
|
65 | object: Slider;
|
66 | value?: number;
|
67 | }
|
68 |
|
69 | interface AccessibilityDecrementEventData extends EventData {
|
70 | object: Slider;
|
71 | value?: number;
|
72 | }
|