@spectrum-web-components/action-menu
Advanced tools
Comparing version 0.50.0-beta.8 to 0.50.0-beta.9
{ | ||
"name": "@spectrum-web-components/action-menu", | ||
"version": "0.50.0-beta.8", | ||
"version": "0.50.0-beta.9", | ||
"publishConfig": { | ||
@@ -64,11 +64,11 @@ "access": "public" | ||
"dependencies": { | ||
"@spectrum-web-components/action-button": "^0.50.0-beta.8", | ||
"@spectrum-web-components/base": "^0.50.0-beta.8", | ||
"@spectrum-web-components/icon": "^0.50.0-beta.8", | ||
"@spectrum-web-components/icons-workflow": "^0.50.0-beta.8", | ||
"@spectrum-web-components/picker": "^0.50.0-beta.8", | ||
"@spectrum-web-components/shared": "^0.50.0-beta.8" | ||
"@spectrum-web-components/action-button": "^0.50.0-beta.9", | ||
"@spectrum-web-components/base": "^0.50.0-beta.9", | ||
"@spectrum-web-components/icon": "^0.50.0-beta.9", | ||
"@spectrum-web-components/icons-workflow": "^0.50.0-beta.9", | ||
"@spectrum-web-components/picker": "^0.50.0-beta.9", | ||
"@spectrum-web-components/shared": "^0.50.0-beta.9" | ||
}, | ||
"devDependencies": { | ||
"@spectrum-css/actionmenu": "^6.1.1" | ||
"@spectrum-css/actionmenu": "^7.0.0-s2-foundations.15" | ||
}, | ||
@@ -82,3 +82,3 @@ "types": "./src/index.d.ts", | ||
], | ||
"gitHead": "8764173251bcf2b85ddef058ec9433c0f8dfcc6c" | ||
"gitHead": "c984cc2babbfecd14c86403ab920fbf6b0beb52c" | ||
} |
@@ -28,6 +28,2 @@ import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base'; | ||
selects: undefined | 'single'; | ||
/** | ||
* @deprecated Use `staticColor` instead. | ||
*/ | ||
static: 'white' | 'black' | undefined; | ||
staticColor?: 'white' | 'black'; | ||
@@ -34,0 +30,0 @@ protected listRole: 'listbox' | 'menu'; |
@@ -32,3 +32,2 @@ "use strict"; | ||
this.selects = void 0; | ||
this.static = void 0; | ||
this.listRole = "menu"; | ||
@@ -59,3 +58,6 @@ this.itemRole = "menuitem"; | ||
> | ||
<sp-icon-more class="icon"></sp-icon-more> | ||
<sp-icon-more | ||
class="icon" | ||
size=${this.size} | ||
></sp-icon-more> | ||
</slot> | ||
@@ -113,5 +115,2 @@ `} | ||
__decorateClass([ | ||
property({ type: String, reflect: true }) | ||
], ActionMenu.prototype, "static", 2); | ||
__decorateClass([ | ||
property({ reflect: true, attribute: "static-color" }) | ||
@@ -118,0 +117,0 @@ ], ActionMenu.prototype, "staticColor", 2); |
@@ -1,3 +0,3 @@ | ||
"use strict";var u=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=(s,o,e,l)=>{for(var t=l>1?void 0:l?h(o,e):o,n=s.length-1,a;n>=0;n--)(a=s[n])&&(t=(l?a(o,e,t):a(t))||t);return l&&t&&u(o,e,t),t};import{html as r}from"@spectrum-web-components/base";import{state as c}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as d}from"@spectrum-web-components/base/src/directives.js";import{property as p}from"@spectrum-web-components/base/src/decorators.js";import{DESCRIPTION_ID as b,PickerBase as m}from"@spectrum-web-components/picker";import"@spectrum-web-components/action-button/sp-action-button.js";import{ObserveSlotPresence as f}from"@spectrum-web-components/shared/src/observe-slot-presence.js";import{ObserveSlotText as $}from"@spectrum-web-components/shared/src/observe-slot-text.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";import v from"./action-menu.css.js";import{SlottableRequestEvent as y}from"@spectrum-web-components/overlay/src/slottable-request-event.js";export class ActionMenu extends f($(m,"label"),'[slot="label-only"]'){constructor(){super(...arguments);this.selects=void 0;this.static=void 0;this.listRole="menu";this.itemRole="menuitem";this.handleSlottableRequest=e=>{this.dispatchEvent(new y(e.name,e.data))}}static get styles(){return[v]}get hasLabel(){return this.slotHasContent}get labelOnly(){return this.slotContentIsPresent}get buttonContent(){return[r` | ||
${this.labelOnly?r``:r` | ||
"use strict";var u=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=(r,o,e,i)=>{for(var t=i>1?void 0:i?h(o,e):o,n=r.length-1,a;n>=0;n--)(a=r[n])&&(t=(i?a(o,e,t):a(t))||t);return i&&t&&u(o,e,t),t};import{html as s}from"@spectrum-web-components/base";import{state as c}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as d}from"@spectrum-web-components/base/src/directives.js";import{property as p}from"@spectrum-web-components/base/src/decorators.js";import{DESCRIPTION_ID as b,PickerBase as m}from"@spectrum-web-components/picker";import"@spectrum-web-components/action-button/sp-action-button.js";import{ObserveSlotPresence as f}from"@spectrum-web-components/shared/src/observe-slot-presence.js";import{ObserveSlotText as $}from"@spectrum-web-components/shared/src/observe-slot-text.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-more.js";import v from"./action-menu.css.js";import{SlottableRequestEvent as y}from"@spectrum-web-components/overlay/src/slottable-request-event.js";export class ActionMenu extends f($(m,"label"),'[slot="label-only"]'){constructor(){super(...arguments);this.selects=void 0;this.listRole="menu";this.itemRole="menuitem";this.handleSlottableRequest=e=>{this.dispatchEvent(new y(e.name,e.data))}}static get styles(){return[v]}get hasLabel(){return this.slotHasContent}get labelOnly(){return this.slotContentIsPresent}get buttonContent(){return[s` | ||
${this.labelOnly?s``:s` | ||
<slot | ||
@@ -9,3 +9,6 @@ name="icon" | ||
> | ||
<sp-icon-more class="icon"></sp-icon-more> | ||
<sp-icon-more | ||
class="icon" | ||
size=${this.size} | ||
></sp-icon-more> | ||
</slot> | ||
@@ -19,3 +22,3 @@ `} | ||
></slot> | ||
`]}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),r` | ||
`]}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),s` | ||
<sp-action-button | ||
@@ -41,3 +44,3 @@ aria-describedby=${b} | ||
${this.renderMenu} ${this.renderDescriptionSlot} | ||
`}update(e){e.has("invalid")&&(this.invalid=!1),super.update(e)}}i([p({type:String})],ActionMenu.prototype,"selects",2),i([p({type:String,reflect:!0})],ActionMenu.prototype,"static",2),i([p({reflect:!0,attribute:"static-color"})],ActionMenu.prototype,"staticColor",2),i([c()],ActionMenu.prototype,"labelOnly",1); | ||
`}update(e){e.has("invalid")&&(this.invalid=!1),super.update(e)}}l([p({type:String})],ActionMenu.prototype,"selects",2),l([p({reflect:!0,attribute:"static-color"})],ActionMenu.prototype,"staticColor",2),l([c()],ActionMenu.prototype,"labelOnly",1); | ||
//# sourceMappingURL=ActionMenu.js.map |
@@ -193,11 +193,11 @@ "use strict"; | ||
}); | ||
it("can be `static`", async () => { | ||
it("can be `staticColor`", async () => { | ||
const el = await actionMenuFixture(); | ||
expect(el.static == void 0).to.be.true; | ||
el.static = "black"; | ||
expect(el.staticColor == void 0).to.be.true; | ||
el.staticColor = "black"; | ||
await elementUpdated(el); | ||
expect(el.static == "black").to.be.true; | ||
el.static = "white"; | ||
expect(el.staticColor == "black").to.be.true; | ||
el.staticColor = "white"; | ||
await elementUpdated(el); | ||
expect(el.static == "white").to.be.true; | ||
expect(el.staticColor == "white").to.be.true; | ||
}); | ||
@@ -204,0 +204,0 @@ it("stay `valid`", async () => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
215975
1777