-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/auto-shutdown
- Loading branch information
Showing
98 changed files
with
2,987 additions
and
5,845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.