@spectrum-web-components/dialog 0.49.0 → 0.50.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/dialog",
3
- "version": "0.49.0",
3
+ "version": "0.50.0-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -73,15 +73,15 @@
73
73
  "lit-html"
74
74
  ],
75
75
  "dependencies": {
76
- "@spectrum-web-components/alert-dialog": "^0.49.0",
77
- "@spectrum-web-components/base": "^0.49.0",
78
- "@spectrum-web-components/button": "^0.49.0",
79
- "@spectrum-web-components/button-group": "^0.49.0",
80
- "@spectrum-web-components/divider": "^0.49.0",
81
- "@spectrum-web-components/icons-workflow": "^0.49.0",
82
- "@spectrum-web-components/modal": "^0.49.0",
83
- "@spectrum-web-components/shared": "^0.49.0",
84
- "@spectrum-web-components/underlay": "^0.49.0"
76
+ "@spectrum-web-components/alert-dialog": "^0.50.0-beta.1",
77
+ "@spectrum-web-components/base": "^0.50.0-beta.1",
78
+ "@spectrum-web-components/button": "^0.50.0-beta.1",
79
+ "@spectrum-web-components/button-group": "^0.50.0-beta.1",
80
+ "@spectrum-web-components/divider": "^0.50.0-beta.1",
81
+ "@spectrum-web-components/icons-workflow": "^0.50.0-beta.1",
82
+ "@spectrum-web-components/modal": "^0.50.0-beta.1",
83
+ "@spectrum-web-components/shared": "^0.50.0-beta.1",
84
+ "@spectrum-web-components/underlay": "^0.50.0-beta.1"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@spectrum-css/dialog": "^10.1.2"
@@ -92,5 +92,5 @@
92
92
  "./sp-*.js",
93
93
  "./**/*.dev.js"
94
94
  ],
95
- "gitHead": "088e84caa1e2f723d735b011608ca0a3411e2149"
95
+ "gitHead": "b0ffab750c03ed7c7ad4436954c437b82235b403"
96
96
  }
package/src/Dialog.d.ts CHANGED
@@ -22,6 +22,9 @@ declare const Dialog_base: typeof AlertDialog & {
22
22
  export declare class Dialog extends Dialog_base {
23
23
  static get styles(): CSSResultArray;
24
24
  closeButton?: CloseButton;
25
+ /**
26
+ * @deprecated Use the Alert Dialog component with `variant="error"` instead.
27
+ */
25
28
  error: boolean;
26
29
  dismissable: boolean;
27
30
  dismissLabel: string;
@@ -39,5 +42,6 @@ export declare class Dialog extends Dialog_base {
39
42
  protected render(): TemplateResult;
40
43
  protected shouldUpdate(changes: PropertyValues): boolean;
41
44
  protected firstUpdated(changes: PropertyValues): void;
45
+ protected updated(changes: PropertyValues): void;
42
46
  }
43
47
  export {};
package/src/Dialog.dev.js CHANGED
@@ -123,6 +123,19 @@ export class Dialog extends ObserveSlotPresence(AlertDialog, [
123
123
  super.firstUpdated(changes);
124
124
  this.setAttribute("role", "dialog");
125
125
  }
126
+ updated(changes) {
127
+ super.updated(changes);
128
+ if (changes.has("error") && (this.error !== void 0 || changes.get("error") !== void 0)) {
129
+ if (true) {
130
+ window.__swc.warn(
131
+ this,
132
+ `The "error" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the "variant='error'" instead. "error" will be removed in a future release.`,
133
+ "https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error",
134
+ { level: "deprecation" }
135
+ );
136
+ }
137
+ }
138
+ }
126
139
  }
127
140
  __decorateClass([
128
141
  query(".close-button")
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Dialog.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/divider/sp-divider.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\nimport { ObserveSlotPresence } from '@spectrum-web-components/shared';\n\nimport styles from './dialog.css.js';\nimport type { CloseButton } from '@spectrum-web-components/button';\nimport { AlertDialog } from '@spectrum-web-components/alert-dialog/src/AlertDialog.js';\nimport { classMap } from '@spectrum-web-components/base/src/directives.js';\n\n/**\n * @element sp-dialog\n *\n * @slot hero - Accepts a hero image to display at the top of the dialog\n * @slot heading - Acts as the heading of the dialog. This should be an actual heading tag `<h1-6 />`\n * @slot - Content not addressed to a specific slot will be interpreted as the main content of the dialog\n * @slot footer - Content addressed to the `footer` will be placed below the main content and to the side of any `[slot='button']` content\n * @slot button - Button elements addressed to this slot may be placed below the content when not delivered in a fullscreen mode\n * @fires close - Announces that the dialog has been closed.\n */\nexport class Dialog extends ObserveSlotPresence(AlertDialog, [\n '[slot=\"hero\"]',\n '[slot=\"footer\"]',\n '[slot=\"button\"]',\n]) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @query('.close-button')\n closeButton?: CloseButton;\n\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ type: Boolean, reflect: true })\n public dismissable = false;\n\n @property({ type: String, reflect: true, attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n protected get hasFooter(): boolean {\n return this.getSlotContentPresence('[slot=\"footer\"]');\n }\n\n protected get hasButtons(): boolean {\n return this.getSlotContentPresence('[slot=\"button\"]');\n }\n\n /* c8 ignore next 3 */\n protected get hasHero(): boolean {\n return this.getSlotContentPresence('[slot=\"hero\"]');\n }\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public mode?: 'fullscreen' | 'fullscreenTakeover';\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n public close(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n }\n\n protected renderHero(): TemplateResult {\n return html`\n <slot name=\"hero\"></slot>\n `;\n }\n\n protected renderFooter(): TemplateResult {\n return html`\n <div class=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n protected override renderButtons(): TemplateResult {\n const classes = {\n 'button-group': true,\n 'button-group--noFooter': !this.hasFooter,\n };\n return html`\n <sp-button-group class=${classMap(classes)}>\n <slot name=\"button\"></slot>\n </sp-button-group>\n `;\n }\n\n protected renderDismiss(): TemplateResult {\n return html`\n <sp-close-button\n class=\"close-button\"\n label=${this.dismissLabel}\n quiet\n size=\"m\"\n @click=${this.close}\n ></sp-close-button>\n `;\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"grid\">\n ${this.renderHero()} ${this.renderHeading()}\n ${this.error\n ? html`\n <sp-icon-alert class=\"type-icon\"></sp-icon-alert>\n `\n : nothing}\n ${this.noDivider\n ? nothing\n : html`\n <sp-divider size=\"m\" class=\"divider\"></sp-divider>\n `}\n ${this.renderContent()}\n ${this.hasFooter ? this.renderFooter() : nothing}\n ${this.hasButtons ? this.renderButtons() : nothing}\n ${this.dismissable ? this.renderDismiss() : nothing}\n </div>\n `;\n }\n\n protected override shouldUpdate(changes: PropertyValues): boolean {\n if (changes.has('mode') && !!this.mode) {\n this.dismissable = false;\n }\n if (changes.has('dismissable') && this.dismissable) {\n this.dismissable = !this.mode;\n }\n return super.shouldUpdate(changes);\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'dialog');\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP;AAAA,EACI;AAAA,EACA;AAA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KAAK,CAAC;AAAA,GAxChC,OAyCF;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/divider/sp-divider.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\nimport { ObserveSlotPresence } from '@spectrum-web-components/shared';\n\nimport styles from './dialog.css.js';\nimport type { CloseButton } from '@spectrum-web-components/button';\nimport { AlertDialog } from '@spectrum-web-components/alert-dialog/src/AlertDialog.js';\nimport { classMap } from '@spectrum-web-components/base/src/directives.js';\n\n/**\n * @element sp-dialog\n *\n * @slot hero - Accepts a hero image to display at the top of the dialog\n * @slot heading - Acts as the heading of the dialog. This should be an actual heading tag `<h1-6 />`\n * @slot - Content not addressed to a specific slot will be interpreted as the main content of the dialog\n * @slot footer - Content addressed to the `footer` will be placed below the main content and to the side of any `[slot='button']` content\n * @slot button - Button elements addressed to this slot may be placed below the content when not delivered in a fullscreen mode\n * @fires close - Announces that the dialog has been closed.\n */\nexport class Dialog extends ObserveSlotPresence(AlertDialog, [\n '[slot=\"hero\"]',\n '[slot=\"footer\"]',\n '[slot=\"button\"]',\n]) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @query('.close-button')\n closeButton?: CloseButton;\n\n /**\n * @deprecated Use the Alert Dialog component with `variant=\"error\"` instead.\n */\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ type: Boolean, reflect: true })\n public dismissable = false;\n\n @property({ type: String, reflect: true, attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n protected get hasFooter(): boolean {\n return this.getSlotContentPresence('[slot=\"footer\"]');\n }\n\n protected get hasButtons(): boolean {\n return this.getSlotContentPresence('[slot=\"button\"]');\n }\n\n /* c8 ignore next 3 */\n protected get hasHero(): boolean {\n return this.getSlotContentPresence('[slot=\"hero\"]');\n }\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public mode?: 'fullscreen' | 'fullscreenTakeover';\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n public close(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n }\n\n protected renderHero(): TemplateResult {\n return html`\n <slot name=\"hero\"></slot>\n `;\n }\n\n protected renderFooter(): TemplateResult {\n return html`\n <div class=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n protected override renderButtons(): TemplateResult {\n const classes = {\n 'button-group': true,\n 'button-group--noFooter': !this.hasFooter,\n };\n return html`\n <sp-button-group class=${classMap(classes)}>\n <slot name=\"button\"></slot>\n </sp-button-group>\n `;\n }\n\n protected renderDismiss(): TemplateResult {\n return html`\n <sp-close-button\n class=\"close-button\"\n label=${this.dismissLabel}\n quiet\n size=\"m\"\n @click=${this.close}\n ></sp-close-button>\n `;\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"grid\">\n ${this.renderHero()} ${this.renderHeading()}\n ${this.error\n ? html`\n <sp-icon-alert class=\"type-icon\"></sp-icon-alert>\n `\n : nothing}\n ${this.noDivider\n ? nothing\n : html`\n <sp-divider size=\"m\" class=\"divider\"></sp-divider>\n `}\n ${this.renderContent()}\n ${this.hasFooter ? this.renderFooter() : nothing}\n ${this.hasButtons ? this.renderButtons() : nothing}\n ${this.dismissable ? this.renderDismiss() : nothing}\n </div>\n `;\n }\n\n protected override shouldUpdate(changes: PropertyValues): boolean {\n if (changes.has('mode') && !!this.mode) {\n this.dismissable = false;\n }\n if (changes.has('dismissable') && this.dismissable) {\n this.dismissable = !this.mode;\n }\n return super.shouldUpdate(changes);\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'dialog');\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (\n changes.has('error') &&\n (this.error !== undefined || changes.get('error') !== undefined)\n ) {\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"error\" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the \"variant='error'\" instead. \"error\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error',\n { level: 'deprecation' }\n );\n }\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,SAAS,2BAA2B;AAEpC,OAAO,YAAY;AAEnB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAYlB,aAAM,eAAe,oBAAoB,aAAa;AAAA,EACzD;AAAA,EACA;AAAA,EACA;AACJ,CAAC,EAAE;AAAA,EAJI;AAAA;AAgBH,SAAO,QAAQ;AAGf,SAAO,cAAc;AAGrB,SAAO,eAAe;AAgBtB,SAAO,YAAY;AAAA;AAAA,EAjCnB,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAiBA,IAAc,YAAqB;AAC/B,WAAO,KAAK,uBAAuB,iBAAiB;AAAA,EACxD;AAAA,EAEA,IAAc,aAAsB;AAChC,WAAO,KAAK,uBAAuB,iBAAiB;AAAA,EACxD;AAAA;AAAA,EAG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,KAAK;AAAA,IAC7B;AACA,WAAO,MAAM,aAAa,OAAO;AAAA,EACrC;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,SAAK,aAAa,QAAQ,QAAQ;AAAA,EACtC;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,QACI,QAAQ,IAAI,OAAO,MAClB,KAAK,UAAU,UAAa,QAAQ,IAAI,OAAO,MAAM,SACxD;AACE,UAAI,MAAoB;AACpB,eAAO,MAAM;AAAA,UACT;AAAA,UACA,6BAA6B,KAAK,SAAS;AAAA,UAC3C;AAAA,UACA,EAAE,OAAO,cAAc;AAAA,QAC3B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AAzII;AAAA,EADC,MAAM,eAAe;AAAA,GATb,OAUT;AAMO;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAfjC,OAgBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAlBjC,OAmBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,gBAAgB,CAAC;AAAA,GArB5D,OAsBF;AAgBA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa,CAAC;AAAA,GArC1D,OAsCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAxChC,OAyCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA3ChC,OA4CF;",
6
6
  "names": []
7
7
  }
package/src/Dialog.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=(u,i,e,n)=>{for(var r=n>1?void 0:n?c(i,e):i,p=u.length-1,d;p>=0;p--)(d=u[p])&&(r=(n?d(i,e,r):d(r))||r);return n&&r&&a(i,e,r),r};import{html as s,nothing as l}from"@spectrum-web-components/base";import{property as o,query as m}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/divider/sp-divider.js";import"@spectrum-web-components/button/sp-close-button.js";import"@spectrum-web-components/button-group/sp-button-group.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js";import{ObserveSlotPresence as b}from"@spectrum-web-components/shared";import h from"./dialog.css.js";import{AlertDialog as f}from"@spectrum-web-components/alert-dialog/src/AlertDialog.js";import{classMap as v}from"@spectrum-web-components/base/src/directives.js";export class Dialog extends b(f,['[slot="hero"]','[slot="footer"]','[slot="button"]']){constructor(){super(...arguments);this.error=!1;this.dismissable=!1;this.dismissLabel="Close";this.noDivider=!1}static get styles(){return[h]}get hasFooter(){return this.getSlotContentPresence('[slot="footer"]')}get hasButtons(){return this.getSlotContentPresence('[slot="button"]')}get hasHero(){return this.getSlotContentPresence('[slot="hero"]')}close(){this.dispatchEvent(new Event("close",{bubbles:!0,composed:!0,cancelable:!0}))}renderHero(){return s`
1
+ "use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=(d,i,e,n)=>{for(var r=n>1?void 0:n?c(i,e):i,u=d.length-1,p;u>=0;u--)(p=d[u])&&(r=(n?p(i,e,r):p(r))||r);return n&&r&&a(i,e,r),r};import{html as o,nothing as l}from"@spectrum-web-components/base";import{property as s,query as m}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/divider/sp-divider.js";import"@spectrum-web-components/button/sp-close-button.js";import"@spectrum-web-components/button-group/sp-button-group.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js";import{ObserveSlotPresence as b}from"@spectrum-web-components/shared";import h from"./dialog.css.js";import{AlertDialog as f}from"@spectrum-web-components/alert-dialog/src/AlertDialog.js";import{classMap as v}from"@spectrum-web-components/base/src/directives.js";export class Dialog extends b(f,['[slot="hero"]','[slot="footer"]','[slot="button"]']){constructor(){super(...arguments);this.error=!1;this.dismissable=!1;this.dismissLabel="Close";this.noDivider=!1}static get styles(){return[h]}get hasFooter(){return this.getSlotContentPresence('[slot="footer"]')}get hasButtons(){return this.getSlotContentPresence('[slot="button"]')}get hasHero(){return this.getSlotContentPresence('[slot="hero"]')}close(){this.dispatchEvent(new Event("close",{bubbles:!0,composed:!0,cancelable:!0}))}renderHero(){return o`
2
2
  <slot name="hero"></slot>
3
- `}renderFooter(){return s`
3
+ `}renderFooter(){return o`
4
4
  <div class="footer">
5
5
  <slot name="footer"></slot>
6
6
  </div>
7
- `}renderButtons(){const e={"button-group":!0,"button-group--noFooter":!this.hasFooter};return s`
7
+ `}renderButtons(){const e={"button-group":!0,"button-group--noFooter":!this.hasFooter};return o`
8
8
  <sp-button-group class=${v(e)}>
9
9
  <slot name="button"></slot>
10
10
  </sp-button-group>
11
- `}renderDismiss(){return s`
11
+ `}renderDismiss(){return o`
12
12
  <sp-close-button
13
13
  class="close-button"
14
14
  label=${this.dismissLabel}
@@ -16,13 +16,13 @@
16
16
  size="m"
17
17
  @click=${this.close}
18
18
  ></sp-close-button>
19
- `}render(){return s`
19
+ `}render(){return o`
20
20
  <div class="grid">
21
21
  ${this.renderHero()} ${this.renderHeading()}
22
- ${this.error?s`
22
+ ${this.error?o`
23
23
  <sp-icon-alert class="type-icon"></sp-icon-alert>
24
24
  `:l}
25
- ${this.noDivider?l:s`
25
+ ${this.noDivider?l:o`
26
26
  <sp-divider size="m" class="divider"></sp-divider>
27
27
  `}
28
28
  ${this.renderContent()}
@@ -30,5 +30,5 @@
30
30
  ${this.hasButtons?this.renderButtons():l}
31
31
  ${this.dismissable?this.renderDismiss():l}
32
32
  </div>
33
- `}shouldUpdate(e){return e.has("mode")&&this.mode&&(this.dismissable=!1),e.has("dismissable")&&this.dismissable&&(this.dismissable=!this.mode),super.shouldUpdate(e)}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","dialog")}}t([m(".close-button")],Dialog.prototype,"closeButton",2),t([o({type:Boolean,reflect:!0})],Dialog.prototype,"error",2),t([o({type:Boolean,reflect:!0})],Dialog.prototype,"dismissable",2),t([o({type:String,reflect:!0,attribute:"dismiss-label"})],Dialog.prototype,"dismissLabel",2),t([o({type:Boolean,reflect:!0,attribute:"no-divider"})],Dialog.prototype,"noDivider",2),t([o({type:String,reflect:!0})],Dialog.prototype,"mode",2),t([o({type:String,reflect:!0})],Dialog.prototype,"size",2);
33
+ `}shouldUpdate(e){return e.has("mode")&&this.mode&&(this.dismissable=!1),e.has("dismissable")&&this.dismissable&&(this.dismissable=!this.mode),super.shouldUpdate(e)}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","dialog")}updated(e){super.updated(e),e.has("error")&&(this.error!==void 0||e.get("error"))}}t([m(".close-button")],Dialog.prototype,"closeButton",2),t([s({type:Boolean,reflect:!0})],Dialog.prototype,"error",2),t([s({type:Boolean,reflect:!0})],Dialog.prototype,"dismissable",2),t([s({type:String,reflect:!0,attribute:"dismiss-label"})],Dialog.prototype,"dismissLabel",2),t([s({type:Boolean,reflect:!0,attribute:"no-divider"})],Dialog.prototype,"noDivider",2),t([s({type:String,reflect:!0})],Dialog.prototype,"mode",2),t([s({type:String,reflect:!0})],Dialog.prototype,"size",2);
34
34
  //# sourceMappingURL=Dialog.js.map
package/src/Dialog.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Dialog.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/divider/sp-divider.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\nimport { ObserveSlotPresence } from '@spectrum-web-components/shared';\n\nimport styles from './dialog.css.js';\nimport type { CloseButton } from '@spectrum-web-components/button';\nimport { AlertDialog } from '@spectrum-web-components/alert-dialog/src/AlertDialog.js';\nimport { classMap } from '@spectrum-web-components/base/src/directives.js';\n\n/**\n * @element sp-dialog\n *\n * @slot hero - Accepts a hero image to display at the top of the dialog\n * @slot heading - Acts as the heading of the dialog. This should be an actual heading tag `<h1-6 />`\n * @slot - Content not addressed to a specific slot will be interpreted as the main content of the dialog\n * @slot footer - Content addressed to the `footer` will be placed below the main content and to the side of any `[slot='button']` content\n * @slot button - Button elements addressed to this slot may be placed below the content when not delivered in a fullscreen mode\n * @fires close - Announces that the dialog has been closed.\n */\nexport class Dialog extends ObserveSlotPresence(AlertDialog, [\n '[slot=\"hero\"]',\n '[slot=\"footer\"]',\n '[slot=\"button\"]',\n]) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @query('.close-button')\n closeButton?: CloseButton;\n\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ type: Boolean, reflect: true })\n public dismissable = false;\n\n @property({ type: String, reflect: true, attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n protected get hasFooter(): boolean {\n return this.getSlotContentPresence('[slot=\"footer\"]');\n }\n\n protected get hasButtons(): boolean {\n return this.getSlotContentPresence('[slot=\"button\"]');\n }\n\n /* c8 ignore next 3 */\n protected get hasHero(): boolean {\n return this.getSlotContentPresence('[slot=\"hero\"]');\n }\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public mode?: 'fullscreen' | 'fullscreenTakeover';\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n public close(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n }\n\n protected renderHero(): TemplateResult {\n return html`\n <slot name=\"hero\"></slot>\n `;\n }\n\n protected renderFooter(): TemplateResult {\n return html`\n <div class=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n protected override renderButtons(): TemplateResult {\n const classes = {\n 'button-group': true,\n 'button-group--noFooter': !this.hasFooter,\n };\n return html`\n <sp-button-group class=${classMap(classes)}>\n <slot name=\"button\"></slot>\n </sp-button-group>\n `;\n }\n\n protected renderDismiss(): TemplateResult {\n return html`\n <sp-close-button\n class=\"close-button\"\n label=${this.dismissLabel}\n quiet\n size=\"m\"\n @click=${this.close}\n ></sp-close-button>\n `;\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"grid\">\n ${this.renderHero()} ${this.renderHeading()}\n ${this.error\n ? html`\n <sp-icon-alert class=\"type-icon\"></sp-icon-alert>\n `\n : nothing}\n ${this.noDivider\n ? nothing\n : html`\n <sp-divider size=\"m\" class=\"divider\"></sp-divider>\n `}\n ${this.renderContent()}\n ${this.hasFooter ? this.renderFooter() : nothing}\n ${this.hasButtons ? this.renderButtons() : nothing}\n ${this.dismissable ? this.renderDismiss() : nothing}\n </div>\n `;\n }\n\n protected override shouldUpdate(changes: PropertyValues): boolean {\n if (changes.has('mode') && !!this.mode) {\n this.dismissable = false;\n }\n if (changes.has('dismissable') && this.dismissable) {\n this.dismissable = !this.mode;\n }\n return super.shouldUpdate(changes);\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'dialog');\n }\n}\n"],
5
- "mappings": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAGG,gCACP,OACI,YAAAC,EACA,SAAAC,MACG,kDAEP,MAAO,iDACP,MAAO,qDACP,MAAO,2DACP,MAAO,iEACP,OAAS,uB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AAA,kBAC9C,KAAK,WAAa,KAAK,cAAc,EAAIA,CAAO;AAAA,kBAChD,KAAK,YAAc,KAAK,cAAc,EAAIA,CAAO;AAAA;AAAA,SAG/D,CAEmB,aAAaQ,EAAkC,CAC9D,OAAIA,EAAQ,IAAI,MAAM,GAAO,KAAK,OAC9B,KAAK,YAAc,IAEnBA,EAAQ,IAAI,aAAa,GAAK,KAAK,cACnC,KAAK,YAAc,CAAC,KAAK,MAEtB,MAAM,aAAaA,CAAO,CACrC,CAEmB,aAAaA,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EAC1B,KAAK,aAAa,OAAQ,QAAQ,CACtC,CACJ,CArHIC,EAAA,CADCP,EAAM,eAAe,GATb,OAUT,2BAGOO,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAZjC,OAaF,qBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAfjC,OAgBF,2BAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,eAAgB,CAAC,GAlB5D,OAmBF,4BAgBAQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GAlC1D,OAmCF,yBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GArChC,OAsCF,oBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAxChC,OAyCF",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/divider/sp-divider.js';\nimport '@spectrum-web-components/button/sp-close-button.js';\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\nimport { ObserveSlotPresence } from '@spectrum-web-components/shared';\n\nimport styles from './dialog.css.js';\nimport type { CloseButton } from '@spectrum-web-components/button';\nimport { AlertDialog } from '@spectrum-web-components/alert-dialog/src/AlertDialog.js';\nimport { classMap } from '@spectrum-web-components/base/src/directives.js';\n\n/**\n * @element sp-dialog\n *\n * @slot hero - Accepts a hero image to display at the top of the dialog\n * @slot heading - Acts as the heading of the dialog. This should be an actual heading tag `<h1-6 />`\n * @slot - Content not addressed to a specific slot will be interpreted as the main content of the dialog\n * @slot footer - Content addressed to the `footer` will be placed below the main content and to the side of any `[slot='button']` content\n * @slot button - Button elements addressed to this slot may be placed below the content when not delivered in a fullscreen mode\n * @fires close - Announces that the dialog has been closed.\n */\nexport class Dialog extends ObserveSlotPresence(AlertDialog, [\n '[slot=\"hero\"]',\n '[slot=\"footer\"]',\n '[slot=\"button\"]',\n]) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @query('.close-button')\n closeButton?: CloseButton;\n\n /**\n * @deprecated Use the Alert Dialog component with `variant=\"error\"` instead.\n */\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ type: Boolean, reflect: true })\n public dismissable = false;\n\n @property({ type: String, reflect: true, attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n protected get hasFooter(): boolean {\n return this.getSlotContentPresence('[slot=\"footer\"]');\n }\n\n protected get hasButtons(): boolean {\n return this.getSlotContentPresence('[slot=\"button\"]');\n }\n\n /* c8 ignore next 3 */\n protected get hasHero(): boolean {\n return this.getSlotContentPresence('[slot=\"hero\"]');\n }\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public mode?: 'fullscreen' | 'fullscreenTakeover';\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n public close(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n );\n }\n\n protected renderHero(): TemplateResult {\n return html`\n <slot name=\"hero\"></slot>\n `;\n }\n\n protected renderFooter(): TemplateResult {\n return html`\n <div class=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n protected override renderButtons(): TemplateResult {\n const classes = {\n 'button-group': true,\n 'button-group--noFooter': !this.hasFooter,\n };\n return html`\n <sp-button-group class=${classMap(classes)}>\n <slot name=\"button\"></slot>\n </sp-button-group>\n `;\n }\n\n protected renderDismiss(): TemplateResult {\n return html`\n <sp-close-button\n class=\"close-button\"\n label=${this.dismissLabel}\n quiet\n size=\"m\"\n @click=${this.close}\n ></sp-close-button>\n `;\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"grid\">\n ${this.renderHero()} ${this.renderHeading()}\n ${this.error\n ? html`\n <sp-icon-alert class=\"type-icon\"></sp-icon-alert>\n `\n : nothing}\n ${this.noDivider\n ? nothing\n : html`\n <sp-divider size=\"m\" class=\"divider\"></sp-divider>\n `}\n ${this.renderContent()}\n ${this.hasFooter ? this.renderFooter() : nothing}\n ${this.hasButtons ? this.renderButtons() : nothing}\n ${this.dismissable ? this.renderDismiss() : nothing}\n </div>\n `;\n }\n\n protected override shouldUpdate(changes: PropertyValues): boolean {\n if (changes.has('mode') && !!this.mode) {\n this.dismissable = false;\n }\n if (changes.has('dismissable') && this.dismissable) {\n this.dismissable = !this.mode;\n }\n return super.shouldUpdate(changes);\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'dialog');\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (\n changes.has('error') &&\n (this.error !== undefined || changes.get('error') !== undefined)\n ) {\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"error\" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the \"variant='error'\" instead. \"error\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error',\n { level: 'deprecation' }\n );\n }\n }\n }\n}\n"],
5
+ "mappings": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAGG,gCACP,OACI,YAAAC,EACA,SAAAC,MACG,kDAEP,MAAO,iDACP,MAAO,qDACP,MAAO,2DACP,MAAO,iEACP,OAAS,uBAAAC,MAA2B,kCAEpC,OAAOC,MAAY,kBAEnB,OAAS,eAAAC,MAAmB,2DAC5B,OAAS,YAAAC,MAAgB,kDAYlB,aAAM,eAAeH,EAAoBE,EAAa,CACzD,gBACA,kBACA,iBACJ,CAAC,CAAE,CAJI,kCAgBH,KAAO,MAAQ,GAGf,KAAO,YAAc,GAGrB,KAAO,aAAe,QAgBtB,KAAO,UAAY,GAjCnB,WAA2B,QAAyB,CAChD,MAAO,CAACD,CAAM,CAClB,CAiBA,IAAc,WAAqB,CAC/B,OAAO,KAAK,uBAAuB,iBAAiB,CACxD,CAEA,IAAc,YAAsB,CAChC,OAAO,KAAK,uBAAuB,iBAAiB,CACxD,CAGA,IAAc,SAAmB,CAC7B,OAAO,KAAK,uBAAuB,eAAe,CACtD,CAWO,OAAc,CACjB,KAAK,cACD,IAAI,MAAM,QAAS,CACf,QAAS,GACT,SAAU,GACV,WAAY,EAChB,CAAC,CACL,CACJ,CAEU,YAA6B,CACnC,OAAOL;AAAA;AAAA,SAGX,CAEU,cAA+B,CACrC,OAAOA;AAAA;AAAA;AAAA;AAAA,SAKX,CAEmB,eAAgC,CAC/C,MAAMQ,EAAU,CACZ,eAAgB,GAChB,yBAA0B,CAAC,KAAK,SACpC,EACA,OAAOR;AAAA,qCACsBO,EAASC,CAAO,CAAC;A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,OAsBF,4BAgBAQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GArC1D,OAsCF,yBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAxChC,OAyCF,oBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA3ChC,OA4CF",
6
6
  "names": ["html", "nothing", "property", "query", "ObserveSlotPresence", "styles", "AlertDialog", "classMap", "classes", "changes", "__decorateClass"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
2
2
  import '@spectrum-web-components/underlay/sp-underlay.js';
3
3
  import '@spectrum-web-components/button/sp-button.js';
4
4
  import '@spectrum-web-components/dialog/sp-dialog.js';
@@ -15,6 +15,9 @@ import { Dialog } from './Dialog.js';
15
15
  */
16
16
  export declare class DialogWrapper extends DialogBase {
17
17
  static get styles(): CSSResultArray;
18
+ /**
19
+ * @deprecated Use the Alert Dialog component with `variant="error"` instead.
20
+ */
18
21
  error: boolean;
19
22
  cancelLabel: string;
20
23
  confirmLabel: string;
@@ -31,5 +34,6 @@ export declare class DialogWrapper extends DialogBase {
31
34
  private clickSecondary;
32
35
  private clickCancel;
33
36
  private clickConfirm;
37
+ protected updated(changes: PropertyValues<this>): void;
34
38
  protected renderDialog(): TemplateResult;
35
39
  }
@@ -60,6 +60,19 @@ export class DialogWrapper extends DialogBase {
60
60
  })
61
61
  );
62
62
  }
63
+ updated(changes) {
64
+ super.updated(changes);
65
+ if (changes.has("error") && (this.error !== void 0 || changes.get("error") !== void 0)) {
66
+ if (true) {
67
+ window.__swc.warn(
68
+ this,
69
+ `The "error" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the "variant='error'" instead. "error" will be removed in a future release.`,
70
+ "https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error",
71
+ { level: "deprecation" }
72
+ );
73
+ }
74
+ }
75
+ }
63
76
  renderDialog() {
64
77
  const hideDivider = this.noDivider || !this.headline || this.headlineVisibility === "none";
65
78
  if (true) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["DialogWrapper.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\n// Leveraged in build systems that use aliasing to prevent multiple registrations: https://github.com/adobe/spectrum-web-components/pull/3225\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { DialogBase } from './DialogBase.dev.js'\nimport { Dialog } from './Dialog.dev.js'\n\n/**\n * @element sp-dialog-wrapper\n *\n * @slot - content for the dialog\n * @fires secondary - Announces that the \"secondary\" button has been clicked.\n * @fires cancel - Announces that the \"cancel\" button has been clicked.\n * @fires confirm - Announces that the \"confirm\" button has been clicked.\n * @fires close - Announces that the dialog has been closed.\n */\nexport class DialogWrapper extends DialogBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ attribute: 'cancel-label' })\n public cancelLabel = '';\n\n @property({ attribute: 'confirm-label' })\n public confirmLabel = '';\n\n @property({ attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n @property()\n public footer = '';\n\n @property()\n public hero = '';\n\n @property({ attribute: 'hero-label' })\n public heroLabel = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: String, attribute: 'headline-visibility' })\n public headlineVisibility: 'none' | undefined;\n\n protected override get dialog(): Dialog {\n return this.shadowRoot.querySelector('sp-dialog') as Dialog;\n }\n\n private clickSecondary(): void {\n this.dispatchEvent(\n new Event('secondary', {\n bubbles: true,\n })\n );\n }\n\n private clickCancel(): void {\n this.dispatchEvent(\n new Event('cancel', {\n bubbles: true,\n })\n );\n }\n\n private clickConfirm(): void {\n this.dispatchEvent(\n new Event('confirm', {\n bubbles: true,\n })\n );\n }\n\n protected override renderDialog(): TemplateResult {\n const hideDivider =\n this.noDivider ||\n !this.headline ||\n this.headlineVisibility === 'none';\n\n if (window.__swc.DEBUG) {\n if (!this.headline) {\n window.__swc.warn(\n this,\n `<${this.localName}> elements will not be accessible to screen readers without a \"headline\" attribute or property.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/dialog-wrapper/#accessibility',\n {\n type: 'accessibility',\n }\n );\n }\n }\n\n return html`\n <sp-dialog\n ?dismissable=${this.dismissable}\n dismiss-label=${this.dismissLabel}\n ?no-divider=${hideDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode)}\n size=${ifDefined(this.size)}\n >\n ${this.hero\n ? html`\n <img\n src=\"${this.hero}\"\n slot=\"hero\"\n aria-hidden=${ifDefined(\n this.heroLabel ? undefined : 'true'\n )}\n alt=${ifDefined(\n this.heroLabel ? this.heroLabel : undefined\n )}\n />\n `\n : nothing}\n ${this.headline\n ? html`\n <h2\n slot=\"heading\"\n ?hidden=${this.headlineVisibility === 'none'}\n >\n ${this.headline}\n </h2>\n `\n : nothing}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : nothing}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : nothing}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : nothing}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"accent\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : nothing}\n </sp-dialog>\n `;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAE1B,OAAO;AACP,OAAO;AAGP,OAAO;AACP,SAAS,kBAAkB;AAYpB,aAAM,sBAAsB,WAAW;AAAA,EAAvC;AAAA;AAMH,SAAO,QAAQ;AAGf,SAAO,cAAc;AAGrB,SAAO,eAAe;AAGtB,SAAO,eAAe;AAGtB,SAAO,SAAS;AAGhB,SAAO,OAAO;AAGd,SAAO,YAAY;AAGnB,SAAO,YAAY;AAMnB,SAAO,iBAAiB;AAGxB,SAAO,WAAW;AAAA;AAAA,EAnClB,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,MAAM;AAAA,EAC3B;AAAA,EAsCA,IAAuB,SAAiB;AACpC,WAAO,KAAK,WAAW,cAAc,WAAW;AAAA,EACpD;AAAA,EAEQ,iBAAuB;AAC3B,SAAK;AAAA,MACD,IAAI,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEQ,cAAoB;AACxB,SAAK;AAAA,MACD,IAAI,MAAM,UAAU;AAAA,QAChB,SAAS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A,uCAKiB,KAAK,cAAc;AAAA;AAAA,gCAE1B,KAAK,cAAc;AAAA;AAAA,0BAG7B,OAAO;AAAA,kBACX,KAAK,eACD;AAAA;AAAA;AAAA;AAAA,uCAIiB,KAAK,YAAY;AAAA;AAAA,gCAExB,KAAK,YAAY;AAAA;AAAA,0BAG3B,OAAO;AAAA;AAAA;AAAA,EAGzB;AACJ;AA/JW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GALjC,cAMF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,eAAe,CAAC;AAAA,GAR9B,cASF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,gBAAgB,CAAC;AAAA,GAX/B,cAYF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,gBAAgB,CAAC;AAAA,GAd/B,cAeF;AAGA;AAAA,EADN,SAAS;AAAA,GAjBD,cAkBF;AAGA;AAAA,EADN,SAAS;AAAA,GApBD,cAqBF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GAvB5B,cAwBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa,CAAC;AAAA,GA1B1D,cA2BF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA7BhC,cA8BF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,kBAAkB,CAAC;AAAA,GAhCjC,cAiCF;AAGA;AAAA,EADN,SAAS;AAAA,GAnCD,cAoCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GAtCnD,cAuCF;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\n// Leveraged in build systems that use aliasing to prevent multiple registrations: https://github.com/adobe/spectrum-web-components/pull/3225\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { DialogBase } from './DialogBase.dev.js'\nimport { Dialog } from './Dialog.dev.js'\n\n/**\n * @element sp-dialog-wrapper\n *\n * @slot - content for the dialog\n * @fires secondary - Announces that the \"secondary\" button has been clicked.\n * @fires cancel - Announces that the \"cancel\" button has been clicked.\n * @fires confirm - Announces that the \"confirm\" button has been clicked.\n * @fires close - Announces that the dialog has been closed.\n */\nexport class DialogWrapper extends DialogBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles];\n }\n\n /**\n * @deprecated Use the Alert Dialog component with `variant=\"error\"` instead.\n */\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ attribute: 'cancel-label' })\n public cancelLabel = '';\n\n @property({ attribute: 'confirm-label' })\n public confirmLabel = '';\n\n @property({ attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n @property()\n public footer = '';\n\n @property()\n public hero = '';\n\n @property({ attribute: 'hero-label' })\n public heroLabel = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: String, attribute: 'headline-visibility' })\n public headlineVisibility: 'none' | undefined;\n\n protected override get dialog(): Dialog {\n return this.shadowRoot.querySelector('sp-dialog') as Dialog;\n }\n\n private clickSecondary(): void {\n this.dispatchEvent(\n new Event('secondary', {\n bubbles: true,\n })\n );\n }\n\n private clickCancel(): void {\n this.dispatchEvent(\n new Event('cancel', {\n bubbles: true,\n })\n );\n }\n\n private clickConfirm(): void {\n this.dispatchEvent(\n new Event('confirm', {\n bubbles: true,\n })\n );\n }\n\n protected override updated(changes: PropertyValues<this>): void {\n super.updated(changes);\n if (\n changes.has('error') &&\n (this.error !== undefined || changes.get('error') !== undefined)\n ) {\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"error\" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the \"variant='error'\" instead. \"error\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error',\n { level: 'deprecation' }\n );\n }\n }\n }\n\n protected override renderDialog(): TemplateResult {\n const hideDivider =\n this.noDivider ||\n !this.headline ||\n this.headlineVisibility === 'none';\n\n if (window.__swc.DEBUG) {\n if (!this.headline) {\n window.__swc.warn(\n this,\n `<${this.localName}> elements will not be accessible to screen readers without a \"headline\" attribute or property.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/dialog-wrapper/#accessibility',\n {\n type: 'accessibility',\n }\n );\n }\n }\n\n return html`\n <sp-dialog\n ?dismissable=${this.dismissable}\n dismiss-label=${this.dismissLabel}\n ?no-divider=${hideDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode)}\n size=${ifDefined(this.size)}\n >\n ${this.hero\n ? html`\n <img\n src=\"${this.hero}\"\n slot=\"hero\"\n aria-hidden=${ifDefined(\n this.heroLabel ? undefined : 'true'\n )}\n alt=${ifDefined(\n this.heroLabel ? this.heroLabel : undefined\n )}\n />\n `\n : nothing}\n ${this.headline\n ? html`\n <h2\n slot=\"heading\"\n ?hidden=${this.headlineVisibility === 'none'}\n >\n ${this.headline}\n </h2>\n `\n : nothing}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : nothing}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : nothing}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : nothing}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"accent\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : nothing}\n </sp-dialog>\n `;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAE1B,OAAO;AACP,OAAO;AAGP,OAAO;AACP,SAAS,kBAAkB;AAYpB,aAAM,sBAAsB,WAAW;AAAA,EAAvC;AAAA;AASH,SAAO,QAAQ;AAGf,SAAO,cAAc;AAGrB,SAAO,eAAe;AAGtB,SAAO,eAAe;AAGtB,SAAO,SAAS;AAGhB,SAAO,OAAO;AAGd,SAAO,YAAY;AAGnB,SAAO,YAAY;AAMnB,SAAO,iBAAiB;AAGxB,SAAO,WAAW;AAAA;AAAA,EAtClB,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,MAAM;AAAA,EAC3B;AAAA,EAyCA,IAAuB,SAAiB;AACpC,WAAO,KAAK,WAAW,cAAc,WAAW;AAAA,EACpD;AAAA,EAEQ,iBAAuB;AAC3B,SAAK;AAAA,MACD,IAAI,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEQ,cAAoB;AACxB,SAAK;AAAA,MACD,IAAI,MAAM,UAAU;AAAA,QAChB,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;A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GA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GAzCnD,cA0CF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
- "use strict";var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var e=(c,o,r,n)=>{for(var i=n>1?void 0:n?u(o,r):o,b=c.length-1,d;b>=0;b--)(d=c[b])&&(i=(n?d(o,r,i):d(i))||i);return n&&i&&h(o,r,i),i};import{html as s,nothing as l}from"@spectrum-web-components/base";import{property as t}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as a}from"@spectrum-web-components/base/src/directives.js";import"@spectrum-web-components/underlay/sp-underlay.js";import"@spectrum-web-components/button/sp-button.js";import"@spectrum-web-components/dialog/sp-dialog.js";import{DialogBase as m}from"./DialogBase.js";export class DialogWrapper extends m{constructor(){super(...arguments);this.error=!1;this.cancelLabel="";this.confirmLabel="";this.dismissLabel="Close";this.footer="";this.hero="";this.heroLabel="";this.noDivider=!1;this.secondaryLabel="";this.headline=""}static get styles(){return[...super.styles]}get dialog(){return this.shadowRoot.querySelector("sp-dialog")}clickSecondary(){this.dispatchEvent(new Event("secondary",{bubbles:!0}))}clickCancel(){this.dispatchEvent(new Event("cancel",{bubbles:!0}))}clickConfirm(){this.dispatchEvent(new Event("confirm",{bubbles:!0}))}renderDialog(){const r=this.noDivider||!this.headline||this.headlineVisibility==="none";return s`
1
+ "use strict";var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var e=(c,l,i,n)=>{for(var r=n>1?void 0:n?u(l,i):l,d=c.length-1,b;d>=0;d--)(b=c[d])&&(r=(n?b(l,i,r):b(r))||r);return n&&r&&h(l,i,r),r};import{html as s,nothing as o}from"@spectrum-web-components/base";import{property as t}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as a}from"@spectrum-web-components/base/src/directives.js";import"@spectrum-web-components/underlay/sp-underlay.js";import"@spectrum-web-components/button/sp-button.js";import"@spectrum-web-components/dialog/sp-dialog.js";import{DialogBase as p}from"./DialogBase.js";export class DialogWrapper extends p{constructor(){super(...arguments);this.error=!1;this.cancelLabel="";this.confirmLabel="";this.dismissLabel="Close";this.footer="";this.hero="";this.heroLabel="";this.noDivider=!1;this.secondaryLabel="";this.headline=""}static get styles(){return[...super.styles]}get dialog(){return this.shadowRoot.querySelector("sp-dialog")}clickSecondary(){this.dispatchEvent(new Event("secondary",{bubbles:!0}))}clickCancel(){this.dispatchEvent(new Event("cancel",{bubbles:!0}))}clickConfirm(){this.dispatchEvent(new Event("confirm",{bubbles:!0}))}updated(i){super.updated(i),i.has("error")&&(this.error!==void 0||i.get("error"))}renderDialog(){const i=this.noDivider||!this.headline||this.headlineVisibility==="none";return s`
2
2
  <sp-dialog
3
3
  ?dismissable=${this.dismissable}
4
4
  dismiss-label=${this.dismissLabel}
5
- ?no-divider=${r}
5
+ ?no-divider=${i}
6
6
  ?error=${this.error}
7
7
  mode=${a(this.mode)}
8
8
  size=${a(this.size)}
@@ -14,7 +14,7 @@
14
14
  aria-hidden=${a(this.heroLabel?void 0:"true")}
15
15
  alt=${a(this.heroLabel?this.heroLabel:void 0)}
16
16
  />
17
- `:l}
17
+ `:o}
18
18
  ${this.headline?s`
19
19
  <h2
20
20
  slot="heading"
@@ -22,11 +22,11 @@
22
22
  >
23
23
  ${this.headline}
24
24
  </h2>
25
- `:l}
25
+ `:o}
26
26
  <slot></slot>
27
27
  ${this.footer?s`
28
28
  <div slot="footer">${this.footer}</div>
29
- `:l}
29
+ `:o}
30
30
  ${this.cancelLabel?s`
31
31
  <sp-button
32
32
  variant="secondary"
@@ -36,7 +36,7 @@
36
36
  >
37
37
  ${this.cancelLabel}
38
38
  </sp-button>
39
- `:l}
39
+ `:o}
40
40
  ${this.secondaryLabel?s`
41
41
  <sp-button
42
42
  variant="primary"
@@ -46,7 +46,7 @@
46
46
  >
47
47
  ${this.secondaryLabel}
48
48
  </sp-button>
49
- `:l}
49
+ `:o}
50
50
  ${this.confirmLabel?s`
51
51
  <sp-button
52
52
  variant="accent"
@@ -55,7 +55,7 @@
55
55
  >
56
56
  ${this.confirmLabel}
57
57
  </sp-button>
58
- `:l}
58
+ `:o}
59
59
  </sp-dialog>
60
60
  `}}e([t({type:Boolean,reflect:!0})],DialogWrapper.prototype,"error",2),e([t({attribute:"cancel-label"})],DialogWrapper.prototype,"cancelLabel",2),e([t({attribute:"confirm-label"})],DialogWrapper.prototype,"confirmLabel",2),e([t({attribute:"dismiss-label"})],DialogWrapper.prototype,"dismissLabel",2),e([t()],DialogWrapper.prototype,"footer",2),e([t()],DialogWrapper.prototype,"hero",2),e([t({attribute:"hero-label"})],DialogWrapper.prototype,"heroLabel",2),e([t({type:Boolean,reflect:!0,attribute:"no-divider"})],DialogWrapper.prototype,"noDivider",2),e([t({type:String,reflect:!0})],DialogWrapper.prototype,"size",2),e([t({attribute:"secondary-label"})],DialogWrapper.prototype,"secondaryLabel",2),e([t()],DialogWrapper.prototype,"headline",2),e([t({type:String,attribute:"headline-visibility"})],DialogWrapper.prototype,"headlineVisibility",2);
61
61
  //# sourceMappingURL=DialogWrapper.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["DialogWrapper.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\n// Leveraged in build systems that use aliasing to prevent multiple registrations: https://github.com/adobe/spectrum-web-components/pull/3225\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { DialogBase } from './DialogBase.js';\nimport { Dialog } from './Dialog.js';\n\n/**\n * @element sp-dialog-wrapper\n *\n * @slot - content for the dialog\n * @fires secondary - Announces that the \"secondary\" button has been clicked.\n * @fires cancel - Announces that the \"cancel\" button has been clicked.\n * @fires confirm - Announces that the \"confirm\" button has been clicked.\n * @fires close - Announces that the dialog has been closed.\n */\nexport class DialogWrapper extends DialogBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ attribute: 'cancel-label' })\n public cancelLabel = '';\n\n @property({ attribute: 'confirm-label' })\n public confirmLabel = '';\n\n @property({ attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n @property()\n public footer = '';\n\n @property()\n public hero = '';\n\n @property({ attribute: 'hero-label' })\n public heroLabel = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: String, attribute: 'headline-visibility' })\n public headlineVisibility: 'none' | undefined;\n\n protected override get dialog(): Dialog {\n return this.shadowRoot.querySelector('sp-dialog') as Dialog;\n }\n\n private clickSecondary(): void {\n this.dispatchEvent(\n new Event('secondary', {\n bubbles: true,\n })\n );\n }\n\n private clickCancel(): void {\n this.dispatchEvent(\n new Event('cancel', {\n bubbles: true,\n })\n );\n }\n\n private clickConfirm(): void {\n this.dispatchEvent(\n new Event('confirm', {\n bubbles: true,\n })\n );\n }\n\n protected override renderDialog(): TemplateResult {\n const hideDivider =\n this.noDivider ||\n !this.headline ||\n this.headlineVisibility === 'none';\n\n if (window.__swc.DEBUG) {\n if (!this.headline) {\n window.__swc.warn(\n this,\n `<${this.localName}> elements will not be accessible to screen readers without a \"headline\" attribute or property.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/dialog-wrapper/#accessibility',\n {\n type: 'accessibility',\n }\n );\n }\n }\n\n return html`\n <sp-dialog\n ?dismissable=${this.dismissable}\n dismiss-label=${this.dismissLabel}\n ?no-divider=${hideDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode)}\n size=${ifDefined(this.size)}\n >\n ${this.hero\n ? html`\n <img\n src=\"${this.hero}\"\n slot=\"hero\"\n aria-hidden=${ifDefined(\n this.heroLabel ? undefined : 'true'\n )}\n alt=${ifDefined(\n this.heroLabel ? this.heroLabel : undefined\n )}\n />\n `\n : nothing}\n ${this.headline\n ? html`\n <h2\n slot=\"heading\"\n ?hidden=${this.headlineVisibility === 'none'}\n >\n ${this.headline}\n </h2>\n `\n : nothing}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : nothing}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : nothing}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : nothing}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"accent\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : nothing}\n </sp-dialog>\n `;\n }\n}\n"],
5
- "mappings": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDAE1B,MAAO,mDACP,MAAO,+CAGP,MAAO,+CACP,OAAS,cAAAC,MAAkB,kBAYpB,aAAM,sBAAsBA,CAAW,CAAvC,kCAMH,KAAO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nothing", "property", "ifDefined", "DialogBase", "hideDivider", "__decorateClass"]
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\n// Leveraged in build systems that use aliasing to prevent multiple registrations: https://github.com/adobe/spectrum-web-components/pull/3225\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { DialogBase } from './DialogBase.js';\nimport { Dialog } from './Dialog.js';\n\n/**\n * @element sp-dialog-wrapper\n *\n * @slot - content for the dialog\n * @fires secondary - Announces that the \"secondary\" button has been clicked.\n * @fires cancel - Announces that the \"cancel\" button has been clicked.\n * @fires confirm - Announces that the \"confirm\" button has been clicked.\n * @fires close - Announces that the dialog has been closed.\n */\nexport class DialogWrapper extends DialogBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles];\n }\n\n /**\n * @deprecated Use the Alert Dialog component with `variant=\"error\"` instead.\n */\n @property({ type: Boolean, reflect: true })\n public error = false;\n\n @property({ attribute: 'cancel-label' })\n public cancelLabel = '';\n\n @property({ attribute: 'confirm-label' })\n public confirmLabel = '';\n\n @property({ attribute: 'dismiss-label' })\n public dismissLabel = 'Close';\n\n @property()\n public footer = '';\n\n @property()\n public hero = '';\n\n @property({ attribute: 'hero-label' })\n public heroLabel = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'no-divider' })\n public noDivider = false;\n\n @property({ type: String, reflect: true })\n public size?: 's' | 'm' | 'l';\n\n @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: String, attribute: 'headline-visibility' })\n public headlineVisibility: 'none' | undefined;\n\n protected override get dialog(): Dialog {\n return this.shadowRoot.querySelector('sp-dialog') as Dialog;\n }\n\n private clickSecondary(): void {\n this.dispatchEvent(\n new Event('secondary', {\n bubbles: true,\n })\n );\n }\n\n private clickCancel(): void {\n this.dispatchEvent(\n new Event('cancel', {\n bubbles: true,\n })\n );\n }\n\n private clickConfirm(): void {\n this.dispatchEvent(\n new Event('confirm', {\n bubbles: true,\n })\n );\n }\n\n protected override updated(changes: PropertyValues<this>): void {\n super.updated(changes);\n if (\n changes.has('error') &&\n (this.error !== undefined || changes.get('error') !== undefined)\n ) {\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"error\" attribute of <${this.localName}> has been deprecated. Use the Alert Dialog component with the \"variant='error'\" instead. \"error\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/alert-dialog/#error',\n { level: 'deprecation' }\n );\n }\n }\n }\n\n protected override renderDialog(): TemplateResult {\n const hideDivider =\n this.noDivider ||\n !this.headline ||\n this.headlineVisibility === 'none';\n\n if (window.__swc.DEBUG) {\n if (!this.headline) {\n window.__swc.warn(\n this,\n `<${this.localName}> elements will not be accessible to screen readers without a \"headline\" attribute or property.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/dialog-wrapper/#accessibility',\n {\n type: 'accessibility',\n }\n );\n }\n }\n\n return html`\n <sp-dialog\n ?dismissable=${this.dismissable}\n dismiss-label=${this.dismissLabel}\n ?no-divider=${hideDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode)}\n size=${ifDefined(this.size)}\n >\n ${this.hero\n ? html`\n <img\n src=\"${this.hero}\"\n slot=\"hero\"\n aria-hidden=${ifDefined(\n this.heroLabel ? undefined : 'true'\n )}\n alt=${ifDefined(\n this.heroLabel ? this.heroLabel : undefined\n )}\n />\n `\n : nothing}\n ${this.headline\n ? html`\n <h2\n slot=\"heading\"\n ?hidden=${this.headlineVisibility === 'none'}\n >\n ${this.headline}\n </h2>\n `\n : nothing}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : nothing}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : nothing}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n treatment=\"outline\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : nothing}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"accent\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : nothing}\n </sp-dialog>\n `;\n }\n}\n"],
5
+ "mappings": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAGG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDAE1B,MAAO,mDACP,MAAO,+CAGP,MAAO,+CACP,OAAS,cAAAC,MAAkB,kBAYpB,aAAM,sBAAsBA,CAAW,CAAvC,kCASH,KAAO,MAAQ,GAGf,KAAO,YAAc,GAGrB,KAAO,aAAe,GAGtB,KAAO,aAAe,QAGtB,KAAO,OAAS,GAGhB,KAAO,KAAO,GAGd,KAAO,UAAY,GAGnB,KAAO,UAAY,GAMnB,KAAO,eAAiB,GAGxB,KAAO,SAAW,GAtClB,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,MAAM,CAC3B,CAyCA,IAAuB,QAAiB,CACpC,OAAO,KAAK,WAAW,cAAc,WAAW,CACpD,CAEQ,gBAAuB,CAC3B,KAAK,cACD,IAAI,MAAM,YAA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1B,KAAK,cAAc;AAAA;AAAA,wBAG7BC,CAAO;AAAA,kBACX,KAAK,aACDD;AAAA;AAAA;AAAA;AAAA,uCAIiB,KAAK,YAAY;AAAA;AAAA,gCAExB,KAAK,YAAY;AAAA;AAAA,wBAG3BC,CAAO;AAAA;AAAA,SAGzB,CACJ,CAhLWM,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,cASF,qBAGAK,EAAA,CADNL,EAAS,CAAE,UAAW,cAAe,CAAC,GAX9B,cAYF,2BAGAK,EAAA,CADNL,EAAS,CAAE,UAAW,eAAgB,CAAC,GAd/B,cAeF,4BAGAK,EAAA,CADNL,EAAS,CAAE,UAAW,eAAgB,CAAC,GAjB/B,cAkBF,4BAGAK,EAAA,CADNL,EAAS,GApBD,cAqBF,sBAGAK,EAAA,CADNL,EAAS,GAvBD,cAwBF,oBAGAK,EAAA,CADNL,EAAS,CAAE,UAAW,YAAa,CAAC,GA1B5B,cA2BF,yBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GA7B1D,cA8BF,yBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAhChC,cAiCF,oBAGAK,EAAA,CADNL,EAAS,CAAE,UAAW,iBAAkB,CAAC,GAnCjC,cAoCF,8BAGAK,EAAA,CADNL,EAAS,GAtCD,cAuCF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,UAAW,qBAAsB,CAAC,GAzCnD,cA0CF",
6
+ "names": ["html", "nothing", "property", "ifDefined", "DialogBase", "changes", "hideDivider", "__decorateClass"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  import { css } from "@spectrum-web-components/base";
3
3
  const styles = css`
4
- :host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-min-inline-size:288px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-confirm-divider-block-spacing-start:var(--spectrum-spacing-300);--spectrum-dialog-confirm-divider-block-spacing-end:var(--spectrum-spacing-200);--spectrum-dialog-confirm-description-text-color:var(--spectrum-gray-800);--spectrum-dialog-confirm-title-text-color:var(--spectrum-gray-900);--spectrum-dialog-confirm-description-text-line-height:var(--spectrum-line-height-100);--spectrum-dialog-confirm-title-text-line-height:var(--spectrum-line-height-100);--spectrum-dialog-heading-font-weight:var(--spectrum-heading-sans-serif-font-weight);--spectrum-dialog-confirm-description-padding:var(--spectrum-spacing-50);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-spacing-50)*-1);--spectrum-dialog-confirm-footer-padding-top:var(--spectrum-spacing-600);--spectrum-dialog-confirm-gap-size:var(--spectrum-component-pill-edge-to-text-100);--spectrum-dialog-confirm-buttongroup-padding-top:var(--spectrum-spacing-600);--spectrum-dialog-confirm-close-button-size:var(--spectrum-component-height-100);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-component-bottom-to-text-300));--spectrum-dialog-confirm-divider-height:var(--spectrum-spacing-50);box-sizing:border-box;inline-size:-moz-fit-content;inline-size:fit-content;min-inline-size:var(--mod-dialog-min-inline-size,var(--spectrum-dialog-min-inline-size));max-inline-size:100%;max-block-size:inherit;outline:none;display:flex}:host([size=s]){inline-size:var(--mod-dialog-confirm-small-width,var(--spectrum-dialog-confirm-small-width))}:host([size=m]){inline-size:var(--mod-dialog-confirm-medium-width,var(--spectrum-dialog-confirm-medium-width))}:host([size=l]){inline-size:var(--mod-dialog-confirm-large-width,var(--spectrum-dialog-confirm-large-width))}::slotted([slot=hero]){block-size:var(--mod-dialog-confirm-hero-height,var(--spectrum-dialog-confirm-hero-height));background-position:50%;background-size:cover;border-start-start-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));border-start-end-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));grid-area:hero;overflow:hidden}.grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));inline-size:100%;grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading header header header."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . .";display:grid}::slotted([slot=heading]){font-size:var(--mod-dialog-confirm-title-text-size,var(--spectrum-dialog-confirm-title-text-size));font-weight:var(--mod-dialog-heading-font-weight,var(--spectrum-dialog-heading-font-weight));line-height:var(--mod-dialog-confirm-title-text-line-height,var(--spectrum-dialog-confirm-title-text-line-height));color:var(--mod-dialog-confirm-title-text-color,var(--spectrum-dialog-confirm-title-text-color));outline:none;grid-area:heading;margin:0;padding-inline-end:var(--mod-dialog-confirm-gap-size,var(--spectrum-dialog-confirm-gap-size))}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end;padding-inline-end:0}.header{box-sizing:border-box;outline:none;grid-area:header;justify-content:flex-end;align-items:center;display:flex}.divider{inline-size:100%;grid-area:divider;margin-block-start:var(--mod-dialog-confirm-divider-block-spacing-end,var(--spectrum-dialog-confirm-divider-block-spacing-end));margin-block-end:var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start))}:host([mode=fullscreen]) [name=heading]+.divider{margin-block-end:calc(var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start)) - var(--mod-dialog-confirm-description-padding,var(--spectrum-dialog-confirm-description-padding))*2)}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-block-end:calc(var(--mod-dialog-confirm-divider-block-spacing-end,var(--spectrum-dialog-confirm-divider-block-spacing-end)) + var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start)) + var(--mod-dialog-confirm-divider-height,var(--spectrum-dialog-confirm-divider-height)))}.content{box-sizing:border-box;-webkit-overflow-scrolling:touch;font-size:var(--mod-dialog-confirm-description-text-size,var(--spectrum-dialog-confirm-description-text-size));font-weight:var(--mod-dialog-confirm-description-font-weight,var(--spectrum-regular-font-weight));line-height:var(--mod-dialog-confirm-description-text-line-height,var(--spectrum-dialog-confirm-description-text-line-height));color:var(--mod-dialog-confirm-description-text-color,var(--spectrum-dialog-confirm-description-text-color));padding:calc(var(--mod-dialog-confirm-description-padding,var(--spectrum-dialog-confirm-description-padding))*2);margin:0 var(--mod-dialog-confirm-description-margin,var(--spectrum-dialog-confirm-description-margin));outline:none;grid-area:content;overflow-y:auto}.footer{outline:none;flex-wrap:wrap;grid-area:footer;padding-block-start:var(--mod-dialog-confirm-footer-padding-top,var(--spectrum-dialog-confirm-footer-padding-top));display:flex}.footer>*,.footer>.spectrum-Button+.spectrum-Button{margin-block-end:0}.button-group{grid-area:buttonGroup;justify-content:flex-end;padding-block-start:var(--mod-dialog-confirm-buttongroup-padding-top,var(--spectrum-dialog-confirm-buttongroup-padding-top));padding-inline-start:var(--mod-dialog-confirm-gap-size,var(--spectrum-dialog-confirm-gap-size));display:flex}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)minmax(0,var(--mod-dialog-confirm-close-button-size,var(--spectrum-dialog-confirm-close-button-size)))var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero hero"". . . . .closeButton closeButton"".heading header header typeIcon closeButton closeButton"".divider divider divider divider divider."".content content content content content."".footer footer buttonGroup buttonGroup buttonGroup."". . . . . . ."}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{color:var(--mod-dialog-confirm-description-text-color,var(--spectrum-dialog-confirm-description-text-color));grid-area:footer/footer/buttonGroup/buttonGroup}.close-button{grid-area:closeButton;place-self:start end;margin-block-start:var(--mod-dialog-confirm-close-button-padding,var(--spectrum-dialog-confirm-close-button-padding));margin-inline-end:var(--mod-dialog-confirm-close-button-padding,var(--spectrum-dialog-confirm-close-button-padding))}:host([mode=fullscreen]){inline-size:100%;block-size:100%}:host([mode=fullscreenTakeover]){inline-size:100%;block-size:100%;border-radius:0}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-block-size:none;max-inline-size:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))1fr auto auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:". . . . ."".heading header buttonGroup."".divider divider divider."".content content content."". . . . .";display:grid}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--mod-dialog-fullscreen-header-text-size,var(--spectrum-dialog-fullscreen-header-text-size))}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-block-size:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-block-start:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{grid-area:buttonGroup;align-self:start}@media screen and (width<=700px){.grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading heading heading heading."".header header header header."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . ."}.grid,:host([dismissable]) .grid{grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))}:host([dismissable]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)minmax(0,var(--mod-dialog-confirm-close-button-size,var(--spectrum-dialog-confirm-close-button-size)))var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero hero"". . . . .closeButton closeButton"".heading heading heading heading closeButton closeButton"".header header header header header."".divider divider divider divider divider."".content content content content content."".footer footer buttonGroup buttonGroup buttonGroup."". . . . . . ."}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))1fr var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:". . ."".heading."".header."".divider."".content."".buttonGroup."". . .";display:grid}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-block-start:var(--mod-dialog-confirm-buttongroup-padding-top,var(--spectrum-dialog-confirm-buttongroup-padding-top))}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--mod-dialog-confirm-title-text-size,var(--spectrum-dialog-confirm-title-text-size))}}@media (forced-colors:active){:host{border:solid}}:host{--swc-alert-dialog-error-icon-color:var(--spectrum-negative-visual-color)}.content{overflow:hidden}.footer{color:var(--spectrum-dialog-confirm-description-text-color,var(--spectrum-gray-800))}.type-icon{color:var(--mod-alert-dialog-error-icon-color,var(--swc-alert-dialog-error-icon-color));grid-area:typeIcon}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){width:100%;height:auto}.grid{inline-size:100%;grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading header header typeIcon."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . .";display:grid}
4
+ :host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-min-inline-size:288px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-confirm-divider-block-spacing-start:var(--spectrum-spacing-300);--spectrum-dialog-confirm-divider-block-spacing-end:var(--spectrum-spacing-200);--spectrum-dialog-confirm-description-text-color:var(--spectrum-gray-800);--spectrum-dialog-confirm-title-text-color:var(--spectrum-gray-900);--spectrum-dialog-confirm-description-text-line-height:var(--spectrum-line-height-100);--spectrum-dialog-confirm-title-text-line-height:var(--spectrum-line-height-100);--spectrum-dialog-heading-font-weight:var(--spectrum-heading-sans-serif-font-weight);--spectrum-dialog-confirm-description-padding:var(--spectrum-spacing-50);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-spacing-50)*-1);--spectrum-dialog-confirm-footer-padding-top:var(--spectrum-spacing-600);--spectrum-dialog-confirm-gap-size:var(--spectrum-component-pill-edge-to-text-100);--spectrum-dialog-confirm-buttongroup-padding-top:var(--spectrum-spacing-600);--spectrum-dialog-confirm-close-button-size:var(--spectrum-component-height-100);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-component-bottom-to-text-300));--spectrum-dialog-confirm-divider-height:var(--spectrum-spacing-50);box-sizing:border-box;inline-size:-moz-fit-content;inline-size:fit-content;min-inline-size:var(--mod-dialog-min-inline-size,var(--spectrum-dialog-min-inline-size));max-inline-size:100%;max-block-size:inherit;outline:none;display:flex}:host([size=s]){inline-size:var(--mod-dialog-confirm-small-width,var(--spectrum-dialog-confirm-small-width))}:host([size=m]){inline-size:var(--mod-dialog-confirm-medium-width,var(--spectrum-dialog-confirm-medium-width))}:host([size=l]){inline-size:var(--mod-dialog-confirm-large-width,var(--spectrum-dialog-confirm-large-width))}::slotted([slot=hero]){block-size:var(--mod-dialog-confirm-hero-height,var(--spectrum-dialog-confirm-hero-height));background-position:50%;background-size:cover;border-start-start-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));border-start-end-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));grid-area:hero;overflow:hidden}.grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));inline-size:100%;grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading header header header."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . .";display:grid}::slotted([slot=heading]){font-size:var(--mod-dialog-confirm-title-text-size,var(--spectrum-dialog-confirm-title-text-size));font-weight:var(--mod-dialog-heading-font-weight,var(--spectrum-dialog-heading-font-weight));line-height:var(--mod-dialog-confirm-title-text-line-height,var(--spectrum-dialog-confirm-title-text-line-height));color:var(--mod-dialog-confirm-title-text-color,var(--spectrum-dialog-confirm-title-text-color));outline:none;grid-area:heading;margin:0;padding-inline-end:var(--mod-dialog-confirm-gap-size,var(--spectrum-dialog-confirm-gap-size))}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end;padding-inline-end:0}.header{box-sizing:border-box;outline:none;grid-area:header;justify-content:flex-end;align-items:center;display:flex}.divider{inline-size:100%;grid-area:divider;margin-block-start:var(--mod-dialog-confirm-divider-block-spacing-end,var(--spectrum-dialog-confirm-divider-block-spacing-end));margin-block-end:var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start))}:host([mode=fullscreen]) [name=heading]+.divider{margin-block-end:calc(var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start)) - var(--mod-dialog-confirm-description-padding,var(--spectrum-dialog-confirm-description-padding))*2)}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-block-end:calc(var(--mod-dialog-confirm-divider-block-spacing-end,var(--spectrum-dialog-confirm-divider-block-spacing-end)) + var(--mod-dialog-confirm-divider-block-spacing-start,var(--spectrum-dialog-confirm-divider-block-spacing-start)) + var(--mod-dialog-confirm-divider-height,var(--spectrum-dialog-confirm-divider-height)))}.content{box-sizing:border-box;-webkit-overflow-scrolling:touch;font-size:var(--mod-dialog-confirm-description-text-size,var(--spectrum-dialog-confirm-description-text-size));font-weight:var(--mod-dialog-confirm-description-font-weight,var(--spectrum-regular-font-weight));line-height:var(--mod-dialog-confirm-description-text-line-height,var(--spectrum-dialog-confirm-description-text-line-height));color:var(--mod-dialog-confirm-description-text-color,var(--spectrum-dialog-confirm-description-text-color));padding:calc(var(--mod-dialog-confirm-description-padding,var(--spectrum-dialog-confirm-description-padding))*2);margin:0 var(--mod-dialog-confirm-description-margin,var(--spectrum-dialog-confirm-description-margin));outline:none;grid-area:content;overflow-y:auto}.footer{outline:none;flex-wrap:wrap;grid-area:footer;padding-block-start:var(--mod-dialog-confirm-footer-padding-top,var(--spectrum-dialog-confirm-footer-padding-top));display:flex}.footer>*,.footer>.spectrum-Button+.spectrum-Button{margin-block-end:0}.button-group{grid-area:buttonGroup;justify-content:flex-end;padding-block-start:var(--mod-dialog-confirm-buttongroup-padding-top,var(--spectrum-dialog-confirm-buttongroup-padding-top));padding-inline-start:var(--mod-dialog-confirm-gap-size,var(--spectrum-dialog-confirm-gap-size));display:flex}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)minmax(0,var(--mod-dialog-confirm-close-button-size,var(--spectrum-dialog-confirm-close-button-size)))var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero hero"". . . . .closeButton closeButton"".heading header header typeIcon closeButton closeButton"".divider divider divider divider divider."".content content content content content."".footer footer buttonGroup buttonGroup buttonGroup."". . . . . . ."}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{color:var(--mod-dialog-confirm-description-text-color,var(--spectrum-dialog-confirm-description-text-color));grid-area:footer/footer/buttonGroup/buttonGroup}.close-button{grid-area:closeButton;place-self:start end;margin-block-start:var(--mod-dialog-confirm-close-button-padding,var(--spectrum-dialog-confirm-close-button-padding));margin-inline-end:var(--mod-dialog-confirm-close-button-padding,var(--spectrum-dialog-confirm-close-button-padding))}:host([mode=fullscreen]){inline-size:100%;block-size:100%}:host([mode=fullscreenTakeover]){inline-size:100%;block-size:100%;border-radius:0}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-block-size:none;max-inline-size:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))1fr auto auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto 1fr var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:". . . . ."".heading header buttonGroup."".divider divider divider."".content content content."". . . . .";display:grid}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--mod-dialog-fullscreen-header-text-size,var(--spectrum-dialog-fullscreen-header-text-size))}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-block-size:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-block-start:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{grid-area:buttonGroup;align-self:start}@media screen and (width<=700px){.grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading heading heading heading."".header header header header."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . ."}.grid,:host([dismissable]) .grid{grid-template-rows:auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))}:host([dismissable]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto 1fr auto minmax(0,auto)minmax(0,var(--mod-dialog-confirm-close-button-size,var(--spectrum-dialog-confirm-close-button-size)))var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:"hero hero hero hero hero hero hero"". . . . .closeButton closeButton"".heading heading heading heading closeButton closeButton"".header header header header header."".divider divider divider divider divider."".content content content content content."".footer footer buttonGroup buttonGroup buttonGroup."". . . . . . ."}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{grid-template-columns:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))1fr var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-rows:var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid))auto auto auto 1fr auto var(--mod-dialog-confirm-padding-grid,var(--spectrum-dialog-confirm-padding-grid));grid-template-areas:". . ."".heading."".header."".divider."".content."".buttonGroup."". . .";display:grid}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-block-start:var(--mod-dialog-confirm-buttongroup-padding-top,var(--spectrum-dialog-confirm-buttongroup-padding-top))}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--mod-dialog-confirm-title-text-size,var(--spectrum-dialog-confirm-title-text-size))}}@media (forced-colors:active){:host{border:solid}}:host{--swc-alert-dialog-error-icon-color:var(--spectrum-negative-visual-color)}.content{overflow:hidden}.footer{color:var(--spectrum-dialog-confirm-description-text-color,var(--spectrum-gray-800))}.type-icon{color:var(--mod-alert-dialog-error-icon-color,var(--swc-alert-dialog-error-icon-color));grid-area:typeIcon}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){width:100%;height:auto}.grid{inline-size:100%;grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading heading heading typeIcon."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . .";display:grid}:host(:not([error],[dismissable],[mode])) .grid{inline-size:100%;grid-template-areas:"hero hero hero hero hero hero"". . . . . ."".heading heading heading heading."".divider divider divider divider."".content content content content."".footer footer buttonGroup buttonGroup."". . . . . .";display:grid}
5
5
  `;
6
6
  export default styles;
7
7
  //# sourceMappingURL=dialog.css.dev.js.map