@monolith-forensics/monolith-ui 1.3.108 → 1.3.110
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/Button/Button.js +5 -1
- package/dist/FieldLabel/FieldLabel.js +1 -1
- package/dist/SelectBox/SelectBox.js +1 -1
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.js +12 -0
- package/dist/TextAreaInput/TextAreaInput.js +1 -1
- package/dist/TextInput/TextInput.js +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -1
- package/dist/Tooltip/Tooltip.js +3 -3
- package/package.json +7 -2
package/dist/Button/Button.js
CHANGED
|
@@ -94,6 +94,8 @@ const StyledButton = styled.button `
|
|
|
94
94
|
}
|
|
95
95
|
}};
|
|
96
96
|
|
|
97
|
+
height: 400px;
|
|
98
|
+
|
|
97
99
|
color: ${({ theme, variant, color }) => {
|
|
98
100
|
var _a, _b;
|
|
99
101
|
if (variant === "default")
|
|
@@ -169,7 +171,9 @@ const StyledButton = styled.button `
|
|
|
169
171
|
|
|
170
172
|
cursor: pointer;
|
|
171
173
|
|
|
172
|
-
transition:
|
|
174
|
+
transition:
|
|
175
|
+
background-color 0.2s,
|
|
176
|
+
border 0.2s;
|
|
173
177
|
|
|
174
178
|
.inner-span {
|
|
175
179
|
display: flex;
|
|
@@ -4,7 +4,7 @@ import * as Tooltip from "@radix-ui/react-tooltip";
|
|
|
4
4
|
export const InfoComponent = styled(({ className, children, description, label }) => {
|
|
5
5
|
if (!description)
|
|
6
6
|
return children;
|
|
7
|
-
return (_jsx(Tooltip.Provider, { delayDuration:
|
|
7
|
+
return (_jsx(Tooltip.Provider, { delayDuration: 300, skipDelayDuration: 0, disableHoverableContent: true, children: _jsxs(Tooltip.Root, { children: [_jsx(Tooltip.Trigger, { asChild: true, children: children }), _jsx(Tooltip.Portal, { children: _jsxs(Tooltip.Content, { className: className, side: "right", sideOffset: 15, align: "start", onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "title", children: label || "Info" }), _jsx("div", { children: description || "N/A" })] }) })] }) }));
|
|
8
8
|
}) `
|
|
9
9
|
pointer-events: none;
|
|
10
10
|
z-index: 999999;
|
|
@@ -381,7 +381,7 @@ triggerFocus = false, triggerOpen = false, onFocused, onOpened, }) => {
|
|
|
381
381
|
// ============================================================================
|
|
382
382
|
// Render
|
|
383
383
|
// ============================================================================
|
|
384
|
-
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:
|
|
384
|
+
return (_jsxs(StyledContainer, { className: className, "data-test": "this-is-a-test", 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: -1, 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) => {
|
|
385
385
|
containerRef.current = ref;
|
|
386
386
|
refs.setFloating(ref);
|
|
387
387
|
}, style: floatingStyles, className: "mfFloating", children: _jsxs(StyledContent, Object.assign({ className: "mfFloatingContent", style: {
|
package/dist/Switch/Switch.d.ts
CHANGED
package/dist/Switch/Switch.js
CHANGED
|
@@ -30,6 +30,18 @@ const StyledRoot = styled(RadixSwitch.Root) `
|
|
|
30
30
|
? "32px"
|
|
31
31
|
: "16px"};
|
|
32
32
|
|
|
33
|
+
min-width: ${({ size }) => size === "xs"
|
|
34
|
+
? "26px"
|
|
35
|
+
: size === "sm"
|
|
36
|
+
? "35px"
|
|
37
|
+
: size === "md"
|
|
38
|
+
? "41px"
|
|
39
|
+
: size === "lg"
|
|
40
|
+
? "53px"
|
|
41
|
+
: size === "xl"
|
|
42
|
+
? "70px"
|
|
43
|
+
: "26px"};
|
|
44
|
+
|
|
33
45
|
width: ${({ size }) => size === "xs"
|
|
34
46
|
? "26px"
|
|
35
47
|
: size === "sm"
|
|
@@ -152,7 +152,7 @@ const TextAreaInput = forwardRef((props, ref) => {
|
|
|
152
152
|
height: 16,
|
|
153
153
|
width: 16,
|
|
154
154
|
},
|
|
155
|
-
}, children: _jsx(StyledMoreHorizontal, { size: 16 }) })) : null, children: label })), _jsxs(TextAreaWrapper, { children: [_jsx(TextArea, Object.assign({ ref: mergedRef, size: size, maxRows: maxRows, minRows: minRows, onHeightChange: onHeightChange, cacheMeasurements: cacheMeasurements }, rest)), (insertableItems === null || insertableItems === void 0 ? void 0 : insertableItems.length) && (_jsx(InsertMenuOverlay, { ref: insertMenuRef, "$visible": showInsertMenu, children: _jsx(StyledInsertSelectBox, { data: insertableItems, placeholder: "Select item to insert...", searchable: true, clearable: false, arrow: false, focused: showInsertMenu, openOnFocus: true, triggerOpen: triggerSelectBoxOpen, onOpened: handleSelectBoxOpened, onChange: handleInsertSelect, size: size }) }))] })] }));
|
|
155
|
+
}, children: _jsx(StyledMoreHorizontal, { size: 16 }) })) : null, children: label })), _jsxs(TextAreaWrapper, { children: [_jsx(TextArea, Object.assign({ ref: mergedRef, size: size, maxRows: maxRows, minRows: minRows, onHeightChange: onHeightChange, cacheMeasurements: cacheMeasurements }, rest)), showInsertMenu && (insertableItems === null || insertableItems === void 0 ? void 0 : insertableItems.length) && (_jsx(InsertMenuOverlay, { ref: insertMenuRef, "$visible": showInsertMenu, children: _jsx(StyledInsertSelectBox, { data: insertableItems, placeholder: "Select item to insert...", searchable: true, clearable: false, arrow: false, focused: showInsertMenu, openOnFocus: true, triggerOpen: triggerSelectBoxOpen, onOpened: handleSelectBoxOpened, onChange: handleInsertSelect, size: size }) }))] })] }));
|
|
156
156
|
});
|
|
157
157
|
TextAreaInput.displayName = "TextAreaInput";
|
|
158
158
|
export default TextAreaInput;
|
|
@@ -81,10 +81,10 @@ export const TextInput = forwardRef((_a, ref) => {
|
|
|
81
81
|
return (_jsxs(StyledContainer, { className: className, colSpan: colSpan, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(InputContainer, { children: [_jsx(Input, Object.assign({ ref: ref, value: value, size: size, type: inputType, style: inputStyle }, inputProps, rest)), password ? (_jsx(InputButton, { onClick: handlePasswordToggle, onMouseDown: (e) => {
|
|
82
82
|
e.preventDefault();
|
|
83
83
|
e.stopPropagation();
|
|
84
|
-
}, type: "button", children: passwordVisible ? _jsx(Eye, {}) : _jsx(EyeOff, {}) })) : clearable && value ? (_jsx(InputButton, { onClick: handleClear, onMouseDown: (e) => {
|
|
84
|
+
}, tabIndex: -1, type: "button", children: passwordVisible ? _jsx(Eye, {}) : _jsx(EyeOff, {}) })) : clearable && value ? (_jsx(InputButton, { onClick: handleClear, onMouseDown: (e) => {
|
|
85
85
|
e.preventDefault();
|
|
86
86
|
e.stopPropagation();
|
|
87
|
-
}, type: "button", children: _jsx(X, {}) })) : null] })] }));
|
|
87
|
+
}, tabIndex: -1, type: "button", children: _jsx(X, {}) })) : null] })] }));
|
|
88
88
|
});
|
|
89
89
|
TextInput.displayName = "TextInput";
|
|
90
90
|
export default TextInput;
|
|
@@ -7,6 +7,8 @@ interface TooltipProps {
|
|
|
7
7
|
sideOffset?: number;
|
|
8
8
|
align?: "start" | "center" | "end";
|
|
9
9
|
delayDuration?: number;
|
|
10
|
+
/** When true, the tooltip stays open while hovering over its content */
|
|
11
|
+
hoverableContent?: boolean;
|
|
10
12
|
}
|
|
11
|
-
declare const Tooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<TooltipProps, never>> & string & Omit<({ className, children, content, side, sideOffset, align, delayDuration, }: TooltipProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined, keyof import("react").Component<any, {}, any>>;
|
|
13
|
+
declare const Tooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<TooltipProps, never>> & string & Omit<({ className, children, content, side, sideOffset, align, delayDuration, hoverableContent, }: TooltipProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined, keyof import("react").Component<any, {}, any>>;
|
|
12
14
|
export default Tooltip;
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
4
|
-
const Tooltip = styled(({ className, children, content, side = "right", sideOffset = 15, align = "start", delayDuration =
|
|
4
|
+
const Tooltip = styled(({ className, children, content, side = "right", sideOffset = 15, align = "start", delayDuration = 300, hoverableContent = false, }) => {
|
|
5
5
|
if (!content)
|
|
6
6
|
return children;
|
|
7
|
-
return (_jsx(RadixTooltip.Provider, { delayDuration: delayDuration
|
|
7
|
+
return (_jsx(RadixTooltip.Provider, { delayDuration: delayDuration, skipDelayDuration: 0, disableHoverableContent: !hoverableContent, children: _jsxs(RadixTooltip.Root, { children: [_jsx(RadixTooltip.Trigger, { asChild: true, children: children }), _jsx(RadixTooltip.Portal, { children: _jsx(RadixTooltip.Content, { className: className, side: side || "right", sideOffset: sideOffset || 15, align: align || "start", onClick: (e) => e.stopPropagation(), children: content }) })] }) }));
|
|
8
8
|
}) `
|
|
9
|
-
pointer-events: none;
|
|
9
|
+
pointer-events: ${({ hoverableContent }) => hoverableContent ? "auto" : "none"};
|
|
10
10
|
z-index: 999999;
|
|
11
11
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
12
12
|
padding: 15px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monolith-forensics/monolith-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.110",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Matt Danner (Monolith Forensics LLC)",
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
"registry": "https://registry.npmjs.org/"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
+
"branch": "bash ./scripts/branch",
|
|
20
|
+
"pr": "bash ./scripts/pr",
|
|
19
21
|
"dev": "cd playground && yarn dev",
|
|
22
|
+
"dev:link": "yarn build && yalc publish --push && chokidar \"src/**/*\" -d 500 -c \"yarn build && yalc publish --push\"",
|
|
20
23
|
"clean": "rm -r ./dist",
|
|
21
24
|
"build": "tsc",
|
|
22
25
|
"listFiles": "tsc --listFiles",
|
|
@@ -79,6 +82,8 @@
|
|
|
79
82
|
"@types/react-dom": "^18.3.0",
|
|
80
83
|
"@types/react-window": "^1.8.8",
|
|
81
84
|
"@types/spark-md5": "^3.0.4",
|
|
82
|
-
"
|
|
85
|
+
"chokidar-cli": "^3.0.0",
|
|
86
|
+
"typescript": "^5.5.4",
|
|
87
|
+
"yalc": "^1.0.0-pre.53"
|
|
83
88
|
}
|
|
84
89
|
}
|