@spectrum-web-components/button 0.16.5-express.9 → 0.17.2

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 (63) hide show
  1. package/README.md +3 -2
  2. package/custom-elements.json +1 -44
  3. package/package.json +9 -9
  4. package/src/Button.js +1 -1
  5. package/src/Button.js.map +1 -1
  6. package/stories/button-accent-fill.stories.js +1 -1
  7. package/stories/button-accent-fill.stories.js.map +1 -1
  8. package/stories/button-accent-outline.stories.js +1 -1
  9. package/stories/button-accent-outline.stories.js.map +1 -1
  10. package/stories/button-black-fill.stories.js +1 -1
  11. package/stories/button-black-fill.stories.js.map +1 -1
  12. package/stories/button-black-outline.stories.js +1 -1
  13. package/stories/button-black-outline.stories.js.map +1 -1
  14. package/stories/button-negative-fill.stories.js +1 -1
  15. package/stories/button-negative-fill.stories.js.map +1 -1
  16. package/stories/button-negative-outline.stories.js +1 -1
  17. package/stories/button-negative-outline.stories.js.map +1 -1
  18. package/stories/button-primary-fill.stories.js +1 -1
  19. package/stories/button-primary-fill.stories.js.map +1 -1
  20. package/stories/button-primary-outline.stories.js +1 -1
  21. package/stories/button-primary-outline.stories.js.map +1 -1
  22. package/stories/button-secondary-fill.stories.js +1 -1
  23. package/stories/button-secondary-fill.stories.js.map +1 -1
  24. package/stories/button-secondary-outline.stories.js +1 -1
  25. package/stories/button-secondary-outline.stories.js.map +1 -1
  26. package/stories/button-white-fill.stories.js +1 -1
  27. package/stories/button-white-fill.stories.js.map +1 -1
  28. package/stories/button-white-outline.stories.js +1 -1
  29. package/stories/button-white-outline.stories.js.map +1 -1
  30. package/stories/index.js +8 -3
  31. package/stories/index.js.map +1 -1
  32. package/test/benchmark/test-basic.js +18 -0
  33. package/test/benchmark/test-basic.js.map +1 -0
  34. package/test/clear-button.test.js +27 -0
  35. package/test/clear-button.test.js.map +1 -0
  36. package/test/close-button.test.js +27 -0
  37. package/test/close-button.test.js.map +1 -0
  38. package/src/clear-button.css.d.ts +0 -2
  39. package/src/clear-button.css.js +0 -229
  40. package/src/clear-button.css.js.map +0 -1
  41. package/src/spectrum-clear-button.css.d.ts +0 -2
  42. package/src/spectrum-clear-button.css.js +0 -229
  43. package/src/spectrum-clear-button.css.js.map +0 -1
  44. package/stories/button-cta-sizes.stories.js +0 -11
  45. package/stories/button-cta-sizes.stories.js.map +0 -1
  46. package/stories/button-cta.stories.js +0 -115
  47. package/stories/button-cta.stories.js.map +0 -1
  48. package/stories/button-overBackground-sizes.stories.js +0 -12
  49. package/stories/button-overBackground-sizes.stories.js.map +0 -1
  50. package/stories/button-overBackground.stories.js +0 -132
  51. package/stories/button-overBackground.stories.js.map +0 -1
  52. package/stories/button-primary-sizes.stories.js +0 -11
  53. package/stories/button-primary-sizes.stories.js.map +0 -1
  54. package/stories/button-primary.stories.js +0 -129
  55. package/stories/button-primary.stories.js.map +0 -1
  56. package/stories/button-secondary-sizes.stories.js +0 -11
  57. package/stories/button-secondary-sizes.stories.js.map +0 -1
  58. package/stories/button-secondary.stories.js +0 -129
  59. package/stories/button-secondary.stories.js.map +0 -1
  60. package/stories/button-warning-sizes.stories.js +0 -11
  61. package/stories/button-warning-sizes.stories.js.map +0 -1
  62. package/stories/button-warning.stories.js +0 -129
  63. package/stories/button-warning.stories.js.map +0 -1
@@ -1,129 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import { bellIcon, renderButtonSet } from './index.js';
14
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';
15
- export default {
16
- component: 'sp-button',
17
- title: 'Button/Primary',
18
- args: {
19
- disabled: false,
20
- quiet: false,
21
- variant: 'primary',
22
- },
23
- argTypes: {
24
- disabled: {
25
- name: 'disabled',
26
- type: { name: 'boolean', required: false },
27
- description: 'Disable this control. It will not receive focus or events.',
28
- table: {
29
- type: { summary: 'boolean' },
30
- defaultValue: { summary: false },
31
- },
32
- control: {
33
- type: 'boolean',
34
- },
35
- },
36
- quiet: {
37
- name: 'quiet',
38
- type: { name: 'boolean', required: false },
39
- table: {
40
- type: { summary: 'boolean' },
41
- defaultValue: { summary: false },
42
- },
43
- control: {
44
- type: 'boolean',
45
- },
46
- },
47
- variant: {
48
- name: 'variant',
49
- type: { name: 'string', required: false },
50
- description: 'The visual variant to apply to the button.',
51
- table: {
52
- type: { summary: 'string' },
53
- defaultValue: { summary: 'cta' },
54
- },
55
- control: {
56
- type: 'inline-radio',
57
- options: [
58
- 'cta',
59
- 'primary',
60
- 'secondary',
61
- 'negative',
62
- 'overBackground',
63
- ],
64
- },
65
- },
66
- },
67
- };
68
- const variant = 'primary';
69
- export const Default = (props) => renderButtonSet(props);
70
- export const quiet = (props) => renderButtonSet(props);
71
- quiet.args = {
72
- quiet: true,
73
- };
74
- export const withIcon = (props) => {
75
- return html `
76
- <style>
77
- .row {
78
- padding: 10px;
79
- }
80
- </style>
81
- <div class="row">
82
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
83
- <sp-icon-help slot="icon"></sp-icon-help>
84
- Help
85
- ` }))}
86
- </div>
87
- <div class="row">
88
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
89
- ${bellIcon} Custom SVG
90
- ` }))}
91
- </div>
92
- `;
93
- };
94
- export const iconSizeOverridden = () => {
95
- return html `
96
- <sp-button label="Edit" size="xl" variant=${variant}>
97
- <sp-icon-help slot="icon" size="s">Testing</sp-icon-help>
98
- </sp-button>
99
- <h1>For testing purposes only</h1>
100
- <p>
101
- This is a test to ensure that sizing the icon will still work when
102
- it's in the scope of a parent element. You shouldn't normally do
103
- this as it deviates from the Spectrum design specification.
104
- </p>
105
- `;
106
- };
107
- export const minWidthButton = (props) => {
108
- return html `
109
- <style>
110
- sp-button {
111
- min-width: 300px;
112
- }
113
- </style>
114
- ${renderButtonSet(props)}
115
- `;
116
- };
117
- minWidthButton.story = {
118
- name: 'min-width',
119
- };
120
- const href = 'https://github.com/adobe/spectrum-web-components';
121
- export const link = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href }));
122
- link.story = {
123
- name: 'href',
124
- };
125
- export const linkWithTarget = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href, target: '_blank' }));
126
- linkWithTarget.story = {
127
- name: 'href with target="_blank"',
128
- };
129
- //# sourceMappingURL=button-primary.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-primary.stories.js","sourceRoot":"","sources":["button-primary.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,+DAA+D,CAAC;AAEvE,eAAe;IACX,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE;QACF,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,SAAS;KACrB;IACD,QAAQ,EAAE;QACN,QAAQ,EAAE;YACN,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC1C,WAAW,EACP,4DAA4D;YAChE,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;gBAC5B,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACnC;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,KAAK,EAAE;YACH,IAA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;KAET,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAmB,EAAE;IACnD,OAAO,IAAI,CAAA;oDACqC,OAAO;;;;;;;;;KAStD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE;IAChE,OAAO,IAAI,CAAA;;;;;;UAML,eAAe,CAAC,KAAK,CAAC;KAC3B,CAAC;AACN,CAAC,CAAC;AACF,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,IAAI,GAAG,kDAAkD,CAAC;AAEhE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAkB,EAAE,CACtD,eAAe,iCACR,KAAK,KACR,IAAI,IACN,CAAC;AACP,IAAI,CAAC,KAAK,GAAG;IACT,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE,CAChE,eAAe,iCACR,KAAK,KACR,IAAI,EACJ,MAAM,EAAE,QAAQ,IAClB,CAAC;AACP,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,2BAA2B;CACpC,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 { html, TemplateResult } from '@spectrum-web-components/base';\nimport { bellIcon, renderButtonSet } from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Primary',\n args: {\n disabled: false,\n quiet: false,\n variant: 'primary',\n },\n 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 quiet: {\n name: 'quiet',\n type: { name: 'boolean', required: false },\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 'primary',\n 'secondary',\n 'negative',\n 'overBackground',\n ],\n },\n },\n },\n};\n\nconst variant = 'primary';\n\ninterface Properties {\n content?: TemplateResult;\n disabled?: boolean;\n quiet?: boolean;\n variant?: 'cta' | 'overBackground' | 'primary' | 'secondary' | 'negative';\n}\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const quiet = (props: Properties): TemplateResult =>\n renderButtonSet(props);\nquiet.args = {\n quiet: true,\n};\n\nexport const withIcon = (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 iconSizeOverridden = (): TemplateResult => {\n return html`\n <sp-button label=\"Edit\" size=\"xl\" variant=${variant}>\n <sp-icon-help slot=\"icon\" size=\"s\">Testing</sp-icon-help>\n </sp-button>\n <h1>For testing purposes only</h1>\n <p>\n This is a test to ensure that sizing the icon will still work when\n it's in the scope of a parent element. You shouldn't normally do\n this as it deviates from the Spectrum design specification.\n </p>\n `;\n};\n\nexport const minWidthButton = (props: Properties): TemplateResult => {\n return html`\n <style>\n sp-button {\n min-width: 300px;\n }\n </style>\n ${renderButtonSet(props)}\n `;\n};\nminWidthButton.story = {\n name: 'min-width',\n};\n\nconst href = 'https://github.com/adobe/spectrum-web-components';\n\nexport const link = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n });\nlink.story = {\n name: 'href',\n};\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n target: '_blank',\n });\nlinkWithTarget.story = {\n name: 'href with target=\"_blank\"',\n};\n"]}
@@ -1,11 +0,0 @@
1
- import { renderButtonSet } from './index.js';
2
- export default {
3
- component: 'sp-button',
4
- title: 'Button/Secondary/Sizes',
5
- };
6
- const variant = 'secondary';
7
- export const s = () => renderButtonSet({ size: 's', variant });
8
- export const m = () => renderButtonSet({ size: 'm', variant });
9
- export const l = () => renderButtonSet({ size: 'l', variant });
10
- export const XL = () => renderButtonSet({ size: 'xl', variant });
11
- //# sourceMappingURL=button-secondary-sizes.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-secondary-sizes.stories.js","sourceRoot":"","sources":["button-secondary-sizes.stories.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAe;IACX,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,wBAAwB;CAClC,CAAC;AAEF,MAAM,OAAO,GAAG,WAAW,CAAC;AAE5B,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,EAAE,GAAG,GAAmB,EAAE,CACnC,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,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 { TemplateResult } from '@spectrum-web-components/base';\nimport { renderButtonSet } from './index.js';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Secondary/Sizes',\n};\n\nconst variant = 'secondary';\n\nexport const s = (): TemplateResult => renderButtonSet({ size: 's', variant });\n\nexport const m = (): TemplateResult => renderButtonSet({ size: 'm', variant });\n\nexport const l = (): TemplateResult => renderButtonSet({ size: 'l', variant });\n\nexport const XL = (): TemplateResult =>\n renderButtonSet({ size: 'xl', variant });\n"]}
@@ -1,129 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import { bellIcon, renderButtonSet } from './index.js';
14
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';
15
- export default {
16
- component: 'sp-button',
17
- title: 'Button/Secondary',
18
- args: {
19
- disabled: false,
20
- quiet: false,
21
- variant: 'secondary',
22
- },
23
- argTypes: {
24
- disabled: {
25
- name: 'disabled',
26
- type: { name: 'boolean', required: false },
27
- description: 'Disable this control. It will not receive focus or events.',
28
- table: {
29
- type: { summary: 'boolean' },
30
- defaultValue: { summary: false },
31
- },
32
- control: {
33
- type: 'boolean',
34
- },
35
- },
36
- quiet: {
37
- name: 'quiet',
38
- type: { name: 'boolean', required: false },
39
- table: {
40
- type: { summary: 'boolean' },
41
- defaultValue: { summary: false },
42
- },
43
- control: {
44
- type: 'boolean',
45
- },
46
- },
47
- variant: {
48
- name: 'variant',
49
- type: { name: 'string', required: false },
50
- description: 'The visual variant to apply to the button.',
51
- table: {
52
- type: { summary: 'string' },
53
- defaultValue: { summary: 'cta' },
54
- },
55
- control: {
56
- type: 'inline-radio',
57
- options: [
58
- 'cta',
59
- 'primary',
60
- 'secondary',
61
- 'negative',
62
- 'overBackground',
63
- ],
64
- },
65
- },
66
- },
67
- };
68
- const variant = 'secondary';
69
- export const Default = (props) => renderButtonSet(props);
70
- export const quiet = (props) => renderButtonSet(props);
71
- quiet.args = {
72
- quiet: true,
73
- };
74
- export const withIcon = (props) => {
75
- return html `
76
- <style>
77
- .row {
78
- padding: 10px;
79
- }
80
- </style>
81
- <div class="row">
82
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
83
- <sp-icon-help slot="icon"></sp-icon-help>
84
- Help
85
- ` }))}
86
- </div>
87
- <div class="row">
88
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
89
- ${bellIcon} Custom SVG
90
- ` }))}
91
- </div>
92
- `;
93
- };
94
- export const iconSizeOverridden = () => {
95
- return html `
96
- <sp-button label="Edit" size="xl" variant=${variant}>
97
- <sp-icon-help slot="icon" size="s">Testing</sp-icon-help>
98
- </sp-button>
99
- <h1>For testing purposes only</h1>
100
- <p>
101
- This is a test to ensure that sizing the icon will still work when
102
- it's in the scope of a parent element. You shouldn't normally do
103
- this as it deviates from the Spectrum design specification.
104
- </p>
105
- `;
106
- };
107
- export const minWidthButton = (props) => {
108
- return html `
109
- <style>
110
- sp-button {
111
- min-width: 300px;
112
- }
113
- </style>
114
- ${renderButtonSet(props)}
115
- `;
116
- };
117
- minWidthButton.story = {
118
- name: 'min-width',
119
- };
120
- const href = 'https://github.com/adobe/spectrum-web-components';
121
- export const link = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href }));
122
- link.story = {
123
- name: 'href',
124
- };
125
- export const linkWithTarget = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href, target: '_blank' }));
126
- linkWithTarget.story = {
127
- name: 'href with target="_blank"',
128
- };
129
- //# sourceMappingURL=button-secondary.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-secondary.stories.js","sourceRoot":"","sources":["button-secondary.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,+DAA+D,CAAC;AAEvE,eAAe;IACX,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE;QACF,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,WAAW;KACvB;IACD,QAAQ,EAAE;QACN,QAAQ,EAAE;YACN,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC1C,WAAW,EACP,4DAA4D;YAChE,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;gBAC5B,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACnC;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,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EF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAmB,EAAE;IACnD,OAAO,IAAI,CAAA;oDACqC,OAAO;;;;;;;;;KAStD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE;IAChE,OAAO,IAAI,CAAA;;;;;;UAML,eAAe,CAAC,KAAK,CAAC;KAC3B,CAAC;AACN,CAAC,CAAC;AACF,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,IAAI,GAAG,kDAAkD,CAAC;AAEhE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAkB,EAAE,CACtD,eAAe,iCACR,KAAK,KACR,IAAI,IACN,CAAC;AACP,IAAI,CAAC,KAAK,GAAG;IACT,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE,CAChE,eAAe,iCACR,KAAK,KACR,IAAI,EACJ,MAAM,EAAE,QAAQ,IAClB,CAAC;AACP,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,2BAA2B;CACpC,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 { html, TemplateResult } from '@spectrum-web-components/base';\nimport { bellIcon, renderButtonSet } from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Secondary',\n args: {\n disabled: false,\n quiet: false,\n variant: 'secondary',\n },\n 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 quiet: {\n name: 'quiet',\n type: { name: 'boolean', required: false },\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 'primary',\n 'secondary',\n 'negative',\n 'overBackground',\n ],\n },\n },\n },\n};\n\nconst variant = 'secondary';\n\ninterface Properties {\n content?: TemplateResult;\n disabled?: boolean;\n quiet?: boolean;\n variant?: 'cta' | 'overBackground' | 'primary' | 'secondary' | 'negative';\n}\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const quiet = (props: Properties): TemplateResult =>\n renderButtonSet(props);\nquiet.args = {\n quiet: true,\n};\n\nexport const withIcon = (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 iconSizeOverridden = (): TemplateResult => {\n return html`\n <sp-button label=\"Edit\" size=\"xl\" variant=${variant}>\n <sp-icon-help slot=\"icon\" size=\"s\">Testing</sp-icon-help>\n </sp-button>\n <h1>For testing purposes only</h1>\n <p>\n This is a test to ensure that sizing the icon will still work when\n it's in the scope of a parent element. You shouldn't normally do\n this as it deviates from the Spectrum design specification.\n </p>\n `;\n};\n\nexport const minWidthButton = (props: Properties): TemplateResult => {\n return html`\n <style>\n sp-button {\n min-width: 300px;\n }\n </style>\n ${renderButtonSet(props)}\n `;\n};\nminWidthButton.story = {\n name: 'min-width',\n};\n\nconst href = 'https://github.com/adobe/spectrum-web-components';\n\nexport const link = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n });\nlink.story = {\n name: 'href',\n};\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n target: '_blank',\n });\nlinkWithTarget.story = {\n name: 'href with target=\"_blank\"',\n};\n"]}
@@ -1,11 +0,0 @@
1
- import { renderButtonSet } from './index.js';
2
- export default {
3
- component: 'sp-button',
4
- title: 'Button/Warning/Sizes',
5
- };
6
- const variant = 'negative';
7
- export const s = () => renderButtonSet({ size: 's', variant });
8
- export const m = () => renderButtonSet({ size: 'm', variant });
9
- export const l = () => renderButtonSet({ size: 'l', variant });
10
- export const XL = () => renderButtonSet({ size: 'xl', variant });
11
- //# sourceMappingURL=button-warning-sizes.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-warning-sizes.stories.js","sourceRoot":"","sources":["button-warning-sizes.stories.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAe;IACX,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,sBAAsB;CAChC,CAAC;AAEF,MAAM,OAAO,GAAG,UAAU,CAAC;AAE3B,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,EAAE,GAAG,GAAmB,EAAE,CACnC,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,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 { TemplateResult } from '@spectrum-web-components/base';\nimport { renderButtonSet } from './index.js';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Warning/Sizes',\n};\n\nconst variant = 'negative';\n\nexport const s = (): TemplateResult => renderButtonSet({ size: 's', variant });\n\nexport const m = (): TemplateResult => renderButtonSet({ size: 'm', variant });\n\nexport const l = (): TemplateResult => renderButtonSet({ size: 'l', variant });\n\nexport const XL = (): TemplateResult =>\n renderButtonSet({ size: 'xl', variant });\n"]}
@@ -1,129 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import { bellIcon, renderButtonSet } from './index.js';
14
- import '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';
15
- export default {
16
- component: 'sp-button',
17
- title: 'Button/Warning',
18
- args: {
19
- disabled: false,
20
- quiet: false,
21
- variant: 'negative',
22
- },
23
- argTypes: {
24
- disabled: {
25
- name: 'disabled',
26
- type: { name: 'boolean', required: false },
27
- description: 'Disable this control. It will not receive focus or events.',
28
- table: {
29
- type: { summary: 'boolean' },
30
- defaultValue: { summary: false },
31
- },
32
- control: {
33
- type: 'boolean',
34
- },
35
- },
36
- quiet: {
37
- name: 'quiet',
38
- type: { name: 'boolean', required: false },
39
- table: {
40
- type: { summary: 'boolean' },
41
- defaultValue: { summary: false },
42
- },
43
- control: {
44
- type: 'boolean',
45
- },
46
- },
47
- variant: {
48
- name: 'variant',
49
- type: { name: 'string', required: false },
50
- description: 'The visual variant to apply to the button.',
51
- table: {
52
- type: { summary: 'string' },
53
- defaultValue: { summary: 'cta' },
54
- },
55
- control: {
56
- type: 'inline-radio',
57
- options: [
58
- 'cta',
59
- 'primary',
60
- 'secondary',
61
- 'negative',
62
- 'overBackground',
63
- ],
64
- },
65
- },
66
- },
67
- };
68
- const variant = 'negative';
69
- export const Default = (props) => renderButtonSet(props);
70
- export const quiet = (props) => renderButtonSet(props);
71
- quiet.args = {
72
- quiet: true,
73
- };
74
- export const withIcon = (props) => {
75
- return html `
76
- <style>
77
- .row {
78
- padding: 10px;
79
- }
80
- </style>
81
- <div class="row">
82
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
83
- <sp-icon-help slot="icon"></sp-icon-help>
84
- Help
85
- ` }))}
86
- </div>
87
- <div class="row">
88
- ${renderButtonSet(Object.assign(Object.assign({}, props), { content: html `
89
- ${bellIcon} Custom SVG
90
- ` }))}
91
- </div>
92
- `;
93
- };
94
- export const iconSizeOverridden = () => {
95
- return html `
96
- <sp-button label="Edit" size="xl" variant=${variant}>
97
- <sp-icon-help slot="icon" size="s">Testing</sp-icon-help>
98
- </sp-button>
99
- <h1>For testing purposes only</h1>
100
- <p>
101
- This is a test to ensure that sizing the icon will still work when
102
- it's in the scope of a parent element. You shouldn't normally do
103
- this as it deviates from the Spectrum design specification.
104
- </p>
105
- `;
106
- };
107
- export const minWidthButton = (props) => {
108
- return html `
109
- <style>
110
- sp-button {
111
- min-width: 300px;
112
- }
113
- </style>
114
- ${renderButtonSet(props)}
115
- `;
116
- };
117
- minWidthButton.story = {
118
- name: 'min-width',
119
- };
120
- const href = 'https://github.com/adobe/spectrum-web-components';
121
- export const link = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href }));
122
- link.story = {
123
- name: 'href',
124
- };
125
- export const linkWithTarget = (props) => renderButtonSet(Object.assign(Object.assign({}, props), { href, target: '_blank' }));
126
- linkWithTarget.story = {
127
- name: 'href with target="_blank"',
128
- };
129
- //# sourceMappingURL=button-warning.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-warning.stories.js","sourceRoot":"","sources":["button-warning.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,+DAA+D,CAAC;AAEvE,eAAe;IACX,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE;QACF,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,UAAU;KACtB;IACD,QAAQ,EAAE;QACN,QAAQ,EAAE;YACN,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC1C,WAAW,EACP,4DAA4D;YAChE,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;gBAC5B,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACnC;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,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EAAE;IACnD,OAAO,IAAI,CAAA;oDACqC,OAAO;;;;;;;;;KAStD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE;IAChE,OAAO,IAAI,CAAA;;;;;;UAML,eAAe,CAAC,KAAK,CAAC;KAC3B,CAAC;AACN,CAAC,CAAC;AACF,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,IAAI,GAAG,kDAAkD,CAAC;AAEhE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAkB,EAAE,CACtD,eAAe,iCACR,KAAK,KACR,IAAI,IACN,CAAC;AACP,IAAI,CAAC,KAAK,GAAG;IACT,IAAI,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE,CAChE,eAAe,iCACR,KAAK,KACR,IAAI,EACJ,MAAM,EAAE,QAAQ,IAClB,CAAC;AACP,cAAc,CAAC,KAAK,GAAG;IACnB,IAAI,EAAE,2BAA2B;CACpC,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 { html, TemplateResult } from '@spectrum-web-components/base';\nimport { bellIcon, renderButtonSet } from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Warning',\n args: {\n disabled: false,\n quiet: false,\n variant: 'negative',\n },\n 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 quiet: {\n name: 'quiet',\n type: { name: 'boolean', required: false },\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 'primary',\n 'secondary',\n 'negative',\n 'overBackground',\n ],\n },\n },\n },\n};\n\nconst variant = 'negative';\n\ninterface Properties {\n content?: TemplateResult;\n disabled?: boolean;\n quiet?: boolean;\n variant?: 'cta' | 'overBackground' | 'primary' | 'secondary' | 'negative';\n}\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const quiet = (props: Properties): TemplateResult =>\n renderButtonSet(props);\nquiet.args = {\n quiet: true,\n};\n\nexport const withIcon = (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 iconSizeOverridden = (): TemplateResult => {\n return html`\n <sp-button label=\"Edit\" size=\"xl\" variant=${variant}>\n <sp-icon-help slot=\"icon\" size=\"s\">Testing</sp-icon-help>\n </sp-button>\n <h1>For testing purposes only</h1>\n <p>\n This is a test to ensure that sizing the icon will still work when\n it's in the scope of a parent element. You shouldn't normally do\n this as it deviates from the Spectrum design specification.\n </p>\n `;\n};\n\nexport const minWidthButton = (props: Properties): TemplateResult => {\n return html`\n <style>\n sp-button {\n min-width: 300px;\n }\n </style>\n ${renderButtonSet(props)}\n `;\n};\nminWidthButton.story = {\n name: 'min-width',\n};\n\nconst href = 'https://github.com/adobe/spectrum-web-components';\n\nexport const link = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n });\nlink.story = {\n name: 'href',\n};\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderButtonSet({\n ...props,\n href,\n target: '_blank',\n });\nlinkWithTarget.story = {\n name: 'href with target=\"_blank\"',\n};\n"]}