You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- adds layout: "fullscreen" to render dialogs in their canvases, instead
of off the canvas
- uses getRandomId and renderContent functions to render header and
footer contents
- implements "slotted" components for the new takeover dialog feature
- removes hasDivider since s2 dialogs don't support a divider
- updates Figma links for fullscreen and fullscreenTakeover stories
- updates some class names to better follow naming conventions
@@ -10,10 +12,11 @@ import { Template } from "./template.js";
10
12
/**
11
13
* A dialog displays important information that users need to acknowledge. They appear over the interface and block further interactions. Standard dialogs are the most frequent type of dialogs. They appear in the center of the screen over the interface and should be used for moderately complex tasks. Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.
12
14
*
15
+
* The alert variants that were previously a part of Dialog were moved to their own component, [alert dialog](/docs/components-alert-dialog--docs).
16
+
*
13
17
* ## Usage with modal component
14
18
* When a dialog component is used in tandem with a [modal](/docs/components-modal--docs), implementations should set `--mod-modal-background-color` to `transparent`. This will prevent any background color used in the modal from peeking through from behind the dialog at the rounded corners, allowing the dialog's background color to take precedence.
15
19
*
16
-
* The alert variants that were previously a part of Dialog were moved to their own component, [alert dialog](/docs/components-alert-dialog--docs).
17
20
*/
18
21
exportdefault{
19
22
title: "Dialog",
@@ -96,15 +99,6 @@ export default {
96
99
control: "boolean",
97
100
if: {arg: "layout",eq: "default"},
98
101
},
99
-
hasDivider: {
100
-
name: "Divider",
101
-
type: {name: "boolean"},
102
-
table: {
103
-
type: {summary: "boolean"},
104
-
category: "Component",
105
-
},
106
-
control: "boolean",
107
-
},
108
102
showModal: {
109
103
name: "Wrap the dialog in a modal",
110
104
type: {name: "boolean"},
@@ -167,6 +161,7 @@ export default {
167
161
},
168
162
packageJson,
169
163
metadata,
164
+
layout: "fullscreen",
170
165
},
171
166
decorators: [
172
167
withUnderlayWrapper,
@@ -267,16 +262,71 @@ WithScroll.parameters = {
267
262
};
268
263
269
264
/**
270
-
* The full screen variant shows a large dialog background, only revealing a small portion of the page around the outside of the dialog, behind an overlay. The size of the dialog varies with the size of the screen, in both width and height.
265
+
* The fullscreen variant shows a large dialog background, only revealing a small portion of the page around the outside of the dialog, behind an overlay. The size of the dialog varies with the size of the screen, in both width and height.
266
+
*
267
+
* Fullscreen dialogs do not support a close button, and are not dismissible.
268
+
*
269
+
* Implementations may swap out the extra header content and body content for other components, like the [steplist](/docs/components-steplist--docs) and [table](/docs/components-table--docs) seen in this example. Components in the extra header content area will be centered.
271
270
*/
272
271
exportconstFullscreen=DialogFullscreen.bind({});
273
272
Fullscreen.args={
274
273
...Default.args,
274
+
header:[
275
+
(passthroughs,context)=>Steplist({
276
+
...passthroughs,
277
+
items: [
278
+
{
279
+
label: "Enter records",
280
+
isComplete: true,
281
+
},
282
+
{
283
+
label: "Confirmation",
284
+
isComplete: true,
285
+
},
286
+
{
287
+
label: "Summary",
288
+
isSelected: true,
289
+
},
290
+
],
291
+
},context),
292
+
],
293
+
content: [
294
+
(passthroughs,context)=>Table({
295
+
...passthroughs,
296
+
showThumbnails: true,
297
+
rowItems: [
298
+
{
299
+
cellContent: ["Table Row Alpha","Test","2"],
300
+
},
301
+
{
302
+
cellContent: ["Table Row Bravo","Test","28"],
303
+
},
304
+
{
305
+
cellContent: [
306
+
"Table Row Charlie. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.",
* The full screen takeover variant is similar to the full screen variant except that the background covers the entire screen. The page behind the dialog is not visible. This variant should be reserved for workflows where displaying a second dialog on top of the first one is to be expected.
343
+
* The fullscreen takeover variant is similar to the fullscreen variant except that the background covers the entire screen. The page behind the dialog is not visible. This variant should be reserved for workflows where displaying a second dialog on top of the first one is to be expected.
344
+
*
345
+
* Fullscreen takeover dialogs do not support a close button, and are not dismissible.
0 commit comments