@cosxai/ui 0.18.0 → 0.18.2
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 +2 -2
- package/src/hooks/useKeyboardHotkey.ts +10 -4
- package/src/styles/base.css +26 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosxai/ui",
|
|
3
|
-
"version": "0.18.
|
|
4
|
-
"description": "COSX design system
|
|
3
|
+
"version": "0.18.2",
|
|
4
|
+
"description": "COSX design system — React 19 component primitives shared across product-meta and other consumers",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./src/index.ts",
|
|
@@ -60,11 +60,17 @@ export function useKeyboardHotkey(
|
|
|
60
60
|
if (skipInputs) {
|
|
61
61
|
const ae = document.activeElement as HTMLElement | null;
|
|
62
62
|
const tag = ae?.tagName;
|
|
63
|
+
// Containers marked data-hotkey-passthrough host editables
|
|
64
|
+
// the user never types into (e.g. a canvas spreadsheet's
|
|
65
|
+
// hidden cell-editor focus trap) — hotkeys stay live there.
|
|
66
|
+
// Mirrors the same convention in consumer apps.
|
|
67
|
+
const passthrough = !!ae?.closest?.('[data-hotkey-passthrough="true"]');
|
|
63
68
|
if (
|
|
64
|
-
|
|
65
|
-
tag === "
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
!passthrough &&
|
|
70
|
+
(tag === "INPUT" ||
|
|
71
|
+
tag === "TEXTAREA" ||
|
|
72
|
+
tag === "SELECT" ||
|
|
73
|
+
ae?.isContentEditable)
|
|
68
74
|
) {
|
|
69
75
|
return;
|
|
70
76
|
}
|
package/src/styles/base.css
CHANGED
|
@@ -123,6 +123,32 @@ a:visited { color: var(--ck-accent); }
|
|
|
123
123
|
scrollbar-color: var(--ck-border-strong, rgba(0, 0, 0, 0.25)) transparent;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/* Chromium < 121 doesn't know the standard properties above and fell
|
|
127
|
+
back to the classic arrow-button gutters (QA: Ben, 2026-07-24 —
|
|
128
|
+
the first pass "didn't cover everything"; it actually didn't cover
|
|
129
|
+
older ENGINES). The ::-webkit-scrollbar layer is the fallback for
|
|
130
|
+
those versions; engines that support scrollbar-width IGNORE these
|
|
131
|
+
pseudo-elements when it's set, so the two blocks never fight. */
|
|
132
|
+
*::-webkit-scrollbar {
|
|
133
|
+
width: 8px;
|
|
134
|
+
height: 8px;
|
|
135
|
+
}
|
|
136
|
+
*::-webkit-scrollbar-thumb {
|
|
137
|
+
background: var(--ck-border-strong, rgba(0, 0, 0, 0.25));
|
|
138
|
+
border-radius: 4px;
|
|
139
|
+
}
|
|
140
|
+
*::-webkit-scrollbar-track {
|
|
141
|
+
background: transparent;
|
|
142
|
+
}
|
|
143
|
+
*::-webkit-scrollbar-corner {
|
|
144
|
+
background: transparent;
|
|
145
|
+
}
|
|
146
|
+
*::-webkit-scrollbar-button {
|
|
147
|
+
display: none;
|
|
148
|
+
width: 0;
|
|
149
|
+
height: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
126
152
|
/* ── ActionBar panel + toast slots (design#13) ─────────────────────
|
|
127
153
|
Base chrome for the bar-intrinsic popover (useActionBarPanel) and
|
|
128
154
|
transient bubble (useActionBarToast). Token-driven so every theme
|