Commit 26b8c6ef by vben

chore: update css

1 parent 6f0c05dd
Showing 49 changed files with 285 additions and 610 deletions
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
"@vben-core/preferences": "workspace:*", "@vben-core/preferences": "workspace:*",
"@vben-core/request": "workspace:*", "@vben-core/request": "workspace:*",
"@vben-core/stores": "workspace:*", "@vben-core/stores": "workspace:*",
"@vben/chart-ui": "workspace:*",
"@vben/constants": "workspace:*", "@vben/constants": "workspace:*",
"@vben/hooks": "workspace:*", "@vben/hooks": "workspace:*",
"@vben/icons": "workspace:*", "@vben/icons": "workspace:*",
...@@ -37,7 +38,6 @@ ...@@ -37,7 +38,6 @@
"@vben/styles": "workspace:*", "@vben/styles": "workspace:*",
"@vben/types": "workspace:*", "@vben/types": "workspace:*",
"@vben/universal-ui": "workspace:*", "@vben/universal-ui": "workspace:*",
"@vben/chart-ui": "workspace:*",
"@vben/utils": "workspace:*", "@vben/utils": "workspace:*",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
"ant-design-vue": "^4.2.3", "ant-design-vue": "^4.2.3",
......
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from 'vue'; import { Fallback } from '@vben/universal-ui';
defineOptions({ name: 'About' }); defineOptions({ name: 'Menu1' });
onMounted(() => {
// eslint-disable-next-line no-console
console.log('About');
});
</script> </script>
<template> <template>
<div> <Fallback status="hello" />
about
<input class="bg-background border-border" />
</div>
</template> </template>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-i": "^2.29.1", "eslint-plugin-i": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.15", "eslint-plugin-jsdoc": "^48.4.0",
"eslint-plugin-jsonc": "^2.16.0", "eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-n": "^17.9.0", "eslint-plugin-n": "^17.9.0",
"eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-no-only-tests": "^3.1.0",
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"tailwindcss": "^3.4.3" "tailwindcss": "^3.4.3"
}, },
"dependencies": { "dependencies": {
"@iconify/json": "^2.2.221", "@iconify/json": "^2.2.222",
"@iconify/tailwind": "^1.1.1", "@iconify/tailwind": "^1.1.1",
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e", "@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
......
...@@ -62,55 +62,62 @@ export default { ...@@ -62,55 +62,62 @@ export default {
'3000': '3000ms', '3000': '3000ms',
}, },
borderRadius: { borderRadius: {
lg: 'var(--radius-base)', lg: 'var(--radius)',
md: 'calc(var(--radius-base) - 2px)', md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius-base) - 4px)', sm: 'calc(var(--radius) - 4px)',
xl: 'calc(var(--radius-base) + 4px)', xl: 'calc(var(--radius) + 4px)',
}, },
colors: { colors: {
accent: { accent: {
DEFAULT: 'hsl(var(--color-accent))', DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--color-accent-foreground))', foreground: 'hsl(var(--accent-foreground))',
hover: 'hsl(var(--color-accent-hover))', hover: 'hsl(var(--accent-hover))',
}, },
background: 'hsl(var(--color-background) / <alpha-value>)', background: 'hsl(var(--background))',
// body: 'hsl(var(--color-body) / <alpha-value>)', border: 'hsl(var(--border))',
border: 'hsl(var(--color-border))',
card: { card: {
DEFAULT: 'hsl(var(--color-card))', DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--color-card-foreground))', foreground: 'hsl(var(--card-foreground))',
}, },
destructive: { destructive: {
DEFAULT: 'hsl(var(--color-destructive))', DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--color-destructive-foreground))', foreground: 'hsl(var(--destructive-foreground))',
}, },
foreground: 'hsl(var(--color-foreground) / <alpha-value>)', foreground: 'hsl(var(--foreground) / <alpha-value>)',
heavy: { heavy: {
DEFAULT: 'hsl(var(--color-heavy) / <alpha-value>)', DEFAULT: 'hsl(var(--heavy))',
foreground: 'hsl(var(--color-heavy-foreground) / <alpha-value>)', foreground: 'hsl(var(--heavy-foreground))',
}, },
input: { input: {
DEFAULT: 'hsl(var(--color-input))', DEFAULT: 'hsl(var(--input))',
background: 'hsl(var(--color-input-background))', background: 'hsl(var(--input-background))',
}, },
muted: { muted: {
DEFAULT: 'hsl(var(--color-muted))', DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--color-muted-foreground))', foreground: 'hsl(var(--muted-foreground))',
}, },
overlay: 'hsl(var(--color-overlay))', overlay: 'hsl(var(--overlay))',
popover: { popover: {
DEFAULT: 'hsl(var(--color-popover))', DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--color-popover-foreground))', foreground: 'hsl(var(--popover-foreground))',
}, },
primary: { primary: {
DEFAULT: 'hsl(var(--color-primary) / <alpha-value>)', DEFAULT: 'hsl(var(--primary) / <alpha-value>)',
foreground: 'hsl(var(--color-primary-foreground) / <alpha-value>)', foreground: 'hsl(var(--primary-foreground) / <alpha-value>)',
}, },
ring: 'hsl(var(--color-ring))', ring: 'hsl(var(--ring))',
secondary: { secondary: {
DEFAULT: 'hsl(var(--color-secondary) / <alpha-value>)', DEFAULT: 'hsl(var(--secondary) / <alpha-value>)',
desc: 'hsl(var(--color-secondary-desc) / <alpha-value>)', desc: 'hsl(var(--secondary-desc) / <alpha-value>)',
foreground: 'hsl(var(--color-secondary-foreground) / <alpha-value>)', foreground: 'hsl(var(--secondary-foreground) / <alpha-value>)',
},
success: {
DEFAULT: 'hsl(var(--success))',
foreground: 'hsl(var(--success-foreground))',
},
warning: {
DEFAULT: 'hsl(var(--warning))',
foreground: 'hsl(var(--warning-foreground))',
}, },
}, },
fontFamily: { fontFamily: {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}, },
"devDependencies": { "devDependencies": {
"@changesets/changelog-github": "^0.5.0", "@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.5", "@changesets/cli": "^2.27.6",
"@ls-lint/ls-lint": "^2.2.3", "@ls-lint/ls-lint": "^2.2.3",
"@types/jsdom": "^21.1.7", "@types/jsdom": "^21.1.7",
"@types/node": "^20.14.8", "@types/node": "^20.14.8",
......
...@@ -9,9 +9,10 @@ export const COLOR_PRIMARY_RESETS = [ ...@@ -9,9 +9,10 @@ export const COLOR_PRIMARY_RESETS = [
'hsl(211 91% 39%)', 'hsl(211 91% 39%)',
'hsl(212 100% 45%)', 'hsl(212 100% 45%)',
'hsl(181 84% 32%)', 'hsl(181 84% 32%)',
'hsl(230 99% 66%)', 'hsl(161 90% 43%)',
'hsl(231 98% 65%)',
'hsl(245 82% 67%)', 'hsl(245 82% 67%)',
'hsl(340 100% 68%)', 'hsl(347 77% 60%)',
]; ];
export const SUPPORT_LANGUAGES: Language[] = [ export const SUPPORT_LANGUAGES: Language[] = [
......
...@@ -182,8 +182,7 @@ class PreferenceManager { ...@@ -182,8 +182,7 @@ class PreferenceManager {
if (preference.theme) { if (preference.theme) {
for (const [key, value] of Object.entries(preference.theme)) { for (const [key, value] of Object.entries(preference.theme)) {
if (['colorPrimary'].includes(key)) { if (['colorPrimary'].includes(key)) {
const cssVarKey = key.replaceAll(/([A-Z])/g, '-$1').toLowerCase(); const cssVarValue = useCssVar(`--primary`);
const cssVarValue = useCssVar(`--${cssVarKey}`);
cssVarValue.value = convertToHslCssVar(value); cssVarValue.value = convertToHslCssVar(value);
} }
} }
......
:root.dark { :root.dark {
/* 基础背景颜色颜色 */ /* Default background color of <body />...etc */
--background: 220deg 13.04% 8%;
--foreground: 220 13% 91%;
--color-background: 220deg 13.04% 8%; /* Background color for <Card /> */
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
/* 基础文本颜色 */ /* Background color for popovers such as <DropdownMenu />, <HoverCard />, <Popover /> */
--color-foreground: 220 13% 91%; --popover: 222.86deg 8.43% 16.27%;
--popover-foreground: 210 40% 98%;
/* 主题颜色 */ /* Muted backgrounds such as <TabsList />, <Skeleton /> and <Switch /> */
--color-primary: 211 91% 39%; --muted: 220deg 6.82% 17.25%;
--muted-foreground: 215 20.2% 65.1%;
/* 前景色,如按钮文本颜色 */
--color-primary-foreground: 0 0 98%;
/* 颜色次要 */
--color-secondary: 240 5% 17%;
/* 前景色,如按钮文本颜色 */
--color-secondary-foreground: 0 0 98%;
/* 次要文本颜色 */ /* 主题颜色 */
--color-secondary-desc: 210 12.16% 70.98%; --primary: 211 91% 39%;
--primary-foreground: 0 0 98%;
/* 普通颜色 */
/* --color-accent: 240 3.7% 15.9%; */
/* --color-accent: 220deg 7.32% 16.08%; */
--color-accent: 0deg 0% 100% / 8%;
--color-accent-hover: 0deg 0% 100% / 12%;
/* 普通颜色前景色,如按钮文本颜色 */ /* Used for destructive actions such as <Button variant="destructive"> */
--color-accent-foreground: 0 0 98%; --destructive: 0 63% 31%;
--destructive-foreground: 0 0 98%;
/* 破坏性颜色 */ /* Used for success actions such as <message> */
--color-destructive: 0 63% 31%; --success: 144 57% 58%;
--success-foreground: 0 0 98%;
/* 破坏性颜色 */ /* Used for warning actions such as <message> */
--color-destructive-foreground: 0 86% 97%; --warning: 42 84% 61%;
--color-muted: 220deg 6.82% 17.25%; --warning-foreground: 0 0 98%;
--color-muted-foreground: 215 20.2% 65.1%;
--color-heavy: 0deg 0% 100% / 12%;
--color-heavy-foreground: var(--color-accent-foreground);
/* 基础边框色 */ /* 颜色次要 */
--color-border: 0deg 0% 100% / 10%; --secondary: 240 5% 17%;
--secondary-foreground: 0 0 98%;
/* --color-popover: 240 4% 29%; */ /* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
--color-popover: 222.86deg 8.43% 16.27%; --accent: 0deg 0% 100% / 8%;
--color-popover-foreground: 210 40% 98%; --accent-hover: 0deg 0% 100% / 12%;
--color-card: 222.2 84% 4.9%; --accent-foreground: 0 0 98%;
--color-card-foreground: 210 40% 98%;
/* 基础文本边框色 */ /* Darker color */
--color-input: 0deg 0% 100% / 10%; --heavy: 0deg 0% 100% / 12%;
--heavy-foreground: var(--accent-foreground);
/* input placeholder 颜色 */ /* Default border color */
--color-input-placeholder: 218deg 11% 65%; --border: 0deg 0% 100% / 10%;
/* 基础文本背景色 */ /* Border color for inputs such as <Input />, <Select />, <Textarea /> */
--input: 0deg 0% 100% / 10%;
--input-placeholder: 218deg 11% 65%;
--input-background: 0deg 0% 100% / 5%;
/* --color-input-background: 216deg 5.38% 18.24%; */ /* Used for focus ring */
--color-input-background: 0deg 0% 100% / 5%; --ring: 222.2 84% 4.9%;
/* 遮罩颜色 */ /* 遮罩颜色 */
--color-overlay: 0deg 0% 0% / 40%; --overlay: 0deg 0% 0% / 40%;
--color-ring: 222.2 84% 4.9%;
/* 基本文字大小 */ /* 基本文字大小 */
--font-size-base: 16px; --font-size-base: 16px;
/* 基本圆角大小 */ /* 基本圆角大小 */
--radius-base: 0.5rem; --radius: 0.5rem;
color-scheme: dark; color-scheme: dark;
} }
/* https://gavin-yyc.github.io/colorconvert/ */ /* https://gavin-yyc.github.io/colorconvert/ */
:root { :root {
--color-background: 0 0 100%; /* Default background color of <body />...etc */
--background: 0 0 100%;
--foreground: 210 6% 21%;
/* 基础文本颜色 */ /* Background color for <Card /> */
--color-foreground: 210 6% 21%; --card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
/* 主题颜色 */ /* Background color for popovers such as <DropdownMenu />, <HoverCard />, <Popover /> */
--color-primary: 211 91% 39%; --popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
/* 前景色,如按钮文本颜色 */
--color-primary-foreground: 0 0 98%;
/* 颜色次要 */ /* Muted backgrounds such as <TabsList />, <Skeleton /> and <Switch /> */
--color-secondary: 240 5% 96%; --muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
/* 前景色,如按钮文本颜色 */ /* 主题颜色 */
--color-secondary-foreground: 240 6% 10%; --primary: 211 91% 39%;
--primary-foreground: 0 0 98%;
/* 次要文本颜色 */ /* Used for destructive actions such as <Button variant="destructive"> */
--color-secondary-desc: 216.4 16.09% 34.12%; --destructive: 0 78% 68%;
--destructive-foreground: 0 0 98%;
/* 普通颜色 */ /* Used for success actions such as <message> */
--color-accent: 240 5% 96%; --success: 144 57% 58%;
--color-accent-hover: 200deg 10% 90%; --success-foreground: 0 0 98%;
/* 普通颜色前景色,如按钮文本颜色 */ /* Used for warning actions such as <message> */
--color-accent-foreground: 240 6% 10%; --warning: 42 84% 61%;
--warning-foreground: 0 0 98%;
/* 破坏性颜色 */ /* Secondary colors for <Button /> */
--color-destructive: 0 77.78% 68.24%; --secondary: 240 5% 96%;
--secondary-foreground: 240 6% 10%;
/* 破坏性颜色 */ /* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
--color-destructive-foreground: 0 0 98%; --accent: 240 5% 96%;
--color-muted: 210 40% 96.1%; --accent-hover: 200deg 10% 90%;
--color-muted-foreground: 215.4 16.3% 46.9%; --accent-foreground: 240 6% 10%;
--color-heavy: 192deg 9.43% 89.61%;
--color-heavy-foreground: var(--color-accent-foreground);
--color-popover: 0 0% 100%;
--color-popover-foreground: 222.2 84% 4.9%;
--color-card: 0 0% 100%;
--color-card-foreground: 222.2 84% 4.9%;
/* 基础边框色 */ /* Darker color */
--color-border: 240 6% 90%; --heavy: 192deg 9.43% 89.61%;
--heavy-foreground: var(--accent-foreground);
/* 基础文本边框色 */ /* Default border color */
--color-input: 240deg 5.88% 90%; --border: 240 6% 90%;
/* input placeholder 颜色 */ /* Border color for inputs such as <Input />, <Select />, <Textarea /> */
--color-input-placeholder: 217 10.6% 65%; --input: 240deg 5.88% 90%;
--input-placeholder: 217 10.6% 65%;
--input-background: 0 0 100%;
/* 基础文本背景色 */ /* Used for focus ring */
--color-input-background: 0 0 100%; --ring: 222.2 84% 4.9%;
--color-ring: 222.2 84% 4.9%;
/* 遮罩颜色 */ /* 遮罩颜色 */
--color-overlay: 0deg 0% 0% / 40%; --overlay: 0deg 0% 0% / 40%;
/* dark */
--color-dark-foreground: 220 13% 91%;
--color-dark-border: 0deg 0% 100% / 10%;
--color-dark-accent: 0deg 0% 100% / 8%;
--color-dark-accent-hover: 0deg 0% 100% / 12%;
/* 基本文字大小 */ /* 基本文字大小 */
--font-size-base: 16px; --font-size-base: 16px;
/* 基本圆角大小 */ /* Border radius for card, input and buttons */
--radius-base: 0.5rem; --radius: 0.5rem;
/* ======================================== */ /* 用于浅色主题下一些暗色主题的颜色 */
--dark-foreground: 220 13% 91%;
--dark-border: 0deg 0% 100% / 10%;
--dark-accent: 0deg 0% 100% / 8%;
--dark-accent-hover: 0deg 0% 100% / 12%;
/* =============component & UI============= */ /* =============component & UI============= */
/* ======================================== */
/* menu */ /* menu */
--color-menu-dark: 225deg 12% 13%; --menu: 0deg 0% 100%;
--color-menu-dark-darken: 223deg 11% 10%; --menu-darken: 0deg 0% 95%;
--color-menu: 0deg 0% 100%;
--color-menu-darken: 0deg 0% 95%; /* menu-dark */
--menu-dark: 225deg 12% 13%;
--menu-dark-darken: 223deg 11% 10%;
accent-color: var(--color-primary); accent-color: var(--primary);
color-scheme: light; color-scheme: light;
} }
@charset "UTF-8";
/** css 样式重置 */
@import 'modern-normalize/modern-normalize.css';
#app,
.ant-app,
body,
html {
width: 100%;
height: 100%;
overscroll-behavior: none;
}
*,
::after,
::before {
@apply border-border;
box-sizing: border-box;
border-style: solid;
border-width: 0;
}
body.invert-mode {
@apply invert;
}
body.grayscale-mode {
@apply grayscale;
}
html {
@apply text-foreground bg-background;
font-variation-settings: normal;
text-size-adjust: 100%;
font-synthesis-weight: none;
scroll-behavior: smooth;
text-rendering: optimizelegibility;
-webkit-tap-highlight-color: transparent;
}
a,
a:active,
a:hover,
a:link,
a:visited {
color: inherit;
text-decoration: none;
}
::view-transition-new(root),
::view-transition-old(root) {
mix-blend-mode: normal;
animation: none;
}
::view-transition-old(root) {
z-index: 1;
}
::view-transition-new(root) {
z-index: 2147483646;
}
html.dark::view-transition-old(root) {
z-index: 2147483646;
}
html.dark::view-transition-new(root) {
z-index: 1;
}
input::placeholder,
textarea::placeholder {
opacity: 1;
}
input:-webkit-autofill {
border: none;
box-shadow: 0 0 0 1000px transparent inset;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
appearance: none;
}
.slide-up-enter-active,
.slide-up-leave-active {
transition: 0.25s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.slide-up-move {
transition: transform 0.3s;
}
.slide-up-enter-from,
.slide-up-leave-to {
opacity: 0;
transform: translateY(-15px);
}
.slide-down-enter-active,
.slide-down-leave-active {
transition: 0.25s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.slide-down-move {
transition: transform 0.3s;
}
.slide-down-enter-from,
.slide-down-leave-to {
opacity: 0;
transform: translateY(15px);
}
.slide-left-enter-active,
.slide-left-leave-active {
transition: 0.25s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.slide-left-move {
transition: transform 0.3s;
}
.slide-left-enter-from,
.slide-left-leave-to {
opacity: 0;
transform: translateX(-15px);
}
.slide-right-enter-active,
.slide-right-leave-active {
transition: 0.25s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.slide-right-move {
transition: transform 0.3s;
}
.slide-right-enter-from,
.slide-right-leave-to {
opacity: 0;
transform: translateX(15px);
}
.fade-transition-enter-active,
.fade-transition-leave-active {
transition: opacity 0.2s ease-in-out;
}
.fade-transition-enter-from,
.fade-transition-leave-to {
opacity: 0;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease-in-out;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
/* fade-slide */
.fade-slide-leave-active,
.fade-slide-enter-active {
transition: all 0.3s;
}
.fade-slide-enter-from {
opacity: 0;
transform: translateX(-30px);
}
.fade-slide-leave-to {
opacity: 0;
transform: translateX(30px);
}
.fade-down-enter-active,
.fade-down-leave-active {
transition:
opacity 0.25s,
transform 0.3s;
}
.fade-down-enter-from {
opacity: 0;
transform: translateY(-10%);
}
.fade-down-leave-to {
opacity: 0;
transform: translateY(10%);
}
.fade-scale-leave-active,
.fade-scale-enter-active {
transition: all 0.28s;
}
.fade-scale-enter-from {
opacity: 0;
transform: scale(1.2);
}
.fade-scale-leave-to {
opacity: 0;
transform: scale(0.8);
}
.fade-up-enter-active,
.fade-up-leave-active {
transition:
opacity 0.2s,
transform 0.25s;
}
.fade-up-enter-from {
opacity: 0;
transform: translateY(10%);
}
.fade-up-leave-to {
opacity: 0;
transform: translateY(-10%);
}
@keyframes fade-slide {
0% {
opacity: 0;
transform: translateX(-30px);
}
50% {
opacity: 1;
}
100% {
opacity: 0;
transform: translateX(30px);
}
}
@keyframes fade {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes fade-up {
0% {
opacity: 0;
transform: translateY(10%);
}
50% {
opacity: 1;
}
100% {
opacity: 0;
transform: translateY(-10%);
}
}
@keyframes fade-down {
0% {
opacity: 0;
transform: translateY(-10%);
}
50% {
opacity: 1;
}
100% {
opacity: 0;
transform: translateY(10%);
}
}
.fade-slow {
animation: fade 3s infinite;
}
.fade-slide-slow {
animation: fade-slide 3s infinite;
}
.fade-up-slow {
animation: fade-up 3s infinite;
}
.fade-down-slow {
animation: fade-down 3s infinite;
}
.collapse-transition {
transition:
0.2s height ease-in-out,
0.2s padding-top ease-in-out,
0.2s padding-bottom ease-in-out;
}
.collapse-transition-leave-active,
.collapse-transition-enter-active {
transition:
0.2s max-height ease-in-out,
0.2s padding-top ease-in-out,
0.2s margin-top ease-in-out;
}
...@@ -35,7 +35,7 @@ interface Props { ...@@ -35,7 +35,7 @@ interface Props {
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
backgroundColor: 'hsl(var(--color-background))', backgroundColor: 'hsl(var(--background))',
fixed: true, fixed: true,
height: 32, height: 32,
show: true, show: true,
......
...@@ -60,7 +60,7 @@ interface Props { ...@@ -60,7 +60,7 @@ interface Props {
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
backgroundColor: 'hsl(var(--color-background))', backgroundColor: 'hsl(var(--background))',
// fixed: true, // fixed: true,
height: 60, height: 60,
isMixedNav: false, isMixedNav: false,
......
...@@ -15,7 +15,7 @@ interface Props { ...@@ -15,7 +15,7 @@ interface Props {
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
backgroundColor: 'hsl(var(--color-background))', backgroundColor: 'hsl(var(--background))',
fixed: true, fixed: true,
height: 30, height: 30,
}); });
......
...@@ -17,7 +17,7 @@ function handleCollapsed() { ...@@ -17,7 +17,7 @@ function handleCollapsed() {
<template> <template>
<div <div
:data-theme="theme" :data-theme="theme"
class="flex-center hover:text-foreground text-foreground/60 hover:bg-accent-hover bg-accent absolute bottom-2 left-3 z-10 cursor-pointer rounded-sm p-1 transition-all duration-300 data-[theme=dark]:bg-[hsl(var(--color-dark-accent))] data-[theme=dark]:text-[hsl(var(--color-dark-foreground)/60%)] data-[theme=dark]:hover:bg-[hsl(var(--color-dark-accent-hover))] data-[theme=dark]:hover:text-[hsl(var(--color-dark-foreground))]" class="flex-center hover:text-foreground text-foreground/60 hover:bg-accent-hover bg-accent absolute bottom-2 left-3 z-10 cursor-pointer rounded-sm p-1 transition-all duration-300 data-[theme=dark]:bg-[hsl(var(--dark-accent))] data-[theme=dark]:text-[hsl(var(--dark-foreground)/60%)] data-[theme=dark]:hover:bg-[hsl(var(--dark-accent-hover))] data-[theme=dark]:hover:text-[hsl(var(--dark-foreground))]"
@click.stop="handleCollapsed" @click.stop="handleCollapsed"
> >
<MdiMenuClose v-if="collapsed" /> <MdiMenuClose v-if="collapsed" />
......
...@@ -17,7 +17,7 @@ function toggleFixed() { ...@@ -17,7 +17,7 @@ function toggleFixed() {
<template> <template>
<div <div
:data-theme="theme" :data-theme="theme"
class="flex-center hover:text-foreground text-foreground/60 hover:bg-accent-hover bg-accent absolute bottom-2 right-3 z-10 cursor-pointer rounded-sm p-1 transition-all duration-300 data-[theme=dark]:bg-[hsl(var(--color-dark-accent))] data-[theme=dark]:text-[hsl(var(--color-dark-foreground)/60%)] data-[theme=dark]:hover:bg-[hsl(var(--color-dark-accent-hover))] data-[theme=dark]:hover:text-[hsl(var(--color-dark-foreground))]" class="flex-center hover:text-foreground text-foreground/60 hover:bg-accent-hover bg-accent absolute bottom-2 right-3 z-10 cursor-pointer rounded-sm p-1 transition-all duration-300 data-[theme=dark]:bg-[hsl(var(--dark-accent))] data-[theme=dark]:text-[hsl(var(--dark-foreground)/60%)] data-[theme=dark]:hover:bg-[hsl(var(--dark-accent-hover))] data-[theme=dark]:hover:text-[hsl(var(--dark-foreground))]"
@click="toggleFixed" @click="toggleFixed"
> >
<MdiPinOff v-if="!expandOnHover" /> <MdiPinOff v-if="!expandOnHover" />
......
...@@ -30,7 +30,7 @@ const props = withDefaults(defineProps<Props>(), { ...@@ -30,7 +30,7 @@ const props = withDefaults(defineProps<Props>(), {
// footerBackgroundColor: '#fff', // footerBackgroundColor: '#fff',
footerFixed: true, footerFixed: true,
footerHeight: 32, footerHeight: 32,
// headerBackgroundColor: 'hsl(var(--color-background))', // headerBackgroundColor: 'hsl(var(--background))',
headerHeight: 50, headerHeight: 50,
headerHeightOffset: 10, headerHeightOffset: 10,
headerHidden: false, headerHidden: false,
...@@ -48,7 +48,7 @@ const props = withDefaults(defineProps<Props>(), { ...@@ -48,7 +48,7 @@ const props = withDefaults(defineProps<Props>(), {
sidebarTheme: 'dark', sidebarTheme: 'dark',
sidebarWidth: 180, sidebarWidth: 180,
tabbarEnable: true, tabbarEnable: true,
// tabsBackgroundColor: 'hsl(var(--color-background))', // tabsBackgroundColor: 'hsl(var(--background))',
tabsHeight: 36, tabsHeight: 36,
zIndex: 200, zIndex: 200,
}); });
...@@ -213,17 +213,15 @@ const sidebarFace = computed(() => { ...@@ -213,17 +213,15 @@ const sidebarFace = computed(() => {
if (isDark) { if (isDark) {
backgroundColor = isSidebarMixedNav.value backgroundColor = isSidebarMixedNav.value
? 'hsl(var(--color-menu-dark-darken))' ? 'hsl(var(--menu-dark-darken))'
: 'hsl(var(--color-menu-dark))'; : 'hsl(var(--menu-dark))';
} else { } else {
backgroundColor = isSidebarMixedNav.value backgroundColor = isSidebarMixedNav.value
? 'hsl(var(--color-menu-darken))' ? 'hsl(var(--menu-darken))'
: 'hsl(var(--color-menu))'; : 'hsl(var(--menu))';
} }
extraBackgroundColor = isDark extraBackgroundColor = isDark ? 'hsl(var(--menu-dark))' : 'hsl(var(--menu))';
? 'hsl(var(--color-menu-dark))'
: 'hsl(var(--color-menu))';
return { return {
backgroundColor, backgroundColor,
......
...@@ -78,7 +78,7 @@ function handleMouseenter(menu: MenuRecordRaw) { ...@@ -78,7 +78,7 @@ function handleMouseenter(menu: MenuRecordRaw) {
@include is('dark') { @include is('dark') {
.#{$namespace}-normal-menu__item { .#{$namespace}-normal-menu__item {
color: hsl(var(--color-dark-foreground) / 80%); color: hsl(var(--dark-foreground) / 80%);
} }
} }
...@@ -92,7 +92,7 @@ function handleMouseenter(menu: MenuRecordRaw) { ...@@ -92,7 +92,7 @@ function handleMouseenter(menu: MenuRecordRaw) {
// max-height: 64px; // max-height: 64px;
padding: var(--menu-item-padding-y) var(--menu-item-padding-x); padding: var(--menu-item-padding-y) var(--menu-item-padding-x);
margin: var(--menu-item-margin-y) var(--menu-item-margin-x); margin: var(--menu-item-margin-y) var(--menu-item-margin-x);
color: hsl(var(--color-foreground) / 90%); color: hsl(var(--foreground) / 90%);
cursor: pointer; cursor: pointer;
border-radius: var(--menu-item-radius); border-radius: var(--menu-item-radius);
transition: transition:
...@@ -103,20 +103,20 @@ function handleMouseenter(menu: MenuRecordRaw) { ...@@ -103,20 +103,20 @@ function handleMouseenter(menu: MenuRecordRaw) {
@include is('active') { @include is('active') {
font-weight: 700; font-weight: 700;
color: hsl(var(--color-primary-foreground)); color: hsl(var(--primary-foreground));
background-color: hsl(var(--color-primary)); background-color: hsl(var(--primary));
.#{$namespace}-normal-menu__name { .#{$namespace}-normal-menu__name {
color: hsl(var(--color-primary-foreground)); color: hsl(var(--primary-foreground));
} }
.#{$namespace}-normal-menu__icon { .#{$namespace}-normal-menu__icon {
color: hsl(var(--color-primary-foreground)); color: hsl(var(--primary-foreground));
} }
} }
&:not(.is-active):hover { &:not(.is-active):hover {
color: hsl(var(--color-foreground)); color: hsl(var(--foreground));
background-color: hsl(var(--menu-dark-background)); background-color: hsl(var(--menu-dark-background));
} }
...@@ -130,7 +130,7 @@ function handleMouseenter(menu: MenuRecordRaw) { ...@@ -130,7 +130,7 @@ function handleMouseenter(menu: MenuRecordRaw) {
@include is('dark') { @include is('dark') {
.#{$namespace}-normal-menu__item { .#{$namespace}-normal-menu__item {
&:not(.is-active):hover { &:not(.is-active):hover {
color: hsl(var(--color-primary-foreground)); color: hsl(var(--primary-foreground));
background-color: hsl(var(--menu-dark-background)); background-color: hsl(var(--menu-dark-background));
} }
} }
......
...@@ -22,33 +22,33 @@ ...@@ -22,33 +22,33 @@
--menu-light-background: 192deg 1% 93%; --menu-light-background: 192deg 1% 93%;
&.is-dark { &.is-dark {
--menu-background-color: hsl(var(--color-menu-dark)); --menu-background-color: hsl(var(--menu-dark));
// --menu-submenu-opened-background-color: hsl(var(--color-menu-opened-dark)); // --menu-submenu-opened-background-color: hsl(var(--menu-opened-dark));
--menu-item-background-color: var(--menu-background-color); --menu-item-background-color: var(--menu-background-color);
--menu-item-color: hsl(var(--color-dark-foreground) / 80%); --menu-item-color: hsl(var(--dark-foreground) / 80%);
--menu-item-hover-color: hsl(var(--color-primary-foreground)); --menu-item-hover-color: hsl(var(--primary-foreground));
--menu-item-hover-background-color: hsl(var(--menu-dark-background)); --menu-item-hover-background-color: hsl(var(--menu-dark-background));
--menu-item-active-color: hsl(var(--color-primary-foreground)); --menu-item-active-color: hsl(var(--primary-foreground));
--menu-item-active-background-color: hsl(var(--color-primary)); --menu-item-active-background-color: hsl(var(--primary));
--menu-submenu-hover-color: hsl(var(--color-dark-foreground)); --menu-submenu-hover-color: hsl(var(--dark-foreground));
--menu-submenu-hover-background-color: hsl(var(--menu-dark-background)); --menu-submenu-hover-background-color: hsl(var(--menu-dark-background));
--menu-submenu-active-color: hsl(var(--color-dark-foreground)); --menu-submenu-active-color: hsl(var(--dark-foreground));
--menu-submenu-active-background-color: transparent; --menu-submenu-active-background-color: transparent;
--menu-submenu-background-color: var(--menu-background-color); --menu-submenu-background-color: var(--menu-background-color);
} }
&.is-light { &.is-light {
--menu-background-color: hsl(var(--color-menu)); --menu-background-color: hsl(var(--menu));
// --menu-submenu-opened-background-color: hsl(var(--color-menu-opened)); // --menu-submenu-opened-background-color: hsl(var(--menu-opened));
--menu-item-background-color: var(--menu-background-color); --menu-item-background-color: var(--menu-background-color);
--menu-item-color: hsl(var(--color-foreground)); --menu-item-color: hsl(var(--foreground));
--menu-item-hover-color: var(--menu-item-color); --menu-item-hover-color: var(--menu-item-color);
--menu-item-hover-background-color: hsl(var(--menu-light-background)); --menu-item-hover-background-color: hsl(var(--menu-light-background));
--menu-item-active-color: hsl(var(--color-primary-foreground)); --menu-item-active-color: hsl(var(--primary-foreground));
--menu-item-active-background-color: hsl(var(--color-primary)); --menu-item-active-background-color: hsl(var(--primary));
--menu-submenu-hover-color: hsl(var(--color-primary)); --menu-submenu-hover-color: hsl(var(--primary));
--menu-submenu-hover-background-color: hsl(var(--menu-light-background)); --menu-submenu-hover-background-color: hsl(var(--menu-light-background));
--menu-submenu-active-color: hsl(var(--color-primary)); --menu-submenu-active-color: hsl(var(--primary));
--menu-submenu-active-background-color: transparent; --menu-submenu-active-background-color: transparent;
--menu-submenu-background-color: var(--menu-background-color); --menu-submenu-background-color: var(--menu-background-color);
} }
...@@ -79,24 +79,24 @@ ...@@ -79,24 +79,24 @@
--menu-background-color: transparent; --menu-background-color: transparent;
&.is-dark { &.is-dark {
--menu-item-hover-color: var(--color-foreground); --menu-item-hover-color: var(--foreground);
--menu-item-hover-background-color: hsl(var(--menu-dark-background)); --menu-item-hover-background-color: hsl(var(--menu-dark-background));
--menu-item-active-color: hsl(var(--color-foreground)); --menu-item-active-color: hsl(var(--foreground));
--menu-item-active-background-color: hsl(var(--menu-dark-background)); --menu-item-active-background-color: hsl(var(--menu-dark-background));
--menu-submenu-active-color: hsl(var(--color-foreground)); --menu-submenu-active-color: hsl(var(--foreground));
--menu-submenu-active-background-color: hsl(var(--menu-dark-background)); --menu-submenu-active-background-color: hsl(var(--menu-dark-background));
--menu-submenu-hover-color: hsl(var(--color-foreground)); --menu-submenu-hover-color: hsl(var(--foreground));
--menu-submenu-hover-background-color: hsl(var(--menu-dark-background)); --menu-submenu-hover-background-color: hsl(var(--menu-dark-background));
} }
&.is-light { &.is-light {
--menu-item-active-color: hsl(var(--color-foreground)); --menu-item-active-color: hsl(var(--foreground));
--menu-item-active-background-color: hsl(var(--menu-light-background)); --menu-item-active-background-color: hsl(var(--menu-light-background));
--menu-item-hover-background-color: hsl(var(--menu-light-background)); --menu-item-hover-background-color: hsl(var(--menu-light-background));
--menu-item-hover-color: hsl(var(--color-primary)); --menu-item-hover-color: hsl(var(--primary));
--menu-submenu-hover-color: hsl(var(--color-primary)); --menu-submenu-hover-color: hsl(var(--primary));
--menu-submenu-hover-background-color: hsl(var(--menu-light-background)); --menu-submenu-hover-background-color: hsl(var(--menu-light-background));
--menu-submenu-active-color: hsl(var(--color-foreground)); --menu-submenu-active-color: hsl(var(--foreground));
--menu-submenu-active-background-color: hsl(var(--menu-light-background)); --menu-submenu-active-background-color: hsl(var(--menu-light-background));
} }
} }
...@@ -316,7 +316,7 @@ ...@@ -316,7 +316,7 @@
.#{$namespace}-sub-menu-content, .#{$namespace}-sub-menu-content,
.#{$namespace}-menu-item { .#{$namespace}-menu-item {
&.is-active { &.is-active {
color: hsl(var(--color-primary-foreground)) !important; color: hsl(var(--primary-foreground)) !important;
background: var(--menu-item-active-background-color) !important; background: var(--menu-item-active-background-color) !important;
} }
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"radix-vue": "^1.8.4", "radix-vue": "^1.8.5",
"vue": "^3.4.30", "vue": "^3.4.30",
"vue-sonner": "^1.1.3" "vue-sonner": "^1.1.3"
} }
......
...@@ -66,7 +66,7 @@ const logoClass = computed(() => { ...@@ -66,7 +66,7 @@ const logoClass = computed(() => {
/> />
<span <span
v-if="!collapse" v-if="!collapse"
class="text-primary truncate text-nowrap group-[.dark]:text-[hsl(var(--color-dark-foreground))]" class="text-primary truncate text-nowrap group-[.dark]:text-[hsl(var(--dark-foreground))]"
> >
{{ text }} {{ text }}
<!-- <span class="text-primary ml-1 align-super text-[smaller]">Pro</span> --> <!-- <span class="text-primary ml-1 align-super text-[smaller]">Pro</span> -->
......
...@@ -22,6 +22,8 @@ const props = withDefaults(defineProps<Props>(), { ...@@ -22,6 +22,8 @@ const props = withDefaults(defineProps<Props>(), {
tabs: () => [], tabs: () => [],
}); });
const activeTab = defineModel<string>();
const getDefaultValue = computed(() => { const getDefaultValue = computed(() => {
return props.defaultValue || props.tabs[0]?.value; return props.defaultValue || props.tabs[0]?.value;
}); });
...@@ -40,7 +42,7 @@ const tabsIndicatorStyle = computed(() => { ...@@ -40,7 +42,7 @@ const tabsIndicatorStyle = computed(() => {
</script> </script>
<template> <template>
<Tabs :default-value="getDefaultValue"> <Tabs v-model="activeTab" :default-value="getDefaultValue">
<TabsList :style="tabsStyle" class="bg-accent relative grid w-full"> <TabsList :style="tabsStyle" class="bg-accent relative grid w-full">
<TabsIndicator :style="tabsIndicatorStyle" /> <TabsIndicator :style="tabsIndicatorStyle" />
<template v-for="tab in tabs" :key="tab.value"> <template v-for="tab in tabs" :key="tab.value">
......
...@@ -33,7 +33,7 @@ const props = withDefaults(defineProps<ToasterProps>(), { ...@@ -33,7 +33,7 @@ const props = withDefaults(defineProps<ToasterProps>(), {
<!-- <style scoped> <!-- <style scoped>
:deep([data-sonner-toaster][data-theme='dark']), :deep([data-sonner-toaster][data-theme='dark']),
:deep([data-sonner-toaster][data-theme='light']) { :deep([data-sonner-toaster][data-theme='light']) {
--normal-bg: hsl(var(--color-background)); --normal-bg: hsl(var(--background));
--normal-border: theme('colors.border'); --normal-border: theme('colors.border');
--normal-text: theme('colors.popover.foreground'); --normal-text: theme('colors.popover.foreground');
--border-radius: theme('borderRadius.md'); --border-radius: theme('borderRadius.md');
......
@import '@vben-core/design/global'; @import '@vben-core/design/global';
@include b('chrome-tabs') { @include b('chrome-tabs') {
--tabs-background: hsl(var(--color-background)); --tabs-background: hsl(var(--background));
--tabs-gap: 7px; --tabs-gap: 7px;
--tabs-divider: hsl(var(--color-border)); --tabs-divider: hsl(var(--border));
--tabs-hover: hsl(var(--color-heavy)); --tabs-hover: hsl(var(--heavy));
--tabs-active-background: hsl(var(--color-primary) / 100%); --tabs-active-background: hsl(var(--primary) / 100%);
--tabs-active: hsl(var(--color-primary-foreground)); --tabs-active: hsl(var(--primary-foreground));
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
color: hsl(var(--color-muted-foreground)); color: hsl(var(--muted-foreground));
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
transform: translateY(-50%); transform: translateY(-50%);
// &:hover { // &:hover {
// background-color: hsl(var(--color-accent)); // background-color: hsl(var(--accent));
// } // }
} }
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
transition: all 0.15s ease; transition: all 0.15s ease;
&:hover { &:hover {
color: hsl(var(--color-foreground)); color: hsl(var(--foreground));
transform: scale(1.05); transform: scale(1.05);
} }
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
"dependencies": { "dependencies": {
"@vben-core/preferences": "workspace:*", "@vben-core/preferences": "workspace:*",
"echarts": "^5.5.0", "echarts": "^5.5.0",
"vue": "^3.4.29" "vue": "^3.4.30"
}, },
"devDependencies": { "devDependencies": {
"@vben/types": "workspace:*" "@vben/types": "workspace:*"
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
"@vben-core/preferences": "workspace:*", "@vben-core/preferences": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben/chart-ui": "workspace:*",
"@vben/locales": "workspace:*", "@vben/locales": "workspace:*",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
"@vueuse/integrations": "^10.11.0", "@vueuse/integrations": "^10.11.0",
"@vben/chart-ui": "workspace:*",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "^3.4.30", "vue": "^3.4.30",
"vue-router": "^4.4.0" "vue-router": "^4.4.0"
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<circle <circle
cx="281.3585" cx="281.3585"
cy="285.71051" cy="285.71051"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
r="51.12006" r="51.12006"
transform="translate(-26.58509 542.54478) rotate(-85.26884)" transform="translate(-26.58509 542.54478) rotate(-85.26884)"
/> />
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
/> />
<path <path
d="M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356" d="M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-31.39089 -100.5)" transform="translate(-31.39089 -100.5)"
/> />
<path <path
d="M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288" d="M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-31.39089 -100.5)" transform="translate(-31.39089 -100.5)"
/> />
<path <path
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/> />
<path <path
d="M521.13449,410.50552a1.49881,1.49881,0,0,1-1.49822,1.49822H419.40273a20.52615,20.52615,0,0,1,0-41.05229H519.63627a1.49827,1.49827,0,1,1,0,2.99653H419.40273a17.52964,17.52964,0,0,0,0,35.05924H519.63627A1.49883,1.49883,0,0,1,521.13449,410.50552Z" d="M521.13449,410.50552a1.49881,1.49881,0,0,1-1.49822,1.49822H419.40273a20.52615,20.52615,0,0,1,0-41.05229H519.63627a1.49827,1.49827,0,1,1,0,2.99653H419.40273a17.52964,17.52964,0,0,0,0,35.05924H519.63627A1.49883,1.49883,0,0,1,521.13449,410.50552Z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-110.33661 -237.5817)" transform="translate(-110.33661 -237.5817)"
/> />
<path <path
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
/> />
<path <path
d="M485.83027,319.97947v11.2367a2.33383,2.33383,0,0,1-2.4628,2.16532h-8.8589V317.81415h8.8589A2.33383,2.33383,0,0,1,485.83027,319.97947Z" d="M485.83027,319.97947v11.2367a2.33383,2.33383,0,0,1-2.4628,2.16532h-8.8589V317.81415h8.8589A2.33383,2.33383,0,0,1,485.83027,319.97947Z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-110.33661 -237.5817)" transform="translate(-110.33661 -237.5817)"
/> />
<path <path
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
/> />
<path <path
d="M775.77611,417.286l27.24571-.33963,3.44882-.04668,55.43253-.69843s15.05312-14.3609,28.16068-29.1465l-1.83719-13.28833A54.29159,54.29159,0,0,0,870.023,340.1519C851.24988,352.696,840.363,377.52559,840.363,377.52559l-34.37018,8.22071-3.43848.82227-21.35608,5.10326Z" d="M775.77611,417.286l27.24571-.33963,3.44882-.04668,55.43253-.69843s15.05312-14.3609,28.16068-29.1465l-1.83719-13.28833A54.29159,54.29159,0,0,0,870.023,340.1519C851.24988,352.696,840.363,377.52559,840.363,377.52559l-34.37018,8.22071-3.43848.82227-21.35608,5.10326Z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-110.33661 -237.5817)" transform="translate(-110.33661 -237.5817)"
/> />
<path <path
...@@ -245,12 +245,12 @@ ...@@ -245,12 +245,12 @@
/> />
<path <path
d="M992.25627,323.052l-53.551,59.4744s-25.60913-8.19816-45.41466-17.08624l-8.8977-27.32787a54.34329,54.34329,0,0,1-2.60112-19.66442c27.45606-7.306,59.391,19.87863,59.391,19.87863l40.08517-31.39877Z" d="M992.25627,323.052l-53.551,59.4744s-25.60913-8.19816-45.41466-17.08624l-8.8977-27.32787a54.34329,54.34329,0,0,1-2.60112-19.66442c27.45606-7.306,59.391,19.87863,59.391,19.87863l40.08517-31.39877Z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-110.33661 -237.5817)" transform="translate(-110.33661 -237.5817)"
/> />
<path <path
d="M867.301,465.6169c-9.554-3.30029-19.43312-6.71277-30.08912-7.99385l-.45773-.05533.12632-.443c11.03073-38.7308,8.27761-63.50657,2.87195-100.72306a37.59072,37.59072,0,0,1,21.5483-39.50121l.06542-.02958,30.43436-1.93391.06935-.00423,22.13437,6.50989a15.18313,15.18313,0,0,1,10.86724,14.83111c-.23987,12.23937.26868,25.9043.80711,40.37114,1.20787,32.45569,2.45686,66.01647-4.63045,87.79166l-.03718.11412-.09462.07416a36.09883,36.09883,0,0,1-23.08086,8.10758C887.90057,472.73235,877.76186,469.23034,867.301,465.6169Z" d="M867.301,465.6169c-9.554-3.30029-19.43312-6.71277-30.08912-7.99385l-.45773-.05533.12632-.443c11.03073-38.7308,8.27761-63.50657,2.87195-100.72306a37.59072,37.59072,0,0,1,21.5483-39.50121l.06542-.02958,30.43436-1.93391.06935-.00423,22.13437,6.50989a15.18313,15.18313,0,0,1,10.86724,14.83111c-.23987,12.23937.26868,25.9043.80711,40.37114,1.20787,32.45569,2.45686,66.01647-4.63045,87.79166l-.03718.11412-.09462.07416a36.09883,36.09883,0,0,1-23.08086,8.10758C887.90057,472.73235,877.76186,469.23034,867.301,465.6169Z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
transform="translate(-110.33661 -237.5817)" transform="translate(-110.33661 -237.5817)"
/> />
<path <path
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
fill="#3f3d56" fill="#3f3d56"
/> />
<polygon <polygon
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
points="349.16196 249.18644 355.16196 288.18642 443.16196 276.18642 434.66196 230.6195 349.16196 249.18644" points="349.16196 249.18644 355.16196 288.18642 443.16196 276.18642 434.66196 230.6195 349.16196 249.18644"
/> />
<rect <rect
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<circle <circle
cx="333.2486" cx="333.2486"
cy="323.64455" cy="323.64455"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
r="85" r="85"
/> />
<g> <g>
......
...@@ -75,7 +75,7 @@ if (props.enableShortcutKey) { ...@@ -75,7 +75,7 @@ if (props.enableShortcutKey) {
</span> </span>
<span <span
v-if="enableShortcutKey" v-if="enableShortcutKey"
class="bg-background border-foreground/50 text-muted-foreground group-hover:text-foreground relative hidden rounded-sm rounded-r-xl px-1.5 py-1 text-xs leading-none group-hover:opacity-100 md:block" class="bg-background border-foreground/60 text-muted-foreground group-hover:text-foreground relative hidden rounded-sm rounded-r-xl px-1.5 py-1 text-xs leading-none group-hover:opacity-100 md:block"
> >
{{ isWindowsOs() ? 'Ctrl' : '⌘' }} {{ isWindowsOs() ? 'Ctrl' : '⌘' }}
<kbd>K</kbd> <kbd>K</kbd>
......
...@@ -13,9 +13,9 @@ const footerFixed = defineModel<boolean>('footerFixed'); ...@@ -13,9 +13,9 @@ const footerFixed = defineModel<boolean>('footerFixed');
<template> <template>
<SwitchItem v-model="footerEnable"> <SwitchItem v-model="footerEnable">
{{ $t('preferences.footer-visible') }} {{ $t('preferences.footer.visible') }}
</SwitchItem> </SwitchItem>
<SwitchItem v-model="footerFixed" :disabled="!footerEnable"> <SwitchItem v-model="footerFixed" :disabled="!footerEnable">
{{ $t('preferences.footer-fixed') }} {{ $t('preferences.footer.fixed') }}
</SwitchItem> </SwitchItem>
</template> </template>
...@@ -17,19 +17,19 @@ const headerMode = defineModel<LayoutHeaderModeType>('headerMode'); ...@@ -17,19 +17,19 @@ const headerMode = defineModel<LayoutHeaderModeType>('headerMode');
const localeItems: SelectListItem[] = [ const localeItems: SelectListItem[] = [
{ {
label: $t('preferences.header-mode-static'), label: $t('preferences.header.mode-static'),
value: 'static', value: 'static',
}, },
{ {
label: $t('preferences.header-mode-fixed'), label: $t('preferences.header.mode-fixed'),
value: 'fixed', value: 'fixed',
}, },
{ {
label: $t('preferences.header-mode-auto'), label: $t('preferences.header.mode-auto'),
value: 'auto', value: 'auto',
}, },
{ {
label: $t('preferences.header-mode-auto-scroll'), label: $t('preferences.header.mode-auto-scroll'),
value: 'auto-scroll', value: 'auto-scroll',
}, },
]; ];
......
...@@ -70,12 +70,12 @@ watchEffect(() => { ...@@ -70,12 +70,12 @@ watchEffect(() => {
> >
<div <div
:style="{ backgroundColor: color }" :style="{ backgroundColor: color }"
class="h-6 w-6 rounded-md" class="h-5 w-5 rounded-md"
></div> ></div>
</div> </div>
</template> </template>
<div :style="inputStyle" class="outline-box p-2" @click="selectColor"> <div :style="inputStyle" class="outline-box p-2" @click="selectColor">
<div class="flex-center bg-accent relative h-6 w-6 rounded-md"> <div class="flex-center bg-accent relative h-5 w-5 rounded-md">
<MdiEditBoxOutline class="absolute z-10" /> <MdiEditBoxOutline class="absolute z-10" />
<input <input
ref="colorInput" ref="colorInput"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/> />
<rect <rect
id="svg_8" id="svg_8"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
height="9.07027" height="9.07027"
stroke="null" stroke="null"
width="104.07934" width="104.07934"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/> />
<rect <rect
id="svg_8" id="svg_8"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
height="9.07027" height="9.07027"
stroke="null" stroke="null"
width="104.07934" width="104.07934"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/> />
<rect <rect
id="svg_8" id="svg_8"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
height="9.07027" height="9.07027"
stroke="null" stroke="null"
width="104.07934" width="104.07934"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<path <path
id="svg_2" id="svg_2"
d="m-3.37838,3.7543a1.93401,4.02457 0 0 1 1.93401,-4.02457l11.3488,0l0,66.40541l-11.3488,0a1.93401,4.02457 0 0 1 -1.93401,-4.02457l0,-58.35627z" d="m-3.37838,3.7543a1.93401,4.02457 0 0 1 1.93401,-4.02457l11.3488,0l0,66.40541l-11.3488,0a1.93401,4.02457 0 0 1 -1.93401,-4.02457l0,-58.35627z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
stroke="null" stroke="null"
/> />
<rect <rect
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<path <path
id="svg_2" id="svg_2"
d="m-3.37838,3.61916a4.4919,4.02457 0 0 1 4.4919,-4.02457l26.35848,0l0,66.40541l-26.35848,0a4.4919,4.02457 0 0 1 -4.4919,-4.02457l0,-58.35627z" d="m-3.37838,3.61916a4.4919,4.02457 0 0 1 4.4919,-4.02457l26.35848,0l0,66.40541l-26.35848,0a4.4919,4.02457 0 0 1 -4.4919,-4.02457l0,-58.35627z"
fill="hsl(var(--color-primary))" fill="hsl(var(--primary))"
stroke="null" stroke="null"
/> />
<rect <rect
......
...@@ -12,7 +12,7 @@ import type { ...@@ -12,7 +12,7 @@ import type {
} from '@vben-core/preferences'; } from '@vben-core/preferences';
import type { SegmentedItem } from '@vben-core/shadcn-ui'; import type { SegmentedItem } from '@vben-core/shadcn-ui';
import { computed } from 'vue'; import { computed, ref } from 'vue';
import { $t } from '@vben/locales'; import { $t } from '@vben/locales';
import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify'; import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify';
...@@ -124,6 +124,8 @@ const { ...@@ -124,6 +124,8 @@ const {
} = usePreferences(); } = usePreferences();
const { copy } = useClipboard(); const { copy } = useClipboard();
const activeTab = ref('general');
const tabs = computed((): SegmentedItem[] => { const tabs = computed((): SegmentedItem[] => {
return [ return [
{ {
...@@ -176,8 +178,8 @@ function handleReset() { ...@@ -176,8 +178,8 @@ function handleReset() {
<div class="z-100 fixed right-0 top-1/2"> <div class="z-100 fixed right-0 top-1/2">
<VbenSheet <VbenSheet
v-model:open="openPreferences" v-model:open="openPreferences"
:description="$t('preferences.preferences-subtitle')" :description="$t('preferences.subtitle')"
:title="$t('preferences.preferences')" :title="$t('preferences.name')"
> >
<template #trigger> <template #trigger>
<Trigger /> <Trigger />
...@@ -197,7 +199,7 @@ function handleReset() { ...@@ -197,7 +199,7 @@ function handleReset() {
</template> </template>
<div class="p-4 pt-4"> <div class="p-4 pt-4">
<VbenSegmented :tabs="tabs" default-value="general"> <VbenSegmented v-model="activeTab" :tabs="tabs">
<template #appearance> <template #appearance>
<Block :title="$t('preferences.theme')"> <Block :title="$t('preferences.theme')">
<Theme <Theme
...@@ -235,7 +237,7 @@ function handleReset() { ...@@ -235,7 +237,7 @@ function handleReset() {
/> />
</Block> </Block>
<Block :title="$t('preferences.header')"> <Block :title="$t('preferences.header.name')">
<Header <Header
v-model:headerEnable="headerEnable" v-model:headerEnable="headerEnable"
v-model:headerMode="headerMode" v-model:headerMode="headerMode"
...@@ -272,7 +274,7 @@ function handleReset() { ...@@ -272,7 +274,7 @@ function handleReset() {
v-model:tabbar-show-icon="tabbarShowIcon" v-model:tabbar-show-icon="tabbarShowIcon"
/> />
</Block> </Block>
<Block :title="$t('preferences.footer')"> <Block :title="$t('preferences.footer.name')">
<Footer <Footer
v-model:footer-enable="footerEnable" v-model:footer-enable="footerEnable"
v-model:footer-fixed="footerFixed" v-model:footer-fixed="footerFixed"
......
...@@ -11,7 +11,7 @@ defineOptions({ ...@@ -11,7 +11,7 @@ defineOptions({
<template> <template>
<VbenButton <VbenButton
:title="$t('preferences.preferences')" :title="$t('preferences.name')"
class="bg-primary flex-col-center h-12 w-12 cursor-pointer rounded-l-lg rounded-r-none border-none" class="bg-primary flex-col-center h-12 w-12 cursor-pointer rounded-l-lg rounded-r-none border-none"
> >
<IconSetting class="duration-3000 animate-spin text-2xl" /> <IconSetting class="duration-3000 animate-spin text-2xl" />
......
...@@ -96,7 +96,7 @@ function toggleTheme(event: MouseEvent) { ...@@ -96,7 +96,7 @@ function toggleTheme(event: MouseEvent) {
<mask <mask
id="theme-toggle-moon" id="theme-toggle-moon"
:class="e('moon')" :class="e('moon')"
fill="hsl(var(--color-foreground)/80%)" fill="hsl(var(--foreground)/80%)"
stroke="none" stroke="none"
> >
<rect fill="white" height="100%" width="100%" x="0" y="0" /> <rect fill="white" height="100%" width="100%" x="0" y="0" />
...@@ -135,18 +135,18 @@ function toggleTheme(event: MouseEvent) { ...@@ -135,18 +135,18 @@ function toggleTheme(event: MouseEvent) {
} }
@include e('sun') { @include e('sun') {
fill: hsl(var(--color-foreground) / 80%); fill: hsl(var(--foreground) / 80%);
stroke: none; stroke: none;
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1); transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
transform-origin: center center; transform-origin: center center;
&:hover > svg > & { &:hover > svg > & {
fill: hsl(var(--color-foreground)); fill: hsl(var(--foreground));
} }
} }
@include e('sun-beams') { @include e('sun-beams') {
stroke: hsl(var(--color-foreground) / 80%); stroke: hsl(var(--foreground) / 80%);
stroke-width: 2px; stroke-width: 2px;
transition: transition:
transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25), transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25),
...@@ -154,7 +154,7 @@ function toggleTheme(event: MouseEvent) { ...@@ -154,7 +154,7 @@ function toggleTheme(event: MouseEvent) {
transform-origin: center center; transform-origin: center center;
&:hover > svg > & { &:hover > svg > & {
stroke: hsl(var(--color-foreground)); stroke: hsl(var(--foreground));
} }
} }
...@@ -188,7 +188,7 @@ function toggleTheme(event: MouseEvent) { ...@@ -188,7 +188,7 @@ function toggleTheme(event: MouseEvent) {
@include b('theme-toggle') { @include b('theme-toggle') {
&__moon, &__moon,
&__sun { &__sun {
fill: hsl(var(--color-foreground)); fill: hsl(var(--foreground));
} }
} }
} }
......
...@@ -175,7 +175,7 @@ if (enableShortcutKey.value) { ...@@ -175,7 +175,7 @@ if (enableShortcutKey.value) {
@click="handleOpenPreference" @click="handleOpenPreference"
> >
<IcRoundSettingsSuggest class="mr-2 size-5" /> <IcRoundSettingsSuggest class="mr-2 size-5" />
{{ $t('preferences.preferences') }} {{ $t('preferences.name') }}
<DropdownMenuShortcut v-if="enablePreferencesShortcutKey"> <DropdownMenuShortcut v-if="enablePreferencesShortcutKey">
{{ altView }} , {{ altView }} ,
</DropdownMenuShortcut> </DropdownMenuShortcut>
......
...@@ -118,8 +118,9 @@ page: ...@@ -118,8 +118,9 @@ page:
page: Exception Page page: Exception Page
preferences: preferences:
preferences: Preferences name: Preferences
preferences-subtitle: Customize Preferences & Preview in Real Time subtitle: Customize Preferences & Preview in Real Time
reset-tip: The data has changed, click to reset
theme: Theme theme: Theme
ai-assistant: Ai Assistant ai-assistant: Ai Assistant
appearance: Appearance appearance: Appearance
...@@ -179,17 +180,18 @@ preferences: ...@@ -179,17 +180,18 @@ preferences:
tabs: Tabs tabs: Tabs
tabs-icon: Display Tabbar Icon tabs-icon: Display Tabbar Icon
mode: Mode mode: Mode
header: Header
header-visible: Display Header
header-mode-static: Static
header-mode-fixed: Fixed
header-mode-auto: Auto hide/display
header-mode-auto-scroll: Scroll hide/display
footer: Footer
footer-fixed: Fixed at the bottom
footer-visible: Display Footer
logo-visible: Display Logo logo-visible: Display Logo
reset-tip: The data has changed, click to reset header:
name: Header
visible: Display Header
mode-static: Static
mode-fixed: Fixed
mode-auto: Auto hide/display
mode-auto-scroll: Scroll hide/display
footer:
name: Footer
visible: Fixed at the bottom
fixed: Display Footer
shortcut-keys: shortcut-keys:
title: Shortcut Keys title: Shortcut Keys
global: Global global: Global
......
...@@ -117,8 +117,9 @@ page: ...@@ -117,8 +117,9 @@ page:
page: 异常页面 page: 异常页面
preferences: preferences:
preferences: 偏好设置 name: 偏好设置
preferences-subtitle: 自定义偏好设置 & 实时预览 subtitle: 自定义偏好设置 & 实时预览
reset-tip: 数据有变化,点击可进行重置
theme: 主题 theme: 主题
appearance: 外观 appearance: 外观
theme-color: 主题色 theme-color: 主题色
...@@ -178,17 +179,18 @@ preferences: ...@@ -178,17 +179,18 @@ preferences:
tabs: 标签栏 tabs: 标签栏
tabs-icon: 显示标签栏图标 tabs-icon: 显示标签栏图标
mode: 模式 mode: 模式
header: 顶栏
header-mode-static: 静止
header-mode-fixed: 固定
header-mode-auto: 自动隐藏和显示
header-mode-auto-scroll: 滚动隐藏和显示
header-visible: 显示顶栏
footer: 底栏
footer-visible: 显示底栏
footer-fixed: 固定在底部
logo-visible: 显示 Logo logo-visible: 显示 Logo
reset-tip: 数据有变化,点击可进行重置 header:
name: 顶栏
mode-static: 静止
mode-fixed: 固定
mode-auto: 自动隐藏和显示
mode-auto-scroll: 滚动隐藏和显示
visible: 显示顶栏
footer:
name: 底栏
visible: 显示底栏
fixed: 固定在底部
shortcut-keys: shortcut-keys:
title: 快捷键 title: 快捷键
global: 全局 global: 全局
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
width: 100px; width: 100px;
height: 100%; height: 100%;
box-shadow: box-shadow:
0 0 10px hsl(var(--color-primary)), 0 0 10px hsl(var(--primary)),
0 0 5px hsl(var(--color-primary)); 0 0 5px hsl(var(--primary));
opacity: 1; opacity: 1;
transform: rotate(3deg) translate(0, -4px); transform: rotate(3deg) translate(0, -4px);
} }
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
width: 18px; width: 18px;
height: 18px; height: 18px;
border: solid 2px transparent; border: solid 2px transparent;
border-top-color: hsl(var(--color-primary)); border-top-color: hsl(var(--primary));
border-left-color: hsl(var(--color-primary)); border-left-color: hsl(var(--primary));
border-radius: 50%; border-radius: 50%;
animation: nprogress-spinner 400ms linear infinite; animation: nprogress-spinner 400ms linear infinite;
} }
......
...@@ -97,6 +97,10 @@ ...@@ -97,6 +97,10 @@
"path": "packages/@core/uikit/tabs-ui", "path": "packages/@core/uikit/tabs-ui",
}, },
{ {
"name": "@vben/chart-ui",
"path": "packages/business/chart-ui",
},
{
"name": "@vben/layouts", "name": "@vben/layouts",
"path": "packages/business/layouts", "path": "packages/business/layouts",
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!