Skip to content

Commit

Permalink
Fixed the vite build issue (#16)
Browse files Browse the repository at this point in the history
* added the compiler option in tsconfig

* changed the nr-fsa-theme to nr-theme
  • Loading branch information
jazzgrewal authored Sep 22, 2023
1 parent 25865bc commit 905d86e
Show file tree
Hide file tree
Showing 11 changed files with 9,475 additions and 13,861 deletions.
23,251 changes: 9,432 additions & 13,819 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@aws-amplify/ui-react": "^5.0.0",
"@bcgov-nr/nr-fsa-theme": "^1.0.10",
"@bcgov-nr/nr-theme": "^1.0.10",
"@carbon/pictograms-react": "^11.49.0",
"@carbon/react": "^1.27.0",
"@esbuild/linux-x64": "^0.19.0",
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/BCHeader/BCHeader.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/colors.scss' as colors;
@use '@bcgov-nr/nr-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-theme/design-tokens/colors.scss' as colors;

.spar-header {
overflow: hidden;
Expand Down Expand Up @@ -34,31 +34,31 @@ button.#{vars.$bcgov-prefix}--header__action {
}

button.#{vars.$bcgov-prefix}--header__action--active {
background: var(--bcgov-layer-02);
background: var(--bx-layer-02);
border: 0;
}

.#{vars.$bcgov-prefix}--header__global .#{vars.$bcgov-prefix}--btn--icon-only.#{vars.$bcgov-prefix}--header__action svg,
button.#{vars.$bcgov-prefix}--header__action svg {
fill: var(--bcgov-icon-on-color) ;
fill: var(--bx-icon-on-color) ;
}

button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__action--active > svg,
.#{vars.$bcgov-prefix}--popover-container button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__action--active > svg {
fill: var(--bcgov-icon-primary) ;
fill: var(--bx-icon-primary) ;
}

button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__menu-trigger:focus {
border-color: var(--bcgov-icon-on-color);
border-color: var(--bx-icon-on-color);
}

.#{vars.$bcgov-prefix}--header-panel--expanded.notifications-panel,
.#{vars.$bcgov-prefix}--header-panel--expanded.profile-panel {
z-index: 10000;
width: 25rem;
height: 100vh;
background-color: var(--bcgov-layer-02);
color: var(--bcgov-text-primary);
background-color: var(--bx-layer-02);
color: var(--bx-text-primary);
transition: width 0.11s cubic-bezier(0.2, 0, 1, 0.9);
will-change: width;
}
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/BCHeaderwSide/BCHeaderwSide.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/colors.scss' as colors;
@use '@bcgov-nr/nr-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-theme/design-tokens/colors.scss' as colors;

.spar-header {
overflow: hidden;
Expand Down Expand Up @@ -34,31 +34,31 @@ button.#{vars.$bcgov-prefix}--header__action {
}

button.#{vars.$bcgov-prefix}--header__action--active {
background: var(--bcgov-layer-02);
background: var(--bx-layer-02);
border: 0;
}

.#{vars.$bcgov-prefix}--header__global .#{vars.$bcgov-prefix}--btn--icon-only.#{vars.$bcgov-prefix}--header__action svg,
button.#{vars.$bcgov-prefix}--header__action svg {
fill: var(--bcgov-icon-on-color) ;
fill: var(--bx-icon-on-color) ;
}

button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__action--active > svg,
.#{vars.$bcgov-prefix}--popover-container button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__action--active > svg {
fill: var(--bcgov-icon-primary) ;
fill: var(--bx-icon-primary) ;
}

button.#{vars.$bcgov-prefix}--header__action.#{vars.$bcgov-prefix}--header__menu-trigger:focus {
border-color: var(--bcgov-icon-on-color);
border-color: var(--bx-icon-on-color);
}

.#{vars.$bcgov-prefix}--header-panel--expanded.notifications-panel,
.#{vars.$bcgov-prefix}--header-panel--expanded.profile-panel {
z-index: 10000;
width: 25rem;
height: 100vh;
background-color: var(--bcgov-layer-02);
color: var(--bcgov-text-primary);
background-color: var(--bx-layer-02);
color: var(--bx-text-primary);
transition: width 0.11s cubic-bezier(0.2, 0, 1, 0.9);
will-change: width;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MyProfile/MyProfile.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-theme/design-tokens/variables.scss' as vars;

.user-info-section {
padding: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/StandardCard/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/variables.scss' as vars;
@use '@bcgov-nr/nr-theme/design-tokens/variables.scss' as vars;
@use '@carbon/type';

.std-card-header {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ThemeToggle/ThemeToggle.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/colors.scss' as colors;
@use '@bcgov-nr/nr-theme/design-tokens/colors.scss' as colors;
.theme-toggle {
width: 48px;
height: 24px;
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/custom.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@use '@bcgov-nr/nr-fsa-theme/design-tokens/light-theme.scss' as light;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/dark-theme.scss' as dark;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/colors.scss' as colors;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/type-family.scss' as types;
@use '@bcgov-nr/nr-theme/design-tokens/light-theme.scss' as light;
@use '@bcgov-nr/nr-theme/design-tokens/dark-theme.scss' as dark;
@use '@bcgov-nr/nr-theme/design-tokens/colors.scss' as colors;
@use '@bcgov-nr/nr-theme/design-tokens/type-family.scss' as types;

@use '@bcgov-nr/nr-fsa-theme/style-sheets/carbon-components-overrides.scss';
@use '@bcgov-nr/nr-theme/style-sheets/carbon-components-overrides.scss';

@use '@carbon/type/scss/_font-family.scss' with (
$font-families: types.$type-family,
Expand All @@ -24,16 +24,16 @@
// on the components
// (Open issue: https://github.com/carbon-design-system/carbon/issues/12376)
@use '@carbon/react/scss/components/button/tokens' as button-tokens;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/light-buttons.scss' as light-button-overrides;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/dark-buttons.scss' as dark-button-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/light-buttons.scss' as light-button-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/dark-buttons.scss' as dark-button-overrides;

@use '@carbon/react/scss/components/tag/tokens' as tag-tokens;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/light-tags.scss' as light-tag-overrides;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/dark-tags.scss' as dark-tag-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/light-tags.scss' as light-tag-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/dark-tags.scss' as dark-tag-overrides;

@use '@carbon/react/scss/components/notification/tokens' as notification-tokens;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/light-notifications.scss' as light-notification-overrides;
@use '@bcgov-nr/nr-fsa-theme/design-tokens/dark-notifications.scss' as dark-notification-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/light-notifications.scss' as light-notification-overrides;
@use '@bcgov-nr/nr-theme/design-tokens/dark-notifications.scss' as dark-notification-overrides;

@use '@carbon/react';
@use '@carbon/grid';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const root = createRoot(container);

root.render(
<React.StrictMode>
<ClassPrefix prefix='bcgov'>
<ClassPrefix prefix='bx'>
<ThemePreference>
<Provider store={store}>
<App />
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/theme/components-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

nav.#{variables.$bcgov-prefix}--side-nav {
box-shadow: inset -1px 0 0 colors.$gray-20;
background-color: var(--bcgov-background-left-panel);
background-color: var(--bx-background-left-panel);
}

.#{variables.$bcgov-prefix}--side-nav__items {
Expand Down Expand Up @@ -172,7 +172,7 @@ nav.#{variables.$bcgov-prefix}--side-nav {
}

.#{variables.$bcgov-prefix}--header {
background-color: var(--bcgov-background-brand) !important;
background-color: var(--bx-background-brand) !important;
}

ul.#{variables.$bcgov-prefix}--accordion {
Expand Down Expand Up @@ -212,21 +212,21 @@ $types: 'error', 'info', 'success', 'warning';

@each $notificationType in $types {
div.#{variables.$bcgov-prefix}--inline-notification--#{$notificationType}{
border-left: 4px solid var(--bcgov-support-#{$notificationType}-inverse);}
border-left: 4px solid var(--bx-support-#{$notificationType}-inverse);}
div.#{variables.$bcgov-prefix}--inline-notification--low-contrast.#{variables.$bcgov-prefix}--inline-notification--#{$notificationType}{
border-left: 4px solid var(--bcgov-support-#{$notificationType});}
border-left: 4px solid var(--bx-support-#{$notificationType});}
div.#{variables.$bcgov-prefix}--inline-notification--low-contrast.#{variables.$bcgov-prefix}--inline-notification--#{$notificationType}::before{
border-color: var(--bcgov-notification-border-#{$notificationType});}
border-color: var(--bx-notification-border-#{$notificationType});}
}

@each $notificationType in $types {
div.#{variables.$bcgov-prefix}--toast-notification--#{$notificationType}{
border-left: 4px solid var(--bcgov-support-#{$notificationType}-inverse);}
border-left: 4px solid var(--bx-support-#{$notificationType}-inverse);}
div.#{variables.$bcgov-prefix}--toast-notification--low-contrast.#{variables.$bcgov-prefix}--toast-notification--#{$notificationType}{
border-left: 4px solid var(--bcgov-support-#{$notificationType});
border-top-color: var(--bcgov-notification-border-#{$notificationType});
border-bottom-color: var(--bcgov-notification-border-#{$notificationType});
border-right-color: var(--bcgov-notification-border-#{$notificationType})}
border-left: 4px solid var(--bx-support-#{$notificationType});
border-top-color: var(--bx-notification-border-#{$notificationType});
border-bottom-color: var(--bx-notification-border-#{$notificationType});
border-right-color: var(--bx-notification-border-#{$notificationType})}
}

.#{variables.$bcgov-prefix}--overflow-menu.bcgov--overflow-menu--open{
Expand Down
1 change: 1 addition & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"types": ["vite/client"],
"target": "ESNext",
"lib": [
"dom",
Expand Down

0 comments on commit 905d86e

Please sign in to comment.