Skip to content

Commit

Permalink
feat(space-list): light mode theme for space list (#606)
Browse files Browse the repository at this point in the history
* feat(space-list): light mode theme for space list

* revert example changes

* chore: address feedback no color updates

* chore: update colors

* chore: remove changes from default example

* chore: remove changes from default example

* chore: remove changes from default example

* chore: further code req changes

* chore: build core

* fix: space list snapshots

* feat: add space list meeting & buttongroup lightmode changes

* feat(light-mode): update snapshot and buttongroup colors

Co-authored-by: aimeex3 <819823+aimeex3@users.noreply.github.com>
  • Loading branch information
stevem63 and aimeex3 authored Jun 8, 2020
1 parent 7c12181 commit 03336cd
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 12 deletions.
6 changes: 3 additions & 3 deletions core/scss/components/button-group/settings.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
$button-group__class: '#{$prefix}-button-group';

$button-group__font-size: rem-calc(12);
$button-group__font-size: rem-calc(14);
$button-group__border-size: rem-calc(1);
$button-group__border: $button-group__border-size solid $md-gray-20;
$button-group__color: $md-black-100;
$button-group__background: transparent;
$button-group__line-height: rem-calc(16);
$button-group__padding: rem-calc(8) rem-calc(18);
$button-group-active__color: $md-white-100;
$button-group-active__background: $black-48;
$button-group-active__color: $md-gray-100;
$button-group-active__background: $md-blue-10;
$button-group-disabled__color: $md-gray-50;
$button-group-hover__background: $black-04;
$button-group__border-radius-pill: rem-calc(25);
Expand Down
15 changes: 15 additions & 0 deletions core/scss/components/list-item/list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@
$active-bgrd-color: $list-item__background--dark,
$header-color: $list-item-header__color--dark
);

&-light {
@include list-item-color(
$background-color: $md-gray-05,
$color: $md-gray-70,
$active-color: $md-gray-100,
$hover-bgrd-color: $md-gray-10,
$active-bgrd-color: $md-gray-10,
$hover-header-color: $md-gray-100,
$hover-subheader-color: $md-gray-100,
$header-color: $md-gray-70,
$subheader-color: $md-gray-70,
$focus-color: $md-gray-10
);
}
}

@include list-item--dark(
Expand Down
88 changes: 88 additions & 0 deletions core/scss/components/space-list/space-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,94 @@
font-size: rem-calc(14);
}
}

&-light {
@include list-item-color(
$background-color: $md-gray-05,
$color: $md-gray-70,
$active-color: $md-gray-100,
$hover-bgrd-color: $md-gray-10,
$active-bgrd-color: $md-gray-10,
$hover-header-color: $md-gray-100,
$hover-subheader-color: $md-gray-100,
$header-color: $md-gray-70,
$subheader-color: $md-gray-70,
$focus-color: $md-gray-10
);

.md-icon {
color: $md-gray-70;
}

&.#{$list-item__class}--space-filter-summary {
[class*='__header'] {
color: $md-gray-70;
}
}

&.#{$list-item__class}--space-search,
&.#{$list-item__class}--space-filter,
&.#{$list-item__class}--space-flag,
&.#{$list-item__class}--space-filter-search {
> [class$='__center'] {
> [class*='__header'] {
> [class$='-secondary'] {
color: $md-gray-70;
}
}
}

[class$='__result-container'] {
[class$='__attachment'] {
[class$='__attachment--top'] {
[class$='-left'] {
color: $md-gray-70;
}
}
}
}

[class*='__result'] {
color: $md-gray-70;
}
}

&.#{$list-item__class}--space-filter:not(.md-list-item--unread),
&.#{$list-item__class}--space-filter-search:not(.md-list-item--unread),
&.#{$list-item__class}--space-flag:not(.md-list-item--unread) {
> [class$='__center'] {
[class$='__header'],
[class$='__header--overview'] {
color: $md-gray-70;
}
}
}

[class$='__header--overview'] {
color: $md-gray-70;
}

&.#{$list-item__class}--unread {
.#{$list-item__class}__header {
color: $md-gray-100;
}
}

&.#{$list-item__class}--space-meeting {
[class$='--attendees'] {
color: $md-gray-70;
fill: $md-gray-70;
}

.#{$button__class} {
color: $md-gray-05;
background-color: $md-green-60;
&:hover {
background-color: $md-green-70;
}
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion core/scss/ng/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
background-color: $md-theme-50;

.md-input {
color: #292929;
color: $md-gray-90;
}

> a {
Expand Down
6 changes: 3 additions & 3 deletions core/scss/ng/settings/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8469,15 +8469,15 @@ $button-container--small__width: 104px;

$button-group__class: '#{$prefix}-button-group';

$button-group__font-size: rem-calc(12);
$button-group__font-size: rem-calc(14);
$button-group__border-size: rem-calc(1);
$button-group__border: $button-group__border-size solid $md-gray-20;
$button-group__color: $md-black-100;
$button-group__background: transparent;
$button-group__line-height: rem-calc(16);
$button-group__padding: rem-calc(8) rem-calc(18);
$button-group-active__color: $md-white-100;
$button-group-active__background: $black-48;
$button-group-active__color: $md-gray-100;
$button-group-active__background: $md-blue-10;
$button-group-disabled__color: $md-gray-50;
$button-group-hover__background: $black-04;
$button-group__border-radius-pill: rem-calc(25);
Expand Down
6 changes: 3 additions & 3 deletions core/scss/settings/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5254,15 +5254,15 @@ $button-container--small__width: 104px;

$button-group__class: '#{$prefix}-button-group';

$button-group__font-size: rem-calc(12);
$button-group__font-size: rem-calc(14);
$button-group__border-size: rem-calc(1);
$button-group__border: $button-group__border-size solid $md-gray-20;
$button-group__color: $md-black-100;
$button-group__background: transparent;
$button-group__line-height: rem-calc(16);
$button-group__padding: rem-calc(8) rem-calc(18);
$button-group-active__color: $md-white-100;
$button-group-active__background: $black-48;
$button-group-active__color: $md-gray-100;
$button-group-active__background: $md-blue-10;
$button-group-disabled__color: $md-gray-50;
$button-group-hover__background: $black-04;
$button-group__border-radius-pill: rem-calc(25);
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/ListItemHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ListItemHeader.propTypes = {
/** @prop ListItem title | '' */
title: PropTypes.string,
/** @prop ListItemHeader type variation | '' */
type: PropTypes.oneOf(['', 'space']),
type: PropTypes.oneOf(['', 'space', 'space-light']),
};

ListItemHeader.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion react/src/lib/SpaceListItem/examples/Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class ListItemDefault extends React.PureComponent {
return(
<div className="medium-4 columns">
<List style={{backgroundColor: 'black'}}>
<SpaceListItem isOverview header='Overview Item' />
<SpaceListItem isOverview header='Overview Item'/>
<SpaceListItem header='Header Only'/>
<SpaceListItem header='Bold Unread' isBold isUnread/>
<SpaceListItem header='Bold Mentioned' isBold isMentioned/>
Expand Down
5 changes: 5 additions & 0 deletions react/src/lib/SpaceListItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class SpaceListItem extends React.PureComponent {
resultRight,
searchTerm,
subheader,
theme,
title,
type,
...props
Expand Down Expand Up @@ -204,6 +205,7 @@ class SpaceListItem extends React.PureComponent {
className={
`${(isBold && ` md-list-item--unread`) || ''}` +
`${(type && ` md-list-item--space-${type}`) || ''}` +
`${(theme && ` md-list-item--space-${theme}`) || ''}` +
`${(className && ` ${className}`) || ''}`
}
id={id}
Expand Down Expand Up @@ -254,6 +256,8 @@ SpaceListItem.propTypes = {
searchTerm: PropTypes.string,
/** @prop SpaceListItem subheader node | ''s */
subheader: PropTypes.node,
/** @prop SpaceListItem theme | '' */
theme: PropTypes.string,
/** @prop SpaceListItem title | '' */
title: PropTypes.string,
/** @prop SpaceListItem type | '' */
Expand Down Expand Up @@ -286,6 +290,7 @@ SpaceListItem.defaultProps = {
searchTerm: '',
subheader: '',
title: '',
theme: '',
type: ''
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ShallowWrapper {
resultRight={null}
searchTerm=""
subheader=""
theme=""
title=""
type=""
/>,
Expand Down
5 changes: 5 additions & 0 deletions react/src/lib/SpaceListMeeting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SpaceListMeeting extends React.PureComponent {
isBold,
meetingType,
subheader,
theme,
title,
...props
} = this.props;
Expand Down Expand Up @@ -128,6 +129,7 @@ class SpaceListMeeting extends React.PureComponent {
className={
'md-list-item--space-meeting' +
`${(isBold && ` md-list-item--unread`) || ''}` +
`${(theme && ` md-list-item--space-${theme}`) || ''}` +
`${(className && ` ${className}`) || ''}`
}
id={id}
Expand Down Expand Up @@ -175,6 +177,8 @@ SpaceListMeeting.propTypes = {
meetingType: PropTypes.oneOf(['', 'group', 'number', 'device']),
/** @prop SpaceListMeeting sub header node | '' */
subheader: PropTypes.node,
/** @prop SpaceListMeeting color theme */
theme: PropTypes.string,
/** @prop SpaceListMeeting title | '' */
title: PropTypes.string,
};
Expand All @@ -192,6 +196,7 @@ SpaceListMeeting.defaultProps = {
eventOverlayProps: null,
meetingType: '',
subheader: '',
theme: '',
title: '',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ShallowWrapper {
isMessagingOnlyShare={false}
meetingType=""
subheader=""
theme=""
title=""
/>,
Symbol(enzyme.__renderer__): Object {
Expand Down

0 comments on commit 03336cd

Please sign in to comment.