Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macaraon-css を UnoCSS に置き換える #951

Merged
merged 62 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
224a43d
`yarn add -D unocss`
cp-20 Aug 18, 2024
5f85b92
`uno.config.ts` を設定
cp-20 Aug 18, 2024
c9cd373
`yarn add -D @iconify-json/material-symbols`
cp-20 Aug 18, 2024
6db6f4a
theme の設定
cp-20 Aug 18, 2024
028b24d
reset css の差し替え
cp-20 Aug 18, 2024
29bcfd5
viteのunocss対応
cp-20 Aug 24, 2024
c0c1394
biomeのunocss対応
cp-20 Aug 24, 2024
6a6390b
themeの完全移植
cp-20 Aug 24, 2024
d13c8a5
`virtual:uno.css` をimportした
cp-20 Aug 24, 2024
cb2df5e
UnoCSS に scrollbar-gutter プロパティ用のpresetを足した
cp-20 Aug 24, 2024
55eb165
scrollbar-gutter-preset を直接書いた
cp-20 Aug 25, 2024
f0cd191
Merge branch 'main' into feat/replace-macaron-css-with-uno-css
cp-20 Aug 25, 2024
5b52749
biome の useSortedClasses の範囲を拡大
cp-20 Aug 25, 2024
5dd3b3a
clsx 関数を定義
cp-20 Aug 25, 2024
7205bf4
wip: replace macaron-css with unocss
cp-20 Aug 28, 2024
f68acaf
macaron-css をコンポーネントから全て消した
cp-20 Oct 28, 2024
47afa0f
fmt
cp-20 Oct 28, 2024
e144f28
リファクタリング
cp-20 Oct 28, 2024
1f04520
remove unused imports
cp-20 Oct 29, 2024
5b93470
fmt uno.config.ts
cp-20 Oct 29, 2024
83e25fd
colorVars をほぼ消した
cp-20 Oct 29, 2024
867b1f5
MaterialSymbols で unocss 経由で色を変えられるように
cp-20 Oct 29, 2024
f01a06b
global css を書き換え
cp-20 Oct 29, 2024
db4e6df
theme を消した
cp-20 Oct 29, 2024
97fbb6b
/apps 周りでスタイル崩れを修正
cp-20 Oct 29, 2024
b4d8e17
shadow 周りをリファクタリング
cp-20 Oct 29, 2024
c1c2346
animation が必要だったので書いた
cp-20 Oct 29, 2024
0ec5a6e
outline 直した
cp-20 Oct 29, 2024
a5f13ec
style props をなるべく消した
cp-20 Oct 29, 2024
92d895a
animation 直した
cp-20 Oct 29, 2024
03af20e
checkbox 直した
cp-20 Oct 29, 2024
63546aa
TabBound直した
cp-20 Oct 29, 2024
d11a348
Merge branch 'main' into feat/replace-macaron-css-with-uno-css
cp-20 Oct 31, 2024
3879b89
スタイル崩れを直した
cp-20 Oct 31, 2024
d1d96fb
fix: lint
cp-20 Oct 31, 2024
b0d8952
fmt
cp-20 Oct 31, 2024
63c98dc
アイコン (Material Symbols) を unocss で置き換え
cp-20 Oct 31, 2024
574d20a
macaron-css を依存関係から消した
cp-20 Oct 31, 2024
de2c891
package のバージョン固定
cp-20 Nov 1, 2024
7162f3b
fix useless class
cp-20 Nov 1, 2024
ae7fbce
アイコン要素を span -> div に
cp-20 Nov 1, 2024
ca72c42
fix class
cp-20 Nov 1, 2024
ee8be65
fix style
cp-20 Nov 1, 2024
5a4faa4
fix style
cp-20 Nov 1, 2024
d12c50f
fix class
cp-20 Nov 1, 2024
9687577
fix style
cp-20 Nov 1, 2024
4fe3683
fix opacity class
cp-20 Nov 1, 2024
5214f46
fix transition
cp-20 Nov 1, 2024
79c682e
fix style
cp-20 Nov 1, 2024
c53d114
fix class
cp-20 Nov 1, 2024
a1b2b01
animation 周りを修正
cp-20 Nov 1, 2024
b7de93f
fmt
cp-20 Nov 1, 2024
7d513bd
fix yarn.lock
cp-20 Nov 1, 2024
4566e7f
fix user menu button icon
cp-20 Nov 1, 2024
1cdd8d5
fix style
cp-20 Nov 1, 2024
fa719a6
fix icon shrink
cp-20 Nov 1, 2024
d732935
fix style
cp-20 Nov 1, 2024
9e08e25
fix border
cp-20 Nov 1, 2024
5f1907b
fix class
cp-20 Nov 1, 2024
1f6e7c0
fix Button style
cp-20 Nov 5, 2024
4e4e9d7
Merge branch 'main' into feat/replace-macaron-css-with-uno-css
cp-20 Nov 5, 2024
e9a044b
fix class
cp-20 Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions dashboard/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@
"enabled": true,
"rules": {
"recommended": true,
"nursery": {},
"nursery": {
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {
"functions": ["clsx", "styled"]
}
}
},
"correctness": {
"noUnusedImports": "error"
},
"style": {
"noNonNullAssertion": "off"
}
Expand All @@ -26,4 +37,4 @@
"files": {
"ignore": ["src/api/*", "package.json"]
}
}
}
6 changes: 3 additions & 3 deletions dashboard/package.json
cp-20 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "1.9.2",
"@macaron-css/core": "1.5.2",
"@macaron-css/solid": "1.5.1",
"@macaron-css/vite": "1.5.1",
"@iconify-json/material-symbols": "1.2.5",
"@tanstack/virtual-core": "3.10.8",
"@types/node": "22.7.4",
"jsdom": "25.0.1",
"rollup-plugin-visualizer": "5.12.0",
"typescript": "5.6.2",
"unocss": "0.63.6",
"unplugin-fonts": "1.1.1",
"vite": "5.4.8",
"vite-plugin-compression": "0.5.1",
Expand All @@ -46,6 +45,7 @@
"@solidjs/router": "0.14.7",
"@tanstack/solid-virtual": "3.10.8",
"@types/async-lock": "1.4.2",
"@unocss/reset": "0.63.6",
"ansi-to-html": "0.7.2",
"async-lock": "1.4.1",
"chart.js": "4.4.4",
Expand Down
180 changes: 180 additions & 0 deletions dashboard/src/animate.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
@keyframes wipe-show-up {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes wipe-show-right {
from {
opacity: 0;
transform: translateX(-8px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes wipe-show-down {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes wipe-show-left {
from {
opacity: 0;
transform: translateX(8px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes wipe-hide-up {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(-8px);
}
}
@keyframes wipe-hide-right {
from {
opacity: 1;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(8px);
}
}
@keyframes wipe-hide-down {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(8px);
}
}
@keyframes wipe-hide-left {
from {
opacity: 1;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(-8px);
}
}
@keyframes pop-show {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes pop-hide {
from {
opacity: 1;
transform: scale(1);
}
to {
opacity: 0;
transform: scale(0.95);
}
}
@keyframes fade-show {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fade-hide {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes slide-show-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
@keyframes slide-show-right {
from {
transform: translateX(-100%);
}
to {
transform: translateX(0);
}
}
@keyframes slide-show-down {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}
@keyframes slide-show-left {
from {
transform: translateX(100%);
}
to {
transform: translateX(0);
}
}
@keyframes slide-hide-up {
from {
transform: translateY(0);
}
to {
transform: translateY(-100%);
}
}
@keyframes slide-hide-right {
from {
transform: translateX(0);
}
to {
transform: translateX(100%);
}
}
@keyframes slide-hide-down {
from {
transform: translateY(0);
}
to {
transform: translateY(100%);
}
}
@keyframes slide-hide-left {
from {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
}
47 changes: 20 additions & 27 deletions dashboard/src/components/UI/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
import { styled } from '@macaron-css/solid'
import { colorVars, textVars } from '/@/theme'
import { type ComponentProps, type ParentComponent, splitProps } from 'solid-js'
import { clsx } from '/@/libs/clsx'

const Badge = styled('div', {
base: {
height: '1.43em', // 20px
padding: '0 8px',
borderRadius: '9999px',
whiteSpace: 'nowrap',
type VariantProps = {
variant: 'text' | 'success' | 'warn'
}

...textVars.caption.regular,
},
variants: {
variant: {
text: {
background: colorVars.primitive.blackAlpha[200],
color: colorVars.semantic.text.black,
},
success: {
background: colorVars.semantic.transparent.successHover,
color: colorVars.semantic.accent.success,
},
warn: {
background: colorVars.semantic.transparent.warnHover,
color: colorVars.semantic.accent.warn,
},
},
},
})
const Badge: ParentComponent<ComponentProps<'div'> & VariantProps> = (props) => {
const [_, rest] = splitProps(props, ['variant', 'class'])
return (
<div
class={clsx(
'caption-regular h-5 whitespace-nowrap rounded-full px-2',
props.variant === 'text' && 'bg-black-alpha-200 text-text-black',
props.variant === 'success' && 'bg-transparency-success-hover text-accent-success',
props.variant === 'warn' && 'bg-transparency-warn-hover text-accent-warn',
props.class,
)}
{...rest}
/>
)
}

export default Badge
Loading