@statistikzh/leu 0.25.0 → 0.27.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +28 -0
- package/CONTRIBUTING.md +19 -8
- package/dist/{Accordion-CDNyrB8d.js → Accordion-DLsqXcK8.js} +1 -1
- package/dist/Accordion.js +2 -2
- package/dist/{Button-EdS9xr2J.js → Button-BSyDL_cV.js} +57 -17
- package/dist/{Button-DSGPIcjm.d.ts → Button-BgNUxmo_.d.ts} +6 -0
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +5 -4
- package/dist/{ButtonGroup-BQqf8o_d.js → ButtonGroup-BmSvl-Oc.js} +2 -2
- package/dist/ButtonGroup.js +6 -5
- package/dist/{ChartWrapper-LiNHTNRw.js → ChartWrapper-CvDvQsd5.js} +3 -3
- package/dist/ChartWrapper.d.ts +2 -2
- package/dist/ChartWrapper.js +3 -3
- package/dist/{Checkbox-BtDWmPab.js → Checkbox-Cl_X6gBJ.js} +3 -3
- package/dist/Checkbox.js +4 -4
- package/dist/{CheckboxGroup-C8MbwW9u.js → CheckboxGroup-BKhOmZYX.js} +2 -2
- package/dist/CheckboxGroup.js +5 -5
- package/dist/{Chip-Ch09jjYi.js → Chip-McVP3N_x.js} +1 -1
- package/dist/Chip.js +2 -2
- package/dist/{ChipGroup-PvqVW-tm.js → ChipGroup-DUGavZeU.js} +1 -1
- package/dist/ChipGroup.js +3 -3
- package/dist/ChipLink.js +2 -2
- package/dist/ChipRemovable.js +3 -3
- package/dist/ChipSelectable.js +2 -2
- package/dist/{Dialog-CV1JTkCn.js → Dialog-BlDd4T2u.js} +3 -3
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.js +3 -3
- package/dist/{Dropdown-DpFdFbA1.js → Dropdown-BLxSIe6p.js} +6 -6
- package/dist/Dropdown.d.ts +2 -2
- package/dist/Dropdown.js +9 -8
- package/dist/{FileInput-5apX17JT.js → FileInput-DntYrpZ-.js} +23 -8
- package/dist/FileInput.d.ts +12 -1
- package/dist/FileInput.js +7 -6
- package/dist/{Icon-DhAvH0XM.js → Icon-CbZXpyHU.js} +1 -1
- package/dist/Icon.js +2 -2
- package/dist/{Input-D2THgo7c.d.ts → Input-CeaAOB4p.d.ts} +6 -2
- package/dist/{Input-CnEz-2dK.js → Input-DBXX7ev8.js} +33 -12
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +4 -4
- package/dist/{LeuElement-B7NJzWwP.js → LeuElement-k4RjIeoG.js} +1 -1
- package/dist/{Menu-DpiheIPk.js → Menu-Cu8eIF1T.js} +2 -2
- package/dist/Menu.js +4 -4
- package/dist/{MenuItem-CZTqGg5R.js → MenuItem-Cs3KFhJm.js} +2 -2
- package/dist/MenuItem.js +3 -3
- package/dist/{Message-J4Kj7yHE.js → Message-C6Zlk_2p.js} +3 -3
- package/dist/Message.js +3 -3
- package/dist/{Pagination-CWqgusWZ.js → Pagination-CB2eVlXk.js} +4 -4
- package/dist/{Pagination-Be8TcBoC.d.ts → Pagination-CqkHh-Vd.d.ts} +1 -1
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +7 -6
- package/dist/{Placeholder-DMN6sMbp.js → Placeholder-DHMexMhK.js} +1 -1
- package/dist/Placeholder.js +2 -2
- package/dist/{Popup-JQjuj26v.js → Popup-8jhVy8gB.js} +1 -1
- package/dist/Popup.js +2 -2
- package/dist/{ProgressBar-CzN3fqiH.js → ProgressBar-CG0_lHfS.js} +1 -1
- package/dist/ProgressBar.js +2 -2
- package/dist/{Radio-CX8aCsff.js → Radio-DG3xqP3s.js} +1 -1
- package/dist/Radio.js +2 -2
- package/dist/{RadioGroup-CgEWQnC4.js → RadioGroup-BKCp9ICX.js} +2 -2
- package/dist/RadioGroup.js +3 -3
- package/dist/{Range-DoW_ZdKm.js → Range-7LrESv4K.js} +1 -1
- package/dist/Range.js +2 -2
- package/dist/{ScrollTop-DxChetWq.js → ScrollTop-CJJsfniA.js} +20 -20
- package/dist/ScrollTop.d.ts +6 -6
- package/dist/ScrollTop.js +6 -5
- package/dist/{Select-BCx79gOH.js → Select-CxEDXIBn.js} +154 -134
- package/dist/Select.d.ts +75 -73
- package/dist/Select.js +10 -9
- package/dist/{Spinner-DJR4gv3Y.js → Spinner-VhKfzI3Q.js} +1 -1
- package/dist/Spinner.d.ts +1 -1
- package/dist/Spinner.js +2 -2
- package/dist/{Table-DZz1ic3j.js → Table-rg_JCtsA.js} +3 -3
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +8 -7
- package/dist/{Tag-DsZS_8pl.js → Tag-BROUaDAZ.js} +1 -1
- package/dist/Tag.js +2 -2
- package/dist/{VisuallyHidden-BkllVjlz.js → VisuallyHidden-Co_txzxB.js} +1 -1
- package/dist/VisuallyHidden.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +31 -31
- package/dist/leu-accordion.js +2 -2
- package/dist/leu-button-group.js +6 -5
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.js +5 -4
- package/dist/leu-chart-wrapper.js +3 -3
- package/dist/leu-checkbox-group.js +5 -5
- package/dist/leu-checkbox.js +4 -4
- package/dist/leu-chip-group.js +3 -3
- package/dist/leu-chip-link.js +2 -2
- package/dist/leu-chip-removable.js +3 -3
- package/dist/leu-chip-selectable.js +2 -2
- package/dist/leu-dialog.js +3 -3
- package/dist/leu-dropdown.js +9 -8
- package/dist/leu-file-input.js +7 -6
- package/dist/leu-icon.js +2 -2
- package/dist/leu-input.d.ts +1 -1
- package/dist/leu-input.js +4 -4
- package/dist/leu-menu-item.js +3 -3
- package/dist/leu-menu.js +4 -4
- package/dist/leu-message.js +3 -3
- package/dist/leu-pagination.d.ts +1 -1
- package/dist/leu-pagination.js +7 -6
- package/dist/leu-placeholder.js +2 -2
- package/dist/leu-popup.js +2 -2
- package/dist/leu-progress-bar.js +2 -2
- package/dist/leu-radio-group.js +3 -3
- package/dist/leu-radio.js +2 -2
- package/dist/leu-range.js +2 -2
- package/dist/leu-scroll-top.js +6 -5
- package/dist/leu-select.js +10 -9
- package/dist/leu-spinner.d.ts +1 -1
- package/dist/leu-spinner.js +2 -2
- package/dist/leu-table.js +8 -7
- package/dist/leu-tag.js +2 -2
- package/dist/leu-visually-hidden.js +2 -2
- package/dist/vscode.html-custom-data.json +19 -27
- package/dist/vue/index.d.ts +18 -24
- package/dist/web-types.json +51 -60
- package/package.json +1 -1
- package/src/components/button/Button.ts +15 -3
- package/src/components/button/button.css +37 -9
- package/src/components/button/stories/button.stories.ts +23 -0
- package/src/components/button/test/button.test.ts +30 -3
- package/src/components/file-input/FileInput.ts +24 -5
- package/src/components/input/Input.ts +43 -8
- package/src/components/input/test/input.test.ts +106 -1
- package/src/components/scroll-top/ScrollTop.ts +18 -16
- package/src/components/select/Select.ts +198 -124
- package/src/components/select/select.css +4 -0
- package/src/components/select/stories/select.stories.ts +10 -0
- package/src/components/select/test/select.test.ts +440 -35
- /package/dist/{FormAssociatedMixin-BbFlza53.js → FormAssociatedMixin-DLPvFtbT.js} +0 -0
- /package/dist/{Spinner-CMo_o6Fy.d.ts → Spinner-CrM1enM0.d.ts} +0 -0
- /package/dist/{hasSlotController-DjdfnOQp.js → hasSlotController-DSBCVzPD.js} +0 -0
- /package/dist/{hasSlotController-BLtZurRh.d.ts → hasSlotController-DWPyZ52b.d.ts} +0 -0
package/dist/FileInput.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
2
|
import { t as FormAssociatedMixinType } from "./FormAssociatedMixin-Cc74LjbC.js";
|
|
3
3
|
import { t as LeuIcon } from "./Icon-Op80LrrO.js";
|
|
4
|
-
import { t as LeuButton } from "./Button-
|
|
4
|
+
import { t as LeuButton } from "./Button-BgNUxmo_.js";
|
|
5
5
|
import { t as LeuVisuallyHidden } from "./VisuallyHidden-OeQvhxYn.js";
|
|
6
6
|
import { PropertyValues } from "lit";
|
|
7
7
|
import * as lit_html0 from "lit-html";
|
|
@@ -53,6 +53,17 @@ declare class LeuFileInput extends LeuFileInput_base {
|
|
|
53
53
|
protected setFormValue(): void;
|
|
54
54
|
protected removeFile(fileToRemove: File): void;
|
|
55
55
|
protected dispatchChangeAndInputEvents(): void;
|
|
56
|
+
/**
|
|
57
|
+
* This implementation Uses base-10 (decimal) units:
|
|
58
|
+
* 1 KB = 1_000 bytes
|
|
59
|
+
* 1 MB = 1_000_000 bytes
|
|
60
|
+
* 1 GB = 1_000_000_000 bytes
|
|
61
|
+
*
|
|
62
|
+
* To switch to base-2 (binary), use the following implementation:
|
|
63
|
+
* // const KB = 1024
|
|
64
|
+
* // const MB = 1024 * 1024
|
|
65
|
+
* // const GB = 1024 * 1024 * 1024
|
|
66
|
+
*/
|
|
56
67
|
protected static formatFileSize(size: number): lit_html0.TemplateResult<1>;
|
|
57
68
|
protected handleDragEnter: (event: DragEvent) => void;
|
|
58
69
|
protected handleDragOver: (event: DragEvent) => void;
|
package/dist/FileInput.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./Spinner-VhKfzI3Q.js";
|
|
4
|
+
import "./Button-BSyDL_cV.js";
|
|
5
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
+
import { t as LeuFileInput } from "./FileInput-DntYrpZ-.js";
|
|
7
|
+
import "./VisuallyHidden-Co_txzxB.js";
|
|
7
8
|
export { LeuFileInput };
|
package/dist/Icon.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuIcon } from "./Icon-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
3
3
|
export { LeuIcon };
|
|
@@ -42,8 +42,6 @@ declare class LeuInput extends LeuInput_base {
|
|
|
42
42
|
required: boolean;
|
|
43
43
|
/** Adds a button to clear the input element */
|
|
44
44
|
clearable: boolean;
|
|
45
|
-
/** The value of the input element. */
|
|
46
|
-
value: string;
|
|
47
45
|
/** A custom error that is completely independent of the validity state. Useful for displaying server side errors. */
|
|
48
46
|
error: string;
|
|
49
47
|
/** The label of the input element */
|
|
@@ -74,6 +72,12 @@ declare class LeuInput extends LeuInput_base {
|
|
|
74
72
|
validationMessages: Record<string, string>;
|
|
75
73
|
/** Disables the browser's validation. */
|
|
76
74
|
novalidate: boolean;
|
|
75
|
+
/** The default value of the input element. */
|
|
76
|
+
defaultValue: string;
|
|
77
|
+
protected _value: string;
|
|
78
|
+
/** The value of the input element. */
|
|
79
|
+
set value(value: string);
|
|
80
|
+
get value(): string;
|
|
77
81
|
_validity: ValidityState | null;
|
|
78
82
|
static resolveErrorMessage(message: any, refernceValue: any): any;
|
|
79
83
|
protected _inputRef: lit_html_directives_ref_js0.Ref<HTMLInputElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
4
|
-
import { t as FormAssociatedMixin } from "./FormAssociatedMixin-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
|
|
5
5
|
import { css, html, nothing } from "lit";
|
|
6
6
|
import { property, state } from "lit/decorators.js";
|
|
7
7
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -316,13 +316,13 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
316
316
|
this.disabled = false;
|
|
317
317
|
this.required = false;
|
|
318
318
|
this.clearable = false;
|
|
319
|
-
this.value = "";
|
|
320
319
|
this.error = "";
|
|
321
320
|
this.label = "";
|
|
322
321
|
this.size = "regular";
|
|
323
322
|
this.type = "text";
|
|
324
323
|
this.validationMessages = {};
|
|
325
324
|
this.novalidate = false;
|
|
325
|
+
this.defaultValue = "";
|
|
326
326
|
this._validity = null;
|
|
327
327
|
this._inputRef = createRef();
|
|
328
328
|
}
|
|
@@ -338,6 +338,14 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
338
338
|
delegatesFocus: true
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
+
/** The value of the input element. */
|
|
342
|
+
set value(value) {
|
|
343
|
+
this._value = value;
|
|
344
|
+
}
|
|
345
|
+
get value() {
|
|
346
|
+
if (typeof this._value === "string") return this._value;
|
|
347
|
+
return this.defaultValue;
|
|
348
|
+
}
|
|
341
349
|
static resolveErrorMessage(message, refernceValue) {
|
|
342
350
|
if (typeof message === "function") return message(refernceValue);
|
|
343
351
|
return message;
|
|
@@ -347,13 +355,19 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
347
355
|
return Number(this.value);
|
|
348
356
|
}
|
|
349
357
|
formResetCallback() {
|
|
350
|
-
this.value =
|
|
358
|
+
this.value = this.defaultValue;
|
|
351
359
|
}
|
|
352
360
|
setFormValue() {
|
|
353
|
-
this.internals.setFormValue(this.value);
|
|
361
|
+
this.internals.setFormValue(this.disabled ? null : this.value);
|
|
354
362
|
}
|
|
355
363
|
willUpdate(changedProperties) {
|
|
356
|
-
|
|
364
|
+
super.willUpdate(changedProperties);
|
|
365
|
+
let valueChanged = false;
|
|
366
|
+
if (changedProperties.has("defaultValue") && !changedProperties.has("value") && !this.hasInteracted) {
|
|
367
|
+
this.value = this.defaultValue;
|
|
368
|
+
valueChanged = true;
|
|
369
|
+
}
|
|
370
|
+
if (valueChanged || changedProperties.has("value") || changedProperties.has("name") || changedProperties.has("disabled")) this.setFormValue();
|
|
357
371
|
}
|
|
358
372
|
/**
|
|
359
373
|
* Method for handling the click event of the wrapper element.
|
|
@@ -388,6 +402,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
388
402
|
* @fires {CustomEvent} change
|
|
389
403
|
*/
|
|
390
404
|
handleChange(event) {
|
|
405
|
+
this.hasInteracted = true;
|
|
391
406
|
if (event.target.validity.valid) this.value = event.target.value;
|
|
392
407
|
const customEvent = new CustomEvent(event.type, event);
|
|
393
408
|
this.dispatchEvent(customEvent);
|
|
@@ -398,6 +413,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
398
413
|
* the event can be handled outside the shadow DOM.
|
|
399
414
|
*/
|
|
400
415
|
handleInput(event) {
|
|
416
|
+
this.hasInteracted = true;
|
|
401
417
|
this.value = event.target.value;
|
|
402
418
|
const customEvent = new CustomEvent("input", {
|
|
403
419
|
bubbles: true,
|
|
@@ -447,7 +463,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
|
|
|
447
463
|
}
|
|
448
464
|
isInvalid() {
|
|
449
465
|
if (this.error) return true;
|
|
450
|
-
return this._validity === null || this.novalidate ? false : !this._validity.valid;
|
|
466
|
+
return this._validity === null || this.novalidate || this.disabled ? false : !this._validity.valid;
|
|
451
467
|
}
|
|
452
468
|
/**
|
|
453
469
|
* Check input validation
|
|
@@ -544,10 +560,6 @@ __decorate([property({
|
|
|
544
560
|
type: Boolean,
|
|
545
561
|
reflect: true
|
|
546
562
|
})], LeuInput.prototype, "clearable", void 0);
|
|
547
|
-
__decorate([property({
|
|
548
|
-
type: String,
|
|
549
|
-
reflect: true
|
|
550
|
-
})], LeuInput.prototype, "value", void 0);
|
|
551
563
|
__decorate([property({
|
|
552
564
|
type: String,
|
|
553
565
|
reflect: true
|
|
@@ -605,6 +617,15 @@ __decorate([property({
|
|
|
605
617
|
type: Boolean,
|
|
606
618
|
reflect: true
|
|
607
619
|
})], LeuInput.prototype, "novalidate", void 0);
|
|
620
|
+
__decorate([property({
|
|
621
|
+
type: String,
|
|
622
|
+
reflect: true,
|
|
623
|
+
attribute: "value"
|
|
624
|
+
})], LeuInput.prototype, "defaultValue", void 0);
|
|
625
|
+
__decorate([property({
|
|
626
|
+
type: String,
|
|
627
|
+
attribute: false
|
|
628
|
+
})], LeuInput.prototype, "value", null);
|
|
608
629
|
__decorate([state()], LeuInput.prototype, "_validity", void 0);
|
|
609
630
|
//#endregion
|
|
610
631
|
export { SIZES as n, LeuInput as t };
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SIZES, t as LeuInput } from "./Input-
|
|
1
|
+
import { n as SIZES, t as LeuInput } from "./Input-CeaAOB4p.js";
|
|
2
2
|
export { LeuInput, SIZES };
|
package/dist/Input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./FormAssociatedMixin-
|
|
4
|
-
import { n as SIZES, t as LeuInput } from "./Input-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
4
|
+
import { n as SIZES, t as LeuInput } from "./Input-DBXX7ev8.js";
|
|
5
5
|
export { LeuInput, SIZES };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuMenuItem } from "./MenuItem-
|
|
3
|
+
import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
|
|
4
4
|
import { css, html } from "lit";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/menu/menu.css?inline
|
package/dist/Menu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./MenuItem-
|
|
4
|
-
import { t as LeuMenu } from "./Menu-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./MenuItem-Cs3KFhJm.js";
|
|
4
|
+
import { t as LeuMenu } from "./Menu-Cu8eIF1T.js";
|
|
5
5
|
export { LeuMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
4
|
import { css, html, nothing } from "lit";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { ifDefined } from "lit/directives/if-defined.js";
|
package/dist/MenuItem.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import { t as LeuMenuItem } from "./MenuItem-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
|
|
4
4
|
export { LeuMenuItem };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
4
|
-
import { t as HasSlotController } from "./hasSlotController-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
|
|
5
5
|
import { css, html, nothing } from "lit";
|
|
6
6
|
import { property } from "lit/decorators.js";
|
|
7
7
|
import { classMap } from "lit/directives/class-map.js";
|
package/dist/Message.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import { t as LeuMessage } from "./Message-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import { t as LeuMessage } from "./Message-C6Zlk_2p.js";
|
|
4
4
|
export { LeuMessage };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
4
|
-
import { t as LeuButton } from "./Button-
|
|
5
|
-
import { t as LeuVisuallyHidden } from "./VisuallyHidden-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as LeuButton } from "./Button-BSyDL_cV.js";
|
|
5
|
+
import { t as LeuVisuallyHidden } from "./VisuallyHidden-Co_txzxB.js";
|
|
6
6
|
import { css, html } from "lit";
|
|
7
7
|
import { property, state } from "lit/decorators.js";
|
|
8
8
|
import { live } from "lit/directives/live.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
2
|
import { t as LeuIcon } from "./Icon-Op80LrrO.js";
|
|
3
|
-
import { t as LeuButton } from "./Button-
|
|
3
|
+
import { t as LeuButton } from "./Button-BgNUxmo_.js";
|
|
4
4
|
import { t as LeuVisuallyHidden } from "./VisuallyHidden-OeQvhxYn.js";
|
|
5
5
|
import * as lit_html0 from "lit-html";
|
|
6
6
|
|
package/dist/Pagination.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LeuPagination } from "./Pagination-
|
|
1
|
+
import { t as LeuPagination } from "./Pagination-CqkHh-Vd.js";
|
|
2
2
|
export { LeuPagination };
|
package/dist/Pagination.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./Spinner-VhKfzI3Q.js";
|
|
4
|
+
import "./Button-BSyDL_cV.js";
|
|
5
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
+
import "./VisuallyHidden-Co_txzxB.js";
|
|
7
|
+
import { t as LeuPagination } from "./Pagination-CB2eVlXk.js";
|
|
7
8
|
export { LeuPagination };
|
package/dist/Placeholder.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuPlaceholder } from "./Placeholder-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuPlaceholder } from "./Placeholder-DHMexMhK.js";
|
|
3
3
|
export { LeuPlaceholder };
|
package/dist/Popup.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuPopup } from "./Popup-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuPopup } from "./Popup-8jhVy8gB.js";
|
|
3
3
|
export { LeuPopup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
3
|
import { css, html, nothing } from "lit";
|
|
4
4
|
import { property } from "lit/decorators.js";
|
package/dist/ProgressBar.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuProgressBar } from "./ProgressBar-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuProgressBar } from "./ProgressBar-CG0_lHfS.js";
|
|
3
3
|
export { LeuProgressBar };
|
package/dist/Radio.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuRadio } from "./Radio-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuRadio } from "./Radio-DG3xqP3s.js";
|
|
3
3
|
export { LeuRadio };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuRadio } from "./Radio-
|
|
3
|
+
import { t as LeuRadio } from "./Radio-DG3xqP3s.js";
|
|
4
4
|
import { css, html } from "lit";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
import { classMap } from "lit/directives/class-map.js";
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Radio-
|
|
3
|
-
import { t as LeuRadioGroup } from "./RadioGroup-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Radio-DG3xqP3s.js";
|
|
3
|
+
import { t as LeuRadioGroup } from "./RadioGroup-BKCp9ICX.js";
|
|
4
4
|
export { LeuRadioGroup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
3
|
import { n as isNumber, t as clamp } from "./utils-hfk5Nwy8.js";
|
|
4
4
|
import { css, html, nothing } from "lit";
|
package/dist/Range.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuRange } from "./Range-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuRange } from "./Range-7LrESv4K.js";
|
|
3
3
|
export { LeuRange };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
4
|
-
import { t as LeuButton } from "./Button-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as LeuButton } from "./Button-BSyDL_cV.js";
|
|
5
5
|
import { r as throttle } from "./utils-hfk5Nwy8.js";
|
|
6
6
|
import { css, html } from "lit";
|
|
7
7
|
import { state } from "lit/decorators.js";
|
|
@@ -63,24 +63,24 @@ var scroll_top_default = css`.scroll-top {
|
|
|
63
63
|
/**
|
|
64
64
|
* @tagname leu-scroll-top
|
|
65
65
|
*/
|
|
66
|
-
var LeuScrollTop = class
|
|
66
|
+
var LeuScrollTop = class extends LeuElement {
|
|
67
67
|
constructor(..._args) {
|
|
68
68
|
super(..._args);
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
69
|
+
this.showButton = false;
|
|
70
|
+
this.prevYPos = 0;
|
|
71
|
+
this.hasScrolledDown = false;
|
|
72
72
|
this.scroll = () => {
|
|
73
|
-
const delta = window.scrollY - this.
|
|
74
|
-
if (this.
|
|
75
|
-
if (delta < 0) this.
|
|
76
|
-
} else if (delta > 0) this.
|
|
73
|
+
const delta = window.scrollY - this.prevYPos;
|
|
74
|
+
if (this.hasScrolledDown) {
|
|
75
|
+
if (delta < 0) this.hasScrolledDown = false;
|
|
76
|
+
} else if (delta > 0) this.hasScrolledDown = true;
|
|
77
77
|
/**
|
|
78
78
|
* Only show the button when
|
|
79
79
|
* ... the current scroll position is greater than the window height (below-the-fold) and when
|
|
80
80
|
* ... scrolling up
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
82
|
+
this.showButton = window.scrollY > window.innerHeight && !this.hasScrolledDown;
|
|
83
|
+
this.prevYPos = window.scrollY;
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
static {
|
|
@@ -94,14 +94,14 @@ var LeuScrollTop = class LeuScrollTop extends LeuElement {
|
|
|
94
94
|
}
|
|
95
95
|
connectedCallback() {
|
|
96
96
|
super.connectedCallback();
|
|
97
|
-
this.
|
|
98
|
-
document.addEventListener("scroll", this.
|
|
97
|
+
this.scrollListener = throttle(this.scroll, 100);
|
|
98
|
+
document.addEventListener("scroll", this.scrollListener, true);
|
|
99
99
|
}
|
|
100
100
|
disconnectedCallback() {
|
|
101
|
-
document.removeEventListener("scroll", this.
|
|
101
|
+
document.removeEventListener("scroll", this.scrollListener, true);
|
|
102
102
|
super.disconnectedCallback();
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
scrollToTop() {
|
|
105
105
|
window.scrollTo({
|
|
106
106
|
top: 0,
|
|
107
107
|
left: 0,
|
|
@@ -112,12 +112,12 @@ var LeuScrollTop = class LeuScrollTop extends LeuElement {
|
|
|
112
112
|
return html`
|
|
113
113
|
<div class=${classMap({
|
|
114
114
|
"scroll-top": true,
|
|
115
|
-
hide: !this.
|
|
115
|
+
hide: !this.showButton
|
|
116
116
|
})}>
|
|
117
117
|
<leu-button
|
|
118
118
|
label="Zum Seitenanfang"
|
|
119
119
|
round
|
|
120
|
-
@click="${() =>
|
|
120
|
+
@click="${() => this.scrollToTop()}"
|
|
121
121
|
>
|
|
122
122
|
<leu-icon name="arrowUp"></leu-icon>
|
|
123
123
|
</leu-button>
|
|
@@ -125,6 +125,6 @@ var LeuScrollTop = class LeuScrollTop extends LeuElement {
|
|
|
125
125
|
`;
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
__decorate([state()], LeuScrollTop.prototype, "
|
|
128
|
+
__decorate([state()], LeuScrollTop.prototype, "showButton", void 0);
|
|
129
129
|
//#endregion
|
|
130
130
|
export { LeuScrollTop as t };
|
package/dist/ScrollTop.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
2
|
import { t as LeuIcon } from "./Icon-Op80LrrO.js";
|
|
3
|
-
import { t as LeuButton } from "./Button-
|
|
3
|
+
import { t as LeuButton } from "./Button-BgNUxmo_.js";
|
|
4
4
|
import * as lit_html0 from "lit-html";
|
|
5
5
|
|
|
6
6
|
//#region src/components/scroll-top/ScrollTop.d.ts
|
|
@@ -13,14 +13,14 @@ declare class LeuScrollTop extends LeuElement {
|
|
|
13
13
|
"leu-icon": typeof LeuIcon;
|
|
14
14
|
};
|
|
15
15
|
static styles: any[];
|
|
16
|
-
protected
|
|
17
|
-
protected
|
|
18
|
-
protected
|
|
19
|
-
protected
|
|
16
|
+
protected showButton: boolean;
|
|
17
|
+
protected prevYPos: number;
|
|
18
|
+
protected hasScrolledDown: boolean;
|
|
19
|
+
protected scrollListener: EventListener;
|
|
20
20
|
scroll: () => void;
|
|
21
21
|
connectedCallback(): void;
|
|
22
22
|
disconnectedCallback(): void;
|
|
23
|
-
|
|
23
|
+
scrollToTop(): void;
|
|
24
24
|
render(): lit_html0.TemplateResult<1>;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
package/dist/ScrollTop.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./Spinner-VhKfzI3Q.js";
|
|
4
|
+
import "./Button-BSyDL_cV.js";
|
|
5
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
+
import { t as LeuScrollTop } from "./ScrollTop-CJJsfniA.js";
|
|
6
7
|
export { LeuScrollTop };
|