@spectrum-web-components/action-menu 0.13.2-express.0 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +7 -15
- package/package.json +9 -9
- package/src/ActionMenu.d.ts +1 -1
- package/src/ActionMenu.js +1 -1
- package/src/ActionMenu.js.map +1 -1
- package/src/action-menu.css.js +1 -1
- package/src/action-menu.css.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -17,12 +17,6 @@
|
|
|
17
17
|
}
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "sync/sp-action-menu.ts",
|
|
23
|
-
"declarations": [],
|
|
24
|
-
"exports": []
|
|
25
|
-
},
|
|
26
20
|
{
|
|
27
21
|
"kind": "javascript-module",
|
|
28
22
|
"path": "src/ActionMenu.ts",
|
|
@@ -89,14 +83,6 @@
|
|
|
89
83
|
"text": "TemplateResult[]"
|
|
90
84
|
},
|
|
91
85
|
"privacy": "protected"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"kind": "field",
|
|
95
|
-
"name": "renderButton",
|
|
96
|
-
"type": {
|
|
97
|
-
"text": "TemplateResult"
|
|
98
|
-
},
|
|
99
|
-
"privacy": "protected"
|
|
100
86
|
}
|
|
101
87
|
],
|
|
102
88
|
"attributes": [
|
|
@@ -145,7 +131,7 @@
|
|
|
145
131
|
{
|
|
146
132
|
"kind": "variable",
|
|
147
133
|
"name": "styles",
|
|
148
|
-
"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(
|
|
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`"
|
|
149
135
|
}
|
|
150
136
|
],
|
|
151
137
|
"exports": [
|
|
@@ -173,6 +159,12 @@
|
|
|
173
159
|
}
|
|
174
160
|
}
|
|
175
161
|
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"kind": "javascript-module",
|
|
165
|
+
"path": "sync/sp-action-menu.ts",
|
|
166
|
+
"declarations": [],
|
|
167
|
+
"exports": []
|
|
176
168
|
}
|
|
177
169
|
]
|
|
178
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/action-menu",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"lit-html"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@spectrum-web-components/action-button": "^0.7.
|
|
49
|
+
"@spectrum-web-components/action-button": "^0.7.3",
|
|
50
50
|
"@spectrum-web-components/base": "^0.5.1",
|
|
51
|
-
"@spectrum-web-components/icon": "^0.11.
|
|
52
|
-
"@spectrum-web-components/icons-workflow": "^0.8.
|
|
53
|
-
"@spectrum-web-components/menu": "^0.11.
|
|
54
|
-
"@spectrum-web-components/picker": "^0.9.
|
|
55
|
-
"@spectrum-web-components/shared": "^0.13.
|
|
51
|
+
"@spectrum-web-components/icon": "^0.11.2",
|
|
52
|
+
"@spectrum-web-components/icons-workflow": "^0.8.2",
|
|
53
|
+
"@spectrum-web-components/menu": "^0.11.3",
|
|
54
|
+
"@spectrum-web-components/picker": "^0.9.4",
|
|
55
|
+
"@spectrum-web-components/shared": "^0.13.3",
|
|
56
56
|
"tslib": "^2.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@spectrum-css/actionmenu": "^3.0.
|
|
59
|
+
"@spectrum-css/actionmenu": "^3.0.13"
|
|
60
60
|
},
|
|
61
61
|
"types": "./src/index.d.ts",
|
|
62
62
|
"customElements": "custom-elements.json",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"./sp-*.js",
|
|
65
65
|
"./sync/sp-*.js"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "c97274feee2ed59439fb25b408b36ac5d7d50cad"
|
|
68
68
|
}
|
package/src/ActionMenu.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class ActionMenu extends ActionMenu_base {
|
|
|
25
25
|
protected itemRole: string;
|
|
26
26
|
private get hasLabel();
|
|
27
27
|
protected get buttonContent(): TemplateResult[];
|
|
28
|
-
protected
|
|
28
|
+
protected render(): TemplateResult;
|
|
29
29
|
protected updated(changedProperties: PropertyValues): void;
|
|
30
30
|
}
|
|
31
31
|
export {};
|
package/src/ActionMenu.js
CHANGED
package/src/ActionMenu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.js","sourceRoot":"","sources":["ActionMenu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,GAGP,MAAM,+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C;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"]}
|
package/src/action-menu.css.js
CHANGED
|
@@ -11,7 +11,7 @@ governing permissions and limitations under the License.
|
|
|
11
11
|
*/
|
|
12
12
|
import { css } from '@spectrum-web-components/base';
|
|
13
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(
|
|
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)}
|
|
15
15
|
`;
|
|
16
16
|
export default styles;
|
|
17
17
|
//# sourceMappingURL=action-menu.css.js.map
|
|
@@ -1 +1 @@
|
|
|
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(
|
|
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;"]}
|