@otto-de/b2b-core-components 1.24.0 → 1.26.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 (146) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/p-01a5c813.entry.js +1 -0
  3. package/dist/b2b-core-components/p-225e561a.entry.js +1 -0
  4. package/dist/b2b-core-components/p-4d96ee04.entry.js +1 -0
  5. package/dist/b2b-core-components/p-51dab4f2.entry.js +1 -0
  6. package/dist/b2b-core-components/p-5c576b32.entry.js +1 -0
  7. package/dist/b2b-core-components/p-9e3d9908.entry.js +1 -0
  8. package/dist/b2b-core-components/p-b9cc3f9f.entry.js +1 -0
  9. package/dist/b2b-core-components/p-e73552ea.entry.js +1 -0
  10. package/dist/cjs/b2b-background-box.cjs.entry.js +5 -5
  11. package/dist/cjs/b2b-core-components.cjs.js +1 -1
  12. package/dist/cjs/b2b-date-picker.cjs.entry.js +2 -1
  13. package/dist/cjs/b2b-dropdown.cjs.entry.js +12 -3
  14. package/dist/cjs/b2b-grid-row.cjs.entry.js +65 -11
  15. package/dist/cjs/b2b-input-group_2.cjs.entry.js +1 -1
  16. package/dist/cjs/b2b-input_2.cjs.entry.js +27 -6
  17. package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +4 -4
  18. package/dist/cjs/b2b-snackbar.cjs.entry.js +5 -4
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/components/alert/alert.css +2 -2
  21. package/dist/collection/components/alert/alert.stories.js +1 -2
  22. package/dist/collection/components/anchor/anchor.css +2 -2
  23. package/dist/collection/components/background-box/background-box.css +6 -6
  24. package/dist/collection/components/background-box/background-box.e2e.js +3 -3
  25. package/dist/collection/components/background-box/background-box.js +7 -7
  26. package/dist/collection/components/background-box/background-box.spec.js +3 -3
  27. package/dist/collection/components/background-box/background-box.stories.js +18 -18
  28. package/dist/collection/components/breadcrumb/breadcrumb.css +2 -2
  29. package/dist/collection/components/button/button.css +2 -2
  30. package/dist/collection/components/button/button.stories.js +79 -79
  31. package/dist/collection/components/card/card.css +2 -2
  32. package/dist/collection/components/checkbox/checkbox.css +2 -2
  33. package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
  34. package/dist/collection/components/chip/chip.css +2 -2
  35. package/dist/collection/components/chip/chip.stories.js +15 -15
  36. package/dist/collection/components/date-picker/date-picker-days-header.css +2 -2
  37. package/dist/collection/components/date-picker/date-picker-days.css +2 -2
  38. package/dist/collection/components/date-picker/date-picker-header.css +2 -2
  39. package/dist/collection/components/date-picker/date-picker-months.css +2 -2
  40. package/dist/collection/components/date-picker/date-picker-years.css +2 -2
  41. package/dist/collection/components/date-picker/date-picker.css +2 -2
  42. package/dist/collection/components/date-picker/date-picker.js +20 -1
  43. package/dist/collection/components/date-picker/date-picker.stories.js +4 -1
  44. package/dist/collection/components/dropdown/dropdown.css +4 -4
  45. package/dist/collection/components/dropdown/dropdown.js +47 -2
  46. package/dist/collection/components/flyout-menu/flyout-menu-option.css +2 -2
  47. package/dist/collection/components/flyout-menu/flyout-menu.css +2 -2
  48. package/dist/collection/components/flyout-menu/flyout-menu.stories.js +44 -44
  49. package/dist/collection/components/grid/grid.stories.js +151 -148
  50. package/dist/collection/components/grid/row.js +65 -11
  51. package/dist/collection/components/headline/headline.css +2 -2
  52. package/dist/collection/components/icon/icon.css +2 -2
  53. package/dist/collection/components/icon-100/icon-100.css +2 -2
  54. package/dist/collection/components/icon-100/icon-100.stories.js +5 -5
  55. package/dist/collection/components/icon-50/icon-50.css +2 -2
  56. package/dist/collection/components/icon-50/icon-50.stories.js +4 -4
  57. package/dist/collection/components/input/input.css +3 -3
  58. package/dist/collection/components/input/input.e2e.js +28 -0
  59. package/dist/collection/components/input/input.js +26 -5
  60. package/dist/collection/components/input/input.stories.js +75 -55
  61. package/dist/collection/components/input-group/input-group.css +3 -3
  62. package/dist/collection/components/input-list/input-list.css +2 -2
  63. package/dist/collection/components/input-list/input-list.stories.js +50 -50
  64. package/dist/collection/components/label/label.css +2 -2
  65. package/dist/collection/components/modal/modal.css +2 -2
  66. package/dist/collection/components/modal/modal.stories.js +1 -1
  67. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +2 -2
  68. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +4 -4
  69. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.stories.js +19 -19
  70. package/dist/collection/components/pagination/pagination.css +2 -2
  71. package/dist/collection/components/paragraph/paragraph.css +2 -2
  72. package/dist/collection/components/paragraph/paragraph.stories.js +82 -78
  73. package/dist/collection/components/progress-bar/progress-bar.css +2 -2
  74. package/dist/collection/components/progress-bar/progress-bar.stories.js +4 -4
  75. package/dist/collection/components/radio/radio.css +2 -2
  76. package/dist/collection/components/radio-group/radio-group.css +2 -2
  77. package/dist/collection/components/required-separator/required-separator.css +2 -2
  78. package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
  79. package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
  80. package/dist/collection/components/separator/separator.css +2 -2
  81. package/dist/collection/components/shimmer/shimmer.css +2 -2
  82. package/dist/collection/components/snackbar/snackbar.css +2 -2
  83. package/dist/collection/components/snackbar/snackbar.js +22 -4
  84. package/dist/collection/components/snackbar/snackbar.stories.js +10 -2
  85. package/dist/collection/components/spinner/spinner.css +2 -2
  86. package/dist/collection/components/tab/tab.css +2 -2
  87. package/dist/collection/components/tab-panel/tab-panel.css +2 -2
  88. package/dist/collection/components/table/table-cell/table-cell.css +2 -2
  89. package/dist/collection/components/table/table-header/table-header.css +2 -2
  90. package/dist/collection/components/table/table-row/table-row.css +2 -2
  91. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
  92. package/dist/collection/components/table/table.css +2 -2
  93. package/dist/collection/components/table/table.e2e.js +2 -1
  94. package/dist/collection/components/table/table.stories.js +157 -157
  95. package/dist/collection/components/textarea/textarea.css +2 -2
  96. package/dist/collection/components/toggle-button/toggle-button.css +2 -2
  97. package/dist/collection/components/toggle-chip/toggle-chip.css +2 -2
  98. package/dist/collection/components/toggle-chip/toggle-chip.stories.js +14 -2
  99. package/dist/collection/components/toggle-group/toggle-group.css +2 -2
  100. package/dist/collection/components/toggle-switch/toggle-switch.css +2 -2
  101. package/dist/collection/components/toggle-switch/toggle-switch.stories.js +4 -4
  102. package/dist/collection/components/tooltip/tooltip.css +2 -2
  103. package/dist/collection/components/wizard/wizard.css +2 -2
  104. package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
  105. package/dist/components/b2b-background-box.js +6 -6
  106. package/dist/components/b2b-date-picker.js +23 -15
  107. package/dist/components/b2b-dropdown.js +14 -3
  108. package/dist/components/b2b-grid-row.js +65 -11
  109. package/dist/components/b2b-multiselect-dropdown.js +4 -4
  110. package/dist/components/b2b-snackbar.js +7 -5
  111. package/dist/components/input-group.js +1 -1
  112. package/dist/components/input.js +27 -6
  113. package/dist/custom-elements.json +18 -2
  114. package/dist/esm/b2b-background-box.entry.js +5 -5
  115. package/dist/esm/b2b-core-components.js +1 -1
  116. package/dist/esm/b2b-date-picker.entry.js +2 -1
  117. package/dist/esm/b2b-dropdown.entry.js +12 -3
  118. package/dist/esm/b2b-grid-row.entry.js +65 -11
  119. package/dist/esm/b2b-input-group_2.entry.js +1 -1
  120. package/dist/esm/b2b-input_2.entry.js +27 -6
  121. package/dist/esm/b2b-multiselect-dropdown.entry.js +4 -4
  122. package/dist/esm/b2b-snackbar.entry.js +5 -4
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/types/components/background-box/background-box.d.ts +2 -2
  125. package/dist/types/components/background-box/background-box.stories.d.ts +1 -1
  126. package/dist/types/components/button/button.stories.d.ts +2 -2
  127. package/dist/types/components/date-picker/date-picker.d.ts +2 -0
  128. package/dist/types/components/dropdown/dropdown.d.ts +4 -0
  129. package/dist/types/components/grid/row.d.ts +3 -0
  130. package/dist/types/components/icon/icon.stories.d.ts +3 -3
  131. package/dist/types/components/input/input.d.ts +4 -0
  132. package/dist/types/components/input/input.stories.d.ts +1 -0
  133. package/dist/types/components/snackbar/snackbar.d.ts +2 -0
  134. package/dist/types/components/snackbar/snackbar.stories.d.ts +1 -0
  135. package/dist/types/components/toggle-chip/toggle-chip.stories.d.ts +3 -2
  136. package/dist/types/components.d.ts +36 -4
  137. package/dist/web-types.json +42 -3
  138. package/package.json +21 -16
  139. package/dist/b2b-core-components/p-191b7d0b.entry.js +0 -1
  140. package/dist/b2b-core-components/p-2b5b4472.entry.js +0 -1
  141. package/dist/b2b-core-components/p-333969c9.entry.js +0 -1
  142. package/dist/b2b-core-components/p-339dd3ba.entry.js +0 -1
  143. package/dist/b2b-core-components/p-56293400.entry.js +0 -1
  144. package/dist/b2b-core-components/p-95d3519f.entry.js +0 -1
  145. package/dist/b2b-core-components/p-be5c3d5d.entry.js +0 -1
  146. package/dist/b2b-core-components/p-fdfdc92d.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,4 +1,4 @@
1
- import { screen } from "@storybook/testing-library";
1
+ import { screen } from "@storybook/test";
2
2
  import { getArgTypes } from "../../docs/config/utils";
3
3
  import { useArgs } from "@storybook/preview-api";
4
4
  import { html } from "lit-html";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -20,7 +20,7 @@ export class B2bMultiSelectDropdown {
20
20
  return (h("b2b-chip-component", { label: option, value: option, "onB2b-close": this.handleChipClose }));
21
21
  }
22
22
  else if (index === this.maxOptionsVisible) {
23
- return (h("b2b-chip-component", { label: "...", class: "b2b-multiselect-dropdown__option--show-more-button", "has-close-button": "false", onClick: this.handleOverflowOptionsClick }));
23
+ return (h("b2b-chip-component", { label: "...", class: "b2b-multiselect-dropdown__option--show-more-button", hasCloseButton: true, onClick: this.handleOverflowOptionsClick }));
24
24
  }
25
25
  else {
26
26
  return;
@@ -153,13 +153,13 @@ export class B2bMultiSelectDropdown {
153
153
  this.updateSelectAll(options);
154
154
  }
155
155
  render() {
156
- return (h(Host, { key: 'ae0810d77f48d5aed5fb7d97e1b3a800a4a057b0', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: 'e9e67e9c02c8885919740f97c3c52f12991cff66' }, this.label), h("div", { key: '43e41efade0b8d761f1d8edf11415a43c461e804', class: {
156
+ return (h(Host, { key: '53aff695c900964cb3dc5bcb68c10b5285be16cd', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: '983a3b773e397fe5e1512168acc12d07a41e57ff' }, this.label), h("div", { key: '577f648af5e7fda2e1a225a97faf05612c84e772', class: {
157
157
  'b2b-multiselect-dropdown': true,
158
158
  'b2b-multiselect-dropdown--open': this.isElementFocused,
159
- }, tabindex: 0, role: "combobox", "aria-expanded": this.isElementFocused }, this.currentSelectedValues.length === 0 ? (h("span", { class: "b2b-multiselect-dropdown__placeholder" }, this.placeholder)) : (h("div", { class: "b2b-multiselect-dropdown__chip-container" }, this.renderChips())), h("b2b-icon-100", { key: '3631f88b18b5a2088f666727fac8f08ba0260f48', icon: "b2b_icon-arrow-down" })), h("div", { key: 'f022633b89930b1904788affa426ba36a451c631', class: {
159
+ }, tabindex: 0, role: "combobox", "aria-expanded": this.isElementFocused }, this.currentSelectedValues.length === 0 ? (h("span", { class: "b2b-multiselect-dropdown__placeholder" }, this.placeholder)) : (h("div", { class: "b2b-multiselect-dropdown__chip-container" }, this.renderChips())), h("b2b-icon-100", { key: '9bbe6f5442662cd102292846f5476b8ce899356a', icon: "b2b_icon-arrow-down" })), h("div", { key: '17593767cfeb17c341efd46dfc007197847c97bb', class: {
160
160
  'b2b-multiselect-dropdown__options-container': true,
161
161
  'b2b-multiselect-dropdown__options-container--visible': this.isElementFocused,
162
- } }, h("div", { key: '1b1b314b3f31e8eb22e627f533d9662fc89c095b', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: 'c041573e27abd76a3574cb3bd75cc34a3add6862', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: 'f4e01c003daf791325a5f7bd2e935497204749b0', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: '6540d5bd19352eebbeb4328065a1f810d7817d63', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
162
+ } }, h("div", { key: 'fe585cea40b0ef97d46cbd3a92f60c7382f75a97', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: '863879f8b34e870bb2f82d62edf07aad8a475b6d', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: '9866a72f2f7a4b19968ac5c03d6b07e60fcb6504', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: '93c740c3ba53544c90d6c1130fee1e444b53965b', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
163
163
  this.currentList.map(option => (h("b2b-multiselect-option", { "onB2b-option-selected": this.handleSelectedChange, option: option })))))));
164
164
  }
165
165
  static get is() { return "b2b-multiselect-dropdown"; }
@@ -30,15 +30,15 @@ const meta = {
30
30
  render: (_a) => {
31
31
  var args = __rest(_a, []);
32
32
  return html `<div style="width: 400px">
33
- <b2b-multiselect-dropdown
34
- label=${args.label}
35
- max-options-visible=${args.maxOptionsVisible}
36
- select-all-label=${args.selectAllLabel}
37
- placeholder=${args.placeholder}
38
- search-placeholder=${args.searchPlaceholder}
39
- .optionsList=${args.optionsList}>
40
- </b2b-multiselect-dropdown>
41
- </div>`;
33
+ <b2b-multiselect-dropdown
34
+ label=${args.label}
35
+ max-options-visible=${args.maxOptionsVisible}
36
+ select-all-label=${args.selectAllLabel}
37
+ placeholder=${args.placeholder}
38
+ search-placeholder=${args.searchPlaceholder}
39
+ .optionsList=${args.optionsList}>
40
+ </b2b-multiselect-dropdown>
41
+ </div>`;
42
42
  },
43
43
  };
44
44
  export default meta;
@@ -50,15 +50,15 @@ export const InitialSelectedValues = {
50
50
  render: (_a) => {
51
51
  var args = __rest(_a, []);
52
52
  return html `<div style="width: 400px">
53
- <b2b-multiselect-dropdown
54
- label=${args.label}
55
- max-options-visible=${args.maxOptionsVisible}
56
- select-all-label=${args.selectAllLabel}
57
- placeholder=${args.placeholder}
58
- search-placeholder=${args.searchPlaceholder}
59
- .optionsList=${args.optionsList}
60
- .selectedValues=${args.selectedValues}>
61
- </b2b-multiselect-dropdown>
62
- </div>`;
53
+ <b2b-multiselect-dropdown
54
+ label=${args.label}
55
+ max-options-visible=${args.maxOptionsVisible}
56
+ select-all-label=${args.selectAllLabel}
57
+ placeholder=${args.placeholder}
58
+ search-placeholder=${args.searchPlaceholder}
59
+ .optionsList=${args.optionsList}
60
+ .selectedValues=${args.selectedValues}>
61
+ </b2b-multiselect-dropdown>
62
+ </div>`;
63
63
  },
64
64
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -28,24 +28,24 @@ const meta = {
28
28
  render: (_a) => {
29
29
  var args = __rest(_a, []);
30
30
  return html `<b2b-paragraph
31
- weight="${args.weight}"
32
- size="${args.size}"
33
- align="${args.align}"
34
- margin="${args.margin}"
35
- variant="${args.variant}"
36
- display="${args.display}">
37
- Far far away, behind the word mountains, far from the countries Vokalia and
38
- Consonantia, there live the blind texts. Separated they live in
39
- Bookmarksgrove right at the coast of the Semantics, a large language ocean.
40
- A small river named Duden flows by their place and supplies it with the
41
- necessary regelialia. It is a paradisematic country, in which roasted parts
42
- of sentences fly into your mouth. Even the all-powerful Pointing has no
43
- control about the blind texts it is an almost unorthographic life One day
44
- however a small line of blind text by the name of Lorem Ipsum decided to
45
- leave for the far World of Grammar. The Big Oxmox advised her not to do so,
46
- because there were thousands of bad Commas, wild Question Marks and devious
47
- Semikoli, but the Little Blind Text didn’t listen.
48
- </b2b-paragraph>`;
31
+ weight="${args.weight}"
32
+ size="${args.size}"
33
+ align="${args.align}"
34
+ margin="${args.margin}"
35
+ variant="${args.variant}"
36
+ display="${args.display}">
37
+ Far far away, behind the word mountains, far from the countries Vokalia
38
+ and Consonantia, there live the blind texts. Separated they live in
39
+ Bookmarksgrove right at the coast of the Semantics, a large language
40
+ ocean. A small river named Duden flows by their place and supplies it with
41
+ the necessary regelialia. It is a paradisematic country, in which roasted
42
+ parts of sentences fly into your mouth. Even the all-powerful Pointing has
43
+ no control about the blind texts it is an almost unorthographic life One
44
+ day however a small line of blind text by the name of Lorem Ipsum decided
45
+ to leave for the far World of Grammar. The Big Oxmox advised her not to do
46
+ so, because there were thousands of bad Commas, wild Question Marks and
47
+ devious Semikoli, but the Little Blind Text didn’t listen.
48
+ </b2b-paragraph>`;
49
49
  },
50
50
  };
51
51
  export default meta;
@@ -75,36 +75,38 @@ export const DisplayInline = {
75
75
  render: (_a) => {
76
76
  var args = __rest(_a, []);
77
77
  return html `<b2b-paragraph
78
- weight="${args.weight}"
79
- size="${args.size}"
80
- align="${args.align}"
81
- margin="${args.margin}"
82
- variant="${args.variant}"
83
- display="${args.display}">
84
- Far far away, behind the word mountains, far from the countries Vokalia
85
- and Consonantia, there live the blind texts. Separated they live in
86
- Bookmarksgrove right at the coast of the Semantics, a large language
87
- ocean. A small river named Duden flows by their place and supplies it with
88
- the necessary regelialia. It is a paradisematic country, in which roasted
89
- parts of sentences fly into your mouth. Even the all-powerful Pointing has
90
- no control about the blind texts it is an almost unorthographic life One
91
- day however a small line of blind text by the name of Lorem Ipsum decided
92
- to leave for the far World of Grammar. The Big Oxmox advised her not to do
93
- so, because there were thousands of bad Commas, wild Question Marks and
94
- devious Semikoli, but the Little Blind Text didn’t listen. </b2b-paragraph
95
- ><b2b-paragraph
96
- >Far far away, behind the word mountains, far from the countries Vokalia
97
- and Consonantia, there live the blind texts. Separated they live in
98
- Bookmarksgrove right at the coast of the Semantics, a large language
99
- ocean. A small river named Duden flows by their place and supplies it with
100
- the necessary regelialia. It is a paradisematic country, in which roasted
101
- parts of sentences fly into your mouth. Even the all-powerful Pointing has
102
- no control about the blind texts it is an almost unorthographic life One
103
- day however a small line of blind text by the name of Lorem Ipsum decided
104
- to leave for the far World of Grammar. The Big Oxmox advised her not to do
105
- so, because there were thousands of bad Commas, wild Question Marks and
106
- devious Semikoli, but the Little Blind Text didn’t listen.
107
- </b2b-paragraph>`;
78
+ weight="${args.weight}"
79
+ size="${args.size}"
80
+ align="${args.align}"
81
+ margin="${args.margin}"
82
+ variant="${args.variant}"
83
+ display="${args.display}">
84
+ Far far away, behind the word mountains, far from the countries Vokalia
85
+ and Consonantia, there live the blind texts. Separated they live in
86
+ Bookmarksgrove right at the coast of the Semantics, a large language
87
+ ocean. A small river named Duden flows by their place and supplies it
88
+ with the necessary regelialia. It is a paradisematic country, in which
89
+ roasted parts of sentences fly into your mouth. Even the all-powerful
90
+ Pointing has no control about the blind texts it is an almost
91
+ unorthographic life One day however a small line of blind text by the
92
+ name of Lorem Ipsum decided to leave for the far World of Grammar. The
93
+ Big Oxmox advised her not to do so, because there were thousands of bad
94
+ Commas, wild Question Marks and devious Semikoli, but the Little Blind
95
+ Text didn’t listen. </b2b-paragraph
96
+ ><b2b-paragraph
97
+ >Far far away, behind the word mountains, far from the countries Vokalia
98
+ and Consonantia, there live the blind texts. Separated they live in
99
+ Bookmarksgrove right at the coast of the Semantics, a large language
100
+ ocean. A small river named Duden flows by their place and supplies it
101
+ with the necessary regelialia. It is a paradisematic country, in which
102
+ roasted parts of sentences fly into your mouth. Even the all-powerful
103
+ Pointing has no control about the blind texts it is an almost
104
+ unorthographic life One day however a small line of blind text by the
105
+ name of Lorem Ipsum decided to leave for the far World of Grammar. The
106
+ Big Oxmox advised her not to do so, because there were thousands of bad
107
+ Commas, wild Question Marks and devious Semikoli, but the Little Blind
108
+ Text didn’t listen.
109
+ </b2b-paragraph>`;
108
110
  },
109
111
  };
110
112
  export const DisplayInlineBlock = {
@@ -112,35 +114,37 @@ export const DisplayInlineBlock = {
112
114
  render: (_a) => {
113
115
  var args = __rest(_a, []);
114
116
  return html `<b2b-paragraph
115
- weight="${args.weight}"
116
- size="${args.size}"
117
- align="${args.align}"
118
- margin="${args.margin}"
119
- variant="${args.variant}"
120
- display="${args.display}">
121
- Far far away, behind the word mountains, far from the countries Vokalia
122
- and Consonantia, there live the blind texts. Separated they live in
123
- Bookmarksgrove right at the coast of the Semantics, a large language
124
- ocean. A small river named Duden flows by their place and supplies it with
125
- the necessary regelialia. It is a paradisematic country, in which roasted
126
- parts of sentences fly into your mouth. Even the all-powerful Pointing has
127
- no control about the blind texts it is an almost unorthographic life One
128
- day however a small line of blind text by the name of Lorem Ipsum decided
129
- to leave for the far World of Grammar. The Big Oxmox advised her not to do
130
- so, because there were thousands of bad Commas, wild Question Marks and
131
- devious Semikoli, but the Little Blind Text didn’t listen. </b2b-paragraph
132
- ><b2b-paragraph
133
- >Far far away, behind the word mountains, far from the countries Vokalia
134
- and Consonantia, there live the blind texts. Separated they live in
135
- Bookmarksgrove right at the coast of the Semantics, a large language
136
- ocean. A small river named Duden flows by their place and supplies it with
137
- the necessary regelialia. It is a paradisematic country, in which roasted
138
- parts of sentences fly into your mouth. Even the all-powerful Pointing has
139
- no control about the blind texts it is an almost unorthographic life One
140
- day however a small line of blind text by the name of Lorem Ipsum decided
141
- to leave for the far World of Grammar. The Big Oxmox advised her not to do
142
- so, because there were thousands of bad Commas, wild Question Marks and
143
- devious Semikoli, but the Little Blind Text didn’t listen.
144
- </b2b-paragraph>`;
117
+ weight="${args.weight}"
118
+ size="${args.size}"
119
+ align="${args.align}"
120
+ margin="${args.margin}"
121
+ variant="${args.variant}"
122
+ display="${args.display}">
123
+ Far far away, behind the word mountains, far from the countries Vokalia
124
+ and Consonantia, there live the blind texts. Separated they live in
125
+ Bookmarksgrove right at the coast of the Semantics, a large language
126
+ ocean. A small river named Duden flows by their place and supplies it
127
+ with the necessary regelialia. It is a paradisematic country, in which
128
+ roasted parts of sentences fly into your mouth. Even the all-powerful
129
+ Pointing has no control about the blind texts it is an almost
130
+ unorthographic life One day however a small line of blind text by the
131
+ name of Lorem Ipsum decided to leave for the far World of Grammar. The
132
+ Big Oxmox advised her not to do so, because there were thousands of bad
133
+ Commas, wild Question Marks and devious Semikoli, but the Little Blind
134
+ Text didn’t listen. </b2b-paragraph
135
+ ><b2b-paragraph
136
+ >Far far away, behind the word mountains, far from the countries Vokalia
137
+ and Consonantia, there live the blind texts. Separated they live in
138
+ Bookmarksgrove right at the coast of the Semantics, a large language
139
+ ocean. A small river named Duden flows by their place and supplies it
140
+ with the necessary regelialia. It is a paradisematic country, in which
141
+ roasted parts of sentences fly into your mouth. Even the all-powerful
142
+ Pointing has no control about the blind texts it is an almost
143
+ unorthographic life One day however a small line of blind text by the
144
+ name of Lorem Ipsum decided to leave for the far World of Grammar. The
145
+ Big Oxmox advised her not to do so, because there were thousands of bad
146
+ Commas, wild Question Marks and devious Semikoli, but the Little Blind
147
+ Text didn’t listen.
148
+ </b2b-paragraph>`;
145
149
  },
146
150
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -25,10 +25,10 @@ const meta = {
25
25
  render: (_a) => {
26
26
  var args = __rest(_a, []);
27
27
  return html `<b2b-progress-bar
28
- progress="${args.progress}"
29
- label="${args.label}"
30
- label-type="${args.labelType}"
31
- label-position="${args.labelPosition}" />`;
28
+ progress="${args.progress}"
29
+ label="${args.label}"
30
+ label-type="${args.labelType}"
31
+ label-position="${args.labelPosition}" />`;
32
32
  },
33
33
  };
34
34
  export default meta;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
3
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -123,7 +123,7 @@
123
123
  }
124
124
  /**
125
125
  * Do not edit directly
126
- * Generated on Thu, 27 Feb 2025 06:22:03 GMT
126
+ * Generated on Thu, 20 Mar 2025 06:20:36 GMT
127
127
  */
128
128
  :root [data-theme="dark"] {
129
129
  --b2b-size-200: 5rem; /* 80px */
@@ -48,6 +48,7 @@ export class SnackbarComponent {
48
48
  this.duration = 5000;
49
49
  this.hasAction = false;
50
50
  this.actionLabel = undefined;
51
+ this.width = undefined;
51
52
  }
52
53
  onVisibleChange(newValue) {
53
54
  if (this.timed && this.type !== 'error') {
@@ -79,17 +80,17 @@ export class SnackbarComponent {
79
80
  clearTimeout(this.timeoutId);
80
81
  }
81
82
  render() {
82
- return (h(Host, { key: '2c1fa25b458eb820c0d5b2bbff6e8b5c4f67a435', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: '9c84de32c173d00d275946785236a799a4044955', class: {
83
+ return (h(Host, { key: '693f7639a65edfd76e101540ccd663cc3f533448', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: 'f522b01889ee90866e2fd01036805139aa0f39df', class: {
83
84
  'b2b-snackbar': true,
84
85
  [`b2b-snackbar--${this.type}`]: true,
85
86
  'b2b-snackbar--opened': this.opened,
86
- } }, h("div", { key: 'a6cdf11eb13128287c1eb0c0cd5158ce940b5ce1', class: "b2b-snackbar__content" }, h("span", { key: '5e68c325dc40a7e78af3103b7a748cf1ffb4519d', class: { [`b2b-snackbar--${this.type}__icon`]: true } }, this.chooseIcon()), h("p", { key: '740611167aadea1a6e6aee692f6b634401220875', class: "b2b-snackbar__content__description" }, this.description)), this.isActionPresent() && (h("div", { class: {
87
+ }, style: this.width ? { width: this.width } : { width: 'auto' } }, h("div", { key: '3cafcd2cbff1203950ad15b038f0346e12232131', class: "b2b-snackbar__content" }, h("span", { key: '5811cd72a94d7ba281f3733dd9ed0281cb47c37f', class: { [`b2b-snackbar--${this.type}__icon`]: true } }, this.chooseIcon()), h("p", { key: '079f6ad5e83c365a224bc0c1f9862cd6409a7a6d', class: "b2b-snackbar__content__description" }, this.description)), this.isActionPresent() && (h("div", { class: {
87
88
  'b2b-snackbar__action': true,
88
89
  [`b2b-snackbar__action--${this.type}`]: true,
89
- }, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: '1f5a0bd09d7dfc7c2753fc9acc5b56a81315c0a0', class: {
90
+ }, onClick: this.handleActionClick }, h("a", null, this.actionLabel))), h("div", { key: '901aa5ad65f440e7de8a87e5a1fd88643b9766b6', class: {
90
91
  'b2b-snackbar__close-icon': true,
91
92
  [`b2b-snackbar__close-icon--${this.type}`]: true,
92
- }, onClick: this.close }, h("b2b-icon-100", { key: '4b0ea44065f95e776ef0650092aea0742b1588a5', clickable: true, size: 24, icon: "b2b_icon-close" })))));
93
+ }, onClick: this.close }, h("b2b-icon-100", { key: 'efd48b87b50a36d790f59bccfc3553a9d105adfd', clickable: true, size: 24, icon: "b2b_icon-close" })))));
93
94
  }
94
95
  static get is() { return "b2b-snackbar"; }
95
96
  static get encapsulation() { return "shadow"; }
@@ -228,6 +229,23 @@ export class SnackbarComponent {
228
229
  },
229
230
  "attribute": "action-label",
230
231
  "reflect": false
232
+ },
233
+ "width": {
234
+ "type": "string",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "string",
238
+ "resolved": "string",
239
+ "references": {}
240
+ },
241
+ "required": false,
242
+ "optional": false,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": "Width of the snackbar can be specified in px. If not provided, the default value is auto, which will adjust the width to fit the content."
246
+ },
247
+ "attribute": "width",
248
+ "reflect": false
231
249
  }
232
250
  };
233
251
  }
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { getArgTypes } from "../../docs/config/utils";
14
14
  import { html } from "lit-html";
15
15
  import { useArgs } from "@storybook/preview-api";
16
- import { screen } from "@storybook/testing-library";
16
+ import { screen } from "@storybook/test";
17
17
  getArgTypes('b2b-snackbar');
18
18
  const meta = {
19
19
  title: 'Components/Status & Feedback/Snackbar',
@@ -26,6 +26,7 @@ const meta = {
26
26
  duration: 5000,
27
27
  hasAction: true,
28
28
  actionLabel: 'Call to Action',
29
+ width: 'auto',
29
30
  },
30
31
  argTypes: getArgTypes('b2b-snackbar'),
31
32
  render: (_a) => {
@@ -49,7 +50,8 @@ const meta = {
49
50
  timed="${args.timed}"
50
51
  duration="${args.duration}"
51
52
  has-action="${args.hasAction}"
52
- action-label="${args.actionLabel}"></b2b-snackbar>`;
53
+ action-label="${args.actionLabel}"
54
+ width="${args.width}"></b2b-snackbar>`;
53
55
  },
54
56
  };
55
57
  export default meta;
@@ -87,3 +89,9 @@ export const TimedSnackbar = {
87
89
  await showSnackBar();
88
90
  },
89
91
  };
92
+ export const WithWidth = {
93
+ args: Object.assign(Object.assign({}, meta.args), { type: 'info', description: 'This is a snackbar with custom width', width: '800px' }),
94
+ play: async () => {
95
+ await showSnackBar();
96
+ },
97
+ };