@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/dist/MenuItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty, L as LeuElement } from './LeuElement-
|
|
2
|
-
import { css, html } from 'lit';
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
|
+
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import { LeuIcon } from './Icon.js';
|
|
5
5
|
|
|
@@ -11,10 +11,10 @@ var css_248z = css`:host,
|
|
|
11
11
|
:host {
|
|
12
12
|
--background: var(--leu-color-black-0);
|
|
13
13
|
--background-hover: var(--leu-color-black-10);
|
|
14
|
-
--background-active: var(--leu-color-
|
|
14
|
+
--background-active: var(--leu-color-func-cyan);
|
|
15
15
|
--background-disabled: var(--leu-color-black-black-0);
|
|
16
16
|
--color: var(--leu-color-black-transp-60);
|
|
17
|
-
--color-active: var(--leu-color-black-
|
|
17
|
+
--color-active: var(--leu-color-black-100);
|
|
18
18
|
--color-disabled: var(--leu-color-black-transp-20);
|
|
19
19
|
--font-regular: var(--leu-font-family-regular);
|
|
20
20
|
--font-black: var(--leu-font-family-black);
|
|
@@ -99,6 +99,7 @@ var css_248z = css`:host,
|
|
|
99
99
|
* @tagname leu-menu-item
|
|
100
100
|
* @slot - The label of the menu item
|
|
101
101
|
* @property {boolean} active - Defines if the item is selected or checked
|
|
102
|
+
* @property {boolean} multipleSelection - If the item is part of a multiple selection. Renders a checkmark before the label when active
|
|
102
103
|
* @property {boolean} disabled - Disables the underlying button or link
|
|
103
104
|
* @property {string} value - The value of the item. It must not contain commas. See `getValue()`
|
|
104
105
|
* @property {string} href - The href of the underlying link
|
|
@@ -110,6 +111,7 @@ class LeuMenuItem extends LeuElement {
|
|
|
110
111
|
super();
|
|
111
112
|
this.active = false;
|
|
112
113
|
this.disabled = false;
|
|
114
|
+
this.multipleSelection = false;
|
|
113
115
|
this.value = undefined;
|
|
114
116
|
this.href = undefined;
|
|
115
117
|
this.tabbable = undefined;
|
|
@@ -137,7 +139,7 @@ class LeuMenuItem extends LeuElement {
|
|
|
137
139
|
* @returns {string}
|
|
138
140
|
*/
|
|
139
141
|
getValue() {
|
|
140
|
-
return this.value || this.
|
|
142
|
+
return this.value || this.textContent.trim();
|
|
141
143
|
}
|
|
142
144
|
_getAria() {
|
|
143
145
|
const commonAttributes = {
|
|
@@ -185,9 +187,17 @@ class LeuMenuItem extends LeuElement {
|
|
|
185
187
|
${content}
|
|
186
188
|
</button>`;
|
|
187
189
|
}
|
|
190
|
+
_renderBeforeSlotDefault() {
|
|
191
|
+
if (!this.multipleSelection) {
|
|
192
|
+
return nothing;
|
|
193
|
+
}
|
|
194
|
+
return this.active ? html`<leu-icon name="check"></leu-icon>` : html`<leu-icon></leu-icon>`;
|
|
195
|
+
}
|
|
188
196
|
render() {
|
|
189
197
|
const content = html`
|
|
190
|
-
<slot class="before" name="before"
|
|
198
|
+
<slot class="before" name="before"
|
|
199
|
+
>${this._renderBeforeSlotDefault()}</slot
|
|
200
|
+
>
|
|
191
201
|
<span class="label"><slot></slot></span>
|
|
192
202
|
<slot class="after" name="after"></slot>
|
|
193
203
|
`;
|
|
@@ -210,6 +220,11 @@ _defineProperty(LeuMenuItem, "properties", {
|
|
|
210
220
|
type: Boolean,
|
|
211
221
|
reflect: true
|
|
212
222
|
},
|
|
223
|
+
multipleSelection: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
reflect: true,
|
|
226
|
+
attr: "multiple-selection"
|
|
227
|
+
},
|
|
213
228
|
disabled: {
|
|
214
229
|
type: Boolean,
|
|
215
230
|
reflect: true
|
package/dist/Pagination.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export class LeuPagination extends LeuElement {
|
|
|
30
30
|
_handleKeyDown(event: any): void;
|
|
31
31
|
render(): import("lit-html").TemplateResult<1>;
|
|
32
32
|
}
|
|
33
|
-
import { L as LeuElement } from './LeuElement-
|
|
33
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
34
34
|
//# sourceMappingURL=Pagination.d.ts.map
|
package/dist/Pagination.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 } from 'lit';
|
|
3
3
|
import { live } from 'lit/directives/live.js';
|
|
4
|
-
import { L as LeuButton } from './Button-
|
|
4
|
+
import { L as LeuButton } from './Button-5a8009c5.js';
|
|
5
5
|
import { LeuVisuallyHidden } from './VisuallyHidden.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import 'lit/directives/class-map.js';
|
package/dist/Popup.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export class LeuPopup extends LeuElement {
|
|
|
32
32
|
handleAnchorChange(): void;
|
|
33
33
|
render(): import("lit-html").TemplateResult<1>;
|
|
34
34
|
}
|
|
35
|
-
import { L as LeuElement } from './LeuElement-
|
|
35
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
36
36
|
//# sourceMappingURL=Popup.d.ts.map
|
package/dist/Popup.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 { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
|
|
4
4
|
|
package/dist/Radio.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export class LeuRadio 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=Radio.d.ts.map
|
package/dist/Radio.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
|
|
|
4
4
|
var css_248z = css`:host {
|
|
@@ -124,7 +124,7 @@ class LeuRadio extends LeuElement {
|
|
|
124
124
|
@input=${this.handleInput}
|
|
125
125
|
.checked=${this.checked}
|
|
126
126
|
?disabled=${this.disabled}
|
|
127
|
-
.value=${this.value}
|
|
127
|
+
.value=${this.value ?? ""}
|
|
128
128
|
/>
|
|
129
129
|
<label for=${`radio-${this.name}`} class="label"><slot></slot></label>
|
|
130
130
|
`;
|
package/dist/RadioGroup.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export class LeuRadioGroup extends LeuElement {
|
|
|
16
16
|
initializeIndex(): void;
|
|
17
17
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
18
|
}
|
|
19
|
-
import { L as LeuElement } from './LeuElement-
|
|
19
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
20
20
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
package/dist/RadioGroup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["RadioGroup.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["RadioGroup.js"],"names":[],"mappings":"AAqCA;;GAEG;AACH;IAKM,sBAAiD;IA2BnD,oBAA+B;IAE/B,aAAe;IAEjB,iBAGC;IAUD,0BAaC;IACD,6BAMC;IACD,yBAEC;IACD,qCAIC;IACD,yDAaC;IACD,oBAQC;IACD,oBAIC;IACD,wBAIC;IACD,+CAWC;CACF;gCAnKqD,0BAA0B"}
|
package/dist/RadioGroup.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,6 +41,7 @@ var css_248z = css`:host {
|
|
|
41
41
|
class LeuRadioGroup extends LeuElement {
|
|
42
42
|
constructor() {
|
|
43
43
|
super();
|
|
44
|
+
/** @type {"horizontal" | "vertical"} */
|
|
44
45
|
_defineProperty(this, "handleFocusIn", e => {
|
|
45
46
|
this._currentIndex = this.items.indexOf(e.target);
|
|
46
47
|
});
|
|
@@ -69,7 +70,7 @@ class LeuRadioGroup extends LeuElement {
|
|
|
69
70
|
item.checked = item === e.target; // eslint-disable-line no-param-reassign
|
|
70
71
|
});
|
|
71
72
|
});
|
|
72
|
-
this.orientation = "
|
|
73
|
+
this.orientation = "horizontal";
|
|
73
74
|
this._currentIndex = 0;
|
|
74
75
|
this.items = [];
|
|
75
76
|
}
|
|
@@ -151,7 +152,7 @@ class LeuRadioGroup extends LeuElement {
|
|
|
151
152
|
render() {
|
|
152
153
|
const fieldsetClasses = {
|
|
153
154
|
fieldset: "true",
|
|
154
|
-
"fieldset--vertical": this.orientation === "
|
|
155
|
+
"fieldset--vertical": this.orientation === "vertical"
|
|
155
156
|
};
|
|
156
157
|
return html`
|
|
157
158
|
<fieldset class=${classMap(fieldsetClasses)}>
|
package/dist/ScrollTop.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export class LeuScrollTop extends LeuElement {
|
|
|
15
15
|
_scrollListener: Function;
|
|
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=ScrollTop.d.ts.map
|
package/dist/ScrollTop.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 } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import { L as LeuButton } from './Button-
|
|
4
|
+
import { L as LeuButton } from './Button-5a8009c5.js';
|
|
5
5
|
import { LeuIcon } from './Icon.js';
|
|
6
6
|
import { t as throttle } from './utils-65469421.js';
|
|
7
7
|
import 'lit/directives/if-defined.js';
|
package/dist/Select.d.ts
CHANGED
|
@@ -131,6 +131,6 @@ export class LeuSelect extends LeuElement {
|
|
|
131
131
|
_renderToggleButton(): import("lit-html").TemplateResult<1>;
|
|
132
132
|
render(): import("lit-html").TemplateResult<1>;
|
|
133
133
|
}
|
|
134
|
-
import { L as LeuElement } from './LeuElement-
|
|
134
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
135
135
|
import { nothing } from 'lit';
|
|
136
136
|
//# sourceMappingURL=Select.d.ts.map
|
package/dist/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmDC;IACD,wCAKC;IA4BC,cAAiB;IACjB,kBAAqB;IAErB,kBAAqB;IACrB,mBAAsB;IACtB,oBAAuB;IACvB,aAAe;IACf,cAAe;IACf,aAAc;IAEd,gBAAgB;IAChB,sBAAuB;IAEvB,gBAAgB;IAChB,2BAA6B;IAE7B,gBAAgB;IAChB,6BAAgC;IAEhC,gBAAgB;IAChB,sBAAuB;IAEvB;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,KAAmC,CAE1C;IACnC;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAE1B;IAEnC;;OAEG;IACH,UAFU,OAAO,oBAAoB,EAAE,GAAG,KAAgC,CAE/C;IAU7B,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmDC;IACD,wCAKC;IA4BC,cAAiB;IACjB,kBAAqB;IAErB,kBAAqB;IACrB,mBAAsB;IACtB,oBAAuB;IACvB,aAAe;IACf,cAAe;IACf,aAAc;IAEd,gBAAgB;IAChB,sBAAuB;IAEvB,gBAAgB;IAChB,2BAA6B;IAE7B,gBAAgB;IAChB,6BAAgC;IAEhC,gBAAgB;IAChB,sBAAuB;IAEvB;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,KAAmC,CAE1C;IACnC;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAE1B;IAEnC;;OAEG;IACH,UAFU,OAAO,oBAAoB,EAAE,GAAG,KAAgC,CAE/C;IAU7B,sCAqBC;IAED;;;;OAIG;IACH,8CA6BC;IACD;;;OAGG;IACH,4BAFW,aAAa,iBAcvB;IAED;;;OAGG;IACH,iCAFW,aAAa,QAQvB;IAED;;;OAGG;IACH,oBAFa,uBAAgB,CAO5B;IACD,wBAMC;IACD,yBAMC;IACD,8BAOC;IACD,wBAIC;IACD,uBAMC;IACD,qCAEC;IAED;;;;OAIG;IACH,4CAEC;IACD,uCAoBC;IAED;;OAEG;IACH,uCAIC;IACD,4EAaC;IACD,4EAeC;IACD,4DAmCC;IACD,+CAmDC;CACF;gCAjrBqD,0BAA0B;wBAC7C,KAAK"}
|
package/dist/Select.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { createRef, ref } from 'lit/directives/ref.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
-
import { H as HasSlotController, L as LeuButton } from './Button-
|
|
6
|
+
import { H as HasSlotController, L as LeuButton } from './Button-5a8009c5.js';
|
|
7
7
|
import { LeuMenu } from './Menu.js';
|
|
8
8
|
import { LeuMenuItem } from './MenuItem.js';
|
|
9
9
|
import { LeuIcon } from './Icon.js';
|
|
@@ -338,7 +338,7 @@ class LeuSelect extends LeuElement {
|
|
|
338
338
|
* @param {MouseEvent} event
|
|
339
339
|
*/
|
|
340
340
|
_defineProperty(this, "_handleDocumentClick", event => {
|
|
341
|
-
if (event.
|
|
341
|
+
if (!event.composedPath().includes(this) && this.open) {
|
|
342
342
|
this._closeDropdown();
|
|
343
343
|
}
|
|
344
344
|
});
|
|
@@ -409,10 +409,11 @@ class LeuSelect extends LeuElement {
|
|
|
409
409
|
// CAN be called with undefined.
|
|
410
410
|
this._toggleButtonRef.value?.focus();
|
|
411
411
|
}
|
|
412
|
-
if (changedProperties.has("value") || changedProperties.has("_optionFilter")) {
|
|
412
|
+
if (changedProperties.has("value") || changedProperties.has("_optionFilter") || changedProperties.has("multiple")) {
|
|
413
413
|
this._updateMenuItems({
|
|
414
414
|
value: changedProperties.has("value"),
|
|
415
|
-
optionFilter: changedProperties.has("_optionFilter")
|
|
415
|
+
optionFilter: changedProperties.has("_optionFilter"),
|
|
416
|
+
multiple: changedProperties.has("multiple")
|
|
416
417
|
});
|
|
417
418
|
}
|
|
418
419
|
}
|
|
@@ -431,6 +432,9 @@ class LeuSelect extends LeuElement {
|
|
|
431
432
|
|
|
432
433
|
/* eslint-disable no-param-reassign */
|
|
433
434
|
menuItems.forEach(menuItem => {
|
|
435
|
+
if (changed.multiple) {
|
|
436
|
+
menuItem.multipleSelection = this.multiple;
|
|
437
|
+
}
|
|
434
438
|
if (changed.optionFilter) {
|
|
435
439
|
menuItem.hidden = this._optionFilter !== "" && !menuItem.textContent.toLowerCase().includes(this._optionFilter.toLowerCase());
|
|
436
440
|
hasFilterResults = hasFilterResults || !menuItem.hidden;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tagname leu-spinner
|
|
3
|
+
* @cssprop --leu-spinner-size - The size of the spinner.
|
|
4
|
+
*/
|
|
5
|
+
export class LeuSpinner extends LeuElement {
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
}
|
|
8
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
9
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["Spinner.js"],"names":[],"mappings":"AA2BA;;;GAGG;AACH;IACE,+CAgBC;CACF;gCAjDqD,0BAA0B"}
|
package/dist/Spinner.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
|
+
|
|
4
|
+
var css_248z = css`@keyframes leu-spinner-rotate {
|
|
5
|
+
from {
|
|
6
|
+
transform: rotate(0deg);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
to {
|
|
10
|
+
transform: rotate(360deg);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
color: var(--leu-color-func-cyan);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.spinner {
|
|
19
|
+
display: block;
|
|
20
|
+
width: 3.5rem;
|
|
21
|
+
width: var(--leu-spinner-size, 3.5rem);
|
|
22
|
+
height: 3.5rem;
|
|
23
|
+
height: var(--leu-spinner-size, 3.5rem);
|
|
24
|
+
animation: leu-spinner-rotate 1s cubic-bezier(0.49, 0.12, 0.56, 0.91) infinite;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @tagname leu-spinner
|
|
30
|
+
* @cssprop --leu-spinner-size - The size of the spinner.
|
|
31
|
+
*/
|
|
32
|
+
class LeuSpinner extends LeuElement {
|
|
33
|
+
render() {
|
|
34
|
+
return html`
|
|
35
|
+
<svg
|
|
36
|
+
class="spinner"
|
|
37
|
+
fill="none"
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
viewBox="0 0 56 56"
|
|
40
|
+
role="presentation"
|
|
41
|
+
>
|
|
42
|
+
<path
|
|
43
|
+
d="M13.8579 13.858c7.8105-7.8105 20.4737-7.8105 28.2842 0 7.8105 7.8104 7.8105 20.4737 0 28.2842-7.8105 7.8105-20.4737 7.8105-28.2842 0-4.3487-4.3486-6.2761-10.2016-5.7824-15.8838"
|
|
44
|
+
stroke="currentColor"
|
|
45
|
+
stroke-width="3"
|
|
46
|
+
/>
|
|
47
|
+
</svg>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_defineProperty(LeuSpinner, "styles", css_248z);
|
|
52
|
+
|
|
53
|
+
export { LeuSpinner };
|
package/dist/Table.d.ts
CHANGED
|
@@ -40,5 +40,5 @@ export class LeuTable extends LeuElement {
|
|
|
40
40
|
get _data(): any[];
|
|
41
41
|
render(): import("lit-html").TemplateResult<1>;
|
|
42
42
|
}
|
|
43
|
-
import { L as LeuElement } from './LeuElement-
|
|
43
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
44
44
|
//# sourceMappingURL=Table.d.ts.map
|
package/dist/Table.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, nothing } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
@@ -6,7 +6,7 @@ import { createRef, ref } from 'lit/directives/ref.js';
|
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
|
8
8
|
import 'lit/directives/live.js';
|
|
9
|
-
import './Button-
|
|
9
|
+
import './Button-5a8009c5.js';
|
|
10
10
|
import 'lit/directives/if-defined.js';
|
|
11
11
|
import './VisuallyHidden.js';
|
|
12
12
|
|
package/dist/VisuallyHidden.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
export class LeuVisuallyHidden extends LeuElement {
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
7
|
-
import { L as LeuElement } from './LeuElement-
|
|
7
|
+
import { L as LeuElement } from './LeuElement-7ab5ef5e.js';
|
|
8
8
|
//# sourceMappingURL=VisuallyHidden.d.ts.map
|
package/dist/VisuallyHidden.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export { LeuRadio } from "./Radio.js";
|
|
|
16
16
|
export { LeuRadioGroup } from "./RadioGroup.js";
|
|
17
17
|
export { LeuSelect } from "./Select.js";
|
|
18
18
|
export { LeuTable } from "./Table.js";
|
|
19
|
-
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-
|
|
19
|
+
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";
|
|
20
20
|
export { LeuInput, SIZES } from "./Input.js";
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { LeuAccordion } from './Accordion.js';
|
|
2
2
|
export { LeuBreadcrumb } from './Breadcrumb.js';
|
|
3
|
-
export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-
|
|
3
|
+
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';
|
|
4
4
|
export { LeuButtonGroup } from './ButtonGroup.js';
|
|
5
5
|
export { LeuCheckbox } from './Checkbox.js';
|
|
6
6
|
export { LeuCheckboxGroup } from './CheckboxGroup.js';
|
|
@@ -18,7 +18,7 @@ export { LeuRadio } from './Radio.js';
|
|
|
18
18
|
export { LeuRadioGroup } from './RadioGroup.js';
|
|
19
19
|
export { LeuSelect } from './Select.js';
|
|
20
20
|
export { LeuTable } from './Table.js';
|
|
21
|
-
import './LeuElement-
|
|
21
|
+
import './LeuElement-7ab5ef5e.js';
|
|
22
22
|
import 'lit';
|
|
23
23
|
import 'lit/static-html.js';
|
|
24
24
|
import 'lit/directives/ref.js';
|
package/dist/leu-accordion.js
CHANGED
package/dist/leu-breadcrumb.js
CHANGED
package/dist/leu-button-group.js
CHANGED
package/dist/leu-button.d.ts
CHANGED
package/dist/leu-button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LeuButton } from './Button-
|
|
2
|
-
import './LeuElement-
|
|
1
|
+
import { L as LeuButton } from './Button-5a8009c5.js';
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directives/if-defined.js';
|
package/dist/leu-checkbox.js
CHANGED
package/dist/leu-chip-group.js
CHANGED
package/dist/leu-chip-link.js
CHANGED
package/dist/leu-dropdown.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LeuDropdown } from './Dropdown.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/ref.js';
|
|
5
|
-
import './Button-
|
|
5
|
+
import './Button-5a8009c5.js';
|
|
6
6
|
import 'lit/directives/class-map.js';
|
|
7
7
|
import 'lit/directives/if-defined.js';
|
|
8
8
|
import './Icon.js';
|
package/dist/leu-icon.js
CHANGED
package/dist/leu-input.js
CHANGED
package/dist/leu-menu-item.js
CHANGED
package/dist/leu-menu.js
CHANGED
package/dist/leu-pagination.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LeuPagination } from './Pagination.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/live.js';
|
|
5
|
-
import './Button-
|
|
5
|
+
import './Button-5a8009c5.js';
|
|
6
6
|
import 'lit/directives/class-map.js';
|
|
7
7
|
import 'lit/directives/if-defined.js';
|
|
8
8
|
import './Icon.js';
|
package/dist/leu-popup.js
CHANGED
package/dist/leu-radio-group.js
CHANGED
package/dist/leu-radio.js
CHANGED
package/dist/leu-scroll-top.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LeuScrollTop } from './ScrollTop.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
|
-
import './Button-
|
|
5
|
+
import './Button-5a8009c5.js';
|
|
6
6
|
import 'lit/directives/if-defined.js';
|
|
7
7
|
import './Icon.js';
|
|
8
8
|
import './utils-65469421.js';
|
package/dist/leu-select.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LeuSelect } from './Select.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directives/ref.js';
|
|
6
6
|
import 'lit/directives/if-defined.js';
|
|
7
|
-
import './Button-
|
|
7
|
+
import './Button-5a8009c5.js';
|
|
8
8
|
import './Icon.js';
|
|
9
9
|
import './Menu.js';
|
|
10
10
|
import './MenuItem.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leu-spinner.d.ts","sourceRoot":"","sources":["leu-spinner.js"],"names":[],"mappings":";2BAA2B,cAAc"}
|
package/dist/leu-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LeuTable } from './Table.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-7ab5ef5e.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directives/style-map.js';
|
|
@@ -7,7 +7,7 @@ import 'lit/directives/ref.js';
|
|
|
7
7
|
import './Icon.js';
|
|
8
8
|
import './Pagination.js';
|
|
9
9
|
import 'lit/directives/live.js';
|
|
10
|
-
import './Button-
|
|
10
|
+
import './Button-5a8009c5.js';
|
|
11
11
|
import 'lit/directives/if-defined.js';
|
|
12
12
|
import './VisuallyHidden.js';
|
|
13
13
|
|