|
| 1 | +import { vars } from '@muneo/design-system'; |
| 2 | +import { keyframes, style } from '@vanilla-extract/css'; |
| 3 | + |
| 4 | +const float = keyframes({ |
| 5 | + '0%, 100%': { transform: 'translateY(0px)' }, |
| 6 | + '50%': { transform: 'translateY(-10px)' }, |
| 7 | +}); |
| 8 | + |
| 9 | +const msgIn = keyframes({ |
| 10 | + from: { opacity: 0, transform: 'translateY(8px)' }, |
| 11 | + to: { opacity: 1, transform: 'translateY(0)' }, |
| 12 | +}); |
| 13 | + |
| 14 | +const msgOut = keyframes({ |
| 15 | + from: { opacity: 1, transform: 'translateY(0)' }, |
| 16 | + to: { opacity: 0, transform: 'translateY(-6px)' }, |
| 17 | +}); |
| 18 | + |
| 19 | +const cardIn = keyframes({ |
| 20 | + from: { opacity: 0, transform: 'translateX(20px)' }, |
| 21 | + to: { opacity: 1, transform: 'translateX(0)' }, |
| 22 | +}); |
| 23 | + |
| 24 | +const cardOut = keyframes({ |
| 25 | + from: { opacity: 1, transform: 'translateX(0)' }, |
| 26 | + to: { opacity: 0, transform: 'translateX(-20px)' }, |
| 27 | +}); |
| 28 | + |
| 29 | +const MOTION = '(prefers-reduced-motion: reduce)' as const; |
| 30 | + |
| 31 | +export const container = style({ |
| 32 | + display: 'flex', |
| 33 | + flexDirection: 'column', |
| 34 | + alignItems: 'center', |
| 35 | + justifyContent: 'center', |
| 36 | + minHeight: '60vh', |
| 37 | + padding: '40px 24px', |
| 38 | +}); |
| 39 | + |
| 40 | +export const mascotWrap = style({ |
| 41 | + animation: `${float} 2.4s ease-in-out infinite`, |
| 42 | + marginBottom: '24px', |
| 43 | + '@media': { [MOTION]: { animation: 'none' } }, |
| 44 | +}); |
| 45 | + |
| 46 | +export const mascotImg = style({ |
| 47 | + width: '108px', |
| 48 | + height: 'auto', |
| 49 | + display: 'block', |
| 50 | +}); |
| 51 | + |
| 52 | +export const msgWrap = style({ |
| 53 | + height: '24px', |
| 54 | + display: 'flex', |
| 55 | + alignItems: 'center', |
| 56 | + marginBottom: '16px', |
| 57 | +}); |
| 58 | + |
| 59 | +export const msg = style({ |
| 60 | + fontSize: vars.typography.fontSize.sm, |
| 61 | + color: vars.color.neutral.n600, |
| 62 | + textAlign: 'center', |
| 63 | + fontWeight: vars.typography.fontWeight.medium, |
| 64 | + animation: `${msgIn} 0.35s ease-out both`, |
| 65 | + '@media': { [MOTION]: { animation: 'none' } }, |
| 66 | +}); |
| 67 | + |
| 68 | +export const msgExiting = style({ |
| 69 | + animation: `${msgOut} 0.25s ease-in both`, |
| 70 | + '@media': { [MOTION]: { animation: 'none' } }, |
| 71 | +}); |
| 72 | + |
| 73 | +export const progressWrap = style({ |
| 74 | + width: '280px', |
| 75 | + height: '4px', |
| 76 | + borderRadius: '2px', |
| 77 | + backgroundColor: vars.color.neutral.n200, |
| 78 | + overflow: 'hidden', |
| 79 | + marginBottom: '32px', |
| 80 | +}); |
| 81 | + |
| 82 | +export const progressFill = style({ |
| 83 | + height: '100%', |
| 84 | + borderRadius: '2px', |
| 85 | + background: 'linear-gradient(90deg, #453EEF 0%, #9B86FF 100%)', |
| 86 | + width: '0%', |
| 87 | + willChange: 'width', |
| 88 | +}); |
| 89 | + |
| 90 | +export const tipCard = style({ |
| 91 | + width: '280px', |
| 92 | + minHeight: '60px', |
| 93 | + backgroundColor: vars.color.neutral.n100, |
| 94 | + borderRadius: '12px', |
| 95 | + padding: '14px 16px', |
| 96 | + display: 'flex', |
| 97 | + alignItems: 'flex-start', |
| 98 | + gap: '10px', |
| 99 | + marginBottom: '10px', |
| 100 | + animation: `${cardIn} 0.4s ease-out both`, |
| 101 | + '@media': { [MOTION]: { animation: 'none' } }, |
| 102 | +}); |
| 103 | + |
| 104 | +export const tipCardExiting = style({ |
| 105 | + animation: `${cardOut} 0.3s ease-in both`, |
| 106 | + '@media': { [MOTION]: { animation: 'none' } }, |
| 107 | +}); |
| 108 | + |
| 109 | +export const tipIcon = style({ |
| 110 | + fontSize: '16px', |
| 111 | + flexShrink: 0, |
| 112 | + lineHeight: '22px', |
| 113 | +}); |
| 114 | + |
| 115 | +export const tipText = style({ |
| 116 | + fontSize: vars.typography.fontSize.xs, |
| 117 | + color: vars.color.neutral.n600, |
| 118 | + lineHeight: vars.typography.lineHeight.lg, |
| 119 | +}); |
| 120 | + |
| 121 | +export const dots = style({ |
| 122 | + display: 'flex', |
| 123 | + gap: '5px', |
| 124 | + marginBottom: '28px', |
| 125 | +}); |
| 126 | + |
| 127 | +export const dot = style({ |
| 128 | + width: '5px', |
| 129 | + height: '5px', |
| 130 | + borderRadius: '50%', |
| 131 | + backgroundColor: vars.color.neutral.n300, |
| 132 | + transition: 'background-color 0.3s ease', |
| 133 | +}); |
| 134 | + |
| 135 | +export const dotActive = style({ |
| 136 | + backgroundColor: vars.color.brand.primary, |
| 137 | +}); |
| 138 | + |
| 139 | +export const footer = style({ |
| 140 | + display: 'flex', |
| 141 | + flexDirection: 'column', |
| 142 | + alignItems: 'center', |
| 143 | + gap: '10px', |
| 144 | +}); |
| 145 | + |
| 146 | +export const footerText = style({ |
| 147 | + fontSize: vars.typography.fontSize.xs, |
| 148 | + color: vars.color.neutral.n400, |
| 149 | +}); |
| 150 | + |
| 151 | +export const cancelBtn = style({ |
| 152 | + background: 'none', |
| 153 | + border: `1px solid ${vars.color.neutral.n300}`, |
| 154 | + borderRadius: vars.radius.sm, |
| 155 | + padding: '8px 20px', |
| 156 | + fontSize: vars.typography.fontSize.sm, |
| 157 | + color: vars.color.neutral.n500, |
| 158 | + cursor: 'pointer', |
| 159 | + fontFamily: vars.typography.fontFamily, |
| 160 | + transition: 'opacity 0.15s ease', |
| 161 | + selectors: { |
| 162 | + '&:hover': { opacity: 0.65 }, |
| 163 | + }, |
| 164 | +}); |
0 commit comments