@spectrum-web-components/button 1.3.0-beta.6 → 1.3.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.
Files changed (161) hide show
  1. package/README.md +137 -51
  2. package/package.json +10 -11
  3. package/LICENSE +0 -201
  4. package/stories/button-accent-fill-pending.stories.js +0 -34
  5. package/stories/button-accent-fill-pending.stories.js.map +0 -7
  6. package/stories/button-accent-fill-sizes.stories.js +0 -32
  7. package/stories/button-accent-fill-sizes.stories.js.map +0 -7
  8. package/stories/button-accent-fill.stories.js +0 -33
  9. package/stories/button-accent-fill.stories.js.map +0 -7
  10. package/stories/button-accent-outline-pending.stories.js +0 -34
  11. package/stories/button-accent-outline-pending.stories.js.map +0 -7
  12. package/stories/button-accent-outline-sizes.stories.js +0 -32
  13. package/stories/button-accent-outline-sizes.stories.js.map +0 -7
  14. package/stories/button-accent-outline.stories.js +0 -33
  15. package/stories/button-accent-outline.stories.js.map +0 -7
  16. package/stories/button-black-fill-pending.stories.js +0 -34
  17. package/stories/button-black-fill-pending.stories.js.map +0 -7
  18. package/stories/button-black-fill-sizes.stories.js +0 -33
  19. package/stories/button-black-fill-sizes.stories.js.map +0 -7
  20. package/stories/button-black-fill.stories.js +0 -35
  21. package/stories/button-black-fill.stories.js.map +0 -7
  22. package/stories/button-black-outline-pending.stories.js +0 -34
  23. package/stories/button-black-outline-pending.stories.js.map +0 -7
  24. package/stories/button-black-outline-sizes.stories.js +0 -33
  25. package/stories/button-black-outline-sizes.stories.js.map +0 -7
  26. package/stories/button-black-outline.stories.js +0 -35
  27. package/stories/button-black-outline.stories.js.map +0 -7
  28. package/stories/button-negative-fill-pending.stories.js +0 -34
  29. package/stories/button-negative-fill-pending.stories.js.map +0 -7
  30. package/stories/button-negative-fill-sizes.stories.js +0 -32
  31. package/stories/button-negative-fill-sizes.stories.js.map +0 -7
  32. package/stories/button-negative-fill.stories.js +0 -33
  33. package/stories/button-negative-fill.stories.js.map +0 -7
  34. package/stories/button-negative-outline-pending.stories.js +0 -34
  35. package/stories/button-negative-outline-pending.stories.js.map +0 -7
  36. package/stories/button-negative-outline-sizes.stories.js +0 -32
  37. package/stories/button-negative-outline-sizes.stories.js.map +0 -7
  38. package/stories/button-negative-outline.stories.js +0 -33
  39. package/stories/button-negative-outline.stories.js.map +0 -7
  40. package/stories/button-primary-fill-pending.stories.js +0 -34
  41. package/stories/button-primary-fill-pending.stories.js.map +0 -7
  42. package/stories/button-primary-fill-sizes.stories.js +0 -32
  43. package/stories/button-primary-fill-sizes.stories.js.map +0 -7
  44. package/stories/button-primary-fill.stories.js +0 -46
  45. package/stories/button-primary-fill.stories.js.map +0 -7
  46. package/stories/button-primary-outline-pending.stories.js +0 -34
  47. package/stories/button-primary-outline-pending.stories.js.map +0 -7
  48. package/stories/button-primary-outline-sizes.stories.js +0 -32
  49. package/stories/button-primary-outline-sizes.stories.js.map +0 -7
  50. package/stories/button-primary-outline.stories.js +0 -33
  51. package/stories/button-primary-outline.stories.js.map +0 -7
  52. package/stories/button-secondary-fill-pending.stories.js +0 -34
  53. package/stories/button-secondary-fill-pending.stories.js.map +0 -7
  54. package/stories/button-secondary-fill-sizes.stories.js +0 -32
  55. package/stories/button-secondary-fill-sizes.stories.js.map +0 -7
  56. package/stories/button-secondary-fill.stories.js +0 -33
  57. package/stories/button-secondary-fill.stories.js.map +0 -7
  58. package/stories/button-secondary-outline-pending.stories.js +0 -34
  59. package/stories/button-secondary-outline-pending.stories.js.map +0 -7
  60. package/stories/button-secondary-outline-sizes.stories.js +0 -32
  61. package/stories/button-secondary-outline-sizes.stories.js.map +0 -7
  62. package/stories/button-secondary-outline.stories.js +0 -33
  63. package/stories/button-secondary-outline.stories.js.map +0 -7
  64. package/stories/button-white-fill-pending.stories.js +0 -34
  65. package/stories/button-white-fill-pending.stories.js.map +0 -7
  66. package/stories/button-white-fill-sizes.stories.js +0 -33
  67. package/stories/button-white-fill-sizes.stories.js.map +0 -7
  68. package/stories/button-white-fill.stories.js +0 -35
  69. package/stories/button-white-fill.stories.js.map +0 -7
  70. package/stories/button-white-outline-pending.stories.js +0 -34
  71. package/stories/button-white-outline-pending.stories.js.map +0 -7
  72. package/stories/button-white-outline-sizes.stories.js +0 -33
  73. package/stories/button-white-outline-sizes.stories.js.map +0 -7
  74. package/stories/button-white-outline.stories.js +0 -35
  75. package/stories/button-white-outline.stories.js.map +0 -7
  76. package/stories/index.js +0 -196
  77. package/stories/index.js.map +0 -7
  78. package/stories/template.js +0 -21
  79. package/stories/template.js.map +0 -7
  80. package/test/benchmark/test-basic.js +0 -14
  81. package/test/benchmark/test-basic.js.map +0 -7
  82. package/test/button-accent-fill-pending.test-vrt.js +0 -5
  83. package/test/button-accent-fill-pending.test-vrt.js.map +0 -7
  84. package/test/button-accent-fill-sizes.test-vrt.js +0 -5
  85. package/test/button-accent-fill-sizes.test-vrt.js.map +0 -7
  86. package/test/button-accent-fill.test-vrt.js +0 -5
  87. package/test/button-accent-fill.test-vrt.js.map +0 -7
  88. package/test/button-accent-outline-pending.test-vrt.js +0 -5
  89. package/test/button-accent-outline-pending.test-vrt.js.map +0 -7
  90. package/test/button-accent-outline-sizes.test-vrt.js +0 -5
  91. package/test/button-accent-outline-sizes.test-vrt.js.map +0 -7
  92. package/test/button-accent-outline.test-vrt.js +0 -5
  93. package/test/button-accent-outline.test-vrt.js.map +0 -7
  94. package/test/button-black-fill-pending.test-vrt.js +0 -5
  95. package/test/button-black-fill-pending.test-vrt.js.map +0 -7
  96. package/test/button-black-fill-sizes.test-vrt.js +0 -5
  97. package/test/button-black-fill-sizes.test-vrt.js.map +0 -7
  98. package/test/button-black-fill.test-vrt.js +0 -5
  99. package/test/button-black-fill.test-vrt.js.map +0 -7
  100. package/test/button-black-outline-pending.test-vrt.js +0 -5
  101. package/test/button-black-outline-pending.test-vrt.js.map +0 -7
  102. package/test/button-black-outline-sizes.test-vrt.js +0 -5
  103. package/test/button-black-outline-sizes.test-vrt.js.map +0 -7
  104. package/test/button-black-outline.test-vrt.js +0 -5
  105. package/test/button-black-outline.test-vrt.js.map +0 -7
  106. package/test/button-memory.test.js +0 -5
  107. package/test/button-memory.test.js.map +0 -7
  108. package/test/button-negative-fill-pending.test-vrt.js +0 -5
  109. package/test/button-negative-fill-pending.test-vrt.js.map +0 -7
  110. package/test/button-negative-fill-sizes.test-vrt.js +0 -5
  111. package/test/button-negative-fill-sizes.test-vrt.js.map +0 -7
  112. package/test/button-negative-fill.test-vrt.js +0 -5
  113. package/test/button-negative-fill.test-vrt.js.map +0 -7
  114. package/test/button-negative-outline-pending.test-vrt.js +0 -5
  115. package/test/button-negative-outline-pending.test-vrt.js.map +0 -7
  116. package/test/button-negative-outline-sizes.test-vrt.js +0 -5
  117. package/test/button-negative-outline-sizes.test-vrt.js.map +0 -7
  118. package/test/button-negative-outline.test-vrt.js +0 -5
  119. package/test/button-negative-outline.test-vrt.js.map +0 -7
  120. package/test/button-primary-fill-pending.test-vrt.js +0 -5
  121. package/test/button-primary-fill-pending.test-vrt.js.map +0 -7
  122. package/test/button-primary-fill-sizes.test-vrt.js +0 -5
  123. package/test/button-primary-fill-sizes.test-vrt.js.map +0 -7
  124. package/test/button-primary-fill.test-vrt.js +0 -5
  125. package/test/button-primary-fill.test-vrt.js.map +0 -7
  126. package/test/button-primary-outline-pending.test-vrt.js +0 -5
  127. package/test/button-primary-outline-pending.test-vrt.js.map +0 -7
  128. package/test/button-primary-outline-sizes.test-vrt.js +0 -5
  129. package/test/button-primary-outline-sizes.test-vrt.js.map +0 -7
  130. package/test/button-primary-outline.test-vrt.js +0 -5
  131. package/test/button-primary-outline.test-vrt.js.map +0 -7
  132. package/test/button-secondary-fill-pending.test-vrt.js +0 -5
  133. package/test/button-secondary-fill-pending.test-vrt.js.map +0 -7
  134. package/test/button-secondary-fill-sizes.test-vrt.js +0 -5
  135. package/test/button-secondary-fill-sizes.test-vrt.js.map +0 -7
  136. package/test/button-secondary-fill.test-vrt.js +0 -5
  137. package/test/button-secondary-fill.test-vrt.js.map +0 -7
  138. package/test/button-secondary-outline-pending.test-vrt.js +0 -5
  139. package/test/button-secondary-outline-pending.test-vrt.js.map +0 -7
  140. package/test/button-secondary-outline-sizes.test-vrt.js +0 -5
  141. package/test/button-secondary-outline-sizes.test-vrt.js.map +0 -7
  142. package/test/button-secondary-outline.test-vrt.js +0 -5
  143. package/test/button-secondary-outline.test-vrt.js.map +0 -7
  144. package/test/button-white-fill-pending.test-vrt.js +0 -5
  145. package/test/button-white-fill-pending.test-vrt.js.map +0 -7
  146. package/test/button-white-fill-sizes.test-vrt.js +0 -5
  147. package/test/button-white-fill-sizes.test-vrt.js.map +0 -7
  148. package/test/button-white-fill.test-vrt.js +0 -5
  149. package/test/button-white-fill.test-vrt.js.map +0 -7
  150. package/test/button-white-outline-pending.test-vrt.js +0 -5
  151. package/test/button-white-outline-pending.test-vrt.js.map +0 -7
  152. package/test/button-white-outline-sizes.test-vrt.js +0 -5
  153. package/test/button-white-outline-sizes.test-vrt.js.map +0 -7
  154. package/test/button-white-outline.test-vrt.js +0 -5
  155. package/test/button-white-outline.test-vrt.js.map +0 -7
  156. package/test/button.test.js +0 -659
  157. package/test/button.test.js.map +0 -7
  158. package/test/clear-button.test.js +0 -27
  159. package/test/clear-button.test.js.map +0 -7
  160. package/test/close-button.test.js +0 -27
  161. package/test/close-button.test.js.map +0 -7
@@ -1,34 +0,0 @@
1
- "use strict";
2
- import { renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "white";
5
- const treatment = "fill";
6
- const pending = true;
7
- export default {
8
- component: "sp-button",
9
- title: "Button/White/Fill/Pending",
10
- args: {
11
- ...args,
12
- variant,
13
- treatment,
14
- pending
15
- },
16
- argTypes
17
- };
18
- export const s = (args2) => renderButtonSet(args2);
19
- s.args = {
20
- size: "s"
21
- };
22
- export const m = (args2) => renderButtonSet(args2);
23
- m.args = {
24
- size: "m"
25
- };
26
- export const l = (args2) => renderButtonSet(args2);
27
- l.args = {
28
- size: "l"
29
- };
30
- export const XL = (args2) => renderButtonSet(args2);
31
- XL.args = {
32
- size: "xl"
33
- };
34
- //# sourceMappingURL=button-white-fill-pending.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-fill-pending.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'fill';\nconst pending = true;\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Fill/Pending',\n args: {\n ...args,\n variant,\n treatment,\n pending,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAqB,uBAAuB;AAC5C,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAClB,MAAM,UAAU;AAEhB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- import { makeOverBackground, renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "white";
5
- const treatment = "fill";
6
- export default {
7
- component: "sp-button",
8
- title: "Button/White/Fill/Sizes",
9
- decorators: [makeOverBackground()],
10
- args: {
11
- ...args,
12
- variant,
13
- treatment
14
- },
15
- argTypes
16
- };
17
- export const s = (args2) => renderButtonSet(args2);
18
- s.args = {
19
- size: "s"
20
- };
21
- export const m = (args2) => renderButtonSet(args2);
22
- m.args = {
23
- size: "m"
24
- };
25
- export const l = (args2) => renderButtonSet(args2);
26
- l.args = {
27
- size: "l"
28
- };
29
- export const XL = (args2) => renderButtonSet(args2);
30
- XL.args = {
31
- size: "xl"
32
- };
33
- //# sourceMappingURL=button-white-fill-sizes.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-fill-sizes.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { makeOverBackground, Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'fill';\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Fill/Sizes',\n decorators: [makeOverBackground()],\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAS,oBAAgC,uBAAuB;AAChE,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY,CAAC,mBAAmB,CAAC;AAAA,EACjC,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
- import {
3
- makeOverBackground,
4
- renderButtonSet,
5
- renderLink,
6
- renderLinkWithTarget,
7
- renderMinWidthButton,
8
- renderWithIcon,
9
- renderWithIconOnly
10
- } from "./index.js";
11
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
12
- import { args, argTypes } from "./index.js";
13
- const variant = "white";
14
- const treatment = "fill";
15
- export default {
16
- component: "sp-button",
17
- title: "Button/White/Fill",
18
- decorators: [makeOverBackground()],
19
- args: {
20
- ...args,
21
- variant,
22
- treatment
23
- },
24
- argTypes
25
- };
26
- export const Default = (props) => renderButtonSet(props);
27
- export const withIcon = (props) => renderWithIcon(props);
28
- export const withIconOnly = (props) => renderWithIconOnly(props);
29
- export const minWidthButton = (props) => renderMinWidthButton(props);
30
- minWidthButton.storyName = "min-width";
31
- export const link = (props) => renderLink(props);
32
- link.storyName = "href";
33
- export const linkWithTarget = (props) => renderLinkWithTarget(props);
34
- linkWithTarget.storyName = 'href with target="_blank"';
35
- //# sourceMappingURL=button-white-fill.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-fill.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport {\n makeOverBackground,\n renderButtonSet,\n renderLink,\n renderLinkWithTarget,\n renderMinWidthButton,\n renderWithIcon,\n renderWithIconOnly,\n} from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\nimport type { Properties } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'fill';\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Fill',\n decorators: [makeOverBackground()],\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const withIcon = (props: Properties): TemplateResult =>\n renderWithIcon(props);\n\nexport const withIconOnly = (props: Properties): TemplateResult =>\n renderWithIconOnly(props);\n\nexport const minWidthButton = (props: Properties): TemplateResult =>\n renderMinWidthButton(props);\n\nminWidthButton.storyName = 'min-width';\n\nexport const link = (props: Properties): TemplateResult => renderLink(props);\n\nlink.storyName = 'href';\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderLinkWithTarget(props);\n\nlinkWithTarget.storyName = 'href with target=\"_blank\"';\n"],
5
- "mappings": ";AAYA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,OAAO;AAEP,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY,CAAC,mBAAmB,CAAC;AAAA,EACjC,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,UAAU,CAAC,UACpB,gBAAgB,KAAK;AAElB,aAAM,WAAW,CAAC,UACrB,eAAe,KAAK;AAEjB,aAAM,eAAe,CAAC,UACzB,mBAAmB,KAAK;AAErB,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;AAEpB,aAAM,OAAO,CAAC,UAAsC,WAAW,KAAK;AAE3E,KAAK,YAAY;AAEV,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;",
6
- "names": []
7
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- import { renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "white";
5
- const treatment = "outline";
6
- const pending = true;
7
- export default {
8
- component: "sp-button",
9
- title: "Button/White/Outline/Pending",
10
- args: {
11
- ...args,
12
- variant,
13
- treatment,
14
- pending
15
- },
16
- argTypes
17
- };
18
- export const s = (args2) => renderButtonSet(args2);
19
- s.args = {
20
- size: "s"
21
- };
22
- export const m = (args2) => renderButtonSet(args2);
23
- m.args = {
24
- size: "m"
25
- };
26
- export const l = (args2) => renderButtonSet(args2);
27
- l.args = {
28
- size: "l"
29
- };
30
- export const XL = (args2) => renderButtonSet(args2);
31
- XL.args = {
32
- size: "xl"
33
- };
34
- //# sourceMappingURL=button-white-outline-pending.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-outline-pending.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'outline';\nconst pending = true;\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Outline/Pending',\n args: {\n ...args,\n variant,\n treatment,\n pending,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAqB,uBAAuB;AAC5C,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAClB,MAAM,UAAU;AAEhB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- import { makeOverBackground, renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "white";
5
- const treatment = "outline";
6
- export default {
7
- component: "sp-button",
8
- title: "Button/White/Outline/Sizes",
9
- decorators: [makeOverBackground()],
10
- args: {
11
- ...args,
12
- variant,
13
- treatment
14
- },
15
- argTypes
16
- };
17
- export const s = (args2) => renderButtonSet(args2);
18
- s.args = {
19
- size: "s"
20
- };
21
- export const m = (args2) => renderButtonSet(args2);
22
- m.args = {
23
- size: "m"
24
- };
25
- export const l = (args2) => renderButtonSet(args2);
26
- l.args = {
27
- size: "l"
28
- };
29
- export const XL = (args2) => renderButtonSet(args2);
30
- XL.args = {
31
- size: "xl"
32
- };
33
- //# sourceMappingURL=button-white-outline-sizes.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-outline-sizes.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport { makeOverBackground, Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'outline';\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Outline/Sizes',\n decorators: [makeOverBackground()],\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAS,oBAAgC,uBAAuB;AAChE,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY,CAAC,mBAAmB,CAAC;AAAA,EACjC,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
- import {
3
- makeOverBackground,
4
- renderButtonSet,
5
- renderLink,
6
- renderLinkWithTarget,
7
- renderMinWidthButton,
8
- renderWithIcon,
9
- renderWithIconOnly
10
- } from "./index.js";
11
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
12
- import { args, argTypes } from "./index.js";
13
- const variant = "white";
14
- const treatment = "outline";
15
- export default {
16
- component: "sp-button",
17
- title: "Button/White/Outline",
18
- decorators: [makeOverBackground()],
19
- args: {
20
- ...args,
21
- variant,
22
- treatment
23
- },
24
- argTypes
25
- };
26
- export const Default = (props) => renderButtonSet(props);
27
- export const withIcon = (props) => renderWithIcon(props);
28
- export const withIconOnly = (props) => renderWithIconOnly(props);
29
- export const minWidthButton = (props) => renderMinWidthButton(props);
30
- minWidthButton.storyName = "min-width";
31
- export const link = (props) => renderLink(props);
32
- link.storyName = "href";
33
- export const linkWithTarget = (props) => renderLinkWithTarget(props);
34
- linkWithTarget.storyName = 'href with target="_blank"';
35
- //# sourceMappingURL=button-white-outline.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-white-outline.stories.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*/\nimport { TemplateResult } from '@spectrum-web-components/base';\nimport {\n makeOverBackground,\n renderButtonSet,\n renderLink,\n renderLinkWithTarget,\n renderMinWidthButton,\n renderWithIcon,\n renderWithIconOnly,\n} from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\nimport type { Properties } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'white';\nconst treatment = 'outline';\n\nexport default {\n component: 'sp-button',\n title: 'Button/White/Outline',\n decorators: [makeOverBackground()],\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const withIcon = (props: Properties): TemplateResult =>\n renderWithIcon(props);\n\nexport const withIconOnly = (props: Properties): TemplateResult =>\n renderWithIconOnly(props);\n\nexport const minWidthButton = (props: Properties): TemplateResult =>\n renderMinWidthButton(props);\n\nminWidthButton.storyName = 'min-width';\n\nexport const link = (props: Properties): TemplateResult => renderLink(props);\n\nlink.storyName = 'href';\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderLinkWithTarget(props);\n\nlinkWithTarget.storyName = 'href with target=\"_blank\"';\n"],
5
- "mappings": ";AAYA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,OAAO;AAEP,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY,CAAC,mBAAmB,CAAC;AAAA,EACjC,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,UAAU,CAAC,UACpB,gBAAgB,KAAK;AAElB,aAAM,WAAW,CAAC,UACrB,eAAe,KAAK;AAEjB,aAAM,eAAe,CAAC,UACzB,mBAAmB,KAAK;AAErB,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;AAEpB,aAAM,OAAO,CAAC,UAAsC,WAAW,KAAK;AAE3E,KAAK,YAAY;AAEV,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;",
6
- "names": []
7
- }
package/stories/index.js DELETED
@@ -1,196 +0,0 @@
1
- "use strict";
2
- import { html } from "@spectrum-web-components/base";
3
- import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
4
- import "@spectrum-web-components/button/sp-button.js";
5
- import "@spectrum-web-components/icon/sp-icon.js";
6
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
7
- export const args = {
8
- disabled: false,
9
- variant: "cta",
10
- pending: false
11
- };
12
- export const argTypes = {
13
- disabled: {
14
- name: "disabled",
15
- type: { name: "boolean", required: false },
16
- description: "Disable this control. It will not receive focus or events.",
17
- table: {
18
- type: { summary: "boolean" },
19
- defaultValue: { summary: false }
20
- },
21
- control: {
22
- type: "boolean"
23
- }
24
- },
25
- variant: {
26
- name: "variant",
27
- type: { name: "string", required: false },
28
- description: "The visual variant to apply to the button.",
29
- table: {
30
- type: { summary: "string" },
31
- defaultValue: { summary: "cta" }
32
- },
33
- control: {
34
- type: "inline-radio",
35
- options: [
36
- "cta",
37
- "accent",
38
- "primary",
39
- "secondary",
40
- "negative",
41
- "overBackground",
42
- "black",
43
- "white"
44
- ]
45
- }
46
- },
47
- treatment: {
48
- name: "treatment",
49
- type: { name: "string", required: false },
50
- description: "The visual treatment to apply to the button.",
51
- table: {
52
- type: { summary: "string" },
53
- defaultValue: { summary: "fill" }
54
- },
55
- control: {
56
- type: "inline-radio",
57
- options: ["fill", "outline"]
58
- }
59
- },
60
- pending: {
61
- name: "pending",
62
- type: { name: "boolean", required: false },
63
- description: "Shows the pending state of the button.",
64
- table: {
65
- type: { summary: "boolean" },
66
- defaultValue: { summary: false }
67
- },
68
- control: {
69
- type: "boolean"
70
- }
71
- }
72
- };
73
- export const makeOverBackground = (variant) => (story) => {
74
- const color = variant === "black" ? "rgb(181, 209, 211)" : "var(--spectrum-seafoam-900)";
75
- return html`
76
- <div
77
- style="
78
- background-color: ${color};
79
- padding: calc(var(--swc-scale-factor) * 14px) calc(var(--swc-scale-factor) * 20px);
80
- display: inline-block;
81
- "
82
- >
83
- ${story()}
84
- </div>
85
- `;
86
- };
87
- export function renderButton(properties) {
88
- return html`
89
- <sp-button
90
- ?disabled=${!!properties.disabled}
91
- href=${ifDefined(properties.href)}
92
- ?icon-only=${properties.iconOnly}
93
- ?pending=${!!properties.pending}
94
- ?quiet="${!!properties.quiet}"
95
- ?no-wrap="${!!properties.noWrap}"
96
- size=${properties.size}
97
- target=${ifDefined(properties.target)}
98
- treatment=${ifDefined(properties.treatment)}
99
- variant=${ifDefined(properties.variant)}
100
- >
101
- ${properties.content || "Click Me"}
102
- </sp-button>
103
- `;
104
- }
105
- export function renderButtonSet(properties) {
106
- const disabled = Object.assign({}, properties, { disabled: true });
107
- const icon = Object.assign({}, properties, {
108
- content: html`
109
- <sp-icon-help slot="icon"></sp-icon-help>
110
- Click Me
111
- `
112
- });
113
- return html`
114
- ${renderButton(properties)} ${renderButton(disabled)}
115
- ${renderButton(icon)}
116
- `;
117
- }
118
- export function renderIconButtonSet(properties) {
119
- const disabled = Object.assign({}, properties, {
120
- iconOnly: true,
121
- disabled: true
122
- });
123
- const iconOnly = Object.assign({}, properties, {
124
- iconOnly: true,
125
- content: html`
126
- <sp-icon-help slot="icon"></sp-icon-help>
127
- `
128
- });
129
- return html`
130
- ${renderButton(iconOnly)} ${renderButton(disabled)}
131
- `;
132
- }
133
- export const bellIcon = html`
134
- <svg slot="icon" viewBox="0 0 36 36" focusable="false" aria-hidden="true">
135
- <path
136
- d="M16 36a4.407 4.407 0 0 0 4-4h-8a4.407 4.407 0 0 0 4 4zm9.143-24.615c0-3.437-3.206-4.891-7.143-5.268V3a1.079 1.079 0 0 0-1.143-1h-1.714A1.079 1.079 0 0 0 14 3v3.117c-3.937.377-7.143 1.831-7.143 5.268C6.857 26.8 2 26.111 2 28.154V30h28v-1.846C30 26 25.143 26.8 25.143 11.385z"
137
- ></path>
138
- </svg>
139
- `;
140
- export const renderWithIcon = (props) => {
141
- return html`
142
- <style>
143
- .row {
144
- padding: 10px;
145
- }
146
- </style>
147
- <div class="row">
148
- ${renderButtonSet({
149
- ...props,
150
- content: html`
151
- <sp-icon-help slot="icon"></sp-icon-help>
152
- Help
153
- `
154
- })}
155
- </div>
156
- <div class="row">
157
- ${renderButtonSet({
158
- ...props,
159
- content: html`
160
- ${bellIcon} Custom SVG
161
- `
162
- })}
163
- </div>
164
- `;
165
- };
166
- export const renderWithIconOnly = (props) => {
167
- return html`
168
- ${renderIconButtonSet({
169
- ...props,
170
- content: html`
171
- <sp-icon-help slot="icon"></sp-icon-help>
172
- `
173
- })}
174
- `;
175
- };
176
- export const renderMinWidthButton = (props) => {
177
- return html`
178
- <style>
179
- sp-button {
180
- min-width: 300px;
181
- }
182
- </style>
183
- ${renderButtonSet(props)}
184
- `;
185
- };
186
- const href = "https://github.com/adobe/spectrum-web-components";
187
- export const renderLink = (props) => renderButtonSet({
188
- ...props,
189
- href
190
- });
191
- export const renderLinkWithTarget = (props) => renderButtonSet({
192
- ...props,
193
- href,
194
- target: "_blank"
195
- });
196
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["index.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*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/button/sp-button.js';\nimport '@spectrum-web-components/icon/sp-icon.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\n\nimport type { Properties } from './template.js';\nexport type { Properties };\n\nexport const args = {\n disabled: false,\n variant: 'cta',\n pending: false,\n};\n\nexport const argTypes = {\n disabled: {\n name: 'disabled',\n type: { name: 'boolean', required: false },\n description:\n 'Disable this control. It will not receive focus or events.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n variant: {\n name: 'variant',\n type: { name: 'string', required: false },\n description: 'The visual variant to apply to the button.',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'cta' },\n },\n control: {\n type: 'inline-radio',\n options: [\n 'cta',\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'overBackground',\n 'black',\n 'white',\n ],\n },\n },\n treatment: {\n name: 'treatment',\n type: { name: 'string', required: false },\n description: 'The visual treatment to apply to the button.',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'fill' },\n },\n control: {\n type: 'inline-radio',\n options: ['fill', 'outline'],\n },\n },\n pending: {\n name: 'pending',\n type: { name: 'boolean', required: false },\n description: 'Shows the pending state of the button.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n};\n\nexport const makeOverBackground =\n (variant?: 'white' | 'black') =>\n (story: () => TemplateResult): TemplateResult => {\n const color =\n variant === 'black'\n ? 'rgb(181, 209, 211)'\n : 'var(--spectrum-seafoam-900)';\n return html`\n <div\n style=\"\n background-color: ${color};\n padding: calc(var(--swc-scale-factor) * 14px) calc(var(--swc-scale-factor) * 20px);\n display: inline-block;\n \"\n >\n ${story()}\n </div>\n `;\n };\n\nexport function renderButton(properties: Properties): TemplateResult {\n return html`\n <sp-button\n ?disabled=${!!properties.disabled}\n href=${ifDefined(properties.href)}\n ?icon-only=${properties.iconOnly}\n ?pending=${!!properties.pending}\n ?quiet=\"${!!properties.quiet}\"\n ?no-wrap=\"${!!properties.noWrap}\"\n size=${properties.size}\n target=${ifDefined(properties.target)}\n treatment=${ifDefined(properties.treatment)}\n variant=${ifDefined(properties.variant)}\n >\n ${properties.content || 'Click Me'}\n </sp-button>\n `;\n}\n\nexport function renderButtonSet(properties: Properties): TemplateResult {\n const disabled = Object.assign({}, properties, { disabled: true });\n const icon = Object.assign({}, properties, {\n content: html`\n <sp-icon-help slot=\"icon\"></sp-icon-help>\n Click Me\n `,\n });\n return html`\n ${renderButton(properties)} ${renderButton(disabled)}\n ${renderButton(icon)}\n `;\n}\n\nexport function renderIconButtonSet(properties: Properties): TemplateResult {\n const disabled = Object.assign({}, properties, {\n iconOnly: true,\n disabled: true,\n });\n const iconOnly = Object.assign({}, properties, {\n iconOnly: true,\n content: html`\n <sp-icon-help slot=\"icon\"></sp-icon-help>\n `,\n });\n return html`\n ${renderButton(iconOnly)} ${renderButton(disabled)}\n `;\n}\n\nexport const bellIcon = html`\n <svg slot=\"icon\" viewBox=\"0 0 36 36\" focusable=\"false\" aria-hidden=\"true\">\n <path\n d=\"M16 36a4.407 4.407 0 0 0 4-4h-8a4.407 4.407 0 0 0 4 4zm9.143-24.615c0-3.437-3.206-4.891-7.143-5.268V3a1.079 1.079 0 0 0-1.143-1h-1.714A1.079 1.079 0 0 0 14 3v3.117c-3.937.377-7.143 1.831-7.143 5.268C6.857 26.8 2 26.111 2 28.154V30h28v-1.846C30 26 25.143 26.8 25.143 11.385z\"\n ></path>\n </svg>\n`;\n\nexport const renderWithIcon = (props: Properties): TemplateResult => {\n return html`\n <style>\n .row {\n padding: 10px;\n }\n </style>\n <div class=\"row\">\n ${renderButtonSet({\n ...props,\n content: html`\n <sp-icon-help slot=\"icon\"></sp-icon-help>\n Help\n `,\n })}\n </div>\n <div class=\"row\">\n ${renderButtonSet({\n ...props,\n content: html`\n ${bellIcon} Custom SVG\n `,\n })}\n </div>\n `;\n};\n\nexport const renderWithIconOnly = (props: Properties): TemplateResult => {\n return html`\n ${renderIconButtonSet({\n ...props,\n content: html`\n <sp-icon-help slot=\"icon\"></sp-icon-help>\n `,\n })}\n `;\n};\n\nexport const renderMinWidthButton = (props: Properties): TemplateResult => {\n return html`\n <style>\n sp-button {\n min-width: 300px;\n }\n </style>\n ${renderButtonSet(props)}\n `;\n};\n\nconst href = 'https://github.com/adobe/spectrum-web-components';\n\nexport const renderLink = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n });\n\nexport const renderLinkWithTarget = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n target: '_blank',\n });\n"],
5
- "mappings": "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",
6
- "names": []
7
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import { html } from "@spectrum-web-components/base";
3
- import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
4
- export const Template = ({
5
- disabled,
6
- pending,
7
- size,
8
- treatment,
9
- variant
10
- }) => html`
11
- <sp-button
12
- ?disabled=${disabled}
13
- ?pending=${pending}
14
- size=${ifDefined(size)}
15
- treatment=${ifDefined(treatment)}
16
- variant=${ifDefined(variant)}
17
- >
18
- Test Button
19
- </sp-button>
20
- `;
21
- //# sourceMappingURL=template.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["template.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*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\nimport {\n ButtonTreatments,\n ButtonVariants,\n} from '@spectrum-web-components/button/src/Button.js';\n\nexport interface Properties {\n variant?: ButtonVariants;\n treatment?: ButtonTreatments;\n quiet?: boolean;\n pending?: boolean;\n content?: TemplateResult;\n disabled?: boolean;\n size?: 's' | 'm' | 'l' | 'xl';\n href?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n noWrap?: boolean;\n iconOnly?: boolean;\n}\n\nexport const Template = ({\n disabled,\n pending,\n size,\n treatment,\n variant,\n}: Properties): TemplateResult => html`\n <sp-button\n ?disabled=${disabled}\n ?pending=${pending}\n size=${ifDefined(size)}\n treatment=${ifDefined(treatment)}\n variant=${ifDefined(variant)}\n >\n Test Button\n </sp-button>\n`;\n"],
5
- "mappings": ";AAYA,SAAS,YAA4B;AACrC,SAAS,iBAAiB;AAoBnB,aAAM,WAAW,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,MAAkC;AAAA;AAAA,oBAEd,QAAQ;AAAA,mBACT,OAAO;AAAA,eACX,UAAU,IAAI,CAAC;AAAA,oBACV,UAAU,SAAS,CAAC;AAAA,kBACtB,UAAU,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- import "@spectrum-web-components/button/sp-button.js";
3
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
4
- import { html } from "lit";
5
- import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
6
- measureFixtureCreation(html`
7
- <sp-button>Click Me</sp-button>
8
- <sp-button disabled>Click Me</sp-button>
9
- <sp-button>
10
- <sp-icon-help slot="icon"></sp-icon-help>
11
- Click Me
12
- </sp-button>
13
- `);
14
- //# sourceMappingURL=test-basic.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["test-basic.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 '@spectrum-web-components/button/sp-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-button>Click Me</sp-button>\n <sp-button disabled>Click Me</sp-button>\n <sp-button>\n <sp-icon-help slot=\"icon\"></sp-icon-help>\n Click Me\n </sp-button>\n`);\n"],
5
- "mappings": ";AAYA,OAAO;AACP,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOtB;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/button-accent-fill-pending.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ButtonAccentFillPendingStories", stories);
5
- //# sourceMappingURL=button-accent-fill-pending.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill-pending.test-vrt.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 * as stories from '../stories/button-accent-fill-pending.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentFillPendingStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,kCAAkC,OAA+B;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/button-accent-fill-sizes.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ButtonAccentFillSizesStories", stories);
5
- //# sourceMappingURL=button-accent-fill-sizes.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill-sizes.test-vrt.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 * as stories from '../stories/button-accent-fill-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentFillSizesStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,gCAAgC,OAA+B;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/button-accent-fill.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ButtonAccentFillStories", stories);
5
- //# sourceMappingURL=button-accent-fill.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill.test-vrt.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 * as stories from '../stories/button-accent-fill.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentFillStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,2BAA2B,OAA+B;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/button-accent-outline-pending.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ButtonAccentOutlinePendingStories", stories);
5
- //# sourceMappingURL=button-accent-outline-pending.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-outline-pending.test-vrt.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 * as stories from '../stories/button-accent-outline-pending.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentOutlinePendingStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,qCAAqC,OAA+B;",
6
- "names": []
7
- }