Commit 11a36ef0 by vben

chore: update deps

1 parent f2644dbb
Showing 32 changed files with 121 additions and 178 deletions
...@@ -155,6 +155,10 @@ ...@@ -155,6 +155,10 @@
"json5" "json5"
], ],
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"github.copilot.enable": { "github.copilot.enable": {
"*": true, "*": true,
"markdown": true, "markdown": true,
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"@vben/styles": "workspace:*", "@vben/styles": "workspace:*",
"@vben/types": "workspace:*", "@vben/types": "workspace:*",
"@vben/utils": "workspace:*", "@vben/utils": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"ant-design-vue": "^4.2.1", "ant-design-vue": "^4.2.1",
"axios": "^1.7.2", "axios": "^1.7.2",
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"@commitlint/cli": "^19.3.0", "@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2", "@commitlint/config-conventional": "^19.2.2",
"@vben/node-utils": "workspace:*", "@vben/node-utils": "workspace:*",
"cz-git": "^1.9.1", "cz-git": "^1.9.2",
"czg": "^1.9.1" "czg": "^1.9.2"
} }
} }
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.3.0", "@eslint/js": "^9.3.0",
"@types/eslint": "^8.56.10", "@types/eslint": "^8.56.10",
"@typescript-eslint/eslint-plugin": "^7.10.0", "@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.10.0", "@typescript-eslint/parser": "^7.11.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"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",
......
...@@ -45,9 +45,10 @@ ...@@ -45,9 +45,10 @@
"./*": "./*" "./*": "./*"
}, },
"dependencies": { "dependencies": {
"@iconify/json": "^2.2.213", "@iconify/json": "^2.2.214",
"@iconify/tailwind": "^1.1.1", "@iconify/tailwind": "^1.1.1",
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.13",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"cssnano": "^7.0.1", "cssnano": "^7.0.1",
"postcss": "^8.4.38", "postcss": "^8.4.38",
......
...@@ -4,8 +4,11 @@ import path from 'node:path'; ...@@ -4,8 +4,11 @@ import path from 'node:path';
import { addDynamicIconSelectors } from '@iconify/tailwind'; import { addDynamicIconSelectors } from '@iconify/tailwind';
import formsPlugin from '@tailwindcss/forms'; import formsPlugin from '@tailwindcss/forms';
import typographyPlugin from '@tailwindcss/typography';
import { fs, getPackagesSync } from '@vben/node-utils'; import { fs, getPackagesSync } from '@vben/node-utils';
import animate from 'tailwindcss-animate'; import animate from 'tailwindcss-animate';
import { plugins } from './plugins';
// import defaultTheme from 'tailwindcss/defaultTheme'; // import defaultTheme from 'tailwindcss/defaultTheme';
const { packages } = getPackagesSync(); const { packages } = getPackagesSync();
...@@ -27,7 +30,13 @@ export default { ...@@ -27,7 +30,13 @@ export default {
), ),
], ],
darkMode: 'class', darkMode: 'class',
plugins: [animate, formsPlugin, addDynamicIconSelectors()], plugins: [
...plugins,
animate,
formsPlugin,
typographyPlugin,
addDynamicIconSelectors(),
],
prefix: '', prefix: '',
safelist: ['dark'], safelist: ['dark'],
theme: { theme: {
...@@ -59,7 +68,7 @@ export default { ...@@ -59,7 +68,7 @@ export default {
hover: 'hsl(var(--color-accent-hover))', hover: 'hsl(var(--color-accent-hover))',
}, },
background: 'hsl(var(--color-background) / <alpha-value>)', background: 'hsl(var(--color-background) / <alpha-value>)',
body: 'hsl(var(--color-body) / <alpha-value>)', // body: 'hsl(var(--color-body) / <alpha-value>)',
border: 'hsl(var(--color-border))', border: 'hsl(var(--color-border))',
card: { card: {
DEFAULT: 'hsl(var(--color-card))', DEFAULT: 'hsl(var(--color-card))',
......
import type { Config } from 'tailwindcss';
import plugin from 'tailwindcss/plugin';
const flexCenterStyles = {
'align-items': 'center',
display: 'flex',
'justify-content': 'center',
};
const plugins = [
plugin(({ addUtilities }) => {
addUtilities({
'.flex-center': flexCenterStyles,
'.flex-col-center': {
...flexCenterStyles,
},
});
}),
] as unknown as Config['plugins'][];
export { plugins };
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"husky": "^9.0.11", "husky": "^9.0.11",
"is-ci": "^3.0.1", "is-ci": "^3.0.1",
"jsdom": "^24.0.0", "jsdom": "^24.1.0",
"rimraf": "^5.0.7", "rimraf": "^5.0.7",
"taze": "^0.13.8", "taze": "^0.13.8",
"turbo": "^1.13.3", "turbo": "^1.13.3",
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
"node": ">=18.7.0", "node": ">=18.7.0",
"pnpm": ">=8.5.0" "pnpm": ">=8.5.0"
}, },
"packageManager": "pnpm@9.1.2", "packageManager": "pnpm@9.1.3",
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@ctrl/tinycolor": "4.1.0", "@ctrl/tinycolor": "4.1.0",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* --color-background: 240 6% 18%; */ /* --color-background: 240 6% 18%; */
// --color-body: 220deg 13.04% 8%; // --color-body: 220deg 13.04% 8%;
--color-body: 220deg 13.04% 8%; // --color-body: hsl(240deg 11% 4%);
--color-background: 220deg 13.04% 8%; --color-background: 220deg 13.04% 8%;
/* --color-background: 219 42% 11%; */ /* --color-background: 219 42% 11%; */
...@@ -76,20 +76,4 @@ ...@@ -76,20 +76,4 @@
/* 基本圆角大小 */ /* 基本圆角大小 */
--radius-base: 0.5rem; --radius-base: 0.5rem;
/* ======================================== */
/* =============component & UI============= */
/* ======================================== */
/* --color-login-background: 219 42% 11%; */
/* 图标颜色 */
/* authentication */
--color-authentication-from: hsl(240deg 11% 6%);
--color-authentication-to: hsl(240deg 11% 6%);
color-scheme: dark;
} }
/* https://gavin-yyc.github.io/colorconvert/ */ /* https://gavin-yyc.github.io/colorconvert/ */
:root { :root {
--font-geist-sans: 'geist-sans', -apple-system, blinkmacsystemfont, 'Segoe UI',
roboto, helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
/* 基础背景颜色颜色 */ /* 基础背景颜色颜色 */
/* --color-background: 210deg 25% 96.86%; */ /* --color-background: 210deg 25% 96.86%; */
--color-body: 210deg 25% 96.86%; // --color-main: 210deg 25% 96.86%;
--color-background: 0 0 100%; --color-background: 0 0 100%;
// --color-darken-background: 220deg 13.04% 8%; // --color-darken-background: 220deg 13.04% 8%;
...@@ -86,8 +82,6 @@ ...@@ -86,8 +82,6 @@
/* ======================================== */ /* ======================================== */
/* --color-login-background: 0 0 100%; */
/* menu */ /* menu */
--color-menu-dark: 225deg 12% 13%; --color-menu-dark: 225deg 12% 13%;
--color-menu-dark-darken: 223deg 11% 10%; --color-menu-dark-darken: 223deg 11% 10%;
...@@ -96,8 +90,4 @@ ...@@ -96,8 +90,4 @@
--color-menu: 0deg 0% 100%; --color-menu: 0deg 0% 100%;
--color-menu-darken: 0deg 0% 95%; --color-menu-darken: 0deg 0% 95%;
// --color-menu-opened: 0deg 0% 100%; // --color-menu-opened: 0deg 0% 100%;
/* authentication */
--color-authentication-from: hsl(231deg 61% 44%);
--color-authentication-to: hsl(218deg 70% 42%);
} }
...@@ -10,29 +10,26 @@ html { ...@@ -10,29 +10,26 @@ html {
*, *,
::after, ::after,
::before { ::before {
@apply border-border;
box-sizing: border-box; box-sizing: border-box;
border-color: hsl(var(--color-border));
border-style: solid; border-style: solid;
border-width: 0; border-width: 0;
} }
body.invert { body.invert-mode {
filter: invert(100%); @apply invert;
} }
body.grayscale { body.grayscale-mode {
--tw-grayscale: grayscale(100%); @apply grayscale;
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast)
var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate)
var(--tw-sepia) var(--tw-drop-shadow);
} }
html { html {
font-size: var(--font-size-base); @apply text-foreground bg-background;
// font-size: 62.5%;
font-variation-settings: normal; font-variation-settings: normal;
color: hsl(var(--color-foreground));
background-color: hsl(var(--color-background));
text-size-adjust: 100%; text-size-adjust: 100%;
font-synthesis-weight: none; font-synthesis-weight: none;
scroll-behavior: smooth; scroll-behavior: smooth;
...@@ -73,7 +70,7 @@ html.dark::view-transition-new(root) { ...@@ -73,7 +70,7 @@ html.dark::view-transition-new(root) {
input::placeholder, input::placeholder,
textarea::placeholder { textarea::placeholder {
color: hsl(var(--color-input-placeholder)) !important; // color: hsl(var(--color-input-placeholder)) !important;
opacity: 1; opacity: 1;
} }
......
/** css 样式重置 */ /** css 样式重置 */
@import 'modern-normalize/modern-normalize.css'; @import 'modern-normalize/modern-normalize.css';
/** 元素进入动画 */
@import './common/entry';
@import './common/base'; @import './common/base';
@import './transition'; @import './transition';
@import './nprogress';
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
@layer base { @layer base {
html { html {
@apply font-sans; @apply font-sans;
} }
} }
@layer components { @layer components {
.flex-center {
@apply flex items-center justify-center;
}
.flex-col-center {
@apply flex flex-col items-center justify-center;
}
.outline-box { .outline-box {
@apply outline-border relative cursor-pointer rounded-md p-1 outline outline-1;
&:after { &:after {
@apply absolute left-1/2 top-1/2 z-20 h-0 w-[1px] rounded-sm opacity-0 outline outline-2 outline-transparent transition-all duration-300 content-['']; @apply absolute left-1/2 top-1/2 z-20 h-0 w-[1px] rounded-sm opacity-0 outline outline-2 outline-transparent transition-all duration-300 content-[''];
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"vue": "3.4.27" "vue": "3.4.27"
} }
} }
<script setup lang="ts"> <script setup lang="ts">
import { IcRoundMenu } from '@vben-core/iconify'; import { IcRoundMenu } from '@vben-core/iconify';
import { VbenIconButton } from '@vben-core/shadcn-ui'; import { VbenIconButton } from '@vben-core/shadcn-ui';
import { useNamespace } from '@vben-core/toolkit';
import type { CSSProperties } from 'vue'; import type { CSSProperties } from 'vue';
...@@ -82,8 +81,6 @@ const emit = defineEmits<{ openMenu: []; toggleMenu: [] }>(); ...@@ -82,8 +81,6 @@ const emit = defineEmits<{ openMenu: []; toggleMenu: [] }>();
const slots = useSlots(); const slots = useSlots();
const { b, e } = useNamespace('header');
const style = computed((): CSSProperties => { const style = computed((): CSSProperties => {
const { backgroundColor, fullWidth, height, show } = props; const { backgroundColor, fullWidth, height, show } = props;
const right = !show || !fullWidth ? undefined : 0; const right = !show || !fullWidth ? undefined : 0;
...@@ -113,13 +110,16 @@ function handleOpenMenu() { ...@@ -113,13 +110,16 @@ function handleOpenMenu() {
</script> </script>
<template> <template>
<header :class="b()" :style="style"> <header
:style="style"
class="border-border top-0 flex w-full flex-[0_0_auto] items-center border-b"
>
<div v-if="slots.logo" :style="logoStyle"> <div v-if="slots.logo" :style="logoStyle">
<slot name="logo"></slot> <slot name="logo"></slot>
</div> </div>
<VbenIconButton <VbenIconButton
v-if="showToggleBtn" v-if="showToggleBtn"
:class="e('toggle-btn')" class="my-0 ml-2 mr-1 rounded"
@click="handleToggleMenu" @click="handleToggleMenu"
> >
<IcRoundMenu class="size-5" /> <IcRoundMenu class="size-5" />
...@@ -127,7 +127,7 @@ function handleOpenMenu() { ...@@ -127,7 +127,7 @@ function handleOpenMenu() {
<VbenIconButton <VbenIconButton
v-if="isMobile" v-if="isMobile"
:class="e('toggle-btn')" class="my-0 ml-2 mr-1 rounded"
@click="handleOpenMenu" @click="handleOpenMenu"
> >
<IcRoundMenu class="size-5" /> <IcRoundMenu class="size-5" />
...@@ -136,21 +136,3 @@ function handleOpenMenu() { ...@@ -136,21 +136,3 @@ function handleOpenMenu() {
<slot></slot> <slot></slot>
</header> </header>
</template> </template>
<style scoped lang="scss">
@import '@vben-core/design/global';
@include b('header') {
top: 0;
display: flex;
flex: 0 0 auto;
align-items: center;
width: 100%;
border-bottom: 1px solid hsl(var(--color-border));
@include e('toggle-btn') {
margin: 0 4px 0 8px;
border-radius: 4px;
}
}
</style>
<script setup lang="ts"> <script setup lang="ts">
import { useNamespace } from '@vben-core/toolkit';
import type { CSSProperties } from 'vue'; import type { CSSProperties } from 'vue';
import { computed } from 'vue'; import { computed } from 'vue';
...@@ -25,8 +23,6 @@ const props = withDefaults(defineProps<Props>(), { ...@@ -25,8 +23,6 @@ const props = withDefaults(defineProps<Props>(), {
height: 30, height: 30,
}); });
const { b, e } = useNamespace('tabs');
const hiddenStyle = computed((): CSSProperties => { const hiddenStyle = computed((): CSSProperties => {
const { height } = props; const { height } = props;
return { return {
...@@ -45,26 +41,10 @@ const style = computed((): CSSProperties => { ...@@ -45,26 +41,10 @@ const style = computed((): CSSProperties => {
</script> </script>
<template> <template>
<section :class="b()" :style="style"> <section :style="style" class="border-border flex w-full border-b">
<slot></slot> <slot></slot>
<div :class="e('toolbar')"> <div class="flex items-center">
<slot name="toolbar"></slot> <slot name="toolbar"></slot>
</div> </div>
</section> </section>
</template> </template>
<style scoped lang="scss">
@import '@vben-core/design/global';
@include b('tabs') {
display: flex;
width: 100%;
border-bottom: 1px solid hsl(var(--color-border));
// transition: all 0.2s;
@include e('toolbar') {
display: flex;
align-items: center;
}
}
</style>
<script setup lang="ts"> <script setup lang="ts">
import { useNamespace } from '@vben-core/toolkit';
import type { CSSProperties } from 'vue'; import type { CSSProperties } from 'vue';
import { useMouse, useScroll, useThrottleFn } from '@vueuse/core'; import { useMouse, useScroll, useThrottleFn } from '@vueuse/core';
...@@ -60,7 +58,6 @@ const sideExtraCollapse = defineModel<boolean>('sideExtraCollapse'); ...@@ -60,7 +58,6 @@ const sideExtraCollapse = defineModel<boolean>('sideExtraCollapse');
const sideExpandOnHover = defineModel<boolean>('sideExpandOnHover'); const sideExpandOnHover = defineModel<boolean>('sideExpandOnHover');
const sideVisible = defineModel<boolean>('sideVisible', { default: true }); const sideVisible = defineModel<boolean>('sideVisible', { default: true });
const { b, e, is } = useNamespace('layout');
const { const {
arrivedState, arrivedState,
directions, directions,
...@@ -453,7 +450,7 @@ function handleOpenMenu() { ...@@ -453,7 +450,7 @@ function handleOpenMenu() {
</script> </script>
<template> <template>
<div :class="[b(), is(realLayout, true)]"> <div class="relative flex min-h-full w-full">
<slot name="preference"></slot> <slot name="preference"></slot>
<slot name="back-top"></slot> <slot name="back-top"></slot>
<LayoutSide <LayoutSide
...@@ -496,8 +493,13 @@ function handleOpenMenu() { ...@@ -496,8 +493,13 @@ function handleOpenMenu() {
</template> </template>
</LayoutSide> </LayoutSide>
<div :class="e('main')"> <div
<div :style="headerWrapperStyle" :class="e('header-wrapper')"> class="flex flex-1 flex-col overflow-hidden transition-all duration-300 ease-in"
>
<div
:style="headerWrapperStyle"
class="overflow-hidden transition-all duration-200 ease-in-out"
>
<LayoutHeader <LayoutHeader
v-if="headerVisible" v-if="headerVisible"
:full-width="!isSideMode" :full-width="!isSideMode"
...@@ -529,7 +531,7 @@ function handleOpenMenu() { ...@@ -529,7 +531,7 @@ function handleOpenMenu() {
<!-- </div> --> <!-- </div> -->
<LayoutContent <LayoutContent
:class="e('content')" class="transition-[margin-top] duration-300 ease-in"
:style="contentStyle" :style="contentStyle"
:content-compact="contentCompact" :content-compact="contentCompact"
:content-compact-width="contentCompactWidth" :content-compact-width="contentCompactWidth"
...@@ -555,50 +557,9 @@ function handleOpenMenu() { ...@@ -555,50 +557,9 @@ function handleOpenMenu() {
</div> </div>
<div <div
v-if="maskVisible" v-if="maskVisible"
:class="e('mask')" class="fixed left-0 top-0 h-full w-full bg-[rgb(0_0_0_/_40%)] transition-[background-color] duration-200"
:style="maskStyle" :style="maskStyle"
@click="handleClickMask" @click="handleClickMask"
></div> ></div>
</div> </div>
</template> </template>
<style scoped lang="scss">
@import '@vben-core/design/global';
@include b('layout') {
position: relative;
display: flex;
width: 100%;
min-height: 100%;
@include e('main') {
display: flex;
flex: auto;
flex: 1;
flex-direction: column;
overflow-x: hidden;
background-color: hsl(var(--color-body));
border-left: 1px solid hsl(var(--color-border));
transition: all 0.3s ease;
}
@include e('content') {
transition: margin-top 0.3s ease;
}
@include e('header-wrapper') {
overflow: hidden;
transition: all 0.25s ease-in-out;
}
@include e('mask') {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgb(0 0 0 / 40%);
transition: background-color 0.2s;
}
}
</style>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"vue": "3.4.27" "vue": "3.4.27"
} }
} }
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
"@vben-core/iconify": "workspace:*", "@vben-core/iconify": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "2.1.1", "clsx": "2.1.1",
"radix-vue": "^1.8.1", "radix-vue": "^1.8.2",
"tailwind-merge": "^2.3.0", "tailwind-merge": "^2.3.0",
"vue": "3.4.27", "vue": "3.4.27",
"vue-sonner": "^1.1.2" "vue-sonner": "^1.1.2"
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben/locales": "workspace:*", "@vben/locales": "workspace:*",
"@vben/preference": "workspace:*", "@vben/preference": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"@vueuse/integrations": "^10.9.0", "@vueuse/integrations": "^10.10.0",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "3.4.27", "vue": "3.4.27",
"vue-router": "^4.3.2" "vue-router": "^4.3.2"
......
...@@ -59,7 +59,7 @@ function back() { ...@@ -59,7 +59,7 @@ function back() {
<template> <template>
<div <div
class="-enter-x flex h-screen w-full flex-col items-center justify-center" class="animate-in zoom-in-50 flex h-screen w-full flex-col items-center justify-center duration-300"
> >
<img v-if="image" :src="image" class="md:1/3 w-1/2 lg:w-1/4" /> <img v-if="image" :src="image" class="md:1/3 w-1/2 lg:w-1/4" />
<FeedbackIcon v-else class="md:1/3 h-1/3 w-1/2 lg:w-1/4" /> <FeedbackIcon v-else class="md:1/3 h-1/3 w-1/2 lg:w-1/4" />
......
...@@ -14,16 +14,18 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference(); ...@@ -14,16 +14,18 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference();
</script> </script>
<template> <template>
<div class="bg-body flex min-h-full flex-1 select-none overflow-x-hidden"> <div
class="bg-background flex min-h-full flex-1 select-none overflow-x-hidden"
>
<AuthenticationFromView <AuthenticationFromView
v-if="authPanelLeft" v-if="authPanelLeft"
class="-enter-x min-h-full w-2/5" class="min-h-full w-2/5"
transition-name="slide-left" transition-name="slide-left"
/> />
<div class="absolute left-0 top-0 z-10 flex flex-1"> <div class="absolute left-0 top-0 z-10 flex flex-1">
<div <div
class="-enter-x text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6" class="text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6"
:class=" :class="
authPanelLeft || authPanelCenter authPanelLeft || authPanelCenter
? 'lg:text-foreground' ? 'lg:text-foreground'
...@@ -43,17 +45,17 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference(); ...@@ -43,17 +45,17 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference();
</div> </div>
<div v-if="!authPanelCenter" class="relative hidden w-0 flex-1 lg:block"> <div v-if="!authPanelCenter" class="relative hidden w-0 flex-1 lg:block">
<div <div
class="absolute inset-0 h-full w-full bg-gradient-to-r from-[var(--color-authentication-from)] to-[var(--color-authentication-to)]" class="absolute inset-0 h-full w-full bg-[var(--color-authentication)]"
> >
<div class="flex-center mr-20 flex h-full flex-col"> <div class="flex-center mr-20 flex h-full flex-col">
<SloganIcon <SloganIcon
:alt="preference.appName" :alt="preference.appName"
class="animate-float h-64 w-2/5" class="animate-float h-64 w-2/5"
/> />
<div class="-enter-x text-1xl mt-6 font-sans text-white lg:text-2xl"> <div class="text-1xl mt-6 font-sans text-white lg:text-2xl">
{{ $t('authentication.layout-title') }} {{ $t('authentication.layout-title') }}
</div> </div>
<div class="-enter-x dark:text-muted-foreground mt-2 text-white/60"> <div class="dark:text-muted-foreground mt-2 text-white/60">
{{ $t('authentication.layout-desc') }} {{ $t('authentication.layout-desc') }}
</div> </div>
</div> </div>
...@@ -61,7 +63,7 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference(); ...@@ -61,7 +63,7 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference();
</div> </div>
<div <div
v-if="authPanelCenter" v-if="authPanelCenter"
class="flex-center w-full dark:bg-[var(--color-authentication-to)]" class="flex-center w-full dark:bg-[var(--color-authentication)]"
> >
<AuthenticationFromView <AuthenticationFromView
class="enter-y md:bg-background w-full rounded-3xl pb-20 shadow-2xl md:w-2/3 lg:w-1/2 xl:w-2/5" class="enter-y md:bg-background w-full rounded-3xl pb-20 shadow-2xl md:w-2/3 lg:w-1/2 xl:w-2/5"
...@@ -73,7 +75,7 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference(); ...@@ -73,7 +75,7 @@ const { authPanelCenter, authPanelLeft, authPanelRight } = usePreference();
</div> </div>
<AuthenticationFromView <AuthenticationFromView
v-if="authPanelRight" v-if="authPanelRight"
class="enter-x min-h-full w-2/5 flex-1" class="min-h-full w-2/5 flex-1"
/> />
</div> </div>
</template> </template>
......
...@@ -12,7 +12,7 @@ defineOptions({ ...@@ -12,7 +12,7 @@ defineOptions({
</script> </script>
<template> <template>
<div <div
class="flex-center bg-background absolute right-2 top-4 rounded-3xl px-3 py-1 dark:bg-[var(--color-authentication-to)]" class="flex-center bg-background absolute right-2 top-4 rounded-3xl px-3 py-1 dark:bg-[var(--color-authentication)]"
> >
<div class="hidden md:flex"> <div class="hidden md:flex">
<AuthenticationColorToggle /> <AuthenticationColorToggle />
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"dependencies": { "dependencies": {
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.10.0",
"vue": "3.4.27" "vue": "3.4.27"
} }
} }
...@@ -110,8 +110,8 @@ function updateTheme(preference: Preference) { ...@@ -110,8 +110,8 @@ function updateTheme(preference: Preference) {
function updateColorMode(preference: Preference) { function updateColorMode(preference: Preference) {
const { colorGrayMode, colorWeakMode } = preference; const { colorGrayMode, colorWeakMode } = preference;
const body = document.body; const body = document.body;
const COLOR_WEAK = 'invert'; const COLOR_WEAK = 'invert-mode';
const COLOR_GRAY = 'grayscale'; const COLOR_GRAY = 'grayscale-mode';
colorWeakMode colorWeakMode
? body.classList.add(COLOR_WEAK) ? body.classList.add(COLOR_WEAK)
: body.classList.remove(COLOR_WEAK); : body.classList.remove(COLOR_WEAK);
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
} }
#nprogress .bar { #nprogress .bar {
@apply bg-primary;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1031; z-index: 1031;
width: 100%; width: 100%;
height: 2px; height: 2px;
background: hsl(var(--color-primary));
} }
/* Fancy blur effect */ /* Fancy blur effect */
......
@import './tokens/light';
@import './tokens/dark';
@import './common/nprogress.css';
// @import './common/entry';
import './index.scss';
import '@vben-core/design/tailwind'; import '@vben-core/design/tailwind';
import '@vben-core/design'; import '@vben-core/design';
......
:root.dark {
/* authentication */
--color-authentication: hsl(240deg 11% 2%);
color-scheme: dark;
}
/* https://gavin-yyc.github.io/colorconvert/ */
:root {
--font-geist-sans: 'geist-sans', -apple-system, blinkmacsystemfont, 'Segoe UI',
roboto, helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
/* authentication */
--color-authentication: hsl(231deg 61% 44%);
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!