@spectrum-web-components/tray 0.3.3-express.9 → 0.3.5

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 CHANGED
@@ -26,70 +26,34 @@ import { Tray } from '@spectrum-web-components/tray';
26
26
  ## Dialog
27
27
 
28
28
  ```html
29
- <sp-button
30
- variant="secondary"
31
- onclick="
32
- const trigger = this;
33
- const interaction = 'modal';
34
- const content = this.nextElementSibling;
35
- const options = {
36
- offset: 0,
37
- placement: 'none',
38
- receivesFocus: 'auto',
39
- };
40
- Overlay.open(
41
- trigger,
42
- interaction,
43
- content,
44
- options
45
- );
46
- "
47
- >
48
- Toggle tray
49
- </sp-button>
50
- <sp-tray>
51
- <sp-dialog size="small" dismissable>
52
- <h2 slot="heading">New Messages</h2>
53
- You have 5 new messages.
54
- </sp-dialog>
55
- </sp-tray>
29
+ <overlay-trigger type="modal" placement="none">
30
+ <sp-button slot="trigger" variant="secondary">Toggle tray</sp-button>
31
+ <sp-tray slot="click-content">
32
+ <sp-dialog size="small" dismissable>
33
+ <h2 slot="heading">New Messages</h2>
34
+ You have 5 new messages.
35
+ </sp-dialog>
36
+ </sp-tray>
37
+ </overlay-trigger>
56
38
  ```
57
39
 
58
40
  ## Menu
59
41
 
60
42
  ```html
61
- <sp-button
62
- variant="secondary"
63
- onclick="
64
- const trigger = this;
65
- const interaction = 'modal';
66
- const content = this.nextElementSibling;
67
- const options = {
68
- offset: 0,
69
- placement: 'none',
70
- receivesFocus: 'auto',
71
- };
72
- Overlay.open(
73
- trigger,
74
- interaction,
75
- content,
76
- options
77
- );
78
- "
79
- >
80
- Toggle menu
81
- </sp-button>
82
- <sp-tray>
83
- <sp-menu style="width: 100%">
84
- <sp-menu-item selected>Deselect</sp-menu-item>
85
- <sp-menu-item>Select Inverse</sp-menu-item>
86
- <sp-menu-item focused>Feather...</sp-menu-item>
87
- <sp-menu-item>Select and Mask...</sp-menu-item>
88
- <sp-menu-divider></sp-menu-divider>
89
- <sp-menu-item>Save Selection</sp-menu-item>
90
- <sp-menu-item disabled>Make Work Path</sp-menu-item>
91
- </sp-menu>
92
- </sp-tray>
43
+ <overlay-trigger type="modal" placement="none">
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>
93
57
  ```
94
58
 
95
59
  ## Accessibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/tray",
3
- "version": "0.3.3-express.9+abfee7409",
3
+ "version": "0.3.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,20 +44,20 @@
44
44
  "lit-html"
45
45
  ],
46
46
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.2",
48
- "@spectrum-web-components/modal": "^0.6.2-express.9+abfee7409",
49
- "@spectrum-web-components/reactive-controllers": "^0.2.0",
50
- "@spectrum-web-components/shared": "^0.13.4",
51
- "@spectrum-web-components/underlay": "^0.8.4-express.9+abfee7409",
47
+ "@spectrum-web-components/base": "^0.5.4",
48
+ "@spectrum-web-components/modal": "^0.6.4",
49
+ "@spectrum-web-components/reactive-controllers": "^0.2.2",
50
+ "@spectrum-web-components/shared": "^0.13.7",
51
+ "@spectrum-web-components/underlay": "^0.8.5",
52
52
  "tslib": "^2.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@spectrum-css/tray": "^1.0.17"
55
+ "@spectrum-css/tray": "^1.0.18"
56
56
  },
57
57
  "types": "./src/index.d.ts",
58
58
  "customElements": "custom-elements.json",
59
59
  "sideEffects": [
60
60
  "./sp-*.js"
61
61
  ],
62
- "gitHead": "abfee740957976448a3e4cf90df17d6165f857d6"
62
+ "gitHead": "dd76f9532fdea946880147cc7645f113b998c326"
63
63
  }
@@ -0,0 +1,24 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import '@spectrum-web-components/dialog/sp-dialog.js';
13
+ import '@spectrum-web-components/tray/sp-tray.js';
14
+ import { html } from 'lit';
15
+ import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
16
+ measureFixtureCreation(html `
17
+ <sp-tray open>
18
+ <sp-dialog size="small">
19
+ <h2 slot="heading">New Messages</h2>
20
+ You have 5 new messages.
21
+ </sp-dialog>
22
+ </sp-tray>
23
+ `);
24
+ //# sourceMappingURL=basic-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-test.js","sourceRoot":"","sources":["basic-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,8CAA8C,CAAC;AACtD,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,sBAAsB,CAAC,IAAI,CAAA;;;;;;;CAO1B,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport '@spectrum-web-components/tray/sp-tray.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-tray open>\n <sp-dialog size=\"small\">\n <h2 slot=\"heading\">New Messages</h2>\n You have 5 new messages.\n </sp-dialog>\n </sp-tray>\n`);\n"]}