@statistikzh/leu 0.19.1 → 0.20.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 +14 -0
- package/dist/Accordion.js +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/ChartWrapper.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.js +1 -1
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dropdown.d.ts +1 -0
- package/dist/Dropdown.js +1 -1
- package/dist/FileInput.d.ts +7 -1
- package/dist/FileInput.js +18 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-CRdVLttR.js → LeuElement-C1c3TgrG.js} +1 -1
- package/dist/Menu.d.ts +2 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Message.js +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Placeholder.js +1 -1
- package/dist/Popup.d.ts +22 -46
- package/dist/Popup.js +40 -31
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Range.js +1 -1
- package/dist/ScrollTop.js +1 -1
- package/dist/Select.d.ts +3 -2
- package/dist/Select.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/file-input/FileInput.d.ts +7 -1
- package/dist/components/file-input/FileInput.d.ts.map +1 -1
- package/dist/components/menu/Menu.d.ts +2 -1
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/popup/Popup.d.ts +21 -46
- package/dist/components/popup/Popup.d.ts.map +1 -1
- package/dist/components/popup/stories/popup.stories.d.ts +9 -0
- package/dist/components/popup/stories/popup.stories.d.ts.map +1 -1
- package/dist/components/select/Select.d.ts +2 -2
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +1 -1
- package/dist/leu-chart-wrapper.js +1 -1
- 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-dialog.js +1 -1
- package/dist/leu-dropdown.d.ts +1 -0
- package/dist/leu-dropdown.js +1 -1
- package/dist/leu-file-input.js +1 -1
- 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-message.js +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.d.ts +1 -0
- package/dist/leu-popup.js +3 -1
- package/dist/leu-progress-bar.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.js +1 -1
- package/dist/leu-select.d.ts +1 -0
- package/dist/leu-select.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +1 -1
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/vscode.html-custom-data.json +17 -13
- package/dist/vue/index.d.ts +29 -27
- package/dist/web-types.json +48 -50
- package/package.json +1 -1
- package/src/components/file-input/FileInput.ts +25 -2
- package/src/components/menu/Menu.ts +2 -2
- package/src/components/popup/Popup.ts +49 -44
- package/src/components/popup/stories/popup.stories.ts +49 -0
- package/src/components/popup/test/popup.test.ts +39 -3
- package/src/components/select/Select.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.0](https://github.com/statistikZH/leu/compare/leu-v0.19.2...leu-v0.20.0) (2025-10-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **popup:** add support for a virtual element ([6458159](https://github.com/statistikZH/leu/commit/6458159bff0a3c6895ec8cc12ecd575a8639ec13))
|
|
9
|
+
|
|
10
|
+
## [0.19.2](https://github.com/statistikZH/leu/compare/leu-v0.19.1...leu-v0.19.2) (2025-10-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **file-input:** dispatch input and change events when files are added and removed ([ad2faf5](https://github.com/statistikZH/leu/commit/ad2faf59ff96b0f0990f3022f3e2c07d8cc0975d))
|
|
16
|
+
|
|
3
17
|
## [0.19.1](https://github.com/statistikZH/leu/compare/leu-v0.19.0...leu-v0.19.1) (2025-10-15)
|
|
4
18
|
|
|
5
19
|
|
package/dist/Accordion.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, nothing } from 'lit';
|
|
3
3
|
import { unsafeStatic, html } from 'lit/static-html.js';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
|
|
7
7
|
var css_248z = css`:host {
|
|
8
8
|
--accordion-font-regular: var(--leu-font-family-regular);
|
package/dist/Button.js
CHANGED
|
@@ -4,7 +4,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { property } from 'lit/decorators.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
|
-
import { L as LeuElement } from './LeuElement-
|
|
7
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
8
8
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
9
9
|
|
|
10
10
|
/**
|
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, html } from 'lit';
|
|
2
|
-
import { L as LeuElement } from './LeuElement-
|
|
2
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
3
3
|
import { LeuButton } from './Button.js';
|
|
4
4
|
import './_tslib-CNEFicEt.js';
|
|
5
5
|
import 'lit/directives/class-map.js';
|
package/dist/ChartWrapper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
6
6
|
import { LeuSpinner } from './Spinner.js';
|
|
7
7
|
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
import { LeuIcon } from './Icon.js';
|
|
6
6
|
|
|
7
7
|
var css_248z = css`:host {
|
package/dist/CheckboxGroup.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { LeuCheckbox } from './Checkbox.js';
|
|
7
7
|
import './Icon.js';
|
|
8
8
|
|
package/dist/Chip.js
CHANGED
package/dist/ChipGroup.js
CHANGED
package/dist/ChipLink.js
CHANGED
package/dist/ChipRemovable.js
CHANGED
package/dist/ChipSelectable.js
CHANGED
package/dist/Dialog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, nothing, html } from 'lit';
|
|
2
2
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import './_tslib-CNEFicEt.js';
|
package/dist/Dropdown.d.ts
CHANGED
package/dist/Dropdown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, nothing, html } from 'lit';
|
|
2
2
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
3
|
-
import { L as LeuElement } from './LeuElement-
|
|
3
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
4
4
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
5
5
|
import { LeuButton } from './Button.js';
|
|
6
6
|
import { LeuMenu } from './Menu.js';
|
package/dist/FileInput.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
|
+
import { PropertyValues } from 'lit';
|
|
3
4
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
5
|
import { LeuButton } from './Button.js';
|
|
5
6
|
import { LeuIcon } from './Icon.js';
|
|
6
7
|
import { LeuVisuallyHidden } from './VisuallyHidden.js';
|
|
7
8
|
import './leu-icon.js';
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @todo Pluralize text when multiple files are allowed
|
|
12
|
+
* @todo Hide dropzone when not multiple and already filled
|
|
13
|
+
*/
|
|
9
14
|
/**
|
|
10
15
|
* @tagname leu-file-input
|
|
11
16
|
*/
|
|
@@ -43,8 +48,9 @@ declare class LeuFileInput extends LeuElement {
|
|
|
43
48
|
constructor();
|
|
44
49
|
get form(): HTMLFormElement;
|
|
45
50
|
get name(): string;
|
|
46
|
-
updated(changedProperties:
|
|
51
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
47
52
|
protected handleInput(): void;
|
|
53
|
+
private handleChange;
|
|
48
54
|
formResetCallback(): void;
|
|
49
55
|
protected updateFormValue(): void;
|
|
50
56
|
protected removeFile(fileToRemove: File): void;
|
package/dist/FileInput.js
CHANGED
|
@@ -3,7 +3,7 @@ import { css, html, nothing } from 'lit';
|
|
|
3
3
|
import { property, state, query } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
-
import { L as LeuElement } from './LeuElement-
|
|
6
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
7
7
|
import './Accordion.js';
|
|
8
8
|
import { LeuButton } from './Button.js';
|
|
9
9
|
import './ButtonGroup.js';
|
|
@@ -157,6 +157,10 @@ var css_248z = css`:host {
|
|
|
157
157
|
}
|
|
158
158
|
`;
|
|
159
159
|
|
|
160
|
+
/**
|
|
161
|
+
* @todo Pluralize text when multiple files are allowed
|
|
162
|
+
* @todo Hide dropzone when not multiple and already filled
|
|
163
|
+
*/
|
|
160
164
|
/**
|
|
161
165
|
* @tagname leu-file-input
|
|
162
166
|
*/
|
|
@@ -235,6 +239,10 @@ class LeuFileInput extends LeuElement {
|
|
|
235
239
|
: acceptableFiles.slice(0, 1);
|
|
236
240
|
}
|
|
237
241
|
}
|
|
242
|
+
handleChange(event) {
|
|
243
|
+
const customEvent = new CustomEvent(event.type, event);
|
|
244
|
+
this.dispatchEvent(customEvent);
|
|
245
|
+
}
|
|
238
246
|
formResetCallback() {
|
|
239
247
|
this.files = [];
|
|
240
248
|
this.input.value = "";
|
|
@@ -249,6 +257,14 @@ class LeuFileInput extends LeuElement {
|
|
|
249
257
|
}
|
|
250
258
|
removeFile(fileToRemove) {
|
|
251
259
|
this.files = this.files.filter((file) => file !== fileToRemove);
|
|
260
|
+
this.dispatchEvent(new CustomEvent("input", {
|
|
261
|
+
composed: true,
|
|
262
|
+
bubbles: true,
|
|
263
|
+
}));
|
|
264
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
265
|
+
composed: true,
|
|
266
|
+
bubbles: true,
|
|
267
|
+
}));
|
|
252
268
|
}
|
|
253
269
|
static formatFileSize(size) {
|
|
254
270
|
if (size < 1e3) {
|
|
@@ -299,6 +315,7 @@ class LeuFileInput extends LeuElement {
|
|
|
299
315
|
accept=${ifDefined(this.accept)}
|
|
300
316
|
?disabled=${this.disabled}
|
|
301
317
|
@input=${this.handleInput}
|
|
318
|
+
@change=${this.handleChange}
|
|
302
319
|
/>
|
|
303
320
|
</leu-visually-hidden>
|
|
304
321
|
<div
|
package/dist/Icon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html, svg } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
display: contents;
|
package/dist/Input.js
CHANGED
|
@@ -3,7 +3,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import { live } from 'lit/directives/live.js';
|
|
5
5
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
6
|
-
import { L as LeuElement } from './LeuElement-
|
|
6
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
7
7
|
import { LeuIcon } from './Icon.js';
|
|
8
8
|
import './_tslib-CNEFicEt.js';
|
|
9
9
|
import 'lit/decorators.js';
|
package/dist/Menu.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
|
+
import { PropertyValues } from 'lit';
|
|
3
4
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
5
|
import { LeuMenuItem } from './MenuItem.js';
|
|
5
6
|
import './Icon.js';
|
|
@@ -42,7 +43,7 @@ declare class LeuMenu extends LeuElement {
|
|
|
42
43
|
setCurrentItem(index: any): any;
|
|
43
44
|
focusItem(index: any): void;
|
|
44
45
|
firstUpdated(): void;
|
|
45
|
-
updated(changedProperties:
|
|
46
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
46
47
|
render(): lit_html.TemplateResult<1>;
|
|
47
48
|
}
|
|
48
49
|
|
package/dist/Menu.js
CHANGED
package/dist/MenuItem.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html, nothing } from 'lit';
|
|
2
2
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
3
|
-
import { L as LeuElement } from './LeuElement-
|
|
3
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
4
4
|
import { LeuIcon } from './Icon.js';
|
|
5
5
|
import './_tslib-CNEFicEt.js';
|
|
6
6
|
import 'lit/decorators.js';
|
package/dist/Message.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
8
8
|
|
package/dist/Pagination.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { live } from 'lit/directives/live.js';
|
|
4
4
|
import { property, state } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { LeuButton } from './Button.js';
|
|
7
7
|
import { LeuVisuallyHidden } from './VisuallyHidden.js';
|
|
8
8
|
import { LeuIcon } from './Icon.js';
|
package/dist/Placeholder.js
CHANGED
package/dist/Popup.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
|
+
import { PropertyValues } from 'lit';
|
|
4
|
+
import { Placement } from '@floating-ui/dom';
|
|
3
5
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
interface VirtualElement {
|
|
8
|
+
getBoundingClientRect: () => DOMRect;
|
|
9
|
+
contextElement?: Element;
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* @tagname leu-popup
|
|
10
13
|
*/
|
|
@@ -18,53 +21,26 @@ declare class LeuPopup extends LeuElement {
|
|
|
18
21
|
customElements?: CustomElementRegistry;
|
|
19
22
|
registry?: CustomElementRegistry;
|
|
20
23
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
reflect: boolean;
|
|
34
|
-
};
|
|
35
|
-
shift: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
reflect: boolean;
|
|
38
|
-
};
|
|
39
|
-
shiftPadding: {
|
|
40
|
-
type: NumberConstructor;
|
|
41
|
-
reflect: boolean;
|
|
42
|
-
};
|
|
43
|
-
matchSize: {
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
reflect: boolean;
|
|
46
|
-
};
|
|
47
|
-
autoSize: {
|
|
48
|
-
type: StringConstructor;
|
|
49
|
-
reflect: boolean;
|
|
50
|
-
};
|
|
51
|
-
autoSizePadding: {
|
|
52
|
-
type: NumberConstructor;
|
|
53
|
-
reflect: boolean;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
constructor();
|
|
24
|
+
anchor: Element | string | VirtualElement;
|
|
25
|
+
active: boolean;
|
|
26
|
+
placement?: Placement;
|
|
27
|
+
flip: boolean;
|
|
28
|
+
shift: boolean;
|
|
29
|
+
shiftPadding: number;
|
|
30
|
+
matchSize?: "width" | "height" | "both";
|
|
31
|
+
autoSize?: "width" | "height" | "both";
|
|
32
|
+
autoSizePadding: number;
|
|
33
|
+
private anchorEl;
|
|
34
|
+
private cleanup;
|
|
57
35
|
disconnectedCallback(): void;
|
|
58
|
-
updated(changedProperties:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
get popupEl(): Element;
|
|
63
|
-
start(): void;
|
|
64
|
-
stop(): void;
|
|
36
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
37
|
+
protected get popupEl(): HTMLDivElement;
|
|
38
|
+
protected start(): void;
|
|
39
|
+
protected stop(): void;
|
|
65
40
|
reposition(): void;
|
|
66
41
|
handleAnchorChange(): void;
|
|
67
42
|
render(): lit_html.TemplateResult<1>;
|
|
68
43
|
}
|
|
69
44
|
|
|
70
45
|
export { LeuPopup };
|
|
46
|
+
export type { VirtualElement };
|
package/dist/Popup.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
1
2
|
import { css, html } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
2
4
|
import { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
|
|
3
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
4
6
|
|
|
5
7
|
var css_248z = css`:host {
|
|
6
8
|
--popup-font-regular: var(--leu-font-family-regular);
|
|
@@ -32,30 +34,23 @@ var css_248z = css`:host {
|
|
|
32
34
|
}
|
|
33
35
|
`;
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
function isVirtualElement(el) {
|
|
38
|
+
return (el !== null &&
|
|
39
|
+
typeof el === "object" &&
|
|
40
|
+
"getBoundingClientRect" in el &&
|
|
41
|
+
("contextElement" in el ? el instanceof Element : true));
|
|
42
|
+
}
|
|
38
43
|
/**
|
|
39
44
|
* @tagname leu-popup
|
|
40
45
|
*/
|
|
41
46
|
class LeuPopup extends LeuElement {
|
|
42
47
|
constructor() {
|
|
43
|
-
super();
|
|
44
|
-
this.
|
|
45
|
-
this.cleanup = undefined;
|
|
48
|
+
super(...arguments);
|
|
49
|
+
this.active = false;
|
|
46
50
|
this.flip = false;
|
|
47
51
|
this.shift = false;
|
|
48
|
-
this.active = false;
|
|
49
|
-
/** @type {Placement} */
|
|
50
|
-
this.placement = undefined;
|
|
51
|
-
/** @type {"width" | "height" | "both"} */
|
|
52
|
-
this.matchSize = undefined;
|
|
53
|
-
/** @type {"width" | "height" | "both"} */
|
|
54
|
-
this.autoSize = undefined;
|
|
55
52
|
this.shiftPadding = 0;
|
|
56
53
|
this.autoSizePadding = 0;
|
|
57
|
-
/** @type {string | HTMLElement} */
|
|
58
|
-
this.anchor = undefined;
|
|
59
54
|
}
|
|
60
55
|
disconnectedCallback() {
|
|
61
56
|
super.disconnectedCallback();
|
|
@@ -77,9 +72,6 @@ class LeuPopup extends LeuElement {
|
|
|
77
72
|
this.reposition();
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
|
-
/**
|
|
81
|
-
* @returns {HTMLElement | null}
|
|
82
|
-
*/
|
|
83
75
|
get popupEl() {
|
|
84
76
|
return this.renderRoot?.querySelector(".popup") ?? null;
|
|
85
77
|
}
|
|
@@ -165,7 +157,8 @@ class LeuPopup extends LeuElement {
|
|
|
165
157
|
const root = this.getRootNode();
|
|
166
158
|
this.anchorEl = root.getElementById(this.anchor);
|
|
167
159
|
}
|
|
168
|
-
else if (this.anchor instanceof HTMLElement
|
|
160
|
+
else if (this.anchor instanceof HTMLElement ||
|
|
161
|
+
isVirtualElement(this.anchor)) {
|
|
169
162
|
this.anchorEl = this.anchor;
|
|
170
163
|
}
|
|
171
164
|
else {
|
|
@@ -192,16 +185,32 @@ LeuPopup.shadowRootOptions = {
|
|
|
192
185
|
...LeuElement.shadowRootOptions,
|
|
193
186
|
delegatesFocus: true,
|
|
194
187
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
188
|
+
__decorate([
|
|
189
|
+
property()
|
|
190
|
+
], LeuPopup.prototype, "anchor", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
property({ type: Boolean, reflect: true })
|
|
193
|
+
], LeuPopup.prototype, "active", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
property({ type: String, reflect: true })
|
|
196
|
+
], LeuPopup.prototype, "placement", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
property({ type: Boolean, reflect: true })
|
|
199
|
+
], LeuPopup.prototype, "flip", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
property({ type: Boolean, reflect: true })
|
|
202
|
+
], LeuPopup.prototype, "shift", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
property({ type: Number, reflect: true })
|
|
205
|
+
], LeuPopup.prototype, "shiftPadding", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
property({ type: String, reflect: true })
|
|
208
|
+
], LeuPopup.prototype, "matchSize", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property({ type: String, reflect: true })
|
|
211
|
+
], LeuPopup.prototype, "autoSize", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
property({ type: Number, reflect: true })
|
|
214
|
+
], LeuPopup.prototype, "autoSizePadding", void 0);
|
|
206
215
|
|
|
207
216
|
export { LeuPopup };
|
package/dist/ProgressBar.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, nothing, html } from 'lit';
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
|
|
7
7
|
var css_248z = css`/* :host {
|
|
8
8
|
--progress-bar-font-regular: var(--leu-font-family-regular);
|
package/dist/Radio.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
--radio-color: var(--leu-color-black-40);
|
package/dist/RadioGroup.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { LeuRadio } from './Radio.js';
|
|
7
7
|
|
|
8
8
|
var css_248z = css`:host {
|
package/dist/Range.js
CHANGED
package/dist/ScrollTop.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html } from 'lit';
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
-
import { L as LeuElement } from './LeuElement-
|
|
3
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
4
4
|
import { LeuButton } from './Button.js';
|
|
5
5
|
import { LeuIcon } from './Icon.js';
|
|
6
6
|
import './_tslib-CNEFicEt.js';
|
package/dist/Select.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
|
-
import { nothing } from 'lit';
|
|
3
|
+
import { PropertyValues, nothing } from 'lit';
|
|
4
4
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
5
5
|
import { H as HasSlotController } from './hasSlotController.d-emXwVXWF.js';
|
|
6
6
|
import { LeuButton } from './Button.js';
|
|
@@ -9,6 +9,7 @@ import { LeuMenuItem } from './MenuItem.js';
|
|
|
9
9
|
import { LeuIcon } from './Icon.js';
|
|
10
10
|
import { LeuInput } from './Input.js';
|
|
11
11
|
import { LeuPopup } from './Popup.js';
|
|
12
|
+
import '@floating-ui/dom';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @tagname leu-select
|
|
@@ -87,7 +88,7 @@ declare class LeuSelect extends LeuElement {
|
|
|
87
88
|
constructor();
|
|
88
89
|
connectedCallback(): void;
|
|
89
90
|
disconnectedCallback(): void;
|
|
90
|
-
updated(changedProperties:
|
|
91
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
91
92
|
/**
|
|
92
93
|
* Apply the current state to the menu items.
|
|
93
94
|
* - Set the active property when the value property has changed.
|
package/dist/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css, nothing, html } from 'lit';
|
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
|
|
7
7
|
import { LeuButton } from './Button.js';
|
|
8
8
|
import { LeuMenu } from './Menu.js';
|
package/dist/Spinner.js
CHANGED
package/dist/Table.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css, html, nothing } from 'lit';
|
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
4
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
|
8
8
|
import './_tslib-CNEFicEt.js';
|
package/dist/Tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-C1c3TgrG.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
/* --tag-font-regular: var(--leu-font-family-regular);
|