@spectrum-web-components/dialog 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +46 -2
- package/package.json +13 -13
- package/src/DialogWrapper.d.ts +14 -0
- package/src/DialogWrapper.js +38 -3
- package/src/DialogWrapper.js.map +1 -1
- package/src/dialog.css.js +5 -5
- package/src/dialog.css.js.map +1 -1
- package/src/spectrum-dialog.css.js +5 -5
- package/src/spectrum-dialog.css.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -421,6 +421,19 @@
|
|
|
421
421
|
"default": "false",
|
|
422
422
|
"attribute": "responsive"
|
|
423
423
|
},
|
|
424
|
+
{
|
|
425
|
+
"kind": "field",
|
|
426
|
+
"name": "transitionPromise",
|
|
427
|
+
"privacy": "private"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"kind": "field",
|
|
431
|
+
"name": "resolveTransitionPromise",
|
|
432
|
+
"type": {
|
|
433
|
+
"text": "() => void"
|
|
434
|
+
},
|
|
435
|
+
"privacy": "private"
|
|
436
|
+
},
|
|
424
437
|
{
|
|
425
438
|
"kind": "field",
|
|
426
439
|
"name": "underlay",
|
|
@@ -498,6 +511,37 @@
|
|
|
498
511
|
"text": "void"
|
|
499
512
|
}
|
|
500
513
|
}
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"kind": "method",
|
|
517
|
+
"name": "handleUnderlayTransitionend",
|
|
518
|
+
"privacy": "protected",
|
|
519
|
+
"return": {
|
|
520
|
+
"type": {
|
|
521
|
+
"text": "void"
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"kind": "method",
|
|
527
|
+
"name": "handleModalTransitionend",
|
|
528
|
+
"privacy": "protected",
|
|
529
|
+
"return": {
|
|
530
|
+
"type": {
|
|
531
|
+
"text": "void"
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"kind": "method",
|
|
537
|
+
"name": "getUpdateComplete",
|
|
538
|
+
"privacy": "protected",
|
|
539
|
+
"return": {
|
|
540
|
+
"type": {
|
|
541
|
+
"text": "Promise<boolean>"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"description": "Bind the open/close transition into the update complete lifecycle so\nthat the overlay system can wait for it to be \"visibly ready\" before\nattempting to throw focus into the content contained herein. Not\nwaiting for this can cause small amounts of page scroll to happen\nwhile opening the Tray when focusable content is included: e.g. Menu\nelements whose selected Menu Item is not the first Menu Item."
|
|
501
545
|
}
|
|
502
546
|
],
|
|
503
547
|
"events": [
|
|
@@ -682,7 +726,7 @@
|
|
|
682
726
|
{
|
|
683
727
|
"kind": "variable",
|
|
684
728
|
"name": "styles",
|
|
685
|
-
"default": "css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height:none;max-width:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-height:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-top:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}.content{overflow:hidden}.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){height:auto;width:100%}\n`"
|
|
729
|
+
"default": "css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}.content{overflow:hidden}.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){height:auto;width:100%}\n`"
|
|
686
730
|
}
|
|
687
731
|
],
|
|
688
732
|
"exports": [
|
|
@@ -726,7 +770,7 @@
|
|
|
726
770
|
{
|
|
727
771
|
"kind": "variable",
|
|
728
772
|
"name": "styles",
|
|
729
|
-
"default": "css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height:none;max-width:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-height:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-top:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}\n`"
|
|
773
|
+
"default": "css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}\n`"
|
|
730
774
|
}
|
|
731
775
|
],
|
|
732
776
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/dialog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,26 +46,26 @@
|
|
|
46
46
|
"lit-html"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@spectrum-web-components/action-button": "^0.7.
|
|
49
|
+
"@spectrum-web-components/action-button": "^0.7.3",
|
|
50
50
|
"@spectrum-web-components/base": "^0.5.1",
|
|
51
|
-
"@spectrum-web-components/button": "^0.16.
|
|
52
|
-
"@spectrum-web-components/button-group": "^0.8.
|
|
53
|
-
"@spectrum-web-components/divider": "^0.4.
|
|
54
|
-
"@spectrum-web-components/icon": "^0.11.
|
|
55
|
-
"@spectrum-web-components/icons-ui": "^0.8.
|
|
56
|
-
"@spectrum-web-components/icons-workflow": "^0.8.
|
|
57
|
-
"@spectrum-web-components/modal": "^0.
|
|
58
|
-
"@spectrum-web-components/shared": "^0.13.
|
|
59
|
-
"@spectrum-web-components/underlay": "^0.8.
|
|
51
|
+
"@spectrum-web-components/button": "^0.16.3",
|
|
52
|
+
"@spectrum-web-components/button-group": "^0.8.2",
|
|
53
|
+
"@spectrum-web-components/divider": "^0.4.2",
|
|
54
|
+
"@spectrum-web-components/icon": "^0.11.2",
|
|
55
|
+
"@spectrum-web-components/icons-ui": "^0.8.2",
|
|
56
|
+
"@spectrum-web-components/icons-workflow": "^0.8.2",
|
|
57
|
+
"@spectrum-web-components/modal": "^0.6.0",
|
|
58
|
+
"@spectrum-web-components/shared": "^0.13.3",
|
|
59
|
+
"@spectrum-web-components/underlay": "^0.8.2",
|
|
60
60
|
"tslib": "^2.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@spectrum-css/dialog": "^
|
|
63
|
+
"@spectrum-css/dialog": "^5.0.0"
|
|
64
64
|
},
|
|
65
65
|
"types": "./src/index.d.ts",
|
|
66
66
|
"customElements": "custom-elements.json",
|
|
67
67
|
"sideEffects": [
|
|
68
68
|
"./sp-*.js"
|
|
69
69
|
],
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "f23b15ec952d7450272a8275524c905e028b4ddc"
|
|
71
71
|
}
|
package/src/DialogWrapper.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export declare class DialogWrapper extends DialogWrapper_base {
|
|
|
28
28
|
secondaryLabel: string;
|
|
29
29
|
headline: string;
|
|
30
30
|
responsive: boolean;
|
|
31
|
+
private transitionPromise;
|
|
32
|
+
private resolveTransitionPromise;
|
|
31
33
|
underlay: boolean;
|
|
32
34
|
private dialog;
|
|
33
35
|
focus(): void;
|
|
@@ -36,7 +38,19 @@ export declare class DialogWrapper extends DialogWrapper_base {
|
|
|
36
38
|
private clickCancel;
|
|
37
39
|
private clickConfirm;
|
|
38
40
|
close(): void;
|
|
41
|
+
protected handleUnderlayTransitionend(): void;
|
|
42
|
+
protected handleModalTransitionend(): void;
|
|
43
|
+
protected update(changes: PropertyValues<this>): void;
|
|
39
44
|
protected render(): TemplateResult;
|
|
40
45
|
protected updated(changes: PropertyValues<this>): void;
|
|
46
|
+
/**
|
|
47
|
+
* Bind the open/close transition into the update complete lifecycle so
|
|
48
|
+
* that the overlay system can wait for it to be "visibly ready" before
|
|
49
|
+
* attempting to throw focus into the content contained herein. Not
|
|
50
|
+
* waiting for this can cause small amounts of page scroll to happen
|
|
51
|
+
* while opening the Tray when focusable content is included: e.g. Menu
|
|
52
|
+
* elements whose selected Menu Item is not the first Menu Item.
|
|
53
|
+
*/
|
|
54
|
+
protected getUpdateComplete(): Promise<boolean>;
|
|
41
55
|
}
|
|
42
56
|
export {};
|
package/src/DialogWrapper.js
CHANGED
|
@@ -16,7 +16,8 @@ import { ifDefined } from '@spectrum-web-components/base/src/directives.js';
|
|
|
16
16
|
import '@spectrum-web-components/underlay/sp-underlay.js';
|
|
17
17
|
import '@spectrum-web-components/button/sp-button.js';
|
|
18
18
|
import '../sp-dialog.js';
|
|
19
|
-
import
|
|
19
|
+
import modalWrapperStyles from '@spectrum-web-components/modal/src/modal-wrapper.css.js';
|
|
20
|
+
import modalStyles from '@spectrum-web-components/modal/src/modal.css.js';
|
|
20
21
|
import { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared';
|
|
21
22
|
import { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.js';
|
|
22
23
|
/**
|
|
@@ -43,10 +44,11 @@ export class DialogWrapper extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
|
43
44
|
this.secondaryLabel = '';
|
|
44
45
|
this.headline = '';
|
|
45
46
|
this.responsive = false;
|
|
47
|
+
this.transitionPromise = Promise.resolve();
|
|
46
48
|
this.underlay = false;
|
|
47
49
|
}
|
|
48
50
|
static get styles() {
|
|
49
|
-
return [
|
|
51
|
+
return [modalWrapperStyles, modalStyles];
|
|
50
52
|
}
|
|
51
53
|
focus() {
|
|
52
54
|
if (this.shadowRoot) {
|
|
@@ -97,6 +99,22 @@ export class DialogWrapper extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
|
97
99
|
bubbles: true,
|
|
98
100
|
}));
|
|
99
101
|
}
|
|
102
|
+
handleUnderlayTransitionend() {
|
|
103
|
+
if (!this.open) {
|
|
104
|
+
this.resolveTransitionPromise();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
handleModalTransitionend() {
|
|
108
|
+
if (this.open || !this.underlay) {
|
|
109
|
+
this.resolveTransitionPromise();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
update(changes) {
|
|
113
|
+
if (changes.has('open') && changes.get('open') !== undefined) {
|
|
114
|
+
this.transitionPromise = new Promise((res) => (this.resolveTransitionPromise = res));
|
|
115
|
+
}
|
|
116
|
+
super.update(changes);
|
|
117
|
+
}
|
|
100
118
|
render() {
|
|
101
119
|
return html `
|
|
102
120
|
${this.underlay
|
|
@@ -104,10 +122,14 @@ export class DialogWrapper extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
|
104
122
|
<sp-underlay
|
|
105
123
|
?open=${this.open}
|
|
106
124
|
@click=${this.dismiss}
|
|
125
|
+
@transitionend=${this.handleUnderlayTransitionend}
|
|
107
126
|
></sp-underlay>
|
|
108
127
|
`
|
|
109
128
|
: html ``}
|
|
110
|
-
<div
|
|
129
|
+
<div
|
|
130
|
+
class="modal ${this.mode}"
|
|
131
|
+
@transitionend=${this.handleModalTransitionend}
|
|
132
|
+
>
|
|
111
133
|
<sp-dialog
|
|
112
134
|
?dismissable=${this.dismissable}
|
|
113
135
|
?no-divider=${this.noDivider}
|
|
@@ -183,6 +205,19 @@ export class DialogWrapper extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
|
183
205
|
});
|
|
184
206
|
}
|
|
185
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Bind the open/close transition into the update complete lifecycle so
|
|
210
|
+
* that the overlay system can wait for it to be "visibly ready" before
|
|
211
|
+
* attempting to throw focus into the content contained herein. Not
|
|
212
|
+
* waiting for this can cause small amounts of page scroll to happen
|
|
213
|
+
* while opening the Tray when focusable content is included: e.g. Menu
|
|
214
|
+
* elements whose selected Menu Item is not the first Menu Item.
|
|
215
|
+
*/
|
|
216
|
+
async getUpdateComplete() {
|
|
217
|
+
const complete = (await super.getUpdateComplete());
|
|
218
|
+
await this.transitionPromise;
|
|
219
|
+
return complete;
|
|
220
|
+
}
|
|
186
221
|
}
|
|
187
222
|
__decorate([
|
|
188
223
|
property({ type: Boolean, reflect: true })
|
package/src/DialogWrapper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogWrapper.js","sourceRoot":"","sources":["DialogWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EAEJ,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACH,QAAQ,EACR,KAAK,GACR,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAE5E,OAAO,kDAAkD,CAAC;AAC1D,OAAO,8CAA8C,CAAC;AAEtD,OAAO,iBAAiB,CAAC;AACzB,OAAO,MAAM,MAAM,iDAAiD,CAAC;AAErE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;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EAAE,IAAI,EAAE,CAAC;4CACtB;AAGrB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;kDAChB;AAGxB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;mDAChB;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAChB;AAG3B;IADC,QAAQ,EAAE;6CACQ;AAGnB;IADC,QAAQ,EAAE;2CACM;AAGjB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;gDAChB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;gDAC3C;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACvB;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACQ;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACZ;AAG9B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;qDAChB;AAG3B;IADC,QAAQ,EAAE;+CACU;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACF;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACJ;AAGxB;IADC,KAAK,CAAC,WAAW,CAAC;6CACK","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} 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\nimport '../sp-dialog.js';\nimport styles from '@spectrum-web-components/modal/src/modal.css.js';\nimport { Dialog } from './Dialog.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.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 FocusVisiblePolyfillMixin(SpectrumElement) {\n public static get styles(): CSSResultArray {\n return [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({ type: Boolean, reflect: true })\n public dismissable = false;\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: Boolean, reflect: true })\n public open = 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 @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: Boolean })\n public responsive = false;\n\n @property({ type: Boolean })\n public underlay = false;\n\n @query('sp-dialog')\n private dialog!: Dialog;\n\n public focus(): void {\n if (this.shadowRoot) {\n const firstFocusable = firstFocusableIn(this.shadowRoot);\n if (firstFocusable) {\n if (firstFocusable.updateComplete) {\n firstFocusable.updateComplete.then(() =>\n firstFocusable.focus()\n );\n /* c8 ignore next 3 */\n } else {\n firstFocusable.focus();\n }\n this.removeAttribute('tabindex');\n } else {\n this.dialog.focus();\n }\n /* c8 ignore next 3 */\n } else {\n super.focus();\n }\n }\n\n private dismiss(): void {\n if (!this.dismissable) {\n return;\n }\n this.close();\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 public close(): void {\n this.open = false;\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected render(): TemplateResult {\n return html`\n ${this.underlay\n ? html`\n <sp-underlay\n ?open=${this.open}\n @click=${this.dismiss}\n ></sp-underlay>\n `\n : html``}\n <div class=\"modal ${this.mode}\">\n <sp-dialog\n ?dismissable=${this.dismissable}\n ?no-divider=${this.noDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode ? this.mode : undefined)}\n size=${ifDefined(this.size ? this.size : undefined)}\n @close=${this.close}\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\n ? this.heroLabel\n : undefined\n )}\n />\n `\n : html``}\n ${this.headline\n ? html`\n <h2 slot=\"heading\">${this.headline}</h2>\n `\n : html``}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : html``}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : html``}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : html``}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"cta\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : html``}\n </sp-dialog>\n </div>\n `;\n }\n\n protected updated(changes: PropertyValues<this>): void {\n if (changes.has('open') && this.open) {\n this.dialog.updateComplete.then(() => {\n this.dialog.shouldManageTabOrderForScrolling();\n });\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DialogWrapper.js","sourceRoot":"","sources":["DialogWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EAEJ,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACH,QAAQ,EACR,KAAK,GACR,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAE5E,OAAO,kDAAkD,CAAC;AAC1D,OAAO,8CAA8C,CAAC;AAEtD,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,MAAM,yDAAyD,CAAC;AACzF,OAAO,WAAW,MAAM,iDAAiD,CAAC;AAE1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAE7F;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,yBAAyB,CAAC,eAAe,CAAC;IAA7E;;QAMW,UAAK,GAAG,KAAK,CAAC;QAGd,gBAAW,GAAG,EAAE,CAAC;QAGjB,iBAAY,GAA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EAAE,CAAC;gDAC3C;AAGzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACvB;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACQ;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACZ;AAG9B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;qDAChB;AAG3B;IADC,QAAQ,EAAE;+CACU;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDACF;AAO1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACJ;AAGxB;IADC,KAAK,CAAC,WAAW,CAAC;6CACK","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} 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\nimport '../sp-dialog.js';\nimport modalWrapperStyles from '@spectrum-web-components/modal/src/modal-wrapper.css.js';\nimport modalStyles from '@spectrum-web-components/modal/src/modal.css.js';\nimport { Dialog } from './Dialog.js';\nimport { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.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 FocusVisiblePolyfillMixin(SpectrumElement) {\n public static get styles(): CSSResultArray {\n return [modalWrapperStyles, modalStyles];\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({ type: Boolean, reflect: true })\n public dismissable = false;\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: Boolean, reflect: true })\n public open = 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 @property({ attribute: 'secondary-label' })\n public secondaryLabel = '';\n\n @property()\n public headline = '';\n\n @property({ type: Boolean })\n public responsive = false;\n\n private transitionPromise = Promise.resolve();\n\n private resolveTransitionPromise!: () => void;\n\n @property({ type: Boolean })\n public underlay = false;\n\n @query('sp-dialog')\n private dialog!: Dialog;\n\n public focus(): void {\n if (this.shadowRoot) {\n const firstFocusable = firstFocusableIn(this.shadowRoot);\n if (firstFocusable) {\n if (firstFocusable.updateComplete) {\n firstFocusable.updateComplete.then(() =>\n firstFocusable.focus()\n );\n /* c8 ignore next 3 */\n } else {\n firstFocusable.focus();\n }\n this.removeAttribute('tabindex');\n } else {\n this.dialog.focus();\n }\n /* c8 ignore next 3 */\n } else {\n super.focus();\n }\n }\n\n private dismiss(): void {\n if (!this.dismissable) {\n return;\n }\n this.close();\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 public close(): void {\n this.open = false;\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected handleUnderlayTransitionend(): void {\n if (!this.open) {\n this.resolveTransitionPromise();\n }\n }\n\n protected handleModalTransitionend(): void {\n if (this.open || !this.underlay) {\n this.resolveTransitionPromise();\n }\n }\n\n protected update(changes: PropertyValues<this>): void {\n if (changes.has('open') && changes.get('open') !== undefined) {\n this.transitionPromise = new Promise(\n (res) => (this.resolveTransitionPromise = res)\n );\n }\n super.update(changes);\n }\n\n protected render(): TemplateResult {\n return html`\n ${this.underlay\n ? html`\n <sp-underlay\n ?open=${this.open}\n @click=${this.dismiss}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n `\n : html``}\n <div\n class=\"modal ${this.mode}\"\n @transitionend=${this.handleModalTransitionend}\n >\n <sp-dialog\n ?dismissable=${this.dismissable}\n ?no-divider=${this.noDivider}\n ?error=${this.error}\n mode=${ifDefined(this.mode ? this.mode : undefined)}\n size=${ifDefined(this.size ? this.size : undefined)}\n @close=${this.close}\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\n ? this.heroLabel\n : undefined\n )}\n />\n `\n : html``}\n ${this.headline\n ? html`\n <h2 slot=\"heading\">${this.headline}</h2>\n `\n : html``}\n <slot></slot>\n ${this.footer\n ? html`\n <div slot=\"footer\">${this.footer}</div>\n `\n : html``}\n ${this.secondaryLabel\n ? html`\n <sp-button\n variant=\"primary\"\n slot=\"button\"\n @click=${this.clickSecondary}\n >\n ${this.secondaryLabel}\n </sp-button>\n `\n : html``}\n ${this.cancelLabel\n ? html`\n <sp-button\n variant=\"secondary\"\n slot=\"button\"\n @click=${this.clickCancel}\n >\n ${this.cancelLabel}\n </sp-button>\n `\n : html``}\n ${this.confirmLabel\n ? html`\n <sp-button\n variant=\"cta\"\n slot=\"button\"\n @click=${this.clickConfirm}\n >\n ${this.confirmLabel}\n </sp-button>\n `\n : html``}\n </sp-dialog>\n </div>\n `;\n }\n\n protected updated(changes: PropertyValues<this>): void {\n if (changes.has('open') && this.open) {\n this.dialog.updateComplete.then(() => {\n this.dialog.shouldManageTabOrderForScrolling();\n });\n }\n }\n\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n protected async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.transitionPromise;\n return complete;\n }\n}\n"]}
|
package/src/dialog.css.js
CHANGED
|
@@ -76,21 +76,21 @@ var(--spectrum-global-dimension-size-25)
|
|
|
76
76
|
--spectrum-dialog-confirm-close-button-padding
|
|
77
77
|
)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(
|
|
78
78
|
--spectrum-dialog-error-width,90%
|
|
79
|
-
)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=
|
|
79
|
+
)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:". . . . ." ". heading header buttonGroup ." ". divider divider divider ." ". content content content ." ". . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(
|
|
80
80
|
--spectrum-dialog-confirm-padding
|
|
81
81
|
);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(
|
|
82
82
|
--spectrum-dialog-confirm-padding
|
|
83
|
-
)}:host([mode=
|
|
83
|
+
)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(
|
|
84
84
|
--spectrum-dialog-fullscreen-header-text-size
|
|
85
|
-
)}:host([mode=
|
|
85
|
+
)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:"hero hero hero hero hero hero" ". . . . . ." ". heading heading heading typeIcon ." ". header header header header ." ". divider divider divider divider ." ". content content content content ." ". footer footer buttonGroup buttonGroup ." ". . . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
86
86
|
--spectrum-dialog-confirm-padding
|
|
87
87
|
)}:host([dismissable]) .grid{grid-template-areas:"hero hero hero hero hero hero hero" ". . . . . closeButton closeButton" ". heading heading heading typeIcon closeButton closeButton" ". header header header header header ." ". divider divider divider divider divider ." ". content content content content content ." ". footer footer buttonGroup buttonGroup buttonGroup ." ". . . . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
88
88
|
--spectrum-dialog-confirm-padding
|
|
89
|
-
)}.header{justify-content:flex-start}:host([mode=
|
|
89
|
+
)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:". . ." ". heading ." ". header ." ". divider ." ". content ." ". buttonGroup ." ". . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(
|
|
90
90
|
--spectrum-dialog-confirm-padding
|
|
91
91
|
);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
92
92
|
--spectrum-dialog-confirm-padding
|
|
93
|
-
)}:host([mode=
|
|
93
|
+
)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(
|
|
94
94
|
--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)
|
|
95
95
|
)}.content,.footer{color:var(
|
|
96
96
|
--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)
|
package/src/dialog.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.css.js","sourceRoot":"","sources":["dialog.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height:none;max-width:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-height:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-top:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}.content{overflow:hidden}.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){height:auto;width:100%}\n`;\nexport default styles;"]}
|
|
1
|
+
{"version":3,"file":"dialog.css.js","sourceRoot":"","sources":["dialog.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}.content{overflow:hidden}.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.content[tabindex]{overflow:auto}::slotted(img[slot=hero]){height:auto;width:100%}\n`;\nexport default styles;"]}
|
|
@@ -76,21 +76,21 @@ var(--spectrum-global-dimension-size-25)
|
|
|
76
76
|
--spectrum-dialog-confirm-close-button-padding
|
|
77
77
|
)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(
|
|
78
78
|
--spectrum-dialog-error-width,90%
|
|
79
|
-
)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=
|
|
79
|
+
)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:". . . . ." ". heading header buttonGroup ." ". divider divider divider ." ". content content content ." ". . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(
|
|
80
80
|
--spectrum-dialog-confirm-padding
|
|
81
81
|
);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(
|
|
82
82
|
--spectrum-dialog-confirm-padding
|
|
83
|
-
)}:host([mode=
|
|
83
|
+
)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(
|
|
84
84
|
--spectrum-dialog-fullscreen-header-text-size
|
|
85
|
-
)}:host([mode=
|
|
85
|
+
)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:"hero hero hero hero hero hero" ". . . . . ." ". heading heading heading typeIcon ." ". header header header header ." ". divider divider divider divider ." ". content content content content ." ". footer footer buttonGroup buttonGroup ." ". . . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
86
86
|
--spectrum-dialog-confirm-padding
|
|
87
87
|
)}:host([dismissable]) .grid{grid-template-areas:"hero hero hero hero hero hero hero" ". . . . . closeButton closeButton" ". heading heading heading typeIcon closeButton closeButton" ". header header header header header ." ". divider divider divider divider divider ." ". content content content content content ." ". footer footer buttonGroup buttonGroup buttonGroup ." ". . . . . . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
88
88
|
--spectrum-dialog-confirm-padding
|
|
89
|
-
)}.header{justify-content:flex-start}:host([mode=
|
|
89
|
+
)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:". . ." ". heading ." ". header ." ". divider ." ". content ." ". buttonGroup ." ". . .";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(
|
|
90
90
|
--spectrum-dialog-confirm-padding
|
|
91
91
|
);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
92
92
|
--spectrum-dialog-confirm-padding
|
|
93
|
-
)}:host([mode=
|
|
93
|
+
)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(
|
|
94
94
|
--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)
|
|
95
95
|
)}.content,.footer{color:var(
|
|
96
96
|
--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spectrum-dialog.css.js","sourceRoot":"","sources":["spectrum-dialog.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreen]),:host([mode=fullscreenTakeover]){max-height:none;max-width:none}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreen]) .content,:host([mode=fullscreenTakeover]) .content{max-height:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer{padding-top:0}:host([mode=fullscreen]) .footer,:host([mode=fullscreenTakeover]) .footer{display:none}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreen]) .grid,:host([mode=fullscreenTakeover]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreen]) .button-group,:host([mode=fullscreenTakeover]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreen]) ::slotted([slot=heading]),:host([mode=fullscreenTakeover]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}\n`;\nexport default styles;"]}
|
|
1
|
+
{"version":3,"file":"spectrum-dialog.css.js","sourceRoot":"","sources":["spectrum-dialog.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-dialog-fullscreen-header-text-size:28px;--spectrum-dialog-confirm-small-width:400px;--spectrum-dialog-confirm-medium-width:480px;--spectrum-dialog-confirm-large-width:640px;--spectrum-dialog-error-width:var(--spectrum-dialog-confirm-medium-width);--spectrum-dialog-confirm-hero-height:var(\n--spectrum-global-dimension-size-1600\n);--spectrum-dialog-confirm-description-padding:var(\n--spectrum-global-dimension-size-25\n);--spectrum-dialog-confirm-description-margin:calc(var(--spectrum-global-dimension-size-25)*-1);--spectrum-dialog-confirm-footer-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-gap-size:var(\n--spectrum-global-dimension-size-200\n);--spectrum-dialog-confirm-buttongroup-padding-top:var(\n--spectrum-global-dimension-static-size-500,40px\n);--spectrum-dialog-confirm-close-button-size:var(\n--spectrum-global-dimension-size-400\n);--spectrum-dialog-confirm-close-button-padding:calc(26px - var(--spectrum-global-dimension-size-175));--spectrum-dialog-confirm-divider-height:var(\n--spectrum-global-dimension-static-size-25,2px\n)}:host{box-sizing:border-box;display:flex;max-height:inherit;max-width:100%;min-width:var(\n--spectrum-dialog-confirm-min-width,var(--spectrum-global-dimension-static-size-3600)\n);outline:none;width:-moz-fit-content;width:fit-content}:host([size=s]){width:var(\n--spectrum-dialog-confirm-small-width\n)}:host([size=m]){width:var(\n--spectrum-dialog-confirm-medium-width\n)}:host([size=l]){width:var(\n--spectrum-dialog-confirm-large-width\n)}::slotted([slot=hero]){background-position:50%;background-size:cover;border-top-left-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);border-top-right-radius:var(\n--spectrum-dialog-confirm-border-radius,var(--spectrum-alias-component-border-radius)\n);grid-area:hero;height:var(--spectrum-dialog-confirm-hero-height);overflow:hidden}.grid{display:grid;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 .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n);width:100%}:host([dir=ltr]) ::slotted([slot=heading]){padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) ::slotted([slot=heading]){padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size);font-weight:var(\n--spectrum-dialog-confirm-title-text-font-weight,var(--spectrum-alias-heading-text-font-weight-regular)\n);grid-area:heading;line-height:var(\n--spectrum-dialog-confirm-title-text-line-height,var(--spectrum-alias-heading-text-line-height)\n);margin:0;outline:none}:host([dir=ltr]) .no-header::slotted([slot=heading]){padding-right:0}:host([dir=rtl]) .no-header::slotted([slot=heading]){padding-left:0}.no-header::slotted([slot=heading]){grid-area:heading-start/heading-start/header-end/header-end}.header{align-items:center;box-sizing:border-box;display:flex;grid-area:header;justify-content:flex-end;outline:none}.type-icon{grid-area:typeIcon}.divider{grid-area:divider;margin-bottom:var(\n--spectrum-dialog-confirm-divider-margin-bottom,var(--spectrum-global-dimension-static-size-200)\n);margin-top:var(\n--spectrum-dialog-confirm-divider-margin-top,var(--spectrum-global-dimension-static-size-150)\n);width:100%}:host([no-divider]) .divider{display:none}:host([no-divider]) ::slotted([slot=heading]){padding-bottom:calc(var(\n--spectrum-dialog-confirm-divider-margin-top,\nvar(--spectrum-global-dimension-static-size-150)\n) + var(\n--spectrum-dialog-confirm-divider-margin-bottom,\nvar(--spectrum-global-dimension-static-size-200)\n) + var(\n--spectrum-dialog-confirm-divider-height,\nvar(--spectrum-global-dimension-size-25)\n))}.content{-webkit-overflow-scrolling:touch;box-sizing:border-box;font-size:var(--spectrum-dialog-confirm-description-text-size);font-weight:var(\n--spectrum-dialog-confirm-description-text-font-weight,var(--spectrum-global-font-weight-regular)\n);grid-area:content;line-height:var(\n--spectrum-dialog-confirm-description-text-line-height,var(--spectrum-alias-component-text-line-height)\n);margin:0 var(--spectrum-dialog-confirm-description-margin);overflow-y:auto;padding:0 var(--spectrum-dialog-confirm-description-padding)}.content,.footer{outline:none}.footer{display:flex;flex-wrap:wrap;grid-area:footer;padding-top:var(--spectrum-dialog-confirm-footer-padding-top)}.footer>.button+.button,.footer>::slotted(*){margin-bottom:0}:host([dir=ltr]) .button-group{padding-left:var(\n--spectrum-dialog-confirm-gap-size\n)}:host([dir=rtl]) .button-group{padding-right:var(\n--spectrum-dialog-confirm-gap-size\n)}.button-group{display:flex;grid-area:buttonGroup;justify-content:flex-end;padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}.button-group.button-group--noFooter{grid-area:footer-start/footer-start/buttonGroup-end/buttonGroup-end}:host([dismissable]) .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 .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid .button-group{display:none}:host([dismissable]) .grid .footer{grid-area:footer/footer/buttonGroup/buttonGroup}:host([dir=ltr]) .close-button{margin-right:var(\n--spectrum-dialog-confirm-close-button-padding\n)}:host([dir=rtl]) .close-button{margin-left:var(\n--spectrum-dialog-confirm-close-button-padding\n)}.close-button{align-self:start;grid-area:closeButton;justify-self:end;margin-top:var(--spectrum-dialog-confirm-close-button-padding)}:host([error]){width:var(\n--spectrum-dialog-error-width,90%\n)}:host([mode=fullscreen]){height:100%;width:100%}:host([mode=fullscreenTakeover]){border-radius:0;height:100%;width:100%}:host([mode=fullscreenTakeover]),:host([mode=fullscreen]){max-height:none;max-width:none}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . . . .\" \". heading header buttonGroup .\" \". divider divider divider .\" \". content content content .\" \". . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr auto auto var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto 1fr var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(\n--spectrum-dialog-fullscreen-header-text-size\n)}:host([mode=fullscreenTakeover]) .content,:host([mode=fullscreen]) .content{max-height:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .button-group,:host([mode=fullscreen]) .footer{padding-top:0}:host([mode=fullscreenTakeover]) .footer,:host([mode=fullscreen]) .footer{display:none}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{align-self:start;grid-area:buttonGroup}@media screen and (max-width:700px){.grid{grid-template-areas:\"hero hero hero hero hero hero\" \". . . . . .\" \". heading heading heading typeIcon .\" \". header header header header .\" \". divider divider divider divider .\" \". content content content content .\" \". footer footer buttonGroup buttonGroup .\" \". . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([dismissable]) .grid{grid-template-areas:\"hero hero hero hero hero hero hero\" \". . . . . closeButton closeButton\" \". heading heading heading typeIcon closeButton closeButton\" \". header header header header header .\" \". divider divider divider divider divider .\" \". content content content content content .\" \". footer footer buttonGroup buttonGroup buttonGroup .\" \". . . . . . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) auto 1fr auto minmax(0,auto) minmax(0,var(--spectrum-dialog-confirm-close-button-size)) var(--spectrum-dialog-confirm-padding);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}.header{justify-content:flex-start}:host([mode=fullscreenTakeover]) .grid,:host([mode=fullscreen]) .grid{display:grid;grid-template-areas:\". . .\" \". heading .\" \". header .\" \". divider .\" \". content .\" \". buttonGroup .\" \". . .\";grid-template-columns:var(--spectrum-dialog-confirm-padding) 1fr var(\n--spectrum-dialog-confirm-padding\n);grid-template-rows:var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(\n--spectrum-dialog-confirm-padding\n)}:host([mode=fullscreenTakeover]) .button-group,:host([mode=fullscreen]) .button-group{padding-top:var(--spectrum-dialog-confirm-buttongroup-padding-top)}:host([mode=fullscreenTakeover]) ::slotted([slot=heading]),:host([mode=fullscreen]) ::slotted([slot=heading]){font-size:var(--spectrum-dialog-confirm-title-text-size)}}@media (forced-colors:active){:host{border:solid}}::slotted([slot=heading]){color:var(\n--spectrum-dialog-confirm-title-text-color,var(--spectrum-alias-heading-text-color)\n)}.content,.footer{color:var(\n--spectrum-dialog-confirm-description-text-color,var(--spectrum-global-color-gray-800)\n)}.type-icon{color:var(\n--spectrum-dialog-confirm-icon-color,var(--spectrum-global-color-gray-900)\n)}:host([error]) .type-icon{color:var(\n--spectrum-dialog-error-icon-color,var(--spectrum-semantic-negative-icon-color)\n)}\n`;\nexport default styles;"]}
|