From 1704b4133e3dc536b2fa26e19f113e878b9fc5a0 Mon Sep 17 00:00:00 2001 From: Charles Hansen Date: Thu, 14 May 2015 14:02:12 -0700 Subject: [PATCH] fix(modal): Modals regain their fly-in behavior [Fixes #94552398] Signed-off-by: Geoff Pleiss --- src/bootstrap/package.json | 2 +- src/pivotal-ui/components/modals/modals.scss | 20 +++++++++++++++++++ src/pivotal-ui/components/modals/package.json | 5 ++--- .../components/react-animations/package.json | 2 +- .../react-animations/react-animations.scss | 20 ------------------- .../frameworks/bootstrap-sass-v3.2.0.scss | 2 +- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/bootstrap/package.json b/src/bootstrap/package.json index 4b122aab7..730098744 100644 --- a/src/bootstrap/package.json +++ b/src/bootstrap/package.json @@ -1,7 +1,7 @@ { "name": "pui-css-bootstrap", "style": "bootstrap.css", - "version": "0.0.2", + "version": "0.0.3", "description": "Custom build of Bootstrap for Pivotal UI", "repository": { "type": "git", diff --git a/src/pivotal-ui/components/modals/modals.scss b/src/pivotal-ui/components/modals/modals.scss index 3809f734e..6a14ca69c 100644 --- a/src/pivotal-ui/components/modals/modals.scss +++ b/src/pivotal-ui/components/modals/modals.scss @@ -1,4 +1,24 @@ @import "../pui-variables"; +@import '../mixins'; +@import "../../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins"; +@import "../../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/modals"; + +.modal-fade-enter, .modal-fade-leave { + @extend .fade; + + //Base .fade styles from bootstrap + @include transition(opacity .15s linear); + opacity: 0; +} + +//Class created in React Animations +.modal-fade-enter-active { + @extend .in; + + //Base .in styles from bootstrap + opacity: 1; +} + /*doc --- diff --git a/src/pivotal-ui/components/modals/package.json b/src/pivotal-ui/components/modals/package.json index 0e0981ccd..6ea6f428f 100644 --- a/src/pivotal-ui/components/modals/package.json +++ b/src/pivotal-ui/components/modals/package.json @@ -1,8 +1,7 @@ { - "version": "0.0.6", + "version": "0.0.7", "homepage": "http://styleguide.pivotal.io/objects.html#modal", "dependencies": { - "pui-css-bootstrap": "*", - "pui-css-react-animations": ">=0.0.3" + "pui-css-bootstrap": "*" } } diff --git a/src/pivotal-ui/components/react-animations/package.json b/src/pivotal-ui/components/react-animations/package.json index 92a79e0ac..011c35849 100644 --- a/src/pivotal-ui/components/react-animations/package.json +++ b/src/pivotal-ui/components/react-animations/package.json @@ -1,5 +1,5 @@ { "homepage": "http://styleguide.pivotal.io", "dependencies": {}, - "version": "0.0.3" + "version": "0.0.4" } \ No newline at end of file diff --git a/src/pivotal-ui/components/react-animations/react-animations.scss b/src/pivotal-ui/components/react-animations/react-animations.scss index 922855e38..e61cb7727 100644 --- a/src/pivotal-ui/components/react-animations/react-animations.scss +++ b/src/pivotal-ui/components/react-animations/react-animations.scss @@ -2,26 +2,6 @@ @import '../mixins'; @import "../../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins"; -//Bootstrap -%fade { - opacity: 0; - @include transition(opacity .15s linear); - &.in { - opacity: 1; - } -} - -.fade-enter { - @extend %fade; - - &-active { - @extend %fade.in; - } -} - -.fade-leave { - @extend %fade; -} .new-enter { -webkit-animation: new-item-grow .3s cubic-bezier(0.895, 0.03, 0.685, 0.22) forwards, new-item-fade .5s ease-in .15s forwards; diff --git a/src/pivotal-ui/frameworks/bootstrap-sass-v3.2.0.scss b/src/pivotal-ui/frameworks/bootstrap-sass-v3.2.0.scss index 4ddb70998..c75345768 100644 --- a/src/pivotal-ui/frameworks/bootstrap-sass-v3.2.0.scss +++ b/src/pivotal-ui/frameworks/bootstrap-sass-v3.2.0.scss @@ -41,7 +41,7 @@ @import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/close"; // Components w/ JavaScript -@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/modals"; +//@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/modals"; //@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/tooltip"; //@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/popovers"; //@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/carousel";