@spectrum-web-components/action-group 0.10.2-devmode.0 → 0.11.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 +5 -5
- package/sp-action-group.js +1 -2
- package/sp-action-group.js.map +1 -1
- package/src/ActionGroup.js +2 -307
- package/src/ActionGroup.js.map +1 -1
- package/src/action-group.css.js +2 -4
- package/src/action-group.css.js.map +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/spectrum-action-group.css.js +2 -4
- package/src/spectrum-action-group.css.js.map +1 -1
- package/stories/action-group-tooltip.stories.js +6 -136
- package/stories/action-group-tooltip.stories.js.map +1 -1
- package/stories/action-group.stories.js +22 -202
- package/stories/action-group.stories.js.map +1 -1
- package/test/action-group-tooltip.test-vrt.js +1 -3
- package/test/action-group-tooltip.test-vrt.js.map +1 -1
- package/test/action-group.test-vrt.js +1 -3
- package/test/action-group.test-vrt.js.map +1 -1
- package/test/action-group.test.js +46 -502
- package/test/action-group.test.js.map +1 -1
- package/test/benchmark/basic-test.js +1 -5
- package/test/benchmark/basic-test.js.map +1 -1
|
@@ -1,111 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { spreadProps } from "../../../test/lit-helpers.js";
|
|
3
|
-
import "@spectrum-web-components/action-group/sp-action-group.js";
|
|
4
|
-
import "@spectrum-web-components/action-button/sp-action-button.js";
|
|
5
|
-
import "@spectrum-web-components/overlay/overlay-trigger.js";
|
|
6
|
-
import "@spectrum-web-components/tooltip/sp-tooltip.js";
|
|
7
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js";
|
|
8
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";
|
|
9
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js";
|
|
10
|
-
export default {
|
|
11
|
-
title: "Action Group/Tooltips",
|
|
12
|
-
component: "sp-action-group",
|
|
13
|
-
args: {
|
|
14
|
-
compact: false,
|
|
15
|
-
emphasized: false,
|
|
16
|
-
justified: false,
|
|
17
|
-
quiet: false,
|
|
18
|
-
vertical: false,
|
|
19
|
-
selects: "none"
|
|
20
|
-
},
|
|
21
|
-
argTypes: {
|
|
22
|
-
compact: {
|
|
23
|
-
name: "compact",
|
|
24
|
-
description: "Visually joins the buttons together to clarify their relationship to one another.",
|
|
25
|
-
type: { name: "boolean", required: false },
|
|
26
|
-
table: {
|
|
27
|
-
type: { summary: "boolean" },
|
|
28
|
-
defaultValue: { summary: false }
|
|
29
|
-
},
|
|
30
|
-
control: {
|
|
31
|
-
type: "boolean"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emphasized: {
|
|
35
|
-
name: "emphasized",
|
|
36
|
-
type: { name: "boolean", required: false },
|
|
37
|
-
table: {
|
|
38
|
-
type: { summary: "boolean" },
|
|
39
|
-
defaultValue: { summary: false }
|
|
40
|
-
},
|
|
41
|
-
control: {
|
|
42
|
-
type: "boolean"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
justified: {
|
|
46
|
-
name: "justified",
|
|
47
|
-
description: "Aligns the action group items to use all the available space on that line.",
|
|
48
|
-
type: { name: "boolean", required: false },
|
|
49
|
-
table: {
|
|
50
|
-
type: { summary: "boolean" },
|
|
51
|
-
defaultValue: { summary: false }
|
|
52
|
-
},
|
|
53
|
-
control: {
|
|
54
|
-
type: "boolean"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
quiet: {
|
|
58
|
-
name: "quiet",
|
|
59
|
-
type: { name: "boolean", required: false },
|
|
60
|
-
table: {
|
|
61
|
-
type: { summary: "boolean" },
|
|
62
|
-
defaultValue: { summary: false }
|
|
63
|
-
},
|
|
64
|
-
control: {
|
|
65
|
-
type: "boolean"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
vertical: {
|
|
69
|
-
name: "vertical",
|
|
70
|
-
description: "Changes the orientation of the action group.",
|
|
71
|
-
type: { name: "boolean", required: false },
|
|
72
|
-
table: {
|
|
73
|
-
type: { summary: "boolean" },
|
|
74
|
-
defaultValue: { summary: false }
|
|
75
|
-
},
|
|
76
|
-
control: {
|
|
77
|
-
type: "boolean"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
selects: {
|
|
81
|
-
name: "selects",
|
|
82
|
-
description: "Whether the elements selects its children and how many it can select at a time.",
|
|
83
|
-
table: {
|
|
84
|
-
defaultValue: { summary: "" }
|
|
85
|
-
},
|
|
86
|
-
control: {
|
|
87
|
-
type: "inline-radio",
|
|
88
|
-
options: ["none", "single", "multiple"]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const template = (args) => {
|
|
94
|
-
requestAnimationFrame(() => {
|
|
95
|
-
const group = document.querySelector("sp-action-group");
|
|
96
|
-
const selectedDiv = group.nextElementSibling;
|
|
97
|
-
if (selectedDiv) {
|
|
98
|
-
selectedDiv.textContent = `Selected: ${JSON.stringify(group.selected)}`;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
return html`
|
|
1
|
+
import{html as a}from"@spectrum-web-components/base";import{spreadProps as r}from"../../../test/lit-helpers.js";import"@spectrum-web-components/action-group/sp-action-group.js";import"@spectrum-web-components/action-button/sp-action-button.js";import"@spectrum-web-components/overlay/overlay-trigger.js";import"@spectrum-web-components/tooltip/sp-tooltip.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js";export default{title:"Action Group/Tooltips",component:"sp-action-group",args:{compact:!1,emphasized:!1,justified:!1,quiet:!1,vertical:!1,selects:"none"},argTypes:{compact:{name:"compact",description:"Visually joins the buttons together to clarify their relationship to one another.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},emphasized:{name:"emphasized",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},justified:{name:"justified",description:"Aligns the action group items to use all the available space on that line.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},quiet:{name:"quiet",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},vertical:{name:"vertical",description:"Changes the orientation of the action group.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},selects:{name:"selects",description:"Whether the elements selects its children and how many it can select at a time.",table:{defaultValue:{summary:""}},control:{type:"inline-radio",options:["none","single","multiple"]}}}};const l=e=>(requestAnimationFrame(()=>{const t=document.querySelector("sp-action-group"),o=t.nextElementSibling;o&&(o.textContent=`Selected: ${JSON.stringify(t.selected)}`)}),a`
|
|
102
2
|
<sp-action-group
|
|
103
3
|
label="Favorite Color"
|
|
104
|
-
...=${
|
|
105
|
-
@change=${({
|
|
106
|
-
const next = target.nextElementSibling;
|
|
107
|
-
next.textContent = `Selected: ${JSON.stringify(target.selected)}`;
|
|
108
|
-
}}
|
|
4
|
+
...=${r(e)}
|
|
5
|
+
@change=${({target:t})=>{const o=t.nextElementSibling;o.textContent=`Selected: ${JSON.stringify(t.selected)}`}}
|
|
109
6
|
>
|
|
110
7
|
<overlay-trigger>
|
|
111
8
|
<sp-action-button slot="trigger">Red</sp-action-button>
|
|
@@ -130,35 +27,8 @@ const template = (args) => {
|
|
|
130
27
|
<sp-tooltip slot="hover-content">The sun at noon.</sp-tooltip>
|
|
131
28
|
</overlay-trigger>
|
|
132
29
|
</sp-action-group>
|
|
133
|
-
${
|
|
30
|
+
${e.selects?a`
|
|
134
31
|
<div>Selected:</div>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
export const selectsSingle = (args) => template(args);
|
|
139
|
-
selectsSingle.args = {
|
|
140
|
-
compact: true,
|
|
141
|
-
emphasized: true,
|
|
142
|
-
selects: "single"
|
|
143
|
-
};
|
|
144
|
-
export const selectsMultiple = (args) => template(args);
|
|
145
|
-
selectsMultiple.args = {
|
|
146
|
-
compact: true,
|
|
147
|
-
emphasized: true,
|
|
148
|
-
selects: "multiple"
|
|
149
|
-
};
|
|
150
|
-
export const justified = (args) => template(args);
|
|
151
|
-
justified.args = {
|
|
152
|
-
compact: true,
|
|
153
|
-
emphasized: true,
|
|
154
|
-
justified: true,
|
|
155
|
-
selects: void 0
|
|
156
|
-
};
|
|
157
|
-
export const vertical = (args) => template(args);
|
|
158
|
-
vertical.args = {
|
|
159
|
-
compact: true,
|
|
160
|
-
emphasized: true,
|
|
161
|
-
vertical: true,
|
|
162
|
-
selects: void 0
|
|
163
|
-
};
|
|
32
|
+
`:a``}
|
|
33
|
+
`);export const selectsSingle=e=>l(e);selectsSingle.args={compact:!0,emphasized:!0,selects:"single"};export const selectsMultiple=e=>l(e);selectsMultiple.args={compact:!0,emphasized:!0,selects:"multiple"};export const justified=e=>l(e);justified.args={compact:!0,emphasized:!0,justified:!0,selects:void 0};export const vertical=e=>l(e);vertical.args={compact:!0,emphasized:!0,vertical:!0,selects:void 0};
|
|
164
34
|
//# sourceMappingURL=action-group-tooltip.stories.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-group-tooltip.stories.ts"],
|
|
4
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 { html, TemplateResult } from '@spectrum-web-components/base';\nimport { spreadProps } from '../../../test/lit-helpers.js';\n\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/overlay/overlay-trigger.js';\nimport '@spectrum-web-components/tooltip/sp-tooltip.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-info.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js';\nimport { ActionGroup } from '@spectrum-web-components/action-group/src/ActionGroup.js';\n\nexport default {\n title: 'Action Group/Tooltips',\n component: 'sp-action-group',\n args: {\n compact: false,\n emphasized: false,\n justified: false,\n quiet: false,\n vertical: false,\n selects: 'none',\n },\n argTypes: {\n compact: {\n name: 'compact',\n description:\n 'Visually joins the buttons together to clarify their relationship to one another.',\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 emphasized: {\n name: 'emphasized',\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 justified: {\n name: 'justified',\n description:\n 'Aligns the action group items to use all the available space on that line.',\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 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 vertical: {\n name: 'vertical',\n description: 'Changes the orientation of the action group.',\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 selects: {\n name: 'selects',\n description:\n 'Whether the elements selects its children and how many it can select at a time.',\n table: {\n defaultValue: { summary: '' },\n },\n control: {\n type: 'inline-radio',\n options: ['none', 'single', 'multiple'],\n },\n },\n },\n};\n\ninterface Properties {\n compact?: boolean;\n emphasized?: boolean;\n justified?: boolean;\n quiet?: boolean;\n vertical?: boolean;\n selects?: 'none' | 'single' | 'multiple';\n [prop: string]: unknown;\n}\n\nconst template = (args: Properties): TemplateResult => {\n requestAnimationFrame(() => {\n const group = document.querySelector('sp-action-group') as ActionGroup;\n const selectedDiv = group.nextElementSibling;\n if (selectedDiv) {\n selectedDiv.textContent = `Selected: ${JSON.stringify(\n group.selected\n )}`;\n }\n });\n return html`\n <sp-action-group\n label=\"Favorite Color\"\n ...=${spreadProps(args)}\n @change=${({ target }: Event & { target: ActionGroup }) => {\n const next = target.nextElementSibling as HTMLDivElement;\n next.textContent = `Selected: ${JSON.stringify(\n target.selected\n )}`;\n }}\n >\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Red</sp-action-button>\n <sp-tooltip slot=\"hover-content\">\n This is a cool color.\n </sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Green</sp-action-button>\n <sp-tooltip slot=\"hover-content\">\n You wouldn't be wrong.\n </sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\" value=\"blue\" selected>\n Blue\n </sp-action-button>\n <sp-tooltip slot=\"hover-content\">The sky in spring.</sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Yellow</sp-action-button>\n <sp-tooltip slot=\"hover-content\">The sun at noon.</sp-tooltip>\n </overlay-trigger>\n </sp-action-group>\n ${!!args.selects\n ? html`\n <div>Selected:</div>\n `\n : html``}\n `;\n};\n\nexport const selectsSingle = (args: Properties): TemplateResult =>\n template(args);\nselectsSingle.args = {\n compact: true,\n emphasized: true,\n selects: 'single',\n};\n\nexport const selectsMultiple = (args: Properties): TemplateResult =>\n template(args);\nselectsMultiple.args = {\n compact: true,\n emphasized: true,\n selects: 'multiple',\n};\n\nexport const justified = (args: Properties): TemplateResult => template(args);\njustified.args = {\n compact: true,\n emphasized: true,\n justified: true,\n selects: undefined,\n};\n\nexport const vertical = (args: Properties): TemplateResult => template(args);\nvertical.args = {\n compact: true,\n emphasized: true,\n vertical: true,\n selects: undefined,\n};\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,qDACA,2DAEA,iEACA,mEACA,4DACA,uDACA,4EACA,sEACA,+EAGA,cAAe,CACX,MAAO,wBACP,UAAW,kBACX,KAAM,CACF,QAAS,GACT,WAAY,GACZ,UAAW,GACX,MAAO,GACP,SAAU,GACV,QAAS,MACb,EACA,SAAU,CACN,QAAS,CACL,KAAM,UACN,YACI,oFACJ,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,WAAY,CACR,KAAM,aACN,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,UAAW,CACP,KAAM,YACN,YACI,6EACJ,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,MAAO,CACH,KAAM,QACN,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,SAAU,CACN,KAAM,WACN,YAAa,+CACb,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,Q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sp-action-group.js";
|
|
4
|
-
import "@spectrum-web-components/action-button/sp-action-button.js";
|
|
5
|
-
import "@spectrum-web-components/overlay/overlay-trigger.js";
|
|
6
|
-
import "@spectrum-web-components/tooltip/sp-tooltip.js";
|
|
7
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js";
|
|
8
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";
|
|
9
|
-
import "@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js";
|
|
10
|
-
export default {
|
|
11
|
-
title: "Action Group",
|
|
12
|
-
component: "sp-action-group",
|
|
13
|
-
args: {
|
|
14
|
-
compact: false,
|
|
15
|
-
emphasized: false,
|
|
16
|
-
justified: false,
|
|
17
|
-
quiet: false,
|
|
18
|
-
vertical: false
|
|
19
|
-
},
|
|
20
|
-
argTypes: {
|
|
21
|
-
compact: {
|
|
22
|
-
name: "compact",
|
|
23
|
-
description: "Visually joins the buttons together to clarify their relationship to one another.",
|
|
24
|
-
type: { name: "boolean", required: false },
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: "boolean" },
|
|
27
|
-
defaultValue: { summary: false }
|
|
28
|
-
},
|
|
29
|
-
control: {
|
|
30
|
-
type: "boolean"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
emphasized: {
|
|
34
|
-
name: "emphasized",
|
|
35
|
-
type: { name: "boolean", required: false },
|
|
36
|
-
table: {
|
|
37
|
-
type: { summary: "boolean" },
|
|
38
|
-
defaultValue: { summary: false }
|
|
39
|
-
},
|
|
40
|
-
control: {
|
|
41
|
-
type: "boolean"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
justified: {
|
|
45
|
-
name: "justified",
|
|
46
|
-
description: "Aligns the action group items to use all the available space on that line.",
|
|
47
|
-
type: { name: "boolean", required: false },
|
|
48
|
-
table: {
|
|
49
|
-
type: { summary: "boolean" },
|
|
50
|
-
defaultValue: { summary: false }
|
|
51
|
-
},
|
|
52
|
-
control: {
|
|
53
|
-
type: "boolean"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
quiet: {
|
|
57
|
-
name: "quiet",
|
|
58
|
-
type: { name: "boolean", required: false },
|
|
59
|
-
table: {
|
|
60
|
-
type: { summary: "boolean" },
|
|
61
|
-
defaultValue: { summary: false }
|
|
62
|
-
},
|
|
63
|
-
control: {
|
|
64
|
-
type: "boolean"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
vertical: {
|
|
68
|
-
name: "vertical",
|
|
69
|
-
description: "Changes the orientation of the action group.",
|
|
70
|
-
type: { name: "boolean", required: false },
|
|
71
|
-
table: {
|
|
72
|
-
type: { summary: "boolean" },
|
|
73
|
-
defaultValue: { summary: false }
|
|
74
|
-
},
|
|
75
|
-
control: {
|
|
76
|
-
type: "boolean"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
function renderIconButtons(args) {
|
|
82
|
-
return html`
|
|
83
|
-
<sp-action-group ${spreadProps(args)}>
|
|
1
|
+
import{html as s}from"@spectrum-web-components/base";import{spreadProps as i}from"../../../test/lit-helpers.js";import"@spectrum-web-components/action-group/sp-action-group.js";import"@spectrum-web-components/action-button/sp-action-button.js";import"@spectrum-web-components/overlay/overlay-trigger.js";import"@spectrum-web-components/tooltip/sp-tooltip.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-info.js";import"@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js";export default{title:"Action Group",component:"sp-action-group",args:{compact:!1,emphasized:!1,justified:!1,quiet:!1,vertical:!1},argTypes:{compact:{name:"compact",description:"Visually joins the buttons together to clarify their relationship to one another.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},emphasized:{name:"emphasized",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},justified:{name:"justified",description:"Aligns the action group items to use all the available space on that line.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},quiet:{name:"quiet",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}},vertical:{name:"vertical",description:"Changes the orientation of the action group.",type:{name:"boolean",required:!1},table:{type:{summary:"boolean"},defaultValue:{summary:!1}},control:{type:"boolean"}}}};function o(t){return s`
|
|
2
|
+
<sp-action-group ${i(t)}>
|
|
84
3
|
<sp-action-button label="Properties">
|
|
85
4
|
<sp-icon-properties slot="icon"></sp-icon-properties>
|
|
86
5
|
</sp-action-button>
|
|
@@ -91,40 +10,22 @@ function renderIconButtons(args) {
|
|
|
91
10
|
<sp-icon-view-all-tags slot="icon"></sp-icon-view-all-tags>
|
|
92
11
|
</sp-action-button>
|
|
93
12
|
</sp-action-group>
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
function renderButtons(args) {
|
|
97
|
-
return html`
|
|
98
|
-
<sp-action-group ${spreadProps(args)}>
|
|
13
|
+
`}function r(t){return s`
|
|
14
|
+
<sp-action-group ${i(t)}>
|
|
99
15
|
<sp-action-button>Button 1</sp-action-button>
|
|
100
16
|
<sp-action-button>Longer Button 2</sp-action-button>
|
|
101
17
|
<sp-action-button>Short 3</sp-action-button>
|
|
102
18
|
</sp-action-group>
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
function displaySelectionState() {
|
|
106
|
-
const group = document.querySelector("sp-action-group");
|
|
107
|
-
const selectedDiv = group.nextElementSibling;
|
|
108
|
-
if (selectedDiv) {
|
|
109
|
-
selectedDiv.textContent = `Selected: ${JSON.stringify(group.selected)}`;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
export const Default = (args) => renderButtons(args);
|
|
113
|
-
export const selectsSingle = (args) => {
|
|
114
|
-
requestAnimationFrame(displaySelectionState);
|
|
115
|
-
return html`
|
|
19
|
+
`}function a(){const t=document.querySelector("sp-action-group"),e=t.nextElementSibling;e&&(e.textContent=`Selected: ${JSON.stringify(t.selected)}`)}export const Default=t=>r(t),selectsSingle=t=>(requestAnimationFrame(a),s`
|
|
116
20
|
<sp-action-group
|
|
117
|
-
?compact=${
|
|
118
|
-
?emphasized=${
|
|
119
|
-
?quiet=${
|
|
120
|
-
?justified=${
|
|
121
|
-
?vertical=${
|
|
21
|
+
?compact=${t.compact}
|
|
22
|
+
?emphasized=${t.emphasized}
|
|
23
|
+
?quiet=${t.quiet}
|
|
24
|
+
?justified=${t.justified}
|
|
25
|
+
?vertical=${t.vertical}
|
|
122
26
|
label="Favorite Color"
|
|
123
27
|
selects="single"
|
|
124
|
-
@change=${({
|
|
125
|
-
const next = target.nextElementSibling;
|
|
126
|
-
next.textContent = `Selected: ${JSON.stringify(target.selected)}`;
|
|
127
|
-
}}
|
|
28
|
+
@change=${({target:e})=>{const n=e.nextElementSibling;n.textContent=`Selected: ${JSON.stringify(e.selected)}`}}
|
|
128
29
|
>
|
|
129
30
|
<sp-action-button>Red</sp-action-button>
|
|
130
31
|
<sp-action-button>Green</sp-action-button>
|
|
@@ -132,19 +33,12 @@ export const selectsSingle = (args) => {
|
|
|
132
33
|
<sp-action-button selected>Yellow</sp-action-button>
|
|
133
34
|
</sp-action-group>
|
|
134
35
|
<div>Selected:</div>
|
|
135
|
-
|
|
136
|
-
};
|
|
137
|
-
export const selectsMultiple = (args) => {
|
|
138
|
-
requestAnimationFrame(displaySelectionState);
|
|
139
|
-
return html`
|
|
36
|
+
`),selectsMultiple=t=>(requestAnimationFrame(a),s`
|
|
140
37
|
<sp-action-group
|
|
141
|
-
${
|
|
38
|
+
${i(t)}
|
|
142
39
|
label="Favorite Colors"
|
|
143
40
|
selects="multiple"
|
|
144
|
-
@change=${({
|
|
145
|
-
const next = target.nextElementSibling;
|
|
146
|
-
next.textContent = `Selected: ${JSON.stringify(target.selected)}`;
|
|
147
|
-
}}
|
|
41
|
+
@change=${({target:e})=>{const n=e.nextElementSibling;n.textContent=`Selected: ${JSON.stringify(e.selected)}`}}
|
|
148
42
|
>
|
|
149
43
|
<sp-action-button>Red</sp-action-button>
|
|
150
44
|
<sp-action-button selected>Green</sp-action-button>
|
|
@@ -152,18 +46,12 @@ export const selectsMultiple = (args) => {
|
|
|
152
46
|
<sp-action-button>Yellow</sp-action-button>
|
|
153
47
|
</sp-action-group>
|
|
154
48
|
<div>Selected:</div>
|
|
155
|
-
|
|
156
|
-
};
|
|
157
|
-
export const selectsMultipleWithTooltips = (args) => {
|
|
158
|
-
return html`
|
|
49
|
+
`),selectsMultipleWithTooltips=t=>s`
|
|
159
50
|
<sp-action-group
|
|
160
|
-
${
|
|
51
|
+
${i(t)}
|
|
161
52
|
label="Favorite Color"
|
|
162
53
|
selects="multiple"
|
|
163
|
-
@change=${({
|
|
164
|
-
const next = target.nextElementSibling;
|
|
165
|
-
next.textContent = `Selected: ${JSON.stringify(target.selected)}`;
|
|
166
|
-
}}
|
|
54
|
+
@change=${({target:e})=>{const n=e.nextElementSibling;n.textContent=`Selected: ${JSON.stringify(e.selected)}`}}
|
|
167
55
|
>
|
|
168
56
|
<overlay-trigger>
|
|
169
57
|
<sp-action-button slot="trigger">Red</sp-action-button>
|
|
@@ -187,20 +75,13 @@ export const selectsMultipleWithTooltips = (args) => {
|
|
|
187
75
|
</overlay-trigger>
|
|
188
76
|
</sp-action-group>
|
|
189
77
|
<div>Selected:</div>
|
|
190
|
-
|
|
191
|
-
};
|
|
192
|
-
export const selectsMultipleControlled = (args) => {
|
|
193
|
-
requestAnimationFrame(displaySelectionState);
|
|
194
|
-
return html`
|
|
78
|
+
`,selectsMultipleControlled=t=>(requestAnimationFrame(a),s`
|
|
195
79
|
<sp-action-group
|
|
196
|
-
${
|
|
80
|
+
${i(t)}
|
|
197
81
|
selects="multiple"
|
|
198
|
-
.selected=${["donuts",
|
|
82
|
+
.selected=${["donuts","crepecakes"]}
|
|
199
83
|
label="Favorite Dessert"
|
|
200
|
-
@change=${({
|
|
201
|
-
const next = target.nextElementSibling;
|
|
202
|
-
next.textContent = `Selected: ${JSON.stringify(target.selected)}`;
|
|
203
|
-
}}
|
|
84
|
+
@change=${({target:e})=>{const n=e.nextElementSibling;n.textContent=`Selected: ${JSON.stringify(e.selected)}`}}
|
|
204
85
|
>
|
|
205
86
|
<sp-action-button value="lavacakes">Lava Cakes</sp-action-button>
|
|
206
87
|
<sp-action-button value="donuts">Donuts</sp-action-button>
|
|
@@ -208,66 +89,5 @@ export const selectsMultipleControlled = (args) => {
|
|
|
208
89
|
<sp-action-button value="fruittarts">Fruit Tarts</sp-action-button>
|
|
209
90
|
</sp-action-group>
|
|
210
91
|
<div>Selected:</div>
|
|
211
|
-
|
|
212
|
-
};
|
|
213
|
-
export const iconsOnly = (args) => renderIconButtons(args);
|
|
214
|
-
export const quietIconsOnly = (args) => renderIconButtons(args);
|
|
215
|
-
quietIconsOnly.args = {
|
|
216
|
-
quiet: true
|
|
217
|
-
};
|
|
218
|
-
export const compact = (args) => renderButtons(args);
|
|
219
|
-
compact.args = {
|
|
220
|
-
compact: true
|
|
221
|
-
};
|
|
222
|
-
export const compactIconsOnly = (args) => renderIconButtons(args);
|
|
223
|
-
compactIconsOnly.args = {
|
|
224
|
-
compact: true
|
|
225
|
-
};
|
|
226
|
-
export const compactQuietIconsOnly = (args) => renderIconButtons(args);
|
|
227
|
-
compactQuietIconsOnly.args = {
|
|
228
|
-
compact: true,
|
|
229
|
-
quiet: true
|
|
230
|
-
};
|
|
231
|
-
export const vertical = (args) => renderButtons(args);
|
|
232
|
-
vertical.args = {
|
|
233
|
-
vertical: true
|
|
234
|
-
};
|
|
235
|
-
export const verticalIconsOnly = (args) => renderIconButtons(args);
|
|
236
|
-
verticalIconsOnly.args = {
|
|
237
|
-
vertical: true
|
|
238
|
-
};
|
|
239
|
-
export const verticalQuietIconsOnly = (args) => renderIconButtons(args);
|
|
240
|
-
verticalQuietIconsOnly.args = {
|
|
241
|
-
quiet: true,
|
|
242
|
-
vertical: true
|
|
243
|
-
};
|
|
244
|
-
export const compactVertical = (args) => renderButtons(args);
|
|
245
|
-
compactVertical.args = {
|
|
246
|
-
compact: true,
|
|
247
|
-
vertical: true
|
|
248
|
-
};
|
|
249
|
-
export const compactVerticalIconsOnly = (args) => renderIconButtons(args);
|
|
250
|
-
compactVerticalIconsOnly.args = {
|
|
251
|
-
compact: true,
|
|
252
|
-
vertical: true
|
|
253
|
-
};
|
|
254
|
-
export const compactQuietVerticalIconsOnly = (args) => renderIconButtons(args);
|
|
255
|
-
compactQuietVerticalIconsOnly.args = {
|
|
256
|
-
compact: true,
|
|
257
|
-
quiet: true,
|
|
258
|
-
vertical: true
|
|
259
|
-
};
|
|
260
|
-
export const justified = (args) => renderButtons(args);
|
|
261
|
-
justified.args = {
|
|
262
|
-
justified: true
|
|
263
|
-
};
|
|
264
|
-
export const justifiedIconsOnly = (args) => renderIconButtons(args);
|
|
265
|
-
justifiedIconsOnly.args = {
|
|
266
|
-
justified: true
|
|
267
|
-
};
|
|
268
|
-
export const compactJustifiedIconsOnly = (args) => renderIconButtons(args);
|
|
269
|
-
compactJustifiedIconsOnly.args = {
|
|
270
|
-
compact: true,
|
|
271
|
-
justified: true
|
|
272
|
-
};
|
|
92
|
+
`),iconsOnly=t=>o(t),quietIconsOnly=t=>o(t);quietIconsOnly.args={quiet:!0};export const compact=t=>r(t);compact.args={compact:!0};export const compactIconsOnly=t=>o(t);compactIconsOnly.args={compact:!0};export const compactQuietIconsOnly=t=>o(t);compactQuietIconsOnly.args={compact:!0,quiet:!0};export const vertical=t=>r(t);vertical.args={vertical:!0};export const verticalIconsOnly=t=>o(t);verticalIconsOnly.args={vertical:!0};export const verticalQuietIconsOnly=t=>o(t);verticalQuietIconsOnly.args={quiet:!0,vertical:!0};export const compactVertical=t=>r(t);compactVertical.args={compact:!0,vertical:!0};export const compactVerticalIconsOnly=t=>o(t);compactVerticalIconsOnly.args={compact:!0,vertical:!0};export const compactQuietVerticalIconsOnly=t=>o(t);compactQuietVerticalIconsOnly.args={compact:!0,quiet:!0,vertical:!0};export const justified=t=>r(t);justified.args={justified:!0};export const justifiedIconsOnly=t=>o(t);justifiedIconsOnly.args={justified:!0};export const compactJustifiedIconsOnly=t=>o(t);compactJustifiedIconsOnly.args={compact:!0,justified:!0};
|
|
273
93
|
//# sourceMappingURL=action-group.stories.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-group.stories.ts"],
|
|
4
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 { html, TemplateResult } from '@spectrum-web-components/base';\nimport { spreadProps } from '../../../test/lit-helpers.js';\n\nimport '@spectrum-web-components/action-group/sp-action-group.js';\nimport '@spectrum-web-components/action-button/sp-action-button.js';\nimport '@spectrum-web-components/overlay/overlay-trigger.js';\nimport '@spectrum-web-components/tooltip/sp-tooltip.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-properties.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-info.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-view-all-tags.js';\nimport { ActionGroup } from '@spectrum-web-components/action-group/src/ActionGroup.js';\n\nexport default {\n title: 'Action Group',\n component: 'sp-action-group',\n args: {\n compact: false,\n emphasized: false,\n justified: false,\n quiet: false,\n vertical: false,\n },\n argTypes: {\n compact: {\n name: 'compact',\n description:\n 'Visually joins the buttons together to clarify their relationship to one another.',\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 emphasized: {\n name: 'emphasized',\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 justified: {\n name: 'justified',\n description:\n 'Aligns the action group items to use all the available space on that line.',\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 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 vertical: {\n name: 'vertical',\n description: 'Changes the orientation of the action group.',\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 },\n};\n\ninterface Properties {\n compact?: boolean;\n emphasized?: boolean;\n justified?: boolean;\n quiet?: boolean;\n vertical?: boolean;\n [prop: string]: unknown;\n}\n\nfunction renderIconButtons(args: Properties): TemplateResult {\n return html`\n <sp-action-group ${spreadProps(args)}>\n <sp-action-button label=\"Properties\">\n <sp-icon-properties slot=\"icon\"></sp-icon-properties>\n </sp-action-button>\n <sp-action-button label=\"Info\">\n <sp-icon-info slot=\"icon\"></sp-icon-info>\n </sp-action-button>\n <sp-action-button label=\"View All Tags\">\n <sp-icon-view-all-tags slot=\"icon\"></sp-icon-view-all-tags>\n </sp-action-button>\n </sp-action-group>\n `;\n}\n\nfunction renderButtons(args: Properties): TemplateResult {\n return html`\n <sp-action-group ${spreadProps(args)}>\n <sp-action-button>Button 1</sp-action-button>\n <sp-action-button>Longer Button 2</sp-action-button>\n <sp-action-button>Short 3</sp-action-button>\n </sp-action-group>\n `;\n}\n\nfunction displaySelectionState(): void {\n const group = document.querySelector('sp-action-group') as ActionGroup;\n const selectedDiv = group.nextElementSibling;\n if (selectedDiv) {\n selectedDiv.textContent = `Selected: ${JSON.stringify(group.selected)}`;\n }\n}\nexport const Default = (args: Properties): TemplateResult =>\n renderButtons(args);\n\nexport const selectsSingle = (args: Properties): TemplateResult => {\n requestAnimationFrame(displaySelectionState);\n return html`\n <sp-action-group\n ?compact=${args.compact}\n ?emphasized=${args.emphasized}\n ?quiet=${args.quiet}\n ?justified=${args.justified}\n ?vertical=${args.vertical}\n label=\"Favorite Color\"\n selects=\"single\"\n @change=${({ target }: Event & { target: ActionGroup }) => {\n const next = target.nextElementSibling as HTMLDivElement;\n next.textContent = `Selected: ${JSON.stringify(\n target.selected\n )}`;\n }}\n >\n <sp-action-button>Red</sp-action-button>\n <sp-action-button>Green</sp-action-button>\n <sp-action-button>Blue</sp-action-button>\n <sp-action-button selected>Yellow</sp-action-button>\n </sp-action-group>\n <div>Selected:</div>\n `;\n};\n\nexport const selectsMultiple = (args: Properties): TemplateResult => {\n requestAnimationFrame(displaySelectionState);\n return html`\n <sp-action-group\n ${spreadProps(args)}\n label=\"Favorite Colors\"\n selects=\"multiple\"\n @change=${({ target }: Event & { target: ActionGroup }) => {\n const next = target.nextElementSibling as HTMLDivElement;\n next.textContent = `Selected: ${JSON.stringify(\n target.selected\n )}`;\n }}\n >\n <sp-action-button>Red</sp-action-button>\n <sp-action-button selected>Green</sp-action-button>\n <sp-action-button selected>Blue</sp-action-button>\n <sp-action-button>Yellow</sp-action-button>\n </sp-action-group>\n <div>Selected:</div>\n `;\n};\n\nexport const selectsMultipleWithTooltips = (\n args: Properties\n): TemplateResult => {\n return html`\n <sp-action-group\n ${spreadProps(args)}\n label=\"Favorite Color\"\n selects=\"multiple\"\n @change=${({ target }: Event & { target: ActionGroup }) => {\n const next = target.nextElementSibling as HTMLDivElement;\n next.textContent = `Selected: ${JSON.stringify(\n target.selected\n )}`;\n }}\n >\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Red</sp-action-button>\n <sp-tooltip slot=\"hover-content\">\n This is a cool color.\n </sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Green</sp-action-button>\n <sp-tooltip slot=\"hover-content\">\n You wouldn't be wrong.\n </sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Blue</sp-action-button>\n <sp-tooltip slot=\"hover-content\">The sky in spring.</sp-tooltip>\n </overlay-trigger>\n <overlay-trigger>\n <sp-action-button slot=\"trigger\">Yellow</sp-action-button>\n <sp-tooltip slot=\"hover-content\">The sun at noon.</sp-tooltip>\n </overlay-trigger>\n </sp-action-group>\n <div>Selected:</div>\n `;\n};\n\nexport const selectsMultipleControlled = (args: Properties): TemplateResult => {\n requestAnimationFrame(displaySelectionState);\n return html`\n <sp-action-group\n ${spreadProps(args)}\n selects=\"multiple\"\n .selected=${['donuts', 'crepecakes']}\n label=\"Favorite Dessert\"\n @change=${({ target }: Event & { target: ActionGroup }) => {\n const next = target.nextElementSibling as HTMLDivElement;\n next.textContent = `Selected: ${JSON.stringify(\n target.selected\n )}`;\n }}\n >\n <sp-action-button value=\"lavacakes\">Lava Cakes</sp-action-button>\n <sp-action-button value=\"donuts\">Donuts</sp-action-button>\n <sp-action-button value=\"crepecakes\">Crepe Cake</sp-action-button>\n <sp-action-button value=\"fruittarts\">Fruit Tarts</sp-action-button>\n </sp-action-group>\n <div>Selected:</div>\n `;\n};\n\nexport const iconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\n\nexport const quietIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\nquietIconsOnly.args = {\n quiet: true,\n};\n\nexport const compact = (args: Properties): TemplateResult =>\n renderButtons(args);\ncompact.args = {\n compact: true,\n};\n\nexport const compactIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\ncompactIconsOnly.args = {\n compact: true,\n};\n\nexport const compactQuietIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\ncompactQuietIconsOnly.args = {\n compact: true,\n quiet: true,\n};\n\nexport const vertical = (args: Properties): TemplateResult =>\n renderButtons(args);\nvertical.args = {\n vertical: true,\n};\n\nexport const verticalIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\nverticalIconsOnly.args = {\n vertical: true,\n};\n\nexport const verticalQuietIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\nverticalQuietIconsOnly.args = {\n quiet: true,\n vertical: true,\n};\n\nexport const compactVertical = (args: Properties): TemplateResult =>\n renderButtons(args);\ncompactVertical.args = {\n compact: true,\n vertical: true,\n};\n\nexport const compactVerticalIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\ncompactVerticalIconsOnly.args = {\n compact: true,\n vertical: true,\n};\n\nexport const compactQuietVerticalIconsOnly = (\n args: Properties\n): TemplateResult => renderIconButtons(args);\ncompactQuietVerticalIconsOnly.args = {\n compact: true,\n quiet: true,\n vertical: true,\n};\n\nexport const justified = (args: Properties): TemplateResult =>\n renderButtons(args);\njustified.args = {\n justified: true,\n};\n\nexport const justifiedIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\njustifiedIconsOnly.args = {\n justified: true,\n};\n\nexport const compactJustifiedIconsOnly = (args: Properties): TemplateResult =>\n renderIconButtons(args);\ncompactJustifiedIconsOnly.args = {\n compact: true,\n justified: true,\n};\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,qDACA,2DAEA,iEACA,mEACA,4DACA,uDACA,4EACA,sEACA,+EAGA,cAAe,CACX,MAAO,eACP,UAAW,kBACX,KAAM,CACF,QAAS,GACT,WAAY,GACZ,UAAW,GACX,MAAO,GACP,SAAU,EACd,EACA,SAAU,CACN,QAAS,CACL,KAAM,UACN,YACI,oFACJ,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,CAAE,QAAS,SAAU,EAC3B,aAAc,CAAE,QAAS,EAAM,CACnC,EACA,QAAS,CACL,KAAM,SACV,CACJ,EACA,WAAY,CACR,KAAM,aACN,KAAM,CAAE,KAAM,UAAW,SAAU,EAAM,EACzC,MAAO,CACH,KAAM,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1B,iBAAiB,KAAO,CACpB,QAAS,EACb,EAEO,YAAM,uBAAwB,AAAC,GAClC,EAAkB,CAAI,EAC1B,sBAAsB,KAAO,CACzB,QAAS,GACT,MAAO,EACX,EAEO,YAAM,UAAW,AAAC,GACrB,EAAc,CAAI,EACtB,SAAS,KAAO,CACZ,SAAU,EACd,EAEO,YAAM,mBAAoB,AAAC,GAC9B,EAAkB,CAAI,EAC1B,kBAAkB,KAAO,CACrB,SAAU,EACd,EAEO,YAAM,wBAAyB,AAAC,GACnC,EAAkB,CAAI,EAC1B,uBAAuB,KAAO,CAC1B,MAAO,GACP,SAAU,EACd,EAEO,YAAM,iBAAkB,AAAC,GAC5B,EAAc,CAAI,EACtB,gBAAgB,KAAO,CACnB,QAAS,GACT,SAAU,EACd,EAEO,YAAM,0BAA2B,AAAC,GACrC,EAAkB,CAAI,EAC1B,yBAAyB,KAAO,CAC5B,QAAS,GACT,SAAU,EACd,EAEO,YAAM,+BAAgC,AACzC,GACiB,EAAkB,CAAI,EAC3C,8BAA8B,KAAO,CACjC,QAAS,GACT,MAAO,GACP,SAAU,EACd,EAEO,YAAM,WAAY,AAAC,GACtB,EAAc,CAAI,EACtB,UAAU,KAAO,CACb,UAAW,EACf,EAEO,YAAM,oBAAqB,AAAC,GAC/B,EAAkB,CAAI,EAC1B,mBAAmB,KAAO,CACtB,UAAW,EACf,EAEO,YAAM,2BAA4B,AAAC,GACtC,EAAkB,CAAI,EAC1B,0BAA0B,KAAO,CAC7B,QAAS,GACT,UAAW,EACf",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
-
regressVisuals("ActionGroupTooltipStories", stories);
|
|
1
|
+
import*as o from"../stories/action-group-tooltip.stories.js";import{regressVisuals as r}from"../../../test/visual/test.js";r("ActionGroupTooltipStories",o);
|
|
4
2
|
//# sourceMappingURL=action-group-tooltip.test-vrt.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-group-tooltip.test-vrt.ts"],
|
|
4
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/action-group-tooltip.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ActionGroupTooltipStories', stories);\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,6DACA,8DAEA,EAAe,4BAA6B,CAAO",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
-
regressVisuals("ActionGroupStories", stories);
|
|
1
|
+
import*as r from"../stories/action-group.stories.js";import{regressVisuals as o}from"../../../test/visual/test.js";o("ActionGroupStories",r);
|
|
4
2
|
//# sourceMappingURL=action-group.test-vrt.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["action-group.test-vrt.ts"],
|
|
4
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/action-group.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ActionGroupStories', stories);\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,qDACA,8DAEA,EAAe,qBAAsB,CAAO",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|