@spectrum-web-components/dialog 0.10.1 → 0.10.4
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 +2 -2
- package/package.json +14 -14
- package/src/dialog.css.js +7 -3
- package/src/dialog.css.js.map +1 -1
- package/src/spectrum-dialog.css.js +7 -3
- package/src/spectrum-dialog.css.js.map +1 -1
- package/test/benchmark/basic-test.js +30 -0
- package/test/benchmark/basic-test.js.map +1 -0
- package/test/dialog-wrapper.test-vrt.js +15 -0
- package/test/dialog-wrapper.test-vrt.js.map +1 -0
- package/test/dialog-wrapper.test.js +159 -0
- package/test/dialog-wrapper.test.js.map +1 -0
- package/test/dialog.test-vrt.js +15 -0
- package/test/dialog.test-vrt.js.map +1 -0
- package/test/dialog.test.js +55 -0
- package/test/dialog.test.js.map +1 -0
package/custom-elements.json
CHANGED
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
{
|
|
825
825
|
"kind": "variable",
|
|
826
826
|
"name": "styles",
|
|
827
|
-
"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`"
|
|
827
|
+
"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(\n--spectrum-dialog-confirm-padding\n);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(\n--spectrum-dialog-confirm-padding\n);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`"
|
|
828
828
|
}
|
|
829
829
|
],
|
|
830
830
|
"exports": [
|
|
@@ -868,7 +868,7 @@
|
|
|
868
868
|
{
|
|
869
869
|
"kind": "variable",
|
|
870
870
|
"name": "styles",
|
|
871
|
-
"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`"
|
|
871
|
+
"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(\n--spectrum-dialog-confirm-padding\n);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(\n--spectrum-dialog-confirm-padding\n);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`"
|
|
872
872
|
}
|
|
873
873
|
],
|
|
874
874
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/dialog",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
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.8.
|
|
50
|
-
"@spectrum-web-components/base": "^0.5.
|
|
51
|
-
"@spectrum-web-components/button": "^0.17.
|
|
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.6.
|
|
58
|
-
"@spectrum-web-components/shared": "^0.
|
|
59
|
-
"@spectrum-web-components/underlay": "^0.8.
|
|
49
|
+
"@spectrum-web-components/action-button": "^0.8.4",
|
|
50
|
+
"@spectrum-web-components/base": "^0.5.6",
|
|
51
|
+
"@spectrum-web-components/button": "^0.17.4",
|
|
52
|
+
"@spectrum-web-components/button-group": "^0.8.7",
|
|
53
|
+
"@spectrum-web-components/divider": "^0.4.7",
|
|
54
|
+
"@spectrum-web-components/icon": "^0.11.7",
|
|
55
|
+
"@spectrum-web-components/icons-ui": "^0.8.7",
|
|
56
|
+
"@spectrum-web-components/icons-workflow": "^0.8.7",
|
|
57
|
+
"@spectrum-web-components/modal": "^0.6.6",
|
|
58
|
+
"@spectrum-web-components/shared": "^0.14.1",
|
|
59
|
+
"@spectrum-web-components/underlay": "^0.8.7",
|
|
60
60
|
"tslib": "^2.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@spectrum-css/dialog": "^6.0.
|
|
63
|
+
"@spectrum-css/dialog": "^6.0.10"
|
|
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": "32e049a0da090ffc1a54cfe3234be4d5efc73339"
|
|
71
71
|
}
|
package/src/dialog.css.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright
|
|
2
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
3
3
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -68,7 +68,9 @@ var(--spectrum-global-dimension-size-25)
|
|
|
68
68
|
--spectrum-dialog-confirm-gap-size
|
|
69
69
|
)}:host([dir=rtl]) .button-group{padding-right:var(
|
|
70
70
|
--spectrum-dialog-confirm-gap-size
|
|
71
|
-
)}.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(
|
|
71
|
+
)}.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(
|
|
72
|
+
--spectrum-dialog-confirm-padding
|
|
73
|
+
);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(
|
|
72
74
|
--spectrum-dialog-confirm-padding
|
|
73
75
|
)}: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(
|
|
74
76
|
--spectrum-dialog-confirm-close-button-padding
|
|
@@ -84,7 +86,9 @@ var(--spectrum-global-dimension-size-25)
|
|
|
84
86
|
--spectrum-dialog-fullscreen-header-text-size
|
|
85
87
|
)}: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
88
|
--spectrum-dialog-confirm-padding
|
|
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(
|
|
89
|
+
)}: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(
|
|
90
|
+
--spectrum-dialog-confirm-padding
|
|
91
|
+
);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
88
92
|
--spectrum-dialog-confirm-padding
|
|
89
93
|
)}.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
94
|
--spectrum-dialog-confirm-padding
|
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=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;"]}
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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(\n--spectrum-dialog-confirm-padding\n);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(\n--spectrum-dialog-confirm-padding\n);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;"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright
|
|
2
|
+
Copyright 2022 Adobe. All rights reserved.
|
|
3
3
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -68,7 +68,9 @@ var(--spectrum-global-dimension-size-25)
|
|
|
68
68
|
--spectrum-dialog-confirm-gap-size
|
|
69
69
|
)}:host([dir=rtl]) .button-group{padding-right:var(
|
|
70
70
|
--spectrum-dialog-confirm-gap-size
|
|
71
|
-
)}.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(
|
|
71
|
+
)}.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(
|
|
72
|
+
--spectrum-dialog-confirm-padding
|
|
73
|
+
);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto 1fr auto var(
|
|
72
74
|
--spectrum-dialog-confirm-padding
|
|
73
75
|
)}: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(
|
|
74
76
|
--spectrum-dialog-confirm-close-button-padding
|
|
@@ -84,7 +86,9 @@ var(--spectrum-global-dimension-size-25)
|
|
|
84
86
|
--spectrum-dialog-fullscreen-header-text-size
|
|
85
87
|
)}: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
88
|
--spectrum-dialog-confirm-padding
|
|
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(
|
|
89
|
+
)}: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(
|
|
90
|
+
--spectrum-dialog-confirm-padding
|
|
91
|
+
);grid-template-rows:auto var(--spectrum-dialog-confirm-padding) auto auto auto 1fr auto var(
|
|
88
92
|
--spectrum-dialog-confirm-padding
|
|
89
93
|
)}.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
94
|
--spectrum-dialog-confirm-padding
|
|
@@ -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=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;"]}
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2022 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(\n--spectrum-dialog-confirm-padding\n);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(\n--spectrum-dialog-confirm-padding\n);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;"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import '@spectrum-web-components/dialog/sp-dialog.js';
|
|
13
|
+
import { html } from 'lit';
|
|
14
|
+
import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
|
|
15
|
+
measureFixtureCreation(html `
|
|
16
|
+
<sp-dialog size="s">
|
|
17
|
+
<h2 slot="heading">Disclaimer</h2>
|
|
18
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
19
|
+
tempor incididunt ut labore et dolore magna aliqua. Auctor augue mauris
|
|
20
|
+
augue neque gravida. Libero volutpat sed ornare arcu. Quisque egestas
|
|
21
|
+
diam in arcu cursus euismod quis viverra. Posuere ac ut consequat semper
|
|
22
|
+
viverra nam libero justo laoreet. Enim ut tellus elementum sagittis
|
|
23
|
+
vitae et leo duis ut. Neque laoreet suspendisse interdum consectetur
|
|
24
|
+
libero id faucibus nisl. Diam volutpat commodo sed egestas egestas.
|
|
25
|
+
Dolor magna eget est lorem ipsum dolor. Vitae suscipit tellus mauris a
|
|
26
|
+
diam maecenas sed. Turpis in eu mi bibendum neque egestas congue.
|
|
27
|
+
Rhoncus est pellentesque elit ullamcorper dignissim cras lobortis.
|
|
28
|
+
</sp-dialog>
|
|
29
|
+
`);
|
|
30
|
+
//# sourceMappingURL=basic-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-test.js","sourceRoot":"","sources":["basic-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,8CAA8C,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,sBAAsB,CAAC,IAAI,CAAA;;;;;;;;;;;;;;CAc1B,CAAC,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*/\n\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-dialog size=\"s\">\n <h2 slot=\"heading\">Disclaimer</h2>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Auctor augue mauris\n augue neque gravida. Libero volutpat sed ornare arcu. Quisque egestas\n diam in arcu cursus euismod quis viverra. Posuere ac ut consequat semper\n viverra nam libero justo laoreet. Enim ut tellus elementum sagittis\n vitae et leo duis ut. Neque laoreet suspendisse interdum consectetur\n libero id faucibus nisl. Diam volutpat commodo sed egestas egestas.\n Dolor magna eget est lorem ipsum dolor. Vitae suscipit tellus mauris a\n diam maecenas sed. Turpis in eu mi bibendum neque egestas congue.\n Rhoncus est pellentesque elit ullamcorper dignissim cras lobortis.\n </sp-dialog>\n`);\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import * as stories from '../stories/dialog-wrapper.stories.js';
|
|
13
|
+
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
+
regressVisuals('DialogWrapperStories', stories);
|
|
15
|
+
//# sourceMappingURL=dialog-wrapper.test-vrt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-wrapper.test-vrt.js","sourceRoot":"","sources":["dialog-wrapper.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,sBAAsB,EAAE,OAAO,CAAC,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*/\n\nimport * as stories from '../stories/dialog-wrapper.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('DialogWrapperStories', stories);\n"]}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { elementUpdated, expect, fixture, oneEvent } from '@open-wc/testing';
|
|
13
|
+
import { spy } from 'sinon';
|
|
14
|
+
import '@spectrum-web-components/theme/sp-theme.js';
|
|
15
|
+
import '@spectrum-web-components/theme/src/themes.js';
|
|
16
|
+
import '../sp-dialog-wrapper.js';
|
|
17
|
+
import { longContent, wrapperButtons, wrapperButtonsUnderlay, wrapperDismissable, wrapperDismissableUnderlayError, wrapperFullscreen, wrapperLabeledHero, } from '../stories/dialog-wrapper.stories.js';
|
|
18
|
+
import { html } from '@spectrum-web-components/base';
|
|
19
|
+
async function styledFixture(story) {
|
|
20
|
+
const test = await fixture(html `
|
|
21
|
+
<sp-theme theme="classic" scale="medium" color="dark">
|
|
22
|
+
${story}
|
|
23
|
+
</sp-theme>
|
|
24
|
+
`);
|
|
25
|
+
return test.children[0];
|
|
26
|
+
}
|
|
27
|
+
describe('Dialog Wrapper', () => {
|
|
28
|
+
it('loads wrapped dialog accessibly', async () => {
|
|
29
|
+
const el = await styledFixture(wrapperDismissable());
|
|
30
|
+
await elementUpdated(el);
|
|
31
|
+
await expect(el).to.be.accessible();
|
|
32
|
+
});
|
|
33
|
+
it('loads labeled hero dialog accessibly', async () => {
|
|
34
|
+
const el = await styledFixture(wrapperLabeledHero());
|
|
35
|
+
await elementUpdated(el);
|
|
36
|
+
await expect(el).to.be.accessible();
|
|
37
|
+
});
|
|
38
|
+
it('loads fullscreen wrapped dialog accessibly', async () => {
|
|
39
|
+
const el = await styledFixture(wrapperFullscreen());
|
|
40
|
+
await elementUpdated(el);
|
|
41
|
+
await expect(el).to.be.accessible();
|
|
42
|
+
});
|
|
43
|
+
xit('loads with underlay and no headline accessibly', async () => {
|
|
44
|
+
const el = await styledFixture(wrapperButtonsUnderlay());
|
|
45
|
+
await elementUpdated(el);
|
|
46
|
+
el.headline = '';
|
|
47
|
+
await elementUpdated(el);
|
|
48
|
+
await expect(el).to.be.accessible();
|
|
49
|
+
});
|
|
50
|
+
it('opens and closes', async () => {
|
|
51
|
+
const test = await styledFixture(longContent());
|
|
52
|
+
const el = test.querySelector('sp-dialog-wrapper');
|
|
53
|
+
await elementUpdated(el);
|
|
54
|
+
const opened = oneEvent(test, 'sp-opened');
|
|
55
|
+
test.open = 'click';
|
|
56
|
+
await opened;
|
|
57
|
+
expect(el.open).to.be.true;
|
|
58
|
+
const closed = oneEvent(test, 'sp-closed');
|
|
59
|
+
test.open = undefined;
|
|
60
|
+
await closed;
|
|
61
|
+
expect(el.open).to.be.false;
|
|
62
|
+
});
|
|
63
|
+
it('dismisses via clicking the underlay when [dismissable]', async () => {
|
|
64
|
+
const test = await styledFixture(wrapperDismissableUnderlayError());
|
|
65
|
+
const el = test.querySelector('sp-dialog-wrapper');
|
|
66
|
+
await elementUpdated(el);
|
|
67
|
+
expect(el.open).to.be.true;
|
|
68
|
+
el.dismissable = true;
|
|
69
|
+
const underlay = el.shadowRoot.querySelector('sp-underlay');
|
|
70
|
+
underlay.click();
|
|
71
|
+
await elementUpdated(el);
|
|
72
|
+
expect(el.open).to.be.false;
|
|
73
|
+
});
|
|
74
|
+
it('does not dismiss via clicking the underlay :not([dismissable])', async () => {
|
|
75
|
+
const el = await styledFixture(wrapperButtonsUnderlay());
|
|
76
|
+
await elementUpdated(el);
|
|
77
|
+
expect(el.open).to.be.true;
|
|
78
|
+
const underlay = el.shadowRoot.querySelector('sp-underlay');
|
|
79
|
+
underlay.click();
|
|
80
|
+
await elementUpdated(el);
|
|
81
|
+
expect(el.open).to.be.true;
|
|
82
|
+
});
|
|
83
|
+
it('dismisses', async () => {
|
|
84
|
+
const el = await styledFixture(wrapperDismissable());
|
|
85
|
+
await elementUpdated(el);
|
|
86
|
+
expect(el.open).to.be.true;
|
|
87
|
+
const root = el.shadowRoot ? el.shadowRoot : el;
|
|
88
|
+
const dialog = root.querySelector('sp-dialog');
|
|
89
|
+
const dialogRoot = dialog.shadowRoot ? dialog.shadowRoot : dialog;
|
|
90
|
+
const dismissButton = dialogRoot.querySelector('.close-button');
|
|
91
|
+
dismissButton.click();
|
|
92
|
+
await elementUpdated(el);
|
|
93
|
+
expect(el.open).to.be.false;
|
|
94
|
+
});
|
|
95
|
+
it('manages entry focus - dismissable', async () => {
|
|
96
|
+
const el = await styledFixture(wrapperDismissable());
|
|
97
|
+
await elementUpdated(el);
|
|
98
|
+
expect(el.open).to.be.true;
|
|
99
|
+
expect(document.activeElement !== el, 'no focused').to.be.true;
|
|
100
|
+
const dialog = el.shadowRoot.querySelector('sp-dialog');
|
|
101
|
+
const dialogRoot = dialog.shadowRoot ? dialog.shadowRoot : dialog;
|
|
102
|
+
const dismissButton = dialogRoot.querySelector('.close-button');
|
|
103
|
+
el.focus();
|
|
104
|
+
await elementUpdated(el);
|
|
105
|
+
expect(document.activeElement === el, `focused generally, ${document.activeElement}`).to.be.true;
|
|
106
|
+
expect(dismissButton.getRootNode().activeElement !==
|
|
107
|
+
dismissButton, `does not focus specifically, ${dismissButton.getRootNode().activeElement}`).to.be.true;
|
|
108
|
+
dismissButton.click();
|
|
109
|
+
await elementUpdated(el);
|
|
110
|
+
expect(el.open).to.be.false;
|
|
111
|
+
});
|
|
112
|
+
it('manages entry focus - buttons', async () => {
|
|
113
|
+
var _a;
|
|
114
|
+
const el = await styledFixture(wrapperButtons());
|
|
115
|
+
await elementUpdated(el);
|
|
116
|
+
expect(el.open).to.be.true;
|
|
117
|
+
expect(document.activeElement !== el, 'no focused').to.be.true;
|
|
118
|
+
const button = el.shadowRoot.querySelector('sp-button');
|
|
119
|
+
el.focus();
|
|
120
|
+
await elementUpdated(el);
|
|
121
|
+
expect(document.activeElement === el, `focused generally, ${document.activeElement}`).to.be.true;
|
|
122
|
+
expect(button.getRootNode().activeElement === button, `focused specifically, ${(_a = button.getRootNode().activeElement) === null || _a === void 0 ? void 0 : _a.outerHTML}`).to.be.true;
|
|
123
|
+
});
|
|
124
|
+
it('dispatches `confirm`, `cancel` and `secondary`', async () => {
|
|
125
|
+
const confirmSpy = spy();
|
|
126
|
+
const cancelSpy = spy();
|
|
127
|
+
const secondarySpy = spy();
|
|
128
|
+
const handleConfirm = () => confirmSpy();
|
|
129
|
+
const handleCancel = () => cancelSpy();
|
|
130
|
+
const handleSecondary = () => secondarySpy();
|
|
131
|
+
const el = await styledFixture(wrapperButtons());
|
|
132
|
+
el.addEventListener('confirm', handleConfirm);
|
|
133
|
+
el.addEventListener('cancel', handleCancel);
|
|
134
|
+
el.addEventListener('secondary', handleSecondary);
|
|
135
|
+
await elementUpdated(el);
|
|
136
|
+
expect(confirmSpy.called).to.be.false;
|
|
137
|
+
expect(cancelSpy.called).to.be.false;
|
|
138
|
+
expect(secondarySpy.called).to.be.false;
|
|
139
|
+
const accentButton = el.shadowRoot.querySelector('[variant="accent"]');
|
|
140
|
+
const primaryButton = el.shadowRoot.querySelector('[variant="primary"]');
|
|
141
|
+
const secondaryButton = el.shadowRoot.querySelector('[variant="secondary"]');
|
|
142
|
+
accentButton.click();
|
|
143
|
+
await elementUpdated(el);
|
|
144
|
+
expect(confirmSpy.called, 'dispatched `confirm`').to.be.true;
|
|
145
|
+
expect(secondarySpy.called).to.be.false;
|
|
146
|
+
expect(cancelSpy.called).to.be.false;
|
|
147
|
+
primaryButton.click();
|
|
148
|
+
await elementUpdated(el);
|
|
149
|
+
expect(confirmSpy.callCount).to.equal(1);
|
|
150
|
+
expect(secondarySpy.called, 'dispatched `cancel`').to.be.true;
|
|
151
|
+
expect(cancelSpy.called).to.be.false;
|
|
152
|
+
secondaryButton.click();
|
|
153
|
+
await elementUpdated(el);
|
|
154
|
+
expect(confirmSpy.callCount).to.equal(1);
|
|
155
|
+
expect(secondarySpy.callCount).to.equal(1);
|
|
156
|
+
expect(cancelSpy.called, 'dispatched `secondary`').to.be.true;
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=dialog-wrapper.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-wrapper.test.js","sourceRoot":"","sources":["dialog-wrapper.test.ts"],"names":[],"mappings":"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","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 { elementUpdated, expect, fixture, oneEvent } from '@open-wc/testing';\nimport { spy } from 'sinon';\n\nimport '@spectrum-web-components/theme/sp-theme.js';\nimport '@spectrum-web-components/theme/src/themes.js';\nimport '../sp-dialog-wrapper.js';\nimport { Dialog, DialogWrapper } from '../';\nimport { ActionButton } from '@spectrum-web-components/action-button';\nimport { Button } from '@spectrum-web-components/button';\nimport { Underlay } from '@spectrum-web-components/underlay';\nimport {\n longContent,\n wrapperButtons,\n wrapperButtonsUnderlay,\n wrapperDismissable,\n wrapperDismissableUnderlayError,\n wrapperFullscreen,\n wrapperLabeledHero,\n} from '../stories/dialog-wrapper.stories.js';\nimport { OverlayTrigger } from '@spectrum-web-components/overlay';\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { Theme } from '@spectrum-web-components/theme';\n\nasync function styledFixture<T extends Element>(\n story: TemplateResult\n): Promise<T> {\n const test = await fixture<Theme>(html`\n <sp-theme theme=\"classic\" scale=\"medium\" color=\"dark\">\n ${story}\n </sp-theme>\n `);\n return test.children[0] as T;\n}\n\ndescribe('Dialog Wrapper', () => {\n it('loads wrapped dialog accessibly', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperDismissable());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads labeled hero dialog accessibly', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperLabeledHero());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads fullscreen wrapped dialog accessibly', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperFullscreen());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n xit('loads with underlay and no headline accessibly', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperButtonsUnderlay());\n await elementUpdated(el);\n el.headline = '';\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n });\n it('opens and closes', async () => {\n const test = await styledFixture<OverlayTrigger>(longContent());\n const el = test.querySelector('sp-dialog-wrapper') as DialogWrapper;\n\n await elementUpdated(el);\n\n const opened = oneEvent(test, 'sp-opened');\n test.open = 'click';\n await opened;\n\n expect(el.open).to.be.true;\n\n const closed = oneEvent(test, 'sp-closed');\n test.open = undefined;\n await closed;\n\n expect(el.open).to.be.false;\n });\n it('dismisses via clicking the underlay when [dismissable]', async () => {\n const test = await styledFixture<DialogWrapper>(\n wrapperDismissableUnderlayError()\n );\n const el = test.querySelector('sp-dialog-wrapper') as DialogWrapper;\n await elementUpdated(el);\n expect(el.open).to.be.true;\n el.dismissable = true;\n const underlay = el.shadowRoot.querySelector('sp-underlay') as Underlay;\n underlay.click();\n await elementUpdated(el);\n expect(el.open).to.be.false;\n });\n it('does not dismiss via clicking the underlay :not([dismissable])', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperButtonsUnderlay());\n await elementUpdated(el);\n expect(el.open).to.be.true;\n const underlay = el.shadowRoot.querySelector('sp-underlay') as Underlay;\n underlay.click();\n await elementUpdated(el);\n expect(el.open).to.be.true;\n });\n it('dismisses', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperDismissable());\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n\n const root = el.shadowRoot ? el.shadowRoot : el;\n const dialog = root.querySelector('sp-dialog') as Dialog;\n const dialogRoot = dialog.shadowRoot ? dialog.shadowRoot : dialog;\n const dismissButton = dialogRoot.querySelector(\n '.close-button'\n ) as HTMLButtonElement;\n dismissButton.click();\n\n await elementUpdated(el);\n expect(el.open).to.be.false;\n });\n it('manages entry focus - dismissable', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperDismissable());\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n expect(document.activeElement !== el, 'no focused').to.be.true;\n\n const dialog = el.shadowRoot.querySelector('sp-dialog') as Dialog;\n const dialogRoot = dialog.shadowRoot ? dialog.shadowRoot : dialog;\n const dismissButton = dialogRoot.querySelector(\n '.close-button'\n ) as ActionButton;\n\n el.focus();\n await elementUpdated(el);\n expect(\n document.activeElement === el,\n `focused generally, ${document.activeElement}`\n ).to.be.true;\n expect(\n (dismissButton.getRootNode() as Document).activeElement !==\n dismissButton,\n `does not focus specifically, ${\n (dismissButton.getRootNode() as Document).activeElement\n }`\n ).to.be.true;\n\n dismissButton.click();\n await elementUpdated(el);\n expect(el.open).to.be.false;\n });\n it('manages entry focus - buttons', async () => {\n const el = await styledFixture<DialogWrapper>(wrapperButtons());\n\n await elementUpdated(el);\n expect(el.open).to.be.true;\n expect(document.activeElement !== el, 'no focused').to.be.true;\n\n const button = el.shadowRoot.querySelector('sp-button') as Button;\n\n el.focus();\n await elementUpdated(el);\n expect(\n document.activeElement === el,\n `focused generally, ${document.activeElement}`\n ).to.be.true;\n expect(\n (button.getRootNode() as Document).activeElement === button,\n `focused specifically, ${\n (button.getRootNode() as Document).activeElement?.outerHTML\n }`\n ).to.be.true;\n });\n it('dispatches `confirm`, `cancel` and `secondary`', async () => {\n const confirmSpy = spy();\n const cancelSpy = spy();\n const secondarySpy = spy();\n const handleConfirm = (): void => confirmSpy();\n const handleCancel = (): void => cancelSpy();\n const handleSecondary = (): void => secondarySpy();\n const el = await styledFixture<DialogWrapper>(wrapperButtons());\n el.addEventListener('confirm', handleConfirm);\n el.addEventListener('cancel', handleCancel);\n el.addEventListener('secondary', handleSecondary);\n\n await elementUpdated(el);\n expect(confirmSpy.called).to.be.false;\n expect(cancelSpy.called).to.be.false;\n expect(secondarySpy.called).to.be.false;\n\n const accentButton = el.shadowRoot.querySelector(\n '[variant=\"accent\"]'\n ) as Button;\n const primaryButton = el.shadowRoot.querySelector(\n '[variant=\"primary\"]'\n ) as Button;\n const secondaryButton = el.shadowRoot.querySelector(\n '[variant=\"secondary\"]'\n ) as Button;\n\n accentButton.click();\n\n await elementUpdated(el);\n expect(confirmSpy.called, 'dispatched `confirm`').to.be.true;\n expect(secondarySpy.called).to.be.false;\n expect(cancelSpy.called).to.be.false;\n\n primaryButton.click();\n\n await elementUpdated(el);\n expect(confirmSpy.callCount).to.equal(1);\n expect(secondarySpy.called, 'dispatched `cancel`').to.be.true;\n expect(cancelSpy.called).to.be.false;\n\n secondaryButton.click();\n\n await elementUpdated(el);\n expect(confirmSpy.callCount).to.equal(1);\n expect(secondarySpy.callCount).to.equal(1);\n expect(cancelSpy.called, 'dispatched `secondary`').to.be.true;\n });\n});\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import * as stories from '../stories/dialog.stories.js';
|
|
13
|
+
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
+
regressVisuals('DialogStories', stories);
|
|
15
|
+
//# sourceMappingURL=dialog.test-vrt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.test-vrt.js","sourceRoot":"","sources":["dialog.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,eAAe,EAAE,OAAO,CAAC,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*/\n\nimport * as stories from '../stories/dialog.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('DialogStories', stories);\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { elementUpdated, expect, fixture } from '@open-wc/testing';
|
|
13
|
+
import '../sp-dialog.js';
|
|
14
|
+
import { alertError, dismissable, fullscreen, small, } from '../stories/dialog.stories.js';
|
|
15
|
+
import { spy } from 'sinon';
|
|
16
|
+
describe('Dialog', () => {
|
|
17
|
+
it('loads `[size=small]` dialog accessibly', async () => {
|
|
18
|
+
const el = await fixture(small());
|
|
19
|
+
await elementUpdated(el);
|
|
20
|
+
await expect(el).to.be.accessible();
|
|
21
|
+
});
|
|
22
|
+
it('loads `[size=alert]` dialog accessibly', async () => {
|
|
23
|
+
const el = await fixture(alertError());
|
|
24
|
+
await elementUpdated(el);
|
|
25
|
+
await expect(el).to.be.accessible();
|
|
26
|
+
});
|
|
27
|
+
it('loads `[dismissable]` dialog accessibly', async () => {
|
|
28
|
+
const el = await fixture(dismissable());
|
|
29
|
+
await elementUpdated(el);
|
|
30
|
+
await expect(el).to.be.accessible();
|
|
31
|
+
});
|
|
32
|
+
it('loads `[mode=fullscreen]` dialog accessibly', async () => {
|
|
33
|
+
const el = await fixture(fullscreen());
|
|
34
|
+
await elementUpdated(el);
|
|
35
|
+
await expect(el).to.be.accessible();
|
|
36
|
+
});
|
|
37
|
+
it('loads dialog without footer accessibly', async () => {
|
|
38
|
+
const el = await fixture(small());
|
|
39
|
+
await elementUpdated(el);
|
|
40
|
+
await expect(el).to.be.accessible();
|
|
41
|
+
});
|
|
42
|
+
it('closes', async () => {
|
|
43
|
+
const closeSpy = spy();
|
|
44
|
+
const el = await fixture(dismissable());
|
|
45
|
+
el.addEventListener('close', () => closeSpy());
|
|
46
|
+
await elementUpdated(el);
|
|
47
|
+
const closeButton = (el.shadowRoot
|
|
48
|
+
? el.shadowRoot.querySelector('.close-button')
|
|
49
|
+
: el.querySelector('.close-button '));
|
|
50
|
+
closeButton.click();
|
|
51
|
+
await elementUpdated(el);
|
|
52
|
+
expect(closeSpy.calledOnce).to.be.true;
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=dialog.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.test.js","sourceRoot":"","sources":["dialog.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,iBAAiB,CAAC;AAEzB,OAAO,EACH,UAAU,EACV,WAAW,EACX,UAAU,EACV,KAAK,GACR,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,KAAK,EAAE,CAAC,CAAC;QAE1C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,UAAU,EAAE,CAAC,CAAC;QAE/C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,WAAW,EAAE,CAAC,CAAC;QAEhD,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,UAAU,EAAE,CAAC,CAAC;QAE/C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,KAAK,EAAE,CAAC,CAAC;QAE1C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACpB,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC;QACvB,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,WAAW,EAAE,CAAC,CAAC;QAChD,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC/C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,WAAW,GAAG,CAChB,EAAE,CAAC,UAAU;YACT,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC;YAC9C,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAC5B,CAAC;QAEjB,WAAW,CAAC,KAAK,EAAE,CAAC;QAEpB,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,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*/\n\nimport { elementUpdated, expect, fixture } from '@open-wc/testing';\n\nimport '../sp-dialog.js';\nimport { Dialog } from '..';\nimport {\n alertError,\n dismissable,\n fullscreen,\n small,\n} from '../stories/dialog.stories.js';\nimport { spy } from 'sinon';\n\ndescribe('Dialog', () => {\n it('loads `[size=small]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[size=alert]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(alertError());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[dismissable]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(dismissable());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[mode=fullscreen]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(fullscreen());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads dialog without footer accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('closes', async () => {\n const closeSpy = spy();\n const el = await fixture<Dialog>(dismissable());\n el.addEventListener('close', () => closeSpy());\n await elementUpdated(el);\n\n const closeButton = (\n el.shadowRoot\n ? el.shadowRoot.querySelector('.close-button')\n : el.querySelector('.close-button ')\n ) as HTMLElement;\n\n closeButton.click();\n\n await elementUpdated(el);\n expect(closeSpy.calledOnce).to.be.true;\n });\n});\n"]}
|