From 75783943032584110df95a220f13d72ff251142f Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Wed, 16 Nov 2016 10:23:39 -0800 Subject: [PATCH] feat(select): support fallback positions --- src/lib/select/select-animations.ts | 14 ++++- src/lib/select/select.html | 5 +- src/lib/select/select.spec.ts | 94 ++++++++++++++++++++++++++++- src/lib/select/select.ts | 42 ++++++++++--- test/browser-providers.ts | 2 +- 5 files changed, 139 insertions(+), 18 deletions(-) diff --git a/src/lib/select/select-animations.ts b/src/lib/select/select-animations.ts index ce3e24c67b8c..238341138c39 100644 --- a/src/lib/select/select-animations.ts +++ b/src/lib/select/select-animations.ts @@ -42,16 +42,26 @@ export const transformPlaceholder: AnimationEntryMetadata = trigger('transformPl * When the panel is removed from the DOM, it simply fades out linearly. */ export const transformPanel: AnimationEntryMetadata = trigger('transformPanel', [ - state('showing-ltr', style({ + state('top-ltr', style({ opacity: 1, width: 'calc(100% + 32px)', transform: `translate3d(-16px, -9px, 0) scaleY(1)` })), - state('showing-rtl', style({ + state('top-rtl', style({ opacity: 1, width: 'calc(100% + 32px)', transform: `translate3d(16px, -9px, 0) scaleY(1)` })), + state('bottom-ltr', style({ + opacity: 1, + width: 'calc(100% + 32px)', + transform: `translate3d(-16px, 8px, 0) scaleY(1)` + })), + state('bottom-rtl', style({ + opacity: 1, + width: 'calc(100% + 32px)', + transform: `translate3d(16px, 8px, 0) scaleY(1)` + })), transition('void => *', [ style({ opacity: 0, diff --git a/src/lib/select/select.html b/src/lib/select/select.html index a3b7074dd427..f95dc6b1c6e8 100644 --- a/src/lib/select/select.html +++ b/src/lib/select/select.html @@ -5,9 +5,10 @@