@statistikzh/leu 0.5.0 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.1](https://github.com/statistikZH/leu/compare/v0.5.0...v0.5.1) (2024-05-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **button:** truncate the label instead of wrapping it ([4118c0b](https://github.com/statistikZH/leu/commit/4118c0b117532615c5254d6849d8740ef43cb30f))
9
+ * **dropdown:** limit button width to allow the label to be truncated ([4118c0b](https://github.com/statistikZH/leu/commit/4118c0b117532615c5254d6849d8740ef43cb30f))
10
+
3
11
  ## [0.5.0](https://github.com/statistikZH/leu/compare/v0.4.0...v0.5.0) (2024-05-02)
4
12
 
5
13
 
@@ -81,4 +81,4 @@ declare const BUTTON_EXPANDED_OPTIONS: string[];
81
81
  import { LitElement } from 'lit';
82
82
  import { nothing } from 'lit';
83
83
  export { BUTTON_VARIANTS as B, HasSlotController as H, LeuButton as L, BUTTON_SIZES as a, BUTTON_TYPES as b, BUTTON_EXPANDED_OPTIONS as c };
84
- //# sourceMappingURL=Button-da11d064.d.ts.map
84
+ //# sourceMappingURL=Button-5326c982.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button-da11d064.d.ts","sourceRoot":"","sources":["Button-da11d064.js"],"names":[],"mappings":";;;iCAaa,OAAO,KAAK,EAAE,kBAAkB;AA8U7C,wCAA0D;AArV1D;;;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;AAoSD;;GAEG;AACH;IAQI,WAAiB;IACjB,qBAAqB;IACrB,MADW,MAAM,CACD;IAChB,yFAAyF;IACzF,cADW,CAAC,QAAQ,GAAG,OAAO,CAAC,CACH;IAC5B,qBAAqB;IACrB,MADW,MAAM,CACI;IACrB,qBAAqB;IACrB,SADW,MAAM,CACO;IACxB,4CAA4C;IAC5C,MADW,QAAQ,GAAG,QAAQ,GAAG,OAAO,CACpB;IAEpB,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,+EAA+E;IAC/E,OADW,OAAO,CACA;IAClB,sBAAsB;IACtB,QADW,OAAO,CACC;IACnB,wDAAwD;IACxD,UADW,OAAO,CACG;IAErB,gGAAgG;IAChG,OADW,OAAO,CACA;IAElB;;;OAGG;IACH,UAFU,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAEf;IAE3B,uBAEC;IACD,0EAOC;IACD,yEAOC;IACD,6EAOC;IACD;;;MAaC;IACD,+CA0BC;CACF;AAhID,qCAA0C;AAE1C,qCAAmD;AAEnD,gDAAkD;2BAhWH,KAAK;wBAAL,KAAK"}
1
+ {"version":3,"file":"Button-5326c982.d.ts","sourceRoot":"","sources":["Button-5326c982.js"],"names":[],"mappings":";;;iCAaa,OAAO,KAAK,EAAE,kBAAkB;AA2V7C,wCAA0D;AAlW1D;;;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;AAiTD;;GAEG;AACH;IAQI,WAAiB;IACjB,qBAAqB;IACrB,MADW,MAAM,CACD;IAChB,yFAAyF;IACzF,cADW,CAAC,QAAQ,GAAG,OAAO,CAAC,CACH;IAC5B,qBAAqB;IACrB,MADW,MAAM,CACI;IACrB,qBAAqB;IACrB,SADW,MAAM,CACO;IACxB,4CAA4C;IAC5C,MADW,QAAQ,GAAG,QAAQ,GAAG,OAAO,CACpB;IAEpB,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,+EAA+E;IAC/E,OADW,OAAO,CACA;IAClB,sBAAsB;IACtB,QADW,OAAO,CACC;IACnB,wDAAwD;IACxD,UADW,OAAO,CACG;IAErB,gGAAgG;IAChG,OADW,OAAO,CACA;IAElB;;;OAGG;IACH,UAFU,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAEf;IAE3B,uBAEC;IACD,0EAOC;IACD,yEAOC;IACD,6EAOC;IACD;;;MAaC;IACD,+CA0BC;CACF;AAhID,qCAA0C;AAE1C,qCAAmD;AAEnD,gDAAkD;2BA7WH,KAAK;wBAAL,KAAK"}
@@ -90,12 +90,25 @@ button {
90
90
  cursor: pointer;
91
91
  border: 1px solid transparent;
92
92
  border-radius: 2px;
93
+
94
+ max-width: 100%;
93
95
  display: flex;
94
96
  align-items: center;
95
97
  -moz-column-gap: 8px;
96
98
  column-gap: 8px;
97
99
  }
98
100
 
101
+ .label {
102
+ flex: 1 1 0;
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ white-space: nowrap;
106
+ }
107
+
108
+ .icon .label {
109
+ display: none;
110
+ }
111
+
99
112
  button.round {
100
113
  border-radius: 50%;
101
114
  }
@@ -470,7 +483,7 @@ class LeuButton extends LitElement {
470
483
  type=${this.type}
471
484
  >
472
485
  ${this.renderIconBefore()}
473
- <slot></slot>
486
+ <span class="label"><slot></slot></span>
474
487
  ${this.renderIconAfter()} ${this.renderExpandingIcon()}
475
488
  </button>
476
489
  `;
package/dist/Button.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-da11d064.js";
1
+ export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from "./Button-5326c982.js";
2
2
  //# sourceMappingURL=Button.d.ts.map
package/dist/Button.js CHANGED
@@ -3,4 +3,4 @@ import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import './icon-03e86700.js';
6
- export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-da11d064.js';
6
+ export { c as BUTTON_EXPANDED_OPTIONS, a as BUTTON_SIZES, b as BUTTON_TYPES, B as BUTTON_VARIANTS, L as LeuButton } from './Button-5326c982.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["Dropdown.js"],"names":[],"mappings":"AAmCA;;GAEG;AACH;IAKQ,kBAAqB;IAMzB,cAAe;IAEf,iBAAmB;IAarB,gCAIC;IACD,0BAIC;IACD,iCAIC;IACD,2BAEC;IACD,+CA0BC;CACF;2BA5GqC,KAAK"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["Dropdown.js"],"names":[],"mappings":"AAuCA;;GAEG;AACH;IAKQ,kBAAqB;IAMzB,cAAe;IAEf,iBAAmB;IAarB,gCAIC;IACD,0BAIC;IACD,iCAIC;IACD,2BAEC;IACD,+CA2BC;CACF;2BAjHqC,KAAK"}
package/dist/Dropdown.js CHANGED
@@ -5,7 +5,7 @@ import './leu-menu.js';
5
5
  import './leu-menu-item.js';
6
6
  import './leu-popup.js';
7
7
  import './defineElement-40372b4b.js';
8
- import './Button-da11d064.js';
8
+ import './Button-5326c982.js';
9
9
  import 'lit/directives/class-map.js';
10
10
  import 'lit/directives/if-defined.js';
11
11
  import './icon-03e86700.js';
@@ -31,6 +31,10 @@ var css_248z = css`:host,
31
31
 
32
32
  margin-top: 0.5rem;
33
33
  }
34
+
35
+ .button {
36
+ max-width: 100%;
37
+ }
34
38
  `;
35
39
 
36
40
  /**
@@ -91,6 +95,7 @@ class LeuDropdown extends LitElement {
91
95
  autoSizePadding="8"
92
96
  >
93
97
  <leu-button
98
+ class="button"
94
99
  slot="anchor"
95
100
  icon="download"
96
101
  variant="ghost"
@@ -4,7 +4,7 @@ import { live } from 'lit/directives/live.js';
4
4
  import './leu-button.js';
5
5
  import './leu-visually-hidden.js';
6
6
  import './defineElement-40372b4b.js';
7
- import './Button-da11d064.js';
7
+ import './Button-5326c982.js';
8
8
  import 'lit/directives/class-map.js';
9
9
  import 'lit/directives/if-defined.js';
10
10
  import './icon-03e86700.js';
package/dist/ScrollTop.js CHANGED
@@ -4,7 +4,7 @@ import { classMap } from 'lit/directives/class-map.js';
4
4
  import './leu-button.js';
5
5
  import { t as throttle } from './utils-65469421.js';
6
6
  import './defineElement-40372b4b.js';
7
- import './Button-da11d064.js';
7
+ import './Button-5326c982.js';
8
8
  import 'lit/directives/if-defined.js';
9
9
  import './icon-03e86700.js';
10
10
 
package/dist/Select.js CHANGED
@@ -5,7 +5,7 @@ import { map } from 'lit/directives/map.js';
5
5
  import { ifDefined } from 'lit/directives/if-defined.js';
6
6
  import { createRef, ref } from 'lit/directives/ref.js';
7
7
  import { I as Icon } from './icon-03e86700.js';
8
- import { H as HasSlotController } from './Button-da11d064.js';
8
+ import { H as HasSlotController } from './Button-5326c982.js';
9
9
  import './leu-button.js';
10
10
  import './leu-menu.js';
11
11
  import './leu-menu-item.js';
package/dist/Table.js CHANGED
@@ -9,7 +9,7 @@ import './defineElement-40372b4b.js';
9
9
  import './Pagination.js';
10
10
  import 'lit/directives/live.js';
11
11
  import './leu-button.js';
12
- import './Button-da11d064.js';
12
+ import './Button-5326c982.js';
13
13
  import 'lit/directives/if-defined.js';
14
14
  import './leu-visually-hidden.js';
15
15
  import './VisuallyHidden.js';
@@ -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-da11d064.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-5326c982.js";
20
20
  export { LeuInput, SIZE_TYPES } from "./Input.js";
21
- //# sourceMappingURL=index.js.d.ts.map
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
@@ -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-da11d064.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-5326c982.js';
4
4
  export { LeuButtonGroup } from './ButtonGroup.js';
5
5
  export { LeuCheckbox } from './Checkbox.js';
6
6
  export { LeuCheckboxGroup } from './CheckboxGroup.js';
@@ -1,3 +1,3 @@
1
1
  export { LeuButton };
2
- import { L as LeuButton } from './Button-da11d064.js';
2
+ import { L as LeuButton } from './Button-5326c982.js';
3
3
  //# sourceMappingURL=leu-button.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { d as defineElement } from './defineElement-40372b4b.js';
2
- import { L as LeuButton } from './Button-da11d064.js';
2
+ import { L as LeuButton } from './Button-5326c982.js';
3
3
  import './_rollupPluginBabelHelpers-20f659f4.js';
4
4
  import 'lit';
5
5
  import 'lit/directives/class-map.js';
@@ -3,7 +3,7 @@ import { LeuDropdown } from './Dropdown.js';
3
3
  import './_rollupPluginBabelHelpers-20f659f4.js';
4
4
  import 'lit';
5
5
  import './leu-button.js';
6
- import './Button-da11d064.js';
6
+ import './Button-5326c982.js';
7
7
  import 'lit/directives/class-map.js';
8
8
  import 'lit/directives/if-defined.js';
9
9
  import './icon-03e86700.js';
@@ -4,7 +4,7 @@ import './_rollupPluginBabelHelpers-20f659f4.js';
4
4
  import 'lit';
5
5
  import 'lit/directives/live.js';
6
6
  import './leu-button.js';
7
- import './Button-da11d064.js';
7
+ import './Button-5326c982.js';
8
8
  import 'lit/directives/class-map.js';
9
9
  import 'lit/directives/if-defined.js';
10
10
  import './icon-03e86700.js';
@@ -4,7 +4,7 @@ import './_rollupPluginBabelHelpers-20f659f4.js';
4
4
  import 'lit';
5
5
  import 'lit/directives/class-map.js';
6
6
  import './leu-button.js';
7
- import './Button-da11d064.js';
7
+ import './Button-5326c982.js';
8
8
  import 'lit/directives/if-defined.js';
9
9
  import './icon-03e86700.js';
10
10
  import './utils-65469421.js';
@@ -7,7 +7,7 @@ import 'lit/directives/map.js';
7
7
  import 'lit/directives/if-defined.js';
8
8
  import 'lit/directives/ref.js';
9
9
  import './icon-03e86700.js';
10
- import './Button-da11d064.js';
10
+ import './Button-5326c982.js';
11
11
  import './leu-button.js';
12
12
  import './leu-menu.js';
13
13
  import './Menu.js';
package/dist/leu-table.js CHANGED
@@ -10,7 +10,7 @@ import './leu-pagination.js';
10
10
  import './Pagination.js';
11
11
  import 'lit/directives/live.js';
12
12
  import './leu-button.js';
13
- import './Button-da11d064.js';
13
+ import './Button-5326c982.js';
14
14
  import 'lit/directives/if-defined.js';
15
15
  import './leu-visually-hidden.js';
16
16
  import './VisuallyHidden.js';