feat: Phase 2 — UI component enhancement with design tokens
**Design System (Phase 1 completion):** - tokens.ts: 12-category token system (colors, typography, spacing, shadows, etc.) - tokens.css: CSS variables with light/dark theme support - App.vue: Integrated token system app-wide **Shared Components (Phase 2):** - SkeletonLoader.vue: 5 loader types (text, card, avatar, table, list) - ErrorBoundary.vue: Error state recovery with retry - ToastNotification.vue: Toast alerts with 4 types + auto-dismiss - ToastContainer.vue: Toast provider with fixed positioning - Modal.vue: Animated modal with 4 size variants **Page Enhancements:** - ShadowRunQueue.vue: Loading → Skeleton + Error → ErrorBoundary + Normal states - ModelList.vue: Loading → Skeleton + Error → ErrorBoundary + Normal states - ApprovalQueue.vue: Loading → Skeleton + Error → ErrorBoundary + Normal states **Testing:** - All 3 pages: ✅ 100% PASS (12/12 selectors) - Playwright tests verify: loading, error, normal states - All states render correctly with token-based styling **Next: Phase 3 (2-4h)** - Layout unification (sidebar, header, footer) - Complete dark theme implementation - Mobile responsiveness & navigation Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onErrorCaptured } from 'vue'
|
||||
|
||||
interface Props {
|
||||
fallbackMessage?: string
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
fallbackMessage: 'Something went wrong. Please try again.',
|
||||
})
|
||||
|
||||
const error = ref<Error | null>(null)
|
||||
const errorMessage = ref('')
|
||||
|
||||
onErrorCaptured((err: unknown) => {
|
||||
error.value = err instanceof Error ? err : new Error(String(err))
|
||||
errorMessage.value = error.value.message || 'An unexpected error occurred'
|
||||
return false // Prevent error from propagating
|
||||
})
|
||||
|
||||
const retry = () => {
|
||||
error.value = null
|
||||
errorMessage.value = ''
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- Error state -->
|
||||
<div v-if="error" class="error-boundary">
|
||||
<div class="error-icon">⚠️</div>
|
||||
<div class="error-content">
|
||||
<h3>Error</h3>
|
||||
<p class="error-message">{{ errorMessage || fallbackMessage }}</p>
|
||||
<button @click="retry" class="btn btn-primary">Retry</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Normal rendering -->
|
||||
<slot v-else></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.error-boundary {
|
||||
padding: var(--spacing-6);
|
||||
background: var(--color-danger-50);
|
||||
border: var(--border-width-2) solid var(--color-danger-200);
|
||||
border-radius: var(--border-radius-lg);
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--spacing-4);
|
||||
}
|
||||
|
||||
.error-icon {
|
||||
font-size: 48px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.error-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-2);
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.error-content h3 {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--color-danger-700);
|
||||
}
|
||||
|
||||
.error-message {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-danger-600);
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: var(--spacing-2) var(--spacing-4);
|
||||
border: var(--border-width-1) solid var(--color-danger-300);
|
||||
border-radius: var(--border-radius-base);
|
||||
background: var(--color-danger-500);
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: var(--font-weight-medium);
|
||||
transition: all var(--transition-fast);
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
.btn-primary:hover:not(:disabled) {
|
||||
background: var(--color-danger-600);
|
||||
border-color: var(--color-danger-600);
|
||||
}
|
||||
|
||||
.btn-primary:active:not(:disabled) {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,229 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
isOpen: boolean
|
||||
title?: string
|
||||
size?: 'sm' | 'md' | 'lg' | 'xl'
|
||||
closeButton?: boolean
|
||||
backdrop?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
size: 'md',
|
||||
closeButton: true,
|
||||
backdrop: true,
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
close: []
|
||||
}>()
|
||||
|
||||
const modalClass = computed(() => ({
|
||||
[`modal-${props.size}`]: true,
|
||||
}))
|
||||
|
||||
const handleBackdropClick = (e: MouseEvent) => {
|
||||
if (e.target === e.currentTarget && props.backdrop) {
|
||||
emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
const handleEscapeKey = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape' && props.isOpen) {
|
||||
emit('close')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<transition name="modal">
|
||||
<div v-if="isOpen" class="modal-overlay" @click="handleBackdropClick" @keydown="handleEscapeKey">
|
||||
<div class="modal-dialog" :class="modalClass">
|
||||
<!-- Header -->
|
||||
<div v-if="title || $slots.header" class="modal-header">
|
||||
<slot name="header">
|
||||
<h2 class="modal-title">{{ title }}</h2>
|
||||
</slot>
|
||||
<button
|
||||
v-if="closeButton"
|
||||
class="modal-close"
|
||||
aria-label="Close dialog"
|
||||
@click="emit('close')"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Body -->
|
||||
<div class="modal-body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div v-if="$slots.footer" class="modal-footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: var(--z-index-modal);
|
||||
padding: var(--spacing-4);
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
background: var(--color-background-primary);
|
||||
border-radius: var(--border-radius-lg);
|
||||
box-shadow: var(--shadow-2xl);
|
||||
max-height: 90vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: modalOpen var(--transition-base) ease-out;
|
||||
}
|
||||
|
||||
@keyframes modalOpen {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Size variants */
|
||||
.modal-sm {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.modal-md {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.modal-lg {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.modal-xl {
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.modal-header {
|
||||
padding: var(--spacing-4);
|
||||
border-bottom: var(--border-width-1) solid var(--color-border-secondary);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: var(--spacing-3);
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
padding: 0;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
min-width: 32px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--color-text-tertiary);
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-2xl);
|
||||
font-weight: var(--font-weight-light);
|
||||
transition: color var(--transition-fast);
|
||||
border-radius: var(--border-radius-base);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-background-secondary);
|
||||
}
|
||||
|
||||
/* Body */
|
||||
.modal-body {
|
||||
padding: var(--spacing-4);
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.modal-footer {
|
||||
padding: var(--spacing-4);
|
||||
border-top: var(--border-width-1) solid var(--color-border-secondary);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: var(--spacing-2);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Transition */
|
||||
.modal-enter-active,
|
||||
.modal-leave-active {
|
||||
transition: opacity var(--transition-base);
|
||||
}
|
||||
|
||||
.modal-enter-from,
|
||||
.modal-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.modal-enter-from .modal-dialog,
|
||||
.modal-leave-to .modal-dialog {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Mobile responsiveness */
|
||||
@media (max-width: 640px) {
|
||||
.modal-overlay {
|
||||
padding: var(--spacing-2);
|
||||
}
|
||||
|
||||
.modal-sm,
|
||||
.modal-md,
|
||||
.modal-lg,
|
||||
.modal-xl {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-body,
|
||||
.modal-footer {
|
||||
padding: var(--spacing-3);
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
max-height: calc(90vh - 120px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,145 @@
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
type?: 'text' | 'card' | 'avatar' | 'table' | 'list'
|
||||
rows?: number
|
||||
width?: string
|
||||
height?: string
|
||||
}
|
||||
|
||||
defineProps<Props>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="skeleton-loader" :class="[`skeleton-${type}`]">
|
||||
<!-- Text skeleton -->
|
||||
<template v-if="type === 'text'">
|
||||
<div class="skeleton-line" :style="{ width, height: height || '16px' }"></div>
|
||||
<div class="skeleton-line" :style="{ width: '90%', height: height || '16px', marginTop: '8px' }"></div>
|
||||
<div class="skeleton-line" :style="{ width: '75%', height: height || '16px', marginTop: '8px' }"></div>
|
||||
</template>
|
||||
|
||||
<!-- Card skeleton -->
|
||||
<template v-else-if="type === 'card'">
|
||||
<div class="skeleton-card">
|
||||
<div class="skeleton-header">
|
||||
<div class="skeleton-line" style="width: 80%; height: 24px"></div>
|
||||
<div class="skeleton-avatar"></div>
|
||||
</div>
|
||||
<div class="skeleton-body">
|
||||
<div class="skeleton-line" style="width: 100%; height: 16px"></div>
|
||||
<div class="skeleton-line" style="width: 90%; height: 16px; margin-top: 8px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Avatar skeleton -->
|
||||
<template v-else-if="type === 'avatar'">
|
||||
<div class="skeleton-avatar"></div>
|
||||
</template>
|
||||
|
||||
<!-- Table skeleton -->
|
||||
<template v-else-if="type === 'table'">
|
||||
<div class="skeleton-table">
|
||||
<div v-for="i in (rows || 5)" :key="i" class="skeleton-table-row">
|
||||
<div class="skeleton-cell"></div>
|
||||
<div class="skeleton-cell"></div>
|
||||
<div class="skeleton-cell"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- List skeleton -->
|
||||
<template v-else-if="type === 'list'">
|
||||
<div v-for="i in (rows || 3)" :key="i" class="skeleton-list-item">
|
||||
<div class="skeleton-avatar"></div>
|
||||
<div class="skeleton-list-content">
|
||||
<div class="skeleton-line" style="width: 60%; height: 16px"></div>
|
||||
<div class="skeleton-line" style="width: 40%; height: 12px; margin-top: 8px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.skeleton-loader {
|
||||
animation: pulse var(--transition-slow);
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-line {
|
||||
background: var(--color-background-secondary);
|
||||
border-radius: var(--border-radius-base);
|
||||
display: block;
|
||||
margin-bottom: var(--spacing-2);
|
||||
}
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--border-radius-full);
|
||||
background: var(--color-background-secondary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
padding: var(--spacing-4);
|
||||
background: var(--color-background-primary);
|
||||
border: var(--border-width-1) solid var(--color-border-secondary);
|
||||
border-radius: var(--border-radius-lg);
|
||||
}
|
||||
|
||||
.skeleton-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-3);
|
||||
}
|
||||
|
||||
.skeleton-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-2);
|
||||
}
|
||||
|
||||
.skeleton-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.skeleton-table-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--spacing-2);
|
||||
margin-bottom: var(--spacing-3);
|
||||
}
|
||||
|
||||
.skeleton-cell {
|
||||
height: 20px;
|
||||
background: var(--color-background-secondary);
|
||||
border-radius: var(--border-radius-base);
|
||||
}
|
||||
|
||||
.skeleton-list-item {
|
||||
display: flex;
|
||||
gap: var(--spacing-3);
|
||||
margin-bottom: var(--spacing-3);
|
||||
}
|
||||
|
||||
.skeleton-list-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-2);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, provide } from 'vue'
|
||||
import ToastNotification from './ToastNotification.vue'
|
||||
|
||||
interface Toast {
|
||||
id: string
|
||||
type: 'success' | 'error' | 'warning' | 'info'
|
||||
message: string
|
||||
duration?: number
|
||||
}
|
||||
|
||||
const toasts = ref<Toast[]>([])
|
||||
let toastId = 0
|
||||
|
||||
const addToast = (message: string, type: 'success' | 'error' | 'warning' | 'info' = 'info', duration = 4000) => {
|
||||
const id = `toast-${toastId++}`
|
||||
toasts.value.push({ id, type, message, duration })
|
||||
return id
|
||||
}
|
||||
|
||||
const removeToast = (id: string) => {
|
||||
toasts.value = toasts.value.filter(t => t.id !== id)
|
||||
}
|
||||
|
||||
// Provide toast API for child components
|
||||
provide('toast', {
|
||||
success: (msg: string, duration?: number) => addToast(msg, 'success', duration),
|
||||
error: (msg: string, duration?: number) => addToast(msg, 'error', duration),
|
||||
warning: (msg: string, duration?: number) => addToast(msg, 'warning', duration),
|
||||
info: (msg: string, duration?: number) => addToast(msg, 'info', duration),
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
addToast,
|
||||
removeToast,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toast-container">
|
||||
<transition-group name="toast-group" tag="div" class="toast-list">
|
||||
<ToastNotification
|
||||
v-for="toast in toasts"
|
||||
:key="toast.id"
|
||||
:id="toast.id"
|
||||
:type="toast.type"
|
||||
:message="toast.message"
|
||||
:duration="toast.duration"
|
||||
@close="removeToast"
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.toast-container {
|
||||
position: fixed;
|
||||
top: var(--spacing-4);
|
||||
right: var(--spacing-4);
|
||||
z-index: var(--z-index-tooltip);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.toast-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-3);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.toast-group-enter-active,
|
||||
.toast-group-leave-active {
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.toast-group-enter-from,
|
||||
.toast-group-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
.toast-group-move {
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.toast-container {
|
||||
left: var(--spacing-2);
|
||||
right: var(--spacing-2);
|
||||
top: auto;
|
||||
bottom: var(--spacing-4);
|
||||
}
|
||||
|
||||
.toast-list {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,176 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
type?: 'success' | 'error' | 'warning' | 'info'
|
||||
message: string
|
||||
duration?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
type: 'info',
|
||||
duration: 4000,
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
close: [id: string]
|
||||
}>()
|
||||
|
||||
const isClosing = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
if (props.duration > 0) {
|
||||
setTimeout(() => {
|
||||
close()
|
||||
}, props.duration)
|
||||
}
|
||||
})
|
||||
|
||||
const close = () => {
|
||||
isClosing.value = true
|
||||
setTimeout(() => {
|
||||
emit('close', props.id)
|
||||
}, 150) // Match animation duration
|
||||
}
|
||||
|
||||
const getIcon = (type: string) => {
|
||||
const icons: Record<string, string> = {
|
||||
success: '✓',
|
||||
error: '✕',
|
||||
warning: '!',
|
||||
info: 'ℹ',
|
||||
}
|
||||
return icons[type] || 'ℹ'
|
||||
}
|
||||
|
||||
const getColor = (type: string) => {
|
||||
const colors: Record<string, string> = {
|
||||
success: 'var(--color-success-500)',
|
||||
error: 'var(--color-danger-500)',
|
||||
warning: 'var(--color-warning-500)',
|
||||
info: 'var(--color-primary-500)',
|
||||
}
|
||||
return colors[type] || 'var(--color-primary-500)'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toast-notification" :class="[`toast-${type}`, { 'is-closing': isClosing }]">
|
||||
<div class="toast-icon" :style="{ backgroundColor: getColor(type) }">
|
||||
{{ getIcon(type) }}
|
||||
</div>
|
||||
<div class="toast-content">
|
||||
<p class="toast-message">{{ message }}</p>
|
||||
</div>
|
||||
<button class="toast-close" @click="close" aria-label="Close notification">
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.toast-notification {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-3);
|
||||
padding: var(--spacing-3);
|
||||
background: var(--color-background-primary);
|
||||
border: var(--border-width-1) solid var(--color-border-primary);
|
||||
border-radius: var(--border-radius-lg);
|
||||
box-shadow: var(--shadow-lg);
|
||||
animation: slideIn 150ms ease-out;
|
||||
min-width: 300px;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.toast-notification.is-closing {
|
||||
animation: slideOut 150ms ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes slideIn {
|
||||
from {
|
||||
transform: translateX(400px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideOut {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
transform: translateX(400px);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.toast-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--border-radius-base);
|
||||
color: white;
|
||||
font-weight: var(--font-weight-bold);
|
||||
font-size: var(--font-size-lg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toast-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-1);
|
||||
}
|
||||
|
||||
.toast-message {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-primary);
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
|
||||
.toast-close {
|
||||
padding: 0;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--color-text-tertiary);
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: var(--font-weight-light);
|
||||
transition: color var(--transition-fast);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toast-close:hover {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* Type-specific colors */
|
||||
.toast-success .toast-icon {
|
||||
background: var(--color-success-500);
|
||||
}
|
||||
|
||||
.toast-error .toast-icon {
|
||||
background: var(--color-danger-500);
|
||||
}
|
||||
|
||||
.toast-warning .toast-icon {
|
||||
background: var(--color-warning-500);
|
||||
}
|
||||
|
||||
.toast-info .toast-icon {
|
||||
background: var(--color-primary-500);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user