@monolith-forensics/monolith-ui 1.2.80 → 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: () => {
@@ -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.80",
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)",