@webquark/browser 1.1.0-dev.11 → 1.1.0-dev.12
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/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q-button_2.cjs.entry.js +2 -2
- package/dist/cjs/q-card.cjs.entry.js +1 -1
- package/dist/cjs/q-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q-dialog.cjs.entry.js +3 -3
- package/dist/cjs/q-divider.cjs.entry.js +1 -1
- package/dist/cjs/q-form.cjs.entry.js +1 -1
- package/dist/cjs/q-grid.cjs.entry.js +1 -1
- package/dist/cjs/q-image-comparison.cjs.entry.js +1 -1
- package/dist/cjs/q-inline.cjs.entry.js +1 -1
- package/dist/cjs/q-input_2.cjs.entry.js +1 -1
- package/dist/cjs/q-media.cjs.entry.js +1 -1
- package/dist/cjs/q-navbar.cjs.entry.js +2 -2
- package/dist/cjs/q-panel.cjs.entry.js +5 -5
- package/dist/cjs/q-reel.cjs.entry.js +3 -3
- package/dist/cjs/q-scrollable.cjs.entry.js +3 -3
- package/dist/cjs/q-section.cjs.entry.js +1 -1
- package/dist/cjs/q-sidepanel.cjs.entry.js +1 -1
- package/dist/cjs/q-slider.cjs.entry.js +122 -0
- package/dist/cjs/q-stack.cjs.entry.js +1 -1
- package/dist/cjs/q-step-diagram.cjs.entry.js +1 -1
- package/dist/cjs/q-tabs.cjs.entry.js +1 -1
- package/dist/cjs/q-thumbnail.cjs.entry.js +2 -2
- package/dist/cjs/q-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/webquark.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/inputs/form/internals/controls.js +1 -1
- package/dist/collection/components/inputs/slider/slider.css +44 -0
- package/dist/collection/components/inputs/slider/slider.js +383 -0
- package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
- package/dist/collection/components/layout/divider/divider.js +1 -1
- package/dist/collection/components/layout/grid/grid.js +1 -1
- package/dist/collection/components/layout/inline/inline.js +1 -1
- package/dist/collection/components/layout/navbar/navbar.js +2 -2
- package/dist/collection/components/layout/panel/panel.js +4 -4
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.js +1 -1
- package/dist/collection/components/layout/stack/stack.js +1 -1
- package/dist/collection/components/layout/tabs/tabs.js +1 -1
- package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
- package/dist/collection/components/media/avatar/avatar.js +1 -1
- package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
- package/dist/collection/components/media/media/media.js +1 -1
- package/dist/collection/components/media/reel/reel.js +2 -2
- package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/overlays/dialog/dialog.js +2 -2
- package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/dom.js +1 -1
- package/dist/components/{p-iXEnb5d5.js → p-4mHh96ug.js} +1 -1
- package/dist/components/{p-DBbiaYqQ.js → p-BKly3Y6e.js} +1 -1
- package/dist/components/{p--r63tfQH.js → p-BbY1XC6_.js} +1 -1
- package/dist/components/p-CArIPzJU.js +1 -0
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-divider.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-grid.js +1 -1
- package/dist/components/q-image-comparison.js +1 -1
- package/dist/components/q-inline.js +1 -1
- package/dist/components/q-media.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-section.js +1 -1
- package/dist/components/q-sidepanel.js +1 -1
- package/dist/components/q-slider.d.ts +11 -0
- package/dist/components/q-slider.js +1 -0
- package/dist/components/q-stack.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +1 -1
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{dom-ByfrUWx1.js → dom-CArIPzJU.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q-avatar.entry.js +1 -1
- package/dist/esm/q-button_2.entry.js +2 -2
- package/dist/esm/q-card.entry.js +1 -1
- package/dist/esm/q-carousel.entry.js +1 -1
- package/dist/esm/q-dialog.entry.js +3 -3
- package/dist/esm/q-divider.entry.js +1 -1
- package/dist/esm/q-form.entry.js +1 -1
- package/dist/esm/q-grid.entry.js +1 -1
- package/dist/esm/q-image-comparison.entry.js +1 -1
- package/dist/esm/q-inline.entry.js +1 -1
- package/dist/esm/q-input_2.entry.js +1 -1
- package/dist/esm/q-media.entry.js +1 -1
- package/dist/esm/q-navbar.entry.js +2 -2
- package/dist/esm/q-panel.entry.js +5 -5
- package/dist/esm/q-reel.entry.js +3 -3
- package/dist/esm/q-scrollable.entry.js +3 -3
- package/dist/esm/q-section.entry.js +1 -1
- package/dist/esm/q-sidepanel.entry.js +1 -1
- package/dist/esm/q-slider.entry.js +120 -0
- package/dist/esm/q-stack.entry.js +1 -1
- package/dist/esm/q-step-diagram.entry.js +1 -1
- package/dist/esm/q-tabs.entry.js +1 -1
- package/dist/esm/q-thumbnail.entry.js +2 -2
- package/dist/esm/q-toolbar.entry.js +2 -2
- package/dist/esm/webquark.js +1 -1
- package/dist/types/components/inputs/slider/slider.d.ts +45 -0
- package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
- package/dist/types/components.d.ts +136 -0
- package/dist/webquark/{p-191a7063.entry.js → p-01a59ac3.entry.js} +1 -1
- package/dist/webquark/{p-cab898c2.entry.js → p-156d2fcf.entry.js} +1 -1
- package/dist/webquark/p-253add6d.entry.js +1 -0
- package/dist/webquark/{p-32055acd.entry.js → p-253fb28b.entry.js} +1 -1
- package/dist/webquark/{p-e3c18c0e.entry.js → p-29897ae6.entry.js} +1 -1
- package/dist/webquark/{p-4d611b93.entry.js → p-2c195546.entry.js} +1 -1
- package/dist/webquark/p-2e26f158.entry.js +1 -0
- package/dist/webquark/{p-687be7d4.entry.js → p-33234157.entry.js} +1 -1
- package/dist/webquark/{p-a30d212f.entry.js → p-3430b43c.entry.js} +1 -1
- package/dist/webquark/{p-b9c8c081.entry.js → p-3726655f.entry.js} +1 -1
- package/dist/webquark/{p-220ec9cf.entry.js → p-45e0d213.entry.js} +1 -1
- package/dist/webquark/{p-a87f0bde.entry.js → p-58aaa98b.entry.js} +1 -1
- package/dist/webquark/{p-7723e966.entry.js → p-7a47e0c3.entry.js} +1 -1
- package/dist/webquark/p-848e040a.entry.js +1 -0
- package/dist/webquark/{p-10dc5cce.entry.js → p-881ecd5b.entry.js} +1 -1
- package/dist/webquark/p-99ed0b0d.entry.js +1 -0
- package/dist/webquark/p-CArIPzJU.js +1 -0
- package/dist/webquark/{p-0f04ceab.entry.js → p-aca37b06.entry.js} +1 -1
- package/dist/webquark/{p-70e3a23a.entry.js → p-b577b258.entry.js} +1 -1
- package/dist/webquark/{p-c662904e.entry.js → p-b702f60a.entry.js} +1 -1
- package/dist/webquark/p-c2edfa2c.entry.js +1 -0
- package/dist/webquark/{p-41deb44c.entry.js → p-dcea3702.entry.js} +1 -1
- package/dist/webquark/{p-1e8797d1.entry.js → p-e930a769.entry.js} +1 -1
- package/dist/webquark/{p-bf568cda.entry.js → p-f20ed85a.entry.js} +1 -1
- package/dist/webquark/{p-6d2d016a.entry.js → p-fa15a69b.entry.js} +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-2291095e.entry.js +0 -1
- package/dist/webquark/p-4cf40080.entry.js +0 -1
- package/dist/webquark/p-6a5033da.entry.js +0 -1
- package/dist/webquark/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-f63fd66f.entry.js +0 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { isFieldDisabled } from "../../../utils/form-field-state";
|
|
3
|
+
import { registerFormField } from "../../../utils/form-field-adapter";
|
|
4
|
+
/**
|
|
5
|
+
* Single-value range input with a themed track, glowing thumb and optional value badge.
|
|
6
|
+
* @part label - Label and value row.
|
|
7
|
+
* @part value - Current-value badge.
|
|
8
|
+
* @part input - Native range control.
|
|
9
|
+
*/
|
|
10
|
+
export class QSlider {
|
|
11
|
+
el;
|
|
12
|
+
/** Current value. Defaults to the minimum when omitted. */
|
|
13
|
+
value;
|
|
14
|
+
label;
|
|
15
|
+
/** Suffix for the displayed value, such as px or %. */
|
|
16
|
+
suffix = '';
|
|
17
|
+
showValue = true;
|
|
18
|
+
disabled = false;
|
|
19
|
+
min = 0;
|
|
20
|
+
max = 100;
|
|
21
|
+
step = 1;
|
|
22
|
+
name;
|
|
23
|
+
ariaLabel = null;
|
|
24
|
+
internals;
|
|
25
|
+
/** Numeric value emitted continuously while dragging or using the keyboard. */
|
|
26
|
+
qInput;
|
|
27
|
+
/** Numeric value emitted when the interaction is committed. */
|
|
28
|
+
qChange;
|
|
29
|
+
fieldDisabled = false;
|
|
30
|
+
inputEl;
|
|
31
|
+
initialValue;
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.initialValue = this.value;
|
|
34
|
+
this.normalize();
|
|
35
|
+
}
|
|
36
|
+
constraintsChanged() { this.normalize(); }
|
|
37
|
+
disabledChanged() { this.syncForm(); }
|
|
38
|
+
get lower() { return Number.isFinite(this.min) ? this.min : 0; }
|
|
39
|
+
get upper() { return Math.max(this.lower, Number.isFinite(this.max) ? this.max : 100); }
|
|
40
|
+
get increment() { return Number.isFinite(this.step) && this.step > 0 ? this.step : 1; }
|
|
41
|
+
normalize() {
|
|
42
|
+
const candidate = Number.isFinite(this.value) ? this.value : this.lower;
|
|
43
|
+
const steps = Math.round((Math.min(this.upper, Math.max(this.lower, candidate)) - this.lower) / this.increment);
|
|
44
|
+
const lastStep = Math.floor((this.upper - this.lower) / this.increment + 1e-10);
|
|
45
|
+
const next = Number((this.lower + Math.min(steps, lastStep) * this.increment).toPrecision(12));
|
|
46
|
+
if (this.value !== next)
|
|
47
|
+
this.value = next;
|
|
48
|
+
this.syncForm();
|
|
49
|
+
}
|
|
50
|
+
syncForm() {
|
|
51
|
+
this.fieldDisabled = isFieldDisabled(this.el, this.disabled);
|
|
52
|
+
this.internals?.setFormValue?.(this.fieldDisabled ? null : String(this.value ?? this.lower));
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
registerFormField(this.el, {
|
|
56
|
+
kind: 'text',
|
|
57
|
+
owner: () => this.internals?.form ?? null,
|
|
58
|
+
active: () => true,
|
|
59
|
+
value: () => String(this.value),
|
|
60
|
+
assign: value => { this.value = Number(value); this.normalize(); },
|
|
61
|
+
reconcile: () => this.normalize(),
|
|
62
|
+
reset: () => this.formResetCallback(),
|
|
63
|
+
validate: () => true,
|
|
64
|
+
});
|
|
65
|
+
this.syncForm();
|
|
66
|
+
}
|
|
67
|
+
formDisabledCallback() { this.syncForm(); }
|
|
68
|
+
formResetCallback() { this.value = this.initialValue; this.normalize(); }
|
|
69
|
+
formStateRestoreCallback(state) {
|
|
70
|
+
if (typeof state === 'string') {
|
|
71
|
+
this.value = Number(state);
|
|
72
|
+
this.normalize();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async focusElement() { this.inputEl?.focus(); }
|
|
76
|
+
onValue(event, committed) {
|
|
77
|
+
if (this.fieldDisabled)
|
|
78
|
+
return;
|
|
79
|
+
this.value = event.target.valueAsNumber;
|
|
80
|
+
this.normalize();
|
|
81
|
+
if (committed)
|
|
82
|
+
this.qChange.emit(this.value);
|
|
83
|
+
else
|
|
84
|
+
this.qInput.emit(this.value);
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
return (h("div", { key: '2768a521f895ff4e060fbfad3844c7617d1ab454', class: "field" }, (this.label || this.showValue) && h("div", { key: 'b0317ffdb85a1bc87ed259f32291bd433aec7378', class: "label-row", part: "label" }, this.label && h("label", { key: '83cf1561c36c515304bf866fe645a8afcf75be39', htmlFor: "range" }, this.label), this.showValue && h("span", { key: '471ae15a9b5e951d955ddc3b2ebac4e7ef8868f4', class: "badge", part: "value", "aria-hidden": "true" }, this.value, this.suffix)), h("input", { key: 'a2e4d500b85a3e4548c14b063919fbf2894b314b', ref: el => this.inputEl = el, id: "range", part: "input", type: "range", min: this.lower, max: this.upper, step: this.increment, value: this.value, disabled: this.fieldDisabled, "aria-label": this.ariaLabel || (!this.label ? 'Value' : undefined), "aria-valuetext": this.suffix ? `${this.value}${this.suffix}` : undefined, onInput: event => this.onValue(event, false), onChange: event => this.onValue(event, true) })));
|
|
88
|
+
}
|
|
89
|
+
static get is() { return "q-slider"; }
|
|
90
|
+
static get encapsulation() { return "shadow"; }
|
|
91
|
+
static get delegatesFocus() { return true; }
|
|
92
|
+
static get formAssociated() { return true; }
|
|
93
|
+
static get originalStyleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["slider.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get styleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["slider.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get properties() {
|
|
104
|
+
return {
|
|
105
|
+
"value": {
|
|
106
|
+
"type": "number",
|
|
107
|
+
"mutable": true,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "number",
|
|
110
|
+
"resolved": "number",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": true,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": "Current value. Defaults to the minimum when omitted."
|
|
118
|
+
},
|
|
119
|
+
"getter": false,
|
|
120
|
+
"setter": false,
|
|
121
|
+
"reflect": false,
|
|
122
|
+
"attribute": "value"
|
|
123
|
+
},
|
|
124
|
+
"label": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": true,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"getter": false,
|
|
139
|
+
"setter": false,
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"attribute": "label"
|
|
142
|
+
},
|
|
143
|
+
"suffix": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "string",
|
|
148
|
+
"resolved": "string",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Suffix for the displayed value, such as px or %."
|
|
156
|
+
},
|
|
157
|
+
"getter": false,
|
|
158
|
+
"setter": false,
|
|
159
|
+
"reflect": false,
|
|
160
|
+
"attribute": "suffix",
|
|
161
|
+
"defaultValue": "''"
|
|
162
|
+
},
|
|
163
|
+
"showValue": {
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "boolean",
|
|
168
|
+
"resolved": "boolean",
|
|
169
|
+
"references": {}
|
|
170
|
+
},
|
|
171
|
+
"required": false,
|
|
172
|
+
"optional": false,
|
|
173
|
+
"docs": {
|
|
174
|
+
"tags": [],
|
|
175
|
+
"text": ""
|
|
176
|
+
},
|
|
177
|
+
"getter": false,
|
|
178
|
+
"setter": false,
|
|
179
|
+
"reflect": false,
|
|
180
|
+
"attribute": "show-value",
|
|
181
|
+
"defaultValue": "true"
|
|
182
|
+
},
|
|
183
|
+
"disabled": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"mutable": false,
|
|
186
|
+
"complexType": {
|
|
187
|
+
"original": "boolean",
|
|
188
|
+
"resolved": "boolean",
|
|
189
|
+
"references": {}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": false,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": ""
|
|
196
|
+
},
|
|
197
|
+
"getter": false,
|
|
198
|
+
"setter": false,
|
|
199
|
+
"reflect": true,
|
|
200
|
+
"attribute": "disabled",
|
|
201
|
+
"defaultValue": "false"
|
|
202
|
+
},
|
|
203
|
+
"min": {
|
|
204
|
+
"type": "number",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "number",
|
|
208
|
+
"resolved": "number",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": false,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": ""
|
|
216
|
+
},
|
|
217
|
+
"getter": false,
|
|
218
|
+
"setter": false,
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"attribute": "min",
|
|
221
|
+
"defaultValue": "0"
|
|
222
|
+
},
|
|
223
|
+
"max": {
|
|
224
|
+
"type": "number",
|
|
225
|
+
"mutable": false,
|
|
226
|
+
"complexType": {
|
|
227
|
+
"original": "number",
|
|
228
|
+
"resolved": "number",
|
|
229
|
+
"references": {}
|
|
230
|
+
},
|
|
231
|
+
"required": false,
|
|
232
|
+
"optional": false,
|
|
233
|
+
"docs": {
|
|
234
|
+
"tags": [],
|
|
235
|
+
"text": ""
|
|
236
|
+
},
|
|
237
|
+
"getter": false,
|
|
238
|
+
"setter": false,
|
|
239
|
+
"reflect": false,
|
|
240
|
+
"attribute": "max",
|
|
241
|
+
"defaultValue": "100"
|
|
242
|
+
},
|
|
243
|
+
"step": {
|
|
244
|
+
"type": "number",
|
|
245
|
+
"mutable": false,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "number",
|
|
248
|
+
"resolved": "number",
|
|
249
|
+
"references": {}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [],
|
|
255
|
+
"text": ""
|
|
256
|
+
},
|
|
257
|
+
"getter": false,
|
|
258
|
+
"setter": false,
|
|
259
|
+
"reflect": false,
|
|
260
|
+
"attribute": "step",
|
|
261
|
+
"defaultValue": "1"
|
|
262
|
+
},
|
|
263
|
+
"name": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"mutable": false,
|
|
266
|
+
"complexType": {
|
|
267
|
+
"original": "string",
|
|
268
|
+
"resolved": "string",
|
|
269
|
+
"references": {}
|
|
270
|
+
},
|
|
271
|
+
"required": false,
|
|
272
|
+
"optional": true,
|
|
273
|
+
"docs": {
|
|
274
|
+
"tags": [],
|
|
275
|
+
"text": ""
|
|
276
|
+
},
|
|
277
|
+
"getter": false,
|
|
278
|
+
"setter": false,
|
|
279
|
+
"reflect": true,
|
|
280
|
+
"attribute": "name"
|
|
281
|
+
},
|
|
282
|
+
"ariaLabel": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "string | null",
|
|
287
|
+
"resolved": "string",
|
|
288
|
+
"references": {}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": false,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [],
|
|
294
|
+
"text": ""
|
|
295
|
+
},
|
|
296
|
+
"getter": false,
|
|
297
|
+
"setter": false,
|
|
298
|
+
"reflect": false,
|
|
299
|
+
"attribute": "aria-label",
|
|
300
|
+
"defaultValue": "null"
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
static get states() {
|
|
305
|
+
return {
|
|
306
|
+
"fieldDisabled": {}
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
static get events() {
|
|
310
|
+
return [{
|
|
311
|
+
"method": "qInput",
|
|
312
|
+
"name": "qInput",
|
|
313
|
+
"bubbles": true,
|
|
314
|
+
"cancelable": true,
|
|
315
|
+
"composed": true,
|
|
316
|
+
"docs": {
|
|
317
|
+
"tags": [],
|
|
318
|
+
"text": "Numeric value emitted continuously while dragging or using the keyboard."
|
|
319
|
+
},
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "number",
|
|
322
|
+
"resolved": "number",
|
|
323
|
+
"references": {}
|
|
324
|
+
}
|
|
325
|
+
}, {
|
|
326
|
+
"method": "qChange",
|
|
327
|
+
"name": "qChange",
|
|
328
|
+
"bubbles": true,
|
|
329
|
+
"cancelable": true,
|
|
330
|
+
"composed": true,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": "Numeric value emitted when the interaction is committed."
|
|
334
|
+
},
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "number",
|
|
337
|
+
"resolved": "number",
|
|
338
|
+
"references": {}
|
|
339
|
+
}
|
|
340
|
+
}];
|
|
341
|
+
}
|
|
342
|
+
static get methods() {
|
|
343
|
+
return {
|
|
344
|
+
"focusElement": {
|
|
345
|
+
"complexType": {
|
|
346
|
+
"signature": "() => Promise<void>",
|
|
347
|
+
"parameters": [],
|
|
348
|
+
"references": {
|
|
349
|
+
"Promise": {
|
|
350
|
+
"location": "global",
|
|
351
|
+
"id": "global::Promise"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"return": "Promise<void>"
|
|
355
|
+
},
|
|
356
|
+
"docs": {
|
|
357
|
+
"text": "",
|
|
358
|
+
"tags": []
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
static get elementRef() { return "el"; }
|
|
364
|
+
static get watchers() {
|
|
365
|
+
return [{
|
|
366
|
+
"propName": "value",
|
|
367
|
+
"methodName": "constraintsChanged"
|
|
368
|
+
}, {
|
|
369
|
+
"propName": "min",
|
|
370
|
+
"methodName": "constraintsChanged"
|
|
371
|
+
}, {
|
|
372
|
+
"propName": "max",
|
|
373
|
+
"methodName": "constraintsChanged"
|
|
374
|
+
}, {
|
|
375
|
+
"propName": "step",
|
|
376
|
+
"methodName": "constraintsChanged"
|
|
377
|
+
}, {
|
|
378
|
+
"propName": "disabled",
|
|
379
|
+
"methodName": "disabledChanged"
|
|
380
|
+
}];
|
|
381
|
+
}
|
|
382
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
383
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { afterEach, beforeAll, expect, it } from "vitest";
|
|
2
|
+
import { userEvent } from "vitest/browser";
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import { defineCustomElements } from "../../../../../../packages/browser/components/dist/loader";
|
|
5
|
+
defineCustomElements();
|
|
6
|
+
beforeAll(async () => { await customElements.whenDefined('q-slider'); });
|
|
7
|
+
afterEach(() => document.body.replaceChildren());
|
|
8
|
+
const settle = () => new Promise(resolve => setTimeout(resolve, 30));
|
|
9
|
+
it('supports keyboard, form submission, reset and disabled fieldsets', async () => {
|
|
10
|
+
const form = document.createElement('form');
|
|
11
|
+
form.innerHTML = '<fieldset><q-slider name="gap" label="Gap" min="4" max="40" value="16" suffix="px"></q-slider></fieldset>';
|
|
12
|
+
document.body.append(form);
|
|
13
|
+
const slider = form.querySelector('q-slider');
|
|
14
|
+
await slider.componentOnReady();
|
|
15
|
+
const input = slider.shadowRoot.querySelector('input');
|
|
16
|
+
await userEvent.click(input);
|
|
17
|
+
await userEvent.keyboard('{Home}');
|
|
18
|
+
await settle();
|
|
19
|
+
expect(slider.value).toBe(4);
|
|
20
|
+
await userEvent.keyboard('{ArrowRight}');
|
|
21
|
+
await settle();
|
|
22
|
+
expect(slider.value).toBe(5);
|
|
23
|
+
expect(new FormData(form).get('gap')).toBe('5');
|
|
24
|
+
form.reset();
|
|
25
|
+
await settle();
|
|
26
|
+
expect(slider.value).toBe(16);
|
|
27
|
+
form.querySelector('fieldset').disabled = true;
|
|
28
|
+
await settle();
|
|
29
|
+
expect(input.disabled).toBe(true);
|
|
30
|
+
expect(new FormData(form).has('gap')).toBe(false);
|
|
31
|
+
});
|
|
32
|
+
it('participates in q-form values and theme overrides', async () => {
|
|
33
|
+
const form = document.createElement('q-form');
|
|
34
|
+
form.innerHTML = '<q-slider name="columns" label="Columns" min="1" max="10" value="3"></q-slider>';
|
|
35
|
+
document.body.append(form);
|
|
36
|
+
await form.componentOnReady();
|
|
37
|
+
const slider = form.querySelector('q-slider');
|
|
38
|
+
await slider.componentOnReady();
|
|
39
|
+
await form.setValues({ columns: '7' });
|
|
40
|
+
await settle();
|
|
41
|
+
expect(slider.value).toBe(7);
|
|
42
|
+
expect((await form.getValues()).columns).toBe('7');
|
|
43
|
+
slider.style.setProperty('--q-slider-track-color', 'rgb(10, 20, 30)');
|
|
44
|
+
expect(getComputedStyle(slider.shadowRoot.querySelector('input')).backgroundColor).toBe('rgb(10, 20, 30)');
|
|
45
|
+
});
|
|
@@ -13,7 +13,7 @@ export class QDivider {
|
|
|
13
13
|
/** Hide a purely visual separator from assistive technology. */
|
|
14
14
|
decorative = false;
|
|
15
15
|
render() {
|
|
16
|
-
return h(Host, { key: '
|
|
16
|
+
return h(Host, { key: 'eadd9334a6f43375fdf364710462eef9dc0b2b22', role: this.decorative ? undefined : 'separator', "aria-orientation": this.decorative ? undefined : this.orientation, "aria-hidden": this.decorative ? 'true' : undefined, style: { '--_q-divider-length': this.length === 'auto' ? '100%' : this.length, '--_q-divider-spacing': spaceValue(this.spacing) } }, h("span", { key: '999050a927f952484de99c165f2b20132d64eec4', part: "line", "aria-hidden": "true" }));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "q-divider"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class QGrid {
|
|
|
12
12
|
columnGap;
|
|
13
13
|
render() {
|
|
14
14
|
const columns = Math.min(4, Math.max(1, Number(this.columns) || 2));
|
|
15
|
-
return h("div", { key: '
|
|
15
|
+
return h("div", { key: '6cb6f253b692cb98163938ac77b1017706921e0a', part: "layout", style: { '--_q-columns': String(columns), '--_q-min-item': this.minItemWidth, '--_q-column-gap': spaceValue(this.columnGap ?? this.gap), rowGap: spaceValue(this.rowGap ?? this.gap) } }, h("slot", { key: '6e2c2c61901e9444ad4cc789201ee1702c817d92' }));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "q-grid"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QInline {
|
|
|
10
10
|
justify = 'start';
|
|
11
11
|
wrap = true;
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '4a738a5cfb63fbfe527ef97e0d4fdc5b2b9d92bb', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align, justifyContent: this.justify === 'between' ? 'space-between' : this.justify, flexWrap: this.wrap ? 'wrap' : 'nowrap' } }, h("slot", { key: '441ff02b18335a81b7674d6b8078102bd22a46f5' }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-inline"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -386,7 +386,7 @@ export class QNavbar {
|
|
|
386
386
|
const items = identifyItems(this.parsedItems, item => item.value, { warningContext: 'q-navbar.items' });
|
|
387
387
|
const hasItems = items.length > 0;
|
|
388
388
|
const ariaLabel = this.ariaLabel?.trim() || undefined;
|
|
389
|
-
return (h("div", { key: '
|
|
389
|
+
return (h("div", { key: '72300427ebcdcbd1fbf35538fe36af599674eec7', class: {
|
|
390
390
|
'navbar': true,
|
|
391
391
|
'is-open': this.menuOpen,
|
|
392
392
|
'is-sticky': this.sticky,
|
|
@@ -396,7 +396,7 @@ export class QNavbar {
|
|
|
396
396
|
'is-collapsed': this.collision,
|
|
397
397
|
'has-mobile-nav': this.hasMobileNav,
|
|
398
398
|
'has-mobile-actions': this.hasMobileActions,
|
|
399
|
-
}, part: "navbar" }, h("div", { key: '
|
|
399
|
+
}, part: "navbar" }, h("div", { key: '356a76e80a441df888f98d49cdea2dc0a5173480', class: "navbar-row" }, this.renderBrand(), h("nav", { key: '16cd03606d948a4ad0caefe2461d09b4b2e0214d', id: this.primaryNavId, class: "desktop-nav", "aria-label": ariaLabel || 'Primary navigation', part: "nav" }, hasItems && this.renderNavItems(items), h("slot", { key: '1df39d562f06cb2f7a2b76161a122d9f73405aff', name: "nav" })), h("div", { key: '99c982b99446849f1c8669c9c2b92eb0530e8bb6', class: "desktop-actions", part: "actions" }, h("slot", { key: '97fe69941ea841fbd570a8d2bc306d292642699c', name: "actions" })), h("button", { key: '55ac3eb3c878dcbba1709c28444f5ceed9d65952', class: "menu-button", type: "button", "aria-label": this.mobileLabel, "aria-expanded": this.menuOpen ? 'true' : 'false', "aria-controls": `${this.primaryNavId} ${this.mobilePanelId}`, "aria-haspopup": "true", onClick: this.handleMenuToggle, part: "menu-button" }, h("span", { key: 'a4969f428a53183aff6162ca99c49344c9e22c43' }), h("span", { key: '67d19e78025a71de533d64be9648959055f371e6' }), h("span", { key: 'd8b4c1e9ad64d9c165b687b3331e035cbedde1c5' }))), h("div", { key: '7e4404dbce5035e890c3fb82774da5409532afaf', id: this.mobilePanelId, class: { 'mobile-panel': true, 'has-content': this.hasMobileContent }, part: "mobile-panel" }, h("nav", { key: 'eff22494d13789eb4ddb95a0db64e1bfc60bc457', class: "mobile-nav", "aria-label": ariaLabel || 'Mobile navigation' }, h("slot", { key: '5f6acd5b274ab9fd2cd6762912c05787802be39c', name: "mobile-nav", onSlotchange: this.handleMobileSlotChange })), h("div", { key: '262bfccfc84486b53b607f78c82f5e203ec79bad', class: "mobile-actions" }, h("slot", { key: '9c631d7e8d89f424442fba93e094c5562f98ea68', name: "mobile-actions", onSlotchange: this.handleMobileSlotChange })))));
|
|
400
400
|
}
|
|
401
401
|
static get is() { return "q-navbar"; }
|
|
402
402
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +55,7 @@ export class QPanel {
|
|
|
55
55
|
}
|
|
56
56
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
57
57
|
render() {
|
|
58
|
-
return (h("section", { key: '
|
|
58
|
+
return (h("section", { key: 'e4d17eda76e6fd5c295178a0cf7440e0dfa4f2bb', style: { '--_q-surface': surfaceValue(this.surface ?? (this.variant === 'plain' ? 'transparent' : 'panel')), '--_q-body-padding': spaceValue(this.padding), '--_q-header-padding': spaceValue(this.headerPadding ?? this.padding), '--_q-footer-padding': spaceValue(this.footerPadding ?? this.padding) }, class: {
|
|
59
59
|
'panel': true,
|
|
60
60
|
'has-dividers': this.dividers,
|
|
61
61
|
[`variant-${this.variant}`]: true,
|
|
@@ -66,13 +66,13 @@ export class QPanel {
|
|
|
66
66
|
'has-sticky-header': this.stickyHeader,
|
|
67
67
|
'has-sticky-footer': this.stickyFooter,
|
|
68
68
|
'uses-sticky-scroll': this.scrollable && (this.stickyHeader || this.stickyFooter),
|
|
69
|
-
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '
|
|
69
|
+
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '653bb1def51fb6ad21914ef7e5a54cbfb147640e', class: {
|
|
70
70
|
'panel-header': true,
|
|
71
71
|
'is-hidden': !this.hasHeader,
|
|
72
|
-
}, part: "header" }, h("slot", { key: '
|
|
72
|
+
}, part: "header" }, h("slot", { key: '06cc3f354673d5fe3fde67b1b86ec392e03be7df', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: 'cb4a97900e5524015eae2ee57fa78509a9bb776d', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: '3dbcb6ca0b4fa46edbf706537905d4fe073f755f' })), h("div", { key: '422214dca7949db96461944299d42c1c0aa484b3', class: {
|
|
73
73
|
'panel-footer': true,
|
|
74
74
|
'is-hidden': !this.hasFooter,
|
|
75
|
-
}, part: "footer" }, h("slot", { key: '
|
|
75
|
+
}, part: "footer" }, h("slot", { key: '4738de4fdffc4802c02f3de0e32c6c2d2cf30f4b', name: "footer", onSlotchange: this.handleSlotChange }))));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "q-panel"; }
|
|
78
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -326,13 +326,13 @@ export class QScrollable {
|
|
|
326
326
|
height: this.height,
|
|
327
327
|
maxHeight: this.maxHeight || undefined,
|
|
328
328
|
};
|
|
329
|
-
return (h(Host, { key: '
|
|
329
|
+
return (h(Host, { key: '6dfe263ff199a234244d309b4b9173a0aa179651', class: {
|
|
330
330
|
'is-scrolling': this.isScrolling,
|
|
331
331
|
'is-dragging': this.isDragging,
|
|
332
|
-
}, style: hostStyle }, h("div", { key: '
|
|
332
|
+
}, style: hostStyle }, h("div", { key: '6ecf6002545a4fe54a3d8f7c79996c5f172eeafb', class: "q-scrollable-host" }, h("div", { key: '049712eb9a314295b2aeba91c85a7d2a955badbd', id: this.viewportId, class: "q-scrollable-viewport", ref: this.setViewportRef, onScroll: this.handleScroll, tabindex: 0, part: "viewport" }, h("div", { key: '2526fef43264a34029ab3de291cd5ad8b8169ab7', class: "q-scrollable-content", ref: this.setContentRef, part: "content" }, h("slot", { key: '826a4cabc557ad0560bddbbd366aaf0d895d0265' }))), this.mode === 'custom' && (h("div", { key: 'd6f2628d74339e74aca7c0de609f9e56e211666a', class: {
|
|
333
333
|
'q-scrollbar-track': true,
|
|
334
334
|
'is-dragging': this.isDragging,
|
|
335
|
-
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '
|
|
335
|
+
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '49bcccd913a9ce1d991d234ef024c586a4549904', class: "q-scrollbar-thumb", ref: (el) => (this.thumbEl = el), onPointerDown: this.handlePointerDown, onKeyDown: this.handleThumbKeyDown, role: "scrollbar", "aria-controls": this.viewportId, "aria-orientation": "vertical", "aria-valuemin": "0", "aria-valuemax": this.scrollValueMax, "aria-valuenow": this.scrollValueNow, "aria-label": "Scroll content", tabindex: 0, part: "thumb" }))))));
|
|
336
336
|
}
|
|
337
337
|
static get is() { return "q-scrollable"; }
|
|
338
338
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QSection {
|
|
|
10
10
|
reverse = false;
|
|
11
11
|
columns = 1;
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: 'c324ed569083addd204d27d7fd74bb3f9a1ec616' }, h("slot", { key: 'e8a7d513bf2d3a817f69c71b47d1691ef33ebf1f', name: "media" }), h("slot", { key: '0d6d389f6778f523434900e58b2631668364c9a5' }), h("slot", { key: 'a65738487e173661217ef1513d7a57d88801ef76', name: "actions" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-section"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class QStack {
|
|
|
8
8
|
gap = 'lg';
|
|
9
9
|
align = 'stretch';
|
|
10
10
|
render() {
|
|
11
|
-
return h("div", { key: '
|
|
11
|
+
return h("div", { key: 'ff2923042dd41fa65f782701074ef8fac385803b', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align } }, h("slot", { key: 'fb01b80bb7193336e9fbf210c0c972d137780e4a' }));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "q-stack"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -70,7 +70,7 @@ export class QTabs {
|
|
|
70
70
|
warningContext: 'q-tabs items',
|
|
71
71
|
});
|
|
72
72
|
const activeIndex = this.getActiveIndex(items);
|
|
73
|
-
return (h("div", { key: '
|
|
73
|
+
return (h("div", { key: '32da2b9996b98b24ce121fced18f670d5b2652fe', class: {
|
|
74
74
|
'tab-list': true,
|
|
75
75
|
[`size-${this.size}`]: true,
|
|
76
76
|
[`variant-${this.variant}`]: true,
|
|
@@ -24,12 +24,12 @@ export class QToolbar {
|
|
|
24
24
|
/** Accessible label for the toolbar content group. */
|
|
25
25
|
ariaLabel = null;
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'a6ee427416e1b2804d27a5c508286e7c8145de5e', style: { ...controlScope(this.size), '--_q-toolbar-gap': spaceValue(this.gap) } }, h("div", { key: 'f6e2c4ed7ef2a0e517dd396c1f92cd709e638e4e', class: {
|
|
28
28
|
toolbar: true,
|
|
29
29
|
'is-compact': this.compact,
|
|
30
30
|
'is-transparent': this.transparent,
|
|
31
31
|
'is-bordered': this.bordered,
|
|
32
|
-
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: '
|
|
32
|
+
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: 'a67f45efad7bbe963e23c491ac055328b8940b75', class: "toolbar-row", part: "row" }, h("div", { key: '7a9201f4bd923d8b4b4576083bb18735d31d8eb0', class: "toolbar-start", part: "start" }, h("slot", { key: '7d1931b85bbc9dfd62c2a4bba4f2edfdc390c5c6', name: "start" })), h("div", { key: '4c5a681c11c91247913e234424bf774293f600f5', class: "toolbar-content", part: "content" }, h("slot", { key: 'd60e8dfefd9db036961510af3ff687e1f17996cd' })), h("div", { key: '3c7b45b143cafd7a848d7e39770494b0346f28d4', class: "toolbar-end", part: "end" }, h("slot", { key: '3a53678160791e3f0967bbecb72345621be67fc7', name: "end" }))))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "q-toolbar"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,7 +81,7 @@ export class QAvatar {
|
|
|
81
81
|
const preset = typeof this.size === 'string' && ['sm', 'md', 'lg'].includes(this.size)
|
|
82
82
|
? this.size
|
|
83
83
|
: 'custom';
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: '4756953378ca0e5ba3b882086f19f4e797aa0966', class: {
|
|
85
85
|
avatar: true,
|
|
86
86
|
[`size-${preset}`]: true,
|
|
87
87
|
[`shape-${this.shape}`]: true,
|
|
@@ -173,7 +173,7 @@ export class QImageComparison {
|
|
|
173
173
|
const afterSrc = this.afterSrc;
|
|
174
174
|
const ratio = this.frameRatio;
|
|
175
175
|
const failed = !beforeSrc || !afterSrc || this.beforeStatus === 'error' || this.afterStatus === 'error' || this.cropUnavailable;
|
|
176
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: 'e5410625988c20e6a76cccff54da4f2c1b6a9c21', part: "frame", class: { frame: true, ready: this.ready }, style: { aspectRatio: String(ratio) }, ref: el => this.frame = el, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerEnd, onPointerCancel: this.handlePointerEnd, onLostPointerCapture: this.handlePointerEnd }, this.renderImage('after', afterSrc, generation, ratio), this.renderImage('before', beforeSrc, generation, ratio), !this.ready && (h("div", { key: 'e9ec809349bcdca73642dd85dfce7be2c85e8e5d', part: "status", class: "status", role: "status" }, failed ? 'Comparison unavailable' : 'Loading images…')), this.ready && (h("div", { key: '261f042c581b98249982bbaacb5e011e83e3815c', class: "decorations", "aria-hidden": "true" }, h("span", { key: 'e44600d0ebea85584ade0032ac67b2760d26fc78', part: "before-label", class: "label before-label" }, this.beforeLabel), h("span", { key: '8b5ab613e9f85fe0b8031c73a18e42baa8199f13', part: "after-label", class: "label after-label" }, this.afterLabel), h("div", { key: '61cd1aa7fa75b4a17e1fdeb8b5589716e481fe30', part: "divider", class: "divider", style: { left: `${this.position}%` } }, h("span", { key: 'c6e5a4ac428bd57659be6ab0c1f6fdc49b1c596b', part: "handle", class: "handle" }, "\u2194")))), h("input", { key: 'd070ec8fc8404a6f37385b918cedd8ebd6414204', part: "control", class: "control", ref: el => this.range = el, type: "range", min: "0", max: "100", step: "1", value: this.position, disabled: !this.ready, "aria-label": this.ariaLabel || 'Image comparison', "aria-valuetext": `${Math.round(this.position)}% ${this.beforeLabel || 'Before'} revealed`, onInput: event => this.updatePosition(Number(event.target.value)) })));
|
|
177
177
|
}
|
|
178
178
|
static get is() { return "q-image-comparison"; }
|
|
179
179
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QMedia {
|
|
|
10
10
|
loading = 'lazy';
|
|
11
11
|
alt = '';
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: '49f6d5a90a5cb7afeee7ab095fef25de2033640a' }, h("slot", { key: '96b02b03210be05385b0cef1e815ea2e1815696f' }), h("slot", { key: 'ed0a47203720efe45c55e00718d20f2120c1c183', name: "fallback" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-media"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|