@statistikzh/leu 0.5.1 → 0.6.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/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/CHANGELOG.md +40 -0
- package/dist/Accordion.d.ts +10 -9
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +12 -11
- package/dist/Breadcrumb.d.ts +4 -4
- package/dist/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumb.js +28 -26
- package/dist/{Button-5326c982.d.ts → Button-9692e403.d.ts} +10 -11
- package/dist/Button-9692e403.d.ts.map +1 -0
- package/dist/{Button-5326c982.js → Button-9692e403.js} +57 -67
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +3 -3
- package/dist/ButtonGroup.d.ts +2 -2
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup.js +3 -3
- package/dist/Checkbox.d.ts +4 -3
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +14 -19
- package/dist/CheckboxGroup.d.ts +2 -2
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +4 -6
- package/dist/Chip.d.ts +2 -2
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +6 -13
- package/dist/ChipGroup.d.ts +9 -7
- package/dist/ChipGroup.d.ts.map +1 -1
- package/dist/ChipGroup.js +8 -5
- package/dist/ChipLink.d.ts +2 -1
- package/dist/ChipLink.d.ts.map +1 -1
- package/dist/ChipLink.js +4 -7
- package/dist/ChipRemovable.d.ts +0 -2
- package/dist/ChipRemovable.d.ts.map +1 -1
- package/dist/ChipRemovable.js +8 -11
- package/dist/ChipSelectable.d.ts +9 -1
- package/dist/ChipSelectable.d.ts.map +1 -1
- package/dist/ChipSelectable.js +12 -16
- package/dist/Dropdown.d.ts +9 -5
- package/dist/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown.js +68 -32
- package/dist/Icon.d.ts +20 -0
- package/dist/Icon.d.ts.map +1 -0
- package/dist/{icon-03e86700.js → Icon.js} +61 -32
- package/dist/Input.d.ts +7 -16
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +24 -28
- package/dist/LeuElement-6de6f209.d.ts +7 -0
- package/dist/LeuElement-6de6f209.d.ts.map +1 -0
- package/dist/LeuElement-6de6f209.js +43 -0
- package/dist/Menu.d.ts +24 -2
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +120 -3
- package/dist/MenuItem.d.ts +28 -11
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +110 -63
- package/dist/Pagination.d.ts +10 -3
- package/dist/Pagination.d.ts.map +1 -1
- package/dist/Pagination.js +24 -21
- package/dist/Popup.d.ts +21 -3
- package/dist/Popup.d.ts.map +1 -1
- package/dist/Popup.js +44 -19
- package/dist/Radio.d.ts +4 -2
- package/dist/Radio.d.ts.map +1 -1
- package/dist/Radio.js +9 -16
- package/dist/RadioGroup.d.ts +2 -2
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +4 -6
- package/dist/ScrollTop.d.ts +2 -2
- package/dist/ScrollTop.d.ts.map +1 -1
- package/dist/ScrollTop.js +10 -8
- package/dist/Select.d.ts +75 -37
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +279 -183
- package/dist/Table.d.ts +2 -6
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +17 -18
- package/dist/VisuallyHidden.d.ts +2 -2
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +5 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -14
- package/dist/leu-accordion.d.ts.map +1 -1
- package/dist/leu-accordion.js +2 -3
- package/dist/leu-breadcrumb.d.ts.map +1 -1
- package/dist/leu-breadcrumb.js +4 -10
- package/dist/leu-button-group.d.ts.map +1 -1
- package/dist/leu-button-group.js +2 -3
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.d.ts.map +1 -1
- package/dist/leu-button.js +4 -5
- package/dist/leu-checkbox-group.d.ts.map +1 -1
- package/dist/leu-checkbox-group.js +2 -3
- package/dist/leu-checkbox.d.ts.map +1 -1
- package/dist/leu-checkbox.js +3 -4
- package/dist/leu-chip-group.d.ts.map +1 -1
- package/dist/leu-chip-group.js +2 -3
- package/dist/leu-chip-link.d.ts.map +1 -1
- package/dist/leu-chip-link.js +2 -3
- package/dist/leu-chip-removable.d.ts.map +1 -1
- package/dist/leu-chip-removable.js +3 -4
- package/dist/leu-chip-selectable.d.ts.map +1 -1
- package/dist/leu-chip-selectable.js +2 -3
- package/dist/leu-dropdown.d.ts.map +1 -1
- package/dist/leu-dropdown.js +5 -10
- package/dist/leu-icon.d.ts +3 -0
- package/dist/leu-icon.d.ts.map +1 -0
- package/dist/leu-icon.js +7 -0
- package/dist/leu-input.d.ts.map +1 -1
- package/dist/leu-input.js +3 -4
- package/dist/leu-menu-item.d.ts.map +1 -1
- package/dist/leu-menu-item.js +3 -5
- package/dist/leu-menu.d.ts.map +1 -1
- package/dist/leu-menu.js +5 -3
- package/dist/leu-pagination.d.ts.map +1 -1
- package/dist/leu-pagination.js +4 -7
- package/dist/leu-popup.d.ts.map +1 -1
- package/dist/leu-popup.js +2 -3
- package/dist/leu-radio-group.d.ts.map +1 -1
- package/dist/leu-radio-group.js +2 -3
- package/dist/leu-radio.d.ts.map +1 -1
- package/dist/leu-radio.js +2 -3
- package/dist/leu-scroll-top.d.ts.map +1 -1
- package/dist/leu-scroll-top.js +4 -6
- package/dist/leu-select.d.ts.map +1 -1
- package/dist/leu-select.js +5 -13
- package/dist/leu-table.d.ts.map +1 -1
- package/dist/leu-table.js +4 -8
- package/dist/leu-visually-hidden.d.ts.map +1 -1
- package/dist/leu-visually-hidden.js +2 -3
- package/dist/theme.css +2 -0
- package/dist/vscode.html-custom-data.json +116 -79
- package/dist/vue/index.d.ts +80 -76
- package/dist/web-types.json +405 -270
- package/package.json +9 -12
- package/scripts/generate-component/templates/[Name].js +6 -3
- package/scripts/generate-component/templates/test/[name].test.js +1 -1
- package/src/components/accordion/Accordion.js +13 -10
- package/src/components/accordion/leu-accordion.js +1 -2
- package/src/components/breadcrumb/Breadcrumb.js +31 -18
- package/src/components/breadcrumb/leu-breadcrumb.js +1 -2
- package/src/components/button/Button.js +45 -71
- package/src/components/button/button.css +11 -9
- package/src/components/button/leu-button.js +1 -2
- package/src/components/button/stories/button.stories.js +60 -19
- package/src/components/button/test/button.test.js +26 -63
- package/src/components/button-group/ButtonGroup.js +4 -2
- package/src/components/button-group/leu-button-group.js +1 -2
- package/src/components/checkbox/Checkbox.js +17 -11
- package/src/components/checkbox/CheckboxGroup.js +6 -3
- package/src/components/checkbox/leu-checkbox-group.js +1 -2
- package/src/components/checkbox/leu-checkbox.js +1 -2
- package/src/components/checkbox/stories/checkbox-group.stories.js +10 -26
- package/src/components/checkbox/stories/checkbox.stories.js +2 -7
- package/src/components/checkbox/test/checkbox-group.test.js +6 -21
- package/src/components/checkbox/test/checkbox.test.js +1 -12
- package/src/components/chip/Chip.js +5 -4
- package/src/components/chip/ChipGroup.js +10 -4
- package/src/components/chip/ChipLink.js +3 -7
- package/src/components/chip/ChipRemovable.js +8 -11
- package/src/components/chip/ChipSelectable.js +11 -17
- package/src/components/chip/chip.css +3 -4
- package/src/components/chip/leu-chip-group.js +1 -2
- package/src/components/chip/leu-chip-link.js +1 -2
- package/src/components/chip/leu-chip-removable.js +1 -2
- package/src/components/chip/leu-chip-selectable.js +1 -2
- package/src/components/chip/stories/chip-link.stories.js +3 -5
- package/src/components/chip/stories/chip-removable.stories.js +3 -4
- package/src/components/chip/stories/chip-selectable.stories.js +2 -2
- package/src/components/chip/test/chip-group.test.js +15 -30
- package/src/components/chip/test/chip-link.test.js +2 -6
- package/src/components/chip/test/chip-removable.test.js +4 -10
- package/src/components/chip/test/chip-selectable.test.js +3 -5
- package/src/components/dropdown/Dropdown.js +79 -26
- package/src/components/dropdown/leu-dropdown.js +1 -2
- package/src/components/dropdown/stories/dropdown.stories.js +30 -7
- package/src/components/dropdown/test/dropdown.test.js +5 -5
- package/src/components/icon/Icon.js +55 -0
- package/src/components/icon/icon.css +6 -0
- package/src/components/icon/leu-icon.js +5 -0
- package/src/components/icon/{icon.js → paths.js} +4 -37
- package/src/components/icon/stories/icon.stories.js +47 -0
- package/src/components/icon/test/icon.test.js +23 -40
- package/src/components/input/Input.js +21 -23
- package/src/components/input/input.css +4 -2
- package/src/components/input/leu-input.js +1 -2
- package/src/components/input/stories/input.stories.js +2 -2
- package/src/components/input/test/input.test.js +2 -0
- package/src/components/menu/Menu.js +143 -2
- package/src/components/menu/MenuItem.js +104 -52
- package/src/components/menu/leu-menu-item.js +1 -2
- package/src/components/menu/leu-menu.js +1 -2
- package/src/components/menu/menu-item.css +11 -4
- package/src/components/menu/stories/menu-item.stories.js +15 -4
- package/src/components/menu/stories/menu.stories.js +34 -7
- package/src/components/menu/test/menu-item.test.js +88 -82
- package/src/components/menu/test/menu.test.js +101 -8
- package/src/components/pagination/Pagination.js +27 -18
- package/src/components/pagination/leu-pagination.js +1 -2
- package/src/components/popup/Popup.js +39 -16
- package/src/components/popup/leu-popup.js +1 -2
- package/src/components/popup/popup.css +1 -0
- package/src/components/radio/Radio.js +12 -7
- package/src/components/radio/RadioGroup.js +6 -3
- package/src/components/radio/leu-radio-group.js +1 -2
- package/src/components/radio/leu-radio.js +1 -2
- package/src/components/radio/stories/radio-group.stories.js +5 -19
- package/src/components/radio/stories/radio.stories.js +2 -7
- package/src/components/radio/test/radio-group.test.js +6 -9
- package/src/components/radio/test/radio.test.js +3 -13
- package/src/components/scroll-top/ScrollTop.js +15 -5
- package/src/components/scroll-top/leu-scroll-top.js +1 -2
- package/src/components/select/Select.js +279 -175
- package/src/components/select/leu-select.js +1 -2
- package/src/components/select/select.css +20 -12
- package/src/components/select/stories/select.stories.js +16 -2
- package/src/components/select/test/select.test.js +191 -37
- package/src/components/table/Table.js +15 -9
- package/src/components/table/leu-table.js +1 -2
- package/src/components/table/table.css +3 -1
- package/src/components/visually-hidden/VisuallyHidden.js +6 -2
- package/src/components/visually-hidden/leu-visually-hidden.js +1 -2
- package/src/lib/LeuElement.js +23 -0
- package/src/lib/a11y.js +26 -0
- package/src/styles/custom-properties.css +2 -0
- package/web-test-runner.config.mjs +2 -0
- package/dist/Button-5326c982.d.ts.map +0 -1
- package/dist/_rollupPluginBabelHelpers-20f659f4.d.ts +0 -3
- package/dist/_rollupPluginBabelHelpers-20f659f4.d.ts.map +0 -1
- package/dist/_rollupPluginBabelHelpers-20f659f4.js +0 -30
- package/dist/defineElement-40372b4b.d.ts +0 -9
- package/dist/defineElement-40372b4b.d.ts.map +0 -1
- package/dist/defineElement-40372b4b.js +0 -15
- package/dist/icon-03e86700.d.ts +0 -11
- package/dist/icon-03e86700.d.ts.map +0 -1
- package/src/lib/defineElement.js +0 -13
package/dist/ButtonGroup.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @prop {string} value - The value of the currenty selected (active) button
|
|
5
5
|
* @fires input - When the value of the group changes by clicking a button
|
|
6
6
|
*/
|
|
7
|
-
export class LeuButtonGroup extends
|
|
7
|
+
export class LeuButtonGroup extends LeuElement {
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../button/Button").LeuButton} button
|
|
10
10
|
* @returns {string}
|
|
@@ -20,5 +20,5 @@ export class LeuButtonGroup extends LitElement {
|
|
|
20
20
|
_handleButtonClick(button: any): void;
|
|
21
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
22
22
|
}
|
|
23
|
-
import {
|
|
23
|
+
import { L as LeuElement } from './LeuElement-6de6f209.js';
|
|
24
24
|
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["ButtonGroup.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH;IAME;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["ButtonGroup.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH;IAME;;;OAGG;IACH,8BAHW,GAAoC,GAClC,MAAM,CAIlB;IATC,cAAgB;IAclB,4BAMC;IAVD,oBAGC;IAQD,0BA+BC;IAED;;OAEG;IACH,2BAFW,GAAoC,QAa9C;IACD,+CAMC;CACF;gCApGqD,0BAA0B"}
|
package/dist/ButtonGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css,
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-6de6f209.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
3
|
|
|
4
4
|
var css_248z = css`:host,
|
|
5
5
|
:host * {
|
|
@@ -19,7 +19,7 @@ var css_248z = css`:host,
|
|
|
19
19
|
* @prop {string} value - The value of the currenty selected (active) button
|
|
20
20
|
* @fires input - When the value of the group changes by clicking a button
|
|
21
21
|
*/
|
|
22
|
-
class LeuButtonGroup extends
|
|
22
|
+
class LeuButtonGroup extends LeuElement {
|
|
23
23
|
constructor() {
|
|
24
24
|
super();
|
|
25
25
|
this._items = [];
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tagname leu-checkbox
|
|
3
3
|
*/
|
|
4
|
-
export class LeuCheckbox extends
|
|
4
|
+
export class LeuCheckbox extends LeuElement {
|
|
5
5
|
checked: boolean;
|
|
6
6
|
disabled: boolean;
|
|
7
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
8
9
|
handleChange(event: any): void;
|
|
9
10
|
handleInput(event: any): void;
|
|
10
11
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
12
|
}
|
|
12
|
-
import {
|
|
13
|
+
import { L as LeuElement } from './LeuElement-6de6f209.js';
|
|
13
14
|
//# sourceMappingURL=Checkbox.d.ts.map
|
package/dist/Checkbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["Checkbox.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["Checkbox.js"],"names":[],"mappings":"AA+FA;;GAEG;AACH;IAGI,iBAAoB;IACpB,kBAAqB;IACrB,aAAc;IACd,cAAe;IAEjB,+BAIC;IACD,8BAEC;IACD,+CAgBC;CACF;gCAnIqD,0BAA0B"}
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css,
|
|
3
|
-
import {
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-6de6f209.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
|
+
import { LeuIcon } from './Icon.js';
|
|
4
4
|
|
|
5
5
|
var css_248z = css`:host {
|
|
6
6
|
--checkbox-color: var(--leu-color-black-40);
|
|
@@ -20,8 +20,6 @@ var css_248z = css`:host {
|
|
|
20
20
|
align-items: flex-start;
|
|
21
21
|
gap: 0.5rem;
|
|
22
22
|
|
|
23
|
-
font-family: var(--leu-font-family-regular);
|
|
24
|
-
|
|
25
23
|
font-family: var(--checkbox-font-regular);
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -98,12 +96,13 @@ var css_248z = css`:host {
|
|
|
98
96
|
/**
|
|
99
97
|
* @tagname leu-checkbox
|
|
100
98
|
*/
|
|
101
|
-
class LeuCheckbox extends
|
|
99
|
+
class LeuCheckbox extends LeuElement {
|
|
102
100
|
constructor() {
|
|
103
101
|
super();
|
|
104
102
|
this.checked = false;
|
|
105
103
|
this.disabled = false;
|
|
106
|
-
this.
|
|
104
|
+
this.name = "";
|
|
105
|
+
this.value = "";
|
|
107
106
|
}
|
|
108
107
|
handleChange(event) {
|
|
109
108
|
this.checked = event.target.checked;
|
|
@@ -116,7 +115,7 @@ class LeuCheckbox extends LitElement {
|
|
|
116
115
|
render() {
|
|
117
116
|
return html`
|
|
118
117
|
<input
|
|
119
|
-
id=${this.
|
|
118
|
+
id=${`checkbox-${this.name}`}
|
|
120
119
|
class="checkbox"
|
|
121
120
|
type="checkbox"
|
|
122
121
|
name="${this.name}"
|
|
@@ -126,14 +125,18 @@ class LeuCheckbox extends LitElement {
|
|
|
126
125
|
?disabled=${this.disabled}
|
|
127
126
|
.value=${this.value}
|
|
128
127
|
/>
|
|
129
|
-
<label for=${this.
|
|
130
|
-
<
|
|
128
|
+
<label for=${`checkbox-${this.name}`} class="label"><slot></slot></label>
|
|
129
|
+
<leu-icon class="icon" name="check"></leu-icon>
|
|
131
130
|
`;
|
|
132
131
|
}
|
|
133
132
|
}
|
|
133
|
+
_defineProperty(LeuCheckbox, "dependencies", {
|
|
134
|
+
"leu-icon": LeuIcon
|
|
135
|
+
});
|
|
134
136
|
_defineProperty(LeuCheckbox, "styles", css_248z);
|
|
137
|
+
/** @internal */
|
|
135
138
|
_defineProperty(LeuCheckbox, "shadowRootOptions", {
|
|
136
|
-
...
|
|
139
|
+
...LeuElement.shadowRootOptions,
|
|
137
140
|
delegatesFocus: true
|
|
138
141
|
});
|
|
139
142
|
_defineProperty(LeuCheckbox, "properties", {
|
|
@@ -145,10 +148,6 @@ _defineProperty(LeuCheckbox, "properties", {
|
|
|
145
148
|
type: Boolean,
|
|
146
149
|
reflect: true
|
|
147
150
|
},
|
|
148
|
-
identifier: {
|
|
149
|
-
type: String,
|
|
150
|
-
reflect: true
|
|
151
|
-
},
|
|
152
151
|
value: {
|
|
153
152
|
type: String,
|
|
154
153
|
reflect: true
|
|
@@ -156,10 +155,6 @@ _defineProperty(LeuCheckbox, "properties", {
|
|
|
156
155
|
name: {
|
|
157
156
|
type: String,
|
|
158
157
|
reflect: true
|
|
159
|
-
},
|
|
160
|
-
label: {
|
|
161
|
-
type: String,
|
|
162
|
-
reflect: true
|
|
163
158
|
}
|
|
164
159
|
});
|
|
165
160
|
|
package/dist/CheckboxGroup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tagname leu-checkbox-group
|
|
3
3
|
*/
|
|
4
|
-
export class LeuCheckboxGroup extends
|
|
4
|
+
export class LeuCheckboxGroup extends LeuElement {
|
|
5
5
|
orientation: string;
|
|
6
6
|
items: any[];
|
|
7
7
|
get value(): any[];
|
|
@@ -9,5 +9,5 @@ export class LeuCheckboxGroup extends LitElement {
|
|
|
9
9
|
handleItems(): void;
|
|
10
10
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
11
|
}
|
|
12
|
-
import {
|
|
12
|
+
import { L as LeuElement } from './LeuElement-6de6f209.js';
|
|
13
13
|
//# sourceMappingURL=CheckboxGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["CheckboxGroup.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["CheckboxGroup.js"],"names":[],"mappings":"AAmCA;;GAEG;AACH;IAGI,oBAA+B;IAC/B,aAAe;IAEjB,mBAEC;IACD,yBAEC;IACD,oBAEC;IACD,+CAWC;CACF;gCAjEqD,0BAA0B"}
|
package/dist/CheckboxGroup.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css,
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-6de6f209.js';
|
|
2
|
+
import { css, html } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
5
|
var css_248z = css`:host {
|
|
6
6
|
--group-font-regular: var(--leu-font-family-regular);
|
|
7
7
|
--group-font-black: var(--leu-font-family-black);
|
|
8
8
|
|
|
9
|
-
font-family: var(--leu-font-family-regular);
|
|
10
|
-
|
|
11
9
|
font-family: var(--group-font-regular);
|
|
12
10
|
}
|
|
13
11
|
|
|
@@ -38,7 +36,7 @@ var css_248z = css`:host {
|
|
|
38
36
|
/**
|
|
39
37
|
* @tagname leu-checkbox-group
|
|
40
38
|
*/
|
|
41
|
-
class LeuCheckboxGroup extends
|
|
39
|
+
class LeuCheckboxGroup extends LeuElement {
|
|
42
40
|
constructor() {
|
|
43
41
|
super();
|
|
44
42
|
this.orientation = "HORIZONTAL";
|
|
@@ -51,7 +49,7 @@ class LeuCheckboxGroup extends LitElement {
|
|
|
51
49
|
this.handleItems();
|
|
52
50
|
}
|
|
53
51
|
handleItems() {
|
|
54
|
-
this.items =
|
|
52
|
+
this.items = Array.from(this.querySelectorAll(":scope > *:not([slot])"));
|
|
55
53
|
}
|
|
56
54
|
render() {
|
|
57
55
|
const fieldsetClasses = {
|
package/dist/Chip.d.ts
CHANGED
package/dist/Chip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["Chip.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["Chip.js"],"names":[],"mappings":"AAsJA;IAGI,kBAAqB;CAExB;gCA3JqD,0BAA0B"}
|
package/dist/Chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-6de6f209.js';
|
|
2
|
+
import { css } from 'lit';
|
|
3
3
|
|
|
4
4
|
var css_248z = css`:host,
|
|
5
5
|
:host *,
|
|
@@ -31,7 +31,7 @@ var css_248z = css`:host,
|
|
|
31
31
|
--chip-radio-border: var(--chip-radio-border-default);
|
|
32
32
|
--chip-radio-background: var(--chip-radio-background-default);
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
--leu-icon-size: 1rem;
|
|
35
35
|
|
|
36
36
|
font-family: var(--chip-font-regular);
|
|
37
37
|
|
|
@@ -65,6 +65,7 @@ var css_248z = css`:host,
|
|
|
65
65
|
padding: 0.5rem 1rem;
|
|
66
66
|
|
|
67
67
|
color: var(--chip-color);
|
|
68
|
+
font-family: inherit;
|
|
68
69
|
font-size: 0.875rem;
|
|
69
70
|
line-height: 1rem;
|
|
70
71
|
|
|
@@ -143,15 +144,11 @@ var css_248z = css`:host,
|
|
|
143
144
|
text-overflow: ellipsis;
|
|
144
145
|
white-space: nowrap;
|
|
145
146
|
}
|
|
146
|
-
|
|
147
|
-
.icon svg {
|
|
148
|
-
display: block;
|
|
149
|
-
}
|
|
150
147
|
`;
|
|
151
148
|
|
|
152
149
|
/* Design: https://www.figma.com/file/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?type=design&node-id=21161-184433&mode=design&t=Kjo5VDiqivihn8dh-11 */
|
|
153
150
|
|
|
154
|
-
class LeuChipBase extends
|
|
151
|
+
class LeuChipBase extends LeuElement {
|
|
155
152
|
constructor() {
|
|
156
153
|
super();
|
|
157
154
|
this.inverted = false;
|
|
@@ -160,17 +157,13 @@ class LeuChipBase extends LitElement {
|
|
|
160
157
|
_defineProperty(LeuChipBase, "styles", css_248z);
|
|
161
158
|
/** @internal */
|
|
162
159
|
_defineProperty(LeuChipBase, "shadowRootOptions", {
|
|
163
|
-
...
|
|
160
|
+
...LeuElement.shadowRootOptions,
|
|
164
161
|
delegatesFocus: true
|
|
165
162
|
});
|
|
166
163
|
_defineProperty(LeuChipBase, "properties", {
|
|
167
164
|
inverted: {
|
|
168
165
|
type: Boolean,
|
|
169
166
|
reflect: true
|
|
170
|
-
},
|
|
171
|
-
label: {
|
|
172
|
-
type: String,
|
|
173
|
-
reflect: true
|
|
174
167
|
}
|
|
175
168
|
});
|
|
176
169
|
|
package/dist/ChipGroup.d.ts
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* @cssproperty --leu-chip-group-gap - The gap between the chips
|
|
4
4
|
* @tagname leu-chip-group
|
|
5
5
|
*/
|
|
6
|
-
export class LeuChipGroup extends
|
|
6
|
+
export class LeuChipGroup extends LeuElement {
|
|
7
7
|
items: any[];
|
|
8
8
|
inverted: boolean;
|
|
9
9
|
headingLevel: number;
|
|
10
10
|
label: string;
|
|
11
|
+
/** @type {"single" | "multiple" | "none"} */
|
|
12
|
+
selectionMode: "single" | "multiple" | "none";
|
|
11
13
|
get value(): any[];
|
|
12
14
|
/**
|
|
13
15
|
* Determines the heading tag of the accordion toggle.
|
|
@@ -19,10 +21,10 @@ export class LeuChipGroup extends LitElement {
|
|
|
19
21
|
_getHeadingTag(): string;
|
|
20
22
|
render(): import("lit-html").TemplateResult;
|
|
21
23
|
}
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
import {
|
|
24
|
+
export const SELECTION_MODES: Readonly<{
|
|
25
|
+
single: "single";
|
|
26
|
+
multiple: "multiple";
|
|
27
|
+
none: "none";
|
|
28
|
+
}>;
|
|
29
|
+
import { L as LeuElement } from './LeuElement-6de6f209.js';
|
|
28
30
|
//# sourceMappingURL=ChipGroup.d.ts.map
|
package/dist/ChipGroup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipGroup.d.ts","sourceRoot":"","sources":["ChipGroup.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH;IAiBM,aAAkB;IAEpB,kBAAqB;IACrB,qBAAqB;IACrB,cAAe;
|
|
1
|
+
{"version":3,"file":"ChipGroup.d.ts","sourceRoot":"","sources":["ChipGroup.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH;IAiBM,aAAkB;IAEpB,kBAAqB;IACrB,qBAAqB;IACrB,cAAe;IAKf,6CAA6C;IAC7C,eADW,QAAQ,GAAG,UAAU,GAAG,MAAM,CACA;IAU3C,mBAEC;IAED;;;;;;OAMG;IACH,yBAMC;IACD,4CAeC;CACF;AAlFD;;;;GAIG;gCA5BmD,0BAA0B"}
|
package/dist/ChipGroup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
2
|
-
import { css, LitElement } from 'lit';
|
|
1
|
+
import { _ as _defineProperty, L as LeuElement } from './LeuElement-6de6f209.js';
|
|
3
2
|
import { html, unsafeStatic } from 'lit/static-html.js';
|
|
3
|
+
import { css } from 'lit';
|
|
4
4
|
|
|
5
5
|
var css_248z = css`.label {
|
|
6
6
|
margin: 0 0 0.5rem;
|
|
@@ -22,18 +22,18 @@ var css_248z = css`.label {
|
|
|
22
22
|
|
|
23
23
|
/* Figma https://www.figma.com/file/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?type=design&node-id=131766-248643&mode=design&t=Kjo5VDiqivihn8dh-11 */
|
|
24
24
|
|
|
25
|
-
const SELECTION_MODES = {
|
|
25
|
+
const SELECTION_MODES = Object.freeze({
|
|
26
26
|
single: "single",
|
|
27
27
|
multiple: "multiple",
|
|
28
28
|
none: "none"
|
|
29
|
-
};
|
|
29
|
+
});
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @slot - Place leu-chip-* elements inside this slot
|
|
33
33
|
* @cssproperty --leu-chip-group-gap - The gap between the chips
|
|
34
34
|
* @tagname leu-chip-group
|
|
35
35
|
*/
|
|
36
|
-
class LeuChipGroup extends
|
|
36
|
+
class LeuChipGroup extends LeuElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super();
|
|
39
39
|
/** @internal */
|
|
@@ -58,6 +58,9 @@ class LeuChipGroup extends LitElement {
|
|
|
58
58
|
|
|
59
59
|
/** @internal */
|
|
60
60
|
this.items = [];
|
|
61
|
+
|
|
62
|
+
/** @type {"single" | "multiple" | "none"} */
|
|
63
|
+
this.selectionMode = SELECTION_MODES.none;
|
|
61
64
|
}
|
|
62
65
|
connectedCallback() {
|
|
63
66
|
super.connectedCallback();
|
package/dist/ChipLink.d.ts
CHANGED
package/dist/ChipLink.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipLink.d.ts","sourceRoot":"","sources":["ChipLink.js"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"ChipLink.d.ts","sourceRoot":"","sources":["ChipLink.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH;IAII,aAAyB;IACzB,aAAc;IAEhB,+CAIC;CACF;;;;;4BAxB2B,WAAW"}
|
package/dist/ChipLink.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
1
|
+
import { _ as _defineProperty } from './LeuElement-6de6f209.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { LeuChipBase } from './Chip.js';
|
|
4
4
|
|
|
@@ -8,8 +8,9 @@ const SIZES = {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @slot - The content of the chip
|
|
12
11
|
* @tagname leu-chip-link
|
|
12
|
+
* @slot - The content of the chip
|
|
13
|
+
* @prop {keyof typeof SIZES} size - The size of the chip
|
|
13
14
|
*/
|
|
14
15
|
class LeuChipLink extends LeuChipBase {
|
|
15
16
|
constructor() {
|
|
@@ -20,16 +21,12 @@ class LeuChipLink extends LeuChipBase {
|
|
|
20
21
|
}
|
|
21
22
|
render() {
|
|
22
23
|
return html`<a href=${this.href} class="button">
|
|
23
|
-
<span class="label"
|
|
24
|
+
<span class="label"><slot></slot></span>
|
|
24
25
|
</a>`;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
_defineProperty(LeuChipLink, "properties", {
|
|
28
29
|
...LeuChipBase.properties,
|
|
29
|
-
/**
|
|
30
|
-
* The size of the chip
|
|
31
|
-
* @type {keyof typeof SIZES}
|
|
32
|
-
*/
|
|
33
30
|
size: {
|
|
34
31
|
type: String,
|
|
35
32
|
reflect: true
|
package/dist/ChipRemovable.d.ts
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* @fires remove - Dispatched when the user clicks on the chip
|
|
5
5
|
*/
|
|
6
6
|
export class LeuChipRemovable extends LeuChipBase {
|
|
7
|
-
/** @internal */
|
|
8
|
-
_removeIcon: import("lit-html").TemplateResult<1>;
|
|
9
7
|
handleClick(): void;
|
|
10
8
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["ChipRemovable.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["ChipRemovable.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH;IACE,oBAMC;IACD,+CAKC;CACF;4BAtB2B,WAAW"}
|
package/dist/ChipRemovable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
1
|
+
import { _ as _defineProperty } from './LeuElement-6de6f209.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { LeuChipBase } from './Chip.js';
|
|
4
|
-
import {
|
|
4
|
+
import { LeuIcon } from './Icon.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @slot - The content of the chip
|
|
@@ -9,26 +9,23 @@ import { I as Icon } from './icon-03e86700.js';
|
|
|
9
9
|
* @fires remove - Dispatched when the user clicks on the chip
|
|
10
10
|
*/
|
|
11
11
|
class LeuChipRemovable extends LeuChipBase {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
this._removeIcon = Icon("close", 16);
|
|
17
|
-
}
|
|
18
12
|
handleClick() {
|
|
19
13
|
const customEvent = new CustomEvent("leu:remove", {
|
|
20
|
-
|
|
14
|
+
bubbles: true,
|
|
21
15
|
composed: true
|
|
22
16
|
});
|
|
23
17
|
this.dispatchEvent(customEvent);
|
|
24
18
|
}
|
|
25
19
|
render() {
|
|
26
20
|
return html`<button @click=${e => this.handleClick(e)} class="button">
|
|
27
|
-
<span class="label"
|
|
28
|
-
<
|
|
21
|
+
<span class="label"><slot></slot></span>
|
|
22
|
+
<leu-icon name="close" class="icon"></leu-icon>
|
|
29
23
|
</button>`;
|
|
30
24
|
}
|
|
31
25
|
}
|
|
26
|
+
_defineProperty(LeuChipRemovable, "dependencies", {
|
|
27
|
+
"leu-icon": LeuIcon
|
|
28
|
+
});
|
|
32
29
|
_defineProperty(LeuChipRemovable, "properties", {
|
|
33
30
|
...LeuChipBase.properties
|
|
34
31
|
});
|
package/dist/ChipSelectable.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A chip component that can be selected.
|
|
3
|
-
* @slot - The content of the chip
|
|
4
3
|
* @tagname leu-chip-selectable
|
|
4
|
+
* @slot - The content of the chip
|
|
5
|
+
* @prop {keyof typeof SIZES} size - The size of the chip. Not supported for radio variant.
|
|
6
|
+
* @prop {keyof typeof VARIANTS} variant - `toggle` or `radio`. Determines if only one or multiple chips can be selected.
|
|
5
7
|
*/
|
|
6
8
|
export class LeuChipSelectable extends LeuChipBase {
|
|
7
9
|
size: string;
|
|
10
|
+
/**
|
|
11
|
+
* The variant of the chip. Has an effect not only on the visual appearance but also on the behavior.
|
|
12
|
+
* - `toggle`: The chip behaves like a toggle button.
|
|
13
|
+
* - `radio`: The chip behaves like a radio button.
|
|
14
|
+
* @default "toggle"
|
|
15
|
+
*/
|
|
8
16
|
variant: string;
|
|
9
17
|
selected: boolean;
|
|
10
18
|
handleClick(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["ChipSelectable.js"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["ChipSelectable.js"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH;IAGI,aAAyB;IAEzB;;;;;OAKG;IACH,gBAA8B;IAC9B,kBAAqB;IAKvB,oBAiBC;IACD,+CAQC;CACF;;;;;;;;;4BA9D2B,WAAW"}
|
package/dist/ChipSelectable.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './
|
|
1
|
+
import { _ as _defineProperty } from './LeuElement-6de6f209.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { LeuChipBase } from './Chip.js';
|
|
4
4
|
|
|
@@ -13,13 +13,22 @@ const VARIANTS = {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* A chip component that can be selected.
|
|
16
|
-
* @slot - The content of the chip
|
|
17
16
|
* @tagname leu-chip-selectable
|
|
17
|
+
* @slot - The content of the chip
|
|
18
|
+
* @prop {keyof typeof SIZES} size - The size of the chip. Not supported for radio variant.
|
|
19
|
+
* @prop {keyof typeof VARIANTS} variant - `toggle` or `radio`. Determines if only one or multiple chips can be selected.
|
|
18
20
|
*/
|
|
19
21
|
class LeuChipSelectable extends LeuChipBase {
|
|
20
22
|
constructor() {
|
|
21
23
|
super();
|
|
22
24
|
this.size = SIZES.regular;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The variant of the chip. Has an effect not only on the visual appearance but also on the behavior.
|
|
28
|
+
* - `toggle`: The chip behaves like a toggle button.
|
|
29
|
+
* - `radio`: The chip behaves like a radio button.
|
|
30
|
+
* @default "toggle"
|
|
31
|
+
*/
|
|
23
32
|
this.variant = VARIANTS.toggle;
|
|
24
33
|
this.selected = false;
|
|
25
34
|
if (this.variant === VARIANTS.radio && this.size === SIZES.small) {
|
|
@@ -50,29 +59,16 @@ class LeuChipSelectable extends LeuChipBase {
|
|
|
50
59
|
class="button"
|
|
51
60
|
aria-pressed=${this.selected ? "true" : "false"}
|
|
52
61
|
>
|
|
53
|
-
<span class="label"
|
|
62
|
+
<span class="label"><slot></slot></span>
|
|
54
63
|
</button>`;
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
_defineProperty(LeuChipSelectable, "properties", {
|
|
58
67
|
...LeuChipBase.properties,
|
|
59
|
-
/**
|
|
60
|
-
* The size of the chip. Not supported for radio variant.
|
|
61
|
-
* @type {keyof typeof SIZES}
|
|
62
|
-
* @default "regular"
|
|
63
|
-
*/
|
|
64
68
|
size: {
|
|
65
69
|
type: String,
|
|
66
70
|
reflect: true
|
|
67
71
|
},
|
|
68
|
-
/**
|
|
69
|
-
* The variant of the chip. Has an effect not only on the visual appearance but also on the behavior.
|
|
70
|
-
* - `toggle`: The chip behaves like a toggle button.
|
|
71
|
-
* - `radio`: The chip behaves like a radio button.
|
|
72
|
-
*
|
|
73
|
-
* @type {keyof typeof VARIANTS}
|
|
74
|
-
* @default "toggle"
|
|
75
|
-
*/
|
|
76
72
|
variant: {
|
|
77
73
|
type: String,
|
|
78
74
|
reflect: true
|
package/dist/Dropdown.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @tagname leu-dropdown
|
|
3
3
|
*/
|
|
4
|
-
export class LeuDropdown extends
|
|
4
|
+
export class LeuDropdown extends LeuElement {
|
|
5
5
|
expanded: boolean;
|
|
6
6
|
label: string;
|
|
7
|
-
|
|
7
|
+
/** @type {import("lit/directives/ref").Ref<HTMLButtonElement>} */
|
|
8
|
+
_toggleRef: import("lit/directives/ref").Ref<HTMLButtonElement>;
|
|
8
9
|
_keyUpHandler(event: any): void;
|
|
9
|
-
|
|
10
|
-
_removeMenuItemListeners(): void;
|
|
10
|
+
_keyDownToggleHandler(event: any): Promise<void>;
|
|
11
11
|
_handleToggleClick(): void;
|
|
12
|
+
/**
|
|
13
|
+
* @returns {import("../menu/Menu").LeuMenu}
|
|
14
|
+
*/
|
|
15
|
+
_getMenu(): any;
|
|
12
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
13
17
|
}
|
|
14
|
-
import {
|
|
18
|
+
import { L as LeuElement } from './LeuElement-6de6f209.js';
|
|
15
19
|
//# sourceMappingURL=Dropdown.d.ts.map
|
package/dist/Dropdown.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["Dropdown.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["Dropdown.js"],"names":[],"mappings":"AAkCA;;GAEG;AACH;IAMQ,kBAAqB;IAqBzB,cAAe;IAGf,kEAAkE;IAClE,YADW,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CACjC;IAkB/B,gCAIC;IACD,iDAYC;IACD,2BAEC;IAED;;OAEG;IACH,YAFa,GAA8B,CAI1C;IACD,+CA6BC;CACF;gCAhJqD,0BAA0B"}
|