@statistikzh/leu 0.13.0 → 0.13.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 (112) hide show
  1. package/.storybook/preview-head.html +1 -4
  2. package/.storybook/static/fonts/Inter-Black.woff2 +0 -0
  3. package/.storybook/static/fonts/Inter-Regular.woff2 +0 -0
  4. package/.storybook/static/fonts.css +11 -0
  5. package/CHANGELOG.md +11 -0
  6. package/dist/Accordion.d.ts +1 -1
  7. package/dist/Accordion.js +1 -1
  8. package/dist/Breadcrumb.d.ts +1 -1
  9. package/dist/Breadcrumb.js +1 -1
  10. package/dist/Button.d.ts +1 -1
  11. package/dist/Button.d.ts.map +1 -1
  12. package/dist/Button.js +64 -34
  13. package/dist/ButtonGroup.d.ts +1 -1
  14. package/dist/ButtonGroup.js +1 -1
  15. package/dist/Checkbox.d.ts +1 -1
  16. package/dist/Checkbox.js +1 -1
  17. package/dist/CheckboxGroup.d.ts +1 -1
  18. package/dist/CheckboxGroup.js +1 -1
  19. package/dist/Chip.d.ts +1 -1
  20. package/dist/Chip.d.ts.map +1 -1
  21. package/dist/Chip.js +5 -4
  22. package/dist/ChipGroup.d.ts +1 -1
  23. package/dist/ChipGroup.js +1 -1
  24. package/dist/ChipLink.js +1 -1
  25. package/dist/ChipRemovable.js +1 -1
  26. package/dist/ChipSelectable.js +1 -1
  27. package/dist/Dialog.d.ts +1 -1
  28. package/dist/Dialog.js +2 -2
  29. package/dist/Dropdown.d.ts +1 -1
  30. package/dist/Dropdown.d.ts.map +1 -1
  31. package/dist/Dropdown.js +3 -2
  32. package/dist/Icon.d.ts +1 -1
  33. package/dist/Icon.d.ts.map +1 -1
  34. package/dist/Icon.js +6 -2
  35. package/dist/Input.d.ts +1 -1
  36. package/dist/Input.js +1 -1
  37. package/dist/{LeuElement-874a297c.d.ts → LeuElement-b670d77c.d.ts} +1 -1
  38. package/dist/LeuElement-b670d77c.d.ts.map +1 -0
  39. package/dist/{LeuElement-874a297c.js → LeuElement-b670d77c.js} +11 -1
  40. package/dist/Menu.d.ts +1 -1
  41. package/dist/Menu.js +1 -1
  42. package/dist/MenuItem.d.ts +1 -1
  43. package/dist/MenuItem.js +1 -1
  44. package/dist/Pagination.d.ts +1 -1
  45. package/dist/Pagination.js +2 -2
  46. package/dist/Popup.d.ts +1 -1
  47. package/dist/Popup.d.ts.map +1 -1
  48. package/dist/Popup.js +2 -1
  49. package/dist/Radio.d.ts +1 -1
  50. package/dist/Radio.js +1 -1
  51. package/dist/RadioGroup.d.ts +1 -1
  52. package/dist/RadioGroup.js +1 -1
  53. package/dist/Range.d.ts +1 -1
  54. package/dist/Range.js +1 -1
  55. package/dist/ScrollTop.d.ts +1 -1
  56. package/dist/ScrollTop.js +2 -2
  57. package/dist/Select.d.ts +1 -1
  58. package/dist/Select.js +3 -3
  59. package/dist/Spinner.d.ts +1 -1
  60. package/dist/Spinner.js +1 -1
  61. package/dist/Table.d.ts +1 -1
  62. package/dist/Table.js +2 -2
  63. package/dist/VisuallyHidden.d.ts +1 -1
  64. package/dist/VisuallyHidden.js +1 -1
  65. package/dist/{hasSlotController-dbcac394.d.ts → hasSlotController-c09741c5.d.ts} +1 -1
  66. package/dist/{hasSlotController-dbcac394.d.ts.map → hasSlotController-c09741c5.d.ts.map} +1 -1
  67. package/dist/{hasSlotController-dbcac394.js → hasSlotController-c09741c5.js} +1 -1
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.js +2 -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.js +2 -2
  74. package/dist/leu-checkbox-group.js +1 -1
  75. package/dist/leu-checkbox.js +1 -1
  76. package/dist/leu-chip-group.js +1 -1
  77. package/dist/leu-chip-link.js +1 -1
  78. package/dist/leu-chip-removable.js +1 -1
  79. package/dist/leu-chip-selectable.js +1 -1
  80. package/dist/leu-dialog.js +2 -2
  81. package/dist/leu-dropdown.js +2 -2
  82. package/dist/leu-icon.js +1 -1
  83. package/dist/leu-input.js +1 -1
  84. package/dist/leu-menu-item.js +1 -1
  85. package/dist/leu-menu.js +1 -1
  86. package/dist/leu-pagination.js +2 -2
  87. package/dist/leu-popup.js +1 -1
  88. package/dist/leu-radio-group.js +1 -1
  89. package/dist/leu-radio.js +1 -1
  90. package/dist/leu-range.js +1 -1
  91. package/dist/leu-scroll-top.js +2 -2
  92. package/dist/leu-select.js +2 -2
  93. package/dist/leu-spinner.js +1 -1
  94. package/dist/leu-table.js +2 -2
  95. package/dist/leu-visually-hidden.js +1 -1
  96. package/dist/web-types.json +1 -1
  97. package/index.js +1 -0
  98. package/package.json +1 -1
  99. package/src/components/button/Button.js +8 -3
  100. package/src/components/button/button.css +56 -22
  101. package/src/components/button/stories/button.stories.js +1 -0
  102. package/src/components/button/test/button.test.js +3 -3
  103. package/src/components/chip/chip.css +4 -3
  104. package/src/components/chip/stories/chip-selectable.stories.js +1 -1
  105. package/src/components/dropdown/dropdown.css +1 -0
  106. package/src/components/icon/icon.css +4 -0
  107. package/src/components/popup/popup.css +1 -0
  108. package/src/components/select/select.css +1 -1
  109. package/src/components/select/test/select.test.js +1 -0
  110. package/src/styles/common-styles.css +9 -0
  111. package/web-test-runner.config.mjs +1 -0
  112. package/dist/LeuElement-874a297c.d.ts.map +0 -1
@@ -58,7 +58,7 @@ describe("LeuButton", () => {
58
58
  const button = el.shadowRoot.querySelector("button")
59
59
 
60
60
  expect(button).dom.to.equal(
61
- "<button><slot name='before'></slot><span><slot></slot></span><slot name='after'></slot></button>",
61
+ "<button><div><slot name='before'></slot></div><span><slot></slot></span><div><slot name='after'></slot></div></button>",
62
62
  { ignoreAttributes: ["class", "type"] }
63
63
  )
64
64
  })
@@ -73,7 +73,7 @@ describe("LeuButton", () => {
73
73
  const button = el.shadowRoot.querySelector("button")
74
74
 
75
75
  expect(button).dom.to.equal(
76
- "<button aria-expanded='true'><slot name='before'></slot><span><slot></slot></span><slot name='after'></slot><div class='icon-wrapper icon-wrapper--expanded'><leu-icon name='angleDropDown' size='24'></leu-icon></div></button>",
76
+ "<button aria-expanded='true'><div><slot name='before'></slot></div><span><slot></slot></span><div><slot name='after'></slot></div><div class='icon-expanded'><leu-icon name='angleDropDown' size='24'></leu-icon></div></button>",
77
77
  { ignoreAttributes: ["class", "type"] }
78
78
  )
79
79
 
@@ -82,7 +82,7 @@ describe("LeuButton", () => {
82
82
  await elementUpdated(el)
83
83
 
84
84
  expect(button).dom.to.equal(
85
- "<button class='primary regular' aria-expanded='true'><slot name='before'></slot><span><slot></slot></span><slot name='after'></slot></button>",
85
+ "<button class='primary regular' aria-expanded='true'><div><slot name='before'></slot></div><span><slot></slot></span><div><slot name='after'></slot></div></button>",
86
86
  { ignoreAttributes: ["class", "type"] }
87
87
  )
88
88
  })
@@ -55,7 +55,7 @@
55
55
  border: none;
56
56
  border-radius: 1rem;
57
57
  background-color: var(--chip-background-color);
58
- padding: 0.5rem 1rem;
58
+ padding: 8px 1rem;
59
59
 
60
60
  color: var(--chip-color);
61
61
  font-family: inherit;
@@ -66,6 +66,7 @@
66
66
 
67
67
  display: inline-flex;
68
68
  gap: 0.5rem;
69
+ align-items: center;
69
70
 
70
71
  /* Allow shrinking to achieve text truncation (ellipsis) */
71
72
  min-width: 0;
@@ -108,10 +109,10 @@
108
109
  }
109
110
 
110
111
  :host([size="small"]:not([variant="radio"])) .button {
111
- padding: 0.5625rem 0.75rem 0.4375rem;
112
+ padding: 0.3125rem 0.75rem;
112
113
 
113
114
  font-size: 0.75rem;
114
- line-height: 1;
115
+ line-height: 1.25rem;
115
116
  }
116
117
 
117
118
  :host([variant="radio"]) .button::before {
@@ -50,7 +50,7 @@ export const Default = Template.bind({})
50
50
  Default.args = {}
51
51
 
52
52
  export const Small = Template.bind({})
53
- Small.args = { size: SIZES.small }
53
+ Small.args = { size: SIZES.small, label: "Publikationen Region" }
54
54
 
55
55
  export const Radio = Template.bind({})
56
56
  Radio.args = { variant: VARIANTS.radio }
@@ -1,5 +1,6 @@
1
1
  :host {
2
2
  position: relative;
3
+ display: contents;
3
4
  }
4
5
 
5
6
  .content {
@@ -1,3 +1,7 @@
1
+ :host {
2
+ display: contents;
3
+ }
4
+
1
5
  svg,
2
6
  .placeholder {
3
7
  display: block;
@@ -3,6 +3,7 @@
3
3
  --popup-font-black: var(--leu-font-family-black);
4
4
 
5
5
  font-family: var(--popup-font-regular);
6
+ display: contents;
6
7
  }
7
8
 
8
9
  .popup {
@@ -58,7 +58,7 @@
58
58
  line-height: 1.5;
59
59
  padding: 1.375rem 3rem 1.375rem 1rem;
60
60
 
61
- background: none;
61
+ background: var(--leu-color-black-0);
62
62
  overflow: hidden;
63
63
  text-overflow: ellipsis;
64
64
  white-space: nowrap;
@@ -419,6 +419,7 @@ describe("LeuSelect", () => {
419
419
  await elementUpdated(el)
420
420
 
421
421
  expect(menuItems.every((item) => !item.multipleSelection)).to.be.true
422
+ })
422
423
 
423
424
  it("closes the popup when the document is clicked outside the component", async () => {
424
425
  const el = await defaultFixture({
@@ -3,3 +3,12 @@
3
3
  box-sizing: border-box;
4
4
  font-feature-settings: var(--leu-t-font-feature-settings);
5
5
  }
6
+
7
+ /**
8
+ * If a custom element sets the display property to any value
9
+ * it will not be hidden by the [hidden] attribute.
10
+ * That's why we need to specify this rule.
11
+ */
12
+ :host([hidden]) {
13
+ display: none;
14
+ }
@@ -9,6 +9,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
9
9
  plugins: wdsPlugins,
10
10
  mimeTypes: {
11
11
  "src/components/**/*.css": "js",
12
+ "src/styles/common-styles.css": "js",
12
13
  },
13
14
 
14
15
  /** Resolve bare module imports */
@@ -1 +0,0 @@
1
- {"version":3,"file":"LeuElement-874a297c.d.ts","sourceRoot":"","sources":["LeuElement-874a297c.js"],"names":[],"mappings":"AAsCA;IACE,8EAcC;CACF;AApDD,sEAaC;2BAf+B,KAAK"}