Skip to content

Commit

Permalink
Merge pull request #1483 from bcgov/feature/sassUpgrade
Browse files Browse the repository at this point in the history
Sass fixes and library updates
  • Loading branch information
loneil authored Jan 21, 2025
2 parents dbd5199 + b65196e commit 7bca94b
Show file tree
Hide file tree
Showing 19 changed files with 749 additions and 505 deletions.
1,063 changes: 664 additions & 399 deletions services/tenant-ui/frontend/package-lock.json

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions services/tenant-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@jsonforms/vue": "^3.4.1",
"@jsonforms/vue-vanilla": "^3.4.1",
"@intlify/unplugin-vue-i18n": "^6.0.3",
"@jsonforms/vue": "^3.5.1",
"@jsonforms/vue-vanilla": "^3.5.1",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"axios": "^1.7.7",
Expand All @@ -33,34 +33,33 @@
"primevue": "^3.53.0",
"qrcode.vue": "^3.6.0",
"vue": "^3.5.12",
"vue-i18n": "^9.13.1",
"vue-i18n": "^11.0.1",
"vue-json-pretty": "^2.4.0",
"vue-router": "^4.4.5",
"vue-toastification": "^2.0.0-rc.5"
},
"devDependencies": {
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
"@pinia/testing": "^0.1.7",
"@types/dompurify": "^3.0.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-vue": "^5.1.5",
"@vitest/coverage-v8": "^2.1.4",
"@vitest/coverage-v8": "^3.0.2",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.4.6",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^5.2.2",
"eslint-plugin-vue": "^9.31.0",
"flat": "^6.0.1",
"glob": "^11.0.0",
"jsdom": "^25.0.1",
"glob": "^11.0.1",
"jsdom": "^26.0.0",
"msw": "^2.6.4",
"prettier": "^3.3.3",
"sass": "^1.80.7",
"sass": "^1.83.4",
"typescript": "^5.6.3",
"vite": "^5.4.11",
"vitest": "^2.1.4",
"vite": "^6.0.7",
"vitest": "^3.0.2",
"vue-tsc": "^2.1.10",
"whatwg-fetch": "^3.6.20"
}
Expand Down
2 changes: 1 addition & 1 deletion services/tenant-ui/frontend/src/assets/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables.scss';
@forward 'variables.scss';

:root {
--surface-a: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion services/tenant-ui/frontend/src/assets/layout.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables.scss';
@use 'variables.scss' as *; // Import variables as global

// General application layout and styles for the 'containing' components (nav, content, etc)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../variables.scss';
@use '../variables.scss' as *;

button {
&.p-button {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../variables.scss';
@use '../variables.scss' as *;

// Data Tables
.p-datatable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../variables.scss';
@use '../variables.scss' as *;

// Specific to form text fields, layout, spacing, etc
// inputs/textareas etc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use "sass:color";

@import '../variables.scss';
@use '../variables.scss' as *;

// Input Switches
.p-inputswitch {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../variables.scss';
@use '../variables.scss' as *;

// The Accordion and its tabs
.p-accordion {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'buttons.scss';
@import 'datatable.scss';
@import 'formFields.scss';
@import 'inputSwitch.scss';
@import 'panels.scss';
@forward 'buttons.scss';
@forward 'datatable.scss';
@forward 'formFields.scss';
@forward 'inputSwitch.scss';
@forward 'panels.scss';
12 changes: 7 additions & 5 deletions services/tenant-ui/frontend/src/assets/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@import 'primevue/resources/themes/lara-light-blue/theme.css'; // includes '~primevue/resources/themes/nova/theme.css'
@import 'layout.scss';
@import 'tenantuiComponents.scss';
@import 'primevueOverrides/primevueOverrides.scss';
@import 'toast.scss';
@forward 'primevue/resources/themes/lara-light-blue/theme.css'; // includes '~primevue/resources/themes/nova/theme.css'
@forward 'layout.scss';
@forward 'tenantuiComponents.scss';
@forward 'primevueOverrides/primevueOverrides.scss';
@forward 'toast.scss';
@forward 'variables.scss';
@use 'variables.scss' as *;

// General HTML
html,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables.scss';
@use 'variables.scss' as *;
// For styling UI pieces that we are adding to the Tenant UI ourselves

// The chip that displays api response statuses etc
Expand Down
22 changes: 2 additions & 20 deletions services/tenant-ui/frontend/src/assets/toast.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
@import 'variables.scss';
@forward "vue-toastification/dist/index.css";
@use 'variables.scss' as *;
// For overriding the Vue-Toastification library
// https://github.com/Maronato/vue-toastification/blob/main/src/scss/_variables.scss

// Override the variables or import a file that overrides them
$vt-color-error: $tenant-ui-status-red-background;
$vt-text-color-error: $tenant-ui-status-red-color;
$vt-color-success: #76c078;
$vt-text-color-success: white;
$vt-color-info: #b3e5fc;
$vt-text-color-info: #0c5ea0;
$vt-color-warning: $tenant-ui-status-amber-background;
$vt-text-color-warning: $tenant-ui-status-amber-color;

// Import the regular Vue Toastification stylesheets (or create your own)
@import 'vue-toastification/src/scss/_variables';
@import 'vue-toastification/src/scss/_toastContainer';
@import 'vue-toastification/src/scss/_toast';
@import 'vue-toastification/src/scss/_closeButton';
@import 'vue-toastification/src/scss/_progressBar';
@import 'vue-toastification/src/scss/_icon';
@import 'vue-toastification/src/scss/animations/_bounce';

// Some custom styling
.Vue-Toastification__toast {
border-left-width: 15px;
Expand Down
1 change: 0 additions & 1 deletion services/tenant-ui/frontend/src/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ const handleSubmit = async (isFormValid: boolean) => {
</script>

<style scoped lang="scss">
@import '@/assets/variables.scss';
.tab-container {
&::v-deep(.p-tabview-panels) {
padding: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ const showNotActiveWarn = computed(
</script>

<style lang="scss" scoped>
@import '@/assets/variables.scss';
.inactive-endorser {
color: $tenant-ui-text-warning;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ const hasPublicDid = computed(() => !!publicDid.value && !!publicDid.value.did);
</script>

<style lang="scss" scoped>
@import '@/assets/variables.scss';
.p-datatable {
border-top: 1px solid $tenant-ui-panel-border-color;
}
Expand Down
2 changes: 1 addition & 1 deletion services/tenant-ui/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/variables.scss";`,
additionalData: `@use "@/assets/variables.scss" as *;`,
api: 'modern-compiler',
},
},
Expand Down
96 changes: 48 additions & 48 deletions services/tenant-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bca94b

Please sign in to comment.