@spectrum-web-components/action-menu 0.14.0-slim.10 → 0.14.1-devmode.7

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.
Files changed (39) hide show
  1. package/custom-elements.json +6 -42
  2. package/package.json +30 -16
  3. package/sp-action-menu.dev.js +3 -0
  4. package/sp-action-menu.dev.js.map +7 -0
  5. package/sp-action-menu.js +3 -14
  6. package/sp-action-menu.js.map +7 -1
  7. package/src/ActionMenu.d.ts +1 -3
  8. package/src/ActionMenu.dev.js +77 -0
  9. package/src/ActionMenu.dev.js.map +7 -0
  10. package/src/ActionMenu.js +55 -66
  11. package/src/ActionMenu.js.map +7 -1
  12. package/src/action-menu.css.dev.js +18 -0
  13. package/src/action-menu.css.dev.js.map +7 -0
  14. package/src/action-menu.css.js +16 -15
  15. package/src/action-menu.css.js.map +7 -1
  16. package/src/index.dev.js +2 -0
  17. package/src/index.dev.js.map +7 -0
  18. package/src/index.js +2 -13
  19. package/src/index.js.map +7 -1
  20. package/stories/action-menu-sizes.stories.js +10 -10
  21. package/stories/action-menu-sizes.stories.js.map +7 -1
  22. package/stories/action-menu.stories.js +54 -61
  23. package/stories/action-menu.stories.js.map +7 -1
  24. package/stories/index.js +23 -26
  25. package/stories/index.js.map +7 -1
  26. package/sync/sp-action-menu.dev.js +3 -0
  27. package/sync/sp-action-menu.dev.js.map +7 -0
  28. package/sync/sp-action-menu.js +3 -14
  29. package/sync/sp-action-menu.js.map +7 -1
  30. package/test/action-menu-sizes.test-vrt.js +4 -15
  31. package/test/action-menu-sizes.test-vrt.js.map +7 -1
  32. package/test/action-menu-sync.test.js +105 -116
  33. package/test/action-menu-sync.test.js.map +7 -1
  34. package/test/action-menu.test-vrt.js +4 -15
  35. package/test/action-menu.test-vrt.js.map +7 -1
  36. package/test/action-menu.test.js +105 -116
  37. package/test/action-menu.test.js.map +7 -1
  38. package/test/benchmark/test-basic.js +8 -19
  39. package/test/benchmark/test-basic.js.map +7 -1
@@ -17,6 +17,12 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "sync/sp-action-menu.ts",
23
+ "declarations": [],
24
+ "exports": []
25
+ },
20
26
  {
21
27
  "kind": "javascript-module",
22
28
  "path": "src/ActionMenu.ts",
@@ -123,48 +129,6 @@
123
129
  }
124
130
  }
125
131
  ]
126
- },
127
- {
128
- "kind": "javascript-module",
129
- "path": "src/action-menu.css.ts",
130
- "declarations": [
131
- {
132
- "kind": "variable",
133
- "name": "styles",
134
- "default": "css`\n:host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-icononly-padding-left-adjusted))*-1);margin-right:calc((var(--spectrum-actionbutton-textonly-padding-right-adjusted) - var(--spectrum-actionbutton-icononly-padding-right-adjusted))*-1)}\n`"
135
- }
136
- ],
137
- "exports": [
138
- {
139
- "kind": "js",
140
- "name": "default",
141
- "declaration": {
142
- "name": "styles",
143
- "module": "src/action-menu.css.ts"
144
- }
145
- }
146
- ]
147
- },
148
- {
149
- "kind": "javascript-module",
150
- "path": "src/index.ts",
151
- "declarations": [],
152
- "exports": [
153
- {
154
- "kind": "js",
155
- "name": "*",
156
- "declaration": {
157
- "name": "*",
158
- "package": "./ActionMenu.js"
159
- }
160
- }
161
- ]
162
- },
163
- {
164
- "kind": "javascript-module",
165
- "path": "sync/sp-action-menu.ts",
166
- "declarations": [],
167
- "exports": []
168
132
  }
169
133
  ]
170
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/action-menu",
3
- "version": "0.14.0-slim.10+3481c77b4",
3
+ "version": "0.14.1-devmode.7+8303f3a2a",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,13 +20,28 @@
20
20
  "module": "./src/index.js",
21
21
  "type": "module",
22
22
  "exports": {
23
- ".": "./src/index.js",
24
- "./src/*": "./src/*",
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
25
27
  "./package.json": "./package.json",
26
- "./sp-action-menu": "./sp-action-menu.js",
27
- "./sp-action-menu.js": "./sp-action-menu.js",
28
- "./sync/sp-action-menu": "./sync/sp-action-menu.js",
29
- "./sync/sp-action-menu.js": "./sync/sp-action-menu.js"
28
+ "./src/ActionMenu.js": {
29
+ "development": "./src/ActionMenu.dev.js",
30
+ "default": "./src/ActionMenu.js"
31
+ },
32
+ "./src/action-menu.css.js": "./src/action-menu.css.js",
33
+ "./src/index.js": {
34
+ "development": "./src/index.dev.js",
35
+ "default": "./src/index.js"
36
+ },
37
+ "./sp-action-menu.js": {
38
+ "development": "./sp-action-menu.dev.js",
39
+ "default": "./sp-action-menu.js"
40
+ },
41
+ "./sync/sp-action-menu.js": {
42
+ "development": "./sync/sp-action-menu.dev.js",
43
+ "default": "./sync/sp-action-menu.js"
44
+ }
30
45
  },
31
46
  "scripts": {
32
47
  "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
@@ -46,17 +61,16 @@
46
61
  "lit-html"
47
62
  ],
48
63
  "dependencies": {
49
- "@spectrum-web-components/action-button": "^0.8.1",
50
- "@spectrum-web-components/base": "^0.5.4",
51
- "@spectrum-web-components/icon": "^0.11.5",
52
- "@spectrum-web-components/icons-workflow": "^0.8.5",
53
- "@spectrum-web-components/menu": "^0.13.0-slim.10+3481c77b4",
54
- "@spectrum-web-components/picker": "^0.11.0-slim.10+3481c77b4",
55
- "@spectrum-web-components/shared": "^0.13.6",
64
+ "@spectrum-web-components/action-button": "^0.9.1-devmode.7+8303f3a2a",
65
+ "@spectrum-web-components/base": "^0.5.9-devmode.31+8303f3a2a",
66
+ "@spectrum-web-components/icon": "^0.11.12-devmode.7+8303f3a2a",
67
+ "@spectrum-web-components/icons-workflow": "^0.8.12-devmode.7+8303f3a2a",
68
+ "@spectrum-web-components/picker": "^0.11.6-devmode.7+8303f3a2a",
69
+ "@spectrum-web-components/shared": "^0.14.5-devmode.7+8303f3a2a",
56
70
  "tslib": "^2.0.0"
57
71
  },
58
72
  "devDependencies": {
59
- "@spectrum-css/actionmenu": "^3.0.18"
73
+ "@spectrum-css/actionmenu": "^4.0.1"
60
74
  },
61
75
  "types": "./src/index.d.ts",
62
76
  "customElements": "custom-elements.json",
@@ -64,5 +78,5 @@
64
78
  "./sp-*.js",
65
79
  "./sync/sp-*.js"
66
80
  ],
67
- "gitHead": "3481c77b431e0ccb4b0230a90cc83e770a46e59f"
81
+ "gitHead": "8303f3a2a90b0aedc15158797662ccfa8f4a2031"
68
82
  }
@@ -0,0 +1,3 @@
1
+ import { ActionMenu } from "./src/ActionMenu.dev.js";
2
+ customElements.define("sp-action-menu", ActionMenu);
3
+ //# sourceMappingURL=sp-action-menu.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-action-menu.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 { ActionMenu } from './src/ActionMenu.dev.js'\n\ncustomElements.define('sp-action-menu', ActionMenu);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-menu': ActionMenu;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,kBAAkB,UAAU;",
6
+ "names": []
7
+ }
package/sp-action-menu.js CHANGED
@@ -1,14 +1,3 @@
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 { ActionMenu } from './src/ActionMenu.js';
13
- customElements.define('sp-action-menu', ActionMenu);
14
- //# sourceMappingURL=sp-action-menu.js.map
1
+ import { ActionMenu } from "./src/ActionMenu.js";
2
+ customElements.define("sp-action-menu", ActionMenu);
3
+ //# sourceMappingURL=sp-action-menu.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"sp-action-menu.js","sourceRoot":"","sources":["sp-action-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,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 { ActionMenu } from './src/ActionMenu.js';\n\ncustomElements.define('sp-action-menu', ActionMenu);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-menu': ActionMenu;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-action-menu.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 { ActionMenu } from './src/ActionMenu.js';\n\ncustomElements.define('sp-action-menu', ActionMenu);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-action-menu': ActionMenu;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,kBAAkB,UAAU;",
6
+ "names": []
7
+ }
@@ -1,6 +1,4 @@
1
1
  import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
2
- import '@spectrum-web-components/menu/sp-menu.js';
3
- import '@spectrum-web-components/popover/sp-popover.js';
4
2
  import { PickerBase } from '@spectrum-web-components/picker';
5
3
  import '@spectrum-web-components/action-button/sp-action-button.js';
6
4
  import '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';
@@ -26,6 +24,6 @@ export declare class ActionMenu extends ActionMenu_base {
26
24
  private get hasLabel();
27
25
  protected get buttonContent(): TemplateResult[];
28
26
  protected render(): TemplateResult;
29
- protected updated(changedProperties: PropertyValues): void;
27
+ protected update(changedProperties: PropertyValues<this>): void;
30
28
  }
31
29
  export {};
@@ -0,0 +1,77 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html
14
+ } from "@spectrum-web-components/base";
15
+ import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import { PickerBase } from "@spectrum-web-components/picker";
18
+ import "@spectrum-web-components/action-button/sp-action-button.js";
19
+ import { ObserveSlotText } from "@spectrum-web-components/shared/src/observe-slot-text.js";
20
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
21
+ import actionMenuStyles from "./action-menu.css.js";
22
+ export class ActionMenu extends ObserveSlotText(PickerBase, "label") {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.selects = void 0;
26
+ this.listRole = "menu";
27
+ this.itemRole = "menuitem";
28
+ }
29
+ static get styles() {
30
+ return [actionMenuStyles];
31
+ }
32
+ get hasLabel() {
33
+ return this.slotHasContent;
34
+ }
35
+ get buttonContent() {
36
+ return [
37
+ html`
38
+ <slot name="icon" slot="icon" ?icon-only=${!this.hasLabel}>
39
+ <sp-icon-more class="icon"></sp-icon-more>
40
+ </slot>
41
+ <slot name="label" ?hidden=${!this.hasLabel}></slot>
42
+ `
43
+ ];
44
+ }
45
+ render() {
46
+ return html`
47
+ <sp-action-button
48
+ quiet
49
+ ?selected=${this.open}
50
+ aria-haspopup="true"
51
+ aria-controls="popover"
52
+ aria-expanded=${this.open ? "true" : "false"}
53
+ aria-label=${ifDefined(this.label || void 0)}
54
+ id="button"
55
+ class="button"
56
+ size=${this.size}
57
+ @blur=${this.onButtonBlur}
58
+ @click=${this.onButtonClick}
59
+ @focus=${this.onButtonFocus}
60
+ ?disabled=${this.disabled}
61
+ >
62
+ ${this.buttonContent}
63
+ </sp-action-button>
64
+ `;
65
+ }
66
+ update(changedProperties) {
67
+ if (changedProperties.has("invalid")) {
68
+ this.invalid = false;
69
+ }
70
+ this.quiet = true;
71
+ super.update(changedProperties);
72
+ }
73
+ }
74
+ __decorateClass([
75
+ property({ type: String })
76
+ ], ActionMenu.prototype, "selects", 2);
77
+ //# sourceMappingURL=ActionMenu.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["ActionMenu.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 TemplateResult,\n} from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { PickerBase } from '@spectrum-web-components/picker';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\nimport actionMenuStyles from './action-menu.css.js';\n\n/**\n * @element sp-action-menu\n *\n * @slot - menu items to be listed in the Action Menu\n * @slot icon - The icon to use for Action Menu\n * @slot label - The label to use on for the Action Menu\n * @attr selects - By default `sp-action-menu` does not manage a selection. If\n * you'd like for a selection to be held by the `sp-menu` that it presents in\n * its overlay, use `selects=\"single\" to activate this functionality.\n */\nexport class ActionMenu extends ObserveSlotText(PickerBase, 'label') {\n public static override get styles(): CSSResultArray {\n return [actionMenuStyles];\n }\n\n @property({ type: String })\n public override selects: undefined | 'single' = undefined;\n\n protected override listRole: 'listbox' | 'menu' = 'menu';\n protected override itemRole = 'menuitem';\n private get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n protected override get buttonContent(): TemplateResult[] {\n return [\n html`\n <slot name=\"icon\" slot=\"icon\" ?icon-only=${!this.hasLabel}>\n <sp-icon-more class=\"icon\"></sp-icon-more>\n </slot>\n <slot name=\"label\" ?hidden=${!this.hasLabel}></slot>\n `,\n ];\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-action-button\n quiet\n ?selected=${this.open}\n aria-haspopup=\"true\"\n aria-controls=\"popover\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-label=${ifDefined(this.label || undefined)}\n id=\"button\"\n class=\"button\"\n size=${this.size}\n @blur=${this.onButtonBlur}\n @click=${this.onButtonClick}\n @focus=${this.onButtonFocus}\n ?disabled=${this.disabled}\n >\n ${this.buttonContent}\n </sp-action-button>\n `;\n }\n\n protected override update(changedProperties: PropertyValues<this>): void {\n if (changedProperties.has('invalid')) {\n this.invalid = false;\n }\n this.quiet = true;\n super.update(changedProperties);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,aAAM,mBAAmB,gBAAgB,YAAY,OAAO,EAAE;AAAA,EAA9D;AAAA;AAMa,mBAAgC;AAE7B,oBAA+B;AAC/B,oBAAW;AAAA;AAAA,aARH,SAAyB;AAChD,WAAO,CAAC,gBAAgB;AAAA,EAC5B;AAAA,MAOY,WAAoB;AAC5B,WAAO,KAAK;AAAA,EAChB;AAAA,MAEuB,gBAAkC;AACrD,WAAO;AAAA,MACH;AAAA,2DAC+C,CAAC,KAAK;AAAA;AAAA;AAAA,6CAGpB,CAAC,KAAK;AAAA;AAAA,IAE3C;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,4BAGa,KAAK;AAAA;AAAA;AAAA,gCAGD,KAAK,OAAO,SAAS;AAAA,6BACxB,UAAU,KAAK,SAAS,MAAS;AAAA;AAAA;AAAA,uBAGvC,KAAK;AAAA,wBACJ,KAAK;AAAA,yBACJ,KAAK;AAAA,yBACL,KAAK;AAAA,4BACF,KAAK;AAAA;AAAA,kBAEf,KAAK;AAAA;AAAA;AAAA,EAGnB;AAAA,EAEmB,OAAO,mBAA+C;AACrE,QAAI,kBAAkB,IAAI,SAAS,GAAG;AAClC,WAAK,UAAU;AAAA,IACnB;AACA,SAAK,QAAQ;AACb,UAAM,OAAO,iBAAiB;AAAA,EAClC;AACJ;AAhDoB;AAAA,EADhB,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACV,AANb,WAMa;",
6
+ "names": []
7
+ }
package/src/ActionMenu.js CHANGED
@@ -1,67 +1,56 @@
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 { __decorate } from "tslib";
13
- import { html, } from '@spectrum-web-components/base';
14
- import { ifDefined } from '@spectrum-web-components/base/src/directives.js';
15
- import { property } from '@spectrum-web-components/base/src/decorators.js';
16
- import '@spectrum-web-components/menu/sp-menu.js';
17
- import '@spectrum-web-components/popover/sp-popover.js';
18
- import { PickerBase } from '@spectrum-web-components/picker';
19
- import '@spectrum-web-components/action-button/sp-action-button.js';
20
- import { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';
21
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';
22
- import actionMenuStyles from './action-menu.css.js';
23
- /**
24
- * @element sp-action-menu
25
- *
26
- * @slot - menu items to be listed in the Action Menu
27
- * @slot icon - The icon to use for Action Menu
28
- * @slot label - The label to use on for the Action Menu
29
- * @attr selects - By default `sp-action-menu` does not manage a selection. If
30
- * you'd like for a selection to be held by the `sp-menu` that it presents in
31
- * its overlay, use `selects="single" to activate this functionality.
32
- */
33
- export class ActionMenu extends ObserveSlotText(PickerBase, 'label') {
34
- constructor() {
35
- super(...arguments);
36
- this.selects = undefined;
37
- this.listRole = 'menu';
38
- this.itemRole = 'menuitem';
39
- }
40
- static get styles() {
41
- return [actionMenuStyles];
42
- }
43
- get hasLabel() {
44
- return this.slotHasContent;
45
- }
46
- get buttonContent() {
47
- return [
48
- html `
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html
14
+ } from "@spectrum-web-components/base";
15
+ import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import { PickerBase } from "@spectrum-web-components/picker";
18
+ import "@spectrum-web-components/action-button/sp-action-button.js";
19
+ import { ObserveSlotText } from "@spectrum-web-components/shared/src/observe-slot-text.js";
20
+ import "@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";
21
+ import actionMenuStyles from "./action-menu.css.js";
22
+ export class ActionMenu extends ObserveSlotText(PickerBase, "label") {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.selects = void 0;
26
+ this.listRole = "menu";
27
+ this.itemRole = "menuitem";
28
+ }
29
+ static get styles() {
30
+ return [actionMenuStyles];
31
+ }
32
+ get hasLabel() {
33
+ return this.slotHasContent;
34
+ }
35
+ get buttonContent() {
36
+ return [
37
+ html`
49
38
  <slot name="icon" slot="icon" ?icon-only=${!this.hasLabel}>
50
39
  <sp-icon-more class="icon"></sp-icon-more>
51
40
  </slot>
52
41
  <slot name="label" ?hidden=${!this.hasLabel}></slot>
53
- `,
54
- ];
55
- }
56
- render() {
57
- return html `
42
+ `
43
+ ];
44
+ }
45
+ render() {
46
+ return html`
58
47
  <sp-action-button
59
48
  quiet
60
49
  ?selected=${this.open}
61
50
  aria-haspopup="true"
62
51
  aria-controls="popover"
63
- aria-expanded=${this.open ? 'true' : 'false'}
64
- aria-label=${ifDefined(this.label || undefined)}
52
+ aria-expanded=${this.open ? "true" : "false"}
53
+ aria-label=${ifDefined(this.label || void 0)}
65
54
  id="button"
66
55
  class="button"
67
56
  size=${this.size}
@@ -73,16 +62,16 @@ export class ActionMenu extends ObserveSlotText(PickerBase, 'label') {
73
62
  ${this.buttonContent}
74
63
  </sp-action-button>
75
64
  `;
65
+ }
66
+ update(changedProperties) {
67
+ if (changedProperties.has("invalid")) {
68
+ this.invalid = false;
76
69
  }
77
- updated(changedProperties) {
78
- super.updated(changedProperties);
79
- if (changedProperties.has('invalid')) {
80
- this.invalid = false;
81
- }
82
- this.quiet = true;
83
- }
70
+ this.quiet = true;
71
+ super.update(changedProperties);
72
+ }
84
73
  }
85
- __decorate([
86
- property({ type: String })
87
- ], ActionMenu.prototype, "selects", void 0);
88
- //# sourceMappingURL=ActionMenu.js.map
74
+ __decorateClass([
75
+ property({ type: String })
76
+ ], ActionMenu.prototype, "selects", 2);
77
+ //# sourceMappingURL=ActionMenu.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ActionMenu.js","sourceRoot":"","sources":["ActionMenu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,GAGP,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,0CAA0C,CAAC;AAClD,OAAO,gDAAgD,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,4DAA4D,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,+DAA+D,CAAC;AACvE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,OAAO,UAAW,SAAQ,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC;IAApE;;QAMW,YAAO,GAAyB,SAAS,CAAC;QAEvC,aAAQ,GAAuB,MAAM,CAAC;QACtC,aAAQ,GAAG,UAAU,CAAC;IA6CpC,CAAC;IArDU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC9B,CAAC;IAOD,IAAY,QAAQ;QAChB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,IAAc,aAAa;QACvB,OAAO;YACH,IAAI,CAAA;2DAC2C,CAAC,IAAI,CAAC,QAAQ;;;6CAG5B,CAAC,IAAI,CAAC,QAAQ;aAC9C;SACJ,CAAC;IACN,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;;;4BAGS,IAAI,CAAC,IAAI;;;gCAGL,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;6BAC/B,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC;;;uBAGxC,IAAI,CAAC,IAAI;wBACR,IAAI,CAAC,YAAY;yBAChB,IAAI,CAAC,aAAa;yBAClB,IAAI,CAAC,aAAa;4BACf,IAAI,CAAC,QAAQ;;kBAEvB,IAAI,CAAC,aAAa;;SAE3B,CAAC;IACN,CAAC;IAES,OAAO,CAAC,iBAAiC;QAC/C,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAClC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACxB;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;CACJ;AAhDG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACsB","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 TemplateResult,\n} from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport '@spectrum-web-components/menu/sp-menu.js';\nimport '@spectrum-web-components/popover/sp-popover.js';\nimport { PickerBase } from '@spectrum-web-components/picker';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\nimport actionMenuStyles from './action-menu.css.js';\n\n/**\n * @element sp-action-menu\n *\n * @slot - menu items to be listed in the Action Menu\n * @slot icon - The icon to use for Action Menu\n * @slot label - The label to use on for the Action Menu\n * @attr selects - By default `sp-action-menu` does not manage a selection. If\n * you'd like for a selection to be held by the `sp-menu` that it presents in\n * its overlay, use `selects=\"single\" to activate this functionality.\n */\nexport class ActionMenu extends ObserveSlotText(PickerBase, 'label') {\n public static get styles(): CSSResultArray {\n return [actionMenuStyles];\n }\n\n @property({ type: String })\n public selects: undefined | 'single' = undefined;\n\n protected listRole: 'listbox' | 'menu' = 'menu';\n protected itemRole = 'menuitem';\n private get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n protected get buttonContent(): TemplateResult[] {\n return [\n html`\n <slot name=\"icon\" slot=\"icon\" ?icon-only=${!this.hasLabel}>\n <sp-icon-more class=\"icon\"></sp-icon-more>\n </slot>\n <slot name=\"label\" ?hidden=${!this.hasLabel}></slot>\n `,\n ];\n }\n\n protected render(): TemplateResult {\n return html`\n <sp-action-button\n quiet\n ?selected=${this.open}\n aria-haspopup=\"true\"\n aria-controls=\"popover\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-label=${ifDefined(this.label || undefined)}\n id=\"button\"\n class=\"button\"\n size=${this.size}\n @blur=${this.onButtonBlur}\n @click=${this.onButtonClick}\n @focus=${this.onButtonFocus}\n ?disabled=${this.disabled}\n >\n ${this.buttonContent}\n </sp-action-button>\n `;\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has('invalid')) {\n this.invalid = false;\n }\n this.quiet = true;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["ActionMenu.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 TemplateResult,\n} from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { PickerBase } from '@spectrum-web-components/picker';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js';\nimport actionMenuStyles from './action-menu.css.js';\n\n/**\n * @element sp-action-menu\n *\n * @slot - menu items to be listed in the Action Menu\n * @slot icon - The icon to use for Action Menu\n * @slot label - The label to use on for the Action Menu\n * @attr selects - By default `sp-action-menu` does not manage a selection. If\n * you'd like for a selection to be held by the `sp-menu` that it presents in\n * its overlay, use `selects=\"single\" to activate this functionality.\n */\nexport class ActionMenu extends ObserveSlotText(PickerBase, 'label') {\n public static override get styles(): CSSResultArray {\n return [actionMenuStyles];\n }\n\n @property({ type: String })\n public override selects: undefined | 'single' = undefined;\n\n protected override listRole: 'listbox' | 'menu' = 'menu';\n protected override itemRole = 'menuitem';\n private get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n protected override get buttonContent(): TemplateResult[] {\n return [\n html`\n <slot name=\"icon\" slot=\"icon\" ?icon-only=${!this.hasLabel}>\n <sp-icon-more class=\"icon\"></sp-icon-more>\n </slot>\n <slot name=\"label\" ?hidden=${!this.hasLabel}></slot>\n `,\n ];\n }\n\n protected override render(): TemplateResult {\n return html`\n <sp-action-button\n quiet\n ?selected=${this.open}\n aria-haspopup=\"true\"\n aria-controls=\"popover\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-label=${ifDefined(this.label || undefined)}\n id=\"button\"\n class=\"button\"\n size=${this.size}\n @blur=${this.onButtonBlur}\n @click=${this.onButtonClick}\n @focus=${this.onButtonFocus}\n ?disabled=${this.disabled}\n >\n ${this.buttonContent}\n </sp-action-button>\n `;\n }\n\n protected override update(changedProperties: PropertyValues<this>): void {\n if (changedProperties.has('invalid')) {\n this.invalid = false;\n }\n this.quiet = true;\n super.update(changedProperties);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,aAAM,mBAAmB,gBAAgB,YAAY,OAAO,EAAE;AAAA,EAA9D;AAAA;AAMa,mBAAgC;AAE7B,oBAA+B;AAC/B,oBAAW;AAAA;AAAA,aARH,SAAyB;AAChD,WAAO,CAAC,gBAAgB;AAAA,EAC5B;AAAA,MAOY,WAAoB;AAC5B,WAAO,KAAK;AAAA,EAChB;AAAA,MAEuB,gBAAkC;AACrD,WAAO;AAAA,MACH;AAAA,2DAC+C,CAAC,KAAK;AAAA;AAAA;AAAA,6CAGpB,CAAC,KAAK;AAAA;AAAA,IAE3C;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,4BAGa,KAAK;AAAA;AAAA;AAAA,gCAGD,KAAK,OAAO,SAAS;AAAA,6BACxB,UAAU,KAAK,SAAS,MAAS;AAAA;AAAA;AAAA,uBAGvC,KAAK;AAAA,wBACJ,KAAK;AAAA,yBACJ,KAAK;AAAA,yBACL,KAAK;AAAA,4BACF,KAAK;AAAA;AAAA,kBAEf,KAAK;AAAA;AAAA;AAAA,EAGnB;AAAA,EAEmB,OAAO,mBAA+C;AACrE,QAAI,kBAAkB,IAAI,SAAS,GAAG;AAClC,WAAK,UAAU;AAAA,IACnB;AACA,SAAK,QAAQ;AACb,UAAM,OAAO,iBAAiB;AAAA,EAClC;AACJ;AAhDoB;AAAA,EADhB,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACV,AANb,WAMa;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-inline-end:calc((var(
4
+ --custom-actionbutton-edge-to-text,
5
+ var(--spectrum-actionbutton-edge-to-text)
6
+ ) - var(
7
+ --custom-actionbutton-edge-to-visual-only,
8
+ var(--spectrum-actionbutton-edge-to-visual-only)
9
+ ))*-1);margin-inline-start:calc((var(
10
+ --custom-actionbutton-edge-to-text,
11
+ var(--spectrum-actionbutton-edge-to-text)
12
+ ) - var(
13
+ --custom-actionbutton-edge-to-visual-only,
14
+ var(--spectrum-actionbutton-edge-to-visual-only)
15
+ ))*-1)}
16
+ `;
17
+ export default styles;
18
+ //# sourceMappingURL=action-menu.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-menu.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-inline-end:calc((var(\n--custom-actionbutton-edge-to-text,\nvar(--spectrum-actionbutton-edge-to-text)\n) - var(\n--custom-actionbutton-edge-to-visual-only,\nvar(--spectrum-actionbutton-edge-to-visual-only)\n))*-1);margin-inline-start:calc((var(\n--custom-actionbutton-edge-to-text,\nvar(--spectrum-actionbutton-edge-to-text)\n) - var(\n--custom-actionbutton-edge-to-visual-only,\nvar(--spectrum-actionbutton-edge-to-visual-only)\n))*-1)}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAef,eAAe;",
6
+ "names": []
7
+ }
@@ -1,17 +1,18 @@
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 { css } from '@spectrum-web-components/base';
13
- const styles = css `
14
- :host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-icononly-padding-left-adjusted))*-1);margin-right:calc((var(--spectrum-actionbutton-textonly-padding-right-adjusted) - var(--spectrum-actionbutton-icononly-padding-right-adjusted))*-1)}
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ :host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-inline-end:calc((var(
4
+ --custom-actionbutton-edge-to-text,
5
+ var(--spectrum-actionbutton-edge-to-text)
6
+ ) - var(
7
+ --custom-actionbutton-edge-to-visual-only,
8
+ var(--spectrum-actionbutton-edge-to-visual-only)
9
+ ))*-1);margin-inline-start:calc((var(
10
+ --custom-actionbutton-edge-to-text,
11
+ var(--spectrum-actionbutton-edge-to-text)
12
+ ) - var(
13
+ --custom-actionbutton-edge-to-visual-only,
14
+ var(--spectrum-actionbutton-edge-to-visual-only)
15
+ ))*-1)}
15
16
  `;
16
17
  export default styles;
17
- //# sourceMappingURL=action-menu.css.js.map
18
+ //# sourceMappingURL=action-menu.css.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"action-menu.css.js","sourceRoot":"","sources":["action-menu.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;CAEjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-icononly-padding-left-adjusted))*-1);margin-right:calc((var(--spectrum-actionbutton-textonly-padding-right-adjusted) - var(--spectrum-actionbutton-icononly-padding-right-adjusted))*-1)}\n`;\nexport default styles;"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["action-menu.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:inline-flex}:host([quiet]){min-width:0}::slotted([slot=icon]){flex-shrink:0}.icon{flex-shrink:0}#popover{display:none;max-width:none;width:auto}:host([dir=ltr]) .icon,:host([dir=ltr]) ::slotted([slot=icon]){margin-left:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir=rtl]) .icon,:host([dir=rtl]) ::slotted([slot=icon]){margin-right:calc((var(--spectrum-actionbutton-textonly-padding-left-adjusted) - var(--spectrum-actionbutton-padding-left-adjusted))*-1)}:host([dir]) slot[icon-only] .icon,:host([dir]) slot[icon-only]::slotted([slot=icon]){margin-inline-end:calc((var(\n--custom-actionbutton-edge-to-text,\nvar(--spectrum-actionbutton-edge-to-text)\n) - var(\n--custom-actionbutton-edge-to-visual-only,\nvar(--spectrum-actionbutton-edge-to-visual-only)\n))*-1);margin-inline-start:calc((var(\n--custom-actionbutton-edge-to-text,\nvar(--spectrum-actionbutton-edge-to-text)\n) - var(\n--custom-actionbutton-edge-to-visual-only,\nvar(--spectrum-actionbutton-edge-to-visual-only)\n))*-1)}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAef,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ActionMenu.dev.js";
2
+ //# 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*/\nexport * from './ActionMenu.dev.js'\n"],
5
+ "mappings": "AAWA;",
6
+ "names": []
7
+ }
package/src/index.js CHANGED
@@ -1,13 +1,2 @@
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
- export * from './ActionMenu.js';
13
- //# sourceMappingURL=index.js.map
1
+ export * from "./ActionMenu.js";
2
+ //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,cAAc,iBAAiB,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*/\nexport * from './ActionMenu.js';\n"]}
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*/\nexport * from './ActionMenu.js';\n"],
5
+ "mappings": "AAWA;",
6
+ "names": []
7
+ }
@@ -1,12 +1,12 @@
1
- import '@spectrum-web-components/menu/sp-menu.js';
2
- import '@spectrum-web-components/menu/sp-menu-item.js';
3
- import { ActionMenuMarkup } from './';
1
+ import "@spectrum-web-components/menu/sp-menu.js";
2
+ import "@spectrum-web-components/menu/sp-menu-item.js";
3
+ import { ActionMenuMarkup } from "./";
4
4
  export default {
5
- title: 'Action menu/Sizes',
6
- component: 'sp-action-menu',
5
+ title: "Action menu/Sizes",
6
+ component: "sp-action-menu"
7
7
  };
8
- export const s = () => ActionMenuMarkup({ size: 's' });
9
- export const m = () => ActionMenuMarkup({ size: 'm' });
10
- export const l = () => ActionMenuMarkup({ size: 'l' });
11
- export const xl = () => ActionMenuMarkup({ size: 'xl' });
12
- //# sourceMappingURL=action-menu-sizes.stories.js.map
8
+ export const s = () => ActionMenuMarkup({ size: "s" });
9
+ export const m = () => ActionMenuMarkup({ size: "m" });
10
+ export const l = () => ActionMenuMarkup({ size: "l" });
11
+ export const xl = () => ActionMenuMarkup({ size: "xl" });
12
+ //# sourceMappingURL=action-menu-sizes.stories.js.map