@monolith-forensics/monolith-ui 1.3.27 → 1.3.29
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.
|
@@ -193,6 +193,8 @@ DropDownProps = {}, debounceTime = 175, sort = false, disabled = false, }) => {
|
|
|
193
193
|
}, [onChange]);
|
|
194
194
|
const handleKeyDown = (e) => {
|
|
195
195
|
var _a;
|
|
196
|
+
if (disabled)
|
|
197
|
+
return;
|
|
196
198
|
// Escape key
|
|
197
199
|
if (e.key === KEYBOARD_KEYS.ESCAPE) {
|
|
198
200
|
const reference = (_a = refs === null || refs === void 0 ? void 0 : refs.reference) === null || _a === void 0 ? void 0 : _a.current;
|
|
@@ -353,7 +355,7 @@ DropDownProps = {}, debounceTime = 175, sort = false, disabled = false, }) => {
|
|
|
353
355
|
// ============================================================================
|
|
354
356
|
// Render
|
|
355
357
|
// ============================================================================
|
|
356
|
-
return (_jsxs(StyledContainer, { className: className, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(StyledInputContainer, { ref: refs.setReference, onMouseDown: () => setIsOpen(true), width: width, onKeyDown: handleKeyDown, "data-open": isOpen, "data-disabled": disabled, children: [_jsx(Input, { ref: inputRef, value: inputValue, onChange: handleInputChange, onFocus: handleFocus, autoFocus: focused, placeholder: placeholder, size: size, readOnly: !searchable && !allowCustomValue, "data-button-right": arrow || clearable, style: isOpen ? { borderColor: theme.palette.primary.main } : {} }), renderActionButton()] }), isOpen && (_jsx(FloatingPortal, { preserveTabOrder: true, children: _jsx(StyledFloatContainer, { ref: (ref) => {
|
|
358
|
+
return (_jsxs(StyledContainer, { className: className, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(StyledInputContainer, { ref: refs.setReference, onMouseDown: () => setIsOpen(true), width: width, onKeyDown: handleKeyDown, "data-open": isOpen, "data-disabled": disabled, tabIndex: disabled ? -1 : 0, children: [_jsx(Input, { ref: inputRef, value: inputValue, onChange: handleInputChange, onFocus: handleFocus, autoFocus: focused, disabled: disabled, tabIndex: disabled ? -1 : 0, placeholder: placeholder, size: size, readOnly: !searchable && !allowCustomValue, "data-button-right": arrow || clearable, style: isOpen ? { borderColor: theme.palette.primary.main } : {} }), renderActionButton()] }), isOpen && (_jsx(FloatingPortal, { preserveTabOrder: true, children: _jsx(StyledFloatContainer, { ref: (ref) => {
|
|
357
359
|
containerRef.current = ref;
|
|
358
360
|
refs.setFloating(ref);
|
|
359
361
|
}, style: floatingStyles, className: "mfFloating", children: _jsxs(StyledContent, Object.assign({ className: "mfFloatingContent", style: {
|
|
@@ -30,15 +30,21 @@ export const TR = styled.div `
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&[data-focused="true"] {
|
|
33
|
-
border
|
|
34
|
-
|
|
33
|
+
border: 1px solid transparent;
|
|
34
|
+
outline: 1px solid ${({ theme }) => theme.palette.primary.main};
|
|
35
|
+
outline-offset: -1px;
|
|
35
36
|
|
|
36
37
|
.mfui-td {
|
|
37
|
-
border-
|
|
38
|
-
|
|
38
|
+
border-bottom: 1px solid transparent;
|
|
39
|
+
background-color: ${({ theme }) => theme.palette.primary.main}20;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
// Select the row above the focused row
|
|
44
|
+
&:has(+ .mfui-tr[data-focused="true"]) .mfui-td {
|
|
45
|
+
border-bottom: 1px solid transparent;
|
|
46
|
+
}
|
|
47
|
+
|
|
42
48
|
&:hover > .mfui-td {
|
|
43
49
|
background-color: ${({ theme }) => theme.palette.action.hover};
|
|
44
50
|
}
|