@monolith-forensics/monolith-ui 1.3.92 → 1.3.94

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.
@@ -17,20 +17,45 @@ const TextAreaRow = styled.div `
17
17
  display: flex;
18
18
  align-items: flex-start;
19
19
  width: 100%;
20
+ z-index: 1; /* Lower than SelectBoxWrapper */
20
21
  `;
21
22
  const SelectBoxWrapper = styled.div `
22
- position: relative;
23
+ position: absolute;
23
24
  width: 100%;
25
+ top: 0; /* Position at the top of the textarea */
26
+ left: 0;
27
+ z-index: 10; /* Ensure dropdown appears above textarea */
24
28
  `;
25
29
  const StyledSelectBox = styled(SelectBox) `
26
- /* Completely hide the SelectBox but keep it functional for dropdown */
27
- position: absolute;
28
- top: 0;
29
- left: 0;
30
+ /* Completely hide the SelectBox and disable all interactions */
31
+ position: relative;
30
32
  width: 100%;
31
33
  opacity: 0;
32
- pointer-events: auto; /* Allow interactions for dropdown */
33
- z-index: -1;
34
+ pointer-events: none; /* Disable all interactions */
35
+ height: 0;
36
+ overflow: hidden;
37
+
38
+ /* Hide all child elements */
39
+ * {
40
+ opacity: 0;
41
+ pointer-events: none;
42
+ height: 0;
43
+ overflow: hidden;
44
+ }
45
+
46
+ /* Only allow dropdown portal to be visible and interactive when opened programmatically */
47
+ [data-floating-ui-portal] {
48
+ opacity: 1 !important;
49
+ pointer-events: auto !important;
50
+ z-index: 1000 !important;
51
+
52
+ * {
53
+ opacity: 1 !important;
54
+ pointer-events: auto !important;
55
+ height: auto !important;
56
+ overflow: visible !important;
57
+ }
58
+ }
34
59
  `;
35
60
  const StyledFieldLabel = styled(FieldLabel) `
36
61
  .action-section {
@@ -108,20 +133,23 @@ function SearchableTextArea({ label, data, searchable, allowCustomValue, require
108
133
  onChange(newValue);
109
134
  }
110
135
  };
111
- // Handle keyboard shortcuts for dropdown
112
- const handleTextAreaKeyDown = (event) => {
113
- // Ctrl/Cmd + Space to open dropdown
114
- if ((event.ctrlKey || event.metaKey) && event.code === "Space") {
115
- event.preventDefault();
116
- handleSearchClick();
117
- }
118
- };
136
+ // Removed keyboard shortcuts - textarea behaves normally
119
137
  const handleSearchClick = () => {
120
138
  if (selectBoxRef.current) {
121
139
  const selectInput = selectBoxRef.current.querySelector("input");
122
140
  if (selectInput) {
141
+ // Temporarily enable interactions to trigger dropdown
142
+ selectInput.style.pointerEvents = "auto";
143
+ selectInput.style.opacity = "1";
144
+ selectInput.style.height = "auto";
123
145
  selectInput.focus();
124
146
  selectInput.click();
147
+ // Hide again immediately after triggering
148
+ setTimeout(() => {
149
+ selectInput.style.pointerEvents = "none";
150
+ selectInput.style.opacity = "0";
151
+ selectInput.style.height = "0";
152
+ }, 50);
125
153
  }
126
154
  }
127
155
  };
@@ -147,7 +175,7 @@ function SearchableTextArea({ label, data, searchable, allowCustomValue, require
147
175
  height: "16px",
148
176
  width: "16px",
149
177
  },
150
- }, children: _jsx(MoreHorizontal, { size: 16 }) }), children: label })), _jsx(TextAreaRow, { children: _jsx(StyledTextArea, Object.assign({ placeholder: textAreaPlaceholder || "Enter details about the move", "$minRows": textAreaMinRows, "$maxRows": textAreaMaxRows, "$hasError": hasError, value: textAreaValue, onChange: handleTextAreaChange, onKeyDown: handleTextAreaKeyDown }, textAreaProps)) }), _jsx(SelectBoxWrapper, { ref: selectBoxRef, children: _jsx(StyledSelectBox, Object.assign({ data: data, searchable: searchable, allowCustomValue: allowCustomValue, arrow: false, value: selectValue || undefined, onChange: handleSelectChange, hasError: hasError }, selectProps), selectKey) })] }));
178
+ }, children: _jsx(MoreHorizontal, { size: 16 }) }), children: label })), _jsxs(TextAreaRow, { children: [_jsx(StyledTextArea, Object.assign({ placeholder: textAreaPlaceholder || "Enter details about the move", "$minRows": textAreaMinRows, "$maxRows": textAreaMaxRows, "$hasError": hasError, value: textAreaValue, onChange: handleTextAreaChange }, textAreaProps)), _jsx(SelectBoxWrapper, { ref: selectBoxRef, children: _jsx(StyledSelectBox, Object.assign({ data: data, searchable: searchable, allowCustomValue: allowCustomValue, arrow: false, value: selectValue || undefined, onChange: handleSelectChange, hasError: hasError }, selectProps), selectKey) })] })] }));
151
179
  }
152
180
  SearchableTextArea.displayName = "SearchableTextArea";
153
181
  export default SearchableTextArea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.3.92",
3
+ "version": "1.3.94",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",