@cosxai/ui 0.1.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/package.json +38 -0
- package/src/actionbar/ActionBar.tsx +436 -0
- package/src/actionbar/ActionBarButton.tsx +110 -0
- package/src/actionbar/ActionBarMenuGroup.tsx +106 -0
- package/src/actionbar/ActionBarProvider.tsx +76 -0
- package/src/actionbar/actionbar-context.ts +23 -0
- package/src/actionbar/index.ts +13 -0
- package/src/actionbar/types.ts +50 -0
- package/src/actionbar/useActionBarItems.ts +47 -0
- package/src/ambient/AmbientBackdrop.tsx +74 -0
- package/src/ambient/CommandInput.tsx +107 -0
- package/src/ambient/SuperbarStrip.tsx +36 -0
- package/src/ambient/index.ts +6 -0
- package/src/bento/BentoCell.tsx +66 -0
- package/src/bento/BentoGrid.tsx +42 -0
- package/src/bento/index.ts +2 -0
- package/src/command/CommandPalette.tsx +277 -0
- package/src/command/CommandProvider.tsx +57 -0
- package/src/command/command-context.ts +12 -0
- package/src/command/index.ts +6 -0
- package/src/command/rank.ts +45 -0
- package/src/command/types.ts +26 -0
- package/src/command/useCommandSource.ts +37 -0
- package/src/dialogs/DialogsProvider.tsx +216 -0
- package/src/dialogs/Modal.tsx +204 -0
- package/src/dialogs/Toast.tsx +85 -0
- package/src/dialogs/dialogs-context.ts +6 -0
- package/src/dialogs/index.ts +10 -0
- package/src/dialogs/types.ts +37 -0
- package/src/dialogs/useDialogs.ts +8 -0
- package/src/editorial/EditorialSpotlight.tsx +63 -0
- package/src/editorial/Folio.tsx +52 -0
- package/src/editorial/PlateMarker.tsx +33 -0
- package/src/editorial/RomanSection.tsx +65 -0
- package/src/editorial/RunningMarginalia.tsx +65 -0
- package/src/editorial/index.ts +10 -0
- package/src/frutiger/GlossyOrb.tsx +79 -0
- package/src/frutiger/SkyBackdrop.tsx +114 -0
- package/src/frutiger/index.ts +2 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useKeyboardHotkey.ts +80 -0
- package/src/hooks/useReducedMotion.ts +20 -0
- package/src/hooks/useViewport.ts +61 -0
- package/src/index.ts +26 -0
- package/src/layout/Breadcrumb.tsx +74 -0
- package/src/layout/LeftNavRail.tsx +126 -0
- package/src/layout/MobileTabBar.tsx +101 -0
- package/src/layout/NavItem.tsx +128 -0
- package/src/layout/NavSearchTrigger.tsx +88 -0
- package/src/layout/NavSection.tsx +40 -0
- package/src/layout/RightSidebarPanel.tsx +111 -0
- package/src/layout/Shell.tsx +91 -0
- package/src/layout/StickyBanner.tsx +83 -0
- package/src/layout/Topbar.tsx +68 -0
- package/src/layout/index.ts +22 -0
- package/src/layout/useNavRailState.ts +69 -0
- package/src/lib/cn.ts +7 -0
- package/src/lib/time-utils.ts +44 -0
- package/src/neobrutalism/Marquee.tsx +81 -0
- package/src/neobrutalism/Sticker.tsx +71 -0
- package/src/neobrutalism/index.ts +4 -0
- package/src/primitives/Avatar.tsx +53 -0
- package/src/primitives/Button.tsx +30 -0
- package/src/primitives/Card.tsx +41 -0
- package/src/primitives/Checkbox.tsx +78 -0
- package/src/primitives/CountBadge.tsx +50 -0
- package/src/primitives/Input.tsx +71 -0
- package/src/primitives/Kbd.tsx +45 -0
- package/src/primitives/PageHeader.tsx +77 -0
- package/src/primitives/Tag.tsx +56 -0
- package/src/primitives/Textarea.tsx +62 -0
- package/src/primitives/ToggleSwitch.tsx +79 -0
- package/src/primitives/Tooltip.tsx +171 -0
- package/src/primitives/index.ts +24 -0
- package/src/pwa/InstallPromptBanner.tsx +132 -0
- package/src/pwa/index.ts +4 -0
- package/src/pwa/manifest.template.json +20 -0
- package/src/pwa/registerSW.ts +55 -0
- package/src/riso/Halftone.tsx +85 -0
- package/src/riso/Misregister.tsx +63 -0
- package/src/riso/RisoStamp.tsx +76 -0
- package/src/riso/index.ts +3 -0
- package/src/sketch/HandUnderline.tsx +53 -0
- package/src/sketch/RoughArrow.tsx +91 -0
- package/src/sketch/RoughBox.tsx +73 -0
- package/src/sketch/StickyNote.tsx +56 -0
- package/src/sketch/index.ts +4 -0
- package/src/styles/base.css +80 -0
- package/src/styles/chrome-ambient.css +222 -0
- package/src/styles/chrome-bento.css +184 -0
- package/src/styles/chrome-editorial.css +145 -0
- package/src/styles/chrome-frutiger.css +364 -0
- package/src/styles/chrome-neobrutalism.css +315 -0
- package/src/styles/chrome-riso.css +328 -0
- package/src/styles/chrome-sketch.css +351 -0
- package/src/styles/chrome-swiss.css +232 -0
- package/src/styles/chrome-terminal.css +235 -0
- package/src/styles/fonts.css +22 -0
- package/src/styles/index.css +198 -0
- package/src/styles/tokens.css +976 -0
- package/src/terminal/AsciiBox.tsx +65 -0
- package/src/terminal/BrailleSpinner.tsx +46 -0
- package/src/terminal/index.ts +4 -0
- package/src/theme/ThemeProvider.tsx +93 -0
- package/src/theme/index.ts +5 -0
- package/src/theme/inline-script.ts +36 -0
- package/src/theme/theme-context.ts +7 -0
- package/src/theme/types.ts +22 -0
- package/src/theme/useTheme.ts +8 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
// Yellow / pink / green sticky note with a tiny rotation, hand-
|
|
4
|
+
// drawn second-stroke shadow, and handwriting-leaning font.
|
|
5
|
+
// Useful for callouts, empty-state captions, toasts.
|
|
6
|
+
|
|
7
|
+
export interface StickyNoteProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
color?: "yellow" | "pink" | "green" | "blue" | "orange";
|
|
10
|
+
// Rotation in degrees. Defaults to a small alternating tilt.
|
|
11
|
+
tilt?: number;
|
|
12
|
+
width?: number | string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const COLORS: Record<NonNullable<StickyNoteProps["color"]>, string> = {
|
|
18
|
+
yellow: "#FFF3B0",
|
|
19
|
+
pink: "#FFD1E3",
|
|
20
|
+
green: "#D6F0DC",
|
|
21
|
+
blue: "#D6E8FF",
|
|
22
|
+
orange: "#FFE0C7",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function StickyNote({
|
|
26
|
+
children,
|
|
27
|
+
color = "yellow",
|
|
28
|
+
tilt = -2,
|
|
29
|
+
width = 220,
|
|
30
|
+
className,
|
|
31
|
+
style,
|
|
32
|
+
}: StickyNoteProps) {
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className={className}
|
|
36
|
+
style={{
|
|
37
|
+
background: COLORS[color],
|
|
38
|
+
width,
|
|
39
|
+
minHeight: 120,
|
|
40
|
+
padding: "18px 18px 22px",
|
|
41
|
+
border: "1.5px solid rgba(26,26,26,0.5)",
|
|
42
|
+
borderRadius: "4px 8px 5px 9px / 6px 4px 9px 5px",
|
|
43
|
+
boxShadow:
|
|
44
|
+
"3px 4px 0 rgba(26,26,26,0.85), 6px 10px 18px rgba(0,0,0,0.08)",
|
|
45
|
+
transform: `rotate(${tilt}deg)`,
|
|
46
|
+
font:
|
|
47
|
+
"500 17px/1.45 \"Caveat\", \"Patrick Hand\", \"Kalam\", \"Comic Sans MS\", cursive",
|
|
48
|
+
color: "#1A1A1A",
|
|
49
|
+
position: "relative",
|
|
50
|
+
...style,
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{children}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* Global base — applied once at the consumer root so the kit's
|
|
2
|
+
typography, color, and motion behaviour kick in. Components
|
|
3
|
+
themselves are class-driven (`ck-*` prefix) and don't depend on
|
|
4
|
+
this file being loaded, but consumers should import it to get
|
|
5
|
+
the cross-fade theme transitions and reduced-motion handling. */
|
|
6
|
+
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
background: var(--ck-bg-canvas);
|
|
10
|
+
color: var(--ck-text-primary);
|
|
11
|
+
font-family: var(--ck-font-sans);
|
|
12
|
+
font-feature-settings: "ss01", "cv11";
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
/* Cross-fade tones when --ck-bg-canvas / --ck-text-primary flip
|
|
15
|
+
on theme toggle. All component tokens read from the same vars
|
|
16
|
+
so they shift in lockstep without per-element transitions. */
|
|
17
|
+
transition: background-color 200ms var(--ck-ease), color 200ms var(--ck-ease);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ---------- Typography utilities ---------- */
|
|
21
|
+
.ck-h1 { font: 500 32px/1.2 var(--ck-font-sans); letter-spacing: -0.01em; color: var(--ck-text-primary); margin: 0; }
|
|
22
|
+
.ck-h2 { font: 500 24px/1.3 var(--ck-font-sans); letter-spacing: -0.005em; color: var(--ck-text-primary); margin: 0; }
|
|
23
|
+
.ck-h3 { font: 500 20px/1.4 var(--ck-font-sans); color: var(--ck-text-primary); margin: 0; }
|
|
24
|
+
.ck-body { font: 400 16px/1.55 var(--ck-font-sans); color: var(--ck-text-primary); }
|
|
25
|
+
.ck-body-sm { font: 400 14px/1.5 var(--ck-font-sans); color: var(--ck-text-primary); }
|
|
26
|
+
.ck-caption { font: 400 13px/1.4 var(--ck-font-sans); color: var(--ck-text-tertiary); }
|
|
27
|
+
|
|
28
|
+
.ck-mono { font-family: var(--ck-font-mono); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
|
|
29
|
+
|
|
30
|
+
/* Section eyebrow — small uppercase mono caption ("ACCESS · SHARES")
|
|
31
|
+
that sits above titles in cards / panels. */
|
|
32
|
+
.ck-eyebrow {
|
|
33
|
+
font: 500 var(--ck-mono-xs-size)/1 var(--ck-font-mono);
|
|
34
|
+
letter-spacing: 0.08em;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
color: var(--ck-text-tertiary);
|
|
37
|
+
display: inline-block;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* One-step-smaller sibling of eyebrow — for status pills (PENDING,
|
|
41
|
+
LIVE, Accepted, Revoked), meta tags inside list rows. */
|
|
42
|
+
.ck-tag {
|
|
43
|
+
font: 500 var(--ck-mono-tag-size)/1 var(--ck-font-mono);
|
|
44
|
+
letter-spacing: 0.08em;
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
color: var(--ck-text-tertiary);
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ck-meta {
|
|
51
|
+
font: 400 var(--ck-mono-sm-size)/1.4 var(--ck-font-mono);
|
|
52
|
+
color: var(--ck-text-tertiary);
|
|
53
|
+
font-variant-numeric: tabular-nums;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ---------- Motion primitives ---------- */
|
|
57
|
+
@keyframes ck-slide-in-right { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
|
|
58
|
+
@keyframes ck-slide-in-left { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
|
|
59
|
+
@keyframes ck-fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
60
|
+
@keyframes ck-popover-enter { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
|
|
61
|
+
@keyframes ck-page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
|
62
|
+
|
|
63
|
+
.ck-anim-slide-right { animation: ck-slide-in-right 180ms var(--ck-ease) both; }
|
|
64
|
+
.ck-anim-slide-left { animation: ck-slide-in-left 180ms var(--ck-ease) both; }
|
|
65
|
+
.ck-anim-fade { animation: ck-fade-in 180ms var(--ck-ease) both; }
|
|
66
|
+
.ck-anim-popover { animation: ck-popover-enter 160ms var(--ck-ease) both; transform-origin: top center; }
|
|
67
|
+
.ck-anim-page { animation: ck-page-enter var(--ck-dur-page) cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
68
|
+
|
|
69
|
+
/* Respect the user's OS-level motion preference. Cross-fade
|
|
70
|
+
transitions on bg/colour stay (below the meaningful-motion
|
|
71
|
+
threshold); element-level animations are killed. */
|
|
72
|
+
@media (prefers-reduced-motion: reduce) {
|
|
73
|
+
.ck-anim-slide-right,
|
|
74
|
+
.ck-anim-slide-left,
|
|
75
|
+
.ck-anim-fade,
|
|
76
|
+
.ck-anim-popover,
|
|
77
|
+
.ck-anim-page {
|
|
78
|
+
animation: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* Ambient Glass chrome — component overrides.
|
|
2
|
+
Tokens.css supplies the gradient backdrop + glass surface
|
|
3
|
+
tokens + Superbar gradient. This file makes every chrome
|
|
4
|
+
surface translucent with backdrop-filter blur so the ambient
|
|
5
|
+
mesh shows through, and threads the Superbar accent into the
|
|
6
|
+
places it belongs (active list items, AI input divider). */
|
|
7
|
+
|
|
8
|
+
html[data-ck-chrome="ambient"] body {
|
|
9
|
+
/* Pin the ambient mesh to the viewport so it doesn't scroll
|
|
10
|
+
with content — feels like a real desktop wallpaper. */
|
|
11
|
+
background-attachment: fixed;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* ===== Layout chrome: glass surfaces over the mesh ============ */
|
|
16
|
+
|
|
17
|
+
html[data-ck-chrome="ambient"] [data-ck-leftnav] {
|
|
18
|
+
background: var(--ck-bg-sidebar) !important;
|
|
19
|
+
backdrop-filter: var(--ck-blur-window);
|
|
20
|
+
-webkit-backdrop-filter: var(--ck-blur-window);
|
|
21
|
+
border-right: 1px solid var(--ck-border-subtle);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
html[data-ck-chrome="ambient"] [data-ck-topbar] {
|
|
25
|
+
background: var(--ck-bg-sidebar) !important;
|
|
26
|
+
backdrop-filter: var(--ck-blur-window);
|
|
27
|
+
-webkit-backdrop-filter: var(--ck-blur-window);
|
|
28
|
+
border-bottom: 1px solid var(--ck-border-subtle);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* ===== Cards ================================================= */
|
|
32
|
+
|
|
33
|
+
html[data-ck-chrome="ambient"] .ck-card {
|
|
34
|
+
background: var(--ck-bg-surface);
|
|
35
|
+
border: 1px solid var(--ck-border-subtle);
|
|
36
|
+
border-radius: 16px;
|
|
37
|
+
box-shadow: var(--ck-shadow-1);
|
|
38
|
+
backdrop-filter: var(--ck-blur-window);
|
|
39
|
+
-webkit-backdrop-filter: var(--ck-blur-window);
|
|
40
|
+
}
|
|
41
|
+
html[data-ck-chrome="ambient"] .ck-card__head {
|
|
42
|
+
border-bottom: 1px solid var(--ck-border-subtle);
|
|
43
|
+
}
|
|
44
|
+
html[data-ck-chrome="ambient"] .ck-card__foot {
|
|
45
|
+
border-top: 1px solid var(--ck-border-subtle);
|
|
46
|
+
background: transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ===== Buttons — soft pills, no chunky shadow ================ */
|
|
50
|
+
|
|
51
|
+
html[data-ck-chrome="ambient"] .ck-btn,
|
|
52
|
+
html[data-ck-chrome="ambient"] .ck-actionbar-btn {
|
|
53
|
+
border-radius: 10px;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
letter-spacing: 0;
|
|
56
|
+
text-transform: none;
|
|
57
|
+
transition: background var(--ck-dur-fast) var(--ck-ease),
|
|
58
|
+
border-color var(--ck-dur-fast) var(--ck-ease),
|
|
59
|
+
filter var(--ck-dur-fast) var(--ck-ease);
|
|
60
|
+
}
|
|
61
|
+
html[data-ck-chrome="ambient"] .ck-btn--primary {
|
|
62
|
+
background: var(--ck-accent);
|
|
63
|
+
color: #FFFFFF;
|
|
64
|
+
border: none;
|
|
65
|
+
box-shadow: var(--ck-shadow-1);
|
|
66
|
+
}
|
|
67
|
+
html[data-ck-chrome="ambient"] .ck-btn--primary:hover:not(:disabled) {
|
|
68
|
+
filter: brightness(1.08);
|
|
69
|
+
}
|
|
70
|
+
html[data-ck-chrome="ambient"] .ck-btn--secondary {
|
|
71
|
+
background: var(--ck-bg-surface);
|
|
72
|
+
border-color: var(--ck-border-subtle);
|
|
73
|
+
color: var(--ck-text-primary);
|
|
74
|
+
backdrop-filter: var(--ck-blur-window);
|
|
75
|
+
}
|
|
76
|
+
html[data-ck-chrome="ambient"] .ck-btn--ghost {
|
|
77
|
+
background: transparent;
|
|
78
|
+
border: none;
|
|
79
|
+
}
|
|
80
|
+
html[data-ck-chrome="ambient"] .ck-btn--ghost:hover:not(:disabled) {
|
|
81
|
+
background: var(--ck-bg-surface);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ===== Inputs / Textareas =================================== */
|
|
85
|
+
|
|
86
|
+
html[data-ck-chrome="ambient"] .ck-input,
|
|
87
|
+
html[data-ck-chrome="ambient"] .ck-textarea {
|
|
88
|
+
background: var(--ck-bg-muted);
|
|
89
|
+
border: 1px solid var(--ck-border-subtle);
|
|
90
|
+
border-radius: 10px;
|
|
91
|
+
color: var(--ck-text-primary);
|
|
92
|
+
backdrop-filter: blur(12px);
|
|
93
|
+
-webkit-backdrop-filter: blur(12px);
|
|
94
|
+
}
|
|
95
|
+
html[data-ck-chrome="ambient"] .ck-input:focus-visible,
|
|
96
|
+
html[data-ck-chrome="ambient"] .ck-textarea:focus-visible {
|
|
97
|
+
outline: none;
|
|
98
|
+
border-color: var(--ck-accent-border) !important;
|
|
99
|
+
box-shadow: 0 0 0 3px var(--ck-accent-muted) !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ===== Typography =========================================== */
|
|
103
|
+
|
|
104
|
+
html[data-ck-chrome="ambient"] h1,
|
|
105
|
+
html[data-ck-chrome="ambient"] .ck-h1 {
|
|
106
|
+
font-weight: 700;
|
|
107
|
+
letter-spacing: -0.02em;
|
|
108
|
+
line-height: 1.05;
|
|
109
|
+
}
|
|
110
|
+
html[data-ck-chrome="ambient"] h2,
|
|
111
|
+
html[data-ck-chrome="ambient"] .ck-h2 {
|
|
112
|
+
font-weight: 700;
|
|
113
|
+
letter-spacing: -0.01em;
|
|
114
|
+
}
|
|
115
|
+
html[data-ck-chrome="ambient"] h3,
|
|
116
|
+
html[data-ck-chrome="ambient"] .ck-h3 {
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ===== NavItem — active gets right-edge Superbar strip ======= */
|
|
121
|
+
|
|
122
|
+
html[data-ck-chrome="ambient"] [data-ck-navitem] {
|
|
123
|
+
position: relative;
|
|
124
|
+
font-weight: 500 !important;
|
|
125
|
+
color: var(--ck-text-secondary) !important;
|
|
126
|
+
transition: background var(--ck-dur-fast) var(--ck-ease),
|
|
127
|
+
color var(--ck-dur-fast) var(--ck-ease);
|
|
128
|
+
}
|
|
129
|
+
html[data-ck-chrome="ambient"] [data-ck-navitem]:not([data-active="true"]) {
|
|
130
|
+
background: transparent !important;
|
|
131
|
+
}
|
|
132
|
+
html[data-ck-chrome="ambient"] [data-ck-navitem]:not([data-active="true"]):hover {
|
|
133
|
+
background: var(--ck-bg-surface) !important;
|
|
134
|
+
color: var(--ck-text-primary) !important;
|
|
135
|
+
}
|
|
136
|
+
html[data-ck-chrome="ambient"] [data-ck-navitem][data-active="true"] {
|
|
137
|
+
background: var(--ck-bg-surface) !important;
|
|
138
|
+
color: var(--ck-text-primary) !important;
|
|
139
|
+
font-weight: 600 !important;
|
|
140
|
+
}
|
|
141
|
+
/* The Superbar right-edge strip — signature accent. 3 px wide,
|
|
142
|
+
inset 6 px top/bottom so it doesn't kiss the border-radius. */
|
|
143
|
+
html[data-ck-chrome="ambient"] [data-ck-navitem][data-active="true"]::after {
|
|
144
|
+
content: "";
|
|
145
|
+
position: absolute;
|
|
146
|
+
right: 0;
|
|
147
|
+
top: 6px;
|
|
148
|
+
bottom: 6px;
|
|
149
|
+
width: 3px;
|
|
150
|
+
background: var(--ck-superbar);
|
|
151
|
+
border-radius: 2px;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ===== Search trigger ====================================== */
|
|
156
|
+
|
|
157
|
+
html[data-ck-chrome="ambient"] [data-ck-search-trigger] {
|
|
158
|
+
background: var(--ck-bg-muted) !important;
|
|
159
|
+
border: 1px solid var(--ck-border-subtle) !important;
|
|
160
|
+
border-radius: 10px !important;
|
|
161
|
+
backdrop-filter: var(--ck-blur-window);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* ===== Tags / badges — soft tinted pills ===================== */
|
|
165
|
+
|
|
166
|
+
html[data-ck-chrome="ambient"] [data-ck-tag] {
|
|
167
|
+
border-radius: 8px !important;
|
|
168
|
+
padding: 3px 10px !important;
|
|
169
|
+
font-weight: 600 !important;
|
|
170
|
+
border: 1px solid transparent !important;
|
|
171
|
+
box-shadow: none !important;
|
|
172
|
+
}
|
|
173
|
+
html[data-ck-chrome="ambient"] [data-ck-tag][data-tone="accent"] {
|
|
174
|
+
background: color-mix(in oklab, var(--ck-accent) 14%, transparent) !important;
|
|
175
|
+
color: var(--ck-accent) !important;
|
|
176
|
+
}
|
|
177
|
+
html[data-ck-chrome="ambient"] [data-ck-tag][data-tone="success"] {
|
|
178
|
+
background: color-mix(in oklab, var(--ck-success) 14%, transparent) !important;
|
|
179
|
+
color: var(--ck-success) !important;
|
|
180
|
+
}
|
|
181
|
+
html[data-ck-chrome="ambient"] [data-ck-tag][data-tone="warning"] {
|
|
182
|
+
background: color-mix(in oklab, var(--ck-warning) 14%, transparent) !important;
|
|
183
|
+
color: var(--ck-warning) !important;
|
|
184
|
+
}
|
|
185
|
+
html[data-ck-chrome="ambient"] [data-ck-tag][data-tone="critical"] {
|
|
186
|
+
background: color-mix(in oklab, var(--ck-critical) 14%, transparent) !important;
|
|
187
|
+
color: var(--ck-critical) !important;
|
|
188
|
+
}
|
|
189
|
+
html[data-ck-chrome="ambient"] [data-ck-tag][data-tone="neutral"] {
|
|
190
|
+
background: var(--ck-bg-muted) !important;
|
|
191
|
+
color: var(--ck-text-secondary) !important;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* ===== Action bar — floating glass pill ===================== */
|
|
195
|
+
|
|
196
|
+
html[data-ck-chrome="ambient"] [data-ck-actionbar] {
|
|
197
|
+
background: var(--ck-bg-sidebar) !important;
|
|
198
|
+
backdrop-filter: var(--ck-blur-overlay);
|
|
199
|
+
-webkit-backdrop-filter: var(--ck-blur-overlay);
|
|
200
|
+
border: 1px solid var(--ck-border-subtle);
|
|
201
|
+
border-radius: 24px;
|
|
202
|
+
box-shadow: var(--ck-shadow-2);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* ===== Modal — heavy backdrop blur ========================== */
|
|
206
|
+
|
|
207
|
+
html[data-ck-chrome="ambient"] [role="dialog"] > div:first-child {
|
|
208
|
+
background: rgba(0, 0, 0, 0.4) !important;
|
|
209
|
+
backdrop-filter: var(--ck-blur-overlay);
|
|
210
|
+
-webkit-backdrop-filter: var(--ck-blur-overlay);
|
|
211
|
+
}
|
|
212
|
+
html[data-ck-chrome="ambient"] [role="dialog"] > div > div {
|
|
213
|
+
border-radius: 20px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* ===== Reduced motion ====================================== */
|
|
217
|
+
|
|
218
|
+
@media (prefers-reduced-motion: reduce) {
|
|
219
|
+
html[data-ck-chrome="ambient"] * {
|
|
220
|
+
transition: none !important;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* Bento chrome — component overrides.
|
|
2
|
+
Tokens.css supplies the neutral palette + generous radii + soft
|
|
3
|
+
multi-layer shadows. This file polishes existing primitives to
|
|
4
|
+
match: Apple-style large radius cards, soft pill buttons, no
|
|
5
|
+
chunky borders, hover-lift on cells. The layout primitives
|
|
6
|
+
(<BentoGrid> + <BentoCell>) do the heavy lifting elsewhere. */
|
|
7
|
+
|
|
8
|
+
html[data-ck-chrome="bento"] body {
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
font-feature-settings: "ss01", "cv11";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html[data-ck-chrome="bento"] h1,
|
|
14
|
+
html[data-ck-chrome="bento"] .ck-h1 {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
letter-spacing: -0.025em;
|
|
17
|
+
line-height: 1.05;
|
|
18
|
+
}
|
|
19
|
+
html[data-ck-chrome="bento"] h2,
|
|
20
|
+
html[data-ck-chrome="bento"] .ck-h2 {
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
letter-spacing: -0.015em;
|
|
23
|
+
}
|
|
24
|
+
html[data-ck-chrome="bento"] h3,
|
|
25
|
+
html[data-ck-chrome="bento"] .ck-h3 {
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
letter-spacing: -0.005em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Buttons */
|
|
31
|
+
html[data-ck-chrome="bento"] .ck-btn,
|
|
32
|
+
html[data-ck-chrome="bento"] .ck-actionbar-btn {
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
letter-spacing: -0.005em;
|
|
36
|
+
text-transform: none;
|
|
37
|
+
box-shadow: var(--ck-shadow-1);
|
|
38
|
+
transition: background 160ms ease, transform 160ms ease;
|
|
39
|
+
}
|
|
40
|
+
html[data-ck-chrome="bento"] .ck-btn--primary {
|
|
41
|
+
background: var(--ck-text-primary);
|
|
42
|
+
color: var(--ck-bg-canvas);
|
|
43
|
+
border: none;
|
|
44
|
+
}
|
|
45
|
+
html[data-ck-chrome="bento"] .ck-btn--primary:hover:not(:disabled) {
|
|
46
|
+
background: color-mix(in oklab, var(--ck-text-primary), white 12%);
|
|
47
|
+
}
|
|
48
|
+
html[data-ck-chrome="bento"] .ck-btn--secondary {
|
|
49
|
+
background: var(--ck-bg-surface);
|
|
50
|
+
color: var(--ck-text-primary);
|
|
51
|
+
border: 1px solid var(--ck-border-subtle);
|
|
52
|
+
}
|
|
53
|
+
html[data-ck-chrome="bento"] .ck-btn--ghost {
|
|
54
|
+
background: transparent;
|
|
55
|
+
border: none;
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
}
|
|
58
|
+
html[data-ck-chrome="bento"] .ck-btn--ghost:hover:not(:disabled) {
|
|
59
|
+
background: var(--ck-bg-muted);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Inputs */
|
|
63
|
+
html[data-ck-chrome="bento"] .ck-input,
|
|
64
|
+
html[data-ck-chrome="bento"] .ck-textarea {
|
|
65
|
+
background: var(--ck-bg-surface);
|
|
66
|
+
border: 1px solid var(--ck-border-subtle);
|
|
67
|
+
border-radius: 12px;
|
|
68
|
+
}
|
|
69
|
+
html[data-ck-chrome="bento"] .ck-input:focus-visible,
|
|
70
|
+
html[data-ck-chrome="bento"] .ck-textarea:focus-visible {
|
|
71
|
+
outline: none;
|
|
72
|
+
border-color: var(--ck-accent) !important;
|
|
73
|
+
box-shadow: 0 0 0 3px var(--ck-accent-muted) !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Cards — bento baseline */
|
|
77
|
+
html[data-ck-chrome="bento"] .ck-card {
|
|
78
|
+
background: var(--ck-bg-surface);
|
|
79
|
+
border: 1px solid var(--ck-border-subtle);
|
|
80
|
+
border-radius: 22px;
|
|
81
|
+
box-shadow: var(--ck-shadow-2);
|
|
82
|
+
}
|
|
83
|
+
html[data-ck-chrome="bento"] .ck-card__head {
|
|
84
|
+
border-bottom: 1px solid var(--ck-border-subtle);
|
|
85
|
+
padding: 18px 24px;
|
|
86
|
+
}
|
|
87
|
+
html[data-ck-chrome="bento"] .ck-card__body {
|
|
88
|
+
padding: 24px;
|
|
89
|
+
}
|
|
90
|
+
html[data-ck-chrome="bento"] .ck-card__foot {
|
|
91
|
+
border-top: 1px solid var(--ck-border-subtle);
|
|
92
|
+
background: transparent;
|
|
93
|
+
padding: 16px 24px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Tags — soft tinted pills */
|
|
97
|
+
html[data-ck-chrome="bento"] [data-ck-tag] {
|
|
98
|
+
background: var(--ck-bg-muted) !important;
|
|
99
|
+
border-radius: 999px !important;
|
|
100
|
+
padding: 4px 10px !important;
|
|
101
|
+
font-weight: 500 !important;
|
|
102
|
+
letter-spacing: 0 !important;
|
|
103
|
+
text-transform: none !important;
|
|
104
|
+
box-shadow: none !important;
|
|
105
|
+
border: none !important;
|
|
106
|
+
font-size: 12px !important;
|
|
107
|
+
}
|
|
108
|
+
html[data-ck-chrome="bento"] [data-ck-tag][data-tone="accent"] {
|
|
109
|
+
background: var(--ck-accent-muted) !important;
|
|
110
|
+
color: var(--ck-accent) !important;
|
|
111
|
+
}
|
|
112
|
+
html[data-ck-chrome="bento"] [data-ck-tag][data-tone="success"] {
|
|
113
|
+
background: color-mix(in oklab, var(--ck-success) 12%, transparent) !important;
|
|
114
|
+
color: var(--ck-success) !important;
|
|
115
|
+
}
|
|
116
|
+
html[data-ck-chrome="bento"] [data-ck-tag][data-tone="warning"] {
|
|
117
|
+
background: color-mix(in oklab, var(--ck-warning) 14%, transparent) !important;
|
|
118
|
+
color: var(--ck-warning) !important;
|
|
119
|
+
}
|
|
120
|
+
html[data-ck-chrome="bento"] [data-ck-tag][data-tone="critical"] {
|
|
121
|
+
background: color-mix(in oklab, var(--ck-critical) 12%, transparent) !important;
|
|
122
|
+
color: var(--ck-critical) !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Layout chrome */
|
|
126
|
+
html[data-ck-chrome="bento"] [data-ck-leftnav] {
|
|
127
|
+
background: var(--ck-bg-sidebar) !important;
|
|
128
|
+
border-right: 1px solid var(--ck-border-subtle);
|
|
129
|
+
}
|
|
130
|
+
html[data-ck-chrome="bento"] [data-ck-topbar] {
|
|
131
|
+
background: var(--ck-bg-canvas) !important;
|
|
132
|
+
border-bottom: 1px solid var(--ck-border-subtle);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* NavItem — soft pill */
|
|
136
|
+
html[data-ck-chrome="bento"] [data-ck-navitem] {
|
|
137
|
+
background: transparent !important;
|
|
138
|
+
border-radius: 10px !important;
|
|
139
|
+
font-weight: 500 !important;
|
|
140
|
+
}
|
|
141
|
+
html[data-ck-chrome="bento"] [data-ck-navitem]:not([data-active="true"]):hover {
|
|
142
|
+
background: var(--ck-bg-muted) !important;
|
|
143
|
+
}
|
|
144
|
+
html[data-ck-chrome="bento"] [data-ck-navitem][data-active="true"] {
|
|
145
|
+
background: var(--ck-bg-muted) !important;
|
|
146
|
+
color: var(--ck-text-primary) !important;
|
|
147
|
+
font-weight: 600 !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Search trigger */
|
|
151
|
+
html[data-ck-chrome="bento"] [data-ck-search-trigger] {
|
|
152
|
+
background: var(--ck-bg-surface) !important;
|
|
153
|
+
border: 1px solid var(--ck-border-subtle) !important;
|
|
154
|
+
border-radius: 12px !important;
|
|
155
|
+
box-shadow: var(--ck-shadow-1);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Action bar */
|
|
159
|
+
html[data-ck-chrome="bento"] [data-ck-actionbar] {
|
|
160
|
+
background: var(--ck-bg-surface) !important;
|
|
161
|
+
border: 1px solid var(--ck-border-subtle);
|
|
162
|
+
border-radius: 16px;
|
|
163
|
+
box-shadow: var(--ck-shadow-2);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Modal */
|
|
167
|
+
html[data-ck-chrome="bento"] [role="dialog"] > div:first-child {
|
|
168
|
+
background: rgba(0, 0, 0, 0.4);
|
|
169
|
+
backdrop-filter: blur(8px);
|
|
170
|
+
}
|
|
171
|
+
html[data-ck-chrome="bento"] [role="dialog"] > div > div {
|
|
172
|
+
border-radius: 22px;
|
|
173
|
+
box-shadow: var(--ck-shadow-3);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* BentoCell — hover lift signature */
|
|
177
|
+
html[data-ck-chrome="bento"] [data-ck-bento-cell] {
|
|
178
|
+
transition: transform 240ms cubic-bezier(0.2, 0, 0, 1),
|
|
179
|
+
box-shadow 240ms cubic-bezier(0.2, 0, 0, 1);
|
|
180
|
+
}
|
|
181
|
+
html[data-ck-chrome="bento"] [data-ck-bento-cell][data-interactive="true"]:hover {
|
|
182
|
+
transform: translateY(-3px);
|
|
183
|
+
box-shadow: var(--ck-shadow-3);
|
|
184
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* Editorial chrome — component overrides.
|
|
2
|
+
Token overrides live in tokens.css; this file restyles the
|
|
3
|
+
primitives' shape / feel to match the print-magazine brief.
|
|
4
|
+
Loads alongside index.css; takes effect only when
|
|
5
|
+
html[data-ck-chrome="editorial"] is set on the root. */
|
|
6
|
+
|
|
7
|
+
html[data-ck-chrome="editorial"] body {
|
|
8
|
+
/* Optical kerning + ligatures for the editorial body type. */
|
|
9
|
+
font-feature-settings: "kern", "liga", "ss01";
|
|
10
|
+
-webkit-font-smoothing: antialiased;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Buttons — fully rounded pills, no shadow ever. Primary is
|
|
14
|
+
coral fill with near-black text (the brief specifies dark text
|
|
15
|
+
on coral, not white). */
|
|
16
|
+
html[data-ck-chrome="editorial"] .ck-btn,
|
|
17
|
+
html[data-ck-chrome="editorial"] .ck-actionbar-btn {
|
|
18
|
+
height: 36px;
|
|
19
|
+
padding: 0 18px;
|
|
20
|
+
border-radius: 9999px;
|
|
21
|
+
font-family: var(--ck-font-sans);
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
letter-spacing: 0.04em;
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
box-shadow: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html[data-ck-chrome="editorial"] .ck-btn--primary,
|
|
30
|
+
html[data-ck-chrome="editorial"] .ck-actionbar-btn--primary {
|
|
31
|
+
background: var(--ck-accent);
|
|
32
|
+
color: #0F0F0F;
|
|
33
|
+
}
|
|
34
|
+
html[data-ck-chrome="editorial"] .ck-btn--primary:hover,
|
|
35
|
+
html[data-ck-chrome="editorial"] .ck-actionbar-btn--primary:hover {
|
|
36
|
+
background: var(--ck-accent-hover);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
html[data-ck-chrome="editorial"] .ck-btn--secondary {
|
|
40
|
+
background: transparent;
|
|
41
|
+
border: 1px solid var(--ck-text-primary);
|
|
42
|
+
color: var(--ck-text-primary);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Cards — 1 px hairline, no shadow, slightly tighter radius.
|
|
46
|
+
Index-card feel, not glassmorphism. */
|
|
47
|
+
html[data-ck-chrome="editorial"] .ck-card {
|
|
48
|
+
background: var(--ck-bg-surface);
|
|
49
|
+
border: 1px solid var(--ck-border-subtle);
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
box-shadow: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Eyebrow / tag — editorial uses a longer track + leading
|
|
55
|
+
em-dash. Reads as a magazine section label. */
|
|
56
|
+
html[data-ck-chrome="editorial"] .ck-eyebrow,
|
|
57
|
+
html[data-ck-chrome="editorial"] .ck-tag {
|
|
58
|
+
letter-spacing: 0.18em;
|
|
59
|
+
font-family: var(--ck-font-sans);
|
|
60
|
+
color: var(--ck-text-secondary);
|
|
61
|
+
}
|
|
62
|
+
html[data-ck-chrome="editorial"] .ck-eyebrow::before {
|
|
63
|
+
content: "— ";
|
|
64
|
+
color: var(--ck-text-tertiary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Headings switch to serif via --ck-font-display. ck-h1/h2/h3
|
|
68
|
+
already read from --ck-font-sans by default; under editorial
|
|
69
|
+
we override at this scope so the typography stack rotates
|
|
70
|
+
without touching component code. */
|
|
71
|
+
html[data-ck-chrome="editorial"] h1,
|
|
72
|
+
html[data-ck-chrome="editorial"] h2,
|
|
73
|
+
html[data-ck-chrome="editorial"] h3,
|
|
74
|
+
html[data-ck-chrome="editorial"] .ck-h1,
|
|
75
|
+
html[data-ck-chrome="editorial"] .ck-h2,
|
|
76
|
+
html[data-ck-chrome="editorial"] .ck-h3 {
|
|
77
|
+
font-family: var(--ck-font-display);
|
|
78
|
+
letter-spacing: -0.012em;
|
|
79
|
+
line-height: 1.08;
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Italic-in-the-middle treatment for the docs h1. Wrapping
|
|
84
|
+
the italicised word in <em> is enough — the serif's italic
|
|
85
|
+
variant carries the editorial signature move. */
|
|
86
|
+
html[data-ck-chrome="editorial"] h1 em,
|
|
87
|
+
html[data-ck-chrome="editorial"] h2 em,
|
|
88
|
+
html[data-ck-chrome="editorial"] .ck-h1 em,
|
|
89
|
+
html[data-ck-chrome="editorial"] .ck-h2 em {
|
|
90
|
+
font-style: italic;
|
|
91
|
+
color: var(--ck-text-primary);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Inputs — paper feel, no inner shadow, ink-coloured borders. */
|
|
95
|
+
html[data-ck-chrome="editorial"] .ck-input,
|
|
96
|
+
html[data-ck-chrome="editorial"] .ck-textarea {
|
|
97
|
+
background: var(--ck-bg-surface);
|
|
98
|
+
border-color: var(--ck-border-subtle);
|
|
99
|
+
font-family: var(--ck-font-sans);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Action bar — keep the pill profile but drop the shadow. The
|
|
103
|
+
bar is just a hairline-bounded paper strip floating on cream. */
|
|
104
|
+
html[data-ck-chrome="editorial"] [data-ck-actionbar] {
|
|
105
|
+
background: var(--ck-bg-surface);
|
|
106
|
+
border-color: var(--ck-border-subtle);
|
|
107
|
+
box-shadow: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Left rail — same cream paper, hairline divider. */
|
|
111
|
+
html[data-ck-chrome="editorial"] [data-ck-leftnav] {
|
|
112
|
+
background: var(--ck-bg-canvas);
|
|
113
|
+
border-right-color: var(--ck-border-subtle);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Topbar — flatten to the paper, lose the bottom border (the
|
|
117
|
+
folio rule under it is the visual divider in editorial). */
|
|
118
|
+
html[data-ck-chrome="editorial"] [data-ck-topbar] {
|
|
119
|
+
background: var(--ck-bg-canvas);
|
|
120
|
+
border-bottom: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Modal backdrop — printerly, not glassy. Cream-tinted
|
|
124
|
+
translucent overlay instead of blue-tinted blur. */
|
|
125
|
+
html[data-ck-chrome="editorial"] [role="dialog"] > div:first-child {
|
|
126
|
+
background: rgba(15, 15, 15, 0.4);
|
|
127
|
+
backdrop-filter: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* <EditorialSpotlight>: dark canvas with cream cards floating on
|
|
131
|
+
top. The wrapper sets --ck-text-primary to cream so paragraphs
|
|
132
|
+
on the dark surround read correctly — but cards inside it stay
|
|
133
|
+
cream paper, so their text needs to flip BACK to dark ink. Rebind
|
|
134
|
+
the text variables on the .ck-card scope and everything nested
|
|
135
|
+
inside (h1/h2, body copy, eyebrows, captions) reads dark again. */
|
|
136
|
+
[data-ck-spotlight] .ck-card {
|
|
137
|
+
--ck-text-primary: #0F0F0F;
|
|
138
|
+
--ck-text-secondary: #6B6557;
|
|
139
|
+
--ck-text-tertiary: #A8A294;
|
|
140
|
+
color: #0F0F0F;
|
|
141
|
+
}
|
|
142
|
+
[data-ck-spotlight] .ck-card .ck-eyebrow,
|
|
143
|
+
[data-ck-spotlight] .ck-card .ck-tag {
|
|
144
|
+
color: var(--ck-text-secondary);
|
|
145
|
+
}
|