@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.
Files changed (136) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +28 -0
  3. package/CONTRIBUTING.md +19 -8
  4. package/dist/{Accordion-CDNyrB8d.js → Accordion-DLsqXcK8.js} +1 -1
  5. package/dist/Accordion.js +2 -2
  6. package/dist/{Button-EdS9xr2J.js → Button-BSyDL_cV.js} +57 -17
  7. package/dist/{Button-DSGPIcjm.d.ts → Button-BgNUxmo_.d.ts} +6 -0
  8. package/dist/Button.d.ts +1 -1
  9. package/dist/Button.js +5 -4
  10. package/dist/{ButtonGroup-BQqf8o_d.js → ButtonGroup-BmSvl-Oc.js} +2 -2
  11. package/dist/ButtonGroup.js +6 -5
  12. package/dist/{ChartWrapper-LiNHTNRw.js → ChartWrapper-CvDvQsd5.js} +3 -3
  13. package/dist/ChartWrapper.d.ts +2 -2
  14. package/dist/ChartWrapper.js +3 -3
  15. package/dist/{Checkbox-BtDWmPab.js → Checkbox-Cl_X6gBJ.js} +3 -3
  16. package/dist/Checkbox.js +4 -4
  17. package/dist/{CheckboxGroup-C8MbwW9u.js → CheckboxGroup-BKhOmZYX.js} +2 -2
  18. package/dist/CheckboxGroup.js +5 -5
  19. package/dist/{Chip-Ch09jjYi.js → Chip-McVP3N_x.js} +1 -1
  20. package/dist/Chip.js +2 -2
  21. package/dist/{ChipGroup-PvqVW-tm.js → ChipGroup-DUGavZeU.js} +1 -1
  22. package/dist/ChipGroup.js +3 -3
  23. package/dist/ChipLink.js +2 -2
  24. package/dist/ChipRemovable.js +3 -3
  25. package/dist/ChipSelectable.js +2 -2
  26. package/dist/{Dialog-CV1JTkCn.js → Dialog-BlDd4T2u.js} +3 -3
  27. package/dist/Dialog.d.ts +1 -1
  28. package/dist/Dialog.js +3 -3
  29. package/dist/{Dropdown-DpFdFbA1.js → Dropdown-BLxSIe6p.js} +6 -6
  30. package/dist/Dropdown.d.ts +2 -2
  31. package/dist/Dropdown.js +9 -8
  32. package/dist/{FileInput-5apX17JT.js → FileInput-DntYrpZ-.js} +23 -8
  33. package/dist/FileInput.d.ts +12 -1
  34. package/dist/FileInput.js +7 -6
  35. package/dist/{Icon-DhAvH0XM.js → Icon-CbZXpyHU.js} +1 -1
  36. package/dist/Icon.js +2 -2
  37. package/dist/{Input-D2THgo7c.d.ts → Input-CeaAOB4p.d.ts} +6 -2
  38. package/dist/{Input-CnEz-2dK.js → Input-DBXX7ev8.js} +33 -12
  39. package/dist/Input.d.ts +1 -1
  40. package/dist/Input.js +4 -4
  41. package/dist/{LeuElement-B7NJzWwP.js → LeuElement-k4RjIeoG.js} +1 -1
  42. package/dist/{Menu-DpiheIPk.js → Menu-Cu8eIF1T.js} +2 -2
  43. package/dist/Menu.js +4 -4
  44. package/dist/{MenuItem-CZTqGg5R.js → MenuItem-Cs3KFhJm.js} +2 -2
  45. package/dist/MenuItem.js +3 -3
  46. package/dist/{Message-J4Kj7yHE.js → Message-C6Zlk_2p.js} +3 -3
  47. package/dist/Message.js +3 -3
  48. package/dist/{Pagination-CWqgusWZ.js → Pagination-CB2eVlXk.js} +4 -4
  49. package/dist/{Pagination-Be8TcBoC.d.ts → Pagination-CqkHh-Vd.d.ts} +1 -1
  50. package/dist/Pagination.d.ts +1 -1
  51. package/dist/Pagination.js +7 -6
  52. package/dist/{Placeholder-DMN6sMbp.js → Placeholder-DHMexMhK.js} +1 -1
  53. package/dist/Placeholder.js +2 -2
  54. package/dist/{Popup-JQjuj26v.js → Popup-8jhVy8gB.js} +1 -1
  55. package/dist/Popup.js +2 -2
  56. package/dist/{ProgressBar-CzN3fqiH.js → ProgressBar-CG0_lHfS.js} +1 -1
  57. package/dist/ProgressBar.js +2 -2
  58. package/dist/{Radio-CX8aCsff.js → Radio-DG3xqP3s.js} +1 -1
  59. package/dist/Radio.js +2 -2
  60. package/dist/{RadioGroup-CgEWQnC4.js → RadioGroup-BKCp9ICX.js} +2 -2
  61. package/dist/RadioGroup.js +3 -3
  62. package/dist/{Range-DoW_ZdKm.js → Range-7LrESv4K.js} +1 -1
  63. package/dist/Range.js +2 -2
  64. package/dist/{ScrollTop-DxChetWq.js → ScrollTop-CJJsfniA.js} +20 -20
  65. package/dist/ScrollTop.d.ts +6 -6
  66. package/dist/ScrollTop.js +6 -5
  67. package/dist/{Select-BCx79gOH.js → Select-CxEDXIBn.js} +154 -134
  68. package/dist/Select.d.ts +75 -73
  69. package/dist/Select.js +10 -9
  70. package/dist/{Spinner-DJR4gv3Y.js → Spinner-VhKfzI3Q.js} +1 -1
  71. package/dist/Spinner.d.ts +1 -1
  72. package/dist/Spinner.js +2 -2
  73. package/dist/{Table-DZz1ic3j.js → Table-rg_JCtsA.js} +3 -3
  74. package/dist/Table.d.ts +1 -1
  75. package/dist/Table.js +8 -7
  76. package/dist/{Tag-DsZS_8pl.js → Tag-BROUaDAZ.js} +1 -1
  77. package/dist/Tag.js +2 -2
  78. package/dist/{VisuallyHidden-BkllVjlz.js → VisuallyHidden-Co_txzxB.js} +1 -1
  79. package/dist/VisuallyHidden.js +2 -2
  80. package/dist/index.d.ts +4 -4
  81. package/dist/index.js +31 -31
  82. package/dist/leu-accordion.js +2 -2
  83. package/dist/leu-button-group.js +6 -5
  84. package/dist/leu-button.d.ts +1 -1
  85. package/dist/leu-button.js +5 -4
  86. package/dist/leu-chart-wrapper.js +3 -3
  87. package/dist/leu-checkbox-group.js +5 -5
  88. package/dist/leu-checkbox.js +4 -4
  89. package/dist/leu-chip-group.js +3 -3
  90. package/dist/leu-chip-link.js +2 -2
  91. package/dist/leu-chip-removable.js +3 -3
  92. package/dist/leu-chip-selectable.js +2 -2
  93. package/dist/leu-dialog.js +3 -3
  94. package/dist/leu-dropdown.js +9 -8
  95. package/dist/leu-file-input.js +7 -6
  96. package/dist/leu-icon.js +2 -2
  97. package/dist/leu-input.d.ts +1 -1
  98. package/dist/leu-input.js +4 -4
  99. package/dist/leu-menu-item.js +3 -3
  100. package/dist/leu-menu.js +4 -4
  101. package/dist/leu-message.js +3 -3
  102. package/dist/leu-pagination.d.ts +1 -1
  103. package/dist/leu-pagination.js +7 -6
  104. package/dist/leu-placeholder.js +2 -2
  105. package/dist/leu-popup.js +2 -2
  106. package/dist/leu-progress-bar.js +2 -2
  107. package/dist/leu-radio-group.js +3 -3
  108. package/dist/leu-radio.js +2 -2
  109. package/dist/leu-range.js +2 -2
  110. package/dist/leu-scroll-top.js +6 -5
  111. package/dist/leu-select.js +10 -9
  112. package/dist/leu-spinner.d.ts +1 -1
  113. package/dist/leu-spinner.js +2 -2
  114. package/dist/leu-table.js +8 -7
  115. package/dist/leu-tag.js +2 -2
  116. package/dist/leu-visually-hidden.js +2 -2
  117. package/dist/vscode.html-custom-data.json +19 -27
  118. package/dist/vue/index.d.ts +18 -24
  119. package/dist/web-types.json +51 -60
  120. package/package.json +1 -1
  121. package/src/components/button/Button.ts +15 -3
  122. package/src/components/button/button.css +37 -9
  123. package/src/components/button/stories/button.stories.ts +23 -0
  124. package/src/components/button/test/button.test.ts +30 -3
  125. package/src/components/file-input/FileInput.ts +24 -5
  126. package/src/components/input/Input.ts +43 -8
  127. package/src/components/input/test/input.test.ts +106 -1
  128. package/src/components/scroll-top/ScrollTop.ts +18 -16
  129. package/src/components/select/Select.ts +198 -124
  130. package/src/components/select/select.css +4 -0
  131. package/src/components/select/stories/select.stories.ts +10 -0
  132. package/src/components/select/test/select.test.ts +440 -35
  133. /package/dist/{FormAssociatedMixin-BbFlza53.js → FormAssociatedMixin-DLPvFtbT.js} +0 -0
  134. /package/dist/{Spinner-CMo_o6Fy.d.ts → Spinner-CrM1enM0.d.ts} +0 -0
  135. /package/dist/{hasSlotController-DjdfnOQp.js → hasSlotController-DSBCVzPD.js} +0 -0
  136. /package/dist/{hasSlotController-BLtZurRh.d.ts → hasSlotController-DWPyZ52b.d.ts} +0 -0
@@ -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-DSGPIcjm.js";
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import "./Button-EdS9xr2J.js";
4
- import "./FormAssociatedMixin-BbFlza53.js";
5
- import { t as LeuFileInput } from "./FileInput-5apX17JT.js";
6
- import "./VisuallyHidden-BkllVjlz.js";
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 };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css, html, svg } from "lit";
4
4
  import { property } from "lit/decorators.js";
package/dist/Icon.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import { t as LeuIcon } from "./Icon-DhAvH0XM.js";
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-B7NJzWwP.js";
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-DhAvH0XM.js";
4
- import { t as FormAssociatedMixin } from "./FormAssociatedMixin-BbFlza53.js";
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
- if (changedProperties.has("value")) this.setFormValue();
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-D2THgo7c.js";
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import "./FormAssociatedMixin-BbFlza53.js";
4
- import { n as SIZES, t as LeuInput } from "./Input-CnEz-2dK.js";
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 };
@@ -20,7 +20,7 @@ var common_styles_default = css`:host,
20
20
  //#region src/lib/LeuElement.ts
21
21
  var LeuElement = class extends LitElement {
22
22
  static {
23
- this.version = "0.25.0";
23
+ this.version = "0.27.0";
24
24
  }
25
25
  static {
26
26
  this.dependencies = {};
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
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-CZTqGg5R.js";
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import "./MenuItem-CZTqGg5R.js";
4
- import { t as LeuMenu } from "./Menu-DpiheIPk.js";
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-B7NJzWwP.js";
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-DhAvH0XM.js";
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import { t as LeuMenuItem } from "./MenuItem-CZTqGg5R.js";
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-B7NJzWwP.js";
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-DhAvH0XM.js";
4
- import { t as HasSlotController } from "./hasSlotController-DjdfnOQp.js";
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import { t as LeuMessage } from "./Message-J4Kj7yHE.js";
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-B7NJzWwP.js";
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-DhAvH0XM.js";
4
- import { t as LeuButton } from "./Button-EdS9xr2J.js";
5
- import { t as LeuVisuallyHidden } from "./VisuallyHidden-BkllVjlz.js";
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-DSGPIcjm.js";
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
 
@@ -1,2 +1,2 @@
1
- import { t as LeuPagination } from "./Pagination-Be8TcBoC.js";
1
+ import { t as LeuPagination } from "./Pagination-CqkHh-Vd.js";
2
2
  export { LeuPagination };
@@ -1,7 +1,8 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import "./Button-EdS9xr2J.js";
4
- import "./FormAssociatedMixin-BbFlza53.js";
5
- import "./VisuallyHidden-BkllVjlz.js";
6
- import { t as LeuPagination } from "./Pagination-CWqgusWZ.js";
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 };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { css, html } from "lit";
3
3
  //#region src/components/placeholder/placeholder.css?inline
4
4
  var placeholder_default = css`:host {
@@ -1,3 +1,3 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import { t as LeuPlaceholder } from "./Placeholder-DMN6sMbp.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuPlaceholder } from "./Placeholder-DHMexMhK.js";
3
3
  export { LeuPlaceholder };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css, html } from "lit";
4
4
  import { property } from "lit/decorators.js";
package/dist/Popup.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import { t as LeuPopup } from "./Popup-JQjuj26v.js";
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-B7NJzWwP.js";
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";
@@ -1,3 +1,3 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import { t as LeuProgressBar } from "./ProgressBar-CzN3fqiH.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuProgressBar } from "./ProgressBar-CG0_lHfS.js";
3
3
  export { LeuProgressBar };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-B7NJzWwP.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css, html } from "lit";
4
4
  import { property } from "lit/decorators.js";
package/dist/Radio.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import { t as LeuRadio } from "./Radio-CX8aCsff.js";
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-B7NJzWwP.js";
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-CX8aCsff.js";
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";
@@ -1,4 +1,4 @@
1
- import "./LeuElement-B7NJzWwP.js";
2
- import "./Radio-CX8aCsff.js";
3
- import { t as LeuRadioGroup } from "./RadioGroup-CgEWQnC4.js";
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-B7NJzWwP.js";
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-B7NJzWwP.js";
2
- import { t as LeuRange } from "./Range-DoW_ZdKm.js";
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-B7NJzWwP.js";
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-DhAvH0XM.js";
4
- import { t as LeuButton } from "./Button-EdS9xr2J.js";
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 LeuScrollTop extends LeuElement {
66
+ var LeuScrollTop = class extends LeuElement {
67
67
  constructor(..._args) {
68
68
  super(..._args);
69
- this._showButton = false;
70
- this._prevYPos = 0;
71
- this._scrollDown = false;
69
+ this.showButton = false;
70
+ this.prevYPos = 0;
71
+ this.hasScrolledDown = false;
72
72
  this.scroll = () => {
73
- const delta = window.scrollY - this._prevYPos;
74
- if (this._scrollDown) {
75
- if (delta < 0) this._scrollDown = false;
76
- } else if (delta > 0) this._scrollDown = true;
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._showButton = window.scrollY > window.innerHeight && !this._scrollDown;
83
- this._prevYPos = window.scrollY;
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._scrollListener = throttle(this.scroll, 100);
98
- document.addEventListener("scroll", this._scrollListener, true);
97
+ this.scrollListener = throttle(this.scroll, 100);
98
+ document.addEventListener("scroll", this.scrollListener, true);
99
99
  }
100
100
  disconnectedCallback() {
101
- document.removeEventListener("scroll", this._scrollListener, true);
101
+ document.removeEventListener("scroll", this.scrollListener, true);
102
102
  super.disconnectedCallback();
103
103
  }
104
- static scrollToTop() {
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._showButton
115
+ hide: !this.showButton
116
116
  })}>
117
117
  <leu-button
118
118
  label="Zum Seitenanfang"
119
119
  round
120
- @click="${() => LeuScrollTop.scrollToTop()}"
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, "_showButton", void 0);
128
+ __decorate([state()], LeuScrollTop.prototype, "showButton", void 0);
129
129
  //#endregion
130
130
  export { LeuScrollTop as t };
@@ -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-DSGPIcjm.js";
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 _showButton: boolean;
17
- protected _prevYPos: number;
18
- protected _scrollDown: boolean;
19
- protected _scrollListener: EventListener;
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
- static scrollToTop(): void;
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-B7NJzWwP.js";
2
- import "./Icon-DhAvH0XM.js";
3
- import "./Button-EdS9xr2J.js";
4
- import "./FormAssociatedMixin-BbFlza53.js";
5
- import { t as LeuScrollTop } from "./ScrollTop-DxChetWq.js";
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 };