@spectrum-web-components/button 0.17.6 → 0.18.1-devmode.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +51 -17
- package/sp-button.dev.js +3 -0
- package/sp-button.dev.js.map +7 -0
- package/sp-button.js +3 -14
- package/sp-button.js.map +7 -1
- package/sp-clear-button.dev.js +3 -0
- package/sp-clear-button.dev.js.map +7 -0
- package/sp-clear-button.js +3 -14
- package/sp-clear-button.js.map +7 -1
- package/sp-close-button.dev.js +3 -0
- package/sp-close-button.dev.js.map +7 -0
- package/sp-close-button.js +3 -14
- package/sp-close-button.js.map +7 -1
- package/src/Button.dev.js +79 -0
- package/src/Button.dev.js.map +7 -0
- package/src/Button.js +72 -87
- package/src/Button.js.map +7 -1
- package/src/ButtonBase.dev.js +215 -0
- package/src/ButtonBase.dev.js.map +7 -0
- package/src/ButtonBase.js +198 -201
- package/src/ButtonBase.js.map +7 -1
- package/src/ClearButton.dev.js +70 -0
- package/src/ClearButton.dev.js.map +7 -0
- package/src/ClearButton.js +45 -52
- package/src/ClearButton.js.map +7 -1
- package/src/CloseButton.dev.js +65 -0
- package/src/CloseButton.dev.js.map +7 -0
- package/src/CloseButton.js +42 -49
- package/src/CloseButton.js.map +7 -1
- package/src/StyledButton.dev.js +8 -0
- package/src/StyledButton.dev.js.map +7 -0
- package/src/StyledButton.js +6 -17
- package/src/StyledButton.js.map +7 -1
- package/src/button-base.css.dev.js +10 -0
- package/src/button-base.css.dev.js.map +7 -0
- package/src/button-base.css.js +3 -14
- package/src/button-base.css.js.map +7 -1
- package/src/button.css.dev.js +619 -0
- package/src/button.css.dev.js.map +7 -0
- package/src/button.css.js +3 -14
- package/src/button.css.js.map +7 -1
- package/src/index.dev.js +6 -0
- package/src/index.dev.js.map +7 -0
- package/src/index.js +6 -17
- package/src/index.js.map +7 -1
- package/src/spectrum-button-base.css.dev.js +6 -0
- package/src/spectrum-button-base.css.dev.js.map +7 -0
- package/src/spectrum-button-base.css.js +3 -14
- package/src/spectrum-button-base.css.js.map +7 -1
- package/src/spectrum-button.css.dev.js +587 -0
- package/src/spectrum-button.css.dev.js.map +7 -0
- package/src/spectrum-button.css.js +3 -14
- package/src/spectrum-button.css.js.map +7 -1
- package/stories/button-accent-fill-sizes.stories.js +21 -18
- package/stories/button-accent-fill-sizes.stories.js.map +7 -1
- package/stories/button-accent-fill.stories.js +24 -14
- package/stories/button-accent-fill.stories.js.map +7 -1
- package/stories/button-accent-outline-sizes.stories.js +21 -18
- package/stories/button-accent-outline-sizes.stories.js.map +7 -1
- package/stories/button-accent-outline.stories.js +24 -14
- package/stories/button-accent-outline.stories.js.map +7 -1
- package/stories/button-black-fill-sizes.stories.js +22 -19
- package/stories/button-black-fill-sizes.stories.js.map +7 -1
- package/stories/button-black-fill.stories.js +26 -15
- package/stories/button-black-fill.stories.js.map +7 -1
- package/stories/button-black-outline-sizes.stories.js +22 -19
- package/stories/button-black-outline-sizes.stories.js.map +7 -1
- package/stories/button-black-outline.stories.js +26 -15
- package/stories/button-black-outline.stories.js.map +7 -1
- package/stories/button-negative-fill-sizes.stories.js +21 -18
- package/stories/button-negative-fill-sizes.stories.js.map +7 -1
- package/stories/button-negative-fill.stories.js +24 -14
- package/stories/button-negative-fill.stories.js.map +7 -1
- package/stories/button-negative-outline-sizes.stories.js +21 -18
- package/stories/button-negative-outline-sizes.stories.js.map +7 -1
- package/stories/button-negative-outline.stories.js +24 -14
- package/stories/button-negative-outline.stories.js.map +7 -1
- package/stories/button-primary-fill-sizes.stories.js +21 -18
- package/stories/button-primary-fill-sizes.stories.js.map +7 -1
- package/stories/button-primary-fill.stories.js +24 -14
- package/stories/button-primary-fill.stories.js.map +7 -1
- package/stories/button-primary-outline-sizes.stories.js +21 -18
- package/stories/button-primary-outline-sizes.stories.js.map +7 -1
- package/stories/button-primary-outline.stories.js +24 -14
- package/stories/button-primary-outline.stories.js.map +7 -1
- package/stories/button-secondary-fill-sizes.stories.js +21 -18
- package/stories/button-secondary-fill-sizes.stories.js.map +7 -1
- package/stories/button-secondary-fill.stories.js +24 -14
- package/stories/button-secondary-fill.stories.js.map +7 -1
- package/stories/button-secondary-outline-sizes.stories.js +21 -18
- package/stories/button-secondary-outline-sizes.stories.js.map +7 -1
- package/stories/button-secondary-outline.stories.js +24 -14
- package/stories/button-secondary-outline.stories.js.map +7 -1
- package/stories/button-white-fill-sizes.stories.js +22 -19
- package/stories/button-white-fill-sizes.stories.js.map +7 -1
- package/stories/button-white-fill.stories.js +26 -15
- package/stories/button-white-fill.stories.js.map +7 -1
- package/stories/button-white-outline-sizes.stories.js +22 -19
- package/stories/button-white-outline-sizes.stories.js.map +7 -1
- package/stories/button-white-outline.stories.js +26 -15
- package/stories/button-white-outline.stories.js.map +7 -1
- package/stories/index.js +99 -94
- package/stories/index.js.map +7 -1
- package/test/benchmark/test-basic.js +5 -16
- package/test/benchmark/test-basic.js.map +7 -1
- package/test/button-accent-fill-sizes.test-vrt.js +4 -15
- package/test/button-accent-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-accent-fill.test-vrt.js +4 -15
- package/test/button-accent-fill.test-vrt.js.map +7 -1
- package/test/button-accent-outline-sizes.test-vrt.js +4 -15
- package/test/button-accent-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-accent-outline.test-vrt.js +4 -15
- package/test/button-accent-outline.test-vrt.js.map +7 -1
- package/test/button-black-fill-sizes.test-vrt.js +4 -15
- package/test/button-black-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-black-fill.test-vrt.js +4 -15
- package/test/button-black-fill.test-vrt.js.map +7 -1
- package/test/button-black-outline-sizes.test-vrt.js +4 -15
- package/test/button-black-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-black-outline.test-vrt.js +4 -15
- package/test/button-black-outline.test-vrt.js.map +7 -1
- package/test/button-negative-fill-sizes.test-vrt.js +4 -15
- package/test/button-negative-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-negative-fill.test-vrt.js +4 -15
- package/test/button-negative-fill.test-vrt.js.map +7 -1
- package/test/button-negative-outline-sizes.test-vrt.js +4 -15
- package/test/button-negative-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-negative-outline.test-vrt.js +4 -15
- package/test/button-negative-outline.test-vrt.js.map +7 -1
- package/test/button-primary-fill-sizes.test-vrt.js +4 -15
- package/test/button-primary-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-primary-fill.test-vrt.js +4 -15
- package/test/button-primary-fill.test-vrt.js.map +7 -1
- package/test/button-primary-outline-sizes.test-vrt.js +4 -15
- package/test/button-primary-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-primary-outline.test-vrt.js +4 -15
- package/test/button-primary-outline.test-vrt.js.map +7 -1
- package/test/button-secondary-fill-sizes.test-vrt.js +4 -15
- package/test/button-secondary-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-secondary-fill.test-vrt.js +4 -15
- package/test/button-secondary-fill.test-vrt.js.map +7 -1
- package/test/button-secondary-outline-sizes.test-vrt.js +4 -15
- package/test/button-secondary-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-secondary-outline.test-vrt.js +4 -15
- package/test/button-secondary-outline.test-vrt.js.map +7 -1
- package/test/button-white-fill-sizes.test-vrt.js +4 -15
- package/test/button-white-fill-sizes.test-vrt.js.map +7 -1
- package/test/button-white-fill.test-vrt.js +4 -15
- package/test/button-white-fill.test-vrt.js.map +7 -1
- package/test/button-white-outline-sizes.test-vrt.js +4 -15
- package/test/button-white-outline-sizes.test-vrt.js.map +7 -1
- package/test/button-white-outline.test-vrt.js +4 -15
- package/test/button-white-outline.test-vrt.js.map +7 -1
- package/test/button.test.js +315 -320
- package/test/button.test.js.map +7 -1
- package/test/clear-button.test.js +9 -20
- package/test/clear-button.test.js.map +7 -1
- package/test/close-button.test.js +9 -20
- package/test/close-button.test.js.map +7 -1
package/stories/index.js
CHANGED
|
@@ -1,127 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 { ifDefined } from '@spectrum-web-components/base/src/directives.js';
|
|
14
|
-
import '../sp-button.js';
|
|
15
|
-
import '@spectrum-web-components/icon/sp-icon.js';
|
|
16
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';
|
|
1
|
+
import { html } from "@spectrum-web-components/base";
|
|
2
|
+
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
3
|
+
import "@spectrum-web-components/button/sp-button.js";
|
|
4
|
+
import "@spectrum-web-components/icon/sp-icon.js";
|
|
5
|
+
import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
|
|
17
6
|
export const args = {
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
disabled: false,
|
|
8
|
+
variant: "cta"
|
|
20
9
|
};
|
|
21
10
|
export const argTypes = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
control: {
|
|
31
|
-
type: 'boolean',
|
|
32
|
-
},
|
|
11
|
+
disabled: {
|
|
12
|
+
name: "disabled",
|
|
13
|
+
type: { name: "boolean", required: false },
|
|
14
|
+
description: "Disable this control. It will not receive focus or events.",
|
|
15
|
+
table: {
|
|
16
|
+
type: { summary: "boolean" },
|
|
17
|
+
defaultValue: { summary: false }
|
|
33
18
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'cta',
|
|
46
|
-
'accent',
|
|
47
|
-
'primary',
|
|
48
|
-
'secondary',
|
|
49
|
-
'negative',
|
|
50
|
-
'overBackground',
|
|
51
|
-
'black',
|
|
52
|
-
'white',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
19
|
+
control: {
|
|
20
|
+
type: "boolean"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
variant: {
|
|
24
|
+
name: "variant",
|
|
25
|
+
type: { name: "string", required: false },
|
|
26
|
+
description: "The visual variant to apply to the button.",
|
|
27
|
+
table: {
|
|
28
|
+
type: { summary: "string" },
|
|
29
|
+
defaultValue: { summary: "cta" }
|
|
55
30
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
31
|
+
control: {
|
|
32
|
+
type: "inline-radio",
|
|
33
|
+
options: [
|
|
34
|
+
"cta",
|
|
35
|
+
"accent",
|
|
36
|
+
"primary",
|
|
37
|
+
"secondary",
|
|
38
|
+
"negative",
|
|
39
|
+
"overBackground",
|
|
40
|
+
"black",
|
|
41
|
+
"white"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
treatment: {
|
|
46
|
+
name: "treatment",
|
|
47
|
+
type: { name: "string", required: false },
|
|
48
|
+
description: "The visual treatment to apply to the button.",
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: "string" },
|
|
51
|
+
defaultValue: { summary: "fill" }
|
|
68
52
|
},
|
|
53
|
+
control: {
|
|
54
|
+
type: "inline-radio",
|
|
55
|
+
options: ["fill", "outline"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
69
58
|
};
|
|
70
59
|
export const makeOverBackground = (variant) => (story) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
: 'var(--spectrum-global-color-seafoam-600)';
|
|
74
|
-
return html `
|
|
60
|
+
const color = variant === "black" ? "rgb(181, 209, 211)" : "var(--spectrum-global-color-seafoam-600)";
|
|
61
|
+
return html`
|
|
75
62
|
<div
|
|
76
|
-
style="
|
|
63
|
+
style="
|
|
64
|
+
--mod-actionbutton-static-content-color: ${color};
|
|
65
|
+
background-color: ${color};
|
|
66
|
+
color: ${color};
|
|
67
|
+
padding: var(--spectrum-global-dimension-size-175) var(--spectrum-global-dimension-size-250);
|
|
68
|
+
display: inline-block;
|
|
69
|
+
"
|
|
77
70
|
>
|
|
78
71
|
${story()}
|
|
79
72
|
</div>
|
|
80
73
|
`;
|
|
81
74
|
};
|
|
82
75
|
export function renderButton(properties) {
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
if (properties.variant) {
|
|
77
|
+
return html`
|
|
85
78
|
<sp-button
|
|
86
79
|
variant="${properties.variant}"
|
|
87
80
|
treatment="${properties.treatment}"
|
|
88
81
|
?quiet="${!!properties.quiet}"
|
|
89
82
|
?disabled=${!!properties.disabled}
|
|
90
|
-
size=${properties.size ||
|
|
83
|
+
size=${properties.size || "m"}
|
|
91
84
|
href=${ifDefined(properties.href)}
|
|
92
85
|
target=${ifDefined(properties.target)}
|
|
93
86
|
?warning=${properties.warning}
|
|
94
87
|
>
|
|
95
|
-
${properties.content ||
|
|
88
|
+
${properties.content || "Click Me"}
|
|
96
89
|
</sp-button>
|
|
97
90
|
`;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return html `
|
|
91
|
+
} else {
|
|
92
|
+
return html`
|
|
101
93
|
<sp-button
|
|
102
94
|
?quiet="${!!properties.quiet}"
|
|
103
95
|
?disabled=${!!properties.disabled}
|
|
104
96
|
size=${properties.size}
|
|
105
97
|
>
|
|
106
|
-
${properties.content ||
|
|
98
|
+
${properties.content || "Click Me"}
|
|
107
99
|
</sp-button>
|
|
108
100
|
`;
|
|
109
|
-
|
|
101
|
+
}
|
|
110
102
|
}
|
|
111
103
|
export function renderButtonSet(properties) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
const disabled = Object.assign({}, properties, { disabled: true });
|
|
105
|
+
const icon = Object.assign({}, properties, {
|
|
106
|
+
content: html`
|
|
115
107
|
<sp-icon-help slot="icon"></sp-icon-help>
|
|
116
108
|
Click Me
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
`
|
|
110
|
+
});
|
|
111
|
+
return html`
|
|
120
112
|
${renderButton(properties)} ${renderButton(disabled)}
|
|
121
113
|
${renderButton(icon)}
|
|
122
114
|
`;
|
|
123
115
|
}
|
|
124
|
-
export const bellIcon = html
|
|
116
|
+
export const bellIcon = html`
|
|
125
117
|
<svg slot="icon" viewBox="0 0 36 36" focusable="false" aria-hidden="true">
|
|
126
118
|
<path
|
|
127
119
|
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"
|
|
@@ -129,27 +121,33 @@ export const bellIcon = html `
|
|
|
129
121
|
</svg>
|
|
130
122
|
`;
|
|
131
123
|
export const renderWithIcon = (props) => {
|
|
132
|
-
|
|
124
|
+
return html`
|
|
133
125
|
<style>
|
|
134
126
|
.row {
|
|
135
127
|
padding: 10px;
|
|
136
128
|
}
|
|
137
129
|
</style>
|
|
138
130
|
<div class="row">
|
|
139
|
-
${renderButtonSet(
|
|
131
|
+
${renderButtonSet({
|
|
132
|
+
...props,
|
|
133
|
+
content: html`
|
|
140
134
|
<sp-icon-help slot="icon"></sp-icon-help>
|
|
141
135
|
Help
|
|
142
|
-
`
|
|
136
|
+
`
|
|
137
|
+
})}
|
|
143
138
|
</div>
|
|
144
139
|
<div class="row">
|
|
145
|
-
${renderButtonSet(
|
|
140
|
+
${renderButtonSet({
|
|
141
|
+
...props,
|
|
142
|
+
content: html`
|
|
146
143
|
${bellIcon} Custom SVG
|
|
147
|
-
`
|
|
144
|
+
`
|
|
145
|
+
})}
|
|
148
146
|
</div>
|
|
149
147
|
`;
|
|
150
148
|
};
|
|
151
149
|
export const renderIconSizeOverridden = (variant, treatment) => {
|
|
152
|
-
|
|
150
|
+
return html`
|
|
153
151
|
<sp-button
|
|
154
152
|
label="Edit"
|
|
155
153
|
size="xl"
|
|
@@ -167,7 +165,7 @@ export const renderIconSizeOverridden = (variant, treatment) => {
|
|
|
167
165
|
`;
|
|
168
166
|
};
|
|
169
167
|
export const renderMinWidthButton = (props) => {
|
|
170
|
-
|
|
168
|
+
return html`
|
|
171
169
|
<style>
|
|
172
170
|
sp-button {
|
|
173
171
|
min-width: 300px;
|
|
@@ -176,7 +174,14 @@ export const renderMinWidthButton = (props) => {
|
|
|
176
174
|
${renderButtonSet(props)}
|
|
177
175
|
`;
|
|
178
176
|
};
|
|
179
|
-
const href =
|
|
180
|
-
export const renderLink = (props) => renderButtonSet(
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
const href = "https://github.com/adobe/spectrum-web-components";
|
|
178
|
+
export const renderLink = (props) => renderButtonSet({
|
|
179
|
+
...props,
|
|
180
|
+
href
|
|
181
|
+
});
|
|
182
|
+
export const renderLinkWithTarget = (props) => renderButtonSet({
|
|
183
|
+
...props,
|
|
184
|
+
href,
|
|
185
|
+
target: "_blank"
|
|
186
|
+
});
|
|
187
|
+
//# sourceMappingURL=index.js.map
|
package/stories/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAE5E,OAAO,iBAAiB,CAAC;AACzB,OAAO,0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AAE;QACvC,OAAO,EAAE,IAAI,CAAA;;;SAGZ;KACJ,CAAC,CAAC;IACH,OAAO,IAAI,CAAA;UACL,YAAY,CAAC,UAAU,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC;UAClD,YAAY,CAAC,IAAI,CAAC;KACvB,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAA;;;;;;CAM3B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAiB,EAAkB,EAAE;IAChE,OAAO,IAAI,CAAA;;;;;;;cAOD,eAAe,iCACV,KAAK,KACR,OAAO,EAAE,IAAI,CAAA;;;iBAGZ,IACH;;;cAGA,eAAe,iCACV,KAAK,KACR,OAAO,EAAE,IAAI,CAAA;sBACP,QAAQ;iBACb,IACH;;KAET,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,OAAuB,EACvB,SAA2B,EACb,EAAE;IAChB,OAAO,IAAI,CAAA;;;;sBAIO,OAAO;wBACL,SAAS;;;;;;;;;;KAU5B,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAiB,EAAkB,EAAE;IACtE,OAAO,IAAI,CAAA;;;;;;UAML,eAAe,CAAC,KAAK,CAAC;KAC3B,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,kDAAkD,CAAC;AAEhE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAiB,EAAkB,EAAE,CAC5D,eAAe,iCACR,KAAK,KACR,IAAI,IACN,CAAC;AAEP,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAiB,EAAkB,EAAE,CACtE,eAAe,iCACR,KAAK,KACR,IAAI,EACJ,MAAM,EAAE,QAAQ,IAClB,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 { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '../sp-button.js';\nimport '@spectrum-web-components/icon/sp-icon.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\nimport { ButtonTreatments, ButtonVariants } from '../src/Button.js';\n\nexport const args = {\n disabled: false,\n variant: 'cta',\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};\n\nexport interface Properties {\n variant?: ButtonVariants;\n treatment?: ButtonTreatments;\n quiet?: boolean;\n content?: TemplateResult;\n disabled?: boolean;\n size?: 's' | 'm' | 'l' | 'xl';\n href?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n warning?: boolean;\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-global-color-seafoam-600)';\n return html`\n <div\n style=\"background-color: ${color}; color: ${color}; padding: var(--spectrum-global-dimension-size-175) var(--spectrum-global-dimension-size-250); display: inline-block;\"\n >\n ${story()}\n </div>\n `;\n };\n\nexport function renderButton(properties: Properties): TemplateResult {\n if (properties.variant) {\n return html`\n <sp-button\n variant=\"${properties.variant}\"\n treatment=\"${properties.treatment}\"\n ?quiet=\"${!!properties.quiet}\"\n ?disabled=${!!properties.disabled}\n size=${properties.size || 'm'}\n href=${ifDefined(properties.href)}\n target=${ifDefined(properties.target)}\n ?warning=${properties.warning}\n >\n ${properties.content || 'Click Me'}\n </sp-button>\n `;\n } else {\n return html`\n <sp-button\n ?quiet=\"${!!properties.quiet}\"\n ?disabled=${!!properties.disabled}\n size=${properties.size}\n >\n ${properties.content || 'Click Me'}\n </sp-button>\n `;\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 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 renderIconSizeOverridden = (\n variant: ButtonVariants,\n treatment: ButtonTreatments\n): TemplateResult => {\n return html`\n <sp-button\n label=\"Edit\"\n size=\"xl\"\n variant=${variant}\n treatment=${treatment}\n >\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 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"]}
|
|
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';\nimport {\n ButtonTreatments,\n ButtonVariants,\n} from '@spectrum-web-components/button/src/Button.js';\n\nexport const args = {\n disabled: false,\n variant: 'cta',\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};\n\nexport interface Properties {\n variant?: ButtonVariants;\n treatment?: ButtonTreatments;\n quiet?: boolean;\n content?: TemplateResult;\n disabled?: boolean;\n size?: 's' | 'm' | 'l' | 'xl';\n href?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n warning?: boolean;\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-global-color-seafoam-600)';\n return html`\n <div\n style=\"\n --mod-actionbutton-static-content-color: ${color};\n background-color: ${color};\n color: ${color};\n padding: var(--spectrum-global-dimension-size-175) var(--spectrum-global-dimension-size-250);\n display: inline-block;\n \"\n >\n ${story()}\n </div>\n `;\n };\n\nexport function renderButton(properties: Properties): TemplateResult {\n if (properties.variant) {\n return html`\n <sp-button\n variant=\"${properties.variant}\"\n treatment=\"${properties.treatment}\"\n ?quiet=\"${!!properties.quiet}\"\n ?disabled=${!!properties.disabled}\n size=${properties.size || 'm'}\n href=${ifDefined(properties.href)}\n target=${ifDefined(properties.target)}\n ?warning=${properties.warning}\n >\n ${properties.content || 'Click Me'}\n </sp-button>\n `;\n } else {\n return html`\n <sp-button\n ?quiet=\"${!!properties.quiet}\"\n ?disabled=${!!properties.disabled}\n size=${properties.size}\n >\n ${properties.content || 'Click Me'}\n </sp-button>\n `;\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 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 renderIconSizeOverridden = (\n variant: ButtonVariants,\n treatment: ButtonTreatments\n): TemplateResult => {\n return html`\n <sp-button\n label=\"Edit\"\n size=\"xl\"\n variant=${variant}\n treatment=${treatment}\n >\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 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": "AAWA;AACA;AAEA;AACA;AACA;AAMO,aAAM,OAAO;AAAA,EAChB,UAAU;AAAA,EACV,SAAS;AACb;AAEO,aAAM,WAAW;AAAA,EACpB,UAAU;AAAA,IACN,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,aACI;AAAA,IACJ,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,MAAM;AAAA,IACnC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACL,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,aAAa;AAAA,IACb,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,SAAS;AAAA,MAC1B,cAAc,EAAE,SAAS,MAAM;AAAA,IACnC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,W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;AAAA,UACjD,aAAa,IAAI;AAAA;AAE3B;AAEO,aAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQjB,aAAM,iBAAiB,CAAC,UAAsC;AACjE,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAOG,gBAAgB;AAAA,OACX;AAAA,IACH,SAAS;AAAA;AAAA;AAAA;AAAA,EAIb,CAAC;AAAA;AAAA;AAAA,cAGC,gBAAgB;AAAA,OACX;AAAA,IACH,SAAS;AAAA,sBACH;AAAA;AAAA,EAEV,CAAC;AAAA;AAAA;AAGb;AAEO,aAAM,2BAA2B,CACpC,SACA,cACiB;AACjB,SAAO;AAAA;AAAA;AAAA;AAAA,sBAIW;AAAA,wBACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWxB;AAEO,aAAM,uBAAuB,CAAC,UAAsC;AACvE,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAMD,gBAAgB,KAAK;AAAA;AAE/B;AAEA,MAAM,OAAO;AAEN,aAAM,aAAa,CAAC,UACvB,gBAAgB;AAAA,KACT;AAAA,EACH;AACJ,CAAC;AAEE,aAAM,uBAAuB,CAAC,UACjC,gBAAgB;AAAA,KACT;AAAA,EACH;AAAA,EACA,QAAQ;AACZ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 '@spectrum-web-components/button/sp-button.js';
|
|
13
|
-
import { html } from 'lit';
|
|
14
|
-
import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
|
|
15
|
-
measureFixtureCreation(html `
|
|
1
|
+
import "@spectrum-web-components/button/sp-button.js";
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
|
|
4
|
+
measureFixtureCreation(html`
|
|
16
5
|
<sp-button>Click me</sp-button>
|
|
17
6
|
`);
|
|
18
|
-
//# sourceMappingURL=test-basic.js.map
|
|
7
|
+
//# sourceMappingURL=test-basic.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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 { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-button>Click me</sp-button>\n`);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-accent-fill-sizes.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonAccentFillSizesStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-accent-fill-sizes.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-accent-fill-sizes.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonAccentFillSizesStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-accent-fill-sizes.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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';\n\nregressVisuals('ButtonAccentFillSizesStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,gCAAgC,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-accent-fill.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonAccentFillStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-accent-fill.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-accent-fill.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonAccentFillStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-accent-fill.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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';\n\nregressVisuals('ButtonAccentFillStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,2BAA2B,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-accent-outline-sizes.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonAccentOutlineSizesStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-accent-outline-sizes.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-accent-outline-sizes.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonAccentOutlineSizesStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-accent-outline-sizes.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["button-accent-outline-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-outline-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentOutlineSizesStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,mCAAmC,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-accent-outline.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonAccentOutlineStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-accent-outline.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-accent-outline.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonAccentOutlineStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-accent-outline.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["button-accent-outline.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.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonAccentOutlineStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,8BAA8B,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-black-fill-sizes.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonBlackFillSizesStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-black-fill-sizes.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-black-fill-sizes.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonBlackFillSizesStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-black-fill-sizes.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["button-black-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-black-fill-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonBlackFillSizesStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,+BAA+B,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-black-fill.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonBlackFillStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-black-fill.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-black-fill.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonBlackFillStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-black-fill.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["button-black-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-black-fill.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonBlackFillStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,0BAA0B,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 * as stories from '../stories/button-black-outline-sizes.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('ButtonBlackOutlineSizesStories', stories);
|
|
15
|
-
//# sourceMappingURL=button-black-outline-sizes.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/button-black-outline-sizes.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("ButtonBlackOutlineSizesStories", stories);
|
|
4
|
+
//# sourceMappingURL=button-black-outline-sizes.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["button-black-outline-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-black-outline-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonBlackOutlineSizesStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,kCAAkC,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|