@statistikzh/leu 0.7.0 → 0.9.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/.eslintrc.json +4 -1
- package/.github/workflows/release-please.yml +3 -3
- package/CHANGELOG.md +35 -0
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb.js +1 -1
- package/dist/{Button-7370f901.d.ts → Button-5a8009c5.d.ts} +2 -2
- package/dist/{Button-7370f901.d.ts.map → Button-5a8009c5.d.ts.map} +1 -1
- package/dist/{Button-7370f901.js → Button-5a8009c5.js} +3 -4
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/CheckboxGroup.d.ts +3 -2
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +4 -3
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.js +2 -2
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.d.ts +7 -0
- package/dist/ChipRemovable.d.ts.map +1 -1
- package/dist/ChipRemovable.js +23 -3
- package/dist/ChipSelectable.d.ts +6 -0
- package/dist/ChipSelectable.d.ts.map +1 -1
- package/dist/ChipSelectable.js +12 -2
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.js +3 -3
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-ba5ea33d.d.ts → LeuElement-7ab5ef5e.d.ts} +1 -1
- package/dist/LeuElement-7ab5ef5e.d.ts.map +1 -0
- package/dist/{LeuElement-ba5ea33d.js → LeuElement-7ab5ef5e.js} +12 -9
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.d.ts +5 -1
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +21 -6
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.js +1 -1
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +2 -2
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +4 -3
- package/dist/ScrollTop.d.ts +1 -1
- package/dist/ScrollTop.js +2 -2
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +9 -5
- package/dist/Spinner.d.ts +9 -0
- package/dist/Spinner.d.ts.map +1 -0
- package/dist/Spinner.js +53 -0
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +2 -2
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-breadcrumb.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.js +2 -2
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dropdown.js +2 -2
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-pagination.js +2 -2
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-scroll-top.js +2 -2
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.d.ts +3 -0
- package/dist/leu-spinner.d.ts.map +1 -0
- package/dist/leu-spinner.js +7 -0
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/theme.css +52 -25
- package/dist/vscode.html-custom-data.json +31 -4
- package/dist/vue/index.d.ts +23 -0
- package/dist/web-types.json +48 -8
- package/package.json +2 -1
- package/rollup.config.js +9 -0
- package/scripts/generate-component/templates/[namespace]-[name].js +1 -2
- package/src/components/button/button.css +2 -3
- package/src/components/checkbox/Checkbox.js +1 -1
- package/src/components/checkbox/CheckboxGroup.js +3 -2
- package/src/components/checkbox/stories/checkbox-group.stories.js +3 -3
- package/src/components/checkbox/stories/checkbox.stories.js +7 -2
- package/src/components/chip/ChipGroup.js +1 -1
- package/src/components/chip/ChipRemovable.js +18 -0
- package/src/components/chip/ChipSelectable.js +13 -1
- package/src/components/chip/stories/chip-removable.stories.js +6 -2
- package/src/components/chip/test/chip-removable.test.js +36 -2
- package/src/components/chip/test/chip-selectable.test.js +11 -1
- package/src/components/dropdown/Dropdown.js +1 -1
- package/src/components/dropdown/test/dropdown.test.js +20 -3
- package/src/components/menu/MenuItem.js +22 -3
- package/src/components/menu/menu-item.css +2 -2
- package/src/components/menu/stories/menu-item.stories.js +18 -8
- package/src/components/menu/test/menu-item.test.js +23 -0
- package/src/components/radio/Radio.js +1 -1
- package/src/components/radio/RadioGroup.js +3 -2
- package/src/components/radio/stories/radio-group.stories.js +3 -3
- package/src/components/radio/stories/radio.stories.js +7 -1
- package/src/components/select/Select.js +8 -6
- package/src/components/select/test/select.test.js +30 -0
- package/src/components/spinner/Spinner.js +31 -0
- package/src/components/spinner/leu-spinner.js +5 -0
- package/src/components/spinner/spinner.css +20 -0
- package/src/components/spinner/stories/spinner.stories.js +29 -0
- package/src/components/spinner/test/spinner.test.js +30 -0
- package/src/lib/LeuElement.js +19 -11
- package/src/styles/custom-properties.css +8 -3
- package/dist/LeuElement-ba5ea33d.d.ts.map +0 -1
package/.eslintrc.json
CHANGED
|
@@ -13,17 +13,17 @@ jobs:
|
|
|
13
13
|
release-please:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
|
-
- uses: google-github-actions/release-please-action@
|
|
16
|
+
- uses: google-github-actions/release-please-action@v4
|
|
17
17
|
id: release
|
|
18
18
|
with:
|
|
19
19
|
release-type: node
|
|
20
|
-
|
|
20
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
21
21
|
# The logic below handles the npm publication:
|
|
22
22
|
- uses: actions/checkout@v4
|
|
23
23
|
# these if statements ensure that a publication only occurs when
|
|
24
24
|
# a new release is created:
|
|
25
25
|
if: ${{ steps.release.outputs.release_created }}
|
|
26
|
-
- uses: actions/setup-node@
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
27
|
with:
|
|
28
28
|
node-version: "20.x"
|
|
29
29
|
registry-url: "https://registry.npmjs.org"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.0](https://github.com/statistikZH/leu/compare/v0.8.0...v0.9.0) (2024-07-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **menu-item:** add multipleSelection property to display a check icon ([#227](https://github.com/statistikZH/leu/issues/227)) ([02358cc](https://github.com/statistikZH/leu/commit/02358ccf5de5cb714adefc8de90d8f799dc58692))
|
|
9
|
+
* **spinner:** implement spinner animation element ([ba6257e](https://github.com/statistikZH/leu/commit/ba6257e6f46c021767f90384eaac19e203517b0d))
|
|
10
|
+
* **theme:** add :host pseudo class so that the theme can be used in a shadow root ([#221](https://github.com/statistikZH/leu/issues/221)) ([66e4676](https://github.com/statistikZH/leu/commit/66e4676be80ac79a137452d1f57d51394d3f4146))
|
|
11
|
+
* use new zh web typeface inter ([#224](https://github.com/statistikZH/leu/issues/224)) ([820deca](https://github.com/statistikZH/leu/commit/820deca357889fa11ac145ae0f203e2137c97a15))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **button:** remove border to match sizes of the design system ([#223](https://github.com/statistikZH/leu/issues/223)) ([9fa2cbb](https://github.com/statistikZH/leu/commit/9fa2cbbf919e02f71a150b974bc97563a75048c0))
|
|
17
|
+
* **checkbox:** avoid 'undefined' values and fallback to an empty string ([2f9f95f](https://github.com/statistikZH/leu/commit/2f9f95f50b56469a5ade01d4b5f5816a858028e3))
|
|
18
|
+
* **dropdown:** properly handle the document click events when the element is used in a shadow dom ([0c6c5a9](https://github.com/statistikZH/leu/commit/0c6c5a915b136f8fdbad300f719bb852d09fe220))
|
|
19
|
+
* **radio:** avoid 'undefined' values and fallback to an empty string ([2f9f95f](https://github.com/statistikZH/leu/commit/2f9f95f50b56469a5ade01d4b5f5816a858028e3))
|
|
20
|
+
* **select:** properly handle the document click events when the element is used in a shadow dom ([0c6c5a9](https://github.com/statistikZH/leu/commit/0c6c5a915b136f8fdbad300f719bb852d09fe220))
|
|
21
|
+
|
|
22
|
+
## [0.8.0](https://github.com/statistikZH/leu/compare/v0.7.0...v0.8.0) (2024-07-16)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **chip:** add getValue method that returns either the value or the text content of the chip ([78eb332](https://github.com/statistikZH/leu/commit/78eb332e6b0da18cfdff45cbd9f3e7cc9514b9ea))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **checkbox-group:** use lowercase values for orientation attribute ([da68c5e](https://github.com/statistikZH/leu/commit/da68c5e68683e8672712c1bd36134df2eabc4cfb))
|
|
33
|
+
* don't define dependencies in the constructor. add version variable for better comparison ([14eda96](https://github.com/statistikZH/leu/commit/14eda96dcbdcd86124a4e42a9a32d472b44416db))
|
|
34
|
+
* **menu-item:** apply correct active colors to match style guide and to be wcag compliant ([#211](https://github.com/statistikZH/leu/issues/211)) ([1f8e957](https://github.com/statistikZH/leu/commit/1f8e95749ae4faaf87fce29924ba5b35724f8e4d))
|
|
35
|
+
* **menu-item:** use textContent instead of innerText to avoid triggering a reflow ([78eb332](https://github.com/statistikZH/leu/commit/78eb332e6b0da18cfdff45cbd9f3e7cc9514b9ea))
|
|
36
|
+
* **radio-group:** use lowercase values for orientation attribute ([da68c5e](https://github.com/statistikZH/leu/commit/da68c5e68683e8672712c1bd36134df2eabc4cfb))
|
|
37
|
+
|
|
3
38
|
## [0.7.0](https://github.com/statistikZH/leu/compare/v0.6.0...v0.7.0) (2024-07-08)
|
|
4
39
|
|
|
5
40
|
|
package/dist/Accordion.d.ts
CHANGED
|
@@ -28,5 +28,5 @@ export class LeuAccordion extends LeuElement {
|
|
|
28
28
|
_handleToggleClick(): void;
|
|
29
29
|
render(): import("lit-html").TemplateResult;
|
|
30
30
|
}
|
|
31
|
-
import { L as LeuElement } from './LeuElement-
|
|
31
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
32
32
|
//# sourceMappingURL=Accordion.d.ts.map
|
package/dist/Accordion.js
CHANGED
package/dist/Breadcrumb.d.ts
CHANGED
|
@@ -64,6 +64,6 @@ export class LeuBreadcrumb extends LeuElement {
|
|
|
64
64
|
renderDropdown(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
65
65
|
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
66
66
|
}
|
|
67
|
-
import { L as LeuElement } from './LeuElement-
|
|
67
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
68
68
|
import { nothing } from 'lit';
|
|
69
69
|
//# sourceMappingURL=Breadcrumb.d.ts.map
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
@@ -77,7 +77,7 @@ declare class LeuButton extends LeuElement {
|
|
|
77
77
|
declare const BUTTON_SIZES: string[];
|
|
78
78
|
declare const BUTTON_TYPES: string[];
|
|
79
79
|
declare const BUTTON_EXPANDED_OPTIONS: string[];
|
|
80
|
-
import { L as LeuElement } from './LeuElement-
|
|
80
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
81
81
|
import { nothing } from 'lit';
|
|
82
82
|
export { BUTTON_VARIANTS as B, HasSlotController as H, LeuButton as L, BUTTON_SIZES as a, BUTTON_TYPES as b, BUTTON_EXPANDED_OPTIONS as c };
|
|
83
|
-
//# sourceMappingURL=Button-
|
|
83
|
+
//# sourceMappingURL=Button-5a8009c5.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button-
|
|
1
|
+
{"version":3,"file":"Button-5a8009c5.d.ts","sourceRoot":"","sources":["Button-5a8009c5.js"],"names":[],"mappings":";;;iCAaa,OAAO,KAAK,EAAE,kBAAkB;AAwW7C,wCAA0D;AA/W1D;;;GAGG;AAEH;;;;GAIG;AACH;IACE,uCAcC;IAHC,UAAgB;IAEhB,eAA0B;IAG5B;;;OAGG;IACH,uBAeC;IAED;;;;OAIG;IACH,qBAEC;IAED;;;OAGG;IACH,gCAEC;IACD,sBAEC;IACD,yBAEC;CACF;AAkTD;;;;;GAKG;AACH;IAQI,WAAiB;IACjB,qBAAqB;IACrB,MADW,MAAM,CACI;IACrB,qBAAqB;IACrB,SADW,MAAM,CACO;IACxB,4CAA4C;IAC5C,MADW,QAAQ,GAAG,QAAQ,GAAG,OAAO,CACpB;IAEpB,qBAAqB;IACrB,eADW,MAAM,CACa;IAE9B,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,+EAA+E;IAC/E,OADW,OAAO,CACA;IAClB,sBAAsB;IACtB,QADW,OAAO,CACC;IACnB,wDAAwD;IACxD,UADW,OAAO,CACG;IAErB,gGAAgG;IAChG,OADW,OAAO,CACA;IAElB;;;OAGG;IACH,UAFU,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAEf;IAE3B,6EAOC;IACD;;;MAaC;IACD,0BAEC;IACD,+CAiCC;CACF;AA7GD,qCAA0C;AAE1C,qCAAmD;AAEnD,gDAAkD;gCA3XI,0BAA0B;wBAC7C,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
@@ -100,7 +100,7 @@ button {
|
|
|
100
100
|
appearance: none;
|
|
101
101
|
transition: background 0.1s ease;
|
|
102
102
|
cursor: pointer;
|
|
103
|
-
border:
|
|
103
|
+
border: none;
|
|
104
104
|
border-radius: 2px;
|
|
105
105
|
|
|
106
106
|
max-width: 100%;
|
|
@@ -126,12 +126,11 @@ button:disabled {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
button:focus-visible {
|
|
129
|
-
border: 1px solid var(--leu-color-black-0);
|
|
130
129
|
outline: 2px solid var(--leu-color-func-cyan);
|
|
130
|
+
outline-offset: 2px;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
button.inverted:focus-visible {
|
|
134
|
-
border: 1px solid var(--leu-color-black-100);
|
|
135
134
|
outline: 2px solid var(--leu-color-black-0);
|
|
136
135
|
}
|
|
137
136
|
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-
|
|
1
|
+
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-5a8009c5.js";
|
|
2
2
|
//# sourceMappingURL=Button.d.ts.map
|
package/dist/Button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './LeuElement-
|
|
1
|
+
import './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import 'lit';
|
|
3
3
|
import 'lit/directives/class-map.js';
|
|
4
4
|
import 'lit/directives/if-defined.js';
|
|
5
5
|
import './Icon.js';
|
|
6
|
-
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-
|
|
6
|
+
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-5a8009c5.js';
|
package/dist/ButtonGroup.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export class LeuButtonGroup extends LeuElement {
|
|
|
20
20
|
_handleButtonClick(button: any): void;
|
|
21
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
22
22
|
}
|
|
23
|
-
import { L as LeuElement } from './LeuElement-
|
|
23
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
24
24
|
//# sourceMappingURL=ButtonGroup.d.ts.map
|
package/dist/ButtonGroup.js
CHANGED
package/dist/Checkbox.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export class LeuCheckbox extends LeuElement {
|
|
|
10
10
|
handleInput(event: any): void;
|
|
11
11
|
render(): import("lit-html").TemplateResult<1>;
|
|
12
12
|
}
|
|
13
|
-
import { L as LeuElement } from './LeuElement-
|
|
13
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
14
14
|
//# sourceMappingURL=Checkbox.d.ts.map
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { LeuIcon } from './Icon.js';
|
|
4
4
|
|
|
@@ -125,7 +125,7 @@ class LeuCheckbox extends LeuElement {
|
|
|
125
125
|
@input=${this.handleInput}
|
|
126
126
|
.checked=${this.checked}
|
|
127
127
|
?disabled=${this.disabled}
|
|
128
|
-
.value=${this.value}
|
|
128
|
+
.value=${this.value ?? ""}
|
|
129
129
|
/>
|
|
130
130
|
<label for=${`checkbox-${this.name}`} class="label"><slot></slot></label>
|
|
131
131
|
<leu-icon class="icon" name="check"></leu-icon>
|
package/dist/CheckboxGroup.d.ts
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* @tagname leu-checkbox-group
|
|
3
3
|
*/
|
|
4
4
|
export class LeuCheckboxGroup extends LeuElement {
|
|
5
|
-
|
|
5
|
+
/** @type {"horizontal" | "vertical"} */
|
|
6
|
+
orientation: "horizontal" | "vertical";
|
|
6
7
|
items: any[];
|
|
7
8
|
get value(): any[];
|
|
8
9
|
handleSlotChange(): void;
|
|
9
10
|
handleItems(): void;
|
|
10
11
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
12
|
}
|
|
12
|
-
import { L as LeuElement } from './LeuElement-
|
|
13
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
13
14
|
//# sourceMappingURL=CheckboxGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["CheckboxGroup.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH;IAGI,
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["CheckboxGroup.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH;IAGI,wCAAwC;IACxC,aADW,YAAY,GAAG,UAAU,CACL;IAC/B,aAAe;IAEjB,mBAEC;IACD,yBAEC;IACD,oBAEC;IACD,+CAWC;CACF;gCApEqD,0BAA0B"}
|
package/dist/CheckboxGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
@@ -41,7 +41,8 @@ var css_248z = css`:host {
|
|
|
41
41
|
class LeuCheckboxGroup extends LeuElement {
|
|
42
42
|
constructor() {
|
|
43
43
|
super();
|
|
44
|
-
|
|
44
|
+
/** @type {"horizontal" | "vertical"} */
|
|
45
|
+
this.orientation = "horizontal";
|
|
45
46
|
this.items = [];
|
|
46
47
|
}
|
|
47
48
|
get value() {
|
|
@@ -56,7 +57,7 @@ class LeuCheckboxGroup extends LeuElement {
|
|
|
56
57
|
render() {
|
|
57
58
|
const fieldsetClasses = {
|
|
58
59
|
fieldset: "true",
|
|
59
|
-
"fieldset--vertical": this.orientation === "
|
|
60
|
+
"fieldset--vertical": this.orientation === "vertical"
|
|
60
61
|
};
|
|
61
62
|
return html`
|
|
62
63
|
<fieldset class=${classMap(fieldsetClasses)}>
|
package/dist/Chip.d.ts
CHANGED
package/dist/Chip.js
CHANGED
package/dist/ChipGroup.d.ts
CHANGED
package/dist/ChipGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { html, unsafeStatic } from 'lit/static-html.js';
|
|
3
3
|
import { css } from 'lit';
|
|
4
4
|
|
|
@@ -83,7 +83,7 @@ class LeuChipGroup extends LeuElement {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
get value() {
|
|
86
|
-
return this.items.filter(i => i.checked).map(i => i.
|
|
86
|
+
return this.items.filter(i => i.checked).map(i => i.getValue());
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
package/dist/ChipLink.js
CHANGED
package/dist/ChipRemovable.d.ts
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
* @slot - The content of the chip
|
|
3
3
|
* @tagname leu-chip-removable
|
|
4
4
|
* @fires remove - Dispatched when the user clicks on the chip
|
|
5
|
+
* @prop {string} value - The value of the chip.
|
|
5
6
|
*/
|
|
6
7
|
export class LeuChipRemovable extends LeuChipBase {
|
|
8
|
+
value: string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the value of the chip. If `value` is not set, it will return the text content
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
getValue(): string;
|
|
7
14
|
handleClick(): void;
|
|
8
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
9
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["ChipRemovable.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["ChipRemovable.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IAGI,cAAe;IAGjB;;;OAGG;IACH,YAFa,MAAM,CAIlB;IACD,oBASC;IACD,+CAKC;CACF;4BAtC2B,WAAW"}
|
package/dist/ChipRemovable.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { LeuChipBase } from './Chip.js';
|
|
4
4
|
import { LeuIcon } from './Icon.js';
|
|
@@ -7,12 +7,28 @@ import { LeuIcon } from './Icon.js';
|
|
|
7
7
|
* @slot - The content of the chip
|
|
8
8
|
* @tagname leu-chip-removable
|
|
9
9
|
* @fires remove - Dispatched when the user clicks on the chip
|
|
10
|
+
* @prop {string} value - The value of the chip.
|
|
10
11
|
*/
|
|
11
12
|
class LeuChipRemovable extends LeuChipBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.value = "";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns the value of the chip. If `value` is not set, it will return the text content
|
|
20
|
+
* @returns {string}
|
|
21
|
+
*/
|
|
22
|
+
getValue() {
|
|
23
|
+
return this.value || this.textContent.trim();
|
|
24
|
+
}
|
|
12
25
|
handleClick() {
|
|
13
26
|
const customEvent = new CustomEvent("leu:remove", {
|
|
14
27
|
bubbles: true,
|
|
15
|
-
composed: true
|
|
28
|
+
composed: true,
|
|
29
|
+
detail: {
|
|
30
|
+
value: this.getValue()
|
|
31
|
+
}
|
|
16
32
|
});
|
|
17
33
|
this.dispatchEvent(customEvent);
|
|
18
34
|
}
|
|
@@ -27,7 +43,11 @@ _defineProperty(LeuChipRemovable, "dependencies", {
|
|
|
27
43
|
"leu-icon": LeuIcon
|
|
28
44
|
});
|
|
29
45
|
_defineProperty(LeuChipRemovable, "properties", {
|
|
30
|
-
...LeuChipBase.properties
|
|
46
|
+
...LeuChipBase.properties,
|
|
47
|
+
value: {
|
|
48
|
+
type: String,
|
|
49
|
+
reflect: true
|
|
50
|
+
}
|
|
31
51
|
});
|
|
32
52
|
|
|
33
53
|
export { LeuChipRemovable };
|
package/dist/ChipSelectable.d.ts
CHANGED
|
@@ -17,7 +17,13 @@ export class LeuChipSelectable extends LeuChipBase {
|
|
|
17
17
|
*/
|
|
18
18
|
variant: string;
|
|
19
19
|
checked: boolean;
|
|
20
|
+
value: string;
|
|
20
21
|
handleClick(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the value of the chip. If `value` is not set, it will return the text content
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
getValue(): string;
|
|
21
27
|
render(): import("lit-html").TemplateResult<1>;
|
|
22
28
|
}
|
|
23
29
|
export namespace SIZES {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["ChipSelectable.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH;IAGI,aAAyB;IAEzB;;;;;OAKG;IACH,gBAA8B;IAC9B,iBAAoB;
|
|
1
|
+
{"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["ChipSelectable.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH;IAGI,aAAyB;IAEzB;;;;;OAKG;IACH,gBAA8B;IAC9B,iBAAoB;IACpB,cAAe;IAKjB,oBAkBC;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IACD,+CAQC;CACF;;;;;;;;;4BA1E2B,WAAW"}
|
package/dist/ChipSelectable.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { LeuChipBase } from './Chip.js';
|
|
4
4
|
|
|
@@ -33,6 +33,7 @@ class LeuChipSelectable extends LeuChipBase {
|
|
|
33
33
|
*/
|
|
34
34
|
this.variant = VARIANTS.toggle;
|
|
35
35
|
this.checked = false;
|
|
36
|
+
this.value = "";
|
|
36
37
|
if (this.variant === VARIANTS.radio && this.size === SIZES.small) {
|
|
37
38
|
console.warn("Small size has no effect on radio variant");
|
|
38
39
|
}
|
|
@@ -48,13 +49,22 @@ class LeuChipSelectable extends LeuChipBase {
|
|
|
48
49
|
this.checked = nextcheckedState;
|
|
49
50
|
this.dispatchEvent(new CustomEvent("input", {
|
|
50
51
|
detail: {
|
|
51
|
-
checked: this.checked
|
|
52
|
+
checked: this.checked,
|
|
53
|
+
value: this.getValue()
|
|
52
54
|
},
|
|
53
55
|
bubbles: true,
|
|
54
56
|
composed: true
|
|
55
57
|
}));
|
|
56
58
|
}
|
|
57
59
|
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Returns the value of the chip. If `value` is not set, it will return the text content
|
|
63
|
+
* @returns {string}
|
|
64
|
+
*/
|
|
65
|
+
getValue() {
|
|
66
|
+
return this.value || this.textContent.trim();
|
|
67
|
+
}
|
|
58
68
|
render() {
|
|
59
69
|
return html`<button
|
|
60
70
|
@click=${() => this.handleClick()}
|
package/dist/Dropdown.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export class LeuDropdown extends LeuElement {
|
|
|
15
15
|
_getMenu(): any;
|
|
16
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
17
17
|
}
|
|
18
|
-
import { L as LeuElement } from './LeuElement-
|
|
18
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
19
19
|
//# sourceMappingURL=Dropdown.d.ts.map
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
|
-
import { H as HasSlotController, L as LeuButton } from './Button-
|
|
4
|
+
import { H as HasSlotController, L as LeuButton } from './Button-5a8009c5.js';
|
|
5
5
|
import { LeuMenu } from './Menu.js';
|
|
6
6
|
import { LeuMenuItem } from './MenuItem.js';
|
|
7
7
|
import { LeuPopup } from './Popup.js';
|
|
@@ -40,7 +40,7 @@ class LeuDropdown extends LeuElement {
|
|
|
40
40
|
super();
|
|
41
41
|
_defineProperty(this, "hasSlotController", new HasSlotController(this, ["icon"]));
|
|
42
42
|
_defineProperty(this, "_documentClickHandler", event => {
|
|
43
|
-
if (!
|
|
43
|
+
if (!event.composedPath().includes(this)) {
|
|
44
44
|
this.expanded = false;
|
|
45
45
|
}
|
|
46
46
|
});
|
package/dist/Icon.d.ts
CHANGED
|
@@ -112,5 +112,5 @@ export class LeuIcon extends LeuElement {
|
|
|
112
112
|
name: any | "";
|
|
113
113
|
render(): import("lit-html").TemplateResult<1>;
|
|
114
114
|
}
|
|
115
|
-
import { L as LeuElement } from './LeuElement-
|
|
115
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
116
116
|
//# sourceMappingURL=Icon.d.ts.map
|
package/dist/Icon.js
CHANGED
package/dist/Input.d.ts
CHANGED
|
@@ -145,6 +145,6 @@ export const SIZES: Readonly<{
|
|
|
145
145
|
SMALL: "small";
|
|
146
146
|
REGULAR: "regular";
|
|
147
147
|
}>;
|
|
148
|
-
import { L as LeuElement } from './LeuElement-
|
|
148
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
149
149
|
import { nothing } from 'lit';
|
|
150
150
|
//# sourceMappingURL=Input.d.ts.map
|
package/dist/Input.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
@@ -4,4 +4,4 @@ declare class LeuElement extends LitElement {
|
|
|
4
4
|
declare function _defineProperty(obj: any, key: any, value: any): any;
|
|
5
5
|
import { LitElement } from 'lit';
|
|
6
6
|
export { LeuElement as L, _defineProperty as _ };
|
|
7
|
-
//# sourceMappingURL=LeuElement-
|
|
7
|
+
//# sourceMappingURL=LeuElement-7ab5ef5e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeuElement-7ab5ef5e.d.ts","sourceRoot":"","sources":["LeuElement-7ab5ef5e.js"],"names":[],"mappings":"AA+BA;IACE,8EAcC;CACF;AA7CD,sEAaC;2BAf0B,KAAK"}
|
|
@@ -31,19 +31,22 @@ function _toPropertyKey(arg) {
|
|
|
31
31
|
|
|
32
32
|
class LeuElement extends LitElement {
|
|
33
33
|
static define(name, constructor = this, options = {}) {
|
|
34
|
-
|
|
34
|
+
Object.entries(this.dependencies).forEach(([n, c]) => c.define(n));
|
|
35
|
+
const currentlyRegisteredConstructor = customElements.get(name);
|
|
36
|
+
if (currentlyRegisteredConstructor === undefined) {
|
|
35
37
|
customElements.define(name, constructor, options);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (currentlyRegisteredConstructor !== constructor) {
|
|
41
|
+
console.warn(`The custom element with the name <${name}> is already registered with a different constructor. This can happen when the same element has been loaded from different modules (e.g. multiple CDN requests or bundles).`);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (currentlyRegisteredConstructor.version !== constructor.version) {
|
|
45
|
+
console.warn(`The custom element with the name <${name}> is already defined with the same constructor but a different version (${currentlyRegisteredConstructor.version}).`);
|
|
38
46
|
}
|
|
39
|
-
}
|
|
40
|
-
constructor() {
|
|
41
|
-
super();
|
|
42
|
-
Object.entries(this.constructor.dependencies).forEach(([name, component]) => {
|
|
43
|
-
this.constructor.define(name, component);
|
|
44
|
-
});
|
|
45
47
|
}
|
|
46
48
|
}
|
|
49
|
+
_defineProperty(LeuElement, "version", "0.9.0");
|
|
47
50
|
_defineProperty(LeuElement, "dependencies", {});
|
|
48
51
|
|
|
49
52
|
export { LeuElement as L, _defineProperty as _ };
|
package/dist/Menu.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ export class LeuMenu extends LeuElement {
|
|
|
25
25
|
updated(changedProperties: any): void;
|
|
26
26
|
render(): import("lit-html").TemplateResult<1>;
|
|
27
27
|
}
|
|
28
|
-
import { L as LeuElement } from './LeuElement-
|
|
28
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
29
29
|
import { LeuMenuItem } from './MenuItem.js';
|
|
30
30
|
//# sourceMappingURL=Menu.d.ts.map
|
package/dist/Menu.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { LeuMenuItem } from './MenuItem.js';
|
|
4
4
|
import 'lit/directives/if-defined.js';
|
package/dist/MenuItem.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type MenuItemRole = 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | '
|
|
|
6
6
|
* @tagname leu-menu-item
|
|
7
7
|
* @slot - The label of the menu item
|
|
8
8
|
* @property {boolean} active - Defines if the item is selected or checked
|
|
9
|
+
* @property {boolean} multipleSelection - If the item is part of a multiple selection. Renders a checkmark before the label when active
|
|
9
10
|
* @property {boolean} disabled - Disables the underlying button or link
|
|
10
11
|
* @property {string} value - The value of the item. It must not contain commas. See `getValue()`
|
|
11
12
|
* @property {string} href - The href of the underlying link
|
|
@@ -15,6 +16,7 @@ export type MenuItemRole = 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | '
|
|
|
15
16
|
export class LeuMenuItem extends LeuElement {
|
|
16
17
|
active: boolean;
|
|
17
18
|
disabled: boolean;
|
|
19
|
+
multipleSelection: boolean;
|
|
18
20
|
value: any;
|
|
19
21
|
href: any;
|
|
20
22
|
tabbable: any;
|
|
@@ -32,7 +34,9 @@ export class LeuMenuItem extends LeuElement {
|
|
|
32
34
|
_getTabIndex(): 0 | -1;
|
|
33
35
|
_renderLink(content: any): import("lit-html").TemplateResult<1>;
|
|
34
36
|
_renderButton(content: any): import("lit-html").TemplateResult<1>;
|
|
37
|
+
_renderBeforeSlotDefault(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
35
38
|
render(): import("lit-html").TemplateResult<1>;
|
|
36
39
|
}
|
|
37
|
-
import { L as LeuElement } from './LeuElement-
|
|
40
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
41
|
+
import { nothing } from 'lit';
|
|
38
42
|
//# sourceMappingURL=MenuItem.d.ts.map
|
package/dist/MenuItem.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["MenuItem.js"],"names":[],"mappings":"2BA8Fa,UAAU,GAAG,kBAAkB,GAAG,eAAe,GAAG,QAAQ,GAAG,MAAM;AADlF;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["MenuItem.js"],"names":[],"mappings":"2BA8Fa,UAAU,GAAG,kBAAkB,GAAG,eAAe,GAAG,QAAQ,GAAG,MAAM;AADlF;;GAEG;AAEH;;;;;;;;;;GAUG;AACH;IAGI,gBAAmB;IACnB,kBAAqB;IACrB,2BAA8B;IAC9B,WAAsB;IACtB,UAAqB;IACrB,cAAyB;IAEzB,2BAA2B;IAC3B,eADW,YAAY,CACQ;IAUjC,+BAKC;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IACD;;MAaC;IACD,uBAKC;IACD,gEAYC;IACD,kEAYC;IACD,kFAKC;IACD,+CASC;CACF;gCA7MqD,0BAA0B;wBAC7C,KAAK"}
|