From 7fa378462442693dff395737150a42e0862825b7 Mon Sep 17 00:00:00 2001 From: GU Yiling Date: Wed, 23 Oct 2024 22:42:27 +0800 Subject: [PATCH] chore(deps): update to sass@1.80 and switch to @use (#1734) * chore(deps): update to sass@1.80 and switch to @use * fix(*): base -> globals --- package.json | 2 +- .../sandbox/pages/BarChartDemo.vue | 2 +- .../sandbox/pages/ChartDemoSimple.vue | 2 +- .../sandbox/pages/DonutChartDemo.vue | 2 +- .../sandbox/pages/TimeSeriesChartDemo.vue | 2 +- .../src/components/AnalyticsChart.vue | 4 +- .../src/components/SimpleChart.vue | 4 +- .../src/components/TopNTable.vue | 3 +- .../components/chart-plugins/ChartLegend.vue | 3 +- .../components/chart-plugins/ChartTooltip.vue | 2 +- .../components/chart-types/DoughnutChart.vue | 4 +- .../src/components/chart-types/GaugeChart.vue | 4 +- .../chart-types/StackedBarChart.vue | 4 +- .../chart-types/TimeSeriesChart.vue | 4 +- .../analytics-chart/src/styles/base.scss | 1 - .../src/styles/chart-shell.scss | 2 + .../analytics-chart/src/styles/chart.scss | 2 + .../analytics-chart/src/styles/globals.scss | 2 + .../analytics-chart/src/styles/mixins.scss | 2 + .../src/components/MetricCardContainer.vue | 2 +- .../display/MetricCardLoadingSkeleton.vue | 3 +- .../src/components/display/MetricsCard.vue | 4 +- .../src/styles/_mixins.scss | 2 + .../src/styles/base.scss | 1 - .../src/styles/globals.scss | 2 + .../src/components/MetricCardContainer.vue | 2 +- .../display/MetricCardLoadingSkeleton.vue | 3 +- .../src/components/display/MetricsCard.vue | 5 +- .../metric-cards/src/styles/base.scss | 1 - .../metric-cards/src/styles/globals.scss | 2 + .../app-layout/src/components/AppLayout.vue | 4 +- .../src/components/errors/AppError.vue | 2 +- .../src/components/navbar/AppNavbar.vue | 2 +- .../src/components/sidebar/AppSidebar.vue | 4 +- .../src/components/sidebar/SidebarItem.vue | 4 +- .../src/components/sidebar/SidebarToggle.vue | 2 +- .../core/app-layout/src/styles/_base.scss | 2 + .../app-layout/src/styles/_variables.scss | 5 +- .../app-layout/src/styles/app-layout.scss | 3 +- .../src/styles/variables/_app-navbar.scss | 2 + .../src/styles/variables/_app-sidebar.scss | 2 + .../src/components/ConsumerCredentialList.vue | 1 - .../src/components/RouteForm.vue | 2 +- .../RouteFormDestinationsFields.vue | 2 +- .../src/components/RouteFormHeadersFields.vue | 2 +- .../src/components/RouteFormHostsFields.vue | 2 +- .../src/components/RouteFormMethodsFields.vue | 2 +- .../src/components/RouteFormPathsFields.vue | 2 +- .../src/components/RouteFormSnisFields.vue | 2 +- .../src/components/RouteFormSourcesFields.vue | 2 +- .../entities-routes/src/styles/_mixins.scss | 2 + pnpm-lock.yaml | 280 +++++++++--------- vite.config.shared.ts | 2 +- 53 files changed, 217 insertions(+), 194 deletions(-) delete mode 100644 packages/analytics/analytics-chart/src/styles/base.scss create mode 100644 packages/analytics/analytics-chart/src/styles/globals.scss delete mode 100644 packages/analytics/analytics-metric-provider/src/styles/base.scss create mode 100644 packages/analytics/analytics-metric-provider/src/styles/globals.scss delete mode 100644 packages/analytics/metric-cards/src/styles/base.scss create mode 100644 packages/analytics/metric-cards/src/styles/globals.scss diff --git a/package.json b/package.json index b4457c66d5..cb87bbbc3a 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "postcss-html": "^1.7.0", "rimraf": "^6.0.1", "rollup-plugin-visualizer": "^5.12.0", - "sass": "^1.79.5", + "sass": "^1.80.3", "stylelint": "^16.9.0", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended-scss": "^14.1.0", diff --git a/packages/analytics/analytics-chart/sandbox/pages/BarChartDemo.vue b/packages/analytics/analytics-chart/sandbox/pages/BarChartDemo.vue index 340edc7e95..c80a9660bb 100644 --- a/packages/analytics/analytics-chart/sandbox/pages/BarChartDemo.vue +++ b/packages/analytics/analytics-chart/sandbox/pages/BarChartDemo.vue @@ -392,7 +392,7 @@ watch(multiDimensionToggle, () => { diff --git a/packages/analytics/analytics-chart/sandbox/pages/DonutChartDemo.vue b/packages/analytics/analytics-chart/sandbox/pages/DonutChartDemo.vue index 5c5d5863a2..98989dc4d3 100644 --- a/packages/analytics/analytics-chart/sandbox/pages/DonutChartDemo.vue +++ b/packages/analytics/analytics-chart/sandbox/pages/DonutChartDemo.vue @@ -276,5 +276,5 @@ const onMetricSelected = (item: any) => { diff --git a/packages/analytics/analytics-chart/sandbox/pages/TimeSeriesChartDemo.vue b/packages/analytics/analytics-chart/sandbox/pages/TimeSeriesChartDemo.vue index 36b7733eed..e50e982a9b 100644 --- a/packages/analytics/analytics-chart/sandbox/pages/TimeSeriesChartDemo.vue +++ b/packages/analytics/analytics-chart/sandbox/pages/TimeSeriesChartDemo.vue @@ -418,5 +418,5 @@ watch(multiDimensionToggle, () => { diff --git a/packages/analytics/analytics-chart/src/components/AnalyticsChart.vue b/packages/analytics/analytics-chart/src/components/AnalyticsChart.vue index 03dcd64c95..b1b3dba506 100644 --- a/packages/analytics/analytics-chart/src/components/AnalyticsChart.vue +++ b/packages/analytics/analytics-chart/src/components/AnalyticsChart.vue @@ -367,8 +367,8 @@ provide('legendPosition', toRef(props, 'legendPosition')) diff --git a/packages/analytics/analytics-chart/src/components/chart-types/GaugeChart.vue b/packages/analytics/analytics-chart/src/components/chart-types/GaugeChart.vue index 8f027645e0..6f10176eaa 100644 --- a/packages/analytics/analytics-chart/src/components/chart-types/GaugeChart.vue +++ b/packages/analytics/analytics-chart/src/components/chart-types/GaugeChart.vue @@ -156,8 +156,8 @@ const showMetricSmall = computed(() => props.metricDisplay === ChartMetricDispla diff --git a/packages/analytics/analytics-chart/src/styles/base.scss b/packages/analytics/analytics-chart/src/styles/base.scss deleted file mode 100644 index b5e5990e9b..0000000000 --- a/packages/analytics/analytics-chart/src/styles/base.scss +++ /dev/null @@ -1 +0,0 @@ -@import "./mixins"; diff --git a/packages/analytics/analytics-chart/src/styles/chart-shell.scss b/packages/analytics/analytics-chart/src/styles/chart-shell.scss index 53743d5181..abeccb9898 100644 --- a/packages/analytics/analytics-chart/src/styles/chart-shell.scss +++ b/packages/analytics/analytics-chart/src/styles/chart-shell.scss @@ -1,3 +1,5 @@ +@use "./globals" as *; + // Styles common to both AnalticsChart and SimpleChart .analytics-chart-shell, .simple-chart-shell { diff --git a/packages/analytics/analytics-chart/src/styles/chart.scss b/packages/analytics/analytics-chart/src/styles/chart.scss index 0005f0b9ce..bca6423236 100644 --- a/packages/analytics/analytics-chart/src/styles/chart.scss +++ b/packages/analytics/analytics-chart/src/styles/chart.scss @@ -1,3 +1,5 @@ +@use "./globals" as *; + $legend-height: $kui-space-110; .chart-parent { diff --git a/packages/analytics/analytics-chart/src/styles/globals.scss b/packages/analytics/analytics-chart/src/styles/globals.scss new file mode 100644 index 0000000000..0f5081801c --- /dev/null +++ b/packages/analytics/analytics-chart/src/styles/globals.scss @@ -0,0 +1,2 @@ +@forward "@kong/design-tokens/tokens/scss/variables"; +@forward "./mixins"; diff --git a/packages/analytics/analytics-chart/src/styles/mixins.scss b/packages/analytics/analytics-chart/src/styles/mixins.scss index 8d4c192fe0..bf306dec41 100644 --- a/packages/analytics/analytics-chart/src/styles/mixins.scss +++ b/packages/analytics/analytics-chart/src/styles/mixins.scss @@ -1,3 +1,5 @@ +@use "@kong/design-tokens/tokens/scss/variables" as *; + @mixin scrollbarBase($size: var(--kui-space, 40, $kui-space-40)) { -ms-overflow-style: thin; scrollbar-color: var(--kui-color-background-disabled, $kui-color-background-disabled) var(--kui-color-background-transparent, $kui-color-background-transparent); diff --git a/packages/analytics/analytics-metric-provider/src/components/MetricCardContainer.vue b/packages/analytics/analytics-metric-provider/src/components/MetricCardContainer.vue index d1e3246fad..60ac9e3c13 100644 --- a/packages/analytics/analytics-metric-provider/src/components/MetricCardContainer.vue +++ b/packages/analytics/analytics-metric-provider/src/components/MetricCardContainer.vue @@ -130,7 +130,7 @@ const formatCardValues = (card: MetricCardDef): MetricCardDisplayValue => {