@spectrum-web-components/button 1.9.0 → 1.9.1-nightly.20251028214328

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +1021 -0
  2. package/package.json +100 -100
  3. package/custom-elements.json +0 -1913
  4. package/sp-button.d.ts +0 -17
  5. package/sp-button.dev.js +0 -5
  6. package/sp-button.dev.js.map +0 -7
  7. package/sp-button.js +0 -2
  8. package/sp-button.js.map +0 -7
  9. package/sp-clear-button.d.ts +0 -17
  10. package/sp-clear-button.dev.js +0 -5
  11. package/sp-clear-button.dev.js.map +0 -7
  12. package/sp-clear-button.js +0 -2
  13. package/sp-clear-button.js.map +0 -7
  14. package/sp-close-button.d.ts +0 -17
  15. package/sp-close-button.dev.js +0 -5
  16. package/sp-close-button.dev.js.map +0 -7
  17. package/sp-close-button.js +0 -2
  18. package/sp-close-button.js.map +0 -7
  19. package/src/Button.d.ts +0 -71
  20. package/src/Button.dev.js +0 -160
  21. package/src/Button.dev.js.map +0 -7
  22. package/src/Button.js +0 -5
  23. package/src/Button.js.map +0 -7
  24. package/src/ButtonBase.d.ts +0 -54
  25. package/src/ButtonBase.dev.js +0 -195
  26. package/src/ButtonBase.dev.js.map +0 -7
  27. package/src/ButtonBase.js +0 -13
  28. package/src/ButtonBase.js.map +0 -7
  29. package/src/ClearButton.d.ts +0 -44
  30. package/src/ClearButton.dev.js +0 -104
  31. package/src/ClearButton.dev.js.map +0 -7
  32. package/src/ClearButton.js +0 -24
  33. package/src/ClearButton.js.map +0 -7
  34. package/src/CloseButton.d.ts +0 -37
  35. package/src/CloseButton.dev.js +0 -70
  36. package/src/CloseButton.dev.js.map +0 -7
  37. package/src/CloseButton.js +0 -22
  38. package/src/CloseButton.js.map +0 -7
  39. package/src/StyledButton.d.ts +0 -14
  40. package/src/StyledButton.dev.js +0 -5
  41. package/src/StyledButton.dev.js.map +0 -7
  42. package/src/StyledButton.js +0 -2
  43. package/src/StyledButton.js.map +0 -7
  44. package/src/button-base.css.d.ts +0 -2
  45. package/src/button-base.css.dev.js +0 -7
  46. package/src/button-base.css.dev.js.map +0 -7
  47. package/src/button-base.css.js +0 -4
  48. package/src/button-base.css.js.map +0 -7
  49. package/src/button-overrides.css.d.ts +0 -2
  50. package/src/button-overrides.css.dev.js +0 -7
  51. package/src/button-overrides.css.dev.js.map +0 -7
  52. package/src/button-overrides.css.js +0 -4
  53. package/src/button-overrides.css.js.map +0 -7
  54. package/src/button.css.d.ts +0 -2
  55. package/src/button.css.dev.js +0 -7
  56. package/src/button.css.dev.js.map +0 -7
  57. package/src/button.css.js +0 -4
  58. package/src/button.css.js.map +0 -7
  59. package/src/index.d.ts +0 -16
  60. package/src/index.dev.js +0 -7
  61. package/src/index.dev.js.map +0 -7
  62. package/src/index.js +0 -2
  63. package/src/index.js.map +0 -7
  64. package/src/spectrum-button-base.css.d.ts +0 -2
  65. package/src/spectrum-button-base.css.dev.js +0 -7
  66. package/src/spectrum-button-base.css.dev.js.map +0 -7
  67. package/src/spectrum-button-base.css.js +0 -4
  68. package/src/spectrum-button-base.css.js.map +0 -7
  69. package/src/spectrum-button.css.d.ts +0 -2
  70. package/src/spectrum-button.css.dev.js +0 -7
  71. package/src/spectrum-button.css.dev.js.map +0 -7
  72. package/src/spectrum-button.css.js +0 -4
  73. package/src/spectrum-button.css.js.map +0 -7
package/sp-button.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- import { Button } from './src/Button.js';
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- 'sp-button': Button;
16
- }
17
- }
package/sp-button.dev.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import { Button } from "./src/Button.dev.js";
3
- import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
- defineElement("sp-button", Button);
5
- //# sourceMappingURL=sp-button.dev.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { Button } from './src/Button.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-button', Button);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-button': Button;\n }\n}\n"],
5
- "mappings": ";AAWA,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAE9B,cAAc,aAAa,MAAM;",
6
- "names": []
7
- }
package/sp-button.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";import{Button as t}from"./src/Button.js";import{defineElement as e}from"@spectrum-web-components/base/src/define-element.js";e("sp-button",t);
2
- //# sourceMappingURL=sp-button.js.map
package/sp-button.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { Button } from './src/Button.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-button', Button);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-button': Button;\n }\n}\n"],
5
- "mappings": "aAWA,OAAS,UAAAA,MAAc,kBACvB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,YAAaD,CAAM",
6
- "names": ["Button", "defineElement"]
7
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- import { ClearButton } from './src/ClearButton.js';
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- 'sp-clear-button': ClearButton;
16
- }
17
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import { ClearButton } from "./src/ClearButton.dev.js";
3
- import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
- defineElement("sp-clear-button", ClearButton);
5
- //# sourceMappingURL=sp-clear-button.dev.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-clear-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { ClearButton } from './src/ClearButton.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-clear-button', ClearButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-clear-button': ClearButton;\n }\n}\n"],
5
- "mappings": ";AAWA,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,cAAc,mBAAmB,WAAW;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";import{ClearButton as e}from"./src/ClearButton.js";import{defineElement as t}from"@spectrum-web-components/base/src/define-element.js";t("sp-clear-button",e);
2
- //# sourceMappingURL=sp-clear-button.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-clear-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { ClearButton } from './src/ClearButton.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-clear-button', ClearButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-clear-button': ClearButton;\n }\n}\n"],
5
- "mappings": "aAWA,OAAS,eAAAA,MAAmB,uBAC5B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,kBAAmBD,CAAW",
6
- "names": ["ClearButton", "defineElement"]
7
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- import { CloseButton } from './src/CloseButton.js';
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- 'sp-close-button': CloseButton;
16
- }
17
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import { CloseButton } from "./src/CloseButton.dev.js";
3
- import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
- defineElement("sp-close-button", CloseButton);
5
- //# sourceMappingURL=sp-close-button.dev.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-close-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { CloseButton } from './src/CloseButton.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-close-button', CloseButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-close-button': CloseButton;\n }\n}\n"],
5
- "mappings": ";AAYA,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAE9B,cAAc,mBAAmB,WAAW;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";import{CloseButton as e}from"./src/CloseButton.js";import{defineElement as o}from"@spectrum-web-components/base/src/define-element.js";o("sp-close-button",e);
2
- //# sourceMappingURL=sp-close-button.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["sp-close-button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { CloseButton } from './src/CloseButton.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-close-button', CloseButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-close-button': CloseButton;\n }\n}\n"],
5
- "mappings": "aAYA,OAAS,eAAAA,MAAmB,uBAC5B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,kBAAmBD,CAAW",
6
- "names": ["CloseButton", "defineElement"]
7
- }
package/src/Button.d.ts DELETED
@@ -1,71 +0,0 @@
1
- /**
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
13
- import { ButtonBase } from './ButtonBase.js';
14
- import { PendingStateController } from '@spectrum-web-components/reactive-controllers/src/PendingState.js';
15
- export type DeprecatedButtonVariants = 'cta' | 'overBackground';
16
- export type ButtonStaticColors = 'white' | 'black';
17
- export type ButtonVariants = 'accent' | 'primary' | 'secondary' | 'negative' | ButtonStaticColors | DeprecatedButtonVariants;
18
- export declare const VALID_VARIANTS: string[];
19
- export declare const VALID_STATIC_COLORS: string[];
20
- export type ButtonTreatments = 'fill' | 'outline';
21
- declare const Button_base: typeof ButtonBase & {
22
- new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
23
- prototype: import("@spectrum-web-components/base").SizedElementInterface;
24
- };
25
- /**
26
- * @element sp-button
27
- *
28
- * @slot - text label of the Button
29
- * @slot icon - The icon to use for Button
30
- */
31
- export declare class Button extends Button_base {
32
- static get styles(): CSSResultArray;
33
- pendingLabel: string;
34
- pending: boolean;
35
- pendingStateController: PendingStateController<this>;
36
- /**
37
- * Initializes the `PendingStateController` for the Button component.
38
- * The `PendingStateController` manages the pending state of the Button.
39
- */
40
- constructor();
41
- click(): void;
42
- /**
43
- * The visual variant to apply to this button.
44
- */
45
- get variant(): ButtonVariants;
46
- set variant(variant: ButtonVariants);
47
- private _variant;
48
- /**
49
- * The static color variant to use for this button.
50
- */
51
- staticColor?: 'black' | 'white';
52
- /**
53
- * The visual treatment to apply to this button.
54
- */
55
- treatment: ButtonTreatments;
56
- /**
57
- * Style this button to be less obvious
58
- */
59
- set quiet(quiet: boolean);
60
- /**
61
- * Disables text wrapping within the button component's label.
62
- * Please note that this option is not a part of the design specification
63
- * and should be used carefully, with consideration of this overflow behavior
64
- * and the readability of the button's content.
65
- */
66
- noWrap: boolean;
67
- get quiet(): boolean;
68
- protected firstUpdated(changes: PropertyValues<this>): void;
69
- protected renderButton(): TemplateResult;
70
- }
71
- export {};
package/src/Button.dev.js DELETED
@@ -1,160 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __decorateClass = (decorators, target, key, kind) => {
5
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
6
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
7
- if (decorator = decorators[i])
8
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9
- if (kind && result) __defProp(target, key, result);
10
- return result;
11
- };
12
- import {
13
- html,
14
- SizedMixin
15
- } from "@spectrum-web-components/base";
16
- import { property } from "@spectrum-web-components/base/src/decorators.js";
17
- import { ButtonBase } from "./ButtonBase.dev.js";
18
- import buttonStyles from "./button.css.js";
19
- import { PendingStateController } from "@spectrum-web-components/reactive-controllers/src/PendingState.js";
20
- export const VALID_VARIANTS = [
21
- "accent",
22
- "primary",
23
- "secondary",
24
- "negative",
25
- "white",
26
- "black"
27
- ];
28
- export const VALID_STATIC_COLORS = ["white", "black"];
29
- export class Button extends SizedMixin(ButtonBase, { noDefaultSize: true }) {
30
- /**
31
- * Initializes the `PendingStateController` for the Button component.
32
- * The `PendingStateController` manages the pending state of the Button.
33
- */
34
- constructor() {
35
- super();
36
- this.pendingLabel = "Pending";
37
- this.pending = false;
38
- this._variant = "accent";
39
- this.treatment = "fill";
40
- this.noWrap = false;
41
- this.pendingStateController = new PendingStateController(this);
42
- }
43
- static get styles() {
44
- return [...super.styles, buttonStyles];
45
- }
46
- click() {
47
- if (this.pending) {
48
- return;
49
- }
50
- super.click();
51
- }
52
- get variant() {
53
- return this._variant;
54
- }
55
- set variant(variant) {
56
- if (variant === this.variant) return;
57
- this.requestUpdate("variant", this.variant);
58
- switch (variant) {
59
- case "cta":
60
- this._variant = "accent";
61
- if (true) {
62
- window.__swc.warn(
63
- this,
64
- `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.`,
65
- "https://opensource.adobe.com/spectrum-web-components/components/button/#variants",
66
- { level: "deprecation" }
67
- );
68
- }
69
- break;
70
- case "overBackground":
71
- this.removeAttribute("variant");
72
- this.staticColor = "white";
73
- this.treatment = "outline";
74
- if (true) {
75
- window.__swc.warn(
76
- this,
77
- `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.`,
78
- "https://opensource.adobe.com/spectrum-web-components/components/button",
79
- { level: "deprecation" }
80
- );
81
- }
82
- return;
83
- case "white":
84
- this.staticColor = "white";
85
- if (true) {
86
- window.__swc.warn(
87
- this,
88
- `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.`,
89
- "https://opensource.adobe.com/spectrum-web-components/components/button/api",
90
- { level: "deprecation" }
91
- );
92
- }
93
- return;
94
- case "black":
95
- this.staticColor = "black";
96
- if (true) {
97
- window.__swc.warn(
98
- this,
99
- `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.`,
100
- "https://opensource.adobe.com/spectrum-web-components/components/button/api",
101
- { level: "deprecation" }
102
- );
103
- }
104
- return;
105
- case null:
106
- return;
107
- default:
108
- if (!VALID_VARIANTS.includes(variant)) {
109
- this._variant = "accent";
110
- } else {
111
- this._variant = variant;
112
- }
113
- break;
114
- }
115
- this.setAttribute("variant", this.variant);
116
- }
117
- set quiet(quiet) {
118
- this.treatment = quiet ? "outline" : "fill";
119
- }
120
- get quiet() {
121
- return this.treatment === "outline";
122
- }
123
- firstUpdated(changes) {
124
- super.firstUpdated(changes);
125
- if (!this.hasAttribute("variant")) {
126
- this.setAttribute("variant", this.variant);
127
- }
128
- if (this.pending) {
129
- this.pendingStateController.hostUpdated();
130
- }
131
- }
132
- renderButton() {
133
- return html`
134
- ${this.buttonContent}
135
- ${this.pendingStateController.renderPendingState()}
136
- `;
137
- }
138
- }
139
- __decorateClass([
140
- property({ type: String, attribute: "pending-label" })
141
- ], Button.prototype, "pendingLabel", 2);
142
- __decorateClass([
143
- property({ type: Boolean, reflect: true, attribute: true })
144
- ], Button.prototype, "pending", 2);
145
- __decorateClass([
146
- property()
147
- ], Button.prototype, "variant", 1);
148
- __decorateClass([
149
- property({ reflect: true, attribute: "static-color" })
150
- ], Button.prototype, "staticColor", 2);
151
- __decorateClass([
152
- property({ reflect: true })
153
- ], Button.prototype, "treatment", 2);
154
- __decorateClass([
155
- property({ type: Boolean })
156
- ], Button.prototype, "quiet", 1);
157
- __decorateClass([
158
- property({ type: Boolean, attribute: "no-wrap", reflect: true })
159
- ], Button.prototype, "noWrap", 2);
160
- //# sourceMappingURL=Button.dev.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["Button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { ButtonBase } from './ButtonBase.dev.js'\nimport buttonStyles from './button.css.js';\nimport { PendingStateController } from '@spectrum-web-components/reactive-controllers/src/PendingState.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) return;\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}\n ${this.pendingStateController.renderPendingState()}\n `;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,OAAO,kBAAkB;AACzB,SAAS,8BAA8B;AAWhC,aAAM,iBAAiB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AACO,aAAM,sBAAsB,CAAC,SAAS,OAAO;AAU7C,aAAM,eAAe,WAAW,YAAY,EA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QAAQ,CAAC;AAAA,GArHlB,OAsHE;AAWJ;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,WAAW,WAAW,SAAS,KAAK,CAAC;AAAA,GAhIvD,OAiIF;",
6
- "names": []
7
- }
package/src/Button.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var e=(o,i,t,n)=>{for(var r=n>1?void 0:n?u(i,t):i,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(n?l(i,t,r):l(r))||r);return n&&r&&c(i,t,r),r};import{html as p,SizedMixin as d}from"@spectrum-web-components/base";import{property as a}from"@spectrum-web-components/base/src/decorators.js";import{ButtonBase as h}from"./ButtonBase.js";import b from"./button.css.js";import{PendingStateController as w}from"@spectrum-web-components/reactive-controllers/src/PendingState.js";export const VALID_VARIANTS=["accent","primary","secondary","negative","white","black"],VALID_STATIC_COLORS=["white","black"];export class Button extends d(h,{noDefaultSize:!0}){constructor(){super();this.pendingLabel="Pending";this.pending=!1;this._variant="accent";this.treatment="fill";this.noWrap=!1;this.pendingStateController=new w(this)}static get styles(){return[...super.styles,b]}click(){this.pending||super.click()}get variant(){return this._variant}set variant(t){if(t!==this.variant){switch(this.requestUpdate("variant",this.variant),t){case"cta":this._variant="accent";break;case"overBackground":this.removeAttribute("variant"),this.staticColor="white",this.treatment="outline";return;case"white":this.staticColor="white";return;case"black":this.staticColor="black";return;case null:return;default:VALID_VARIANTS.includes(t)?this._variant=t:this._variant="accent";break}this.setAttribute("variant",this.variant)}}set quiet(t){this.treatment=t?"outline":"fill"}get quiet(){return this.treatment==="outline"}firstUpdated(t){super.firstUpdated(t),this.hasAttribute("variant")||this.setAttribute("variant",this.variant),this.pending&&this.pendingStateController.hostUpdated()}renderButton(){return p`
2
- ${this.buttonContent}
3
- ${this.pendingStateController.renderPendingState()}
4
- `}}e([a({type:String,attribute:"pending-label"})],Button.prototype,"pendingLabel",2),e([a({type:Boolean,reflect:!0,attribute:!0})],Button.prototype,"pending",2),e([a()],Button.prototype,"variant",1),e([a({reflect:!0,attribute:"static-color"})],Button.prototype,"staticColor",2),e([a({reflect:!0})],Button.prototype,"treatment",2),e([a({type:Boolean})],Button.prototype,"quiet",1),e([a({type:Boolean,attribute:"no-wrap",reflect:!0})],Button.prototype,"noWrap",2);
5
- //# sourceMappingURL=Button.js.map
package/src/Button.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["Button.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2025 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 { ButtonBase } from './ButtonBase.js';\nimport buttonStyles from './button.css.js';\nimport { PendingStateController } from '@spectrum-web-components/reactive-controllers/src/PendingState.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) return;\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}\n ${this.pendingStateController.renderPendingState()}\n `;\n }\n}\n"],
5
- "mappings": "qNAWA,OAEI,QAAAA,EAEA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,cAAAC,MAAkB,kBAC3B,OAAOC,MAAkB,kBACzB,OAAS,0BAAAC,MAA8B,oEAWhC,aAAM,eAAiB,CAC1B,SACA,UACA,YACA,WACA,QACA,OACJ,EACa,oBAAsB,CAAC,QAAS,OAAO,EAU7C,aAAM,eAAeJ,EAAWE,EAAY,CAAE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AgB,CAAC,GAL7C,OAMF,4BAIAO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,EAAK,CAAC,GATlD,OAUF,uBAwBIO,EAAA,CADVP,EAAS,GAjCD,OAkCE,uBAwEJO,EAAA,CADNP,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAzG7C,OA0GF,2BAMAO,EAAA,CADNP,EAAS,CAAE,QAAS,EAAK,CAAC,GA/GlB,OAgHF,yBAMIO,EAAA,CADVP,EAAS,CAAE,KAAM,OAAQ,CAAC,GArHlB,OAsHE,qBAWJO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,UAAW,UAAW,QAAS,EAAK,CAAC,GAhIvD,OAiIF",
6
- "names": ["html", "SizedMixin", "property", "ButtonBase", "buttonStyles", "PendingStateController", "variant", "quiet", "changes", "__decorateClass"]
7
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- import { CSSResultArray, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
13
- import { Focusable } from '@spectrum-web-components/shared/src/focusable.js';
14
- declare const ButtonBase_base: typeof Focusable & {
15
- new (...args: any[]): import("@spectrum-web-components/shared/src/like-anchor.js").LikeAnchorInterface;
16
- prototype: import("@spectrum-web-components/shared/src/like-anchor.js").LikeAnchorInterface;
17
- } & {
18
- new (...args: any[]): import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface;
19
- prototype: import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface;
20
- };
21
- /**
22
- * @slot - text content to be displayed in the Button element
23
- * @slot icon - icon element(s) to display at the start of the button
24
- */
25
- export declare class ButtonBase extends ButtonBase_base {
26
- static get styles(): CSSResultArray;
27
- active: boolean;
28
- /**
29
- * The default behavior of the button.
30
- * Possible values are: `button` (default), `submit`, and `reset`.
31
- */
32
- type: 'button' | 'submit' | 'reset';
33
- /**
34
- * HTML anchor element that component clicks by proxy
35
- */
36
- private anchorElement;
37
- get focusElement(): HTMLElement;
38
- protected get hasLabel(): boolean;
39
- protected get buttonContent(): TemplateResult[];
40
- constructor();
41
- private handleClickCapture;
42
- private proxyFocus;
43
- private shouldProxyClick;
44
- renderAnchor(): TemplateResult;
45
- protected renderButton(): TemplateResult;
46
- protected render(): TemplateResult;
47
- protected handleKeydown(event: KeyboardEvent): void;
48
- private handleKeypress;
49
- protected handleKeyup(event: KeyboardEvent): void;
50
- private manageAnchor;
51
- protected firstUpdated(changed: PropertyValues): void;
52
- protected updated(changed: PropertyValues): void;
53
- }
54
- export {};