-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Table): Sbanken styling (#2513)
- Loading branch information
Showing
57 changed files
with
229 additions
and
109 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
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
Binary file added
BIN
+3.92 KB
...r-sbanken-have-to-match-a-active-sortable-table-header-on-active-state.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.6 KB
...age_snapshots__/table-for-sbanken-have-to-match-a-complex-table-layout.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24 KB
...image_snapshots__/table-for-sbanken-have-to-match-a-fixed-table-layout.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.1 KB
...pshots__/table-for-sbanken-have-to-match-a-row-scope-only-table-layout.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.15 KB
...ts__/table-for-sbanken-have-to-match-a-sortable-table-header-on-active.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.63 KB
...ots__/table-for-sbanken-have-to-match-a-sortable-table-header-on-focus.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.2 KB
...ots__/table-for-sbanken-have-to-match-a-sortable-table-header-on-hover.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.4 KB
...e_snapshots__/table-for-sbanken-have-to-match-header-with-wrapped-text.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.2 KB
...ts__/__image_snapshots__/table-for-sbanken-have-to-match-sticky-header.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+43.1 KB
...__/__image_snapshots__/table-for-sbanken-have-to-match-table-container.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13 KB
...__/table-for-sbanken-have-to-match-table-empty-container-head-and-foot.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.1 KB
...image_snapshots__/table-for-sbanken-have-to-match-table-in-medium-size.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.1 KB
..._image_snapshots__/table-for-sbanken-have-to-match-table-in-small-size.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.2 KB
...napshots__/table-for-sbanken-have-to-match-table-without-inner-classes.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.9 KB
...s__/table-for-sbanken-have-to-match-the-default-choice-of-table-styles.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+31.7 KB
..._image_snapshots__/table-for-ui-have-to-match-header-with-wrapped-text.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+13.3 KB
...age_snapshots__/table-for-ui-have-to-match-table-without-inner-classes.snap.png
Oops, something went wrong.
Binary file added
BIN
+28.7 KB
...pshots__/table-for-ui-have-to-match-the-default-choice-of-table-styles.snap.png
Oops, something went wrong.
Binary file removed
BIN
-31.7 KB
...sts__/__image_snapshots__/table-have-to-match-header-with-wrapped-text.snap.png
Diff not rendered.
Binary file removed
BIN
-13.3 KB
...__/__image_snapshots__/table-have-to-match-table-without-inner-classes.snap.png
Diff not rendered.
Binary file removed
BIN
-28.7 KB
...age_snapshots__/table-have-to-match-the-default-choice-of-table-styles.snap.png
Diff not rendered.
Binary file added
BIN
+18.4 KB
...able-with-accordion-for-sbanken-have-to-match-active-state-on-last-row.snap.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...apshots__/table-with-accordion-for-sbanken-have-to-match-default-state.snap.png
Oops, something went wrong.
Binary file added
BIN
+20.4 KB
...e-with-accordion-for-sbanken-have-to-match-expanded-state-on-first-row.snap.png
Oops, something went wrong.
Binary file added
BIN
+19.2 KB
...table-with-accordion-for-sbanken-have-to-match-focus-state-on-last-row.snap.png
Oops, something went wrong.
Binary file added
BIN
+19.2 KB
...able-with-accordion-for-sbanken-have-to-match-hover-state-on-first-row.snap.png
Oops, something went wrong.
Binary file added
BIN
+19.2 KB
...table-with-accordion-for-sbanken-have-to-match-hover-state-on-last-row.snap.png
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+16.7 KB
...ge_snapshots__/table-with-accordion-for-ui-have-to-match-default-state.snap.png
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed
BIN
-16.7 KB
..._/__image_snapshots__/table-with-accordion-have-to-match-default-state.snap.png
Diff not rendered.
Binary file added
BIN
+8.14 KB
...napshots__/table-with-skeleton-for-sbanken-have-to-match-default-table.snap.png
Oops, something went wrong.
Binary file added
BIN
+8.53 KB
...age_snapshots__/table-with-skeleton-for-ui-have-to-match-default-table.snap.png
Oops, something went wrong.
Binary file removed
BIN
-8.5 KB
...__/__image_snapshots__/table-with-skeleton-have-to-match-default-table.snap.png
Diff not rendered.
95 changes: 95 additions & 0 deletions
95
packages/dnb-eufemia/src/components/table/style/themes/dnb-table-theme-sbanken.scss
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,95 @@ | ||
/* | ||
* Table theme | ||
* | ||
*/ | ||
|
||
@import '../../../../style/core/utilities.scss'; | ||
@import '../table-mixins.scss'; | ||
|
||
@mixin tableFocusRing() { | ||
&::before { | ||
top: -0.1875rem; | ||
bottom: -0.0625rem; | ||
left: -0.5rem; | ||
right: -0.25rem; | ||
} | ||
} | ||
|
||
.dnb-table { | ||
text-align: left; | ||
|
||
& thead { | ||
border-bottom: var(--border); | ||
} | ||
|
||
&__th, | ||
& thead th { | ||
padding: 0.5rem 1.5rem 0.25rem; | ||
background-color: var(--sb-color-white); | ||
} | ||
|
||
& &__tr--even { | ||
background-color: var(--sb-color-gray-light-3); | ||
} | ||
|
||
&__td, | ||
& tbody &__th, | ||
& tbody td, | ||
& tbody th { | ||
padding: 1rem 1.5rem; | ||
} | ||
|
||
/* BUTTONS INSIDE TABLE */ | ||
|
||
// No sorting applied | ||
& > thead > tr > th#{&}--sortable, | ||
& &__th#{&}--sortable { | ||
.dnb-table__sort-button.dnb-button { | ||
color: var(--sb-color-violet); | ||
& .dnb-button__text::after { | ||
bottom: -0.0625rem; | ||
left: 0; | ||
opacity: 0; | ||
color: var(--sb-color-violet); | ||
} | ||
&:not(:focus) .dnb-button__text::after { | ||
color: var(--sb-color-violet); | ||
} | ||
@include hover() { | ||
color: var(--sb-color-violet); | ||
} | ||
@include active() { | ||
color: var(--sb-color-violet); | ||
@include tableFocusRing(); | ||
} | ||
@include focus() { | ||
@include tableFocusRing(); | ||
} | ||
} | ||
} | ||
|
||
& > thead > tr > th#{&}--active, | ||
& &__th#{&}--active { | ||
.dnb-table__sort-button.dnb-button { | ||
@include hover() { | ||
& .dnb-button__text::after { | ||
color: var(--sb-color-violet); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.dnb-table, | ||
.dnb-table__container { | ||
--border-width: 0.0625rem; | ||
--outline-width: 0.0625rem; | ||
|
||
// table border | ||
--border: var(--border-width) solid var(--sb-color-gray-light-2); | ||
|
||
// table outline | ||
--outline: var(--outline-width) solid var(--sb-color-gray-light-2); | ||
|
||
background-color: var(--sb-color-white); | ||
} |
Oops, something went wrong.
bd0ae68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
eufemia – ./
eufemia-dnb-design-system-portal.vercel.app
eufemia-eufemia.vercel.app
eufemia-git-main-eufemia.vercel.app