@spectrum-web-components/toast 0.10.15-devmode.0 → 0.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/toast",
3
- "version": "0.10.15-devmode.0+1a8b29491",
3
+ "version": "0.11.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,10 +57,10 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.6.1-devmode.0+1a8b29491",
61
- "@spectrum-web-components/button": "^0.18.2-devmode.0+1a8b29491",
62
- "@spectrum-web-components/icon": "^0.11.13-devmode.0+1a8b29491",
63
- "@spectrum-web-components/icons-workflow": "^0.8.13-devmode.0+1a8b29491",
60
+ "@spectrum-web-components/base": "^0.7.0",
61
+ "@spectrum-web-components/button": "^0.19.0",
62
+ "@spectrum-web-components/icon": "^0.12.0",
63
+ "@spectrum-web-components/icons-workflow": "^0.9.0",
64
64
  "tslib": "^2.0.0"
65
65
  },
66
66
  "devDependencies": {
@@ -72,5 +72,5 @@
72
72
  "./sp-*.js",
73
73
  "./**/*.dev.js"
74
74
  ],
75
- "gitHead": "1a8b294911ab377fa4f07e16eb016f1e3bf7b517"
75
+ "gitHead": "05c81318844160db3f8156144106e643507fef97"
76
76
  }
package/sp-toast.js CHANGED
@@ -1,3 +1,2 @@
1
- import { Toast } from "./src/Toast.js";
2
- customElements.define("sp-toast", Toast);
1
+ import{Toast as e}from"./src/Toast.js";customElements.define("sp-toast",e);
3
2
  //# sourceMappingURL=sp-toast.js.map
package/sp-toast.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-toast.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Toast } from './src/Toast.js';\n\ncustomElements.define('sp-toast', Toast);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-toast': Toast;\n }\n}\n"],
5
- "mappings": "AAWA;AAEA,eAAe,OAAO,YAAY,KAAK;",
5
+ "mappings": "AAWA,uCAEA,eAAe,OAAO,WAAY,CAAK",
6
6
  "names": []
7
7
  }
package/src/Toast.js CHANGED
@@ -1,146 +1,16 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result)
9
- __defProp(target, key, result);
10
- return result;
11
- };
12
- import {
13
- html,
14
- SpectrumElement
15
- } from "@spectrum-web-components/base";
16
- import { property } from "@spectrum-web-components/base/src/decorators.js";
17
- import "@spectrum-web-components/button/sp-close-button.js";
18
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js";
19
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";
20
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js";
21
- import toastStyles from "./toast.css.js";
22
- export const toastVariants = [
23
- "negative",
24
- "positive",
25
- "info",
26
- "error",
27
- "warning"
28
- ];
29
- export class Toast extends SpectrumElement {
30
- constructor() {
31
- super(...arguments);
32
- this.open = false;
33
- this._timeout = null;
34
- this._variant = "";
35
- this.countdownStart = 0;
36
- this.nextCount = -1;
37
- this.doCountdown = (time) => {
38
- if (!this.countdownStart) {
39
- this.countdownStart = performance.now();
40
- }
41
- if (time - this.countdownStart > this._timeout) {
42
- this.shouldClose();
43
- this.countdownStart = 0;
44
- } else {
45
- this.countdown();
46
- }
47
- };
48
- this.countdown = () => {
49
- cancelAnimationFrame(this.nextCount);
50
- this.nextCount = requestAnimationFrame(this.doCountdown);
51
- };
52
- this.holdCountdown = () => {
53
- this.stopCountdown();
54
- this.addEventListener("focusout", this.resumeCountdown);
55
- };
56
- this.resumeCountdown = () => {
57
- this.removeEventListener("focusout", this.holdCountdown);
58
- this.countdown();
59
- };
60
- }
61
- static get styles() {
62
- return [toastStyles];
63
- }
64
- set timeout(timeout) {
65
- const hasTimeout = typeof timeout !== null && timeout > 0;
66
- const newTimeout = hasTimeout ? Math.max(6e3, timeout) : null;
67
- const oldValue = this.timeout;
68
- if (newTimeout && this.countdownStart) {
69
- this.countdownStart = performance.now();
70
- }
71
- this._timeout = newTimeout;
72
- this.requestUpdate("timeout", oldValue);
73
- }
74
- get timeout() {
75
- return this._timeout;
76
- }
77
- set variant(variant) {
78
- if (variant === this.variant) {
79
- return;
80
- }
81
- const oldValue = this.variant;
82
- if (toastVariants.includes(variant)) {
83
- this.setAttribute("variant", variant);
84
- this._variant = variant;
85
- } else {
86
- this.removeAttribute("variant");
87
- this._variant = "";
88
- }
89
- this.requestUpdate("variant", oldValue);
90
- }
91
- get variant() {
92
- return this._variant;
93
- }
94
- renderIcon(variant) {
95
- switch (variant) {
96
- case "info":
97
- return html`
1
+ var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=(r,t,i,o)=>{for(var e=o>1?void 0:o?p(t,i):t,a=r.length-1,u;a>=0;a--)(u=r[a])&&(e=(o?u(t,i,e):u(e))||e);return o&&e&&c(t,i,e),e};import{html as n,SpectrumElement as d}from"@spectrum-web-components/base";import{property as l}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/button/sp-close-button.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js";import h from"./toast.css.js";export const toastVariants=["negative","positive","info","error","warning"];export class Toast extends d{constructor(){super(...arguments);this.open=!1;this._timeout=null;this._variant="";this.countdownStart=0;this.nextCount=-1;this.doCountdown=t=>{this.countdownStart||(this.countdownStart=performance.now()),t-this.countdownStart>this._timeout?(this.shouldClose(),this.countdownStart=0):this.countdown()};this.countdown=()=>{cancelAnimationFrame(this.nextCount),this.nextCount=requestAnimationFrame(this.doCountdown)};this.holdCountdown=()=>{this.stopCountdown(),this.addEventListener("focusout",this.resumeCountdown)};this.resumeCountdown=()=>{this.removeEventListener("focusout",this.holdCountdown),this.countdown()}}static get styles(){return[h]}set timeout(t){const o=typeof t!==null&&t>0?Math.max(6e3,t):null,e=this.timeout;o&&this.countdownStart&&(this.countdownStart=performance.now()),this._timeout=o,this.requestUpdate("timeout",e)}get timeout(){return this._timeout}set variant(t){if(t===this.variant)return;const i=this.variant;toastVariants.includes(t)?(this.setAttribute("variant",t),this._variant=t):(this.removeAttribute("variant"),this._variant=""),this.requestUpdate("variant",i)}get variant(){return this._variant}renderIcon(t){switch(t){case"info":return n`
98
2
  <sp-icon-info
99
3
  label="Information"
100
4
  class="type"
101
5
  ></sp-icon-info>
102
- `;
103
- case "negative":
104
- case "error":
105
- case "warning":
106
- return html`
6
+ `;case"negative":case"error":case"warning":return n`
107
7
  <sp-icon-alert label="Error" class="type"></sp-icon-alert>
108
- `;
109
- case "positive":
110
- case "success":
111
- return html`
8
+ `;case"positive":case"success":return n`
112
9
  <sp-icon-checkmark-circle
113
10
  label="Success"
114
11
  class="type"
115
12
  ></sp-icon-checkmark-circle>
116
- `;
117
- default:
118
- return html``;
119
- }
120
- }
121
- startCountdown() {
122
- this.countdown();
123
- this.addEventListener("focusin", this.holdCountdown);
124
- }
125
- stopCountdown() {
126
- cancelAnimationFrame(this.nextCount);
127
- this.countdownStart = 0;
128
- }
129
- shouldClose() {
130
- const applyDefault = this.dispatchEvent(new CustomEvent("close", {
131
- composed: true,
132
- bubbles: true,
133
- cancelable: true
134
- }));
135
- if (applyDefault) {
136
- this.close();
137
- }
138
- }
139
- close() {
140
- this.open = false;
141
- }
142
- render() {
143
- return html`
13
+ `;default:return n``}}startCountdown(){this.countdown(),this.addEventListener("focusin",this.holdCountdown)}stopCountdown(){cancelAnimationFrame(this.nextCount),this.countdownStart=0}shouldClose(){this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0,cancelable:!0}))&&this.close()}close(){this.open=!1}render(){return n`
144
14
  ${this.renderIcon(this.variant)}
145
15
  <div class="body" role="alert">
146
16
  <div class="content">
@@ -155,37 +25,5 @@ export class Toast extends SpectrumElement {
155
25
  variant="white"
156
26
  ></sp-close-button>
157
27
  </div>
158
- `;
159
- }
160
- updated(changes) {
161
- super.updated(changes);
162
- if (changes.has("open")) {
163
- if (this.open) {
164
- if (this.timeout) {
165
- this.startCountdown();
166
- }
167
- } else {
168
- if (this.timeout) {
169
- this.stopCountdown();
170
- }
171
- }
172
- }
173
- if (changes.has("timeout")) {
174
- if (this.timeout !== null && this.open) {
175
- this.startCountdown();
176
- } else {
177
- this.stopCountdown();
178
- }
179
- }
180
- }
181
- }
182
- __decorateClass([
183
- property({ type: Boolean, reflect: true })
184
- ], Toast.prototype, "open", 2);
185
- __decorateClass([
186
- property({ type: Number })
187
- ], Toast.prototype, "timeout", 1);
188
- __decorateClass([
189
- property({ type: String })
190
- ], Toast.prototype, "variant", 1);
28
+ `}updated(t){super.updated(t),t.has("open")&&(this.open?this.timeout&&this.startCountdown():this.timeout&&this.stopCountdown()),t.has("timeout")&&(this.timeout!==null&&this.open?this.startCountdown():this.stopCountdown())}}s([l({type:Boolean,reflect:!0})],Toast.prototype,"open",2),s([l({type:Number})],Toast.prototype,"timeout",1),s([l({type:String})],Toast.prototype,"variant",1);
191
29
  //# sourceMappingURL=Toast.js.map
package/src/Toast.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["Toast.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-info.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js';\n\nimport toastStyles from './toast.css.js';\n\nexport const toastVariants: ToastVariants[] = [\n 'negative',\n 'positive',\n 'info',\n 'error',\n 'warning',\n];\n\nexport type ToastVariants =\n | 'negative'\n | 'positive'\n | 'info'\n | 'error'\n | 'warning'\n | '';\n\n/**\n * @element sp-toast\n *\n * @slot - The toast content\n * @slot action - button element surfacing an action in the Toast\n *\n * @fires close - Announces that the Toast has been closed by the user or by its timeout.\n */\n\nexport class Toast extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [toastStyles];\n }\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * When a timeout is provided it represents the number of milliseconds from when\n * the Toast was placed on the page before it will automatically dismiss itself.\n * Accessibility concerns require that a Toast is available for at least 6000ms\n * before being dismissed, so any timeout of less than 6000ms will be raised to\n * that baseline. It is suggested that messages longer than 120 words should\n * receive another 1000ms in their timeout for each additional 120 words in the\n * message. E.G. 240 words = 7000ms, 360 words = 8000ms, etc.\n *\n * @param {Number} timeout\n */\n @property({ type: Number })\n public set timeout(timeout: number | null) {\n const hasTimeout = typeof timeout !== null && (timeout as number) > 0;\n const newTimeout = hasTimeout\n ? Math.max(6000, timeout as number)\n : null;\n const oldValue = this.timeout;\n if (newTimeout && this.countdownStart) {\n this.countdownStart = performance.now();\n }\n this._timeout = newTimeout;\n this.requestUpdate('timeout', oldValue);\n }\n\n public get timeout(): number | null {\n return this._timeout;\n }\n\n public _timeout: number | null = null;\n\n /**\n * The variant applies specific styling when set to `negative`, `positive`, `info`, `error`, or `warning`.\n * `variant` attribute is removed when not matching one of the above.\n *\n * @param {String} variant\n */\n @property({ type: String })\n public set variant(variant: ToastVariants) {\n if (variant === this.variant) {\n return;\n }\n const oldValue = this.variant;\n if (toastVariants.includes(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n } else {\n this.removeAttribute('variant');\n this._variant = '';\n }\n this.requestUpdate('variant', oldValue);\n }\n\n public get variant(): ToastVariants {\n return this._variant;\n }\n\n private _variant: ToastVariants = '';\n\n private renderIcon(variant: string): TemplateResult {\n switch (variant) {\n case 'info':\n return html`\n <sp-icon-info\n label=\"Information\"\n class=\"type\"\n ></sp-icon-info>\n `;\n case 'negative':\n case 'error': // deprecated\n case 'warning': // deprecated\n return html`\n <sp-icon-alert label=\"Error\" class=\"type\"></sp-icon-alert>\n `;\n case 'positive':\n case 'success': // deprecated\n return html`\n <sp-icon-checkmark-circle\n label=\"Success\"\n class=\"type\"\n ></sp-icon-checkmark-circle>\n `;\n default:\n return html``;\n }\n }\n\n private countdownStart = 0;\n private nextCount = -1;\n\n private doCountdown = (time: number): void => {\n if (!this.countdownStart) {\n this.countdownStart = performance.now();\n }\n if (time - this.countdownStart > (this._timeout as number)) {\n this.shouldClose();\n this.countdownStart = 0;\n } else {\n this.countdown();\n }\n };\n\n private countdown = (): void => {\n cancelAnimationFrame(this.nextCount);\n this.nextCount = requestAnimationFrame(this.doCountdown);\n };\n\n private holdCountdown = (): void => {\n this.stopCountdown();\n this.addEventListener('focusout', this.resumeCountdown);\n };\n\n private resumeCountdown = (): void => {\n this.removeEventListener('focusout', this.holdCountdown);\n this.countdown();\n };\n\n private startCountdown(): void {\n this.countdown();\n this.addEventListener('focusin', this.holdCountdown);\n }\n\n private stopCountdown(): void {\n cancelAnimationFrame(this.nextCount);\n this.countdownStart = 0;\n }\n\n private shouldClose(): void {\n const applyDefault = this.dispatchEvent(\n new CustomEvent('close', {\n composed: true,\n bubbles: true,\n cancelable: true,\n })\n );\n if (applyDefault) {\n this.close();\n }\n }\n\n public close(): void {\n this.open = false;\n }\n\n protected override render(): TemplateResult {\n return html`\n ${this.renderIcon(this.variant)}\n <div class=\"body\" role=\"alert\">\n <div class=\"content\">\n <slot></slot>\n </div>\n <slot name=\"action\"></slot>\n </div>\n <div class=\"buttons\">\n <sp-close-button\n @click=${this.shouldClose}\n label=\"Close\"\n variant=\"white\"\n ></sp-close-button>\n </div>\n `;\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('open')) {\n if (this.open) {\n if (this.timeout) {\n this.startCountdown();\n }\n } else {\n if (this.timeout) {\n this.stopCountdown();\n }\n }\n }\n if (changes.has('timeout')) {\n if (this.timeout !== null && this.open) {\n this.startCountdown();\n } else {\n this.stopCountdown();\n }\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AACA;AACA;AAEA;AAEO,aAAM,gBAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AAmBO,aAAM,cAAc,gBAAgB;AAAA,EAApC;AAAA;AAMI,gBAAO;AA+BP,oBAA0B;AA4BzB,oBAA0B;AA8B1B,0BAAiB;AACjB,qBAAY;AAEZ,uBAAc,CAAC,SAAuB;AAC1C,UAAI,CAAC,KAAK,gBAAgB;AACtB,aAAK,iBAAiB,YAAY,IAAI;AAAA,MAC1C;AACA,UAAI,OAAO,KA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AAM,QAAS,QAAS,EAAK,CAAC,GACnC,AANJ,MAMI,oBAcI,GADX,AAAC,EAAS,CAAE,KAAM,MAAO,CAAC,GACf,AApBR,MAoBQ,uBA0BA,GADX,AAAC,EAAS,CAAE,KAAM,MAAO,CAAC,GACf,AA9CR,MA8CQ",
6
6
  "names": []
7
7
  }
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./Toast.js";
1
+ export*from"./Toast.js";
2
2
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nexport * from './Toast.js';\n"],
5
- "mappings": "AAWA;",
5
+ "mappings": "AAWA",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,4 @@
1
- import { css } from "@spectrum-web-components/base";
2
- const styles = css`
1
+ import{css as t}from"@spectrum-web-components/base";const o=t`
3
2
  :host{--spectrum-toast-icon-padding-y:var(
4
3
  --spectrum-global-dimension-size-85
5
4
  );--spectrum-toast-neutral-content-padding-top:var(
@@ -85,6 +84,5 @@ const styles = css`
85
84
  )}:host([variant=positive]) .closeButton:focus-visible:not(:active),:host([variant=success]) .closeButton:focus-visible:not(:active){color:var(
86
85
  --spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)
87
86
  )}@media (forced-colors:active){:host{border:1px solid transparent}}
88
- `;
89
- export default styles;
87
+ `;export default o;
90
88
  //# sourceMappingURL=spectrum-toast.css.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-toast.css.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-toast-icon-padding-y:var(\n--spectrum-global-dimension-size-85\n);--spectrum-toast-neutral-content-padding-top:var(\n--spectrum-global-dimension-size-65\n);--spectrum-toast-content-padding-bottom:var(\n--spectrum-global-dimension-size-65\n);--spectrum-toast-button-margin-right:var(\n--spectrum-global-dimension-size-130\n)}:host([dir=ltr]){padding-right:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]){padding-left:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]){padding-left:var(\n--spectrum-toast-neutral-padding-left,var(--spectrum-global-dimension-size-200)\n)}:host([dir=rtl]){padding-right:var(\n--spectrum-toast-neutral-padding-left,var(--spectrum-global-dimension-size-200)\n)}:host{-webkit-font-smoothing:antialiased;align-items:stretch;border-radius:var(\n--spectrum-toast-neutral-border-radius,var(--spectrum-alias-border-radius-regular)\n);box-sizing:border-box;display:inline-flex;flex-direction:row;font-size:var(\n--spectrum-toast-neutral-text-size,var(--spectrum-global-dimension-font-size-100)\n);font-weight:var(\n--spectrum-toast-neutral-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);padding-bottom:var(\n--spectrum-toast-neutral-padding-y,var(--spectrum-global-dimension-size-100)\n);padding-top:var(\n--spectrum-toast-neutral-padding-y,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]) .type{margin-right:var(\n--spectrum-toast-neutral-icon-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([dir=rtl]) .type{margin-left:var(\n--spectrum-toast-neutral-icon-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([dir=ltr]) .type{margin-left:0}:host([dir=rtl]) .type{margin-right:0}.type{flex-grow:0;flex-shrink:0;margin-bottom:var(--spectrum-toast-icon-padding-y);margin-top:var(--spectrum-toast-icon-padding-y)}:host([dir=ltr]) .content{padding-right:var(\n--spectrum-toast-neutral-content-padding-right,var(--spectrum-global-dimension-size-200)\n)}:host([dir=rtl]) .content{padding-left:var(\n--spectrum-toast-neutral-content-padding-right,var(--spectrum-global-dimension-size-200)\n)}:host([dir=ltr]) .content{padding-left:0}:host([dir=rtl]) .content{padding-right:0}:host([dir=ltr]) .content{text-align:left}:host([dir=rtl]) .content{text-align:right}.content{box-sizing:border-box;display:inline-block;flex:1 1 auto;font-size:var(\n--spectrum-toast-info-text-size,var(--spectrum-global-dimension-font-size-100)\n);font-weight:var(\n--spectrum-toast-info-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);line-height:var(\n--spectrum-toast-info-text-line-height,var(--spectrum-alias-component-text-line-height)\n);padding-bottom:var(--spectrum-toast-content-padding-bottom);padding-top:var(\n--spectrum-toast-neutral-content-padding-top,var(--spectrum-global-dimension-size-65)\n)}.buttons{align-items:flex-start;display:flex;flex:0 0 auto}:host([dir=ltr]) .buttons .spectrum-ClearButton+.spectrum-ClearButton,:host([dir=ltr]) .buttons .spectrum-ClearButton+::slotted([slot=action]),:host([dir=ltr]) .buttons slot[name=action]+.spectrum-ClearButton,:host([dir=ltr]) .buttons slot[name=action]+::slotted([slot=action]){margin-left:var(\n--spectrum-toast-neutral-button-gap-x,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]) .buttons .spectrum-ClearButton+.spectrum-ClearButton,:host([dir=rtl]) .buttons .spectrum-ClearButton+::slotted([slot=action]),:host([dir=rtl]) .buttons slot[name=action]+.spectrum-ClearButton,:host([dir=rtl]) .buttons slot[name=action]+::slotted([slot=action]){margin-right:var(\n--spectrum-toast-neutral-button-gap-x,var(--spectrum-global-dimension-size-100)\n)}.body{align-self:center;flex:1 1 auto}:host([dir=ltr]) .body ::slotted([slot=action]){float:right}:host([dir=rtl]) .body ::slotted([slot=action]){float:left}:host([dir=ltr]) .body ::slotted([slot=action]){margin-right:var(\n--spectrum-toast-button-margin-right\n)}:host([dir=rtl]) .body ::slotted([slot=action]){margin-left:var(\n--spectrum-toast-button-margin-right\n)}:host([dir=ltr]) .body+.buttons{padding-left:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]) .body+.buttons{padding-right:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]) .body+.buttons{border-left-width:1px}:host([dir=rtl]) .body+.buttons{border-right-width:1px}:host([dir=ltr]) .body+.buttons{border-left-style:solid}:host([dir=rtl]) .body+.buttons{border-right-style:solid}:host{background-color:var(\n--spectrum-toast-neutral-background-color,var(--spectrum-semantic-neutral-background-color-default)\n);color:var(\n--spectrum-toast-neutral-background-color,var(--spectrum-semantic-neutral-background-color-default)\n)}.content{color:var(\n--spectrum-toast-neutral-text-color,var(--spectrum-global-color-static-white)\n)}.type{color:#fff}:host([dir=ltr]) .buttons{border-left-color:hsla(0,0%,100%,.2)}:host([dir=rtl]) .buttons{border-right-color:hsla(0,0%,100%,.2)}:host([variant=error]),:host([variant=negative]){background-color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n);color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=error]) .closeButton.focus-visible:not(:active),:host([variant=negative]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=error]) .closeButton:focus-visible:not(:active),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=info]){background-color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n);color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=info]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=positive]),:host([variant=success]){background-color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n);color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}:host([variant=positive]) .closeButton.focus-visible:not(:active),:host([variant=success]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}:host([variant=positive]) .closeButton:focus-visible:not(:active),:host([variant=success]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}@media (forced-colors:active){:host{border:1px solid transparent}}\n`;\nexport default styles;"],
5
- "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuFf,eAAe;",
5
+ "mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuFf,cAAe",
6
6
  "names": []
7
7
  }
package/src/toast.css.js CHANGED
@@ -1,5 +1,4 @@
1
- import { css } from "@spectrum-web-components/base";
2
- const styles = css`
1
+ import{css as t}from"@spectrum-web-components/base";const o=t`
3
2
  :host{--spectrum-toast-icon-padding-y:var(
4
3
  --spectrum-global-dimension-size-85
5
4
  );--spectrum-toast-neutral-content-padding-top:var(
@@ -85,6 +84,5 @@ const styles = css`
85
84
  )}:host([variant=positive]) .closeButton:focus-visible:not(:active),:host([variant=success]) .closeButton:focus-visible:not(:active){color:var(
86
85
  --spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)
87
86
  )}@media (forced-colors:active){:host{border:1px solid transparent}}.content{line-height:1.5}:host(:not([open])){display:none}
88
- `;
89
- export default styles;
87
+ `;export default o;
90
88
  //# sourceMappingURL=toast.css.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["toast.css.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-toast-icon-padding-y:var(\n--spectrum-global-dimension-size-85\n);--spectrum-toast-neutral-content-padding-top:var(\n--spectrum-global-dimension-size-65\n);--spectrum-toast-content-padding-bottom:var(\n--spectrum-global-dimension-size-65\n);--spectrum-toast-button-margin-right:var(\n--spectrum-global-dimension-size-130\n)}:host([dir=ltr]){padding-right:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]){padding-left:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]){padding-left:var(\n--spectrum-toast-neutral-padding-left,var(--spectrum-global-dimension-size-200)\n)}:host([dir=rtl]){padding-right:var(\n--spectrum-toast-neutral-padding-left,var(--spectrum-global-dimension-size-200)\n)}:host{-webkit-font-smoothing:antialiased;align-items:stretch;border-radius:var(\n--spectrum-toast-neutral-border-radius,var(--spectrum-alias-border-radius-regular)\n);box-sizing:border-box;display:inline-flex;flex-direction:row;font-size:var(\n--spectrum-toast-neutral-text-size,var(--spectrum-global-dimension-font-size-100)\n);font-weight:var(\n--spectrum-toast-neutral-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);padding-bottom:var(\n--spectrum-toast-neutral-padding-y,var(--spectrum-global-dimension-size-100)\n);padding-top:var(\n--spectrum-toast-neutral-padding-y,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]) .type{margin-right:var(\n--spectrum-toast-neutral-icon-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([dir=rtl]) .type{margin-left:var(\n--spectrum-toast-neutral-icon-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([dir=ltr]) .type{margin-left:0}:host([dir=rtl]) .type{margin-right:0}.type{flex-grow:0;flex-shrink:0;margin-bottom:var(--spectrum-toast-icon-padding-y);margin-top:var(--spectrum-toast-icon-padding-y)}:host([dir=ltr]) .content{padding-right:var(\n--spectrum-toast-neutral-content-padding-right,var(--spectrum-global-dimension-size-200)\n)}:host([dir=rtl]) .content{padding-left:var(\n--spectrum-toast-neutral-content-padding-right,var(--spectrum-global-dimension-size-200)\n)}:host([dir=ltr]) .content{padding-left:0}:host([dir=rtl]) .content{padding-right:0}:host([dir=ltr]) .content{text-align:left}:host([dir=rtl]) .content{text-align:right}.content{box-sizing:border-box;display:inline-block;flex:1 1 auto;font-size:var(\n--spectrum-toast-info-text-size,var(--spectrum-global-dimension-font-size-100)\n);font-weight:var(\n--spectrum-toast-info-text-font-weight,var(--spectrum-alias-body-text-font-weight)\n);line-height:var(\n--spectrum-toast-info-text-line-height,var(--spectrum-alias-component-text-line-height)\n);padding-bottom:var(--spectrum-toast-content-padding-bottom);padding-top:var(\n--spectrum-toast-neutral-content-padding-top,var(--spectrum-global-dimension-size-65)\n)}.buttons{align-items:flex-start;display:flex;flex:0 0 auto}:host([dir=ltr]) .buttons .spectrum-ClearButton+.spectrum-ClearButton,:host([dir=ltr]) .buttons .spectrum-ClearButton+::slotted([slot=action]),:host([dir=ltr]) .buttons slot[name=action]+.spectrum-ClearButton,:host([dir=ltr]) .buttons slot[name=action]+::slotted([slot=action]){margin-left:var(\n--spectrum-toast-neutral-button-gap-x,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]) .buttons .spectrum-ClearButton+.spectrum-ClearButton,:host([dir=rtl]) .buttons .spectrum-ClearButton+::slotted([slot=action]),:host([dir=rtl]) .buttons slot[name=action]+.spectrum-ClearButton,:host([dir=rtl]) .buttons slot[name=action]+::slotted([slot=action]){margin-right:var(\n--spectrum-toast-neutral-button-gap-x,var(--spectrum-global-dimension-size-100)\n)}.body{align-self:center;flex:1 1 auto}:host([dir=ltr]) .body ::slotted([slot=action]){float:right}:host([dir=rtl]) .body ::slotted([slot=action]){float:left}:host([dir=ltr]) .body ::slotted([slot=action]){margin-right:var(\n--spectrum-toast-button-margin-right\n)}:host([dir=rtl]) .body ::slotted([slot=action]){margin-left:var(\n--spectrum-toast-button-margin-right\n)}:host([dir=ltr]) .body+.buttons{padding-left:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]) .body+.buttons{padding-right:var(\n--spectrum-toast-neutral-padding-right,var(--spectrum-global-dimension-size-100)\n)}:host([dir=ltr]) .body+.buttons{border-left-width:1px}:host([dir=rtl]) .body+.buttons{border-right-width:1px}:host([dir=ltr]) .body+.buttons{border-left-style:solid}:host([dir=rtl]) .body+.buttons{border-right-style:solid}:host{background-color:var(\n--spectrum-toast-neutral-background-color,var(--spectrum-semantic-neutral-background-color-default)\n);color:var(\n--spectrum-toast-neutral-background-color,var(--spectrum-semantic-neutral-background-color-default)\n)}.content{color:var(\n--spectrum-toast-neutral-text-color,var(--spectrum-global-color-static-white)\n)}.type{color:#fff}:host([dir=ltr]) .buttons{border-left-color:hsla(0,0%,100%,.2)}:host([dir=rtl]) .buttons{border-right-color:hsla(0,0%,100%,.2)}:host([variant=error]),:host([variant=negative]){background-color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n);color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=error]) .closeButton.focus-visible:not(:active),:host([variant=negative]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=error]) .closeButton:focus-visible:not(:active),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-negative-background-color,var(--spectrum-semantic-negative-background-color)\n)}:host([variant=info]){background-color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n);color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=info]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-info-background-color,var(--spectrum-semantic-informative-background-color)\n)}:host([variant=positive]),:host([variant=success]){background-color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n);color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}:host([variant=positive]) .closeButton.focus-visible:not(:active),:host([variant=success]) .closeButton.focus-visible:not(:active){color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}:host([variant=positive]) .closeButton:focus-visible:not(:active),:host([variant=success]) .closeButton:focus-visible:not(:active){color:var(\n--spectrum-toast-positive-background-color,var(--spectrum-semantic-positive-background-color)\n)}@media (forced-colors:active){:host{border:1px solid transparent}}.content{line-height:1.5}:host(:not([open])){display:none}\n`;\nexport default styles;"],
5
- "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuFf,eAAe;",
5
+ "mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuFf,cAAe",
6
6
  "names": []
7
7
  }
@@ -1,65 +1,10 @@
1
- import { html } from "@spectrum-web-components/base";
2
- import "@spectrum-web-components/toast/sp-toast.js";
3
- import "@spectrum-web-components/button/sp-button.js";
4
- const toast = ({
5
- variant = "",
6
- open = true,
7
- content = ""
8
- }) => html`
1
+ import{html as r}from"@spectrum-web-components/base";import"@spectrum-web-components/toast/sp-toast.js";import"@spectrum-web-components/button/sp-button.js";const n=({variant:e="",open:t=!0,content:o=""})=>r`
9
2
  <sp-toast
10
- variant=${variant}
11
- ?open=${open}
3
+ variant=${e}
4
+ ?open=${t}
12
5
  >
13
- ${content}
6
+ ${o}
14
7
  <sp-button slot="action" variant="overBackground" quiet>Undo</sp-button>
15
8
  </sp-toast>
16
- `;
17
- export default {
18
- component: "sp-toast",
19
- title: "Toast",
20
- args: {
21
- content: "This is a toast message.",
22
- open: true
23
- },
24
- argTypes: {
25
- content: {
26
- name: "content",
27
- type: { name: "string", required: false },
28
- table: {
29
- type: { summary: "string" },
30
- defaultValue: { summary: "" }
31
- },
32
- control: "text"
33
- },
34
- open: {
35
- name: "open",
36
- type: { name: "boolean", required: false },
37
- description: "Whether the toast is open.",
38
- table: {
39
- type: { summary: "boolean" },
40
- defaultValue: { summary: false }
41
- },
42
- control: {
43
- type: "boolean"
44
- }
45
- }
46
- }
47
- };
48
- export const Default = ({
49
- variant,
50
- open,
51
- content
52
- }) => {
53
- return toast({ variant, open, content });
54
- };
55
- const variantDemo = ({
56
- variant,
57
- open,
58
- content
59
- }) => {
60
- return toast({ variant, open, content });
61
- };
62
- export const Positive = (args) => variantDemo({ ...args, variant: "positive" });
63
- export const Negative = (args) => variantDemo({ ...args, variant: "negative" });
64
- export const Info = (args) => variantDemo({ ...args, variant: "info" });
9
+ `;export default{component:"sp-toast",title:"Toast",args:{content:"This is a toast message.",open:!0},argTypes:{content:{name:"content",type:{name:"string",required:!1},table:{type:{summary:"string"},defaultValue:{summary:""}},control:"text"},open:{name:"open",type:{name:"boolean",required:!1},description:"Whether the toast is open.",table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}}}};export const Default=({variant:e,open:t,content:o})=>n({variant:e,open:t,content:o});const a=({variant:e,open:t,content:o})=>n({variant:e,open:t,content:o});export const Positive=e=>a({...e,variant:"positive"}),Negative=e=>a({...e,variant:"negative"}),Info=e=>a({...e,variant:"info"});
65
10
  //# sourceMappingURL=toast.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["toast.stories.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nconst toast = ({\n variant = '',\n open = true,\n content = '',\n}): TemplateResult => html`\n <sp-toast\n variant=${variant as\n | ''\n | 'negative'\n | 'positive'\n | 'info'\n | 'error'\n | 'warning'}\n ?open=${open}\n >\n ${content}\n <sp-button slot=\"action\" variant=\"overBackground\" quiet>Undo</sp-button>\n </sp-toast>\n`;\n\nexport default {\n component: 'sp-toast',\n title: 'Toast',\n args: {\n content: 'This is a toast message.',\n open: true,\n },\n argTypes: {\n content: {\n name: 'content',\n type: { name: 'string', required: false },\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: '' },\n },\n control: 'text',\n },\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n description: 'Whether the toast is open.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ninterface Properties {\n variant: '' | 'negative' | 'positive' | 'info' | 'error' | 'warning';\n open: boolean;\n content: string;\n onClose: (event: Event) => void;\n}\n\nexport const Default = ({\n variant,\n open,\n content,\n}: Properties): TemplateResult => {\n return toast({ variant, open, content });\n};\n\nconst variantDemo = ({\n variant,\n open,\n content,\n}: Properties): TemplateResult => {\n return toast({ variant, open, content });\n};\n\nexport const Positive = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'positive' });\n\nexport const Negative = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'negative' });\n\nexport const Info = (args: Properties): TemplateResult =>\n variantDemo({ ...args, variant: 'info' });\n"],
5
- "mappings": "AAWA;AAEA;AACA;AAEA,MAAM,QAAQ,CAAC;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AAAA,MACQ;AAAA;AAAA,kBAEJ;AAAA,gBAOF;AAAA;AAAA,UAEN;AAAA;AAAA;AA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AAAA,EAKV,cAAe,CACX,UAAW,WACX,MAAO,QACP,KAAM,CACF,QAAS,2BACT,KAAM,EACV,EACA,SAAU,CACN,QAAS,CACL,KAAM,UACN,KAAM,CAAE,KAAM,SAAU,SAAU,EAAM,EACxC,MAAO,CACH,KAAM,CAAE,QAAS,QAAS,EAC1B,aAAc,CAAE,QAAS,EAAG,CAChC,EACA,QAAS,MACb,EACA,KAAM,CACF,KAAM,OACN,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,YAAa,6BACb,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,CACJ,CACJ,EASO,YAAM,SAAU,CAAC,CACpB,UACA,OACA,aAEO,EAAM,CAAE,UAAS,OAAM,SAAQ,CAAC,EAG3C,KAAM,GAAc,CAAC,CACjB,UACA,OACA,aAEO,EAAM,CAAE,UAAS,OAAM,SAAQ,CAAC,EAGpC,YAAM,UAAW,AAAC,GACrB,EAAY,IAAK,EAAM,QAAS,UAAW,CAAC,EAEnC,SAAW,AAAC,GACrB,EAAY,IAAK,EAAM,QAAS,UAAW,CAAC,EAEnC,KAAO,AAAC,GACjB,EAAY,IAAK,EAAM,QAAS,MAAO,CAAC",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,4 @@
1
- import "@spectrum-web-components/toast/sp-toast.js";
2
- import { html } from "lit";
3
- import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
4
- measureFixtureCreation(html`
1
+ import"@spectrum-web-components/toast/sp-toast.js";import{html as t}from"lit";import{measureFixtureCreation as m}from"../../../../test/benchmark/helpers.js";m(t`
5
2
  <sp-toast>Tip me!</sp-toast>
6
3
  `);
7
4
  //# sourceMappingURL=test-basic.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["test-basic.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-toast>Tip me!</sp-toast>\n`);\n"],
5
- "mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
5
+ "mappings": "AAYA,mDACA,2BACA,+EAEA,EAAuB;AAAA;AAAA,CAEtB",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,2 @@
1
- import * as stories from "../stories/toast.stories.js";
2
- import { regressVisuals } from "../../../test/visual/test.js";
3
- regressVisuals("ToastStories", stories);
1
+ import*as s from"../stories/toast.stories.js";import{regressVisuals as r}from"../../../test/visual/test.js";r("ToastStories",s);
4
2
  //# sourceMappingURL=toast.test-vrt.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["toast.test-vrt.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as stories from '../stories/toast.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ToastStories', stories);\n"],
5
- "mappings": "AAYA;AACA;AAEA,eAAe,gBAAgB,OAAO;",
5
+ "mappings": "AAYA,8CACA,8DAEA,EAAe,eAAgB,CAAO",
6
6
  "names": []
7
7
  }
@@ -1,203 +1,42 @@
1
- import "@spectrum-web-components/toast/sp-toast.js";
2
- import { toastVariants } from "@spectrum-web-components/toast";
3
- import {
4
- elementUpdated,
5
- expect,
6
- fixture,
7
- html,
8
- nextFrame,
9
- waitUntil
10
- } from "@open-wc/testing";
11
- import {
12
- testForLitDevWarnings,
13
- waitForPredicate
14
- } from "../../../test/testing-helpers.js";
15
- import { spy } from "sinon";
16
- describe("Toast", () => {
17
- testForLitDevWarnings(async () => await fixture(html`
1
+ import"@spectrum-web-components/toast/sp-toast.js";import{toastVariants as c}from"@spectrum-web-components/toast";import{elementUpdated as e,expect as a,fixture as n,html as i,nextFrame as l,waitUntil as d}from"@open-wc/testing";import{testForLitDevWarnings as m,waitForPredicate as v}from"../../../test/testing-helpers.js";import{spy as u}from"sinon";describe("Toast",()=>{m(async()=>await n(i`
18
2
  <sp-toast open>Help text.</sp-toast>
19
- `));
20
- it("loads", async () => {
21
- const el = await fixture(html`
3
+ `)),it("loads",async()=>{const t=await n(i`
22
4
  <sp-toast open>Help text.</sp-toast>
23
- `);
24
- await elementUpdated(el);
25
- await expect(el).to.be.accessible();
26
- });
27
- toastVariants.map((variant) => {
28
- it(`loads - [variant="${variant}"]`, async () => {
29
- const el = await fixture(html`
30
- <sp-toast variant=${variant} open>
31
- This toast is of the \`${variant}\` variant.
5
+ `);await e(t),await a(t).to.be.accessible()}),c.map(t=>{it(`loads - [variant="${t}"]`,async()=>{const o=await n(i`
6
+ <sp-toast variant=${t} open>
7
+ This toast is of the \`${t}\` variant.
32
8
  </sp-toast>
33
- `);
34
- await elementUpdated(el);
35
- await expect(el).to.be.accessible();
36
- });
37
- });
38
- it("loads - timeout", async () => {
39
- const el = await fixture(html`
9
+ `);await e(o),await a(o).to.be.accessible()})}),it("loads - timeout",async()=>{const t=await n(i`
40
10
  <sp-toast timeout="100">Help text.</sp-toast>
41
- `);
42
- await elementUpdated(el);
43
- expect(el.open).to.be.false;
44
- el._timeout = 100;
45
- el.open = true;
46
- await elementUpdated(el);
47
- await waitForPredicate(() => el.open === false);
48
- expect(el.open).to.be.false;
49
- });
50
- it("`timeout` updates `countdownStart`", async () => {
51
- const el = await fixture(html`
11
+ `);await e(t),a(t.open).to.be.false,t._timeout=100,t.open=!0,await e(t),await v(()=>t.open===!1),a(t.open).to.be.false}),it("`timeout` updates `countdownStart`",async()=>{const t=await n(i`
52
12
  <sp-toast timeout="100">Help text.</sp-toast>
53
- `);
54
- await elementUpdated(el);
55
- expect(el.open).to.be.false;
56
- const testableEl = el;
57
- testableEl._timeout = 100;
58
- el.open = true;
59
- await elementUpdated(el);
60
- const firstStart = testableEl.countdownStart;
61
- await nextFrame();
62
- await nextFrame();
63
- await nextFrame();
64
- el.timeout = 400;
65
- await elementUpdated(el);
66
- const secondStart = testableEl.countdownStart;
67
- expect(secondStart).to.not.equal(firstStart);
68
- await nextFrame();
69
- await nextFrame();
70
- el.timeout = 0;
71
- await elementUpdated(el);
72
- const thirdStart = testableEl.countdownStart;
73
- expect(thirdStart).to.equal(0);
74
- });
75
- it("stops timeout on `focusin`", async () => {
76
- const el = await fixture(html`
13
+ `);await e(t),a(t.open).to.be.false;const o=t;o._timeout=100,t.open=!0,await e(t);const s=o.countdownStart;await l(),await l(),await l(),t.timeout=400,await e(t);const r=o.countdownStart;a(r).to.not.equal(s),await l(),await l(),t.timeout=0,await e(t);const p=o.countdownStart;a(p).to.equal(0)}),it("stops timeout on `focusin`",async()=>{const t=await n(i`
77
14
  <sp-toast timeout="100">Help text.</sp-toast>
78
- `);
79
- await elementUpdated(el);
80
- const testableEl = el;
81
- expect(el.open, "not open to start").to.be.false;
82
- el.open = true;
83
- await elementUpdated(el);
84
- await nextFrame();
85
- expect(testableEl.countdownStart, "initially not 0").to.not.equal(0);
86
- testableEl._timeout = 100;
87
- el.dispatchEvent(new FocusEvent("focusin"));
88
- await elementUpdated(el);
89
- expect(testableEl.countdownStart, "0 after focusin").to.equal(0);
90
- el.dispatchEvent(new FocusEvent("focusout"));
91
- await elementUpdated(el);
92
- await nextFrame();
93
- expect(testableEl.countdownStart, "not 0 after focusout").to.not.equal(0);
94
- await waitUntil(() => el.open === false, "closes");
95
- expect(el.open, "not open to end").to.be.false;
96
- });
97
- it("closes", async () => {
98
- const el = await fixture(html`
15
+ `);await e(t);const o=t;a(t.open,"not open to start").to.be.false,t.open=!0,await e(t),await l(),a(o.countdownStart,"initially not 0").to.not.equal(0),o._timeout=100,t.dispatchEvent(new FocusEvent("focusin")),await e(t),a(o.countdownStart,"0 after focusin").to.equal(0),t.dispatchEvent(new FocusEvent("focusout")),await e(t),await l(),a(o.countdownStart,"not 0 after focusout").to.not.equal(0),await d(()=>t.open===!1,"closes"),a(t.open,"not open to end").to.be.false}),it("closes",async()=>{const t=await n(i`
99
16
  <sp-toast open>Help text.</sp-toast>
100
- `);
101
- await elementUpdated(el);
102
- expect(el.open).to.be.true;
103
- const renderRoot = el.shadowRoot ? el.shadowRoot : el;
104
- const closeButton = renderRoot.querySelector("sp-close-button");
105
- closeButton.click();
106
- await elementUpdated(el);
107
- expect(el.open).to.be.false;
108
- });
109
- it("`close` can be prevented", async () => {
110
- const handleClose = (event) => event.preventDefault();
111
- const el = await fixture(html`
112
- <sp-toast open timeout="100" @close=${handleClose}>
17
+ `);await e(t),a(t.open).to.be.true,(t.shadowRoot?t.shadowRoot:t).querySelector("sp-close-button").click(),await e(t),a(t.open).to.be.false}),it("`close` can be prevented",async()=>{const o=await n(i`
18
+ <sp-toast open timeout="100" @close=${p=>p.preventDefault()}>
113
19
  Help text.
114
20
  </sp-toast>
115
- `);
116
- await elementUpdated(el);
117
- expect(el.open).to.be.true;
118
- const renderRoot = el.shadowRoot ? el.shadowRoot : el;
119
- const closeButton = renderRoot.querySelector("sp-close-button");
120
- closeButton.click();
121
- await elementUpdated(el);
122
- expect(el.open).to.be.true;
123
- });
124
- it("can be a controlled element", async () => {
125
- const closeSpy = spy();
126
- const handleClose = (event) => {
127
- event.preventDefault();
128
- closeSpy();
129
- };
130
- const el = await fixture(html`
131
- <sp-toast open timeout="100" @close=${handleClose}>
21
+ `);await e(o),a(o.open).to.be.true,(o.shadowRoot?o.shadowRoot:o).querySelector("sp-close-button").click(),await e(o),a(o.open).to.be.true}),it("can be a controlled element",async()=>{const t=u(),s=await n(i`
22
+ <sp-toast open timeout="100" @close=${w=>{w.preventDefault(),t()}}>
132
23
  Help text.
133
24
  </sp-toast>
134
- `);
135
- await elementUpdated(el);
136
- expect(el.open).to.be.true;
137
- expect(closeSpy.callCount).to.equal(0);
138
- const renderRoot = el.shadowRoot ? el.shadowRoot : el;
139
- const closeButton = renderRoot.querySelector("sp-close-button");
140
- closeButton.click();
141
- await elementUpdated(el);
142
- expect(el.open).to.be.true;
143
- expect(closeSpy.callCount).to.equal(1);
144
- el.open = false;
145
- await elementUpdated(el);
146
- expect(el.open).to.be.false;
147
- expect(closeSpy.callCount).to.equal(1);
148
- });
149
- it("validates variants", async () => {
150
- const el = await fixture(html`
25
+ `);await e(s),a(s.open).to.be.true,a(t.callCount).to.equal(0),(s.shadowRoot?s.shadowRoot:s).querySelector("sp-close-button").click(),await e(s),a(s.open).to.be.true,a(t.callCount).to.equal(1),s.open=!1,await e(s),a(s.open).to.be.false,a(t.callCount).to.equal(1)}),it("validates variants",async()=>{const t=await n(i`
151
26
  <sp-toast variant="invalid" open>
152
27
  This toast validates variants.
153
28
  </sp-toast>
154
- `);
155
- await elementUpdated(el);
156
- expect(el.variant).to.equal("");
157
- el.variant = toastVariants[0];
158
- await elementUpdated(el);
159
- expect(el.variant).to.equal(toastVariants[0]);
160
- el.variant = toastVariants[0];
161
- await elementUpdated(el);
162
- expect(el.variant).to.equal(toastVariants[0]);
163
- });
164
- it("maintains [variant] when disconnected/connected", async () => {
165
- const el = await fixture(html`
29
+ `);await e(t),a(t.variant).to.equal(""),t.variant=c[0],await e(t),a(t.variant).to.equal(c[0]),t.variant=c[0],await e(t),a(t.variant).to.equal(c[0])}),it("maintains [variant] when disconnected/connected",async()=>{const t=await n(i`
166
30
  <sp-toast variant="positive" open>
167
31
  This toast maintains variants.
168
32
  </sp-toast>
169
- `);
170
- await elementUpdated(el);
171
- expect(el.variant).to.equal("positive");
172
- const parent = el.parentElement;
173
- el.remove();
174
- expect(el.variant).to.equal("positive");
175
- parent.append(el);
176
- expect(el.variant).to.equal("positive");
177
- });
178
- it("reopens", async () => {
179
- const closeSpy = spy();
180
- const el = await fixture(html`
33
+ `);await e(t),a(t.variant).to.equal("positive");const o=t.parentElement;t.remove(),a(t.variant).to.equal("positive"),o.append(t),a(t.variant).to.equal("positive")}),it("reopens",async()=>{const t=u(),o=await n(i`
181
34
  <sp-toast
182
35
  variant="positive"
183
36
  open
184
- @close=${() => {
185
- closeSpy();
186
- }}
37
+ @close=${()=>{t()}}
187
38
  >
188
39
  This toast maintains variants.
189
40
  </sp-toast>
190
- `);
191
- await elementUpdated(el);
192
- expect(el.open).to.be.true;
193
- const closeButton = el.shadowRoot.querySelector("sp-close-button");
194
- closeButton.click();
195
- await elementUpdated(el);
196
- expect(el.open).to.be.false;
197
- el.open = true;
198
- await elementUpdated(el);
199
- expect(el.open).to.be.true;
200
- expect(closeSpy.callCount).to.equal(1);
201
- });
202
- });
41
+ `);await e(o),a(o.open).to.be.true,o.shadowRoot.querySelector("sp-close-button").click(),await e(o),a(o.open).to.be.false,o.open=!0,await e(o),a(o.open).to.be.true,a(t.callCount).to.equal(1)})});
203
42
  //# sourceMappingURL=toast.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["toast.test.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport { Toast, toastVariants } from '@spectrum-web-components/toast';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n waitUntil,\n} from '@open-wc/testing';\nimport { CloseButton } from '@spectrum-web-components/button';\nimport {\n testForLitDevWarnings,\n waitForPredicate,\n} from '../../../test/testing-helpers.js';\nimport { spy } from 'sinon';\n\ninterface TestableToast {\n _timeout: number;\n countdownStart: number;\n}\n\ndescribe('Toast', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Toast>(\n html`\n <sp-toast open>Help text.</sp-toast>\n `\n )\n );\n it('loads', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast open>Help text.</sp-toast>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n toastVariants.map((variant) => {\n it(`loads - [variant=\"${variant}\"]`, async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast variant=${variant} open>\n This toast is of the \\`${variant}\\` variant.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n });\n it('loads - timeout', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.false;\n\n (el as unknown as TestableToast)._timeout = 100;\n el.open = true;\n await elementUpdated(el);\n\n await waitForPredicate(() => el.open === false);\n expect(el.open).to.be.false;\n });\n it('`timeout` updates `countdownStart`', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.false;\n\n const testableEl = el as unknown as TestableToast;\n testableEl._timeout = 100;\n el.open = true;\n await elementUpdated(el);\n\n const firstStart = testableEl.countdownStart;\n\n await nextFrame();\n await nextFrame();\n await nextFrame();\n\n el.timeout = 400;\n\n await elementUpdated(el);\n const secondStart = testableEl.countdownStart;\n\n expect(secondStart).to.not.equal(firstStart);\n\n await nextFrame();\n await nextFrame();\n\n el.timeout = 0;\n\n await elementUpdated(el);\n const thirdStart = testableEl.countdownStart;\n\n expect(thirdStart).to.equal(0);\n });\n it('stops timeout on `focusin`', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\n `\n );\n\n await elementUpdated(el);\n\n const testableEl = el as unknown as TestableToast;\n expect(el.open, 'not open to start').to.be.false;\n\n el.open = true;\n await elementUpdated(el);\n await nextFrame();\n\n expect(testableEl.countdownStart, 'initially not 0').to.not.equal(0);\n\n testableEl._timeout = 100;\n\n el.dispatchEvent(new FocusEvent('focusin'));\n\n await elementUpdated(el);\n expect(testableEl.countdownStart, '0 after focusin').to.equal(0);\n el.dispatchEvent(new FocusEvent('focusout'));\n\n await elementUpdated(el);\n await nextFrame();\n expect(testableEl.countdownStart, 'not 0 after focusout').to.not.equal(\n 0\n );\n\n await waitUntil(() => el.open === false, 'closes');\n expect(el.open, 'not open to end').to.be.false;\n });\n it('closes', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast open>Help text.</sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n\n const renderRoot = el.shadowRoot ? el.shadowRoot : el;\n const closeButton = renderRoot.querySelector(\n 'sp-close-button'\n ) as CloseButton;\n closeButton.click();\n\n await elementUpdated(el);\n expect(el.open).to.be.false;\n });\n it('`close` can be prevented', async () => {\n const handleClose = (event: CustomEvent): void =>\n event.preventDefault();\n const el = await fixture<Toast>(\n html`\n <sp-toast open timeout=\"100\" @close=${handleClose}>\n Help text.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n\n const renderRoot = el.shadowRoot ? el.shadowRoot : el;\n const closeButton = renderRoot.querySelector(\n 'sp-close-button'\n ) as CloseButton;\n closeButton.click();\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n });\n it('can be a controlled element', async () => {\n const closeSpy = spy();\n const handleClose = (event: CustomEvent): void => {\n event.preventDefault();\n closeSpy();\n };\n const el = await fixture<Toast>(\n html`\n <sp-toast open timeout=\"100\" @close=${handleClose}>\n Help text.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n expect(closeSpy.callCount).to.equal(0);\n\n const renderRoot = el.shadowRoot ? el.shadowRoot : el;\n const closeButton = renderRoot.querySelector(\n 'sp-close-button'\n ) as CloseButton;\n closeButton.click();\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n expect(closeSpy.callCount).to.equal(1);\n\n el.open = false;\n await elementUpdated(el);\n expect(el.open).to.be.false;\n expect(closeSpy.callCount).to.equal(1);\n });\n it('validates variants', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast variant=\"invalid\" open>\n This toast validates variants.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('');\n\n el.variant = toastVariants[0];\n\n await elementUpdated(el);\n expect(el.variant).to.equal(toastVariants[0]);\n\n el.variant = toastVariants[0];\n\n await elementUpdated(el);\n expect(el.variant).to.equal(toastVariants[0]);\n });\n it('maintains [variant] when disconnected/connected', async () => {\n const el = await fixture<Toast>(\n html`\n <sp-toast variant=\"positive\" open>\n This toast maintains variants.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('positive');\n const parent = el.parentElement as HTMLElement;\n\n el.remove();\n\n expect(el.variant).to.equal('positive');\n\n parent.append(el);\n\n expect(el.variant).to.equal('positive');\n });\n it('reopens', async () => {\n const closeSpy = spy();\n const el = await fixture<Toast>(\n html`\n <sp-toast\n variant=\"positive\"\n open\n @close=${() => {\n closeSpy();\n }}\n >\n This toast maintains variants.\n </sp-toast>\n `\n );\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n\n const closeButton = el.shadowRoot.querySelector(\n 'sp-close-button'\n ) as HTMLElement;\n closeButton.click();\n\n await elementUpdated(el);\n expect(el.open).to.be.false;\n\n el.open = true;\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n expect(closeSpy.callCount).to.equal(1);\n });\n});\n"],
5
- "mappings": "AAYA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA;AAAA;AAAA;AAAA;AAIA;AAOA,SAAS,SAAS,MAAM;AACpB,wBACI,YACI,MAAM,QACF;AAAA;AAAA,iBAGJ,CACR;AACA,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,gBAAc,IAAI,CAAC,YAAY;AAC3B,OAAG,qBAAqB,aAAa,YAAY;AAC7C,YAAM,KAAK,MAAM,QACb;AAAA,wCACwB;AAAA,iDACS;AAAA;AAAA,iBAGrC;AAEA,YAAM,eAAe,EAAE;AAEvB,YAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,IACtC,CAAC;AAAA,EACL,CAAC;AACD,KAAG,mBAAmB,YAAY;AAC9B,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,IAAC,GAAgC,WAAW;AAC5C,OAAG,OAAO;AACV,UAAM,eAAe,EAAE;AAEvB,UAAM,iBAAiB,MAAM,GAAG,SAAS,KAAK;AAC9C,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAAA,EAC1B,CAAC;AACD,KAAG,sCAAsC,YAAY;AACjD,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,UAAM,aAAa;AACnB,eAAW,WAAW;AACtB,OAAG,OAAO;A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