-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Refactor #12031 - Component: Responsive Overlay #12096
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { AnimationEvent } from '@angular/animations'; | ||
|
||
export type OverlayModeType = 'modal' | 'overlay' | undefined; | ||
|
||
export type ResponsiveOverlayDirectionType = 'start' | 'center' | 'end' | undefined; | ||
|
||
export interface OverlayListenerOptions { | ||
type?: 'scroll' | 'outside' | 'resize' | undefined; | ||
mode?: OverlayModeType; | ||
valid?: boolean; | ||
} | ||
|
||
export interface ResponsiveOverlayOptions { | ||
style?: any; | ||
styleClass?: string; | ||
breakpoint?: string; | ||
media?: string; | ||
direction?: ResponsiveOverlayDirectionType; | ||
} | ||
|
||
export interface OverlayOnShowEvent { | ||
container?: HTMLElement | undefined; | ||
target?: HTMLElement | undefined; | ||
mode?: OverlayModeType; | ||
} | ||
|
||
export interface OverlayOnHideEvent extends OverlayOnShowEvent {} | ||
|
||
export interface OverlayOptions { | ||
mode?: OverlayModeType; | ||
style?: any; | ||
styleClass?: string; | ||
appendTo?: 'body' | HTMLElement | undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, I think you should also add 'self' for type appendTo?: 'body' | 'self' | HTMLElement; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this enhancement already exists in our roadmap. We will port a structure like in PrimeReact. https://www.primefaces.org/primereact/setup/ |
||
autoZIndex?: boolean; | ||
baseZIndex?: number; | ||
showTransitionOptions?: string; | ||
hideTransitionOptions?: string; | ||
listener?: (event: Event, options?: OverlayListenerOptions) => boolean | void; | ||
responsive?: ResponsiveOverlayOptions | undefined; | ||
onShow?: (event?: OverlayOnShowEvent) => void; | ||
onHide?: (event?: OverlayOnHideEvent) => void; | ||
onAnimationStart?: (event?: AnimationEvent) => void; | ||
onAnimationDone?: (event?: AnimationEvent) => void; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
export * from './primengconfig'; | ||
export * from './translation'; | ||
export * from './translationkeys'; | ||
export * from './blockableui'; | ||
export * from './confirmation'; | ||
export * from './confirmaeventtype'; | ||
export * from './confirmation'; | ||
export * from './confirmationservice'; | ||
export * from './contextmenuservice'; | ||
export * from './filtermatchmode'; | ||
export * from './filtermetadata'; | ||
export * from './filteroperator'; | ||
export * from './filterservice'; | ||
export * from './contextmenuservice'; | ||
export * from './lazyloadevent'; | ||
export * from './megamenuitem'; | ||
export * from './menuitem'; | ||
export * from './message'; | ||
export * from './messageservice'; | ||
export * from './overlayoptions'; | ||
export * from './overlayservice'; | ||
export * from './primeicons'; | ||
export * from './filtermatchmode'; | ||
export * from './filteroperator'; | ||
export * from './primengconfig'; | ||
export * from './selectitem'; | ||
export * from './selectitemgroup'; | ||
export * from './shared'; | ||
export * from './sortevent'; | ||
export * from './sortmeta'; | ||
export * from './tablestate'; | ||
export * from './translation'; | ||
export * from './translationkeys'; | ||
export * from './treedragdropservice'; | ||
export * from './treenode'; | ||
export * from './treenodedragevent'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the
container
is an 'overlay' element like dropdown's overlay. Thetarget
is an element that manages the overlay.Exp;
The container is an HTML element with a 'p-overlay'(mode: 'overlay') or 'p-overlay-modal'(mode: 'modal') class depending on the mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This line has been updated.