@statistikzh/leu 0.11.0 → 0.12.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/.github/workflows/deploy-github-pages.yaml +2 -2
- package/.github/workflows/release-please.yml +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +22 -30
- package/dist/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumb.js +3 -8
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +3 -3
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup.js +3 -8
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup.js +2 -2
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +3 -5
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.js +2 -2
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +3 -7
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown.js +4 -9
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +2 -2
- package/dist/Input.d.ts +1 -1
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +3 -8
- package/dist/{LeuElement-78b4a998.d.ts → LeuElement-d661ef10.d.ts} +1 -1
- package/dist/LeuElement-d661ef10.d.ts.map +1 -0
- package/dist/{LeuElement-78b4a998.js → LeuElement-d661ef10.js} +10 -2
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +3 -8
- package/dist/MenuItem.d.ts +1 -1
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +3 -8
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.d.ts.map +1 -1
- package/dist/Popup.js +3 -8
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +2 -2
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +2 -2
- package/dist/Range.d.ts +1 -1
- package/dist/Range.d.ts.map +1 -1
- package/dist/Range.js +2 -3
- package/dist/ScrollTop.d.ts +1 -1
- package/dist/ScrollTop.js +3 -3
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +4 -9
- package/dist/Spinner.d.ts +1 -1
- package/dist/Spinner.js +2 -2
- package/dist/Table.d.ts +1 -1
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +7 -4
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.js +2 -2
- package/dist/{hasSlotController-fd1950b4.d.ts → hasSlotController-bfe693e4.d.ts} +1 -1
- package/dist/{hasSlotController-fd1950b4.d.ts.map → hasSlotController-bfe693e4.d.ts.map} +1 -1
- package/dist/{hasSlotController-fd1950b4.js → hasSlotController-bfe693e4.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-breadcrumb.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +2 -2
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.js +2 -2
- package/dist/leu-dropdown.js +2 -2
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-pagination.js +2 -2
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.js +2 -2
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
- package/scripts/generate-component/templates/[Name].js +1 -1
- package/scripts/generate-component/templates/[name].css +0 -5
- package/src/components/accordion/Accordion.js +10 -6
- package/src/components/accordion/accordion.css +9 -22
- package/src/components/breadcrumb/Breadcrumb.js +1 -1
- package/src/components/breadcrumb/breadcrumb.css +0 -5
- package/src/components/button/Button.js +1 -1
- package/src/components/button-group/ButtonGroup.js +1 -1
- package/src/components/button-group/button-group.css +0 -5
- package/src/components/checkbox/Checkbox.js +1 -1
- package/src/components/checkbox/CheckboxGroup.js +1 -1
- package/src/components/chip/Chip.js +1 -1
- package/src/components/chip/ChipGroup.js +1 -1
- package/src/components/chip/chip.css +0 -2
- package/src/components/dialog/Dialog.js +1 -1
- package/src/components/dialog/dialog.css +0 -5
- package/src/components/dropdown/Dropdown.js +1 -1
- package/src/components/dropdown/dropdown.css +0 -5
- package/src/components/icon/Icon.js +1 -1
- package/src/components/input/Input.js +1 -1
- package/src/components/input/input.css +0 -5
- package/src/components/menu/Menu.js +1 -1
- package/src/components/menu/MenuItem.js +1 -1
- package/src/components/menu/menu-item.css +0 -5
- package/src/components/menu/menu.css +0 -5
- package/src/components/pagination/Pagination.js +1 -1
- package/src/components/popup/Popup.js +1 -1
- package/src/components/popup/popup.css +0 -5
- package/src/components/radio/Radio.js +1 -1
- package/src/components/radio/RadioGroup.js +1 -1
- package/src/components/range/Range.js +1 -1
- package/src/components/range/range.css +0 -1
- package/src/components/scroll-top/ScrollTop.js +1 -1
- package/src/components/select/Select.js +1 -1
- package/src/components/select/select.css +0 -5
- package/src/components/spinner/Spinner.js +1 -1
- package/src/components/table/Table.js +6 -2
- package/src/components/table/stories/table.stories.js +6 -1
- package/src/components/table/table.css +1 -0
- package/src/components/visually-hidden/VisuallyHidden.js +1 -1
- package/src/lib/LeuElement.js +3 -0
- package/src/styles/common-styles.css +5 -0
- package/src/styles/style.stories.js +1 -0
- package/web-dev-server.config.mjs +1 -0
- package/dist/LeuElement-78b4a998.d.ts.map +0 -1
package/dist/leu-radio.js
CHANGED
package/dist/leu-range.js
CHANGED
package/dist/leu-scroll-top.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LeuScrollTop } from './ScrollTop.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-d661ef10.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import './Button.js';
|
|
6
6
|
import 'lit/directives/if-defined.js';
|
|
7
7
|
import './Icon.js';
|
|
8
|
-
import './hasSlotController-
|
|
8
|
+
import './hasSlotController-bfe693e4.js';
|
|
9
9
|
import './utils-65469421.js';
|
|
10
10
|
|
|
11
11
|
LeuScrollTop.define("leu-scroll-top");
|
package/dist/leu-select.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LeuSelect } from './Select.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-d661ef10.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directives/ref.js';
|
|
6
6
|
import 'lit/directives/if-defined.js';
|
|
7
|
-
import './hasSlotController-
|
|
7
|
+
import './hasSlotController-bfe693e4.js';
|
|
8
8
|
import './Button.js';
|
|
9
9
|
import './Icon.js';
|
|
10
10
|
import './Menu.js';
|
package/dist/leu-spinner.js
CHANGED
package/dist/leu-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LeuTable } from './Table.js';
|
|
2
|
-
import './LeuElement-
|
|
2
|
+
import './LeuElement-d661ef10.js';
|
|
3
3
|
import 'lit';
|
|
4
4
|
import 'lit/directives/class-map.js';
|
|
5
5
|
import 'lit/directives/style-map.js';
|
|
@@ -9,7 +9,7 @@ import './Pagination.js';
|
|
|
9
9
|
import 'lit/directives/live.js';
|
|
10
10
|
import './Button.js';
|
|
11
11
|
import 'lit/directives/if-defined.js';
|
|
12
|
-
import './hasSlotController-
|
|
12
|
+
import './hasSlotController-bfe693e4.js';
|
|
13
13
|
import './VisuallyHidden.js';
|
|
14
14
|
|
|
15
15
|
LeuTable.define("leu-table");
|
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import styles from "./accordion.css"
|
|
|
16
16
|
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
17
17
|
*/
|
|
18
18
|
export class LeuAccordion extends LeuElement {
|
|
19
|
-
static styles = styles
|
|
19
|
+
static styles = [LeuElement.styles, styles]
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
22
|
static shadowRootOptions = {
|
|
@@ -72,7 +72,7 @@ export class LeuAccordion extends LeuElement {
|
|
|
72
72
|
id="toggle"
|
|
73
73
|
type="button"
|
|
74
74
|
class="button"
|
|
75
|
-
aria-controls="
|
|
75
|
+
aria-controls="contentwrapper"
|
|
76
76
|
aria-expanded="${this.open}"
|
|
77
77
|
@click=${this._handleToggleClick}
|
|
78
78
|
>
|
|
@@ -85,13 +85,17 @@ export class LeuAccordion extends LeuElement {
|
|
|
85
85
|
<div class="plus"></div>
|
|
86
86
|
</button></${unsafeStatic(hTag)}>
|
|
87
87
|
<div
|
|
88
|
-
id="
|
|
89
|
-
class="
|
|
88
|
+
id="contentwrapper"
|
|
89
|
+
class="contentwrapper"
|
|
90
|
+
?hidden=${!this.open}
|
|
90
91
|
aria-labelledby="toggle"
|
|
91
92
|
role="region"
|
|
92
|
-
?hidden=${!this.open}
|
|
93
93
|
>
|
|
94
|
-
<
|
|
94
|
+
<div
|
|
95
|
+
class="content"
|
|
96
|
+
>
|
|
97
|
+
<slot name="content"></slot>
|
|
98
|
+
</div>
|
|
95
99
|
</div>
|
|
96
100
|
<hr class="divider" />`
|
|
97
101
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
@import url("../../styles/custom-media.css");
|
|
2
2
|
|
|
3
|
-
:host,
|
|
4
|
-
:host * {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
3
|
:host {
|
|
9
4
|
--accordion-font-regular: var(--leu-font-family-regular);
|
|
10
5
|
--accordion-font-black: var(--leu-font-family-black);
|
|
@@ -19,17 +14,9 @@
|
|
|
19
14
|
|
|
20
15
|
--transition: 0.1s ease;
|
|
21
16
|
|
|
22
|
-
font-family: var(--
|
|
17
|
+
font-family: var(--accordion-font-regular);
|
|
23
18
|
|
|
24
19
|
position: relative;
|
|
25
|
-
display: grid;
|
|
26
|
-
grid-template-rows: auto 0fr;
|
|
27
|
-
|
|
28
|
-
transition: grid-template-rows var(--transition);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:host([open]) {
|
|
32
|
-
grid-template-rows: auto 1fr;
|
|
33
20
|
}
|
|
34
21
|
|
|
35
22
|
.heading {
|
|
@@ -115,15 +102,18 @@
|
|
|
115
102
|
flex-grow: 1;
|
|
116
103
|
}
|
|
117
104
|
|
|
105
|
+
.contentwrapper {
|
|
106
|
+
display: grid;
|
|
107
|
+
grid-template-rows: 1fr;
|
|
108
|
+
transition: grid-template-rows var(--transition);
|
|
109
|
+
}
|
|
110
|
+
|
|
118
111
|
.content {
|
|
119
112
|
overflow: hidden;
|
|
120
|
-
transition: visibility var(--transition), opacity var(--transition);
|
|
121
113
|
}
|
|
122
114
|
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
visibility: hidden;
|
|
126
|
-
opacity: 0;
|
|
115
|
+
.contentwrapper[hidden] {
|
|
116
|
+
grid-template-rows: 0fr;
|
|
127
117
|
}
|
|
128
118
|
|
|
129
119
|
slot[name="content"] {
|
|
@@ -140,9 +130,6 @@ slot[name="content"] {
|
|
|
140
130
|
}
|
|
141
131
|
|
|
142
132
|
.divider {
|
|
143
|
-
position: absolute;
|
|
144
|
-
top: 100%;
|
|
145
|
-
left: 0;
|
|
146
133
|
|
|
147
134
|
width: 100%;
|
|
148
135
|
height: 1px;
|
|
@@ -11,7 +11,7 @@ import styles from "./button-group.css"
|
|
|
11
11
|
* @fires input - When the value of the group changes by clicking a button
|
|
12
12
|
*/
|
|
13
13
|
export class LeuButtonGroup extends LeuElement {
|
|
14
|
-
static styles = styles
|
|
14
|
+
static styles = [LeuElement.styles, styles]
|
|
15
15
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super()
|
|
@@ -10,7 +10,7 @@ import styles from "./checkbox-group.css"
|
|
|
10
10
|
* @tagname leu-checkbox-group
|
|
11
11
|
*/
|
|
12
12
|
export class LeuCheckboxGroup extends LeuElement {
|
|
13
|
-
static styles = styles
|
|
13
|
+
static styles = [LeuElement.styles, styles]
|
|
14
14
|
|
|
15
15
|
static properties = {
|
|
16
16
|
orientation: { type: String, reflect: true },
|
|
@@ -6,7 +6,7 @@ import styles from "./chip.css"
|
|
|
6
6
|
/* Design: https://www.figma.com/file/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?type=design&node-id=21161-184433&mode=design&t=Kjo5VDiqivihn8dh-11 */
|
|
7
7
|
|
|
8
8
|
export class LeuChipBase extends LeuElement {
|
|
9
|
-
static styles = styles
|
|
9
|
+
static styles = [LeuElement.styles, styles]
|
|
10
10
|
|
|
11
11
|
/** @internal */
|
|
12
12
|
static shadowRootOptions = {
|
|
@@ -19,7 +19,7 @@ export const SELECTION_MODES = Object.freeze({
|
|
|
19
19
|
* @tagname leu-chip-group
|
|
20
20
|
*/
|
|
21
21
|
export class LeuChipGroup extends LeuElement {
|
|
22
|
-
static styles = styles
|
|
22
|
+
static styles = [LeuElement.styles, styles]
|
|
23
23
|
|
|
24
24
|
static properties = {
|
|
25
25
|
inverted: { type: Boolean, reflect: true },
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
/* figma https://www.figma.com/design/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?node-id=21161-186812&t=8VgDy9avMRG5aL7s-0 */
|
|
4
4
|
|
|
5
|
-
:host,
|
|
6
|
-
:host * {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
:host {
|
|
11
6
|
--dialog-font-regular: var(--leu-font-family-regular);
|
|
12
7
|
--dialog-font-black: var(--leu-font-family-black);
|
|
@@ -17,7 +17,7 @@ import { paths } from "./paths.js"
|
|
|
17
17
|
* @cssprop --leu-icon-size - The size of the icon.
|
|
18
18
|
*/
|
|
19
19
|
export class LeuIcon extends LeuElement {
|
|
20
|
-
static styles = styles
|
|
20
|
+
static styles = [LeuElement.styles, styles]
|
|
21
21
|
|
|
22
22
|
static properties = {
|
|
23
23
|
name: { type: String, reflect: true },
|
|
@@ -16,7 +16,7 @@ import styles from "./menu.css"
|
|
|
16
16
|
* @property {SelectsType} selects - This has only an effect when the role is 'menu'. It defines which role the menu items will get. Default is 'none'.
|
|
17
17
|
*/
|
|
18
18
|
export class LeuMenu extends LeuElement {
|
|
19
|
-
static styles = styles
|
|
19
|
+
static styles = [LeuElement.styles, styles]
|
|
20
20
|
|
|
21
21
|
static shadowRootOptions = {
|
|
22
22
|
...LeuElement.shadowRootOptions,
|
|
@@ -10,7 +10,7 @@ import styles from "./radio-group.css"
|
|
|
10
10
|
* @tagname leu-radio-group
|
|
11
11
|
*/
|
|
12
12
|
export class LeuRadioGroup extends LeuElement {
|
|
13
|
-
static styles = styles
|
|
13
|
+
static styles = [LeuElement.styles, styles]
|
|
14
14
|
|
|
15
15
|
static properties = {
|
|
16
16
|
orientation: { type: String, reflect: true },
|
|
@@ -19,7 +19,7 @@ export class LeuTable extends LeuElement {
|
|
|
19
19
|
"leu-pagination": LeuPagination,
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
static styles = styles
|
|
22
|
+
static styles = [LeuElement.styles, styles]
|
|
23
23
|
|
|
24
24
|
static properties = {
|
|
25
25
|
columns: { type: Array },
|
|
@@ -183,7 +183,11 @@ export class LeuTable extends LeuElement {
|
|
|
183
183
|
<tr>
|
|
184
184
|
${this._columns.map(
|
|
185
185
|
(col) =>
|
|
186
|
-
html`<th
|
|
186
|
+
html`<th
|
|
187
|
+
style=${col.headerStyle
|
|
188
|
+
? styleMap(col.headerStyle())
|
|
189
|
+
: nothing}
|
|
190
|
+
>
|
|
187
191
|
${col.sort
|
|
188
192
|
? html`<button @click=${(_) => this.sortClick(col)}>
|
|
189
193
|
<span>${col.name}</span>
|
|
@@ -26,6 +26,11 @@ function Template({ itemsPerPage }) {
|
|
|
26
26
|
{
|
|
27
27
|
name: "Name",
|
|
28
28
|
value: (row) => row.name,
|
|
29
|
+
headerStyle: () => {
|
|
30
|
+
return {
|
|
31
|
+
color: "#0076bd",
|
|
32
|
+
}
|
|
33
|
+
},
|
|
29
34
|
style: (row) => {
|
|
30
35
|
return {
|
|
31
36
|
minWidth: "400px",
|
|
@@ -38,7 +43,7 @@ function Template({ itemsPerPage }) {
|
|
|
38
43
|
},
|
|
39
44
|
{
|
|
40
45
|
name: "Menge",
|
|
41
|
-
value: (row) => row.menge,
|
|
46
|
+
value: (row) => row.menge + "%",
|
|
42
47
|
style: (row) => {
|
|
43
48
|
return {
|
|
44
49
|
color:
|
package/src/lib/LeuElement.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { LitElement } from "lit"
|
|
2
|
+
import commonStyles from "../styles/common-styles.css"
|
|
2
3
|
|
|
3
4
|
export class LeuElement extends LitElement {
|
|
4
5
|
static version = __LEU_VERSION__
|
|
5
6
|
|
|
6
7
|
static dependencies = {}
|
|
7
8
|
|
|
9
|
+
static styles = commonStyles
|
|
10
|
+
|
|
8
11
|
static define(name, constructor = this, options = {}) {
|
|
9
12
|
Object.entries(this.dependencies).forEach(([n, c]) => c.define(n))
|
|
10
13
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LeuElement-78b4a998.d.ts","sourceRoot":"","sources":["LeuElement-78b4a998.js"],"names":[],"mappings":"AA+BA;IACE,8EAcC;CACF;AA7CD,sEAaC;2BAf0B,KAAK"}
|