@djangocfg/ui-core 2.1.634 → 2.1.636
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 +9 -8
- package/src/components/data/badge/index.tsx +10 -1
- package/src/components/data/table/index.tsx +12 -2
- package/src/components/forms/button/index.tsx +18 -4
- package/src/components/forms/control-size.ts +10 -10
- package/src/components/index.ts +2 -1
- package/src/components/navigation/context-menu/index.tsx +7 -7
- package/src/components/navigation/dropdown-menu/index.tsx +7 -7
- package/src/components/navigation/menubar/index.tsx +7 -7
- package/src/components/navigation/sidebar/sidebar.tsx +14 -23
- package/src/components/overlay/popover/index.tsx +1 -1
- package/src/components/overlay/side-panel/index.tsx +28 -4
- package/src/components/overlay/tooltip/index.tsx +56 -6
- package/src/components/select/select.tsx +4 -4
- package/src/components/specialized/copy/index.tsx +3 -0
- package/src/hooks/media/index.ts +1 -0
- package/src/hooks/media/useCanHover.ts +14 -0
- package/src/styles/css/base.css +80 -0
- package/src/styles/css/presets/notion.css +175 -0
- package/src/styles/css/theme/dark.css +23 -23
- package/src/styles/css/theme/light.css +54 -59
- package/src/styles/css/utilities/touch-safe.css +17 -3
- package/src/styles/presets/presets.ts +1 -0
- package/src/styles/presets/types.ts +2 -1
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Light Theme Colors
|
|
2
|
+
* Light Theme Colors — Notion-neutral (retuned 2026-11-06 from app.notion.com's own custom properties).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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.
|
|
4
|
+
* White canvas, #f9f8f7 rail, warm-grey hover, one blue for the primary action. The previous Claude "clay"
|
|
5
|
+
* brand orange is gone from surfaces; the `notion` preset is a pinned copy of these values for side-by-side checks.
|
|
11
6
|
*
|
|
12
7
|
* Pairs `--primary` / `--primary-foreground` are tuned together. Prefer editing tokens over ad hoc classes.
|
|
13
8
|
*/
|
|
@@ -17,23 +12,23 @@
|
|
|
17
12
|
* fills and a white raised card. Keep `muted` below `background` in light mode
|
|
18
13
|
* so chips, message bubbles, and secondary controls never dissolve into the
|
|
19
14
|
* page. */
|
|
20
|
-
--background: hsl(
|
|
21
|
-
--foreground: hsl(
|
|
15
|
+
--background: hsl(0 0% 100%);
|
|
16
|
+
--foreground: hsl(60 1% 17%);
|
|
22
17
|
--card: hsl(0 0% 100%);
|
|
23
|
-
--card-foreground: hsl(
|
|
18
|
+
--card-foreground: hsl(60 1% 17%);
|
|
24
19
|
--popover: hsl(0 0% 100%);
|
|
25
|
-
--popover-foreground: hsl(
|
|
20
|
+
--popover-foreground: hsl(60 1% 17%);
|
|
26
21
|
/* Interactive primary on white — deep clay (~#b6543a): readable white-on-fill (5.0:1) + calmer than the brand swatch */
|
|
27
|
-
--primary: hsl(
|
|
22
|
+
--primary: hsl(209 74% 47%);
|
|
28
23
|
--primary-foreground: hsl(0 0% 100%);
|
|
29
|
-
--secondary: hsl(
|
|
30
|
-
--secondary-foreground: hsl(60
|
|
31
|
-
--muted: hsl(
|
|
32
|
-
--muted-foreground: hsl(
|
|
24
|
+
--secondary: hsl(30 14% 97%);
|
|
25
|
+
--secondary-foreground: hsl(60 1% 17%);
|
|
26
|
+
--muted: hsl(40 9% 93.5%);
|
|
27
|
+
--muted-foreground: hsl(37 3% 43%);
|
|
33
28
|
/* Neutral interaction surface: a quiet step below the current light canvas.
|
|
34
29
|
* It deliberately keys off --background, not white --card, so hover remains
|
|
35
30
|
* visible on translucent menus and on plain pages alike. */
|
|
36
|
-
--surface-hover:
|
|
31
|
+
--surface-hover: hsl(40 9% 95%);
|
|
37
32
|
/* The counterpart to --surface-hover: a surface that reads as sunk BELOW the
|
|
38
33
|
* page. A translucent black for the same reason as the dark theme's, but much
|
|
39
34
|
* weaker: the same overlay costs far more contrast on a near-white ground,
|
|
@@ -41,23 +36,23 @@
|
|
|
41
36
|
--surface-recessed: rgb(0 0 0 / 0.045);
|
|
42
37
|
/* Neutral hover/active surface — quiet warm-gray lift (Claude bg-200), a
|
|
43
38
|
* clear step (≥4L) below the 97% canvas. */
|
|
44
|
-
--accent: hsl(
|
|
45
|
-
--accent-foreground: hsl(
|
|
39
|
+
--accent: hsl(40 9% 93.5%);
|
|
40
|
+
--accent-foreground: hsl(60 1% 17%);
|
|
46
41
|
/* Destructive — Claude danger-100 hsl(0 61% 52%). Slightly deeper for a solid
|
|
47
42
|
* white-on-fill AA pass. */
|
|
48
|
-
--destructive: hsl(
|
|
49
|
-
--destructive-foreground: hsl(0 0%
|
|
50
|
-
--border: hsl(
|
|
43
|
+
--destructive: hsl(5 62% 48%);
|
|
44
|
+
--destructive-foreground: hsl(0 0% 100%);
|
|
45
|
+
--border: hsl(40 6% 90%);
|
|
51
46
|
/* Input surface — faint warm fill so fields are visible on white cards. */
|
|
52
|
-
--input: hsl(
|
|
47
|
+
--input: hsl(40 6% 90%);
|
|
53
48
|
/* Divider — hairline between rows; slightly darker than --border so it reads
|
|
54
49
|
* on white cards. */
|
|
55
|
-
--divider: hsl(
|
|
50
|
+
--divider: hsl(40 6% 92%);
|
|
56
51
|
/* Overlay — modal scrim / backdrop behind dialogs, drawers, sheets. A scrim
|
|
57
52
|
* is black in both themes; the token owns the opacity. */
|
|
58
|
-
--overlay: hsl(0 0% 0% / 0.
|
|
53
|
+
--overlay: hsl(0 0% 0% / 0.4);
|
|
59
54
|
/* Focus ring — blue (system-accent feel), independent of the cyan brand. */
|
|
60
|
-
--ring: hsl(
|
|
55
|
+
--ring: hsl(209 74% 52%);
|
|
61
56
|
--shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
|
|
62
57
|
|
|
63
58
|
/* Code surface — used by markdown code fences, terminal blocks,
|
|
@@ -70,23 +65,23 @@
|
|
|
70
65
|
* for body legibility. Border keeps the panel anchored.
|
|
71
66
|
* Inline code shares the same surface for chip-on-chip cohesion.
|
|
72
67
|
*/
|
|
73
|
-
--code: hsl(
|
|
74
|
-
--code-foreground: hsl(
|
|
75
|
-
--code-border: hsl(
|
|
76
|
-
--code-inline: hsl(
|
|
77
|
-
--code-inline-foreground: hsl(
|
|
68
|
+
--code: hsl(30 14% 97%);
|
|
69
|
+
--code-foreground: hsl(60 1% 17%);
|
|
70
|
+
--code-border: hsl(40 6% 90%);
|
|
71
|
+
--code-inline: hsl(40 9% 93.5%);
|
|
72
|
+
--code-inline-foreground: hsl(5 62% 42%);
|
|
78
73
|
/* Sidebar Light Theme — warm off-white, same family as the page (Claude keeps
|
|
79
74
|
* rail and page in one tone). */
|
|
80
|
-
--sidebar-background: hsl(
|
|
81
|
-
--sidebar-foreground: hsl(
|
|
82
|
-
--sidebar-primary: hsl(
|
|
75
|
+
--sidebar-background: hsl(30 14% 97%);
|
|
76
|
+
--sidebar-foreground: hsl(60 1% 17%);
|
|
77
|
+
--sidebar-primary: hsl(209 74% 47%);
|
|
83
78
|
--sidebar-primary-foreground: hsl(0 0% 100%);
|
|
84
79
|
/* 90%, a clear (≥4L) step below the 96% rail — hover stays visible. See the
|
|
85
80
|
2026-08-03 note: the dark pair steps ~12 points, so light must step too. */
|
|
86
|
-
--sidebar-accent: hsl(
|
|
87
|
-
--sidebar-accent-foreground: hsl(
|
|
88
|
-
--sidebar-border: hsl(
|
|
89
|
-
--sidebar-ring: hsl(
|
|
81
|
+
--sidebar-accent: hsl(40 7% 92%);
|
|
82
|
+
--sidebar-accent-foreground: hsl(60 1% 17%);
|
|
83
|
+
--sidebar-border: hsl(40 6% 90%);
|
|
84
|
+
--sidebar-ring: hsl(209 74% 52%);
|
|
90
85
|
/* ── Status surfaces ─────────────────────────────────────────────
|
|
91
86
|
* Each status has 4 tokens: icon/accent color, page background,
|
|
92
87
|
* readable foreground text, and border ring.
|
|
@@ -100,23 +95,23 @@
|
|
|
100
95
|
* ─────────────────────────────────────────────────────────────── */
|
|
101
96
|
|
|
102
97
|
/* Warning — amber */
|
|
103
|
-
--warning: hsl(
|
|
104
|
-
--warning-background: hsl(
|
|
105
|
-
--warning-foreground: hsl(
|
|
106
|
-
--warning-border: hsl(
|
|
98
|
+
--warning: hsl(39 60% 51%);
|
|
99
|
+
--warning-background: hsl(52 70% 96%);
|
|
100
|
+
--warning-foreground: hsl(45 53% 26%);
|
|
101
|
+
--warning-border: hsl(46 66% 82%);
|
|
107
102
|
/* Success — green */
|
|
108
|
-
--success: hsl(
|
|
109
|
-
--success-background: hsl(
|
|
110
|
-
--success-foreground: hsl(
|
|
111
|
-
--success-border: hsl(
|
|
103
|
+
--success: hsl(147 30% 47%);
|
|
104
|
+
--success-background: hsl(147 20% 96%);
|
|
105
|
+
--success-foreground: hsl(147 33% 25%);
|
|
106
|
+
--success-border: hsl(147 22% 87%);
|
|
112
107
|
/* Destructive surface (separate from the filled button token) */
|
|
113
|
-
--destructive-background: hsl(0
|
|
114
|
-
--destructive-border: hsl(
|
|
108
|
+
--destructive-background: hsl(0 55% 97%);
|
|
109
|
+
--destructive-border: hsl(5 70% 92%);
|
|
115
110
|
/* Info — blue-cyan (brand-adjacent) */
|
|
116
|
-
--info: hsl(
|
|
117
|
-
--info-background: hsl(
|
|
118
|
-
--info-foreground: hsl(
|
|
119
|
-
--info-border: hsl(
|
|
111
|
+
--info: hsl(209 74% 52%);
|
|
112
|
+
--info-background: hsl(209 80% 97%);
|
|
113
|
+
--info-foreground: hsl(209 50% 29%);
|
|
114
|
+
--info-border: hsl(209 75% 91%);
|
|
120
115
|
|
|
121
116
|
/* On-fill text/icon — readable color sitting ON the solid `*` fill
|
|
122
117
|
* (badges, unread pills, filled chips), distinct from the `*-foreground`
|
|
@@ -129,16 +124,16 @@
|
|
|
129
124
|
--on-success: hsl(0 0% 9%);
|
|
130
125
|
--on-warning: hsl(0 0% 9%);
|
|
131
126
|
--on-info: hsl(0 0% 9%);
|
|
132
|
-
--on-destructive: hsl(0 0%
|
|
127
|
+
--on-destructive: hsl(0 0% 100%);
|
|
133
128
|
/* Surface gradient */
|
|
134
129
|
--surface-gradient: linear-gradient(to bottom, var(--background), color-mix(in oklab, var(--background) 80%, transparent));
|
|
135
130
|
|
|
136
131
|
/* Chart colors — chart-1 aligned with brand hue.
|
|
137
132
|
* Fully-wrapped hsl() like every other token (consume via `bg-chart-N` or
|
|
138
133
|
* `var(--chart-N)`, never `hsl(var(--chart-N))`). */
|
|
139
|
-
--chart-1: hsl(
|
|
140
|
-
--chart-2: hsl(
|
|
141
|
-
--chart-3: hsl(
|
|
142
|
-
--chart-4: hsl(
|
|
143
|
-
--chart-5: hsl(
|
|
134
|
+
--chart-1: hsl(209 74% 52%);
|
|
135
|
+
--chart-2: hsl(147 30% 47%);
|
|
136
|
+
--chart-3: hsl(277 30% 55%);
|
|
137
|
+
--chart-4: hsl(31 65% 51%);
|
|
138
|
+
--chart-5: hsl(5 62% 59%);
|
|
144
139
|
}
|
|
@@ -146,17 +146,31 @@
|
|
|
146
146
|
|
|
147
147
|
@media (max-width: 768px) {
|
|
148
148
|
/* Enforce on mobile for buttons, links with onClick, form controls */
|
|
149
|
-
button,
|
|
149
|
+
button:not([role="checkbox"], [role="switch"], [role="radio"], [role="combobox"], [role="tab"]),
|
|
150
150
|
[role="button"],
|
|
151
151
|
a[onClick],
|
|
152
152
|
input[type="submit"],
|
|
153
153
|
input[type="button"],
|
|
154
|
-
input[type="reset"]
|
|
155
|
-
select {
|
|
154
|
+
input[type="reset"] {
|
|
156
155
|
min-height: 44px;
|
|
157
156
|
min-width: 44px;
|
|
158
157
|
}
|
|
159
158
|
|
|
159
|
+
/* Field controls keep their own size (--control-h-*, 16px box, switch track): inflating them made the checkbox a
|
|
160
|
+
* 44px square, squashed the switch and left Select taller than Input. The 44px hit area is an invisible ::after. */
|
|
161
|
+
:where(button)[role="checkbox"],
|
|
162
|
+
:where(button)[role="switch"],
|
|
163
|
+
:where(button)[role="radio"] {
|
|
164
|
+
position: relative;
|
|
165
|
+
}
|
|
166
|
+
:where(button)[role="checkbox"]::after,
|
|
167
|
+
:where(button)[role="switch"]::after,
|
|
168
|
+
:where(button)[role="radio"]::after {
|
|
169
|
+
content: "";
|
|
170
|
+
position: absolute;
|
|
171
|
+
inset: -14px;
|
|
172
|
+
}
|
|
173
|
+
|
|
160
174
|
/* Special case: Icon-only buttons */
|
|
161
175
|
button[aria-label]:not(:has(*)),
|
|
162
176
|
[role="button"][aria-label]:not(:has(*)) {
|