@spectrum-web-components/button 0.16.3-express.0 → 0.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/custom-elements.json +25 -39
  2. package/package.json +7 -8
  3. package/src/Button.d.ts +6 -13
  4. package/src/Button.js +15 -57
  5. package/src/Button.js.map +1 -1
  6. package/src/ClearButton.js +1 -1
  7. package/src/ClearButton.js.map +1 -1
  8. package/src/button-base.css.js +1 -1
  9. package/src/button-base.css.js.map +1 -1
  10. package/src/button.css.js +469 -500
  11. package/src/button.css.js.map +1 -1
  12. package/src/spectrum-button.css.js +469 -500
  13. package/src/spectrum-button.css.js.map +1 -1
  14. package/src/spectrum-config.js +76 -20
  15. package/stories/button-cta-sizes.stories.js +11 -0
  16. package/stories/button-cta.stories.js +115 -0
  17. package/stories/button-overBackground-sizes.stories.js +12 -0
  18. package/stories/button-overBackground.stories.js +132 -0
  19. package/stories/button-primary-sizes.stories.js +11 -0
  20. package/stories/button-primary.stories.js +129 -0
  21. package/stories/index.js +7 -112
  22. package/stories/index.js.map +1 -1
  23. package/stories/button-accent-fill-sizes.stories.js +0 -28
  24. package/stories/button-accent-fill-sizes.stories.js.map +0 -1
  25. package/stories/button-accent-fill.stories.js +0 -28
  26. package/stories/button-accent-fill.stories.js.map +0 -1
  27. package/stories/button-accent-outline-sizes.stories.js +0 -28
  28. package/stories/button-accent-outline-sizes.stories.js.map +0 -1
  29. package/stories/button-accent-outline.stories.js +0 -28
  30. package/stories/button-accent-outline.stories.js.map +0 -1
  31. package/stories/button-black-fill-sizes.stories.js +0 -29
  32. package/stories/button-black-fill-sizes.stories.js.map +0 -1
  33. package/stories/button-black-fill.stories.js +0 -29
  34. package/stories/button-black-fill.stories.js.map +0 -1
  35. package/stories/button-black-outline-sizes.stories.js +0 -29
  36. package/stories/button-black-outline-sizes.stories.js.map +0 -1
  37. package/stories/button-black-outline.stories.js +0 -29
  38. package/stories/button-black-outline.stories.js.map +0 -1
  39. package/stories/button-negative-fill-sizes.stories.js +0 -28
  40. package/stories/button-negative-fill-sizes.stories.js.map +0 -1
  41. package/stories/button-negative-fill.stories.js +0 -28
  42. package/stories/button-negative-fill.stories.js.map +0 -1
  43. package/stories/button-negative-outline-sizes.stories.js +0 -28
  44. package/stories/button-negative-outline-sizes.stories.js.map +0 -1
  45. package/stories/button-negative-outline.stories.js +0 -28
  46. package/stories/button-negative-outline.stories.js.map +0 -1
  47. package/stories/button-primary-fill-sizes.stories.js +0 -28
  48. package/stories/button-primary-fill-sizes.stories.js.map +0 -1
  49. package/stories/button-primary-fill.stories.js +0 -28
  50. package/stories/button-primary-fill.stories.js.map +0 -1
  51. package/stories/button-primary-outline-sizes.stories.js +0 -28
  52. package/stories/button-primary-outline-sizes.stories.js.map +0 -1
  53. package/stories/button-primary-outline.stories.js +0 -28
  54. package/stories/button-primary-outline.stories.js.map +0 -1
  55. package/stories/button-secondary-fill-sizes.stories.js +0 -28
  56. package/stories/button-secondary-fill-sizes.stories.js.map +0 -1
  57. package/stories/button-secondary-fill.stories.js +0 -28
  58. package/stories/button-secondary-fill.stories.js.map +0 -1
  59. package/stories/button-secondary-outline-sizes.stories.js +0 -28
  60. package/stories/button-secondary-outline-sizes.stories.js.map +0 -1
  61. package/stories/button-secondary-outline.stories.js +0 -28
  62. package/stories/button-secondary-outline.stories.js.map +0 -1
  63. package/stories/button-white-fill-sizes.stories.js +0 -29
  64. package/stories/button-white-fill-sizes.stories.js.map +0 -1
  65. package/stories/button-white-fill.stories.js +0 -29
  66. package/stories/button-white-fill.stories.js.map +0 -1
  67. package/stories/button-white-outline-sizes.stories.js +0 -29
  68. package/stories/button-white-outline-sizes.stories.js.map +0 -1
  69. package/stories/button-white-outline.stories.js +0 -29
  70. package/stories/button-white-outline.stories.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/button",
3
- "version": "0.16.3-express.0+5d9e2a2ca",
3
+ "version": "0.16.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -46,20 +46,19 @@
46
46
  "lit-html"
47
47
  ],
48
48
  "dependencies": {
49
- "@spectrum-web-components/base": "^0.5.2-express.41+5d9e2a2ca",
50
- "@spectrum-web-components/clear-button": "^0.0.2-express.2285+5d9e2a2ca",
51
- "@spectrum-web-components/icon": "^0.11.2-express.41+5d9e2a2ca",
52
- "@spectrum-web-components/icons-ui": "^0.8.2-express.41+5d9e2a2ca",
53
- "@spectrum-web-components/shared": "^0.13.3-express.0+5d9e2a2ca",
49
+ "@spectrum-web-components/base": "^0.5.1",
50
+ "@spectrum-web-components/icon": "^0.11.2",
51
+ "@spectrum-web-components/icons-ui": "^0.8.2",
52
+ "@spectrum-web-components/shared": "^0.13.3",
54
53
  "tslib": "^2.0.0"
55
54
  },
56
55
  "devDependencies": {
57
- "@spectrum-css/button": "latest"
56
+ "@spectrum-css/button": "^4.1.4"
58
57
  },
59
58
  "types": "./src/index.d.ts",
60
59
  "customElements": "custom-elements.json",
61
60
  "sideEffects": [
62
61
  "./sp-*.js"
63
62
  ],
64
- "gitHead": "5d9e2a2ca93deff51e4b2c7b8354f1127009a4e3"
63
+ "gitHead": "279380c6d72c0819fe224b405844af9ddcb87f8a"
65
64
  }
package/src/Button.d.ts CHANGED
@@ -1,10 +1,6 @@
1
- import { CSSResultArray, PropertyValues } from '@spectrum-web-components/base';
1
+ import { CSSResultArray } from '@spectrum-web-components/base';
2
2
  import { StyledButton } from './StyledButton.js';
3
- export declare type DeprecatedButtonVariants = 'cta' | 'overBackground';
4
- export declare type ButtonStatics = 'white' | 'black';
5
- export declare type ButtonVariants = 'accent' | 'primary' | 'secondary' | 'negative' | ButtonStatics | DeprecatedButtonVariants;
6
- export declare const VALID_VARIANTS: string[];
7
- export declare type ButtonTreatments = 'fill' | 'outline';
3
+ export declare type ButtonVariants = 'cta' | 'overBackground' | 'primary' | 'secondary' | 'negative';
8
4
  declare const Button_base: typeof StyledButton & {
9
5
  new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
10
6
  prototype: import("@spectrum-web-components/base").SizedElementInterface;
@@ -20,17 +16,14 @@ export declare class Button extends Button_base {
20
16
  /**
21
17
  * The visual variant to apply to this button.
22
18
  */
23
- get variant(): ButtonVariants;
24
- set variant(variant: ButtonVariants);
25
- private _variant;
19
+ variant: ButtonVariants;
26
20
  /**
27
- * The visual variant to apply to this button.
21
+ * There is a warning in place for this control
28
22
  */
29
- treatment: ButtonTreatments;
23
+ warning: boolean;
30
24
  /**
31
25
  * Style this button to be less obvious
32
26
  */
33
- set quiet(quiet: boolean);
34
- protected firstUpdated(changes: PropertyValues<this>): void;
27
+ quiet: boolean;
35
28
  }
36
29
  export {};
package/src/Button.js CHANGED
@@ -10,18 +10,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
10
10
  governing permissions and limitations under the License.
11
11
  */
12
12
  import { __decorate } from "tslib";
13
- import { SizedMixin, } from '@spectrum-web-components/base';
13
+ import { SizedMixin } from '@spectrum-web-components/base';
14
14
  import { property } from '@spectrum-web-components/base/src/decorators.js';
15
15
  import { StyledButton } from './StyledButton.js';
16
16
  import buttonStyles from './button.css.js';
17
- export const VALID_VARIANTS = [
18
- 'accent',
19
- 'primary',
20
- 'secondary',
21
- 'negative',
22
- 'white',
23
- 'black',
24
- ];
25
17
  /**
26
18
  * @element sp-button
27
19
  *
@@ -31,64 +23,30 @@ export const VALID_VARIANTS = [
31
23
  export class Button extends SizedMixin(StyledButton) {
32
24
  constructor() {
33
25
  super(...arguments);
34
- this._variant = 'accent';
35
26
  /**
36
27
  * The visual variant to apply to this button.
37
28
  */
38
- this.treatment = 'fill';
29
+ this.variant = 'cta';
30
+ /**
31
+ * There is a warning in place for this control
32
+ */
33
+ this.warning = false;
34
+ /**
35
+ * Style this button to be less obvious
36
+ */
37
+ this.quiet = false;
39
38
  }
40
39
  static get styles() {
41
40
  return [...super.styles, buttonStyles];
42
41
  }
43
- /**
44
- * The visual variant to apply to this button.
45
- */
46
- get variant() {
47
- return this._variant;
48
- }
49
- set variant(variant) {
50
- if (variant === this.variant)
51
- return;
52
- this.requestUpdate('variant', this.variant);
53
- switch (variant) {
54
- case 'cta':
55
- this._variant = 'accent';
56
- break;
57
- case 'overBackground':
58
- this._variant = 'white';
59
- this.treatment = 'outline';
60
- break;
61
- default:
62
- if (!VALID_VARIANTS.includes(variant)) {
63
- this._variant = 'accent';
64
- }
65
- else {
66
- this._variant = variant;
67
- }
68
- break;
69
- }
70
- this.setAttribute('variant', this.variant);
71
- }
72
- /**
73
- * Style this button to be less obvious
74
- */
75
- set quiet(quiet) {
76
- this.treatment = quiet ? 'outline' : 'fill';
77
- }
78
- firstUpdated(changes) {
79
- super.firstUpdated(changes);
80
- if (!this.hasAttribute('variant')) {
81
- this.setAttribute('variant', this.variant);
82
- }
83
- }
84
42
  }
85
43
  __decorate([
86
44
  property({ reflect: true })
87
- ], Button.prototype, "variant", null);
45
+ ], Button.prototype, "variant", void 0);
88
46
  __decorate([
89
- property({ reflect: true })
90
- ], Button.prototype, "treatment", void 0);
47
+ property({ type: Boolean, reflect: true })
48
+ ], Button.prototype, "warning", void 0);
91
49
  __decorate([
92
- property({ type: Boolean })
93
- ], Button.prototype, "quiet", null);
50
+ property({ type: Boolean, reflect: true })
51
+ ], Button.prototype, "quiet", void 0);
94
52
  //# sourceMappingURL=Button.js.map
package/src/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAGH,UAAU,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAW3C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,OAAO;IACP,OAAO;CACV,CAAC;AAIF;;;;;GAKG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU,CAAC,YAAY,CAAC;IAApD;;QAkCY,aAAQ,GAAmB,QAAQ,CAAC;QAE5C;;WAEG;QAEI,cAAS,GAAqB,MAAM,CAAC;IAgBhD,CAAC;IAvDU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IAEH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IACD,IAAW,OAAO,CAAC,OAAuB;QACtC,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO;YAAE,OAAO;QAErC,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,QAAQ,OAAO,EAAE;YACb,KAAK,KAAK;gBACN,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACzB,MAAM;YACV,KAAK,gBAAgB;gBACjB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;gBACxB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;gBAC3B,MAAM;YACV;gBACI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;oBACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;iBAC5B;qBAAM;oBACH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;iBAC3B;gBACD,MAAM;SACb;QACD,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IASD;;OAEG;IAEH,IAAW,KAAK,CAAC,KAAc;QAC3B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAChD,CAAC;IAES,YAAY,CAAC,OAA6B;QAChD,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;YAC/B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SAC9C;IACL,CAAC;CACJ;AA/CG;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAG3B;AA6BD;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACgB;AAM5C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mCAG3B","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 PropertyValues,\n SizedMixin,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from './button.css.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStatics = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStatics\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\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(StyledButton) {\n public static get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\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 break;\n case 'overBackground':\n this._variant = 'white';\n this.treatment = 'outline';\n break;\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 visual variant 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 protected firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAAkB,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAS3C;;;;;GAKG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU,CAAC,YAAY,CAAC;IAApD;;QAKI;;WAEG;QAEI,YAAO,GAAmB,KAAK,CAAC;QAEvC;;WAEG;QAEI,YAAO,GAAG,KAAK,CAAC;QAEvB;;WAEG;QAEI,UAAK,GAAG,KAAK,CAAC;IACzB,CAAC;IArBU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,CAAC;CAmBJ;AAbG;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACW;AAMvC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACpB;AAMvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCACtB","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 { CSSResultArray, SizedMixin } from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from './button.css.js';\n\nexport type ButtonVariants =\n | 'cta'\n | 'overBackground'\n | 'primary'\n | 'secondary'\n | 'negative';\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(StyledButton) {\n public static get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public variant: ButtonVariants = 'cta';\n\n /**\n * There is a warning in place for this control\n */\n @property({ type: Boolean, reflect: true })\n public warning = false;\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n}\n"]}
@@ -13,7 +13,7 @@ import { __decorate } from "tslib";
13
13
  import { html, SizedMixin, } from '@spectrum-web-components/base';
14
14
  import { property } from '@spectrum-web-components/base/src/decorators.js';
15
15
  import { StyledButton } from './StyledButton.js';
16
- import buttonStyles from '@spectrum-web-components/clear-button/src/clear-button.css.js';
16
+ import buttonStyles from './clear-button.css.js';
17
17
  import '@spectrum-web-components/icons-ui/icons/sp-icon-cross75.js';
18
18
  import crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';
19
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ClearButton.js","sourceRoot":"","sources":["ClearButton.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EACJ,UAAU,GAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,YAAY,MAAM,+DAA+D,CAAC;AACzF,OAAO,4DAA4D,CAAC;AACpE,OAAO,iBAAiB,MAAM,8DAA8D,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU,CAAC,YAAY,CAAC;IAAzD;;QAKI;;WAEG;QAEI,YAAO,GAA0B,EAAE,CAAC;IAkB/C,CAAC;IA1BU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAQD,IAAc,aAAa;QACvB,OAAO;YACH,IAAI,CAAA;;;;;aAKH;SACJ,CAAC;IACN,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;gCACa,KAAK,CAAC,MAAM,EAAE;SACrC,CAAC;IACN,CAAC;CACJ;AAlBG;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACe","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 crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\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 public static 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 get buttonContent(): TemplateResult[] {\n return [\n html`\n <sp-icon-cross75\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross75\"\n ></sp-icon-cross75>\n `,\n ];\n }\n\n protected render(): TemplateResult {\n return html`\n <div class=\"fill\">${super.render()}</div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"ClearButton.js","sourceRoot":"","sources":["ClearButton.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EACJ,UAAU,GAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,4DAA4D,CAAC;AACpE,OAAO,iBAAiB,MAAM,8DAA8D,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU,CAAC,YAAY,CAAC;IAAzD;;QAKI;;WAEG;QAEI,YAAO,GAA0B,EAAE,CAAC;IAkB/C,CAAC;IA1BU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAQD,IAAc,aAAa;QACvB,OAAO;YACH,IAAI,CAAA;;;;;aAKH;SACJ,CAAC;IACN,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;gCACa,KAAK,CAAC,MAAM,EAAE;SACrC,CAAC;IACN,CAAC;CACJ;AAlBG;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACe","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 './clear-button.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-cross75.js';\nimport crossMediumStyles from '@spectrum-web-components/icon/src/spectrum-icon-cross.css.js';\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 public static 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 get buttonContent(): TemplateResult[] {\n return [\n html`\n <sp-icon-cross75\n slot=\"icon\"\n class=\"icon spectrum-UIIcon-Cross75\"\n ></sp-icon-cross75>\n `,\n ];\n }\n\n protected render(): TemplateResult {\n return html`\n <div class=\"fill\">${super.render()}</div>\n `;\n }\n}\n"]}
@@ -11,7 +11,7 @@ governing permissions and limitations under the License.
11
11
  */
12
12
  import { css } from '@spectrum-web-components/base';
13
13
  const styles = css `
14
- :host{display:inline-flex;vertical-align:top}:host([dir]){-webkit-appearance:none}:host([disabled]){cursor:auto;pointer-events:none}#button{bottom:0;left:0;position:absolute;right:0;top:0}:host:after{pointer-events:none}slot[name=icon]::slotted(img),slot[name=icon]::slotted(svg){fill:currentColor;stroke:currentColor;height:var(
14
+ :host{display:inline-flex;vertical-align:top}:host([dir]){-webkit-appearance:none}:host([disabled]){cursor:auto;pointer-events:none}#button{inset:0;position:absolute}:host:after{pointer-events:none}slot[name=icon]::slotted(img),slot[name=icon]::slotted(svg){fill:currentColor;stroke:currentColor;height:var(
15
15
  --spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)
16
16
  );width:var(
17
17
  --spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)
@@ -1 +1 @@
1
- {"version":3,"file":"button-base.css.js","sourceRoot":"","sources":["button-base.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;CAMjB,CAAC;AACF,eAAe,MAAM,CAAC","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*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:inline-flex;vertical-align:top}:host([dir]){-webkit-appearance:none}:host([disabled]){cursor:auto;pointer-events:none}#button{bottom:0;left:0;position:absolute;right:0;top:0}:host:after{pointer-events:none}slot[name=icon]::slotted(img),slot[name=icon]::slotted(svg){fill:currentColor;stroke:currentColor;height:var(\n--spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)\n);width:var(\n--spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)\n)}\n`;\nexport default styles;"]}
1
+ {"version":3,"file":"button-base.css.js","sourceRoot":"","sources":["button-base.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;CAMjB,CAAC;AACF,eAAe,MAAM,CAAC","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*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{display:inline-flex;vertical-align:top}:host([dir]){-webkit-appearance:none}:host([disabled]){cursor:auto;pointer-events:none}#button{inset:0;position:absolute}:host:after{pointer-events:none}slot[name=icon]::slotted(img),slot[name=icon]::slotted(svg){fill:currentColor;stroke:currentColor;height:var(\n--spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)\n);width:var(\n--spectrum-alias-workflow-icon-size-m,var(--spectrum-global-dimension-size-225)\n)}\n`;\nexport default styles;"]}