@cosxai/ui 0.23.0 → 0.23.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
CHANGED
|
@@ -78,6 +78,13 @@ export function useKeyboardHotkey(
|
|
|
78
78
|
if (skipWhenModalOpen && document.querySelector('[role="dialog"]')) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
+
// The key is OURS once every guard passed — swallow its default
|
|
82
|
+
// action. Without this, a hotkey that opens a dialog with an
|
|
83
|
+
// autofocused input sees the same keystroke land as text ("s"
|
|
84
|
+
// typed into the invite search, meta QA 2026-08-19): the
|
|
85
|
+
// browser's text-insertion runs AFTER keydown, by which time
|
|
86
|
+
// focus has moved into the new input.
|
|
87
|
+
e.preventDefault();
|
|
81
88
|
handlerRef.current(e);
|
|
82
89
|
};
|
|
83
90
|
window.addEventListener("keydown", onKey);
|
|
@@ -696,14 +696,36 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(function Select
|
|
|
696
696
|
opacity: disabled ? 0.55 : 1,
|
|
697
697
|
}}
|
|
698
698
|
>
|
|
699
|
-
<span
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
699
|
+
<span style={{ display: "inline-grid", overflow: "hidden" }}>
|
|
700
|
+
{/* fit="auto" width stabiliser: every option label renders
|
|
701
|
+
invisibly in the same grid cell, so the trigger takes
|
|
702
|
+
the WIDEST option's width up front. Without it the
|
|
703
|
+
trigger resized to each selection and the popover
|
|
704
|
+
(which matches trigger width) truncated longer options
|
|
705
|
+
to "E-sig…". Skipped for fit="full" (width is the
|
|
706
|
+
container's) and for searchable lists (potentially
|
|
707
|
+
hundreds of rows — and those popovers are wide anyway). */}
|
|
708
|
+
{fit === "auto" &&
|
|
709
|
+
!searchable &&
|
|
710
|
+
options.map((o) => (
|
|
711
|
+
<span
|
|
712
|
+
key={o.value}
|
|
713
|
+
aria-hidden
|
|
714
|
+
style={{ gridArea: "1 / 1", visibility: "hidden", whiteSpace: "nowrap" }}
|
|
715
|
+
>
|
|
716
|
+
{o.label}
|
|
717
|
+
</span>
|
|
718
|
+
))}
|
|
719
|
+
<span
|
|
720
|
+
style={{
|
|
721
|
+
gridArea: "1 / 1",
|
|
722
|
+
overflow: "hidden",
|
|
723
|
+
textOverflow: "ellipsis",
|
|
724
|
+
whiteSpace: "nowrap",
|
|
725
|
+
}}
|
|
726
|
+
>
|
|
727
|
+
{triggerLabel}
|
|
728
|
+
</span>
|
|
707
729
|
</span>
|
|
708
730
|
<svg
|
|
709
731
|
width="10"
|