Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dialog): z-index for dialog docs #2855

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions components/dialog/metadata/dialog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ examples:
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open Dismissible Dialog</span></button>

<div class="spectrum-Modal-wrapper spectrum-CSSExample-dialog">
<div class="spectrum-Modal is-open" data-testid="modal">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--medium spectrum-Dialog--dismissable" role="dialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
<h1 class="spectrum-Dialog-heading">Disclaimer</h1>
Expand All @@ -98,8 +98,8 @@ examples:
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open No Divider Dialog</span></button>

<div class="spectrum-Modal-wrapper spectrum-CSSExample-dialog">
<div class="spectrum-Modal is-open" data-testid="modal">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--medium spectrum-Dialog--dismissable spectrum-Dialog--noDivider" role="dialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
<h1 class="spectrum-Dialog-heading">Disclaimer</h1>
Expand All @@ -123,8 +123,8 @@ examples:
demoClassName: spectrum-CSSExample-example--overlay
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open Hero Dialog</span></button>
<div class="spectrum-Modal-wrapper spectrum-CSSExample-dialog">
<div class="spectrum-Modal is-open" data-testid="modal">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--medium spectrum-Dialog--dismissable spectrum-Dialog--noDivider" role="dialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
<div class="spectrum-Dialog-hero" style="background-image: url(img/example-card-portrait.jpg)"></div>
Expand All @@ -148,7 +148,7 @@ examples:
demoClassName: spectrum-CSSExample-example--overlay
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open Scrolling Dialog</span></button>
<div class="spectrum-Modal-wrapper">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--large" role="alertdialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
Expand Down Expand Up @@ -205,9 +205,9 @@ examples:
demoClassName: spectrum-CSSExample-example--overlay
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open Fullscreen Dialog</span></button>
<div class="spectrum-Modal-wrapper">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal spectrum-Modal--fullscreen" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--fullscreen" role="alertdialog" tabindex="-1" aria-modal="true">
<section class="spectrum-CSSExample-dialog spectrum-Dialog spectrum-Dialog--fullscreen" role="alertdialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
<h1 class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader">Default Dialog - Fullscreen</h1>
<hr class="spectrum-Divider spectrum-Divider--sizeM spectrum-Divider--horizontal spectrum-Dialog-divider">
Expand Down Expand Up @@ -262,9 +262,9 @@ examples:
demoClassName: spectrum-CSSExample-example--overlay
markup: |
<button class="spectrum-Button spectrum-Button--sizeM spectrum-Button--outline spectrum-Button--staticWhite spectrum-CSSExample-overlayShowButton" onclick="openDialog(this.nextElementSibling)"><span class="spectrum-Button-label">Open Fullscreen Takeover Dialog</span></button>
<div class="spectrum-Modal-wrapper">
<div class="spectrum-Modal-wrapper spectrum-CSSExample-modal">
<div class="spectrum-Modal spectrum-Modal--fullscreenTakeover" data-testid="modal">
<section class="spectrum-Dialog spectrum-Dialog--fullscreenTakeover" role="alertdialog" tabindex="-1" aria-modal="true">
<section class="spectrum-CSSExample-dialog spectrum-Dialog spectrum-Dialog--fullscreenTakeover" role="alertdialog" tabindex="-1" aria-modal="true">
<div class="spectrum-Dialog-grid">
<h1 class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader">Fullscreen Takeover</h1>
<hr class="spectrum-Divider spectrum-Divider--sizeM spectrum-Divider--horizontal spectrum-Dialog-divider">
Expand Down
5 changes: 5 additions & 0 deletions components/site/component.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ governing permissions and limitations under the License.
transition: none;
}

/* Mimics the .spectrum-Modal-wrapper so the modals & dialogs are above the underlay */
.spectrum-CSSExample-modal {
z-index: 2 !important;
}

.spectrum-Examples,
.spectrum-Examples-itemGroup {
display: flex;
Expand Down
Loading