-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(popover): add popover component
references #5420
- Loading branch information
1 parent
d2ef2b1
commit 53fd3c3
Showing
13 changed files
with
585 additions
and
0 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
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
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,63 @@ | ||
@import "../../globals.core"; | ||
@import "./popover"; | ||
|
||
// iOS Popover | ||
// -------------------------------------------------- | ||
|
||
$popover-ios-padding: 24px 34px !default; | ||
$popover-ios-min-width: 150px !default; | ||
$popover-ios-max-width: 270px !default; | ||
$popover-ios-max-height: 90% !default; | ||
$popover-ios-border-radius: 10px !default; | ||
$popover-ios-text-color: #000 !default; | ||
$popover-ios-background: #f3f3f3 !default; | ||
|
||
|
||
.popover-wrapper { | ||
padding: $popover-ios-padding; | ||
|
||
min-width: $popover-ios-min-width; | ||
max-width: $popover-ios-max-width; | ||
|
||
max-height: $popover-ios-max-height; | ||
|
||
border-radius: $popover-ios-border-radius; | ||
color: $popover-ios-text-color; | ||
background: $popover-ios-background; | ||
} | ||
|
||
|
||
// Popover Arrow | ||
// ----------------------------------------- | ||
|
||
.popover-arrow { | ||
position: absolute; | ||
display: block; | ||
top: -20px; | ||
width: 30px; | ||
height: 19px; | ||
overflow: hidden; | ||
|
||
&:after { | ||
position: absolute; | ||
|
||
z-index: $z-index-overlay-wrapper; | ||
|
||
top: 12px; | ||
left: 5px; | ||
width: 20px; | ||
height: 20px; | ||
background-color: $popover-ios-background; | ||
border-radius: 3px; | ||
content: ''; | ||
transform: rotate(-45deg); | ||
} | ||
} | ||
|
||
.popover-bottom .popover-arrow { | ||
top: auto; | ||
bottom: -10px; | ||
&:after { | ||
top: -6px; | ||
} | ||
} |
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,35 @@ | ||
@import "../../globals.core"; | ||
@import "./popover"; | ||
|
||
// Material Design Popover | ||
// -------------------------------------------------- | ||
|
||
$popover-md-padding: 24px 34px !default; | ||
$popover-md-min-width: 150px !default; | ||
$popover-md-max-width: 270px !default; | ||
$popover-md-max-height: 90% !default; | ||
$popover-md-border-radius: 2px !default; | ||
$popover-md-text-color: #000 !default; | ||
$popover-md-background: #fafafa !default; | ||
|
||
|
||
.popover-wrapper { | ||
padding: $popover-md-padding; | ||
|
||
min-width: $popover-md-min-width; | ||
max-width: $popover-md-max-width; | ||
|
||
max-height: $popover-md-max-height; | ||
|
||
border-radius: $popover-md-border-radius; | ||
color: $popover-md-text-color; | ||
background: $popover-md-background; | ||
} | ||
|
||
|
||
// Material Design Popover Template | ||
// ----------------------------------------- | ||
|
||
.popover-template { | ||
|
||
} |
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,44 @@ | ||
@import "../../globals.core"; | ||
|
||
// Popover | ||
// -------------------------------------------------- | ||
|
||
$popover-min-width: 150px !default; | ||
$popover-max-height: 90% !default; | ||
|
||
|
||
ion-popover { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: $z-index-overlay; | ||
|
||
display: flex; | ||
|
||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.popover-wrapper { | ||
position: absolute; | ||
|
||
z-index: $z-index-overlay-wrapper; | ||
display: flex; | ||
|
||
flex-direction: column; | ||
|
||
min-width: $popover-min-width; | ||
max-height: $popover-max-height; | ||
|
||
opacity: 0; | ||
} | ||
|
||
|
||
// Popover Backdrop | ||
// ----------------------------------------- | ||
|
||
.hide-backdrop { | ||
display: none; | ||
} |
Oops, something went wrong.