2025-09-17 18:43:43 +09:00
|
|
|
/**
|
2025-10-29 15:54:45 +09:00
|
|
|
* Minimal Design System Utilities
|
|
|
|
|
*
|
|
|
|
|
* This file contains only semantic component primitives.
|
|
|
|
|
* Layout, spacing, typography, and responsive utilities come from Tailwind.
|
|
|
|
|
* Design tokens (colors, spacing, etc.) are defined in tokens.css and globals.css.
|
2025-09-17 18:43:43 +09:00
|
|
|
*/
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
@layer utilities {
|
|
|
|
|
/* ===== CARD ===== */
|
|
|
|
|
.cp-card {
|
|
|
|
|
background: var(--card);
|
|
|
|
|
color: var(--card-foreground);
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
border-radius: var(--cp-card-radius);
|
|
|
|
|
box-shadow: var(--cp-card-shadow);
|
|
|
|
|
padding: var(--cp-card-padding);
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-card-sm {
|
|
|
|
|
padding: var(--cp-card-padding-sm);
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-card-lg {
|
|
|
|
|
border-radius: var(--cp-card-radius-lg);
|
|
|
|
|
box-shadow: var(--cp-card-shadow-lg);
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
/* ===== BADGE ===== */
|
|
|
|
|
.cp-badge {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: var(--cp-space-1);
|
|
|
|
|
border-radius: var(--cp-badge-radius);
|
|
|
|
|
padding: var(--cp-badge-padding-y) var(--cp-badge-padding-x);
|
|
|
|
|
font-size: var(--cp-badge-font-size);
|
|
|
|
|
font-weight: var(--cp-badge-font-weight);
|
|
|
|
|
line-height: 1;
|
|
|
|
|
white-space: nowrap;
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
/* Badge variants */
|
|
|
|
|
.cp-badge-primary {
|
|
|
|
|
background: var(--primary);
|
|
|
|
|
color: var(--primary-foreground);
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-secondary {
|
|
|
|
|
background: var(--secondary);
|
|
|
|
|
color: var(--secondary-foreground);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-success {
|
|
|
|
|
background: var(--success);
|
|
|
|
|
color: var(--success-foreground);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-warning {
|
|
|
|
|
background: var(--warning);
|
|
|
|
|
color: var(--warning-foreground);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-error {
|
|
|
|
|
background: var(--destructive);
|
|
|
|
|
color: var(--destructive-foreground);
|
2025-09-17 18:43:43 +09:00
|
|
|
}
|
|
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-info {
|
|
|
|
|
background: var(--info);
|
|
|
|
|
color: var(--info-foreground);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
/* Soft badge variants */
|
|
|
|
|
.cp-badge-soft-success {
|
|
|
|
|
background: var(--success-soft);
|
|
|
|
|
color: var(--success);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-soft-warning {
|
|
|
|
|
background: var(--warning-soft);
|
|
|
|
|
color: var(--warning);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-10-29 15:54:45 +09:00
|
|
|
|
|
|
|
|
.cp-badge-soft-error {
|
|
|
|
|
background: var(--destructive-soft);
|
|
|
|
|
color: var(--destructive);
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-soft-info {
|
|
|
|
|
background: var(--info-soft);
|
|
|
|
|
color: var(--info);
|
|
|
|
|
}
|
2025-09-26 17:02:36 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-badge-outline {
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: 1px solid currentColor;
|
|
|
|
|
}
|
2025-09-26 17:02:36 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
/* ===== SKELETON (Loading state) ===== */
|
|
|
|
|
.cp-skeleton {
|
|
|
|
|
background: var(--cp-skeleton-base);
|
|
|
|
|
border-radius: var(--cp-radius-md);
|
|
|
|
|
position: relative;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
2025-09-26 17:02:36 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-skeleton::after {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: linear-gradient(90deg, transparent, var(--cp-skeleton-shimmer), transparent);
|
|
|
|
|
animation: cp-skeleton-shimmer 2s infinite;
|
|
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
@keyframes cp-skeleton-shimmer {
|
|
|
|
|
0% {
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
100% {
|
|
|
|
|
transform: translateX(100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
/* ===== FOCUS RING ===== */
|
|
|
|
|
.cp-focus-ring {
|
|
|
|
|
outline: var(--cp-focus-ring);
|
|
|
|
|
outline-offset: var(--cp-focus-ring-offset);
|
|
|
|
|
}
|
2025-09-17 18:43:43 +09:00
|
|
|
|
2025-10-29 15:54:45 +09:00
|
|
|
.cp-focus-ring-visible:focus-visible {
|
|
|
|
|
outline: var(--cp-focus-ring);
|
|
|
|
|
outline-offset: var(--cp-focus-ring-offset);
|
|
|
|
|
}
|
2025-09-26 17:02:36 +09:00
|
|
|
}
|