@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.
Files changed (109) hide show
  1. package/package.json +38 -0
  2. package/src/actionbar/ActionBar.tsx +436 -0
  3. package/src/actionbar/ActionBarButton.tsx +110 -0
  4. package/src/actionbar/ActionBarMenuGroup.tsx +106 -0
  5. package/src/actionbar/ActionBarProvider.tsx +76 -0
  6. package/src/actionbar/actionbar-context.ts +23 -0
  7. package/src/actionbar/index.ts +13 -0
  8. package/src/actionbar/types.ts +50 -0
  9. package/src/actionbar/useActionBarItems.ts +47 -0
  10. package/src/ambient/AmbientBackdrop.tsx +74 -0
  11. package/src/ambient/CommandInput.tsx +107 -0
  12. package/src/ambient/SuperbarStrip.tsx +36 -0
  13. package/src/ambient/index.ts +6 -0
  14. package/src/bento/BentoCell.tsx +66 -0
  15. package/src/bento/BentoGrid.tsx +42 -0
  16. package/src/bento/index.ts +2 -0
  17. package/src/command/CommandPalette.tsx +277 -0
  18. package/src/command/CommandProvider.tsx +57 -0
  19. package/src/command/command-context.ts +12 -0
  20. package/src/command/index.ts +6 -0
  21. package/src/command/rank.ts +45 -0
  22. package/src/command/types.ts +26 -0
  23. package/src/command/useCommandSource.ts +37 -0
  24. package/src/dialogs/DialogsProvider.tsx +216 -0
  25. package/src/dialogs/Modal.tsx +204 -0
  26. package/src/dialogs/Toast.tsx +85 -0
  27. package/src/dialogs/dialogs-context.ts +6 -0
  28. package/src/dialogs/index.ts +10 -0
  29. package/src/dialogs/types.ts +37 -0
  30. package/src/dialogs/useDialogs.ts +8 -0
  31. package/src/editorial/EditorialSpotlight.tsx +63 -0
  32. package/src/editorial/Folio.tsx +52 -0
  33. package/src/editorial/PlateMarker.tsx +33 -0
  34. package/src/editorial/RomanSection.tsx +65 -0
  35. package/src/editorial/RunningMarginalia.tsx +65 -0
  36. package/src/editorial/index.ts +10 -0
  37. package/src/frutiger/GlossyOrb.tsx +79 -0
  38. package/src/frutiger/SkyBackdrop.tsx +114 -0
  39. package/src/frutiger/index.ts +2 -0
  40. package/src/hooks/index.ts +5 -0
  41. package/src/hooks/useKeyboardHotkey.ts +80 -0
  42. package/src/hooks/useReducedMotion.ts +20 -0
  43. package/src/hooks/useViewport.ts +61 -0
  44. package/src/index.ts +26 -0
  45. package/src/layout/Breadcrumb.tsx +74 -0
  46. package/src/layout/LeftNavRail.tsx +126 -0
  47. package/src/layout/MobileTabBar.tsx +101 -0
  48. package/src/layout/NavItem.tsx +128 -0
  49. package/src/layout/NavSearchTrigger.tsx +88 -0
  50. package/src/layout/NavSection.tsx +40 -0
  51. package/src/layout/RightSidebarPanel.tsx +111 -0
  52. package/src/layout/Shell.tsx +91 -0
  53. package/src/layout/StickyBanner.tsx +83 -0
  54. package/src/layout/Topbar.tsx +68 -0
  55. package/src/layout/index.ts +22 -0
  56. package/src/layout/useNavRailState.ts +69 -0
  57. package/src/lib/cn.ts +7 -0
  58. package/src/lib/time-utils.ts +44 -0
  59. package/src/neobrutalism/Marquee.tsx +81 -0
  60. package/src/neobrutalism/Sticker.tsx +71 -0
  61. package/src/neobrutalism/index.ts +4 -0
  62. package/src/primitives/Avatar.tsx +53 -0
  63. package/src/primitives/Button.tsx +30 -0
  64. package/src/primitives/Card.tsx +41 -0
  65. package/src/primitives/Checkbox.tsx +78 -0
  66. package/src/primitives/CountBadge.tsx +50 -0
  67. package/src/primitives/Input.tsx +71 -0
  68. package/src/primitives/Kbd.tsx +45 -0
  69. package/src/primitives/PageHeader.tsx +77 -0
  70. package/src/primitives/Tag.tsx +56 -0
  71. package/src/primitives/Textarea.tsx +62 -0
  72. package/src/primitives/ToggleSwitch.tsx +79 -0
  73. package/src/primitives/Tooltip.tsx +171 -0
  74. package/src/primitives/index.ts +24 -0
  75. package/src/pwa/InstallPromptBanner.tsx +132 -0
  76. package/src/pwa/index.ts +4 -0
  77. package/src/pwa/manifest.template.json +20 -0
  78. package/src/pwa/registerSW.ts +55 -0
  79. package/src/riso/Halftone.tsx +85 -0
  80. package/src/riso/Misregister.tsx +63 -0
  81. package/src/riso/RisoStamp.tsx +76 -0
  82. package/src/riso/index.ts +3 -0
  83. package/src/sketch/HandUnderline.tsx +53 -0
  84. package/src/sketch/RoughArrow.tsx +91 -0
  85. package/src/sketch/RoughBox.tsx +73 -0
  86. package/src/sketch/StickyNote.tsx +56 -0
  87. package/src/sketch/index.ts +4 -0
  88. package/src/styles/base.css +80 -0
  89. package/src/styles/chrome-ambient.css +222 -0
  90. package/src/styles/chrome-bento.css +184 -0
  91. package/src/styles/chrome-editorial.css +145 -0
  92. package/src/styles/chrome-frutiger.css +364 -0
  93. package/src/styles/chrome-neobrutalism.css +315 -0
  94. package/src/styles/chrome-riso.css +328 -0
  95. package/src/styles/chrome-sketch.css +351 -0
  96. package/src/styles/chrome-swiss.css +232 -0
  97. package/src/styles/chrome-terminal.css +235 -0
  98. package/src/styles/fonts.css +22 -0
  99. package/src/styles/index.css +198 -0
  100. package/src/styles/tokens.css +976 -0
  101. package/src/terminal/AsciiBox.tsx +65 -0
  102. package/src/terminal/BrailleSpinner.tsx +46 -0
  103. package/src/terminal/index.ts +4 -0
  104. package/src/theme/ThemeProvider.tsx +93 -0
  105. package/src/theme/index.ts +5 -0
  106. package/src/theme/inline-script.ts +36 -0
  107. package/src/theme/theme-context.ts +7 -0
  108. package/src/theme/types.ts +22 -0
  109. package/src/theme/useTheme.ts +8 -0
@@ -0,0 +1,232 @@
1
+ /* Swiss chrome — component overrides.
2
+ Tokens.css supplies the achromatic palette + red accent. This
3
+ file strips every primitive of decoration: cards lose fill and
4
+ shadows, becoming rules-only; inputs lose all borders except
5
+ the bottom; tags lose pill backgrounds and become dot + text;
6
+ headings tighten letter-spacing. */
7
+
8
+ html[data-ck-chrome="swiss"] body {
9
+ font-weight: 400;
10
+ font-feature-settings: "ss01", "cv11", "tnum";
11
+ }
12
+
13
+ /* ===== Typography =========================================== */
14
+
15
+ html[data-ck-chrome="swiss"] h1,
16
+ html[data-ck-chrome="swiss"] .ck-h1 {
17
+ font-family: var(--ck-font-sans);
18
+ font-weight: 700;
19
+ letter-spacing: -0.03em;
20
+ line-height: 0.98;
21
+ }
22
+ html[data-ck-chrome="swiss"] h2,
23
+ html[data-ck-chrome="swiss"] .ck-h2 {
24
+ font-family: var(--ck-font-sans);
25
+ font-weight: 600;
26
+ letter-spacing: -0.015em;
27
+ line-height: 1.1;
28
+ }
29
+ html[data-ck-chrome="swiss"] h3,
30
+ html[data-ck-chrome="swiss"] .ck-h3 {
31
+ font-weight: 600;
32
+ letter-spacing: -0.005em;
33
+ }
34
+
35
+ html[data-ck-chrome="swiss"] .ck-eyebrow {
36
+ letter-spacing: 0.06em;
37
+ font-weight: 500;
38
+ }
39
+
40
+ /* ===== Buttons — small radius, no shadow ==================== */
41
+
42
+ html[data-ck-chrome="swiss"] .ck-btn,
43
+ html[data-ck-chrome="swiss"] .ck-actionbar-btn {
44
+ border-radius: 3px;
45
+ font-weight: 500;
46
+ letter-spacing: 0;
47
+ text-transform: none;
48
+ box-shadow: none !important;
49
+ }
50
+ html[data-ck-chrome="swiss"] .ck-btn--primary {
51
+ background: var(--ck-text-primary);
52
+ color: var(--ck-bg-canvas);
53
+ border: none;
54
+ }
55
+ html[data-ck-chrome="swiss"] .ck-btn--primary:hover:not(:disabled) {
56
+ background: var(--ck-text-secondary);
57
+ }
58
+ html[data-ck-chrome="swiss"] .ck-btn--secondary {
59
+ background: transparent;
60
+ border: 1px solid var(--ck-text-primary);
61
+ color: var(--ck-text-primary);
62
+ }
63
+ html[data-ck-chrome="swiss"] .ck-btn--secondary:hover:not(:disabled) {
64
+ background: var(--ck-text-primary);
65
+ color: var(--ck-bg-canvas);
66
+ }
67
+ html[data-ck-chrome="swiss"] .ck-btn--ghost {
68
+ background: transparent;
69
+ color: var(--ck-text-primary);
70
+ border: none;
71
+ }
72
+ html[data-ck-chrome="swiss"] .ck-btn--ghost:hover:not(:disabled) {
73
+ background: var(--ck-bg-muted);
74
+ }
75
+
76
+ /* ===== Inputs — bottom-border-only (canonical Swiss form) === */
77
+
78
+ html[data-ck-chrome="swiss"] .ck-input,
79
+ html[data-ck-chrome="swiss"] .ck-textarea {
80
+ background: transparent !important;
81
+ border: none !important;
82
+ border-bottom: 1px solid var(--ck-border-subtle) !important;
83
+ border-radius: 0 !important;
84
+ padding-left: 0 !important;
85
+ padding-right: 0 !important;
86
+ color: var(--ck-text-primary);
87
+ transition: border-bottom-color 120ms ease, border-bottom-width 120ms ease;
88
+ }
89
+ html[data-ck-chrome="swiss"] .ck-input:focus-visible,
90
+ html[data-ck-chrome="swiss"] .ck-textarea:focus-visible {
91
+ outline: none;
92
+ border-bottom-color: var(--ck-text-primary) !important;
93
+ border-bottom-width: 2px !important;
94
+ box-shadow: none !important;
95
+ }
96
+
97
+ /* ===== Cards — rules-only sectioning ======================== */
98
+
99
+ html[data-ck-chrome="swiss"] .ck-card {
100
+ background: transparent !important;
101
+ border: none !important;
102
+ border-top: 1px solid var(--ck-border-subtle) !important;
103
+ border-bottom: 1px solid var(--ck-border-subtle) !important;
104
+ border-radius: 0 !important;
105
+ box-shadow: none !important;
106
+ }
107
+ html[data-ck-chrome="swiss"] .ck-card__head {
108
+ border-bottom: 1px solid var(--ck-border-subtle);
109
+ padding: 16px 0;
110
+ }
111
+ html[data-ck-chrome="swiss"] .ck-card__body {
112
+ padding: 16px 0;
113
+ }
114
+ html[data-ck-chrome="swiss"] .ck-card__foot {
115
+ border-top: 1px solid var(--ck-border-subtle);
116
+ background: transparent;
117
+ padding: 12px 0;
118
+ }
119
+
120
+ /* ===== Tags — dot + text only, no pill ====================== */
121
+
122
+ html[data-ck-chrome="swiss"] [data-ck-tag] {
123
+ background: transparent !important;
124
+ border: none !important;
125
+ padding: 0 !important;
126
+ box-shadow: none !important;
127
+ letter-spacing: 0.02em !important;
128
+ text-transform: none !important;
129
+ font-weight: 500 !important;
130
+ font-size: 12px !important;
131
+ display: inline-flex !important;
132
+ align-items: center !important;
133
+ gap: 6px !important;
134
+ }
135
+ html[data-ck-chrome="swiss"] [data-ck-tag]::before {
136
+ content: "";
137
+ width: 6px;
138
+ height: 6px;
139
+ border-radius: 50%;
140
+ background: currentColor;
141
+ flex-shrink: 0;
142
+ }
143
+ html[data-ck-chrome="swiss"] [data-ck-tag][data-tone="accent"] {
144
+ color: var(--ck-accent) !important;
145
+ }
146
+ html[data-ck-chrome="swiss"] [data-ck-tag][data-tone="success"] {
147
+ color: #15803D !important;
148
+ }
149
+ html[data-ck-chrome="swiss"] [data-ck-tag][data-tone="warning"] {
150
+ color: var(--ck-text-primary) !important;
151
+ }
152
+ html[data-ck-chrome="swiss"] [data-ck-tag][data-tone="critical"] {
153
+ color: var(--ck-accent) !important;
154
+ }
155
+ html[data-ck-chrome="swiss"] [data-ck-tag][data-tone="neutral"] {
156
+ color: var(--ck-text-secondary) !important;
157
+ }
158
+
159
+ /* ===== Layout chrome ======================================== */
160
+
161
+ html[data-ck-chrome="swiss"] [data-ck-leftnav] {
162
+ background: var(--ck-bg-canvas) !important;
163
+ border-right: 1px solid var(--ck-border-subtle);
164
+ }
165
+ html[data-ck-chrome="swiss"] [data-ck-topbar] {
166
+ background: var(--ck-bg-canvas) !important;
167
+ border-bottom: 1px solid var(--ck-border-subtle);
168
+ }
169
+
170
+ /* ===== NavItem — text-only, weight change on active =========
171
+ Swiss nav is just a list of words; emphasis comes from weight,
172
+ not from background pills. Active gets weight 600. Leading
173
+ icons hidden. */
174
+ html[data-ck-chrome="swiss"] [data-ck-navitem] {
175
+ background: transparent !important;
176
+ border: none !important;
177
+ border-radius: 0 !important;
178
+ font-weight: 400 !important;
179
+ color: var(--ck-text-secondary) !important;
180
+ padding: 6px 8px !important;
181
+ }
182
+ html[data-ck-chrome="swiss"] [data-ck-navitem]:hover {
183
+ color: var(--ck-text-primary) !important;
184
+ }
185
+ html[data-ck-chrome="swiss"] [data-ck-navitem][data-active="true"] {
186
+ font-weight: 600 !important;
187
+ color: var(--ck-text-primary) !important;
188
+ background: transparent !important;
189
+ }
190
+ /* Hide leading icons — "no icons before nav items" per the brief. */
191
+ html[data-ck-chrome="swiss"] [data-ck-navitem] svg,
192
+ html[data-ck-chrome="swiss"] [data-ck-navitem] span > span:first-child {
193
+ display: none;
194
+ }
195
+
196
+ /* ===== Search trigger ======================================= */
197
+
198
+ html[data-ck-chrome="swiss"] [data-ck-search-trigger] {
199
+ background: transparent !important;
200
+ border: 1px solid var(--ck-border-subtle) !important;
201
+ border-radius: 3px !important;
202
+ box-shadow: none !important;
203
+ }
204
+
205
+ /* ===== Action bar ========================================== */
206
+
207
+ html[data-ck-chrome="swiss"] [data-ck-actionbar] {
208
+ background: var(--ck-bg-canvas) !important;
209
+ border: 1px solid var(--ck-border-subtle);
210
+ border-radius: 3px;
211
+ box-shadow: none !important;
212
+ }
213
+
214
+ /* ===== Modal =============================================== */
215
+
216
+ html[data-ck-chrome="swiss"] [role="dialog"] > div:first-child {
217
+ background: rgba(0, 0, 0, 0.5);
218
+ backdrop-filter: none;
219
+ }
220
+ html[data-ck-chrome="swiss"] [role="dialog"] > div > div {
221
+ border-radius: 3px;
222
+ border: 1px solid var(--ck-text-primary);
223
+ box-shadow: none;
224
+ }
225
+
226
+ /* ===== Links — accent underline ============================ */
227
+
228
+ html[data-ck-chrome="swiss"] a {
229
+ color: var(--ck-accent);
230
+ text-underline-offset: 3px;
231
+ text-decoration-thickness: 1px;
232
+ }
@@ -0,0 +1,235 @@
1
+ /* Terminal chrome — component overrides.
2
+ Tokens.css supplies the palette and forces font-display +
3
+ font-sans to point at font-mono. This file strips every
4
+ primitive of its softness: square corners, 1 px borders, no
5
+ shadows, monospace everywhere. */
6
+
7
+ html[data-ck-chrome="terminal"] body {
8
+ font-family: var(--ck-font-mono);
9
+ font-weight: 400;
10
+ font-feature-settings: "tnum", "zero", "calt" 0;
11
+ letter-spacing: 0;
12
+ }
13
+
14
+ /* ===== Typography =========================================== */
15
+
16
+ html[data-ck-chrome="terminal"] h1,
17
+ html[data-ck-chrome="terminal"] .ck-h1 {
18
+ font-family: var(--ck-font-mono);
19
+ font-weight: 600;
20
+ letter-spacing: -0.01em;
21
+ line-height: 1.1;
22
+ }
23
+ html[data-ck-chrome="terminal"] h2,
24
+ html[data-ck-chrome="terminal"] .ck-h2 {
25
+ font-family: var(--ck-font-mono);
26
+ font-weight: 600;
27
+ letter-spacing: 0;
28
+ line-height: 1.2;
29
+ }
30
+ html[data-ck-chrome="terminal"] h3,
31
+ html[data-ck-chrome="terminal"] .ck-h3 {
32
+ font-family: var(--ck-font-mono);
33
+ font-weight: 600;
34
+ }
35
+
36
+ html[data-ck-chrome="terminal"] .ck-eyebrow,
37
+ html[data-ck-chrome="terminal"] .ck-tag {
38
+ letter-spacing: 0;
39
+ font-family: var(--ck-font-mono);
40
+ }
41
+
42
+ html[data-ck-chrome="terminal"] code {
43
+ background: var(--ck-bg-surface-2);
44
+ border: 1px solid var(--ck-border-subtle);
45
+ border-radius: 2px;
46
+ padding: 1px 6px;
47
+ }
48
+ html[data-ck-chrome="terminal"] pre {
49
+ background: var(--ck-bg-surface);
50
+ border: 1px solid var(--ck-border-subtle);
51
+ border-radius: 2px;
52
+ }
53
+
54
+ /* ===== Buttons ============================================== */
55
+
56
+ html[data-ck-chrome="terminal"] .ck-btn,
57
+ html[data-ck-chrome="terminal"] .ck-actionbar-btn {
58
+ border-radius: 2px;
59
+ font-family: var(--ck-font-mono);
60
+ font-weight: 500;
61
+ letter-spacing: 0;
62
+ text-transform: none;
63
+ box-shadow: none !important;
64
+ border: 1px solid var(--ck-border-subtle);
65
+ }
66
+ html[data-ck-chrome="terminal"] .ck-btn--primary {
67
+ background: var(--ck-text-primary);
68
+ color: var(--ck-bg-canvas);
69
+ border-color: var(--ck-text-primary);
70
+ }
71
+ html[data-ck-chrome="terminal"] .ck-btn--primary:hover:not(:disabled) {
72
+ background: var(--ck-bg-canvas);
73
+ color: var(--ck-text-primary);
74
+ }
75
+ html[data-ck-chrome="terminal"] .ck-btn--secondary {
76
+ background: transparent;
77
+ color: var(--ck-text-primary);
78
+ border-color: var(--ck-border-subtle);
79
+ }
80
+ html[data-ck-chrome="terminal"] .ck-btn--secondary:hover:not(:disabled) {
81
+ border-color: var(--ck-border-strong);
82
+ background: var(--ck-bg-surface);
83
+ }
84
+ html[data-ck-chrome="terminal"] .ck-btn--ghost {
85
+ background: transparent;
86
+ border: 1px solid transparent;
87
+ }
88
+ html[data-ck-chrome="terminal"] .ck-btn--ghost:hover:not(:disabled) {
89
+ border-color: var(--ck-border-subtle);
90
+ }
91
+
92
+ /* ===== Inputs ============================================== */
93
+
94
+ html[data-ck-chrome="terminal"] .ck-input,
95
+ html[data-ck-chrome="terminal"] .ck-textarea {
96
+ background: var(--ck-bg-surface-2);
97
+ border: 1px solid var(--ck-border-subtle) !important;
98
+ border-radius: 2px !important;
99
+ font-family: var(--ck-font-mono);
100
+ color: var(--ck-text-primary);
101
+ }
102
+ html[data-ck-chrome="terminal"] .ck-input:focus-visible,
103
+ html[data-ck-chrome="terminal"] .ck-textarea:focus-visible {
104
+ outline: none;
105
+ border-color: var(--ck-border-strong) !important;
106
+ border-top-color: var(--ck-accent) !important;
107
+ box-shadow: none !important;
108
+ }
109
+
110
+ /* ===== Cards ================================================ */
111
+
112
+ html[data-ck-chrome="terminal"] .ck-card {
113
+ background: var(--ck-bg-surface);
114
+ border: 1px solid var(--ck-border-subtle);
115
+ border-radius: 2px;
116
+ box-shadow: none;
117
+ }
118
+ html[data-ck-chrome="terminal"] .ck-card__head {
119
+ border-bottom: 1px solid var(--ck-border-subtle);
120
+ padding: 12px 16px;
121
+ }
122
+ html[data-ck-chrome="terminal"] .ck-card__body {
123
+ padding: 14px 16px;
124
+ }
125
+ html[data-ck-chrome="terminal"] .ck-card__foot {
126
+ border-top: 1px solid var(--ck-border-subtle);
127
+ background: transparent;
128
+ padding: 10px 16px;
129
+ }
130
+
131
+ /* ===== Tags — bracketed text + coloured dot ================ */
132
+
133
+ html[data-ck-chrome="terminal"] [data-ck-tag] {
134
+ background: transparent !important;
135
+ border: none !important;
136
+ padding: 0 !important;
137
+ box-shadow: none !important;
138
+ font-family: var(--ck-font-mono) !important;
139
+ font-weight: 500 !important;
140
+ letter-spacing: 0 !important;
141
+ text-transform: none !important;
142
+ font-size: 12px !important;
143
+ display: inline-flex !important;
144
+ align-items: center !important;
145
+ }
146
+ html[data-ck-chrome="terminal"] [data-ck-tag]::before {
147
+ content: "[● ";
148
+ color: currentColor;
149
+ }
150
+ html[data-ck-chrome="terminal"] [data-ck-tag]::after {
151
+ content: " ]";
152
+ color: var(--ck-text-secondary);
153
+ }
154
+ html[data-ck-chrome="terminal"] [data-ck-tag][data-tone="accent"] {
155
+ color: var(--ck-term-cyan) !important;
156
+ }
157
+ html[data-ck-chrome="terminal"] [data-ck-tag][data-tone="success"] {
158
+ color: var(--ck-term-green) !important;
159
+ }
160
+ html[data-ck-chrome="terminal"] [data-ck-tag][data-tone="warning"] {
161
+ color: var(--ck-term-amber) !important;
162
+ }
163
+ html[data-ck-chrome="terminal"] [data-ck-tag][data-tone="critical"] {
164
+ color: var(--ck-term-red) !important;
165
+ }
166
+ html[data-ck-chrome="terminal"] [data-ck-tag][data-tone="neutral"] {
167
+ color: var(--ck-text-secondary) !important;
168
+ }
169
+
170
+ /* ===== Layout chrome ======================================== */
171
+
172
+ html[data-ck-chrome="terminal"] [data-ck-leftnav] {
173
+ background: var(--ck-bg-canvas) !important;
174
+ border-right: 1px solid var(--ck-border-subtle);
175
+ }
176
+ html[data-ck-chrome="terminal"] [data-ck-topbar] {
177
+ background: var(--ck-bg-canvas) !important;
178
+ border-bottom: 1px solid var(--ck-border-subtle);
179
+ font-family: var(--ck-font-mono);
180
+ }
181
+
182
+ /* ===== NavItem — TUI inverted selection on active =========== */
183
+
184
+ html[data-ck-chrome="terminal"] [data-ck-navitem] {
185
+ background: transparent !important;
186
+ border: 1px solid transparent !important;
187
+ border-radius: 2px !important;
188
+ font-family: var(--ck-font-mono) !important;
189
+ font-weight: 400 !important;
190
+ color: var(--ck-text-secondary) !important;
191
+ padding: 6px 10px !important;
192
+ }
193
+ html[data-ck-chrome="terminal"] [data-ck-navitem]:not([data-active="true"]):hover {
194
+ background: var(--ck-bg-surface) !important;
195
+ color: var(--ck-text-primary) !important;
196
+ }
197
+ /* Classic TUI selection — invert. */
198
+ html[data-ck-chrome="terminal"] [data-ck-navitem][data-active="true"] {
199
+ background: var(--ck-text-primary) !important;
200
+ color: var(--ck-bg-canvas) !important;
201
+ font-weight: 500 !important;
202
+ }
203
+
204
+ /* ===== Search trigger ====================================== */
205
+
206
+ html[data-ck-chrome="terminal"] [data-ck-search-trigger] {
207
+ background: var(--ck-bg-surface) !important;
208
+ border: 1px solid var(--ck-border-subtle) !important;
209
+ border-radius: 2px !important;
210
+ box-shadow: none !important;
211
+ font-family: var(--ck-font-mono) !important;
212
+ }
213
+
214
+ /* ===== Action bar ========================================== */
215
+
216
+ html[data-ck-chrome="terminal"] [data-ck-actionbar] {
217
+ background: var(--ck-bg-surface) !important;
218
+ border: 1px solid var(--ck-border-subtle);
219
+ border-radius: 2px;
220
+ box-shadow: none !important;
221
+ font-family: var(--ck-font-mono);
222
+ }
223
+
224
+ /* ===== Modal =============================================== */
225
+
226
+ html[data-ck-chrome="terminal"] [role="dialog"] > div:first-child {
227
+ background: rgba(0, 0, 0, 0.6);
228
+ backdrop-filter: none;
229
+ }
230
+ html[data-ck-chrome="terminal"] [role="dialog"] > div > div {
231
+ border-radius: 2px;
232
+ border: 1px solid var(--ck-border-strong);
233
+ box-shadow: none;
234
+ font-family: var(--ck-font-mono);
235
+ }
@@ -0,0 +1,22 @@
1
+ /* @font-face declarations for the kit's default sans + mono.
2
+ Consumer projects supply the OTF/WOFF2 files under /fonts/ (the
3
+ library's public/fonts/ directory is a reference copy for when
4
+ the kit is consumed standalone). Swap out for your own brand
5
+ stack by overriding --ck-font-sans / --ck-font-mono after
6
+ importing this file. */
7
+
8
+ @font-face {
9
+ font-family: "Geist";
10
+ src: url("/fonts/Geist-Regular.otf") format("opentype");
11
+ font-weight: 400 700;
12
+ font-style: normal;
13
+ font-display: swap;
14
+ }
15
+
16
+ @font-face {
17
+ font-family: "Geist Mono";
18
+ src: url("/fonts/GeistMono-Regular.otf") format("opentype");
19
+ font-weight: 400 600;
20
+ font-style: normal;
21
+ font-display: swap;
22
+ }
@@ -0,0 +1,198 @@
1
+ /* @cosxai/ui — single stylesheet consumers import.
2
+ Order matters: fonts → tokens → base → component CSS →
3
+ chrome variants. Each chrome-* file is scoped to a
4
+ `html[data-ck-chrome="<name>"]` selector so it's a no-op
5
+ until that chrome is selected. */
6
+
7
+ @import "./fonts.css";
8
+ @import "./tokens.css";
9
+ @import "./base.css";
10
+ @import "./chrome-editorial.css";
11
+ @import "./chrome-neobrutalism.css";
12
+ @import "./chrome-ambient.css";
13
+ @import "./chrome-swiss.css";
14
+ @import "./chrome-terminal.css";
15
+ @import "./chrome-bento.css";
16
+ @import "./chrome-frutiger.css";
17
+ @import "./chrome-riso.css";
18
+ @import "./chrome-sketch.css";
19
+
20
+ /* ---------- Button (Phase 0 bootstrap — Phase 3 will replace
21
+ this with full variant + size + loading-state styles
22
+ keyed off the tokens block). ---------- */
23
+
24
+ .ck-btn {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ gap: 8px;
28
+ height: 32px;
29
+ padding: 0 12px;
30
+ border-radius: var(--ck-radius-sm);
31
+ font: 500 13px/1 var(--ck-font-sans);
32
+ border: 1px solid transparent;
33
+ background: transparent;
34
+ color: var(--ck-text-primary);
35
+ cursor: pointer;
36
+ white-space: nowrap;
37
+ transition: background var(--ck-dur-fast) var(--ck-ease), border-color var(--ck-dur-fast) var(--ck-ease);
38
+ }
39
+
40
+ .ck-btn:disabled { opacity: 0.5; cursor: not-allowed; }
41
+
42
+ .ck-btn--primary {
43
+ background: var(--ck-accent);
44
+ color: var(--ck-text-inverse);
45
+ }
46
+ .ck-btn--primary:hover { background: var(--ck-accent-hover); }
47
+
48
+ .ck-btn--secondary {
49
+ background: var(--ck-bg-surface);
50
+ color: var(--ck-text-primary);
51
+ border-color: var(--ck-border-strong);
52
+ }
53
+ .ck-btn--secondary:hover { background: var(--ck-bg-muted); }
54
+
55
+ .ck-btn--ghost {
56
+ background: transparent;
57
+ color: var(--ck-text-primary);
58
+ }
59
+ .ck-btn--ghost:hover { background: var(--ck-bg-muted); }
60
+
61
+ .ck-btn--icon {
62
+ background: transparent;
63
+ color: var(--ck-text-secondary);
64
+ width: 32px;
65
+ padding: 0;
66
+ justify-content: center;
67
+ }
68
+ .ck-btn--icon:hover {
69
+ background: var(--ck-bg-muted);
70
+ color: var(--ck-text-primary);
71
+ }
72
+
73
+ /* ---------- Card ---------- */
74
+ .ck-card {
75
+ background: var(--ck-bg-surface);
76
+ border: 1px solid var(--ck-border-subtle);
77
+ border-radius: var(--ck-radius-md);
78
+ overflow: hidden;
79
+ }
80
+ html[data-ck-chrome="seamless"] .ck-card {
81
+ border-color: transparent;
82
+ border-radius: 14px;
83
+ box-shadow: var(--ck-shadow-1);
84
+ }
85
+ .ck-card__head {
86
+ padding: 14px 20px;
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 12px;
90
+ border-bottom: 1px solid var(--ck-border-subtle);
91
+ }
92
+ html[data-ck-chrome="seamless"] .ck-card__head {
93
+ border-bottom-color: transparent;
94
+ padding-bottom: 8px;
95
+ }
96
+ .ck-card__body {
97
+ padding: 20px;
98
+ }
99
+ .ck-card__foot {
100
+ padding: 12px 20px;
101
+ border-top: 1px solid var(--ck-border-subtle);
102
+ background: var(--ck-bg-surface-2);
103
+ }
104
+ html[data-ck-chrome="seamless"] .ck-card__foot {
105
+ border-top-color: transparent;
106
+ background: transparent;
107
+ }
108
+
109
+ /* ---------- Input + Textarea focus state ---------- */
110
+ .ck-input:focus-visible,
111
+ .ck-textarea:focus-visible {
112
+ border-color: var(--ck-accent) !important;
113
+ box-shadow: 0 0 0 3px var(--ck-accent-muted);
114
+ }
115
+ .ck-input::placeholder,
116
+ .ck-textarea::placeholder {
117
+ color: var(--ck-text-tertiary);
118
+ }
119
+
120
+ /* ---------- ActionBar — button row inside <ActionBar> ---------- */
121
+ .ck-actionbar-btn {
122
+ display: inline-flex;
123
+ align-items: center;
124
+ gap: 6px;
125
+ height: 36px;
126
+ padding: 0 12px;
127
+ border: 1px solid transparent;
128
+ background: transparent;
129
+ color: var(--ck-text-primary);
130
+ font: 500 13px/1 var(--ck-font-sans);
131
+ border-radius: 999px;
132
+ cursor: pointer;
133
+ white-space: nowrap;
134
+ transition: background var(--ck-dur-fast) var(--ck-ease), color var(--ck-dur-fast) var(--ck-ease);
135
+ }
136
+ .ck-actionbar-btn:hover:not(:disabled):not(.ck-actionbar-btn--primary) {
137
+ background: var(--ck-bg-muted);
138
+ }
139
+ .ck-actionbar-btn--primary {
140
+ background: var(--ck-accent);
141
+ color: var(--ck-text-inverse);
142
+ }
143
+ .ck-actionbar-btn--primary:hover:not(:disabled) {
144
+ background: var(--ck-accent-hover);
145
+ }
146
+ .ck-actionbar-btn:disabled {
147
+ opacity: 0.5;
148
+ cursor: not-allowed;
149
+ }
150
+
151
+ /* Hide labels below 768 px (the standard md breakpoint).
152
+ Icons + tooltips remain — the bar's still informative on phones. */
153
+ @media (max-width: 767px) {
154
+ .ck-actionbar-label {
155
+ display: none;
156
+ }
157
+ }
158
+
159
+ /* Spring entry from the left edge — only applied when the bar
160
+ sits at its default centred position. A dragged custom position
161
+ doesn't replay this on mount. Back-out easing overshoots ~10%
162
+ so the bar reads as "stuck to the edge". */
163
+ @keyframes ck-actionbar-enter {
164
+ from {
165
+ opacity: 0;
166
+ transform: translateX(calc(-50% - 240px));
167
+ }
168
+ to {
169
+ opacity: 1;
170
+ transform: translateX(-50%);
171
+ }
172
+ }
173
+ .ck-actionbar-enter {
174
+ animation: ck-actionbar-enter 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
175
+ }
176
+
177
+ /* Phone collapsed-to-handle peek-in animation. Pairs with the
178
+ half-pill render path in ActionBar.tsx. */
179
+ @keyframes ck-action-handle-enter {
180
+ from {
181
+ opacity: 0;
182
+ transform: translateX(-110%);
183
+ }
184
+ to {
185
+ opacity: 1;
186
+ transform: translateX(0);
187
+ }
188
+ }
189
+ .ck-action-handle-enter {
190
+ animation: ck-action-handle-enter 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
191
+ }
192
+
193
+ @media (prefers-reduced-motion: reduce) {
194
+ .ck-actionbar-enter,
195
+ .ck-action-handle-enter {
196
+ animation: none;
197
+ }
198
+ }