/** * Sample data for the Display and Layout stories: portrait placeholders * (inline SVG data URIs, so stories never depend on external images) and a * small employee directory. Not part of the public API. */ import type { Color } from '../lib/styles' /** A generated head-and-shoulders portrait on a two-tone gradient. */ export function portrait(from: string, to: string, skin = '#f1c7a6', hair = '#3b2a22'): string { const svg = ` ` return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}` } /** A wide landscape illustration for card media. */ export function landscape(sky: string, hills: string): string { const svg = ` ` return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}` } export const PORTRAITS = { jane: portrait('#c7d7fe', '#6d8fe8', '#f1c7a6', '#5b3a29'), john: portrait('#bbf7d0', '#34a47a', '#d9a47f', '#1f1a17'), maya: portrait('#fde68a', '#e59a3b', '#b98262', '#141012'), carlos: portrait('#fecaca', '#d9635f', '#c68e6b', '#2d211b'), aiko: portrait('#bae6fd', '#3b9fd6', '#f3d2b8', '#101418'), } export type Employee = { id: string name: string email: string avatar?: string department: 'Engineering' | 'Design' | 'Sales' | 'Operations' | 'Finance' status: 'Active' | 'On leave' | 'Onboarding' startDate: string salary: number } export const DEPARTMENT_COLORS: Record = { Engineering: 'primary', Design: 'info', Sales: 'success', Operations: 'warning', Finance: 'neutral', } export const STATUS_COLORS: Record = { Active: 'success', 'On leave': 'warning', Onboarding: 'info', } export const EMPLOYEES: Employee[] = [ { id: 'E-1001', name: 'Jane Doe', email: 'jane.doe@example.com', avatar: PORTRAITS.jane, department: 'Engineering', status: 'Active', startDate: '2021-03-15', salary: 128000 }, { id: 'E-1002', name: 'John Smith', email: 'john.smith@example.com', avatar: PORTRAITS.john, department: 'Sales', status: 'Active', startDate: '2019-11-04', salary: 94500 }, { id: 'E-1003', name: 'Maya Chen', email: 'maya.chen@example.com', avatar: PORTRAITS.maya, department: 'Design', status: 'On leave', startDate: '2022-06-20', salary: 112000 }, { id: 'E-1004', name: 'Carlos Mendez', email: 'carlos.mendez@example.com', department: 'Operations', status: 'Active', startDate: '2018-01-08', salary: 87250 }, { id: 'E-1005', name: 'Aiko Tanaka', email: 'aiko.tanaka@example.com', avatar: PORTRAITS.aiko, department: 'Engineering', status: 'Onboarding', startDate: '2026-09-01', salary: 136500 }, { id: 'E-1006', name: 'Samuel Okafor', email: 'samuel.okafor@example.com', department: 'Finance', status: 'Active', startDate: '2020-08-17', salary: 101800 }, { id: 'E-1007', name: 'Lena Fischer', email: 'lena.fischer@example.com', department: 'Design', status: 'Active', startDate: '2023-02-27', salary: 99000 }, { id: 'E-1008', name: 'Marcus Reed', email: 'marcus.reed@example.com', avatar: PORTRAITS.carlos, department: 'Sales', status: 'Active', startDate: '2024-04-10', salary: 82300 }, ] export const currency = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }) export const shortDate = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' })