Skip to content

Commit

Permalink
feat(stark-ui): expose single file (src/assets/stark-ui.scss) to impo…
Browse files Browse the repository at this point in the history
…rt all `.scss` files needed for stark-ui

  - updated showcase/starter
    - import `stark-ui.scss`
    - remove `_stark-styles.scss`
    - remove `~@angular/material/theming` from `_theme.scss`
    - remove additional themes

ISSUES CLOSED: NationalBankBelgium#103
  • Loading branch information
carlo-nomes committed Jan 23, 2019
1 parent 2fcef57 commit c044abf
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 88 deletions.
42 changes: 42 additions & 0 deletions packages/stark-ui/assets/stark-ui-bundle.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import "./themes/button-theme";
@import "./themes/card-theme";
/* Stark styles */
@import "./styles/header";
/* Stark components */
@import "../src/modules/app-logo/components/app-logo-theme";
@import "../src/modules/app-logo/components/app-logo.component";
@import "../src/modules/app-data/components/app-data.component";
@import "../src/modules/app-data/components/app-data-theme";
@import "../src/modules/app-footer/components/app-footer.component";
@import "../src/modules/app-footer/components/app-footer-theme";
@import "../src/modules/app-menu/components/app-menu-theme";
@import "../src/modules/app-menu/components/app-menu.component";
@import "../src/modules/action-bar/components/action-bar-theme";
@import "../src/modules/action-bar/components/action-bar.component";
@import "../src/modules/app-sidebar/components/app-sidebar-theme";
@import "../src/modules/app-sidebar/components/app-sidebar.component";
@import "../src/modules/breadcrumb/components/breadcrumb.component";
@import "../src/modules/collapsible/components/collapsible-theme";
@import "../src/modules/collapsible/components/collapsible.component";
@import "../src/modules/date-range-picker/components/date-range-picker.component";
@import "../src/modules/language-selector/components/language-selector.component";
@import "../src/modules/message-pane/components/message-pane.component";
@import "../src/modules/message-pane/components/message-pane-theme";
@import "../src/modules/minimap/components/minimap.component";
@import "../src/modules/minimap/components/minimap-theme";
@import "../src/modules/slider/components/slider-theme";
@import "../src/modules/pagination/components/pagination.component";
@import "../src/modules/pagination/components/pagination-theme";
@import "../src/modules/pretty-print/components/pretty-print.component";
@import "../src/modules/table/components/table.component";
@import "../src/modules/table/components/table-theme";
@import "../src/modules/table/components/dialogs/multisort.component";
@import "../src/modules/dropdown/components/dropdown-theme";
@import "../src/modules/toast-notification/components/toast-notification.component";
@import "../src/modules/toast-notification/components/toast-notification-theme";
@import "../src/modules/dropdown/components/dropdown.component";
/* Stark session-ui pages */
@import "../src/modules/session-ui/pages/login/login-page.component";
@import "../src/modules/session-ui/pages/preloading/preloading-page.component";
@import "../src/modules/session-ui/pages/session-expired/session-expired-page.component";
@import "../src/modules/session-ui/pages/session-logout/session-logout-page.component";
45 changes: 0 additions & 45 deletions showcase/src/styles/_stark-styles.scss

This file was deleted.

7 changes: 1 addition & 6 deletions showcase/src/styles/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@import "~@angular/material/theming";
@import "variables";

/* Stark NG Material themes */
@import "~@nationalbankbelgium/stark-ui/assets/themes/theming";
@import "~@nationalbankbelgium/stark-ui/assets/themes/button-theme";
@import "~@nationalbankbelgium/stark-ui/assets/themes/card-theme";
@import "variables";

@import "../app/app.component-theme";
@import "../app/shared/components/example-viewer/example-viewer-theme";
Expand Down
11 changes: 8 additions & 3 deletions showcase/src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
@import "basscss-missing-variables.pcss"; /* FIXME: Remove this import once the issue in basscss is solved (see: https://github.com/basscss/basscss/issues/257) */
@import "basscss-missing-variables.pcss";
/* FIXME: Remove this import once the issue in basscss is solved (see: https://github.com/basscss/basscss/issues/257) */
@import "~basscss/css/basscss.css";
@import "~prismjs/themes/prism-okaidia.css";

/*
Import the local theme file first to set the correct variables, see:
- https://stark.nbb.be/showcase/latest/styleguide/typography
- https://stark.nbb.be/showcase/latest/styleguide/colors
*/
@import "theme";
@import "stark-styles.scss";
@import "~@nationalbankbelgium/stark-ui/assets/stark-ui-bundle";
@import "../app/app.component";
@import "../app/shared/components/reference-block/reference-block.component";
@import "../app/shared/components/table-of-contents/table-of-contents.component";
Expand Down
26 changes: 0 additions & 26 deletions starter/src/styles/_stark-styles.scss

This file was deleted.

6 changes: 0 additions & 6 deletions starter/src/styles/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
@import "~@angular/material/theming";
@import "variables";

/* Stark NG Material themes */
@import "~@nationalbankbelgium/stark-ui/assets/themes/theming";
@import "~@nationalbankbelgium/stark-ui/assets/themes/button-theme";
@import "~@nationalbankbelgium/stark-ui/assets/themes/card-theme";
7 changes: 5 additions & 2 deletions starter/src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
IMPORTANT: Stark styles are provided as SCSS styles so they should be imported in a SCSS file!
*/
@import "~@nationalbankbelgium/stark-ui/assets/stark-ui";
@import "theme";
@import "stark-styles.scss";
@import "../app/app.component.scss";
@import "../app/app.component";

0 comments on commit c044abf

Please sign in to comment.