2025-06-29 19:55:58 +00:00
|
|
|
import { css, cssManager, unsafeCSS } from '@design.estate/dees-element';
|
|
|
|
|
|
|
|
|
|
export const fonts = {
|
|
|
|
|
base: `'Geist Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`,
|
|
|
|
|
mono: `'Geist Mono', ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace`
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const colors = {
|
|
|
|
|
// Background colors
|
|
|
|
|
background: {
|
2025-12-23 09:26:37 +00:00
|
|
|
primary: cssManager.bdTheme('#ffffff', '#09090b'),
|
|
|
|
|
secondary: cssManager.bdTheme('#fafafa', '#18181b'),
|
|
|
|
|
muted: cssManager.bdTheme('#f4f4f5', '#27272a'),
|
|
|
|
|
card: cssManager.bdTheme('#ffffff', '#0f0f12'),
|
|
|
|
|
elevated: cssManager.bdTheme('#ffffff', '#1a1a1e')
|
2025-06-29 19:55:58 +00:00
|
|
|
},
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
// Border colors
|
|
|
|
|
border: {
|
2025-12-23 09:26:37 +00:00
|
|
|
default: cssManager.bdTheme('#e4e4e7', '#27272a'),
|
|
|
|
|
muted: cssManager.bdTheme('#f4f4f5', '#3f3f46'),
|
|
|
|
|
subtle: cssManager.bdTheme('#f0f0f2', '#1f1f23')
|
2025-06-29 19:55:58 +00:00
|
|
|
},
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
// Text colors
|
|
|
|
|
text: {
|
2025-12-23 09:26:37 +00:00
|
|
|
primary: cssManager.bdTheme('#09090b', '#fafafa'),
|
|
|
|
|
secondary: cssManager.bdTheme('#71717a', '#a1a1aa'),
|
|
|
|
|
muted: cssManager.bdTheme('#a1a1aa', '#71717a')
|
2025-06-29 19:55:58 +00:00
|
|
|
},
|
2025-12-23 09:26:37 +00:00
|
|
|
|
|
|
|
|
// Status colors - vibrant and accessible
|
2025-06-29 19:55:58 +00:00
|
|
|
status: {
|
2025-12-23 09:26:37 +00:00
|
|
|
operational: cssManager.bdTheme('#16a34a', '#22c55e'),
|
|
|
|
|
degraded: cssManager.bdTheme('#d97706', '#fbbf24'),
|
|
|
|
|
partial: cssManager.bdTheme('#dc2626', '#f87171'),
|
|
|
|
|
major: cssManager.bdTheme('#b91c1c', '#ef4444'),
|
|
|
|
|
maintenance: cssManager.bdTheme('#2563eb', '#60a5fa')
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// Accent colors for interactive elements
|
|
|
|
|
accent: {
|
|
|
|
|
primary: cssManager.bdTheme('#09090b', '#fafafa'),
|
|
|
|
|
hover: cssManager.bdTheme('#18181b', '#e4e4e7'),
|
|
|
|
|
focus: cssManager.bdTheme('#3b82f6', '#60a5fa')
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const shadows = {
|
2025-12-23 09:26:37 +00:00
|
|
|
xs: '0 1px 2px 0 rgba(0, 0, 0, 0.03)',
|
|
|
|
|
sm: '0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06)',
|
|
|
|
|
base: '0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05)',
|
|
|
|
|
md: '0 6px 12px -2px rgba(0, 0, 0, 0.08), 0 3px 7px -3px rgba(0, 0, 0, 0.05)',
|
|
|
|
|
lg: '0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 6px 12px -6px rgba(0, 0, 0, 0.05)',
|
|
|
|
|
xl: '0 24px 48px -12px rgba(0, 0, 0, 0.12), 0 12px 24px -12px rgba(0, 0, 0, 0.05)',
|
|
|
|
|
inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.04)',
|
|
|
|
|
glow: '0 0 20px -5px rgba(34, 197, 94, 0.3)'
|
2025-06-29 19:55:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const borderRadius = {
|
2025-12-23 09:26:37 +00:00
|
|
|
xs: '3px',
|
2025-06-29 19:55:58 +00:00
|
|
|
sm: '4px',
|
|
|
|
|
base: '6px',
|
|
|
|
|
md: '8px',
|
|
|
|
|
lg: '12px',
|
|
|
|
|
xl: '16px',
|
2025-12-23 09:26:37 +00:00
|
|
|
'2xl': '24px',
|
2025-06-29 19:55:58 +00:00
|
|
|
full: '9999px'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const spacing = {
|
|
|
|
|
xs: '4px',
|
|
|
|
|
sm: '8px',
|
|
|
|
|
md: '16px',
|
|
|
|
|
lg: '24px',
|
|
|
|
|
xl: '32px',
|
|
|
|
|
'2xl': '48px',
|
2025-12-23 09:26:37 +00:00
|
|
|
'3xl': '64px',
|
|
|
|
|
'4xl': '96px'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Animation easings
|
|
|
|
|
export const easings = {
|
|
|
|
|
default: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
|
|
|
smooth: 'cubic-bezier(0.4, 0, 0.6, 1)',
|
|
|
|
|
bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
|
|
|
|
|
snappy: 'cubic-bezier(0.2, 0, 0, 1)'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Durations
|
|
|
|
|
export const durations = {
|
|
|
|
|
fast: '100ms',
|
|
|
|
|
normal: '200ms',
|
|
|
|
|
slow: '300ms',
|
|
|
|
|
slower: '500ms'
|
2025-06-29 19:55:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const commonStyles = css`
|
|
|
|
|
/* Button styles */
|
|
|
|
|
.button {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-family: ${unsafeCSS(fonts.base)};
|
2025-12-23 09:26:37 +00:00
|
|
|
font-size: 13px;
|
2025-06-29 19:55:58 +00:00
|
|
|
font-weight: 500;
|
|
|
|
|
height: 36px;
|
2025-12-23 09:26:37 +00:00
|
|
|
padding: 0 14px;
|
2025-06-29 19:55:58 +00:00
|
|
|
border-radius: ${unsafeCSS(borderRadius.base)};
|
|
|
|
|
border: 1px solid ${colors.border.default};
|
2025-12-23 09:26:37 +00:00
|
|
|
background: ${colors.background.primary};
|
2025-06-29 19:55:58 +00:00
|
|
|
color: ${colors.text.primary};
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
user-select: none;
|
2025-12-23 09:26:37 +00:00
|
|
|
transition: all ${unsafeCSS(durations.normal)} ${unsafeCSS(easings.default)};
|
|
|
|
|
gap: 6px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
letter-spacing: -0.01em;
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
.button:hover {
|
2025-12-23 09:26:37 +00:00
|
|
|
background: ${colors.background.secondary};
|
|
|
|
|
border-color: ${cssManager.bdTheme('#d4d4d8', '#3f3f46')};
|
|
|
|
|
box-shadow: ${unsafeCSS(shadows.xs)};
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
.button:active {
|
2025-12-23 09:26:37 +00:00
|
|
|
transform: scale(0.98);
|
|
|
|
|
transition-duration: ${unsafeCSS(durations.fast)};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button:focus-visible {
|
|
|
|
|
outline: 2px solid ${colors.accent.focus};
|
|
|
|
|
outline-offset: 2px;
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
.button.primary {
|
2025-12-23 09:26:37 +00:00
|
|
|
background: ${colors.accent.primary};
|
2025-06-29 19:55:58 +00:00
|
|
|
color: ${colors.background.primary};
|
2025-12-23 09:26:37 +00:00
|
|
|
border-color: transparent;
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
.button.primary:hover {
|
2025-12-23 09:26:37 +00:00
|
|
|
background: ${colors.accent.hover};
|
|
|
|
|
box-shadow: ${unsafeCSS(shadows.sm)};
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
|
|
|
|
.button.ghost {
|
|
|
|
|
background: transparent;
|
|
|
|
|
border-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button.ghost:hover {
|
|
|
|
|
background: ${colors.background.muted};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button.sm {
|
|
|
|
|
height: 32px;
|
|
|
|
|
padding: 0 12px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button.lg {
|
|
|
|
|
height: 44px;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
/* Card styles */
|
|
|
|
|
.card {
|
|
|
|
|
background: ${colors.background.card};
|
|
|
|
|
border: 1px solid ${colors.border.default};
|
2025-12-23 09:26:37 +00:00
|
|
|
border-radius: ${unsafeCSS(borderRadius.lg)};
|
2025-06-29 19:55:58 +00:00
|
|
|
padding: ${unsafeCSS(spacing.lg)};
|
|
|
|
|
box-shadow: ${unsafeCSS(shadows.sm)};
|
2025-12-23 09:26:37 +00:00
|
|
|
transition: all ${unsafeCSS(durations.normal)} ${unsafeCSS(easings.default)};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card:hover {
|
|
|
|
|
border-color: ${colors.border.muted};
|
|
|
|
|
box-shadow: ${unsafeCSS(shadows.base)};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card.interactive {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card.interactive:hover {
|
|
|
|
|
transform: translateY(-2px);
|
|
|
|
|
box-shadow: ${unsafeCSS(shadows.md)};
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
/* Loading skeleton */
|
|
|
|
|
.skeleton {
|
|
|
|
|
background: ${cssManager.bdTheme(
|
2025-12-23 09:26:37 +00:00
|
|
|
'linear-gradient(90deg, #f4f4f5 0%, #e4e4e7 50%, #f4f4f5 100%)',
|
|
|
|
|
'linear-gradient(90deg, #18181b 0%, #27272a 50%, #18181b 100%)'
|
2025-06-29 19:55:58 +00:00
|
|
|
)};
|
|
|
|
|
background-size: 200% 100%;
|
2025-12-23 09:26:37 +00:00
|
|
|
animation: skeleton-loading 1.5s ease-in-out infinite;
|
2025-06-29 19:55:58 +00:00
|
|
|
border-radius: ${unsafeCSS(borderRadius.base)};
|
|
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
@keyframes skeleton-loading {
|
|
|
|
|
0% { background-position: 200% 0; }
|
|
|
|
|
100% { background-position: -200% 0; }
|
|
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
|
|
|
|
/* Pulse animation for status indicators */
|
|
|
|
|
@keyframes pulse {
|
|
|
|
|
0%, 100% { opacity: 1; }
|
|
|
|
|
50% { opacity: 0.5; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Fade in animation */
|
|
|
|
|
@keyframes fadeIn {
|
|
|
|
|
from { opacity: 0; transform: translateY(4px); }
|
|
|
|
|
to { opacity: 1; transform: translateY(0); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fade-in {
|
|
|
|
|
animation: fadeIn ${unsafeCSS(durations.slow)} ${unsafeCSS(easings.default)} forwards;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Scale in animation */
|
|
|
|
|
@keyframes scaleIn {
|
|
|
|
|
from { opacity: 0; transform: scale(0.95); }
|
|
|
|
|
to { opacity: 1; transform: scale(1); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scale-in {
|
|
|
|
|
animation: scaleIn ${unsafeCSS(durations.slow)} ${unsafeCSS(easings.bounce)} forwards;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
/* Container styles */
|
|
|
|
|
.container {
|
|
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 0 ${unsafeCSS(spacing.lg)};
|
|
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
|
|
|
|
/* Status pill */
|
|
|
|
|
.status-pill {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
padding: 4px 10px;
|
|
|
|
|
border-radius: ${unsafeCSS(borderRadius.full)};
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
letter-spacing: 0.01em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill .status-dot {
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.operational {
|
|
|
|
|
background: ${cssManager.bdTheme('rgba(22, 163, 74, 0.1)', 'rgba(34, 197, 94, 0.15)')};
|
|
|
|
|
color: ${cssManager.bdTheme('#15803d', '#4ade80')};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.operational .status-dot {
|
|
|
|
|
background: ${colors.status.operational};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.degraded {
|
|
|
|
|
background: ${cssManager.bdTheme('rgba(217, 119, 6, 0.1)', 'rgba(251, 191, 36, 0.15)')};
|
|
|
|
|
color: ${cssManager.bdTheme('#b45309', '#fcd34d')};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.degraded .status-dot {
|
|
|
|
|
background: ${colors.status.degraded};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.partial_outage,
|
|
|
|
|
.status-pill.major_outage {
|
|
|
|
|
background: ${cssManager.bdTheme('rgba(220, 38, 38, 0.1)', 'rgba(248, 113, 113, 0.15)')};
|
|
|
|
|
color: ${cssManager.bdTheme('#b91c1c', '#fca5a5')};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.partial_outage .status-dot,
|
|
|
|
|
.status-pill.major_outage .status-dot {
|
|
|
|
|
background: ${colors.status.major};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.maintenance {
|
|
|
|
|
background: ${cssManager.bdTheme('rgba(37, 99, 235, 0.1)', 'rgba(96, 165, 250, 0.15)')};
|
|
|
|
|
color: ${cssManager.bdTheme('#1d4ed8', '#93c5fd')};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-pill.maintenance .status-dot {
|
|
|
|
|
background: ${colors.status.maintenance};
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
/* Responsive utilities */
|
2025-12-23 09:26:37 +00:00
|
|
|
@media (max-width: 1024px) {
|
|
|
|
|
.container {
|
|
|
|
|
padding: 0 ${unsafeCSS(spacing.md)};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 19:55:58 +00:00
|
|
|
@media (max-width: 640px) {
|
|
|
|
|
.container {
|
|
|
|
|
padding: 0 ${unsafeCSS(spacing.md)};
|
|
|
|
|
}
|
2025-12-23 09:26:37 +00:00
|
|
|
|
|
|
|
|
.button {
|
|
|
|
|
height: 40px;
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button.sm {
|
|
|
|
|
height: 36px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Visually hidden (for accessibility) */
|
|
|
|
|
.sr-only {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 1px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: -1px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
border: 0;
|
2025-06-29 19:55:58 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const getStatusColor = (status: string) => {
|
|
|
|
|
switch (status) {
|
|
|
|
|
case 'operational':
|
|
|
|
|
return colors.status.operational;
|
|
|
|
|
case 'degraded':
|
|
|
|
|
return colors.status.degraded;
|
|
|
|
|
case 'partial_outage':
|
|
|
|
|
return colors.status.partial;
|
|
|
|
|
case 'major_outage':
|
|
|
|
|
return colors.status.major;
|
|
|
|
|
case 'maintenance':
|
|
|
|
|
return colors.status.maintenance;
|
|
|
|
|
default:
|
|
|
|
|
return colors.text.secondary;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const getStatusIcon = (status: string) => {
|
|
|
|
|
switch (status) {
|
|
|
|
|
case 'operational':
|
|
|
|
|
return '✓';
|
|
|
|
|
case 'degraded':
|
|
|
|
|
return '!';
|
|
|
|
|
case 'partial_outage':
|
|
|
|
|
return '⚠';
|
|
|
|
|
case 'major_outage':
|
|
|
|
|
return '✕';
|
|
|
|
|
case 'maintenance':
|
|
|
|
|
return '🔧';
|
|
|
|
|
default:
|
|
|
|
|
return '?';
|
|
|
|
|
}
|
|
|
|
|
};
|