@monolith-forensics/monolith-ui 1.2.11 → 1.2.13
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/Pill/Pill.d.ts +2 -1
- package/dist/Pill/Pill.js +2 -2
- package/dist/TagBox/TagBox.js +0 -6
- package/package.json +1 -1
package/dist/Pill/Pill.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { Size } from "../core";
|
|
|
3
3
|
interface PillProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
+
title?: string;
|
|
6
7
|
size?: Size;
|
|
7
8
|
showRemoveIcon?: boolean;
|
|
8
9
|
onRemove?: () => void;
|
|
9
10
|
}
|
|
10
|
-
declare const Pill: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<PillProps, never>> & string & Omit<({ className, children, size, showRemoveIcon, onRemove, }: PillProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
11
|
+
declare const Pill: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<PillProps, never>> & string & Omit<({ className, children, title, size, showRemoveIcon, onRemove, }: PillProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
11
12
|
export default Pill;
|
package/dist/Pill/Pill.js
CHANGED
|
@@ -14,13 +14,13 @@ const StyledButton = styled.button `
|
|
|
14
14
|
transition: color 0.2s;
|
|
15
15
|
padding-inline-end: 5px;
|
|
16
16
|
`;
|
|
17
|
-
const Pill = styled(({ className, children, size = "md", showRemoveIcon = true, onRemove, }) => {
|
|
17
|
+
const Pill = styled(({ className, children, title, size = "md", showRemoveIcon = true, onRemove, }) => {
|
|
18
18
|
const handleRemove = (e) => {
|
|
19
19
|
e.preventDefault();
|
|
20
20
|
e.stopPropagation();
|
|
21
21
|
onRemove === null || onRemove === void 0 ? void 0 : onRemove();
|
|
22
22
|
};
|
|
23
|
-
return (_jsxs("div", { className: className, onClick: (e) => {
|
|
23
|
+
return (_jsxs("div", { className: className, title: title, onClick: (e) => {
|
|
24
24
|
e.preventDefault();
|
|
25
25
|
e.stopPropagation();
|
|
26
26
|
}, children: [_jsx("span", { className: "pill-content", children: children }), showRemoveIcon && (_jsx(StyledButton, { tabIndex: -1, onClick: handleRemove, onMouseDown: (e) => {
|
package/dist/TagBox/TagBox.js
CHANGED
|
@@ -543,12 +543,6 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
543
543
|
useEffect(() => {
|
|
544
544
|
update();
|
|
545
545
|
}, [selectedItems]);
|
|
546
|
-
// handle default value
|
|
547
|
-
useEffect(() => {
|
|
548
|
-
if (defaultValue) {
|
|
549
|
-
setSelectedItems(defaultValue);
|
|
550
|
-
}
|
|
551
|
-
}, [defaultValue]);
|
|
552
546
|
const referenceEl = (_b = refs === null || refs === void 0 ? void 0 : refs.reference) === null || _b === void 0 ? void 0 : _b.current;
|
|
553
547
|
const contentWidth = ((_e = (_d = (_c = referenceEl === null || referenceEl === void 0 ? void 0 : referenceEl.getClientRects) === null || _c === void 0 ? void 0 : _c.call(referenceEl)) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.width) || "100%";
|
|
554
548
|
const scrollEl = scrollContainerRef === null || scrollContainerRef === void 0 ? void 0 : scrollContainerRef.current;
|