@spectrum-web-components/dialog 0.41.2 → 0.42.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.
@@ -107,6 +107,17 @@
107
107
  "attribute": "dismissable",
108
108
  "reflects": true
109
109
  },
110
+ {
111
+ "kind": "field",
112
+ "name": "dismissLabel",
113
+ "type": {
114
+ "text": "string"
115
+ },
116
+ "privacy": "public",
117
+ "default": "'Close'",
118
+ "attribute": "dismiss-label",
119
+ "reflects": true
120
+ },
110
121
  {
111
122
  "kind": "field",
112
123
  "name": "hasFooter",
@@ -242,6 +253,14 @@
242
253
  "default": "false",
243
254
  "fieldName": "dismissable"
244
255
  },
256
+ {
257
+ "name": "dismiss-label",
258
+ "type": {
259
+ "text": "string"
260
+ },
261
+ "default": "'Close'",
262
+ "fieldName": "dismissLabel"
263
+ },
245
264
  {
246
265
  "name": "no-divider",
247
266
  "type": {
@@ -657,6 +676,16 @@
657
676
  "default": "''",
658
677
  "attribute": "confirm-label"
659
678
  },
679
+ {
680
+ "kind": "field",
681
+ "name": "dismissLabel",
682
+ "type": {
683
+ "text": "string"
684
+ },
685
+ "privacy": "public",
686
+ "default": "'Close'",
687
+ "attribute": "dismiss-label"
688
+ },
660
689
  {
661
690
  "kind": "field",
662
691
  "name": "footer",
@@ -1140,6 +1169,14 @@
1140
1169
  "default": "''",
1141
1170
  "fieldName": "confirmLabel"
1142
1171
  },
1172
+ {
1173
+ "name": "dismiss-label",
1174
+ "type": {
1175
+ "text": "string"
1176
+ },
1177
+ "default": "'Close'",
1178
+ "fieldName": "dismissLabel"
1179
+ },
1143
1180
  {
1144
1181
  "name": "footer",
1145
1182
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/dialog",
3
- "version": "0.41.2",
3
+ "version": "0.42.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -73,18 +73,18 @@
73
73
  "lit-html"
74
74
  ],
75
75
  "dependencies": {
76
- "@spectrum-web-components/alert-dialog": "^0.41.2",
77
- "@spectrum-web-components/base": "^0.41.2",
78
- "@spectrum-web-components/button": "^0.41.2",
79
- "@spectrum-web-components/button-group": "^0.41.2",
80
- "@spectrum-web-components/divider": "^0.41.2",
81
- "@spectrum-web-components/icons-workflow": "^0.41.2",
82
- "@spectrum-web-components/modal": "^0.41.2",
83
- "@spectrum-web-components/shared": "^0.41.2",
84
- "@spectrum-web-components/underlay": "^0.41.2"
76
+ "@spectrum-web-components/alert-dialog": "^0.42.1",
77
+ "@spectrum-web-components/base": "^0.42.1",
78
+ "@spectrum-web-components/button": "^0.42.1",
79
+ "@spectrum-web-components/button-group": "^0.42.1",
80
+ "@spectrum-web-components/divider": "^0.42.1",
81
+ "@spectrum-web-components/icons-workflow": "^0.42.1",
82
+ "@spectrum-web-components/modal": "^0.42.1",
83
+ "@spectrum-web-components/shared": "^0.42.1",
84
+ "@spectrum-web-components/underlay": "^0.42.1"
85
85
  },
86
86
  "devDependencies": {
87
- "@spectrum-css/dialog": "^9.2.2"
87
+ "@spectrum-css/dialog": "^9.2.4"
88
88
  },
89
89
  "types": "./src/index.d.ts",
90
90
  "customElements": "custom-elements.json",
@@ -92,5 +92,5 @@
92
92
  "./sp-*.js",
93
93
  "./**/*.dev.js"
94
94
  ],
95
- "gitHead": "78c3f16b08c9133c9e5ca88d0c9fef5ea7d2ab87"
95
+ "gitHead": "c7ab5516e86d20194e92114afd04affa490b7248"
96
96
  }
package/src/Dialog.d.ts CHANGED
@@ -24,6 +24,7 @@ export declare class Dialog extends Dialog_base {
24
24
  closeButton?: CloseButton;
25
25
  error: boolean;
26
26
  dismissable: boolean;
27
+ dismissLabel: string;
27
28
  protected get hasFooter(): boolean;
28
29
  protected get hasButtons(): boolean;
29
30
  protected get hasHero(): boolean;
package/src/Dialog.dev.js CHANGED
@@ -35,6 +35,7 @@ export class Dialog extends ObserveSlotPresence(AlertDialog, [
35
35
  super(...arguments);
36
36
  this.error = false;
37
37
  this.dismissable = false;
38
+ this.dismissLabel = "Close";
38
39
  this.noDivider = false;
39
40
  }
40
41
  static get styles() {
@@ -86,7 +87,7 @@ export class Dialog extends ObserveSlotPresence(AlertDialog, [
86
87
  return html`
87
88
  <sp-close-button
88
89
  class="close-button"
89
- label="Close"
90
+ label=${this.dismissLabel}
90
91
  quiet
91
92
  size="m"
92
93
  @click=${this.close}
@@ -133,6 +134,9 @@ __decorateClass([
133
134
  __decorateClass([
134
135
  property({ type: Boolean, reflect: true })
135
136
  ], Dialog.prototype, "dismissable", 2);
137
+ __decorateClass([
138
+ property({ type: String, reflect: true, attribute: "dismiss-label" })
139
+ ], Dialog.prototype, "dismissLabel", 2);
136
140
  __decorateClass([
137
141
  property({ type: Boolean, reflect: true, attribute: "no-divider" })
138
142
  ], Dialog.prototype, "noDivider", 2);
@@ -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 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=\"Close\"\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;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;AAaH,SAAO,QAAQ;AAGf,SAAO,cAAc;AAgBrB,SAAO,YAAY;AAAA;AAAA,EA3BnB,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAWA,IAAc,YAAqB;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C,KAAK,MAAM;AACpC,WAAK,cAAc;AAAA,IACvB;AACA,QAAI,QAAQ,IAAI,aAAa,KAAK,KAAK,aAAa;AAChD,WAAK,cAAc,CAAC,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;AACJ;AAlHI;AAAA,EADC,MAAM,eAAe;AAAA,GATb,OAUT;AAGO;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAZjC,OAaF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAfjC,OAgBF;AAgBA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa,CAAC;AAAA,GA/B1D,OAgCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAlChC,OAmCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GArChC,OAsCF;",
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;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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c(s,e):s,p=u.length-1,d;p>=0;p--)(d=u[p])&&(t=(n?d(s,e,t):d(t))||t);return n&&t&&a(s,e,t),t};import{html as o,nothing as l}from"@spectrum-web-components/base";import{property as i,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.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`
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`
2
2
  <slot name="hero"></slot>
3
- `}renderFooter(){return o`
3
+ `}renderFooter(){return s`
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 o`
7
+ `}renderButtons(){const e={"button-group":!0,"button-group--noFooter":!this.hasFooter};return s`
8
8
  <sp-button-group class=${v(e)}>
9
9
  <slot name="button"></slot>
10
10
  </sp-button-group>
11
- `}renderDismiss(){return o`
11
+ `}renderDismiss(){return s`
12
12
  <sp-close-button
13
13
  class="close-button"
14
- label="Close"
14
+ label=${this.dismissLabel}
15
15
  quiet
16
16
  size="m"
17
17
  @click=${this.close}
18
18
  ></sp-close-button>
19
- `}render(){return o`
19
+ `}render(){return s`
20
20
  <div class="grid">
21
21
  ${this.renderHero()} ${this.renderHeading()}
22
- ${this.error?o`
22
+ ${this.error?s`
23
23
  <sp-icon-alert class="type-icon"></sp-icon-alert>
24
24
  `:l}
25
- ${this.noDivider?l:o`
25
+ ${this.noDivider?l:s`
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")}}r([m(".close-button")],Dialog.prototype,"closeButton",2),r([i({type:Boolean,reflect:!0})],Dialog.prototype,"error",2),r([i({type:Boolean,reflect:!0})],Dialog.prototype,"dismissable",2),r([i({type:Boolean,reflect:!0,attribute:"no-divider"})],Dialog.prototype,"noDivider",2),r([i({type:String,reflect:!0})],Dialog.prototype,"mode",2),r([i({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")}}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);
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 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=\"Close\"\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,uBAAAC,MAA2B,kCAEpC,OAAOC,MAAY,kBAEnB,OAAS,eAAAC,MAAmB,2DAC5B,OAAS,YAAAC,MAAgB,kDAYlB,aAAM,eAAeH,EAAoB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AQ,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,CAlHIC,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,2BAgBAQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GA/B1D,OAgCF,yBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAlChC,OAmCF,oBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GArChC,OAsCF",
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,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,kC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M,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",
6
6
  "names": ["html", "nothing", "property", "query", "ObserveSlotPresence", "styles", "AlertDialog", "classMap", "classes", "changes", "__decorateClass"]
7
7
  }
@@ -18,6 +18,7 @@ export declare class DialogWrapper extends DialogBase {
18
18
  error: boolean;
19
19
  cancelLabel: string;
20
20
  confirmLabel: string;
21
+ dismissLabel: string;
21
22
  footer: string;
22
23
  hero: string;
23
24
  heroLabel: string;
@@ -26,6 +26,7 @@ export class DialogWrapper extends DialogBase {
26
26
  this.error = false;
27
27
  this.cancelLabel = "";
28
28
  this.confirmLabel = "";
29
+ this.dismissLabel = "Close";
29
30
  this.footer = "";
30
31
  this.hero = "";
31
32
  this.heroLabel = "";
@@ -77,6 +78,7 @@ export class DialogWrapper extends DialogBase {
77
78
  return html`
78
79
  <sp-dialog
79
80
  ?dismissable=${this.dismissable}
81
+ dismiss-label=${this.dismissLabel}
80
82
  ?no-divider=${hideDivider}
81
83
  ?error=${this.error}
82
84
  mode=${ifDefined(this.mode)}
@@ -148,6 +150,9 @@ __decorateClass([
148
150
  __decorateClass([
149
151
  property({ attribute: "confirm-label" })
150
152
  ], DialogWrapper.prototype, "confirmLabel", 2);
153
+ __decorateClass([
154
+ property({ attribute: "dismiss-label" })
155
+ ], DialogWrapper.prototype, "dismissLabel", 2);
151
156
  __decorateClass([
152
157
  property()
153
158
  ], DialogWrapper.prototype, "footer", 2);
@@ -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()\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 ?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,SAAS;AAGhB,SAAO,OAAO;AAGd,SAAO,YAAY;AAGnB,SAAO,YAAY;AAMnB,SAAO,iBAAiB;AAGxB,SAAO,WAAW;AAAA;AAAA,EAhClB,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,MAAM;AAAA,EAC3B;AAAA,EAmCA,IAAuB,SAAiB;AACpC,WAAO,KAAK,WAAW,cAAc,WAAW;AAAA,EACpD;AAAA,EAEQ,iBAAuB;AAC3B,SAAK;AAAA,M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A,uCAKiB,KAAK,WAAW;AAAA;AAAA,gCAEvB,KAAK,WAAW;AAAA;AAAA,0BAG1B,OAAO;AAAA,kBACX,KAAK,iBACD;AAAA;AAAA;AAAA;AAAA;AAAA,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;AA3JW;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;AAAA,GAdD,cAeF;AAGA;AAAA,EADN,SAAS;AAAA,GAjBD,cAkBF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GApB5B,cAqBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa,CAAC;AAAA,GAvB1D,cAwBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA1BhC,cA2BF;AAGA;AAAA,EADN,SAAS,EAAE,WAAW,kBAAkB,CAAC;AAAA,GA7BjC,cA8BF;AAGA;AAAA,EADN,SAAS;AAAA,GAhCD,cAiCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GAnCnD,cAoCF;",
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;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEQ,eAAqB;AACzB,SAAK;AAAA,MACD,IAAI,MAAM,WAAW;AAAA,QACjB,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEmB,eAA+B;AAC9C,UAAM,cACF,KAAK,aACL,CAAC,KAAK,YACN,KAAK,uBAAuB;AAEhC,QAAI,MAAoB;AACpB,UAAI,CAAC,KAAK,UAAU;AAChB,eAAO,MAAM;AAAA,UACT;AAAA,UAC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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;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,33 @@
1
- "use strict";var h=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var e=(a,l,r,n)=>{for(var i=n>1?void 0:n?u(l,r):l,d=a.length-1,b;d>=0;d--)(b=a[d])&&(i=(n?b(l,r,i):b(i))||i);return n&&i&&h(l,r,i),i};import{html as o,nothing as s}from"@spectrum-web-components/base";import{property as t}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as c}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.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 o`
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`
2
2
  <sp-dialog
3
3
  ?dismissable=${this.dismissable}
4
+ dismiss-label=${this.dismissLabel}
4
5
  ?no-divider=${r}
5
6
  ?error=${this.error}
6
- mode=${c(this.mode)}
7
- size=${c(this.size)}
7
+ mode=${a(this.mode)}
8
+ size=${a(this.size)}
8
9
  >
9
- ${this.hero?o`
10
+ ${this.hero?s`
10
11
  <img
11
12
  src="${this.hero}"
12
13
  slot="hero"
13
- aria-hidden=${c(this.heroLabel?void 0:"true")}
14
- alt=${c(this.heroLabel?this.heroLabel:void 0)}
14
+ aria-hidden=${a(this.heroLabel?void 0:"true")}
15
+ alt=${a(this.heroLabel?this.heroLabel:void 0)}
15
16
  />
16
- `:s}
17
- ${this.headline?o`
17
+ `:l}
18
+ ${this.headline?s`
18
19
  <h2
19
20
  slot="heading"
20
21
  ?hidden=${this.headlineVisibility==="none"}
21
22
  >
22
23
  ${this.headline}
23
24
  </h2>
24
- `:s}
25
+ `:l}
25
26
  <slot></slot>
26
- ${this.footer?o`
27
+ ${this.footer?s`
27
28
  <div slot="footer">${this.footer}</div>
28
- `:s}
29
- ${this.cancelLabel?o`
29
+ `:l}
30
+ ${this.cancelLabel?s`
30
31
  <sp-button
31
32
  variant="secondary"
32
33
  treatment="outline"
@@ -35,8 +36,8 @@
35
36
  >
36
37
  ${this.cancelLabel}
37
38
  </sp-button>
38
- `:s}
39
- ${this.secondaryLabel?o`
39
+ `:l}
40
+ ${this.secondaryLabel?s`
40
41
  <sp-button
41
42
  variant="primary"
42
43
  treatment="outline"
@@ -45,8 +46,8 @@
45
46
  >
46
47
  ${this.secondaryLabel}
47
48
  </sp-button>
48
- `:s}
49
- ${this.confirmLabel?o`
49
+ `:l}
50
+ ${this.confirmLabel?s`
50
51
  <sp-button
51
52
  variant="accent"
52
53
  slot="button"
@@ -54,7 +55,7 @@
54
55
  >
55
56
  ${this.confirmLabel}
56
57
  </sp-button>
57
- `:s}
58
+ `:l}
58
59
  </sp-dialog>
59
- `}}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()],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);
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);
60
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()\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 ?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,kB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\"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,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,GAnClB,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,MAAM,CAC3B,CAsCA,IAAuB,QAAiB,CACpC,OAAO,KAAK,WAAW,cAAc,WAAW,CACpD,CAEQ,gBAAuB,CAC3B,KAAK,cACD,IAAI,MAAM,YAAa,CACnB,QAAS,EACb,CAAC,CACL,CACJ,CAEQ,aAAoB,CACxB,KAAK,cACD,IAAI,MAAM,SAAU,CAChB,QAAS,EACb,CAAC,CACL,CACJ,CAEQ,cAAqB,CACzB,KAAK,cACD,IAAI,MAAM,UAAW,CACjB,QAAS,EACb,CAAC,CACL,CACJ,CAEmB,cAA+B,CAC9C,MAAMC,EACF,KAAK,WACL,CAAC,KAAK,UACN,KAAK,qBAAuB,OAehC,OAAOL;AAAA;AAAA,+BAEgB,KAAK,WAAW;AAAA,gCACf,KAAK,YAAY;AAAA,8BACnBK,CAAW;AAAA,yBAChB,KAAK,KAAK;AAAA,uBACZF,EAAU,KAAK,IAAI,CAAC;AAAA,uBACpBA,EAAU,KAAK,IAAI,CAAC;AAAA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C,GAvB5B,cAwBF,yBAGAI,EAAA,CADNJ,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GA1B1D,cA2BF,yBAGAI,EAAA,CADNJ,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA7BhC,cA8BF,oBAGAI,EAAA,CADNJ,EAAS,CAAE,UAAW,iBAAkB,CAAC,GAhCjC,cAiCF,8BAGAI,EAAA,CADNJ,EAAS,GAnCD,cAoCF,wBAGAI,EAAA,CADNJ,EAAS,CAAE,KAAM,OAAQ,UAAW,qBAAsB,CAAC,GAtCnD,cAuCF",
6
6
  "names": ["html", "nothing", "property", "ifDefined", "DialogBase", "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;min-inline-size:var(--mod-dialog-min-inline-size,var(--spectrum-dialog-min-inline-size));max-height:inherit;outline:none;inline-size:fit-content;max-inline-size:100%;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]){height:var(--mod-dialog-confirm-hero-height,var(--spectrum-dialog-confirm-hero-height));border-top-left-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));border-top-right-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));background-position:50%;background-size:cover;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));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."". . . . . .";inline-size:100%;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{grid-area:divider;inline-size:100%;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-bottom: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%;height:100%}:host([mode=fullscreenTakeover]){inline-size:100%;border-radius:0;height:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height: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-height:none}:host([mode=fullscreen]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreenTakeover]) .button-group{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-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));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."". . . . . ."}: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 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 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-global-color-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{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."". . . . . ."}
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;min-inline-size:var(--mod-dialog-min-inline-size,var(--spectrum-dialog-min-inline-size));max-height:inherit;outline:none;inline-size:fit-content;max-inline-size:100%;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]){height:var(--mod-dialog-confirm-hero-height,var(--spectrum-dialog-confirm-hero-height));border-top-left-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));border-top-right-radius:var(--mod-dialog-confirm-border-radius,var(--spectrum-dialog-confirm-border-radius));background-position:50%;background-size:cover;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));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."". . . . . .";inline-size:100%;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{grid-area:divider;inline-size:100%;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-bottom: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%;height:100%}:host([mode=fullscreenTakeover]){inline-size:100%;border-radius:0;height:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height: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-height:none}:host([mode=fullscreen]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreenTakeover]) .button-group{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-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));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."". . . . . ."}: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 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 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{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."". . . . . ."}
5
5
  `;
6
6
  export default styles;
7
7
  //# sourceMappingURL=dialog.css.dev.js.map