@spectrum-web-components/dialog 0.11.0-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.
@@ -1,48 +1,11 @@
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/field-label/sp-field-label.js";
5
- import "@spectrum-web-components/help-text/sp-help-text.js";
6
- import "@spectrum-web-components/textfield/sp-textfield.js";
7
- import "@spectrum-web-components/overlay/overlay-trigger.js";
8
- import "@spectrum-web-components/dialog/sp-dialog-wrapper.js";
9
- import { landscape } from "./images.js";
10
- export default {
11
- title: "Dialog Wrapped",
12
- component: "sp-dialog-wrapper",
13
- argTypes: {
14
- onClose: { action: "close" },
15
- onConfirm: { action: "confirm" },
16
- onSecondary: { action: "secondary" },
17
- onCancel: { action: "cancel" }
18
- }
19
- };
20
- const handleClose = ({ onClose }) => (event) => {
21
- if (onClose)
22
- onClose(event);
23
- };
24
- const handleConfirm = ({ onConfirm }) => (event) => {
25
- if (onConfirm)
26
- onConfirm(event);
27
- };
28
- const handleSecondary = ({ onSecondary }) => (event) => {
29
- if (onSecondary)
30
- onSecondary(event);
31
- };
32
- const handleCancel = ({ onCancel }) => (event) => {
33
- if (onCancel)
34
- onCancel(event);
35
- };
36
- export const wrapperLabeledHero = (args = {}, context = {}) => {
37
- const open = context.viewMode === "docs" ? false : true;
38
- return html`
1
+ import{html as a}from"@spectrum-web-components/base";import{ifDefined as p}from"@spectrum-web-components/base/src/directives.js";import"@spectrum-web-components/button/sp-button.js";import"@spectrum-web-components/field-label/sp-field-label.js";import"@spectrum-web-components/help-text/sp-help-text.js";import"@spectrum-web-components/textfield/sp-textfield.js";import"@spectrum-web-components/overlay/overlay-trigger.js";import"@spectrum-web-components/dialog/sp-dialog-wrapper.js";import{landscape as r}from"./images.js";export default{title:"Dialog Wrapped",component:"sp-dialog-wrapper",argTypes:{onClose:{action:"close"},onConfirm:{action:"confirm"},onSecondary:{action:"secondary"},onCancel:{action:"cancel"}}};const s=({onClose:e})=>i=>{e&&e(i)},l=({onConfirm:e})=>i=>{e&&e(i)},n=({onSecondary:e})=>i=>{e&&e(i)},u=({onCancel:e})=>i=>{e&&e(i)};export const wrapperLabeledHero=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
39
2
  <sp-dialog-wrapper
40
- ?open=${open}
41
- hero=${landscape}
3
+ ?open=${t}
4
+ hero=${r}
42
5
  hero-label="Hero Image Alt Text"
43
6
  dismissable
44
7
  headline="Wrapped Dialog w/ Hero Image"
45
- @close=${handleClose(args)}
8
+ @close=${s(e)}
46
9
  size="s"
47
10
  >
48
11
  Content of the dialog
@@ -58,17 +21,13 @@ export const wrapperLabeledHero = (args = {}, context = {}) => {
58
21
  >
59
22
  Toggle Dialog
60
23
  </sp-button>
61
- `;
62
- };
63
- export const wrapperDismissable = (args = {}, context = {}) => {
64
- const open = context.viewMode === "docs" ? false : true;
65
- return html`
24
+ `},wrapperDismissable=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
66
25
  <sp-dialog-wrapper
67
- ?open=${open}
68
- hero=${landscape}
26
+ ?open=${t}
27
+ hero=${r}
69
28
  dismissable
70
29
  headline="Wrapped Dialog w/ Hero Image"
71
- @close=${handleClose(args)}
30
+ @close=${s(e)}
72
31
  size="s"
73
32
  >
74
33
  Content of the dialog
@@ -84,18 +43,14 @@ export const wrapperDismissable = (args = {}, context = {}) => {
84
43
  >
85
44
  Toggle Dialog
86
45
  </sp-button>
87
- `;
88
- };
89
- export const wrapperDismissableUnderlay = (args = {}, context = {}) => {
90
- const open = context.viewMode === "docs" ? false : true;
91
- return html`
46
+ `},wrapperDismissableUnderlay=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
92
47
  <sp-dialog-wrapper
93
- ?open=${open}
94
- hero=${landscape}
48
+ ?open=${t}
49
+ hero=${r}
95
50
  dismissable
96
51
  headline="Wrapped Dialog w/ Hero Image"
97
52
  underlay
98
- @close=${handleClose(args)}
53
+ @close=${s(e)}
99
54
  size="s"
100
55
  >
101
56
  Content of the dialog
@@ -111,16 +66,12 @@ export const wrapperDismissableUnderlay = (args = {}, context = {}) => {
111
66
  >
112
67
  Toggle Dialog
113
68
  </sp-button>
114
- `;
115
- };
116
- export const form = (args = {}, context = {}) => {
117
- const open = context.viewMode === "docs" ? void 0 : "click";
118
- return html`
69
+ `},form=(e={},i={})=>{const t=i.viewMode==="docs"?void 0:"click";return a`
119
70
  <overlay-trigger
120
71
  type="modal"
121
72
  placement="none"
122
- @close=${handleClose(args)}
123
- open=${ifDefined(open)}
73
+ @close=${s(e)}
74
+ open=${p(t)}
124
75
  >
125
76
  <sp-button slot="trigger" variant="primary">
126
77
  Toggle Dialog
@@ -134,19 +85,10 @@ export const form = (args = {}, context = {}) => {
134
85
  confirm-label="Verify Address"
135
86
  secondary-label="Add"
136
87
  cancel-label="Cancel"
137
- @close=${handleClose(args)}
138
- @confirm=${({ target }) => {
139
- target.dispatchEvent(new Event("close", { bubbles: true, composed: true }));
140
- handleConfirm(args);
141
- }}
142
- @secondary=${({ target }) => {
143
- target.dispatchEvent(new Event("close", { bubbles: true, composed: true }));
144
- handleSecondary(args);
145
- }}
146
- @cancel=${({ target }) => {
147
- target.dispatchEvent(new Event("close", { bubbles: true, composed: true }));
148
- handleCancel(args);
149
- }}
88
+ @close=${s(e)}
89
+ @confirm=${({target:o})=>{o.dispatchEvent(new Event("close",{bubbles:!0,composed:!0})),l(e)}}
90
+ @secondary=${({target:o})=>{o.dispatchEvent(new Event("close",{bubbles:!0,composed:!0})),n(e)}}
91
+ @cancel=${({target:o})=>{o.dispatchEvent(new Event("close",{bubbles:!0,composed:!0})),u(e)}}
150
92
  >
151
93
  <style>
152
94
  #form-fields div {
@@ -186,48 +128,15 @@ export const form = (args = {}, context = {}) => {
186
128
  </div>
187
129
  </sp-dialog-wrapper>
188
130
  </overlay-trigger>
189
- `;
190
- };
191
- function nextFrame() {
192
- return new Promise((res) => requestAnimationFrame(() => res()));
193
- }
194
- class OverlayTriggerReady extends HTMLElement {
195
- constructor() {
196
- super();
197
- this.handleTriggerOpened = async () => {
198
- await nextFrame();
199
- this.ready(true);
200
- };
201
- this.readyPromise = Promise.resolve(false);
202
- this.readyPromise = new Promise((res) => {
203
- this.ready = res;
204
- this.setup();
205
- });
206
- }
207
- async setup() {
208
- await nextFrame();
209
- const overlay = document.querySelector(`overlay-trigger`);
210
- overlay.addEventListener("sp-opened", this.handleTriggerOpened);
211
- }
212
- get updateComplete() {
213
- return this.readyPromise;
214
- }
215
- }
216
- customElements.define("overlay-trigger-ready", OverlayTriggerReady);
217
- const overlayTriggerDecorator = (story) => {
218
- return html`
219
- ${story()}
131
+ `};function d(){return new Promise(e=>requestAnimationFrame(()=>e()))}class m extends HTMLElement{constructor(){super();this.handleTriggerOpened=async()=>{await d(),this.ready(!0)};this.readyPromise=Promise.resolve(!1);this.readyPromise=new Promise(i=>{this.ready=i,this.setup()})}async setup(){await d(),document.querySelector("overlay-trigger").addEventListener("sp-opened",this.handleTriggerOpened)}get updateComplete(){return this.readyPromise}}customElements.define("overlay-trigger-ready",m);const c=e=>a`
132
+ ${e()}
220
133
  <overlay-trigger-ready></overlay-trigger-ready>
221
- `;
222
- };
223
- export const longContent = (args = {}, context = {}) => {
224
- const open = context.viewMode === "docs" ? void 0 : "click";
225
- return html`
134
+ `;export const longContent=(e={},i={})=>{const t=i.viewMode==="docs"?void 0:"click";return a`
226
135
  <overlay-trigger
227
136
  type="modal"
228
137
  placement="none"
229
- @close=${handleClose(args)}
230
- open=${ifDefined(open)}
138
+ @close=${s(e)}
139
+ open=${p(t)}
231
140
  >
232
141
  <sp-button slot="trigger" variant="primary">
233
142
  Toggle Dialog
@@ -334,13 +243,20 @@ export const longContent = (args = {}, context = {}) => {
334
243
  </p>
335
244
  </sp-dialog-wrapper>
336
245
  </overlay-trigger>
337
- `;
338
- };
339
- longContent.decorators = [overlayTriggerDecorator];
340
- export const wrapperDismissableUnderlayError = (args = {}, context = {}) => {
341
- const open = context.viewMode === "docs" ? false : true;
342
- return html`
246
+ `};longContent.decorators=[c];export const wrapperDismissableUnderlayError=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
343
247
  <div>
248
+ <sp-dialog-wrapper
249
+ ?open=${t}
250
+ hero=${r}
251
+ dismissable
252
+ error
253
+ headline="Wrapped Dialog w/ Hero Image"
254
+ underlay
255
+ @close=${s(e)}
256
+ size="s"
257
+ >
258
+ Content of the dialog
259
+ </sp-dialog-wrapper>
344
260
  <sp-button
345
261
  onClick="
346
262
  this.previousElementSibling.open = !this.previousElementSibling.open;
@@ -352,46 +268,26 @@ export const wrapperDismissableUnderlayError = (args = {}, context = {}) => {
352
268
  >
353
269
  Toggle Dialog
354
270
  </sp-button>
355
- <sp-dialog-wrapper
356
- ?open=${open}
357
- hero=${landscape}
358
- dismissable
359
- error
360
- headline="Wrapped Dialog w/ Hero Image"
361
- underlay
362
- @close=${handleClose(args)}
363
- size="s"
364
- >
365
- Content of the dialog
366
- </sp-dialog-wrapper>
367
271
  </div>
368
- `;
369
- };
370
- export const wrapperButtons = (args = {}, context = {}) => {
371
- const open = context.viewMode === "docs" ? false : true;
372
- return html`
272
+ `},wrapperButtons=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
373
273
  <sp-dialog-wrapper
374
- ?open=${open}
274
+ ?open=${t}
375
275
  size="l"
376
276
  headline="Wrapped Dialog w/ Buttons"
377
277
  confirm-label="Keep Both"
378
278
  secondary-label="Replace"
379
279
  cancel-label="Cancel"
380
280
  footer="Content for footer"
381
- @close=${handleClose(args)}
382
- @confirm=${handleConfirm(args)}
383
- @secondary=${handleSecondary(args)}
384
- @cancel=${handleCancel(args)}
281
+ @close=${s(e)}
282
+ @confirm=${l(e)}
283
+ @secondary=${n(e)}
284
+ @cancel=${u(e)}
385
285
  >
386
286
  Content of the dialog
387
287
  </sp-dialog-wrapper>
388
- `;
389
- };
390
- export const wrapperButtonsUnderlay = (args = {}, context = {}) => {
391
- const open = context.viewMode === "docs" ? false : true;
392
- return html`
288
+ `},wrapperButtonsUnderlay=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
393
289
  <sp-dialog-wrapper
394
- ?open=${open}
290
+ ?open=${t}
395
291
  underlay
396
292
  size="l"
397
293
  headline="Wrapped Dialog w/ Buttons"
@@ -399,32 +295,27 @@ export const wrapperButtonsUnderlay = (args = {}, context = {}) => {
399
295
  secondary-label="Replace"
400
296
  cancel-label="Cancel"
401
297
  footer="Content for footer"
402
- @close=${handleClose(args)}
403
- @confirm=${handleConfirm(args)}
404
- @secondary=${handleSecondary(args)}
405
- @cancel=${handleCancel(args)}
298
+ @close=${s(e)}
299
+ @confirm=${l(e)}
300
+ @secondary=${n(e)}
301
+ @cancel=${u(e)}
406
302
  >
407
303
  Content of the dialog
408
304
  </sp-dialog-wrapper>
409
- `;
410
- };
411
- export const wrapperFullscreen = (args = {}, context = {}) => {
412
- const open = context.viewMode === "docs" ? false : true;
413
- return html`
305
+ `},wrapperFullscreen=(e={},i={})=>{const t=i.viewMode!=="docs";return a`
414
306
  <sp-dialog-wrapper
415
- ?open=${open}
307
+ ?open=${t}
416
308
  headline="Wrapped Dialog - Fullscreen"
417
309
  mode="fullscreen"
418
310
  confirm-label="Keep Both"
419
311
  secondary-label="Replace"
420
312
  cancel-label="Cancel"
421
- @close=${handleClose(args)}
422
- @confirm=${handleConfirm(args)}
423
- @secondary=${handleSecondary(args)}
424
- @cancel=${handleCancel(args)}
313
+ @close=${s(e)}
314
+ @confirm=${l(e)}
315
+ @secondary=${n(e)}
316
+ @cancel=${u(e)}
425
317
  >
426
318
  Content of the dialog
427
319
  </sp-dialog-wrapper>
428
- `;
429
- };
320
+ `};
430
321
  //# sourceMappingURL=dialog-wrapper.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["dialog-wrapper.stories.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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/field-label/sp-field-label.js';\nimport '@spectrum-web-components/help-text/sp-help-text.js';\nimport '@spectrum-web-components/textfield/sp-textfield.js';\nimport '@spectrum-web-components/overlay/overlay-trigger.js';\n\nimport '@spectrum-web-components/dialog/sp-dialog-wrapper.js';\nimport { landscape } from './images.js';\n\nexport default {\n title: 'Dialog Wrapped',\n component: 'sp-dialog-wrapper',\n argTypes: {\n onClose: { action: 'close' },\n onConfirm: { action: 'confirm' },\n onSecondary: { action: 'secondary' },\n onCancel: { action: 'cancel' },\n },\n};\n\ntype StoryArgs = {\n onClose?: (event: Event) => void;\n onConfirm?: (event: Event) => void;\n onSecondary?: (event: Event) => void;\n onCancel?: (event: Event) => void;\n};\n\nconst handleClose =\n ({ onClose }: StoryArgs) =>\n (event: Event) => {\n if (onClose) onClose(event);\n };\n\nconst handleConfirm =\n ({ onConfirm }: StoryArgs) =>\n (event: Event) => {\n if (onConfirm) onConfirm(event);\n };\n\nconst handleSecondary =\n ({ onSecondary }: StoryArgs) =>\n (event: Event) => {\n if (onSecondary) onSecondary(event);\n };\n\nconst handleCancel =\n ({ onCancel }: StoryArgs) =>\n (event: Event) => {\n if (onCancel) onCancel(event);\n };\n\nexport const wrapperLabeledHero = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n hero-label=\"Hero Image Alt Text\"\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const wrapperDismissable = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const wrapperDismissableUnderlay = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n underlay\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const form = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? undefined : 'click';\n return html`\n <overlay-trigger\n type=\"modal\"\n placement=\"none\"\n @close=${handleClose(args)}\n open=${ifDefined(open)}\n >\n <sp-button slot=\"trigger\" variant=\"primary\">\n Toggle Dialog\n </sp-button>\n <sp-dialog-wrapper\n id=\"form-fields\"\n slot=\"click-content\"\n headline=\"Add Delivery Address\"\n underlay\n size=\"m\"\n confirm-label=\"Verify Address\"\n secondary-label=\"Add\"\n cancel-label=\"Cancel\"\n @close=${handleClose(args)}\n @confirm=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleConfirm(args);\n }}\n @secondary=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleSecondary(args);\n }}\n @cancel=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleCancel(args);\n }}\n >\n <style>\n #form-fields div {\n display: grid;\n gap: var(--spectrum-global-dimension-size-150);\n grid-template-columns: auto auto;\n\n --spectrum-fieldlabel-m-side-padding-right: 0;\n }\n </style>\n <div>\n <sp-field-label side-aligned=\"end\" for=\"street\">\n Street:\n </sp-field-label>\n <sp-textfield id=\"street\" autofocus></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"city\">\n City:\n </sp-field-label>\n <sp-textfield id=\"city\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"state\">\n State:\n </sp-field-label>\n <sp-textfield id=\"state\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"zip\">\n Zip:\n </sp-field-label>\n <sp-textfield id=\"zip\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"instructions\">\n Special instructions:\n </sp-field-label>\n <sp-textfield id=\"instructions\" multiline>\n <sp-help-text slot=\"help-text\">\n For example, gate code or other information to help\n the driver find you\n </sp-help-text>\n </sp-textfield>\n </div>\n </sp-dialog-wrapper>\n </overlay-trigger>\n `;\n};\n\nfunction nextFrame(): Promise<void> {\n return new Promise((res) => requestAnimationFrame(() => res()));\n}\n\nclass OverlayTriggerReady extends HTMLElement {\n ready!: (value: boolean | PromiseLike<boolean>) => void;\n\n constructor() {\n super();\n this.readyPromise = new Promise((res) => {\n this.ready = res;\n this.setup();\n });\n }\n\n async setup(): Promise<void> {\n await nextFrame();\n\n const overlay = document.querySelector(\n `overlay-trigger`\n ) as HTMLElement;\n overlay.addEventListener('sp-opened', this.handleTriggerOpened);\n }\n\n handleTriggerOpened = async (): Promise<void> => {\n await nextFrame();\n\n this.ready(true);\n };\n\n private readyPromise: Promise<boolean> = Promise.resolve(false);\n\n get updateComplete(): Promise<boolean> {\n return this.readyPromise;\n }\n}\n\ncustomElements.define('overlay-trigger-ready', OverlayTriggerReady);\n\nconst overlayTriggerDecorator = (\n story: () => TemplateResult\n): TemplateResult => {\n return html`\n ${story()}\n <overlay-trigger-ready></overlay-trigger-ready>\n `;\n};\n\nexport const longContent = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? undefined : 'click';\n return html`\n <overlay-trigger\n type=\"modal\"\n placement=\"none\"\n @close=${handleClose(args)}\n open=${ifDefined(open)}\n >\n <sp-button slot=\"trigger\" variant=\"primary\">\n Toggle Dialog\n </sp-button>\n <sp-dialog-wrapper\n slot=\"click-content\"\n headline=\"Dialog title\"\n dismissable\n underlay\n size=\"s\"\n >\n <p>\n Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n Sed ac dolor sit amet purus malesuada congue. Donec quis\n nibh at felis congue commodo. Ut enim ad minima veniam, quis\n nostrum exercitationem ullam corporis suscipit laboriosam,\n nisi ut aliquid ex ea commodi consequatur? Sed ac dolor sit\n amet purus malesuada congue. Nam libero tempore, cum soluta\n nobis est eligendi optio cumque nihil impedit quo minus id\n quod maxime placeat facere possimus, omnis voluptas\n assumenda est, omnis dolor repellendus. Nullam sit amet\n magna in magna gravida vehicula. Itaque earum rerum hic\n tenetur a sapiente delectus, ut aut reiciendis voluptatibus\n maiores alias consequatur aut perferendis doloribus\n asperiores repellat. Neque porro quisquam est, qui dolorem\n ipsum quia dolor sit amet, consectetur, adipisci velit, sed\n quia non numquam eius modi tempora incidunt ut labore et\n dolore magnam aliquam quaerat voluptatem. Phasellus faucibus\n molestie nisl. Vestibulum fermentum tortor id mi. Integer\n rutrum, orci vestibulum ullamcorper ultricies, lacus quam\n ultricies odio, vitae placerat pede sem sit amet enim.\n Maecenas sollicitudin. Nullam rhoncus aliquam metus.\n </p>\n <p>\n Curabitur ligula sapien, pulvinar a vestibulum quis,\n facilisis vel sapien. Fusce nibh. Proin pede metus,\n vulputate nec, fermentum fringilla, vehicula vitae, justo.\n Aenean placerat. Aliquam erat volutpat. Et harum quidem\n rerum facilis est et expedita distinctio. Fusce nibh.\n Temporibus autem quibusdam et aut officiis debitis aut rerum\n necessitatibus saepe eveniet ut et voluptates repudiandae\n sint et molestiae non recusandae. Vestibulum erat nulla,\n ullamcorper nec, rutrum non, nonummy ac, erat. Etiam posuere\n lacus quis dolor. Mauris elementum mauris vitae tortor.\n Nulla turpis magna, cursus sit amet, suscipit a, interdum\n id, felis. Nam libero tempore, cum soluta nobis est eligendi\n optio cumque nihil impedit quo minus id quod maxime placeat\n facere possimus, omnis voluptas assumenda est, omnis dolor\n repellendus. Nulla accumsan, elit sit amet varius semper,\n nulla mauris mollis quam, tempor suscipit diam nulla vel\n leo. Pellentesque sapien.\n </p>\n <p>\n Curabitur vitae diam non enim vestibulum interdum. Sed elit\n dui, pellentesque a, faucibus vel, interdum nec, diam.\n Praesent vitae arcu tempor neque lacinia pretium. Ut tempus\n purus at lorem. Phasellus rhoncus. Temporibus autem\n quibusdam et aut officiis debitis aut rerum necessitatibus\n saepe eveniet ut et voluptates repudiandae sint et molestiae\n non recusandae. Duis ante orci, molestie vitae vehicula\n venenatis, tincidunt ac pede. Integer vulputate sem a nibh\n rutrum consequat. Aenean placerat. Cum sociis natoque\n penatibus et magnis dis parturient montes, nascetur\n ridiculus mus. Sed vel lectus. Donec odio tempus molestie,\n porttitor ut, iaculis quis, sem. Class aptent taciti\n sociosqu ad litora torquent per conubia nostra, per inceptos\n hymenaeos. Integer in sapien. Nullam dapibus fermentum\n ipsum.\n </p>\n <p>\n Integer vulputate sem a nibh rutrum consequat. Class aptent\n taciti sociosqu ad litora torquent per conubia nostra, per\n inceptos hymenaeos. Duis bibendum, lectus ut viverra\n rhoncus, dolor nunc faucibus libero, eget facilisis enim\n ipsum id lacus. Aliquam erat volutpat. Aenean id metus id\n velit ullamcorper pulvinar. Morbi scelerisque luctus velit.\n Aliquam erat volutpat. Temporibus autem quibusdam et aut\n officiis debitis aut rerum necessitatibus saepe eveniet ut\n et voluptates repudiandae sint et molestiae non recusandae.\n Fusce dui leo, imperdiet in, aliquam sit amet, feugiat eu,\n orci. Suspendisse sagittis ultrices augue. Nullam justo\n enim, consectetuer nec, ullamcorper ac, vestibulum in, elit.\n Praesent vitae arcu tempor neque lacinia pretium. Nullam\n faucibus mi quis velit. Maecenas aliquet accumsan leo. Morbi\n scelerisque luctus velit. Aliquam ornare wisi eu metus.\n </p>\n <p>\n Sed elit dui, pellentesque a, faucibus vel, interdum nec,\n diam. Praesent vitae arcu tempor neque lacinia pretium.\n Etiam dictum tincidunt diam. Et harum quidem rerum facilis\n est et expedita distinctio. Duis ante orci, molestie vitae\n vehicula venenatis, tincidunt ac pede. Integer lacinia.\n Excepteur sint occaecat cupidatat non proident, sunt in\n culpa qui officia deserunt mollit anim id est laborum.\n Mauris tincidunt sem sed arcu. Praesent in mauris eu tortor\n porttitor accumsan. Aenean id metus id velit ullamcorper\n pulvinar. Donec iaculis gravida nulla. Duis bibendum, lectus\n ut viverra rhoncus, dolor nunc faucibus libero, eget\n facilisis enim ipsum id lacus. Nulla quis diam. Quisque\n porta. Integer rutrum, orci vestibulum ullamcorper\n ultricies, lacus quam ultricies odio, vitae placerat pede\n sem sit amet enim. Nam sed tellus id magna elementum\n tincidunt. In enim a arcu imperdiet malesuada.\n </p>\n </sp-dialog-wrapper>\n </overlay-trigger>\n `;\n};\n\nlongContent.decorators = [overlayTriggerDecorator];\n\nexport const wrapperDismissableUnderlayError = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <div>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n error\n headline=\"Wrapped Dialog w/ Hero Image\"\n underlay\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n </div>\n `;\n};\n\nexport const wrapperButtons = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n size=\"l\"\n headline=\"Wrapped Dialog w/ Buttons\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n footer=\"Content for footer\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n\nexport const wrapperButtonsUnderlay = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n underlay\n size=\"l\"\n headline=\"Wrapped Dialog w/ Buttons\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n footer=\"Content for footer\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n\nexport const wrapperFullscreen = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n headline=\"Wrapped Dialog - Fullscreen\"\n mode=\"fullscreen\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n"],
5
- "mappings": "AAYA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,IACN,SAAS,EAAE,QAAQ,QAAQ;AAAA,IAC3B,WAAW,EAAE,QAAQ,UAAU;AAAA,IAC/B,aAAa,EAAE,QAAQ,YAAY;AAAA,IACnC,UAAU,EAAE,QAAQ,SAAS;AAAA,EACjC;AACJ;AASA,MAAM,cACF,CAAC,EAAE,cACH,CAAC,UAAiB;AACd,MAAI;AAAS,YAAQ,KAAK;AAC9B;AAEJ,MAAM,gBACF,CAAC,EAAE,gBACH,CAAC,UAAiB;AACd,MAAI;AAAW,cAAU,KAAK;AAClC;AAEJ,MAAM,kBACF,CAAC,EAAE,kBACH,CAAC,UAAiB;AACd,MAAI;AAAa,gBAAY,KAAK;AACtC;AAEJ,MAAM,eACF,CAAC,EAAE,eACH,CAAC,UAAiB;AACd,MAAI;AAAU,aAAS,KAAK;AAChC;AAEG,aAAM,qBAAqB,CAC9B,OAAkB,CAAC,GACnB,UAAiC,CAAC,MACjB;AACjB,QAAM,OAAO,QAAQ,aAAa,SAAS,QAAQ;AACnD,SAAO;AAAA;AAAA,oBAES;AAAA,mBACD;AAAA;AAAA;AAAA;AAAA,qBAIE,YAAY,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA,sBACvB,aAAa,IAAI;AAAA;AAAA;AAAA;AAAA;AAKvC;AAEO,aAAM,yBAAyB,CAClC,OAAkB,CAAC,GACnB,UAAiC,CAAC,MACjB;AACjB,QAAM,OAAO,QAAQ,aAAa,SAAS,QAAQ;AACnD,SAAO;AAAA;AAAA,oBAES;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQC,YAAY,IAAI;AAAA,uBACd,cAAc,IAAI;AAAA,yBAChB,gBAAgB,IAAI;AAAA,sBACvB,aAAa,IAAI;AAAA;AAAA;AAAA;AAAA;AAKvC;AAEO,aAAM,oBAAoB,CAC7B,OAAkB,CAAC,GACnB,UAAiC,CAAC,MACjB;AACjB,QAAM,OAAO,QAAQ,aAAa,SAAS,QAAQ;AACnD,SAAO;AAAA;AAAA,oBAES;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAMC,YAAY,IAAI;AAAA,uBACd,cAAc,IAAI;AAAA,yBAChB,gBAAgB,IAAI;AAAA,sBACvB,aAAa,IAAI;AAAA;AAAA;AAAA;AAAA;AAKvC;",
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 { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport '@spectrum-web-components/button/sp-button.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport '@spectrum-web-components/help-text/sp-help-text.js';\nimport '@spectrum-web-components/textfield/sp-textfield.js';\nimport '@spectrum-web-components/overlay/overlay-trigger.js';\n\nimport '@spectrum-web-components/dialog/sp-dialog-wrapper.js';\nimport { landscape } from './images.js';\n\nexport default {\n title: 'Dialog Wrapped',\n component: 'sp-dialog-wrapper',\n argTypes: {\n onClose: { action: 'close' },\n onConfirm: { action: 'confirm' },\n onSecondary: { action: 'secondary' },\n onCancel: { action: 'cancel' },\n },\n};\n\ntype StoryArgs = {\n onClose?: (event: Event) => void;\n onConfirm?: (event: Event) => void;\n onSecondary?: (event: Event) => void;\n onCancel?: (event: Event) => void;\n};\n\nconst handleClose =\n ({ onClose }: StoryArgs) =>\n (event: Event) => {\n if (onClose) onClose(event);\n };\n\nconst handleConfirm =\n ({ onConfirm }: StoryArgs) =>\n (event: Event) => {\n if (onConfirm) onConfirm(event);\n };\n\nconst handleSecondary =\n ({ onSecondary }: StoryArgs) =>\n (event: Event) => {\n if (onSecondary) onSecondary(event);\n };\n\nconst handleCancel =\n ({ onCancel }: StoryArgs) =>\n (event: Event) => {\n if (onCancel) onCancel(event);\n };\n\nexport const wrapperLabeledHero = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n hero-label=\"Hero Image Alt Text\"\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const wrapperDismissable = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const wrapperDismissableUnderlay = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n headline=\"Wrapped Dialog w/ Hero Image\"\n underlay\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n `;\n};\n\nexport const form = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? undefined : 'click';\n return html`\n <overlay-trigger\n type=\"modal\"\n placement=\"none\"\n @close=${handleClose(args)}\n open=${ifDefined(open)}\n >\n <sp-button slot=\"trigger\" variant=\"primary\">\n Toggle Dialog\n </sp-button>\n <sp-dialog-wrapper\n id=\"form-fields\"\n slot=\"click-content\"\n headline=\"Add Delivery Address\"\n underlay\n size=\"m\"\n confirm-label=\"Verify Address\"\n secondary-label=\"Add\"\n cancel-label=\"Cancel\"\n @close=${handleClose(args)}\n @confirm=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleConfirm(args);\n }}\n @secondary=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleSecondary(args);\n }}\n @cancel=${({ target }: Event & { target: HTMLElement }) => {\n target.dispatchEvent(\n new Event('close', { bubbles: true, composed: true })\n );\n handleCancel(args);\n }}\n >\n <style>\n #form-fields div {\n display: grid;\n gap: var(--spectrum-global-dimension-size-150);\n grid-template-columns: auto auto;\n\n --spectrum-fieldlabel-m-side-padding-right: 0;\n }\n </style>\n <div>\n <sp-field-label side-aligned=\"end\" for=\"street\">\n Street:\n </sp-field-label>\n <sp-textfield id=\"street\" autofocus></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"city\">\n City:\n </sp-field-label>\n <sp-textfield id=\"city\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"state\">\n State:\n </sp-field-label>\n <sp-textfield id=\"state\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"zip\">\n Zip:\n </sp-field-label>\n <sp-textfield id=\"zip\"></sp-textfield>\n <sp-field-label side-aligned=\"end\" for=\"instructions\">\n Special instructions:\n </sp-field-label>\n <sp-textfield id=\"instructions\" multiline>\n <sp-help-text slot=\"help-text\">\n For example, gate code or other information to help\n the driver find you\n </sp-help-text>\n </sp-textfield>\n </div>\n </sp-dialog-wrapper>\n </overlay-trigger>\n `;\n};\n\nfunction nextFrame(): Promise<void> {\n return new Promise((res) => requestAnimationFrame(() => res()));\n}\n\nclass OverlayTriggerReady extends HTMLElement {\n ready!: (value: boolean | PromiseLike<boolean>) => void;\n\n constructor() {\n super();\n this.readyPromise = new Promise((res) => {\n this.ready = res;\n this.setup();\n });\n }\n\n async setup(): Promise<void> {\n await nextFrame();\n\n const overlay = document.querySelector(\n `overlay-trigger`\n ) as HTMLElement;\n overlay.addEventListener('sp-opened', this.handleTriggerOpened);\n }\n\n handleTriggerOpened = async (): Promise<void> => {\n await nextFrame();\n\n this.ready(true);\n };\n\n private readyPromise: Promise<boolean> = Promise.resolve(false);\n\n get updateComplete(): Promise<boolean> {\n return this.readyPromise;\n }\n}\n\ncustomElements.define('overlay-trigger-ready', OverlayTriggerReady);\n\nconst overlayTriggerDecorator = (\n story: () => TemplateResult\n): TemplateResult => {\n return html`\n ${story()}\n <overlay-trigger-ready></overlay-trigger-ready>\n `;\n};\n\nexport const longContent = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? undefined : 'click';\n return html`\n <overlay-trigger\n type=\"modal\"\n placement=\"none\"\n @close=${handleClose(args)}\n open=${ifDefined(open)}\n >\n <sp-button slot=\"trigger\" variant=\"primary\">\n Toggle Dialog\n </sp-button>\n <sp-dialog-wrapper\n slot=\"click-content\"\n headline=\"Dialog title\"\n dismissable\n underlay\n size=\"s\"\n >\n <p>\n Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n Sed ac dolor sit amet purus malesuada congue. Donec quis\n nibh at felis congue commodo. Ut enim ad minima veniam, quis\n nostrum exercitationem ullam corporis suscipit laboriosam,\n nisi ut aliquid ex ea commodi consequatur? Sed ac dolor sit\n amet purus malesuada congue. Nam libero tempore, cum soluta\n nobis est eligendi optio cumque nihil impedit quo minus id\n quod maxime placeat facere possimus, omnis voluptas\n assumenda est, omnis dolor repellendus. Nullam sit amet\n magna in magna gravida vehicula. Itaque earum rerum hic\n tenetur a sapiente delectus, ut aut reiciendis voluptatibus\n maiores alias consequatur aut perferendis doloribus\n asperiores repellat. Neque porro quisquam est, qui dolorem\n ipsum quia dolor sit amet, consectetur, adipisci velit, sed\n quia non numquam eius modi tempora incidunt ut labore et\n dolore magnam aliquam quaerat voluptatem. Phasellus faucibus\n molestie nisl. Vestibulum fermentum tortor id mi. Integer\n rutrum, orci vestibulum ullamcorper ultricies, lacus quam\n ultricies odio, vitae placerat pede sem sit amet enim.\n Maecenas sollicitudin. Nullam rhoncus aliquam metus.\n </p>\n <p>\n Curabitur ligula sapien, pulvinar a vestibulum quis,\n facilisis vel sapien. Fusce nibh. Proin pede metus,\n vulputate nec, fermentum fringilla, vehicula vitae, justo.\n Aenean placerat. Aliquam erat volutpat. Et harum quidem\n rerum facilis est et expedita distinctio. Fusce nibh.\n Temporibus autem quibusdam et aut officiis debitis aut rerum\n necessitatibus saepe eveniet ut et voluptates repudiandae\n sint et molestiae non recusandae. Vestibulum erat nulla,\n ullamcorper nec, rutrum non, nonummy ac, erat. Etiam posuere\n lacus quis dolor. Mauris elementum mauris vitae tortor.\n Nulla turpis magna, cursus sit amet, suscipit a, interdum\n id, felis. Nam libero tempore, cum soluta nobis est eligendi\n optio cumque nihil impedit quo minus id quod maxime placeat\n facere possimus, omnis voluptas assumenda est, omnis dolor\n repellendus. Nulla accumsan, elit sit amet varius semper,\n nulla mauris mollis quam, tempor suscipit diam nulla vel\n leo. Pellentesque sapien.\n </p>\n <p>\n Curabitur vitae diam non enim vestibulum interdum. Sed elit\n dui, pellentesque a, faucibus vel, interdum nec, diam.\n Praesent vitae arcu tempor neque lacinia pretium. Ut tempus\n purus at lorem. Phasellus rhoncus. Temporibus autem\n quibusdam et aut officiis debitis aut rerum necessitatibus\n saepe eveniet ut et voluptates repudiandae sint et molestiae\n non recusandae. Duis ante orci, molestie vitae vehicula\n venenatis, tincidunt ac pede. Integer vulputate sem a nibh\n rutrum consequat. Aenean placerat. Cum sociis natoque\n penatibus et magnis dis parturient montes, nascetur\n ridiculus mus. Sed vel lectus. Donec odio tempus molestie,\n porttitor ut, iaculis quis, sem. Class aptent taciti\n sociosqu ad litora torquent per conubia nostra, per inceptos\n hymenaeos. Integer in sapien. Nullam dapibus fermentum\n ipsum.\n </p>\n <p>\n Integer vulputate sem a nibh rutrum consequat. Class aptent\n taciti sociosqu ad litora torquent per conubia nostra, per\n inceptos hymenaeos. Duis bibendum, lectus ut viverra\n rhoncus, dolor nunc faucibus libero, eget facilisis enim\n ipsum id lacus. Aliquam erat volutpat. Aenean id metus id\n velit ullamcorper pulvinar. Morbi scelerisque luctus velit.\n Aliquam erat volutpat. Temporibus autem quibusdam et aut\n officiis debitis aut rerum necessitatibus saepe eveniet ut\n et voluptates repudiandae sint et molestiae non recusandae.\n Fusce dui leo, imperdiet in, aliquam sit amet, feugiat eu,\n orci. Suspendisse sagittis ultrices augue. Nullam justo\n enim, consectetuer nec, ullamcorper ac, vestibulum in, elit.\n Praesent vitae arcu tempor neque lacinia pretium. Nullam\n faucibus mi quis velit. Maecenas aliquet accumsan leo. Morbi\n scelerisque luctus velit. Aliquam ornare wisi eu metus.\n </p>\n <p>\n Sed elit dui, pellentesque a, faucibus vel, interdum nec,\n diam. Praesent vitae arcu tempor neque lacinia pretium.\n Etiam dictum tincidunt diam. Et harum quidem rerum facilis\n est et expedita distinctio. Duis ante orci, molestie vitae\n vehicula venenatis, tincidunt ac pede. Integer lacinia.\n Excepteur sint occaecat cupidatat non proident, sunt in\n culpa qui officia deserunt mollit anim id est laborum.\n Mauris tincidunt sem sed arcu. Praesent in mauris eu tortor\n porttitor accumsan. Aenean id metus id velit ullamcorper\n pulvinar. Donec iaculis gravida nulla. Duis bibendum, lectus\n ut viverra rhoncus, dolor nunc faucibus libero, eget\n facilisis enim ipsum id lacus. Nulla quis diam. Quisque\n porta. Integer rutrum, orci vestibulum ullamcorper\n ultricies, lacus quam ultricies odio, vitae placerat pede\n sem sit amet enim. Nam sed tellus id magna elementum\n tincidunt. In enim a arcu imperdiet malesuada.\n </p>\n </sp-dialog-wrapper>\n </overlay-trigger>\n `;\n};\n\nlongContent.decorators = [overlayTriggerDecorator];\n\nexport const wrapperDismissableUnderlayError = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <div>\n <sp-dialog-wrapper\n ?open=${open}\n hero=${landscape}\n dismissable\n error\n headline=\"Wrapped Dialog w/ Hero Image\"\n underlay\n @close=${handleClose(args)}\n size=\"s\"\n >\n Content of the dialog\n </sp-dialog-wrapper>\n <sp-button\n onClick=\"\n this.previousElementSibling.open = !this.previousElementSibling.open;\n if (this.previousElementSibling.open) {\n this.previousElementSibling.focus();\n }\n \"\n variant=\"primary\"\n >\n Toggle Dialog\n </sp-button>\n </div>\n `;\n};\n\nexport const wrapperButtons = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n size=\"l\"\n headline=\"Wrapped Dialog w/ Buttons\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n footer=\"Content for footer\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n\nexport const wrapperButtonsUnderlay = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n underlay\n size=\"l\"\n headline=\"Wrapped Dialog w/ Buttons\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n footer=\"Content for footer\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n\nexport const wrapperFullscreen = (\n args: StoryArgs = {},\n context: { viewMode?: string } = {}\n): TemplateResult => {\n const open = context.viewMode === 'docs' ? false : true;\n return html`\n <sp-dialog-wrapper\n ?open=${open}\n headline=\"Wrapped Dialog - Fullscreen\"\n mode=\"fullscreen\"\n confirm-label=\"Keep Both\"\n secondary-label=\"Replace\"\n cancel-label=\"Cancel\"\n @close=${handleClose(args)}\n @confirm=${handleConfirm(args)}\n @secondary=${handleSecondary(args)}\n @cancel=${handleCancel(args)}\n >\n Content of the dialog\n </sp-dialog-wrapper>\n `;\n};\n"],
5
+ "mappings": "AAYA,qDACA,4EAEA,qDACA,+DACA,2DACA,2DACA,4DAEA,6DACA,wCAEA,cAAe,CACX,MAAO,iBACP,UAAW,oBACX,SAAU,CACN,QAAS,CAAE,OAAQ,OAAQ,EAC3B,UAAW,CAAE,OAAQ,SAAU,EAC/B,YAAa,CAAE,OAA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OAClC,MAAO;AAAA;AAAA;AAAA,wBAGa;AAAA,uBACD;AAAA;AAAA;AAAA;AAAA;AAAA,yBAKE,EAAY,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAkBzC,EAEa,eAAiB,CAC1B,EAAkB,CAAC,EACnB,EAAiC,CAAC,IACjB,CACjB,KAAM,GAAO,EAAQ,WAAa,OAClC,MAAO;AAAA;AAAA,oBAES;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAOC,EAAY,CAAI;AAAA,uBACd,EAAc,CAAI;AAAA,yBAChB,EAAgB,CAAI;AAAA,sBACvB,EAAa,CAAI;AAAA;AAAA;AAAA;AAAA,KAKvC,EAEa,uBAAyB,CAClC,EAAkB,CAAC,EACnB,EAAiC,CAAC,IACjB,CACjB,KAAM,GAAO,EAAQ,WAAa,OAClC,MAAO;AAAA;AAAA,oBAES;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAQC,EAAY,CAAI;AAAA,uBACd,EAAc,CAAI;AAAA,yBAChB,EAAgB,CAAI;AAAA,sBACvB,EAAa,CAAI;AAAA;AAAA;AAAA;AAAA,KAKvC,EAEa,kBAAoB,CAC7B,EAAkB,CAAC,EACnB,EAAiC,CAAC,IACjB,CACjB,KAAM,GAAO,EAAQ,WAAa,OAClC,MAAO;AAAA;AAAA,oBAES;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAMC,EAAY,CAAI;AAAA,uBACd,EAAc,CAAI;AAAA,yBAChB,EAAgB,CAAI;AAAA,sBACvB,EAAa,CAAI;AAAA;AAAA;AAAA;AAAA,KAKvC",
6
6
  "names": []
7
7
  }
@@ -1,13 +1,4 @@
1
- import { html } from "@spectrum-web-components/base";
2
- import "@spectrum-web-components/dialog/sp-dialog.js";
3
- import { landscape } from "./images.js";
4
- import "@spectrum-web-components/button/sp-button.js";
5
- export default {
6
- title: "Dialog",
7
- component: "sp-dialog"
8
- };
9
- export const small = () => {
10
- return html`
1
+ import{html as e}from"@spectrum-web-components/base";import"@spectrum-web-components/dialog/sp-dialog.js";import{landscape as i}from"./images.js";import"@spectrum-web-components/button/sp-button.js";export default{title:"Dialog",component:"sp-dialog"};export const small=()=>e`
11
2
  <sp-dialog size="s">
12
3
  <h2 slot="heading">Disclaimer</h2>
13
4
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
@@ -22,10 +13,7 @@ export const small = () => {
22
13
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
23
14
  dignissim cras lobortis.
24
15
  </sp-dialog>
25
- `;
26
- };
27
- export const medium = () => {
28
- return html`
16
+ `,medium=()=>e`
29
17
  <sp-dialog size="m">
30
18
  <h2 slot="heading">Disclaimer</h2>
31
19
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
@@ -40,10 +28,7 @@ export const medium = () => {
40
28
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
41
29
  dignissim cras lobortis.
42
30
  </sp-dialog>
43
- `;
44
- };
45
- export const large = () => {
46
- return html`
31
+ `,large=()=>e`
47
32
  <sp-dialog size="l">
48
33
  <h2 slot="heading">Disclaimer</h2>
49
34
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
@@ -58,10 +43,7 @@ export const large = () => {
58
43
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
59
44
  dignissim cras lobortis.
60
45
  </sp-dialog>
61
- `;
62
- };
63
- export const dismissable = () => {
64
- return html`
46
+ `,dismissable=()=>e`
65
47
  <sp-dialog size="m" dismissable>
66
48
  <h2 slot="heading">Disclaimer</h2>
67
49
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
@@ -76,10 +58,7 @@ export const dismissable = () => {
76
58
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
77
59
  dignissim cras lobortis.
78
60
  </sp-dialog>
79
- `;
80
- };
81
- export const noDivider = () => {
82
- return html`
61
+ `,noDivider=()=>e`
83
62
  <sp-dialog size="m" dismissable no-divider>
84
63
  <h2 slot="heading">Disclaimer</h2>
85
64
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
@@ -94,12 +73,9 @@ export const noDivider = () => {
94
73
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
95
74
  dignissim cras lobortis.
96
75
  </sp-dialog>
97
- `;
98
- };
99
- export const hero = () => {
100
- return html`
76
+ `,hero=()=>e`
101
77
  <sp-dialog size="m" dismissable no-divider>
102
- <div slot="hero" style="background-image: url(${landscape})"></div>
78
+ <div slot="hero" style="background-image: url(${i})"></div>
103
79
  <h2 slot="heading">Disclaimer</h2>
104
80
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
105
81
  eiusmod tempor incididunt ut labore et dolore magna aliqua. Auctor
@@ -113,10 +89,7 @@ export const hero = () => {
113
89
  neque egestas congue. Rhoncus est pellentesque elit ullamcorper
114
90
  dignissim cras lobortis.
115
91
  </sp-dialog>
116
- `;
117
- };
118
- export const alertConfirmation = () => {
119
- return html`
92
+ `,alertConfirmation=()=>e`
120
93
  <sp-dialog size="alert">
121
94
  <h2 slot="heading">Enable Smart Filters?</h2>
122
95
  Smart filters are nondestructive and will preserve your original
@@ -126,10 +99,7 @@ export const alertConfirmation = () => {
126
99
  </sp-button>
127
100
  <sp-button variant="accent" slot="button">Enable</sp-button>
128
101
  </sp-dialog>
129
- `;
130
- };
131
- export const alertInformation = () => {
132
- return html`
102
+ `,alertInformation=()=>e`
133
103
  <sp-dialog size="alert">
134
104
  <h2 slot="heading">Enable Smart Filters?</h2>
135
105
  Smart filters are nondestructive and will preserve your original
@@ -141,10 +111,7 @@ export const alertInformation = () => {
141
111
  Enable
142
112
  </sp-button>
143
113
  </sp-dialog>
144
- `;
145
- };
146
- export const alertDestructive = () => {
147
- return html`
114
+ `,alertDestructive=()=>e`
148
115
  <sp-dialog size="alert">
149
116
  <h2 slot="heading">Enable Smart Filters?</h2>
150
117
  Smart filters are nondestructive and will preserve your original
@@ -154,10 +121,7 @@ export const alertDestructive = () => {
154
121
  </sp-button>
155
122
  <sp-button variant="negative" slot="button">Enable</sp-button>
156
123
  </sp-dialog>
157
- `;
158
- };
159
- export const alertError = () => {
160
- return html`
124
+ `,alertError=()=>e`
161
125
  <sp-dialog size="alert" error>
162
126
  <h2 slot="heading">Enable Smart Filters?</h2>
163
127
  Smart filters are nondestructive and will preserve your original
@@ -169,10 +133,7 @@ export const alertError = () => {
169
133
  Enable
170
134
  </sp-button>
171
135
  </sp-dialog>
172
- `;
173
- };
174
- export const alertErrorWithLongTitle = () => {
175
- return html`
136
+ `,alertErrorWithLongTitle=()=>e`
176
137
  <sp-dialog size="alert" error>
177
138
  <h2 slot="heading">Unable to Share Project to Behance Community</h2>
178
139
  Smart filters are nondestructive and will preserve your original
@@ -184,10 +145,7 @@ export const alertErrorWithLongTitle = () => {
184
145
  Enable
185
146
  </sp-button>
186
147
  </sp-dialog>
187
- `;
188
- };
189
- export const fullscreen = () => {
190
- return html`
148
+ `,fullscreen=()=>e`
191
149
  <sp-dialog mode="fullscreen" dismissable>
192
150
  <h2 slot="heading">Enable Smart Filters?</h2>
193
151
  <p>
@@ -324,10 +282,7 @@ export const fullscreen = () => {
324
282
  </sp-button>
325
283
  <sp-button variant="accent" slot="button">Enable</sp-button>
326
284
  </sp-dialog>
327
- `;
328
- };
329
- export const fullscreenTakeover = () => {
330
- return html`
285
+ `,fullscreenTakeover=()=>e`
331
286
  <sp-dialog mode="fullscreenTakeover">
332
287
  <h2 slot="heading">Enable Smart Filters?</h2>
333
288
  <p>
@@ -465,5 +420,4 @@ export const fullscreenTakeover = () => {
465
420
  <sp-button variant="accent" slot="button">Enable</sp-button>
466
421
  </sp-dialog>
467
422
  `;
468
- };
469
423
  //# sourceMappingURL=dialog.stories.js.map