@monolith-forensics/monolith-ui 1.3.34 → 1.3.36
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/dist/Alert/Alert.js +11 -7
- package/dist/SelectBox/SelectBox.js +4 -0
- package/package.json +1 -1
package/dist/Alert/Alert.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { AlertCircleIcon, AlertTriangleIcon, CheckIcon, InfoIcon, } from "lucide-react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
const Icons = {
|
|
5
|
-
info: _jsx(InfoIcon, { size:
|
|
6
|
-
success: _jsx(CheckIcon, { size:
|
|
7
|
-
warning: _jsx(AlertCircleIcon, { size:
|
|
8
|
-
error: _jsx(AlertTriangleIcon, { size:
|
|
9
|
-
default: _jsx(InfoIcon, { size:
|
|
5
|
+
info: _jsx(InfoIcon, { size: 20 }),
|
|
6
|
+
success: _jsx(CheckIcon, { size: 20 }),
|
|
7
|
+
warning: _jsx(AlertCircleIcon, { size: 20 }),
|
|
8
|
+
error: _jsx(AlertTriangleIcon, { size: 20 }),
|
|
9
|
+
default: _jsx(InfoIcon, { size: 20 }),
|
|
10
10
|
};
|
|
11
11
|
const StyledContainer = styled.div `
|
|
12
12
|
display: flex;
|
|
@@ -18,7 +18,10 @@ const StyledContainer = styled.div `
|
|
|
18
18
|
background-color: ${({ theme, variant }) => theme.alert[variant].background};
|
|
19
19
|
color: ${({ theme, variant }) => theme.alert[variant].color};
|
|
20
20
|
`;
|
|
21
|
-
const StyledTitle = styled.
|
|
21
|
+
const StyledTitle = styled.div `
|
|
22
|
+
height: 25px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
22
25
|
font-size: 14px;
|
|
23
26
|
font-weight: bold;
|
|
24
27
|
margin: 0px;
|
|
@@ -41,7 +44,8 @@ const StyledContentContainer = styled.div `
|
|
|
41
44
|
const StyledHeader = styled.div `
|
|
42
45
|
display: flex;
|
|
43
46
|
justify-content: flex-start;
|
|
44
|
-
|
|
47
|
+
height: 28px;
|
|
48
|
+
align-items: center;
|
|
45
49
|
`;
|
|
46
50
|
export const Alert = ({ children, variant = "info", title, onClose, }) => {
|
|
47
51
|
return (_jsxs(StyledContainer, { variant: variant, children: [_jsx(StyledHeader, { children: Icons[variant] }), _jsxs(StyledContentContainer, { children: [title && _jsx(StyledTitle, { variant: variant, children: title }), _jsx(StyledContent, { variant: variant, children: children })] })] }));
|
|
@@ -338,6 +338,10 @@ DropDownProps = {}, debounceTime = 175, sort = false, disabled = false, }) => {
|
|
|
338
338
|
item.scrollIntoView({ block: "nearest" });
|
|
339
339
|
}
|
|
340
340
|
}, [_value]);
|
|
341
|
+
// ensure that the input value is updated when the value changes when in controlled mode
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
setInputValue((_value === null || _value === void 0 ? void 0 : _value.label) || "");
|
|
344
|
+
}, [_value === null || _value === void 0 ? void 0 : _value.label]);
|
|
341
345
|
useEffect(() => {
|
|
342
346
|
if (bottomHeight < DEFAULT_DROPDOWN_HEIGHT) {
|
|
343
347
|
setPlacement("top-start");
|