@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.27.0](https://github.com/statistikZH/leu/compare/leu-v0.26.0...leu-v0.27.0) (2026-04-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **select:** the `open` property is now an internal state. use the `click()` method to imperatively open the select element
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **input:** implement defaultValue alongside the existing value property to match native behaviour ([#341](https://github.com/statistikZH/leu/issues/341)) ([650ec97](https://github.com/statistikZH/leu/commit/650ec97ffc25384a1c14c463959c7b644391a8e3))
|
|
13
|
+
* **select:** add defaultValue to match native behaviour of a select element ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
|
|
14
|
+
* **select:** add required property ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
|
|
15
|
+
* **select:** implement select as a form control ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **file-input:** format >1000MB as GB ([#339](https://github.com/statistikZH/leu/issues/339)) ([f9b0d89](https://github.com/statistikZH/leu/commit/f9b0d89700ada07d7a3dff4dfbcf4a27090bd146))
|
|
21
|
+
* fix dev dependencies vulnerabilities ([7390e3e](https://github.com/statistikZH/leu/commit/7390e3e86766d794061a0b84e34c7bec701a3612))
|
|
22
|
+
* **scroll-top:** move scrollTo call from a static to an instance method ([#340](https://github.com/statistikZH/leu/issues/340)) ([860adf4](https://github.com/statistikZH/leu/commit/860adf47596bf06456764b03777f5bd6462d5887))
|
|
23
|
+
|
|
24
|
+
## [0.26.0](https://github.com/statistikZH/leu/compare/leu-v0.25.0...leu-v0.26.0) (2026-03-25)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **button:** add loading property ([1e494ac](https://github.com/statistikZH/leu/commit/1e494aca16735727120858e9d94612979ba4f24a))
|
|
30
|
+
|
|
3
31
|
## [0.25.0](https://github.com/statistikZH/leu/compare/leu-v0.24.2...leu-v0.25.0) (2026-03-23)
|
|
4
32
|
|
|
5
33
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -10,22 +10,33 @@ To submit a contribution:
|
|
|
10
10
|
|
|
11
11
|
## Collaboration guidelines
|
|
12
12
|
|
|
13
|
-
We don't want to enforce to many rules on how to collaborate on this project.
|
|
13
|
+
We don't want to enforce to many rules on how to collaborate on this project.
|
|
14
|
+
But there are a few things that should be considered when contributing to this
|
|
15
|
+
project.
|
|
14
16
|
|
|
15
17
|
### Commit messages
|
|
16
18
|
|
|
17
|
-
We enforce
|
|
19
|
+
We enforce
|
|
20
|
+
[conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) messages
|
|
21
|
+
with [commitlint](https://commitlint.js.org/#/). This way we can automatically
|
|
22
|
+
generate a changelog and version the project with Release Please accordingly.
|
|
18
23
|
|
|
19
|
-
If you're working on a component, please use its name as the scope of the commit
|
|
20
|
-
For example:
|
|
24
|
+
If you're working on a component, please use its name as the scope of the commit
|
|
25
|
+
message. For example:
|
|
21
26
|
|
|
22
|
-
You've added a new feature to the `leu-radio` component. Your commit message
|
|
27
|
+
You've added a new feature to the `leu-radio` component. Your commit message
|
|
28
|
+
should look like this:
|
|
23
29
|
|
|
24
30
|
```bash
|
|
25
|
-
git commit -m "feat(
|
|
31
|
+
git commit -m "feat(radio): add new feature"
|
|
26
32
|
```
|
|
27
33
|
|
|
28
34
|
### Branching
|
|
29
35
|
|
|
30
|
-
All new features should be developed in a feature branch that is branched off
|
|
31
|
-
|
|
36
|
+
All new features should be developed in a feature branch that is branched off
|
|
37
|
+
from the `main` branch. Each branch can then be linked to the respective issue
|
|
38
|
+
on GitHub. Please do not merge feature branches into each other. Try to merge
|
|
39
|
+
into the `main` branch as soon as possible. This way we can keep the `main`
|
|
40
|
+
branch up to date and avoid having dependencies between feature branches. The
|
|
41
|
+
feature branch should always be prefixed with the issue number (e.g.
|
|
42
|
+
`48-dropdown`).
|
|
@@ -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, nothing } from "lit";
|
|
4
4
|
import { html as html$1, unsafeStatic } from "lit/static-html.js";
|
package/dist/Accordion.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuAccordion } from "./Accordion-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuAccordion } from "./Accordion-DLsqXcK8.js";
|
|
3
3
|
export { LeuAccordion };
|
|
@@ -1,8 +1,9 @@
|
|
|
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
|
|
5
|
-
import { t as
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.js";
|
|
5
|
+
import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
|
|
6
|
+
import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
7
|
import { css, html, nothing } from "lit";
|
|
7
8
|
import { property, query } from "lit/decorators.js";
|
|
8
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -39,7 +40,13 @@ var button_default = css`:host {
|
|
|
39
40
|
display: inline-block;
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
/*
|
|
44
|
+
* @todo : Disable hover styles for loading state
|
|
45
|
+
*/
|
|
46
|
+
|
|
42
47
|
button {
|
|
48
|
+
position: relative;
|
|
49
|
+
|
|
43
50
|
font-family: var(--leu-font-family-black);
|
|
44
51
|
text-align: center;
|
|
45
52
|
-webkit-appearance: none;
|
|
@@ -68,10 +75,14 @@ button.round {
|
|
|
68
75
|
border-radius: 50%;
|
|
69
76
|
}
|
|
70
77
|
|
|
71
|
-
button
|
|
78
|
+
button.disabled {
|
|
72
79
|
cursor: not-allowed;
|
|
73
80
|
}
|
|
74
81
|
|
|
82
|
+
button.loading {
|
|
83
|
+
cursor: wait;
|
|
84
|
+
}
|
|
85
|
+
|
|
75
86
|
button:focus-visible {
|
|
76
87
|
outline: 2px solid var(--leu-color-func-cyan);
|
|
77
88
|
outline-offset: 2px;
|
|
@@ -86,6 +97,10 @@ button.inverted:focus-visible {
|
|
|
86
97
|
justify-content: center;
|
|
87
98
|
}
|
|
88
99
|
|
|
100
|
+
button.loading :where(.content, .icon-wrapper) {
|
|
101
|
+
visibility: hidden;
|
|
102
|
+
}
|
|
103
|
+
|
|
89
104
|
/* size - regular */
|
|
90
105
|
|
|
91
106
|
button.regular {
|
|
@@ -133,7 +148,7 @@ button.primary.active:hover {
|
|
|
133
148
|
background: var(--leu-color-black-transp-80);
|
|
134
149
|
}
|
|
135
150
|
|
|
136
|
-
button.primary
|
|
151
|
+
button.primary.disabled {
|
|
137
152
|
color: var(--leu-color-black-0);
|
|
138
153
|
background: var(--leu-color-black-transp-20);
|
|
139
154
|
}
|
|
@@ -159,7 +174,7 @@ button.secondary.active:hover {
|
|
|
159
174
|
background: var(--leu-color-black-transp-80);
|
|
160
175
|
}
|
|
161
176
|
|
|
162
|
-
button.secondary
|
|
177
|
+
button.secondary.disabled {
|
|
163
178
|
color: var(--leu-color-black-transp-20);
|
|
164
179
|
background: var(--leu-color-black-transp-5);
|
|
165
180
|
}
|
|
@@ -184,7 +199,7 @@ button.ghost.active {
|
|
|
184
199
|
color: var(--leu-color-black-100);
|
|
185
200
|
}
|
|
186
201
|
|
|
187
|
-
button.ghost
|
|
202
|
+
button.ghost.disabled {
|
|
188
203
|
color: var(--leu-color-black-20);
|
|
189
204
|
}
|
|
190
205
|
|
|
@@ -205,7 +220,7 @@ button.primary.inverted.active {
|
|
|
205
220
|
background: var(--leu-color-black-100);
|
|
206
221
|
}
|
|
207
222
|
|
|
208
|
-
button.primary.inverted
|
|
223
|
+
button.primary.inverted.disabled {
|
|
209
224
|
color: var(--leu-color-black-40);
|
|
210
225
|
background: var(--leu-color-white-transp-70);
|
|
211
226
|
}
|
|
@@ -227,7 +242,7 @@ button.secondary.inverted.active {
|
|
|
227
242
|
background: var(--leu-color-black-0);
|
|
228
243
|
}
|
|
229
244
|
|
|
230
|
-
button.secondary.inverted
|
|
245
|
+
button.secondary.inverted.disabled {
|
|
231
246
|
color: var(--leu-color-white-transp-70);
|
|
232
247
|
background: var(--leu-color-black-transp-10);
|
|
233
248
|
}
|
|
@@ -246,7 +261,7 @@ button.ghost.inverted.active {
|
|
|
246
261
|
color: var(--leu-color-black-0);
|
|
247
262
|
}
|
|
248
263
|
|
|
249
|
-
button.ghost.inverted
|
|
264
|
+
button.ghost.inverted.disabled {
|
|
250
265
|
color: var(--leu-color-black-20);
|
|
251
266
|
}
|
|
252
267
|
|
|
@@ -298,7 +313,7 @@ button.ghost.inverted:disabled {
|
|
|
298
313
|
--_color: var(--leu-color-black-0);
|
|
299
314
|
}
|
|
300
315
|
|
|
301
|
-
.ghost
|
|
316
|
+
.ghost.disabled .icon-wrapper {
|
|
302
317
|
--_bg: var(--leu-color-black-transp-5);
|
|
303
318
|
}
|
|
304
319
|
|
|
@@ -313,7 +328,7 @@ button.ghost.inverted:disabled {
|
|
|
313
328
|
--_color: var(--leu-color-black-0);
|
|
314
329
|
}
|
|
315
330
|
|
|
316
|
-
.ghost.inverted
|
|
331
|
+
.ghost.inverted.disabled .icon-wrapper {
|
|
317
332
|
--_bg: var(--leu-color-black-transp-20);
|
|
318
333
|
--_color: var(--leu-color-white-transp-70);
|
|
319
334
|
}
|
|
@@ -336,6 +351,21 @@ button.ghost.inverted:disabled {
|
|
|
336
351
|
:host([expanded="true"]) .icon-expanded {
|
|
337
352
|
transform: rotate(180deg);
|
|
338
353
|
}
|
|
354
|
+
|
|
355
|
+
.spinner {
|
|
356
|
+
--leu-spinner-size: 1.75rem;
|
|
357
|
+
padding: 0;
|
|
358
|
+
position: absolute;
|
|
359
|
+
top: 50%;
|
|
360
|
+
left: 50%;
|
|
361
|
+
transform: translate(-50%, -50%);
|
|
362
|
+
color: currentcolor;
|
|
363
|
+
display: block;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
button.small .spinner {
|
|
367
|
+
--leu-spinner-size: 1.25rem;
|
|
368
|
+
}
|
|
339
369
|
`;
|
|
340
370
|
//#endregion
|
|
341
371
|
//#region src/components/button/Button.ts
|
|
@@ -363,9 +393,13 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
|
|
|
363
393
|
this.active = false;
|
|
364
394
|
this.inverted = false;
|
|
365
395
|
this.fluid = false;
|
|
396
|
+
this.loading = false;
|
|
366
397
|
}
|
|
367
398
|
static {
|
|
368
|
-
this.dependencies = {
|
|
399
|
+
this.dependencies = {
|
|
400
|
+
"leu-icon": LeuIcon,
|
|
401
|
+
"leu-spinner": LeuSpinner
|
|
402
|
+
};
|
|
369
403
|
}
|
|
370
404
|
static {
|
|
371
405
|
this.styles = [LeuElement.styles, button_default];
|
|
@@ -398,7 +432,7 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
|
|
|
398
432
|
}
|
|
399
433
|
setFormValue() {}
|
|
400
434
|
handleClick(e) {
|
|
401
|
-
if (this.disabled) {
|
|
435
|
+
if (this.disabled || this.loading) {
|
|
402
436
|
e.preventDefault();
|
|
403
437
|
e.stopImmediatePropagation();
|
|
404
438
|
return;
|
|
@@ -446,7 +480,9 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
|
|
|
446
480
|
"icon-after": hasIconAfter,
|
|
447
481
|
round: this.round,
|
|
448
482
|
active: this.active,
|
|
483
|
+
disabled: this.disabled,
|
|
449
484
|
inverted: this.inverted,
|
|
485
|
+
loading: this.loading,
|
|
450
486
|
[this.variant]: true,
|
|
451
487
|
[this.size]: true
|
|
452
488
|
};
|
|
@@ -459,7 +495,7 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
|
|
|
459
495
|
aria-expanded=${ifDefined(this.expanded)}
|
|
460
496
|
role=${ifDefined(aria.role)}
|
|
461
497
|
class=${classMap(cssClasses)}
|
|
462
|
-
?disabled=${this.disabled}
|
|
498
|
+
?disabled=${this.disabled || this.loading}
|
|
463
499
|
type=${this.type}
|
|
464
500
|
>
|
|
465
501
|
<div class="icon-wrapper icon-wrapper--before">
|
|
@@ -469,7 +505,7 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
|
|
|
469
505
|
<div class="icon-wrapper icon-wrapper--after">
|
|
470
506
|
<slot name="after" class="icon-wrapper__slot"></slot>
|
|
471
507
|
</div>
|
|
472
|
-
|
|
508
|
+
${this.loading ? html`<leu-spinner class="spinner"></leu-spinner>` : nothing}
|
|
473
509
|
${this.renderExpandingIcon()}
|
|
474
510
|
</button>
|
|
475
511
|
`;
|
|
@@ -519,6 +555,10 @@ __decorate([property({
|
|
|
519
555
|
type: Boolean,
|
|
520
556
|
reflect: true
|
|
521
557
|
})], LeuButton.prototype, "fluid", void 0);
|
|
558
|
+
__decorate([property({
|
|
559
|
+
type: Boolean,
|
|
560
|
+
reflect: true
|
|
561
|
+
})], LeuButton.prototype, "loading", void 0);
|
|
522
562
|
__decorate([query(".button")], LeuButton.prototype, "button", void 0);
|
|
523
563
|
//#endregion
|
|
524
564
|
export { LeuButton as t };
|
|
@@ -1,6 +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 LeuSpinner } from "./Spinner-CrM1enM0.js";
|
|
4
5
|
import * as lit_html0 from "lit-html";
|
|
5
6
|
|
|
6
7
|
//#region src/components/button/Button.d.ts
|
|
@@ -15,6 +16,7 @@ declare const LeuButton_base: (abstract new (...args: any[]) => FormAssociatedMi
|
|
|
15
16
|
declare class LeuButton extends LeuButton_base {
|
|
16
17
|
static dependencies: {
|
|
17
18
|
"leu-icon": typeof LeuIcon;
|
|
19
|
+
"leu-spinner": typeof LeuSpinner;
|
|
18
20
|
};
|
|
19
21
|
static styles: any[];
|
|
20
22
|
static shadowRootOptions: {
|
|
@@ -78,6 +80,10 @@ declare class LeuButton extends LeuButton_base {
|
|
|
78
80
|
* Alters the shape of the button to be full width of its parent container
|
|
79
81
|
*/
|
|
80
82
|
fluid: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Replaces the content with a spinner
|
|
85
|
+
*/
|
|
86
|
+
loading: boolean;
|
|
81
87
|
private button;
|
|
82
88
|
private renderExpandingIcon;
|
|
83
89
|
private getAriaAttributes;
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LeuButton } from "./Button-
|
|
1
|
+
import { t as LeuButton } from "./Button-BgNUxmo_.js";
|
|
2
2
|
export { LeuButton };
|
package/dist/Button.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./Spinner-VhKfzI3Q.js";
|
|
4
|
+
import { t as LeuButton } from "./Button-BSyDL_cV.js";
|
|
5
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
5
6
|
export { LeuButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as LeuElement } from "./LeuElement-
|
|
2
|
-
import { t as LeuButton } from "./Button-
|
|
1
|
+
import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuButton } from "./Button-BSyDL_cV.js";
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
//#region src/components/button-group/button-group.css?inline
|
|
5
5
|
var button_group_default = css`.group {
|
package/dist/ButtonGroup.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 LeuButtonGroup } from "./ButtonGroup-BmSvl-Oc.js";
|
|
6
7
|
export { LeuButtonGroup };
|
|
@@ -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
|
|
4
|
-
import { t as
|
|
3
|
+
import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.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
|
//#region src/components/chart-wrapper/chart-wrapper.css?inline
|
package/dist/ChartWrapper.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
2
|
+
import { t as LeuSpinner } from "./Spinner-CrM1enM0.js";
|
|
3
|
+
import { t as HasSlotController } from "./hasSlotController-DWPyZ52b.js";
|
|
4
4
|
import * as lit_html0 from "lit-html";
|
|
5
5
|
|
|
6
6
|
//#region src/components/chart-wrapper/ChartWrapper.d.ts
|
package/dist/ChartWrapper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Spinner-VhKfzI3Q.js";
|
|
3
|
+
import { t as LeuChartWrapper } from "./ChartWrapper-CvDvQsd5.js";
|
|
4
4
|
export { LeuChartWrapper };
|
|
@@ -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 } from "lit";
|
|
6
6
|
import { property } from "lit/decorators.js";
|
|
7
7
|
//#region src/components/checkbox/checkbox.css?inline
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./FormAssociatedMixin-
|
|
4
|
-
import { t as LeuCheckbox } from "./Checkbox-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
4
|
+
import { t as LeuCheckbox } from "./Checkbox-Cl_X6gBJ.js";
|
|
5
5
|
export { LeuCheckbox };
|
|
@@ -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 LeuCheckbox } from "./Checkbox-
|
|
3
|
+
import { t as LeuCheckbox } from "./Checkbox-Cl_X6gBJ.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/CheckboxGroup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./FormAssociatedMixin-
|
|
4
|
-
import "./Checkbox-
|
|
5
|
-
import { t as LeuCheckboxGroup } from "./CheckboxGroup-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
4
|
+
import "./Checkbox-Cl_X6gBJ.js";
|
|
5
|
+
import { t as LeuCheckboxGroup } from "./CheckboxGroup-BKhOmZYX.js";
|
|
6
6
|
export { LeuCheckboxGroup };
|
package/dist/Chip.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuChipBase } from "./Chip-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
|
|
3
3
|
export { LeuChipBase };
|
package/dist/ChipGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuChipGroup } from "./ChipGroup-
|
|
3
|
-
import "./Chip-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import { t as LeuChipGroup } from "./ChipGroup-DUGavZeU.js";
|
|
3
|
+
import "./Chip-McVP3N_x.js";
|
|
4
4
|
export { LeuChipGroup };
|
package/dist/ChipLink.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuChipBase } from "./Chip-
|
|
3
|
+
import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/chip/ChipLink.ts
|
package/dist/ChipRemovable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuIcon } from "./Icon-
|
|
4
|
-
import { t as LeuChipBase } from "./Chip-
|
|
3
|
+
import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
|
|
4
|
+
import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
|
|
5
5
|
import { html } from "lit";
|
|
6
6
|
import { property } from "lit/decorators.js";
|
|
7
7
|
//#region src/components/chip/ChipRemovable.ts
|
package/dist/ChipSelectable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
2
|
import { t as __decorate } from "./decorate-DwpAc4D0.js";
|
|
3
|
-
import { t as LeuChipBase } from "./Chip-
|
|
3
|
+
import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { property } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/chip/ChipSelectable.ts
|
|
@@ -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/Dialog.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 HasSlotController } from "./hasSlotController-
|
|
3
|
+
import { t as HasSlotController } from "./hasSlotController-DWPyZ52b.js";
|
|
4
4
|
import * as lit_html0 from "lit-html";
|
|
5
5
|
import * as lit_html_directives_ref_js0 from "lit-html/directives/ref.js";
|
|
6
6
|
|
package/dist/Dialog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import { t as LeuDialog } from "./Dialog-
|
|
1
|
+
import "./LeuElement-k4RjIeoG.js";
|
|
2
|
+
import "./Icon-CbZXpyHU.js";
|
|
3
|
+
import { t as LeuDialog } from "./Dialog-BlDd4T2u.js";
|
|
4
4
|
export { LeuDialog };
|
|
@@ -1,10 +1,10 @@
|
|
|
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 HasSlotController } from "./hasSlotController-
|
|
4
|
-
import { t as LeuButton } from "./Button-
|
|
5
|
-
import { t as LeuMenuItem } from "./MenuItem-
|
|
6
|
-
import { t as LeuMenu } from "./Menu-
|
|
7
|
-
import { t as LeuPopup } from "./Popup-
|
|
3
|
+
import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
|
|
4
|
+
import { t as LeuButton } from "./Button-BSyDL_cV.js";
|
|
5
|
+
import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
|
|
6
|
+
import { t as LeuMenu } from "./Menu-Cu8eIF1T.js";
|
|
7
|
+
import { t as LeuPopup } from "./Popup-8jhVy8gB.js";
|
|
8
8
|
import { css, html, nothing } from "lit";
|
|
9
9
|
import { property } from "lit/decorators.js";
|
|
10
10
|
import { createRef, ref } from "lit/directives/ref.js";
|
package/dist/Dropdown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
|
|
2
|
-
import { t as LeuButton } from "./Button-
|
|
3
|
-
import { t as HasSlotController } from "./hasSlotController-
|
|
2
|
+
import { t as LeuButton } from "./Button-BgNUxmo_.js";
|
|
3
|
+
import { t as HasSlotController } from "./hasSlotController-DWPyZ52b.js";
|
|
4
4
|
import { t as LeuMenuItem } from "./MenuItem-QcgnRk_7.js";
|
|
5
5
|
import { t as LeuMenu } from "./Menu-CQdx1ef3.js";
|
|
6
6
|
import { t as LeuPopup } from "./Popup-Btgm2a3D.js";
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
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 "./MenuItem-Cs3KFhJm.js";
|
|
7
|
+
import "./Menu-Cu8eIF1T.js";
|
|
8
|
+
import "./Popup-8jhVy8gB.js";
|
|
9
|
+
import { t as LeuDropdown } from "./Dropdown-BLxSIe6p.js";
|
|
9
10
|
export { LeuDropdown };
|
|
@@ -1,9 +1,9 @@
|
|
|
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 FormAssociatedMixin } from "./FormAssociatedMixin-
|
|
6
|
-
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 FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
+
import { t as LeuVisuallyHidden } from "./VisuallyHidden-Co_txzxB.js";
|
|
7
7
|
import { css, html, nothing } from "lit";
|
|
8
8
|
import { property, query, state } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -237,10 +237,25 @@ var LeuFileInput = class LeuFileInput extends FormAssociatedMixin(LeuElement) {
|
|
|
237
237
|
bubbles: true
|
|
238
238
|
}));
|
|
239
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* This implementation Uses base-10 (decimal) units:
|
|
242
|
+
* 1 KB = 1_000 bytes
|
|
243
|
+
* 1 MB = 1_000_000 bytes
|
|
244
|
+
* 1 GB = 1_000_000_000 bytes
|
|
245
|
+
*
|
|
246
|
+
* To switch to base-2 (binary), use the following implementation:
|
|
247
|
+
* // const KB = 1024
|
|
248
|
+
* // const MB = 1024 * 1024
|
|
249
|
+
* // const GB = 1024 * 1024 * 1024
|
|
250
|
+
*/
|
|
240
251
|
static formatFileSize(size) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
252
|
+
const KB = 1e3;
|
|
253
|
+
const MB = 1e6;
|
|
254
|
+
const GB = 1e9;
|
|
255
|
+
if (size >= GB) return html`${(size / GB).toFixed(1)} GB`;
|
|
256
|
+
if (size >= MB) return html`${(size / MB).toFixed(1)} MB`;
|
|
257
|
+
if (size >= KB) return html`${(size / KB).toFixed(1)} KB`;
|
|
258
|
+
return html`${size} bytes`;
|
|
244
259
|
}
|
|
245
260
|
isAcceptedFile(file) {
|
|
246
261
|
const acceptedTypes = this.accept.split(",").map((type) => type.trim());
|