@statistikzh/leu 0.22.1 → 0.24.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/.github/workflows/ci.yml +8 -8
- package/.github/workflows/deploy-github-pages.yaml +2 -2
- package/.github/workflows/publish.yml +30 -0
- package/.github/workflows/release-please.yml +1 -19
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +25 -0
- package/dist/Accordion.js +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/ChartWrapper.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.js +1 -1
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/FileInput.d.ts +0 -1
- package/dist/FileInput.js +1 -35
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-DfsEye-A.js → LeuElement-BfbOWTGZ.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Message.js +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Placeholder.js +1 -1
- package/dist/Popup.d.ts +16 -0
- package/dist/Popup.js +20 -2
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Range.d.ts +51 -0
- package/dist/Range.js +143 -5
- package/dist/ScrollTop.js +1 -1
- package/dist/Select.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/file-input/FileInput.d.ts +2 -2
- package/dist/components/file-input/FileInput.d.ts.map +1 -1
- package/dist/components/popup/Popup.d.ts +16 -0
- package/dist/components/popup/Popup.d.ts.map +1 -1
- package/dist/components/popup/stories/popup.stories.d.ts +2 -0
- package/dist/components/popup/stories/popup.stories.d.ts.map +1 -1
- package/dist/components/range/Range.d.ts +51 -0
- package/dist/components/range/Range.d.ts.map +1 -1
- package/dist/components/range/stories/range.stories.d.ts +230 -0
- package/dist/components/range/stories/range.stories.d.ts.map +1 -0
- package/dist/components/range/test/range.test.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +1 -1
- package/dist/leu-chart-wrapper.js +1 -1
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.js +1 -1
- package/dist/leu-dropdown.js +1 -1
- package/dist/leu-file-input.d.ts +0 -1
- package/dist/leu-file-input.js +1 -35
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-message.js +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.js +1 -1
- package/dist/leu-progress-bar.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.js +1 -1
- package/dist/leu-select.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +1 -1
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/vscode.html-custom-data.json +149 -85
- package/dist/vue/index.d.ts +125 -100
- package/dist/web-types.json +298 -174
- package/package.json +6 -2
- package/src/components/file-input/FileInput.ts +2 -2
- package/src/components/popup/Popup.ts +37 -0
- package/src/components/popup/stories/popup.stories.ts +10 -0
- package/src/components/popup/test/popup.test.ts +27 -0
- package/src/components/range/Range.ts +102 -3
- package/src/components/range/range.css +48 -1
- package/src/components/range/stories/range.stories.ts +182 -0
- package/src/components/range/test/range.test.ts +151 -6
- package/web-test-runner.config.mjs +10 -0
- package/dist/components/range/stories/range-slider.stories.d.ts +0 -26
- package/dist/components/range/stories/range-slider.stories.d.ts.map +0 -1
- package/src/components/range/stories/range-slider.stories.ts +0 -142
package/dist/Range.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
|
-
import { css, html } from 'lit';
|
|
2
|
+
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-BfbOWTGZ.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
--range-color: var(--leu-color-black-40);
|
|
@@ -40,7 +40,9 @@ var css_248z = css`:host {
|
|
|
40
40
|
--range-value-color: var(--range-value-color-disabled);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
.container {
|
|
44
|
+
position: relative;
|
|
45
|
+
}
|
|
44
46
|
|
|
45
47
|
.label {
|
|
46
48
|
display: inline-block;
|
|
@@ -49,6 +51,17 @@ var css_248z = css`:host {
|
|
|
49
51
|
font: var(--leu-t-regular-regular-font);
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
:host([hide-label]) .label {
|
|
55
|
+
clip: rect(0 0 0 0);
|
|
56
|
+
border: 0;
|
|
57
|
+
height: 1px;
|
|
58
|
+
margin: -1px !important;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
padding: 0 !important;
|
|
61
|
+
position: absolute;
|
|
62
|
+
width: 1px;
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
.outputs {
|
|
53
66
|
position: relative;
|
|
54
67
|
height: 1.5rem;
|
|
@@ -75,6 +88,8 @@ var css_248z = css`:host {
|
|
|
75
88
|
|
|
76
89
|
.inputs {
|
|
77
90
|
position: relative;
|
|
91
|
+
z-index: 1;
|
|
92
|
+
height: var(--range-thumb-diameter);
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
.range {
|
|
@@ -188,6 +203,39 @@ var css_248z = css`:host {
|
|
|
188
203
|
.range--ghost::-webkit-slider-runnable-track {
|
|
189
204
|
background: transparent;
|
|
190
205
|
}
|
|
206
|
+
|
|
207
|
+
/* Ticks */
|
|
208
|
+
|
|
209
|
+
.ticks {
|
|
210
|
+
position: absolute;
|
|
211
|
+
top: calc(
|
|
212
|
+
var(--range-thumb-diameter) / 2 + var(--range-track-height)
|
|
213
|
+
);
|
|
214
|
+
left: calc(var(--range-thumb-diameter) / 2);
|
|
215
|
+
right: calc(var(--range-thumb-diameter) / 2);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.tick {
|
|
219
|
+
z-index: -1;
|
|
220
|
+
position: absolute;
|
|
221
|
+
top: 50%;
|
|
222
|
+
width: 2px;
|
|
223
|
+
height: 0.5rem;
|
|
224
|
+
background-color: var(--range-track-background-color);
|
|
225
|
+
transform: translateY(-50%);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.tick-labels {
|
|
229
|
+
display: flex;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
color: var(--leu-color-black-60);
|
|
232
|
+
font: var(--leu-t-tiny-regular-font);
|
|
233
|
+
margin-top: 0.25rem;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.tick-label--max {
|
|
237
|
+
text-align: right;
|
|
238
|
+
}
|
|
191
239
|
`;
|
|
192
240
|
|
|
193
241
|
const defaultValueConverter = {
|
|
@@ -206,13 +254,56 @@ class LeuRange extends LeuElement {
|
|
|
206
254
|
constructor() {
|
|
207
255
|
super(...arguments);
|
|
208
256
|
this.defaultValue = [50];
|
|
257
|
+
/**
|
|
258
|
+
* The minimum value of the range slider.
|
|
259
|
+
*/
|
|
209
260
|
this.min = 0;
|
|
261
|
+
/**
|
|
262
|
+
* The maximum value of the range slider.
|
|
263
|
+
*/
|
|
210
264
|
this.max = 100;
|
|
265
|
+
/**
|
|
266
|
+
* The step size of the range slider.
|
|
267
|
+
*/
|
|
211
268
|
this.step = 1;
|
|
212
269
|
this.name = "";
|
|
270
|
+
/**
|
|
271
|
+
* The label of the range slider.
|
|
272
|
+
*/
|
|
213
273
|
this.label = "";
|
|
274
|
+
/**
|
|
275
|
+
* Whether to hide the label of the range slider.
|
|
276
|
+
* If true, the label will still be available for screen readers
|
|
277
|
+
* and is only visually hidden.
|
|
278
|
+
*/
|
|
279
|
+
this.hideLabel = false;
|
|
280
|
+
/**
|
|
281
|
+
* Whether the range slider is disabled.
|
|
282
|
+
*/
|
|
214
283
|
this.disabled = false;
|
|
284
|
+
/**
|
|
285
|
+
* Whether to use a range with two handles.
|
|
286
|
+
*/
|
|
215
287
|
this.multiple = false;
|
|
288
|
+
/**
|
|
289
|
+
* Wheter to show tick marks below the range slider.
|
|
290
|
+
* One tick mark per step will be rendered.
|
|
291
|
+
*/
|
|
292
|
+
this.showTicks = false;
|
|
293
|
+
/**
|
|
294
|
+
* Whether to show the min and max labels below the range slider.
|
|
295
|
+
*/
|
|
296
|
+
this.showRangeLabels = false;
|
|
297
|
+
/**
|
|
298
|
+
* A prefix to display before the value in the output element(s).
|
|
299
|
+
* Is ignored if a custom valueFormatter is provided.
|
|
300
|
+
*/
|
|
301
|
+
this.prefix = "";
|
|
302
|
+
/**
|
|
303
|
+
* A suffix to display after the value in the output element(s).
|
|
304
|
+
* Is ignored if a custom valueFormatter is provided.
|
|
305
|
+
*/
|
|
306
|
+
this.suffix = "";
|
|
216
307
|
}
|
|
217
308
|
updated() {
|
|
218
309
|
this._updateStyles();
|
|
@@ -231,7 +322,7 @@ class LeuRange extends LeuElement {
|
|
|
231
322
|
const output = this.shadowRoot.querySelector(`.output[for=${input.id}]`);
|
|
232
323
|
const normalizedValue = this._getNormalizedValue(input.valueAsNumber);
|
|
233
324
|
output.style.setProperty("--value", normalizedValue.toString());
|
|
234
|
-
output.value = input.
|
|
325
|
+
output.value = this.formatValue(input.valueAsNumber);
|
|
235
326
|
});
|
|
236
327
|
}
|
|
237
328
|
get value() {
|
|
@@ -309,11 +400,29 @@ class LeuRange extends LeuElement {
|
|
|
309
400
|
this._getGhostInput().value = e.target.value;
|
|
310
401
|
}
|
|
311
402
|
}
|
|
403
|
+
formatValue(value) {
|
|
404
|
+
if (this.valueFormatter) {
|
|
405
|
+
return this.valueFormatter(value);
|
|
406
|
+
}
|
|
407
|
+
return `${this.prefix}${value}${this.suffix}`;
|
|
408
|
+
}
|
|
409
|
+
renderTicks() {
|
|
410
|
+
if (!this.showTicks) {
|
|
411
|
+
return nothing;
|
|
412
|
+
}
|
|
413
|
+
return html `<div class="ticks">
|
|
414
|
+
${Array.from({ length: (this.max - this.min) / this.step + 1 }, (_, i) => this.min + i * this.step).map((tick) => html `<span
|
|
415
|
+
class="tick"
|
|
416
|
+
style="left: ${this._getNormalizedValue(tick) * 100}%"
|
|
417
|
+
></span>`)}
|
|
418
|
+
</div>`;
|
|
419
|
+
}
|
|
312
420
|
render() {
|
|
313
421
|
const inputs = this.multiple ? ["base", "ghost"] : ["base"];
|
|
314
422
|
const { multiple, disabled, label, defaultValue } = this;
|
|
315
423
|
return html `
|
|
316
424
|
<div
|
|
425
|
+
class="container"
|
|
317
426
|
role=${multiple ? "group" : undefined}
|
|
318
427
|
aria-labelledby=${multiple ? "group-label" : undefined}
|
|
319
428
|
>
|
|
@@ -324,7 +433,7 @@ class LeuRange extends LeuElement {
|
|
|
324
433
|
${inputs.map((type, index) => html `<output
|
|
325
434
|
class="output"
|
|
326
435
|
for="input-${type}"
|
|
327
|
-
value=${defaultValue[index]}
|
|
436
|
+
value=${this.formatValue(defaultValue[index])}
|
|
328
437
|
></output>`)}
|
|
329
438
|
</div>
|
|
330
439
|
<div class="inputs">
|
|
@@ -346,8 +455,19 @@ class LeuRange extends LeuElement {
|
|
|
346
455
|
.value=${defaultValue[index].toString()}
|
|
347
456
|
/>
|
|
348
457
|
`)}
|
|
458
|
+
${this.renderTicks()}
|
|
349
459
|
</div>
|
|
350
460
|
</div>
|
|
461
|
+
${this.showRangeLabels
|
|
462
|
+
? html `<div class="tick-labels">
|
|
463
|
+
<span class="tick-label tick-label--min"
|
|
464
|
+
>${this.formatValue(this.min)}</span
|
|
465
|
+
>
|
|
466
|
+
<span class="tick-label tick-label--max"
|
|
467
|
+
>${this.formatValue(this.max)}</span
|
|
468
|
+
>
|
|
469
|
+
</div>`
|
|
470
|
+
: nothing}
|
|
351
471
|
`;
|
|
352
472
|
}
|
|
353
473
|
}
|
|
@@ -374,11 +494,29 @@ __decorate([
|
|
|
374
494
|
__decorate([
|
|
375
495
|
property({ type: String, reflect: true })
|
|
376
496
|
], LeuRange.prototype, "label", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
property({ type: Boolean, reflect: true, attribute: "hide-label" })
|
|
499
|
+
], LeuRange.prototype, "hideLabel", void 0);
|
|
377
500
|
__decorate([
|
|
378
501
|
property({ type: Boolean, reflect: true })
|
|
379
502
|
], LeuRange.prototype, "disabled", void 0);
|
|
380
503
|
__decorate([
|
|
381
504
|
property({ type: Boolean, reflect: true })
|
|
382
505
|
], LeuRange.prototype, "multiple", void 0);
|
|
506
|
+
__decorate([
|
|
507
|
+
property({ type: Boolean, reflect: true, attribute: "show-ticks" })
|
|
508
|
+
], LeuRange.prototype, "showTicks", void 0);
|
|
509
|
+
__decorate([
|
|
510
|
+
property({ type: Boolean, reflect: true, attribute: "show-range-labels" })
|
|
511
|
+
], LeuRange.prototype, "showRangeLabels", void 0);
|
|
512
|
+
__decorate([
|
|
513
|
+
property({ type: String, reflect: true })
|
|
514
|
+
], LeuRange.prototype, "prefix", void 0);
|
|
515
|
+
__decorate([
|
|
516
|
+
property({ type: String, reflect: true })
|
|
517
|
+
], LeuRange.prototype, "suffix", void 0);
|
|
518
|
+
__decorate([
|
|
519
|
+
property({ attribute: false })
|
|
520
|
+
], LeuRange.prototype, "valueFormatter", void 0);
|
|
383
521
|
|
|
384
522
|
export { LeuRange };
|
package/dist/ScrollTop.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { state } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-BfbOWTGZ.js';
|
|
6
6
|
import { LeuButton } from './Button.js';
|
|
7
7
|
import { LeuIcon } from './Icon.js';
|
|
8
8
|
import 'lit/directives/if-defined.js';
|
package/dist/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css, nothing, html } from 'lit';
|
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-BfbOWTGZ.js';
|
|
6
6
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
7
7
|
import { LeuButton } from './Button.js';
|
|
8
8
|
import { LeuMenu } from './Menu.js';
|
package/dist/Spinner.js
CHANGED
package/dist/Table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nothing, noChange, css, html } from 'lit';
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-BfbOWTGZ.js';
|
|
5
5
|
import { directive, Directive, PartType } from 'lit/directive.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
package/dist/Tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-BfbOWTGZ.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
/* --tag-font-regular: var(--leu-font-family-regular);
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { LeuElement } from "../../lib/LeuElement.js";
|
|
3
|
-
import { LeuButton } from "
|
|
4
|
-
import { LeuIcon } from "../icon/
|
|
3
|
+
import { LeuButton } from "../button/Button.js";
|
|
4
|
+
import { LeuIcon } from "../icon/Icon.js";
|
|
5
5
|
import { LeuVisuallyHidden } from "../visually-hidden/VisuallyHidden.js";
|
|
6
6
|
/**
|
|
7
7
|
* @todo Pluralize text when multiple files are allowed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/FileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/FileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,O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A4BnC,MAAM;CAkEP"}
|
|
@@ -25,6 +25,22 @@ export declare class LeuPopup extends LeuElement {
|
|
|
25
25
|
shift: boolean;
|
|
26
26
|
shiftPadding: number;
|
|
27
27
|
matchSize?: "width" | "height" | "both";
|
|
28
|
+
/**
|
|
29
|
+
* Offsets the popup along the main axis.
|
|
30
|
+
* @link https://floating-ui.com/docs/offset#mainaxis
|
|
31
|
+
*/
|
|
32
|
+
offsetMainAxis?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Offsets the popup along the cross axis.
|
|
35
|
+
* @link https://floating-ui.com/docs/offset#crossaxis
|
|
36
|
+
*/
|
|
37
|
+
offsetCrossAxis?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Offsets the popup along the alignment axis.
|
|
40
|
+
* Overrides the `offsetCrossAxis` value.
|
|
41
|
+
* @link https://floating-ui.com/docs/offset#alignmentaxis
|
|
42
|
+
*/
|
|
43
|
+
offsetAlignmentAxis?: number;
|
|
28
44
|
autoSize?: "width" | "height" | "both";
|
|
29
45
|
autoSizePadding: number;
|
|
30
46
|
private anchorEl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/popup/Popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EAIL,SAAS,
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/popup/Popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EAIL,SAAS,EAIV,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIpD,MAAM,WAAW,cAAc;IAC7B,qBAAqB,EAAE,MAAM,OAAO,CAAA;IACpC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAWD;;GAEG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAEW,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,cAAc,CAAA;IAGrD,MAAM,EAAE,OAAO,CAAQ;IAGvB,SAAS,CAAC,EAAE,SAAS,CAAA;IAGrB,IAAI,EAAE,OAAO,CAAQ;IAGrB,KAAK,EAAE,OAAO,CAAQ;IAGtB,YAAY,EAAE,MAAM,CAAI;IAGxB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAEvC;;;OAGG;IAEH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IAEH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB;;;;OAIG;IAEH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAEe,QAAQ,CAAC,EAChD,OAAO,GACP,QAAQ,GACR,MAAM,CAAA;IAEiC,eAAe,EAAE,MAAM,CAAI;IAEtE,OAAO,CAAC,QAAQ,CAAgB;IAEhC,OAAO,CAAC,OAAO,CAA2C;IAE1D,oBAAoB;IAKpB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAkB/C,SAAS,KAAK,OAAO,mBAEpB;IAED,SAAS,CAAC,KAAK;IAQf,SAAS,CAAC,IAAI;IAOP,UAAU;IAiGjB,kBAAkB;IAsBlB,MAAM;CAQP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/popup/stories/popup.stories.ts"],"names":[],"mappings":"AAGA,OAAO,iBAAiB,CAAA;AACxB,OAAO,4BAA4B,CAAA;;;;;;;;;;;;;AAEnC,wBAwBC;
|
|
1
|
+
{"version":3,"file":"popup.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/popup/stories/popup.stories.ts"],"names":[],"mappings":"AAGA,OAAO,iBAAiB,CAAA;AACxB,OAAO,4BAA4B,CAAA;;;;;;;;;;;;;AAEnC,wBAwBC;AAwBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAUxC,eAAO,MAAM,cAAc;;;;;;;;;;CAoD1B,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nothing } from "lit";
|
|
1
2
|
import { LeuElement } from "../../lib/LeuElement.js";
|
|
2
3
|
/**
|
|
3
4
|
* @tagname leu-range
|
|
@@ -13,13 +14,61 @@ export declare class LeuRange extends LeuElement {
|
|
|
13
14
|
registry?: CustomElementRegistry;
|
|
14
15
|
};
|
|
15
16
|
defaultValue: number[];
|
|
17
|
+
/**
|
|
18
|
+
* The minimum value of the range slider.
|
|
19
|
+
*/
|
|
16
20
|
min: number;
|
|
21
|
+
/**
|
|
22
|
+
* The maximum value of the range slider.
|
|
23
|
+
*/
|
|
17
24
|
max: number;
|
|
25
|
+
/**
|
|
26
|
+
* The step size of the range slider.
|
|
27
|
+
*/
|
|
18
28
|
step: number;
|
|
19
29
|
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* The label of the range slider.
|
|
32
|
+
*/
|
|
20
33
|
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to hide the label of the range slider.
|
|
36
|
+
* If true, the label will still be available for screen readers
|
|
37
|
+
* and is only visually hidden.
|
|
38
|
+
*/
|
|
39
|
+
hideLabel: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the range slider is disabled.
|
|
42
|
+
*/
|
|
21
43
|
disabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to use a range with two handles.
|
|
46
|
+
*/
|
|
22
47
|
multiple: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Wheter to show tick marks below the range slider.
|
|
50
|
+
* One tick mark per step will be rendered.
|
|
51
|
+
*/
|
|
52
|
+
showTicks: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to show the min and max labels below the range slider.
|
|
55
|
+
*/
|
|
56
|
+
showRangeLabels: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* A prefix to display before the value in the output element(s).
|
|
59
|
+
* Is ignored if a custom valueFormatter is provided.
|
|
60
|
+
*/
|
|
61
|
+
prefix: string;
|
|
62
|
+
/**
|
|
63
|
+
* A suffix to display after the value in the output element(s).
|
|
64
|
+
* Is ignored if a custom valueFormatter is provided.
|
|
65
|
+
*/
|
|
66
|
+
suffix: string;
|
|
67
|
+
/**
|
|
68
|
+
* A custom function to format the value displayed in the output element(s).
|
|
69
|
+
* If provided, the prefix and suffix properties will be ignored.
|
|
70
|
+
*/
|
|
71
|
+
valueFormatter?: (value: number) => string;
|
|
23
72
|
updated(): void;
|
|
24
73
|
protected get _inputs(): HTMLInputElement[];
|
|
25
74
|
protected _updateStyles(): void;
|
|
@@ -47,6 +96,8 @@ export declare class LeuRange extends LeuElement {
|
|
|
47
96
|
protected _handlePointerDown(e: PointerEvent & {
|
|
48
97
|
target: HTMLInputElement;
|
|
49
98
|
}): void;
|
|
99
|
+
protected formatValue(value: number): string;
|
|
100
|
+
protected renderTicks(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
50
101
|
render(): import("lit-html").TemplateResult<1>;
|
|
51
102
|
}
|
|
52
103
|
//# sourceMappingURL=Range.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../../src/components/range/Range.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../../src/components/range/Range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAA;AAInC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAapD;;GAEG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAGD,YAAY,WAAO;IAEnB;;OAEG;IAEH,GAAG,EAAE,MAAM,CAAI;I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