@spectrum-web-components/tray 0.0.0-20241209155954

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/README.md ADDED
@@ -0,0 +1,61 @@
1
+ ## Description
2
+
3
+ `<sp-tray>` elements are typically used to portray information on mobile device or smaller screens.
4
+
5
+ ### Usage
6
+
7
+ [![See it on NPM!](https://img.shields.io/npm/v/@spectrum-web-components/tray?style=for-the-badge)](https://www.npmjs.com/package/@spectrum-web-components/tray)
8
+ [![How big is this package in your project?](https://img.shields.io/bundlephobia/minzip/@spectrum-web-components/tray?style=for-the-badge)](https://bundlephobia.com/result?p=@spectrum-web-components/tray)
9
+
10
+ ```
11
+ yarn add @spectrum-web-components/tray
12
+ ```
13
+
14
+ Import the side effectful registration of `<sp-tray>` via:
15
+
16
+ ```
17
+ import '@spectrum-web-components/tray/sp-tray.js';
18
+ ```
19
+
20
+ When looking to leverage the `Tray` base class as a type and/or for extension purposes, do so via:
21
+
22
+ ```
23
+ import { Tray } from '@spectrum-web-components/tray';
24
+ ```
25
+
26
+ ## Dialog
27
+
28
+ ```html
29
+ <overlay-trigger type="modal">
30
+ <sp-button slot="trigger" variant="secondary">Toggle tray</sp-button>
31
+ <sp-tray slot="click-content">
32
+ <sp-dialog size="s" dismissable>
33
+ <h2 slot="heading">New Messages</h2>
34
+ You have 5 new messages.
35
+ </sp-dialog>
36
+ </sp-tray>
37
+ </overlay-trigger>
38
+ ```
39
+
40
+ ## Menu
41
+
42
+ ```html
43
+ <overlay-trigger type="modal">
44
+ <sp-button slot="trigger" variant="secondary">Toggle menu</sp-button>
45
+ <sp-tray slot="click-content">
46
+ <sp-menu style="width: 100%">
47
+ <sp-menu-item selected>Deselect</sp-menu-item>
48
+ <sp-menu-item>Select Inverse</sp-menu-item>
49
+ <sp-menu-item focused>Feather...</sp-menu-item>
50
+ <sp-menu-item>Select and Mask...</sp-menu-item>
51
+ <sp-menu-divider></sp-menu-divider>
52
+ <sp-menu-item>Save Selection</sp-menu-item>
53
+ <sp-menu-item disabled>Make Work Path</sp-menu-item>
54
+ </sp-menu>
55
+ </sp-tray>
56
+ </overlay-trigger>
57
+ ```
58
+
59
+ ## Accessibility
60
+
61
+ `<sp-tray>` presents a page blocking experience and should be opened with the `Overlay` API using the `modal` interaction to ensure that the content appropriately manages the presence of other content in the tab order of the page and the availability of that content for a screen reader.
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@spectrum-web-components/tray",
3
+ "version": "0.0.0-20241209155954",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "Web component implementation of a Spectrum design Tray",
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/adobe/spectrum-web-components.git",
12
+ "directory": "packages/tray"
13
+ },
14
+ "author": "",
15
+ "homepage": "https://opensource.adobe.com/spectrum-web-components/components/tray",
16
+ "bugs": {
17
+ "url": "https://github.com/adobe/spectrum-web-components/issues"
18
+ },
19
+ "main": "src/index.js",
20
+ "module": "src/index.js",
21
+ "type": "module",
22
+ "exports": {
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
27
+ "./package.json": "./package.json",
28
+ "./src/Tray.js": {
29
+ "development": "./src/Tray.dev.js",
30
+ "default": "./src/Tray.js"
31
+ },
32
+ "./src/index.js": {
33
+ "development": "./src/index.dev.js",
34
+ "default": "./src/index.js"
35
+ },
36
+ "./src/tray-overrides.css.js": "./src/tray-overrides.css.js",
37
+ "./src/tray.css.js": "./src/tray.css.js",
38
+ "./sp-tray.js": {
39
+ "development": "./sp-tray.dev.js",
40
+ "default": "./sp-tray.js"
41
+ }
42
+ },
43
+ "scripts": {
44
+ "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
45
+ },
46
+ "files": [
47
+ "**/*.d.ts",
48
+ "**/*.js",
49
+ "**/*.js.map",
50
+ "custom-elements.json",
51
+ "!stories/",
52
+ "!test/"
53
+ ],
54
+ "keywords": [
55
+ "spectrum css",
56
+ "web components",
57
+ "lit-element",
58
+ "lit-html"
59
+ ],
60
+ "dependencies": {
61
+ "@spectrum-web-components/base": "0.0.0-20241209155954",
62
+ "@spectrum-web-components/modal": "0.0.0-20241209155954",
63
+ "@spectrum-web-components/reactive-controllers": "0.0.0-20241209155954",
64
+ "@spectrum-web-components/shared": "0.0.0-20241209155954",
65
+ "@spectrum-web-components/underlay": "0.0.0-20241209155954"
66
+ },
67
+ "devDependencies": {
68
+ "@spectrum-css/tray": "^4.0.0-s2-foundations.15"
69
+ },
70
+ "types": "./src/index.d.ts",
71
+ "customElements": "custom-elements.json",
72
+ "sideEffects": [
73
+ "./sp-*.js",
74
+ "./**/*.dev.js"
75
+ ]
76
+ }
package/sp-tray.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Tray } from './src/Tray.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-tray': Tray;
5
+ }
6
+ }
package/sp-tray.dev.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import { Tray } from "./src/Tray.dev.js";
3
+ import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
+ defineElement("sp-tray", Tray);
5
+ //# sourceMappingURL=sp-tray.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-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 { Tray } from './src/Tray.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-tray', Tray);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tray': Tray;\n }\n}\n"],
5
+ "mappings": ";AAYA,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAE9B,cAAc,WAAW,IAAI;",
6
+ "names": []
7
+ }
package/sp-tray.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";import{Tray as e}from"./src/Tray.js";import{defineElement as a}from"@spectrum-web-components/base/src/define-element.js";a("sp-tray",e);
2
+ //# sourceMappingURL=sp-tray.js.map
package/sp-tray.js.map ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-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 { Tray } from './src/Tray.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-tray', Tray);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-tray': Tray;\n }\n}\n"],
5
+ "mappings": "aAYA,OAAS,QAAAA,MAAY,gBACrB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,UAAWD,CAAI",
6
+ "names": ["Tray", "defineElement"]
7
+ }
package/src/Tray.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
2
+ import '@spectrum-web-components/underlay/sp-underlay.js';
3
+ import { MatchMediaController } from '@spectrum-web-components/reactive-controllers/src/MatchMedia.js';
4
+ /**
5
+ * @element sp-tray
6
+ *
7
+ * @slot - content to display within the Tray
8
+ *
9
+ * @fires close - Announces that the Tray has been closed.
10
+ */
11
+ export declare class Tray extends SpectrumElement {
12
+ static get styles(): CSSResultArray;
13
+ open: boolean;
14
+ protected prefersMotion: MatchMediaController;
15
+ private transitionPromise;
16
+ private resolveTransitionPromise;
17
+ private tray;
18
+ focus(): void;
19
+ private animating;
20
+ overlayWillCloseCallback(): boolean;
21
+ close(): void;
22
+ private dispatchClosed;
23
+ protected handleUnderlayTransitionend(): void;
24
+ protected handleTrayTransitionend(): void;
25
+ protected update(changes: PropertyValues<this>): void;
26
+ protected render(): TemplateResult;
27
+ /**
28
+ * Bind the open/close transition into the update complete lifecycle so
29
+ * that the overlay system can wait for it to be "visibly ready" before
30
+ * attempting to throw focus into the content contained herein. Not
31
+ * waiting for this can cause small amounts of page scroll to happen
32
+ * while opening the Tray when focusable content is included: e.g. Menu
33
+ * elements whose selected Menu Item is not the first Menu Item.
34
+ */
35
+ protected getUpdateComplete(): Promise<boolean>;
36
+ }
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __decorateClass = (decorators, target, key, kind) => {
5
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
6
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
7
+ if (decorator = decorators[i])
8
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9
+ if (kind && result) __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import {
17
+ property,
18
+ query
19
+ } from "@spectrum-web-components/base/src/decorators.js";
20
+ import "@spectrum-web-components/underlay/sp-underlay.js";
21
+ import { firstFocusableIn } from "@spectrum-web-components/shared/src/first-focusable-in.js";
22
+ import { MatchMediaController } from "@spectrum-web-components/reactive-controllers/src/MatchMedia.js";
23
+ import modalStyles from "@spectrum-web-components/modal/src/modal.css.js";
24
+ import styles from "./tray.css.js";
25
+ export class Tray extends SpectrumElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ this.open = false;
29
+ this.prefersMotion = new MatchMediaController(
30
+ this,
31
+ "(prefers-reduced-motion: no-preference)"
32
+ );
33
+ this.transitionPromise = Promise.resolve();
34
+ this.resolveTransitionPromise = () => {
35
+ };
36
+ this.animating = false;
37
+ }
38
+ static get styles() {
39
+ return [modalStyles, styles];
40
+ }
41
+ focus() {
42
+ const firstFocusable = firstFocusableIn(this);
43
+ if (firstFocusable) {
44
+ firstFocusable.focus();
45
+ } else if (this.children.length === 1) {
46
+ this.tray.focus();
47
+ } else {
48
+ super.focus();
49
+ }
50
+ }
51
+ overlayWillCloseCallback() {
52
+ if (!this.open) return this.animating;
53
+ this.close();
54
+ return true;
55
+ }
56
+ close() {
57
+ this.open = false;
58
+ if (!this.prefersMotion.matches) {
59
+ this.dispatchClosed();
60
+ }
61
+ }
62
+ dispatchClosed() {
63
+ this.dispatchEvent(
64
+ new Event("close", {
65
+ bubbles: true
66
+ })
67
+ );
68
+ }
69
+ handleUnderlayTransitionend() {
70
+ if (!this.open) {
71
+ this.resolveTransitionPromise();
72
+ this.dispatchClosed();
73
+ }
74
+ }
75
+ handleTrayTransitionend() {
76
+ if (this.open) {
77
+ this.resolveTransitionPromise();
78
+ }
79
+ }
80
+ update(changes) {
81
+ if (changes.has("open") && changes.get("open") !== void 0 && this.prefersMotion.matches) {
82
+ this.animating = true;
83
+ this.transitionPromise = new Promise((res) => {
84
+ this.resolveTransitionPromise = () => {
85
+ this.animating = false;
86
+ res();
87
+ };
88
+ });
89
+ }
90
+ super.update(changes);
91
+ }
92
+ render() {
93
+ return html`
94
+ <sp-underlay
95
+ ?open=${this.open}
96
+ @close=${this.close}
97
+ @transitionend=${this.handleUnderlayTransitionend}
98
+ ></sp-underlay>
99
+ <div
100
+ class="tray modal"
101
+ tabindex="-1"
102
+ @transitionend=${this.handleTrayTransitionend}
103
+ >
104
+ <slot></slot>
105
+ </div>
106
+ `;
107
+ }
108
+ /**
109
+ * Bind the open/close transition into the update complete lifecycle so
110
+ * that the overlay system can wait for it to be "visibly ready" before
111
+ * attempting to throw focus into the content contained herein. Not
112
+ * waiting for this can cause small amounts of page scroll to happen
113
+ * while opening the Tray when focusable content is included: e.g. Menu
114
+ * elements whose selected Menu Item is not the first Menu Item.
115
+ */
116
+ async getUpdateComplete() {
117
+ const complete = await super.getUpdateComplete();
118
+ await this.transitionPromise;
119
+ return complete;
120
+ }
121
+ }
122
+ __decorateClass([
123
+ property({ type: Boolean, reflect: true })
124
+ ], Tray.prototype, "open", 2);
125
+ __decorateClass([
126
+ query(".tray")
127
+ ], Tray.prototype, "tray", 2);
128
+ //# sourceMappingURL=Tray.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 = () => {};\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
+ "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;AAE5C,SAAQ,2BAA2B,MAAM;AAAA,IAAC;AAgB1C,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,KAAM,QAAO,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
+ "names": []
7
+ }
package/src/Tray.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=(s,r,e,i)=>{for(var t=i>1?void 0:i?p(r,e):r,o=s.length-1,n;o>=0;o--)(n=s[o])&&(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.resolveTransitionPromise=()=>{};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
+ <sp-underlay
3
+ ?open=${this.open}
4
+ @close=${this.close}
5
+ @transitionend=${this.handleUnderlayTransitionend}
6
+ ></sp-underlay>
7
+ <div
8
+ class="tray modal"
9
+ tabindex="-1"
10
+ @transitionend=${this.handleTrayTransitionend}
11
+ >
12
+ <slot></slot>
13
+ </div>
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
+ //# sourceMappingURL=Tray.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 = () => {};\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
+ "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,EAE5C,KAAQ,yBAA2B,IAAM,CAAC,EAgB1C,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
+ "names": ["html", "SpectrumElement", "property", "query", "firstFocusableIn", "MatchMediaController", "modalStyles", "styles", "firstFocusable", "changes", "res", "complete", "__decorateClass"]
7
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Tray.js';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ export * from "./Tray.dev.js";
3
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './Tray.dev.js'\n"],
5
+ "mappings": ";AAYA,cAAc;",
6
+ "names": []
7
+ }
package/src/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";export*from"./Tray.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './Tray.js';\n"],
5
+ "mappings": "aAYA,WAAc",
6
+ "names": []
7
+ }
@@ -0,0 +1,72 @@
1
+ // @ts-check
2
+ /*
3
+ Copyright 2023 Adobe. All rights reserved.
4
+ This file is licensed to you under the Apache License, Version 2.0 (the 'License');
5
+ you may not use this file except in compliance with the License. You may obtain a copy
6
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ Unless required by applicable law or agreed to in writing, software distributed under
9
+ the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
10
+ OF ANY KIND, either express or implied. See the License for the specific language
11
+ governing permissions and limitations under the License.
12
+ */
13
+
14
+ import {
15
+ builder,
16
+ converterFor,
17
+ } from '../../../tasks/process-spectrum-utils.js';
18
+
19
+ const converter = converterFor('');
20
+
21
+ /**
22
+ * @type { import('../../../tasks/spectrum-css-converter').SpectrumCSSConverter }
23
+ */
24
+ const config = {
25
+ conversions: [
26
+ {
27
+ inPackage: '@spectrum-css/tray',
28
+ outPackage: 'tray',
29
+ fileName: 'tray-wrapper',
30
+ components: [
31
+ converter.classToHost('spectrum-Tray-wrapper'),
32
+ converter.classToAttribute('is-open', 'open'),
33
+ ],
34
+ excludeByComponents: [builder.class('spectrum-Tray')],
35
+ },
36
+ {
37
+ inPackage: '@spectrum-css/tray',
38
+ outPackage: 'tray',
39
+ fileName: 'tray',
40
+ hoistCustomPropertiesFrom: 'spectrum-Tray',
41
+ components: [
42
+ {
43
+ find: [
44
+ builder.class('spectrum-Tray'),
45
+ builder.class('is-open'),
46
+ ],
47
+ replace: [
48
+ {
49
+ replace: builder.attribute('open'),
50
+ hoist: true,
51
+ },
52
+ {
53
+ replace: {
54
+ type: 'combinator',
55
+ value: 'descendant',
56
+ },
57
+ },
58
+ {
59
+ replace: builder.class('tray'),
60
+ },
61
+ ],
62
+ },
63
+ converter.classToClass('spectrum-Tray', 'tray'),
64
+ converter.classToSlotted('spectrum-Dialog'),
65
+ converter.classToAttribute('is-open', 'open'),
66
+ ],
67
+ excludeByComponents: [builder.class('spectrum-Tray-wrapper')],
68
+ },
69
+ ],
70
+ };
71
+
72
+ export default config;
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=spectrum-tray-wrapper.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-tray-wrapper.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{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as t}from"@spectrum-web-components/base";const e=t`
2
+ :host{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}
3
+ `;export default e;
4
+ //# sourceMappingURL=spectrum-tray-wrapper.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-tray-wrapper.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{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ .tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=spectrum-tray.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-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 .tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as a}from"@spectrum-web-components/base";const r=a`
2
+ .tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}
3
+ `;export default r;
4
+ //# sourceMappingURL=spectrum-tray.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["spectrum-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 .tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=tray-overrides.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["tray-overrides.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{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as t}from"@spectrum-web-components/base";const a=t`
2
+ :host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}
3
+ `;export default a;
4
+ //# sourceMappingURL=tray-overrides.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["tray-overrides.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{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ import { css } from "@spectrum-web-components/base";
3
+ const styles = css`
4
+ :host{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}.tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}:host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}:host{max-height:100vh;max-height:100dvh;align-items:flex-end;position:fixed!important}sp-underlay{touch-action:none}.tray{overscroll-behavior:contain;display:inline-flex}::slotted(.visually-hidden){clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;width:1px;white-space:nowrap;border:0;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}
5
+ `;
6
+ export default styles;
7
+ //# sourceMappingURL=tray.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}.tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}:host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}:host{max-height:100vh;max-height:100dvh;align-items:flex-end;position:fixed!important}sp-underlay{touch-action:none}.tray{overscroll-behavior:contain;display:inline-flex}::slotted(.visually-hidden){clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;width:1px;white-space:nowrap;border:0;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}\n`;\nexport default styles;"],
5
+ "mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";import{css as a}from"@spectrum-web-components/base";const r=a`
2
+ :host{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}.tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}:host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}:host{max-height:100vh;max-height:100dvh;align-items:flex-end;position:fixed!important}sp-underlay{touch-action:none}.tray{overscroll-behavior:contain;display:inline-flex}::slotted(.visually-hidden){clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;width:1px;white-space:nowrap;border:0;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}
3
+ `;export default r;
4
+ //# sourceMappingURL=tray.css.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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{inline-size:100%;justify-content:center;display:flex;position:fixed;inset-block-end:0;inset-inline-start:0}.tray{--mod-modal-max-width:100%;inline-size:100%;max-inline-size:100%;max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));box-sizing:border-box;border-radius:0;border-radius:var(--mod-tray-corner-radius-portrait,0)var(--mod-tray-corner-radius-portrait,0)0 0;transition:opacity var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)),visibility var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))linear calc(var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))),transform var(--mod-tray-exit-animation-duration,var(--spectrum-tray-exit-animation-duration))cubic-bezier(.5,0,1,1)var(--mod-tray-exit-animation-delay,var(--spectrum-tray-exit-animation-delay));background-color:var(--highcontrast-tray-background-color,var(--mod-tray-background-color,var(--spectrum-tray-background-color)));outline:none;margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone,var(--spectrum-tray-spacing-edge-to-tray-safe-zone));padding-block-start:var(--mod-tray-top-to-content-area,var(--spectrum-tray-top-to-content-area));padding-block-end:var(--mod-tray-bottom-to-content-area,var(--spectrum-tray-top-to-content-area));overflow:auto;transform:translateY(100%)}:host([open]) .tray{transition:transform var(--mod-tray-entry-animation-duration,var(--spectrum-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay)),opacity var(--spectrum-tray-entry-animation-duration,var(--mod-tray-entry-animation-duration))cubic-bezier(0,0,.4,1)var(--mod-tray-entry-animation-delay,var(--spectrum-tray-entry-animation-delay));transform:translateY(0)}@media screen and (orientation:landscape){.tray{max-inline-size:var(--mod-tray-max-inline-size,var(--spectrum-tray-max-inline-size));border-start-start-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius));border-start-end-radius:var(--mod-tray-corner-radius,var(--spectrum-tray-corner-radius))}}@media (forced-colors:active){.tray{--highcontrast-tray-background-color:Canvas;border:solid}.tray ::slotted(*){border:none}}:host{--spectrum-tray-exit-animation-delay:var(--system-tray-exit-animation-delay);--spectrum-tray-entry-animation-delay:var(--system-tray-entry-animation-delay);--spectrum-tray-max-inline-size:var(--system-tray-max-inline-size);--spectrum-tray-spacing-edge-to-tray-safe-zone:var(--system-tray-spacing-edge-to-safe-zone);--spectrum-tray-entry-animation-duration:var(--system-tray-entry-animation-duration);--spectrum-tray-exit-animation-duration:var(--system-tray-exit-animation-duration);--spectrum-tray-corner-radius:var(--system-tray-corner-radius);--spectrum-tray-background-color:var(--system-tray-background-color)}:host{max-height:100vh;max-height:100dvh;align-items:flex-end;position:fixed!important}sp-underlay{touch-action:none}.tray{overscroll-behavior:contain;display:inline-flex}::slotted(.visually-hidden){clip:rect(0,0,0,0);clip-path:inset(50%);height:1px;width:1px;white-space:nowrap;border:0;margin:0 -1px -1px 0;padding:0;position:absolute;overflow:hidden}\n`;\nexport default styles;"],
5
+ "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
6
+ "names": ["css", "styles"]
7
+ }