From 3f9fbd42e148dd73e6724e2aced77ab0e63c88e6 Mon Sep 17 00:00:00 2001 From: Si Taggart Date: Fri, 14 Jul 2017 16:47:10 -0700 Subject: [PATCH] fix(path): Simplify and fix active tab focus styling across all stage states --- ui/components/path/base/_index.scss | 67 +++++++++++++++++++++++++++++ ui/components/path/base/example.jsx | 59 ++++++++++++++++++++++++- 2 files changed, 124 insertions(+), 2 deletions(-) diff --git a/ui/components/path/base/_index.scss b/ui/components/path/base/_index.scss index ac4c4fc392..4c715f8953 100644 --- a/ui/components/path/base/_index.scss +++ b/ui/components/path/base/_index.scss @@ -131,6 +131,73 @@ align-items: flex-start; margin-right: $spacing-small; + /** + * @summary Creates the incomplete stage of the path + * + * @selector .slds-is-incomplete + * @restrict .slds-path__item + * @modifier + */ + .slds-is-incomplete { + background-color: $color-background-path-incomplete; + + &:hover { + background-color: $color-background-path-incomplete-hover; + } + + .slds-path__link { + color: $color-text-default; + } + } + + /** + * @summary Creates the active stage of the sales path + * + * @selector .slds-is-active + * @restrict .slds-path__item + * @notes This class must be placed on the item programatically when the guidance section is activated + * @modifier + */ + .slds-is-active { + background-color: $color-background-inverse; + + .slds-path__link { + color: $color-text-inverse; + } + + &:hover { + background-color: $color-background-alt-inverse; + + + .slds-path__item:before { + background-color: $color-background-alt-inverse; + } + } + + + .slds-path__item:before { + background-color: $color-background-inverse; + } + } + + /** + * @summary Creates success stage of the path + * + * @selector .slds-is-won + * @restrict .slds-path__item + * @modifier + */ + .slds-is-active, + .slds-is-active.slds-is-won { + + .slds-path__title { + transform: rotateX(0deg); + } + + .slds-path__stage { + transform: rotateX(-180deg); + } + } + + /** * @summary Creates the completed stage of the path * diff --git a/ui/components/path/base/example.jsx b/ui/components/path/base/example.jsx index 0eb61c8977..1b5bdcdad8 100644 --- a/ui/components/path/base/example.jsx +++ b/ui/components/path/base/example.jsx @@ -113,7 +113,9 @@ let ListItem = props => { } return ( -
  • +
  • /// /////////////////////////////////////////// let Default = props => + + +
    + + + + + Stage Complete + + Contacted + + + + + Stage Complete + + Open + + + + + Current Stage: + + Unqualified + + + + + + Nurturing + + + + + + Closed + + +
    +
    + Stage: Unqualified + + Mark Status as Complete +
    +
    +
    ; + +let PathNoCoachStageSelected = props =>
    @@ -913,6 +963,11 @@ export default ( ); export let states = [ + { + id: 'later-stage', + label: 'With Different Stage Selected - without coaching', + element: + }, { id: 'with-coaching', label: 'With Coaching Available', @@ -925,7 +980,7 @@ export let states = [ }, { id: 'different-coaching', - label: 'With Different Stage Selected', + label: 'With Different Stage Selected - with coaching', element: }, {