From 6f102dc60efc8994dd70a50759bb2aa8a52d8556 Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 25 Sep 2024 12:20:39 +0200 Subject: [PATCH 01/16] chore: update dependencies and devDependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @coreui/coreui ^5.0.2 → ^5.1.2 @coreui/icons-vue 2.0.0 → 2.2.0 @coreui/vue ^5.1.0 → ^5.4.0 @vitejs/plugin-vue ^5.0.5 → ^5.1.4 autoprefixer ^10.4.19 → ^10.4.20 chart.js ^4.4.3 → ^4.4.4 eslint ^8.57.0 → ^9.11.1 eslint-plugin-vue ^9.26.0 → ^9.28.0 pinia ^2.1.7 → ^2.2.2 postcss ^8.4.38 → ^8.4.47 sass ^1.77.5 → ^1.79.3 vite ^5.3.1 → ^5.4.8 vue ^3.4.28 → ^3.5.8 vue-router ^4.3.3 → ^4.4.5 --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index de0bf194..0d3467ae 100644 --- a/package.json +++ b/package.json @@ -19,26 +19,26 @@ }, "dependencies": { "@coreui/chartjs": "^4.0.0", - "@coreui/coreui": "^5.0.2", + "@coreui/coreui": "^5.1.2", "@coreui/icons": "^3.0.1", - "@coreui/icons-vue": "2.0.0", + "@coreui/icons-vue": "2.2.0", "@coreui/utils": "^2.0.2", - "@coreui/vue": "^5.1.0", + "@coreui/vue": "^5.4.0", "@coreui/vue-chartjs": "^3.0.0", "@popperjs/core": "^2.11.8", - "chart.js": "^4.4.3", - "pinia": "^2.1.7", + "chart.js": "^4.4.4", + "pinia": "^2.2.2", "simplebar-vue": "^2.3.5", - "vue": "^3.4.28", - "vue-router": "^4.3.3" + "vue": "^3.5.8", + "vue-router": "^4.4.5" }, "devDependencies": { - "@vitejs/plugin-vue": "^5.0.5", - "autoprefixer": "^10.4.19", + "@vitejs/plugin-vue": "^5.1.4", + "autoprefixer": "^10.4.20", "eslint": "^8.57.0", - "eslint-plugin-vue": "^9.26.0", - "postcss": "^8.4.38", - "sass": "^1.77.5", - "vite": "^5.3.1" + "eslint-plugin-vue": "^9.28.0", + "postcss": "^8.4.47", + "sass": "^1.79.3", + "vite": "^5.4.8" } } From 444716362d943341f06e19fd32ac35af770f4950 Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 25 Sep 2024 12:21:40 +0200 Subject: [PATCH 02/16] build: silence Sass deprecation warnings --- vite.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vite.config.mjs b/vite.config.mjs index 7195c8b7..9c289e45 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -13,6 +13,11 @@ export default defineConfig(() => { autoprefixer({}), // add options if needed ], }, + preprocessorOptions: { + scss: { + quietDeps: true, + }, + }, }, resolve: { alias: [ From 820059a98c0f17a642190f9023a53877b9d664bd Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 25 Sep 2024 12:25:51 +0200 Subject: [PATCH 03/16] release: v5.2.0 --- index.html | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5cb553c6..6981e6fa 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ From 10252d534a997a7298877c090484c5265046ff2e Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 14 Feb 2025 13:03:09 +0100 Subject: [PATCH 13/16] chore: update dependencies and devDependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @coreui/chartjs ^4.0.0 → ^4.1.0 @coreui/coreui ^5.2.0 → ^5.3.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 47a20345..8344ee88 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "preview": "vite preview" }, "dependencies": { - "@coreui/chartjs": "^4.0.0", - "@coreui/coreui": "^5.2.0", + "@coreui/chartjs": "^4.1.0", + "@coreui/coreui": "^5.3.1", "@coreui/icons": "^3.0.1", "@coreui/icons-vue": "2.2.0", "@coreui/utils": "^2.0.2", From ff804af0367aa655e43fe212188df67640b8beee Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 14 Feb 2025 13:17:16 +0100 Subject: [PATCH 14/16] refactor: migrate to Sass modules and CSS logical properties and values --- src/App.vue | 4 +-- src/styles/_custom.scss | 1 - src/styles/_theme.scss | 64 --------------------------------- src/styles/_variables.scss | 5 --- src/styles/examples.scss | 21 +++++------ src/styles/style.scss | 74 ++++++++++++++++++++++++++++++++------ vite.config.mjs | 6 ---- 7 files changed, 73 insertions(+), 102 deletions(-) delete mode 100644 src/styles/_custom.scss delete mode 100644 src/styles/_theme.scss delete mode 100644 src/styles/_variables.scss diff --git a/src/App.vue b/src/App.vue index b06f287b..a095fda4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -36,7 +36,7 @@ onBeforeMount(() => { diff --git a/src/styles/_custom.scss b/src/styles/_custom.scss deleted file mode 100644 index 15d367af..00000000 --- a/src/styles/_custom.scss +++ /dev/null @@ -1 +0,0 @@ -// Here you can add other styles diff --git a/src/styles/_theme.scss b/src/styles/_theme.scss deleted file mode 100644 index 49e1c79e..00000000 --- a/src/styles/_theme.scss +++ /dev/null @@ -1,64 +0,0 @@ -body { - background-color: var(--cui-tertiary-bg); -} - -.wrapper { - width: 100%; - @include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0)); - @include ltr-rtl("padding-right", var(--cui-sidebar-occupy-end, 0)); - will-change: auto; - @include transition(padding .15s); -} - -.header > .container-fluid, -.sidebar-header { - min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list -} - -.sidebar-brand-full { - margin-left: 3px; -} - -.sidebar-header { - .nav-underline-border { - --cui-nav-underline-border-link-padding-x: 1rem; - --cui-nav-underline-border-gap: 0; - } - - .nav-link { - display: flex; - align-items: center; - min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list - } -} - -.sidebar-toggler { - @include ltr-rtl("margin-left", auto); -} - -.sidebar-narrow, -.sidebar-narrow-unfoldable:not(:hover) { - .sidebar-toggler { - @include ltr-rtl("margin-right", auto); - } -} - -.header > .container-fluid + .container-fluid { - min-height: 3rem; -} - -.footer { - min-height: calc(3rem + 1px); // stylelint-disable-line function-disallowed-list -} - -@if $enable-dark-mode { - @include color-mode(dark) { - body { - background-color: var(--cui-dark-bg-subtle); - } - - .footer { - --cui-footer-bg: var(--cui-body-bg); - } - } -} diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss deleted file mode 100644 index b0f8a52a..00000000 --- a/src/styles/_variables.scss +++ /dev/null @@ -1,5 +0,0 @@ -// Variable overrides -// -// If you want to customize your project please add your variables below. - -$enable-deprecation-messages: false !default; diff --git a/src/styles/examples.scss b/src/styles/examples.scss index 375fa9a5..7dfe7323 100644 --- a/src/styles/examples.scss +++ b/src/styles/examples.scss @@ -1,10 +1,7 @@ -/* stylelint-disable declaration-no-important, scss/selector-no-redundant-nesting-selector */ - -$enable-deprecation-messages: false !default; - -@import "@coreui/coreui/scss/functions"; -@import "@coreui/coreui/scss/variables"; -@import "@coreui/coreui/scss/mixins"; +/* stylelint-disable scss/selector-no-redundant-nesting-selector */ +@use "@coreui/coreui/scss/variables" as *; +@use "@coreui/coreui/scss/mixins/breakpoints" as *; +@use "@coreui/coreui/scss/mixins/color-mode" as *; .example { &:not(:first-child) { @@ -110,10 +107,8 @@ $enable-deprecation-messages: false !default; } } -@if $enable-dark-mode { - @include color-mode(dark) { - .example .tab-content { - background-color: var(--#{$prefix}secondary-bg) !important; - } +@include color-mode(dark) { + .example .tab-content { + background-color: var(--#{$prefix}secondary-bg) !important; } -} \ No newline at end of file +} diff --git a/src/styles/style.scss b/src/styles/style.scss index 4fbc8235..cf48cfdb 100644 --- a/src/styles/style.scss +++ b/src/styles/style.scss @@ -1,15 +1,67 @@ -// If you want to override variables do it here -@import "variables"; +@use "@coreui/coreui/scss/coreui" as * with ( + $enable-deprecation-messages: false +); +@use "@coreui/chartjs/scss/coreui-chartjs"; +@use "vendors/simplebar"; -// Import styles -@import "@coreui/coreui/scss/coreui"; -@import "@coreui/chartjs/scss/coreui-chartjs"; +body { + background-color: var(--cui-tertiary-bg); +} -// Vendors -@import "vendors/simplebar"; +.wrapper { + width: 100%; + padding-inline: var(--cui-sidebar-occupy-start, 0) var(--cui-sidebar-occupy-end, 0); + will-change: auto; + @include transition(padding .15s); +} -// Custom styles for this theme -@import "theme"; +.header > .container-fluid, +.sidebar-header { + min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list +} -// If you want to add custom CSS you can put it here -@import "custom"; +.sidebar-brand-full { + margin-left: 3px; +} + +.sidebar-header { + .nav-underline-border { + --cui-nav-underline-border-link-padding-x: 1rem; + --cui-nav-underline-border-gap: 0; + } + + .nav-link { + display: flex; + align-items: center; + min-height: calc(4rem + 1px); // stylelint-disable-line function-disallowed-list + } +} + +.sidebar-toggler { + margin-inline-start: auto; +} + +.sidebar-narrow, +.sidebar-narrow-unfoldable:not(:hover) { + .sidebar-toggler { + margin-inline-end: auto; + } +} + +.header > .container-fluid + .container-fluid { + min-height: 3rem; +} + +.footer { + min-height: calc(3rem + 1px); // stylelint-disable-line function-disallowed-list +} + +@include color-mode(dark) { + body { + background-color: var(--cui-dark-bg-subtle); + } + + .footer { + --cui-footer-bg: var(--cui-body-bg); + } +} diff --git a/vite.config.mjs b/vite.config.mjs index 6fc2bd88..7195c8b7 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -13,12 +13,6 @@ export default defineConfig(() => { autoprefixer({}), // add options if needed ], }, - preprocessorOptions: { - scss: { - quietDeps: true, - silenceDeprecations: ['import', 'legacy-js-api'], - }, - }, }, resolve: { alias: [ From 5f517fd123cb8f9c0bc560e13c8f06bea7d5dac4 Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 14 Feb 2025 13:27:16 +0100 Subject: [PATCH 15/16] chore: clean-up --- src/styles/examples.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/examples.scss b/src/styles/examples.scss index 7dfe7323..dbfe258f 100644 --- a/src/styles/examples.scss +++ b/src/styles/examples.scss @@ -109,6 +109,6 @@ @include color-mode(dark) { .example .tab-content { - background-color: var(--#{$prefix}secondary-bg) !important; + background-color: var(--#{$prefix}secondary-bg); } } From f4a09815b6e5082594472b74998cadfb9c852474 Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 14 Feb 2025 13:56:35 +0100 Subject: [PATCH 16/16] release: v5.3.0 --- index.html | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c3c244de..2d8d8ef1 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@