@statistikzh/leu 0.21.0 → 0.22.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 +4 -0
- package/dist/Dropdown.js +4 -1
- package/dist/FileInput.js +2 -2
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-BFljD2fO.js → LeuElement-BooZrClI.js} +1 -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.js +1 -1
- 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.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.js +97 -3
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +4 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +1 -1
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/index.js +2 -2
- 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.js +1 -1
- package/dist/leu-file-input.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-message.js +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.js +1 -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.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +2 -2
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/styleMap.d.ts +61 -0
- package/dist/lib/styleMap.d.ts.map +1 -0
- package/dist/vscode.html-custom-data.json +13 -12
- package/dist/vue/index.d.ts +22 -20
- package/dist/web-types.json +33 -28
- package/package.json +1 -1
- package/src/components/dropdown/Dropdown.ts +3 -0
- package/src/components/dropdown/stories/dropdown.stories.ts +6 -2
- package/src/components/dropdown/test/dropdown.test.ts +14 -2
- package/src/components/table/Table.ts +1 -1
- package/src/lib/styleMap.ts +139 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.22.0](https://github.com/statistikZH/leu/compare/leu-v0.21.1...leu-v0.22.0) (2025-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **dropdown:** add inverted property so that the dropdown can be used on a dark barkground ([a0ee49c](https://github.com/statistikZH/leu/commit/a0ee49c06518563d2ff69fa1e3dfe8781b97cc28))
|
|
9
|
+
|
|
10
|
+
## [0.21.1](https://github.com/statistikZH/leu/compare/leu-v0.21.0...leu-v0.21.1) (2025-11-17)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* use custom implementation of the styleMap directive to be compatible with strict CSPs ([3a9a4d4](https://github.com/statistikZH/leu/commit/3a9a4d4a0685791ba35f4799b89c95e0f53eb037))
|
|
16
|
+
|
|
3
17
|
## [0.21.0](https://github.com/statistikZH/leu/compare/leu-v0.20.0...leu-v0.21.0) (2025-11-13)
|
|
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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.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';
|
|
@@ -63,6 +63,7 @@ class LeuDropdown extends LeuElement {
|
|
|
63
63
|
};
|
|
64
64
|
this.label = "";
|
|
65
65
|
this.expanded = false;
|
|
66
|
+
this.inverted = false;
|
|
66
67
|
/** @type {import("lit/directives/ref").Ref<HTMLButtonElement>} */
|
|
67
68
|
this._toggleRef = createRef();
|
|
68
69
|
}
|
|
@@ -128,6 +129,7 @@ class LeuDropdown extends LeuElement {
|
|
|
128
129
|
variant="ghost"
|
|
129
130
|
expanded=${this.expanded ? "true" : "false"}
|
|
130
131
|
?active=${this.expanded}
|
|
132
|
+
?inverted=${this.inverted}
|
|
131
133
|
@click=${this._handleToggleClick}
|
|
132
134
|
@keydown=${this._keyDownToggleHandler}
|
|
133
135
|
>
|
|
@@ -151,6 +153,7 @@ LeuDropdown.styles = [LeuElement.styles, css_248z];
|
|
|
151
153
|
LeuDropdown.properties = {
|
|
152
154
|
label: { type: String, reflect: true },
|
|
153
155
|
expanded: { type: Boolean, reflect: true },
|
|
156
|
+
inverted: { type: Boolean, reflect: true },
|
|
154
157
|
};
|
|
155
158
|
|
|
156
159
|
export { LeuDropdown };
|
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-BooZrClI.js';
|
|
7
7
|
import './Accordion.js';
|
|
8
8
|
import { LeuButton } from './Button.js';
|
|
9
9
|
import './ButtonGroup.js';
|
|
@@ -34,7 +34,7 @@ import './Chip.js';
|
|
|
34
34
|
import 'lit/directives/ref.js';
|
|
35
35
|
import '@floating-ui/dom';
|
|
36
36
|
import 'lit/directives/live.js';
|
|
37
|
-
import 'lit/
|
|
37
|
+
import 'lit/directive.js';
|
|
38
38
|
|
|
39
39
|
var css_248z = css`:host {
|
|
40
40
|
--file-input-font-regular: var(--leu-font-family-regular);
|
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-BooZrClI.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-BooZrClI.js';
|
|
7
7
|
import { LeuIcon } from './Icon.js';
|
|
8
8
|
import './_tslib-CNEFicEt.js';
|
|
9
9
|
import 'lit/decorators.js';
|
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-BooZrClI.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-BooZrClI.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-BooZrClI.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.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-BooZrClI.js';
|
|
6
6
|
|
|
7
7
|
var css_248z = css`:host {
|
|
8
8
|
--popup-font-regular: var(--leu-font-family-regular);
|
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-BooZrClI.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-BooZrClI.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-BooZrClI.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-BooZrClI.js';
|
|
4
4
|
import { LeuButton } from './Button.js';
|
|
5
5
|
import { LeuIcon } from './Icon.js';
|
|
6
6
|
import './_tslib-CNEFicEt.js';
|
package/dist/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css, nothing, html } from 'lit';
|
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
5
|
+
import { L as LeuElement } from './LeuElement-BooZrClI.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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css, html
|
|
1
|
+
import { nothing, noChange, css, html } from 'lit';
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
3
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-BooZrClI.js';
|
|
5
|
+
import { directive, Directive, PartType } from 'lit/directive.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
|
8
8
|
import './_tslib-CNEFicEt.js';
|
|
@@ -13,6 +13,100 @@ import 'lit/directives/if-defined.js';
|
|
|
13
13
|
import './hasSlotController-Bm2tipvG.js';
|
|
14
14
|
import './VisuallyHidden.js';
|
|
15
15
|
|
|
16
|
+
/* eslint-disable prefer-template,no-param-reassign,no-restricted-syntax,guard-for-in */
|
|
17
|
+
/**
|
|
18
|
+
* The original lit styleMap directive is not compatible with a strict style-src content security policy.
|
|
19
|
+
* There is an an open issue about this in the lit repository:
|
|
20
|
+
* https://github.com/lit/lit/issues/4719
|
|
21
|
+
*
|
|
22
|
+
* This file contains a custom implementation of the styleMap directive that bypasses
|
|
23
|
+
* the render method and directly updates the styles using the .style.setProperty and
|
|
24
|
+
* .style.removeProperty methods.
|
|
25
|
+
*
|
|
26
|
+
* In the original implementation, the render method returns a string that is set as the
|
|
27
|
+
* value of the style attribute. This approach is blocked by strict CSPs that disallow
|
|
28
|
+
* inline styles.
|
|
29
|
+
*
|
|
30
|
+
* As we don't support SSR in this library, we can safely skip the render method.
|
|
31
|
+
*/
|
|
32
|
+
const important = "important";
|
|
33
|
+
// The leading space is important
|
|
34
|
+
const importantFlag = " !" + important;
|
|
35
|
+
// How many characters to remove from a value, as a negative number
|
|
36
|
+
const flagTrim = 0 - importantFlag.length;
|
|
37
|
+
class StyleMapDirective extends Directive {
|
|
38
|
+
constructor(partInfo) {
|
|
39
|
+
super(partInfo);
|
|
40
|
+
if (partInfo.type !== PartType.ATTRIBUTE ||
|
|
41
|
+
partInfo.name !== "style" ||
|
|
42
|
+
partInfo.strings?.length > 2) {
|
|
43
|
+
throw new Error("The `styleMap` directive must be used in the `style` attribute " +
|
|
44
|
+
"and must be the only part in the attribute.");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
render(_styleInfo) {
|
|
48
|
+
return nothing;
|
|
49
|
+
}
|
|
50
|
+
update(part, [styleInfo]) {
|
|
51
|
+
const { style } = part.element;
|
|
52
|
+
if (this._previousStyleProperties === undefined) {
|
|
53
|
+
this._previousStyleProperties = new Set(Object.keys(styleInfo));
|
|
54
|
+
}
|
|
55
|
+
// Remove old properties that no longer exist in styleInfo
|
|
56
|
+
for (const name of this._previousStyleProperties) {
|
|
57
|
+
// If the name isn't in styleInfo or it's null/undefined
|
|
58
|
+
if (styleInfo[name] == null) {
|
|
59
|
+
this._previousStyleProperties.delete(name);
|
|
60
|
+
if (name.includes("-")) {
|
|
61
|
+
style.removeProperty(name);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
style[name] = null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Add or update properties
|
|
69
|
+
for (const name in styleInfo) {
|
|
70
|
+
const value = styleInfo[name];
|
|
71
|
+
if (value != null) {
|
|
72
|
+
this._previousStyleProperties.add(name);
|
|
73
|
+
const isImportant = typeof value === "string" && value.endsWith(importantFlag);
|
|
74
|
+
if (name.includes("-") || isImportant) {
|
|
75
|
+
style.setProperty(name, isImportant
|
|
76
|
+
? value.slice(0, flagTrim)
|
|
77
|
+
: value, isImportant ? important : "");
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
style[name] = value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return noChange;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* !A custom implementation of lit's `styleMap` directive!
|
|
89
|
+
* A directive that applies CSS properties to an element.
|
|
90
|
+
*
|
|
91
|
+
* `styleMap` can only be used in the `style` attribute and must be the only
|
|
92
|
+
* expression in the attribute. It takes the property names in the
|
|
93
|
+
* {@link StyleInfo styleInfo} object and adds the properties to the inline
|
|
94
|
+
* style of the element.
|
|
95
|
+
*
|
|
96
|
+
* Property names with dashes (`-`) are assumed to be valid CSS
|
|
97
|
+
* property names and set on the element's style object using `setProperty()`.
|
|
98
|
+
* Names without dashes are assumed to be camelCased JavaScript property names
|
|
99
|
+
* and set on the element's style object using property assignment, allowing the
|
|
100
|
+
* style object to translate JavaScript-style names to CSS property names.
|
|
101
|
+
*
|
|
102
|
+
* For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':
|
|
103
|
+
* '0'})` sets the `background-color`, `border-top` and `--size` properties.
|
|
104
|
+
*
|
|
105
|
+
* @param styleInfo
|
|
106
|
+
* @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}
|
|
107
|
+
*/
|
|
108
|
+
const styleMap = directive(StyleMapDirective);
|
|
109
|
+
|
|
16
110
|
var css_248z = css`:host {
|
|
17
111
|
position: relative;
|
|
18
112
|
display: block;
|
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-BooZrClI.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
/* --tag-font-regular: var(--leu-font-family-regular);
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAI5C;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAI5C;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU;;;;;;;;;;;;;MAIhB;IAED,iBAAiB,oBAAwC;;IAazD,iBAAiB;IAWjB,oBAAoB;IAWpB,qBAAqB,uBAIpB;IAED,aAAa,CAAC,KAAK,KAAA;IAMb,qBAAqB,CAAC,KAAK,KAAA;IAiBjC,qBAAqB,mBAKpB;IAED;;;;OAIG;IACH,mBAAmB,mBAMlB;IAED,kBAAkB;IAIlB;;OAEG;IACH,QAAQ;IAIR,MAAM;CA+BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/stories/dropdown.stories.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,wBAAwB,CAAA;AAI/B;;GAEG;;;;;;;;;;;;;;;;;AACH,wBAeC;
|
|
1
|
+
{"version":3,"file":"dropdown.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/stories/dropdown.stories.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,wBAAwB,CAAA;AAI/B;;GAEG;;;;;;;;;;;;;;;;;AACH,wBAeC;AAwBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAMxC,eAAO,MAAM,WAAW,KAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAI3D;;GAEG;AACH,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,YAAY;;;MAGlB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYhB;;IAkCD,oBAAoB;IAIpB,wBAAwB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,MAAM,KAAA;IAQ7C,YAAY;IAMZ,YAAY,CAAC,MAAM,KAAA;IAMnB,WAAW,CAAC,KAAK,KAAA;IAIjB,iBAAiB;IAUjB,QAAQ,CAAC,GAAG,KAAA;IAIZ,SAAS,CAAC,GAAG,KAAA;IAUb,aAAa;IAMb,IAAI,QAAQ,QAEX;IAED,IAAI,WAAW,QAMd;IAED,IAAI,KAAK,QAOR;IAED,MAAM;CAyGP"}
|
package/dist/index.js
CHANGED
|
@@ -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
|
-
export { L as LeuElement } from './LeuElement-
|
|
21
|
+
export { L as LeuElement } from './LeuElement-BooZrClI.js';
|
|
22
22
|
import './_tslib-CNEFicEt.js';
|
|
23
23
|
import 'lit';
|
|
24
24
|
import 'lit/static-html.js';
|
|
@@ -33,4 +33,4 @@ import 'lit/directives/ref.js';
|
|
|
33
33
|
import 'lit/directives/live.js';
|
|
34
34
|
import './VisuallyHidden.js';
|
|
35
35
|
import '@floating-ui/dom';
|
|
36
|
-
import 'lit/
|
|
36
|
+
import 'lit/directive.js';
|
package/dist/leu-accordion.js
CHANGED
package/dist/leu-button-group.js
CHANGED
package/dist/leu-button.js
CHANGED
|
@@ -5,7 +5,7 @@ import 'lit/directives/class-map.js';
|
|
|
5
5
|
import 'lit/directives/if-defined.js';
|
|
6
6
|
import 'lit/decorators.js';
|
|
7
7
|
import './Icon.js';
|
|
8
|
-
import './LeuElement-
|
|
8
|
+
import './LeuElement-BooZrClI.js';
|
|
9
9
|
import './hasSlotController-Bm2tipvG.js';
|
|
10
10
|
|
|
11
11
|
LeuButton.define("leu-button");
|
|
@@ -2,7 +2,7 @@ import { LeuChartWrapper } from './ChartWrapper.js';
|
|
|
2
2
|
import './_tslib-CNEFicEt.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/decorators.js';
|
|
5
|
-
import './LeuElement-
|
|
5
|
+
import './LeuElement-BooZrClI.js';
|
|
6
6
|
import './hasSlotController-Bm2tipvG.js';
|
|
7
7
|
import './Spinner.js';
|
|
8
8
|
|
package/dist/leu-checkbox.js
CHANGED
package/dist/leu-chip-group.js
CHANGED
package/dist/leu-chip-link.js
CHANGED