@spectrum-web-components/button 1.5.0-beta.0 → 1.5.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,26 +11,28 @@ loudness for various attention-getting needs.
11
11
  [![How big is this package in your project?](https://img.shields.io/bundlephobia/minzip/@spectrum-web-components/button?style=for-the-badge)](https://bundlephobia.com/result?p=@spectrum-web-components/button)
12
12
  [![Try it on webcomponents.dev](https://img.shields.io/badge/Try%20it%20on-webcomponents.dev-green?style=for-the-badge)](https://webcomponents.dev/edit/collection/fO75441E1Q5ZlI0e9pgq/Zjc3o94DWuBkT4ve3dny/src/index.ts)
13
13
 
14
- ```
14
+ ```zsh
15
15
  yarn add @spectrum-web-components/button
16
16
  ```
17
17
 
18
- Import the side effectful registration of `<sp-button>` or `<sp-clear-button>` as follows:
18
+ Import the side effectful registration of `<sp-button>` as follows:
19
19
 
20
- ```
20
+ ```ts
21
21
  import '@spectrum-web-components/button/sp-button.js';
22
- import '@spectrum-web-components/button/sp-clear-button.js';
23
- import '@spectrum-web-components/button/sp-close-button.js';
24
22
  ```
25
23
 
26
- When looking to leverage the `Button`, `ClearButton`, or `CloseButton` base classes as a type and/or for extension purposes, do so via:
24
+ When looking to leverage the `Button` base classes as a type and/or for extension purposes, do so via:
27
25
 
28
- ```
29
- import { Button, ClearButton, CloseButton } from '@spectrum-web-components/button';
26
+ ```ts
27
+ import { Button } from '@spectrum-web-components/button';
30
28
  ```
31
29
 
32
30
  ### Anatomy
33
31
 
32
+ ```html
33
+ <sp-button>Try me</sp-button>
34
+ ```
35
+
34
36
  #### Content
35
37
 
36
38
  `<sp-button>` elements can be provided a visible label,
@@ -138,7 +140,7 @@ fulfill the accessibility contract of the button.
138
140
  #### Variants
139
141
 
140
142
  There are many button variants to choose from in Spectrum. The `variant`
141
- attribute defaults to `accent`, but also accepts the following value: `accent`, `primary`, `secondary`, `negative`, `white`, and `black`. They display as follows:
143
+ attribute defaults to `accent`, but also accepts the following value: `accent`, `primary`, `secondary`, `negative`. They display as follows:
142
144
 
143
145
  <sp-tabs selected="accent" auto label="Variant Attribute Options">
144
146
  <sp-tab value="accent">Accent</sp-tab>
@@ -208,40 +210,6 @@ attribute defaults to `accent`, but also accepts the following value: `accent`,
208
210
  </sp-button-group>
209
211
  ```
210
212
 
211
- </sp-tab-panel>
212
- <sp-tab value="black">Black</sp-tab>
213
- <sp-tab-panel value="black">
214
-
215
- ```html demo
216
- <sp-button-group style="min-width: max-content">
217
- <sp-button static-color="black">Label only</sp-button>
218
- <sp-button static-color="black">
219
- <sp-icon-help slot="icon"></sp-icon-help>
220
- Icon + Label
221
- </sp-button>
222
- <sp-button static-color="black" label="Icon only" icon-only>
223
- <sp-icon-help slot="icon"></sp-icon-help>
224
- </sp-button>
225
- </sp-button-group>
226
- ```
227
-
228
- </sp-tab-panel>
229
- <sp-tab value="white">White</sp-tab>
230
- <sp-tab-panel value="white">
231
-
232
- ```html demo
233
- <sp-button-group style="min-width: max-content">
234
- <sp-button static-color="white">Label only</sp-button>
235
- <sp-button static-color="white">
236
- <sp-icon-help slot="icon"></sp-icon-help>
237
- Icon + Label
238
- </sp-button>
239
- <sp-button static-color="white" label="Icon only" icon-only>
240
- <sp-icon-help slot="icon"></sp-icon-help>
241
- </sp-button>
242
- </sp-button-group>
243
- ```
244
-
245
213
  </sp-tab-panel>
246
214
  </sp-tabs>
247
215
 
@@ -388,7 +356,13 @@ mounts. This is useful for setting focus to a specific sp-button when a
388
356
  popover or dialog opens.
389
357
 
390
358
  ```html
391
- <sp-button autofocus>Confirm</sp-button>
359
+ <sp-button id="trigger">Open</sp-button>
360
+ <sp-overlay trigger="trigger@click" placement="bottom">
361
+ <sp-popover>
362
+ <!-- Button will autofocus when open -->
363
+ <sp-button autofocus>Confirm</sp-button>
364
+ </sp-popover>
365
+ </sp-overlay>
392
366
  ```
393
367
 
394
368
  ### Accessibility
@@ -415,9 +389,11 @@ To ensure maximum contrast with the background, use static black for light backg
415
389
  <sp-tab-panel value="black">
416
390
 
417
391
  ```html demo
418
- <div style="background-color: #ccffee; padding: 20px">
419
- <sp-button static="black">Click me</sp-button>
420
- <sp-button static="black" treatment="outline">Click me</sp-button>
392
+ <div
393
+ style="background-color: var(--spectrum-docs-static-black-background-color); padding: 20px"
394
+ >
395
+ <sp-button static-color="black">Click me</sp-button>
396
+ <sp-button static-color="black" treatment="outline">Click me</sp-button>
421
397
  </div>
422
398
  ```
423
399
 
@@ -426,9 +402,11 @@ To ensure maximum contrast with the background, use static black for light backg
426
402
  <sp-tab-panel value="white">
427
403
 
428
404
  ```html demo
429
- <div style="background-color: #220033; padding: 20px">
430
- <sp-button static="white">Click me</sp-button>
431
- <sp-button static="white" treatment="outline">Click me</sp-button>
405
+ <div
406
+ style="background-color: var(--spectrum-docs-static-white-background-color); padding: 20px"
407
+ >
408
+ <sp-button static-color="white">Click me</sp-button>
409
+ <sp-button static-color="white" treatment="outline">Click me</sp-button>
432
410
  </div>
433
411
  ```
434
412
 
@@ -825,7 +825,7 @@
825
825
  }
826
826
  },
827
827
  {
828
- "description": "The icon to use for Clear Button",
828
+ "description": "icon element(s) to display at the start of the button",
829
829
  "name": "icon",
830
830
  "inheritedFrom": {
831
831
  "name": "ButtonBase",
@@ -1166,7 +1166,7 @@
1166
1166
  }
1167
1167
  },
1168
1168
  {
1169
- "description": "The icon to use for Close Button",
1169
+ "description": "icon element(s) to display at the start of the button",
1170
1170
  "name": "icon",
1171
1171
  "inheritedFrom": {
1172
1172
  "name": "ButtonBase",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/button",
3
- "version": "1.5.0-beta.0",
3
+ "version": "1.5.1-beta.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,7 +11,7 @@
11
11
  "url": "https://github.com/adobe/spectrum-web-components.git",
12
12
  "directory": "packages/button"
13
13
  },
14
- "author": "",
14
+ "author": "Adobe",
15
15
  "homepage": "https://opensource.adobe.com/spectrum-web-components/components/button",
16
16
  "bugs": {
17
17
  "url": "https://github.com/adobe/spectrum-web-components/issues"
@@ -77,23 +77,29 @@
77
77
  "!test/"
78
78
  ],
79
79
  "keywords": [
80
- "spectrum css",
80
+ "design-system",
81
+ "spectrum",
82
+ "adobe",
83
+ "adobe-spectrum",
81
84
  "web components",
85
+ "web-components",
82
86
  "lit-element",
83
- "lit-html"
87
+ "lit-html",
88
+ "component",
89
+ "css"
84
90
  ],
85
91
  "dependencies": {
86
- "@spectrum-web-components/base": "1.5.0-beta.0",
87
- "@spectrum-web-components/clear-button": "1.5.0-beta.0",
88
- "@spectrum-web-components/close-button": "1.5.0-beta.0",
89
- "@spectrum-web-components/icon": "1.5.0-beta.0",
90
- "@spectrum-web-components/icons-ui": "1.5.0-beta.0",
91
- "@spectrum-web-components/progress-circle": "1.5.0-beta.0",
92
- "@spectrum-web-components/reactive-controllers": "1.5.0-beta.0",
93
- "@spectrum-web-components/shared": "1.5.0-beta.0"
92
+ "@spectrum-web-components/base": "1.5.1-beta.0",
93
+ "@spectrum-web-components/clear-button": "1.5.1-beta.0",
94
+ "@spectrum-web-components/close-button": "1.5.1-beta.0",
95
+ "@spectrum-web-components/icon": "1.5.1-beta.0",
96
+ "@spectrum-web-components/icons-ui": "1.5.1-beta.0",
97
+ "@spectrum-web-components/progress-circle": "1.5.1-beta.0",
98
+ "@spectrum-web-components/reactive-controllers": "1.5.1-beta.0",
99
+ "@spectrum-web-components/shared": "1.5.1-beta.0"
94
100
  },
95
101
  "devDependencies": {
96
- "@spectrum-css/button": "14.1.1"
102
+ "@spectrum-css/button": "14.1.6"
97
103
  },
98
104
  "types": "./src/index.d.ts",
99
105
  "customElements": "custom-elements.json",
package/src/Button.dev.js CHANGED
@@ -81,24 +81,22 @@ export class Button extends SizedMixin(ButtonBase, { noDefaultSize: true }) {
81
81
  }
82
82
  return;
83
83
  case "white":
84
- this.staticColor = variant;
85
- this.removeAttribute("variant");
84
+ this.staticColor = "white";
86
85
  if (true) {
87
86
  window.__swc.warn(
88
87
  this,
89
- `The "black" and "white" values of the "variant" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use "static-color='black'" or "static-color='white'" instead.`,
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.`,
90
89
  "https://opensource.adobe.com/spectrum-web-components/components/button/api",
91
90
  { level: "deprecation" }
92
91
  );
93
92
  }
94
93
  return;
95
94
  case "black":
96
- this.staticColor = variant;
97
- this.removeAttribute("variant");
95
+ this.staticColor = "black";
98
96
  if (true) {
99
97
  window.__swc.warn(
100
98
  this,
101
- `The "black" and "white" values of the "variant" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use "static-color='black'" or "static-color='white'" instead.`,
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.`,
102
100
  "https://opensource.adobe.com/spectrum-web-components/components/button/api",
103
101
  { level: "deprecation" }
104
102
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Button.ts"],
4
- "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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 = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use \"static-color='black'\" or \"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 = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use \"static-color='black'\" or \"static-color='white'\" 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": "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",
4
+ "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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": "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",
6
6
  "names": []
7
7
  }
package/src/Button.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var l=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,c;s>=0;s--)(c=o[s])&&(r=(n?c(i,t,r):c(r))||r);return n&&r&&l(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=t,this.removeAttribute("variant");return;case"black":this.staticColor=t,this.removeAttribute("variant");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`
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
2
  ${this.buttonContent}
3
3
  ${this.pendingStateController.renderPendingState()}
4
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);
package/src/Button.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Button.ts"],
4
- "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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 = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use \"static-color='black'\" or \"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 = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> have been deprecated and will be removed in a future release. Use \"static-color='black'\" or \"static-color='white'\" 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,cAAe,EAAK,CAAC,CAAE,CAkBxE,aAAc,CACV,MAAM,EAbV,KAAO,aAAe,UAItB,KAAO,QAAU,GA4FjB,KAAQ,SAA2B,SAYnC,KAAO,UAA8B,OAiBrC,KAAO,OAAS,GA/GZ,KAAK,uBAAyB,IAAIE,EAAuB,IAAI,CACjE,CApBA,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQD,CAAY,CACzC,CAoBgB,OAAc,CACtB,KAAK,SAGT,MAAM,MAAM,CAChB,CAMA,IAAW,SAA0B,CACjC,OAAO,KAAK,QAChB,CACA,IAAW,QAAQE,EAAyB,CACxC,GAAIA,IAAY,KAAK,QAGrB,QADA,KAAK,cAAc,UAAW,KAAK,OAAO,EAClCA,EAAS,CACb,IAAK,MACD,KAAK,SAAW,SAShB,MACJ,IAAK,iBACD,KAAK,gBAAgB,SAAS,EAC9B,KAAK,YAAc,QACnB,KAAK,UAAY,UASjB,OACJ,IAAK,QACD,KAAK,YAAcA,EACnB,KAAK,gBAAgB,SAAS,EAS9B,OACJ,IAAK,QACD,KAAK,YAAcA,EACnB,KAAK,gBAAgB,SAAS,EAS9B,OACJ,KAAK,KACD,OACJ,QACS,eAAe,SAASA,CAAO,EAGhC,KAAK,SAAWA,EAFhB,KAAK,SAAW,SAIpB,KACR,CACA,KAAK,aAAa,UAAW,KAAK,OAAO,EAC7C,CAmBA,IAAW,MAAMC,EAAgB,CAC7B,KAAK,UAAYA,EAAQ,UAAY,MACzC,CAWA,IAAW,OAAiB,CACxB,OAAO,KAAK,YAAc,SAC9B,CAEmB,aAAaC,EAAqC,CACjE,MAAM,aAAaA,CAAO,EAIrB,KAAK,aAAa,SAAS,GAC5B,KAAK,aAAa,UAAW,KAAK,OAAO,EAEzC,KAAK,SACL,KAAK,uBAAuB,YAAY,CAEhD,CAEmB,cAA+B,CAC9C,OAAOR;AAAA,cACD,KAAK,aAAa;AAAA,cAClB,KAAK,uBAAuB,mBAAmB,CAAC;AAAA,SAE1D,CACJ,CAtJWS,EAAA,CADNP,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GAL7C,OAMF,4BAIAO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,EAAK,CAAC,GATlD,OAUF,uBAwBIO,EAAA,CADVP,EAAS,GAjCD,OAkCE,uBA0EJO,EAAA,CADNP,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GA3G7C,OA4GF,2BAMAO,EAAA,CADNP,EAAS,CAAE,QAAS,EAAK,CAAC,GAjHlB,OAkHF,yBAMIO,EAAA,CADVP,EAAS,CAAE,KAAM,OAAQ,CAAC,GAvHlB,OAwHE,qBAWJO,EAAA,CADNP,EAAS,CAAE,KAAM,QAAS,UAAW,UAAW,QAAS,EAAK,CAAC,GAlIvD,OAmIF",
4
+ "sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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,cAAe,EAAK,CAAC,CAAE,CAkBxE,aAAc,CACV,MAAM,EAbV,KAAO,aAAe,UAItB,KAAO,QAAU,GA0FjB,KAAQ,SAA2B,SAYnC,KAAO,UAA8B,OAiBrC,KAAO,OAAS,GA7GZ,KAAK,uBAAyB,IAAIE,EAAuB,IAAI,CACjE,CApBA,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQD,CAAY,CACzC,CAoBgB,OAAc,CACtB,KAAK,SAGT,MAAM,MAAM,CAChB,CAMA,IAAW,SAA0B,CACjC,OAAO,KAAK,QAChB,CACA,IAAW,QAAQE,EAAyB,CACxC,GAAIA,IAAY,KAAK,QAGrB,QADA,KAAK,cAAc,UAAW,KAAK,OAAO,EAClCA,EAAS,CACb,IAAK,MACD,KAAK,SAAW,SAShB,MACJ,IAAK,iBACD,KAAK,gBAAgB,SAAS,EAC9B,KAAK,YAAc,QACnB,KAAK,UAAY,UASjB,OACJ,IAAK,QACD,KAAK,YAAc,QASnB,OACJ,IAAK,QACD,KAAK,YAAc,QASnB,OACJ,KAAK,KACD,OACJ,QACS,eAAe,SAASA,CAAO,EAGhC,KAAK,SAAWA,EAFhB,KAAK,SAAW,SAIpB,KACR,CACA,KAAK,aAAa,UAAW,KAAK,OAAO,EAC7C,CAmBA,IAAW,MAAMC,EAAgB,CAC7B,KAAK,UAAYA,EAAQ,UAAY,MACzC,CAWA,IAAW,OAAiB,CACxB,OAAO,KAAK,YAAc,SAC9B,CAEmB,aAAaC,EAAqC,CACjE,MAAM,aAAaA,CAAO,EAIrB,KAAK,aAAa,SAAS,GAC5B,KAAK,aAAa,UAAW,KAAK,OAAO,EAEzC,KAAK,SACL,KAAK,uBAAuB,YAAY,CAEhD,CAEmB,cAA+B,CAC9C,OAAOR;AAAA,cACD,KAAK,aAAa;AAAA,cAClB,KAAK,uBAAuB,mBAAmB,CAAC;AAAA,SAE1D,CACJ,CApJWS,EAAA,CADNP,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,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
6
  "names": ["html", "SizedMixin", "property", "ButtonBase", "buttonStyles", "PendingStateController", "variant", "quiet", "changes", "__decorateClass"]
7
7
  }
@@ -12,7 +12,6 @@ declare const ClearButton_base: typeof StyledButton & {
12
12
  * @element sp-clear-button
13
13
  *
14
14
  * @slot - text label of the Clear Button
15
- * @slot icon - The icon to use for Clear Button
16
15
  */
17
16
  export declare class ClearButton extends ClearButton_base {
18
17
  static get styles(): CSSResultArray;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["ClearButton.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.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 * @slot - text label of the Clear Button\n * @slot icon - The icon to use for Clear Button\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 * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: 'overBackground' | '' = '';\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"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,uBAAuB;AAE9B,MAAM,YAAkD;AAAA,EACpD,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;AAMd;AAQO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACtD,eAAe;AACnB,CAAC,EAAE;AAAA,EAFI;AAAA;AAWH,SAAO,UAAiC;AAAA;AAAA,EARxC,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC5D;AAAA,EAQA,IAAuB,gBAAkC;AACrD,WAAO,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;AAAA,EAClC;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,gCACiB,MAAM,OAAO,CAAC;AAAA;AAAA,EAE1C;AACJ;AAXW;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVlB,YAWF;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.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 * @slot - text label of the Clear Button\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 * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: 'overBackground' | '' = '';\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"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,uBAAuB;AAE9B,MAAM,YAAkD;AAAA,EACpD,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;AAMd;AAOO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACtD,eAAe;AACnB,CAAC,EAAE;AAAA,EAFI;AAAA;AAWH,SAAO,UAAiC;AAAA;AAAA,EARxC,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC5D;AAAA,EAQA,IAAuB,gBAAkC;AACrD,WAAO,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;AAAA,EAClC;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA,gCACiB,MAAM,OAAO,CAAC;AAAA;AAAA,EAE1C;AACJ;AAXW;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVlB,YAWF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["ClearButton.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.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 * @slot - text label of the Clear Button\n * @slot icon - The icon to use for Clear Button\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 * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: 'overBackground' | '' = '';\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"],
5
- "mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,gEACzB,MAAO,6DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,OAAOC,MAAuB,+DAE9B,MAAMC,EAAkD,CACpD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMd,EAQO,aAAM,oBAAoBC,EAAWE,EAAc,CACtD,cAAe,EACnB,CAAC,CAAE,CAFI,kCAWH,KAAO,QAAiC,GARxC,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,EAAcC,CAAiB,CAC5D,CAQA,IAAuB,eAAkC,CACrD,MAAO,CAACC,EAAU,KAAK,IAAI,EAAE,CAAC,CAClC,CAEmB,QAAyB,CACxC,OAAON;AAAA,gCACiB,MAAM,OAAO,CAAC;AAAA,SAE1C,CACJ,CAXWO,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GAVlB,YAWF",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.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 * @slot - text label of the Clear Button\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 * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: 'overBackground' | '' = '';\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"],
5
+ "mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,gEACzB,MAAO,6DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,OAAOC,MAAuB,+DAE9B,MAAMC,EAAkD,CACpD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMd,EAOO,aAAM,oBAAoBC,EAAWE,EAAc,CACtD,cAAe,EACnB,CAAC,CAAE,CAFI,kCAWH,KAAO,QAAiC,GARxC,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,EAAcC,CAAiB,CAC5D,CAQA,IAAuB,eAAkC,CACrD,MAAO,CAACC,EAAU,KAAK,IAAI,EAAE,CAAC,CAClC,CAEmB,QAAyB,CACxC,OAAON;AAAA,gCACiB,MAAM,OAAO,CAAC;AAAA,SAE1C,CACJ,CAXWO,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GAVlB,YAWF",
6
6
  "names": ["html", "SizedMixin", "property", "StyledButton", "buttonStyles", "crossMediumStyles", "crossIcon", "__decorateClass"]
7
7
  }
@@ -13,7 +13,6 @@ declare const CloseButton_base: typeof StyledButton & {
13
13
  * @element sp-close-button
14
14
  *
15
15
  * @slot - text label of the Close Button
16
- * @slot icon - The icon to use for Close Button
17
16
  */
18
17
  export declare class CloseButton extends CloseButton_base {
19
18
  static get styles(): CSSResultArray;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["CloseButton.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\nimport type { ButtonStaticColors } from './Button.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 * @slot icon - The icon to use for 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 [crossIcon[this.size]()];\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,uBAAuB;AAG9B,MAAM,YAAkD;AAAA,EACpD,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;AAMd;AAQO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACtD,eAAe;AACnB,CAAC,EAAE;AAAA,EAFI;AAAA;AAWH,SAAO,UAAmC;AAAA;AAAA,EAR1C,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC5D;AAAA,EAWA,IAAuB,gBAAkC;AACrD,WAAO,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;AAAA,EAClC;AACJ;AARW;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVlB,YAWF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAb7C,YAcF;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\nimport type { ButtonStaticColors } from './Button.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 [crossIcon[this.size]()];\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AACzB,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,uBAAuB;AAG9B,MAAM,YAAkD;AAAA,EACpD,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;AAMd;AAOO,aAAM,oBAAoB,WAAW,cAAc;AAAA,EACtD,eAAe;AACnB,CAAC,EAAE;AAAA,EAFI;AAAA;AAWH,SAAO,UAAmC;AAAA;AAAA,EAR1C,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,cAAc,iBAAiB;AAAA,EAC5D;AAAA,EAWA,IAAuB,gBAAkC;AACrD,WAAO,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;AAAA,EAClC;AACJ;AARW;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVlB,YAWF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAb7C,YAcF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["CloseButton.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\nimport type { ButtonStaticColors } from './Button.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 * @slot icon - The icon to use for 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 [crossIcon[this.size]()];\n }\n}\n"],
5
- "mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,gEACzB,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,OAAOC,MAAuB,+DAG9B,MAAMC,EAAkD,CACpD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMd,EAQO,aAAM,oBAAoBC,EAAWE,EAAc,CACtD,cAAe,EACnB,CAAC,CAAE,CAFI,kCAWH,KAAO,QAAmC,GAR1C,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,EAAcC,CAAiB,CAC5D,CAWA,IAAuB,eAAkC,CACrD,MAAO,CAACC,EAAU,KAAK,IAAI,EAAE,CAAC,CAClC,CACJ,CARWC,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GAVlB,YAWF,uBAGAK,EAAA,CADNL,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAb7C,YAcF",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from '@spectrum-web-components/close-button/src/close-button.css.js';\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';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\nimport type { ButtonStaticColors } from './Button.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 [crossIcon[this.size]()];\n }\n}\n"],
5
+ "mappings": "qNAYA,OAEI,QAAAA,EACA,cAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,gEACzB,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,MAAO,8DACP,OAAOC,MAAuB,+DAG9B,MAAMC,EAAkD,CACpD,EAAG,IAAMN;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,EAAG,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMT,GAAI,IAAMA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMd,EAOO,aAAM,oBAAoBC,EAAWE,EAAc,CACtD,cAAe,EACnB,CAAC,CAAE,CAFI,kCAWH,KAAO,QAAmC,GAR1C,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,EAAcC,CAAiB,CAC5D,CAWA,IAAuB,eAAkC,CACrD,MAAO,CAACC,EAAU,KAAK,IAAI,EAAE,CAAC,CAClC,CACJ,CARWC,EAAA,CADNL,EAAS,CAAE,QAAS,EAAK,CAAC,GAVlB,YAWF,uBAGAK,EAAA,CADNL,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAb7C,YAcF",
6
6
  "names": ["html", "SizedMixin", "property", "StyledButton", "buttonStyles", "crossMediumStyles", "crossIcon", "__decorateClass"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  import { css } from "@spectrum-web-components/base";
3
3
  const styles = css`
4
- :host{--spectrum-button-background-color-default:var(--system-button-background-color-default);--spectrum-button-background-color-hover:var(--system-button-background-color-hover);--spectrum-button-background-color-down:var(--system-button-background-color-down);--spectrum-button-background-color-focus:var(--system-button-background-color-focus);--spectrum-button-border-color-default:var(--system-button-border-color-default);--spectrum-button-border-color-hover:var(--system-button-border-color-hover);--spectrum-button-border-color-down:var(--system-button-border-color-down);--spectrum-button-border-color-focus:var(--system-button-border-color-focus);--spectrum-button-background-color-disabled:var(--system-button-background-color-disabled);--spectrum-button-border-color-disabled:var(--system-button-border-color-disabled);--mod-button-background-color-default:var(--system-button-background-color-default);--mod-button-background-color-hover:var(--system-button-background-color-hover);--mod-button-background-color-down:var(--system-button-background-color-down);--mod-button-background-color-focus:var(--system-button-background-color-focus);--mod-button-border-color-default:var(--system-button-border-color-default);--mod-button-border-color-hover:var(--system-button-border-color-hover);--mod-button-border-color-down:var(--system-button-border-color-down);--mod-button-border-color-focus:var(--system-button-border-color-focus)}:host([selected]){--mod-button-background-color-default:var(--system-button-selected-background-color-default);--mod-button-background-color-hover:var(--system-button-selected-background-color-hover);--mod-button-background-color-down:var(--system-button-selected-background-color-down);--mod-button-background-color-focus:var(--system-button-selected-background-color-focus)}:host([variant=primary]){--mod-button-content-color-default:var(--system-button-primary-content-color-default);--mod-button-content-color-hover:var(--system-button-primary-content-color-hover);--mod-button-content-color-down:var(--system-button-primary-content-color-down);--mod-button-content-color-focus:var(--system-button-primary-content-color-focus)}:host([variant=primary][treatment=outline]){--mod-button-background-color-hover:var(--system-button-primary-outline-background-color-hover);--mod-button-background-color-down:var(--system-button-primary-outline-background-color-down);--mod-button-background-color-focus:var(--system-button-primary-outline-background-color-focus)}:host([variant=secondary]){--mod-button-background-color-default:var(--system-button-secondary-background-color-default)}:host([variant=secondary]:not([treatment=outline])){--mod-button-background-color-hover:var(--system-button-secondary-not-outline-background-color-hover);--mod-button-background-color-down:var(--system-button-secondary-not-outline-background-color-down);--mod-button-background-color-focus:var(--system-button-secondary-not-outline-background-color-focus)}:host([variant=secondary][treatment=outline]){--mod-button-background-color-hover:var(--system-button-secondary-outline-background-color-hover);--mod-button-background-color-down:var(--system-button-secondary-outline-background-color-down);--mod-button-background-color-focus:var(--system-button-secondary-outline-background-color-focus);--mod-button-border-color-default:var(--system-button-secondary-outline-border-color-default)}:host([static-color=white]){--mod-button-background-color-default:var(--system-button-static-white-background-color-default);--mod-button-background-color-hover:var(--system-button-static-white-background-color-hover);--mod-button-background-color-down:var(--system-button-static-white-background-color-down);--mod-button-background-color-focus:var(--system-button-static-white-background-color-focus);--mod-button-content-color-default:var(--system-button-static-white-content-color-default);--mod-button-content-color-hover:var(--system-button-static-white-content-color-hover);--mod-button-content-color-down:var(--system-button-static-white-content-color-down);--mod-button-content-color-focus:var(--system-button-static-white-content-color-focus)}:host([static-color=white][variant=secondary]){--mod-button-background-color-default:var(--system-button-static-white-secondary-background-color-default);--mod-button-background-color-hover:var(--system-button-static-white-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-white-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-white-secondary-background-color-focus);--mod-button-content-color-default:var(--system-button-static-white-secondary-content-color-default);--mod-button-content-color-hover:var(--system-button-static-white-secondary-content-color-hover);--mod-button-content-color-down:var(--system-button-static-white-secondary-content-color-down);--mod-button-content-color-focus:var(--system-button-static-white-secondary-content-color-focus)}:host([static-color=white][variant=secondary][treatment=outline]){--mod-button-border-color-default:var(--system-button-static-white-secondary-outline-border-color-default);--mod-button-border-color-hover:var(--system-button-static-white-secondary-outline-border-color-hover);--mod-button-border-color-down:var(--system-button-static-white-secondary-outline-border-color-down);--mod-button-border-color-focus:var(--system-button-static-white-secondary-outline-border-color-focus)}:host([static-color=white][treatment=outline]:not([variant=secondary])){--mod-button-background-color-hover:var(--system-button-static-white-outline-not-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-white-outline-not-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-white-outline-not-secondary-background-color-focus);--mod-button-content-color-default:var(--system-button-static-white-outline-not-secondary-content-color-default);--mod-button-content-color-hover:var(--system-button-static-white-outline-not-secondary-content-color-hover);--mod-button-content-color-down:var(--system-button-static-white-outline-not-secondary-content-color-down);--mod-button-content-color-focus:var(--system-button-static-white-outline-not-secondary-content-color-focus);--mod-button-border-color-default:var(--system-button-static-white-outline-not-secondary-border-color-default);--mod-button-border-color-hover:var(--system-button-static-white-outline-not-secondary-border-color-hover);--mod-button-border-color-down:var(--system-button-static-white-outline-not-secondary-border-color-down);--mod-button-border-color-focus:var(--system-button-static-white-outline-not-secondary-border-color-focus)}:host([static-color=white][treatment=outline][variant=secondary]){--mod-button-background-color-hover:var(--system-button-static-white-outline-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-white-outline-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-white-outline-secondary-background-color-focus)}:host([static-color=black]){--mod-button-background-color-default:var(--system-button-static-black-background-color-default);--mod-button-background-color-hover:var(--system-button-static-black-background-color-hover);--mod-button-background-color-down:var(--system-button-static-black-background-color-down);--mod-button-background-color-focus:var(--system-button-static-black-background-color-focus);--mod-button-content-color-default:var(--system-button-static-black-content-color-default);--mod-button-content-color-hover:var(--system-button-static-black-content-color-hover);--mod-button-content-color-down:var(--system-button-static-black-content-color-down);--mod-button-content-color-focus:var(--system-button-static-black-content-color-focus)}:host([static-color=black][variant=secondary]){--mod-button-background-color-default:var(--system-button-static-black-secondary-background-color-default);--mod-button-background-color-hover:var(--system-button-static-black-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-black-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-black-secondary-background-color-focus);--mod-button-content-color-default:var(--system-button-static-black-secondary-content-color-default);--mod-button-content-color-hover:var(--system-button-static-black-secondary-content-color-hover);--mod-button-content-color-down:var(--system-button-static-black-secondary-content-color-down);--mod-button-content-color-focus:var(--system-button-static-black-secondary-content-color-focus)}:host([static-color=black][variant=secondary][treatment=outline]){--mod-button-background-color-hover:var(--system-button-static-black-secondary-outline-background-color-hover);--mod-button-background-color-down:var(--system-button-static-black-secondary-outline-background-color-down);--mod-button-background-color-focus:var(--system-button-static-black-secondary-outline-background-color-focus);--mod-button-border-color-default:var(--system-button-static-black-secondary-outline-border-color-default);--mod-button-border-color-hover:var(--system-button-static-black-secondary-outline-border-color-hover);--mod-button-border-color-down:var(--system-button-static-black-secondary-outline-border-color-down);--mod-button-border-color-focus:var(--system-button-static-black-secondary-outline-border-color-focus)}:host([static-color=black][treatment=outline]:not([variant=secondary])){--mod-button-background-color-hover:var(--system-button-static-black-outline-not-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-black-outline-not-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-black-outline-not-secondary-background-color-focus);--mod-button-content-color-default:var(--system-button-static-black-outline-not-secondary-content-color-default);--mod-button-content-color-hover:var(--system-button-static-black-outline-not-secondary-content-color-hover);--mod-button-content-color-down:var(--system-button-static-black-outline-not-secondary-content-color-down);--mod-button-content-color-focus:var(--system-button-static-black-outline-not-secondary-content-color-focus);--mod-button-border-color-default:var(--system-button-static-black-outline-not-secondary-border-color-default);--mod-button-border-color-hover:var(--system-button-static-black-outline-not-secondary-border-color-hover);--mod-button-border-color-down:var(--system-button-static-black-outline-not-secondary-border-color-down);--mod-button-border-color-focus:var(--system-button-static-black-outline-not-secondary-border-color-focus)}:host([static-color=black][treatment=outline][variant=secondary]){--mod-button-background-color-hover:var(--system-button-static-black-outline-secondary-background-color-hover);--mod-button-background-color-down:var(--system-button-static-black-outline-secondary-background-color-down);--mod-button-background-color-focus:var(--system-button-static-black-outline-secondary-background-color-focus)}
4
+ :host{--spectrum-button-background-color-default:var(--system-button-background-color-default);--spectrum-button-background-color-hover:var(--system-button-background-color-hover);--spectrum-button-background-color-down:var(--system-button-background-color-down);--spectrum-button-background-color-focus:var(--system-button-background-color-focus);--spectrum-button-border-color-default:var(--system-button-border-color-default);--spectrum-button-border-color-hover:var(--system-button-border-color-hover);--spectrum-button-border-color-down:var(--system-button-border-color-down);--spectrum-button-border-color-focus:var(--system-button-border-color-focus);--spectrum-button-background-color-disabled:var(--system-button-background-color-disabled);--spectrum-button-border-color-disabled:var(--system-button-border-color-disabled)}:host([selected]){--spectrum-button-background-color-default:var(--system-button-selected-background-color-default);--spectrum-button-background-color-hover:var(--system-button-selected-background-color-hover);--spectrum-button-background-color-down:var(--system-button-selected-background-color-down);--spectrum-button-background-color-focus:var(--system-button-selected-background-color-focus)}:host([variant=primary]){--spectrum-button-content-color-default:var(--system-button-primary-content-color-default);--spectrum-button-content-color-hover:var(--system-button-primary-content-color-hover);--spectrum-button-content-color-down:var(--system-button-primary-content-color-down);--spectrum-button-content-color-focus:var(--system-button-primary-content-color-focus)}:host([variant=primary][treatment=outline]){--spectrum-button-background-color-hover:var(--system-button-primary-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-primary-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-primary-outline-background-color-focus)}:host([variant=secondary]){--spectrum-button-background-color-default:var(--system-button-secondary-background-color-default);--spectrum-button-background-color-hover:var(--system-button-secondary-background-color-hover);--spectrum-button-background-color-down:var(--system-button-secondary-background-color-down);--spectrum-button-background-color-focus:var(--system-button-secondary-background-color-focus)}:host([variant=secondary][treatment=outline]){--spectrum-button-background-color-hover:var(--system-button-secondary-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-secondary-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-secondary-outline-background-color-focus);--spectrum-button-border-color-default:var(--system-button-secondary-outline-border-color-default);--spectrum-button-border-color-down:var(--system-button-secondary-outline-border-color-down)}:host([static-color=white]){--spectrum-button-background-color-default:var(--system-button-static-white-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-white-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-white-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-white-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-white-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-white-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-white-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-white-content-color-focus)}:host([static-color=white][treatment=outline]){--spectrum-button-background-color-default:var(--system-button-static-white-outline-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-white-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-white-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-white-outline-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-white-outline-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-white-outline-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-white-outline-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-white-outline-content-color-focus);--spectrum-button-border-color-default:var(--system-button-static-white-outline-border-color-default);--spectrum-button-border-color-hover:var(--system-button-static-white-outline-border-color-hover);--spectrum-button-border-color-down:var(--system-button-static-white-outline-border-color-down);--spectrum-button-border-color-focus:var(--system-button-static-white-outline-border-color-focus)}:host([static-color=white][variant=secondary]){--spectrum-button-background-color-default:var(--system-button-static-white-secondary-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-white-secondary-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-white-secondary-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-white-secondary-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-white-secondary-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-white-secondary-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-white-secondary-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-white-secondary-content-color-focus)}:host([static-color=white][variant=secondary][treatment=outline]){--spectrum-button-border-color-default:var(--system-button-static-white-secondary-outline-border-color-default);--spectrum-button-border-color-hover:var(--system-button-static-white-secondary-outline-border-color-hover);--spectrum-button-border-color-down:var(--system-button-static-white-secondary-outline-border-color-down);--spectrum-button-border-color-focus:var(--system-button-static-white-secondary-outline-border-color-focus);--spectrum-button-background-color-default:var(--system-button-static-white-secondary-outline-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-white-secondary-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-white-secondary-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-white-secondary-outline-background-color-focus)}:host([static-color=black]){--spectrum-button-background-color-default:var(--system-button-static-black-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-black-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-black-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-black-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-black-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-black-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-black-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-black-content-color-focus)}:host([static-color=black][treatment=outline]){--spectrum-button-background-color-default:var(--system-button-static-black-outline-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-black-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-black-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-black-outline-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-black-outline-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-black-outline-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-black-outline-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-black-outline-content-color-focus);--spectrum-button-border-color-default:var(--system-button-static-black-outline-border-color-default);--spectrum-button-border-color-hover:var(--system-button-static-black-outline-border-color-hover);--spectrum-button-border-color-down:var(--system-button-static-black-outline-border-color-down);--spectrum-button-border-color-focus:var(--system-button-static-black-outline-border-color-focus)}:host([static-color=black][variant=secondary]){--spectrum-button-background-color-default:var(--system-button-static-black-secondary-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-black-secondary-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-black-secondary-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-black-secondary-background-color-focus);--spectrum-button-content-color-default:var(--system-button-static-black-secondary-content-color-default);--spectrum-button-content-color-hover:var(--system-button-static-black-secondary-content-color-hover);--spectrum-button-content-color-down:var(--system-button-static-black-secondary-content-color-down);--spectrum-button-content-color-focus:var(--system-button-static-black-secondary-content-color-focus)}:host([static-color=black][variant=secondary][treatment=outline]){--spectrum-button-border-color-default:var(--system-button-static-black-secondary-outline-border-color-default);--spectrum-button-border-color-hover:var(--system-button-static-black-secondary-outline-border-color-hover);--spectrum-button-border-color-down:var(--system-button-static-black-secondary-outline-border-color-down);--spectrum-button-border-color-focus:var(--system-button-static-black-secondary-outline-border-color-focus);--spectrum-button-background-color-default:var(--system-button-static-black-secondary-outline-background-color-default);--spectrum-button-background-color-hover:var(--system-button-static-black-secondary-outline-background-color-hover);--spectrum-button-background-color-down:var(--system-button-static-black-secondary-outline-background-color-down);--spectrum-button-background-color-focus:var(--system-button-static-black-secondary-outline-background-color-focus)}
5
5
  `;
6
6
  export default styles;
7
7
  //# sourceMappingURL=button-overrides.css.dev.js.map