@spectrum-web-components/action-button 0.36.0 → 0.37.0
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
CHANGED
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
"kind": "method",
|
|
169
|
-
"name": "
|
|
169
|
+
"name": "handlePointerdownHoldAffordance",
|
|
170
170
|
"privacy": "private",
|
|
171
171
|
"return": {
|
|
172
172
|
"type": {
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"kind": "method",
|
|
187
|
-
"name": "
|
|
187
|
+
"name": "handlePointerupHoldAffordance",
|
|
188
188
|
"privacy": "private",
|
|
189
189
|
"return": {
|
|
190
190
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/action-button",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/base": "^0.
|
|
61
|
-
"@spectrum-web-components/button": "^0.
|
|
62
|
-
"@spectrum-web-components/icon": "^0.
|
|
63
|
-
"@spectrum-web-components/icons-ui": "^0.
|
|
64
|
-
"@spectrum-web-components/shared": "^0.
|
|
60
|
+
"@spectrum-web-components/base": "^0.37.0",
|
|
61
|
+
"@spectrum-web-components/button": "^0.37.0",
|
|
62
|
+
"@spectrum-web-components/icon": "^0.37.0",
|
|
63
|
+
"@spectrum-web-components/icons-ui": "^0.37.0",
|
|
64
|
+
"@spectrum-web-components/shared": "^0.37.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@spectrum-css/actionbutton": "^4.0.13"
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"./sp-*.js",
|
|
73
73
|
"./**/*.dev.js"
|
|
74
74
|
],
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "d771f62f0d8063070af43283bb0fd5e3400bad06"
|
|
76
76
|
}
|
package/src/ActionButton.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ export declare class ActionButton extends ActionButton_base {
|
|
|
47
47
|
get itemText(): string;
|
|
48
48
|
constructor();
|
|
49
49
|
private onClick;
|
|
50
|
-
private
|
|
51
|
-
private
|
|
50
|
+
private handlePointerdownHoldAffordance;
|
|
51
|
+
private handlePointerupHoldAffordance;
|
|
52
52
|
/**
|
|
53
53
|
* @private
|
|
54
54
|
*/
|
package/src/ActionButton.dev.js
CHANGED
|
@@ -55,7 +55,6 @@ export class ActionButton extends SizedMixin(ButtonBase, {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
this.addEventListener("click", this.onClick);
|
|
58
|
-
this.addEventListener("pointerdown", this.onPointerdown);
|
|
59
58
|
}
|
|
60
59
|
static get styles() {
|
|
61
60
|
return [...super.styles, buttonStyles, cornerTriangleStyles];
|
|
@@ -81,11 +80,14 @@ export class ActionButton extends SizedMixin(ButtonBase, {
|
|
|
81
80
|
return (this.textContent || /* c8 ignore next */
|
|
82
81
|
"").trim();
|
|
83
82
|
}
|
|
84
|
-
|
|
83
|
+
handlePointerdownHoldAffordance(event) {
|
|
85
84
|
if (event.button !== 0)
|
|
86
85
|
return;
|
|
87
|
-
this.addEventListener("pointerup", this.
|
|
88
|
-
this.addEventListener(
|
|
86
|
+
this.addEventListener("pointerup", this.handlePointerupHoldAffordance);
|
|
87
|
+
this.addEventListener(
|
|
88
|
+
"pointercancel",
|
|
89
|
+
this.handlePointerupHoldAffordance
|
|
90
|
+
);
|
|
89
91
|
LONGPRESS_TIMEOUT = setTimeout(() => {
|
|
90
92
|
this.dispatchEvent(
|
|
91
93
|
new CustomEvent("longpress", {
|
|
@@ -98,10 +100,16 @@ export class ActionButton extends SizedMixin(ButtonBase, {
|
|
|
98
100
|
);
|
|
99
101
|
}, LONGPRESS_DURATION);
|
|
100
102
|
}
|
|
101
|
-
|
|
103
|
+
handlePointerupHoldAffordance() {
|
|
102
104
|
clearTimeout(LONGPRESS_TIMEOUT);
|
|
103
|
-
this.removeEventListener(
|
|
104
|
-
|
|
105
|
+
this.removeEventListener(
|
|
106
|
+
"pointerup",
|
|
107
|
+
this.handlePointerupHoldAffordance
|
|
108
|
+
);
|
|
109
|
+
this.removeEventListener(
|
|
110
|
+
"pointercancel",
|
|
111
|
+
this.handlePointerupHoldAffordance
|
|
112
|
+
);
|
|
105
113
|
}
|
|
106
114
|
/**
|
|
107
115
|
* @private
|
|
@@ -181,6 +189,20 @@ export class ActionButton extends SizedMixin(ButtonBase, {
|
|
|
181
189
|
);
|
|
182
190
|
}
|
|
183
191
|
}
|
|
192
|
+
if (changes.has("holdAffordance")) {
|
|
193
|
+
if (this.holdAffordance) {
|
|
194
|
+
this.addEventListener(
|
|
195
|
+
"pointerdown",
|
|
196
|
+
this.handlePointerdownHoldAffordance
|
|
197
|
+
);
|
|
198
|
+
} else {
|
|
199
|
+
this.removeEventListener(
|
|
200
|
+
"pointerdown",
|
|
201
|
+
this.handlePointerdownHoldAffordance
|
|
202
|
+
);
|
|
203
|
+
this.handlePointerupHoldAffordance();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
184
206
|
}
|
|
185
207
|
}
|
|
186
208
|
__decorateClass([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ActionButton.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 DefaultElementSize,\n html,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ButtonBase } from '@spectrum-web-components/button';\nimport buttonStyles from './action-button.css.js';\nimport cornerTriangleStyles from '@spectrum-web-components/icon/src/spectrum-icon-corner-triangle.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js';\n\nconst holdAffordanceClass = {\n xs: 'spectrum-UIIcon-CornerTriangle75',\n s: 'spectrum-UIIcon-CornerTriangle75',\n m: 'spectrum-UIIcon-CornerTriangle100',\n l: 'spectrum-UIIcon-CornerTriangle200',\n xl: 'spectrum-UIIcon-CornerTriangle300',\n};\n\nexport const LONGPRESS_DURATION = 300;\nlet LONGPRESS_TIMEOUT: ReturnType<typeof setTimeout>;\n\nexport type LongpressEvent = {\n source: 'pointer' | 'keyboard';\n};\n\n/**\n * @element sp-action-button\n *\n * @slot - text label of the Action Button\n * @slot icon - The icon to use for Action Button\n * @fires change - Announces a change in the `selected` property of an action button\n * @fires longpress - Synthesizes a \"longpress\" interaction that signifies a\n * `pointerdown` event that is >=300ms or a keyboard event wher code is `Space` or code is `ArrowDown`\n * while `altKey===true`.\n */\nexport class ActionButton extends SizedMixin(ButtonBase, {\n validSizes: ['xs', 's', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, cornerTriangleStyles];\n }\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'hold-affordance' })\n public holdAffordance = false;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true })\n public role = 'button';\n\n /**\n * Whether an Action Button with `role='button'`\n * should also be `aria-pressed='true'`\n */\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n /**\n * Whether to automatically manage the `selected`\n * attribute on interaction and whether `aria-pressed=\"false\"`\n * should be used when `selected === false`\n */\n @property({ type: Boolean, reflect: true })\n public toggles = false;\n\n @property({ reflect: true })\n public static?: 'white' | 'black';\n\n @property({ reflect: true })\n public variant?: 'white' | 'black';\n\n @property({ type: String })\n public get value(): string {\n return this._value || this.itemText;\n }\n public set value(value: string) {\n if (value === this._value) {\n return;\n }\n this._value = value || '';\n if (this._value) {\n this.setAttribute('value', this._value);\n } else {\n this.removeAttribute('value');\n }\n }\n private _value = '';\n\n /**\n * @private\n */\n public get itemText(): string {\n return (this.textContent || /* c8 ignore next */ '').trim();\n }\n\n constructor() {\n super();\n this.addEventListener('click', this.onClick);\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAGI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,OAAO,kBAAkB;AACzB,OAAO,0BAA0B;AACjC,OAAO;AAEP,MAAM,sBAAsB;AAAA,EACxB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AACR;AAEO,aAAM,qBAAqB;AAClC,IAAI;AAgBG,aAAM,qBAAqB,WAAW,YAAY;AAAA,EACrD,YAAY,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI;AAC1C,CAAC,EAAE;AAAA,EA8DC,cAAc;AACV,UAAM;AAzDV,SAAO,aAAa;AAGpB,SAAO,iBAAiB;AAGxB,SAAO,QAAQ;AAGf,SAAO,OAAO;AAOd,SAAO,WAAW;AAQlB,SAAO,UAAU;AAuBjB,SAAQ,SAAS;
|
|
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 DefaultElementSize,\n html,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ButtonBase } from '@spectrum-web-components/button';\nimport buttonStyles from './action-button.css.js';\nimport cornerTriangleStyles from '@spectrum-web-components/icon/src/spectrum-icon-corner-triangle.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js';\n\nconst holdAffordanceClass = {\n xs: 'spectrum-UIIcon-CornerTriangle75',\n s: 'spectrum-UIIcon-CornerTriangle75',\n m: 'spectrum-UIIcon-CornerTriangle100',\n l: 'spectrum-UIIcon-CornerTriangle200',\n xl: 'spectrum-UIIcon-CornerTriangle300',\n};\n\nexport const LONGPRESS_DURATION = 300;\nlet LONGPRESS_TIMEOUT: ReturnType<typeof setTimeout>;\n\nexport type LongpressEvent = {\n source: 'pointer' | 'keyboard';\n};\n\n/**\n * @element sp-action-button\n *\n * @slot - text label of the Action Button\n * @slot icon - The icon to use for Action Button\n * @fires change - Announces a change in the `selected` property of an action button\n * @fires longpress - Synthesizes a \"longpress\" interaction that signifies a\n * `pointerdown` event that is >=300ms or a keyboard event wher code is `Space` or code is `ArrowDown`\n * while `altKey===true`.\n */\nexport class ActionButton extends SizedMixin(ButtonBase, {\n validSizes: ['xs', 's', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, cornerTriangleStyles];\n }\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'hold-affordance' })\n public holdAffordance = false;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true })\n public role = 'button';\n\n /**\n * Whether an Action Button with `role='button'`\n * should also be `aria-pressed='true'`\n */\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n /**\n * Whether to automatically manage the `selected`\n * attribute on interaction and whether `aria-pressed=\"false\"`\n * should be used when `selected === false`\n */\n @property({ type: Boolean, reflect: true })\n public toggles = false;\n\n @property({ reflect: true })\n public static?: 'white' | 'black';\n\n @property({ reflect: true })\n public variant?: 'white' | 'black';\n\n @property({ type: String })\n public get value(): string {\n return this._value || this.itemText;\n }\n public set value(value: string) {\n if (value === this._value) {\n return;\n }\n this._value = value || '';\n if (this._value) {\n this.setAttribute('value', this._value);\n } else {\n this.removeAttribute('value');\n }\n }\n private _value = '';\n\n /**\n * @private\n */\n public get itemText(): string {\n return (this.textContent || /* c8 ignore next */ '').trim();\n }\n\n constructor() {\n super();\n this.addEventListener('click', this.onClick);\n }\n\n private onClick = (): void => {\n if (!this.toggles) {\n return;\n }\n this.selected = !this.selected;\n const applyDefault = this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n })\n );\n if (!applyDefault) {\n this.selected = !this.selected;\n }\n };\n\n private handlePointerdownHoldAffordance(event: PointerEvent): void {\n if (event.button !== 0) return;\n this.addEventListener('pointerup', this.handlePointerupHoldAffordance);\n this.addEventListener(\n 'pointercancel',\n this.handlePointerupHoldAffordance\n );\n LONGPRESS_TIMEOUT = setTimeout(() => {\n this.dispatchEvent(\n new CustomEvent<LongpressEvent>('longpress', {\n bubbles: true,\n composed: true,\n detail: {\n source: 'pointer',\n },\n })\n );\n }, LONGPRESS_DURATION);\n }\n\n private handlePointerupHoldAffordance(): void {\n clearTimeout(LONGPRESS_TIMEOUT);\n this.removeEventListener(\n 'pointerup',\n this.handlePointerupHoldAffordance\n );\n this.removeEventListener(\n 'pointercancel',\n this.handlePointerupHoldAffordance\n );\n }\n\n /**\n * @private\n */\n protected override handleKeydown(event: KeyboardEvent): void {\n if (!this.holdAffordance) {\n return super.handleKeydown(event);\n }\n const { code, altKey } = event;\n if (code === 'Space' || (altKey && code === 'ArrowDown')) {\n event.preventDefault();\n if (code === 'ArrowDown') {\n event.stopPropagation();\n event.stopImmediatePropagation();\n }\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n }\n\n protected override handleKeyup(event: KeyboardEvent): void {\n if (!this.holdAffordance) {\n return super.handleKeyup(event);\n }\n const { code, altKey } = event;\n if (code === 'Space' || (altKey && code === 'ArrowDown')) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent<LongpressEvent>('longpress', {\n bubbles: true,\n composed: true,\n detail: {\n source: 'keyboard',\n },\n })\n );\n this.active = false;\n }\n }\n\n protected override get buttonContent(): TemplateResult[] {\n const buttonContent = super.buttonContent;\n if (this.holdAffordance) {\n buttonContent.unshift(html`\n <sp-icon-corner-triangle300\n class=\"hold-affordance ${holdAffordanceClass[\n this.size as DefaultElementSize\n ]}\"\n ></sp-icon-corner-triangle300>\n `);\n }\n return buttonContent;\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n const isButton = this.role === 'button';\n const canBePressed =\n isButton &&\n (this.selected || this.toggles) &&\n !(\n this.hasAttribute('aria-haspopup') &&\n this.hasAttribute('aria-expanded')\n );\n if (changes.has('selected') || changes.has('role')) {\n // When role !== 'button' then the Action Button is within\n // an Action Group that manages selects which means the\n // Action Button is a \"checkbox\" or \"radio\" and cannot\n // accept the `aria-pressed` attribute.\n if (canBePressed) {\n this.setAttribute(\n 'aria-pressed',\n this.selected ? 'true' : 'false'\n );\n } else {\n // When !this.toggles the lack of \"aria-pressed\" is inconsequential.\n this.removeAttribute('aria-pressed');\n if (\n isButton &&\n this.toggles &&\n this.hasAttribute('aria-expanded')\n ) {\n this.setAttribute(\n 'aria-expanded',\n this.selected ? 'true' : 'false'\n );\n }\n }\n }\n if (\n changes.has('variant') &&\n (this.variant || typeof changes.get('variant'))\n ) {\n this.static = this.variant;\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"variant\" attribute/property of <${this.localName}> have been deprecated. Use \"static\" with any of the same values instead. \"variant\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/badge/#fixed'\n );\n }\n }\n if (changes.has('holdAffordance')) {\n if (this.holdAffordance) {\n this.addEventListener(\n 'pointerdown',\n this.handlePointerdownHoldAffordance\n );\n } else {\n this.removeEventListener(\n 'pointerdown',\n this.handlePointerdownHoldAffordance\n );\n this.handlePointerupHoldAffordance();\n }\n }\n }\n}\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n longpress: CustomEvent<LongpressEvent>;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAGI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,OAAO,kBAAkB;AACzB,OAAO,0BAA0B;AACjC,OAAO;AAEP,MAAM,sBAAsB;AAAA,EACxB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AACR;AAEO,aAAM,qBAAqB;AAClC,IAAI;AAgBG,aAAM,qBAAqB,WAAW,YAAY;AAAA,EACrD,YAAY,CAAC,MAAM,KAAK,KAAK,KAAK,IAAI;AAC1C,CAAC,EAAE;AAAA,EA8DC,cAAc;AACV,UAAM;AAzDV,SAAO,aAAa;AAGpB,SAAO,iBAAiB;AAGxB,SAAO,QAAQ;AAGf,SAAO,OAAO;AAOd,SAAO,WAAW;AAQlB,SAAO,UAAU;AAuBjB,SAAQ,SAAS;AAcjB,SAAQ,UAAU,MAAY;AAC1B,UAAI,CAAC,KAAK,SAAS;AACf;AAAA,MACJ;AACA,WAAK,WAAW,CAAC,KAAK;AACtB,YAAM,eAAe,KAAK;AAAA,QACtB,IAAI,MAAM,UAAU;AAAA,UAChB,YAAY;AAAA,QAChB,CAAC;AAAA,MACL;AACA,UAAI,CAAC,cAAc;AACf,aAAK,WAAW,CAAC,KAAK;AAAA,MAC1B;AAAA,IACJ;A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A,GAxCjB,aAyCE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ActionButton.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=(a,o,e,t)=>{for(var r=t>1?void 0:t?u(o,e):o,n=a.length-1,l;n>=0;n--)(l=a[n])&&(r=(t?l(o,e,r):l(r))||r);return t&&r&&p(o,e,r),r};import{html as c,SizedMixin as h}from"@spectrum-web-components/base";import{property as s}from"@spectrum-web-components/base/src/decorators.js";import{ButtonBase as f}from"@spectrum-web-components/button";import v from"./action-button.css.js";import b from"@spectrum-web-components/icon/src/spectrum-icon-corner-triangle.css.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js";const m={xs:"spectrum-UIIcon-CornerTriangle75",s:"spectrum-UIIcon-CornerTriangle75",m:"spectrum-UIIcon-CornerTriangle100",l:"spectrum-UIIcon-CornerTriangle200",xl:"spectrum-UIIcon-CornerTriangle300"};export const LONGPRESS_DURATION=300;let d;export class ActionButton extends h(f,{validSizes:["xs","s","m","l","xl"]}){constructor(){super();this.emphasized=!1;this.holdAffordance=!1;this.quiet=!1;this.role="button";this.selected=!1;this.toggles=!1;this._value="";this.onClick=()=>{if(!this.toggles)return;this.selected=!this.selected,this.dispatchEvent(new Event("change",{cancelable:!0}))||(this.selected=!this.selected)};this.addEventListener("click",this.onClick)}static get styles(){return[...super.styles,v,b]}get value(){return this._value||this.itemText}set value(e){e!==this._value&&(this._value=e||"",this._value?this.setAttribute("value",this._value):this.removeAttribute("value"))}get itemText(){return(this.textContent||"").trim()}handlePointerdownHoldAffordance(e){e.button===0&&(this.addEventListener("pointerup",this.handlePointerupHoldAffordance),this.addEventListener("pointercancel",this.handlePointerupHoldAffordance),d=setTimeout(()=>{this.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"pointer"}}))},LONGPRESS_DURATION))}handlePointerupHoldAffordance(){clearTimeout(d),this.removeEventListener("pointerup",this.handlePointerupHoldAffordance),this.removeEventListener("pointercancel",this.handlePointerupHoldAffordance)}handleKeydown(e){if(!this.holdAffordance)return super.handleKeydown(e);const{code:t,altKey:r}=e;(t==="Space"||r&&t==="ArrowDown")&&(e.preventDefault(),t==="ArrowDown"&&(e.stopPropagation(),e.stopImmediatePropagation()),this.addEventListener("keyup",this.handleKeyup),this.active=!0)}handleKeyup(e){if(!this.holdAffordance)return super.handleKeyup(e);const{code:t,altKey:r}=e;(t==="Space"||r&&t==="ArrowDown")&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),this.active=!1)}get buttonContent(){const e=super.buttonContent;return this.holdAffordance&&e.unshift(c`
|
|
2
2
|
<sp-icon-corner-triangle300
|
|
3
3
|
class="hold-affordance ${m[this.size]}"
|
|
4
4
|
></sp-icon-corner-triangle300>
|
|
5
|
-
`),e}updated(e){super.updated(e);const t=this.role==="button",r=t&&(this.selected||this.toggles)&&!(this.hasAttribute("aria-haspopup")&&this.hasAttribute("aria-expanded"));(e.has("selected")||e.has("role"))&&(r?this.setAttribute("aria-pressed",this.selected?"true":"false"):(this.removeAttribute("aria-pressed"),t&&this.toggles&&this.hasAttribute("aria-expanded")&&this.setAttribute("aria-expanded",this.selected?"true":"false"))),e.has("variant")&&(this.variant||typeof e.get("variant"))&&(this.static=this.variant)}}
|
|
5
|
+
`),e}updated(e){super.updated(e);const t=this.role==="button",r=t&&(this.selected||this.toggles)&&!(this.hasAttribute("aria-haspopup")&&this.hasAttribute("aria-expanded"));(e.has("selected")||e.has("role"))&&(r?this.setAttribute("aria-pressed",this.selected?"true":"false"):(this.removeAttribute("aria-pressed"),t&&this.toggles&&this.hasAttribute("aria-expanded")&&this.setAttribute("aria-expanded",this.selected?"true":"false"))),e.has("variant")&&(this.variant||typeof e.get("variant"))&&(this.static=this.variant),e.has("holdAffordance")&&(this.holdAffordance?this.addEventListener("pointerdown",this.handlePointerdownHoldAffordance):(this.removeEventListener("pointerdown",this.handlePointerdownHoldAffordance),this.handlePointerupHoldAffordance()))}}i([s({type:Boolean,reflect:!0})],ActionButton.prototype,"emphasized",2),i([s({type:Boolean,reflect:!0,attribute:"hold-affordance"})],ActionButton.prototype,"holdAffordance",2),i([s({type:Boolean,reflect:!0})],ActionButton.prototype,"quiet",2),i([s({reflect:!0})],ActionButton.prototype,"role",2),i([s({type:Boolean,reflect:!0})],ActionButton.prototype,"selected",2),i([s({type:Boolean,reflect:!0})],ActionButton.prototype,"toggles",2),i([s({reflect:!0})],ActionButton.prototype,"static",2),i([s({reflect:!0})],ActionButton.prototype,"variant",2),i([s({type:String})],ActionButton.prototype,"value",1);
|
|
6
6
|
//# sourceMappingURL=ActionButton.js.map
|
package/src/ActionButton.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ActionButton.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 DefaultElementSize,\n html,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ButtonBase } from '@spectrum-web-components/button';\nimport buttonStyles from './action-button.css.js';\nimport cornerTriangleStyles from '@spectrum-web-components/icon/src/spectrum-icon-corner-triangle.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js';\n\nconst holdAffordanceClass = {\n xs: 'spectrum-UIIcon-CornerTriangle75',\n s: 'spectrum-UIIcon-CornerTriangle75',\n m: 'spectrum-UIIcon-CornerTriangle100',\n l: 'spectrum-UIIcon-CornerTriangle200',\n xl: 'spectrum-UIIcon-CornerTriangle300',\n};\n\nexport const LONGPRESS_DURATION = 300;\nlet LONGPRESS_TIMEOUT: ReturnType<typeof setTimeout>;\n\nexport type LongpressEvent = {\n source: 'pointer' | 'keyboard';\n};\n\n/**\n * @element sp-action-button\n *\n * @slot - text label of the Action Button\n * @slot icon - The icon to use for Action Button\n * @fires change - Announces a change in the `selected` property of an action button\n * @fires longpress - Synthesizes a \"longpress\" interaction that signifies a\n * `pointerdown` event that is >=300ms or a keyboard event wher code is `Space` or code is `ArrowDown`\n * while `altKey===true`.\n */\nexport class ActionButton extends SizedMixin(ButtonBase, {\n validSizes: ['xs', 's', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, cornerTriangleStyles];\n }\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'hold-affordance' })\n public holdAffordance = false;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true })\n public role = 'button';\n\n /**\n * Whether an Action Button with `role='button'`\n * should also be `aria-pressed='true'`\n */\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n /**\n * Whether to automatically manage the `selected`\n * attribute on interaction and whether `aria-pressed=\"false\"`\n * should be used when `selected === false`\n */\n @property({ type: Boolean, reflect: true })\n public toggles = false;\n\n @property({ reflect: true })\n public static?: 'white' | 'black';\n\n @property({ reflect: true })\n public variant?: 'white' | 'black';\n\n @property({ type: String })\n public get value(): string {\n return this._value || this.itemText;\n }\n public set value(value: string) {\n if (value === this._value) {\n return;\n }\n this._value = value || '';\n if (this._value) {\n this.setAttribute('value', this._value);\n } else {\n this.removeAttribute('value');\n }\n }\n private _value = '';\n\n /**\n * @private\n */\n public get itemText(): string {\n return (this.textContent || /* c8 ignore next */ '').trim();\n }\n\n constructor() {\n super();\n this.addEventListener('click', this.onClick);\n
|
|
5
|
-
"mappings": "qNAYA,OAGI,QAAAA,EAEA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,cAAAC,MAAkB,kCAC3B,OAAOC,MAAkB,yBACzB,OAAOC,MAA0B,yEACjC,MAAO,wEAEP,MAAMC,EAAsB,CACxB,GAAI,mCACJ,EAAG,mCACH,EAAG,oCACH,EAAG,oCACH,GAAI,mCACR,EAEO,aAAM,mBAAqB,IAClC,IAAIC,EAgBG,aAAM,qBAAqBN,EAAWE,EAAY,CACrD,WAAY,CAAC,KAAM,IAAK,IAAK,IAAK,IAAI,CAC1C,CAAC,CAAE,CA8DC,aAAc,CACV,MAAM,EAzDV,KAAO,WAAa,GAGpB,KAAO,eAAiB,GAGxB,KAAO,MAAQ,GAGf,KAAO,KAAO,SAOd,KAAO,SAAW,GAQlB,KAAO,QAAU,GAuBjB,KAAQ,OAAS,
|
|
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 DefaultElementSize,\n html,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ButtonBase } from '@spectrum-web-components/button';\nimport buttonStyles from './action-button.css.js';\nimport cornerTriangleStyles from '@spectrum-web-components/icon/src/spectrum-icon-corner-triangle.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-corner-triangle300.js';\n\nconst holdAffordanceClass = {\n xs: 'spectrum-UIIcon-CornerTriangle75',\n s: 'spectrum-UIIcon-CornerTriangle75',\n m: 'spectrum-UIIcon-CornerTriangle100',\n l: 'spectrum-UIIcon-CornerTriangle200',\n xl: 'spectrum-UIIcon-CornerTriangle300',\n};\n\nexport const LONGPRESS_DURATION = 300;\nlet LONGPRESS_TIMEOUT: ReturnType<typeof setTimeout>;\n\nexport type LongpressEvent = {\n source: 'pointer' | 'keyboard';\n};\n\n/**\n * @element sp-action-button\n *\n * @slot - text label of the Action Button\n * @slot icon - The icon to use for Action Button\n * @fires change - Announces a change in the `selected` property of an action button\n * @fires longpress - Synthesizes a \"longpress\" interaction that signifies a\n * `pointerdown` event that is >=300ms or a keyboard event wher code is `Space` or code is `ArrowDown`\n * while `altKey===true`.\n */\nexport class ActionButton extends SizedMixin(ButtonBase, {\n validSizes: ['xs', 's', 'm', 'l', 'xl'],\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, cornerTriangleStyles];\n }\n\n @property({ type: Boolean, reflect: true })\n public emphasized = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'hold-affordance' })\n public holdAffordance = false;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true })\n public role = 'button';\n\n /**\n * Whether an Action Button with `role='button'`\n * should also be `aria-pressed='true'`\n */\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n /**\n * Whether to automatically manage the `selected`\n * attribute on interaction and whether `aria-pressed=\"false\"`\n * should be used when `selected === false`\n */\n @property({ type: Boolean, reflect: true })\n public toggles = false;\n\n @property({ reflect: true })\n public static?: 'white' | 'black';\n\n @property({ reflect: true })\n public variant?: 'white' | 'black';\n\n @property({ type: String })\n public get value(): string {\n return this._value || this.itemText;\n }\n public set value(value: string) {\n if (value === this._value) {\n return;\n }\n this._value = value || '';\n if (this._value) {\n this.setAttribute('value', this._value);\n } else {\n this.removeAttribute('value');\n }\n }\n private _value = '';\n\n /**\n * @private\n */\n public get itemText(): string {\n return (this.textContent || /* c8 ignore next */ '').trim();\n }\n\n constructor() {\n super();\n this.addEventListener('click', this.onClick);\n }\n\n private onClick = (): void => {\n if (!this.toggles) {\n return;\n }\n this.selected = !this.selected;\n const applyDefault = this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n })\n );\n if (!applyDefault) {\n this.selected = !this.selected;\n }\n };\n\n private handlePointerdownHoldAffordance(event: PointerEvent): void {\n if (event.button !== 0) return;\n this.addEventListener('pointerup', this.handlePointerupHoldAffordance);\n this.addEventListener(\n 'pointercancel',\n this.handlePointerupHoldAffordance\n );\n LONGPRESS_TIMEOUT = setTimeout(() => {\n this.dispatchEvent(\n new CustomEvent<LongpressEvent>('longpress', {\n bubbles: true,\n composed: true,\n detail: {\n source: 'pointer',\n },\n })\n );\n }, LONGPRESS_DURATION);\n }\n\n private handlePointerupHoldAffordance(): void {\n clearTimeout(LONGPRESS_TIMEOUT);\n this.removeEventListener(\n 'pointerup',\n this.handlePointerupHoldAffordance\n );\n this.removeEventListener(\n 'pointercancel',\n this.handlePointerupHoldAffordance\n );\n }\n\n /**\n * @private\n */\n protected override handleKeydown(event: KeyboardEvent): void {\n if (!this.holdAffordance) {\n return super.handleKeydown(event);\n }\n const { code, altKey } = event;\n if (code === 'Space' || (altKey && code === 'ArrowDown')) {\n event.preventDefault();\n if (code === 'ArrowDown') {\n event.stopPropagation();\n event.stopImmediatePropagation();\n }\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n }\n\n protected override handleKeyup(event: KeyboardEvent): void {\n if (!this.holdAffordance) {\n return super.handleKeyup(event);\n }\n const { code, altKey } = event;\n if (code === 'Space' || (altKey && code === 'ArrowDown')) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent<LongpressEvent>('longpress', {\n bubbles: true,\n composed: true,\n detail: {\n source: 'keyboard',\n },\n })\n );\n this.active = false;\n }\n }\n\n protected override get buttonContent(): TemplateResult[] {\n const buttonContent = super.buttonContent;\n if (this.holdAffordance) {\n buttonContent.unshift(html`\n <sp-icon-corner-triangle300\n class=\"hold-affordance ${holdAffordanceClass[\n this.size as DefaultElementSize\n ]}\"\n ></sp-icon-corner-triangle300>\n `);\n }\n return buttonContent;\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n const isButton = this.role === 'button';\n const canBePressed =\n isButton &&\n (this.selected || this.toggles) &&\n !(\n this.hasAttribute('aria-haspopup') &&\n this.hasAttribute('aria-expanded')\n );\n if (changes.has('selected') || changes.has('role')) {\n // When role !== 'button' then the Action Button is within\n // an Action Group that manages selects which means the\n // Action Button is a \"checkbox\" or \"radio\" and cannot\n // accept the `aria-pressed` attribute.\n if (canBePressed) {\n this.setAttribute(\n 'aria-pressed',\n this.selected ? 'true' : 'false'\n );\n } else {\n // When !this.toggles the lack of \"aria-pressed\" is inconsequential.\n this.removeAttribute('aria-pressed');\n if (\n isButton &&\n this.toggles &&\n this.hasAttribute('aria-expanded')\n ) {\n this.setAttribute(\n 'aria-expanded',\n this.selected ? 'true' : 'false'\n );\n }\n }\n }\n if (\n changes.has('variant') &&\n (this.variant || typeof changes.get('variant'))\n ) {\n this.static = this.variant;\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"variant\" attribute/property of <${this.localName}> have been deprecated. Use \"static\" with any of the same values instead. \"variant\" will be removed in a future release.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/badge/#fixed'\n );\n }\n }\n if (changes.has('holdAffordance')) {\n if (this.holdAffordance) {\n this.addEventListener(\n 'pointerdown',\n this.handlePointerdownHoldAffordance\n );\n } else {\n this.removeEventListener(\n 'pointerdown',\n this.handlePointerdownHoldAffordance\n );\n this.handlePointerupHoldAffordance();\n }\n }\n }\n}\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n longpress: CustomEvent<LongpressEvent>;\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAGI,QAAAA,EAEA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kD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ACA,KAAK,aACD,eACA,KAAK,SAAW,OAAS,OAC7B,GAGA,KAAK,gBAAgB,cAAc,EAE/BD,GACA,KAAK,SACL,KAAK,aAAa,eAAe,GAEjC,KAAK,aACD,gBACA,KAAK,SAAW,OAAS,OAC7B,IAKRD,EAAQ,IAAI,SAAS,IACpB,KAAK,SAAW,OAAOA,EAAQ,IAAI,SAAS,KAE7C,KAAK,OAAS,KAAK,SASnBA,EAAQ,IAAI,gBAAgB,IACxB,KAAK,eACL,KAAK,iBACD,cACA,KAAK,+BACT,GAEA,KAAK,oBACD,cACA,KAAK,+BACT,EACA,KAAK,8BAA8B,GAG/C,CACJ,CAhOWG,EAAA,CADNd,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAPjC,aAQF,0BAGAc,EAAA,CADNd,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,iBAAkB,CAAC,GAV/D,aAWF,8BAGAc,EAAA,CADNd,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAbjC,aAcF,qBAGAc,EAAA,CADNd,EAAS,CAAE,QAAS,EAAK,CAAC,GAhBlB,aAiBF,oBAOAc,EAAA,CADNd,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAvBjC,aAwBF,wBAQAc,EAAA,CADNd,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA/BjC,aAgCF,uBAGAc,EAAA,CADNd,EAAS,CAAE,QAAS,EAAK,CAAC,GAlClB,aAmCF,sBAGAc,EAAA,CADNd,EAAS,CAAE,QAAS,EAAK,CAAC,GArClB,aAsCF,uBAGIc,EAAA,CADVd,EAAS,CAAE,KAAM,MAAO,CAAC,GAxCjB,aAyCE",
|
|
6
6
|
"names": ["html", "SizedMixin", "property", "ButtonBase", "buttonStyles", "cornerTriangleStyles", "holdAffordanceClass", "LONGPRESS_TIMEOUT", "value", "event", "code", "altKey", "buttonContent", "changes", "isButton", "canBePressed", "__decorateClass"]
|
|
7
7
|
}
|