@getflip/swirl-components 0.50.1 → 0.51.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 (37) hide show
  1. package/components.json +10 -1
  2. package/dist/cjs/swirl-date-input.cjs.entry.js +3 -2
  3. package/dist/cjs/swirl-pagination.cjs.entry.js +24 -8
  4. package/dist/cjs/swirl-search.cjs.entry.js +5 -1
  5. package/dist/cjs/swirl-toast.cjs.entry.js +2 -2
  6. package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
  7. package/dist/collection/components/swirl-date-input/swirl-date-input.js +3 -2
  8. package/dist/collection/components/swirl-pagination/swirl-pagination.css +7 -14
  9. package/dist/collection/components/swirl-pagination/swirl-pagination.js +23 -7
  10. package/dist/collection/components/swirl-search/swirl-search.js +19 -1
  11. package/dist/collection/components/swirl-search/swirl-search.stories.js +3 -0
  12. package/dist/collection/components/swirl-toast/swirl-toast.css +4 -0
  13. package/dist/collection/components/swirl-toast/swirl-toast.js +1 -1
  14. package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
  15. package/dist/components/swirl-date-input.js +3 -2
  16. package/dist/components/swirl-pagination.js +24 -8
  17. package/dist/components/swirl-search.js +5 -1
  18. package/dist/components/swirl-toast2.js +2 -2
  19. package/dist/esm/swirl-date-input.entry.js +4 -3
  20. package/dist/esm/swirl-pagination.entry.js +24 -8
  21. package/dist/esm/swirl-search.entry.js +5 -1
  22. package/dist/esm/swirl-toast.entry.js +2 -2
  23. package/dist/swirl-components/p-41e9050c.entry.js +1 -0
  24. package/dist/swirl-components/p-77daca19.entry.js +1 -0
  25. package/dist/swirl-components/p-ae7a2dde.entry.js +1 -0
  26. package/dist/swirl-components/p-e5fa6ac6.entry.js +7 -0
  27. package/dist/swirl-components/swirl-components.esm.js +1 -1
  28. package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +1 -0
  29. package/dist/types/components/swirl-pagination/swirl-pagination.d.ts +4 -1
  30. package/dist/types/components/swirl-search/swirl-search.d.ts +2 -0
  31. package/dist/types/components.d.ts +1 -0
  32. package/dist/types/utils.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/dist/swirl-components/p-3955db23.entry.js +0 -7
  35. package/dist/swirl-components/p-da7879cd.entry.js +0 -1
  36. package/dist/swirl-components/p-dbe4ee1a.entry.js +0 -1
  37. package/dist/swirl-components/p-f50fcc4d.entry.js +0 -1
package/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-05-05T11:11:43",
2
+ "timestamp": "2023-05-08T10:24:07",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.0.0",
@@ -16303,6 +16303,15 @@
16303
16303
  "docs": "",
16304
16304
  "docsTags": []
16305
16305
  },
16306
+ {
16307
+ "event": "inputInput",
16308
+ "detail": "string",
16309
+ "bubbles": true,
16310
+ "cancelable": true,
16311
+ "composed": true,
16312
+ "docs": "",
16313
+ "docsTags": []
16314
+ },
16306
16315
  {
16307
16316
  "event": "valueChange",
16308
16317
  "detail": "string",
@@ -6316,7 +6316,7 @@ const SwirlDateInput = class {
6316
6316
  this.iconSize = 24;
6317
6317
  }
6318
6318
  componentWillLoad() {
6319
- const index = document.querySelectorAll("swirl-date-input").length;
6319
+ const index = Array.from(document.querySelectorAll("swirl-date-input")).indexOf(this.el);
6320
6320
  this.id = `swirl-date-input-${index}`;
6321
6321
  }
6322
6322
  componentDidLoad() {
@@ -6362,8 +6362,9 @@ const SwirlDateInput = class {
6362
6362
  const className = index.classnames("date-input", {
6363
6363
  "date-input--inline": this.inline,
6364
6364
  });
6365
- return (index$1.h(index$1.Host, null, index$1.h("div", { class: className }, index$1.h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), index$1.h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled, id: `${this.id}-trigger`, type: "button" }, index$1.h("swirl-icon-today", { size: this.iconSize }))), !this.disabled && (index$1.h("swirl-popover", { animation: "scale-in-y", label: this.datePickerLabel, placement: "bottom-end", popoverId: "popover", ref: (el) => (this.pickerPopover = el), trigger: `${this.id}-trigger` }, index$1.h("swirl-date-picker", { labels: this.labels, locale: this.locale, onValueChange: this.onPickDate, value: dateValue })))));
6365
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: className }, index$1.h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), index$1.h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled, id: `${this.id}-trigger`, type: "button" }, index$1.h("swirl-icon-today", { size: this.iconSize }))), !this.disabled && (index$1.h("swirl-popover", { animation: "scale-in-y", label: this.datePickerLabel, placement: "bottom-end", popoverId: `popover-${this.id}`, ref: (el) => (this.pickerPopover = el), trigger: `${this.id}-trigger` }, index$1.h("swirl-date-picker", { labels: this.labels, locale: this.locale, onValueChange: this.onPickDate, value: dateValue })))));
6366
6366
  }
6367
+ get el() { return index$1.getElement(this); }
6367
6368
  static get watchers() { return {
6368
6369
  "format": ["watchFormat"]
6369
6370
  }; }
@@ -4,14 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-83363034.js');
6
6
  const index$1 = require('./index-2ddd0598.js');
7
+ const utils = require('./utils-f1b4e064.js');
7
8
 
8
- const swirlPaginationCss = ":host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host *{box-sizing:border-box}.pagination{display:block;width:100%}.pagination--variant-simple .pagination__list{gap:0}.pagination__list{display:flex;margin:0;padding:0;justify-content:flex-start;align-items:center;line-height:var(--s-line-height-base);list-style:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__list{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.pagination__page-size-selection{display:flex;padding-right:var(--s-space-24);flex-shrink:0;align-items:center;color:var(--s-interactive-primary-default);white-space:nowrap;gap:var(--s-space-8)}.pagination__page-size-select-container{position:relative}.pagination__page-size-select{padding-right:calc(1rem + var(--s-space-4));border:none;color:var(--s-interactive-primary-default);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-size-select:focus:not(:focus-visible){outline:none}.pagination__page-size-select:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__page-size-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.pagination__page-size-select-icon{position:absolute;top:50%;right:0;transform:translateY(-50%);pointer-events:none}.pagination__page-label{padding-right:var(--s-space-8);padding-left:var(--s-space-8)}.pagination__advanced-label{display:flex;align-items:center;white-space:nowrap;gap:var(--s-space-8)}.pagination__page-select-container{position:relative}.pagination__page-select{display:inline-flex;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);border:none;border-radius:var(--s-border-radius-sm);background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:center;cursor:pointer;box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-strong);-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-select:focus:not(:focus-visible){outline:none}.pagination__page-select:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__page-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}";
9
+ const swirlPaginationCss = ":host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host *{box-sizing:border-box}.pagination{display:block;width:100%}.pagination--variant-simple .pagination__list{gap:0}.pagination__list{display:flex;margin:0;padding:0;justify-content:flex-start;align-items:center;line-height:var(--s-line-height-base);list-style:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__list{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.pagination__page-size-selection{display:flex;padding-right:var(--s-space-24);flex-shrink:0;align-items:center;color:var(--s-interactive-primary-default);white-space:nowrap;gap:var(--s-space-8)}.pagination__page-size-select-container{position:relative}.pagination__page-size-select{padding-right:calc(1rem + var(--s-space-4));border:none;color:var(--s-interactive-primary-default);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-size-select:focus:not(:focus-visible){outline:none}.pagination__page-size-select:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__page-size-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.pagination__page-size-select-icon{position:absolute;top:50%;right:0;transform:translateY(-50%);pointer-events:none}.pagination__page-label{padding-right:var(--s-space-8);padding-left:var(--s-space-8)}.pagination__advanced-label{display:flex;align-items:center;white-space:nowrap;gap:var(--s-space-8)}.pagination__page-input{display:inline-flex;width:3rem;padding-top:var(--s-space-8);padding-right:var(--s-space-8);padding-bottom:var(--s-space-8);padding-left:var(--s-space-8);border:none;border-radius:var(--s-border-radius-sm);background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:center;box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-strong)}.pagination__page-input:focus:not(:focus-visible){outline:none}.pagination__page-input:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__page-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}";
9
10
 
10
11
  const SwirlPagination = class {
11
12
  constructor(hostRef) {
12
13
  index.registerInstance(this, hostRef);
13
14
  this.setPage = index.createEvent(this, "setPage", 7);
14
15
  this.setPageSize = index.createEvent(this, "setPageSize", 7);
16
+ this.onFocusPageInput = (event) => {
17
+ event.target.select();
18
+ };
15
19
  this.onFirstPageButtonClick = () => {
16
20
  if (this.page === 1) {
17
21
  return;
@@ -38,13 +42,28 @@ const SwirlPagination = class {
38
42
  }
39
43
  this.setPage.emit(nextPage);
40
44
  };
41
- this.onSelect = (event) => {
42
- const page = +event.target.value;
45
+ this.onPageInput = () => {
46
+ let page = +this.pageInput.value;
47
+ if (isNaN(page)) {
48
+ page = this.page;
49
+ this.pageInput.value = String(page);
50
+ }
51
+ else if (page > this.pages) {
52
+ page = this.pages;
53
+ this.pageInput.value = String(page);
54
+ }
55
+ else if (page < 1) {
56
+ page = 1;
57
+ this.pageInput.value = String(page);
58
+ }
43
59
  if (this.page === page) {
44
60
  return;
45
61
  }
46
- this.setPage.emit(page);
62
+ this.onPageUpdate(page);
47
63
  };
64
+ this.onPageUpdate = utils.debounce((page) => {
65
+ this.setPage.emit(page);
66
+ }, 500);
48
67
  this.onPageSizeSelect = (event) => {
49
68
  const pageSize = +event.target.value;
50
69
  if (this.pageSize === pageSize) {
@@ -72,10 +91,7 @@ const SwirlPagination = class {
72
91
  const showDropDown = this.variant === "advanced";
73
92
  const ariaPageLabel = `${this.page} ${this.pageLabel} ${this.pages}`;
74
93
  const className = index$1.classnames("pagination", `pagination--variant-${this.variant}`);
75
- return (index.h(index.Host, null, index.h("nav", { "aria-label": this.label, class: className }, index.h("ul", { class: "pagination__list", part: "pagination__list" }, this.showPageSizeSelect && (index.h("li", { class: "pagination__list-item" }, index.h("label", { class: "pagination__page-size-selection" }, index.h("swirl-text", null, this.pageSizeSelectLabel), index.h("swirl-stack", { align: "center", class: "pagination__page-size-select-container", orientation: "horizontal" }, index.h("select", { class: "pagination__page-size-select", onChange: this.onPageSizeSelect }, this.pageSizeOptions.map((pageSizeOption) => (index.h("option", { key: pageSizeOption, selected: pageSizeOption === this.pageSize, value: pageSizeOption }, pageSizeOption)))), index.h("swirl-icon-expand-more", { "aria-hidden": "true", class: "pagination__page-size-select-icon", size: 16 }))))), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__first-page-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-double-arrow-left></swirl-icon-double-arrow-left>", intent: "primary", label: this.firstPageButtonLabel, onClick: this.onFirstPageButtonClick })), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__prev-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-chevron-left></swirl-icon-chevron-left>", intent: "primary", label: this.prevButtonLabel, onClick: this.onPrevButtonClick })), showPageLabel ? (index.h("li", { class: "pagination__list-item pagination__page-label" }, index.h("span", null, showDropDown ? (index.h("span", { "aria-current": "page", class: "pagination__advanced-label" }, index.h("span", { class: "pagination__page-select-container" }, index.h("select", { "aria-label": this.pageSelectLabel, class: "pagination__page-select", onChange: this.onSelect }, new Array(this.pages)
76
- .fill(undefined)
77
- .map((_, index) => index + 1)
78
- .map((page) => (index.h("option", { selected: this.page === page, value: String(page) }, page))))), index.h("span", { "aria-hidden": "true" }, this.pageLabel, " ", this.pages))) : (index.h("span", { "aria-current": "page" }, ariaPageLabel))))) : (index.h("li", { class: "pagination__list-item" }, index.h("swirl-visually-hidden", null, index.h("span", { "aria-current": "page" }, ariaPageLabel)))), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__next-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-chevron-right></swirl-icon-chevron-right>", iconPosition: "end", intent: "primary", label: this.nextButtonLabel, onClick: this.onNextButtonClick })), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__last-page-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", intent: "primary", label: this.lastPageButtonLabel, onClick: this.onLastPageButtonClick }))))));
94
+ return (index.h(index.Host, null, index.h("nav", { "aria-label": this.label, class: className }, index.h("ul", { class: "pagination__list", part: "pagination__list" }, this.showPageSizeSelect && (index.h("li", { class: "pagination__list-item" }, index.h("label", { class: "pagination__page-size-selection" }, index.h("swirl-text", null, this.pageSizeSelectLabel), index.h("swirl-stack", { align: "center", class: "pagination__page-size-select-container", orientation: "horizontal" }, index.h("select", { class: "pagination__page-size-select", onChange: this.onPageSizeSelect }, this.pageSizeOptions.map((pageSizeOption) => (index.h("option", { key: pageSizeOption, selected: pageSizeOption === this.pageSize, value: pageSizeOption }, pageSizeOption)))), index.h("swirl-icon-expand-more", { "aria-hidden": "true", class: "pagination__page-size-select-icon", size: 16 }))))), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__first-page-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-double-arrow-left></swirl-icon-double-arrow-left>", intent: "primary", label: this.firstPageButtonLabel, onClick: this.onFirstPageButtonClick })), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__prev-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-chevron-left></swirl-icon-chevron-left>", intent: "primary", label: this.prevButtonLabel, onClick: this.onPrevButtonClick })), showPageLabel ? (index.h("li", { class: "pagination__list-item pagination__page-label" }, index.h("span", null, showDropDown ? (index.h("span", { "aria-current": "page", class: "pagination__advanced-label" }, index.h("input", { "aria-label": this.pageSelectLabel, class: "pagination__page-input", onFocus: this.onFocusPageInput, onInput: this.onPageInput, ref: (el) => (this.pageInput = el), type: "text", value: this.page }), index.h("span", { "aria-hidden": "true" }, this.pageLabel, " ", this.pages))) : (index.h("span", { "aria-current": "page" }, ariaPageLabel))))) : (index.h("li", { class: "pagination__list-item" }, index.h("swirl-visually-hidden", null, index.h("span", { "aria-current": "page" }, ariaPageLabel)))), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__next-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-chevron-right></swirl-icon-chevron-right>", iconPosition: "end", intent: "primary", label: this.nextButtonLabel, onClick: this.onNextButtonClick })), index.h("li", { class: "pagination__list-item" }, index.h("swirl-button", { class: "pagination__last-page-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", intent: "primary", label: this.lastPageButtonLabel, onClick: this.onLastPageButtonClick }))))));
79
95
  }
80
96
  };
81
97
  SwirlPagination.style = swirlPaginationCss;
@@ -13,6 +13,7 @@ const SwirlSearch = class {
13
13
  index.registerInstance(this, hostRef);
14
14
  this.inputBlur = index.createEvent(this, "inputBlur", 7);
15
15
  this.inputFocus = index.createEvent(this, "inputFocus", 7);
16
+ this.inputInput = index.createEvent(this, "inputInput", 7);
16
17
  this.valueChange = index.createEvent(this, "valueChange", 7);
17
18
  this.desktopMediaQuery = utils.getDesktopMediaQuery();
18
19
  this.desktopMediaQueryHandler = (event) => {
@@ -32,6 +33,9 @@ const SwirlSearch = class {
32
33
  this.onFocus = (event) => {
33
34
  this.inputFocus.emit(event);
34
35
  };
36
+ this.onInput = (event) => {
37
+ this.inputInput.emit(event.target.value);
38
+ };
35
39
  this.autoFocus = undefined;
36
40
  this.clearButtonLabel = "Clear search term";
37
41
  this.disabled = undefined;
@@ -68,7 +72,7 @@ const SwirlSearch = class {
68
72
  const className = index$1.classnames("search", `search--variant-${this.variant}`, {
69
73
  "search--disabled": this.disabled,
70
74
  });
71
- return (index.h(index.Host, null, index.h("span", { class: className, ref: (el) => (this.iconEl = el) }, index.h("swirl-icon-search", { class: "search__icon" }), index.h("input", { "aria-disabled": this.disabled ? "true" : undefined, "aria-label": this.label, autoComplete: "off", autoFocus: this.autoFocus, class: "search__input", disabled: this.disabled, id: this.inputId, inputMode: "search", name: this.inputName, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && (index.h("button", { "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.clear, type: "button" }, index.h("swirl-icon-cancel", null))))));
75
+ return (index.h(index.Host, null, index.h("span", { class: className, ref: (el) => (this.iconEl = el) }, index.h("swirl-icon-search", { class: "search__icon" }), index.h("input", { "aria-disabled": this.disabled ? "true" : undefined, "aria-label": this.label, autoComplete: "off", autoFocus: this.autoFocus, class: "search__input", disabled: this.disabled, id: this.inputId, inputMode: "search", name: this.inputName, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && (index.h("button", { "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.clear, type: "button" }, index.h("swirl-icon-cancel", null))))));
72
76
  }
73
77
  };
74
78
  SwirlSearch.style = swirlSearchCss;
@@ -6,7 +6,7 @@ const index = require('./index-83363034.js');
6
6
  const index$1 = require('./index-2ddd0598.js');
7
7
  const utils = require('./utils-f1b4e064.js');
8
8
 
9
- const swirlToastCss = ":host{display:flex}:host *{box-sizing:border-box}.toast{display:flex;width:100%;max-width:28rem;padding:var(--s-space-16);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);box-shadow:var(--s-shadow-level-2)}.toast--intent-critical{background-color:var(--s-surface-critical-default)}.toast--intent-success{background-color:var(--s-surface-success-default)}.toast__icon{display:inline-flex;margin-top:calc(-1 * var(--s-space-2));margin-right:0.625rem;flex-shrink:0}.toast__icon ::part(icon){color:var(--s-icon-on-status)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__icon{margin-top:0}}.toast__content{flex-grow:1;line-height:var(--s-line-height-base);text-align:left;align-self:flex-start}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__content{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.toast__dismiss-button{display:inline-flex;min-width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-left:var(--s-space-16);padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;color:var(--s-text-on-status);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);cursor:pointer}.toast__dismiss-button ::part(icon){color:var(--s-icon-on-status)}";
9
+ const swirlToastCss = ":host{display:flex}:host *{box-sizing:border-box}.toast{display:flex;width:100%;max-width:28rem;padding:var(--s-space-16);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);box-shadow:var(--s-shadow-level-2)}.toast--intent-critical{background-color:var(--s-surface-critical-default)}.toast--intent-success{background-color:var(--s-surface-success-default)}.toast__icon{display:inline-flex;margin-top:calc(-1 * var(--s-space-2));margin-right:0.625rem;flex-shrink:0}.toast__icon ::part(icon){color:var(--s-icon-on-status)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__icon{margin-top:0}}.toast__content{flex-grow:1;line-height:var(--s-line-height-base);text-align:left;align-self:flex-start}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.toast__content{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.toast__content ::part(link){color:var(--text-default)}.toast__dismiss-button{display:inline-flex;min-width:1.5rem;height:1.5rem;margin-top:calc(-1 * var(--s-space-2));margin-left:var(--s-space-16);padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;color:var(--s-text-on-status);background-color:transparent;font:inherit;font-weight:var(--s-font-weight-semibold);cursor:pointer}.toast__dismiss-button ::part(icon){color:var(--s-icon-on-status)}";
10
10
 
11
11
  const SwirlToast = class {
12
12
  constructor(hostRef) {
@@ -65,7 +65,7 @@ const SwirlToast = class {
65
65
  }
66
66
  render() {
67
67
  const className = index$1.classnames("toast", `toast--intent-${this.intent}`);
68
- return (index.h(index.Host, null, index.h("div", { class: className }, this.icon && (index.h("span", { class: "toast__icon", innerHTML: this.icon, part: "toast__icon", ref: (el) => (this.iconEl = el) })), index.h("span", { class: "toast__content", part: "toast__content" }, this.content), index.h("button", { "aria-label": this.dismissLabel || this.accessibleDismissLabel, class: "toast__dismiss-button", onClick: this.onDismiss, type: "button" }, this.dismissLabel, !Boolean(this.dismissLabel) && (index.h("swirl-icon-close", { ref: (el) => (this.dismissIconEl = el) }))))));
68
+ return (index.h(index.Host, null, index.h("div", { class: className }, this.icon && (index.h("span", { class: "toast__icon", innerHTML: this.icon, part: "toast__icon", ref: (el) => (this.iconEl = el) })), index.h("span", { class: "toast__content", innerHTML: this.content, part: "toast__content" }), index.h("button", { "aria-label": this.dismissLabel || this.accessibleDismissLabel, class: "toast__dismiss-button", onClick: this.onDismiss, type: "button" }, this.dismissLabel, !Boolean(this.dismissLabel) && (index.h("swirl-icon-close", { ref: (el) => (this.dismissIconEl = el) }))))));
69
69
  }
70
70
  static get watchers() { return {
71
71
  "duration": ["watchDuration"]