@statistikzh/leu 0.14.0 → 0.14.1

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 (129) hide show
  1. package/.storybook/preview.js +11 -0
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +0 -67
  4. package/dist/Accordion.d.ts +1 -1
  5. package/dist/Accordion.d.ts.map +1 -1
  6. package/dist/Accordion.js +7 -5
  7. package/dist/Button.d.ts +1 -1
  8. package/dist/Button.js +2 -2
  9. package/dist/ButtonGroup.d.ts +1 -1
  10. package/dist/ButtonGroup.js +1 -1
  11. package/dist/Checkbox.d.ts +1 -1
  12. package/dist/Checkbox.js +1 -1
  13. package/dist/CheckboxGroup.d.ts +1 -1
  14. package/dist/CheckboxGroup.js +1 -1
  15. package/dist/Chip.d.ts +1 -1
  16. package/dist/Chip.js +1 -1
  17. package/dist/ChipGroup.d.ts +1 -1
  18. package/dist/ChipGroup.js +1 -1
  19. package/dist/ChipLink.js +1 -1
  20. package/dist/ChipRemovable.js +1 -1
  21. package/dist/ChipSelectable.js +1 -1
  22. package/dist/Dialog.d.ts +1 -1
  23. package/dist/Dialog.js +2 -2
  24. package/dist/Dropdown.d.ts +1 -1
  25. package/dist/Dropdown.js +2 -2
  26. package/dist/Icon.d.ts +1 -1
  27. package/dist/Icon.js +1 -1
  28. package/dist/Input.d.ts +2 -2
  29. package/dist/Input.d.ts.map +1 -1
  30. package/dist/Input.js +4 -5
  31. package/dist/{LeuElement-BjGpKQpe.d.ts → LeuElement-DH0PPSMq.d.ts} +1 -1
  32. package/dist/LeuElement-DH0PPSMq.d.ts.map +1 -0
  33. package/dist/{LeuElement-BjGpKQpe.js → LeuElement-DH0PPSMq.js} +1 -1
  34. package/dist/Menu.d.ts +1 -1
  35. package/dist/Menu.js +1 -1
  36. package/dist/MenuItem.d.ts +1 -1
  37. package/dist/MenuItem.js +1 -1
  38. package/dist/Pagination.d.ts +1 -1
  39. package/dist/Pagination.js +2 -2
  40. package/dist/Popup.d.ts +1 -1
  41. package/dist/Popup.js +1 -1
  42. package/dist/Radio.d.ts +1 -1
  43. package/dist/Radio.js +1 -1
  44. package/dist/RadioGroup.d.ts +1 -1
  45. package/dist/RadioGroup.js +1 -1
  46. package/dist/Range.d.ts +1 -1
  47. package/dist/Range.js +1 -1
  48. package/dist/ScrollTop.d.ts +1 -1
  49. package/dist/ScrollTop.js +2 -2
  50. package/dist/Select.d.ts +1 -5
  51. package/dist/Select.d.ts.map +1 -1
  52. package/dist/Select.js +3 -16
  53. package/dist/Spinner.d.ts +1 -1
  54. package/dist/Spinner.js +1 -1
  55. package/dist/Table.d.ts +1 -1
  56. package/dist/Table.js +2 -2
  57. package/dist/VisuallyHidden.d.ts +1 -1
  58. package/dist/VisuallyHidden.js +1 -1
  59. package/dist/{hasSlotController-DvFw2NdC.d.ts → hasSlotController-CYd5tWew.d.ts} +1 -1
  60. package/dist/{hasSlotController-DvFw2NdC.d.ts.map → hasSlotController-CYd5tWew.d.ts.map} +1 -1
  61. package/dist/{hasSlotController-DvFw2NdC.js → hasSlotController-CYd5tWew.js} +1 -1
  62. package/dist/index.d.ts +1 -1
  63. package/dist/index.js +2 -2
  64. package/dist/leu-accordion.js +1 -1
  65. package/dist/leu-button-group.js +1 -1
  66. package/dist/leu-button.js +2 -2
  67. package/dist/leu-checkbox-group.js +1 -1
  68. package/dist/leu-checkbox.js +1 -1
  69. package/dist/leu-chip-group.js +1 -1
  70. package/dist/leu-chip-link.js +1 -1
  71. package/dist/leu-chip-removable.js +1 -1
  72. package/dist/leu-chip-selectable.js +1 -1
  73. package/dist/leu-dialog.js +2 -2
  74. package/dist/leu-dropdown.js +2 -2
  75. package/dist/leu-icon.js +1 -1
  76. package/dist/leu-input.js +1 -1
  77. package/dist/leu-menu-item.js +1 -1
  78. package/dist/leu-menu.js +1 -1
  79. package/dist/leu-pagination.js +2 -2
  80. package/dist/leu-popup.js +1 -1
  81. package/dist/leu-radio-group.js +1 -1
  82. package/dist/leu-radio.js +1 -1
  83. package/dist/leu-range.js +1 -1
  84. package/dist/leu-scroll-top.js +2 -2
  85. package/dist/leu-select.js +2 -2
  86. package/dist/leu-spinner.js +1 -1
  87. package/dist/leu-table.js +2 -2
  88. package/dist/leu-visually-hidden.js +1 -1
  89. package/dist/vscode.html-custom-data.json +1 -1
  90. package/dist/vue/index.d.ts +0 -1
  91. package/dist/web-types.json +2 -2
  92. package/package.json +3 -3
  93. package/scripts/generate-component/templates/stories/[name].stories.js +1 -1
  94. package/src/components/accordion/Accordion.js +1 -1
  95. package/src/components/accordion/accordion.css +6 -3
  96. package/src/components/accordion/stories/accordion.stories.js +7 -6
  97. package/src/components/button/stories/button.stories.js +1 -1
  98. package/src/components/button-group/stories/button-group.stories.js +1 -1
  99. package/src/components/checkbox/stories/checkbox-group.stories.js +1 -1
  100. package/src/components/checkbox/stories/checkbox.stories.js +1 -1
  101. package/src/components/chip/stories/chip-group.stories.js +1 -1
  102. package/src/components/chip/stories/chip-link.stories.js +1 -1
  103. package/src/components/chip/stories/chip-removable.stories.js +1 -1
  104. package/src/components/chip/stories/chip-selectable.stories.js +1 -1
  105. package/src/components/dialog/stories/dialog.stories.js +1 -1
  106. package/src/components/dropdown/stories/dropdown.stories.js +1 -1
  107. package/src/components/icon/stories/icon.stories.js +1 -1
  108. package/src/components/input/Input.js +1 -1
  109. package/src/components/input/input.css +2 -2
  110. package/src/components/input/stories/input.stories.js +1 -2
  111. package/src/components/menu/stories/menu-item.stories.js +1 -1
  112. package/src/components/menu/stories/menu.stories.js +1 -1
  113. package/src/components/pagination/stories/pagination.stories.js +1 -1
  114. package/src/components/popup/stories/popup.stories.js +1 -1
  115. package/src/components/radio/stories/radio-group.stories.js +1 -1
  116. package/src/components/radio/stories/radio.stories.js +1 -1
  117. package/src/components/range/stories/range-slider.stories.js +1 -1
  118. package/src/components/scroll-top/stories/scroll-top.stories.js +1 -1
  119. package/src/components/select/Select.js +1 -17
  120. package/src/components/select/stories/select.stories.js +2 -2
  121. package/src/components/spinner/stories/spinner.stories.js +1 -1
  122. package/src/components/table/stories/table.stories.js +1 -1
  123. package/src/components/visually-hidden/stories/visually-hidden.stories.js +1 -1
  124. package/src/docs/contributing.mdx +154 -0
  125. package/src/docs/installation.mdx +35 -0
  126. package/src/docs/theme.mdx +349 -0
  127. package/src/docs/usage.mdx +73 -0
  128. package/src/styles/style.stories.js +1 -1
  129. package/dist/LeuElement-BjGpKQpe.d.ts.map +0 -1
package/dist/Select.js CHANGED
@@ -1,9 +1,9 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-BjGpKQpe.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
6
+ import { H as HasSlotController } from './hasSlotController-CYd5tWew.js';
7
7
  import { LeuButton } from './Button.js';
8
8
  import { LeuMenu } from './Menu.js';
9
9
  import { LeuMenuItem } from './MenuItem.js';
@@ -557,15 +557,6 @@ class LeuSelect extends LeuElement {
557
557
  this._closeDropdown();
558
558
  }
559
559
  }
560
-
561
- /**
562
- * Close the dropdown if the focus moves outside the component.
563
- */
564
- _handlePopupFocusOut(event) {
565
- if (!this.contains(event.relatedTarget) && !this.shadowRoot.contains(event.relatedTarget)) {
566
- this._closeDropdown();
567
- }
568
- }
569
560
  _renderFilterInput() {
570
561
  if (this.filterable) {
571
562
  return html` <leu-input
@@ -657,11 +648,7 @@ class LeuSelect extends LeuElement {
657
648
  autoSizePadding="8"
658
649
  >
659
650
  ${this._renderToggleButton()}
660
- <div
661
- id="select-popup"
662
- class="select-menu-container"
663
- @focusout=${this._handlePopupFocusOut}
664
- >
651
+ <div id="select-popup" class="select-menu-container">
665
652
  <slot name="before" class="before"></slot>
666
653
  ${this._renderFilterInput()}
667
654
  <leu-menu
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-BjGpKQpe.js';
8
+ import { L as LeuElement } from './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-DH0PPSMq.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
@@ -38,5 +38,5 @@ export class LeuTable extends LeuElement {
38
38
  get _data(): any[];
39
39
  render(): import("lit-html").TemplateResult<1>;
40
40
  }
41
- import { L as LeuElement } from './LeuElement-BjGpKQpe.js';
41
+ import { L as LeuElement } from './LeuElement-DH0PPSMq.js';
42
42
  //# sourceMappingURL=Table.d.ts.map
package/dist/Table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-BjGpKQpe.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
11
+ import './hasSlotController-CYd5tWew.js';
12
12
  import './VisuallyHidden.js';
13
13
 
14
14
  var css_248z = css`:host {
@@ -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-BjGpKQpe.js';
7
+ import { L as LeuElement } from './LeuElement-DH0PPSMq.js';
8
8
  //# sourceMappingURL=VisuallyHidden.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-BjGpKQpe.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-DH0PPSMq.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-DvFw2NdC.d.ts.map
38
+ //# sourceMappingURL=hasSlotController-CYd5tWew.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasSlotController-DvFw2NdC.d.ts","sourceRoot":"","sources":["hasSlotController-DvFw2NdC.js"],"names":[],"mappings":";;;;iCASa,OAAO,KAAK,EAAE,kBAAkB;AAP7C;;;GAGG;AAEH;;;;GAIG;AACH,2CAFgB,kBAAkB;IAGhC,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-CYd5tWew.d.ts","sourceRoot":"","sources":["hasSlotController-CYd5tWew.js"],"names":[],"mappings":";;;;iCASa,OAAO,KAAK,EAAE,kBAAkB;AAP7C;;;GAGG;AAEH;;;;GAIG;AACH,2CAFgB,kBAAkB;IAGhC,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-BjGpKQpe.js';
1
+ import { _ as _defineProperty } from './LeuElement-DH0PPSMq.js';
2
2
 
3
3
  /**
4
4
  * Thanks Shoelace!
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export { LeuRadio } from "./Radio.js";
15
15
  export { LeuRadioGroup } from "./RadioGroup.js";
16
16
  export { LeuSelect } from "./Select.js";
17
17
  export { LeuTable } from "./Table.js";
18
- export { L as LeuElement } from "./LeuElement-BjGpKQpe.js";
18
+ export { L as LeuElement } from "./LeuElement-DH0PPSMq.js";
19
19
  export { BUTTON_EXPANDED_OPTIONS, BUTTON_SIZES, BUTTON_TYPES, BUTTON_VARIANTS, LeuButton } from "./Button.js";
20
20
  export { LeuInput, SIZES } from "./Input.js";
21
21
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -17,13 +17,13 @@ export { LeuRadio } from './Radio.js';
17
17
  export { LeuRadioGroup } from './RadioGroup.js';
18
18
  export { LeuSelect } from './Select.js';
19
19
  export { LeuTable } from './Table.js';
20
- export { L as LeuElement } from './LeuElement-BjGpKQpe.js';
20
+ export { L as LeuElement } from './LeuElement-DH0PPSMq.js';
21
21
  import 'lit';
22
22
  import 'lit/static-html.js';
23
23
  import 'lit/directives/class-map.js';
24
24
  import 'lit/directives/if-defined.js';
25
25
  import './Icon.js';
26
- import './hasSlotController-DvFw2NdC.js';
26
+ import './hasSlotController-CYd5tWew.js';
27
27
  import './Chip.js';
28
28
  import 'lit/directives/ref.js';
29
29
  import 'lit/directives/live.js';
@@ -1,5 +1,5 @@
1
1
  import { LeuAccordion } from './Accordion.js';
2
- import './LeuElement-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.js';
3
3
  import 'lit';
4
4
  import 'lit/static-html.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { LeuButtonGroup } from './ButtonGroup.js';
2
- import './LeuElement-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
7
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/class-map.js';
6
- import './hasSlotController-DvFw2NdC.js';
6
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
- import './hasSlotController-DvFw2NdC.js';
5
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
9
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
8
+ import './hasSlotController-CYd5tWew.js';
9
9
 
10
10
  LeuScrollTop.define("leu-scroll-top");
11
11
 
@@ -1,10 +1,10 @@
1
1
  import { LeuSelect } from './Select.js';
2
- import './LeuElement-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
7
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.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-DvFw2NdC.js';
12
+ import './hasSlotController-CYd5tWew.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-BjGpKQpe.js';
2
+ import './LeuElement-DH0PPSMq.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuVisuallyHidden.define("leu-visually-hidden");
@@ -561,7 +561,7 @@
561
561
  },
562
562
  {
563
563
  "name": "leu-select",
564
- "description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.\n- **_handlePopupFocusOut(event)** - Close the dropdown if the focus moves outside the component.\n\n### **Slots:**\n - **before** - Optional content the appears before the option list\n- **after** - Optional content the appears after the option list",
564
+ "description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.\n\n### **Slots:**\n - **before** - Optional content the appears before the option list\n- **after** - Optional content the appears after the option list",
565
565
  "attributes": [
566
566
  {
567
567
  "name": "value",
@@ -665,7 +665,6 @@ export type CustomElements = {
665
665
  * - Hide menu items that do not match the filter.
666
666
  * - **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.
667
667
  * - **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.
668
- * - **_handlePopupFocusOut(event)** - Close the dropdown if the focus moves outside the component.
669
668
  *
670
669
  * ### **Slots:**
671
670
  * - **before** - Optional content the appears before the option list
@@ -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.14.0",
4
+ "version": "0.14.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1119,7 +1119,7 @@
1119
1119
  },
1120
1120
  {
1121
1121
  "name": "leu-select",
1122
- "description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.\n- **_handlePopupFocusOut(event)** - Close the dropdown if the focus moves outside the component.\n\n### **Slots:**\n - **before** - Optional content the appears before the option list\n- **after** - Optional content the appears after the option list",
1122
+ "description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.\n\n### **Slots:**\n - **before** - Optional content the appears before the option list\n- **after** - Optional content the appears after the option list",
1123
1123
  "doc-url": "",
1124
1124
  "attributes": [
1125
1125
  {
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.14.0",
6
+ "version": "0.14.1",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -31,12 +31,12 @@
31
31
  "watch:css": "nodemon --watch 'src/styles/*' -e css --exec npm run build:css",
32
32
  "lint": "npm run lint:eslint && npm run lint:prettier",
33
33
  "lint:eslint": "eslint --ext .js,.mjs,.html . --ignore-path .gitignore ",
34
- "lint:prettier": "prettier \"**/*.{js,mjs,md,html,json}\" --check",
34
+ "lint:prettier": "prettier \"**/*.{js,mjs,md,mdx,html,json}\" --check",
35
35
  "lint:stylelint": "stylelint \"**/*.{js,css}\" --ignore-path .gitignore",
36
36
  "lint:types": "tsc",
37
37
  "format": "npm run format:eslint && npm run format:prettier",
38
38
  "format:eslint": "eslint --ext .js,.mjs,.html . --fix --ignore-path .gitignore",
39
- "format:prettier": "prettier \"**/*.{js,mjs,md,html,json}\" --write",
39
+ "format:prettier": "prettier \"**/*.{js,mjs,md,mdx,html,json}\" --write",
40
40
  "test": "web-test-runner --coverage",
41
41
  "test:watch": "web-test-runner --watch",
42
42
  "prepare": "husky",
@@ -2,7 +2,7 @@ import { html } from "lit"
2
2
  import "../[namespace]-[name].js"
3
3
 
4
4
  export default {
5
- title: "[Name]",
5
+ title: "Components/[Name]",
6
6
  component: "[namespace]-[name]",
7
7
  }
8
8
 
@@ -49,7 +49,7 @@ export class LeuAccordion extends LeuElement {
49
49
  _getHeadingTag() {
50
50
  let level = 2
51
51
  if (this.headingLevel > 0 && this.headingLevel < 7) {
52
- level = this.headingLevel
52
+ level = Math.floor(this.headingLevel)
53
53
  }
54
54
 
55
55
  return `h${level}`
@@ -27,7 +27,7 @@
27
27
  width: 100%;
28
28
  background: none;
29
29
  padding: 1rem 0;
30
- margin: none;
30
+ margin: 0;
31
31
  cursor: pointer;
32
32
 
33
33
  border: none;
@@ -114,6 +114,8 @@
114
114
 
115
115
  .contentwrapper[hidden] {
116
116
  grid-template-rows: 0fr;
117
+ opacity: 0;
118
+ visibility: hidden;
117
119
  }
118
120
 
119
121
  slot[name="content"] {
@@ -130,7 +132,6 @@ slot[name="content"] {
130
132
  }
131
133
 
132
134
  .divider {
133
-
134
135
  width: 100%;
135
136
  height: 1px;
136
137
  margin: 0;
@@ -138,7 +139,9 @@ slot[name="content"] {
138
139
  border: none;
139
140
  background-color: var(--divider-color);
140
141
 
141
- transition: transform var(--transition), background-color var(--transition);
142
+ transition:
143
+ transform var(--transition),
144
+ background-color var(--transition);
142
145
  }
143
146
 
144
147
  :host(:not([open])) .heading:is(:hover, :focus-visible) ~ .divider {
@@ -4,10 +4,10 @@ import { ifDefined } from "lit/directives/if-defined.js"
4
4
  import "../leu-accordion.js"
5
5
 
6
6
  export default {
7
- title: "Accordion",
7
+ title: "Components/Accordion",
8
8
  component: "leu-accordion",
9
9
  argTypes: {
10
- headingLevel: {
10
+ "heading-level": {
11
11
  control: "select",
12
12
  options: [1, 2, 3, 4, 5, 6],
13
13
  },
@@ -27,9 +27,10 @@ export default {
27
27
 
28
28
  function Template(args) {
29
29
  return html` <leu-accordion
30
- heading-level=${ifDefined(args.headingLevel)}
30
+ heading-level=${ifDefined(args["heading-level"])}
31
31
  label=${ifDefined(args.label)}
32
- label-prefix=${ifDefined(args.labelPrefix)}
32
+ label-prefix=${ifDefined(args["label-prefix"])}
33
+ ?open=${args.open}
33
34
  >
34
35
  <div slot="content">${args.content}</div>
35
36
  </leu-accordion>`
@@ -37,7 +38,7 @@ function Template(args) {
37
38
 
38
39
  export const Regular = Template.bind({})
39
40
  Regular.args = {
40
- headingLevel: 2,
41
+ "heading-level": 2,
41
42
  label:
42
43
  "Akkordeontitel der lang und noch länger werden kann und dann umbricht",
43
44
  content: `Regular Interessierte können ab sofort die Genauigkeit ihrer Smartphones
@@ -55,5 +56,5 @@ Regular.args = {
55
56
  export const Prefix = Template.bind({})
56
57
  Prefix.args = {
57
58
  ...Regular.args,
58
- labelPrefix: "01",
59
+ "label-prefix": "01",
59
60
  }
@@ -16,7 +16,7 @@ function copyContent(e) {
16
16
  }
17
17
 
18
18
  export default {
19
- title: "Button",
19
+ title: "Components/Button",
20
20
  component: "leu-button",
21
21
  parameters: {
22
22
  design: {
@@ -13,7 +13,7 @@ function updateStorybookArgss(id, args) {
13
13
  }
14
14
 
15
15
  export default {
16
- title: "ButtonGroup",
16
+ title: "Components/ButtonGroup",
17
17
  component: "leu-button-group",
18
18
  parameters: {
19
19
  design: {
@@ -4,7 +4,7 @@ import "../leu-checkbox-group.js"
4
4
  import { ifDefined } from "lit/directives/if-defined.js"
5
5
 
6
6
  export default {
7
- title: "Checkbox/Group",
7
+ title: "Components/Checkbox/Group",
8
8
  component: "leu-checkbox-group",
9
9
  argTypes: {
10
10
  legend: { control: "text" },
@@ -2,7 +2,7 @@ import { html } from "lit"
2
2
  import "../leu-checkbox.js"
3
3
 
4
4
  export default {
5
- title: "Checkbox",
5
+ title: "Components/Checkbox",
6
6
  component: "leu-checkbox",
7
7
  argTypes: {
8
8
  label: {
@@ -11,7 +11,7 @@ import { SELECTION_MODES } from "../ChipGroup.js"
11
11
  import { VARIANTS as SELECTABLE_VARIANTS } from "../ChipSelectable.js"
12
12
 
13
13
  export default {
14
- title: "Chip/Group",
14
+ title: "Components/Chip/Group",
15
15
  component: "leu-chip-group",
16
16
  argTypes: {
17
17
  selectionMode: {
@@ -6,7 +6,7 @@ import "../leu-chip-link.js"
6
6
  import { SIZES } from "../ChipLink.js"
7
7
 
8
8
  export default {
9
- title: "Chip/Link",
9
+ title: "Components/Chip/Link",
10
10
  component: "leu-chip-link",
11
11
  argTypes: {
12
12
  size: { control: "select", options: Object.values(SIZES) },
@@ -4,7 +4,7 @@ import { action } from "@storybook/addon-actions"
4
4
  import "../leu-chip-removable.js"
5
5
 
6
6
  export default {
7
- title: "Chip/Removable",
7
+ title: "Components/Chip/Removable",
8
8
  component: "leu-chip-removable",
9
9
  args: {
10
10
  label: "Daten",