@statistikzh/leu 0.8.0 → 0.10.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 (139) hide show
  1. package/.github/workflows/release-please.yml +3 -3
  2. package/CHANGELOG.md +34 -0
  3. package/dist/Accordion.d.ts +1 -1
  4. package/dist/Accordion.js +1 -1
  5. package/dist/Breadcrumb.d.ts +1 -1
  6. package/dist/Breadcrumb.js +1 -1
  7. package/dist/Button.d.ts +45 -1
  8. package/dist/Button.d.ts.map +1 -1
  9. package/dist/Button.js +473 -6
  10. package/dist/ButtonGroup.d.ts +1 -1
  11. package/dist/ButtonGroup.js +1 -1
  12. package/dist/Checkbox.d.ts +1 -1
  13. package/dist/Checkbox.js +2 -2
  14. package/dist/CheckboxGroup.d.ts +1 -1
  15. package/dist/CheckboxGroup.js +1 -1
  16. package/dist/Chip.d.ts +1 -1
  17. package/dist/Chip.js +1 -1
  18. package/dist/ChipGroup.d.ts +1 -1
  19. package/dist/ChipGroup.js +2 -2
  20. package/dist/ChipLink.js +1 -1
  21. package/dist/ChipRemovable.js +1 -1
  22. package/dist/ChipSelectable.js +1 -1
  23. package/dist/Dialog.d.ts +17 -0
  24. package/dist/Dialog.d.ts.map +1 -0
  25. package/dist/Dialog.js +255 -0
  26. package/dist/Dropdown.d.ts +1 -1
  27. package/dist/Dropdown.d.ts.map +1 -1
  28. package/dist/Dropdown.js +4 -3
  29. package/dist/Icon.d.ts +1 -1
  30. package/dist/Icon.js +1 -1
  31. package/dist/Input.d.ts +1 -1
  32. package/dist/Input.d.ts.map +1 -1
  33. package/dist/Input.js +3 -1
  34. package/dist/{LeuElement-a20c5fd6.d.ts → LeuElement-6fbc0dee.d.ts} +1 -1
  35. package/dist/LeuElement-6fbc0dee.d.ts.map +1 -0
  36. package/dist/{LeuElement-a20c5fd6.js → LeuElement-6fbc0dee.js} +1 -1
  37. package/dist/Menu.d.ts +1 -1
  38. package/dist/Menu.js +1 -1
  39. package/dist/MenuItem.d.ts +5 -1
  40. package/dist/MenuItem.d.ts.map +1 -1
  41. package/dist/MenuItem.js +18 -3
  42. package/dist/Pagination.d.ts +1 -1
  43. package/dist/Pagination.d.ts.map +1 -1
  44. package/dist/Pagination.js +3 -2
  45. package/dist/Popup.d.ts +1 -1
  46. package/dist/Popup.js +1 -1
  47. package/dist/Radio.d.ts +1 -1
  48. package/dist/Radio.js +2 -2
  49. package/dist/RadioGroup.d.ts +1 -1
  50. package/dist/RadioGroup.js +1 -1
  51. package/dist/ScrollTop.d.ts +1 -1
  52. package/dist/ScrollTop.d.ts.map +1 -1
  53. package/dist/ScrollTop.js +3 -2
  54. package/dist/Select.d.ts +1 -1
  55. package/dist/Select.d.ts.map +1 -1
  56. package/dist/Select.js +10 -5
  57. package/dist/Spinner.d.ts +9 -0
  58. package/dist/Spinner.d.ts.map +1 -0
  59. package/dist/Spinner.js +53 -0
  60. package/dist/Table.d.ts +1 -1
  61. package/dist/Table.d.ts.map +1 -1
  62. package/dist/Table.js +3 -2
  63. package/dist/VisuallyHidden.d.ts +1 -1
  64. package/dist/VisuallyHidden.js +1 -1
  65. package/dist/hasSlotController-04d0dfa2.d.ts +38 -0
  66. package/dist/hasSlotController-04d0dfa2.d.ts.map +1 -0
  67. package/dist/hasSlotController-04d0dfa2.js +75 -0
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +3 -2
  70. package/dist/leu-accordion.js +1 -1
  71. package/dist/leu-breadcrumb.js +1 -1
  72. package/dist/leu-button-group.js +1 -1
  73. package/dist/leu-button.d.ts +1 -1
  74. package/dist/leu-button.d.ts.map +1 -1
  75. package/dist/leu-button.js +3 -2
  76. package/dist/leu-checkbox-group.js +1 -1
  77. package/dist/leu-checkbox.js +1 -1
  78. package/dist/leu-chip-group.js +1 -1
  79. package/dist/leu-chip-link.js +1 -1
  80. package/dist/leu-chip-removable.js +1 -1
  81. package/dist/leu-chip-selectable.js +1 -1
  82. package/dist/leu-dialog.d.ts +3 -0
  83. package/dist/leu-dialog.d.ts.map +1 -0
  84. package/dist/leu-dialog.js +11 -0
  85. package/dist/leu-dropdown.js +3 -2
  86. package/dist/leu-icon.js +1 -1
  87. package/dist/leu-input.js +1 -1
  88. package/dist/leu-menu-item.js +1 -1
  89. package/dist/leu-menu.js +1 -1
  90. package/dist/leu-pagination.js +3 -2
  91. package/dist/leu-popup.js +1 -1
  92. package/dist/leu-radio-group.js +1 -1
  93. package/dist/leu-radio.js +1 -1
  94. package/dist/leu-scroll-top.js +3 -2
  95. package/dist/leu-select.js +3 -2
  96. package/dist/leu-spinner.d.ts +3 -0
  97. package/dist/leu-spinner.d.ts.map +1 -0
  98. package/dist/leu-spinner.js +7 -0
  99. package/dist/leu-table.js +3 -2
  100. package/dist/leu-visually-hidden.js +1 -1
  101. package/dist/theme.css +370 -217
  102. package/dist/vscode.html-custom-data.json +31 -0
  103. package/dist/vue/index.d.ts +34 -0
  104. package/dist/web-types.json +47 -1
  105. package/package.json +1 -1
  106. package/rollup.config.js +4 -1
  107. package/scripts/generate-component/templates/[namespace]-[name].js +1 -2
  108. package/scripts/postcss-leu-font-styles.cjs +29 -35
  109. package/src/components/button/button.css +2 -3
  110. package/src/components/checkbox/Checkbox.js +1 -1
  111. package/src/components/checkbox/stories/checkbox.stories.js +7 -2
  112. package/src/components/chip/chip-group.css +1 -1
  113. package/src/components/dialog/Dialog.js +100 -0
  114. package/src/components/dialog/dialog.css +162 -0
  115. package/src/components/dialog/leu-dialog.js +5 -0
  116. package/src/components/dialog/stories/dialog.stories.js +144 -0
  117. package/src/components/dialog/test/dialog.test.js +85 -0
  118. package/src/components/dropdown/Dropdown.js +1 -1
  119. package/src/components/dropdown/test/dropdown.test.js +20 -3
  120. package/src/components/input/input.css +2 -0
  121. package/src/components/menu/MenuItem.js +21 -2
  122. package/src/components/menu/stories/menu-item.stories.js +18 -8
  123. package/src/components/menu/test/menu-item.test.js +23 -0
  124. package/src/components/radio/Radio.js +1 -1
  125. package/src/components/radio/stories/radio.stories.js +7 -1
  126. package/src/components/select/Select.js +8 -6
  127. package/src/components/select/test/select.test.js +30 -0
  128. package/src/components/spinner/Spinner.js +31 -0
  129. package/src/components/spinner/leu-spinner.js +5 -0
  130. package/src/components/spinner/spinner.css +20 -0
  131. package/src/components/spinner/stories/spinner.stories.js +29 -0
  132. package/src/components/spinner/test/spinner.test.js +30 -0
  133. package/src/styles/custom-properties.css +35 -3
  134. package/src/styles/font-definitions.json +27 -19
  135. package/src/styles/style.stories.js +61 -0
  136. package/dist/Button-3adfb3ed.d.ts +0 -83
  137. package/dist/Button-3adfb3ed.d.ts.map +0 -1
  138. package/dist/Button-3adfb3ed.js +0 -545
  139. package/dist/LeuElement-a20c5fd6.d.ts.map +0 -1
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-a20c5fd6.js';
134
+ import { L as LeuElement } from './LeuElement-6fbc0dee.js';
135
135
  import { nothing } from 'lit';
136
136
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmDC;IACD,wCAKC;IA4BC,cAAiB;IACjB,kBAAqB;IAErB,kBAAqB;IACrB,mBAAsB;IACtB,oBAAuB;IACvB,aAAe;IACf,cAAe;IACf,aAAc;IAEd,gBAAgB;IAChB,sBAAuB;IAEvB,gBAAgB;IAChB,2BAA6B;IAE7B,gBAAgB;IAChB,6BAAgC;IAEhC,gBAAgB;IAChB,sBAAuB;IAEvB;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,KAAmC,CAE1C;IACnC;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAE1B;IAEnC;;OAEG;IACH,UAFU,OAAO,oBAAoB,EAAE,GAAG,KAAgC,CAE/C;IAU7B,sCAoBC;IAED;;;;OAIG;IACH,8CA0BC;IACD;;;OAGG;IACH,4BAFW,aAAa,iBAcvB;IAED;;;OAGG;IACH,iCAFW,aAAa,QAQvB;IAED;;;OAGG;IACH,oBAFa,uBAAgB,CAO5B;IACD,wBAMC;IACD,yBAMC;IACD,8BAOC;IACD,wBAIC;IACD,uBAMC;IACD,qCAEC;IAED;;;;OAIG;IACH,4CAEC;IACD,uCAoBC;IAED;;OAEG;IACH,uCAIC;IACD,4EAaC;IACD,4EAeC;IACD,4DAmCC;IACD,+CAmDC;CACF;gCA7qBqD,0BAA0B;wBAC7C,KAAK"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AA8PA;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmDC;IACD,wCAKC;IA4BC,cAAiB;IACjB,kBAAqB;IAErB,kBAAqB;IACrB,mBAAsB;IACtB,oBAAuB;IACvB,aAAe;IACf,cAAe;IACf,aAAc;IAEd,gBAAgB;IAChB,sBAAuB;IAEvB,gBAAgB;IAChB,2BAA6B;IAE7B,gBAAgB;IAChB,6BAAgC;IAEhC,gBAAgB;IAChB,sBAAuB;IAEvB;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,KAAmC,CAE1C;IACnC;;OAEG;IACH,kBAFU,OAAO,oBAAoB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAE1B;IAEnC;;OAEG;IACH,UAFU,OAAO,oBAAoB,EAAE,GAAG,KAAgC,CAE/C;IAU7B,sCAqBC;IAED;;;;OAIG;IACH,8CA6BC;IACD;;;OAGG;IACH,4BAFW,aAAa,iBAcvB;IAED;;;OAGG;IACH,iCAFW,aAAa,QAQvB;IAED;;;OAGG;IACH,oBAFa,uBAAgB,CAO5B;IACD,wBAMC;IACD,yBAMC;IACD,8BAOC;IACD,wBAIC;IACD,uBAMC;IACD,qCAEC;IAED;;;;OAIG;IACH,4CAEC;IACD,uCAoBC;IAED;;OAEG;IACH,uCAIC;IACD,4EAaC;IACD,4EAeC;IACD,4DAmCC;IACD,+CAmDC;CACF;gCAlrBqD,0BAA0B;wBAC7C,KAAK"}
package/dist/Select.js CHANGED
@@ -1,9 +1,10 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-a20c5fd6.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-6fbc0dee.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, L as LeuButton } from './Button-3adfb3ed.js';
6
+ import { H as HasSlotController } from './hasSlotController-04d0dfa2.js';
7
+ import { LeuButton } from './Button.js';
7
8
  import { LeuMenu } from './Menu.js';
8
9
  import { LeuMenuItem } from './MenuItem.js';
9
10
  import { LeuIcon } from './Icon.js';
@@ -338,7 +339,7 @@ class LeuSelect extends LeuElement {
338
339
  * @param {MouseEvent} event
339
340
  */
340
341
  _defineProperty(this, "_handleDocumentClick", event => {
341
- if (event.target instanceof Node && !this.contains(event.target) && this.open) {
342
+ if (!event.composedPath().includes(this) && this.open) {
342
343
  this._closeDropdown();
343
344
  }
344
345
  });
@@ -409,10 +410,11 @@ class LeuSelect extends LeuElement {
409
410
  // CAN be called with undefined.
410
411
  this._toggleButtonRef.value?.focus();
411
412
  }
412
- if (changedProperties.has("value") || changedProperties.has("_optionFilter")) {
413
+ if (changedProperties.has("value") || changedProperties.has("_optionFilter") || changedProperties.has("multiple")) {
413
414
  this._updateMenuItems({
414
415
  value: changedProperties.has("value"),
415
- optionFilter: changedProperties.has("_optionFilter")
416
+ optionFilter: changedProperties.has("_optionFilter"),
417
+ multiple: changedProperties.has("multiple")
416
418
  });
417
419
  }
418
420
  }
@@ -431,6 +433,9 @@ class LeuSelect extends LeuElement {
431
433
 
432
434
  /* eslint-disable no-param-reassign */
433
435
  menuItems.forEach(menuItem => {
436
+ if (changed.multiple) {
437
+ menuItem.multipleSelection = this.multiple;
438
+ }
434
439
  if (changed.optionFilter) {
435
440
  menuItem.hidden = this._optionFilter !== "" && !menuItem.textContent.toLowerCase().includes(this._optionFilter.toLowerCase());
436
441
  hasFilterResults = hasFilterResults || !menuItem.hidden;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @tagname leu-spinner
3
+ * @cssprop --leu-spinner-size - The size of the spinner.
4
+ */
5
+ export class LeuSpinner extends LeuElement {
6
+ render(): import("lit-html").TemplateResult<1>;
7
+ }
8
+ import { L as LeuElement } from './LeuElement-6fbc0dee.js';
9
+ //# sourceMappingURL=Spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["Spinner.js"],"names":[],"mappings":"AA2BA;;;GAGG;AACH;IACE,+CAgBC;CACF;gCAjDqD,0BAA0B"}
@@ -0,0 +1,53 @@
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-6fbc0dee.js';
2
+ import { css, html } from 'lit';
3
+
4
+ var css_248z = css`@keyframes leu-spinner-rotate {
5
+ from {
6
+ transform: rotate(0deg);
7
+ }
8
+
9
+ to {
10
+ transform: rotate(360deg);
11
+ }
12
+ }
13
+
14
+ :host {
15
+ color: var(--leu-color-func-cyan);
16
+ }
17
+
18
+ .spinner {
19
+ display: block;
20
+ width: 3.5rem;
21
+ width: var(--leu-spinner-size, 3.5rem);
22
+ height: 3.5rem;
23
+ height: var(--leu-spinner-size, 3.5rem);
24
+ animation: leu-spinner-rotate 1s cubic-bezier(0.49, 0.12, 0.56, 0.91) infinite;
25
+ }
26
+ `;
27
+
28
+ /**
29
+ * @tagname leu-spinner
30
+ * @cssprop --leu-spinner-size - The size of the spinner.
31
+ */
32
+ class LeuSpinner extends LeuElement {
33
+ render() {
34
+ return html`
35
+ <svg
36
+ class="spinner"
37
+ fill="none"
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ viewBox="0 0 56 56"
40
+ role="presentation"
41
+ >
42
+ <path
43
+ d="M13.8579 13.858c7.8105-7.8105 20.4737-7.8105 28.2842 0 7.8105 7.8104 7.8105 20.4737 0 28.2842-7.8105 7.8105-20.4737 7.8105-28.2842 0-4.3487-4.3486-6.2761-10.2016-5.7824-15.8838"
44
+ stroke="currentColor"
45
+ stroke-width="3"
46
+ />
47
+ </svg>
48
+ `;
49
+ }
50
+ }
51
+ _defineProperty(LeuSpinner, "styles", css_248z);
52
+
53
+ export { LeuSpinner };
package/dist/Table.d.ts CHANGED
@@ -40,5 +40,5 @@ export class LeuTable extends LeuElement {
40
40
  get _data(): any[];
41
41
  render(): import("lit-html").TemplateResult<1>;
42
42
  }
43
- import { L as LeuElement } from './LeuElement-a20c5fd6.js';
43
+ import { L as LeuElement } from './LeuElement-6fbc0dee.js';
44
44
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["Table.js"],"names":[],"mappings":"AAoHA;;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,+CA6DC;CACF;gCAlRqD,0BAA0B"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["Table.js"],"names":[],"mappings":"AAqHA;;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,+CA6DC;CACF;gCAnRqD,0BAA0B"}
package/dist/Table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-a20c5fd6.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-6fbc0dee.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';
@@ -6,8 +6,9 @@ import { createRef, ref } from 'lit/directives/ref.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
  import { LeuPagination } from './Pagination.js';
8
8
  import 'lit/directives/live.js';
9
- import './Button-3adfb3ed.js';
9
+ import './Button.js';
10
10
  import 'lit/directives/if-defined.js';
11
+ import './hasSlotController-04d0dfa2.js';
11
12
  import './VisuallyHidden.js';
12
13
 
13
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-a20c5fd6.js';
7
+ import { L as LeuElement } from './LeuElement-6fbc0dee.js';
8
8
  //# sourceMappingURL=VisuallyHidden.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, L as LeuElement } from './LeuElement-a20c5fd6.js';
1
+ import { _ as _defineProperty, L as LeuElement } from './LeuElement-6fbc0dee.js';
2
2
  import { css, html } from 'lit';
3
3
 
4
4
  var css_248z = css`:host {
@@ -0,0 +1,38 @@
1
+ export { HasSlotController as H };
2
+ /**
3
+ * A reactive controller that determines when slots exist.
4
+ */
5
+ export type ReactiveController = import("lit").ReactiveController;
6
+ /**
7
+ * Thanks Shoelace!
8
+ * Source: https://github.com/shoelace-style/shoelace/blob/next/src/internal/slot.ts
9
+ */
10
+ /**
11
+ * A reactive controller that determines when slots exist.
12
+ * @typedef {import("lit").ReactiveController} ReactiveController
13
+ * @implements {ReactiveController}
14
+ */
15
+ declare class HasSlotController implements ReactiveController {
16
+ constructor(host: any, slotNames: any);
17
+ host: any;
18
+ slotNames: any;
19
+ /**
20
+ * @private
21
+ * @returns {Boolean}
22
+ */
23
+ private hasDefaultSlot;
24
+ /**
25
+ * @private
26
+ * @param {String} name
27
+ * @returns {Boolean}
28
+ */
29
+ private hasNamedSlot;
30
+ /**
31
+ * @param {String} slotName
32
+ * @returns {Boolean}
33
+ */
34
+ test(slotName: string): boolean;
35
+ hostConnected(): void;
36
+ hostDisconnected(): void;
37
+ }
38
+ //# sourceMappingURL=hasSlotController-04d0dfa2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasSlotController-04d0dfa2.d.ts","sourceRoot":"","sources":["hasSlotController-04d0dfa2.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"}
@@ -0,0 +1,75 @@
1
+ import { _ as _defineProperty } from './LeuElement-6fbc0dee.js';
2
+
3
+ /**
4
+ * Thanks Shoelace!
5
+ * Source: https://github.com/shoelace-style/shoelace/blob/next/src/internal/slot.ts
6
+ */
7
+
8
+ /**
9
+ * A reactive controller that determines when slots exist.
10
+ * @typedef {import("lit").ReactiveController} ReactiveController
11
+ * @implements {ReactiveController}
12
+ */
13
+ class HasSlotController {
14
+ constructor(host, slotNames) {
15
+ /**
16
+ * @private
17
+ * @param {Event} event
18
+ */
19
+ _defineProperty(this, "handleSlotChange", event => {
20
+ const slot = event.target;
21
+ if (slot instanceof HTMLSlotElement && (this.slotNames.includes("[default]") && !slot.name || slot.name && this.slotNames.includes(slot.name))) {
22
+ this.host.requestUpdate();
23
+ }
24
+ });
25
+ this.host = host;
26
+ host.addController(this);
27
+ this.slotNames = slotNames;
28
+ }
29
+
30
+ /**
31
+ * @private
32
+ * @returns {Boolean}
33
+ */
34
+ hasDefaultSlot() {
35
+ return [...this.host.childNodes].some(node => {
36
+ if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== "") {
37
+ return true;
38
+ }
39
+ if (node.nodeType === node.ELEMENT_NODE) {
40
+ const el = node;
41
+
42
+ // If it doesn't have a slot attribute, it's part of the default slot
43
+ if (!el.hasAttribute("slot")) {
44
+ return true;
45
+ }
46
+ }
47
+ return false;
48
+ });
49
+ }
50
+
51
+ /**
52
+ * @private
53
+ * @param {String} name
54
+ * @returns {Boolean}
55
+ */
56
+ hasNamedSlot(name) {
57
+ return this.host.querySelector(`:scope > [slot="${name}"]`) !== null;
58
+ }
59
+
60
+ /**
61
+ * @param {String} slotName
62
+ * @returns {Boolean}
63
+ */
64
+ test(slotName) {
65
+ return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);
66
+ }
67
+ hostConnected() {
68
+ this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
69
+ }
70
+ hostDisconnected() {
71
+ this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
72
+ }
73
+ }
74
+
75
+ export { HasSlotController as H };
package/dist/index.d.ts CHANGED
@@ -16,6 +16,6 @@ export { LeuRadio } from "./Radio.js";
16
16
  export { LeuRadioGroup } from "./RadioGroup.js";
17
17
  export { LeuSelect } from "./Select.js";
18
18
  export { LeuTable } from "./Table.js";
19
- export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-3adfb3ed.js";
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
@@ -1,6 +1,6 @@
1
1
  export { LeuAccordion } from './Accordion.js';
2
2
  export { LeuBreadcrumb } from './Breadcrumb.js';
3
- export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-3adfb3ed.js';
3
+ export { BUTTON_EXPANDED_OPTIONS, BUTTON_SIZES, BUTTON_TYPES, BUTTON_VARIANTS, LeuButton } from './Button.js';
4
4
  export { LeuButtonGroup } from './ButtonGroup.js';
5
5
  export { LeuCheckbox } from './Checkbox.js';
6
6
  export { LeuCheckboxGroup } from './CheckboxGroup.js';
@@ -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-a20c5fd6.js';
21
+ import './LeuElement-6fbc0dee.js';
22
22
  import 'lit';
23
23
  import 'lit/static-html.js';
24
24
  import 'lit/directives/ref.js';
@@ -27,6 +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-04d0dfa2.js';
30
31
  import './Chip.js';
31
32
  import 'lit/directives/live.js';
32
33
  import '@floating-ui/dom';
@@ -1,5 +1,5 @@
1
1
  import { LeuAccordion } from './Accordion.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuButtonGroup.define("leu-button-group");
@@ -1,3 +1,3 @@
1
1
  export { LeuButton };
2
- import { L as LeuButton } from './Button-3adfb3ed.js';
2
+ import { LeuButton } from './Button.js';
3
3
  //# sourceMappingURL=leu-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leu-button.d.ts","sourceRoot":"","sources":["leu-button.js"],"names":[],"mappings":";+BAA+B,sBAAsB"}
1
+ {"version":3,"file":"leu-button.d.ts","sourceRoot":"","sources":["leu-button.js"],"names":[],"mappings":";0BAA0B,aAAa"}
@@ -1,9 +1,10 @@
1
- import { L as LeuButton } from './Button-3adfb3ed.js';
2
- import './LeuElement-a20c5fd6.js';
1
+ import { LeuButton } from './Button.js';
2
+ import './LeuElement-6fbc0dee.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-04d0dfa2.js';
7
8
 
8
9
  LeuButton.define("leu-button");
9
10
 
@@ -1,5 +1,5 @@
1
1
  import { LeuCheckboxGroup } from './CheckboxGroup.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import './Chip.js';
5
5
 
@@ -0,0 +1,3 @@
1
+ export { LeuDialog };
2
+ import { LeuDialog } from './Dialog.js';
3
+ //# sourceMappingURL=leu-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leu-dialog.d.ts","sourceRoot":"","sources":["leu-dialog.js"],"names":[],"mappings":";0BAA0B,aAAa"}
@@ -0,0 +1,11 @@
1
+ import { LeuDialog } from './Dialog.js';
2
+ import './LeuElement-6fbc0dee.js';
3
+ import 'lit';
4
+ import 'lit/directives/ref.js';
5
+ import 'lit/directives/class-map.js';
6
+ import './hasSlotController-04d0dfa2.js';
7
+ import './Icon.js';
8
+
9
+ LeuDialog.define("leu-dialog");
10
+
11
+ export { LeuDialog };
@@ -1,8 +1,9 @@
1
1
  import { LeuDropdown } from './Dropdown.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
- import './Button-3adfb3ed.js';
5
+ import './hasSlotController-04d0dfa2.js';
6
+ import './Button.js';
6
7
  import 'lit/directives/class-map.js';
7
8
  import 'lit/directives/if-defined.js';
8
9
  import './Icon.js';
package/dist/leu-icon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuIcon } from './Icon.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import './MenuItem.js';
5
5
  import 'lit/directives/if-defined.js';
@@ -1,11 +1,12 @@
1
1
  import { LeuPagination } from './Pagination.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/live.js';
5
- import './Button-3adfb3ed.js';
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-04d0dfa2.js';
9
10
  import './VisuallyHidden.js';
10
11
 
11
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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuRadio.define("leu-radio");
@@ -1,10 +1,11 @@
1
1
  import { LeuScrollTop } from './ScrollTop.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
- import './Button-3adfb3ed.js';
5
+ import './Button.js';
6
6
  import 'lit/directives/if-defined.js';
7
7
  import './Icon.js';
8
+ import './hasSlotController-04d0dfa2.js';
8
9
  import './utils-65469421.js';
9
10
 
10
11
  LeuScrollTop.define("leu-scroll-top");
@@ -1,10 +1,11 @@
1
1
  import { LeuSelect } from './Select.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.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 './Button-3adfb3ed.js';
7
+ import './hasSlotController-04d0dfa2.js';
8
+ import './Button.js';
8
9
  import './Icon.js';
9
10
  import './Menu.js';
10
11
  import './MenuItem.js';
@@ -0,0 +1,3 @@
1
+ export { LeuSpinner };
2
+ import { LeuSpinner } from './Spinner.js';
3
+ //# sourceMappingURL=leu-spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leu-spinner.d.ts","sourceRoot":"","sources":["leu-spinner.js"],"names":[],"mappings":";2BAA2B,cAAc"}
@@ -0,0 +1,7 @@
1
+ import { LeuSpinner } from './Spinner.js';
2
+ import './LeuElement-6fbc0dee.js';
3
+ import 'lit';
4
+
5
+ LeuSpinner.define("leu-spinner");
6
+
7
+ export { LeuSpinner };
package/dist/leu-table.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LeuTable } from './Table.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/directives/style-map.js';
@@ -7,8 +7,9 @@ import 'lit/directives/ref.js';
7
7
  import './Icon.js';
8
8
  import './Pagination.js';
9
9
  import 'lit/directives/live.js';
10
- import './Button-3adfb3ed.js';
10
+ import './Button.js';
11
11
  import 'lit/directives/if-defined.js';
12
+ import './hasSlotController-04d0dfa2.js';
12
13
  import './VisuallyHidden.js';
13
14
 
14
15
  LeuTable.define("leu-table");
@@ -1,5 +1,5 @@
1
1
  import { LeuVisuallyHidden } from './VisuallyHidden.js';
2
- import './LeuElement-a20c5fd6.js';
2
+ import './LeuElement-6fbc0dee.js';
3
3
  import 'lit';
4
4
 
5
5
  LeuVisuallyHidden.define("leu-visually-hidden");