@umbraco-ui/uui-range-slider 1.2.0-rc.1 → 1.2.0-rc.3
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 +36 -26
- package/lib/index.js +508 -427
- package/lib/uui-range-slider.element.d.ts +76 -49
- package/package.json +3 -3
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, nothing } 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
|
|
5
5
|
* @description - Range slider with two handles. Use uui-slider for a single handle.
|
|
6
|
+
* @fires UUIRangeSliderEvent#input on input
|
|
7
|
+
* @fires UUIRangeSliderEvent#change on change
|
|
6
8
|
*/
|
|
7
9
|
export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
10
|
+
#private;
|
|
8
11
|
static styles: import("lit").CSSResult[];
|
|
9
12
|
static readonly formAssociated = true;
|
|
10
13
|
/**
|
|
@@ -34,28 +37,34 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
|
34
37
|
* @default false
|
|
35
38
|
*/
|
|
36
39
|
hideStepValues: boolean;
|
|
37
|
-
private _min;
|
|
38
|
-
private _max;
|
|
39
|
-
private _valueLow;
|
|
40
|
-
private _valueHigh;
|
|
41
|
-
private _minGap;
|
|
42
|
-
private _maxGap?;
|
|
43
40
|
/**
|
|
44
41
|
* Sets the minimum allowed value.
|
|
45
42
|
* @type {number}
|
|
46
43
|
* @attr min
|
|
47
44
|
* @default 0
|
|
48
45
|
*/
|
|
49
|
-
|
|
50
|
-
get min(): number;
|
|
46
|
+
min: number;
|
|
51
47
|
/**
|
|
52
48
|
* Sets the maximum allowed value.
|
|
53
49
|
* @type {number}
|
|
54
50
|
* @attr max
|
|
55
51
|
* @default 100
|
|
56
52
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
max: number;
|
|
54
|
+
/**
|
|
55
|
+
* Minimum value gap between the the two picked values. Cannot be lower than the step value and cannot be higher than the maximum gap
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @attr min-gap
|
|
58
|
+
* @default undefined
|
|
59
|
+
*/
|
|
60
|
+
minGap?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Maximum value gap between the the two picked values. Cannot be lower than the minimum gap.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @attr max-gap
|
|
65
|
+
* @default undefined
|
|
66
|
+
*/
|
|
67
|
+
maxGap?: number;
|
|
59
68
|
/**
|
|
60
69
|
* This is a value property of the uui-range-slider. Split the two values with comma, forexample 10,50 sets the values to 10 and 50.
|
|
61
70
|
* @type {string}
|
|
@@ -64,71 +73,89 @@ export declare class UUIRangeSliderElement extends UUIRangeSliderElement_base {
|
|
|
64
73
|
*/
|
|
65
74
|
get value(): FormDataEntryValue | FormData;
|
|
66
75
|
set value(newVal: FormDataEntryValue | FormData);
|
|
76
|
+
private _valueLow;
|
|
67
77
|
/**
|
|
68
78
|
* The lower picked value.
|
|
69
79
|
* @type {number}
|
|
70
80
|
* @attr value-low
|
|
71
81
|
* @default 0
|
|
72
82
|
*/
|
|
73
|
-
set valueLow(
|
|
83
|
+
set valueLow(newLow: number);
|
|
74
84
|
get valueLow(): number;
|
|
85
|
+
private _valueHigh;
|
|
75
86
|
/**
|
|
76
87
|
* The higher picked value.
|
|
77
88
|
* @type {number}
|
|
78
89
|
* @attr value-high
|
|
79
90
|
* @default 100
|
|
80
91
|
*/
|
|
81
|
-
set valueHigh(
|
|
92
|
+
set valueHigh(newHigh: number);
|
|
82
93
|
get valueHigh(): number;
|
|
83
|
-
/**
|
|
84
|
-
* Minimum value gap between the the two picked values. Cannot be lower than the step value and cannot be higher than the maximum gap
|
|
85
|
-
* @type {number}
|
|
86
|
-
* @attr min-gap
|
|
87
|
-
* @default 1
|
|
88
|
-
*/
|
|
89
|
-
set minGap(newVal: number);
|
|
90
|
-
get minGap(): number;
|
|
91
|
-
/**
|
|
92
|
-
* Maximum value gap between the the two picked values. Cannot be lower than the minimum gap.
|
|
93
|
-
* @type {number}
|
|
94
|
-
* @attr max-gap
|
|
95
|
-
* @default undefined
|
|
96
|
-
*/
|
|
97
|
-
set maxGap(newVal: number | undefined);
|
|
98
|
-
get maxGap(): number | undefined;
|
|
99
94
|
private _trackWidth;
|
|
100
|
-
private
|
|
95
|
+
private _currentInputFocus?;
|
|
96
|
+
private _currentThumbFocus;
|
|
97
|
+
private _grabbingBoth?;
|
|
98
|
+
private _startPos;
|
|
99
|
+
private _startLow;
|
|
100
|
+
private _startHigh;
|
|
101
101
|
private _inputLow;
|
|
102
102
|
private _inputHigh;
|
|
103
|
-
private
|
|
104
|
-
private
|
|
103
|
+
private _outerTrack;
|
|
104
|
+
private _innerTrack;
|
|
105
|
+
private _thumbLow;
|
|
106
|
+
private _thumbHigh;
|
|
105
107
|
private _innerColor;
|
|
108
|
+
private _bothThumbsTarget;
|
|
109
|
+
protected getFormElement(): HTMLInputElement;
|
|
106
110
|
focus(): void;
|
|
107
|
-
protected getFormElement(): HTMLElement;
|
|
108
|
-
private _onMinInput;
|
|
109
|
-
private _onMaxInput;
|
|
110
|
-
private _onChange;
|
|
111
|
-
private _fillColor;
|
|
112
111
|
private _onKeypress;
|
|
113
|
-
|
|
114
|
-
private
|
|
115
|
-
private
|
|
112
|
+
/** Thumb position */
|
|
113
|
+
private _sliderLowThumbPosition;
|
|
114
|
+
private _sliderHighThumbPosition;
|
|
115
|
+
/** Coloring of the line between thumbs */
|
|
116
|
+
private _fillColor;
|
|
117
|
+
/** Moving thumb */
|
|
118
|
+
private _moveThumb;
|
|
119
|
+
/** Mouse events */
|
|
116
120
|
private _onMouseDown;
|
|
117
121
|
private _onMouseMove;
|
|
118
122
|
private _onMouseUp;
|
|
119
|
-
|
|
123
|
+
/** Touch / mobile events */
|
|
124
|
+
private _onTouchStart;
|
|
125
|
+
private _onTouchMove;
|
|
126
|
+
private _onTouchEnd;
|
|
127
|
+
/** */
|
|
128
|
+
private _stop;
|
|
129
|
+
/** The latest thumb in use */
|
|
130
|
+
private _setThumb;
|
|
131
|
+
private _setValueBasedOnCurrentThumb;
|
|
132
|
+
/** Get the value depends on where clicked/touched */
|
|
120
133
|
private _getValue;
|
|
121
|
-
private
|
|
122
|
-
private
|
|
134
|
+
private _validateLowByMinGap;
|
|
135
|
+
private _validateLowByMaxGap;
|
|
136
|
+
private _validateHighByMinGap;
|
|
137
|
+
private _validateHighByMaxGap;
|
|
138
|
+
private _validateValueBasedOnCurrentThumb;
|
|
139
|
+
/** Methods when moving both thumbs */
|
|
140
|
+
private _saveStartPoint;
|
|
141
|
+
private _moveBoth;
|
|
142
|
+
private _getValidatedValues;
|
|
143
|
+
/** CHANGE AND INPUT EVENT LISTENERS */
|
|
144
|
+
private _onChange;
|
|
145
|
+
private _onLowInput;
|
|
146
|
+
private _onHighInput;
|
|
147
|
+
/** Constructor */
|
|
123
148
|
constructor();
|
|
124
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
125
149
|
connectedCallback(): void;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
renderSteps(): import("lit-html").TemplateResult<2>;
|
|
129
|
-
renderStepValues(hide: boolean): import("lit-html").TemplateResult<1>;
|
|
130
|
-
private _onInputMouseDown;
|
|
150
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
151
|
+
/** RENDER */
|
|
131
152
|
render(): import("lit-html").TemplateResult<1>;
|
|
153
|
+
renderNativeInputs(): import("lit-html").TemplateResult<1>;
|
|
154
|
+
renderThumbs(): import("lit-html").TemplateResult<1>;
|
|
155
|
+
/** RENDER STEPS & STEP VALUES */
|
|
156
|
+
renderStepsOutput(): import("lit-html").TemplateResult<1>;
|
|
157
|
+
renderSteps(): import("lit-html").TemplateResult<2>;
|
|
158
|
+
renderStepValues(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
132
159
|
}
|
|
133
160
|
declare global {
|
|
134
161
|
interface HTMLElementTagNameMap {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-range-slider",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.3",
|
|
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.2.0-rc.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.2.0-rc.3"
|
|
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": "ea5983f5f13e95944adba0174839548b11154b4a"
|
|
45
45
|
}
|