@spectrum-web-components/button 1.12.0-next.20260218162159 → 1.12.0-testing.20260223092154
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/package.json +9 -9
- package/sp-button.dev.js.map +1 -1
- package/sp-button.js.map +1 -1
- package/sp-clear-button.dev.js.map +1 -1
- package/sp-clear-button.js.map +1 -1
- package/sp-close-button.d.ts +1 -1
- package/sp-close-button.dev.js.map +1 -1
- package/sp-close-button.js.map +1 -1
- package/src/Button.d.ts +1 -1
- package/src/Button.dev.js.map +1 -1
- package/src/Button.js.map +1 -1
- package/src/ButtonBase.d.ts +1 -1
- package/src/ButtonBase.dev.js.map +1 -1
- package/src/ButtonBase.js.map +1 -1
- package/src/ClearButton.d.ts +2 -1
- package/src/ClearButton.dev.js.map +2 -2
- package/src/ClearButton.js.map +2 -2
- package/src/CloseButton.d.ts +1 -1
- package/src/CloseButton.dev.js.map +1 -1
- package/src/CloseButton.js.map +1 -1
- package/src/StyledButton.d.ts +1 -1
- package/src/StyledButton.dev.js.map +1 -1
- package/src/StyledButton.js.map +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.dev.js.map +1 -1
- package/src/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/button",
|
|
3
|
-
"version": "1.12.0-
|
|
3
|
+
"version": "1.12.0-testing.20260223092154",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Adobe",
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
],
|
|
80
80
|
"types": "./src/index.d.ts",
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@spectrum-web-components/base": "1.12.0-
|
|
83
|
-
"@spectrum-web-components/clear-button": "1.12.0-
|
|
84
|
-
"@spectrum-web-components/close-button": "1.12.0-
|
|
85
|
-
"@spectrum-web-components/icon": "1.12.0-
|
|
86
|
-
"@spectrum-web-components/icons-ui": "1.12.0-
|
|
87
|
-
"@spectrum-web-components/progress-circle": "1.12.0-
|
|
88
|
-
"@spectrum-web-components/reactive-controllers": "1.12.0-
|
|
89
|
-
"@spectrum-web-components/shared": "1.12.0-
|
|
82
|
+
"@spectrum-web-components/base": "1.12.0-testing.20260223092154",
|
|
83
|
+
"@spectrum-web-components/clear-button": "1.12.0-testing.20260223092154",
|
|
84
|
+
"@spectrum-web-components/close-button": "1.12.0-testing.20260223092154",
|
|
85
|
+
"@spectrum-web-components/icon": "1.12.0-testing.20260223092154",
|
|
86
|
+
"@spectrum-web-components/icons-ui": "1.12.0-testing.20260223092154",
|
|
87
|
+
"@spectrum-web-components/progress-circle": "1.12.0-testing.20260223092154",
|
|
88
|
+
"@spectrum-web-components/reactive-controllers": "1.12.0-testing.20260223092154",
|
|
89
|
+
"@spectrum-web-components/shared": "1.12.0-testing.20260223092154"
|
|
90
90
|
},
|
|
91
91
|
"keywords": [
|
|
92
92
|
"design-system",
|
package/sp-button.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { Button } from './src/Button.dev.js'\n\ndefineElement('sp-button', Button);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-button': Button;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,qBAAqB;AAE9B,SAAS,cAAc;AAEvB,cAAc,aAAa,MAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-button.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { Button } from './src/Button.js';\n\ndefineElement('sp-button', Button);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-button': Button;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAWA,OAAS,iBAAAA,MAAqB,sDAE9B,OAAS,UAAAC,MAAc,kBAEvBD,EAAc,YAAaC,CAAM",
|
|
6
6
|
"names": ["defineElement", "Button"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-clear-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { ClearButton } from './src/ClearButton.dev.js'\n\ndefineElement('sp-clear-button', ClearButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-clear-button': ClearButton;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAWA,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,cAAc,mBAAmB,WAAW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-clear-button.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-clear-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { ClearButton } from './src/ClearButton.js';\n\ndefineElement('sp-clear-button', ClearButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-clear-button': ClearButton;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAWA,OAAS,iBAAAA,MAAqB,sDAE9B,OAAS,eAAAC,MAAmB,uBAE5BD,EAAc,kBAAmBC,CAAW",
|
|
6
6
|
"names": ["defineElement", "ClearButton"]
|
|
7
7
|
}
|
package/sp-close-button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-close-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { CloseButton } from './src/CloseButton.dev.js'\n\ndefineElement('sp-close-button', CloseButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-close-button': CloseButton;\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAYA,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,cAAc,mBAAmB,WAAW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-close-button.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-close-button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\nimport { CloseButton } from './src/CloseButton.js';\n\ndefineElement('sp-close-button', CloseButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-close-button': CloseButton;\n }\n}\n"],
|
|
5
5
|
"mappings": "aAYA,OAAS,iBAAAA,MAAqB,sDAE9B,OAAS,eAAAC,MAAmB,uBAE5BD,EAAc,kBAAmBC,CAAW",
|
|
6
6
|
"names": ["defineElement", "CloseButton"]
|
|
7
7
|
}
|
package/src/Button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
package/src/Button.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n CSSResultArray,\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 { PendingStateController } from '@spectrum-web-components/reactive-controllers/src/PendingState.js';\n\nimport buttonStyles from './button.css.js';\nimport { ButtonBase } from './ButtonBase.dev.js'\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStaticColors = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStaticColors\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\nexport const VALID_STATIC_COLORS = ['white', 'black'];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(ButtonBase, { noDefaultSize: true }) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n @property({ type: String, attribute: 'pending-label' })\n public pendingLabel = 'Pending';\n\n // Use this property to set the button into a pending state\n @property({ type: Boolean, reflect: true, attribute: true })\n public pending = false;\n\n public pendingStateController: PendingStateController<this>;\n\n /**\n * Initializes the `PendingStateController` for the Button component.\n * The `PendingStateController` manages the pending state of the Button.\n */\n constructor() {\n super();\n this.pendingStateController = new PendingStateController(this);\n }\n\n public override click(): void {\n if (this.pending) {\n return;\n }\n super.click();\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) {\n return;\n }\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"cta\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"variant='accent'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#variants',\n { level: 'deprecation' }\n );\n }\n break;\n case 'overBackground':\n this.removeAttribute('variant');\n this.staticColor = 'white';\n this.treatment = 'outline';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"overBackground\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"staticColor='white'\" with \"treatment='outline'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button',\n { level: 'deprecation' }\n );\n }\n return;\n case 'white':\n this.staticColor = 'white';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"white\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/api',\n { level: 'deprecation' }\n );\n }\n return;\n case 'black':\n this.staticColor = 'black';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='black'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/api',\n { level: 'deprecation' }\n );\n }\n return;\n case null:\n return;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n /**\n * The static color variant to use for this button.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'black' | 'white';\n\n /**\n * The visual treatment to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n /**\n * Disables text wrapping within the button component's label.\n * Please note that this option is not a part of the design specification\n * and should be used carefully, with consideration of this overflow behavior\n * and the readability of the button's content.\n */\n @property({ type: Boolean, attribute: 'no-wrap', reflect: true })\n public noWrap = false;\n\n public get quiet(): boolean {\n return this.treatment === 'outline';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n // There is no Spectrum design context for an `<sp-button>` without a variant\n // apply one manually when a consumer has not applied one themselves.\n\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n if (this.pending) {\n this.pendingStateController.hostUpdated();\n }\n }\n\n protected override renderButton(): TemplateResult {\n return html`\n ${this.buttonContent} ${this.pendingStateController.renderPendingState()}\n `;\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;AAWA;AAAA,EAEE;AAAA,EAEA;AAAA,OAEK;AACP,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AAEvC,OAAO,kBAAkB;AACzB,SAAS,kBAAkB;AAWpB,aAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,aAAM,sBAAsB,CAAC,SAAS,OAAO;AAU7C,aAAM,eAAe,WAAW,YAAY,EAAE,eAAe,KAAK,CAAC,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,EAkB1E,cAAc;AACZ,UAAM;AAbR,SAAO,eAAe;AAItB,SAAO,UAAU;AA4FjB,SAAQ,WAA2B;AAYnC,SAAO,YAA8B;AAiBrC,SAAO,SAAS;AA/Gd,SAAK,yBAAyB,IAAI,uBAAuB,IAAI;AAAA,EAC/D;AAAA,EApBA,WAA2B,SAAyB;AAClD,WAAO,CAAC,GAAG,MAAM,QAAQ,YAAY;AAAA,EACvC;AAAA,EAoBgB,QAAc;AAC5B,QAAI,KAAK,SAAS;AAChB;AAAA,IACF;AACA,UAAM,MAAM;AAAA,EACd;AAAA,EAMA,IAAW,UAA0B;AACnC,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IAAW,QAAQ,SAAyB;AAC1C,QAAI,YAAY,KAAK,SAAS;AAC5B;AAAA,IACF;AAEA,SAAK,cAAc,WAAW,KAAK,OAAO;AAC1C,YAAQ,S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,aAAa,WAAW,KAAK,OAAO;AAAA,IAC3C;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,uBAAuB,YAAY;AAAA,IAC1C;AAAA,EACF;AAAA,EAEmB,eAA+B;AAChD,WAAO;AAAA,QACH,KAAK,aAAa,IAAI,KAAK,uBAAuB,mBAAmB,CAAC;AAAA;AAAA,EAE5E;AACF;AArJS;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,gBAAgB,CAAC;AAAA,GAL3C,OAMJ;AAIA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,KAAK,CAAC;AAAA,GAThD,OAUJ;AAwBI;AAAA,EADV,SAAS;AAAA,GAjCC,OAkCA;AA0EJ;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GA3G3C,OA4GJ;AAMA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAjHhB,OAkHJ;AAMI;AAAA,EADV,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAvHhB,OAwHA;AAWJ;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,WAAW,WAAW,SAAS,KAAK,CAAC;AAAA,GAlIrD,OAmIJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/Button.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Button.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n CSSResultArray,\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 { PendingStateController } from '@spectrum-web-components/reactive-controllers/src/PendingState.js';\n\nimport buttonStyles from './button.css.js';\nimport { ButtonBase } from './ButtonBase.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStaticColors = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStaticColors\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\nexport const VALID_STATIC_COLORS = ['white', 'black'];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(ButtonBase, { noDefaultSize: true }) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n @property({ type: String, attribute: 'pending-label' })\n public pendingLabel = 'Pending';\n\n // Use this property to set the button into a pending state\n @property({ type: Boolean, reflect: true, attribute: true })\n public pending = false;\n\n public pendingStateController: PendingStateController<this>;\n\n /**\n * Initializes the `PendingStateController` for the Button component.\n * The `PendingStateController` manages the pending state of the Button.\n */\n constructor() {\n super();\n this.pendingStateController = new PendingStateController(this);\n }\n\n public override click(): void {\n if (this.pending) {\n return;\n }\n super.click();\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) {\n return;\n }\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"cta\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"variant='accent'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#variants',\n { level: 'deprecation' }\n );\n }\n break;\n case 'overBackground':\n this.removeAttribute('variant');\n this.staticColor = 'white';\n this.treatment = 'outline';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"overBackground\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"staticColor='white'\" with \"treatment='outline'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button',\n { level: 'deprecation' }\n );\n }\n return;\n case 'white':\n this.staticColor = 'white';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"white\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/api',\n { level: 'deprecation' }\n );\n }\n return;\n case 'black':\n this.staticColor = 'black';\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='black'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/api',\n { level: 'deprecation' }\n );\n }\n return;\n case null:\n return;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n /**\n * The static color variant to use for this button.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'black' | 'white';\n\n /**\n * The visual treatment to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n /**\n * Disables text wrapping within the button component's label.\n * Please note that this option is not a part of the design specification\n * and should be used carefully, with consideration of this overflow behavior\n * and the readability of the button's content.\n */\n @property({ type: Boolean, attribute: 'no-wrap', reflect: true })\n public noWrap = false;\n\n public get quiet(): boolean {\n return this.treatment === 'outline';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n // There is no Spectrum design context for an `<sp-button>` without a variant\n // apply one manually when a consumer has not applied one themselves.\n\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n if (this.pending) {\n this.pendingStateController.hostUpdated();\n }\n }\n\n protected override renderButton(): TemplateResult {\n return html`\n ${this.buttonContent} ${this.pendingStateController.renderPendingState()}\n `;\n }\n}\n"],
|
|
5
5
|
"mappings": "qNAWA,OAEE,QAAAA,EAEA,cAAAC,MAEK,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,0BAAAC,MAA8B,oEAEvC,OAAOC,MAAkB,kBACzB,OAAS,cAAAC,MAAkB,kBAWpB,aAAM,eAAiB,CAC5B,SACA,UACA,YACA,WACA,QACA,OACF,EACa,oBAAsB,CAAC,QAAS,OAAO,EAU7C,aAAM,eAAeJ,EAAWI,EAAY,CAAE,cAAe,EAAK,CAAC,CAAE,CAkB1E,aAAc,CACZ,MAAM,EAbR,KAAO,aAAe,UAItB,KAAO,QAAU,GA4FjB,KAAQ,SAA2B,SAYnC,KAAO,UAA8B,OAiBrC,KAAO,OAAS,GA/Gd,KAAK,uBAAyB,IAAIF,EAAuB,IAAI,CAC/D,CApBA,WAA2B,QAAyB,CAClD,MAAO,CAAC,GAAG,MAAM,OAAQC,CAAY,CACvC,CAoBgB,OAAc,CACxB,KAAK,SAGT,MAAM,MAAM,CACd,CAMA,IAAW,SAA0B,CACnC,OAAO,KAAK,QACd,CACA,IAAW,QAAQE,EAAyB,CAC1C,GAAIA,IAAY,KAAK,QAKrB,QADA,KAAK,cAAc,UAAW,KAAK,OAAO,EAClCA,EAAS,CACf,IAAK,MACH,KAAK,SAAW,SAShB,MACF,IAAK,iBACH,KAAK,gBAAgB,SAAS,EAC9B,KAAK,YAAc,QACnB,KAAK,UAAY,UASjB,OACF,IAAK,QACH,KAAK,YAAc,QASnB,OACF,IAAK,QACH,KAAK,YAAc,QASnB,OACF,KAAK,KACH,OACF,QACO,eAAe,SAASA,CAAO,EAGlC,KAAK,SAAWA,EAFhB,KAAK,SAAW,SAIlB,KACJ,CACA,KAAK,aAAa,UAAW,KAAK,OAAO,EAC3C,CAmBA,IAAW,MAAMC,EAAgB,CAC/B,KAAK,UAAYA,EAAQ,UAAY,MACvC,CAWA,IAAW,OAAiB,CAC1B,OAAO,KAAK,YAAc,SAC5B,CAEmB,aAAaC,EAAqC,CACnE,MAAM,aAAaA,CAAO,EAIrB,KAAK,aAAa,SAAS,GAC9B,KAAK,aAAa,UAAW,KAAK,OAAO,EAEvC,KAAK,SACP,KAAK,uBAAuB,YAAY,CAE5C,CAEmB,cAA+B,CAChD,OAAOR;AAAA,QACH,KAAK,aAAa,IAAI,KAAK,uBAAuB,mBAAmB,CAAC;AAAA,KAE5E,CACF,CArJSS,EAAA,CADNP,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GAL3C,OAMJ,4BAIAO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,EAAK,CAAC,GAThD,OAUJ,uBAwBIO,EAAA,CADVP,EAAS,GAjCC,OAkCA,uBA0EJO,EAAA,CADNP,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GA3G3C,OA4GJ,2BAMAO,EAAA,CADNP,EAAS,CAAE,QAAS,EAAK,CAAC,GAjHhB,OAkHJ,yBAMIO,EAAA,CADVP,EAAS,CAAE,KAAM,OAAQ,CAAC,GAvHhB,OAwHA,qBAWJO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,UAAW,UAAW,QAAS,EAAK,CAAC,GAlIrD,OAmIJ",
|
|
6
6
|
"names": ["html", "SizedMixin", "property", "PendingStateController", "buttonStyles", "ButtonBase", "variant", "quiet", "changes", "__decorateClass"]
|
|
7
7
|
}
|
package/src/ButtonBase.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ButtonBase.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport buttonStyles from './button-base.css.js';\n\n/**\n * @slot - text content to be displayed in the Button element\n * @slot icon - icon element(s) to display at the start of the button\n */\nexport class ButtonBase extends ObserveSlotText(LikeAnchor(Focusable), '', [\n 'sp-overlay,sp-tooltip',\n]) {\n public static override get styles(): CSSResultArray {\n return [buttonStyles];\n }\n\n // TODO we need to document this property for consumers,\n // as it's not a 1:1 equivalent to active\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n /**\n * The default behavior of the button.\n * Possible values are: `button` (default), `submit`, and `reset`.\n */\n @property({ type: String })\n public type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * HTML anchor element that component clicks by proxy\n */\n @query('.anchor')\n private anchorElement!: HTMLAnchorElement;\n\n public override get focusElement(): HTMLElement {\n return this;\n }\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n protected get buttonContent(): TemplateResult[] {\n const content = [\n html`\n <slot name=\"icon\" ?icon-only=${!this.hasLabel}></slot>\n `,\n html`\n <span id=\"label\">\n <slot @slotchange=${this.manageTextObservedSlot}></slot>\n </span>\n `,\n ];\n return content;\n }\n\n constructor() {\n super();\n this.proxyFocus = this.proxyFocus.bind(this);\n\n this.addEventListener('click', this.handleClickCapture, {\n capture: true,\n });\n }\n\n private handleClickCapture(event: Event): void | boolean {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return false;\n }\n\n if (this.shouldProxyClick(event as MouseEvent)) {\n return;\n }\n }\n\n private proxyFocus(): void {\n this.focus();\n }\n\n private shouldProxyClick(event?: MouseEvent): boolean {\n let handled = false;\n\n // Don't proxy clicks with modifier keys (Command/Meta, Ctrl, Shift, Alt)\n if (\n event &&\n (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n ) {\n return false;\n }\n\n if (this.anchorElement) {\n // Click HTML anchor element by proxy, but only for non-modified clicks\n this.anchorElement.click();\n handled = true;\n // if the button type is `submit` or `reset`\n } else if (this.type !== 'button') {\n // create an HTML Button Element by proxy, click it, and remove it\n const proxy = document.createElement('button');\n proxy.type = this.type;\n this.insertAdjacentElement('afterend', proxy);\n proxy.click();\n proxy.remove();\n handled = true;\n }\n return handled;\n }\n\n public override renderAnchor(): TemplateResult {\n return html`\n ${this.buttonContent}\n ${super.renderAnchor({\n id: 'button',\n ariaHidden: true,\n className: 'button anchor',\n tabindex: -1,\n })}\n `;\n }\n\n protected renderButton(): TemplateResult {\n return html`\n ${this.buttonContent}\n `;\n }\n\n protected override render(): TemplateResult {\n return this.href && this.href.length > 0\n ? this.renderAnchor()\n : this.renderButton();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n event.preventDefault();\n // allows button to activate when `Space` is pressed\n if (typeof this.href === 'undefined') {\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n break;\n default:\n break;\n }\n }\n\n private handleKeypress(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Enter':\n case 'NumpadEnter':\n // allows button or link to be activated with `Enter` and `NumpadEnter`\n this.click();\n break;\n default:\n break;\n }\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n this.removeEventListener('keyup', this.handleKeyup);\n this.active = false;\n this.click();\n break;\n default:\n break;\n }\n }\n\n private manageAnchor(): void {\n // for a link\n if (this.href && this.href.length > 0) {\n // if the role is set to button\n if (\n !this.hasAttribute('role') ||\n this.getAttribute('role') === 'button'\n ) {\n // change role to link\n this.setAttribute('role', 'link');\n }\n // else for a button\n } else {\n // if the role is set to link\n if (!this.hasAttribute('role') || this.getAttribute('role') === 'link') {\n // change role to button\n this.setAttribute('role', 'button');\n }\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n\n this.manageAnchor();\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('keypress', this.handleKeypress);\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has('href')) {\n this.manageAnchor();\n }\n\n if (changed.has('label')) {\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n this.removeAttribute('aria-label');\n }\n }\n\n if (this.anchorElement) {\n // Ensure the anchor element is not focusable directly via tab\n this.anchorElement.tabIndex = -1;\n\n // Make sure it has proper ARIA attributes\n if (!this.anchorElement.hasAttribute('aria-hidden')) {\n this.anchorElement.setAttribute('aria-hidden', 'true');\n }\n\n // Set up focus delegation\n this.anchorElement.addEventListener('focus', this.proxyFocus);\n }\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAEhC,OAAO,kBAAkB;AAMlB,aAAM,mBAAmB,gBAAgB,WAAW,SAAS,GAAG,IAAI;AAAA,EACzE;AACF,CAAC,EAAE;AAAA,EA6CD,cAAc;AACZ,UAAM;AAtCR,SAAO,SAAS;AAOhB,SAAO,OAAsC;AAgC3C,SAAK,aAAa,KAAK,WAAW,KAAK,IAAI;AAE3C,SAAK,iBAAiB,SAAS,KAAK,oBAAoB;AAAA,MACtD,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAnDA,WAA2B,SAAyB;AAClD,WAAO,CAAC,YAAY;AAAA,EACtB;AAAA,EAoBA,IAAoB,eAA4B;AAC9C,WAAO;AAAA,EACT;AAAA,EAEA,IAAc,WAAoB;AAChC,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAc,gBAAkC;AAC9C,UAAM,UAAU;AAAA,MACd;AAAA,uCACiC,CAAC,KAAK,QAAQ;AAAA;AAAA,MAE/C;AAAA;AAAA,8BAEwB,KAAK,sBAAsB;AAAA;AAAA;AAAA,IAGrD;AACA,WAAO;AAAA,EACT;AAAA,EAWQ,mBAAmB,OAA8B;AACvD,QAAI,KAAK,UAAU;AACjB,YAAM,eAAe;AACrB,YAAM,yBAAyB;AAC/B,aAAO;AAAA,IACT;AAEA,QAAI,KAAK,iBAAiB,KAAmB,GAAG;AAC9C;AAAA,IACF;AAAA,EACF;AAAA,EAEQ,aAAmB;AACzB,SAAK,MAAM;AAAA,EACb;AAAA,EAEQ,iBAAiB,OAA6B;AACpD,QAAI,UAAU;AAGd,QACE,UACC,MAAM,WAAW,MAAM,WAAW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EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAT/B,WAUJ;AAOA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAhBf,WAiBJ;AAMC;AAAA,EADP,MAAM,SAAS;AAAA,GAtBL,WAuBH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ButtonBase.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ButtonBase.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport buttonStyles from './button-base.css.js';\n\n/**\n * @slot - text content to be displayed in the Button element\n * @slot icon - icon element(s) to display at the start of the button\n */\nexport class ButtonBase extends ObserveSlotText(LikeAnchor(Focusable), '', [\n 'sp-overlay,sp-tooltip',\n]) {\n public static override get styles(): CSSResultArray {\n return [buttonStyles];\n }\n\n // TODO we need to document this property for consumers,\n // as it's not a 1:1 equivalent to active\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n /**\n * The default behavior of the button.\n * Possible values are: `button` (default), `submit`, and `reset`.\n */\n @property({ type: String })\n public type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * HTML anchor element that component clicks by proxy\n */\n @query('.anchor')\n private anchorElement!: HTMLAnchorElement;\n\n public override get focusElement(): HTMLElement {\n return this;\n }\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n protected get buttonContent(): TemplateResult[] {\n const content = [\n html`\n <slot name=\"icon\" ?icon-only=${!this.hasLabel}></slot>\n `,\n html`\n <span id=\"label\">\n <slot @slotchange=${this.manageTextObservedSlot}></slot>\n </span>\n `,\n ];\n return content;\n }\n\n constructor() {\n super();\n this.proxyFocus = this.proxyFocus.bind(this);\n\n this.addEventListener('click', this.handleClickCapture, {\n capture: true,\n });\n }\n\n private handleClickCapture(event: Event): void | boolean {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return false;\n }\n\n if (this.shouldProxyClick(event as MouseEvent)) {\n return;\n }\n }\n\n private proxyFocus(): void {\n this.focus();\n }\n\n private shouldProxyClick(event?: MouseEvent): boolean {\n let handled = false;\n\n // Don't proxy clicks with modifier keys (Command/Meta, Ctrl, Shift, Alt)\n if (\n event &&\n (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n ) {\n return false;\n }\n\n if (this.anchorElement) {\n // Click HTML anchor element by proxy, but only for non-modified clicks\n this.anchorElement.click();\n handled = true;\n // if the button type is `submit` or `reset`\n } else if (this.type !== 'button') {\n // create an HTML Button Element by proxy, click it, and remove it\n const proxy = document.createElement('button');\n proxy.type = this.type;\n this.insertAdjacentElement('afterend', proxy);\n proxy.click();\n proxy.remove();\n handled = true;\n }\n return handled;\n }\n\n public override renderAnchor(): TemplateResult {\n return html`\n ${this.buttonContent}\n ${super.renderAnchor({\n id: 'button',\n ariaHidden: true,\n className: 'button anchor',\n tabindex: -1,\n })}\n `;\n }\n\n protected renderButton(): TemplateResult {\n return html`\n ${this.buttonContent}\n `;\n }\n\n protected override render(): TemplateResult {\n return this.href && this.href.length > 0\n ? this.renderAnchor()\n : this.renderButton();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n event.preventDefault();\n // allows button to activate when `Space` is pressed\n if (typeof this.href === 'undefined') {\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n break;\n default:\n break;\n }\n }\n\n private handleKeypress(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Enter':\n case 'NumpadEnter':\n // allows button or link to be activated with `Enter` and `NumpadEnter`\n this.click();\n break;\n default:\n break;\n }\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n this.removeEventListener('keyup', this.handleKeyup);\n this.active = false;\n this.click();\n break;\n default:\n break;\n }\n }\n\n private manageAnchor(): void {\n // for a link\n if (this.href && this.href.length > 0) {\n // if the role is set to button\n if (\n !this.hasAttribute('role') ||\n this.getAttribute('role') === 'button'\n ) {\n // change role to link\n this.setAttribute('role', 'link');\n }\n // else for a button\n } else {\n // if the role is set to link\n if (!this.hasAttribute('role') || this.getAttribute('role') === 'link') {\n // change role to button\n this.setAttribute('role', 'button');\n }\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n if (!this.hasAttribute('tabindex')) {\n this.setAttribute('tabindex', '0');\n }\n\n this.manageAnchor();\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('keypress', this.handleKeypress);\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has('href')) {\n this.manageAnchor();\n }\n\n if (changed.has('label')) {\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n this.removeAttribute('aria-label');\n }\n }\n\n if (this.anchorElement) {\n // Ensure the anchor element is not focusable directly via tab\n this.anchorElement.tabIndex = -1;\n\n // Make sure it has proper ARIA attributes\n if (!this.anchorElement.hasAttribute('aria-hidden')) {\n this.anchorElement.setAttribute('aria-hidden', 'true');\n }\n\n // Set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B,CAC7D,MAAM,aAAaA,CAAO,EACrB,KAAK,aAAa,UAAU,GAC/B,KAAK,aAAa,WAAY,GAAG,EAGnC,KAAK,aAAa,EAClB,KAAK,iBAAiB,UAAW,KAAK,aAAa,EACnD,KAAK,iBAAiB,WAAY,KAAK,cAAc,CACvD,CAEmB,QAAQA,EAA+B,CACxD,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,MAAM,GACpB,KAAK,aAAa,EAGhBA,EAAQ,IAAI,OAAO,IACjB,KAAK,MACP,KAAK,aAAa,aAAc,KAAK,KAAK,EAE1C,KAAK,gBAAgB,YAAY,GAIjC,KAAK,gBAEP,KAAK,cAAc,SAAW,GAGzB,KAAK,cAAc,aAAa,aAAa,GAChD,KAAK,cAAc,aAAa,cAAe,MAAM,EAIvD,KAAK,cAAc,iBAAiB,QAAS,KAAK,UAAU,EAEhE,CACF,CAvNSC,EAAA,CADNX,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAT/B,WAUJ,sBAOAW,EAAA,CADNX,EAAS,CAAE,KAAM,MAAO,CAAC,GAhBf,WAiBJ,oBAMCW,EAAA,CADPV,EAAM,SAAS,GAtBL,WAuBH",
|
|
6
6
|
"names": ["html", "property", "query", "Focusable", "LikeAnchor", "ObserveSlotText", "buttonStyles", "event", "handled", "proxy", "code", "changed", "__decorateClass"]
|
|
7
7
|
}
|
package/src/ClearButton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -35,6 +35,7 @@ export declare class ClearButton extends ClearButton_base {
|
|
|
35
35
|
quiet: boolean;
|
|
36
36
|
/**
|
|
37
37
|
* The visual variant to apply to this button.
|
|
38
|
+
*
|
|
38
39
|
* @deprecated Use `static-color='white'` instead.
|
|
39
40
|
*/
|
|
40
41
|
set variant(variant: 'overBackground' | undefined);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ClearButton.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,gBAAgB;AACzB,OAAO,kBAAkB;AACzB,OAAO,uBAAuB;AAE9B,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAEP,SAAS,oBAAoB;AAE7B,MAAM,YAAkD;AAAA,EACtD,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAMZ;AAOO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACxD,eAAe;AACjB,CAAC,EAAE;AAAA,EAFI;AAAA;AAgBL,SAAO,QAAQ;AAAA;AAAA,EAbf,WAA2B,SAAyB;AAClD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC1D;AAAA,
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\n\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross75.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross100.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross300.js';\n\nimport { StyledButton } from './StyledButton.dev.js'\n\nconst crossIcon: Record<string, () => TemplateResult> = {\n s: () => html`\n <sp-icon-cross75\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross75\"\n ></sp-icon-cross75>\n `,\n m: () => html`\n <sp-icon-cross100\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross100\"\n ></sp-icon-cross100>\n `,\n l: () => html`\n <sp-icon-cross200\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross200\"\n ></sp-icon-cross200>\n `,\n xl: () => html`\n <sp-icon-cross300\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross300\"\n ></sp-icon-cross300>\n `,\n};\n\n/**\n * @element sp-clear-button\n *\n * @attr {string} label - Required accessible label set as aria-label\n */\nexport class ClearButton extends SizedMixin(StyledButton, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, crossMediumStyles];\n }\n\n /**\n * An accessible label that describes the component.\n * It will be applied to aria-label, but not visually rendered.\n * This attribute is required for clear buttons.\n */\n @property()\n public override label!: string;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n /**\n * The visual variant to apply to this button.\n *\n * @deprecated Use `static-color='white'` instead.\n */\n @property({ reflect: true })\n public set variant(variant: 'overBackground' | undefined) {\n const oldValue = this._variant;\n const oldStaticColor = this.staticColor;\n if (variant !== 'overBackground') {\n this.removeAttribute('variant');\n this._variant = undefined;\n this.staticColor = undefined;\n return;\n }\n\n this.setAttribute('variant', variant);\n this._variant = variant;\n // Set staticColor to white to reflect the updated and expected attribute\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n 'The overBackground variant is deprecated. Please use `static-color=\"white\"` instead.',\n 'https://opensource.adobe.com/spectrum-web-components/components/clear-button/',\n { level: 'deprecation' }\n );\n }\n\n this.requestUpdate('variant', oldValue);\n this.requestUpdate('staticColor', oldStaticColor);\n }\n\n public get variant(): 'overBackground' | undefined {\n return this._variant;\n }\n\n private _variant: 'overBackground' | undefined;\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor: 'white' | undefined;\n\n protected override get buttonContent(): TemplateResult[] {\n return [crossIcon[this.size]()];\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"fill\">${super.render()}</div>\n `;\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n // Deprecation warning for default slot when content is provided\n if (window.__swc?.DEBUG && this.textContent?.trim()) {\n window.__swc.warn(\n this,\n `The default slot for text content in <${this.localName}> has been deprecated and will be removed in a future release. The clear button is icon-only and does not render slot content. Use the \"label\" attribute instead to provide an accessible name.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#clear-button',\n { level: 'deprecation' }\n );\n }\n\n // Warning for missing label attribute\n if (window.__swc?.DEBUG && !this.label) {\n window.__swc.warn(\n this,\n `The \"label\" attribute is required on <${this.localName}> to provide an accessible name for screen readers. Please add a label attribute, e.g., <${this.localName} label=\"Clear\">.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#clear-button',\n { level: 'high' }\n );\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,gBAAgB;AACzB,OAAO,kBAAkB;AACzB,OAAO,uBAAuB;AAE9B,OAAO;AACP,OAAO;AACP,OAAO;AACP,O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AOO,aAAM,oBAAoBC,EAAWI,EAAc,CACxD,cAAe,EACjB,CAAC,CAAE,CAFI,kCAgBL,KAAO,MAAQ,GAbf,WAA2B,QAAyB,CAClD,MAAO,CAAC,GAAG,MAAM,OAAQF,EAAcC,CAAiB,CAC1D,
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\n\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross75.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross100.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross300.js';\n\nimport { StyledButton } from './StyledButton.js';\n\nconst crossIcon: Record<string, () => TemplateResult> = {\n s: () => html`\n <sp-icon-cross75\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross75\"\n ></sp-icon-cross75>\n `,\n m: () => html`\n <sp-icon-cross100\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross100\"\n ></sp-icon-cross100>\n `,\n l: () => html`\n <sp-icon-cross200\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross200\"\n ></sp-icon-cross200>\n `,\n xl: () => html`\n <sp-icon-cross300\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross300\"\n ></sp-icon-cross300>\n `,\n};\n\n/**\n * @element sp-clear-button\n *\n * @attr {string} label - Required accessible label set as aria-label\n */\nexport class ClearButton extends SizedMixin(StyledButton, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, crossMediumStyles];\n }\n\n /**\n * An accessible label that describes the component.\n * It will be applied to aria-label, but not visually rendered.\n * This attribute is required for clear buttons.\n */\n @property()\n public override label!: string;\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n /**\n * The visual variant to apply to this button.\n *\n * @deprecated Use `static-color='white'` instead.\n */\n @property({ reflect: true })\n public set variant(variant: 'overBackground' | undefined) {\n const oldValue = this._variant;\n const oldStaticColor = this.staticColor;\n if (variant !== 'overBackground') {\n this.removeAttribute('variant');\n this._variant = undefined;\n this.staticColor = undefined;\n return;\n }\n\n this.setAttribute('variant', variant);\n this._variant = variant;\n // Set staticColor to white to reflect the updated and expected attribute\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n 'The overBackground variant is deprecated. Please use `static-color=\"white\"` instead.',\n 'https://opensource.adobe.com/spectrum-web-components/components/clear-button/',\n { level: 'deprecation' }\n );\n }\n\n this.requestUpdate('variant', oldValue);\n this.requestUpdate('staticColor', oldStaticColor);\n }\n\n public get variant(): 'overBackground' | undefined {\n return this._variant;\n }\n\n private _variant: 'overBackground' | undefined;\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor: 'white' | undefined;\n\n protected override get buttonContent(): TemplateResult[] {\n return [crossIcon[this.size]()];\n }\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"fill\">${super.render()}</div>\n `;\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n // Deprecation warning for default slot when content is provided\n if (window.__swc?.DEBUG && this.textContent?.trim()) {\n window.__swc.warn(\n this,\n `The default slot for text content in <${this.localName}> has been deprecated and will be removed in a future release. The clear button is icon-only and does not render slot content. Use the \"label\" attribute instead to provide an accessible name.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#clear-button',\n { level: 'deprecation' }\n );\n }\n\n // Warning for missing label attribute\n if (window.__swc?.DEBUG && !this.label) {\n window.__swc.warn(\n this,\n `The \"label\" attribute is required on <${this.localName}> to provide an accessible name for screen readers. Please add a label attribute, e.g., <${this.localName} label=\"Clear\">.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#clear-button',\n { level: 'high' }\n );\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAEE,QAAAA,EACA,cAAAC,MAEK,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAOC,MAAkB,gEACzB,OAAOC,MAAuB,+DAE9B,MAAO,6DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DAEP,OAAS,gBAAAC,MAAoB,oBAE7B,MAAMC,EAAkD,CACtD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,GAMZ,EAOO,aAAM,oBAAoBC,EAAWI,EAAc,CACxD,cAAe,EACjB,CAAC,CAAE,CAFI,kCAgBL,KAAO,MAAQ,GAbf,WAA2B,QAAyB,CAClD,MAAO,CAAC,GAAG,MAAM,OAAQF,EAAcC,CAAiB,CAC1D,CAmBA,IAAW,QAAQG,EAAuC,CACxD,MAAMC,EAAW,KAAK,SAChBC,EAAiB,KAAK,YAC5B,GAAIF,IAAY,iBAAkB,CAChC,KAAK,gBAAgB,SAAS,EAC9B,KAAK,SAAW,OAChB,KAAK,YAAc,OACnB,MACF,CAEA,KAAK,aAAa,UAAWA,CAAO,EACpC,KAAK,SAAWA,EAEhB,KAAK,YAAc,QAWnB,KAAK,cAAc,UAAWC,CAAQ,EACtC,KAAK,cAAc,cAAeC,CAAc,CAClD,CAEA,IAAW,SAAwC,CACjD,OAAO,KAAK,QACd,CAUA,IAAuB,eAAkC,CACvD,MAAO,CAACH,EAAU,KAAK,IAAI,EAAE,CAAC,CAChC,CAEmB,QAAyB,CAC1C,OAAON;AAAA,0BACe,MAAM,OAAO,CAAC;AAAA,KAEtC,CAEgB,mBAA0B,CACxC,MAAM,kBAAkB,CAqB1B,CACF,CApFkBU,EAAA,CADfR,EAAS,GAZC,YAaK,qBAGTQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAf/B,YAgBJ,qBAQIQ,EAAA,CADVR,EAAS,CAAE,QAAS,EAAK,CAAC,GAvBhB,YAwBA,uBAsCJQ,EAAA,CADNR,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GA7D3C,YA8DJ",
|
|
6
6
|
"names": ["html", "SizedMixin", "property", "buttonStyles", "crossMediumStyles", "StyledButton", "crossIcon", "variant", "oldValue", "oldStaticColor", "__decorateClass"]
|
|
7
7
|
}
|
package/src/CloseButton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["CloseButton.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\n\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross300.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross400.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross500.js';\n\nimport type { ButtonStaticColors } from './Button.dev.js'\nimport { StyledButton } from './StyledButton.dev.js'\n\nconst crossIcon: Record<string, () => TemplateResult> = {\n s: () => html`\n <sp-icon-cross200\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross200\"\n ></sp-icon-cross200>\n `,\n m: () => html`\n <sp-icon-cross300\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross300\"\n ></sp-icon-cross300>\n `,\n l: () => html`\n <sp-icon-cross400\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross400\"\n ></sp-icon-cross400>\n `,\n xl: () => html`\n <sp-icon-cross500\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross500\"\n ></sp-icon-cross500>\n `,\n};\n\n/**\n * @element sp-close-button\n *\n * @slot - text label of the Close Button\n */\nexport class CloseButton extends SizedMixin(StyledButton, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, crossMediumStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: ButtonStaticColors | '' = '';\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'black' | 'white';\n\n protected override get buttonContent(): TemplateResult[] {\n return [\n crossIcon[this.size](),\n html`\n <span id=\"label\" class=\"visually-hidden\">\n <slot @slotchange=${this.manageTextObservedSlot}></slot>\n </span>\n `,\n ];\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,gBAAgB;AACzB,OAAO,kBAAkB;AACzB,OAAO,uBAAuB;AAE9B,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AAGP,SAAS,oBAAoB;AAE7B,MAAM,YAAkD;AAAA,EACtD,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,GAAG,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAMZ;AAOO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACxD,eAAe;AACjB,CAAC,EAAE;AAAA,EAFI;AAAA;AAWL,SAAO,UAAmC;AAAA;AAAA,EAR1C,WAA2B,SAAyB;AAClD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC1D;AAAA,EAWA,IAAuB,gBAAkC;AACvD,WAAO;AAAA,MACL,UAAU,KAAK,IAAI,EAAE;AAAA,MACrB;AAAA;AAAA,8BAEwB,KAAK,sBAAsB;AAAA;AAAA;AAAA,IAGrD;AAAA,EACF;AACF;AAfS;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVhB,YAWJ;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAb3C,YAcJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/CloseButton.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["CloseButton.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\n\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross300.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross400.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross500.js';\n\nimport type { ButtonStaticColors } from './Button.js';\nimport { StyledButton } from './StyledButton.js';\n\nconst crossIcon: Record<string, () => TemplateResult> = {\n s: () => html`\n <sp-icon-cross200\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross200\"\n ></sp-icon-cross200>\n `,\n m: () => html`\n <sp-icon-cross300\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross300\"\n ></sp-icon-cross300>\n `,\n l: () => html`\n <sp-icon-cross400\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross400\"\n ></sp-icon-cross400>\n `,\n xl: () => html`\n <sp-icon-cross500\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross500\"\n ></sp-icon-cross500>\n `,\n};\n\n/**\n * @element sp-close-button\n *\n * @slot - text label of the Close Button\n */\nexport class CloseButton extends SizedMixin(StyledButton, {\n noDefaultSize: true,\n}) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles, crossMediumStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: ButtonStaticColors | '' = '';\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'black' | 'white';\n\n protected override get buttonContent(): TemplateResult[] {\n return [\n crossIcon[this.size](),\n html`\n <span id=\"label\" class=\"visually-hidden\">\n <slot @slotchange=${this.manageTextObservedSlot}></slot>\n </span>\n `,\n ];\n }\n}\n"],
|
|
5
5
|
"mappings": "qNAYA,OAEE,QAAAA,EACA,cAAAC,MAEK,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAOC,MAAkB,gEACzB,OAAOC,MAAuB,+DAE9B,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DAGP,OAAS,gBAAAC,MAAoB,oBAE7B,MAAMC,EAAkD,CACtD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,GAMZ,EAOO,aAAM,oBAAoBC,EAAWI,EAAc,CACxD,cAAe,EACjB,CAAC,CAAE,CAFI,kCAWL,KAAO,QAAmC,GAR1C,WAA2B,QAAyB,CAClD,MAAO,CAAC,GAAG,MAAM,OAAQF,EAAcC,CAAiB,CAC1D,CAWA,IAAuB,eAAkC,CACvD,MAAO,CACLE,EAAU,KAAK,IAAI,EAAE,EACrBN;AAAA;AAAA,8BAEwB,KAAK,sBAAsB;AAAA;AAAA,OAGrD,CACF,CACF,CAfSO,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GAVhB,YAWJ,uBAGAK,EAAA,CADNL,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAb3C,YAcJ",
|
|
6
6
|
"names": ["html", "SizedMixin", "property", "buttonStyles", "crossMediumStyles", "StyledButton", "crossIcon", "__decorateClass"]
|
|
7
7
|
}
|
package/src/StyledButton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["StyledButton.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ButtonBase } from './ButtonBase.dev.js'\n\nexport class StyledButton extends ButtonBase {}\n"],
|
|
5
5
|
"mappings": ";AAYA,SAAS,kBAAkB;AAEpB,aAAM,qBAAqB,WAAW;AAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/StyledButton.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["StyledButton.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ButtonBase } from './ButtonBase.js';\n\nexport class StyledButton extends ButtonBase {}\n"],
|
|
5
5
|
"mappings": "aAYA,OAAS,cAAAA,MAAkB,kBAEpB,aAAM,qBAAqBA,CAAW,CAAC",
|
|
6
6
|
"names": ["ButtonBase"]
|
|
7
7
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
package/src/index.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport * from './Button.dev.js'\nexport * from './ClearButton.dev.js'\nexport * from './CloseButton.dev.js'\nexport * from './ButtonBase.dev.js'\nexport * from './StyledButton.dev.js'\n"],
|
|
5
5
|
"mappings": ";AAWA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport * from './Button.js';\nexport * from './ClearButton.js';\nexport * from './CloseButton.js';\nexport * from './ButtonBase.js';\nexport * from './StyledButton.js';\n"],
|
|
5
5
|
"mappings": "aAWA,WAAc,cACd,WAAc,mBACd,WAAc,mBACd,WAAc,kBACd,WAAc",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|