2025-03-19 23:14:54 +11:00
|
|
|
import { createVar, style } from '@vanilla-extract/css';
|
|
|
|
|
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
|
|
|
|
import { color, config, DefaultReset, toRem } from 'folds';
|
|
|
|
|
|
|
|
|
|
export const PowerColorBadge = style({
|
2025-03-23 22:09:29 +11:00
|
|
|
display: 'inline-flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'center',
|
2025-03-19 23:14:54 +11:00
|
|
|
flexShrink: 0,
|
|
|
|
|
width: toRem(16),
|
|
|
|
|
height: toRem(16),
|
|
|
|
|
borderRadius: config.radii.Pill,
|
2025-03-23 22:09:29 +11:00
|
|
|
border: `${config.borderWidth.B300} solid ${color.Secondary.ContainerLine}`,
|
|
|
|
|
position: 'relative',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const PowerColorBadgeNone = style({
|
|
|
|
|
selectors: {
|
|
|
|
|
'&::before': {
|
|
|
|
|
content: '',
|
|
|
|
|
display: 'inline-block',
|
|
|
|
|
width: '100%',
|
|
|
|
|
height: config.borderWidth.B300,
|
|
|
|
|
backgroundColor: color.Critical.Main,
|
|
|
|
|
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
transform: `rotateZ(-45deg)`,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-03-19 23:14:54 +11:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const PowerIconSize = createVar();
|
|
|
|
|
export const PowerIcon = recipe({
|
|
|
|
|
base: [
|
|
|
|
|
DefaultReset,
|
|
|
|
|
{
|
|
|
|
|
display: 'inline-flex',
|
|
|
|
|
height: PowerIconSize,
|
|
|
|
|
minWidth: PowerIconSize,
|
|
|
|
|
fontSize: PowerIconSize,
|
|
|
|
|
lineHeight: PowerIconSize,
|
|
|
|
|
borderRadius: config.radii.R300,
|
|
|
|
|
cursor: 'default',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
variants: {
|
|
|
|
|
size: {
|
|
|
|
|
'50': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X50,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'100': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X100,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'200': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X200,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'300': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X300,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'400': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X400,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'500': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X500,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
'600': {
|
|
|
|
|
vars: {
|
|
|
|
|
[PowerIconSize]: config.size.X600,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
defaultVariants: {
|
|
|
|
|
size: '400',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export type PowerIconVariants = RecipeVariants<typeof PowerIcon>;
|