@spectrum-web-components/action-menu
Advanced tools
Comparing version 0.49.0-beta.0 to 0.49.0-beta.1
{ | ||
"name": "@spectrum-web-components/action-menu", | ||
"version": "0.49.0-beta.0", | ||
"version": "0.49.0-beta.1", | ||
"publishConfig": { | ||
@@ -64,8 +64,8 @@ "access": "public" | ||
"dependencies": { | ||
"@spectrum-web-components/action-button": "^0.49.0-beta.0", | ||
"@spectrum-web-components/base": "^0.49.0-beta.0", | ||
"@spectrum-web-components/icon": "^0.49.0-beta.0", | ||
"@spectrum-web-components/icons-workflow": "^0.49.0-beta.0", | ||
"@spectrum-web-components/picker": "^0.49.0-beta.0", | ||
"@spectrum-web-components/shared": "^0.49.0-beta.0" | ||
"@spectrum-web-components/action-button": "^0.49.0-beta.1", | ||
"@spectrum-web-components/base": "^0.49.0-beta.1", | ||
"@spectrum-web-components/icon": "^0.49.0-beta.1", | ||
"@spectrum-web-components/icons-workflow": "^0.49.0-beta.1", | ||
"@spectrum-web-components/picker": "^0.49.0-beta.1", | ||
"@spectrum-web-components/shared": "^0.49.0-beta.1" | ||
}, | ||
@@ -82,3 +82,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "1aa9165b6529e70339c9c632d47335a2c0894f0b" | ||
"gitHead": "74ee2c5b1276e8e4f768566a1c3c4e263a7eb8b3" | ||
} |
@@ -28,3 +28,7 @@ import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base'; | ||
selects: undefined | 'single'; | ||
/** | ||
* @deprecated Use `staticColor` instead. | ||
*/ | ||
static: 'white' | 'black' | undefined; | ||
staticColor?: 'white' | 'black'; | ||
protected listRole: 'listbox' | 'menu'; | ||
@@ -31,0 +35,0 @@ protected itemRole: string; |
@@ -79,3 +79,3 @@ "use strict"; | ||
?selected=${this.open} | ||
static=${ifDefined(this.static)} | ||
static-color=${ifDefined(this.staticColor)} | ||
aria-haspopup="true" | ||
@@ -115,4 +115,7 @@ aria-controls=${ifDefined(this.open ? "menu" : void 0)} | ||
__decorateClass([ | ||
property({ reflect: true, attribute: "static-color" }) | ||
], ActionMenu.prototype, "staticColor", 2); | ||
__decorateClass([ | ||
state() | ||
], ActionMenu.prototype, "labelOnly", 1); | ||
//# sourceMappingURL=ActionMenu.dev.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict";var u=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=(r,i,e,o)=>{for(var t=o>1?void 0:o?h(i,e):i,n=r.length-1,a;n>=0;n--)(a=r[n])&&(t=(o?a(i,e,t):a(t))||t);return o&&t&&u(i,e,t),t};import{html as s}from"@spectrum-web-components/base";import{state as b}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 c,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[s` | ||
${this.labelOnly?s``:s` | ||
"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` | ||
<slot | ||
@@ -18,8 +18,8 @@ name="icon" | ||
></slot> | ||
`]}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),s` | ||
`]}render(){return this.tooltipEl&&(this.tooltipEl.disabled=this.open),r` | ||
<sp-action-button | ||
aria-describedby=${c} | ||
aria-describedby=${b} | ||
?quiet=${this.quiet} | ||
?selected=${this.open} | ||
static=${d(this.static)} | ||
static-color=${d(this.staticColor)} | ||
aria-haspopup="true" | ||
@@ -40,3 +40,3 @@ aria-controls=${d(this.open?"menu":void 0)} | ||
${this.renderMenu} ${this.renderDescriptionSlot} | ||
`}update(e){e.has("invalid")&&(this.invalid=!1),super.update(e)}}l([p({type:String})],ActionMenu.prototype,"selects",2),l([p({type:String,reflect:!0})],ActionMenu.prototype,"static",2),l([b()],ActionMenu.prototype,"labelOnly",1); | ||
`}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); | ||
//# sourceMappingURL=ActionMenu.js.map |
@@ -105,6 +105,6 @@ "use strict"; | ||
}, | ||
staticValue: { | ||
name: "static", | ||
staticColorValue: { | ||
name: "static-color", | ||
type: { name: "string", required: false }, | ||
description: "The visual static variant to apply to the button.", | ||
description: "The visual static color variant to apply to the button.", | ||
table: { | ||
@@ -111,0 +111,0 @@ type: { summary: "string" }, |
@@ -32,3 +32,3 @@ "use strict"; | ||
?quiet=${quiet} | ||
static=${ifDefined( | ||
static-color=${ifDefined( | ||
staticValue === "none" ? void 0 : staticValue | ||
@@ -35,0 +35,0 @@ )} |
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
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
216201
1780