@monolith-forensics/monolith-ui 1.2.79 → 1.2.81

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.
@@ -15,6 +15,11 @@ import styled from "styled-components";
15
15
  import { FieldLabel, Calendar } from "..";
16
16
  import { StyledContent, StyledFloatContainer, ArrowButton, ClearButton, } from "../core";
17
17
  import parseTimestamp from "../Utilities/parseTimestamp";
18
+ const StyledContainer = styled.div.attrs({
19
+ className: "mfui-DateInput",
20
+ }) `
21
+ width: 100%;
22
+ `;
18
23
  const StyledInputContainer = styled.div `
19
24
  position: relative;
20
25
 
@@ -471,13 +476,13 @@ const DateInput = forwardRef(({ className, style = {}, defaultValue, value, form
471
476
  document.removeEventListener("wheel", handleWheelEvent);
472
477
  };
473
478
  }, [selectedSegment]);
474
- return (_jsxs("div", { className: "mfui-DateInput", children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(StyledInputContainer, { ref: (ref) => {
475
- if (typeof _ref === "function") {
476
- _ref(ref);
477
- }
478
- mainRef.current = ref;
479
- refs.setReference(ref);
480
- }, className: className, onClick: handleContainerClick, onMouseDown: handleMouseDown, onKeyDown: handleKeyDown, onFocus: (e) => {
479
+ return (_jsxs(StyledContainer, { ref: (ref) => {
480
+ if (typeof _ref === "function") {
481
+ _ref(ref);
482
+ }
483
+ mainRef.current = ref;
484
+ refs.setReference(ref);
485
+ }, className: className, children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(StyledInputContainer, { className: "input-container", onClick: handleContainerClick, onMouseDown: handleMouseDown, onKeyDown: handleKeyDown, onFocus: (e) => {
481
486
  e.preventDefault();
482
487
  setSelectedSegment(segments[0]);
483
488
  }, onBlur: () => {
@@ -72,20 +72,20 @@ export const MenuItemList = ({ menuItems, searchable, searchValue = "", isObject
72
72
  const item = (data === null || data === void 0 ? void 0 : data[index]) || {};
73
73
  const isSelected = !!(selected === null || selected === void 0 ? void 0 : selected.find((s) => isObjectArray ? (s === null || s === void 0 ? void 0 : s.value) === (item === null || item === void 0 ? void 0 : item.value) : s === item));
74
74
  if (item.items) {
75
- return (_jsx(DropDownMenu, { data: item.items, size: size, children: item.label }));
75
+ return (_jsx(DropDownMenu, { data: item.items, size: size, buttonProps: { style }, children: item.label }));
76
76
  }
77
- return (_jsxs(MenuItem, { className: "MenuItem", itemData: item, TooltipContent: TooltipContent, "data-selected": isSelected, leftSection: multiselect && (_jsx(CheckBox, { value: isSelected, size: size, onChange: (newValue) => {
78
- var _a;
79
- newValue ? handleAddItem(item) : handleRemoveItem(item);
80
- (_a = item === null || item === void 0 ? void 0 : item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, item);
81
- } })), multiselect: multiselect, size: size, title: !TooltipContent ? item === null || item === void 0 ? void 0 : item.label : undefined, onClick: (e) => {
77
+ return (_jsx(MenuItem, { className: "MenuItem", itemData: item, TooltipContent: TooltipContent, "data-selected": isSelected, leftSection: multiselect ? (_jsxs(_Fragment, { children: [_jsx(CheckBox, { value: isSelected, size: size, onChange: (newValue) => {
78
+ var _a;
79
+ newValue ? handleAddItem(item) : handleRemoveItem(item);
80
+ (_a = item === null || item === void 0 ? void 0 : item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, item);
81
+ } }), (item === null || item === void 0 ? void 0 : item.leftSection) || null] })) : ((item === null || item === void 0 ? void 0 : item.leftSection) || null), rightSection: item === null || item === void 0 ? void 0 : item.rightSection, multiselect: multiselect, size: size, title: !TooltipContent ? item === null || item === void 0 ? void 0 : item.label : undefined, onClick: (e) => {
82
82
  e.preventDefault();
83
83
  e.stopPropagation();
84
84
  handleItemClick(item, isSelected);
85
- }, style: style, children: [(item === null || item === void 0 ? void 0 : item.leftSection) || null, _jsx(_Fragment, { children: (renderOption === null || renderOption === void 0 ? void 0 : renderOption(item)) ||
86
- (item === null || item === void 0 ? void 0 : item.label) ||
87
- (typeof item === "string" || typeof item === "number"
88
- ? item
89
- : null) }), (item === null || item === void 0 ? void 0 : item.rightSection) || null] }, index));
85
+ }, style: style, children: (renderOption === null || renderOption === void 0 ? void 0 : renderOption(item)) ||
86
+ (item === null || item === void 0 ? void 0 : item.label) ||
87
+ (typeof item === "string" || typeof item === "number"
88
+ ? item
89
+ : null) }, index));
90
90
  } }) }));
91
91
  };
@@ -97,16 +97,20 @@ const StyledInput = styled(Input) `
97
97
  }
98
98
  `;
99
99
  const StyledDateInput = styled(DateInput) `
100
- height: 20px;
101
- font-size: 12px;
102
- border-radius: 0;
103
- border-color: transparent;
104
- background-color: ${({ theme }) => theme.palette.background.secondary};
100
+ width: auto;
105
101
 
106
- cursor: pointer;
102
+ .input-container {
103
+ height: 20px;
104
+ font-size: 12px;
105
+ border-radius: 0;
106
+ border-color: transparent;
107
+ background-color: ${({ theme }) => theme.palette.background.secondary};
107
108
 
108
- &:hover {
109
- border-color: ${({ theme }) => theme.palette.primary.main};
109
+ cursor: pointer;
110
+
111
+ &:hover {
112
+ border-color: ${({ theme }) => theme.palette.primary.main};
113
+ }
110
114
  }
111
115
  `;
112
116
  const dateFormatResolver = (resolution) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.79",
3
+ "version": "1.2.81",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",