@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.
Files changed (147) hide show
  1. package/.github/workflows/deploy-github-pages.yaml +2 -2
  2. package/.github/workflows/release-please.yml +1 -1
  3. package/CHANGELOG.md +15 -0
  4. package/dist/Accordion.d.ts +1 -1
  5. package/dist/Accordion.d.ts.map +1 -1
  6. package/dist/Accordion.js +22 -30
  7. package/dist/Breadcrumb.d.ts +1 -1
  8. package/dist/Breadcrumb.d.ts.map +1 -1
  9. package/dist/Breadcrumb.js +3 -8
  10. package/dist/Button.d.ts +1 -1
  11. package/dist/Button.js +3 -3
  12. package/dist/ButtonGroup.d.ts +1 -1
  13. package/dist/ButtonGroup.d.ts.map +1 -1
  14. package/dist/ButtonGroup.js +3 -8
  15. package/dist/Checkbox.d.ts +1 -1
  16. package/dist/Checkbox.js +2 -2
  17. package/dist/CheckboxGroup.d.ts +1 -1
  18. package/dist/CheckboxGroup.js +2 -2
  19. package/dist/Chip.d.ts +1 -1
  20. package/dist/Chip.d.ts.map +1 -1
  21. package/dist/Chip.js +3 -5
  22. package/dist/ChipGroup.d.ts +1 -1
  23. package/dist/ChipGroup.js +2 -2
  24. package/dist/ChipLink.js +1 -1
  25. package/dist/ChipRemovable.js +1 -1
  26. package/dist/ChipSelectable.js +1 -1
  27. package/dist/Dialog.d.ts +1 -1
  28. package/dist/Dialog.d.ts.map +1 -1
  29. package/dist/Dialog.js +3 -7
  30. package/dist/Dropdown.d.ts +1 -1
  31. package/dist/Dropdown.d.ts.map +1 -1
  32. package/dist/Dropdown.js +4 -9
  33. package/dist/Icon.d.ts +1 -1
  34. package/dist/Icon.js +2 -2
  35. package/dist/Input.d.ts +1 -1
  36. package/dist/Input.d.ts.map +1 -1
  37. package/dist/Input.js +3 -8
  38. package/dist/{LeuElement-78b4a998.d.ts → LeuElement-d661ef10.d.ts} +1 -1
  39. package/dist/LeuElement-d661ef10.d.ts.map +1 -0
  40. package/dist/{LeuElement-78b4a998.js → LeuElement-d661ef10.js} +10 -2
  41. package/dist/Menu.d.ts +1 -1
  42. package/dist/Menu.d.ts.map +1 -1
  43. package/dist/Menu.js +3 -8
  44. package/dist/MenuItem.d.ts +1 -1
  45. package/dist/MenuItem.d.ts.map +1 -1
  46. package/dist/MenuItem.js +3 -8
  47. package/dist/Pagination.d.ts +1 -1
  48. package/dist/Pagination.js +3 -3
  49. package/dist/Popup.d.ts +1 -1
  50. package/dist/Popup.d.ts.map +1 -1
  51. package/dist/Popup.js +3 -8
  52. package/dist/Radio.d.ts +1 -1
  53. package/dist/Radio.js +2 -2
  54. package/dist/RadioGroup.d.ts +1 -1
  55. package/dist/RadioGroup.js +2 -2
  56. package/dist/Range.d.ts +1 -1
  57. package/dist/Range.d.ts.map +1 -1
  58. package/dist/Range.js +2 -3
  59. package/dist/ScrollTop.d.ts +1 -1
  60. package/dist/ScrollTop.js +3 -3
  61. package/dist/Select.d.ts +1 -1
  62. package/dist/Select.d.ts.map +1 -1
  63. package/dist/Select.js +4 -9
  64. package/dist/Spinner.d.ts +1 -1
  65. package/dist/Spinner.js +2 -2
  66. package/dist/Table.d.ts +1 -1
  67. package/dist/Table.d.ts.map +1 -1
  68. package/dist/Table.js +7 -4
  69. package/dist/VisuallyHidden.d.ts +1 -1
  70. package/dist/VisuallyHidden.js +2 -2
  71. package/dist/{hasSlotController-fd1950b4.d.ts → hasSlotController-bfe693e4.d.ts} +1 -1
  72. package/dist/{hasSlotController-fd1950b4.d.ts.map → hasSlotController-bfe693e4.d.ts.map} +1 -1
  73. package/dist/{hasSlotController-fd1950b4.js → hasSlotController-bfe693e4.js} +1 -1
  74. package/dist/index.js +2 -2
  75. package/dist/leu-accordion.js +1 -1
  76. package/dist/leu-breadcrumb.js +1 -1
  77. package/dist/leu-button-group.js +1 -1
  78. package/dist/leu-button.js +2 -2
  79. package/dist/leu-checkbox-group.js +1 -1
  80. package/dist/leu-checkbox.js +1 -1
  81. package/dist/leu-chip-group.js +1 -1
  82. package/dist/leu-chip-link.js +1 -1
  83. package/dist/leu-chip-removable.js +1 -1
  84. package/dist/leu-chip-selectable.js +1 -1
  85. package/dist/leu-dialog.js +2 -2
  86. package/dist/leu-dropdown.js +2 -2
  87. package/dist/leu-icon.js +1 -1
  88. package/dist/leu-input.js +1 -1
  89. package/dist/leu-menu-item.js +1 -1
  90. package/dist/leu-menu.js +1 -1
  91. package/dist/leu-pagination.js +2 -2
  92. package/dist/leu-popup.js +1 -1
  93. package/dist/leu-radio-group.js +1 -1
  94. package/dist/leu-radio.js +1 -1
  95. package/dist/leu-range.js +1 -1
  96. package/dist/leu-scroll-top.js +2 -2
  97. package/dist/leu-select.js +2 -2
  98. package/dist/leu-spinner.js +1 -1
  99. package/dist/leu-table.js +2 -2
  100. package/dist/leu-visually-hidden.js +1 -1
  101. package/dist/web-types.json +1 -1
  102. package/package.json +1 -1
  103. package/scripts/generate-component/templates/[Name].js +1 -1
  104. package/scripts/generate-component/templates/[name].css +0 -5
  105. package/src/components/accordion/Accordion.js +10 -6
  106. package/src/components/accordion/accordion.css +9 -22
  107. package/src/components/breadcrumb/Breadcrumb.js +1 -1
  108. package/src/components/breadcrumb/breadcrumb.css +0 -5
  109. package/src/components/button/Button.js +1 -1
  110. package/src/components/button-group/ButtonGroup.js +1 -1
  111. package/src/components/button-group/button-group.css +0 -5
  112. package/src/components/checkbox/Checkbox.js +1 -1
  113. package/src/components/checkbox/CheckboxGroup.js +1 -1
  114. package/src/components/chip/Chip.js +1 -1
  115. package/src/components/chip/ChipGroup.js +1 -1
  116. package/src/components/chip/chip.css +0 -2
  117. package/src/components/dialog/Dialog.js +1 -1
  118. package/src/components/dialog/dialog.css +0 -5
  119. package/src/components/dropdown/Dropdown.js +1 -1
  120. package/src/components/dropdown/dropdown.css +0 -5
  121. package/src/components/icon/Icon.js +1 -1
  122. package/src/components/input/Input.js +1 -1
  123. package/src/components/input/input.css +0 -5
  124. package/src/components/menu/Menu.js +1 -1
  125. package/src/components/menu/MenuItem.js +1 -1
  126. package/src/components/menu/menu-item.css +0 -5
  127. package/src/components/menu/menu.css +0 -5
  128. package/src/components/pagination/Pagination.js +1 -1
  129. package/src/components/popup/Popup.js +1 -1
  130. package/src/components/popup/popup.css +0 -5
  131. package/src/components/radio/Radio.js +1 -1
  132. package/src/components/radio/RadioGroup.js +1 -1
  133. package/src/components/range/Range.js +1 -1
  134. package/src/components/range/range.css +0 -1
  135. package/src/components/scroll-top/ScrollTop.js +1 -1
  136. package/src/components/select/Select.js +1 -1
  137. package/src/components/select/select.css +0 -5
  138. package/src/components/spinner/Spinner.js +1 -1
  139. package/src/components/table/Table.js +6 -2
  140. package/src/components/table/stories/table.stories.js +6 -1
  141. package/src/components/table/table.css +1 -0
  142. package/src/components/visually-hidden/VisuallyHidden.js +1 -1
  143. package/src/lib/LeuElement.js +3 -0
  144. package/src/styles/common-styles.css +5 -0
  145. package/src/styles/style.stories.js +1 -0
  146. package/web-dev-server.config.mjs +1 -0
  147. package/dist/LeuElement-78b4a998.d.ts.map +0 -1
package/dist/leu-radio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuRadio } from './Radio.js';
2
- import './LeuElement-78b4a998.js';
2
+ import './LeuElement-d661ef10.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuRadio.define("leu-radio");
package/dist/leu-range.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuRange } from './Range.js';
2
- import './LeuElement-78b4a998.js';
2
+ import './LeuElement-d661ef10.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuRange.define("leu-range");
@@ -1,11 +1,11 @@
1
1
  import { LeuScrollTop } from './ScrollTop.js';
2
- import './LeuElement-78b4a998.js';
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-fd1950b4.js';
8
+ import './hasSlotController-bfe693e4.js';
9
9
  import './utils-65469421.js';
10
10
 
11
11
  LeuScrollTop.define("leu-scroll-top");
@@ -1,10 +1,10 @@
1
1
  import { LeuSelect } from './Select.js';
2
- import './LeuElement-78b4a998.js';
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-fd1950b4.js';
7
+ import './hasSlotController-bfe693e4.js';
8
8
  import './Button.js';
9
9
  import './Icon.js';
10
10
  import './Menu.js';
@@ -1,5 +1,5 @@
1
1
  import { LeuSpinner } from './Spinner.js';
2
- import './LeuElement-78b4a998.js';
2
+ import './LeuElement-d661ef10.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuSpinner.define("leu-spinner");
package/dist/leu-table.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuTable } from './Table.js';
2
- import './LeuElement-78b4a998.js';
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-fd1950b4.js';
12
+ import './hasSlotController-bfe693e4.js';
13
13
  import './VisuallyHidden.js';
14
14
 
15
15
  LeuTable.define("leu-table");
@@ -1,5 +1,5 @@
1
1
  import { LeuVisuallyHidden } from './VisuallyHidden.js';
2
- import './LeuElement-78b4a998.js';
2
+ import './LeuElement-d661ef10.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuVisuallyHidden.define("leu-visually-hidden");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@statistikzh/leu",
4
- "version": "0.11.0",
4
+ "version": "0.12.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI component library of the canton of zurich",
4
4
  "license": "MIT",
5
5
  "author": "statistikzh",
6
- "version": "0.11.0",
6
+ "version": "0.12.0",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -8,7 +8,7 @@ import styles from "./[name].css"
8
8
  * @tagname [namespace]-[name]
9
9
  */
10
10
  export class Leu[Name] extends LeuElement {
11
- static styles = styles
11
+ static styles = [LeuElement.styles, styles]
12
12
 
13
13
  static shadowRootOptions = {
14
14
  ...LeuElement.shadowRootOptions,
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --[name]-font-regular: var(--leu-font-family-regular);
8
3
  --[name]-font-black: var(--leu-font-family-black);
@@ -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="content"
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="content"
89
- class="content"
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
- <slot name="content"></slot>
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(--chip-font-regular);
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
- .content[hidden] {
124
- display: block;
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;
@@ -55,7 +55,7 @@ export class LeuBreadcrumb extends LeuElement {
55
55
  "leu-visually-hidden": LeuVisuallyHidden,
56
56
  }
57
57
 
58
- static styles = styles
58
+ static styles = [LeuElement.styles, styles]
59
59
 
60
60
  static properties = {
61
61
  items: { type: Array },
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --breadcrumb-font-regular: var(--leu-font-family-regular);
8
3
  --breadcrumb-font-black: var(--leu-font-family-black);
@@ -41,7 +41,7 @@ export class LeuButton extends LeuElement {
41
41
  "leu-icon": LeuIcon,
42
42
  }
43
43
 
44
- static styles = styles
44
+ static styles = [LeuElement.styles, styles]
45
45
 
46
46
  /**
47
47
  * @internal
@@ -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()
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  .group {
7
2
  display: flex;
8
3
  gap: 0.5rem;
@@ -14,7 +14,7 @@ export class LeuCheckbox extends LeuElement {
14
14
  "leu-icon": LeuIcon,
15
15
  }
16
16
 
17
- static styles = styles
17
+ static styles = [LeuElement.styles, styles]
18
18
 
19
19
  /** @internal */
20
20
  static shadowRootOptions = {
@@ -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 },
@@ -1,5 +1,3 @@
1
- :host,
2
- :host *,
3
1
  :host *::before,
4
2
  :host *::after {
5
3
  box-sizing: border-box;
@@ -19,7 +19,7 @@ export class LeuDialog extends LeuElement {
19
19
  "leu-icon": LeuIcon,
20
20
  }
21
21
 
22
- static styles = styles
22
+ static styles = [LeuElement.styles, styles]
23
23
 
24
24
  static shadowRootOptions = {
25
25
  ...LeuElement.shadowRootOptions,
@@ -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);
@@ -23,7 +23,7 @@ export class LeuDropdown extends LeuElement {
23
23
  "leu-popup": LeuPopup,
24
24
  }
25
25
 
26
- static styles = styles
26
+ static styles = [LeuElement.styles, styles]
27
27
 
28
28
  static properties = {
29
29
  label: { type: String, reflect: true },
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  position: relative;
8
3
  }
@@ -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 },
@@ -70,7 +70,7 @@ export class LeuInput extends LeuElement {
70
70
  "leu-icon": LeuIcon,
71
71
  }
72
72
 
73
- static styles = styles
73
+ static styles = [LeuElement.styles, styles]
74
74
 
75
75
  /**
76
76
  * @internal
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --input-color: var(--leu-color-black-100);
8
3
  --input-color-disabled: var(--leu-color-black-20);
@@ -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,
@@ -27,7 +27,7 @@ export class LeuMenuItem extends LeuElement {
27
27
  "leu-icon": LeuIcon,
28
28
  }
29
29
 
30
- static styles = styles
30
+ static styles = [LeuElement.styles, styles]
31
31
 
32
32
  /**
33
33
  * @internal
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --background: var(--leu-color-black-0);
8
3
  --background-hover: var(--leu-color-black-10);
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --menu-divider-color: var(--leu-color-black-transp-20);
8
3
  }
@@ -21,7 +21,7 @@ export class LeuPagination extends LeuElement {
21
21
  "leu-visually-hidden": LeuVisuallyHidden,
22
22
  }
23
23
 
24
- static styles = styles
24
+ static styles = [LeuElement.styles, styles]
25
25
 
26
26
  /**
27
27
  * @internal
@@ -20,7 +20,7 @@ import styles from "./popup.css"
20
20
  * @tagname leu-popup
21
21
  */
22
22
  export class LeuPopup extends LeuElement {
23
- static styles = styles
23
+ static styles = [LeuElement.styles, styles]
24
24
 
25
25
  static shadowRootOptions = {
26
26
  ...LeuElement.shadowRootOptions,
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --popup-font-regular: var(--leu-font-family-regular);
8
3
  --popup-font-black: var(--leu-font-family-black);
@@ -9,7 +9,7 @@ import styles from "./radio.css"
9
9
  * @tagname leu-radio
10
10
  */
11
11
  export class LeuRadio extends LeuElement {
12
- static styles = styles
12
+ static styles = [LeuElement.styles, styles]
13
13
 
14
14
  /** @internal */
15
15
  static 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 },
@@ -18,7 +18,7 @@ const RANGE_LABELS = ["Von", "Bis"]
18
18
  * @tagname leu-range
19
19
  */
20
20
  export class LeuRange extends LeuElement {
21
- static styles = styles
21
+ static styles = [LeuElement.styles, styles]
22
22
 
23
23
  static shadowRootOptions = {
24
24
  ...LeuElement.shadowRootOptions,
@@ -23,7 +23,6 @@
23
23
  --range-font-black: var(--leu-font-family-black);
24
24
 
25
25
  display: block;
26
- box-sizing: border-box;
27
26
 
28
27
  font-family: var(--range-font-regular);
29
28
  }
@@ -19,7 +19,7 @@ export class LeuScrollTop extends LeuElement {
19
19
  "leu-icon": LeuIcon,
20
20
  }
21
21
 
22
- static styles = styles
22
+ static styles = [LeuElement.styles, styles]
23
23
 
24
24
  static properties = {
25
25
  _showButton: { state: true },
@@ -40,7 +40,7 @@ export class LeuSelect extends LeuElement {
40
40
  "leu-popup": LeuPopup,
41
41
  }
42
42
 
43
- static styles = styles
43
+ static styles = [LeuElement.styles, styles]
44
44
 
45
45
  static get properties() {
46
46
  return {
@@ -1,8 +1,3 @@
1
- :host,
2
- :host * {
3
- box-sizing: border-box;
4
- }
5
-
6
1
  :host {
7
2
  --select-color: var(--leu-color-black-100);
8
3
  --select-color-disabled: var(--leu-color-black-20);
@@ -9,7 +9,7 @@ import styles from "./spinner.css"
9
9
  * @cssprop --leu-spinner-size - The size of the spinner.
10
10
  */
11
11
  export class LeuSpinner extends LeuElement {
12
- static styles = styles
12
+ static styles = [LeuElement.styles, styles]
13
13
 
14
14
  render() {
15
15
  return html`
@@ -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:
@@ -71,6 +71,7 @@ button {
71
71
  align-items: flex-center;
72
72
  font-size: inherit;
73
73
  font-family: inherit;
74
+ color: inherit;
74
75
  }
75
76
 
76
77
  thead leu-icon {
@@ -9,7 +9,7 @@ import styles from "./visually-hidden.css"
9
9
  * @tagname leu-visually-hidden
10
10
  */
11
11
  export class LeuVisuallyHidden extends LeuElement {
12
- static styles = styles
12
+ static styles = [LeuElement.styles, styles]
13
13
 
14
14
  render() {
15
15
  return html`<slot></slot>`
@@ -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
 
@@ -0,0 +1,5 @@
1
+ :host,
2
+ :host * {
3
+ box-sizing: border-box;
4
+ font-feature-settings: var(--leu-t-font-feature-settings);
5
+ }
@@ -17,6 +17,7 @@ function Template() {
17
17
 
18
18
  background-color: var(--leu-color-black-5);
19
19
  font-family: var(--leu-font-family-regular);
20
+ font-feature-settings: var(--leu-t-font-feature-settings);
20
21
  }
21
22
 
22
23
  .container div {
@@ -13,6 +13,7 @@ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
13
13
  mimeTypes: {
14
14
  "**/custom-elements.json": "js",
15
15
  "src/components/**/*.css": "js",
16
+ "src/styles/common-styles.css": "js",
16
17
  },
17
18
  plugins: [...plugins, json()],
18
19
  })
@@ -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"}