@hgdc/ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -18
- package/dist/account-menu.d.ts +32 -0
- package/dist/account-menu.js +39 -0
- package/dist/alert.d.ts +19 -0
- package/dist/alert.js +25 -0
- package/dist/app-shell.d.ts +56 -0
- package/dist/app-shell.js +107 -0
- package/dist/badge.js +3 -3
- package/dist/button.js +6 -5
- package/dist/card.d.ts +24 -0
- package/dist/card.js +42 -0
- package/dist/checkbox.d.ts +12 -0
- package/dist/checkbox.js +19 -0
- package/dist/command-menu.d.ts +56 -0
- package/dist/command-menu.js +79 -0
- package/dist/copy-button.d.ts +26 -0
- package/dist/copy-button.js +46 -0
- package/dist/kbd.d.ts +9 -0
- package/dist/kbd.js +19 -0
- package/dist/org-switcher.d.ts +32 -0
- package/dist/org-switcher.js +32 -0
- package/dist/page-header.d.ts +27 -0
- package/dist/page-header.js +31 -0
- package/dist/popover.d.ts +13 -0
- package/dist/popover.js +22 -0
- package/dist/radio-group.d.ts +16 -0
- package/dist/radio-group.js +22 -0
- package/dist/relative-time.d.ts +16 -0
- package/dist/relative-time.js +54 -0
- package/dist/resource-list.d.ts +31 -0
- package/dist/resource-list.js +35 -0
- package/dist/secret-reveal.d.ts +13 -0
- package/dist/secret-reveal.js +26 -0
- package/dist/segmented-control.js +1 -3
- package/dist/skeleton.d.ts +28 -0
- package/dist/skeleton.js +47 -0
- package/dist/sonner.js +2 -2
- package/dist/spinner.d.ts +15 -4
- package/dist/spinner.js +7 -6
- package/dist/stat.d.ts +30 -0
- package/dist/stat.js +26 -0
- package/dist/status.d.ts +22 -0
- package/dist/status.js +37 -0
- package/dist/table.d.ts +50 -0
- package/dist/table.js +68 -0
- package/dist/tabs.d.ts +16 -0
- package/dist/tabs.js +26 -0
- package/dist/time-chart.d.ts +40 -0
- package/dist/time-chart.js +127 -0
- package/dist/timeline.d.ts +21 -0
- package/dist/timeline.js +11 -0
- package/dist/tooltip.d.ts +15 -0
- package/dist/tooltip.js +25 -0
- package/dist/uptime-bar.d.ts +24 -0
- package/dist/uptime-bar.js +25 -0
- package/package.json +1 -1
- package/styles.css +74 -25
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ServiceStatus } from "./status.tsx";
|
|
3
|
+
export type TimelineEntry = {
|
|
4
|
+
id: string;
|
|
5
|
+
/** « Identifié », « Correctif déployé », « Résolu ». */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Instant de l'étape, affiché en relatif avec la date exacte au survol. */
|
|
9
|
+
time: number | Date;
|
|
10
|
+
/** Couleur du point ; sans statut, un point neutre. */
|
|
11
|
+
status?: ServiceStatus;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Historique d'un incident, d'un envoi, d'un déploiement : une étape par ligne, reliées par un
|
|
15
|
+
* fil. Le produit les passe dans l'ordre voulu (le plus récent d'abord, d'habitude).
|
|
16
|
+
*/
|
|
17
|
+
export declare function Timeline({ entries, now, className, }: {
|
|
18
|
+
entries: Array<TimelineEntry>;
|
|
19
|
+
now?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): React.JSX.Element;
|
package/dist/timeline.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RelativeTime } from "./relative-time.js";
|
|
3
|
+
import { StatusDot } from "./status.js";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* Historique d'un incident, d'un envoi, d'un déploiement : une étape par ligne, reliées par un
|
|
7
|
+
* fil. Le produit les passe dans l'ordre voulu (le plus récent d'abord, d'habitude).
|
|
8
|
+
*/
|
|
9
|
+
export function Timeline({ entries, now, className, }) {
|
|
10
|
+
return (_jsx("ol", { "data-slot": "timeline", className: cn("grid", className), children: entries.map((entry, index) => (_jsxs("li", { className: "relative grid grid-cols-[1rem_minmax(0,1fr)] gap-x-3 pb-6 last:pb-0", children: [index < entries.length - 1 ? (_jsx("span", { "aria-hidden": true, className: "absolute top-5 bottom-0 left-[calc(0.5rem-0.5px)] w-px bg-foreground/10" })) : null, _jsx("span", { className: "flex h-5 items-center justify-center", children: entry.status ? (_jsx(StatusDot, { status: entry.status, className: "size-2.5" })) : (_jsx("span", { "aria-hidden": true, className: "size-2.5 rounded-full bg-foreground/20" })) }), _jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: entry.title }), _jsx("span", { className: "text-xs text-muted-foreground", children: _jsx(RelativeTime, { date: entry.time, ...(now !== undefined ? { now } : {}) }) })] }), entry.description ? _jsx("div", { className: "mt-1 text-sm text-muted-foreground", children: entry.description }) : null] })] }, entry.id))) }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
2
|
+
/**
|
|
3
|
+
* Infobulle : le nom d'un bouton-icône ou d'un raccourci, pour la souris et le clavier. Jamais
|
|
4
|
+
* une information indispensable : elle n'existe pas au doigt (Base UI la coupe sur écran
|
|
5
|
+
* tactile). Le déclencheur porte toujours un `aria-label` qui dit la même chose. Pour une
|
|
6
|
+
* explication à lire, c'est un `Popover`.
|
|
7
|
+
*
|
|
8
|
+
* Un `TooltipProvider` autour de l'application : passée la première, les infobulles voisines
|
|
9
|
+
* s'ouvrent aussitôt, sans animation.
|
|
10
|
+
*/
|
|
11
|
+
declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): React.JSX.Element;
|
|
12
|
+
declare const Tooltip: typeof TooltipPrimitive.Root;
|
|
13
|
+
declare const TooltipTrigger: typeof TooltipPrimitive.Trigger;
|
|
14
|
+
declare function TooltipContent({ className, side, sideOffset, align, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "side" | "sideOffset" | "align">): React.JSX.Element;
|
|
15
|
+
export { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent };
|
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
3
|
+
import { FLOATING_COLLISION_AVOIDANCE, FLOATING_COLLISION_PADDING, FLOATING_MAX_WIDTH } from "./floating.js";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* Infobulle : le nom d'un bouton-icône ou d'un raccourci, pour la souris et le clavier. Jamais
|
|
7
|
+
* une information indispensable : elle n'existe pas au doigt (Base UI la coupe sur écran
|
|
8
|
+
* tactile). Le déclencheur porte toujours un `aria-label` qui dit la même chose. Pour une
|
|
9
|
+
* explication à lire, c'est un `Popover`.
|
|
10
|
+
*
|
|
11
|
+
* Un `TooltipProvider` autour de l'application : passée la première, les infobulles voisines
|
|
12
|
+
* s'ouvrent aussitôt, sans animation.
|
|
13
|
+
*/
|
|
14
|
+
function TooltipProvider({ delay = 500, ...props }) {
|
|
15
|
+
return _jsx(TooltipPrimitive.Provider, { delay: delay, ...props });
|
|
16
|
+
}
|
|
17
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
18
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
19
|
+
function TooltipContent({ className, side = "top", sideOffset = 6, align = "center", children, ...props }) {
|
|
20
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { className: "isolate z-50", side: side, sideOffset: sideOffset, align: align, collisionPadding: FLOATING_COLLISION_PADDING, collisionAvoidance: FLOATING_COLLISION_AVOIDANCE, children: _jsx(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn(FLOATING_MAX_WIDTH,
|
|
21
|
+
// Encre inversée : une étiquette courte, lisible sur n'importe quel fond. Elle flotte,
|
|
22
|
+
// elle a donc une ombre, douce.
|
|
23
|
+
"w-fit max-w-xs origin-(--transform-origin) rounded-xl bg-foreground px-2.5 py-1.5 text-xs font-medium text-balance text-background shadow-lg shadow-black/10", "transition-[scale,opacity] duration-(--duration-fast) ease-out data-ending-style:scale-[0.97] data-ending-style:opacity-0 data-ending-style:duration-(--duration-instant) data-instant:transition-none data-starting-style:scale-[0.97] data-starting-style:opacity-0", "[&_kbd]:bg-background/15 [&_kbd]:text-background", className), ...props, children: children }) }) }));
|
|
24
|
+
}
|
|
25
|
+
export { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ServiceStatus } from "./status.tsx";
|
|
2
|
+
export type UptimeDay = {
|
|
3
|
+
/** Le jour, en millisecondes ou en `Date`. */
|
|
4
|
+
date: number | Date;
|
|
5
|
+
/** Le pire statut du jour. `unknown` : pas de mesure (service plus récent que la période). */
|
|
6
|
+
status: ServiceStatus;
|
|
7
|
+
/** Disponibilité du jour, déjà formatée : « 99,98 % ». */
|
|
8
|
+
uptime?: string;
|
|
9
|
+
/** Ce qui s'est passé : « Panne de 12 min, base de données ». */
|
|
10
|
+
note?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Une barre par jour, du plus ancien au plus récent, comme les pages de statut de référence.
|
|
14
|
+
* Chaque barre a sa couleur et, au survol, une infobulle en texte (jour, statut, disponibilité,
|
|
15
|
+
* note). Les lecteurs d'écran lisent la liste des jours, dont chacun dit son statut en mots.
|
|
16
|
+
*/
|
|
17
|
+
export declare function UptimeBar({ days, label, summary, className, }: {
|
|
18
|
+
days: Array<UptimeDay>;
|
|
19
|
+
/** Nom de la liste pour les lecteurs d'écran. */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** Au centre de la légende : « 99,95 % sur 90 jours ». */
|
|
22
|
+
summary?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SERVICE_STATUS_LABEL } from "./status.js";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
const BAR = {
|
|
6
|
+
operational: "bg-status-operational",
|
|
7
|
+
degraded: "bg-status-degraded",
|
|
8
|
+
outage: "bg-status-outage",
|
|
9
|
+
maintenance: "bg-status-maintenance",
|
|
10
|
+
unknown: "bg-foreground/10",
|
|
11
|
+
};
|
|
12
|
+
const day = new Intl.DateTimeFormat("fr-CH", { weekday: "short", day: "numeric", month: "short" });
|
|
13
|
+
function describe(entry) {
|
|
14
|
+
return [day.format(entry.date), SERVICE_STATUS_LABEL[entry.status], entry.uptime, entry.note]
|
|
15
|
+
.filter(Boolean)
|
|
16
|
+
.join(" · ");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Une barre par jour, du plus ancien au plus récent, comme les pages de statut de référence.
|
|
20
|
+
* Chaque barre a sa couleur et, au survol, une infobulle en texte (jour, statut, disponibilité,
|
|
21
|
+
* note). Les lecteurs d'écran lisent la liste des jours, dont chacun dit son statut en mots.
|
|
22
|
+
*/
|
|
23
|
+
export function UptimeBar({ days, label = "Disponibilité", summary, className, }) {
|
|
24
|
+
return (_jsxs("div", { "data-slot": "uptime-bar", className: cn("grid gap-2", className), children: [_jsx("ol", { "aria-label": label, className: "flex h-8 items-stretch gap-[2px]", children: days.map((entry) => (_jsx("li", { className: "flex min-w-0 flex-1", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx("span", {}), className: cn("block w-full rounded-[3px] transition-opacity duration-(--duration-fast) ease-out hover:opacity-70 data-popup-open:opacity-70", BAR[entry.status]), children: _jsx("span", { className: "sr-only", children: describe(entry) }) }), _jsx(TooltipContent, { children: describe(entry) })] }) }, new Date(entry.date).toISOString()))) }), _jsxs("div", { "aria-hidden": true, className: "flex items-center justify-between gap-2 text-xs text-muted-foreground tabular-nums", children: [_jsx("span", { children: days.length > 0 ? `il y a ${days.length} jours` : null }), summary ? _jsx("span", { className: "text-foreground", children: summary }) : null, _jsx("span", { children: "Aujourd'hui" })] })] }));
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hgdc/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Interface de la H family : jetons de la DA, thèmes, polices et composants.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/hugogebel-boop/hgdc-kit/tree/main/packages/ui#readme",
|
package/styles.css
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
@source "./dist";
|
|
19
19
|
|
|
20
20
|
@custom-variant dark (&:is(.dark *));
|
|
21
|
+
/* Barre latérale réduite en rail : `data-sidebar="rail"` sur <html>, posé avant la première
|
|
22
|
+
peinture par `sidebarInitScript` (`@hgdc/ui/app-shell`). */
|
|
23
|
+
@custom-variant rail (&:where([data-sidebar="rail"] *));
|
|
21
24
|
|
|
22
25
|
/* Courbes et durées. Pas d'ease-in : il démarre lentement à l'instant où l'œil regarde. */
|
|
23
26
|
@theme {
|
|
@@ -55,7 +58,6 @@
|
|
|
55
58
|
--color-border: var(--border);
|
|
56
59
|
--color-input: var(--input);
|
|
57
60
|
--color-ring: var(--ring);
|
|
58
|
-
--color-surface-hover: var(--surface-hover);
|
|
59
61
|
--color-shell: var(--shell);
|
|
60
62
|
--color-shell-foreground: var(--shell-foreground);
|
|
61
63
|
--color-shell-muted: var(--shell-muted-foreground);
|
|
@@ -66,7 +68,26 @@
|
|
|
66
68
|
--color-status-active: var(--status-active);
|
|
67
69
|
--color-status-paused: var(--status-paused);
|
|
68
70
|
--color-status-done: var(--status-done);
|
|
71
|
+
--color-status-active-ink: var(--status-active-ink);
|
|
72
|
+
--color-status-paused-ink: var(--status-paused-ink);
|
|
73
|
+
--color-info: var(--info);
|
|
74
|
+
--color-info-ink: var(--info-ink);
|
|
69
75
|
--color-chart-1: var(--chart-1);
|
|
76
|
+
--color-chart-2: var(--chart-2);
|
|
77
|
+
--color-chart-3: var(--chart-3);
|
|
78
|
+
--color-chart-4: var(--chart-4);
|
|
79
|
+
--color-chart-5: var(--chart-5);
|
|
80
|
+
--color-chart-6: var(--chart-6);
|
|
81
|
+
--color-status-operational: var(--status-operational);
|
|
82
|
+
--color-status-operational-ink: var(--status-operational-ink);
|
|
83
|
+
--color-status-degraded: var(--status-degraded);
|
|
84
|
+
--color-status-degraded-ink: var(--status-degraded-ink);
|
|
85
|
+
--color-status-outage: var(--status-outage);
|
|
86
|
+
--color-status-outage-ink: var(--status-outage-ink);
|
|
87
|
+
--color-status-maintenance: var(--status-maintenance);
|
|
88
|
+
--color-status-maintenance-ink: var(--status-maintenance-ink);
|
|
89
|
+
--color-status-unknown: var(--status-unknown);
|
|
90
|
+
--color-status-unknown-ink: var(--status-unknown-ink);
|
|
70
91
|
--color-inverse: var(--inverse);
|
|
71
92
|
--color-inverse-foreground: var(--inverse-foreground);
|
|
72
93
|
--color-inverse-muted: var(--inverse-muted);
|
|
@@ -87,36 +108,63 @@
|
|
|
87
108
|
--foreground: oklch(0.145 0 0);
|
|
88
109
|
--card: oklch(1 0 0);
|
|
89
110
|
--card-foreground: oklch(0.145 0 0);
|
|
90
|
-
|
|
91
|
-
--popover
|
|
111
|
+
/* Synonymes gardés pour les primitives shadcn : ils suivent leur jeton de rôle. */
|
|
112
|
+
--popover: var(--card);
|
|
113
|
+
--popover-foreground: var(--card-foreground);
|
|
92
114
|
/* Menus et sélecteurs (`floating.ts`) : fond opaque, un cran au-dessus de la carte en sombre. */
|
|
93
115
|
--floating: oklch(1 0 0);
|
|
94
116
|
--floating-muted: oklch(0.97 0 0);
|
|
95
117
|
--primary: oklch(0.205 0 0);
|
|
96
118
|
--primary-foreground: oklch(0.985 0 0);
|
|
97
|
-
--secondary:
|
|
119
|
+
--secondary: var(--muted);
|
|
98
120
|
--secondary-foreground: oklch(0.205 0 0);
|
|
99
121
|
--muted: oklch(0.97 0 0);
|
|
100
122
|
/* L=0.52 : 4,5:1 sur `muted`. */
|
|
101
123
|
--muted-foreground: oklch(0.52 0 0);
|
|
102
|
-
|
|
103
|
-
--accent
|
|
124
|
+
/* `--brand-accent*` : couleur d’un client posée par le produit, sans toucher au kit. */
|
|
125
|
+
--accent: var(--brand-accent, oklch(0.55 0.25 296));
|
|
126
|
+
--accent-foreground: var(--brand-accent-foreground, oklch(0.985 0 0));
|
|
104
127
|
--accent-soft: color-mix(in oklch, var(--accent) 10%, transparent);
|
|
105
128
|
--destructive: oklch(0.577 0.245 27.325);
|
|
106
129
|
--border: oklch(0.922 0 0);
|
|
107
130
|
--input: oklch(0.922 0 0);
|
|
108
131
|
--ring: var(--accent);
|
|
109
|
-
--surface-hover: oklch(0.945 0 0);
|
|
110
132
|
/* Coque de l'application : barre latérale et en-tête. */
|
|
111
133
|
--shell: oklch(0.955 0 0);
|
|
112
134
|
--shell-foreground: oklch(0.145 0 0);
|
|
113
135
|
--shell-muted-foreground: oklch(0.45 0 0);
|
|
114
136
|
--shell-hover: oklch(0 0 0 / 5%);
|
|
115
137
|
--shell-active: oklch(0 0 0 / 8%);
|
|
116
|
-
|
|
138
|
+
/* Séries de graphique, dans cet ordre, jamais recyclées : une 7e série se replie en « Autres ».
|
|
139
|
+
Validées (daltonisme, écart entre voisines) sur `surface` en clair et sur `card` en sombre.
|
|
140
|
+
En clair, 2 à 5 passent sous 3:1 : un graphique les accompagne d'une légende et de libellés. */
|
|
141
|
+
--chart-1: oklch(0.575 0.163 255.5);
|
|
142
|
+
--chart-2: oklch(0.671 0.175 40.6);
|
|
143
|
+
--chart-3: oklch(0.669 0.141 162.1);
|
|
144
|
+
--chart-4: oklch(0.764 0.161 75.1);
|
|
145
|
+
--chart-5: oklch(0.716 0.141 357.4);
|
|
146
|
+
--chart-6: oklch(0.527 0.197 283.4);
|
|
147
|
+
/* Disponibilité d'un service : toujours avec un libellé (`StatusBadge`), jamais la couleur seule.
|
|
148
|
+
Chaque jeton suit une couleur de la DA, donc les deux thèmes. */
|
|
149
|
+
--status-operational: var(--status-active);
|
|
150
|
+
--status-operational-ink: var(--status-active-ink);
|
|
151
|
+
--status-degraded: var(--status-paused);
|
|
152
|
+
--status-degraded-ink: var(--status-paused-ink);
|
|
153
|
+
--status-outage: var(--destructive);
|
|
154
|
+
--status-outage-ink: var(--destructive);
|
|
155
|
+
--status-maintenance: var(--info);
|
|
156
|
+
--status-maintenance-ink: var(--info-ink);
|
|
157
|
+
--status-unknown: var(--muted-foreground);
|
|
158
|
+
--status-unknown-ink: var(--muted-foreground);
|
|
117
159
|
--status-active: oklch(0.55 0.15 156);
|
|
118
160
|
--status-paused: oklch(0.62 0.14 75);
|
|
119
161
|
--status-done: oklch(0.52 0.2 293);
|
|
162
|
+
/* Encres : le texte d'un statut sur son lavis (4,5:1), la couleur vive restant aux pastilles. */
|
|
163
|
+
--status-active-ink: oklch(0.45 0.12 155);
|
|
164
|
+
--status-paused-ink: oklch(0.5 0.12 70);
|
|
165
|
+
/* Information : bleu, pour que le violet reste l'accent. */
|
|
166
|
+
--info: oklch(0.62 0.19 256);
|
|
167
|
+
--info-ink: oklch(0.48 0.17 256);
|
|
120
168
|
--success: oklch(0.58 0.15 152);
|
|
121
169
|
--success-foreground: oklch(0.985 0 0);
|
|
122
170
|
/* Panneau inversé de la vitrine : encre sombre dans les deux thèmes. */
|
|
@@ -133,31 +181,36 @@
|
|
|
133
181
|
--foreground: oklch(0.985 0 0);
|
|
134
182
|
--card: oklch(0.205 0 0);
|
|
135
183
|
--card-foreground: oklch(0.985 0 0);
|
|
136
|
-
--popover: oklch(0.205 0 0);
|
|
137
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
138
184
|
--floating: oklch(0.255 0 0);
|
|
139
185
|
--floating-muted: oklch(0.315 0 0);
|
|
140
186
|
--primary: oklch(0.922 0 0);
|
|
141
187
|
--primary-foreground: oklch(0.205 0 0);
|
|
142
|
-
--secondary: oklch(0.269 0 0);
|
|
143
188
|
--secondary-foreground: oklch(0.985 0 0);
|
|
144
189
|
--muted: oklch(0.269 0 0);
|
|
145
190
|
--muted-foreground: oklch(0.708 0 0);
|
|
146
|
-
--accent: oklch(0.74 0.19 296);
|
|
147
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
191
|
+
--accent: var(--brand-accent-dark, oklch(0.74 0.19 296));
|
|
192
|
+
--accent-foreground: var(--brand-accent-dark-foreground, oklch(0.205 0 0));
|
|
148
193
|
--destructive: oklch(0.704 0.191 22.216);
|
|
149
194
|
--border: oklch(1 0 0 / 10%);
|
|
150
195
|
--input: oklch(1 0 0 / 15%);
|
|
151
|
-
--surface-hover: oklch(0.25 0 0);
|
|
152
196
|
--shell: oklch(0.08 0 0);
|
|
153
197
|
--shell-foreground: oklch(0.985 0 0);
|
|
154
198
|
--shell-muted-foreground: oklch(0.708 0 0);
|
|
155
199
|
--shell-hover: oklch(1 0 0 / 6%);
|
|
156
200
|
--shell-active: oklch(1 0 0 / 12%);
|
|
157
|
-
--chart-1: oklch(0.
|
|
201
|
+
--chart-1: oklch(0.622 0.161 255.1);
|
|
202
|
+
--chart-2: oklch(0.622 0.173 40.1);
|
|
203
|
+
--chart-3: oklch(0.621 0.128 163.1);
|
|
204
|
+
--chart-4: oklch(0.67 0.143 73.2);
|
|
205
|
+
--chart-5: oklch(0.622 0.171 0.8);
|
|
206
|
+
--chart-6: oklch(0.67 0.145 286.8);
|
|
158
207
|
--status-active: oklch(0.74 0.14 156);
|
|
159
208
|
--status-paused: oklch(0.82 0.15 86);
|
|
160
209
|
--status-done: oklch(0.68 0.17 293);
|
|
210
|
+
--status-active-ink: var(--status-active);
|
|
211
|
+
--status-paused-ink: var(--status-paused);
|
|
212
|
+
--info: oklch(0.7 0.16 256);
|
|
213
|
+
--info-ink: var(--info);
|
|
161
214
|
--success: oklch(0.7 0.15 152);
|
|
162
215
|
--success-foreground: oklch(0.16 0.02 152);
|
|
163
216
|
--inverse: oklch(0.1 0 0);
|
|
@@ -209,15 +262,11 @@
|
|
|
209
262
|
|
|
210
263
|
/* ── Surfaces ──────────────────────────────────────────────────────────── */
|
|
211
264
|
|
|
212
|
-
/* Niveau 1 de la DA : une teinte, ni ombre ni bordure. `muted` en clair, `card` en sombre
|
|
213
|
-
|
|
214
|
-
la carte. En utilitaire pour qu'un `hover:` posé sur la carte garde la main. */
|
|
265
|
+
/* Niveau 1 de la DA : une teinte, ni ombre ni bordure. `muted` en clair, `card` en sombre
|
|
266
|
+
(un cran plus clair que la page). */
|
|
215
267
|
@utility surface {
|
|
216
268
|
background-color: var(--muted);
|
|
217
|
-
&
|
|
218
|
-
--muted: var(--background);
|
|
219
|
-
}
|
|
220
|
-
.dark & {
|
|
269
|
+
:where(.dark) & {
|
|
221
270
|
background-color: var(--card);
|
|
222
271
|
}
|
|
223
272
|
}
|
|
@@ -227,12 +276,12 @@
|
|
|
227
276
|
background-color: var(--muted);
|
|
228
277
|
transition: background-color var(--duration-fast) var(--ease-out);
|
|
229
278
|
&:hover {
|
|
230
|
-
background-color:
|
|
279
|
+
background-color: oklch(0.94 0 0);
|
|
231
280
|
}
|
|
232
|
-
.dark & {
|
|
281
|
+
:where(.dark) & {
|
|
233
282
|
background-color: var(--card);
|
|
234
283
|
}
|
|
235
|
-
.dark &:hover {
|
|
284
|
+
:where(.dark) &:hover {
|
|
236
285
|
background-color: var(--muted);
|
|
237
286
|
}
|
|
238
287
|
}
|