@spectrum-web-components/slider 0.12.13 → 0.12.15-devmode.7
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/README.md +16 -0
- package/custom-elements.json +40 -0
- package/package.json +41 -16
- package/sp-slider-handle.dev.js +3 -0
- package/sp-slider-handle.dev.js.map +7 -0
- package/sp-slider-handle.js +3 -14
- package/sp-slider-handle.js.map +7 -1
- package/sp-slider.dev.js +4 -0
- package/sp-slider.dev.js.map +7 -0
- package/sp-slider.js +4 -15
- package/sp-slider.js.map +7 -1
- package/src/HandleController.dev.js +434 -0
- package/src/HandleController.dev.js.map +7 -0
- package/src/HandleController.js +402 -451
- package/src/HandleController.js.map +7 -1
- package/src/Slider.d.ts +8 -0
- package/src/Slider.dev.js +367 -0
- package/src/Slider.dev.js.map +7 -0
- package/src/Slider.js +282 -289
- package/src/Slider.js.map +7 -1
- package/src/SliderHandle.dev.js +184 -0
- package/src/SliderHandle.dev.js.map +7 -0
- package/src/SliderHandle.js +171 -179
- package/src/SliderHandle.js.map +7 -1
- package/src/index.dev.js +4 -0
- package/src/index.dev.js.map +7 -0
- package/src/index.js +4 -15
- package/src/index.js.map +7 -1
- package/src/slider.css.dev.js +234 -0
- package/src/slider.css.dev.js.map +7 -0
- package/src/slider.css.js +3 -14
- package/src/slider.css.js.map +7 -1
- package/src/spectrum-slider.css.dev.js +216 -0
- package/src/spectrum-slider.css.dev.js.map +7 -0
- package/src/spectrum-slider.css.js +3 -14
- package/src/spectrum-slider.css.js.map +7 -1
- package/stories/slider.stories.js +257 -267
- package/stories/slider.stories.js.map +7 -1
- package/sync/sp-slider.dev.js +3 -0
- package/sync/sp-slider.dev.js.map +7 -0
- package/sync/sp-slider.js +3 -14
- package/sync/sp-slider.js.map +7 -1
- package/test/benchmark/test-basic.js +5 -16
- package/test/benchmark/test-basic.js.map +7 -1
- package/test/slider-editable-sync.test.js +132 -144
- package/test/slider-editable-sync.test.js.map +7 -1
- package/test/slider-editable.test.js +151 -144
- package/test/slider-editable.test.js.map +7 -1
- package/test/slider-handle-upgrade.test.js +10 -21
- package/test/slider-handle-upgrade.test.js.map +7 -1
- package/test/slider.test-vrt.js +4 -15
- package/test/slider.test-vrt.js.map +7 -1
- package/test/slider.test.js +686 -700
- package/test/slider.test.js.map +7 -1
package/src/SliderHandle.js
CHANGED
|
@@ -1,192 +1,184 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
13
|
+
import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
|
|
14
|
+
import {
|
|
15
|
+
NumberFormatter
|
|
16
|
+
} from "@internationalized/number";
|
|
16
17
|
export const defaultNormalization = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
toNormalized(value, min, max) {
|
|
19
|
+
return (value - min) / (max - min);
|
|
20
|
+
},
|
|
21
|
+
fromNormalized(value, min, max) {
|
|
22
|
+
return value * (max - min) + min;
|
|
23
|
+
}
|
|
23
24
|
};
|
|
24
25
|
const MinConverter = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
fromAttribute: (value) => {
|
|
27
|
+
if (value === "previous")
|
|
28
|
+
return value;
|
|
29
|
+
return parseFloat(value);
|
|
30
|
+
},
|
|
31
|
+
toAttribute: (value) => {
|
|
32
|
+
return value.toString();
|
|
33
|
+
}
|
|
33
34
|
};
|
|
34
35
|
const MaxConverter = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
fromAttribute: (value) => {
|
|
37
|
+
if (value === "next")
|
|
38
|
+
return value;
|
|
39
|
+
return parseFloat(value);
|
|
40
|
+
},
|
|
41
|
+
toAttribute: (value) => {
|
|
42
|
+
return value.toString();
|
|
43
|
+
}
|
|
43
44
|
};
|
|
44
|
-
/**
|
|
45
|
-
* @element sp-slider-handle
|
|
46
|
-
*
|
|
47
|
-
* @fires input - The value of the element has changed.
|
|
48
|
-
* @fires change - An alteration to the value of the element has been committed by the user.
|
|
49
|
-
*/
|
|
50
45
|
export class SliderHandle extends Focusable {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
delete this._numberFormatCache;
|
|
77
|
-
}
|
|
78
|
-
if (changes.has('value')) {
|
|
79
|
-
const oldValue = changes.get('value');
|
|
80
|
-
if (oldValue != null) {
|
|
81
|
-
this.updateComplete.then(() => {
|
|
82
|
-
var _a;
|
|
83
|
-
(_a = this.handleController) === null || _a === void 0 ? void 0 : _a.setValueFromHandle(this);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
(_a = this.handleController) === null || _a === void 0 ? void 0 : _a.handleHasChanged(this);
|
|
88
|
-
super.update(changes);
|
|
89
|
-
}
|
|
90
|
-
firstUpdated(changedProperties) {
|
|
91
|
-
super.firstUpdated(changedProperties);
|
|
92
|
-
this.dispatchEvent(new CustomEvent('sp-slider-handle-ready'));
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
|
+
this._forcedUnit = "";
|
|
49
|
+
this.value = 10;
|
|
50
|
+
this.dragging = false;
|
|
51
|
+
this.highlight = false;
|
|
52
|
+
this.name = "";
|
|
53
|
+
this.resolvedLanguage = document.documentElement.lang || navigator.language;
|
|
54
|
+
this.label = "";
|
|
55
|
+
this.getAriaHandleText = (value, numberFormat) => {
|
|
56
|
+
return numberFormat.format(value);
|
|
57
|
+
};
|
|
58
|
+
this.normalization = defaultNormalization;
|
|
59
|
+
}
|
|
60
|
+
get handleName() {
|
|
61
|
+
return this.name;
|
|
62
|
+
}
|
|
63
|
+
get focusElement() {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return (_b = (_a = this.handleController) == null ? void 0 : _a.inputForHandle(this)) != null ? _b : this;
|
|
66
|
+
}
|
|
67
|
+
update(changes) {
|
|
68
|
+
var _a;
|
|
69
|
+
if (changes.has("formatOptions") || changes.has("resolvedLanguage")) {
|
|
70
|
+
delete this._numberFormatCache;
|
|
93
71
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
72
|
+
if (changes.has("value")) {
|
|
73
|
+
const oldValue = changes.get("value");
|
|
74
|
+
if (oldValue != null) {
|
|
75
|
+
this.updateComplete.then(() => {
|
|
76
|
+
var _a2;
|
|
77
|
+
(_a2 = this.handleController) == null ? void 0 : _a2.setValueFromHandle(this);
|
|
98
78
|
});
|
|
99
|
-
|
|
79
|
+
}
|
|
100
80
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
81
|
+
(_a = this.handleController) == null ? void 0 : _a.handleHasChanged(this);
|
|
82
|
+
super.update(changes);
|
|
83
|
+
}
|
|
84
|
+
firstUpdated(changedProperties) {
|
|
85
|
+
super.firstUpdated(changedProperties);
|
|
86
|
+
this.dispatchEvent(new CustomEvent("sp-slider-handle-ready"));
|
|
87
|
+
}
|
|
88
|
+
dispatchInputEvent() {
|
|
89
|
+
const inputEvent = new Event("input", {
|
|
90
|
+
bubbles: true,
|
|
91
|
+
composed: true
|
|
92
|
+
});
|
|
93
|
+
this.dispatchEvent(inputEvent);
|
|
94
|
+
}
|
|
95
|
+
getNumberFormat() {
|
|
96
|
+
var _a;
|
|
97
|
+
if (!this._numberFormatCache || this.resolvedLanguage !== this._numberFormatCache.language) {
|
|
98
|
+
let numberFormatter;
|
|
99
|
+
try {
|
|
100
|
+
numberFormatter = new NumberFormatter(this.resolvedLanguage, this.formatOptions);
|
|
101
|
+
this._forcedUnit = "";
|
|
102
|
+
} catch (error) {
|
|
103
|
+
const {
|
|
104
|
+
style,
|
|
105
|
+
unit,
|
|
106
|
+
unitDisplay,
|
|
107
|
+
...formatOptionsNoUnit
|
|
108
|
+
} = this.formatOptions || {};
|
|
109
|
+
if (style === "unit") {
|
|
110
|
+
this._forcedUnit = unit;
|
|
125
111
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return this.getNumberFormat();
|
|
133
|
-
}
|
|
134
|
-
connectedCallback() {
|
|
135
|
-
super.connectedCallback();
|
|
136
|
-
this.resolveLanguage();
|
|
137
|
-
}
|
|
138
|
-
disconnectedCallback() {
|
|
139
|
-
this.resolveLanguage();
|
|
140
|
-
super.disconnectedCallback();
|
|
141
|
-
}
|
|
142
|
-
resolveLanguage() {
|
|
143
|
-
const queryThemeEvent = new CustomEvent('sp-language-context', {
|
|
144
|
-
bubbles: true,
|
|
145
|
-
composed: true,
|
|
146
|
-
detail: {
|
|
147
|
-
callback: (lang) => {
|
|
148
|
-
this.resolvedLanguage = lang;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
cancelable: true,
|
|
152
|
-
});
|
|
153
|
-
this.dispatchEvent(queryThemeEvent);
|
|
112
|
+
numberFormatter = new NumberFormatter(this.resolvedLanguage, formatOptionsNoUnit);
|
|
113
|
+
}
|
|
114
|
+
this._numberFormatCache = {
|
|
115
|
+
language: this.resolvedLanguage,
|
|
116
|
+
numberFormat: numberFormatter
|
|
117
|
+
};
|
|
154
118
|
}
|
|
119
|
+
return (_a = this._numberFormatCache) == null ? void 0 : _a.numberFormat;
|
|
120
|
+
}
|
|
121
|
+
get numberFormat() {
|
|
122
|
+
if (!this.formatOptions)
|
|
123
|
+
return;
|
|
124
|
+
return this.getNumberFormat();
|
|
125
|
+
}
|
|
126
|
+
connectedCallback() {
|
|
127
|
+
super.connectedCallback();
|
|
128
|
+
this.resolveLanguage();
|
|
129
|
+
}
|
|
130
|
+
disconnectedCallback() {
|
|
131
|
+
this.resolveLanguage();
|
|
132
|
+
super.disconnectedCallback();
|
|
133
|
+
}
|
|
134
|
+
resolveLanguage() {
|
|
135
|
+
const queryThemeEvent = new CustomEvent("sp-language-context", {
|
|
136
|
+
bubbles: true,
|
|
137
|
+
composed: true,
|
|
138
|
+
detail: {
|
|
139
|
+
callback: (lang) => {
|
|
140
|
+
this.resolvedLanguage = lang;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
cancelable: true
|
|
144
|
+
});
|
|
145
|
+
this.dispatchEvent(queryThemeEvent);
|
|
146
|
+
}
|
|
155
147
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
], SliderHandle.prototype, "value",
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
], SliderHandle.prototype, "dragging",
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
], SliderHandle.prototype, "highlight",
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
], SliderHandle.prototype, "name",
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
], SliderHandle.prototype, "min",
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
], SliderHandle.prototype, "max",
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
], SliderHandle.prototype, "resolvedLanguage",
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
], SliderHandle.prototype, "step",
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
], SliderHandle.prototype, "formatOptions",
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
], SliderHandle.prototype, "label",
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
], SliderHandle.prototype, "getAriaHandleText",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
], SliderHandle.prototype, "normalization",
|
|
192
|
-
//# sourceMappingURL=SliderHandle.js.map
|
|
148
|
+
__decorateClass([
|
|
149
|
+
property({ type: Number })
|
|
150
|
+
], SliderHandle.prototype, "value", 2);
|
|
151
|
+
__decorateClass([
|
|
152
|
+
property({ type: Boolean, reflect: true })
|
|
153
|
+
], SliderHandle.prototype, "dragging", 2);
|
|
154
|
+
__decorateClass([
|
|
155
|
+
property({ type: Boolean })
|
|
156
|
+
], SliderHandle.prototype, "highlight", 2);
|
|
157
|
+
__decorateClass([
|
|
158
|
+
property({ type: String })
|
|
159
|
+
], SliderHandle.prototype, "name", 2);
|
|
160
|
+
__decorateClass([
|
|
161
|
+
property({ reflect: true, converter: MinConverter })
|
|
162
|
+
], SliderHandle.prototype, "min", 2);
|
|
163
|
+
__decorateClass([
|
|
164
|
+
property({ reflect: true, converter: MaxConverter })
|
|
165
|
+
], SliderHandle.prototype, "max", 2);
|
|
166
|
+
__decorateClass([
|
|
167
|
+
property({ attribute: false })
|
|
168
|
+
], SliderHandle.prototype, "resolvedLanguage", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
property({ type: Number, reflect: true })
|
|
171
|
+
], SliderHandle.prototype, "step", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
property({ type: Object, attribute: "format-options" })
|
|
174
|
+
], SliderHandle.prototype, "formatOptions", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
property({ type: String })
|
|
177
|
+
], SliderHandle.prototype, "label", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
property({ attribute: false })
|
|
180
|
+
], SliderHandle.prototype, "getAriaHandleText", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
property({ attribute: false })
|
|
183
|
+
], SliderHandle.prototype, "normalization", 2);
|
|
184
|
+
//# sourceMappingURL=SliderHandle.js.map
|
package/src/SliderHandle.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"SliderHandle.js","sourceRoot":"","sources":["SliderHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAGF,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAE7E,OAAO,EAEH,eAAe,GAClB,MAAM,2BAA2B,CAAC;AAsBnC,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACrD,YAAY,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QAChD,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACvC,CAAC;IACD,cAAc,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QAClD,OAAO,KA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ache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { PropertyValues } from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport { ProvideLang } from '@spectrum-web-components/theme';\nimport {\n NumberFormatOptions,\n NumberFormatter,\n} from '@internationalized/number';\n\nexport type HandleMin = number | 'previous';\nexport type HandleMax = number | 'next';\n\nexport type HandleValues = {\n name: string;\n value: number;\n}[];\n\nexport interface Controller {\n inputForHandle(handle: SliderHandle): HTMLInputElement | undefined;\n requestUpdate(): void;\n setValueFromHandle(handle: SliderHandle): void;\n handleHasChanged(handle: SliderHandle): void;\n}\n\nexport type SliderNormalization = {\n toNormalized: (value: number, min: number, max: number) => number;\n fromNormalized: (value: number, min: number, max: number) => number;\n};\n\nexport const defaultNormalization: SliderNormalization = {\n toNormalized(value: number, min: number, max: number) {\n return (value - min) / (max - min);\n },\n fromNormalized(value: number, min: number, max: number) {\n return value * (max - min) + min;\n },\n};\n\nconst MinConverter = {\n fromAttribute: (value: string): number | 'previous' => {\n if (value === 'previous') return value;\n return parseFloat(value);\n },\n toAttribute: (value: 'previous' | number): string => {\n return value.toString();\n },\n};\n\nconst MaxConverter = {\n fromAttribute: (value: string): number | 'next' => {\n if (value === 'next') return value;\n return parseFloat(value);\n },\n toAttribute: (value: 'next' | number): string => {\n return value.toString();\n },\n};\n\n/**\n * @element sp-slider-handle\n *\n * @fires input - The value of the element has changed.\n * @fires change - An alteration to the value of the element has been committed by the user.\n */\nexport class SliderHandle extends Focusable {\n public handleController?: Controller;\n\n public get handleName(): string {\n return this.name;\n }\n\n public override get focusElement(): HTMLElement {\n /* c8 ignore next */\n return this.handleController?.inputForHandle(this) ?? this;\n }\n\n _forcedUnit = '';\n\n @property({ type: Number })\n value = 10;\n\n @property({ type: Boolean, reflect: true })\n public dragging = false;\n\n @property({ type: Boolean })\n public highlight = false;\n\n @property({ type: String })\n public name = '';\n\n @property({ reflect: true, converter: MinConverter })\n public min?: number | 'previous';\n\n @property({ reflect: true, converter: MaxConverter })\n public max?: number | 'next';\n\n @property({ attribute: false })\n private resolvedLanguage =\n document.documentElement.lang || navigator.language;\n\n @property({ type: Number, reflect: true })\n public step?: number;\n\n @property({ type: Object, attribute: 'format-options' })\n public formatOptions?: NumberFormatOptions;\n\n @property({ type: String })\n public label = '';\n\n @property({ attribute: false })\n public getAriaHandleText: (\n value: number,\n numberFormat: NumberFormatter\n ) => string = (value, numberFormat) => {\n return numberFormat.format(value);\n };\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('formatOptions') || changes.has('resolvedLanguage')) {\n delete this._numberFormatCache;\n }\n if (changes.has('value')) {\n const oldValue = changes.get('value');\n if (oldValue != null) {\n this.updateComplete.then(() => {\n this.handleController?.setValueFromHandle(this);\n });\n }\n }\n this.handleController?.handleHasChanged(this);\n super.update(changes);\n }\n\n protected override firstUpdated(\n changedProperties: PropertyValues<this>\n ): void {\n super.firstUpdated(changedProperties);\n this.dispatchEvent(new CustomEvent('sp-slider-handle-ready'));\n }\n\n @property({ attribute: false })\n public normalization: SliderNormalization = defaultNormalization;\n\n public dispatchInputEvent(): void {\n const inputEvent = new Event('input', {\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(inputEvent);\n }\n\n protected _numberFormatCache:\n | { numberFormat: NumberFormatter; language: string }\n | undefined;\n protected getNumberFormat(): NumberFormatter {\n /* c8 ignore next */\n if (\n !this._numberFormatCache ||\n this.resolvedLanguage !== this._numberFormatCache.language\n ) {\n let numberFormatter: NumberFormatter;\n try {\n numberFormatter = new NumberFormatter(\n this.resolvedLanguage,\n this.formatOptions\n );\n this._forcedUnit = '';\n // numberFormatter.format(1);\n } catch (error) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions || {};\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n numberFormatter = new NumberFormatter(\n this.resolvedLanguage,\n formatOptionsNoUnit\n );\n }\n this._numberFormatCache = {\n language: this.resolvedLanguage,\n numberFormat: numberFormatter,\n };\n }\n /* c8 ignore next */\n return this._numberFormatCache?.numberFormat;\n }\n\n public get numberFormat(): NumberFormatter | undefined {\n if (!this.formatOptions) return;\n return this.getNumberFormat();\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.resolveLanguage();\n }\n\n public override disconnectedCallback(): void {\n this.resolveLanguage();\n super.disconnectedCallback();\n }\n\n private resolveLanguage(): void {\n const queryThemeEvent = new CustomEvent<ProvideLang>(\n 'sp-language-context',\n {\n bubbles: true,\n composed: true,\n detail: {\n callback: (lang: string) => {\n this.resolvedLanguage = lang;\n },\n },\n cancelable: true,\n }\n );\n this.dispatchEvent(queryThemeEvent);\n }\n}\n"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["SliderHandle.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2021 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { PropertyValues } from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport { ProvideLang } from '@spectrum-web-components/theme';\nimport {\n NumberFormatOptions,\n NumberFormatter,\n} from '@internationalized/number';\n\nexport type HandleMin = number | 'previous';\nexport type HandleMax = number | 'next';\n\nexport type HandleValues = {\n name: string;\n value: number;\n}[];\n\nexport interface Controller {\n inputForHandle(handle: SliderHandle): HTMLInputElement | undefined;\n requestUpdate(): void;\n setValueFromHandle(handle: SliderHandle): void;\n handleHasChanged(handle: SliderHandle): void;\n}\n\nexport type SliderNormalization = {\n toNormalized: (value: number, min: number, max: number) => number;\n fromNormalized: (value: number, min: number, max: number) => number;\n};\n\nexport const defaultNormalization: SliderNormalization = {\n toNormalized(value: number, min: number, max: number) {\n return (value - min) / (max - min);\n },\n fromNormalized(value: number, min: number, max: number) {\n return value * (max - min) + min;\n },\n};\n\nconst MinConverter = {\n fromAttribute: (value: string): number | 'previous' => {\n if (value === 'previous') return value;\n return parseFloat(value);\n },\n toAttribute: (value: 'previous' | number): string => {\n return value.toString();\n },\n};\n\nconst MaxConverter = {\n fromAttribute: (value: string): number | 'next' => {\n if (value === 'next') return value;\n return parseFloat(value);\n },\n toAttribute: (value: 'next' | number): string => {\n return value.toString();\n },\n};\n\n/**\n * @element sp-slider-handle\n *\n * @fires input - The value of the element has changed.\n * @fires change - An alteration to the value of the element has been committed by the user.\n */\nexport class SliderHandle extends Focusable {\n public handleController?: Controller;\n\n public get handleName(): string {\n return this.name;\n }\n\n public override get focusElement(): HTMLElement {\n /* c8 ignore next */\n return this.handleController?.inputForHandle(this) ?? this;\n }\n\n _forcedUnit = '';\n\n @property({ type: Number })\n value = 10;\n\n @property({ type: Boolean, reflect: true })\n public dragging = false;\n\n @property({ type: Boolean })\n public highlight = false;\n\n @property({ type: String })\n public name = '';\n\n @property({ reflect: true, converter: MinConverter })\n public min?: number | 'previous';\n\n @property({ reflect: true, converter: MaxConverter })\n public max?: number | 'next';\n\n @property({ attribute: false })\n private resolvedLanguage =\n document.documentElement.lang || navigator.language;\n\n @property({ type: Number, reflect: true })\n public step?: number;\n\n @property({ type: Object, attribute: 'format-options' })\n public formatOptions?: NumberFormatOptions;\n\n @property({ type: String })\n public label = '';\n\n @property({ attribute: false })\n public getAriaHandleText: (\n value: number,\n numberFormat: NumberFormatter\n ) => string = (value, numberFormat) => {\n return numberFormat.format(value);\n };\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('formatOptions') || changes.has('resolvedLanguage')) {\n delete this._numberFormatCache;\n }\n if (changes.has('value')) {\n const oldValue = changes.get('value');\n if (oldValue != null) {\n this.updateComplete.then(() => {\n this.handleController?.setValueFromHandle(this);\n });\n }\n }\n this.handleController?.handleHasChanged(this);\n super.update(changes);\n }\n\n protected override firstUpdated(\n changedProperties: PropertyValues<this>\n ): void {\n super.firstUpdated(changedProperties);\n this.dispatchEvent(new CustomEvent('sp-slider-handle-ready'));\n }\n\n @property({ attribute: false })\n public normalization: SliderNormalization = defaultNormalization;\n\n public dispatchInputEvent(): void {\n const inputEvent = new Event('input', {\n bubbles: true,\n composed: true,\n });\n\n this.dispatchEvent(inputEvent);\n }\n\n protected _numberFormatCache:\n | { numberFormat: NumberFormatter; language: string }\n | undefined;\n protected getNumberFormat(): NumberFormatter {\n /* c8 ignore next */\n if (\n !this._numberFormatCache ||\n this.resolvedLanguage !== this._numberFormatCache.language\n ) {\n let numberFormatter: NumberFormatter;\n try {\n numberFormatter = new NumberFormatter(\n this.resolvedLanguage,\n this.formatOptions\n );\n this._forcedUnit = '';\n // numberFormatter.format(1);\n } catch (error) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions || {};\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n numberFormatter = new NumberFormatter(\n this.resolvedLanguage,\n formatOptionsNoUnit\n );\n }\n this._numberFormatCache = {\n language: this.resolvedLanguage,\n numberFormat: numberFormatter,\n };\n }\n /* c8 ignore next */\n return this._numberFormatCache?.numberFormat;\n }\n\n public get numberFormat(): NumberFormatter | undefined {\n if (!this.formatOptions) return;\n return this.getNumberFormat();\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.resolveLanguage();\n }\n\n public override disconnectedCallback(): void {\n this.resolveLanguage();\n super.disconnectedCallback();\n }\n\n private resolveLanguage(): void {\n const queryThemeEvent = new CustomEvent<ProvideLang>(\n 'sp-language-context',\n {\n bubbles: true,\n composed: true,\n detail: {\n callback: (lang: string) => {\n this.resolvedLanguage = lang;\n },\n },\n cancelable: true,\n }\n );\n this.dispatchEvent(queryThemeEvent);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAaA;AACA;AAEA;AAAA;AAAA;AAyBO,aAAM,uBAA4C;AAAA,EACrD,aAAa,OAAe,KAAa,KAAa;AAClD,WAAQ,SAAQ,OAAQ,OAAM;AAAA,EAClC;AAAA,EACA,eAAe,OAAe,KAAa,KAAa;AACpD,WAAO,QAAS,OAAM,OAAO;AAAA,EACjC;AACJ;AAEA,MAAM,eAAe;AAAA,EACjB,eAAe,CAAC,UAAuC;AACnD,QAAI,UAAU;AAAY,aAAO;AACjC,WAAO,WAAW,KAAK;AAAA,EAC3B;AAAA,EACA,aAAa,CAAC,UAAuC;AACjD,WAAO,MAAM,SAAS;AAAA,EAC1B;AACJ;AAEA,MAAM,eAAe;AAAA,EACjB,eAAe,CAAC,UAAmC;AAC/C,QAAI,UAAU;AAAQ,aAAO;AAC7B,WAAO,WAAW,KAAK;AAAA,EAC3B;AAAA,EACA,aAAa,CAAC,UAAmC;AAC7C,WAAO,MAAM,SAAS;AAAA,EAC1B;AACJ;AAQO,aAAM,qBAAqB,UAAU;AAAA,EAArC;AAAA;AAYH,uBAAc;AAGd,iBAAQ;AAGD,oBAAW;AAGX,qBAAY;AAGZ,gBAAO;AASN,4BACJ,SAAS,gBAAgB,QAAQ,UAAU;AASxC,iBAAQ;AAGR,6BAGO,CAAC,OAAO,iBAAiB;AACnC,aAAO,aAAa,OAAO,KAAK;AAAA,IACpC;AA0BO,yBAAqC;AAAA;AAAA,MA1EjC,aAAqB;A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AAAC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAClC,AArCJ,aAqCI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB,CAAC;AAAA,GAChD,AAxCJ,aAwCI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AA3CJ,aA2CI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GACvB,AA9CJ,aA8CI;AA+BA;AAAA,EADP,AAAC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GACvB,AA7EJ,aA6EI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.dev.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nexport * from './Slider.dev.js'\nexport * from './SliderHandle.dev.js'\nexport * from './HandleController.dev.js'\n"],
|
|
5
|
+
"mappings": "AAWA;AACA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export * from './Slider.js';
|
|
13
|
-
export * from './SliderHandle.js';
|
|
14
|
-
export * from './HandleController.js';
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./Slider.js";
|
|
2
|
+
export * from "./SliderHandle.js";
|
|
3
|
+
export * from "./HandleController.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nexport * from './Slider.js';\nexport * from './SliderHandle.js';\nexport * from './HandleController.js';\n"],
|
|
5
|
+
"mappings": "AAWA;AACA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|