-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fn): introduce fn-table [ci visual] (#3165)
* feat(fn): start on fn-table * feat(fn): fn-table implementation, and some minor fixes on list story * feat(fn): improve docs and small changes to css for fn-table * feat(fn): new side nav structure * feat(fn): allow empty [ci visual] * feat(fn): pr comments * feat(fn): remove selected hover * feat(fn): allow empty [ci visual]
- Loading branch information
1 parent
a2bcab1
commit 65f7a79
Showing
7 changed files
with
2,930 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
@import "./fn-settings"; | ||
|
||
$block: #{$fn-namespace}-table; | ||
$fn-table-item-margin: 0.375rem; | ||
$fn-table-item-box-shadow: 0 0 0 $fn-border-radius-2; | ||
|
||
.#{$block} { | ||
@include fn-reset(); | ||
|
||
width: 100%; | ||
max-width: 100%; | ||
border-collapse: collapse; | ||
|
||
&__row { | ||
@include fn-reset(); | ||
|
||
@include fn-selected() { | ||
.#{$block}__cell { | ||
background: $fn-color-blue-2; | ||
box-shadow: $fn-list-table-item-bottom-box-shadow #0070f1; | ||
|
||
@include fn-hover() { | ||
@include fn-transition(); | ||
|
||
background: $fn-color-blue-2; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.#{$block}__text { | ||
@include fn-reset(); | ||
@include fn-ellipsis(); | ||
|
||
word-break: break-word; | ||
white-space: normal; | ||
|
||
&--no-wrap { | ||
white-space: nowrap; | ||
} | ||
} | ||
|
||
&__cell, | ||
&__group-header, | ||
&__header { | ||
@include fn-reset(); | ||
|
||
box-shadow: $fn-list-table-item-bottom-box-shadow #e4e5e7; | ||
} | ||
|
||
&__cell, | ||
&__group-header { | ||
background: $fn-color-white; | ||
height: 2.75rem; | ||
} | ||
|
||
&__group-header, | ||
&__header { | ||
text-transform: uppercase; | ||
text-align: start; | ||
font-size: 0.75rem; | ||
line-height: 1.125rem; | ||
font-weight: bold; | ||
|
||
.#{$block}__text--end { | ||
@include fn-set-margin-left(auto); | ||
} | ||
|
||
.#{$block}__header-checkbox { | ||
@include fn-set-margin-left(-0.25rem); | ||
} | ||
} | ||
|
||
&__group-header { | ||
padding: 1.25rem 0.75rem 0.375rem; | ||
} | ||
|
||
&__header { | ||
background: $fn-color-grey-2; | ||
height: 2rem; | ||
|
||
@include fn-set-padding-left(1rem); | ||
|
||
&:not(:first-of-type) { | ||
@include fn-set-padding-left(0.75rem); | ||
} | ||
} | ||
|
||
&__cell { | ||
&:not(.fn-table__cell--no-hover) { | ||
@include fn-hover() { | ||
@include fn-transition(); | ||
|
||
background: $fn-color-grey-1; | ||
} | ||
} | ||
|
||
@include fn-focus-visible() { | ||
outline: none; | ||
border-radius: $fn-border-radius-2; | ||
position: relative; | ||
} | ||
|
||
@include fn-not-focus-visible() { | ||
@include fn-hover() { | ||
@include fn-transition(); | ||
|
||
background: $fn-color-grey-1; | ||
} | ||
} | ||
|
||
@include fn-selected() { | ||
background: $fn-color-blue-2; | ||
box-shadow: $fn-list-table-item-bottom-box-shadow #0070f1; | ||
|
||
@include fn-hover() { | ||
@include fn-transition(); | ||
|
||
background: $fn-color-blue-2; | ||
} | ||
} | ||
|
||
padding: $fn-table-item-margin 0.75rem; | ||
|
||
@include fn-disabled() { | ||
pointer-events: none; | ||
opacity: $fn-disabled-opacity; | ||
} | ||
|
||
.fn-table__start-container:not(:first-child) { | ||
@include fn-set-margin-left($fn-table-item-margin); | ||
} | ||
|
||
.#{$block}__text { | ||
@include fn-reset(); | ||
@include fn-flex-vertical-center(); | ||
|
||
display: block; | ||
color: $fn-color-grey-9; | ||
} | ||
|
||
&--byline { | ||
@include fn-flex-vertical-center(); | ||
|
||
min-height: 3.75rem; | ||
|
||
.#{$block}__start-container { | ||
@include fn-reset(); | ||
@include fn-flex(column); | ||
|
||
.#{$block}__byline-text, .#{$block}__byline-title { | ||
@include fn-reset(); | ||
@include fn-ellipsis(); | ||
|
||
color: $fn-color-grey-9; | ||
} | ||
|
||
.#{$block}__byline-title { | ||
font-weight: bold; | ||
} | ||
|
||
.#{$block}__byline-text { | ||
font-size: 0.75rem; | ||
line-height: 1rem; | ||
} | ||
} | ||
} | ||
} | ||
|
||
&__end-container { | ||
@include fn-reset(); | ||
@include fn-flex-vertical-center(); | ||
|
||
:not(:last-child) { | ||
@include fn-set-margin-right($fn-table-item-margin); | ||
} | ||
|
||
button:first-child { | ||
@include fn-set-margin-left(auto); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.