@spectrum-web-components/toast 1.1.0-beta.9 → 1.1.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 +8 -8
- package/sp-toast.d.ts +0 -6
- package/sp-toast.dev.js +0 -5
- package/sp-toast.dev.js.map +0 -7
- package/sp-toast.js +0 -2
- package/sp-toast.js.map +0 -7
- package/src/Toast.d.ts +0 -57
- package/src/Toast.dev.js +0 -194
- package/src/Toast.dev.js.map +0 -7
- package/src/Toast.js +0 -29
- package/src/Toast.js.map +0 -7
- package/src/index.d.ts +0 -1
- package/src/index.dev.js +0 -3
- package/src/index.dev.js.map +0 -7
- package/src/index.js +0 -2
- package/src/index.js.map +0 -7
- package/src/spectrum-toast.css.d.ts +0 -2
- package/src/spectrum-toast.css.dev.js +0 -7
- package/src/spectrum-toast.css.dev.js.map +0 -7
- package/src/spectrum-toast.css.js +0 -4
- package/src/spectrum-toast.css.js.map +0 -7
- package/src/toast-overrides.css.d.ts +0 -2
- package/src/toast-overrides.css.dev.js +0 -7
- package/src/toast-overrides.css.dev.js.map +0 -7
- package/src/toast-overrides.css.js +0 -4
- package/src/toast-overrides.css.js.map +0 -7
- package/src/toast.css.d.ts +0 -2
- package/src/toast.css.dev.js +0 -7
- package/src/toast.css.dev.js.map +0 -7
- package/src/toast.css.js +0 -4
- package/src/toast.css.js.map +0 -7
- package/stories/toast.stories.js +0 -162
- package/stories/toast.stories.js.map +0 -7
- package/test/benchmark/test-basic.js +0 -8
- package/test/benchmark/test-basic.js.map +0 -7
- package/test/toast-memory.test.js +0 -8
- package/test/toast-memory.test.js.map +0 -7
- package/test/toast.test-vrt.js +0 -5
- package/test/toast.test-vrt.js.map +0 -7
- package/test/toast.test.js +0 -227
- package/test/toast.test.js.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/toast",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"lit-html"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@spectrum-web-components/base": "^1.1.0
|
|
62
|
-
"@spectrum-web-components/button": "^1.1.0
|
|
63
|
-
"@spectrum-web-components/icon": "^1.1.0
|
|
64
|
-
"@spectrum-web-components/icons-workflow": "^1.1.0
|
|
65
|
-
"@spectrum-web-components/shared": "^1.1.0
|
|
61
|
+
"@spectrum-web-components/base": "^1.1.0",
|
|
62
|
+
"@spectrum-web-components/button": "^1.1.0",
|
|
63
|
+
"@spectrum-web-components/icon": "^1.1.0",
|
|
64
|
+
"@spectrum-web-components/icons-workflow": "^1.1.0",
|
|
65
|
+
"@spectrum-web-components/shared": "^1.1.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@spectrum-css/toast": "
|
|
68
|
+
"@spectrum-css/toast": "11.0.0-s2-foundations.15"
|
|
69
69
|
},
|
|
70
70
|
"types": "./src/index.d.ts",
|
|
71
71
|
"customElements": "custom-elements.json",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"./sp-*.js",
|
|
74
74
|
"./**/*.dev.js"
|
|
75
75
|
],
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "e3c6e52501451acc6fa85b10dd718267b80a01ab"
|
|
77
77
|
}
|
package/sp-toast.d.ts
DELETED
package/sp-toast.dev.js
DELETED
package/sp-toast.dev.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["sp-toast.ts"],
|
|
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.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-toast', Toast);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-toast': Toast;\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,cAAc,YAAY,KAAK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/sp-toast.js
DELETED
package/sp-toast.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["sp-toast.ts"],
|
|
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';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-toast', Toast);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-toast': Toast;\n }\n}\n"],
|
|
5
|
-
"mappings": "aAWA,OAAS,SAAAA,MAAa,iBACtB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,WAAYD,CAAK",
|
|
6
|
-
"names": ["Toast", "defineElement"]
|
|
7
|
-
}
|
package/src/Toast.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
|
|
2
|
-
import '@spectrum-web-components/button/sp-close-button.js';
|
|
3
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';
|
|
4
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-info.js';
|
|
5
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js';
|
|
6
|
-
export declare const toastVariants: ToastVariants[];
|
|
7
|
-
export type ToastVariants = 'negative' | 'positive' | 'info' | 'error' | 'warning' | '';
|
|
8
|
-
declare const Toast_base: typeof SpectrumElement;
|
|
9
|
-
/**
|
|
10
|
-
* @element sp-toast
|
|
11
|
-
*
|
|
12
|
-
* @slot - The toast content
|
|
13
|
-
* @slot action - button element surfacing an action in the Toast
|
|
14
|
-
*
|
|
15
|
-
* @fires close - Announces that the Toast has been closed by the user or by its timeout.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Toast extends Toast_base {
|
|
18
|
-
static get styles(): CSSResultArray;
|
|
19
|
-
open: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* When a timeout is provided it represents the number of milliseconds from when
|
|
22
|
-
* the Toast was placed on the page before it will automatically dismiss itself.
|
|
23
|
-
* Accessibility concerns require that a Toast is available for at least 6000ms
|
|
24
|
-
* before being dismissed, so any timeout of less than 6000ms will be raised to
|
|
25
|
-
* that baseline. It is suggested that messages longer than 120 words should
|
|
26
|
-
* receive another 1000ms in their timeout for each additional 120 words in the
|
|
27
|
-
* message. E.G. 240 words = 7000ms, 360 words = 8000ms, etc.
|
|
28
|
-
*
|
|
29
|
-
* @param {Number} timeout
|
|
30
|
-
*/
|
|
31
|
-
set timeout(timeout: number | null);
|
|
32
|
-
get timeout(): number | null;
|
|
33
|
-
_timeout: number | null;
|
|
34
|
-
/**
|
|
35
|
-
* The variant applies specific styling when set to `negative`, `positive`, `info`, `error`, or `warning`.
|
|
36
|
-
* `variant` attribute is removed when not matching one of the above.
|
|
37
|
-
*
|
|
38
|
-
* @param {String} variant
|
|
39
|
-
*/
|
|
40
|
-
set variant(variant: ToastVariants);
|
|
41
|
-
get variant(): ToastVariants;
|
|
42
|
-
private _variant;
|
|
43
|
-
private renderIcon;
|
|
44
|
-
private countdownStart;
|
|
45
|
-
private nextCount;
|
|
46
|
-
private doCountdown;
|
|
47
|
-
private countdown;
|
|
48
|
-
private holdCountdown;
|
|
49
|
-
private resumeCountdown;
|
|
50
|
-
private startCountdown;
|
|
51
|
-
private stopCountdown;
|
|
52
|
-
private shouldClose;
|
|
53
|
-
close(): void;
|
|
54
|
-
protected render(): TemplateResult;
|
|
55
|
-
protected updated(changes: PropertyValues): void;
|
|
56
|
-
}
|
|
57
|
-
export {};
|
package/src/Toast.dev.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
5
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
6
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7
|
-
if (decorator = decorators[i])
|
|
8
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9
|
-
if (kind && result) __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 { FocusVisiblePolyfillMixin } from "@spectrum-web-components/shared/src/focus-visible.js";
|
|
22
|
-
import toastStyles from "./toast.css.js";
|
|
23
|
-
export const toastVariants = [
|
|
24
|
-
"negative",
|
|
25
|
-
"positive",
|
|
26
|
-
"info",
|
|
27
|
-
"error",
|
|
28
|
-
"warning"
|
|
29
|
-
];
|
|
30
|
-
export class Toast extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.open = false;
|
|
34
|
-
this._timeout = null;
|
|
35
|
-
this._variant = "";
|
|
36
|
-
this.countdownStart = 0;
|
|
37
|
-
this.nextCount = -1;
|
|
38
|
-
this.doCountdown = (time) => {
|
|
39
|
-
if (!this.countdownStart) {
|
|
40
|
-
this.countdownStart = performance.now();
|
|
41
|
-
}
|
|
42
|
-
if (time - this.countdownStart > this._timeout) {
|
|
43
|
-
this.shouldClose();
|
|
44
|
-
this.countdownStart = 0;
|
|
45
|
-
} else {
|
|
46
|
-
this.countdown();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
this.countdown = () => {
|
|
50
|
-
cancelAnimationFrame(this.nextCount);
|
|
51
|
-
this.nextCount = requestAnimationFrame(this.doCountdown);
|
|
52
|
-
};
|
|
53
|
-
this.holdCountdown = () => {
|
|
54
|
-
this.stopCountdown();
|
|
55
|
-
this.addEventListener("focusout", this.resumeCountdown);
|
|
56
|
-
};
|
|
57
|
-
this.resumeCountdown = () => {
|
|
58
|
-
this.removeEventListener("focusout", this.holdCountdown);
|
|
59
|
-
this.countdown();
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
static get styles() {
|
|
63
|
-
return [toastStyles];
|
|
64
|
-
}
|
|
65
|
-
set timeout(timeout) {
|
|
66
|
-
const hasTimeout = typeof timeout !== null && timeout > 0;
|
|
67
|
-
const newTimeout = hasTimeout ? Math.max(6e3, timeout) : null;
|
|
68
|
-
const oldValue = this.timeout;
|
|
69
|
-
if (newTimeout && this.countdownStart) {
|
|
70
|
-
this.countdownStart = performance.now();
|
|
71
|
-
}
|
|
72
|
-
this._timeout = newTimeout;
|
|
73
|
-
this.requestUpdate("timeout", oldValue);
|
|
74
|
-
}
|
|
75
|
-
get timeout() {
|
|
76
|
-
return this._timeout;
|
|
77
|
-
}
|
|
78
|
-
set variant(variant) {
|
|
79
|
-
if (variant === this.variant) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const oldValue = this.variant;
|
|
83
|
-
if (toastVariants.includes(variant)) {
|
|
84
|
-
this.setAttribute("variant", variant);
|
|
85
|
-
this._variant = variant;
|
|
86
|
-
} else {
|
|
87
|
-
this.removeAttribute("variant");
|
|
88
|
-
this._variant = "";
|
|
89
|
-
}
|
|
90
|
-
this.requestUpdate("variant", oldValue);
|
|
91
|
-
}
|
|
92
|
-
get variant() {
|
|
93
|
-
return this._variant;
|
|
94
|
-
}
|
|
95
|
-
renderIcon(variant) {
|
|
96
|
-
switch (variant) {
|
|
97
|
-
case "info":
|
|
98
|
-
return html`
|
|
99
|
-
<sp-icon-info
|
|
100
|
-
label="Information"
|
|
101
|
-
class="type"
|
|
102
|
-
></sp-icon-info>
|
|
103
|
-
`;
|
|
104
|
-
case "negative":
|
|
105
|
-
case "error":
|
|
106
|
-
case "warning":
|
|
107
|
-
return html`
|
|
108
|
-
<sp-icon-alert label="Error" class="type"></sp-icon-alert>
|
|
109
|
-
`;
|
|
110
|
-
case "positive":
|
|
111
|
-
case "success":
|
|
112
|
-
return html`
|
|
113
|
-
<sp-icon-checkmark-circle
|
|
114
|
-
label="Success"
|
|
115
|
-
class="type"
|
|
116
|
-
></sp-icon-checkmark-circle>
|
|
117
|
-
`;
|
|
118
|
-
default:
|
|
119
|
-
return html``;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
startCountdown() {
|
|
123
|
-
this.countdown();
|
|
124
|
-
this.addEventListener("focusin", this.holdCountdown);
|
|
125
|
-
}
|
|
126
|
-
stopCountdown() {
|
|
127
|
-
cancelAnimationFrame(this.nextCount);
|
|
128
|
-
this.countdownStart = 0;
|
|
129
|
-
}
|
|
130
|
-
shouldClose() {
|
|
131
|
-
const applyDefault = this.dispatchEvent(
|
|
132
|
-
new CustomEvent("close", {
|
|
133
|
-
composed: true,
|
|
134
|
-
bubbles: true,
|
|
135
|
-
cancelable: true
|
|
136
|
-
})
|
|
137
|
-
);
|
|
138
|
-
if (applyDefault) {
|
|
139
|
-
this.close();
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
close() {
|
|
143
|
-
this.open = false;
|
|
144
|
-
}
|
|
145
|
-
render() {
|
|
146
|
-
return html`
|
|
147
|
-
${this.renderIcon(this.variant)}
|
|
148
|
-
<div class="body" role="alert">
|
|
149
|
-
<div class="content">
|
|
150
|
-
<slot></slot>
|
|
151
|
-
</div>
|
|
152
|
-
<slot name="action"></slot>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="buttons">
|
|
155
|
-
<sp-close-button
|
|
156
|
-
@click=${this.shouldClose}
|
|
157
|
-
label="Close"
|
|
158
|
-
static-color="white"
|
|
159
|
-
></sp-close-button>
|
|
160
|
-
</div>
|
|
161
|
-
`;
|
|
162
|
-
}
|
|
163
|
-
updated(changes) {
|
|
164
|
-
super.updated(changes);
|
|
165
|
-
if (changes.has("open")) {
|
|
166
|
-
if (this.open) {
|
|
167
|
-
if (this.timeout) {
|
|
168
|
-
this.startCountdown();
|
|
169
|
-
}
|
|
170
|
-
} else {
|
|
171
|
-
if (this.timeout) {
|
|
172
|
-
this.stopCountdown();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if (changes.has("timeout")) {
|
|
177
|
-
if (this.timeout !== null && this.open) {
|
|
178
|
-
this.startCountdown();
|
|
179
|
-
} else {
|
|
180
|
-
this.stopCountdown();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
__decorateClass([
|
|
186
|
-
property({ type: Boolean, reflect: true })
|
|
187
|
-
], Toast.prototype, "open", 2);
|
|
188
|
-
__decorateClass([
|
|
189
|
-
property({ type: Number })
|
|
190
|
-
], Toast.prototype, "timeout", 1);
|
|
191
|
-
__decorateClass([
|
|
192
|
-
property({ type: String })
|
|
193
|
-
], Toast.prototype, "variant", 1);
|
|
194
|
-
//# sourceMappingURL=Toast.dev.js.map
|
package/src/Toast.dev.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["Toast.ts"],
|
|
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';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.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 FocusVisiblePolyfillMixin(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 static-color=\"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": ";;;;;;;;;;;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;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,cACD,KAAK,WAAW,KAAK,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BASd,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzC;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,QAAI,QAAQ,IAAI,MAAM,GAAG;AACrB,UAAI,KAAK,MAAM;AACX,YAAI,KAAK,SAAS;AACd,eAAK,eAAe;AAAA,QACxB;AAAA,MACJ,OAAO;AACH,YAAI,KAAK,SAAS;AACd,eAAK,cAAc;AAAA,QACvB;AAAA,MACJ;AAAA,IACJ;AACA,QAAI,QAAQ,IAAI,SAAS,GAAG;AACxB,UAAI,KAAK,YAAY,QAAQ,KAAK,MAAM;AACpC,aAAK,eAAe;AAAA,MACxB,OAAO;AACH,aAAK,cAAc;AAAA,MACvB;AAAA,IACJ;AAAA,EACJ;AACJ;AA1LW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GALjC,MAMF;AAcI;AAAA,EADV,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAnBjB,MAoBE;AA0BA;AAAA,EADV,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA7CjB,MA8CE;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/Toast.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var r=(a,i,t,o)=>{for(var e=o>1?void 0:o?p(i,t):i,s=a.length-1,u;s>=0;s--)(u=a[s])&&(e=(o?u(i,t,e):u(e))||e);return o&&e&&c(i,t,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{FocusVisiblePolyfillMixin as h}from"@spectrum-web-components/shared/src/focus-visible.js";import m from"./toast.css.js";export const toastVariants=["negative","positive","info","error","warning"];export class Toast extends h(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[m]}set timeout(t){const e=typeof t!==null&&t>0?Math.max(6e3,t):null,s=this.timeout;e&&this.countdownStart&&(this.countdownStart=performance.now()),this._timeout=e,this.requestUpdate("timeout",s)}get timeout(){return this._timeout}set variant(t){if(t===this.variant)return;const o=this.variant;toastVariants.includes(t)?(this.setAttribute("variant",t),this._variant=t):(this.removeAttribute("variant"),this._variant=""),this.requestUpdate("variant",o)}get variant(){return this._variant}renderIcon(t){switch(t){case"info":return n`
|
|
2
|
-
<sp-icon-info
|
|
3
|
-
label="Information"
|
|
4
|
-
class="type"
|
|
5
|
-
></sp-icon-info>
|
|
6
|
-
`;case"negative":case"error":case"warning":return n`
|
|
7
|
-
<sp-icon-alert label="Error" class="type"></sp-icon-alert>
|
|
8
|
-
`;case"positive":case"success":return n`
|
|
9
|
-
<sp-icon-checkmark-circle
|
|
10
|
-
label="Success"
|
|
11
|
-
class="type"
|
|
12
|
-
></sp-icon-checkmark-circle>
|
|
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`
|
|
14
|
-
${this.renderIcon(this.variant)}
|
|
15
|
-
<div class="body" role="alert">
|
|
16
|
-
<div class="content">
|
|
17
|
-
<slot></slot>
|
|
18
|
-
</div>
|
|
19
|
-
<slot name="action"></slot>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="buttons">
|
|
22
|
-
<sp-close-button
|
|
23
|
-
@click=${this.shouldClose}
|
|
24
|
-
label="Close"
|
|
25
|
-
static-color="white"
|
|
26
|
-
></sp-close-button>
|
|
27
|
-
</div>
|
|
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())}}r([l({type:Boolean,reflect:!0})],Toast.prototype,"open",2),r([l({type:Number})],Toast.prototype,"timeout",1),r([l({type:String})],Toast.prototype,"variant",1);
|
|
29
|
-
//# sourceMappingURL=Toast.js.map
|
package/src/Toast.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["Toast.ts"],
|
|
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';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared/src/focus-visible.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 FocusVisiblePolyfillMixin(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 static-color=\"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": "qNAYA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,qDACP,MAAO,iEACP,MAAO,gEACP,MAAO,4EACP,OAAS,6BAAAC,MAAiC,uDAE1C,OAAOC,MAAiB,iBAEjB,aAAM,cAAiC,CAC1C,WACA,WACA,OACA,QACA,SACJ,EAmBO,aAAM,cAAcD,EAA0BF,CAAe,CAAE,CAA/D,kCAMH,KAAO,KAAO,GA+Bd,KAAO,SAA0B,KA4BjC,KAAQ,SAA0B,GA8BlC,KAAQ,eAAiB,EACzB,KAAQ,UAAY,GAEpB,KAAQ,YAAeI,GAAuB,CACrC,KAAK,iBACN,KAAK,eAAiB,YAAY,IAAI,GAEtCA,EAAO,KAAK,eAAkB,KAAK,UACnC,KAAK,YAAY,EACjB,KAAK,eAAiB,GAEtB,KAAK,UAAU,CAEvB,EAEA,KAAQ,UAAY,IAAY,CAC5B,qBAAqB,KAAK,SAAS,EACnC,KAAK,UAAY,sBAAsB,KAAK,WAAW,CAC3D,EAEA,KAAQ,cAAgB,IAAY,CAChC,KAAK,cAAc,EACnB,KAAK,iBAAiB,WAAY,KAAK,eAAe,CAC1D,EAEA,KAAQ,gBAAkB,IAAY,CAClC,KAAK,oBAAoB,WAAY,KAAK,aAAa,EACvD,KAAK,UAA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D,KAAK,WAAW,KAAK,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BASd,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,SAMzC,CAEmB,QAAQU,EAA+B,CACtD,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,MAAM,IACd,KAAK,KACD,KAAK,SACL,KAAK,eAAe,EAGpB,KAAK,SACL,KAAK,cAAc,GAI3BA,EAAQ,IAAI,SAAS,IACjB,KAAK,UAAY,MAAQ,KAAK,KAC9B,KAAK,eAAe,EAEpB,KAAK,cAAc,EAG/B,CACJ,CA1LWC,EAAA,CADNT,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GALjC,MAMF,oBAcIS,EAAA,CADVT,EAAS,CAAE,KAAM,MAAO,CAAC,GAnBjB,MAoBE,uBA0BAS,EAAA,CADVT,EAAS,CAAE,KAAM,MAAO,CAAC,GA7CjB,MA8CE",
|
|
6
|
-
"names": ["html", "SpectrumElement", "property", "FocusVisiblePolyfillMixin", "toastStyles", "time", "timeout", "newTimeout", "oldValue", "variant", "changes", "__decorateClass"]
|
|
7
|
-
}
|
package/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Toast.js';
|
package/src/index.dev.js
DELETED
package/src/index.dev.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["index.ts"],
|
|
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.dev.js'\n"],
|
|
5
|
-
"mappings": ";AAWA,cAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/index.js
DELETED
package/src/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["index.ts"],
|
|
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,WAAc",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { css } from "@spectrum-web-components/base";
|
|
3
|
-
const styles = css`
|
|
4
|
-
@media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}
|
|
5
|
-
`;
|
|
6
|
-
export default styles;
|
|
7
|
-
//# sourceMappingURL=spectrum-toast.css.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["spectrum-toast.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
2
|
-
@media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}
|
|
3
|
-
`;export default o;
|
|
4
|
-
//# sourceMappingURL=spectrum-toast.css.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["spectrum-toast.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
|
-
"names": ["css", "styles"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { css } from "@spectrum-web-components/base";
|
|
3
|
-
const styles = css`
|
|
4
|
-
:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}
|
|
5
|
-
`;
|
|
6
|
-
export default styles;
|
|
7
|
-
//# sourceMappingURL=toast-overrides.css.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";import{css as t}from"@spectrum-web-components/base";const s=t`
|
|
2
|
-
:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}
|
|
3
|
-
`;export default s;
|
|
4
|
-
//# sourceMappingURL=toast-overrides.css.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
|
-
"names": ["css", "styles"]
|
|
7
|
-
}
|
package/src/toast.css.d.ts
DELETED
package/src/toast.css.dev.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { css } from "@spectrum-web-components/base";
|
|
3
|
-
const styles = css`
|
|
4
|
-
@media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}:host{--spectrum-overlay-animation-distance:var(--spectrum-spacing-100);--spectrum-overlay-animation-duration:var(--spectrum-animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--spectrum-overlay-animation-duration)ease-in-out,opacity var(--spectrum-overlay-animation-duration)ease-in-out,visibility 0s linear var(--spectrum-overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;visibility:visible;transition-delay:0s}
|
|
5
|
-
`;
|
|
6
|
-
export default styles;
|
|
7
|
-
//# sourceMappingURL=toast.css.dev.js.map
|
package/src/toast.css.dev.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}:host{--spectrum-overlay-animation-distance:var(--spectrum-spacing-100);--spectrum-overlay-animation-duration:var(--spectrum-animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--spectrum-overlay-animation-duration)ease-in-out,opacity var(--spectrum-overlay-animation-duration)ease-in-out,visibility 0s linear var(--spectrum-overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;visibility:visible;transition-delay:0s}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/toast.css.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
2
|
-
@media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}:host{--spectrum-overlay-animation-distance:var(--spectrum-spacing-100);--spectrum-overlay-animation-duration:var(--spectrum-animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--spectrum-overlay-animation-duration)ease-in-out,opacity var(--spectrum-overlay-animation-duration)ease-in-out,visibility 0s linear var(--spectrum-overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;visibility:visible;transition-delay:0s}
|
|
3
|
-
`;export default o;
|
|
4
|
-
//# sourceMappingURL=toast.css.js.map
|
package/src/toast.css.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 @media (forced-colors:active){:host{--highcontrast-toast-border-color:ButtonText;border:var(--mod-toast-border-width,var(--spectrum-toast-border-width))solid var(--highcontrast-toast-border-color,transparent)}}:host{box-sizing:border-box;min-block-size:var(--mod-toast-block-size,var(--spectrum-toast-block-size));max-inline-size:var(--mod-toast-max-inline-size,var(--spectrum-toast-max-inline-size));border-radius:var(--mod-toast-corner-radius,var(--spectrum-toast-corner-radius));font-size:var(--mod-toast-font-size,var(--spectrum-toast-font-size));font-weight:var(--mod-toast-font-weight,var(--spectrum-toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));color:var(--highcontrast-toast-background-color-default,var(--mod-toast-background-color-default,var(--spectrum-toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--mod-toast-spacing-start-edge-to-text-and-icon,var(--spectrum-toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default,var(--mod-toast-negative-background-color-default,var(--spectrum-toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default,var(--mod-toast-informative-background-color-default,var(--spectrum-toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default,var(--mod-toast-positive-background-color-default,var(--spectrum-toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--mod-toast-spacing-top-edge-to-icon,var(--spectrum-toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--mod-toast-spacing-icon-to-text,var(--spectrum-toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color,var(--mod-toast-text-and-icon-color,var(--spectrum-toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--mod-toast-line-height,var(--spectrum-toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--mod-toast-spacing-top-edge-to-text,var(--spectrum-toast-spacing-top-edge-to-text)) - var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start)));padding-block-end:calc(var(--mod-toast-spacing-bottom-edge-to-text,var(--spectrum-toast-spacing-bottom-edge-to-text)) - var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--mod-toast-spacing-text-to-action-button-horizontal,var(--spectrum-toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--mod-toast-line-height-cjk,var(--spectrum-toast-line-height-cjk))}.buttons{border-inline-start-color:var(--mod-toast-divider-color,var(--spectrum-toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--mod-toast-spacing-top-edge-to-divider,var(--spectrum-toast-spacing-top-edge-to-divider));margin-block-end:var(--mod-toast-spacing-bottom-edge-to-divider,var(--spectrum-toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button));display:flex}.buttons .spectrum-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--mod-toast-spacing-block-start,var(--spectrum-toast-spacing-block-start));padding-block-end:var(--mod-toast-spacing-block-end,var(--spectrum-toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--mod-toast-spacing-text-and-action-button-to-divider,var(--spectrum-toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--mod-toast-spacing-close-button,var(--spectrum-toast-spacing-close-button))}:host{--spectrum-toast-background-color-default:var(--system-toast-background-color-default);--spectrum-toast-font-weight:var(--system-toast-font-weight);--spectrum-toast-font-size:var(--system-toast-font-size);--spectrum-toast-corner-radius:var(--system-toast-corner-radius);--spectrum-toast-block-size:var(--system-toast-block-size);--spectrum-toast-max-inline-size:var(--system-toast-max-inline-size);--spectrum-toast-border-width:var(--system-toast-border-width);--spectrum-toast-line-height:var(--system-toast-line-height);--spectrum-toast-line-height-cjk:var(--system-toast-line-height-cjk);--spectrum-toast-spacing-icon-to-text:var(--system-toast-spacing-icon-to-text);--spectrum-toast-spacing-start-edge-to-text-and-icon:var(--system-toast-spacing-start-edge-to-text-and-icon);--spectrum-toast-spacing-text-and-action-button-to-divider:var(--system-toast-spacing-text-and-action-button-to-divider);--spectrum-toast-spacing-top-edge-to-divider:var(--system-toast-spacing-top-edge-to-divider);--spectrum-toast-spacing-bottom-edge-to-divider:var(--system-toast-spacing-bottom-edge-to-divider);--spectrum-toast-spacing-top-edge-to-icon:var(--system-toast-spacing-top-edge-to-icon);--spectrum-toast-spacing-text-to-action-button-horizontal:var(--system-toast-spacing-text-to-action-button-horizontal);--spectrum-toast-spacing-close-button:var(--system-toast-spacing-close-button);--spectrum-toast-spacing-block-start:var(--system-toast-spacing-block-start);--spectrum-toast-spacing-block-end:var(--system-toast-spacing-block-end);--spectrum-toast-spacing-top-edge-to-text:var(--system-toast-spacing-top-edge-to-text);--spectrum-toast-spacing-bottom-edge-to-text:var(--system-toast-spacing-bottom-edge-to-text);--spectrum-toast-negative-background-color-default:var(--system-toast-negative-background-color-default);--spectrum-toast-positive-background-color-default:var(--system-toast-positive-background-color-default);--spectrum-toast-informative-background-color-default:var(--system-toast-informative-background-color-default);--spectrum-toast-text-and-icon-color:var(--system-toast-text-and-icon-color);--spectrum-toast-divider-color:var(--system-toast-divider-color)}:host{--spectrum-overlay-animation-distance:var(--spectrum-spacing-100);--spectrum-overlay-animation-duration:var(--spectrum-animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--spectrum-overlay-animation-duration)ease-in-out,opacity var(--spectrum-overlay-animation-duration)ease-in-out,visibility 0s linear var(--spectrum-overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;visibility:visible;transition-delay:0s}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
|
-
"names": ["css", "styles"]
|
|
7
|
-
}
|
package/stories/toast.stories.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { html } from "@spectrum-web-components/base";
|
|
3
|
-
import "@spectrum-web-components/toast/sp-toast.js";
|
|
4
|
-
import "@spectrum-web-components/button/sp-button.js";
|
|
5
|
-
import "@spectrum-web-components/overlay/sp-overlay.js";
|
|
6
|
-
import "@spectrum-web-components/overlay/overlay-trigger.js";
|
|
7
|
-
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
8
|
-
const toast = ({
|
|
9
|
-
variant = "",
|
|
10
|
-
open = true,
|
|
11
|
-
content = ""
|
|
12
|
-
}) => html`
|
|
13
|
-
<sp-toast
|
|
14
|
-
variant=${variant}
|
|
15
|
-
?open=${open}
|
|
16
|
-
>
|
|
17
|
-
${content}
|
|
18
|
-
<sp-button
|
|
19
|
-
slot="action"
|
|
20
|
-
static-color="white"
|
|
21
|
-
variant="secondary"
|
|
22
|
-
treatment="outline"
|
|
23
|
-
>
|
|
24
|
-
Undo
|
|
25
|
-
</sp-button>
|
|
26
|
-
</sp-toast>
|
|
27
|
-
`;
|
|
28
|
-
export default {
|
|
29
|
-
component: "sp-toast",
|
|
30
|
-
title: "Toast",
|
|
31
|
-
args: {
|
|
32
|
-
content: "This is a toast message.",
|
|
33
|
-
open: true
|
|
34
|
-
},
|
|
35
|
-
argTypes: {
|
|
36
|
-
content: {
|
|
37
|
-
name: "content",
|
|
38
|
-
type: { name: "string", required: false },
|
|
39
|
-
table: {
|
|
40
|
-
type: { summary: "string" },
|
|
41
|
-
defaultValue: { summary: "" }
|
|
42
|
-
},
|
|
43
|
-
control: "text"
|
|
44
|
-
},
|
|
45
|
-
open: {
|
|
46
|
-
name: "open",
|
|
47
|
-
type: { name: "boolean", required: false },
|
|
48
|
-
description: "Whether the toast is open.",
|
|
49
|
-
table: {
|
|
50
|
-
type: { summary: "boolean" },
|
|
51
|
-
defaultValue: { summary: false }
|
|
52
|
-
},
|
|
53
|
-
control: {
|
|
54
|
-
type: "boolean"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
export const Default = ({
|
|
60
|
-
variant,
|
|
61
|
-
open,
|
|
62
|
-
content
|
|
63
|
-
}) => {
|
|
64
|
-
return toast({ variant, open, content });
|
|
65
|
-
};
|
|
66
|
-
const variantDemo = ({
|
|
67
|
-
variant,
|
|
68
|
-
open,
|
|
69
|
-
content
|
|
70
|
-
}) => {
|
|
71
|
-
return toast({ variant, open, content });
|
|
72
|
-
};
|
|
73
|
-
export const Positive = (args) => variantDemo({ ...args, variant: "positive" });
|
|
74
|
-
export const Negative = (args) => variantDemo({ ...args, variant: "negative" });
|
|
75
|
-
export const Info = (args) => variantDemo({ ...args, variant: "info" });
|
|
76
|
-
export const Wrapping = (args) => variantDemo({
|
|
77
|
-
...args,
|
|
78
|
-
variant: "info",
|
|
79
|
-
content: "A new version of Lightroom Classic is now available. Use the Update button below to start using the new version."
|
|
80
|
-
});
|
|
81
|
-
const overlayStyles = html`
|
|
82
|
-
<style>
|
|
83
|
-
html,
|
|
84
|
-
body,
|
|
85
|
-
#root,
|
|
86
|
-
#root-inner,
|
|
87
|
-
sp-story-decorator {
|
|
88
|
-
height: 100%;
|
|
89
|
-
margin: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
sp-story-decorator > div {
|
|
93
|
-
display: contents;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
sp-story-decorator::part(container) {
|
|
97
|
-
display: flex;
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
overlay-trigger {
|
|
106
|
-
flex: none;
|
|
107
|
-
margin: 24px 0;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.self-managed:nth-child(3) {
|
|
111
|
-
margin-left: 50px;
|
|
112
|
-
}
|
|
113
|
-
</style>
|
|
114
|
-
`;
|
|
115
|
-
const overlaid = (openPlacement) => {
|
|
116
|
-
return html`
|
|
117
|
-
${overlayStyles}
|
|
118
|
-
${[
|
|
119
|
-
["bottom", ""],
|
|
120
|
-
["left", "negative"],
|
|
121
|
-
["right", "positive"],
|
|
122
|
-
["top", "info"]
|
|
123
|
-
].map(([placement, variant]) => {
|
|
124
|
-
return html`
|
|
125
|
-
<overlay-trigger
|
|
126
|
-
placement=${placement}
|
|
127
|
-
open=${ifDefined(
|
|
128
|
-
openPlacement === placement ? "click" : void 0
|
|
129
|
-
)}
|
|
130
|
-
>
|
|
131
|
-
<sp-button label="${placement} test" slot="trigger">
|
|
132
|
-
Click for ${variant ? variant : "toast"} on the
|
|
133
|
-
${placement}
|
|
134
|
-
</sp-button>
|
|
135
|
-
<sp-toast slot="click-content" variant=${variant}>
|
|
136
|
-
${placement}
|
|
137
|
-
</sp-toast>
|
|
138
|
-
</overlay-trigger>
|
|
139
|
-
`;
|
|
140
|
-
})}
|
|
141
|
-
`;
|
|
142
|
-
};
|
|
143
|
-
export const overlaidTop = () => overlaid("top");
|
|
144
|
-
export const overlaidRight = () => overlaid("right");
|
|
145
|
-
export const overlaidBottom = () => overlaid("bottom");
|
|
146
|
-
export const overlaidLeft = () => overlaid("left");
|
|
147
|
-
export const overlay = (args) => {
|
|
148
|
-
return html`
|
|
149
|
-
<style>
|
|
150
|
-
sp-toast {
|
|
151
|
-
position: fixed;
|
|
152
|
-
bottom: 1em;
|
|
153
|
-
left: 1em;
|
|
154
|
-
}
|
|
155
|
-
</style>
|
|
156
|
-
<sp-button id="overlay">Toggle Toast overlay</sp-button>
|
|
157
|
-
<sp-overlay trigger="overlay@click" type="auto" open>
|
|
158
|
-
${variantDemo({ ...args, variant: "positive" })}
|
|
159
|
-
</sp-overlay>
|
|
160
|
-
`;
|
|
161
|
-
};
|
|
162
|
-
//# sourceMappingURL=toast.stories.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast.stories.ts"],
|
|
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';\nimport '@spectrum-web-components/overlay/sp-overlay.js';\n\nimport { Placement } from '@spectrum-web-components/overlay';\nimport '@spectrum-web-components/overlay/overlay-trigger.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.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\n slot=\"action\"\n static-color=\"white\"\n variant=\"secondary\"\n treatment=\"outline\"\n >\n Undo\n </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\nexport const Wrapping = (args: Properties): TemplateResult =>\n variantDemo({\n ...args,\n variant: 'info',\n content:\n 'A new version of Lightroom Classic is now available. Use the Update button below to start using the new version.',\n });\n\nconst overlayStyles = html`\n <style>\n html,\n body,\n #root,\n #root-inner,\n sp-story-decorator {\n height: 100%;\n margin: 0;\n }\n\n sp-story-decorator > div {\n display: contents;\n }\n\n sp-story-decorator::part(container) {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n align-items: center;\n justify-content: center;\n }\n\n overlay-trigger {\n flex: none;\n margin: 24px 0;\n }\n\n .self-managed:nth-child(3) {\n margin-left: 50px;\n }\n </style>\n`;\n\nconst overlaid = (openPlacement: Placement): TemplateResult => {\n return html`\n ${overlayStyles}\n ${(\n [\n ['bottom', ''],\n ['left', 'negative'],\n ['right', 'positive'],\n ['top', 'info'],\n ] as [Placement, string][]\n ).map(([placement, variant]) => {\n return html`\n <overlay-trigger\n placement=${placement}\n open=${ifDefined(\n openPlacement === placement ? 'click' : undefined\n )}\n >\n <sp-button label=\"${placement} test\" slot=\"trigger\">\n Click for ${variant ? variant : 'toast'} on the\n ${placement}\n </sp-button>\n <sp-toast slot=\"click-content\" variant=${variant}>\n ${placement}\n </sp-toast>\n </overlay-trigger>\n `;\n })}\n `;\n};\n\nexport const overlaidTop = (): TemplateResult => overlaid('top');\nexport const overlaidRight = (): TemplateResult => overlaid('right');\nexport const overlaidBottom = (): TemplateResult => overlaid('bottom');\nexport const overlaidLeft = (): TemplateResult => overlaid('left');\n\nexport const overlay = (args: Properties): TemplateResult => {\n return html`\n <style>\n sp-toast {\n position: fixed;\n bottom: 1em;\n left: 1em;\n }\n </style>\n <sp-button id=\"overlay\">Toggle Toast overlay</sp-button>\n <sp-overlay trigger=\"overlay@click\" type=\"auto\" open>\n ${variantDemo({ ...args, variant: 'positive' })}\n </sp-overlay>\n `;\n};\n"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AACP,OAAO;AAGP,OAAO;AACP,SAAS,iBAAiB;AAE1B,MAAM,QAAQ,CAAC;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AACd,MAAsB;AAAA;AAAA,kBAEJ,OAMK;AAAA,gBACP,IAAI;AAAA;AAAA,UAEV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYjB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,SAAS;AAAA,IACT,MAAM;AAAA,EACV;AAAA,EACA,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,MACxC,OAAO;AAAA,QACH,MAAM,EAAE,SAAS,SAAS;AAAA,QAC1B,cAAc,EAAE,SAAS,GAAG;AAAA,MAChC;AAAA,MACA,SAAS;AAAA,IACb;AAAA,IACA,MAAM;AAAA,MACF,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAA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C5B,WAAO;AAAA;AAAA,gCAEa,SAAS;AAAA,2BACd;AAAA,MACH,kBAAkB,YAAY,UAAU;AAAA,IAC5C,CAAC;AAAA;AAAA,wCAEmB,SAAS;AAAA,oCACb,UAAU,UAAU,OAAO;AAAA,0BACrC,SAAS;AAAA;AAAA,6DAE0B,OAAO;AAAA,0BAC1C,SAAS;AAAA;AAAA;AAAA;AAAA,EAI3B,CAAC,CAAC;AAAA;AAEV;AAEO,aAAM,cAAc,MAAsB,SAAS,KAAK;AACxD,aAAM,gBAAgB,MAAsB,SAAS,OAAO;AAC5D,aAAM,iBAAiB,MAAsB,SAAS,QAAQ;AAC9D,aAAM,eAAe,MAAsB,SAAS,MAAM;AAE1D,aAAM,UAAU,CAAC,SAAqC;AACzD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAUG,YAAY,EAAE,GAAG,MAAM,SAAS,WAAW,CAAC,CAAC;AAAA;AAAA;AAG3D;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import "@spectrum-web-components/toast/sp-toast.js";
|
|
3
|
-
import { html } from "lit";
|
|
4
|
-
import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
|
|
5
|
-
measureFixtureCreation(html`
|
|
6
|
-
<sp-toast>Tip me!</sp-toast>
|
|
7
|
-
`);
|
|
8
|
-
//# sourceMappingURL=test-basic.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["test-basic.ts"],
|
|
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,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA,CAEtB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { html } from "@open-wc/testing";
|
|
3
|
-
import "@spectrum-web-components/toast/sp-toast.js";
|
|
4
|
-
import { testForMemoryLeaks } from "../../../test/testing-helpers.js";
|
|
5
|
-
testForMemoryLeaks(html`
|
|
6
|
-
<sp-toast></sp-toast>
|
|
7
|
-
`);
|
|
8
|
-
//# sourceMappingURL=toast-memory.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast-memory.test.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 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\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 { html } from '@open-wc/testing';\nimport '@spectrum-web-components/toast/sp-toast.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(html`\n <sp-toast></sp-toast>\n`);\n"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,YAAY;AACrB,OAAO;AACP,SAAS,0BAA0B;AAEnC,mBAAmB;AAAA;AAAA,CAElB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/test/toast.test-vrt.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast.test-vrt.ts"],
|
|
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';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ToastStories', stories as unknown as TestsType);\n"],
|
|
5
|
-
"mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,gBAAgB,OAA+B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/test/toast.test.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import "@spectrum-web-components/toast/sp-toast.js";
|
|
3
|
-
import { toastVariants } from "@spectrum-web-components/toast";
|
|
4
|
-
import {
|
|
5
|
-
elementUpdated,
|
|
6
|
-
expect,
|
|
7
|
-
fixture,
|
|
8
|
-
html,
|
|
9
|
-
nextFrame,
|
|
10
|
-
waitUntil
|
|
11
|
-
} from "@open-wc/testing";
|
|
12
|
-
import {
|
|
13
|
-
testForLitDevWarnings,
|
|
14
|
-
waitForPredicate
|
|
15
|
-
} from "../../../test/testing-helpers.js";
|
|
16
|
-
import { spy } from "sinon";
|
|
17
|
-
describe("Toast", () => {
|
|
18
|
-
testForLitDevWarnings(
|
|
19
|
-
async () => await fixture(html`
|
|
20
|
-
<sp-toast open>Help text.</sp-toast>
|
|
21
|
-
`)
|
|
22
|
-
);
|
|
23
|
-
it("loads", async () => {
|
|
24
|
-
const el = await fixture(html`
|
|
25
|
-
<sp-toast open>Help text.</sp-toast>
|
|
26
|
-
`);
|
|
27
|
-
await elementUpdated(el);
|
|
28
|
-
await expect(el).to.be.accessible();
|
|
29
|
-
});
|
|
30
|
-
toastVariants.map((variant) => {
|
|
31
|
-
it(`loads - [variant="${variant}"]`, async () => {
|
|
32
|
-
const el = await fixture(html`
|
|
33
|
-
<sp-toast variant=${variant} open>
|
|
34
|
-
This toast is of the \`${variant}\` variant.
|
|
35
|
-
</sp-toast>
|
|
36
|
-
`);
|
|
37
|
-
await elementUpdated(el);
|
|
38
|
-
await expect(el).to.be.accessible();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
it("loads - timeout", async () => {
|
|
42
|
-
const el = await fixture(html`
|
|
43
|
-
<sp-toast timeout="100">Help text.</sp-toast>
|
|
44
|
-
`);
|
|
45
|
-
await elementUpdated(el);
|
|
46
|
-
expect(el.open).to.be.false;
|
|
47
|
-
el._timeout = 100;
|
|
48
|
-
el.open = true;
|
|
49
|
-
await elementUpdated(el);
|
|
50
|
-
await waitForPredicate(() => el.open === false);
|
|
51
|
-
expect(el.open).to.be.false;
|
|
52
|
-
});
|
|
53
|
-
it("`timeout` updates `countdownStart`", async () => {
|
|
54
|
-
const el = await fixture(html`
|
|
55
|
-
<sp-toast timeout="100">Help text.</sp-toast>
|
|
56
|
-
`);
|
|
57
|
-
await elementUpdated(el);
|
|
58
|
-
expect(el.open).to.be.false;
|
|
59
|
-
const testableEl = el;
|
|
60
|
-
testableEl._timeout = 100;
|
|
61
|
-
el.open = true;
|
|
62
|
-
await elementUpdated(el);
|
|
63
|
-
const firstStart = testableEl.countdownStart;
|
|
64
|
-
await nextFrame();
|
|
65
|
-
await nextFrame();
|
|
66
|
-
await nextFrame();
|
|
67
|
-
el.timeout = 400;
|
|
68
|
-
await elementUpdated(el);
|
|
69
|
-
const secondStart = testableEl.countdownStart;
|
|
70
|
-
expect(secondStart).to.not.equal(firstStart);
|
|
71
|
-
await nextFrame();
|
|
72
|
-
await nextFrame();
|
|
73
|
-
el.timeout = 0;
|
|
74
|
-
await elementUpdated(el);
|
|
75
|
-
const thirdStart = testableEl.countdownStart;
|
|
76
|
-
expect(thirdStart).to.equal(0);
|
|
77
|
-
});
|
|
78
|
-
it("stops timeout on `focusin`", async () => {
|
|
79
|
-
const el = await fixture(html`
|
|
80
|
-
<sp-toast timeout="100">Help text.</sp-toast>
|
|
81
|
-
`);
|
|
82
|
-
await elementUpdated(el);
|
|
83
|
-
const testableEl = el;
|
|
84
|
-
expect(el.open, "not open to start").to.be.false;
|
|
85
|
-
el.open = true;
|
|
86
|
-
await elementUpdated(el);
|
|
87
|
-
await nextFrame();
|
|
88
|
-
expect(testableEl.countdownStart, "initially not 0").to.not.equal(0);
|
|
89
|
-
testableEl._timeout = 100;
|
|
90
|
-
el.dispatchEvent(new FocusEvent("focusin"));
|
|
91
|
-
await elementUpdated(el);
|
|
92
|
-
expect(testableEl.countdownStart, "0 after focusin").to.equal(0);
|
|
93
|
-
el.dispatchEvent(new FocusEvent("focusout"));
|
|
94
|
-
await elementUpdated(el);
|
|
95
|
-
await nextFrame();
|
|
96
|
-
expect(testableEl.countdownStart, "not 0 after focusout").to.not.equal(
|
|
97
|
-
0
|
|
98
|
-
);
|
|
99
|
-
await waitUntil(() => el.open === false, "closes");
|
|
100
|
-
expect(el.open, "not open to end").to.be.false;
|
|
101
|
-
});
|
|
102
|
-
it("closes", async () => {
|
|
103
|
-
const el = await fixture(html`
|
|
104
|
-
<sp-toast open>Help text.</sp-toast>
|
|
105
|
-
`);
|
|
106
|
-
await elementUpdated(el);
|
|
107
|
-
expect(el.open).to.be.true;
|
|
108
|
-
const renderRoot = el.shadowRoot ? el.shadowRoot : el;
|
|
109
|
-
const closeButton = renderRoot.querySelector(
|
|
110
|
-
"sp-close-button"
|
|
111
|
-
);
|
|
112
|
-
closeButton.click();
|
|
113
|
-
await elementUpdated(el);
|
|
114
|
-
expect(el.open).to.be.false;
|
|
115
|
-
});
|
|
116
|
-
it("`close` can be prevented", async () => {
|
|
117
|
-
const handleClose = (event) => event.preventDefault();
|
|
118
|
-
const el = await fixture(html`
|
|
119
|
-
<sp-toast open timeout="100" @close=${handleClose}>
|
|
120
|
-
Help text.
|
|
121
|
-
</sp-toast>
|
|
122
|
-
`);
|
|
123
|
-
await elementUpdated(el);
|
|
124
|
-
expect(el.open).to.be.true;
|
|
125
|
-
const renderRoot = el.shadowRoot ? el.shadowRoot : el;
|
|
126
|
-
const closeButton = renderRoot.querySelector(
|
|
127
|
-
"sp-close-button"
|
|
128
|
-
);
|
|
129
|
-
closeButton.click();
|
|
130
|
-
await elementUpdated(el);
|
|
131
|
-
expect(el.open).to.be.true;
|
|
132
|
-
});
|
|
133
|
-
it("can be a controlled element", async () => {
|
|
134
|
-
const closeSpy = spy();
|
|
135
|
-
const handleClose = (event) => {
|
|
136
|
-
event.preventDefault();
|
|
137
|
-
closeSpy();
|
|
138
|
-
};
|
|
139
|
-
const el = await fixture(html`
|
|
140
|
-
<sp-toast open timeout="100" @close=${handleClose}>
|
|
141
|
-
Help text.
|
|
142
|
-
</sp-toast>
|
|
143
|
-
`);
|
|
144
|
-
await elementUpdated(el);
|
|
145
|
-
expect(el.open).to.be.true;
|
|
146
|
-
expect(closeSpy.callCount).to.equal(0);
|
|
147
|
-
const renderRoot = el.shadowRoot ? el.shadowRoot : el;
|
|
148
|
-
const closeButton = renderRoot.querySelector(
|
|
149
|
-
"sp-close-button"
|
|
150
|
-
);
|
|
151
|
-
closeButton.click();
|
|
152
|
-
await elementUpdated(el);
|
|
153
|
-
expect(el.open).to.be.true;
|
|
154
|
-
expect(closeSpy.callCount).to.equal(1);
|
|
155
|
-
el.open = false;
|
|
156
|
-
await elementUpdated(el);
|
|
157
|
-
expect(el.open).to.be.false;
|
|
158
|
-
expect(closeSpy.callCount).to.equal(1);
|
|
159
|
-
});
|
|
160
|
-
it("validates variants", async () => {
|
|
161
|
-
const el = await fixture(html`
|
|
162
|
-
<sp-toast variant="invalid" open>
|
|
163
|
-
This toast validates variants.
|
|
164
|
-
</sp-toast>
|
|
165
|
-
`);
|
|
166
|
-
await elementUpdated(el);
|
|
167
|
-
expect(el.variant).to.equal("");
|
|
168
|
-
el.variant = toastVariants[0];
|
|
169
|
-
await elementUpdated(el);
|
|
170
|
-
expect(el.variant).to.equal(toastVariants[0]);
|
|
171
|
-
el.variant = toastVariants[0];
|
|
172
|
-
await elementUpdated(el);
|
|
173
|
-
expect(el.variant).to.equal(toastVariants[0]);
|
|
174
|
-
});
|
|
175
|
-
it("maintains [variant] when disconnected/connected", async () => {
|
|
176
|
-
const el = await fixture(html`
|
|
177
|
-
<sp-toast variant="positive" open>
|
|
178
|
-
This toast maintains variants.
|
|
179
|
-
</sp-toast>
|
|
180
|
-
`);
|
|
181
|
-
await elementUpdated(el);
|
|
182
|
-
expect(el.variant).to.equal("positive");
|
|
183
|
-
const parent = el.parentElement;
|
|
184
|
-
el.remove();
|
|
185
|
-
expect(el.variant).to.equal("positive");
|
|
186
|
-
parent.append(el);
|
|
187
|
-
expect(el.variant).to.equal("positive");
|
|
188
|
-
});
|
|
189
|
-
it("reopens", async () => {
|
|
190
|
-
const closeSpy = spy();
|
|
191
|
-
const el = await fixture(html`
|
|
192
|
-
<sp-toast
|
|
193
|
-
variant="positive"
|
|
194
|
-
open
|
|
195
|
-
@close=${() => {
|
|
196
|
-
closeSpy();
|
|
197
|
-
}}
|
|
198
|
-
>
|
|
199
|
-
This toast maintains variants.
|
|
200
|
-
</sp-toast>
|
|
201
|
-
`);
|
|
202
|
-
await elementUpdated(el);
|
|
203
|
-
expect(el.open).to.be.true;
|
|
204
|
-
const closeButton = el.shadowRoot.querySelector(
|
|
205
|
-
"sp-close-button"
|
|
206
|
-
);
|
|
207
|
-
closeButton.click();
|
|
208
|
-
await elementUpdated(el);
|
|
209
|
-
expect(el.open).to.be.false;
|
|
210
|
-
el.open = true;
|
|
211
|
-
await elementUpdated(el);
|
|
212
|
-
expect(el.open).to.be.true;
|
|
213
|
-
expect(closeSpy.callCount).to.equal(1);
|
|
214
|
-
});
|
|
215
|
-
it('sp close button renders with static-color="white"', async () => {
|
|
216
|
-
const el = await fixture(html`
|
|
217
|
-
<sp-toast open>Help text.</sp-toast>
|
|
218
|
-
`);
|
|
219
|
-
const renderRoot = el.shadowRoot ? el.shadowRoot : el;
|
|
220
|
-
const closeButton = renderRoot.querySelector(
|
|
221
|
-
"sp-close-button"
|
|
222
|
-
);
|
|
223
|
-
expect(closeButton).to.exist;
|
|
224
|
-
expect(closeButton.getAttribute("static-color")).to.equal("white");
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
//# sourceMappingURL=toast.test.js.map
|
package/test/toast.test.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["toast.test.ts"],
|
|
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>(html`\n <sp-toast open>Help text.</sp-toast>\n `)\n );\n it('loads', async () => {\n const el = await fixture<Toast>(html`\n <sp-toast open>Help text.</sp-toast>\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>(html`\n <sp-toast variant=${variant} open>\n This toast is of the \\`${variant}\\` variant.\n </sp-toast>\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>(html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\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>(html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\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>(html`\n <sp-toast timeout=\"100\">Help text.</sp-toast>\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>(html`\n <sp-toast open>Help text.</sp-toast>\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>(html`\n <sp-toast open timeout=\"100\" @close=${handleClose}>\n Help text.\n </sp-toast>\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>(html`\n <sp-toast open timeout=\"100\" @close=${handleClose}>\n Help text.\n </sp-toast>\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>(html`\n <sp-toast variant=\"invalid\" open>\n This toast validates variants.\n </sp-toast>\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>(html`\n <sp-toast variant=\"positive\" open>\n This toast maintains variants.\n </sp-toast>\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>(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 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 it('sp close button renders with static-color=\"white\"', async () => {\n const el = await fixture<Toast>(html`\n <sp-toast open>Help text.</sp-toast>\n `);\n const renderRoot = el.shadowRoot ? el.shadowRoot : el;\n const closeButton = renderRoot.querySelector(\n 'sp-close-button'\n ) as CloseButton;\n\n expect(closeButton).to.exist;\n\n expect(closeButton.getAttribute('static-color')).to.equal('white');\n });\n});\n"],
|
|
5
|
-
"mappings": ";AAY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