@statistikzh/leu 0.18.0 → 0.19.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 (106) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Button.js +1 -1
  5. package/dist/ButtonGroup.js +1 -1
  6. package/dist/ChartWrapper.js +1 -1
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/CheckboxGroup.js +1 -1
  9. package/dist/Chip.js +1 -1
  10. package/dist/ChipGroup.js +1 -1
  11. package/dist/ChipLink.js +1 -1
  12. package/dist/ChipRemovable.js +1 -1
  13. package/dist/ChipSelectable.js +1 -1
  14. package/dist/Dialog.js +1 -1
  15. package/dist/Dropdown.js +1 -1
  16. package/dist/FileInput.d.ts +59 -0
  17. package/dist/FileInput.js +383 -0
  18. package/dist/Icon.js +1 -1
  19. package/dist/Input.d.ts +0 -9
  20. package/dist/Input.js +4 -25
  21. package/dist/{LeuElement-DlQXnrk8.js → LeuElement-CKq5epyY.js} +1 -1
  22. package/dist/Menu.js +1 -1
  23. package/dist/MenuItem.js +1 -1
  24. package/dist/Message.js +1 -1
  25. package/dist/Pagination.js +1 -1
  26. package/dist/Placeholder.js +1 -1
  27. package/dist/Popup.js +1 -1
  28. package/dist/ProgressBar.d.ts +29 -0
  29. package/dist/ProgressBar.js +166 -0
  30. package/dist/Radio.js +1 -1
  31. package/dist/RadioGroup.js +1 -1
  32. package/dist/Range.js +1 -1
  33. package/dist/ScrollTop.js +1 -1
  34. package/dist/Select.js +1 -1
  35. package/dist/Spinner.js +1 -1
  36. package/dist/Table.js +1 -1
  37. package/dist/Tag.js +1 -1
  38. package/dist/VisuallyHidden.js +1 -1
  39. package/dist/components/file-input/FileInput.d.ts +54 -0
  40. package/dist/components/file-input/FileInput.d.ts.map +1 -0
  41. package/dist/components/file-input/leu-file-input.d.ts +3 -0
  42. package/dist/components/file-input/leu-file-input.d.ts.map +1 -0
  43. package/dist/components/file-input/stories/file-input.stories.d.ts +30 -0
  44. package/dist/components/file-input/stories/file-input.stories.d.ts.map +1 -0
  45. package/dist/components/file-input/test/file-input.test.d.ts +2 -0
  46. package/dist/components/file-input/test/file-input.test.d.ts.map +1 -0
  47. package/dist/components/input/Input.d.ts +0 -9
  48. package/dist/components/input/Input.d.ts.map +1 -1
  49. package/dist/components/progress-bar/ProgressBar.d.ts +25 -0
  50. package/dist/components/progress-bar/ProgressBar.d.ts.map +1 -0
  51. package/dist/components/progress-bar/leu-progress-bar.d.ts +3 -0
  52. package/dist/components/progress-bar/leu-progress-bar.d.ts.map +1 -0
  53. package/dist/components/progress-bar/stories/progress-bar.stories.d.ts +48 -0
  54. package/dist/components/progress-bar/stories/progress-bar.stories.d.ts.map +1 -0
  55. package/dist/components/progress-bar/test/progress-bar.test.d.ts +2 -0
  56. package/dist/components/progress-bar/test/progress-bar.test.d.ts.map +1 -0
  57. package/dist/index.js +1 -1
  58. package/dist/leu-accordion.js +1 -1
  59. package/dist/leu-button-group.js +1 -1
  60. package/dist/leu-button.js +1 -1
  61. package/dist/leu-chart-wrapper.js +1 -1
  62. package/dist/leu-checkbox-group.js +1 -1
  63. package/dist/leu-checkbox.js +1 -1
  64. package/dist/leu-chip-group.js +1 -1
  65. package/dist/leu-chip-link.js +1 -1
  66. package/dist/leu-chip-removable.js +1 -1
  67. package/dist/leu-chip-selectable.js +1 -1
  68. package/dist/leu-dialog.js +1 -1
  69. package/dist/leu-dropdown.js +1 -1
  70. package/dist/leu-file-input.d.ts +8 -0
  71. package/dist/leu-file-input.js +42 -0
  72. package/dist/leu-icon.js +1 -1
  73. package/dist/leu-input.js +1 -1
  74. package/dist/leu-menu-item.js +1 -1
  75. package/dist/leu-menu.js +1 -1
  76. package/dist/leu-message.js +1 -1
  77. package/dist/leu-pagination.js +1 -1
  78. package/dist/leu-placeholder.js +1 -1
  79. package/dist/leu-popup.js +1 -1
  80. package/dist/leu-progress-bar.d.ts +4 -0
  81. package/dist/leu-progress-bar.js +10 -0
  82. package/dist/leu-radio-group.js +1 -1
  83. package/dist/leu-radio.js +1 -1
  84. package/dist/leu-range.js +1 -1
  85. package/dist/leu-scroll-top.js +1 -1
  86. package/dist/leu-select.js +1 -1
  87. package/dist/leu-spinner.js +1 -1
  88. package/dist/leu-table.js +1 -1
  89. package/dist/leu-tag.js +1 -1
  90. package/dist/leu-visually-hidden.js +1 -1
  91. package/dist/vscode.html-custom-data.json +65 -0
  92. package/dist/vue/index.d.ts +48 -0
  93. package/dist/web-types.json +119 -1
  94. package/package.json +1 -1
  95. package/scripts/generate-component/templates/test/[name].test.ts +4 -3
  96. package/src/components/file-input/FileInput.ts +266 -0
  97. package/src/components/file-input/file-input.css +118 -0
  98. package/src/components/file-input/leu-file-input.ts +5 -0
  99. package/src/components/file-input/stories/file-input.stories.ts +38 -0
  100. package/src/components/file-input/test/file-input.test.ts +25 -0
  101. package/src/components/input/Input.ts +3 -29
  102. package/src/components/progress-bar/ProgressBar.ts +52 -0
  103. package/src/components/progress-bar/leu-progress-bar.ts +5 -0
  104. package/src/components/progress-bar/progress-bar.css +97 -0
  105. package/src/components/progress-bar/stories/progress-bar.stories.ts +39 -0
  106. package/src/components/progress-bar/test/progress-bar.test.ts +61 -0
package/dist/Input.js CHANGED
@@ -3,7 +3,7 @@ import { classMap } from 'lit/directives/class-map.js';
3
3
  import { ifDefined } from 'lit/directives/if-defined.js';
4
4
  import { live } from 'lit/directives/live.js';
5
5
  import { createRef, ref } from 'lit/directives/ref.js';
6
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
6
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
7
7
  import { LeuIcon } from './Icon.js';
8
8
  import './_tslib-CNEFicEt.js';
9
9
  import 'lit/decorators.js';
@@ -348,8 +348,6 @@ class LeuInput extends LeuElement {
348
348
  this.validationMessages = {};
349
349
  this.novalidate = false;
350
350
  this.value = "";
351
- /** @internal */
352
- this._identifier = "";
353
351
  /**
354
352
  * @internal
355
353
  * @type {import("lit/directives/ref.js").Ref<HTMLInputElement>}
@@ -448,25 +446,6 @@ class LeuInput extends LeuElement {
448
446
  this.dispatchEvent(new CustomEvent("input", { bubbles: true, composed: true }));
449
447
  this.dispatchEvent(new CustomEvent("change", { bubbles: true, composed: true }));
450
448
  }
451
- /**
452
- * Method for getting the id of the input element.
453
- * If the id attribute is set, the value of the id attribute is returned.
454
- * Otherwise a random id is generated and returned.
455
- *
456
- * @private
457
- * @returns {string} id
458
- */
459
- getId() {
460
- const id = this.getAttribute("id");
461
- if (id !== null && id !== "") {
462
- return id;
463
- }
464
- if (this._identifier !== "") {
465
- return this._identifier;
466
- }
467
- this._identifier = crypto.randomUUID();
468
- return this._identifier;
469
- }
470
449
  /**
471
450
  * Merge custom and default validation messages.
472
451
  * A validation message can be a function or a string.
@@ -523,7 +502,7 @@ class LeuInput extends LeuElement {
523
502
  errorMessages = [this.error, errorMessages];
524
503
  }
525
504
  return html `
526
- <ul class="error" aria-errormessage=${`input-${this.getId()}`}>
505
+ <ul class="error" aria-errormessage="input">
527
506
  ${errorMessages.map((message) => html `<li class="error-message">${message}</li>`)}
528
507
  </ul>
529
508
  `;
@@ -574,7 +553,7 @@ class LeuInput extends LeuElement {
574
553
  >
575
554
  <input
576
555
  class="input"
577
- id="input-${this.getId()}"
556
+ id="input"
578
557
  type=${this.type}
579
558
  name=${this.name}
580
559
  @change=${this.handleChange}
@@ -593,7 +572,7 @@ class LeuInput extends LeuElement {
593
572
  ref=${ref(this._inputRef)}
594
573
  aria-invalid=${isInvalid}
595
574
  />
596
- <label for="input-${this.getId()}" class="label">${this.label}</label>
575
+ <label for="input" class="label">${this.label}</label>
597
576
  ${this.prefix
598
577
  ? html `<div class="prefix" .aria-hidden=${true}>${this.prefix}</div>`
599
578
  : nothing}
@@ -35,7 +35,7 @@ class LeuElement extends LitElement {
35
35
  }
36
36
  }
37
37
  }
38
- LeuElement.version = "0.18.0";
38
+ LeuElement.version = "0.19.0";
39
39
  LeuElement.dependencies = {};
40
40
  LeuElement.styles = css_248z;
41
41
 
package/dist/Menu.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
2
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
3
3
  import { LeuMenuItem } from './MenuItem.js';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import './Icon.js';
package/dist/MenuItem.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { css, html, nothing } from 'lit';
2
2
  import { ifDefined } from 'lit/directives/if-defined.js';
3
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
3
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
4
4
  import { LeuIcon } from './Icon.js';
5
5
  import './_tslib-CNEFicEt.js';
6
6
  import 'lit/decorators.js';
package/dist/Message.js CHANGED
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
4
  import { classMap } from 'lit/directives/class-map.js';
5
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
  import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
8
8
 
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
2
2
  import { css, html } from 'lit';
3
3
  import { live } from 'lit/directives/live.js';
4
4
  import { property, state } from 'lit/decorators.js';
5
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
6
6
  import { LeuButton } from './Button.js';
7
7
  import { LeuVisuallyHidden } from './VisuallyHidden.js';
8
8
  import { LeuIcon } from './Icon.js';
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
2
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
3
3
 
4
4
  var css_248z = css`:host {
5
5
  --placeholder-font-regular: var(--leu-font-family-regular);
package/dist/Popup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { css, html } from 'lit';
2
2
  import { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
3
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
3
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
4
4
 
5
5
  var css_248z = css`:host {
6
6
  --popup-font-regular: var(--leu-font-family-regular);
@@ -0,0 +1,29 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
4
+
5
+ /**
6
+ * An indicator showing the completion progress of a task
7
+ *
8
+ * @tagname leu-progress-bar
9
+ */
10
+ declare class LeuProgressBar extends LeuElement {
11
+ static styles: lit.CSSResultGroup[];
12
+ static shadowRootOptions: {
13
+ delegatesFocus: boolean;
14
+ mode: ShadowRootMode;
15
+ serializable?: boolean;
16
+ slotAssignment?: SlotAssignmentMode;
17
+ customElements?: CustomElementRegistry;
18
+ registry?: CustomElementRegistry;
19
+ };
20
+ /** Progress as a percentage from 0 to 100 */
21
+ value: number;
22
+ /** Label that is displayed below the progress bar */
23
+ label: string;
24
+ /** Whether the progress bar is in indeterminate state. */
25
+ indeterminate: boolean;
26
+ render(): lit_html.TemplateResult<1>;
27
+ }
28
+
29
+ export { LeuProgressBar };
@@ -0,0 +1,166 @@
1
+ import { _ as __decorate } from './_tslib-CNEFicEt.js';
2
+ import { css, nothing, html } from 'lit';
3
+ import { ifDefined } from 'lit/directives/if-defined.js';
4
+ import { property } from 'lit/decorators.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
6
+
7
+ var css_248z = css`/* :host {
8
+ --progress-bar-font-regular: var(--leu-font-family-regular);
9
+ --progress-bar-font-black: var(--leu-font-family-black);
10
+
11
+ font-family: var(--progress-bar-font-regular);
12
+ } */
13
+
14
+ .progress {
15
+ --_height: 0.5rem;
16
+ --_border-radius: 0.25rem;
17
+ --_progress-color: var(--leu-color-func-cyan);
18
+ --_indeterminate-animation: indeterminate 2s ease infinite;
19
+ --_indeterminate-width: 25%;
20
+
21
+ -webkit-appearance: none;
22
+
23
+ -moz-appearance: none;
24
+
25
+ appearance: none;
26
+ display: block;
27
+ width: 100%;
28
+ height: 0.5rem;
29
+ height: var(--_height);
30
+
31
+ background-color: var(--leu-color-black-transp-10);
32
+ border: none;
33
+ border-radius: 0.25rem;
34
+ border-radius: var(--_border-radius);
35
+ margin-bottom: 0.5rem;
36
+ }
37
+
38
+ .progress::-webkit-progress-bar {
39
+ background: transparent;
40
+ border-radius: var(--_border-radius);
41
+ }
42
+
43
+ /* Progress bar */
44
+
45
+ .progress::-moz-progress-bar {
46
+ background-color: var(--_progress-color);
47
+ border-radius: var(--_border-radius);
48
+ }
49
+
50
+ .progress::-webkit-progress-value {
51
+ background-color: var(--_progress-color);
52
+ border-radius: var(--_border-radius);
53
+ }
54
+
55
+ /* Indeterminate state */
56
+
57
+ .progress:indeterminate::-moz-progress-bar {
58
+ width: var(--_indeterminate-width);
59
+ animation: var(--_indeterminate-animation);
60
+ }
61
+
62
+ /* Safari */
63
+
64
+ .progress:indeterminate::-webkit-progress-value {
65
+ display: block;
66
+ width: var(--_indeterminate-width);
67
+ animation: var(--_indeterminate-animation);
68
+ }
69
+
70
+ /* Chrome */
71
+
72
+ .progress:indeterminate::before {
73
+ content: "";
74
+ display: block;
75
+ width: var(--_indeterminate-width);
76
+ height: var(--_height);
77
+ background-color: var(--_progress-color);
78
+ border-radius: var(--_border-radius);
79
+ animation: var(--_indeterminate-animation);
80
+ }
81
+
82
+ @keyframes indeterminate {
83
+ 0% {
84
+ margin-left: 0%;
85
+ }
86
+
87
+ 50% {
88
+ margin-left: 75%;
89
+ }
90
+
91
+ 100% {
92
+ margin-left: 0%;
93
+ }
94
+ }
95
+
96
+ /* Info section (text label and value) */
97
+
98
+ .info {
99
+ display: flex;
100
+ justify-content: space-between;
101
+ align-items: center;
102
+ flex-wrap: wrap;
103
+ gap: 0.25rem;
104
+ }
105
+
106
+ .label,
107
+ .value {
108
+ font: var(--leu-t-tiny-regular-font);
109
+ color: var(--leu-color-black-60);
110
+ }
111
+
112
+ .value {
113
+ /* margin-left: auto; */
114
+ }
115
+ `;
116
+
117
+ /**
118
+ * An indicator showing the completion progress of a task
119
+ *
120
+ * @tagname leu-progress-bar
121
+ */
122
+ class LeuProgressBar extends LeuElement {
123
+ constructor() {
124
+ super(...arguments);
125
+ /** Progress as a percentage from 0 to 100 */
126
+ this.value = 0;
127
+ /** Label that is displayed below the progress bar */
128
+ this.label = "";
129
+ /** Whether the progress bar is in indeterminate state. */
130
+ this.indeterminate = false;
131
+ }
132
+ render() {
133
+ return html `
134
+ <progress
135
+ class="progress"
136
+ max=${ifDefined(!this.indeterminate ? 100 : undefined)}
137
+ value=${ifDefined(!this.indeterminate ? this.value : undefined)}
138
+ id="progress"
139
+ ></progress>
140
+ <div class="info">
141
+ ${this.label
142
+ ? html `<label class="label" for="progress">${this.label}</label>`
143
+ : html `<div class="label label--placeholder"></div>`}
144
+ ${this.indeterminate
145
+ ? nothing
146
+ : html `<span class="value">${Math.round(this.value)}&#8239;%</span>`}
147
+ </div>
148
+ `;
149
+ }
150
+ }
151
+ LeuProgressBar.styles = [LeuElement.styles, css_248z];
152
+ LeuProgressBar.shadowRootOptions = {
153
+ ...LeuElement.shadowRootOptions,
154
+ delegatesFocus: true,
155
+ };
156
+ __decorate([
157
+ property({ type: Number, reflect: true })
158
+ ], LeuProgressBar.prototype, "value", void 0);
159
+ __decorate([
160
+ property({ type: String, reflect: true })
161
+ ], LeuProgressBar.prototype, "label", void 0);
162
+ __decorate([
163
+ property({ type: Boolean, reflect: true })
164
+ ], LeuProgressBar.prototype, "indeterminate", void 0);
165
+
166
+ export { LeuProgressBar };
package/dist/Radio.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-DlQXnrk8.js';
4
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
5
5
 
6
6
  var css_248z = css`:host {
7
7
  --radio-color: var(--leu-color-black-40);
@@ -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 { property } from 'lit/decorators.js';
5
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
6
6
  import { LeuRadio } from './Radio.js';
7
7
 
8
8
  var css_248z = css`:host {
package/dist/Range.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
2
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
3
3
 
4
4
  var css_248z = css`:host {
5
5
  --range-color: var(--leu-color-black-40);
package/dist/ScrollTop.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { css, html } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
3
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
4
4
  import { LeuButton } from './Button.js';
5
5
  import { LeuIcon } from './Icon.js';
6
6
  import './_tslib-CNEFicEt.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-DlQXnrk8.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.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
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
2
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
3
3
 
4
4
  var css_248z = css`@keyframes leu-spinner-rotate {
5
5
  from {
package/dist/Table.js CHANGED
@@ -2,7 +2,7 @@ import { css, html, nothing } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
3
  import { styleMap } from 'lit/directives/style-map.js';
4
4
  import { createRef, ref } from 'lit/directives/ref.js';
5
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
5
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
  import { LeuPagination } from './Pagination.js';
8
8
  import './_tslib-CNEFicEt.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-DlQXnrk8.js';
4
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
5
5
 
6
6
  var css_248z = css`:host {
7
7
  /* --tag-font-regular: var(--leu-font-family-regular);
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-DlQXnrk8.js';
2
+ import { L as LeuElement } from './LeuElement-CKq5epyY.js';
3
3
 
4
4
  var css_248z = css`:host {
5
5
  clip: rect(0 0 0 0);
@@ -0,0 +1,54 @@
1
+ import { LeuElement } from "../../lib/LeuElement.js";
2
+ import { LeuButton } from "../../index.js";
3
+ import { LeuIcon } from "../icon/leu-icon.js";
4
+ import { LeuVisuallyHidden } from "../visually-hidden/VisuallyHidden.js";
5
+ /**
6
+ * @tagname leu-file-input
7
+ */
8
+ export declare class LeuFileInput extends LeuElement {
9
+ static dependencies: {
10
+ "leu-icon": typeof LeuIcon;
11
+ "leu-button": typeof LeuButton;
12
+ "leu-visually-hidden": typeof LeuVisuallyHidden;
13
+ };
14
+ static styles: import("lit").CSSResultGroup[];
15
+ static shadowRootOptions: {
16
+ delegatesFocus: boolean;
17
+ mode: ShadowRootMode;
18
+ serializable?: boolean;
19
+ slotAssignment?: SlotAssignmentMode;
20
+ customElements?: CustomElementRegistry;
21
+ registry?: CustomElementRegistry;
22
+ };
23
+ static formAssociated: boolean;
24
+ protected internals: ElementInternals;
25
+ label: string;
26
+ /** A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers). */
27
+ accept: string;
28
+ /** Whether the file input is disabled. */
29
+ disabled: boolean;
30
+ /** Whether the file input allows multiple files. */
31
+ multiple: boolean;
32
+ /** Whether the file input is required. */
33
+ required: boolean;
34
+ /** The variant of the file list item. `filled` renders a gray background. */
35
+ variant: "filled" | "transparent";
36
+ files: File[];
37
+ private isDragging;
38
+ input: HTMLInputElement;
39
+ constructor();
40
+ get form(): HTMLFormElement;
41
+ get name(): string;
42
+ updated(changedProperties: any): void;
43
+ protected handleInput(): void;
44
+ protected updateFormValue(): void;
45
+ protected removeFile(fileToRemove: File): void;
46
+ protected static formatFileSize(size: number): import("lit-html").TemplateResult<1>;
47
+ protected handleDragEnter: (event: DragEvent) => void;
48
+ protected handleDragOver: (event: DragEvent) => void;
49
+ protected handleDragLeave: (event: DragEvent) => void;
50
+ protected handleDrop: (event: DragEvent) => void;
51
+ isAcceptedFile(file: File): boolean;
52
+ render(): import("lit-html").TemplateResult<1>;
53
+ }
54
+ //# sourceMappingURL=FileInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/FileInput.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;A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AO;IA4BnC,MAAM;CAiEP"}
@@ -0,0 +1,3 @@
1
+ import { LeuFileInput } from "./FileInput.js";
2
+ export { LeuFileInput };
3
+ //# sourceMappingURL=leu-file-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leu-file-input.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/leu-file-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,30 @@
1
+ import "../leu-file-input.js";
2
+ import { LeuFileInput } from "../FileInput.js";
3
+ declare const _default: {
4
+ title: string;
5
+ component: string;
6
+ };
7
+ export default _default;
8
+ export declare const Regular: {
9
+ args: {
10
+ accept: string;
11
+ disabled: boolean;
12
+ multiple: boolean;
13
+ label: string;
14
+ };
15
+ decorators?: import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput> | import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>[];
16
+ parameters?: import("@storybook/csf").Parameters;
17
+ argTypes?: Partial<import("@storybook/csf").ArgTypes<LeuFileInput>>;
18
+ loaders?: import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput> | import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>[];
19
+ beforeEach?: import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput> | import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>[];
20
+ experimental_afterEach?: import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput> | import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>[];
21
+ render?: import("@storybook/csf").ArgsStoryFn<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>;
22
+ tags?: import("@storybook/csf").Tag[];
23
+ mount?: (context: import("@storybook/csf").StoryContext<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>) => () => Promise<import("@storybook/csf").Canvas>;
24
+ name?: import("@storybook/csf").StoryName;
25
+ storyName?: import("@storybook/csf").StoryName;
26
+ play?: import("@storybook/csf").PlayFunction<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput>;
27
+ globals?: import("@storybook/csf").Globals;
28
+ story?: Omit<import("@storybook/csf").StoryAnnotations<import("@storybook/web-components").WebComponentsRenderer, LeuFileInput, Partial<LeuFileInput>>, "story">;
29
+ };
30
+ //# sourceMappingURL=file-input.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-input.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/file-input/stories/file-input.stories.ts"],"names":[],"mappings":"AAIA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;;;;;AAK9C,wBAG2B;AAe3B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CASnB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import "../leu-file-input.js";
2
+ //# sourceMappingURL=file-input.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-input.test.d.ts","sourceRoot":"","sources":["../../../../src/components/file-input/test/file-input.test.ts"],"names":[],"mappings":"AAGA,OAAO,sBAAsB,CAAA"}
@@ -194,15 +194,6 @@ export declare class LeuInput extends LeuElement {
194
194
  * @fires {CustomEvent} change
195
195
  */
196
196
  clear(): void;
197
- /**
198
- * Method for getting the id of the input element.
199
- * If the id attribute is set, the value of the id attribute is returned.
200
- * Otherwise a random id is generated and returned.
201
- *
202
- * @private
203
- * @returns {string} id
204
- */
205
- getId(): any;
206
197
  /**
207
198
  * Merge custom and default validation messages.
208
199
  * A validation message can be a function or a string.
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.ts"],"names":[],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U,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAIzC,eAAO,MAAM,KAAK;;;EAGhB,CAAA;AAuBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BhB;IAED,MAAM,CAAC,mBAAmB,CAAC,OAAO,KAAA,EAAE,aAAa,KAAA;;IA+BjD,IAAI,aAAa,WAKhB;IAED;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,KAAK,KAAA;IAMxB;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,KAAA;IAQhB;;;;;;OAMG;IACH,aAAa,CAAC,KAAK,KAAA;IAInB;;;;;;;;OAQG;IACH,YAAY,CAAC,KAAK,KAAA;IASlB;;;;;;;OAOG;IACH,WAAW,CAAC,KAAK,KAAA;IAUjB;;;;;;;;OAQG;IACH,KAAK;IAaL;;;;;;;;;;OAUG;IACH,qBAAqB;IA6BrB,SAAS;IAUT;;;OAGG;IACH,aAAa;IAIb;;;OAGG;IACH,mBAAmB;IAyBnB;;;;;;OAMG;IACH,kBAAkB;IA2BlB,MAAM;CAiDP"}
@@ -0,0 +1,25 @@
1
+ import { LeuElement } from "../../lib/LeuElement.js";
2
+ /**
3
+ * An indicator showing the completion progress of a task
4
+ *
5
+ * @tagname leu-progress-bar
6
+ */
7
+ export declare class LeuProgressBar extends LeuElement {
8
+ static styles: import("lit").CSSResultGroup[];
9
+ static shadowRootOptions: {
10
+ delegatesFocus: boolean;
11
+ mode: ShadowRootMode;
12
+ serializable?: boolean;
13
+ slotAssignment?: SlotAssignmentMode;
14
+ customElements?: CustomElementRegistry;
15
+ registry?: CustomElementRegistry;
16
+ };
17
+ /** Progress as a percentage from 0 to 100 */
18
+ value: number;
19
+ /** Label that is displayed below the progress bar */
20
+ label: string;
21
+ /** Whether the progress bar is in indeterminate state. */
22
+ indeterminate: boolean;
23
+ render(): import("lit-html").TemplateResult<1>;
24
+ }
25
+ //# sourceMappingURL=ProgressBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/ProgressBar.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIpD;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,6CAA6C;IAE7C,KAAK,EAAE,MAAM,CAAI;IAEjB,qDAAqD;IAErD,KAAK,EAAE,MAAM,CAAK;IAElB,0DAA0D;IAE1D,aAAa,EAAE,OAAO,CAAQ;IAE9B,MAAM;CAkBP"}
@@ -0,0 +1,3 @@
1
+ import { LeuProgressBar } from "./ProgressBar.js";
2
+ export { LeuProgressBar };
3
+ //# sourceMappingURL=leu-progress-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leu-progress-bar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/leu-progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,48 @@
1
+ import "../leu-progress-bar.js";
2
+ import { LeuProgressBar } from "../ProgressBar.js";
3
+ declare const _default: {
4
+ title: string;
5
+ component: string;
6
+ };
7
+ export default _default;
8
+ export declare const Regular: {
9
+ args: {
10
+ value: number;
11
+ label: string;
12
+ };
13
+ decorators?: import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
14
+ parameters?: import("@storybook/csf").Parameters;
15
+ argTypes?: Partial<import("@storybook/csf").ArgTypes<LeuProgressBar>>;
16
+ loaders?: import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
17
+ beforeEach?: import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
18
+ experimental_afterEach?: import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
19
+ render?: import("@storybook/csf").ArgsStoryFn<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>;
20
+ tags?: import("@storybook/csf").Tag[];
21
+ mount?: (context: import("@storybook/csf").StoryContext<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>) => () => Promise<import("@storybook/csf").Canvas>;
22
+ name?: import("@storybook/csf").StoryName;
23
+ storyName?: import("@storybook/csf").StoryName;
24
+ play?: import("@storybook/csf").PlayFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>;
25
+ globals?: import("@storybook/csf").Globals;
26
+ story?: Omit<import("@storybook/csf").StoryAnnotations<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar, Partial<LeuProgressBar>>, "story">;
27
+ };
28
+ export declare const Indeterminate: {
29
+ args: {
30
+ indeterminate: boolean;
31
+ label: string;
32
+ };
33
+ decorators?: import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").DecoratorFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
34
+ parameters?: import("@storybook/csf").Parameters;
35
+ argTypes?: Partial<import("@storybook/csf").ArgTypes<LeuProgressBar>>;
36
+ loaders?: import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").LoaderFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
37
+ beforeEach?: import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").BeforeEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
38
+ experimental_afterEach?: import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar> | import("@storybook/csf").AfterEach<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>[];
39
+ render?: import("@storybook/csf").ArgsStoryFn<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>;
40
+ tags?: import("@storybook/csf").Tag[];
41
+ mount?: (context: import("@storybook/csf").StoryContext<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>) => () => Promise<import("@storybook/csf").Canvas>;
42
+ name?: import("@storybook/csf").StoryName;
43
+ storyName?: import("@storybook/csf").StoryName;
44
+ play?: import("@storybook/csf").PlayFunction<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar>;
45
+ globals?: import("@storybook/csf").Globals;
46
+ story?: Omit<import("@storybook/csf").StoryAnnotations<import("@storybook/web-components").WebComponentsRenderer, LeuProgressBar, Partial<LeuProgressBar>>, "story">;
47
+ };
48
+ //# sourceMappingURL=progress-bar.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress-bar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-bar/stories/progress-bar.stories.ts"],"names":[],"mappings":"AAIA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;;;;;AAKlD,wBAG2B;AAW3B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;CAMnB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAMzB,CAAA"}