@umbraco-ui/uui-range-slider 1.5.0-rc.2 → 1.5.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/custom-elements.json +39 -64
- package/lib/index.js +595 -656
- package/lib/uui-range-slider.element.d.ts +76 -96
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
2
|
declare const UUIRangeSliderElement_base: (new (...args: any[]) => import("@umbraco-ui/uui-base/lib/mixins").FormControlMixinInterface) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* @element uui-range-slider
|
|
@@ -9,6 +9,12 @@ declare const UUIRangeSliderElement_base: (new (...args: any[]) => import("@umbr
|
|
|
9
9
|
export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
10
10
|
#private;
|
|
11
11
|
static readonly formAssociated = true;
|
|
12
|
+
/**
|
|
13
|
+
* Label to be used for aria-label and eventually as visual label. Adds "low-end value" and "high-end value" endings for the two values.
|
|
14
|
+
* @type {string}
|
|
15
|
+
* @attr
|
|
16
|
+
*/
|
|
17
|
+
label: String;
|
|
12
18
|
/**
|
|
13
19
|
* Disables the input.
|
|
14
20
|
* @type {boolean}
|
|
@@ -17,18 +23,23 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
|
17
23
|
*/
|
|
18
24
|
disabled: boolean;
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {
|
|
22
|
-
* @attr
|
|
26
|
+
* Sets the minimum allowed value.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @attr min
|
|
29
|
+
* @default 0
|
|
23
30
|
*/
|
|
24
|
-
|
|
31
|
+
get min(): number;
|
|
32
|
+
set min(newVal: number);
|
|
33
|
+
_min: number;
|
|
25
34
|
/**
|
|
26
|
-
*
|
|
35
|
+
* Sets the maximum allowed value.
|
|
27
36
|
* @type {number}
|
|
28
|
-
* @attr
|
|
29
|
-
* @default
|
|
37
|
+
* @attr max
|
|
38
|
+
* @default 100
|
|
30
39
|
*/
|
|
31
|
-
|
|
40
|
+
get max(): number;
|
|
41
|
+
set max(newVal: number);
|
|
42
|
+
_max: number;
|
|
32
43
|
/**
|
|
33
44
|
* Hides the numbers representing the value of each steps. Dots will still be visible
|
|
34
45
|
* @type {boolean}
|
|
@@ -37,124 +48,93 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
|
37
48
|
*/
|
|
38
49
|
hideStepValues: boolean;
|
|
39
50
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @type {number}
|
|
42
|
-
* @attr min
|
|
43
|
-
* @default 0
|
|
44
|
-
*/
|
|
45
|
-
min: number;
|
|
46
|
-
/**
|
|
47
|
-
* Sets the maximum allowed value.
|
|
51
|
+
* This reflects the behavior of a native input step attribute.
|
|
48
52
|
* @type {number}
|
|
49
|
-
* @attr
|
|
50
|
-
* @default
|
|
53
|
+
* @attr
|
|
54
|
+
* @default 1
|
|
51
55
|
*/
|
|
52
|
-
|
|
56
|
+
get step(): number;
|
|
57
|
+
set step(newVal: number);
|
|
58
|
+
_step: number;
|
|
53
59
|
/**
|
|
54
60
|
* Minimum value gap between the the two picked values. Cannot be lower than the step value and cannot be higher than the maximum gap
|
|
55
61
|
* @type {number}
|
|
56
62
|
* @attr min-gap
|
|
57
63
|
* @default undefined
|
|
58
64
|
*/
|
|
59
|
-
minGap
|
|
65
|
+
get minGap(): number | undefined;
|
|
66
|
+
set minGap(newVal: number | undefined);
|
|
67
|
+
_minGap?: number;
|
|
60
68
|
/**
|
|
61
69
|
* Maximum value gap between the the two picked values. Cannot be lower than the minimum gap.
|
|
62
70
|
* @type {number}
|
|
63
71
|
* @attr max-gap
|
|
64
72
|
* @default undefined
|
|
65
73
|
*/
|
|
66
|
-
maxGap
|
|
74
|
+
get maxGap(): number | undefined;
|
|
75
|
+
set maxGap(newVal: number | undefined);
|
|
76
|
+
_maxGap?: number;
|
|
67
77
|
/**
|
|
68
|
-
* This is a value property of the uui-range-slider. Split the two values with comma,
|
|
78
|
+
* This is a value property of the uui-range-slider. Split the two values with comma, for example 10,50 sets the values to 10 and 50.
|
|
69
79
|
* @type {string}
|
|
70
80
|
* @attr
|
|
71
|
-
* @default 0,
|
|
81
|
+
* @default 0,0
|
|
72
82
|
*/
|
|
73
83
|
get value(): FormDataEntryValue | FormData;
|
|
74
84
|
set value(newVal: FormDataEntryValue | FormData);
|
|
75
|
-
private
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
* @default 0
|
|
81
|
-
*/
|
|
82
|
-
set valueLow(newLow: number);
|
|
83
|
-
get valueLow(): number;
|
|
84
|
-
private _valueHigh;
|
|
85
|
-
/**
|
|
86
|
-
* The higher picked value.
|
|
87
|
-
* @type {number}
|
|
88
|
-
* @attr value-high
|
|
89
|
-
* @default 100
|
|
90
|
-
*/
|
|
91
|
-
set valueHigh(newHigh: number);
|
|
92
|
-
get valueHigh(): number;
|
|
85
|
+
private _currentFocus?;
|
|
86
|
+
private _movement;
|
|
87
|
+
private startPoint;
|
|
88
|
+
private _lowInputValue;
|
|
89
|
+
private _highInputValue;
|
|
93
90
|
private _trackWidth;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
91
|
+
_lowValuePercentStart: number;
|
|
92
|
+
_highValuePercentEnd: number;
|
|
93
|
+
protected setValueLow(low: number): void;
|
|
94
|
+
protected setValueHigh(high: number): void;
|
|
95
|
+
protected setValue(low: number, high: number, lockValueRange?: boolean): void;
|
|
96
|
+
protected getFormElement(): HTMLInputElement;
|
|
97
|
+
/** Elements */
|
|
98
|
+
private _outerTrack;
|
|
100
99
|
private _inputLow;
|
|
101
100
|
private _inputHigh;
|
|
102
|
-
private _outerTrack;
|
|
103
|
-
private _innerTrack;
|
|
104
|
-
private _thumbLow;
|
|
105
|
-
private _thumbHigh;
|
|
106
101
|
private _innerColor;
|
|
107
|
-
private
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
private _innerColorThumb;
|
|
103
|
+
/** Constructor and Validator */
|
|
104
|
+
constructor();
|
|
105
|
+
connectedCallback(): void;
|
|
106
|
+
firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
107
|
+
private _runPropertiesChecks;
|
|
108
|
+
private _updateInnerColor;
|
|
109
|
+
private _getClickedValue;
|
|
110
|
+
/** Events */
|
|
110
111
|
private _onKeypress;
|
|
111
|
-
/**
|
|
112
|
-
private _sliderLowThumbPosition;
|
|
113
|
-
private _sliderHighThumbPosition;
|
|
114
|
-
/** Coloring of the line between thumbs */
|
|
115
|
-
private _fillColor;
|
|
116
|
-
/** Moving thumb */
|
|
117
|
-
private _moveThumb;
|
|
118
|
-
/** Mouse events */
|
|
119
|
-
private _onMouseDown;
|
|
120
|
-
private _onMouseMove;
|
|
121
|
-
private _onMouseUp;
|
|
122
|
-
/** Touch / mobile events */
|
|
112
|
+
/** Touch Event */
|
|
123
113
|
private _onTouchStart;
|
|
124
114
|
private _onTouchMove;
|
|
125
115
|
private _onTouchEnd;
|
|
126
|
-
/** */
|
|
127
|
-
private
|
|
128
|
-
|
|
129
|
-
private
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
private
|
|
133
|
-
|
|
134
|
-
private _validateLowByMaxGap;
|
|
135
|
-
private _validateHighByMinGap;
|
|
136
|
-
private _validateHighByMaxGap;
|
|
137
|
-
private _validateValueBasedOnCurrentThumb;
|
|
138
|
-
/** Methods when moving both thumbs */
|
|
139
|
-
private _saveStartPoint;
|
|
140
|
-
private _moveBoth;
|
|
141
|
-
private _getValidatedValues;
|
|
142
|
-
/** CHANGE AND INPUT EVENT LISTENERS */
|
|
143
|
-
private _onChange;
|
|
116
|
+
/** Mouse Event */
|
|
117
|
+
private _onMouseDown;
|
|
118
|
+
private _onMouseMove;
|
|
119
|
+
private _onMouseUp;
|
|
120
|
+
/** Drag both thumbs logics */
|
|
121
|
+
private _saveStartPoints;
|
|
122
|
+
private _dragBothValuesByMousePos;
|
|
123
|
+
/** Input Events */
|
|
144
124
|
private _onLowInput;
|
|
145
125
|
private _onHighInput;
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/**
|
|
126
|
+
/** Change Events */
|
|
127
|
+
private _onLowChange;
|
|
128
|
+
private _onHighChange;
|
|
129
|
+
protected onChanged(): void;
|
|
130
|
+
/** Render */
|
|
151
131
|
render(): import("lit-html").TemplateResult<1>;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
132
|
+
private _renderThumbValues;
|
|
133
|
+
private _renderSteps;
|
|
134
|
+
private _renderStepValues;
|
|
135
|
+
private _renderStepCircles;
|
|
136
|
+
private _renderNativeInputs;
|
|
137
|
+
/** Style */
|
|
158
138
|
static styles: import("lit").CSSResult[];
|
|
159
139
|
}
|
|
160
140
|
declare global {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-range-slider",
|
|
3
|
-
"version": "1.5.0
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.5.0
|
|
33
|
+
"@umbraco-ui/uui-base": "1.5.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-range-slider",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "80279d910777f210227a4ed95762bc91d005a273"
|
|
45
45
|
}
|