@spectrum-web-components/alert-banner 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +5 -5
  2. package/sp-alert-banner.d.ts +6 -0
  3. package/sp-alert-banner.dev.js +5 -0
  4. package/sp-alert-banner.dev.js.map +7 -0
  5. package/sp-alert-banner.js +2 -0
  6. package/sp-alert-banner.js.map +7 -0
  7. package/src/AlertBanner.d.ts +46 -0
  8. package/src/AlertBanner.dev.js +139 -0
  9. package/src/AlertBanner.dev.js.map +7 -0
  10. package/src/AlertBanner.js +26 -0
  11. package/src/AlertBanner.js.map +7 -0
  12. package/src/alert-banner-overrides.css.d.ts +2 -0
  13. package/src/alert-banner-overrides.css.dev.js +7 -0
  14. package/src/alert-banner-overrides.css.dev.js.map +7 -0
  15. package/src/alert-banner-overrides.css.js +4 -0
  16. package/src/alert-banner-overrides.css.js.map +7 -0
  17. package/src/alert-banner.css.d.ts +2 -0
  18. package/src/alert-banner.css.dev.js +7 -0
  19. package/src/alert-banner.css.dev.js.map +7 -0
  20. package/src/alert-banner.css.js +4 -0
  21. package/src/alert-banner.css.js.map +7 -0
  22. package/src/index.d.ts +1 -0
  23. package/src/index.dev.js +3 -0
  24. package/src/index.dev.js.map +7 -0
  25. package/src/index.js +2 -0
  26. package/src/index.js.map +7 -0
  27. package/src/spectrum-alert-banner.css.d.ts +2 -0
  28. package/src/spectrum-alert-banner.css.dev.js +7 -0
  29. package/src/spectrum-alert-banner.css.dev.js.map +7 -0
  30. package/src/spectrum-alert-banner.css.js +4 -0
  31. package/src/spectrum-alert-banner.css.js.map +7 -0
  32. package/stories/alert-banner.stories.js +47 -0
  33. package/stories/alert-banner.stories.js.map +7 -0
  34. package/stories/args.js +51 -0
  35. package/stories/args.js.map +7 -0
  36. package/stories/index.js +23 -0
  37. package/stories/index.js.map +7 -0
  38. package/stories/template.js +4 -0
  39. package/stories/template.js.map +7 -0
  40. package/test/alert-banner-memory.test.js +5 -0
  41. package/test/alert-banner-memory.test.js.map +7 -0
  42. package/test/alert-banner.test-vrt.js +5 -0
  43. package/test/alert-banner.test-vrt.js.map +7 -0
  44. package/test/alert-banner.test.js +162 -0
  45. package/test/alert-banner.test.js.map +7 -0
  46. package/test/benchmark/basic-test.js +8 -0
  47. package/test/benchmark/basic-test.js.map +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/alert-banner",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -58,9 +58,9 @@
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/icons-workflow": "^1.1.0"
61
+ "@spectrum-web-components/base": "^1.1.2",
62
+ "@spectrum-web-components/button": "^1.1.2",
63
+ "@spectrum-web-components/icons-workflow": "^1.1.2"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@spectrum-css/alertbanner": "3.0.0-s2-foundations.16"
@@ -71,5 +71,5 @@
71
71
  "./sp-*.js",
72
72
  "./**/*.dev.js"
73
73
  ],
74
- "gitHead": "e3c6e52501451acc6fa85b10dd718267b80a01ab"
74
+ "gitHead": "9ee45f2dfd3ac1939072726d00195c6c05d9a562"
75
75
  }
@@ -0,0 +1,6 @@
1
+ import { AlertBanner } from './src/AlertBanner.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-alert-banner': AlertBanner;
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import { AlertBanner } from "./src/AlertBanner.dev.js";
3
+ import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
+ defineElement("sp-alert-banner", AlertBanner);
5
+ //# sourceMappingURL=sp-alert-banner.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-alert-banner.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 { AlertBanner } from './src/AlertBanner.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-alert-banner', AlertBanner);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-alert-banner': AlertBanner;\n }\n}\n"],
5
+ "mappings": ";AAWA,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,cAAc,mBAAmB,WAAW;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{AlertBanner as e}from"./src/AlertBanner.js";import{defineElement as r}from"@spectrum-web-components/base/src/define-element.js";r("sp-alert-banner",e);
2
+ //# sourceMappingURL=sp-alert-banner.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-alert-banner.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 { AlertBanner } from './src/AlertBanner.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-alert-banner', AlertBanner);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-alert-banner': AlertBanner;\n }\n}\n"],
5
+ "mappings": "aAWA,OAAS,eAAAA,MAAmB,uBAC5B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,kBAAmBD,CAAW",
6
+ "names": ["AlertBanner", "defineElement"]
7
+ }
@@ -0,0 +1,46 @@
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
+ declare const VALID_VARIANTS: string[];
6
+ export type AlertBannerVariants = (typeof VALID_VARIANTS)[number];
7
+ /**
8
+ * @element sp-alert-banner
9
+ *
10
+ * @slot - The alert banner text context
11
+ * @slot action - Slot for the button element that surfaces the contextual action a user can take
12
+ *
13
+ * @fires close - Announces the alert banner has been closed
14
+ */
15
+ export declare class AlertBanner extends SpectrumElement {
16
+ static get styles(): CSSResultArray;
17
+ /**
18
+ * Controls the display of the alert banner
19
+ *
20
+ * @param {Boolean} open
21
+ */
22
+ open: boolean;
23
+ /**
24
+ * Whether to include an icon-only close button to dismiss the alert banner
25
+ *
26
+ * @param {Boolean} dismissible
27
+ */
28
+ dismissible: boolean;
29
+ /**
30
+ * The variant applies specific styling when set to `negative` or `info`;
31
+ * `variant` attribute is removed when it's passed an invalid variant.
32
+ *
33
+ * @param {String} variant
34
+ */
35
+ set variant(variant: AlertBannerVariants);
36
+ get variant(): AlertBannerVariants;
37
+ private _variant;
38
+ protected isValidVariant(variant: string): boolean;
39
+ protected renderIcon(variant: string): TemplateResult;
40
+ private shouldClose;
41
+ close(): void;
42
+ private handleKeydown;
43
+ protected render(): TemplateResult;
44
+ protected updated(changes: PropertyValues): void;
45
+ }
46
+ export {};
@@ -0,0 +1,139 @@
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 styles from "./alert-banner.css.js";
21
+ const VALID_VARIANTS = ["neutral", "info", "negative"];
22
+ export class AlertBanner extends SpectrumElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.open = false;
26
+ this.dismissible = false;
27
+ this._variant = "";
28
+ }
29
+ static get styles() {
30
+ return [styles];
31
+ }
32
+ set variant(variant) {
33
+ if (variant === this.variant) {
34
+ return;
35
+ }
36
+ const oldValue = this.variant;
37
+ if (this.isValidVariant(variant)) {
38
+ this.setAttribute("variant", variant);
39
+ this._variant = variant;
40
+ } else {
41
+ this.removeAttribute("variant");
42
+ this._variant = "";
43
+ if (true) {
44
+ window.__swc.warn(
45
+ this,
46
+ `<${this.localName}> element expects the "variant" attribute to be one of the following:`,
47
+ "https://opensource.adobe.com/spectrum-web-components/components/alert-banner/#variants",
48
+ {
49
+ issues: [...VALID_VARIANTS]
50
+ }
51
+ );
52
+ }
53
+ }
54
+ this.requestUpdate("variant", oldValue);
55
+ }
56
+ get variant() {
57
+ return this._variant;
58
+ }
59
+ isValidVariant(variant) {
60
+ return VALID_VARIANTS.includes(variant);
61
+ }
62
+ renderIcon(variant) {
63
+ switch (variant) {
64
+ case "info":
65
+ return html`
66
+ <sp-icon-info
67
+ label="Information"
68
+ class="type"
69
+ ></sp-icon-info>
70
+ `;
71
+ case "negative":
72
+ return html`
73
+ <sp-icon-alert label="Error" class="type"></sp-icon-alert>
74
+ `;
75
+ default:
76
+ return html``;
77
+ }
78
+ }
79
+ shouldClose() {
80
+ const applyDefault = this.dispatchEvent(
81
+ new CustomEvent("close", {
82
+ composed: true,
83
+ bubbles: true,
84
+ cancelable: true
85
+ })
86
+ );
87
+ if (applyDefault) {
88
+ this.close();
89
+ }
90
+ }
91
+ close() {
92
+ this.open = false;
93
+ }
94
+ handleKeydown(event) {
95
+ if (event.code === "Escape" && this.dismissible) {
96
+ this.shouldClose();
97
+ }
98
+ }
99
+ render() {
100
+ return html`
101
+ <div class="body" role="alert">
102
+ <div class="content">
103
+ ${this.renderIcon(this.variant)}
104
+ <div class="text"><slot></slot></div>
105
+ </div>
106
+ <slot name="action"></slot>
107
+ </div>
108
+ <div class="end">
109
+ ${this.dismissible ? html`
110
+ <sp-close-button
111
+ @click=${this.shouldClose}
112
+ label="Close"
113
+ static-color="white"
114
+ ></sp-close-button>
115
+ ` : html``}
116
+ </div>
117
+ `;
118
+ }
119
+ updated(changes) {
120
+ super.updated(changes);
121
+ if (changes.has("open")) {
122
+ if (this.open) {
123
+ this.addEventListener("keydown", this.handleKeydown);
124
+ } else {
125
+ this.removeEventListener("keydown", this.handleKeydown);
126
+ }
127
+ }
128
+ }
129
+ }
130
+ __decorateClass([
131
+ property({ type: Boolean, reflect: true })
132
+ ], AlertBanner.prototype, "open", 2);
133
+ __decorateClass([
134
+ property({ type: Boolean, reflect: true })
135
+ ], AlertBanner.prototype, "dismissible", 2);
136
+ __decorateClass([
137
+ property({ type: String })
138
+ ], AlertBanner.prototype, "variant", 1);
139
+ //# sourceMappingURL=AlertBanner.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["AlertBanner.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 {\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 styles from './alert-banner.css.js';\n\nconst VALID_VARIANTS = ['neutral', 'info', 'negative'];\nexport type AlertBannerVariants = (typeof VALID_VARIANTS)[number];\n\n/**\n * @element sp-alert-banner\n *\n * @slot - The alert banner text context\n * @slot action - Slot for the button element that surfaces the contextual action a user can take\n *\n * @fires close - Announces the alert banner has been closed\n */\nexport class AlertBanner extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n /**\n * Controls the display of the alert banner\n *\n * @param {Boolean} open\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Whether to include an icon-only close button to dismiss the alert banner\n *\n * @param {Boolean} dismissible\n */\n @property({ type: Boolean, reflect: true })\n public dismissible = false;\n\n /**\n * The variant applies specific styling when set to `negative` or `info`;\n * `variant` attribute is removed when it's passed an invalid variant.\n *\n * @param {String} variant\n */\n @property({ type: String })\n public set variant(variant: AlertBannerVariants) {\n if (variant === this.variant) {\n return;\n }\n const oldValue = this.variant;\n\n if (this.isValidVariant(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n } else {\n this.removeAttribute('variant');\n this._variant = '';\n\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"variant\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-banner/#variants',\n {\n issues: [...VALID_VARIANTS],\n }\n );\n }\n }\n this.requestUpdate('variant', oldValue);\n }\n\n public get variant(): AlertBannerVariants {\n return this._variant;\n }\n\n private _variant: AlertBannerVariants = '';\n\n protected isValidVariant(variant: string): boolean {\n return VALID_VARIANTS.includes(variant);\n }\n\n protected 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 return html`\n <sp-icon-alert label=\"Error\" class=\"type\"></sp-icon-alert>\n `;\n default:\n return html``;\n }\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 private handleKeydown(event: KeyboardEvent): void {\n if (event.code === 'Escape' && this.dismissible) {\n this.shouldClose();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"body\" role=\"alert\">\n <div class=\"content\">\n ${this.renderIcon(this.variant)}\n <div class=\"text\"><slot></slot></div>\n </div>\n <slot name=\"action\"></slot>\n </div>\n <div class=\"end\">\n ${this.dismissible\n ? html`\n <sp-close-button\n @click=${this.shouldClose}\n label=\"Close\"\n static-color=\"white\"\n ></sp-close-button>\n `\n : html``}\n </div>\n `;\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n\n if (changes.has('open')) {\n if (this.open) {\n this.addEventListener('keydown', this.handleKeydown);\n } else {\n this.removeEventListener('keydown', this.handleKeydown);\n }\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,YAAY;AAEnB,MAAM,iBAAiB,CAAC,WAAW,QAAQ,UAAU;AAW9C,aAAM,oBAAoB,gBAAgB;AAAA,EAA1C;AAAA;AAWH,SAAO,OAAO;AAQd,SAAO,cAAc;AAwCrB,SAAQ,WAAgC;AAAA;AAAA,EA1DxC,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAyBA,IAAW,QAAQ,SAA8B;AAC7C,QAAI,YAAY,KAAK,SAAS;AAC1B;AAAA,IACJ;AACA,UAAM,WAAW,KAAK;AAEtB,QAAI,KAAK,eAAe,OAAO,GAAG;AAC9B,WAAK,aAAa,WAAW,OAAO;AACpC,WAAK,WAAW;AAAA,IACpB,OAAO;AACH,WAAK,gBAAgB,SAAS;AAC9B,WAAK,WAAW;AAEhB,UAAI,MAAoB;AACpB,eAAO,MAAM;AAAA,UACT;AAAA,UACA,IAAI,KAAK,SAAS;AAAA,UAClB;AAAA,UACA;AAAA,YACI,QAAQ,CAAC,GAAG,cAAc;AAAA,UAC9B;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AACA,SAAK,cAAc,WAAW,QAAQ;AAAA,EAC1C;AAAA,EAEA,IAAW,UAA+B;AACtC,WAAO,KAAK;AAAA,EAChB;AAAA,EAIU,eAAe,SAA0B;AAC/C,WAAO,eAAe,SAAS,OAAO;AAAA,EAC1C;AAAA,EAEU,WAAW,SAAiC;AAClD,YAAQ,SAAS;AAAA,MACb,KAAK;AACD,eAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMX,KAAK;AACD,eAAO;AAAA;AAAA;AAAA,MAGX;AACI,eAAO;AAAA,IACf;AAAA,EACJ;AAAA,EAEQ,cAAoB;AACxB,UAAM,eAAe,KAAK;AAAA,MACtB,IAAI,YAAY,SAAS;AAAA,QACrB,UAAU;AAAA,QACV,SAAS;AAAA,QACT,YAAY;AAAA,MAChB,CAAC;AAAA,IACL;AACA,QAAI,cAAc;AACd,WAAK,MAAM;AAAA,IACf;AAAA,EACJ;AAAA,EAEO,QAAc;AACjB,SAAK,OAAO;AAAA,EAChB;AAAA,EAEQ,cAAc,OAA4B;AAC9C,QAAI,MAAM,SAAS,YAAY,KAAK,aAAa;AAC7C,WAAK,YAAY;AAAA,IACrB;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,sBAGO,KAAK,WAAW,KAAK,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMjC,KAAK,cACD;AAAA;AAAA,uCAEiB,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA,0BAKjC,MAAM;AAAA;AAAA;AAAA,EAGxB;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AAErB,QAAI,QAAQ,IAAI,MAAM,GAAG;AACrB,UAAI,KAAK,MAAM;AACX,aAAK,iBAAiB,WAAW,KAAK,aAAa;AAAA,MACvD,OAAO;AACH,aAAK,oBAAoB,WAAW,KAAK,aAAa;AAAA,MAC1D;AAAA,IACJ;AAAA,EACJ;AACJ;AAjIW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAVjC,YAWF;AAQA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAlBjC,YAmBF;AASI;AAAA,EADV,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA3BjB,YA4BE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var o=(a,r,e,s)=>{for(var t=s>1?void 0:s?d(r,e):r,n=a.length-1,l;n>=0;n--)(l=a[n])&&(t=(s?l(r,e,t):l(t))||t);return s&&t&&c(r,e,t),t};import{html as i,SpectrumElement as u}from"@spectrum-web-components/base";import{property as p}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 h from"./alert-banner.css.js";const v=["neutral","info","negative"];export class AlertBanner extends u{constructor(){super(...arguments);this.open=!1;this.dismissible=!1;this._variant=""}static get styles(){return[h]}set variant(e){if(e===this.variant)return;const s=this.variant;this.isValidVariant(e)?(this.setAttribute("variant",e),this._variant=e):(this.removeAttribute("variant"),this._variant=""),this.requestUpdate("variant",s)}get variant(){return this._variant}isValidVariant(e){return v.includes(e)}renderIcon(e){switch(e){case"info":return i`
2
+ <sp-icon-info
3
+ label="Information"
4
+ class="type"
5
+ ></sp-icon-info>
6
+ `;case"negative":return i`
7
+ <sp-icon-alert label="Error" class="type"></sp-icon-alert>
8
+ `;default:return i``}}shouldClose(){this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0,cancelable:!0}))&&this.close()}close(){this.open=!1}handleKeydown(e){e.code==="Escape"&&this.dismissible&&this.shouldClose()}render(){return i`
9
+ <div class="body" role="alert">
10
+ <div class="content">
11
+ ${this.renderIcon(this.variant)}
12
+ <div class="text"><slot></slot></div>
13
+ </div>
14
+ <slot name="action"></slot>
15
+ </div>
16
+ <div class="end">
17
+ ${this.dismissible?i`
18
+ <sp-close-button
19
+ @click=${this.shouldClose}
20
+ label="Close"
21
+ static-color="white"
22
+ ></sp-close-button>
23
+ `:i``}
24
+ </div>
25
+ `}updated(e){super.updated(e),e.has("open")&&(this.open?this.addEventListener("keydown",this.handleKeydown):this.removeEventListener("keydown",this.handleKeydown))}}o([p({type:Boolean,reflect:!0})],AlertBanner.prototype,"open",2),o([p({type:Boolean,reflect:!0})],AlertBanner.prototype,"dismissible",2),o([p({type:String})],AlertBanner.prototype,"variant",1);
26
+ //# sourceMappingURL=AlertBanner.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["AlertBanner.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 {\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 styles from './alert-banner.css.js';\n\nconst VALID_VARIANTS = ['neutral', 'info', 'negative'];\nexport type AlertBannerVariants = (typeof VALID_VARIANTS)[number];\n\n/**\n * @element sp-alert-banner\n *\n * @slot - The alert banner text context\n * @slot action - Slot for the button element that surfaces the contextual action a user can take\n *\n * @fires close - Announces the alert banner has been closed\n */\nexport class AlertBanner extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n /**\n * Controls the display of the alert banner\n *\n * @param {Boolean} open\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Whether to include an icon-only close button to dismiss the alert banner\n *\n * @param {Boolean} dismissible\n */\n @property({ type: Boolean, reflect: true })\n public dismissible = false;\n\n /**\n * The variant applies specific styling when set to `negative` or `info`;\n * `variant` attribute is removed when it's passed an invalid variant.\n *\n * @param {String} variant\n */\n @property({ type: String })\n public set variant(variant: AlertBannerVariants) {\n if (variant === this.variant) {\n return;\n }\n const oldValue = this.variant;\n\n if (this.isValidVariant(variant)) {\n this.setAttribute('variant', variant);\n this._variant = variant;\n } else {\n this.removeAttribute('variant');\n this._variant = '';\n\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `<${this.localName}> element expects the \"variant\" attribute to be one of the following:`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-banner/#variants',\n {\n issues: [...VALID_VARIANTS],\n }\n );\n }\n }\n this.requestUpdate('variant', oldValue);\n }\n\n public get variant(): AlertBannerVariants {\n return this._variant;\n }\n\n private _variant: AlertBannerVariants = '';\n\n protected isValidVariant(variant: string): boolean {\n return VALID_VARIANTS.includes(variant);\n }\n\n protected 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 return html`\n <sp-icon-alert label=\"Error\" class=\"type\"></sp-icon-alert>\n `;\n default:\n return html``;\n }\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 private handleKeydown(event: KeyboardEvent): void {\n if (event.code === 'Escape' && this.dismissible) {\n this.shouldClose();\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"body\" role=\"alert\">\n <div class=\"content\">\n ${this.renderIcon(this.variant)}\n <div class=\"text\"><slot></slot></div>\n </div>\n <slot name=\"action\"></slot>\n </div>\n <div class=\"end\">\n ${this.dismissible\n ? html`\n <sp-close-button\n @click=${this.shouldClose}\n label=\"Close\"\n static-color=\"white\"\n ></sp-close-button>\n `\n : html``}\n </div>\n `;\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n\n if (changes.has('open')) {\n if (this.open) {\n this.addEventListener('keydown', this.handleKeydown);\n } else {\n this.removeEventListener('keydown', this.handleKeydown);\n }\n }\n }\n}\n"],
5
+ "mappings": "qNAWA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,MAAO,qDACP,MAAO,iEACP,MAAO,gEACP,OAAOC,MAAY,wBAEnB,MAAMC,EAAiB,CAAC,UAAW,OAAQ,UAAU,EAW9C,aAAM,oBAAoBH,CAAgB,CAA1C,kCAWH,KAAO,KAAO,GAQd,KAAO,YAAc,GAwCrB,KAAQ,SAAgC,GA1DxC,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAM,CAClB,CAyBA,IAAW,QAAQE,EAA8B,CAC7C,GAAIA,IAAY,KAAK,QACjB,OAEJ,MAAMC,EAAW,KAAK,QAElB,KAAK,eAAeD,CAAO,GAC3B,KAAK,aAAa,UAAWA,CAAO,EACpC,KAAK,SAAWA,IAEhB,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,IAapB,KAAK,cAAc,UAAWC,CAAQ,CAC1C,CAEA,IAAW,SAA+B,CACtC,OAAO,KAAK,QAChB,CAIU,eAAeD,EAA0B,CAC/C,OAAOD,EAAe,SAASC,CAAO,CAC1C,CAEU,WAAWA,EAAiC,CAClD,OAAQA,EAAS,CACb,IAAK,OACD,OAAOL;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMX,IAAK,WACD,OAAOA;AAAA;AAAA,kBAGX,QACI,OAAOA,GACf,CACJ,CAEQ,aAAoB,CACH,KAAK,cACtB,IAAI,YAAY,QAAS,CACrB,SAAU,GACV,QAAS,GACT,WAAY,EAChB,CAAC,CACL,GAEI,KAAK,MAAM,CAEnB,CAEO,OAAc,CACjB,KAAK,KAAO,EAChB,CAEQ,cAAcO,EAA4B,CAC1CA,EAAM,OAAS,UAAY,KAAK,aAChC,KAAK,YAAY,CAEzB,CAEmB,QAAyB,CACxC,OAAOP;AAAA;AAAA;AAAA,sBAGO,KAAK,WAAW,KAAK,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMjC,KAAK,YACDA;AAAA;AAAA,uCAEiB,KAAK,WAAW;AAAA;AAAA;AAAA;AAAA,wBAKjCA,GAAM;AAAA;AAAA,SAGxB,CAEmB,QAAQQ,EAA+B,CACtD,MAAM,QAAQA,CAAO,EAEjBA,EAAQ,IAAI,MAAM,IACd,KAAK,KACL,KAAK,iBAAiB,UAAW,KAAK,aAAa,EAEnD,KAAK,oBAAoB,UAAW,KAAK,aAAa,EAGlE,CACJ,CAjIWC,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAVjC,YAWF,oBAQAO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAlBjC,YAmBF,2BASIO,EAAA,CADVP,EAAS,CAAE,KAAM,MAAO,CAAC,GA3BjB,YA4BE",
6
+ "names": ["html", "SpectrumElement", "property", "styles", "VALID_VARIANTS", "variant", "oldValue", "event", "changes", "__decorateClass"]
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=alert-banner-overrides.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner-overrides.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as e}from"@spectrum-web-components/base";const t=e`
2
+ :host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}
3
+ `;export default t;
4
+ //# sourceMappingURL=alert-banner-overrides.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner-overrides.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}:host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=alert-banner.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}:host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as e}from"@spectrum-web-components/base";const r=e`
2
+ :host{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}:host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-color)}
3
+ `;export default r;
4
+ //# sourceMappingURL=alert-banner.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}:host{--spectrum-alert-banner-neutral-background:var(--system-alert-banner-neutral-background);--spectrum-alert-banner-min-height:var(--system-alert-banner-min-height);--spectrum-alert-banner-max-inline-size:var(--system-alert-banner-max-inline-size);--spectrum-alert-banner-size:var(--system-alert-banner-size);--spectrum-alert-banner-font-size:var(--system-alert-banner-font-size);--spectrum-alert-banner-icon-size:var(--system-alert-banner-icon-size);--spectrum-alert-banner-icon-to-text:var(--system-alert-banner-icon-to-text);--spectrum-alert-banner-start-edge:var(--system-alert-banner-start-edge);--spectrum-alert-banner-text-to-button-horizontal:var(--system-alert-banner-text-to-button-horizontal);--spectrum-alert-banner-text-to-divider:var(--system-alert-banner-text-to-divider);--spectrum-alert-banner-top-icon:var(--system-alert-banner-top-icon);--spectrum-alert-banner-top-text:var(--system-alert-banner-top-text);--spectrum-alert-banner-bottom-text:var(--system-alert-banner-bottom-text);--spectrum-alert-banner-informative-background:var(--system-alert-banner-informative-background);--spectrum-alert-banner-negative-background:var(--system-alert-banner-negative-background);--spectrum-alert-banner-font-color:var(--system-alert-banner-font-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/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './AlertBanner.js';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ export * from "./AlertBanner.dev.js";
3
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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*/\nexport * from './AlertBanner.dev.js'\n"],
5
+ "mappings": ";AAWA,cAAc;",
6
+ "names": []
7
+ }
package/src/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";export*from"./AlertBanner.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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*/\nexport * from './AlertBanner.js';\n"],
5
+ "mappings": "aAWA,WAAc",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=spectrum-alert-banner.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-alert-banner.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as r}from"@spectrum-web-components/base";const e=r`
2
+ :host{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}
3
+ `;export default e;
4
+ //# sourceMappingURL=spectrum-alert-banner.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-alert-banner.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2025 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{--mod-divider-vertical-margin:var(--mod-alert-banner-edge-to-divider,var(--spectrum-alert-banner-edge-to-divider));--mod-divider-vertical-height:auto;--mod-divider-vertical-align:stretch;--mod-button-margin-block:var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button));--mod-button-margin-right:var(--mod-alert-banner-text-to-divider,var(--spectrum-alert-banner-text-to-divider));--mod-button-margin-left:auto;--mod-closebutton-margin-inline:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-margin-top:var(--mod-alert-banner-close-button-spacing,var(--spectrum-alert-banner-close-button-spacing));--mod-closebutton-align-self:flex-start;inline-size:var(--mod-alert-banner-size,var(--spectrum-alert-banner-size));max-inline-size:var(--mod-alert-banner-max-inline-size,var(--spectrum-alert-banner-max-inline-size));min-block-size:var(--mod-alert-banner-min-height,var(--spectrum-alert-banner-min-height));font-size:var(--mod-alert-banner-font-size,var(--spectrum-alert-banner-font-size));color:var(--mod-alert-banner-font-color,var(--spectrum-alert-banner-font-color));background-color:var(--mod-alert-banner-neutral-background,var(--mod-alert-banner-neutral-background,var(--spectrum-alert-banner-neutral-background)));border:0 solid #0000;border:var(--highcontrast-alert-banner-border-width,0)solid var(--highcontrast-alert-banner-border-color,transparent);justify-content:space-between;display:none}:host([open]){display:flex}:host([variant=info]){background-color:var(--mod-alert-banner-informative-background,var(--spectrum-alert-banner-informative-background))}:host([variant=negative]){background-color:var(--mod-alert-banner-negative-background,var(--spectrum-alert-banner-negative-background))}.body{inline-size:100%;gap:max(calc(var(--mod-alert-banner-text-to-button-vertical,var(--spectrum-alert-banner-text-to-button-vertical)) - var(--mod-alert-banner-edge-to-button,var(--spectrum-alert-banner-edge-to-button))),0px);flex-wrap:wrap;align-items:center;margin-inline-start:var(--mod-alert-banner-start-edge,var(--spectrum-alert-banner-start-edge));display:flex}.content{display:flex}.end{align-items:center;display:flex}.type{inline-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));block-size:var(--mod-alert-banner-icon-size,var(--spectrum-alert-banner-icon-size));flex-shrink:0;margin-block-start:var(--mod-alert-banner-top-icon,var(--spectrum-alert-banner-top-icon));margin-inline-end:var(--mod-alert-banner-icon-to-text,var(--spectrum-alert-banner-icon-to-text))}.text{margin-block-start:var(--mod-alert-banner-top-text,var(--spectrum-alert-banner-top-text));margin-block-end:var(--mod-alert-banner-bottom-text,var(--spectrum-alert-banner-bottom-text));margin-inline-end:var(--mod-alert-banner-text-to-button-horizontal,var(--spectrum-alert-banner-text-to-button-horizontal))}@media (forced-colors:active){:host{--highcontrast-alert-banner-border-color:CanvasText;--highcontrast-alert-banner-border-width:var(--spectrum-border-width-100)}}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ import { AlertBannerMarkup } from "./";
4
+ import { argTypes } from "./args.js";
5
+ export default {
6
+ title: "Alert Banner",
7
+ component: "sp-alert-banner",
8
+ args: {
9
+ text: "Your trial has expired",
10
+ dismissible: true,
11
+ open: true,
12
+ variant: "neutral"
13
+ },
14
+ argTypes
15
+ };
16
+ export const Default = (args) => AlertBannerMarkup(args);
17
+ export const Info = (args) => AlertBannerMarkup({
18
+ ...args,
19
+ variant: "info",
20
+ text: "Your trial will expire in 3 days"
21
+ });
22
+ export const Negative = (args) => AlertBannerMarkup({
23
+ ...args,
24
+ variant: "negative",
25
+ text: "Connection interrupted. Check your network to continue"
26
+ });
27
+ export const TextWrapping = (args) => html`
28
+ <div style="max-width:800px;">
29
+ ${AlertBannerMarkup({
30
+ ...args,
31
+ variant: "negative",
32
+ text: ` Your trial has expired. Please purchase to continue.
33
+ Your work has been saved and is ready for you to open again once
34
+ you have purchased the software.`,
35
+ actionLabel: "Purchase"
36
+ })}
37
+ </div>
38
+ `;
39
+ export const Multilanguage = (args) => html`
40
+ ${AlertBannerMarkup({
41
+ ...args,
42
+ variant: "info",
43
+ text: `\u0633\u062A\u0646\u062A\u0647\u064A \u0627\u0644\u0641\u062A\u0631\u0629 \u0627\u0644\u062A\u062C\u0631\u064A\u0628\u064A\u0629 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0641\u064A \u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0642\u0628\u0644`,
44
+ actionLabel: `\u0627\u0634\u062A\u0631\u064A \u0627\u0644\u0622\u0646`
45
+ })}
46
+ `;
47
+ //# sourceMappingURL=alert-banner.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner.stories.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*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { AlertBannerVariants } from '@spectrum-web-components/alert-banner';\nimport { AlertBannerMarkup } from './';\nimport { argTypes } from './args.js';\n\ninterface Properties {\n text: string;\n variant: AlertBannerVariants;\n dismissible: boolean;\n open: boolean;\n onClose?: (event: Event) => void;\n actionLabel?: string;\n}\n\nexport default {\n title: 'Alert Banner',\n component: 'sp-alert-banner',\n args: {\n text: 'Your trial has expired',\n dismissible: true,\n open: true,\n variant: 'neutral',\n },\n argTypes,\n};\n\nexport const Default = (args: Properties): TemplateResult =>\n AlertBannerMarkup(args);\n\nexport const Info = (args: Properties): TemplateResult =>\n AlertBannerMarkup({\n ...args,\n variant: 'info',\n text: 'Your trial will expire in 3 days',\n });\n\nexport const Negative = (args: Properties): TemplateResult =>\n AlertBannerMarkup({\n ...args,\n variant: 'negative',\n text: 'Connection interrupted. Check your network to continue',\n });\n\nexport const TextWrapping = (args: Properties): TemplateResult => html`\n <div style=\"max-width:800px;\">\n ${AlertBannerMarkup({\n ...args,\n variant: 'negative',\n text: ` Your trial has expired. Please purchase to continue.\nYour work has been saved and is ready for you to open again once\nyou have purchased the software.`,\n actionLabel: 'Purchase',\n })}\n </div>\n`;\n\nexport const Multilanguage = (args: Properties): TemplateResult => html`\n ${AlertBannerMarkup({\n ...args,\n variant: 'info',\n text: `\u0633\u062A\u0646\u062A\u0647\u064A \u0627\u0644\u0641\u062A\u0631\u0629 \u0627\u0644\u062A\u062C\u0631\u064A\u0628\u064A\u0629 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0641\u064A \u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0642\u0628\u0644`,\n actionLabel: `\u0627\u0634\u062A\u0631\u064A \u0627\u0644\u0622\u0646`,\n })}\n`;\n"],
5
+ "mappings": ";AAYA,SAAS,YAA4B;AAErC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAWzB,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,MAAM;AAAA,IACN,SAAS;AAAA,EACb;AAAA,EACA;AACJ;AAEO,aAAM,UAAU,CAAC,SACpB,kBAAkB,IAAI;AAEnB,aAAM,OAAO,CAAC,SACjB,kBAAkB;AAAA,EACd,GAAG;AAAA,EACH,SAAS;AAAA,EACT,MAAM;AACV,CAAC;AAEE,aAAM,WAAW,CAAC,SACrB,kBAAkB;AAAA,EACd,GAAG;AAAA,EACH,SAAS;AAAA,EACT,MAAM;AACV,CAAC;AAEE,aAAM,eAAe,CAAC,SAAqC;AAAA;AAAA,UAExD,kBAAkB;AAAA,EAChB,GAAG;AAAA,EACH,SAAS;AAAA,EACT,MAAM;AAAA;AAAA;AAAA,EAGN,aAAa;AACjB,CAAC,CAAC;AAAA;AAAA;AAIH,aAAM,gBAAgB,CAAC,SAAqC;AAAA,MAC7D,kBAAkB;AAAA,EAChB,GAAG;AAAA,EACH,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AACjB,CAAC,CAAC;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ export const argTypes = {
3
+ text: {
4
+ name: "text",
5
+ type: { name: "string", required: false },
6
+ table: {
7
+ type: { summary: "string" },
8
+ defaultValue: { summary: "Your trial has expired" }
9
+ },
10
+ control: "text"
11
+ },
12
+ dismissible: {
13
+ name: "dismissible",
14
+ type: { name: "boolean", required: false },
15
+ description: "Whether to include an icon-only close button to dismiss it",
16
+ table: {
17
+ type: { summary: "boolean" },
18
+ defaultValue: { summary: true }
19
+ },
20
+ control: { type: "boolean" }
21
+ },
22
+ open: {
23
+ name: "open",
24
+ type: { name: "boolean", required: false },
25
+ description: "Whether the alert banner is open",
26
+ table: {
27
+ type: { summary: "boolean" },
28
+ defaultValue: { summary: true }
29
+ },
30
+ control: { type: "boolean" }
31
+ },
32
+ variant: {
33
+ name: "variant",
34
+ type: { name: "string", required: false },
35
+ description: "The visual variant of the alert banner",
36
+ table: {
37
+ type: { summary: "string" },
38
+ defaultValue: { summary: "neutral" }
39
+ },
40
+ control: {
41
+ labels: {
42
+ neutral: "Neutral",
43
+ info: "Info",
44
+ negative: "Negative"
45
+ },
46
+ type: "select"
47
+ },
48
+ options: ["neutral", "info", "negative"]
49
+ }
50
+ };
51
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["args.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*/\n\nexport const argTypes = {\n text: {\n name: 'text',\n type: { name: 'string', required: false },\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'Your trial has expired' },\n },\n control: 'text',\n },\n dismissible: {\n name: 'dismissible',\n type: { name: 'boolean', required: false },\n description:\n 'Whether to include an icon-only close button to dismiss it',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: true },\n },\n control: { type: 'boolean' },\n },\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n description: 'Whether the alert banner is open',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: true },\n },\n control: { type: 'boolean' },\n },\n variant: {\n name: 'variant',\n type: { name: 'string', required: false },\n description: 'The visual variant of the alert banner',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'neutral' },\n },\n control: {\n labels: {\n neutral: 'Neutral',\n info: 'Info',\n negative: 'Negative',\n },\n type: 'select',\n },\n options: ['neutral', 'info', 'negative'],\n },\n};\n"],
5
+ "mappings": ";AAYO,aAAM,WAAW;AAAA,EACpB,MAAM;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,SAAS;AAAA,MAC1B,cAAc,EAAE,SAAS,yBAAyB;AAAA,IACtD;AAAA,IACA,SAAS;AAAA,EACb;AAAA,EACA,aAAa;AAAA,IACT,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aACI;AAAA,IACJ,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,KAAK;AAAA,IAClC;AAAA,IACA,SAAS,EAAE,MAAM,UAAU;AAAA,EAC/B;AAAA,EACA,MAAM;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,KAAK;AAAA,IAClC;AAAA,IACA,SAAS,EAAE,MAAM,UAAU;AAAA,EAC/B;AAAA,EACA,SAAS;AAAA,IACL,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,SAAS;AAAA,MAC1B,cAAc,EAAE,SAAS,UAAU;AAAA,IACvC;AAAA,IACA,SAAS;AAAA,MACL,QAAQ;AAAA,QACJ,SAAS;AAAA,QACT,MAAM;AAAA,QACN,UAAU;AAAA,MACd;AAAA,MACA,MAAM;AAAA,IACV;AAAA,IACA,SAAS,CAAC,WAAW,QAAQ,UAAU;AAAA,EAC3C;AACJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ import { html } from "@spectrum-web-components/base";
3
+ import "@spectrum-web-components/alert-banner/sp-alert-banner.js";
4
+ import "@spectrum-web-components/button/sp-button.js";
5
+ export const AlertBannerMarkup = ({
6
+ text = "Your trial has expired",
7
+ variant = "neutral",
8
+ dismissible = true,
9
+ open = false,
10
+ actionLabel = "Action"
11
+ }) => html`
12
+ <sp-alert-banner
13
+ variant=${variant}
14
+ ?dismissible=${dismissible}
15
+ ?open=${open}
16
+ >
17
+ ${text}
18
+ <sp-button treatment="outline" static-color="white" slot="action">
19
+ ${actionLabel}
20
+ </sp-button>
21
+ </sp-alert-banner>
22
+ `;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport { AlertBannerVariants } from '@spectrum-web-components/alert-banner';\nimport '@spectrum-web-components/alert-banner/sp-alert-banner.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nexport const AlertBannerMarkup = ({\n text = 'Your trial has expired',\n variant = 'neutral',\n dismissible = true,\n open = false,\n actionLabel = 'Action',\n}): TemplateResult => html`\n <sp-alert-banner\n variant=${variant as AlertBannerVariants}\n ?dismissible=${dismissible}\n ?open=${open}\n >\n ${text}\n <sp-button treatment=\"outline\" static-color=\"white\" slot=\"action\">\n ${actionLabel}\n </sp-button>\n </sp-alert-banner>\n`;\n"],
5
+ "mappings": ";AAYA,SAAS,YAA4B;AAGrC,OAAO;AACP,OAAO;AAEA,aAAM,oBAAoB,CAAC;AAAA,EAC9B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP,cAAc;AAClB,MAAsB;AAAA;AAAA,kBAEJ,OAA8B;AAAA,uBACzB,WAAW;AAAA,gBAClB,IAAI;AAAA;AAAA,UAEV,IAAI;AAAA;AAAA,cAEA,WAAW;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ import { AlertBannerMarkup } from "./";
3
+ export const Template = AlertBannerMarkup;
4
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["template.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*/\n\nimport { AlertBannerMarkup } from './';\n\nexport const Template = AlertBannerMarkup;\n"],
5
+ "mappings": ";AAYA,SAAS,yBAAyB;AAE3B,aAAM,WAAW;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import Props, { Default } from "../stories/alert-banner.stories.js";
3
+ import { testForMemoryLeaks } from "../../../test/testing-helpers.js";
4
+ testForMemoryLeaks(Default(Props.args));
5
+ //# sourceMappingURL=alert-banner-memory.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner-memory.test.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*/\n\nimport Props, { Default } from '../stories/alert-banner.stories.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(Default(Props.args));\n"],
5
+ "mappings": ";AAYA,OAAO,SAAS,eAAe;AAC/B,SAAS,0BAA0B;AAEnC,mBAAmB,QAAQ,MAAM,IAAI,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import * as stories from "../stories/alert-banner.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("AlertBannerStories", stories);
5
+ //# sourceMappingURL=alert-banner.test-vrt.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner.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/alert-banner.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('AlertBannerStories', stories as unknown as TestsType);\n"],
5
+ "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,sBAAsB,OAA+B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import { sendKeys } from "@web/test-runner-commands";
4
+ import { spy, stub } from "sinon";
5
+ import "@spectrum-web-components/alert-banner/sp-alert-banner.js";
6
+ import "@spectrum-web-components/button/sp-button.js";
7
+ import {
8
+ escapeEvent,
9
+ testForLitDevWarnings
10
+ } from "../../../test/testing-helpers.js";
11
+ describe("AlertBanner", () => {
12
+ testForLitDevWarnings(
13
+ async () => await fixture(html`
14
+ <sp-alert-banner>Your trial will expire soon</sp-alert-banner>
15
+ `)
16
+ );
17
+ it("loads default alert-banner accessibly", async () => {
18
+ const el = await fixture(html`
19
+ <sp-alert-banner open>Your trial will expire soon</sp-alert-banner>
20
+ `);
21
+ await elementUpdated(el);
22
+ await expect(el).to.be.accessible();
23
+ });
24
+ it("accepts variants", async () => {
25
+ const el = await fixture(html`
26
+ <sp-alert-banner open variant="info">
27
+ Your trial will expire soon
28
+ </sp-alert-banner>
29
+ `);
30
+ await elementUpdated(el);
31
+ expect(el.getAttribute("variant")).to.equal("info");
32
+ expect(el.shadowRoot.querySelector("sp-icon-info")).to.exist;
33
+ el.variant = "negative";
34
+ await elementUpdated(el);
35
+ expect(el.getAttribute("variant")).to.equal("negative");
36
+ expect(el.shadowRoot.querySelector("sp-icon-alert")).to.exist;
37
+ });
38
+ it("removes variant attribute when given invalid variant", async () => {
39
+ const el = await fixture(html`
40
+ <sp-alert-banner open variant="inexistent">
41
+ Your trial will expire soon
42
+ </sp-alert-banner>
43
+ `);
44
+ await elementUpdated(el);
45
+ expect(el.getAttribute("variant")).to.be.null;
46
+ });
47
+ it("calls corresponding handler using Space or Enter key for actionable alerts", async () => {
48
+ const actionSpy = spy();
49
+ const el = await fixture(html`
50
+ <sp-alert-banner open>
51
+ Your trial will expire soon
52
+ <sp-button slot="action" @click=${() => actionSpy()}>
53
+ Buy now
54
+ </sp-button>
55
+ </sp-alert-banner>
56
+ `);
57
+ await elementUpdated(el);
58
+ const buttonEl = el.querySelector("sp-button");
59
+ expect(buttonEl).to.exist;
60
+ buttonEl == null ? void 0 : buttonEl.focus();
61
+ await sendKeys({ press: "Enter" });
62
+ await elementUpdated(el);
63
+ expect(actionSpy).to.be.calledOnce;
64
+ buttonEl == null ? void 0 : buttonEl.focus();
65
+ await sendKeys({ press: "Space" });
66
+ await elementUpdated(el);
67
+ expect(actionSpy).to.be.calledTwice;
68
+ });
69
+ describe("dismiss behavior", () => {
70
+ it("can be dismissed by clicking the close button", async () => {
71
+ const el = await fixture(html`
72
+ <sp-alert-banner open dismissible>
73
+ Your trial will expire soon
74
+ </sp-alert-banner>
75
+ `);
76
+ await elementUpdated(el);
77
+ const closeButton = el.shadowRoot.querySelector("sp-close-button");
78
+ expect(closeButton).to.exist;
79
+ expect(el.open).to.be.true;
80
+ closeButton == null ? void 0 : closeButton.click();
81
+ await elementUpdated(el);
82
+ expect(el.open).to.be.false;
83
+ });
84
+ it("can be dismissed using close button", async () => {
85
+ const el = await fixture(html`
86
+ <sp-alert-banner open>
87
+ Your trial will expire soon
88
+ </sp-alert-banner>
89
+ `);
90
+ await elementUpdated(el);
91
+ const closeButton = el.shadowRoot.querySelector("sp-close-button");
92
+ expect(closeButton).to.not.exist;
93
+ expect(el.open).to.be.true;
94
+ el.close();
95
+ await elementUpdated(el);
96
+ expect(el.open).to.be.false;
97
+ });
98
+ it("prevent close", async () => {
99
+ const closeSpy = spy();
100
+ const el = await fixture(html`
101
+ <sp-alert-banner
102
+ open
103
+ dismissible
104
+ @close=${(event) => {
105
+ event.preventDefault();
106
+ closeSpy();
107
+ }}
108
+ >
109
+ Your trial will expire soon
110
+ </sp-alert-banner>
111
+ `);
112
+ await elementUpdated(el);
113
+ const closeButton = el.shadowRoot.querySelector("sp-close-button");
114
+ expect(el.open).to.be.true;
115
+ closeButton == null ? void 0 : closeButton.click();
116
+ await elementUpdated(el);
117
+ expect(el.open).to.be.true;
118
+ expect(closeSpy).to.be.calledOnce;
119
+ });
120
+ it("can be closed using Escape key", async () => {
121
+ const closeSpy = spy();
122
+ const el = await fixture(html`
123
+ <sp-alert-banner open dismissible @close=${() => closeSpy()}>
124
+ Your trial will expire soon
125
+ </sp-alert-banner>
126
+ `);
127
+ await elementUpdated(el);
128
+ expect(el.open).to.be.true;
129
+ el.dispatchEvent(escapeEvent());
130
+ await elementUpdated(el);
131
+ expect(el.open).to.be.false;
132
+ expect(closeSpy).to.be.calledOnce;
133
+ });
134
+ });
135
+ describe("dev mode", () => {
136
+ let consoleStub;
137
+ before(() => {
138
+ window.__swc.verbose = true;
139
+ consoleStub = stub(console, "warn");
140
+ });
141
+ after(() => {
142
+ window.__swc.verbose = false;
143
+ consoleStub.restore();
144
+ });
145
+ it("should log dev warning when given invalid variant", async () => {
146
+ const el = await fixture(html`
147
+ <sp-alert-banner open variant="inexistent">
148
+ Your trial will expire soon
149
+ </sp-alert-banner>
150
+ `);
151
+ await elementUpdated(el);
152
+ const warning = consoleStub.getCall(0).args.at(0);
153
+ const expectedContent = `<sp-alert-banner> element expects the "variant" attribute to be one of the following`;
154
+ expect(consoleStub).to.be.calledOnce;
155
+ expect(warning.includes(expectedContent)).to.be.true;
156
+ expect(warning.includes("neutral")).to.be.true;
157
+ expect(warning.includes("info")).to.be.true;
158
+ expect(warning.includes("negative")).to.be.true;
159
+ });
160
+ });
161
+ });
162
+ //# sourceMappingURL=alert-banner.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["alert-banner.test.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 { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { SinonStub, spy, stub } from 'sinon';\n\nimport '@spectrum-web-components/alert-banner/sp-alert-banner.js';\nimport '@spectrum-web-components/button/sp-button.js';\nimport { AlertBanner } from '@spectrum-web-components/alert-banner';\nimport {\n escapeEvent,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\n\ndescribe('AlertBanner', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<AlertBanner>(html`\n <sp-alert-banner>Your trial will expire soon</sp-alert-banner>\n `)\n );\n it('loads default alert-banner accessibly', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open>Your trial will expire soon</sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('accepts variants', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open variant=\"info\">\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('variant')).to.equal('info');\n expect(el.shadowRoot.querySelector('sp-icon-info')).to.exist;\n\n el.variant = 'negative';\n await elementUpdated(el);\n\n expect(el.getAttribute('variant')).to.equal('negative');\n expect(el.shadowRoot.querySelector('sp-icon-alert')).to.exist;\n });\n it('removes variant attribute when given invalid variant', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open variant=\"inexistent\">\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('variant')).to.be.null;\n });\n it('calls corresponding handler using Space or Enter key for actionable alerts', async () => {\n const actionSpy = spy();\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open>\n Your trial will expire soon\n <sp-button slot=\"action\" @click=${() => actionSpy()}>\n Buy now\n </sp-button>\n </sp-alert-banner>\n `);\n await elementUpdated(el);\n\n const buttonEl = el.querySelector('sp-button');\n expect(buttonEl).to.exist;\n\n buttonEl?.focus();\n await sendKeys({ press: 'Enter' });\n await elementUpdated(el);\n\n expect(actionSpy).to.be.calledOnce;\n\n buttonEl?.focus();\n await sendKeys({ press: 'Space' });\n await elementUpdated(el);\n\n expect(actionSpy).to.be.calledTwice;\n });\n\n describe('dismiss behavior', () => {\n it('can be dismissed by clicking the close button', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open dismissible>\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n const closeButton = el.shadowRoot.querySelector('sp-close-button');\n\n expect(closeButton).to.exist;\n expect(el.open).to.be.true;\n\n closeButton?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n it('can be dismissed using close button', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open>\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n const closeButton = el.shadowRoot.querySelector('sp-close-button');\n\n expect(closeButton).to.not.exist;\n expect(el.open).to.be.true;\n\n el.close();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n it('prevent close', async () => {\n const closeSpy = spy();\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner\n open\n dismissible\n @close=${(event: CustomEvent) => {\n event.preventDefault();\n closeSpy();\n }}\n >\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n const closeButton = el.shadowRoot.querySelector('sp-close-button');\n expect(el.open).to.be.true;\n\n closeButton?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n expect(closeSpy).to.be.calledOnce;\n });\n it('can be closed using Escape key', async () => {\n const closeSpy = spy();\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open dismissible @close=${() => closeSpy()}>\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n\n el.dispatchEvent(escapeEvent());\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n expect(closeSpy).to.be.calledOnce;\n });\n });\n\n describe('dev mode', () => {\n let consoleStub: SinonStub;\n before(() => {\n window.__swc.verbose = true;\n consoleStub = stub(console, 'warn');\n });\n\n after(() => {\n window.__swc.verbose = false;\n consoleStub.restore();\n });\n\n it('should log dev warning when given invalid variant', async () => {\n const el = await fixture<AlertBanner>(html`\n <sp-alert-banner open variant=\"inexistent\">\n Your trial will expire soon\n </sp-alert-banner>\n `);\n\n await elementUpdated(el);\n\n const warning = consoleStub.getCall(0).args.at(0);\n const expectedContent = `<sp-alert-banner> element expects the \"variant\" attribute to be one of the following`;\n\n expect(consoleStub).to.be.calledOnce;\n expect(warning.includes(expectedContent)).to.be.true;\n expect(warning.includes('neutral')).to.be.true;\n expect(warning.includes('info')).to.be.true;\n expect(warning.includes('negative')).to.be.true;\n });\n });\n});\n"],
5
+ "mappings": ";AAWA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AACtD,SAAS,gBAAgB;AACzB,SAAoB,KAAK,YAAY;AAErC,OAAO;AACP,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,SAAS,eAAe,MAAM;AAC1B;AAAA,IACI,YACI,MAAM,QAAqB;AAAA;AAAA,aAE1B;AAAA,EACT;AACA,KAAG,yCAAyC,YAAY;AACpD,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA,SAErC;AAED,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,oBAAoB,YAAY;AAC/B,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,SAIrC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,MAAM;AAClD,WAAO,GAAG,WAAW,cAAc,cAAc,CAAC,EAAE,GAAG;AAEvD,OAAG,UAAU;AACb,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,UAAU;AACtD,WAAO,GAAG,WAAW,cAAc,eAAe,CAAC,EAAE,GAAG;AAAA,EAC5D,CAAC;AACD,KAAG,wDAAwD,YAAY;AACnE,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,SAIrC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,GAAG;AAAA,EAC7C,CAAC;AACD,KAAG,8EAA8E,YAAY;AACzF,UAAM,YAAY,IAAI;AACtB,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA,kDAGI,MAAM,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA,SAI1D;AACD,UAAM,eAAe,EAAE;AAEvB,UAAM,WAAW,GAAG,cAAc,WAAW;AAC7C,WAAO,QAAQ,EAAE,GAAG;AAEpB,yCAAU;AACV,UAAM,SAAS,EAAE,OAAO,QAAQ,CAAC;AACjC,UAAM,eAAe,EAAE;AAEvB,WAAO,SAAS,EAAE,GAAG,GAAG;AAExB,yCAAU;AACV,UAAM,SAAS,EAAE,OAAO,QAAQ,CAAC;AACjC,UAAM,eAAe,EAAE;AAEvB,WAAO,SAAS,EAAE,GAAG,GAAG;AAAA,EAC5B,CAAC;AAED,WAAS,oBAAoB,MAAM;AAC/B,OAAG,iDAAiD,YAAY;AAC5D,YAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,aAIrC;AAED,YAAM,eAAe,EAAE;AAEvB,YAAM,cAAc,GAAG,WAAW,cAAc,iBAAiB;AAEjE,aAAO,WAAW,EAAE,GAAG;AACvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,iDAAa;AACb,YAAM,eAAe,EAAE;AAEvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAAA,IAC1B,CAAC;AACD,OAAG,uCAAuC,YAAY;AAClD,YAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,aAIrC;AAED,YAAM,eAAe,EAAE;AAEvB,YAAM,cAAc,GAAG,WAAW,cAAc,iBAAiB;AAEjE,aAAO,WAAW,EAAE,GAAG,IAAI;AAC3B,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,SAAG,MAAM;AACT,YAAM,eAAe,EAAE;AAEvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAAA,IAC1B,CAAC;AACD,OAAG,iBAAiB,YAAY;AAC5B,YAAM,WAAW,IAAI;AACrB,YAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,6BAIrB,CAAC,UAAuB;AAC7B,cAAM,eAAe;AACrB,iBAAS;AAAA,MACb,CAAC;AAAA;AAAA;AAAA;AAAA,aAIR;AAED,YAAM,eAAe,EAAE;AAEvB,YAAM,cAAc,GAAG,WAAW,cAAc,iBAAiB;AACjE,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,iDAAa;AACb,YAAM,eAAe,EAAE;AAEvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AACtB,aAAO,QAAQ,EAAE,GAAG,GAAG;AAAA,IAC3B,CAAC;AACD,OAAG,kCAAkC,YAAY;AAC7C,YAAM,WAAW,IAAI;AACrB,YAAM,KAAK,MAAM,QAAqB;AAAA,2DACS,MAAM,SAAS,CAAC;AAAA;AAAA;AAAA,aAG9D;AAED,YAAM,eAAe,EAAE;AACvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AAEtB,SAAG,cAAc,YAAY,CAAC;AAC9B,YAAM,eAAe,EAAE;AAEvB,aAAO,GAAG,IAAI,EAAE,GAAG,GAAG;AACtB,aAAO,QAAQ,EAAE,GAAG,GAAG;AAAA,IAC3B,CAAC;AAAA,EACL,CAAC;AAED,WAAS,YAAY,MAAM;AACvB,QAAI;AACJ,WAAO,MAAM;AACT,aAAO,MAAM,UAAU;AACvB,oBAAc,KAAK,SAAS,MAAM;AAAA,IACtC,CAAC;AAED,UAAM,MAAM;AACR,aAAO,MAAM,UAAU;AACvB,kBAAY,QAAQ;AAAA,IACxB,CAAC;AAED,OAAG,qDAAqD,YAAY;AAChE,YAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA,aAIrC;AAED,YAAM,eAAe,EAAE;AAEvB,YAAM,UAAU,YAAY,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC;AAChD,YAAM,kBAAkB;AAExB,aAAO,WAAW,EAAE,GAAG,GAAG;AAC1B,aAAO,QAAQ,SAAS,eAAe,CAAC,EAAE,GAAG,GAAG;AAChD,aAAO,QAAQ,SAAS,SAAS,CAAC,EAAE,GAAG,GAAG;AAC1C,aAAO,QAAQ,SAAS,MAAM,CAAC,EAAE,GAAG,GAAG;AACvC,aAAO,QAAQ,SAAS,UAAU,CAAC,EAAE,GAAG,GAAG;AAAA,IAC/C,CAAC;AAAA,EACL,CAAC;AACL,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ import "@spectrum-web-components/alert-banner/sp-alert-banner.js";
3
+ import { html } from "@spectrum-web-components/base";
4
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
5
+ measureFixtureCreation(html`
6
+ <sp-alert-banner open>Sample content</sp-alert-banner>
7
+ `);
8
+ //# sourceMappingURL=basic-test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["basic-test.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 '@spectrum-web-components/alert-banner/sp-alert-banner.js';\nimport { html } from '@spectrum-web-components/base';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-alert-banner open>Sample content</sp-alert-banner>\n`);\n"],
5
+ "mappings": ";AAWA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA,CAEtB;",
6
+ "names": []
7
+ }