@@ -0,0 +1,72 @@
|
||||
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
||||
import { cn } from "../lib/cn.js";
|
||||
import { Spinner } from "./Spinner.js";
|
||||
import type { SpinnerSize } from "./Spinner.js";
|
||||
|
||||
const variantClasses = {
|
||||
primary: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
||||
secondary: "border border-border-strong bg-surface text-foreground hover:bg-surface-hover",
|
||||
ghost: "text-foreground hover:bg-surface-hover",
|
||||
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive-hover",
|
||||
} as const;
|
||||
|
||||
const sizeClasses = {
|
||||
sm: "h-8 gap-1.5 rounded-sm px-3 text-[0.6875rem]",
|
||||
md: "h-10 gap-2 rounded-md px-4 text-xs",
|
||||
lg: "h-12 gap-2.5 rounded-lg px-6 text-sm",
|
||||
} as const;
|
||||
|
||||
const spinnerBySize: Record<keyof typeof sizeClasses, SpinnerSize> = {
|
||||
sm: "xs",
|
||||
md: "sm",
|
||||
lg: "md",
|
||||
};
|
||||
|
||||
export type ButtonVariant = keyof typeof variantClasses;
|
||||
export type ButtonSize = keyof typeof sizeClasses;
|
||||
|
||||
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
variant?: ButtonVariant;
|
||||
size?: ButtonSize;
|
||||
isLoading?: boolean;
|
||||
showTextWhileLoading?: boolean;
|
||||
iconLeading?: ReactNode;
|
||||
iconTrailing?: ReactNode;
|
||||
fullWidth?: boolean;
|
||||
}
|
||||
|
||||
export const Button = ({
|
||||
variant = "primary",
|
||||
size = "md",
|
||||
isLoading = false,
|
||||
showTextWhileLoading = true,
|
||||
iconLeading,
|
||||
iconTrailing,
|
||||
fullWidth = false,
|
||||
disabled,
|
||||
type = "button",
|
||||
className,
|
||||
children,
|
||||
...props
|
||||
}: ButtonProps) => (
|
||||
<button
|
||||
type={type}
|
||||
disabled={disabled === true || isLoading}
|
||||
aria-busy={isLoading}
|
||||
className={cn(
|
||||
"inline-flex select-none items-center justify-center whitespace-nowrap font-display font-semibold uppercase tracking-label",
|
||||
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
||||
"transition-[background-color,border-color,color,box-shadow,opacity]",
|
||||
"disabled:pointer-events-none disabled:opacity-50",
|
||||
variantClasses[variant],
|
||||
sizeClasses[size],
|
||||
fullWidth && "w-full",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{isLoading ? <Spinner size={spinnerBySize[size]} /> : iconLeading}
|
||||
{isLoading && !showTextWhileLoading ? null : children}
|
||||
{isLoading ? null : iconTrailing}
|
||||
</button>
|
||||
);
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { HTMLAttributes } from "react";
|
||||
import { cn } from "../lib/cn.js";
|
||||
|
||||
export const Card = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (
|
||||
<div
|
||||
className={cn(
|
||||
"relative overflow-hidden rounded-lg border border-border bg-surface text-foreground shadow-sm",
|
||||
"transition-colors duration-base ease-out-soft",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
/* Signature du produit : un filet carmin d'un pixel en tete de carte. Invisible sur
|
||||
une grille dense, mais c'est lui qui donne aux cartes leur epaisseur et evite
|
||||
l'aspect de tuiles interchangeables. */
|
||||
export const CardHeader = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (
|
||||
<div
|
||||
className={cn(
|
||||
"relative flex flex-col gap-1.5 p-5",
|
||||
"before:absolute before:inset-x-0 before:top-0 before:h-px before:bg-accent-graphic",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
export const CardTitle = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
|
||||
<h3
|
||||
className={cn(
|
||||
"font-display text-sm font-semibold uppercase leading-tight tracking-label",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
export const CardDescription = ({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) => (
|
||||
<p className={cn("text-sm leading-relaxed text-muted-foreground", className)} {...props} />
|
||||
);
|
||||
|
||||
export const CardContent = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (
|
||||
<div className={cn("p-5 pt-0", className)} {...props} />
|
||||
);
|
||||
|
||||
export const CardFooter = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (
|
||||
<div className={cn("flex items-center gap-2 p-5 pt-0", className)} {...props} />
|
||||
);
|
||||
@@ -0,0 +1,72 @@
|
||||
import { useId } from "react";
|
||||
import type { InputHTMLAttributes, ReactNode } from "react";
|
||||
import { cn } from "../lib/cn.js";
|
||||
|
||||
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
||||
label?: ReactNode;
|
||||
hint?: ReactNode;
|
||||
error?: ReactNode;
|
||||
sizeVariant?: "sm" | "md" | "lg";
|
||||
}
|
||||
|
||||
const inputSize = {
|
||||
sm: "h-8 px-2.5 text-xs",
|
||||
md: "h-10 px-3 text-sm",
|
||||
lg: "h-12 px-4 text-base",
|
||||
} as const;
|
||||
|
||||
export const Input = ({
|
||||
label,
|
||||
hint,
|
||||
error,
|
||||
sizeVariant = "md",
|
||||
id,
|
||||
className,
|
||||
disabled,
|
||||
...props
|
||||
}: InputProps) => {
|
||||
const generatedId = useId();
|
||||
const inputId = id ?? generatedId;
|
||||
const messageId = `${inputId}-message`;
|
||||
const isInvalid = error !== undefined && error !== null && error !== "";
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-col gap-1.5">
|
||||
{label ? (
|
||||
<label
|
||||
htmlFor={inputId}
|
||||
className="font-display text-[0.6875rem] font-semibold uppercase tracking-label text-foreground"
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
) : null}
|
||||
|
||||
<input
|
||||
id={inputId}
|
||||
disabled={disabled}
|
||||
aria-invalid={isInvalid}
|
||||
aria-describedby={isInvalid || hint ? messageId : undefined}
|
||||
className={cn(
|
||||
"w-full rounded-sm border bg-surface text-foreground placeholder:text-subtle-foreground",
|
||||
"transition-[background-color,border-color,box-shadow] duration-fast ease-out-soft",
|
||||
"focus-visible:ring-ring focus-visible:border-border-strong focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-none",
|
||||
"disabled:cursor-not-allowed disabled:bg-surface-muted disabled:opacity-60",
|
||||
isInvalid ? "border-destructive focus-visible:ring-destructive" : "border-border-control",
|
||||
inputSize[sizeVariant],
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
{isInvalid || hint ? (
|
||||
<p
|
||||
id={messageId}
|
||||
role={isInvalid ? "alert" : undefined}
|
||||
className={cn("text-xs leading-relaxed", isInvalid ? "text-destructive" : "text-muted-foreground")}
|
||||
>
|
||||
{isInvalid ? error : hint}
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { HTMLAttributes } from "react";
|
||||
import { cn } from "../lib/cn.js";
|
||||
|
||||
export type SkeletonProps = HTMLAttributes<HTMLDivElement> & {
|
||||
width?: string;
|
||||
height?: string;
|
||||
radius?: "sm" | "md" | "lg" | "xl" | "full";
|
||||
};
|
||||
|
||||
const skeletonRadius = {
|
||||
sm: "rounded-sm",
|
||||
md: "rounded-md",
|
||||
lg: "rounded-lg",
|
||||
xl: "rounded-xl",
|
||||
full: "rounded-full",
|
||||
} as const;
|
||||
|
||||
export const Skeleton = ({
|
||||
width,
|
||||
height,
|
||||
radius = "md",
|
||||
className,
|
||||
style,
|
||||
...props
|
||||
}: SkeletonProps) => (
|
||||
<div
|
||||
aria-hidden="true"
|
||||
style={{ width, height, ...style }}
|
||||
className={cn("animate-pulse bg-skeleton-base motion-reduce:animate-none", skeletonRadius[radius], className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { SVGProps } from "react";
|
||||
import { cn } from "../lib/cn.js";
|
||||
|
||||
const spinnerSize = {
|
||||
xs: "size-3",
|
||||
sm: "size-3.5",
|
||||
md: "size-4",
|
||||
lg: "size-4.5",
|
||||
} as const;
|
||||
|
||||
export type SpinnerSize = keyof typeof spinnerSize;
|
||||
|
||||
export interface SpinnerProps extends Omit<SVGProps<SVGSVGElement>, "children"> {
|
||||
size?: SpinnerSize;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export const Spinner = ({ size = "md", label, className, ...props }: SpinnerProps) => (
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
role={label ? "status" : undefined}
|
||||
aria-label={label}
|
||||
aria-hidden={label ? undefined : true}
|
||||
className={cn("shrink-0 animate-spin motion-reduce:animate-none", spinnerSize[size], className)}
|
||||
{...props}
|
||||
>
|
||||
<circle cx="12" cy="12" r="9" stroke="currentColor" strokeWidth="2.5" opacity="0.25" />
|
||||
<path
|
||||
d="M21 12a9 9 0 0 0-9-9"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2.5"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
export { cn } from "./lib/cn.js";
|
||||
export type { SpinnerProps, SpinnerSize } from "./components/Spinner.js";
|
||||
export { Spinner } from "./components/Spinner.js";
|
||||
export type { ButtonProps, ButtonSize, ButtonVariant } from "./components/Button.js";
|
||||
export { Button } from "./components/Button.js";
|
||||
export type { SkeletonProps } from "./components/Skeleton.js";
|
||||
export { Skeleton } from "./components/Skeleton.js";
|
||||
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/Card.js";
|
||||
export type { InputProps } from "./components/Input.js";
|
||||
export { Input } from "./components/Input.js";
|
||||
@@ -0,0 +1,5 @@
|
||||
import { clsx } from "clsx";
|
||||
import type { ClassValue } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
export const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Poppins n'existe qu'en graisses statiques chez Google Fonts, deux fichiers sont donc
|
||||
necessaires. Elle couvre 300 Ko de plus que Cinzel et Orbitron reunis, d'ou l'arbitrage
|
||||
suivant : Poppins porte le texte courant, Cinzel et Orbitron restent deux faces de
|
||||
caractere Reserves aux chaines courtes.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: "Poppins";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../../fonts/poppins-400.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
|
||||
U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Poppins";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("../../fonts/poppins-600.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
|
||||
U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 400 700;
|
||||
font-display: swap;
|
||||
src: url("../../fonts/jetbrains-mono-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
|
||||
U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Orbitron";
|
||||
font-style: normal;
|
||||
font-weight: 400 900;
|
||||
font-display: swap;
|
||||
src: url("../../fonts/orbitron-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
|
||||
U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Cinzel";
|
||||
font-style: normal;
|
||||
font-weight: 400 900;
|
||||
font-display: swap;
|
||||
src: url("../../fonts/cinzel-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
|
||||
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
|
||||
U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@import "./fonts.css";
|
||||
@import "./tokens.css";
|
||||
@import "./theme.css";
|
||||
@@ -0,0 +1,105 @@
|
||||
@theme inline {
|
||||
--color-background: var(--cohaise-background);
|
||||
--color-foreground: var(--cohaise-foreground);
|
||||
|
||||
--color-surface: var(--cohaise-surface);
|
||||
--color-surface-raised: var(--cohaise-surface-raised);
|
||||
--color-surface-sunken: var(--cohaise-surface-sunken);
|
||||
--color-surface-muted: var(--cohaise-surface-muted);
|
||||
--color-surface-hover: var(--cohaise-surface-hover);
|
||||
--color-surface-overlay: var(--cohaise-surface-overlay);
|
||||
|
||||
--color-muted-foreground: var(--cohaise-muted-foreground);
|
||||
--color-subtle-foreground: var(--cohaise-subtle-foreground);
|
||||
|
||||
--color-border: var(--cohaise-border);
|
||||
--color-border-strong: var(--cohaise-border-strong);
|
||||
--color-border-control: var(--cohaise-border-control);
|
||||
|
||||
--color-primary: var(--cohaise-primary);
|
||||
--color-primary-foreground: var(--cohaise-primary-foreground);
|
||||
--color-primary-hover: var(--cohaise-primary-hover);
|
||||
|
||||
--color-accent: var(--cohaise-accent);
|
||||
--color-accent-foreground: var(--cohaise-accent-foreground);
|
||||
--color-accent-hover: var(--cohaise-accent-hover);
|
||||
--color-accent-graphic: var(--cohaise-accent-graphic);
|
||||
|
||||
--color-ring: var(--cohaise-ring);
|
||||
|
||||
--color-destructive: var(--cohaise-destructive);
|
||||
--color-destructive-foreground: var(--cohaise-destructive-foreground);
|
||||
--color-destructive-hover: var(--cohaise-destructive-hover);
|
||||
|
||||
--color-success: var(--cohaise-success);
|
||||
--color-success-foreground: var(--cohaise-success-foreground);
|
||||
--color-warning: var(--cohaise-warning);
|
||||
--color-warning-foreground: var(--cohaise-warning-foreground);
|
||||
--color-info: var(--cohaise-info);
|
||||
--color-info-foreground: var(--cohaise-info-foreground);
|
||||
|
||||
--color-skeleton-base: var(--cohaise-skeleton-base);
|
||||
--color-skeleton-highlight: var(--cohaise-skeleton-highlight);
|
||||
|
||||
--shadow-sm: var(--cohaise-shadow-sm);
|
||||
--shadow-md: var(--cohaise-shadow-md);
|
||||
--shadow-lg: var(--cohaise-shadow-lg);
|
||||
--shadow-crimson: var(--cohaise-shadow-crimson, 0 0 0 0 transparent);
|
||||
|
||||
--font-display: var(--cohaise-font-display);
|
||||
--font-logo: var(--cohaise-font-logo);
|
||||
--font-sans: var(--cohaise-font-sans);
|
||||
--font-serif: var(--cohaise-font-serif);
|
||||
--font-mono: var(--cohaise-font-mono);
|
||||
|
||||
--tracking-display: var(--cohaise-tracking-display);
|
||||
--tracking-logo: var(--cohaise-tracking-logo);
|
||||
--tracking-label: var(--cohaise-tracking-label);
|
||||
--tracking-body: var(--cohaise-tracking-body);
|
||||
|
||||
--radius-sm: var(--cohaise-radius-sm);
|
||||
--radius-md: var(--cohaise-radius-md);
|
||||
--radius-lg: var(--cohaise-radius-lg);
|
||||
--radius-xl: var(--cohaise-radius-xl);
|
||||
--radius-full: var(--cohaise-radius-full);
|
||||
|
||||
--ease-out-soft: var(--cohaise-ease-out-soft);
|
||||
--ease-in-out-soft: var(--cohaise-ease-in-out-soft);
|
||||
|
||||
--default-transition-duration: var(--cohaise-duration-base);
|
||||
--default-transition-timing-function: var(--cohaise-ease-out-soft);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
html,
|
||||
body {
|
||||
background-color: var(--cohaise-background);
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--cohaise-foreground);
|
||||
font-family: var(--cohaise-font-sans);
|
||||
letter-spacing: var(--cohaise-tracking-body);
|
||||
}
|
||||
|
||||
/* Orbitron sur les titres seulement, jusqu'a h3. Au-dela la chasse est trop large
|
||||
pour la taille du texte et le titre devient illisible. */
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: var(--cohaise-font-display);
|
||||
letter-spacing: var(--cohaise-tracking-display);
|
||||
}
|
||||
}
|
||||
|
||||
@utility duration-fast {
|
||||
transition-duration: var(--cohaise-duration-fast);
|
||||
}
|
||||
|
||||
@utility duration-base {
|
||||
transition-duration: var(--cohaise-duration-base);
|
||||
}
|
||||
|
||||
@utility duration-slow {
|
||||
transition-duration: var(--cohaise-duration-slow);
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
:root {
|
||||
color-scheme: light;
|
||||
|
||||
--cohaise-gray-50: #f7f5f4;
|
||||
--cohaise-gray-100: #f0eeee;
|
||||
--cohaise-gray-200: #e4e0e0;
|
||||
--cohaise-gray-300: #d6d1d1;
|
||||
--cohaise-gray-400: #a8a0a0;
|
||||
--cohaise-gray-500: #7a7373;
|
||||
--cohaise-gray-600: #5c5656;
|
||||
--cohaise-gray-700: #423d3d;
|
||||
--cohaise-gray-800: #2a2626;
|
||||
--cohaise-gray-900: #1a1616;
|
||||
--cohaise-gray-950: #0d0909;
|
||||
|
||||
/* Echelle organisee autour de #b71c1c, la valeur reelle de --clr-accent du site.
|
||||
Les tons plus sombres servent au survol en mode clair, les plus clairs au
|
||||
survol et au focus en mode sombre. */
|
||||
--cohaise-crimson-950: #3d070e;
|
||||
--cohaise-crimson-900: #5e0a14;
|
||||
--cohaise-crimson-800: #8f1116;
|
||||
--cohaise-crimson-700: #b71c1c;
|
||||
--cohaise-crimson-600: #c92a2a;
|
||||
--cohaise-crimson-500: #d32f2f;
|
||||
|
||||
--cohaise-yellow-500: oklch(0.828 0.189 84);
|
||||
|
||||
--cohaise-background: var(--cohaise-gray-50);
|
||||
--cohaise-foreground: #1a1a1a;
|
||||
|
||||
--cohaise-surface: #ffffff;
|
||||
--cohaise-surface-raised: #ffffff;
|
||||
--cohaise-surface-sunken: #f0eeee;
|
||||
--cohaise-surface-muted: #f4f2f2;
|
||||
--cohaise-surface-hover: #ece8e8;
|
||||
--cohaise-surface-overlay: #ffffff;
|
||||
|
||||
--cohaise-muted-foreground: #5c5656;
|
||||
--cohaise-subtle-foreground: #7a7373;
|
||||
|
||||
/* Les separateurs sont des filets carmin tres desatures, pas du gris. C'est ce
|
||||
qui donne au produit son teinte plutot que celle d'une carte bancaire. */
|
||||
--cohaise-border: #e8dcdc;
|
||||
--cohaise-border-strong: #d4bfbf;
|
||||
--cohaise-border-control: #8f8181;
|
||||
|
||||
--cohaise-primary: var(--cohaise-crimson-700);
|
||||
--cohaise-primary-foreground: #ffffff;
|
||||
--cohaise-primary-hover: var(--cohaise-crimson-800);
|
||||
|
||||
--cohaise-accent: var(--cohaise-crimson-700);
|
||||
--cohaise-accent-foreground: #ffffff;
|
||||
--cohaise-accent-hover: var(--cohaise-crimson-800);
|
||||
|
||||
/* Ton dedie aux petits elements qui sont poses SUR une surface, donc lus
|
||||
comme element d'interface et non comme aplat de marque : filet de carte,
|
||||
carre de liste, anneau de focus. Le rouge de marque n'y atteint que
|
||||
2.65:1 sur la surface sombre. */
|
||||
--cohaise-accent-graphic: var(--cohaise-crimson-700);
|
||||
|
||||
--cohaise-ring: var(--cohaise-crimson-700);
|
||||
|
||||
--cohaise-destructive: #d32f2f;
|
||||
--cohaise-destructive-foreground: #ffffff;
|
||||
--cohaise-destructive-hover: #a31818;
|
||||
|
||||
--cohaise-success: oklch(0.52 0.128 155);
|
||||
--cohaise-success-foreground: #ffffff;
|
||||
|
||||
--cohaise-warning: var(--cohaise-yellow-500);
|
||||
--cohaise-warning-foreground: #1a0505;
|
||||
|
||||
--cohaise-info: #0f6d78;
|
||||
--cohaise-info-foreground: #ffffff;
|
||||
|
||||
--cohaise-skeleton-base: #e4e0e0;
|
||||
--cohaise-skeleton-highlight: #f7f5f4;
|
||||
|
||||
--cohaise-shadow-sm: 0 1px 2px 0 oklch(0.1 0.02 20 / 0.06);
|
||||
--cohaise-shadow-md: 0 4px 12px -2px oklch(0.1 0.02 20 / 0.1);
|
||||
--cohaise-shadow-lg: 0 12px 32px -8px oklch(0.1 0.02 20 / 0.16);
|
||||
|
||||
/* Orbitron porte les chaines courtes, la marque et les titres. Poppins porte le
|
||||
texte courant : Orbitron est trop large pour etre lu en flux. Cinzel reste
|
||||
disponible pour une accroche courte ou Editorial, jamais pour un paragraphe. */
|
||||
--cohaise-font-display: "Orbitron", "Cinzel", sans-serif;
|
||||
--cohaise-font-logo: "Orbitron", "Cinzel", sans-serif;
|
||||
--cohaise-font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
|
||||
sans-serif;
|
||||
--cohaise-font-serif: "Cinzel", "Times New Roman", serif;
|
||||
/* Auto-hebergee comme les trois autres. En repli systeme, la meme taille de
|
||||
chiffres se rendait differemment sur le P330, le portable et le telephone. */
|
||||
--cohaise-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Menlo",
|
||||
"Consolas", monospace;
|
||||
|
||||
/* Orbitron a des chassees tres larges : sans correction, un titre de 32 px
|
||||
parait avoir ete espace a la main et un mot-symlose des caracteres. */
|
||||
--cohaise-tracking-display: -0.015em;
|
||||
--cohaise-tracking-logo: 0.16em;
|
||||
--cohaise-tracking-label: 0.09em;
|
||||
--cohaise-tracking-body: 0;
|
||||
|
||||
/* Deux echelles et non une seule. Un conteneur qui enveloppe du contenu
|
||||
merite d'etre plus doux qu'un bouton qu'on presse : c'est ce decalage qui
|
||||
donne la hierarchie, la ou un rayon unique uniforme rend tout interchangeable. */
|
||||
--cohaise-radius-sm: 0.375rem;
|
||||
--cohaise-radius-md: 0.5rem;
|
||||
--cohaise-radius-lg: 0.75rem;
|
||||
--cohaise-radius-xl: 1rem;
|
||||
--cohaise-radius-full: 9999px;
|
||||
|
||||
--cohaise-ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
|
||||
--cohaise-ease-in-out-soft: cubic-bezier(0.65, 0, 0.35, 1);
|
||||
--cohaise-duration-fast: 150ms;
|
||||
--cohaise-duration-base: 250ms;
|
||||
--cohaise-duration-slow: 400ms;
|
||||
}
|
||||
|
||||
.dark {
|
||||
color-scheme: dark;
|
||||
|
||||
--cohaise-background: #050000;
|
||||
--cohaise-foreground: #f4f4f2;
|
||||
|
||||
/* Surfaces neutres comme sur le site, le fond porte seul la dominante rouge. */
|
||||
--cohaise-surface: #1a1a1a;
|
||||
--cohaise-surface-raised: #242424;
|
||||
--cohaise-surface-sunken: #0a0a0a;
|
||||
--cohaise-surface-muted: #1f1f1f;
|
||||
--cohaise-surface-hover: #2a2a2a;
|
||||
--cohaise-surface-overlay: #242424;
|
||||
|
||||
--cohaise-muted-foreground: #a8a0a0;
|
||||
--cohaise-subtle-foreground: #7a7373;
|
||||
|
||||
--cohaise-border: #2e1c1c;
|
||||
--cohaise-border-strong: #46262a;
|
||||
--cohaise-border-control: #a85a62;
|
||||
|
||||
/* #b71c1c reste lisible dans les deux modes : texte blanc a 6.57:1, et
|
||||
3.18:1 sur le fond, au-dessus du seuil de 3:1 pour un element d'interface. */
|
||||
--cohaise-primary: var(--cohaise-crimson-700);
|
||||
--cohaise-primary-foreground: #ffffff;
|
||||
--cohaise-primary-hover: var(--cohaise-crimson-600);
|
||||
|
||||
--cohaise-accent: var(--cohaise-crimson-700);
|
||||
--cohaise-accent-foreground: #ffffff;
|
||||
--cohaise-accent-hover: var(--cohaise-crimson-600);
|
||||
|
||||
--cohaise-accent-graphic: var(--cohaise-crimson-600);
|
||||
|
||||
--cohaise-ring: var(--cohaise-crimson-600);
|
||||
|
||||
--cohaise-destructive: #ef4444;
|
||||
--cohaise-destructive-foreground: #1a0505;
|
||||
--cohaise-destructive-hover: #f87171;
|
||||
|
||||
--cohaise-success: oklch(0.792 0.152 155);
|
||||
--cohaise-success-foreground: #050000;
|
||||
|
||||
--cohaise-warning: var(--cohaise-yellow-500);
|
||||
--cohaise-warning-foreground: #1a0505;
|
||||
|
||||
--cohaise-info: oklch(0.752 0.112 194);
|
||||
--cohaise-info-foreground: #050000;
|
||||
|
||||
--cohaise-skeleton-base: #2a1a1a;
|
||||
--cohaise-skeleton-highlight: #3a2222;
|
||||
|
||||
--cohaise-shadow-sm: 0 1px 2px 0 oklch(0 0 0 / 0.4);
|
||||
--cohaise-shadow-md: 0 4px 12px -2px oklch(0 0 0 / 0.5);
|
||||
--cohaise-shadow-lg: 0 12px 32px -8px oklch(0 0 0 / 0.6);
|
||||
|
||||
--cohaise-shadow-crimson: 0 0 0 1px oklch(0.55 0.22 15 / 0.28),
|
||||
0 8px 30px -12px oklch(0.55 0.22 15 / 0.55);
|
||||
}
|
||||
Reference in New Issue
Block a user