-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sbb-alert): refactor animation to properly work in Safari (#2394)
BREAKING CHANGE: renamed `willPresent` event to `willOpen` and `didPresent` to `didOpen`. Closes #2389
- Loading branch information
1 parent
211b357
commit 30bf7c1
Showing
8 changed files
with
293 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
src/components/alert/alert/__snapshots__/alert.spec.snap.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
/* @web/test-runner snapshot v1 */ | ||
export const snapshots = {}; | ||
|
||
snapshots["sbb-alert should render default properties"] = | ||
`<div class="sbb-alert__transition-wrapper"> | ||
<div class="sbb-alert__transition-sub-wrapper"> | ||
<div class="sbb-alert"> | ||
<span class="sbb-alert__icon"> | ||
<slot name="icon"> | ||
<sbb-icon | ||
aria-hidden="true" | ||
data-namespace="default" | ||
name="info" | ||
role="img" | ||
> | ||
</sbb-icon> | ||
</slot> | ||
</span> | ||
<span class="sbb-alert__content"> | ||
<sbb-title | ||
aria-level="3" | ||
class="sbb-alert__title" | ||
level="3" | ||
negative="" | ||
role="heading" | ||
visual-level="5" | ||
> | ||
<slot name="title"> | ||
Interruption | ||
</slot> | ||
</sbb-title> | ||
<p class="sbb-alert__content-slot"> | ||
<slot> | ||
</slot> | ||
</p> | ||
</span> | ||
<span class="sbb-alert__close-button-wrapper"> | ||
<sbb-divider | ||
aria-orientation="vertical" | ||
class="sbb-alert__close-button-divider" | ||
negative="" | ||
orientation="vertical" | ||
role="separator" | ||
> | ||
</sbb-divider> | ||
<sbb-button | ||
aria-label="Close message" | ||
class="sbb-alert__close-button" | ||
dir="ltr" | ||
icon-name="cross-small" | ||
negative="" | ||
role="button" | ||
size="m" | ||
tabindex="0" | ||
variant="transparent" | ||
> | ||
</sbb-button> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
/* end snapshot sbb-alert should render default properties */ | ||
|
||
snapshots["sbb-alert should render customized properties"] = | ||
`<div class="sbb-alert__transition-wrapper"> | ||
<div class="sbb-alert__transition-sub-wrapper"> | ||
<div class="sbb-alert"> | ||
<span class="sbb-alert__icon"> | ||
<slot name="icon"> | ||
<sbb-icon | ||
aria-hidden="true" | ||
data-namespace="default" | ||
name="disruption" | ||
role="img" | ||
> | ||
</sbb-icon> | ||
</slot> | ||
</span> | ||
<span class="sbb-alert__content"> | ||
<sbb-title | ||
aria-level="2" | ||
class="sbb-alert__title" | ||
level="2" | ||
negative="" | ||
role="heading" | ||
visual-level="3" | ||
> | ||
<slot name="title"> | ||
Interruption | ||
</slot> | ||
</sbb-title> | ||
<p class="sbb-alert__content-slot"> | ||
<slot> | ||
</slot> | ||
</p> | ||
<sbb-link | ||
aria-label="label" | ||
data-slot-names="unnamed" | ||
dir="ltr" | ||
href="https://www.sbb.ch" | ||
negative="" | ||
rel="noopener" | ||
role="link" | ||
size="s" | ||
tabindex="0" | ||
target="_blank" | ||
variant="inline" | ||
> | ||
Show much more | ||
</sbb-link> | ||
</span> | ||
<span class="sbb-alert__close-button-wrapper"> | ||
<sbb-divider | ||
aria-orientation="vertical" | ||
class="sbb-alert__close-button-divider" | ||
negative="" | ||
orientation="vertical" | ||
role="separator" | ||
> | ||
</sbb-divider> | ||
<sbb-button | ||
aria-label="Close message" | ||
class="sbb-alert__close-button" | ||
dir="ltr" | ||
icon-name="cross-small" | ||
negative="" | ||
role="button" | ||
size="m" | ||
tabindex="0" | ||
variant="transparent" | ||
> | ||
</sbb-button> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
/* end snapshot sbb-alert should render customized properties */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.