@statistikzh/leu 0.12.2 → 0.13.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 (91) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/Accordion.d.ts +1 -1
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Breadcrumb.d.ts +1 -1
  5. package/dist/Breadcrumb.js +1 -1
  6. package/dist/Button.d.ts +1 -1
  7. package/dist/Button.js +2 -2
  8. package/dist/ButtonGroup.d.ts +1 -1
  9. package/dist/ButtonGroup.js +1 -1
  10. package/dist/Checkbox.d.ts +1 -1
  11. package/dist/Checkbox.js +1 -1
  12. package/dist/CheckboxGroup.d.ts +1 -1
  13. package/dist/CheckboxGroup.js +1 -1
  14. package/dist/Chip.d.ts +1 -1
  15. package/dist/Chip.js +1 -1
  16. package/dist/ChipGroup.d.ts +1 -1
  17. package/dist/ChipGroup.js +1 -1
  18. package/dist/ChipLink.js +1 -1
  19. package/dist/ChipRemovable.js +1 -1
  20. package/dist/ChipSelectable.js +1 -1
  21. package/dist/Dialog.d.ts +1 -1
  22. package/dist/Dialog.js +2 -2
  23. package/dist/Dropdown.d.ts +1 -1
  24. package/dist/Dropdown.js +2 -2
  25. package/dist/Icon.d.ts +1 -1
  26. package/dist/Icon.js +1 -1
  27. package/dist/Input.d.ts +1 -1
  28. package/dist/Input.js +1 -1
  29. package/dist/{LeuElement-519af050.d.ts → LeuElement-874a297c.d.ts} +1 -1
  30. package/dist/LeuElement-874a297c.d.ts.map +1 -0
  31. package/dist/{LeuElement-519af050.js → LeuElement-874a297c.js} +1 -1
  32. package/dist/Menu.d.ts +1 -1
  33. package/dist/Menu.js +1 -1
  34. package/dist/MenuItem.d.ts +1 -1
  35. package/dist/MenuItem.js +1 -1
  36. package/dist/Pagination.d.ts +1 -1
  37. package/dist/Pagination.js +2 -2
  38. package/dist/Popup.d.ts +1 -1
  39. package/dist/Popup.js +1 -1
  40. package/dist/Radio.d.ts +1 -1
  41. package/dist/Radio.js +1 -1
  42. package/dist/RadioGroup.d.ts +1 -1
  43. package/dist/RadioGroup.js +1 -1
  44. package/dist/Range.d.ts +1 -1
  45. package/dist/Range.js +1 -1
  46. package/dist/ScrollTop.d.ts +1 -1
  47. package/dist/ScrollTop.js +2 -2
  48. package/dist/Select.d.ts +1 -1
  49. package/dist/Select.js +2 -2
  50. package/dist/Spinner.d.ts +1 -1
  51. package/dist/Spinner.js +1 -1
  52. package/dist/Table.d.ts +1 -3
  53. package/dist/Table.d.ts.map +1 -1
  54. package/dist/Table.js +49 -20
  55. package/dist/VisuallyHidden.d.ts +1 -1
  56. package/dist/VisuallyHidden.js +1 -1
  57. package/dist/{hasSlotController-bf769658.d.ts → hasSlotController-dbcac394.d.ts} +1 -1
  58. package/dist/{hasSlotController-bf769658.d.ts.map → hasSlotController-dbcac394.d.ts.map} +1 -1
  59. package/dist/{hasSlotController-bf769658.js → hasSlotController-dbcac394.js} +1 -1
  60. package/dist/index.js +2 -2
  61. package/dist/leu-accordion.js +1 -1
  62. package/dist/leu-breadcrumb.js +1 -1
  63. package/dist/leu-button-group.js +1 -1
  64. package/dist/leu-button.js +2 -2
  65. package/dist/leu-checkbox-group.js +1 -1
  66. package/dist/leu-checkbox.js +1 -1
  67. package/dist/leu-chip-group.js +1 -1
  68. package/dist/leu-chip-link.js +1 -1
  69. package/dist/leu-chip-removable.js +1 -1
  70. package/dist/leu-chip-selectable.js +1 -1
  71. package/dist/leu-dialog.js +2 -2
  72. package/dist/leu-dropdown.js +2 -2
  73. package/dist/leu-icon.js +1 -1
  74. package/dist/leu-input.js +1 -1
  75. package/dist/leu-menu-item.js +1 -1
  76. package/dist/leu-menu.js +1 -1
  77. package/dist/leu-pagination.js +2 -2
  78. package/dist/leu-popup.js +1 -1
  79. package/dist/leu-radio-group.js +1 -1
  80. package/dist/leu-radio.js +1 -1
  81. package/dist/leu-range.js +1 -1
  82. package/dist/leu-scroll-top.js +2 -2
  83. package/dist/leu-select.js +2 -2
  84. package/dist/leu-spinner.js +1 -1
  85. package/dist/leu-table.js +2 -2
  86. package/dist/leu-visually-hidden.js +1 -1
  87. package/dist/web-types.json +1 -1
  88. package/package.json +1 -1
  89. package/src/components/table/Table.js +33 -15
  90. package/src/components/table/table.css +16 -6
  91. package/dist/LeuElement-519af050.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.0](https://github.com/statistikZH/leu/compare/v0.12.2...v0.13.0) (2025-01-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * **table:** add align prop for columns and hover effect ([#254](https://github.com/statistikZH/leu/issues/254)) ([56d9d4d](https://github.com/statistikZH/leu/commit/56d9d4dfa3fb080bf4de340a88aa7e2437f6942f))
9
+
3
10
  ## [0.12.2](https://github.com/statistikZH/leu/compare/v0.12.1...v0.12.2) (2024-12-05)
4
11
 
5
12
 
@@ -28,5 +28,5 @@ export class LeuAccordion extends LeuElement {
28
28
  _handleToggleClick(): void;
29
29
  render(): import("lit-html").TemplateResult;
30
30
  }
31
- import { L as LeuElement } from './LeuElement-519af050.js';
31
+ import { L as LeuElement } from './LeuElement-874a297c.js';
32
32
  //# sourceMappingURL=Accordion.d.ts.map
package/dist/Accordion.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, nothing } from 'lit';
3
3
  import { html, unsafeStatic } from 'lit/static-html.js';
4
4
 
@@ -64,6 +64,6 @@ export class LeuBreadcrumb extends LeuElement {
64
64
  renderDropdown(): import("lit-html").TemplateResult<1> | typeof nothing;
65
65
  render(): import("lit-html").TemplateResult<1> | typeof nothing;
66
66
  }
67
- import { L as LeuElement } from './LeuElement-519af050.js';
67
+ import { L as LeuElement } from './LeuElement-874a297c.js';
68
68
  import { nothing } from 'lit';
69
69
  //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, nothing, html } from 'lit';
3
3
  import { createRef, ref } from 'lit/directives/ref.js';
4
4
  import { classMap } from 'lit/directives/class-map.js';
package/dist/Button.d.ts CHANGED
@@ -41,6 +41,6 @@ export class LeuButton extends LeuElement {
41
41
  hasTextContent(): boolean;
42
42
  render(): import("lit-html").TemplateResult<1>;
43
43
  }
44
- import { L as LeuElement } from './LeuElement-519af050.js';
44
+ import { L as LeuElement } from './LeuElement-874a297c.js';
45
45
  import { nothing } from 'lit';
46
46
  //# sourceMappingURL=Button.d.ts.map
package/dist/Button.js CHANGED
@@ -1,9 +1,9 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
5
  import { LeuIcon } from './Icon.js';
6
- import { H as HasSlotController } from './hasSlotController-bf769658.js';
6
+ import { H as HasSlotController } from './hasSlotController-dbcac394.js';
7
7
 
8
8
  /**
9
9
  * All roles that are associated with a aria-checked attribute
@@ -20,5 +20,5 @@ export class LeuButtonGroup extends LeuElement {
20
20
  _handleButtonClick(button: any): void;
21
21
  render(): import("lit-html").TemplateResult<1>;
22
22
  }
23
- import { L as LeuElement } from './LeuElement-519af050.js';
23
+ import { L as LeuElement } from './LeuElement-874a297c.js';
24
24
  //# sourceMappingURL=ButtonGroup.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`.group {
@@ -10,5 +10,5 @@ export class LeuCheckbox extends LeuElement {
10
10
  handleInput(event: any): void;
11
11
  render(): import("lit-html").TemplateResult<1>;
12
12
  }
13
- import { L as LeuElement } from './LeuElement-519af050.js';
13
+ import { L as LeuElement } from './LeuElement-874a297c.js';
14
14
  //# sourceMappingURL=Checkbox.d.ts.map
package/dist/Checkbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { LeuIcon } from './Icon.js';
4
4
 
@@ -10,5 +10,5 @@ export class LeuCheckboxGroup extends LeuElement {
10
10
  handleItems(): void;
11
11
  render(): import("lit-html").TemplateResult<1>;
12
12
  }
13
- import { L as LeuElement } from './LeuElement-519af050.js';
13
+ import { L as LeuElement } from './LeuElement-874a297c.js';
14
14
  //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
 
package/dist/Chip.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export class LeuChipBase extends LeuElement {
2
2
  inverted: boolean;
3
3
  }
4
- import { L as LeuElement } from './LeuElement-519af050.js';
4
+ import { L as LeuElement } from './LeuElement-874a297c.js';
5
5
  //# sourceMappingURL=Chip.d.ts.map
package/dist/Chip.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css } from 'lit';
3
3
 
4
4
  var css_248z = css`:host *::before,
@@ -32,5 +32,5 @@ export const SELECTION_MODES: Readonly<{
32
32
  multiple: "multiple";
33
33
  none: "none";
34
34
  }>;
35
- import { L as LeuElement } from './LeuElement-519af050.js';
35
+ import { L as LeuElement } from './LeuElement-874a297c.js';
36
36
  //# sourceMappingURL=ChipGroup.d.ts.map
package/dist/ChipGroup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { html, unsafeStatic } from 'lit/static-html.js';
3
3
  import { css } from 'lit';
4
4
 
package/dist/ChipLink.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty } from './LeuElement-874a297c.js';
2
2
  import { html } from 'lit';
3
3
  import { LeuChipBase } from './Chip.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty } from './LeuElement-874a297c.js';
2
2
  import { html } from 'lit';
3
3
  import { LeuChipBase } from './Chip.js';
4
4
  import { LeuIcon } from './Icon.js';
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty } from './LeuElement-874a297c.js';
2
2
  import { html } from 'lit';
3
3
  import { LeuChipBase } from './Chip.js';
4
4
 
package/dist/Dialog.d.ts CHANGED
@@ -13,5 +13,5 @@ export class LeuDialog extends LeuElement {
13
13
  close(): void;
14
14
  render(): import("lit-html").TemplateResult<1>;
15
15
  }
16
- import { L as LeuElement } from './LeuElement-519af050.js';
16
+ import { L as LeuElement } from './LeuElement-874a297c.js';
17
17
  //# sourceMappingURL=Dialog.d.ts.map
package/dist/Dialog.js CHANGED
@@ -1,8 +1,8 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { createRef, ref } from 'lit/directives/ref.js';
4
4
  import { classMap } from 'lit/directives/class-map.js';
5
- import { H as HasSlotController } from './hasSlotController-bf769658.js';
5
+ import { H as HasSlotController } from './hasSlotController-dbcac394.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
 
8
8
  var css_248z = css`/* figma https://www.figma.com/design/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?node-id=21161-186812&t=8VgDy9avMRG5aL7s-0 */
@@ -15,5 +15,5 @@ export class LeuDropdown extends LeuElement {
15
15
  _getMenu(): any;
16
16
  render(): import("lit-html").TemplateResult<1>;
17
17
  }
18
- import { L as LeuElement } from './LeuElement-519af050.js';
18
+ import { L as LeuElement } from './LeuElement-874a297c.js';
19
19
  //# sourceMappingURL=Dropdown.d.ts.map
package/dist/Dropdown.js CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { createRef, ref } from 'lit/directives/ref.js';
4
- import { H as HasSlotController } from './hasSlotController-bf769658.js';
4
+ import { H as HasSlotController } from './hasSlotController-dbcac394.js';
5
5
  import { LeuButton } from './Button.js';
6
6
  import { LeuMenu } from './Menu.js';
7
7
  import { LeuMenuItem } from './MenuItem.js';
package/dist/Icon.d.ts CHANGED
@@ -112,5 +112,5 @@ export class LeuIcon extends LeuElement {
112
112
  name: any | "";
113
113
  render(): import("lit-html").TemplateResult<1>;
114
114
  }
115
- import { L as LeuElement } from './LeuElement-519af050.js';
115
+ import { L as LeuElement } from './LeuElement-874a297c.js';
116
116
  //# sourceMappingURL=Icon.d.ts.map
package/dist/Icon.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, svg } from 'lit';
3
3
 
4
4
  var css_248z = css`svg,
package/dist/Input.d.ts CHANGED
@@ -145,6 +145,6 @@ export const SIZES: Readonly<{
145
145
  SMALL: "small";
146
146
  REGULAR: "regular";
147
147
  }>;
148
- import { L as LeuElement } from './LeuElement-519af050.js';
148
+ import { L as LeuElement } from './LeuElement-874a297c.js';
149
149
  import { nothing } from 'lit';
150
150
  //# sourceMappingURL=Input.d.ts.map
package/dist/Input.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, nothing, html } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
@@ -4,4 +4,4 @@ declare class LeuElement extends LitElement {
4
4
  declare function _defineProperty(obj: any, key: any, value: any): any;
5
5
  import { LitElement } from 'lit';
6
6
  export { LeuElement as L, _defineProperty as _ };
7
- //# sourceMappingURL=LeuElement-519af050.d.ts.map
7
+ //# sourceMappingURL=LeuElement-874a297c.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LeuElement-874a297c.d.ts","sourceRoot":"","sources":["LeuElement-874a297c.js"],"names":[],"mappings":"AAsCA;IACE,8EAcC;CACF;AApDD,sEAaC;2BAf+B,KAAK"}
@@ -53,7 +53,7 @@ class LeuElement extends LitElement {
53
53
  }
54
54
  }
55
55
  }
56
- _defineProperty(LeuElement, "version", "0.12.2");
56
+ _defineProperty(LeuElement, "version", "0.13.0");
57
57
  _defineProperty(LeuElement, "dependencies", {});
58
58
  _defineProperty(LeuElement, "styles", css_248z);
59
59
 
package/dist/Menu.d.ts CHANGED
@@ -25,6 +25,6 @@ export class LeuMenu extends LeuElement {
25
25
  updated(changedProperties: any): void;
26
26
  render(): import("lit-html").TemplateResult<1>;
27
27
  }
28
- import { L as LeuElement } from './LeuElement-519af050.js';
28
+ import { L as LeuElement } from './LeuElement-874a297c.js';
29
29
  import { LeuMenuItem } from './MenuItem.js';
30
30
  //# sourceMappingURL=Menu.d.ts.map
package/dist/Menu.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { LeuMenuItem } from './MenuItem.js';
4
4
  import 'lit/directives/if-defined.js';
@@ -37,6 +37,6 @@ export class LeuMenuItem extends LeuElement {
37
37
  _renderBeforeSlotDefault(): import("lit-html").TemplateResult<1> | typeof nothing;
38
38
  render(): import("lit-html").TemplateResult<1>;
39
39
  }
40
- import { L as LeuElement } from './LeuElement-519af050.js';
40
+ import { L as LeuElement } from './LeuElement-874a297c.js';
41
41
  import { nothing } from 'lit';
42
42
  //# sourceMappingURL=MenuItem.d.ts.map
package/dist/MenuItem.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { ifDefined } from 'lit/directives/if-defined.js';
4
4
  import { LeuIcon } from './Icon.js';
@@ -30,5 +30,5 @@ export class LeuPagination extends LeuElement {
30
30
  _handleKeyDown(event: any): void;
31
31
  render(): import("lit-html").TemplateResult<1>;
32
32
  }
33
- import { L as LeuElement } from './LeuElement-519af050.js';
33
+ import { L as LeuElement } from './LeuElement-874a297c.js';
34
34
  //# sourceMappingURL=Pagination.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { live } from 'lit/directives/live.js';
4
4
  import { LeuButton } from './Button.js';
@@ -6,7 +6,7 @@ import { LeuVisuallyHidden } from './VisuallyHidden.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
  import 'lit/directives/class-map.js';
8
8
  import 'lit/directives/if-defined.js';
9
- import './hasSlotController-bf769658.js';
9
+ import './hasSlotController-dbcac394.js';
10
10
 
11
11
  var css_248z = css`:host {
12
12
  margin-top: 16px;
package/dist/Popup.d.ts CHANGED
@@ -32,5 +32,5 @@ export class LeuPopup extends LeuElement {
32
32
  handleAnchorChange(): void;
33
33
  render(): import("lit-html").TemplateResult<1>;
34
34
  }
35
- import { L as LeuElement } from './LeuElement-519af050.js';
35
+ import { L as LeuElement } from './LeuElement-874a297c.js';
36
36
  //# sourceMappingURL=Popup.d.ts.map
package/dist/Popup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { autoUpdate, size, flip, shift, computePosition } from '@floating-ui/dom';
4
4
 
package/dist/Radio.d.ts CHANGED
@@ -10,5 +10,5 @@ export class LeuRadio extends LeuElement {
10
10
  handleInput(event: any): void;
11
11
  render(): import("lit-html").TemplateResult<1>;
12
12
  }
13
- import { L as LeuElement } from './LeuElement-519af050.js';
13
+ import { L as LeuElement } from './LeuElement-874a297c.js';
14
14
  //# sourceMappingURL=Radio.d.ts.map
package/dist/Radio.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`:host {
@@ -16,5 +16,5 @@ export class LeuRadioGroup extends LeuElement {
16
16
  initializeIndex(): void;
17
17
  render(): import("lit-html").TemplateResult<1>;
18
18
  }
19
- import { L as LeuElement } from './LeuElement-519af050.js';
19
+ import { L as LeuElement } from './LeuElement-874a297c.js';
20
20
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
 
package/dist/Range.d.ts CHANGED
@@ -56,5 +56,5 @@ export class LeuRange extends LeuElement {
56
56
  }): void;
57
57
  render(): import("lit-html").TemplateResult<1>;
58
58
  }
59
- import { L as LeuElement } from './LeuElement-519af050.js';
59
+ import { L as LeuElement } from './LeuElement-874a297c.js';
60
60
  //# sourceMappingURL=Range.d.ts.map
package/dist/Range.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`:host {
@@ -15,5 +15,5 @@ export class LeuScrollTop extends LeuElement {
15
15
  _scrollListener: Function;
16
16
  render(): import("lit-html").TemplateResult<1>;
17
17
  }
18
- import { L as LeuElement } from './LeuElement-519af050.js';
18
+ import { L as LeuElement } from './LeuElement-874a297c.js';
19
19
  //# sourceMappingURL=ScrollTop.d.ts.map
package/dist/ScrollTop.js CHANGED
@@ -1,11 +1,11 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { LeuButton } from './Button.js';
5
5
  import { LeuIcon } from './Icon.js';
6
6
  import { t as throttle } from './utils-65469421.js';
7
7
  import 'lit/directives/if-defined.js';
8
- import './hasSlotController-bf769658.js';
8
+ import './hasSlotController-dbcac394.js';
9
9
 
10
10
  var css_248z = css`.scroll-top {
11
11
  overflow: hidden;
package/dist/Select.d.ts CHANGED
@@ -131,6 +131,6 @@ export class LeuSelect extends LeuElement {
131
131
  _renderToggleButton(): import("lit-html").TemplateResult<1>;
132
132
  render(): import("lit-html").TemplateResult<1>;
133
133
  }
134
- import { L as LeuElement } from './LeuElement-519af050.js';
134
+ import { L as LeuElement } from './LeuElement-874a297c.js';
135
135
  import { nothing } from 'lit';
136
136
  //# sourceMappingURL=Select.d.ts.map
package/dist/Select.js CHANGED
@@ -1,9 +1,9 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, nothing, html } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { createRef, ref } from 'lit/directives/ref.js';
5
5
  import { ifDefined } from 'lit/directives/if-defined.js';
6
- import { H as HasSlotController } from './hasSlotController-bf769658.js';
6
+ import { H as HasSlotController } from './hasSlotController-dbcac394.js';
7
7
  import { LeuButton } from './Button.js';
8
8
  import { LeuMenu } from './Menu.js';
9
9
  import { LeuMenuItem } from './MenuItem.js';
package/dist/Spinner.d.ts CHANGED
@@ -5,5 +5,5 @@
5
5
  export class LeuSpinner extends LeuElement {
6
6
  render(): import("lit-html").TemplateResult<1>;
7
7
  }
8
- import { L as LeuElement } from './LeuElement-519af050.js';
8
+ import { L as LeuElement } from './LeuElement-874a297c.js';
9
9
  //# sourceMappingURL=Spinner.d.ts.map
package/dist/Spinner.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`@keyframes leu-spinner-rotate {
package/dist/Table.d.ts CHANGED
@@ -32,13 +32,11 @@ export class LeuTable extends LeuElement {
32
32
  isOnePropNotValid(): "Der Parameter 'columns' ist erforderlich !" | "Der Parameter 'data' ist erforderlich !";
33
33
  isSorted(col: any): boolean;
34
34
  sortClick(col: any): void;
35
- sortOrder: string;
36
35
  sortArrowIcon(): import("lit-html").TemplateResult<1>;
37
- sortArrow(col: any): import("lit-html").TemplateResult<1>;
38
36
  get _columns(): any[];
39
37
  get _sortedData(): any[];
40
38
  get _data(): any[];
41
39
  render(): import("lit-html").TemplateResult<1>;
42
40
  }
43
- import { L as LeuElement } from './LeuElement-519af050.js';
41
+ import { L as LeuElement } from './LeuElement-874a297c.js';
44
42
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["Table.js"],"names":[],"mappings":"AAsHA;;GAEG;AACH;IAGI,oBAAoB;IACpB,eAAiB;IACjB,oBAAoB;IACpB,YAAc;IACd,sBAAsB;IACtB,mBADW,OAAO,CACY;IAC9B,qBAAqB;IACrB,cADW,MAAM,CACO;IACxB,qBAAqB;IACrB,WADW,MAAM,CACI;IACrB,sBAAsB;IACtB,cADW,OAAO,CACO;IACzB,qBAAqB;IACrB,OADW,MAAM,CACA;IAEjB,gBAAgB;IAChB,qBAAwB;IACxB,gBAAgB;IAChB,sBAAyB;IACzB,gBAAgB;IAChB,8DAA6B;IAE7B,gBAAgB;IAChB,cAAc;IACd,gCAEE;IAKJ,oEAKC;IACD,qBAGC;IACD,gCAGC;IACD,8BAEC;IACD,8GAQC;IACD,4BAEC;IACD,0BAQC;IAFG,kBAAsB;IAG1B,sDAIC;IACD,0DAEC;IACD,sBAEC;IACD,yBAMC;IACD,mBAEC;IACD,+CA+DC;CACF;gCAtRqD,0BAA0B"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["Table.js"],"names":[],"mappings":"AAgIA;;GAEG;AACH;IAGI,oBAAoB;IACpB,eAAiB;IACjB,oBAAoB;IACpB,YAAc;IACd,sBAAsB;IACtB,mBADW,OAAO,CACY;IAC9B,qBAAqB;IACrB,cADW,MAAM,CACO;IACxB,qBAAqB;IACrB,WADW,MAAM,CACI;IACrB,sBAAsB;IACtB,cADW,OAAO,CACO;IACzB,qBAAqB;IACrB,OADW,MAAM,CACA;IAEjB,gBAAgB;IAChB,qBAAwB;IACxB,gBAAgB;IAChB,sBAAyB;IACzB,gBAAgB;IAChB,8DAA6B;IAE7B,gBAAgB;IAChB,cAAc;IACd,gCAEE;IAKJ,oEAKC;IACD,qBAGC;IACD,gCAGC;IACD,8BAEC;IACD,8GAQC;IACD,4BAEC;IACD,0BAQC;IACD,sDAIC;IACD,sBAEC;IACD,yBAMC;IACD,mBAEC;IACD,+CAqFC;CACF;gCAnTqD,0BAA0B"}
package/dist/Table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html, nothing } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { styleMap } from 'lit/directives/style-map.js';
@@ -8,7 +8,7 @@ import { LeuPagination } from './Pagination.js';
8
8
  import 'lit/directives/live.js';
9
9
  import './Button.js';
10
10
  import 'lit/directives/if-defined.js';
11
- import './hasSlotController-bf769658.js';
11
+ import './hasSlotController-dbcac394.js';
12
12
  import './VisuallyHidden.js';
13
13
 
14
14
  var css_248z = css`:host {
@@ -79,20 +79,30 @@ button {
79
79
  line-height: 1.5;
80
80
  padding: 0;
81
81
  border: 0;
82
- width: 100%;
83
- display: flex;
84
- align-items: flex-center;
85
82
  font-size: inherit;
86
83
  font-family: inherit;
87
84
  color: inherit;
88
85
  }
89
86
 
90
- thead leu-icon {
91
- --leu-icon-size: 1.25rem;
87
+ button span {
88
+ vertical-align: bottom;
89
+ }
92
90
 
91
+ button leu-icon {
92
+ --leu-icon-size: 1.25rem;
93
93
  display: inline-block;
94
- color: var(--leu-color-accent-blue);
95
94
  padding: 0;
95
+ opacity: 0;
96
+ vertical-align: bottom;
97
+ }
98
+
99
+ button:hover leu-icon {
100
+ opacity: 1;
101
+ }
102
+
103
+ button.active leu-icon {
104
+ color: var(--leu-color-accent-blue);
105
+ opacity: 1;
96
106
  }
97
107
 
98
108
  table.sticky td:first-child,
@@ -188,7 +198,7 @@ class LeuTable extends LeuElement {
188
198
  this.sortOrderAsc = !this.sortOrderAsc;
189
199
  } else {
190
200
  this.sortIndex = index;
191
- this.sortOrder = "asc";
201
+ this.sortOrderAsc = false;
192
202
  }
193
203
  }
194
204
  sortArrowIcon() {
@@ -196,9 +206,6 @@ class LeuTable extends LeuElement {
196
206
  name=${this.sortOrderAsc ? "arrowDown" : "arrowUp"}
197
207
  ></leu-icon>`;
198
208
  }
199
- sortArrow(col) {
200
- return html` ${this.isSorted(col) ? this.sortArrowIcon() : nothing} `;
201
- }
202
209
  get _columns() {
203
210
  return this.columns;
204
211
  }
@@ -230,6 +237,28 @@ class LeuTable extends LeuElement {
230
237
  const stickyClass = {
231
238
  sticky: this.firstColumnSticky
232
239
  };
240
+ function headerStyle(col) {
241
+ if (col.headerStyle) {
242
+ return styleMap({
243
+ ...col.headerStyle(),
244
+ textAlign: col.align === "right" ? "right" : undefined
245
+ });
246
+ }
247
+ return col.align === "right" ? styleMap({
248
+ textAlign: "right"
249
+ }) : nothing;
250
+ }
251
+ function bodyStyle(col, row) {
252
+ if (col.style) {
253
+ return styleMap({
254
+ ...col.style(row),
255
+ textAlign: col.align === "right" ? "right" : undefined
256
+ });
257
+ }
258
+ return col.align === "right" ? styleMap({
259
+ textAlign: "right"
260
+ }) : nothing;
261
+ }
233
262
  return html`
234
263
  <div
235
264
  class=${classMap(scrollClasses)}
@@ -239,21 +268,21 @@ class LeuTable extends LeuElement {
239
268
  <table class=${classMap(stickyClass)}>
240
269
  <thead>
241
270
  <tr>
242
- ${this._columns.map(col => html`<th
243
- style=${col.headerStyle ? styleMap(col.headerStyle()) : nothing}
244
- >
245
- ${col.sort ? html`<button @click=${_ => this.sortClick(col)}>
271
+ ${this._columns.map(col => html`<th style=${headerStyle(col)}>
272
+ ${col.sort ? html`<button
273
+ @click=${_ => this.sortClick(col)}
274
+ class=${this.isSorted(col) ? "active" : nothing}
275
+ >
276
+ ${col.align === "right" ? this.sortArrowIcon() : nothing}
246
277
  <span>${col.name}</span>
247
- ${this.sortArrow(col)}
278
+ ${col.align !== "right" ? this.sortArrowIcon() : nothing}
248
279
  </button>` : col.name}
249
280
  </th>`)}
250
281
  </tr>
251
282
  </thead>
252
283
  <tbody>
253
284
  ${this._data.map(row => html`<tr>
254
- ${this._columns.map(col => html`<td
255
- style=${col.style ? styleMap(col.style(row)) : nothing}
256
- >
285
+ ${this._columns.map(col => html`<td style=${bodyStyle(col, row)}>
257
286
  ${col.value(row)}
258
287
  </td>`)}
259
288
  </tr>`)}
@@ -4,5 +4,5 @@
4
4
  export class LeuVisuallyHidden extends LeuElement {
5
5
  render(): import("lit-html").TemplateResult<1>;
6
6
  }
7
- import { L as LeuElement } from './LeuElement-519af050.js';
7
+ import { L as LeuElement } from './LeuElement-874a297c.js';
8
8
  //# sourceMappingURL=VisuallyHidden.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-874a297c.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`:host {
@@ -35,4 +35,4 @@ declare class HasSlotController implements ReactiveController {
35
35
  hostConnected(): void;
36
36
  hostDisconnected(): void;
37
37
  }
38
- //# sourceMappingURL=hasSlotController-bf769658.d.ts.map
38
+ //# sourceMappingURL=hasSlotController-dbcac394.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasSlotController-bf769658.d.ts","sourceRoot":"","sources":["hasSlotController-bf769658.js"],"names":[],"mappings":";;;;iCASa,OAAO,KAAK,EAAE,kBAAkB;AAP7C;;;GAGG;AAEH;;;;GAIG;AACH;IACE,uCAcC;IAHC,UAAgB;IAEhB,eAA0B;IAG5B;;;OAGG;IACH,uBAeC;IAED;;;;OAIG;IACH,qBAEC;IAED;;;OAGG;IACH,gCAEC;IACD,sBAEC;IACD,yBAEC;CACF"}
1
+ {"version":3,"file":"hasSlotController-dbcac394.d.ts","sourceRoot":"","sources":["hasSlotController-dbcac394.js"],"names":[],"mappings":";;;;iCASa,OAAO,KAAK,EAAE,kBAAkB;AAP7C;;;GAGG;AAEH;;;;GAIG;AACH;IACE,uCAcC;IAHC,UAAgB;IAEhB,eAA0B;IAG5B;;;OAGG;IACH,uBAeC;IAED;;;;OAIG;IACH,qBAEC;IAED;;;OAGG;IACH,gCAEC;IACD,sBAEC;IACD,yBAEC;CACF"}
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from './LeuElement-519af050.js';
1
+ import { _ as _defineProperty } from './LeuElement-874a297c.js';
2
2
 
3
3
  /**
4
4
  * Thanks Shoelace!
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ export { LeuRadio } from './Radio.js';
18
18
  export { LeuRadioGroup } from './RadioGroup.js';
19
19
  export { LeuSelect } from './Select.js';
20
20
  export { LeuTable } from './Table.js';
21
- import './LeuElement-519af050.js';
21
+ import './LeuElement-874a297c.js';
22
22
  import 'lit';
23
23
  import 'lit/static-html.js';
24
24
  import 'lit/directives/ref.js';
@@ -27,7 +27,7 @@ import './utils-65469421.js';
27
27
  import './Icon.js';
28
28
  import './VisuallyHidden.js';
29
29
  import 'lit/directives/if-defined.js';
30
- import './hasSlotController-bf769658.js';
30
+ import './hasSlotController-dbcac394.js';
31
31
  import './Chip.js';
32
32
  import 'lit/directives/live.js';
33
33
  import '@floating-ui/dom';
@@ -1,5 +1,5 @@
1
1
  import { LeuAccordion } from './Accordion.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/static-html.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuBreadcrumb } from './Breadcrumb.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/class-map.js';
@@ -1,5 +1,5 @@
1
1
  import { LeuButtonGroup } from './ButtonGroup.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuButtonGroup.define("leu-button-group");
@@ -1,10 +1,10 @@
1
1
  import { LeuButton } from './Button.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/directives/if-defined.js';
6
6
  import './Icon.js';
7
- import './hasSlotController-bf769658.js';
7
+ import './hasSlotController-dbcac394.js';
8
8
 
9
9
  LeuButton.define("leu-button");
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { LeuCheckboxGroup } from './CheckboxGroup.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuCheckbox } from './Checkbox.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import './Icon.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuChipGroup } from './ChipGroup.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/static-html.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuChipLink } from './ChipLink.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import './Chip.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuChipRemovable } from './ChipRemovable.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import './Chip.js';
5
5
  import './Icon.js';
@@ -1,5 +1,5 @@
1
1
  import { LeuChipSelectable } from './ChipSelectable.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import './Chip.js';
5
5
 
@@ -1,9 +1,9 @@
1
1
  import { LeuDialog } from './Dialog.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/class-map.js';
6
- import './hasSlotController-bf769658.js';
6
+ import './hasSlotController-dbcac394.js';
7
7
  import './Icon.js';
8
8
 
9
9
  LeuDialog.define("leu-dialog");
@@ -1,8 +1,8 @@
1
1
  import { LeuDropdown } from './Dropdown.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
- import './hasSlotController-bf769658.js';
5
+ import './hasSlotController-dbcac394.js';
6
6
  import './Button.js';
7
7
  import 'lit/directives/class-map.js';
8
8
  import 'lit/directives/if-defined.js';
package/dist/leu-icon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuIcon } from './Icon.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuIcon.define("leu-icon");
package/dist/leu-input.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuInput } from './Input.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/directives/if-defined.js';
@@ -1,5 +1,5 @@
1
1
  import { LeuMenuItem } from './MenuItem.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import './Icon.js';
package/dist/leu-menu.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuMenu } from './Menu.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import './MenuItem.js';
5
5
  import 'lit/directives/if-defined.js';
@@ -1,12 +1,12 @@
1
1
  import { LeuPagination } from './Pagination.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/live.js';
5
5
  import './Button.js';
6
6
  import 'lit/directives/class-map.js';
7
7
  import 'lit/directives/if-defined.js';
8
8
  import './Icon.js';
9
- import './hasSlotController-bf769658.js';
9
+ import './hasSlotController-dbcac394.js';
10
10
  import './VisuallyHidden.js';
11
11
 
12
12
  LeuPagination.define("leu-pagination");
package/dist/leu-popup.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuPopup } from './Popup.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import '@floating-ui/dom';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuRadioGroup } from './RadioGroup.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
 
package/dist/leu-radio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuRadio } from './Radio.js';
2
- import './LeuElement-519af050.js';
2
+ import './LeuElement-874a297c.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-519af050.js';
2
+ import './LeuElement-874a297c.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-519af050.js';
2
+ import './LeuElement-874a297c.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-bf769658.js';
8
+ import './hasSlotController-dbcac394.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-519af050.js';
2
+ import './LeuElement-874a297c.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-bf769658.js';
7
+ import './hasSlotController-dbcac394.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-519af050.js';
2
+ import './LeuElement-874a297c.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-519af050.js';
2
+ import './LeuElement-874a297c.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-bf769658.js';
12
+ import './hasSlotController-dbcac394.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-519af050.js';
2
+ import './LeuElement-874a297c.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.12.2",
4
+ "version": "0.13.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.12.2",
6
+ "version": "0.13.0",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -115,7 +115,7 @@ export class LeuTable extends LeuElement {
115
115
  this.sortOrderAsc = !this.sortOrderAsc
116
116
  } else {
117
117
  this.sortIndex = index
118
- this.sortOrder = "asc"
118
+ this.sortOrderAsc = false
119
119
  }
120
120
  }
121
121
 
@@ -125,10 +125,6 @@ export class LeuTable extends LeuElement {
125
125
  ></leu-icon>`
126
126
  }
127
127
 
128
- sortArrow(col) {
129
- return html` ${this.isSorted(col) ? this.sortArrowIcon() : nothing} `
130
- }
131
-
132
128
  get _columns() {
133
129
  return this.columns
134
130
  }
@@ -172,6 +168,26 @@ export class LeuTable extends LeuElement {
172
168
  sticky: this.firstColumnSticky,
173
169
  }
174
170
 
171
+ function headerStyle(col) {
172
+ if (col.headerStyle) {
173
+ return styleMap({
174
+ ...col.headerStyle(),
175
+ textAlign: col.align === "right" ? "right" : undefined,
176
+ })
177
+ }
178
+ return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing
179
+ }
180
+
181
+ function bodyStyle(col, row) {
182
+ if (col.style) {
183
+ return styleMap({
184
+ ...col.style(row),
185
+ textAlign: col.align === "right" ? "right" : undefined,
186
+ })
187
+ }
188
+ return col.align === "right" ? styleMap({ textAlign: "right" }) : nothing
189
+ }
190
+
175
191
  return html`
176
192
  <div
177
193
  class=${classMap(scrollClasses)}
@@ -183,15 +199,19 @@ export class LeuTable extends LeuElement {
183
199
  <tr>
184
200
  ${this._columns.map(
185
201
  (col) =>
186
- html`<th
187
- style=${col.headerStyle
188
- ? styleMap(col.headerStyle())
189
- : nothing}
190
- >
202
+ html`<th style=${headerStyle(col)}>
191
203
  ${col.sort
192
- ? html`<button @click=${(_) => this.sortClick(col)}>
204
+ ? html`<button
205
+ @click=${(_) => this.sortClick(col)}
206
+ class=${this.isSorted(col) ? "active" : nothing}
207
+ >
208
+ ${col.align === "right"
209
+ ? this.sortArrowIcon()
210
+ : nothing}
193
211
  <span>${col.name}</span>
194
- ${this.sortArrow(col)}
212
+ ${col.align !== "right"
213
+ ? this.sortArrowIcon()
214
+ : nothing}
195
215
  </button>`
196
216
  : col.name}
197
217
  </th>`
@@ -204,9 +224,7 @@ export class LeuTable extends LeuElement {
204
224
  html`<tr>
205
225
  ${this._columns.map(
206
226
  (col) =>
207
- html`<td
208
- style=${col.style ? styleMap(col.style(row)) : nothing}
209
- >
227
+ html`<td style=${bodyStyle(col, row)}>
210
228
  ${col.value(row)}
211
229
  </td>`
212
230
  )}
@@ -66,20 +66,30 @@ button {
66
66
  line-height: 1.5;
67
67
  padding: 0;
68
68
  border: 0;
69
- width: 100%;
70
- display: flex;
71
- align-items: flex-center;
72
69
  font-size: inherit;
73
70
  font-family: inherit;
74
71
  color: inherit;
75
72
  }
76
73
 
77
- thead leu-icon {
78
- --leu-icon-size: 1.25rem;
74
+ button span {
75
+ vertical-align: bottom;
76
+ }
79
77
 
78
+ button leu-icon {
79
+ --leu-icon-size: 1.25rem;
80
80
  display: inline-block;
81
- color: var(--leu-color-accent-blue);
82
81
  padding: 0;
82
+ opacity: 0;
83
+ vertical-align: bottom;
84
+ }
85
+
86
+ button:hover leu-icon {
87
+ opacity: 1;
88
+ }
89
+
90
+ button.active leu-icon {
91
+ color: var(--leu-color-accent-blue);
92
+ opacity: 1;
83
93
  }
84
94
 
85
95
  table.sticky td:first-child,
@@ -1 +0,0 @@
1
- {"version":3,"file":"LeuElement-519af050.d.ts","sourceRoot":"","sources":["LeuElement-519af050.js"],"names":[],"mappings":"AAsCA;IACE,8EAcC;CACF;AApDD,sEAaC;2BAf+B,KAAK"}