@otto-de/b2b-core-components 1.18.0 → 1.19.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 (99) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/p-21cd256f.entry.js +1 -0
  3. package/dist/b2b-core-components/p-68a836cb.entry.js +1 -0
  4. package/dist/b2b-core-components/p-d0e930f2.entry.js +1 -0
  5. package/dist/b2b-core-components/p-d51551c9.entry.js +1 -0
  6. package/dist/b2b-core-components/p-df71f2a8.entry.js +1 -0
  7. package/dist/cjs/b2b-checkbox.cjs.entry.js +1 -1
  8. package/dist/cjs/b2b-core-components.cjs.js +1 -1
  9. package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +1 -1
  10. package/dist/cjs/b2b-date-picker.cjs.entry.js +28 -13
  11. package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +15 -3
  12. package/dist/cjs/b2b-paragraph.cjs.entry.js +10 -3
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/components/alert/alert.css +2 -2
  15. package/dist/collection/components/anchor/anchor.css +2 -2
  16. package/dist/collection/components/background-box/background-box.css +2 -2
  17. package/dist/collection/components/breadcrumb/breadcrumb.css +2 -2
  18. package/dist/collection/components/button/button.css +2 -2
  19. package/dist/collection/components/card/card.css +2 -2
  20. package/dist/collection/components/checkbox/checkbox.css +2 -2
  21. package/dist/collection/components/checkbox/checkbox.e2e.js +6 -0
  22. package/dist/collection/components/checkbox/checkbox.js +1 -1
  23. package/dist/collection/components/checkbox/checkbox.stories.js +4 -0
  24. package/dist/collection/components/checkbox-group/checkbox-group.css +2 -2
  25. package/dist/collection/components/chip/chip.css +2 -2
  26. package/dist/collection/components/date-picker/date-picker-days-header.css +2 -2
  27. package/dist/collection/components/date-picker/date-picker-days.css +2 -3
  28. package/dist/collection/components/date-picker/date-picker-header.css +2 -2
  29. package/dist/collection/components/date-picker/date-picker-months.css +2 -2
  30. package/dist/collection/components/date-picker/date-picker-years.css +2 -2
  31. package/dist/collection/components/date-picker/date-picker.css +3 -3
  32. package/dist/collection/components/date-picker/date-picker.js +27 -12
  33. package/dist/collection/components/dropdown/dropdown.css +2 -2
  34. package/dist/collection/components/flyout-menu/flyout-menu-option.css +2 -2
  35. package/dist/collection/components/flyout-menu/flyout-menu.css +2 -2
  36. package/dist/collection/components/headline/headline.css +2 -2
  37. package/dist/collection/components/icon/icon.css +2 -2
  38. package/dist/collection/components/icon-100/icon-100.css +2 -2
  39. package/dist/collection/components/icon-50/icon-50.css +2 -2
  40. package/dist/collection/components/input/input.css +2 -2
  41. package/dist/collection/components/input-group/input-group.css +2 -2
  42. package/dist/collection/components/input-list/input-list.css +2 -2
  43. package/dist/collection/components/label/label.css +2 -2
  44. package/dist/collection/components/modal/modal.css +2 -2
  45. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.css +2 -2
  46. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +25 -9
  47. package/dist/collection/components/pagination/pagination.css +2 -2
  48. package/dist/collection/components/paragraph/paragraph.css +11 -3
  49. package/dist/collection/components/paragraph/paragraph.js +63 -2
  50. package/dist/collection/components/paragraph/paragraph.stories.js +130 -27
  51. package/dist/collection/components/progress-bar/progress-bar.css +2 -2
  52. package/dist/collection/components/radio/radio.css +2 -2
  53. package/dist/collection/components/radio-group/radio-group.css +2 -2
  54. package/dist/collection/components/required-separator/required-separator.css +2 -2
  55. package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
  56. package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
  57. package/dist/collection/components/separator/separator.css +2 -2
  58. package/dist/collection/components/spinner/spinner.css +2 -2
  59. package/dist/collection/components/tab/tab.css +2 -2
  60. package/dist/collection/components/tab-panel/tab-panel.css +2 -2
  61. package/dist/collection/components/table/table-cell/table-cell.css +2 -2
  62. package/dist/collection/components/table/table-header/table-header.css +2 -2
  63. package/dist/collection/components/table/table-row/table-row.css +2 -2
  64. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +2 -2
  65. package/dist/collection/components/table/table.css +2 -2
  66. package/dist/collection/components/textarea/textarea.css +2 -2
  67. package/dist/collection/components/toggle-button/toggle-button.css +2 -2
  68. package/dist/collection/components/toggle-chip/toggle-chip.css +2 -2
  69. package/dist/collection/components/toggle-group/toggle-group.css +2 -2
  70. package/dist/collection/components/toggle-switch/toggle-switch.css +2 -2
  71. package/dist/collection/components/tooltip/tooltip.css +2 -2
  72. package/dist/collection/components/wizard/wizard.css +2 -2
  73. package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
  74. package/dist/components/b2b-date-picker.js +28 -13
  75. package/dist/components/b2b-multiselect-dropdown.js +17 -5
  76. package/dist/components/b2b-paragraph.js +14 -4
  77. package/dist/components/checkbox.js +1 -1
  78. package/dist/components/date-picker-days.js +1 -1
  79. package/dist/custom-elements.json +39 -0
  80. package/dist/esm/b2b-checkbox.entry.js +1 -1
  81. package/dist/esm/b2b-core-components.js +1 -1
  82. package/dist/esm/b2b-date-picker-days_5.entry.js +1 -1
  83. package/dist/esm/b2b-date-picker.entry.js +28 -13
  84. package/dist/esm/b2b-multiselect-dropdown.entry.js +15 -3
  85. package/dist/esm/b2b-paragraph.entry.js +10 -3
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/types/components/checkbox/checkbox.stories.d.ts +2 -1
  88. package/dist/types/components/date-picker/date-picker.d.ts +1 -0
  89. package/dist/types/components/multiselect-dropdown/multiselect-dropdown.d.ts +5 -3
  90. package/dist/types/components/paragraph/paragraph.d.ts +6 -0
  91. package/dist/types/components/paragraph/paragraph.stories.d.ts +13 -8
  92. package/dist/types/components.d.ts +28 -4
  93. package/dist/web-types.json +37 -7
  94. package/package.json +2 -2
  95. package/dist/b2b-core-components/p-000d700d.entry.js +0 -1
  96. package/dist/b2b-core-components/p-619f67f6.entry.js +0 -1
  97. package/dist/b2b-core-components/p-92bfd54e.entry.js +0 -1
  98. package/dist/b2b-core-components/p-a6fa7831.entry.js +0 -1
  99. package/dist/b2b-core-components/p-e1672700.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -263,7 +263,7 @@
263
263
  margin-left: 0;
264
264
  padding-left: 0;
265
265
  height: 100%;
266
- width: 15%;
266
+ width: 100%;
267
267
  color: var(--b2b-color-black-100);
268
268
  font-size: var(--b2b-size-35);
269
269
  line-height: var(--b2b-size-copy-line-height-100);
@@ -18,6 +18,9 @@ export class B2bDatePicker {
18
18
  event.target.value = value;
19
19
  if (value.length === 10) {
20
20
  this.parseDateInput(value);
21
+ if (this.invalid) {
22
+ this.showDatePicker = false;
23
+ }
21
24
  }
22
25
  };
23
26
  this.handleKeyDown = (event) => {
@@ -120,6 +123,7 @@ export class B2bDatePicker {
120
123
  this.focused = false;
121
124
  }
122
125
  getPreviousMonth() {
126
+ this.invalid = false;
123
127
  if (this.selectedMonth === 0) {
124
128
  this.setCurrentMonth(11);
125
129
  this.setCurrentYear(this.selectedYear - 1);
@@ -136,7 +140,6 @@ export class B2bDatePicker {
136
140
  }
137
141
  if (!regex.test(dateString)) {
138
142
  this.invalid = true;
139
- this.showDatePicker = false;
140
143
  this.errorMessage = this.FORMATTING_ERROR_MESSAGE;
141
144
  return;
142
145
  }
@@ -161,9 +164,13 @@ export class B2bDatePicker {
161
164
  }
162
165
  isValidDate(day, month, year) {
163
166
  const date = new Date(year, month - 1, day);
164
- const isValidDay = day > 0 && day <= 31;
165
- const isValidMonth = month > 0 && month <= 12;
166
- const isValidYear = year > 0;
167
+ const isValidDay = date.getDate() === day;
168
+ const isValidMonth = date.getMonth() + 1 === month;
169
+ const isValidYear = date.getFullYear() === year && year >= 1900 && year <= 2100;
170
+ if (!isValidDay || !isValidMonth || !isValidYear) {
171
+ this.errorMessage = this.DISABLED_DATE_ERROR_MESSAGE;
172
+ return false;
173
+ }
167
174
  let isValidRange = true;
168
175
  if (this.disablePastDates && date < this.todayWithoutTime) {
169
176
  this.errorMessage = this.DISABLED_DATE_ERROR_MESSAGE;
@@ -177,7 +184,7 @@ export class B2bDatePicker {
177
184
  this.errorMessage = this.DISABLED_DATE_ERROR_MESSAGE;
178
185
  isValidRange = false;
179
186
  }
180
- return isValidDay && isValidMonth && isValidYear && isValidRange;
187
+ return isValidRange;
181
188
  }
182
189
  emitSelectedDate() {
183
190
  this.b2bSelected.emit({
@@ -197,6 +204,7 @@ export class B2bDatePicker {
197
204
  this.invalid = false;
198
205
  }
199
206
  getNextMonth() {
207
+ this.invalid = false;
200
208
  if (this.selectedMonth === 11) {
201
209
  this.setCurrentMonth(0);
202
210
  this.setCurrentYear(this.selectedYear + 1);
@@ -246,6 +254,12 @@ export class B2bDatePicker {
246
254
  closeIcon.focus();
247
255
  }
248
256
  }
257
+ handleFocusOut() {
258
+ if (this.userInputDate === '' || this.invalid) {
259
+ return;
260
+ }
261
+ this.parseDateInput(this.userInputDate);
262
+ }
249
263
  moveFocusToInputComponent() {
250
264
  const inputElement = this.host.shadowRoot.querySelector('input.b2b-date-picker-input');
251
265
  if (inputElement !== undefined && !this.invalid) {
@@ -263,18 +277,19 @@ export class B2bDatePicker {
263
277
  }
264
278
  }
265
279
  render() {
266
- return (h(Host, { key: 'd15a38cafce3ebd3ff46af901b2500f6aabb0d18' }, h("div", { key: 'c9f85e00fb6cc3a8faa2805db6748be2e482270e', class: "b2b-date-picker" }, h("div", { key: '3f5e66b7e99b46c8d94ac75361929ed92e49bb00', class: "b2b-date-picker-label" }, this.label), h("div", { key: '73b43cb76b8b64c5398e0a0ca644c2545b6a83bd', class: {
280
+ return (h(Host, { key: 'f55c64c00d67512d0e6c6f0e749fdc9868e44e41' }, h("div", { key: '31854fcd8b10c4349d7e8c3389be733368ca5f1a', class: "b2b-date-picker" }, h("div", { key: '2acd007a232a207870bec6e8ba944381dcdd28eb', class: "b2b-date-picker-label" }, this.label), h("div", { key: '2ae740717e19a9f1fe5a9946dbb6e891ef3103cd', class: {
267
281
  'b2b-date-picker-input-wrapper': true,
268
282
  'b2b-date-picker-input-wrapper--focused': this.focused || this.showDatePicker,
269
283
  'b2b-date-picker-input-wrapper--error': this.invalid,
270
- } }, h("div", { key: '67840404495817b9b506dd2cb72ecad8103e694c', class: "b2b-date-picker-input-focus-wrapper", onClick: () => {
284
+ } }, h("div", { key: '81d58e40fc617d949442bf482bf1141c9968ed83', class: "b2b-date-picker-input-focus-wrapper", onClick: () => {
271
285
  this.moveFocusToInputComponent();
272
- } }, h("input", { key: 'b00fc707d2aafcf328c7207625303723463d5b98', type: "text", tabindex: 0, class: {
286
+ } }, h("input", { key: '079990f5336387d1fdc473968f9ac0bd791bfdb0', type: "text", tabindex: 0, class: {
273
287
  'b2b-date-picker-input': true,
274
288
  'b2b-date-picker-input--error': this.invalid,
275
289
  }, value: this.userInputDate, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, onFocus: this.handleInputFocus, onBlur: () => {
276
290
  this.focused = false;
277
- } })), h("div", { key: 'a68a1143b3caf59acea3ebc60ac79032078c8151', class: "b2b-icons" }, this.userInputDate && (h("div", { tabIndex: 0, onClick: () => {
291
+ this.handleFocusOut();
292
+ } })), h("div", { key: '99cf6352447665b711284afb1f27e4d8dfc33b71', class: "b2b-icons" }, this.userInputDate && (h("div", { tabIndex: 0, onClick: () => {
278
293
  this.invalid = false;
279
294
  this.clearDateInput();
280
295
  }, class: "b2b-close-icon", onKeyDown: event => {
@@ -282,7 +297,7 @@ export class B2bDatePicker {
282
297
  this.invalid = false;
283
298
  this.clearDateInput();
284
299
  }
285
- } }, h("b2b-icon", { icon: "b2b_icon-close", "aria-label": "clear input", clickable: true }))), h("div", { key: '3b8281645b3ddebeeb317a85b0e46ed3929604bb', tabindex: 0, onClick: () => {
300
+ } }, h("b2b-icon", { icon: "b2b_icon-close", "aria-label": "clear input", clickable: true }))), h("div", { key: '1c4ca8455db22ea02c4d5000c625ac6da44194c4', tabindex: 0, onClick: () => {
286
301
  if (this.invalid) {
287
302
  this.invalid = false;
288
303
  }
@@ -294,9 +309,9 @@ export class B2bDatePicker {
294
309
  }
295
310
  this.showHideDatePicker();
296
311
  }
297
- }, class: "b2b-event-icon" }, h("b2b-icon", { key: 'be4431c9059fafd5dcf5aedb0140944e822ccccc', "aria-label": this.showDatePicker
312
+ }, class: "b2b-event-icon" }, h("b2b-icon", { key: 'a0332088a5d68cd8e77f07d6ea2b079f34881e2f', "aria-label": this.showDatePicker
298
313
  ? 'close date picker'
299
- : 'open date picker', icon: "b2b_icon-event", clickable: true }))))), h("div", { key: 'e3c641e8f775a5626cdf14acaa7149af127aa46f', class: {
314
+ : 'open date picker', icon: "b2b_icon-event", clickable: true }))))), h("div", { key: '0b1d0a315fe80940f98a0d75df38b03a90175aaa', class: {
300
315
  'b2b-date-picker-body': true,
301
316
  'b2b-date-picker-body--hidden': !this.showDatePicker,
302
317
  } }, this.datePickerView === DatePickerView.Days && (h("div", null, h("b2b-date-picker-header", { selectedMonth: this.selectedMonth, selectedYear: this.selectedYear }), h("b2b-date-picker-days-header", null), h("b2b-date-picker-days", { selectedMonth: this.selectedMonth, selectedYear: this.selectedYear, selectedDay: this.selectedDay, disableWeekends: this.disableWeekends, disableFutureDates: this.disableFutureDates, disablePastDates: this.disablePastDates }))), this.datePickerView === DatePickerView.Months && (h("b2b-date-picker-months", { selectedMonth: this.selectedMonth })), this.datePickerView === DatePickerView.Years && (h("b2b-date-picker-years", { selectedYear: this.selectedYear }))), this.showDatePicker && (h("div", { class: "b2b-date-picker__backdrop", onClick: this.handleBackdropDismiss })), !this.showDatePicker && (h("span", { class: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -123,6 +123,7 @@ export class B2bMultiSelectDropdown {
123
123
  this.hasOptionList = this.optionsList.length > 0;
124
124
  }
125
125
  componentWillLoad() {
126
+ this.parseSelectedValuesAndOptionsList();
126
127
  this.currentSelectedValues = this.selectedValues.filter(value => this.optionsList.includes(value));
127
128
  }
128
129
  /** Needed to trigger a re-render for async data */
@@ -135,19 +136,30 @@ export class B2bMultiSelectDropdown {
135
136
  handleSelectedValuesChange(newValues) {
136
137
  this.b2bChange.emit(newValues);
137
138
  }
139
+ parseSelectedValuesAndOptionsList() {
140
+ if (typeof this.selectedValues === 'string') {
141
+ this.selectedValues = this.parseStringToArray(this.selectedValues);
142
+ }
143
+ if (typeof this.optionsList === 'string') {
144
+ this.optionsList = this.parseStringToArray(this.optionsList);
145
+ }
146
+ }
147
+ parseStringToArray(value) {
148
+ return JSON.parse(value.replace(/'/g, '"'));
149
+ }
138
150
  componentDidUpdate() {
139
151
  const options = this.getOptions();
140
152
  this.updateAllOptions(options);
141
153
  this.updateSelectAll(options);
142
154
  }
143
155
  render() {
144
- return (h(Host, { key: '0ac598afeeb43b6b9c7886de674b39ef89674171', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: '4c9d34386c039f2c1c0713dece6853c37a97824a' }, this.label), h("div", { key: 'c62821c2ee20412098f852744bca85c0124a48c9', class: {
156
+ return (h(Host, { key: '78a4b5a6c75288e7d009e040e9885da2cf6f4f02', onFocus: this.setElementOnFocus, onBlur: this.setElementOnBlur, onClick: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("b2b-input-label", { key: 'ff95015ecdd660bdfac396c2669e50d41e85ff82' }, this.label), h("div", { key: '479cf3758d82775832ef1c530762f89a486cc028', class: {
145
157
  'b2b-multiselect-dropdown': true,
146
158
  'b2b-multiselect-dropdown--open': this.isElementFocused,
147
- }, 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", { key: '6f74ba3c79a08f8f7807e012b60ff6be1c23eb2d', icon: "b2b_icon-arrow-down" })), h("div", { key: 'bbb4e7d4bc4a9847cad814e97a0f8846d0cb6469', 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", { key: '2bdceaeed0f5107d6c26cbdb4fc2718e4b32a77a', icon: "b2b_icon-arrow-down" })), h("div", { key: 'b5ed97c14ea1138cf5be5c28f7531f45dcdb0e28', class: {
148
160
  'b2b-multiselect-dropdown__options-container': true,
149
161
  'b2b-multiselect-dropdown__options-container--visible': this.isElementFocused,
150
- } }, h("div", { key: '797e55fd95082c5d39368e4bb65691e2724a7a00', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: 'a3025a63bc4f07e77920738ffbe591859648caff', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: '85dbe8ac72440e358c4986d56b7d347ea44ca2d4', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: 'ca4ca6092988144ca5484896bcf7ab6264ecb1bb', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
162
+ } }, h("div", { key: 'c5637e174624e04ab0bd346e648559b6a1b1301d', class: "b2b-multiselect-dropdown__options", role: "listbox", "aria-label": this.label, tabIndex: -1 }, h("div", { key: 'db310f71fe7b9e8e51ff975b135a2c90c6cd2d87', class: "b2b-multiselect-dropdown__option__search" }, h("input", { key: '5a0042c6dc0d01fa38ea0ac9ce3005fb91704df0', type: "text", onInput: this.handleInput, class: "b2b-multiselect-dropdown__option__search__input", placeholder: this.searchPlaceholder })), h("b2b-multiselect-option", { key: '98bc2d69cdac70fb726b64945344baf4af44121b', class: "b2b-multiselect-dropdown__option__select-all", option: this.selectAllLabel, id: "select-all", "onB2b-option-selected": this.handleSelectAll }), this.hasOptionList &&
151
163
  this.currentList.map(option => (h("b2b-multiselect-option", { "onB2b-option-selected": this.handleSelectedChange, option: option })))))));
152
164
  }
153
165
  static get is() { return "b2b-multiselect-dropdown"; }
@@ -199,11 +211,11 @@ export class B2bMultiSelectDropdown {
199
211
  "reflect": true
200
212
  },
201
213
  "selectedValues": {
202
- "type": "unknown",
214
+ "type": "string",
203
215
  "mutable": false,
204
216
  "complexType": {
205
- "original": "string[]",
206
- "resolved": "string[]",
217
+ "original": "string | string[]",
218
+ "resolved": "string | string[]",
207
219
  "references": {}
208
220
  },
209
221
  "required": false,
@@ -212,14 +224,16 @@ export class B2bMultiSelectDropdown {
212
224
  "tags": [],
213
225
  "text": "The initial values to be selected in the dropdown."
214
226
  },
227
+ "attribute": "selected-values",
228
+ "reflect": false,
215
229
  "defaultValue": "[]"
216
230
  },
217
231
  "optionsList": {
218
- "type": "unknown",
232
+ "type": "string",
219
233
  "mutable": false,
220
234
  "complexType": {
221
- "original": "string[]",
222
- "resolved": "string[]",
235
+ "original": "string | string[]",
236
+ "resolved": "string | string[]",
223
237
  "references": {}
224
238
  },
225
239
  "required": false,
@@ -228,6 +242,8 @@ export class B2bMultiSelectDropdown {
228
242
  "tags": [],
229
243
  "text": "The list of options passed into the search dropdown. Can be static or dynamic, i.e. updated when the b2b-search or b2b-input emitters fire."
230
244
  },
245
+ "attribute": "options-list",
246
+ "reflect": false,
231
247
  "defaultValue": "[]"
232
248
  },
233
249
  "searchPlaceholder": {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
3
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Fri, 08 Nov 2024 12:23:19 GMT
125
+ * Generated on Wed, 04 Dec 2024 06:52:18 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -217,7 +217,6 @@
217
217
  }
218
218
  .b2b-paragraph {
219
219
  font-family: var(--b2b-font-family-default);
220
- color: var(--b2b-color-copy-default);
221
220
  margin: 0 0 var(--b2b-size-30);
222
221
  }
223
222
  .b2b-paragraph--size-50 {
@@ -242,4 +241,13 @@
242
241
  }
243
242
  .b2b-paragraph--align-center {
244
243
  text-align: center;
244
+ }
245
+ .b2b-paragraph--variant-black-100 {
246
+ color: var(--b2b-color-copy-default);
247
+ }
248
+ .b2b-paragraph--variant-grey-400 {
249
+ color: var(--b2b-color-grey-400);
250
+ }
251
+ .b2b-paragraph--no-margin {
252
+ margin: 0;
245
253
  }