@statistikzh/leu 0.14.4 → 0.15.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 +8 -0
- package/dist/Accordion.js +2 -30
- package/dist/Button.d.ts +56 -68
- package/dist/Button.js +74 -52
- package/dist/ButtonGroup.d.ts +9 -9
- package/dist/ButtonGroup.js +30 -20
- package/dist/ChartWrapper.d.ts +38 -0
- package/dist/ChartWrapper.js +153 -0
- package/dist/Checkbox.d.ts +6 -21
- package/dist/Checkbox.js +17 -9
- package/dist/CheckboxGroup.d.ts +13 -14
- package/dist/CheckboxGroup.js +18 -11
- 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.js +3 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-x8UlIDDl.js → LeuElement-BhAmogDy.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Pagination.d.ts +40 -28
- package/dist/Pagination.js +39 -14
- package/dist/Placeholder.d.ts +27 -0
- package/dist/Placeholder.js +90 -0
- package/dist/Popup.js +1 -1
- package/dist/Radio.d.ts +6 -21
- package/dist/Radio.js +17 -9
- package/dist/RadioGroup.d.ts +28 -23
- package/dist/RadioGroup.js +29 -16
- package/dist/Range.js +1 -1
- package/dist/ScrollTop.d.ts +0 -1
- package/dist/ScrollTop.js +3 -1
- package/dist/Select.js +3 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.d.ts +0 -1
- package/dist/Table.js +3 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/_tslib-CNEFicEt.js +30 -0
- package/dist/components/button/Button.d.ts +55 -67
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/stories/button.stories.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +9 -9
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +6 -21
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts +13 -14
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/icon/stories/icon.stories.d.ts +10 -0
- package/dist/components/icon/stories/icon.stories.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +40 -27
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/stories/pagination.stories.d.ts +10 -2
- package/dist/components/pagination/stories/pagination.stories.d.ts.map +1 -1
- package/dist/components/placeholder/Placeholder.d.ts +23 -0
- package/dist/components/placeholder/Placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/leu-placeholder.d.ts +3 -0
- package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts +27 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +1 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts +2 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts.map +1 -0
- package/dist/components/radio/Radio.d.ts +6 -21
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.d.ts +28 -23
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/visualization/ChartWrapper.d.ts +34 -0
- package/dist/components/visualization/ChartWrapper.d.ts.map +1 -0
- package/dist/components/visualization/leu-chart-wrapper.d.ts +3 -0
- package/dist/components/visualization/leu-chart-wrapper.d.ts.map +1 -0
- package/dist/components/visualization/stories/chart-wrapper.stories.d.ts +28 -0
- package/dist/components/visualization/stories/chart-wrapper.stories.d.ts.map +1 -0
- package/dist/components/visualization/test/chart-wrapper.test.d.ts +2 -0
- package/dist/components/visualization/test/chart-wrapper.test.d.ts.map +1 -0
- package/dist/index.js +3 -2
- package/dist/leu-accordion.js +2 -1
- package/dist/leu-button-group.js +8 -1
- package/dist/leu-button.d.ts +0 -1
- package/dist/leu-button.js +3 -1
- package/dist/leu-chart-wrapper.d.ts +6 -0
- package/dist/leu-chart-wrapper.js +11 -0
- package/dist/leu-checkbox-group.js +5 -1
- package/dist/leu-checkbox.js +3 -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 +3 -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-pagination.d.ts +0 -1
- package/dist/leu-pagination.js +3 -1
- package/dist/leu-placeholder.d.ts +4 -0
- package/dist/leu-placeholder.js +7 -0
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +4 -1
- package/dist/leu-radio.js +3 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.d.ts +0 -1
- package/dist/leu-scroll-top.js +3 -1
- package/dist/leu-select.js +3 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.d.ts +0 -1
- package/dist/leu-table.js +3 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/a11y.d.ts +2 -2
- package/dist/vscode.html-custom-data.json +92 -22
- package/dist/vue/index.d.ts +78 -38
- package/dist/web-types.json +208 -66
- package/package.json +1 -1
- package/release-please-config.json +0 -2
- package/scripts/generate-component/templates/stories/[name].stories.ts +17 -4
- package/src/components/button/Button.ts +95 -79
- package/src/components/button/stories/button.stories.ts +5 -6
- package/src/components/button-group/ButtonGroup.ts +18 -13
- package/src/components/checkbox/Checkbox.ts +13 -15
- package/src/components/checkbox/CheckboxGroup.ts +20 -16
- package/src/components/icon/stories/icon.stories.ts +27 -0
- package/src/components/pagination/Pagination.ts +45 -32
- package/src/components/pagination/stories/pagination.stories.ts +28 -17
- package/src/components/placeholder/Placeholder.ts +33 -0
- package/src/components/placeholder/leu-placeholder.ts +5 -0
- package/src/components/placeholder/placeholder.css +59 -0
- package/src/components/placeholder/stories/placeholder.stories.ts +34 -0
- package/src/components/placeholder/test/placeholder.test.ts +31 -0
- package/src/components/radio/Radio.ts +13 -15
- package/src/components/radio/RadioGroup.ts +42 -28
- package/src/components/visualization/ChartWrapper.ts +75 -0
- package/src/components/visualization/chart-wrapper.css +78 -0
- package/src/components/visualization/leu-chart-wrapper.ts +5 -0
- package/src/components/visualization/stories/chart-wrapper.stories.ts +52 -0
- package/src/components/visualization/test/chart-wrapper.test.ts +74 -0
- package/src/lib/a11y.ts +2 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { css, html } from 'lit';
|
|
2
|
+
import { L as LeuElement } from './LeuElement-BhAmogDy.js';
|
|
3
|
+
|
|
4
|
+
var css_248z = css`:host {
|
|
5
|
+
--placeholder-font-regular: var(--leu-font-family-regular);
|
|
6
|
+
--placeholder-font-black: var(--leu-font-family-black);
|
|
7
|
+
|
|
8
|
+
--placeholder-border-color: var(--leu-color-black-20);
|
|
9
|
+
|
|
10
|
+
font-family: var(--placeholder-font-regular);
|
|
11
|
+
}
|
|
12
|
+
.placeholder {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
text-align: center;
|
|
17
|
+
|
|
18
|
+
border: 2px dashed var(--placeholder-border-color);
|
|
19
|
+
border-radius: 0.25rem;
|
|
20
|
+
|
|
21
|
+
padding: 2rem 1.5rem;
|
|
22
|
+
}
|
|
23
|
+
@media (min-width: 600px) {
|
|
24
|
+
.placeholder {
|
|
25
|
+
padding: 2.5rem 2rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
@media (min-width: 1280px) {
|
|
29
|
+
.placeholder {
|
|
30
|
+
padding: 3.5rem 2.5rem;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.placeholder__title {
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
.placeholder__title::slotted(:where(h1, h2, h3, h4, h5, h6)) {
|
|
37
|
+
font: var(--leu-t-curve-regular-black-font);
|
|
38
|
+
color: var(--leu-color-black-100);
|
|
39
|
+
margin: 0 0 0.5rem;
|
|
40
|
+
}
|
|
41
|
+
.placeholder__description {
|
|
42
|
+
font: var(--leu-t-curve-small-regular-font);
|
|
43
|
+
color: var(--leu-color-black-60);
|
|
44
|
+
|
|
45
|
+
margin-bottom: 0.75rem;
|
|
46
|
+
}
|
|
47
|
+
@media (min-width: 400px) {
|
|
48
|
+
.placeholder__description {
|
|
49
|
+
margin-bottom: 2rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
@media (min-width: 600px) {
|
|
53
|
+
.placeholder__description {
|
|
54
|
+
margin-bottom: 1.25rem;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
@media (min-width: 1280px) {
|
|
58
|
+
.placeholder__description {
|
|
59
|
+
margin-bottom: 1.5rem;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @summary * A placeholder to display when no content is available.
|
|
66
|
+
* @tagname leu-placeholder
|
|
67
|
+
* @slot title - The placeholders title. Use a heading tag (h1-6) depeneding on your context.
|
|
68
|
+
* @slot description - A description of the placeholder. Content is wrapped in a `<p>` tag by the component.
|
|
69
|
+
* @slot cta - A call to action button like "Reload" or "Create". Add a single `<leu-button>`.
|
|
70
|
+
*
|
|
71
|
+
* @todo Add pending state with a skeleton.
|
|
72
|
+
*/
|
|
73
|
+
class LeuPlaceholder extends LeuElement {
|
|
74
|
+
render() {
|
|
75
|
+
return html `
|
|
76
|
+
<div class="placeholder">
|
|
77
|
+
<slot class="placeholder__title" name="title"></slot>
|
|
78
|
+
<p><slot class="placeholder__description" name="description"></slot></p>
|
|
79
|
+
<slot name="cta"></slot>
|
|
80
|
+
</div>
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
LeuPlaceholder.styles = [LeuElement.styles, css_248z];
|
|
85
|
+
LeuPlaceholder.shadowRootOptions = {
|
|
86
|
+
...LeuElement.shadowRootOptions,
|
|
87
|
+
delegatesFocus: true,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export { LeuPlaceholder };
|
package/dist/Popup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html } from 'lit';
|
|
2
2
|
import { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
|
|
3
|
-
import { L as LeuElement } from './LeuElement-
|
|
3
|
+
import { L as LeuElement } from './LeuElement-BhAmogDy.js';
|
|
4
4
|
|
|
5
5
|
var css_248z = css`:host {
|
|
6
6
|
--popup-font-regular: var(--leu-font-family-regular);
|
package/dist/Radio.d.ts
CHANGED
|
@@ -16,27 +16,12 @@ declare class LeuRadio extends LeuElement {
|
|
|
16
16
|
customElements?: CustomElementRegistry;
|
|
17
17
|
registry?: CustomElementRegistry;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
reflect: boolean;
|
|
27
|
-
};
|
|
28
|
-
value: {
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
reflect: boolean;
|
|
31
|
-
};
|
|
32
|
-
name: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
reflect: boolean;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
constructor();
|
|
38
|
-
handleChange(event: any): void;
|
|
39
|
-
handleInput(event: any): void;
|
|
19
|
+
checked: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
value: string;
|
|
22
|
+
name: string;
|
|
23
|
+
private handleChange;
|
|
24
|
+
private handleInput;
|
|
40
25
|
render(): lit_html.TemplateResult<1>;
|
|
41
26
|
}
|
|
42
27
|
|
package/dist/Radio.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
1
2
|
import { css, html } from 'lit';
|
|
2
|
-
import {
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import { L as LeuElement } from './LeuElement-BhAmogDy.js';
|
|
3
5
|
|
|
4
6
|
var css_248z = css`:host {
|
|
5
7
|
--radio-color: var(--leu-color-black-40);
|
|
@@ -97,11 +99,11 @@ var css_248z = css`:host {
|
|
|
97
99
|
*/
|
|
98
100
|
class LeuRadio extends LeuElement {
|
|
99
101
|
constructor() {
|
|
100
|
-
super();
|
|
102
|
+
super(...arguments);
|
|
101
103
|
this.checked = false;
|
|
102
104
|
this.disabled = false;
|
|
103
|
-
this.name = "";
|
|
104
105
|
this.value = "";
|
|
106
|
+
this.name = "";
|
|
105
107
|
}
|
|
106
108
|
handleChange(event) {
|
|
107
109
|
this.checked = event.target.checked;
|
|
@@ -134,11 +136,17 @@ LeuRadio.shadowRootOptions = {
|
|
|
134
136
|
...LeuElement.shadowRootOptions,
|
|
135
137
|
delegatesFocus: true,
|
|
136
138
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
__decorate([
|
|
140
|
+
property({ type: Boolean, reflect: true })
|
|
141
|
+
], LeuRadio.prototype, "checked", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
property({ type: Boolean, reflect: true })
|
|
144
|
+
], LeuRadio.prototype, "disabled", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
property({ type: String, reflect: true })
|
|
147
|
+
], LeuRadio.prototype, "value", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
property({ type: String, reflect: true })
|
|
150
|
+
], LeuRadio.prototype, "name", void 0);
|
|
143
151
|
|
|
144
152
|
export { LeuRadio };
|
package/dist/RadioGroup.d.ts
CHANGED
|
@@ -3,35 +3,40 @@ import * as lit from 'lit';
|
|
|
3
3
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* @summary Handles a group of radio buttons, allowing only one to be selected at a time. It provides keyboard navigation and manages focus within the group.
|
|
7
|
+
* @slot - Place the radio buttons inside the default slot.
|
|
6
8
|
* @tagname leu-radio-group
|
|
7
9
|
*/
|
|
8
10
|
declare class LeuRadioGroup extends LeuElement {
|
|
9
11
|
static styles: lit.CSSResultGroup[];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Defines how the radio buttons should be aligned.
|
|
14
|
+
*/
|
|
15
|
+
orientation: "horizontal" | "vertical";
|
|
16
|
+
/**
|
|
17
|
+
* The label of the radio group
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Index of the radio button that would be focused
|
|
22
|
+
* when the focus moves into the group.
|
|
23
|
+
*/
|
|
24
|
+
private currentIndex;
|
|
25
|
+
private items;
|
|
26
|
+
get value(): string;
|
|
22
27
|
connectedCallback(): void;
|
|
23
28
|
disconnectedCallback(): void;
|
|
24
|
-
addEventListeners
|
|
25
|
-
removeEventListeners
|
|
26
|
-
handleSlotChange
|
|
27
|
-
handleFocusIn
|
|
28
|
-
handleKeyDown
|
|
29
|
-
handleInput
|
|
30
|
-
selectItem
|
|
31
|
-
selectNextItem
|
|
32
|
-
setTabIndex
|
|
33
|
-
handleItems
|
|
34
|
-
initializeIndex
|
|
29
|
+
private addEventListeners;
|
|
30
|
+
private removeEventListeners;
|
|
31
|
+
private handleSlotChange;
|
|
32
|
+
private handleFocusIn;
|
|
33
|
+
private handleKeyDown;
|
|
34
|
+
private handleInput;
|
|
35
|
+
private selectItem;
|
|
36
|
+
private selectNextItem;
|
|
37
|
+
private setTabIndex;
|
|
38
|
+
private handleItems;
|
|
39
|
+
private initializeIndex;
|
|
35
40
|
render(): lit_html.TemplateResult<1>;
|
|
36
41
|
}
|
|
37
42
|
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
1
2
|
import { css, html } from 'lit';
|
|
2
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
-
import {
|
|
4
|
+
import { property } from 'lit/decorators.js';
|
|
5
|
+
import { L as LeuElement } from './LeuElement-BhAmogDy.js';
|
|
6
|
+
import { LeuRadio } from './Radio.js';
|
|
4
7
|
|
|
5
8
|
var css_248z = css`:host {
|
|
6
9
|
--group-font-regular: var(--leu-font-family-regular);
|
|
@@ -34,13 +37,25 @@ var css_248z = css`:host {
|
|
|
34
37
|
`;
|
|
35
38
|
|
|
36
39
|
/**
|
|
40
|
+
* @summary Handles a group of radio buttons, allowing only one to be selected at a time. It provides keyboard navigation and manages focus within the group.
|
|
41
|
+
* @slot - Place the radio buttons inside the default slot.
|
|
37
42
|
* @tagname leu-radio-group
|
|
38
43
|
*/
|
|
39
44
|
class LeuRadioGroup extends LeuElement {
|
|
40
45
|
constructor() {
|
|
41
|
-
super();
|
|
46
|
+
super(...arguments);
|
|
47
|
+
/**
|
|
48
|
+
* Defines how the radio buttons should be aligned.
|
|
49
|
+
*/
|
|
50
|
+
this.orientation = "horizontal";
|
|
51
|
+
/**
|
|
52
|
+
* Index of the radio button that would be focused
|
|
53
|
+
* when the focus moves into the group.
|
|
54
|
+
*/
|
|
55
|
+
this.currentIndex = 0;
|
|
56
|
+
this.items = [];
|
|
42
57
|
this.handleFocusIn = (e) => {
|
|
43
|
-
this.
|
|
58
|
+
this.currentIndex = this.items.indexOf(e.target);
|
|
44
59
|
};
|
|
45
60
|
this.handleKeyDown = (e) => {
|
|
46
61
|
const currentIndex = this.items.indexOf(e.target);
|
|
@@ -67,10 +82,6 @@ class LeuRadioGroup extends LeuElement {
|
|
|
67
82
|
item.checked = item === e.target; // eslint-disable-line no-param-reassign
|
|
68
83
|
});
|
|
69
84
|
};
|
|
70
|
-
/** @type {"horizontal" | "vertical"} */
|
|
71
|
-
this.orientation = "horizontal";
|
|
72
|
-
this._currentIndex = 0;
|
|
73
|
-
this.items = [];
|
|
74
85
|
}
|
|
75
86
|
get value() {
|
|
76
87
|
const checkedValues = this.items
|
|
@@ -130,23 +141,23 @@ class LeuRadioGroup extends LeuElement {
|
|
|
130
141
|
}
|
|
131
142
|
setTabIndex() {
|
|
132
143
|
this.items.forEach((item, index) => {
|
|
133
|
-
if (index === this.
|
|
134
|
-
item.tabIndex =
|
|
144
|
+
if (index === this.currentIndex) {
|
|
145
|
+
item.tabIndex = 0; // eslint-disable-line no-param-reassign
|
|
135
146
|
}
|
|
136
147
|
else {
|
|
137
|
-
item.tabIndex =
|
|
148
|
+
item.tabIndex = -1; // eslint-disable-line no-param-reassign
|
|
138
149
|
}
|
|
139
150
|
});
|
|
140
151
|
}
|
|
141
152
|
handleItems() {
|
|
142
|
-
this.items = Array.from(this.querySelectorAll(":scope > *:not([slot])"));
|
|
153
|
+
this.items = Array.from(this.querySelectorAll(":scope > *:not([slot])")).filter((el) => el instanceof LeuRadio);
|
|
143
154
|
this.initializeIndex();
|
|
144
155
|
this.setTabIndex();
|
|
145
156
|
}
|
|
146
157
|
initializeIndex() {
|
|
147
158
|
const index = this.items.findIndex((item) => item.hasAttribute("checked") && !item.hasAttribute("disabled"));
|
|
148
159
|
const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute("disabled"));
|
|
149
|
-
this.
|
|
160
|
+
this.currentIndex = index >= 0 ? index : nextEnabledIndex;
|
|
150
161
|
}
|
|
151
162
|
render() {
|
|
152
163
|
const fieldsetClasses = {
|
|
@@ -162,9 +173,11 @@ class LeuRadioGroup extends LeuElement {
|
|
|
162
173
|
}
|
|
163
174
|
}
|
|
164
175
|
LeuRadioGroup.styles = [LeuElement.styles, css_248z];
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
__decorate([
|
|
177
|
+
property({ type: String, reflect: true })
|
|
178
|
+
], LeuRadioGroup.prototype, "orientation", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
property({ type: String, reflect: true })
|
|
181
|
+
], LeuRadioGroup.prototype, "label", void 0);
|
|
169
182
|
|
|
170
183
|
export { LeuRadioGroup };
|
package/dist/Range.js
CHANGED
package/dist/ScrollTop.d.ts
CHANGED
package/dist/ScrollTop.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
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-BhAmogDy.js';
|
|
4
4
|
import { LeuButton } from './Button.js';
|
|
5
5
|
import { LeuIcon } from './Icon.js';
|
|
6
|
+
import './_tslib-CNEFicEt.js';
|
|
6
7
|
import 'lit/directives/if-defined.js';
|
|
8
|
+
import 'lit/decorators.js';
|
|
7
9
|
import './hasSlotController-Bm2tipvG.js';
|
|
8
10
|
|
|
9
11
|
/**
|
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-BhAmogDy.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';
|
|
@@ -10,6 +10,8 @@ import { LeuMenuItem } from './MenuItem.js';
|
|
|
10
10
|
import { LeuIcon } from './Icon.js';
|
|
11
11
|
import { LeuInput } from './Input.js';
|
|
12
12
|
import { LeuPopup } from './Popup.js';
|
|
13
|
+
import './_tslib-CNEFicEt.js';
|
|
14
|
+
import 'lit/decorators.js';
|
|
13
15
|
import 'lit/directives/live.js';
|
|
14
16
|
import '@floating-ui/dom';
|
|
15
17
|
|
package/dist/Spinner.js
CHANGED
package/dist/Table.d.ts
CHANGED
package/dist/Table.js
CHANGED
|
@@ -2,10 +2,12 @@ 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-BhAmogDy.js';
|
|
6
6
|
import { LeuIcon } from './Icon.js';
|
|
7
7
|
import { LeuPagination } from './Pagination.js';
|
|
8
|
+
import './_tslib-CNEFicEt.js';
|
|
8
9
|
import 'lit/directives/live.js';
|
|
10
|
+
import 'lit/decorators.js';
|
|
9
11
|
import './Button.js';
|
|
10
12
|
import 'lit/directives/if-defined.js';
|
|
11
13
|
import './hasSlotController-Bm2tipvG.js';
|
package/dist/VisuallyHidden.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __decorate(decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
26
|
+
var e = new Error(message);
|
|
27
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { __decorate as _ };
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import { nothing } from "lit";
|
|
2
1
|
import { LeuIcon } from "../icon/Icon.js";
|
|
3
2
|
import { LeuElement } from "../../lib/LeuElement.js";
|
|
4
|
-
import { HasSlotController } from "../../lib/hasSlotController.js";
|
|
5
|
-
declare const BUTTON_VARIANTS: string[];
|
|
6
|
-
export { BUTTON_VARIANTS };
|
|
7
|
-
declare const BUTTON_SIZES: string[];
|
|
8
|
-
export { BUTTON_SIZES };
|
|
9
|
-
declare const BUTTON_TYPES: string[];
|
|
10
|
-
export { BUTTON_TYPES };
|
|
11
|
-
export declare const BUTTON_EXPANDED_OPTIONS: string[];
|
|
12
3
|
/**
|
|
13
4
|
* @tagname leu-button
|
|
14
5
|
* @slot before - The icon to display before the label
|
|
15
6
|
* @slot after - The icon to display after the label
|
|
16
7
|
* @slot - The label of the button or the icon if no label is set
|
|
8
|
+
* @see https://www.figma.com/file/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?type=design&node-id=4-1444&mode=design&t=xu5Vii8jXKKCKDez-0
|
|
17
9
|
*/
|
|
18
10
|
export declare class LeuButton extends LeuElement {
|
|
19
11
|
static dependencies: {
|
|
20
12
|
"leu-icon": typeof LeuIcon;
|
|
21
13
|
};
|
|
22
14
|
static styles: import("lit").CSSResultGroup[];
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
15
|
static shadowRootOptions: {
|
|
27
16
|
delegatesFocus: boolean;
|
|
28
17
|
mode: ShadowRootMode;
|
|
@@ -31,63 +20,62 @@ export declare class LeuButton extends LeuElement {
|
|
|
31
20
|
customElements?: CustomElementRegistry;
|
|
32
21
|
registry?: CustomElementRegistry;
|
|
33
22
|
};
|
|
23
|
+
private hasSlotController;
|
|
34
24
|
/**
|
|
35
|
-
*
|
|
25
|
+
* `aria-label` of the underlying button elements.
|
|
26
|
+
* Use it to provide a label when only an icon is visible.
|
|
36
27
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
renderExpandingIcon
|
|
86
|
-
getAriaAttributes
|
|
87
|
-
|
|
88
|
-
label: any;
|
|
89
|
-
};
|
|
90
|
-
hasTextContent(): boolean;
|
|
28
|
+
label: null | string;
|
|
29
|
+
/**
|
|
30
|
+
* The size of the button.
|
|
31
|
+
*/
|
|
32
|
+
size: "regular" | "small";
|
|
33
|
+
/**
|
|
34
|
+
* The visual variant of the button.
|
|
35
|
+
*/
|
|
36
|
+
variant: "primary" | "secondary" | "ghost";
|
|
37
|
+
/**
|
|
38
|
+
* The `type` of the underlying button element.
|
|
39
|
+
*/
|
|
40
|
+
type: "button" | "submit" | "reset";
|
|
41
|
+
/**
|
|
42
|
+
* The `role` of the underlying button element.
|
|
43
|
+
*/
|
|
44
|
+
componentRole?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the button is disabled or not.
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
*/
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the button should be round.
|
|
52
|
+
* Can only be applied when the button contains an icon without a visible label.
|
|
53
|
+
* @type {boolean}
|
|
54
|
+
*/
|
|
55
|
+
round: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the button is active or not.
|
|
58
|
+
* Depending on the `componentRole`, it applies `aria-checked` or `aria-selected` to the underlying button element.
|
|
59
|
+
*/
|
|
60
|
+
active: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Wheter the colors should be inverted. For use on dark backgrounds.
|
|
63
|
+
*/
|
|
64
|
+
inverted: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the button is expanded or not.
|
|
67
|
+
* Only has an effect on the variant `ghost` to show an expanding icon.
|
|
68
|
+
* If the property is not set, the icon will not be shown.
|
|
69
|
+
* If it is set, the icon will either show an expanded or collapsed state.
|
|
70
|
+
*/
|
|
71
|
+
expanded?: "true" | "false";
|
|
72
|
+
/**
|
|
73
|
+
* Alters the shape of the button to be full width of its parent container
|
|
74
|
+
*/
|
|
75
|
+
fluid: boolean;
|
|
76
|
+
private renderExpandingIcon;
|
|
77
|
+
private getAriaAttributes;
|
|
78
|
+
private hasTextContent;
|
|
91
79
|
render(): import("lit-html").TemplateResult<1>;
|
|
92
80
|
}
|
|
93
81
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAMpD;;;;;;GAMG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,OAAO,CAAC,iBAAiB,CAIvB;IAEF;;;OAGG;IAEH,KAAK,EAAE,IAAI,GAAG,MAAM,CAAO;IAE3B;;OAEG;IAEH,IAAI,EAAE,SAAS,GAAG,OAAO,CAAY;IAErC;;OAEG;IAEH,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAY;IAEtD;;OAEG;IAEH,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAW;IAE9C;;OAEG;IAEH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IAEH,QAAQ,EAAE,OAAO,CAAQ;IAEzB;;;;OAIG;IAEH,KAAK,EAAE,OAAO,CAAQ;IAEtB;;;OAGG;IAEH,MAAM,EAAE,OAAO,CAAQ;IAEvB;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAQ;IAEzB;;;;;OAKG;IAEH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAE3B;;OAEG;IAEH,KAAK,EAAE,OAAO,CAAQ;IAEtB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,cAAc;IAOtB,MAAM;CAwCP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/button/stories/button.stories.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAA;AACzB,OAAO,wBAAwB,CAAA;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/button/stories/button.stories.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAA;AACzB,OAAO,wBAAwB,CAAA;;;;;;;;;;;;;;AAY/B,wBAYC;AA8CD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAmQxC,eAAO,MAAM,QAAQ,KAA4B,CAAA"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { LeuElement } from "../../lib/LeuElement.js";
|
|
2
2
|
/**
|
|
3
|
+
* A radio input-like button group component.
|
|
4
|
+
* It allows only one button to be active at a time.
|
|
3
5
|
* @tagname leu-button-group
|
|
4
6
|
* @slot - Slot for the buttons
|
|
5
|
-
* @prop {string} value - The value of the currenty selected (active) button
|
|
6
7
|
* @fires input - When the value of the group changes by clicking a button
|
|
7
8
|
*/
|
|
8
9
|
export declare class LeuButtonGroup extends LeuElement {
|
|
9
10
|
static styles: import("lit").CSSResultGroup[];
|
|
10
11
|
private _items;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @returns {string}
|
|
13
|
+
* Retrieves the value or the text content of a given LeuButton element.
|
|
14
14
|
*/
|
|
15
|
-
static getButtonValue
|
|
16
|
-
get value(): any;
|
|
17
|
-
set value(newValue: any);
|
|
18
|
-
_handleSlotChange(): void;
|
|
15
|
+
private static getButtonValue;
|
|
19
16
|
/**
|
|
20
|
-
*
|
|
17
|
+
* The value of the currently selected (active) button
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
get value(): string;
|
|
20
|
+
set value(newValue: string);
|
|
21
|
+
private _handleSlotChange;
|
|
22
|
+
private _handleButtonClick;
|
|
23
23
|
render(): import("lit-html").TemplateResult<1>;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=ButtonGroup.d.ts.map
|