bump: update for tailwindcss 4.0

This commit is contained in:
2025-02-16 02:28:12 +08:00
parent 1363b87f36
commit c1812a7f09
14 changed files with 362 additions and 89 deletions

View File

@@ -10,7 +10,7 @@ export const CardBlank = (props: CardBlankProps) => {
return (
<>
{new Array(number).fill(0).map((_, index) => {
return <div key={index} className={clsx('w-[300px] flex-shrink-0', className)}></div>;
return <div key={index} className={clsx('w-[300px] shark-0', className)}></div>;
})}
</>
);

View File

@@ -1,6 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@config "../tailwind.config.js";
@import "tailwindcss";
@layer base {
html,
@@ -23,7 +22,7 @@
@layer components {
.btn {
@apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
@apply bg-blue-500 text-white font-bold py-2 px-4 rounded-sm;
}
.card {
@apply bg-white shadow-md rounded-lg p-4;

View File

@@ -60,7 +60,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
menuStore.setOpen(true);
}}
icon={<MenuOutlined />}></Button>
<div className='flex flex-grow justify-between'>
<div className='flex grow justify-between'>
{props.title}
<div className='mr-4 flex gap-4 items-center no-drag'>
{menuStore.me?.type === 'org' && (

View File

@@ -3,10 +3,10 @@ import '@kevisual/ui/dist/index.css';
const content = document.createElement('div');
content.innerHTML = `
<div class="bg-white p-8 rounded shadow-md w-full max-w-md text-center">
<div class="bg-white p-8 rounded-sm shadow-md w-full max-w-md text-center">
<h2 class="text-2xl font-bold mb-4">Token 无效</h2>
<p class="mb-6">您的登录凭证已失效,请重新登录。</p>
<a href="/user/login" class="inline-block bg-red-500 text-white py-2 px-4 rounded hover:bg-red-600 transition duration-200">确定</a>
<a href="/user/login" class="inline-block bg-red-500 text-white py-2 px-4 rounded-sm hover:bg-red-600 transition duration-200">确定</a>
</div>
`;
export const modal = DialogModal.render(content, {

View File

@@ -122,7 +122,7 @@ export const AppVersionList = () => {
/>
</div>
<div className='flex-grow h-full relative'>
<div className='grow h-full relative'>
<div className='absolute top-2 left-4'>
<Tooltip title='返回' placement='bottom'>
<Button
@@ -216,7 +216,7 @@ export const AppVersionList = () => {
</div>
</div>
</div>
<div className='flex-shrink h-full'>
<div className='shark h-full'>
{isUpload && (
<div className='bg-white p-2 w-[600px] h-full flex flex-col'>
<div className='header flex items-center gap-2'>
@@ -254,7 +254,7 @@ export const AppVersionFile = () => {
return (
<>
<div>version: {versionStore.formData.version}</div>
<div className='border rounded-md my-2 flex-grow overflow-hidden'>
<div className='border rounded-md my-2 grow overflow-hidden'>
<div className='flex gap-2 items-center border-b py-2 px-2'>
Files
<FileUpload />

View File

@@ -126,7 +126,7 @@ export const List = () => {
icon={<CodeOutlined />}></Button>
</Tooltip>
</div>
<div className='flex-grow'>
<div className='grow'>
<div className='w-full h-full p-4'>
<div className='w-full h-full bg-white rounded-lg p-2'>
<div className='flex flex-wrap gap-2'>

View File

@@ -30,7 +30,7 @@ export const TextArea = (props: Props) => {
<CodeEditor
value={code}
language={props.language || 'js'}
className='border rounded-sm '
className='border border-gray-200 rounded-xs '
readOnly={props.readonly}
placeholder={props.placeholder || 'Please enter JS code.'}
onChange={(evn) => _onChange(evn.target.value)}

View File

@@ -1,5 +1,5 @@
import { Button, Input, message, Modal, Select, Switch, Table, Tooltip } from 'antd';
import { Fragment, useEffect, useMemo, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import { TextArea } from '../components/TextArea';
import { useContainerStore } from '../store';
import { useShallow } from 'zustand/react/shallow';
@@ -21,7 +21,6 @@ import {
import clsx from 'clsx';
import { isObjectNull } from '@/utils/is-null';
import { CardBlank } from '@/components/card/CardBlank';
import { update } from 'lodash-es';
const FormModal = () => {
const [form] = Form.useForm();
const containerStore = useContainerStore(
@@ -222,9 +221,9 @@ export const ContainerList = () => {
<Button onClick={onAdd} icon={<PlusOutlined />}></Button>
</Tooltip>
</div>
<div className='flex flex-grow overflow-hidden h-full'>
<div className='flex-grow overflow-auto scrollbar bg-gray-100'>
<div className='flex flex-wrap gap-x-10 gap-y-4 rounded pt-10 justify-center'>
<div className='flex grow overflow-hidden h-full'>
<div className='grow overflow-auto scrollbar bg-gray-100'>
<div className='flex flex-wrap gap-x-10 gap-y-4 rounded-sm pt-10 justify-center'>
{containerStore.list.length > 0 &&
containerStore.list.map((item) => {
return (
@@ -316,7 +315,7 @@ export const ContainerList = () => {
<CardBlank className='w-[400px]' />
</div>
</div>
<div className={clsx('bg-gray-100 border-l border-bg-slate-300 w-[600px] flex-shrink-0', !codeEdit && 'hidden')}>
<div className={clsx('bg-gray-100 border-l-gray-200 border-bg-slate-300 w-[600px] shark-0', !codeEdit && 'hidden')}>
<div className='bg-white p-2'>
<div className='mt-2 ml-2 flex gap-2'>
<Tooltip title='返回'>
@@ -345,7 +344,7 @@ export const ContainerList = () => {
</Tooltip>
</div>
</div>
<div className='h-[94%] p-2 rounded-2 shadow-sm'>
<div className='h-[94%] p-2 rounded-2 shadow-xs'>
<TextArea
value={code}
onChange={(value) => {

View File

@@ -128,8 +128,8 @@ export const List = () => {
<div className='p-2'>
<Button onClick={onAdd} icon={<PlusOutlined />}></Button>
</div>
<div className='flex flex-grow overflow-hidden h-full'>
<div className='flex-grow overflow-auto scrollbar bg-gray-100'>
<div className='flex grow overflow-hidden h-full'>
<div className='grow overflow-auto scrollbar bg-gray-100'>
<div className='flex flex-wrap gap-x-10 gap-y-4 rounded pt-10 justify-center'>
{userStore.list.length > 0 &&
userStore.list.map((item) => {
@@ -203,7 +203,7 @@ export const List = () => {
<CardBlank className='w-[400px]' />
</div>
</div>
<div className={clsx('bg-gray-100 border-l border-bg-slate-300 w-[600px] flex-shrink-0', !codeEdit && 'hidden', 'hidden')}>
<div className={clsx('bg-gray-100 border-l-gray-200 border-bg-slate-300 w-[600px] shark-0', !codeEdit && 'hidden', 'hidden')}>
<div className='bg-white p-2'>
<div className='mt-2 ml-2 flex gap-2'>
<Button
@@ -220,7 +220,7 @@ export const List = () => {
icon={<SaveOutlined />}></Button>
</div>
</div>
<div className='h-[94%] p-2 rounded-2 shadow-sm'>
<div className='h-[94%] p-2 rounded-2 shadow-xs'>
<Input.TextArea
value={code}
onChange={(value) => {

View File

@@ -122,7 +122,7 @@ export const UserList = () => {
message.info('Coming soon');
}}></Button>
</div>
<div className='p-4 pt-12 flex-grow relative'>
<div className='p-4 pt-12 grow relative'>
<div className='absolute top-2'>
<Tooltip title='返回'>
<Button

View File

@@ -110,8 +110,8 @@ export const List = () => {
<div className='p-2'>
<Button onClick={onAdd} icon={<PlusOutlined />}></Button>
</div>
<div className='flex flex-grow overflow-hidden h-full'>
<div className='flex-grow overflow-auto scrollbar bg-gray-100'>
<div className='flex grow overflow-hidden h-full'>
<div className='grow overflow-auto scrollbar bg-gray-100'>
<div className='flex flex-wrap gap-x-10 gap-y-4 rounded pt-10 justify-center'>
{userStore.list.length > 0 &&
userStore.list.map((item) => {
@@ -172,7 +172,7 @@ export const List = () => {
)}
</div>
</div>
<div className={clsx('bg-gray-100 border-l border-bg-slate-300 w-[600px] flex-shrink-0', !codeEdit && 'hidden', 'hidden')}>
<div className={clsx('bg-gray-100 border-l-gray-200 border-bg-slate-300 w-[600px] shark-0', !codeEdit && 'hidden', 'hidden')}>
<div className='bg-white p-2'>
<div className='mt-2 ml-2 flex gap-2'>
<Button
@@ -189,7 +189,7 @@ export const List = () => {
icon={<SaveOutlined />}></Button>
</div>
</div>
<div className='h-[94%] p-2 rounded-2 shadow-sm'>
<div className='h-[94%] p-2 rounded-2 shadow-xs'>
<Input.TextArea
value={code}
onChange={(value) => {