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
* feat(dialog): adds new takeover dialog styles
- new tokens and takeover dialog styles were implemented in index.css
- rebuild tokens/metadata
* docs(dialog): updates dialog template and stories
- 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
* chore(dialog): clean up dialog tests
- adds hasHeroImage arg
- adds background and margin customStyles for fullscreen dialog in
Chromatic only (so we can see the rounded corners better)
fix(modal): update modal with takeover dialog styles
- builds metadata
- adds tokens for modal that complement new takeover dialog styles/tokens
chore(dialog,modal): create changeset
This is the migration for the fullscreen/fullscreenTakeover dialog stories (these stories correspond to the "takeover dialog" in Figma). The Divider component support was removed in S2 standard dialog migration ([#2860](https://github.com/adobe/spectrum-css/pull/2860)). New and updated tokens are in place to update fullscreen/fullscreenTakeover dialog sizing, grid spacing, spacing in the header, and font sizes. Fullscreen/fullscreenTakeover dialogs do not support additional footer content or checkboxes (in comparison to the standard dialog).
9
+
10
+
Takeover dialogs also support replacing text in the header and body areas with other components. This required an additional `.spectrum-Dialog-headerContentWrapper` element that should center whatever component/content within.
11
+
12
+
Class names updated to match naming convention (remove hyphens and capitalize second word):
- Modal component now uses the updated margin token (`window-to-edge`) found in the takeover dialog design specs. This work also introduced `--spectrum-modal-takeover-window-to-edge`
/* this attempts to give as much space as possible for the button group, particularly to avoid stacking on mobile. Some sizes still may have to stack. */
@@ -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