@spectrum-web-components/tray 0.40.5 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/tray",
3
- "version": "0.40.5",
3
+ "version": "0.41.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,11 +57,11 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.40.5",
61
- "@spectrum-web-components/modal": "^0.40.5",
62
- "@spectrum-web-components/reactive-controllers": "^0.40.5",
63
- "@spectrum-web-components/shared": "^0.40.5",
64
- "@spectrum-web-components/underlay": "^0.40.5"
60
+ "@spectrum-web-components/base": "^0.41.0",
61
+ "@spectrum-web-components/modal": "^0.41.0",
62
+ "@spectrum-web-components/reactive-controllers": "^0.41.0",
63
+ "@spectrum-web-components/shared": "^0.41.0",
64
+ "@spectrum-web-components/underlay": "^0.41.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@spectrum-css/tray": "^2.2.0"
@@ -72,5 +72,5 @@
72
72
  "./sp-*.js",
73
73
  "./**/*.dev.js"
74
74
  ],
75
- "gitHead": "2e0006478841b07af63c19a0167a136bf724d064"
75
+ "gitHead": "0bf38fd427adc39804b228a4c61de623e5ebb82e"
76
76
  }
package/src/Tray.dev.js CHANGED
@@ -93,7 +93,7 @@ export class Tray extends SpectrumElement {
93
93
  return html`
94
94
  <sp-underlay
95
95
  ?open=${this.open}
96
- @click=${this.close}
96
+ @close=${this.close}
97
97
  @transitionend=${this.handleUnderlayTransitionend}
98
98
  ></sp-underlay>
99
99
  <div
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Tray.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.js';\nimport { MatchMediaController } from '@spectrum-web-components/reactive-controllers/src/MatchMedia.js';\n\nimport modalStyles from '@spectrum-web-components/modal/src/modal.css.js';\nimport styles from './tray.css.js';\n\n/**\n * @element sp-tray\n *\n * @slot - content to display within the Tray\n *\n * @fires close - Announces that the Tray has been closed.\n */\nexport class Tray extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [modalStyles, styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n protected prefersMotion = new MatchMediaController(\n this,\n '(prefers-reduced-motion: no-preference)'\n );\n\n private transitionPromise = Promise.resolve();\n\n private resolveTransitionPromise!: () => void;\n\n @query('.tray')\n private tray!: HTMLDivElement;\n\n public override focus(): void {\n const firstFocusable = firstFocusableIn(this);\n if (firstFocusable) {\n firstFocusable.focus();\n } else if (this.children.length === 1) {\n this.tray.focus();\n } else {\n super.focus();\n }\n }\n\n private animating = false;\n\n public overlayWillCloseCallback(): boolean {\n if (!this.open) return this.animating;\n this.close();\n return true;\n }\n\n public close(): void {\n this.open = false;\n if (!this.prefersMotion.matches) {\n this.dispatchClosed();\n }\n }\n\n private dispatchClosed(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected handleUnderlayTransitionend(): void {\n if (!this.open) {\n this.resolveTransitionPromise();\n this.dispatchClosed();\n }\n }\n\n protected handleTrayTransitionend(): void {\n if (this.open) {\n this.resolveTransitionPromise();\n }\n }\n\n protected override update(changes: PropertyValues<this>): void {\n if (\n changes.has('open') &&\n changes.get('open') !== undefined &&\n this.prefersMotion.matches\n ) {\n this.animating = true;\n this.transitionPromise = new Promise((res) => {\n this.resolveTransitionPromise = () => {\n this.animating = false;\n res();\n };\n });\n }\n super.update(changes);\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-underlay\n ?open=${this.open}\n @click=${this.close}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n <div\n class=\"tray modal\"\n tabindex=\"-1\"\n @transitionend=${this.handleTrayTransitionend}\n >\n <slot></slot>\n </div>\n `;\n }\n\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.transitionPromise;\n return complete;\n }\n}\n"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.js';\nimport { MatchMediaController } from '@spectrum-web-components/reactive-controllers/src/MatchMedia.js';\n\nimport modalStyles from '@spectrum-web-components/modal/src/modal.css.js';\nimport styles from './tray.css.js';\n\n/**\n * @element sp-tray\n *\n * @slot - content to display within the Tray\n *\n * @fires close - Announces that the Tray has been closed.\n */\nexport class Tray extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [modalStyles, styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n protected prefersMotion = new MatchMediaController(\n this,\n '(prefers-reduced-motion: no-preference)'\n );\n\n private transitionPromise = Promise.resolve();\n\n private resolveTransitionPromise!: () => void;\n\n @query('.tray')\n private tray!: HTMLDivElement;\n\n public override focus(): void {\n const firstFocusable = firstFocusableIn(this);\n if (firstFocusable) {\n firstFocusable.focus();\n } else if (this.children.length === 1) {\n this.tray.focus();\n } else {\n super.focus();\n }\n }\n\n private animating = false;\n\n public overlayWillCloseCallback(): boolean {\n if (!this.open) return this.animating;\n this.close();\n return true;\n }\n\n public close(): void {\n this.open = false;\n if (!this.prefersMotion.matches) {\n this.dispatchClosed();\n }\n }\n\n private dispatchClosed(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected handleUnderlayTransitionend(): void {\n if (!this.open) {\n this.resolveTransitionPromise();\n this.dispatchClosed();\n }\n }\n\n protected handleTrayTransitionend(): void {\n if (this.open) {\n this.resolveTransitionPromise();\n }\n }\n\n protected override update(changes: PropertyValues<this>): void {\n if (\n changes.has('open') &&\n changes.get('open') !== undefined &&\n this.prefersMotion.matches\n ) {\n this.animating = true;\n this.transitionPromise = new Promise((res) => {\n this.resolveTransitionPromise = () => {\n this.animating = false;\n res();\n };\n });\n }\n super.update(changes);\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-underlay\n ?open=${this.open}\n @close=${this.close}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n <div\n class=\"tray modal\"\n tabindex=\"-1\"\n @transitionend=${this.handleTrayTransitionend}\n >\n <slot></slot>\n </div>\n `;\n }\n\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.transitionPromise;\n return complete;\n }\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,OAAO;AACP,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,OAAO,iBAAiB;AACxB,OAAO,YAAY;AASZ,aAAM,aAAa,gBAAgB;AAAA,EAAnC;AAAA;AAMH,SAAO,OAAO;AAEd,SAAU,gBAAgB,IAAI;AAAA,MAC1B;AAAA,MACA;AAAA,IACJ;AAEA,SAAQ,oBAAoB,QAAQ,QAAQ;AAkB5C,SAAQ,YAAY;AAAA;AAAA,EA9BpB,WAA2B,SAAyB;AAChD,WAAO,CAAC,aAAa,MAAM;AAAA,EAC/B;AAAA,EAiBgB,QAAc;AAC1B,UAAM,iBAAiB,iBAAiB,IAAI;AAC5C,QAAI,gBAAgB;AAChB,qBAAe,MAAM;AAAA,IACzB,WAAW,KAAK,SAAS,WAAW,GAAG;AACnC,WAAK,KAAK,MAAM;AAAA,IACpB,OAAO;AACH,YAAM,MAAM;AAAA,IAChB;AAAA,EACJ;AAAA,EAIO,2BAAoC;AACvC,QAAI,CAAC,KAAK;AAAM,aAAO,KAAK;AAC5B,SAAK,MAAM;AACX,WAAO;AAAA,EACX;AAAA,EAEO,QAAc;AACjB,SAAK,OAAO;AACZ,QAAI,CAAC,KAAK,cAAc,SAAS;AAC7B,WAAK,eAAe;AAAA,IACxB;AAAA,EACJ;AAAA,EAEQ,iBAAuB;AAC3B,SAAK;AAAA,MACD,IAAI,MAAM,SAAS;AAAA,QACf,SAAS;AAAA,MACb,CAAC;AAAA,IACL;AAAA,EACJ;AAAA,EAEU,8BAAoC;AAC1C,QAAI,CAAC,KAAK,MAAM;AACZ,WAAK,yBAAyB;AAC9B,WAAK,eAAe;AAAA,IACxB;AAAA,EACJ;AAAA,EAEU,0BAAgC;AACtC,QAAI,KAAK,MAAM;AACX,WAAK,yBAAyB;AAAA,IAClC;AAAA,EACJ;AAAA,EAEmB,OAAO,SAAqC;AAC3D,QACI,QAAQ,IAAI,MAAM,KAClB,QAAQ,IAAI,MAAM,MAAM,UACxB,KAAK,cAAc,SACrB;AACE,WAAK,YAAY;AACjB,WAAK,oBAAoB,IAAI,QAAQ,CAAC,QAAQ;AAC1C,aAAK,2BAA2B,MAAM;AAClC,eAAK,YAAY;AACjB,cAAI;AAAA,QACR;AAAA,MACJ,CAAC;AAAA,IACL;AACA,UAAM,OAAO,OAAO;AAAA,EACxB;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA,wBAES,KAAK,IAAI;AAAA,yBACR,KAAK,KAAK;AAAA,iCACF,KAAK,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA,iCAKhC,KAAK,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKzD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAyB,oBAAsC;AAC3D,UAAM,WAAY,MAAM,MAAM,kBAAkB;AAChD,UAAM,KAAK;AACX,WAAO;AAAA,EACX;AACJ;AA5GW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GALjC,KAMF;AAYC;AAAA,EADP,MAAM,OAAO;AAAA,GAjBL,KAkBD;",
6
6
  "names": []
7
7
  }
package/src/Tray.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=(o,r,e,i)=>{for(var t=i>1?void 0:i?p(r,e):r,s=o.length-1,n;s>=0;s--)(n=o[s])&&(t=(i?n(r,e,t):n(t))||t);return i&&t&&l(r,e,t),t};import{html as d,SpectrumElement as c}from"@spectrum-web-components/base";import{property as m,query as h}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/underlay/sp-underlay.js";import{firstFocusableIn as u}from"@spectrum-web-components/shared/src/first-focusable-in.js";import{MatchMediaController as f}from"@spectrum-web-components/reactive-controllers/src/MatchMedia.js";import v from"@spectrum-web-components/modal/src/modal.css.js";import y from"./tray.css.js";export class Tray extends c{constructor(){super(...arguments);this.open=!1;this.prefersMotion=new f(this,"(prefers-reduced-motion: no-preference)");this.transitionPromise=Promise.resolve();this.animating=!1}static get styles(){return[v,y]}focus(){const e=u(this);e?e.focus():this.children.length===1?this.tray.focus():super.focus()}overlayWillCloseCallback(){return this.open?(this.close(),!0):this.animating}close(){this.open=!1,this.prefersMotion.matches||this.dispatchClosed()}dispatchClosed(){this.dispatchEvent(new Event("close",{bubbles:!0}))}handleUnderlayTransitionend(){this.open||(this.resolveTransitionPromise(),this.dispatchClosed())}handleTrayTransitionend(){this.open&&this.resolveTransitionPromise()}update(e){e.has("open")&&e.get("open")!==void 0&&this.prefersMotion.matches&&(this.animating=!0,this.transitionPromise=new Promise(i=>{this.resolveTransitionPromise=()=>{this.animating=!1,i()}})),super.update(e)}render(){return d`
1
+ "use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=(o,r,e,i)=>{for(var t=i>1?void 0:i?p(r,e):r,s=o.length-1,n;s>=0;s--)(n=o[s])&&(t=(i?n(r,e,t):n(t))||t);return i&&t&&l(r,e,t),t};import{html as d,SpectrumElement as m}from"@spectrum-web-components/base";import{property as c,query as h}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/underlay/sp-underlay.js";import{firstFocusableIn as u}from"@spectrum-web-components/shared/src/first-focusable-in.js";import{MatchMediaController as f}from"@spectrum-web-components/reactive-controllers/src/MatchMedia.js";import v from"@spectrum-web-components/modal/src/modal.css.js";import y from"./tray.css.js";export class Tray extends m{constructor(){super(...arguments);this.open=!1;this.prefersMotion=new f(this,"(prefers-reduced-motion: no-preference)");this.transitionPromise=Promise.resolve();this.animating=!1}static get styles(){return[v,y]}focus(){const e=u(this);e?e.focus():this.children.length===1?this.tray.focus():super.focus()}overlayWillCloseCallback(){return this.open?(this.close(),!0):this.animating}close(){this.open=!1,this.prefersMotion.matches||this.dispatchClosed()}dispatchClosed(){this.dispatchEvent(new Event("close",{bubbles:!0}))}handleUnderlayTransitionend(){this.open||(this.resolveTransitionPromise(),this.dispatchClosed())}handleTrayTransitionend(){this.open&&this.resolveTransitionPromise()}update(e){e.has("open")&&e.get("open")!==void 0&&this.prefersMotion.matches&&(this.animating=!0,this.transitionPromise=new Promise(i=>{this.resolveTransitionPromise=()=>{this.animating=!1,i()}})),super.update(e)}render(){return d`
2
2
  <sp-underlay
3
3
  ?open=${this.open}
4
- @click=${this.close}
4
+ @close=${this.close}
5
5
  @transitionend=${this.handleUnderlayTransitionend}
6
6
  ></sp-underlay>
7
7
  <div
@@ -11,5 +11,5 @@
11
11
  >
12
12
  <slot></slot>
13
13
  </div>
14
- `}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.transitionPromise,e}}a([m({type:Boolean,reflect:!0})],Tray.prototype,"open",2),a([h(".tray")],Tray.prototype,"tray",2);
14
+ `}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.transitionPromise,e}}a([c({type:Boolean,reflect:!0})],Tray.prototype,"open",2),a([h(".tray")],Tray.prototype,"tray",2);
15
15
  //# sourceMappingURL=Tray.js.map
package/src/Tray.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Tray.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.js';\nimport { MatchMediaController } from '@spectrum-web-components/reactive-controllers/src/MatchMedia.js';\n\nimport modalStyles from '@spectrum-web-components/modal/src/modal.css.js';\nimport styles from './tray.css.js';\n\n/**\n * @element sp-tray\n *\n * @slot - content to display within the Tray\n *\n * @fires close - Announces that the Tray has been closed.\n */\nexport class Tray extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [modalStyles, styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n protected prefersMotion = new MatchMediaController(\n this,\n '(prefers-reduced-motion: no-preference)'\n );\n\n private transitionPromise = Promise.resolve();\n\n private resolveTransitionPromise!: () => void;\n\n @query('.tray')\n private tray!: HTMLDivElement;\n\n public override focus(): void {\n const firstFocusable = firstFocusableIn(this);\n if (firstFocusable) {\n firstFocusable.focus();\n } else if (this.children.length === 1) {\n this.tray.focus();\n } else {\n super.focus();\n }\n }\n\n private animating = false;\n\n public overlayWillCloseCallback(): boolean {\n if (!this.open) return this.animating;\n this.close();\n return true;\n }\n\n public close(): void {\n this.open = false;\n if (!this.prefersMotion.matches) {\n this.dispatchClosed();\n }\n }\n\n private dispatchClosed(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected handleUnderlayTransitionend(): void {\n if (!this.open) {\n this.resolveTransitionPromise();\n this.dispatchClosed();\n }\n }\n\n protected handleTrayTransitionend(): void {\n if (this.open) {\n this.resolveTransitionPromise();\n }\n }\n\n protected override update(changes: PropertyValues<this>): void {\n if (\n changes.has('open') &&\n changes.get('open') !== undefined &&\n this.prefersMotion.matches\n ) {\n this.animating = true;\n this.transitionPromise = new Promise((res) => {\n this.resolveTransitionPromise = () => {\n this.animating = false;\n res();\n };\n });\n }\n super.update(changes);\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-underlay\n ?open=${this.open}\n @click=${this.close}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n <div\n class=\"tray modal\"\n tabindex=\"-1\"\n @transitionend=${this.handleTrayTransitionend}\n >\n <slot></slot>\n </div>\n `;\n }\n\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.transitionPromise;\n return complete;\n }\n}\n"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/underlay/sp-underlay.js';\nimport { firstFocusableIn } from '@spectrum-web-components/shared/src/first-focusable-in.js';\nimport { MatchMediaController } from '@spectrum-web-components/reactive-controllers/src/MatchMedia.js';\n\nimport modalStyles from '@spectrum-web-components/modal/src/modal.css.js';\nimport styles from './tray.css.js';\n\n/**\n * @element sp-tray\n *\n * @slot - content to display within the Tray\n *\n * @fires close - Announces that the Tray has been closed.\n */\nexport class Tray extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [modalStyles, styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n protected prefersMotion = new MatchMediaController(\n this,\n '(prefers-reduced-motion: no-preference)'\n );\n\n private transitionPromise = Promise.resolve();\n\n private resolveTransitionPromise!: () => void;\n\n @query('.tray')\n private tray!: HTMLDivElement;\n\n public override focus(): void {\n const firstFocusable = firstFocusableIn(this);\n if (firstFocusable) {\n firstFocusable.focus();\n } else if (this.children.length === 1) {\n this.tray.focus();\n } else {\n super.focus();\n }\n }\n\n private animating = false;\n\n public overlayWillCloseCallback(): boolean {\n if (!this.open) return this.animating;\n this.close();\n return true;\n }\n\n public close(): void {\n this.open = false;\n if (!this.prefersMotion.matches) {\n this.dispatchClosed();\n }\n }\n\n private dispatchClosed(): void {\n this.dispatchEvent(\n new Event('close', {\n bubbles: true,\n })\n );\n }\n\n protected handleUnderlayTransitionend(): void {\n if (!this.open) {\n this.resolveTransitionPromise();\n this.dispatchClosed();\n }\n }\n\n protected handleTrayTransitionend(): void {\n if (this.open) {\n this.resolveTransitionPromise();\n }\n }\n\n protected override update(changes: PropertyValues<this>): void {\n if (\n changes.has('open') &&\n changes.get('open') !== undefined &&\n this.prefersMotion.matches\n ) {\n this.animating = true;\n this.transitionPromise = new Promise((res) => {\n this.resolveTransitionPromise = () => {\n this.animating = false;\n res();\n };\n });\n }\n super.update(changes);\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-underlay\n ?open=${this.open}\n @close=${this.close}\n @transitionend=${this.handleUnderlayTransitionend}\n ></sp-underlay>\n <div\n class=\"tray modal\"\n tabindex=\"-1\"\n @transitionend=${this.handleTrayTransitionend}\n >\n <slot></slot>\n </div>\n `;\n }\n\n /**\n * Bind the open/close transition into the update complete lifecycle so\n * that the overlay system can wait for it to be \"visibly ready\" before\n * attempting to throw focus into the content contained herein. Not\n * waiting for this can cause small amounts of page scroll to happen\n * while opening the Tray when focusable content is included: e.g. Menu\n * elements whose selected Menu Item is not the first Menu Item.\n */\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.transitionPromise;\n return complete;\n }\n}\n"],
5
5
  "mappings": "qNAYA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OACI,YAAAC,EACA,SAAAC,MACG,kDACP,MAAO,mDACP,OAAS,oBAAAC,MAAwB,4DACjC,OAAS,wBAAAC,MAA4B,kEAErC,OAAOC,MAAiB,kDACxB,OAAOC,MAAY,gBASZ,aAAM,aAAaN,CAAgB,CAAnC,kCAMH,KAAO,KAAO,GAEd,KAAU,cAAgB,IAAII,EAC1B,KACA,yCACJ,EAEA,KAAQ,kBAAoB,QAAQ,QAAQ,EAkB5C,KAAQ,UAAY,GA9BpB,WAA2B,QAAyB,CAChD,MAAO,CAACC,EAAaC,CAAM,CAC/B,CAiBgB,OAAc,CAC1B,MAAMC,EAAiBJ,EAAiB,IAAI,EACxCI,EACAA,EAAe,MAAM,EACd,KAAK,SAAS,SAAW,EAChC,KAAK,KAAK,MAAM,EAEhB,MAAM,MAAM,CAEpB,CAIO,0BAAoC,CACvC,OAAK,KAAK,MACV,KAAK,MAAM,EACJ,IAFgB,KAAK,SAGhC,CAEO,OAAc,CACjB,KAAK,KAAO,GACP,KAAK,cAAc,SACpB,KAAK,eAAe,CAE5B,CAEQ,gBAAuB,CAC3B,KAAK,cACD,IAAI,MAAM,QAAS,CACf,QAAS,EACb,CAAC,CACL,CACJ,CAEU,6BAAoC,CACrC,KAAK,OACN,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EAE5B,CAEU,yBAAgC,CAClC,KAAK,MACL,KAAK,yBAAyB,CAEtC,CAEmB,OAAOC,EAAqC,CAEvDA,EAAQ,IAAI,MAAM,GAClBA,EAAQ,IAAI,MAAM,IAAM,QACxB,KAAK,cAAc,UAEnB,KAAK,UAAY,GACjB,KAAK,kBAAoB,IAAI,QAASC,GAAQ,CAC1C,KAAK,yBAA2B,IAAM,CAClC,KAAK,UAAY,GACjBA,EAAI,CACR,CACJ,CAAC,GAEL,MAAM,OAAOD,CAAO,CACxB,CAEmB,QAAyB,CACxC,OAAOT;AAAA;AAAA,wBAES,KAAK,IAAI;AAAA,yBACR,KAAK,KAAK;AAAA,iCACF,KAAK,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA,iCAKhC,KAAK,uBAAuB;AAAA;AAAA;AAAA;AAAA,SAKzD,CAUA,MAAyB,mBAAsC,CAC3D,MAAMW,EAAY,MAAM,MAAM,kBAAkB,EAChD,aAAM,KAAK,kBACJA,CACX,CACJ,CA5GWC,EAAA,CADNV,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GALjC,KAMF,oBAYCU,EAAA,CADPT,EAAM,OAAO,GAjBL,KAkBD",
6
6
  "names": ["html", "SpectrumElement", "property", "query", "firstFocusableIn", "MatchMediaController", "modalStyles", "styles", "firstFocusable", "changes", "res", "complete", "__decorateClass"]
7
7
  }
@@ -46,7 +46,7 @@ var(--spectrum-tray-exit-animation-duration)
46
46
  --mod-tray-corner-radius,var(--spectrum-tray-corner-radius)
47
47
  );max-inline-size:var(
48
48
  --mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)
49
- )}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){clip:rect(0,0,0,0);border:0;clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
49
+ )}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
50
50
  `;
51
51
  export default styles;
52
52
  //# sourceMappingURL=tray.css.dev.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["tray.css.ts"],
4
- "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:flex;inline-size:100%;inset-block-end:0;inset-inline-start:0;justify-content:center;position:fixed}:host{--spectrum-tray-exit-animation-delay:0s;--spectrum-tray-entry-animation-delay:0.16s;--spectrum-tray-max-inline-size:375px;--spectrum-tray-spacing-edge-to-tray-safe-zone:64px;--spectrum-tray-entry-animation-duration:var(\n--spectrum-animation-duration-500\n);--spectrum-tray-exit-animation-duration:var(\n--spectrum-animation-duration-100\n);--spectrum-tray-corner-radius:var(--spectrum-corner-radius-100);--spectrum-tray-background-color:var(--spectrum-background-layer-2-color)}@media (forced-colors:active){:host{--highcontrast-tray-background-color:Background}}.tray{background-color:var(\n--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color))\n);border-radius:unset;box-sizing:border-box;inline-size:100%;margin-block-start:var(\n--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n);max-block-size:calc(100vh - var(\n--mod-tray-spacing-edge-to-tray-safe-zone,\nvar(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n));outline:none;overflow:auto;padding-block-end:var(\n--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area)\n);padding-block-start:var(\n--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area)\n);transform:translateY(100%);transition:opacity var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n),visibility var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) linear calc(var(\n--mod-tray-exit-animation-delay,\nvar(--spectrum-tray-exit-animation-delay)\n) + var(\n--mod-tray-exit-animation-duration,\nvar(--spectrum-tray-exit-animation-duration)\n)),transform var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n)}:host([open]) .tray{transform:translateY(0);transition:transform var(\n--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n),opacity var(\n--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n)}@media screen and (orientation:landscape){.tray{border-start-end-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);border-start-start-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);max-inline-size:var(\n--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)\n)}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){clip:rect(0,0,0,0);border:0;clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}\n`;\nexport default styles;"],
4
+ "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:flex;inline-size:100%;inset-block-end:0;inset-inline-start:0;justify-content:center;position:fixed}:host{--spectrum-tray-exit-animation-delay:0s;--spectrum-tray-entry-animation-delay:0.16s;--spectrum-tray-max-inline-size:375px;--spectrum-tray-spacing-edge-to-tray-safe-zone:64px;--spectrum-tray-entry-animation-duration:var(\n--spectrum-animation-duration-500\n);--spectrum-tray-exit-animation-duration:var(\n--spectrum-animation-duration-100\n);--spectrum-tray-corner-radius:var(--spectrum-corner-radius-100);--spectrum-tray-background-color:var(--spectrum-background-layer-2-color)}@media (forced-colors:active){:host{--highcontrast-tray-background-color:Background}}.tray{background-color:var(\n--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color))\n);border-radius:unset;box-sizing:border-box;inline-size:100%;margin-block-start:var(\n--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n);max-block-size:calc(100vh - var(\n--mod-tray-spacing-edge-to-tray-safe-zone,\nvar(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n));outline:none;overflow:auto;padding-block-end:var(\n--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area)\n);padding-block-start:var(\n--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area)\n);transform:translateY(100%);transition:opacity var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n),visibility var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) linear calc(var(\n--mod-tray-exit-animation-delay,\nvar(--spectrum-tray-exit-animation-delay)\n) + var(\n--mod-tray-exit-animation-duration,\nvar(--spectrum-tray-exit-animation-duration)\n)),transform var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n)}:host([open]) .tray{transform:translateY(0);transition:transform var(\n--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n),opacity var(\n--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n)}@media screen and (orientation:landscape){.tray{border-start-end-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);border-start-start-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);max-inline-size:var(\n--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)\n)}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}\n`;\nexport default styles;"],
5
5
  "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDf,eAAe;",
6
6
  "names": []
7
7
  }
package/src/tray.css.js CHANGED
@@ -44,6 +44,6 @@ var(--spectrum-tray-exit-animation-duration)
44
44
  --mod-tray-corner-radius,var(--spectrum-tray-corner-radius)
45
45
  );max-inline-size:var(
46
46
  --mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)
47
- )}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){clip:rect(0,0,0,0);border:0;clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
47
+ )}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
48
48
  `;export default t;
49
49
  //# sourceMappingURL=tray.css.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["tray.css.ts"],
4
- "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:flex;inline-size:100%;inset-block-end:0;inset-inline-start:0;justify-content:center;position:fixed}:host{--spectrum-tray-exit-animation-delay:0s;--spectrum-tray-entry-animation-delay:0.16s;--spectrum-tray-max-inline-size:375px;--spectrum-tray-spacing-edge-to-tray-safe-zone:64px;--spectrum-tray-entry-animation-duration:var(\n--spectrum-animation-duration-500\n);--spectrum-tray-exit-animation-duration:var(\n--spectrum-animation-duration-100\n);--spectrum-tray-corner-radius:var(--spectrum-corner-radius-100);--spectrum-tray-background-color:var(--spectrum-background-layer-2-color)}@media (forced-colors:active){:host{--highcontrast-tray-background-color:Background}}.tray{background-color:var(\n--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color))\n);border-radius:unset;box-sizing:border-box;inline-size:100%;margin-block-start:var(\n--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n);max-block-size:calc(100vh - var(\n--mod-tray-spacing-edge-to-tray-safe-zone,\nvar(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n));outline:none;overflow:auto;padding-block-end:var(\n--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area)\n);padding-block-start:var(\n--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area)\n);transform:translateY(100%);transition:opacity var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n),visibility var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) linear calc(var(\n--mod-tray-exit-animation-delay,\nvar(--spectrum-tray-exit-animation-delay)\n) + var(\n--mod-tray-exit-animation-duration,\nvar(--spectrum-tray-exit-animation-duration)\n)),transform var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n)}:host([open]) .tray{transform:translateY(0);transition:transform var(\n--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n),opacity var(\n--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n)}@media screen and (orientation:landscape){.tray{border-start-end-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);border-start-start-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);max-inline-size:var(\n--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)\n)}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){clip:rect(0,0,0,0);border:0;clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}\n`;\nexport default styles;"],
4
+ "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:flex;inline-size:100%;inset-block-end:0;inset-inline-start:0;justify-content:center;position:fixed}:host{--spectrum-tray-exit-animation-delay:0s;--spectrum-tray-entry-animation-delay:0.16s;--spectrum-tray-max-inline-size:375px;--spectrum-tray-spacing-edge-to-tray-safe-zone:64px;--spectrum-tray-entry-animation-duration:var(\n--spectrum-animation-duration-500\n);--spectrum-tray-exit-animation-duration:var(\n--spectrum-animation-duration-100\n);--spectrum-tray-corner-radius:var(--spectrum-corner-radius-100);--spectrum-tray-background-color:var(--spectrum-background-layer-2-color)}@media (forced-colors:active){:host{--highcontrast-tray-background-color:Background}}.tray{background-color:var(\n--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color))\n);border-radius:unset;box-sizing:border-box;inline-size:100%;margin-block-start:var(\n--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n);max-block-size:calc(100vh - var(\n--mod-tray-spacing-edge-to-tray-safe-zone,\nvar(--spectrum-tray-spacing-edge-to-tray-safe-zone)\n));outline:none;overflow:auto;padding-block-end:var(\n--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area)\n);padding-block-start:var(\n--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area)\n);transform:translateY(100%);transition:opacity var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n),visibility var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) linear calc(var(\n--mod-tray-exit-animation-delay,\nvar(--spectrum-tray-exit-animation-delay)\n) + var(\n--mod-tray-exit-animation-duration,\nvar(--spectrum-tray-exit-animation-duration)\n)),transform var(\n--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration)\n) cubic-bezier(.5,0,1,1) var(\n--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)\n)}:host([open]) .tray{transform:translateY(0);transition:transform var(\n--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n),opacity var(\n--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration)\n) cubic-bezier(0,0,.4,1) var(\n--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)\n)}@media screen and (orientation:landscape){.tray{border-start-end-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);border-start-start-radius:var(\n--mod-tray-corner-radius,var(--spectrum-tray-corner-radius)\n);max-inline-size:var(\n--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size)\n)}}:host{align-items:flex-end;max-height:100vh;max-height:100dvh;position:fixed!important}sp-underlay{touch-action:none}.tray{display:inline-flex;overscroll-behavior:contain}::slotted(.visually-hidden){border:0;clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;margin:0 -1px -1px 0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}\n`;\nexport default styles;"],
5
5
  "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgDf,eAAeC",
6
6
  "names": ["css", "styles"]
7
7
  }