@djangocfg/ui-core 2.1.500 → 2.1.501
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.501",
|
|
4
4
|
"description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-components",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"check:contrast": "node scripts/check-preset-contrast.mjs"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
|
-
"@djangocfg/i18n": "^2.1.
|
|
131
|
+
"@djangocfg/i18n": "^2.1.501",
|
|
132
132
|
"consola": "^3.4.2",
|
|
133
133
|
"lucide-react": "^0.545.0",
|
|
134
134
|
"moment": "^2.30.1",
|
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"@chenglou/pretext": "^0.0.8"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
|
-
"@djangocfg/i18n": "^2.1.
|
|
210
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
209
|
+
"@djangocfg/i18n": "^2.1.501",
|
|
210
|
+
"@djangocfg/typescript-config": "^2.1.501",
|
|
211
211
|
"@types/node": "^24.13.3",
|
|
212
212
|
"@types/react": "19.2.15",
|
|
213
213
|
"@types/react-dom": "19.2.3",
|
|
@@ -27,7 +27,7 @@ const AvatarImage = React.forwardRef<
|
|
|
27
27
|
>(({ className, ...props }, ref) => (
|
|
28
28
|
<AvatarPrimitive.Image
|
|
29
29
|
ref={ref}
|
|
30
|
-
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
+
className={cn("aspect-square h-full w-full object-cover", className)}
|
|
31
31
|
{...props}
|
|
32
32
|
/>
|
|
33
33
|
))
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
:root {
|
|
3
3
|
--primary: hsl(192 90% 35%);
|
|
4
4
|
--primary-foreground: hsl(0 0% 100%);
|
|
5
|
-
--
|
|
5
|
+
/* 92%, not 94%: the base --background warmed to 97%, so 94% was a 3-point step
|
|
6
|
+
(the gate wants ≥4). Deepened to keep the tinted hover visible on the page. */
|
|
7
|
+
--accent: hsl(192 60% 92%);
|
|
6
8
|
--accent-foreground: hsl(192 90% 22%);
|
|
7
9
|
--ring: hsl(192 90% 40%);
|
|
8
10
|
--sidebar-primary: hsl(192 90% 35%);
|
|
9
11
|
--sidebar-primary-foreground: hsl(0 0% 100%);
|
|
10
|
-
--sidebar-
|
|
12
|
+
/* 91%, not 93%: base --sidebar-background is 96%; keep a ≥4-point step. */
|
|
13
|
+
--sidebar-accent: hsl(192 55% 91%);
|
|
11
14
|
--sidebar-accent-foreground: hsl(192 90% 22%);
|
|
12
15
|
--sidebar-ring: hsl(192 90% 40%);
|
|
13
16
|
--info: hsl(192 90% 35%);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dark Theme Colors
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Brand: Claude "clay" #d97757 → `hsl(15 63% 60%)`. The full-brightness swatch is used on dark chrome
|
|
5
|
+
* (it's bright enough there), while light mode carries a deeper clay for white-on-fill contrast.
|
|
5
6
|
*
|
|
6
7
|
* Semantic pairs (do not split ad hoc in components):
|
|
7
|
-
* - --primary / --primary-foreground — filled CTAs. On dark UI the
|
|
8
|
-
*
|
|
8
|
+
* - --primary / --primary-foreground — filled CTAs. On dark UI the clay swatch is bright enough that
|
|
9
|
+
* **dark ink** (same as light :root --foreground) reads better than white (clay-on-dark-ink 5.8:1).
|
|
9
10
|
* - --secondary / --secondary-foreground — neutral filled controls on dark chrome (elevated gray +
|
|
10
11
|
* light text), not a light-theme secondary pasted onto .dark.
|
|
11
12
|
*
|
|
@@ -24,9 +25,9 @@
|
|
|
24
25
|
--card-foreground: hsl(48 33% 97%);
|
|
25
26
|
--popover: hsl(48 2.5% 21%);
|
|
26
27
|
--popover-foreground: hsl(48 33% 97%);
|
|
27
|
-
/*
|
|
28
|
-
--primary: hsl(
|
|
29
|
-
/* Dark label on
|
|
28
|
+
/* Brand clay #d97757 (Claude). Bright enough on dark chrome to carry the full swatch. */
|
|
29
|
+
--primary: hsl(15 63% 60%);
|
|
30
|
+
/* Dark label on clay — 5.8:1, stronger than white-on-clay (3.1:1) */
|
|
30
31
|
--primary-foreground: hsl(0 0% 9%);
|
|
31
32
|
/* Secondary: elevated warm-gray control surface + light label */
|
|
32
33
|
--secondary: hsl(60 2.1% 18.4%);
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
* subtle separation, not a hard black slab. */
|
|
74
75
|
--sidebar-background: hsl(30 3% 11.8%);
|
|
75
76
|
--sidebar-foreground: hsl(48 33% 97%);
|
|
76
|
-
--sidebar-primary: hsl(
|
|
77
|
+
--sidebar-primary: hsl(15 63% 60%);
|
|
77
78
|
--sidebar-primary-foreground: hsl(0 0% 9%);
|
|
78
79
|
--sidebar-accent: hsl(48 3% 24%);
|
|
79
80
|
--sidebar-accent-foreground: hsl(48 33% 97%);
|
|
@@ -126,7 +127,7 @@
|
|
|
126
127
|
/* Chart colors — chart-1 aligned with brand.
|
|
127
128
|
* Fully-wrapped hsl() like every other token (consume via `bg-chart-N` or
|
|
128
129
|
* `var(--chart-N)`, never `hsl(var(--chart-N))`). */
|
|
129
|
-
--chart-1: hsl(
|
|
130
|
+
--chart-1: hsl(15 63% 60%);
|
|
130
131
|
--chart-2: hsl(142 76% 36%);
|
|
131
132
|
--chart-3: hsl(262 83% 58%);
|
|
132
133
|
--chart-4: hsl(26 90% 57%);
|
|
@@ -1,47 +1,53 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Light Theme Colors
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* swatch via `.dark`.
|
|
4
|
+
* Brand: Claude "clay" #d97757 (hsl 14.77 63% 60%). On **white** the 60% swatch with a white label
|
|
5
|
+
* fails contrast, so `:root` `--primary` uses a deeper clay (`hsl 15 55% 45%`, white-on-fill 5.0:1 AA)
|
|
6
|
+
* for buttons, links, and `text-primary`. The full-brightness clay is reserved for brand marks / dark
|
|
7
|
+
* UI; the dark theme carries the brighter swatch via `.dark`.
|
|
8
|
+
*
|
|
9
|
+
* Neutrals follow Claude's current theme: a faintly WARM off-white canvas (hue ~60, not pure gray) so
|
|
10
|
+
* cards and chips read against the page the way they do on claude.ai.
|
|
8
11
|
*
|
|
9
12
|
* Pairs `--primary` / `--primary-foreground` are tuned together. Prefer editing tokens over ad hoc classes.
|
|
10
13
|
*/
|
|
11
14
|
|
|
12
15
|
:root {
|
|
13
|
-
/* Base colors
|
|
14
|
-
* raised card. Keep `muted` below `background` in light mode
|
|
15
|
-
* message bubbles, and secondary controls never dissolve into the
|
|
16
|
-
|
|
17
|
-
--
|
|
16
|
+
/* Base colors — a warm off-white canvas (Claude bg-100) with darker neutral
|
|
17
|
+
* fills and a white raised card. Keep `muted` below `background` in light mode
|
|
18
|
+
* so chips, message bubbles, and secondary controls never dissolve into the
|
|
19
|
+
* page. */
|
|
20
|
+
--background: hsl(60 14% 97%);
|
|
21
|
+
--foreground: hsl(0 0% 7.5%);
|
|
18
22
|
--card: hsl(0 0% 100%);
|
|
19
|
-
--card-foreground: hsl(0 0%
|
|
23
|
+
--card-foreground: hsl(0 0% 7.5%);
|
|
20
24
|
--popover: hsl(0 0% 100%);
|
|
21
|
-
--popover-foreground: hsl(0 0%
|
|
22
|
-
/* Interactive primary on white (~#
|
|
23
|
-
--primary: hsl(
|
|
25
|
+
--popover-foreground: hsl(0 0% 7.5%);
|
|
26
|
+
/* Interactive primary on white — deep clay (~#b6543a): readable white-on-fill (5.0:1) + calmer than the brand swatch */
|
|
27
|
+
--primary: hsl(15 55% 45%);
|
|
24
28
|
--primary-foreground: hsl(0 0% 100%);
|
|
25
|
-
--secondary: hsl(0 0%
|
|
26
|
-
--secondary-foreground: hsl(
|
|
27
|
-
--muted: hsl(
|
|
28
|
-
--muted-foreground: hsl(
|
|
29
|
+
--secondary: hsl(0 0% 7.5%);
|
|
30
|
+
--secondary-foreground: hsl(60 14% 97%);
|
|
31
|
+
--muted: hsl(52 12% 93%);
|
|
32
|
+
--muted-foreground: hsl(48 3% 46%);
|
|
29
33
|
/* Neutral interaction surface: a quiet step below the current light canvas.
|
|
30
34
|
* It deliberately keys off --background, not white --card, so hover remains
|
|
31
35
|
* visible on translucent menus and on plain pages alike. */
|
|
32
36
|
--surface-hover: color-mix(in oklab, var(--background) 96%, var(--foreground));
|
|
33
|
-
/* Neutral hover/active surface — quiet gray lift
|
|
34
|
-
* (
|
|
35
|
-
--accent: hsl(
|
|
36
|
-
--accent-foreground: hsl(0 0%
|
|
37
|
-
|
|
37
|
+
/* Neutral hover/active surface — quiet warm-gray lift (Claude bg-200), a
|
|
38
|
+
* clear step (≥4L) below the 97% canvas. */
|
|
39
|
+
--accent: hsl(60 11% 92%);
|
|
40
|
+
--accent-foreground: hsl(0 0% 7.5%);
|
|
41
|
+
/* Destructive — Claude danger-100 hsl(0 61% 52%). Slightly deeper for a solid
|
|
42
|
+
* white-on-fill AA pass. */
|
|
43
|
+
--destructive: hsl(0 61% 50%);
|
|
38
44
|
--destructive-foreground: hsl(0 0% 98%);
|
|
39
|
-
--border: hsl(
|
|
40
|
-
/* Input surface — faint
|
|
41
|
-
--input: hsl(
|
|
45
|
+
--border: hsl(50 10% 86%);
|
|
46
|
+
/* Input surface — faint warm fill so fields are visible on white cards. */
|
|
47
|
+
--input: hsl(60 14% 97%);
|
|
42
48
|
/* Divider — hairline between rows; slightly darker than --border so it reads
|
|
43
49
|
* on white cards. */
|
|
44
|
-
--divider: hsl(
|
|
50
|
+
--divider: hsl(50 9% 87%);
|
|
45
51
|
/* Overlay — modal scrim / backdrop behind dialogs, drawers, sheets. A scrim
|
|
46
52
|
* is black in both themes; the token owns the opacity. */
|
|
47
53
|
--overlay: hsl(0 0% 0% / 0.6);
|
|
@@ -64,17 +70,17 @@
|
|
|
64
70
|
--code-border: hsl(0 0% 88%);
|
|
65
71
|
--code-inline: hsl(0 0% 93%);
|
|
66
72
|
--code-inline-foreground: hsl(0 0% 14%);
|
|
67
|
-
/* Sidebar Light Theme -
|
|
68
|
-
|
|
69
|
-
--sidebar-
|
|
70
|
-
--sidebar-
|
|
73
|
+
/* Sidebar Light Theme — warm off-white, same family as the page (Claude keeps
|
|
74
|
+
* rail and page in one tone). */
|
|
75
|
+
--sidebar-background: hsl(60 14% 96%);
|
|
76
|
+
--sidebar-foreground: hsl(0 0% 7.5%);
|
|
77
|
+
--sidebar-primary: hsl(15 55% 45%);
|
|
71
78
|
--sidebar-primary-foreground: hsl(0 0% 100%);
|
|
72
|
-
/*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
--sidebar-accent: hsl(0 0%
|
|
76
|
-
--sidebar-
|
|
77
|
-
--sidebar-border: hsl(0 0% 90%);
|
|
79
|
+
/* 90%, a clear (≥4L) step below the 96% rail — hover stays visible. See the
|
|
80
|
+
2026-08-03 note: the dark pair steps ~12 points, so light must step too. */
|
|
81
|
+
--sidebar-accent: hsl(52 12% 90%);
|
|
82
|
+
--sidebar-accent-foreground: hsl(0 0% 7.5%);
|
|
83
|
+
--sidebar-border: hsl(50 10% 89%);
|
|
78
84
|
--sidebar-ring: hsl(217 91% 55%);
|
|
79
85
|
/* ── Status surfaces ─────────────────────────────────────────────
|
|
80
86
|
* Each status has 4 tokens: icon/accent color, page background,
|
|
@@ -125,7 +131,7 @@
|
|
|
125
131
|
/* Chart colors — chart-1 aligned with brand hue.
|
|
126
132
|
* Fully-wrapped hsl() like every other token (consume via `bg-chart-N` or
|
|
127
133
|
* `var(--chart-N)`, never `hsl(var(--chart-N))`). */
|
|
128
|
-
--chart-1: hsl(
|
|
134
|
+
--chart-1: hsl(15 55% 45%);
|
|
129
135
|
--chart-2: hsl(142 76% 36%);
|
|
130
136
|
--chart-3: hsl(262 83% 58%);
|
|
131
137
|
--chart-4: hsl(26 90% 57%);
|
|
@@ -67,8 +67,8 @@ function rgbToHex(r: number, g: number, b: number): string {
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Convert CSS HSL variable value to hex
|
|
70
|
-
* Input: "
|
|
71
|
-
* Output: "#
|
|
70
|
+
* Input: "15 55% 45%" (from CSS --primary in light theme)
|
|
71
|
+
* Output: "#b25334"
|
|
72
72
|
*/
|
|
73
73
|
export function hslToHex(hslString: string): string {
|
|
74
74
|
const parsed = parseHslString(hslString);
|