@wavelengthusaf/components 5.0.0 → 5.0.3

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/README.md CHANGED
@@ -14,6 +14,16 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 5.0.2
18
+
19
+ - 5/15/2026
20
+ - Added Jest test for `wavelength-sidebar` web component
21
+
22
+ ### 5.0.1
23
+
24
+ - 5/15/2026
25
+ - Added Jest tests for wavelength-banner web component
26
+
17
27
  ### 4.4.1
18
28
 
19
29
  - 2/25/2026
@@ -826,115 +826,169 @@ var WavelengthNavBar = ({ items, bgColor, txtColor, hoverColor, height, padding,
826
826
 
827
827
 
828
828
 
829
- var WavelengthFileDropZone = ({
830
- acceptedTypes,
831
- maxSize,
832
- multiple,
833
- dragText,
834
- iconSrc,
835
- onFilesSelected,
836
- hostDisplay,
837
- hostWidth,
838
- inputDisplay,
839
- borderWidth,
840
- borderStyle,
841
- borderColor,
842
- borderRadius,
843
- padding,
844
- textAlign,
845
- backgroundColor,
846
- cursor,
847
- transition,
848
- display,
849
- flexDirection,
850
- alignItems,
851
- gap,
852
- borderHoverColor,
853
- backgroundHoverColor,
854
- borderActiveColor,
855
- backgroundActiveColor,
856
- contentDisplay,
857
- contentFlexDirection,
858
- contentAlignItems,
859
- contentGap,
860
- textColor,
861
- fontFamily,
862
- fontStyle,
863
- fontSize,
864
- lineHeight,
865
- letterSpacing,
866
- iconSize,
867
- errorColor,
868
- errorFontFamily,
869
- errorFontSize,
870
- errorMarginTop,
871
- style,
872
- children,
873
- ...rest
874
- }) => {
875
- const ref = _react.useRef.call(void 0, null);
876
- _react.useEffect.call(void 0, () => {
877
- const el = ref.current;
878
- if (!el) return;
879
- if (acceptedTypes !== void 0) el.setAttribute("accepted-types", acceptedTypes);
880
- else el.removeAttribute("accepted-types");
881
- if (maxSize !== void 0) el.setAttribute("max-size", String(maxSize));
882
- else el.removeAttribute("max-size");
883
- if (dragText !== void 0) el.setAttribute("drag-text", dragText);
884
- else el.removeAttribute("drag-text");
885
- if (iconSrc !== void 0) el.setAttribute("icon-src", iconSrc);
886
- else el.removeAttribute("icon-src");
887
- if (multiple) el.setAttribute("multiple", "");
888
- else el.removeAttribute("multiple");
889
- const handleFilesSelected = (event) => {
890
- const customEvent = event;
891
- _optionalChain([onFilesSelected, 'optionalCall', _2 => _2(customEvent.detail.files)]);
892
- };
893
- el.addEventListener("files-selected", handleFilesSelected);
894
- return () => {
895
- el.removeEventListener("files-selected", handleFilesSelected);
896
- };
897
- }, [acceptedTypes, maxSize, multiple, dragText, iconSrc, onFilesSelected]);
898
- const mergedStyle = {
899
- ...style,
900
- "--hostDisplay": hostDisplay,
901
- "--hostWidth": hostWidth,
902
- "--inputDisplay": inputDisplay,
903
- "--borderWidth": borderWidth,
904
- "--borderStyle": borderStyle,
905
- "--borderColor": borderColor,
906
- "--borderRadius": borderRadius,
907
- "--padding": padding,
908
- "--textAlign": textAlign,
909
- "--backgroundColor": backgroundColor,
910
- "--cursor": cursor,
911
- "--transition": transition,
912
- "--display": display,
913
- "--flexDirection": flexDirection,
914
- "--alignItems": alignItems,
915
- "--gap": gap,
916
- "--borderHoverColor": borderHoverColor,
917
- "--backgroundHoverColor": backgroundHoverColor,
918
- "--borderActiveColor": borderActiveColor,
919
- "--backgroundActiveColor": backgroundActiveColor,
920
- "--contentDisplay": contentDisplay,
921
- "--contentFlexDirection": contentFlexDirection,
922
- "--contentAlignItems": contentAlignItems,
923
- "--contentGap": contentGap,
924
- "--textColor": textColor,
925
- "--fontFamily": fontFamily,
926
- "--fontStyle": fontStyle,
927
- "--fontSize": fontSize,
928
- "--lineHeight": lineHeight,
929
- "--letterSpacing": letterSpacing,
930
- "--iconSize": iconSize,
931
- "--errorColor": errorColor,
932
- "--errorFontFamily": errorFontFamily,
933
- "--errorFontSize": errorFontSize,
934
- "--errorMarginTop": errorMarginTop
935
- };
936
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-file-drop-zone", { ref, style: mergedStyle, ...rest, children });
829
+ var setAttribute = (element, attribute, value) => {
830
+ if (value === void 0 || value === null) {
831
+ element.removeAttribute(attribute);
832
+ return;
833
+ }
834
+ element.setAttribute(attribute, String(value));
937
835
  };
836
+ var WavelengthFileDropZone = _react.forwardRef.call(void 0,
837
+ ({
838
+ acceptedTypes,
839
+ maxSize,
840
+ multiple,
841
+ dragText,
842
+ iconSrc,
843
+ width,
844
+ onFilesSelected,
845
+ hostDisplay,
846
+ hostWidth,
847
+ inputDisplay,
848
+ borderWidth,
849
+ borderStyle,
850
+ borderColor,
851
+ borderRadius,
852
+ padding,
853
+ textAlign,
854
+ backgroundColor,
855
+ cursor,
856
+ transition,
857
+ display,
858
+ flexDirection,
859
+ alignItems,
860
+ gap,
861
+ borderHoverColor,
862
+ backgroundHoverColor,
863
+ borderActiveColor,
864
+ backgroundActiveColor,
865
+ contentDisplay,
866
+ contentFlexDirection,
867
+ contentAlignItems,
868
+ contentGap,
869
+ textColor,
870
+ fontFamily,
871
+ fontStyle,
872
+ fontSize,
873
+ lineHeight,
874
+ letterSpacing,
875
+ iconSize,
876
+ errorColor,
877
+ errorFontFamily,
878
+ errorFontSize,
879
+ errorMarginTop,
880
+ style,
881
+ children,
882
+ ...rest
883
+ }, ref) => {
884
+ const elementRef = _react.useRef.call(void 0, null);
885
+ _react.useImperativeHandle.call(void 0, ref, () => elementRef.current);
886
+ _react.useEffect.call(void 0, () => {
887
+ const element = elementRef.current;
888
+ if (!element) return;
889
+ setAttribute(element, "accepted-types", acceptedTypes);
890
+ setAttribute(element, "max-size", maxSize);
891
+ setAttribute(element, "drag-text", dragText);
892
+ setAttribute(element, "icon-src", iconSrc);
893
+ if (multiple) {
894
+ element.setAttribute("multiple", "");
895
+ } else {
896
+ element.removeAttribute("multiple");
897
+ }
898
+ }, [acceptedTypes, maxSize, multiple, dragText, iconSrc]);
899
+ _react.useEffect.call(void 0, () => {
900
+ const element = elementRef.current;
901
+ if (!element || !onFilesSelected) return;
902
+ const handleFilesSelected = (event) => {
903
+ const customEvent = event;
904
+ onFilesSelected(customEvent.detail.files);
905
+ };
906
+ element.addEventListener("files-selected", handleFilesSelected);
907
+ return () => element.removeEventListener("files-selected", handleFilesSelected);
908
+ }, [onFilesSelected]);
909
+ const mergedStyle = _react.useMemo.call(void 0,
910
+ () => ({
911
+ ...style,
912
+ "--hostDisplay": hostDisplay,
913
+ "--hostWidth": _nullishCoalesce(hostWidth, () => ( width)),
914
+ "--inputDisplay": inputDisplay,
915
+ "--borderWidth": borderWidth,
916
+ "--borderStyle": borderStyle,
917
+ "--borderColor": borderColor,
918
+ "--borderRadius": borderRadius,
919
+ "--padding": padding,
920
+ "--textAlign": textAlign,
921
+ "--backgroundColor": backgroundColor,
922
+ "--cursor": cursor,
923
+ "--transition": transition,
924
+ "--display": display,
925
+ "--flexDirection": flexDirection,
926
+ "--alignItems": alignItems,
927
+ "--gap": gap,
928
+ "--borderHoverColor": borderHoverColor,
929
+ "--backgroundHoverColor": backgroundHoverColor,
930
+ "--borderActiveColor": borderActiveColor,
931
+ "--backgroundActiveColor": backgroundActiveColor,
932
+ "--contentDisplay": contentDisplay,
933
+ "--contentFlexDirection": contentFlexDirection,
934
+ "--contentAlignItems": contentAlignItems,
935
+ "--contentGap": contentGap,
936
+ "--textColor": textColor,
937
+ "--fontFamily": fontFamily,
938
+ "--fontStyle": fontStyle,
939
+ "--fontSize": fontSize,
940
+ "--lineHeight": lineHeight,
941
+ "--letterSpacing": letterSpacing,
942
+ "--iconSize": iconSize,
943
+ "--errorColor": errorColor,
944
+ "--errorFontFamily": errorFontFamily,
945
+ "--errorFontSize": errorFontSize,
946
+ "--errorMarginTop": errorMarginTop
947
+ }),
948
+ [
949
+ style,
950
+ hostDisplay,
951
+ hostWidth,
952
+ width,
953
+ inputDisplay,
954
+ borderWidth,
955
+ borderStyle,
956
+ borderColor,
957
+ borderRadius,
958
+ padding,
959
+ textAlign,
960
+ backgroundColor,
961
+ cursor,
962
+ transition,
963
+ display,
964
+ flexDirection,
965
+ alignItems,
966
+ gap,
967
+ borderHoverColor,
968
+ backgroundHoverColor,
969
+ borderActiveColor,
970
+ backgroundActiveColor,
971
+ contentDisplay,
972
+ contentFlexDirection,
973
+ contentAlignItems,
974
+ contentGap,
975
+ textColor,
976
+ fontFamily,
977
+ fontStyle,
978
+ fontSize,
979
+ lineHeight,
980
+ letterSpacing,
981
+ iconSize,
982
+ errorColor,
983
+ errorFontFamily,
984
+ errorFontSize,
985
+ errorMarginTop
986
+ ]
987
+ );
988
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-file-drop-zone", { ref: elementRef, style: mergedStyle, ...rest, children });
989
+ }
990
+ );
991
+ WavelengthFileDropZone.displayName = "WavelengthFileDropZone";
938
992
 
939
993
  // src/components/SnackBar/WavelengthWebSnackbar.tsx
940
994
 
@@ -1181,7 +1235,7 @@ var WavelengthBadge = ({
1181
1235
  updateAttribute("text-box-border-radius", textBoxBorderRadius);
1182
1236
  updateAttribute("text-box-hover-border-color", textBoxHoverBorderColor);
1183
1237
  updateAttribute("badge-font", badgeFont);
1184
- updateAttribute("badge-content", _optionalChain([badgeContent, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]));
1238
+ updateAttribute("badge-content", _optionalChain([badgeContent, 'optionalAccess', _2 => _2.toString, 'call', _3 => _3()]));
1185
1239
  updateAttribute("badge-size", badgeSize);
1186
1240
  }, [
1187
1241
  variant,
@@ -1276,7 +1330,7 @@ function useStableCallback(fn) {
1276
1330
  _react.useEffect.call(void 0, () => {
1277
1331
  fnRef.current = fn;
1278
1332
  }, [fn]);
1279
- return (...args) => _optionalChain([fnRef, 'access', _5 => _5.current, 'optionalCall', _6 => _6(...args)]);
1333
+ return (...args) => _optionalChain([fnRef, 'access', _4 => _4.current, 'optionalCall', _5 => _5(...args)]);
1280
1334
  }
1281
1335
  function WavelengthFormInner(props, ref) {
1282
1336
  const {
@@ -1316,7 +1370,7 @@ function WavelengthFormInner(props, ref) {
1316
1370
  if (!el) return;
1317
1371
  let finalSchema = schema;
1318
1372
  if (placeholders) {
1319
- const shape = _optionalChain([schema, 'optionalAccess', _7 => _7.shape]);
1373
+ const shape = _optionalChain([schema, 'optionalAccess', _6 => _6.shape]);
1320
1374
  if (shape) {
1321
1375
  const overrides = {};
1322
1376
  for (const [key, ph] of Object.entries(placeholders)) {
@@ -1349,15 +1403,15 @@ function WavelengthFormInner(props, ref) {
1349
1403
  if (!el) return;
1350
1404
  const handleChange = (e) => {
1351
1405
  const detail = e.detail;
1352
- _optionalChain([onChangeStable, 'optionalCall', _8 => _8(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _9 => _9.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _10 => _10.issues]), () => ( [])))]);
1406
+ _optionalChain([onChangeStable, 'optionalCall', _7 => _7(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _8 => _8.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _9 => _9.issues]), () => ( [])))]);
1353
1407
  };
1354
1408
  const handleValid = (e) => {
1355
1409
  const detail = e.detail;
1356
- _optionalChain([onValidStable, 'optionalCall', _11 => _11(_optionalChain([detail, 'optionalAccess', _12 => _12.value]), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _13 => _13.issues]), () => ( [])))]);
1410
+ _optionalChain([onValidStable, 'optionalCall', _10 => _10(_optionalChain([detail, 'optionalAccess', _11 => _11.value]), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _12 => _12.issues]), () => ( [])))]);
1357
1411
  };
1358
1412
  const handleInvalid = (e) => {
1359
1413
  const detail = e.detail;
1360
- _optionalChain([onInvalidStable, 'optionalCall', _14 => _14(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _15 => _15.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _16 => _16.issues]), () => ( [])))]);
1414
+ _optionalChain([onInvalidStable, 'optionalCall', _13 => _13(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _14 => _14.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _15 => _15.issues]), () => ( [])))]);
1361
1415
  };
1362
1416
  el.addEventListener("form-change", handleChange);
1363
1417
  el.addEventListener("form-valid", handleValid);
@@ -1379,8 +1433,8 @@ function WavelengthFormInner(props, ref) {
1379
1433
  _react.useImperativeHandle.call(void 0,
1380
1434
  ref,
1381
1435
  () => ({
1382
- validate: () => _nullishCoalesce(_optionalChain([hostRef, 'access', _17 => _17.current, 'optionalAccess', _18 => _18.validate, 'optionalCall', _19 => _19()]), () => ( false)),
1383
- getValue: () => _optionalChain([hostRef, 'access', _20 => _20.current, 'optionalAccess', _21 => _21.value]),
1436
+ validate: () => _nullishCoalesce(_optionalChain([hostRef, 'access', _16 => _16.current, 'optionalAccess', _17 => _17.validate, 'optionalCall', _18 => _18()]), () => ( false)),
1437
+ getValue: () => _optionalChain([hostRef, 'access', _19 => _19.current, 'optionalAccess', _20 => _20.value]),
1384
1438
  setValue: (v) => {
1385
1439
  if (hostRef.current) hostRef.current.value = v;
1386
1440
  }
@@ -1505,7 +1559,7 @@ var WavelengthManyPlanes = ({ children, numberOfPlanes, trailDir, opacity, color
1505
1559
  el.spaced = spaced;
1506
1560
  }
1507
1561
  }, [numberOfPlanes, trailDir, opacity, color, gradient, spaced]);
1508
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-manyplanes", { ref, trailDir, opacity, color, gradient, spaced: _optionalChain([spaced, 'optionalAccess', _22 => _22.toString, 'call', _23 => _23()]), ...rest, children });
1562
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-manyplanes", { ref, trailDir, opacity, color, gradient, spaced: _optionalChain([spaced, 'optionalAccess', _21 => _21.toString, 'call', _22 => _22()]), ...rest, children });
1509
1563
  };
1510
1564
  WavelengthManyPlanes.displayName = "WavelengthManyPlanes";
1511
1565
 
@@ -1576,8 +1630,8 @@ function WavelengthConfirmationModal(props) {
1576
1630
  "font-family": props.fontFamily,
1577
1631
  "text-color": props.textColor,
1578
1632
  "background-color": props.backgroundColor,
1579
- "title-text": _optionalChain([props, 'access', _24 => _24.textObj, 'optionalAccess', _25 => _25.title]),
1580
- "dialog-text": _optionalChain([props, 'access', _26 => _26.textObj, 'optionalAccess', _27 => _27.dialog]),
1633
+ "title-text": _optionalChain([props, 'access', _23 => _23.textObj, 'optionalAccess', _24 => _24.title]),
1634
+ "dialog-text": _optionalChain([props, 'access', _25 => _25.textObj, 'optionalAccess', _26 => _26.dialog]),
1581
1635
  children: [
1582
1636
  props.cancelButton && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { slot: "cancel-button", style: { display: "contents" }, children: props.cancelButton }),
1583
1637
  props.submitButton && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { slot: "submit-button", style: { display: "contents" }, children: props.submitButton })
@@ -1837,8 +1891,8 @@ var WavelengthDialog = ({
1837
1891
  _react.useEffect.call(void 0, () => {
1838
1892
  const el = ref.current;
1839
1893
  if (!el) return;
1840
- const handleLeft = (e) => _optionalChain([onWlLeftBtnClick, 'optionalCall', _28 => _28(e)]);
1841
- const handleRight = (e) => _optionalChain([onWlRightBtnClick, 'optionalCall', _29 => _29(e)]);
1894
+ const handleLeft = (e) => _optionalChain([onWlLeftBtnClick, 'optionalCall', _27 => _27(e)]);
1895
+ const handleRight = (e) => _optionalChain([onWlRightBtnClick, 'optionalCall', _28 => _28(e)]);
1842
1896
  el.addEventListener("wl-left-btn-click", handleLeft);
1843
1897
  el.addEventListener("wl-right-btn-click", handleRight);
1844
1898
  return () => {
@@ -1936,8 +1990,8 @@ var WavelengthPagination = ({
1936
1990
  syncAttribute("active-text-color", activeTextColor || "");
1937
1991
  syncAttribute("background-color", backgroundColor || "");
1938
1992
  syncAttribute("disabled-color", disabledColor || "");
1939
- syncAttribute("total-pages", _optionalChain([totalPages, 'optionalAccess', _30 => _30.toString, 'call', _31 => _31()]) || "");
1940
- syncAttribute("current-page", _optionalChain([currentPage, 'optionalAccess', _32 => _32.toString, 'call', _33 => _33()]) || "");
1993
+ syncAttribute("total-pages", _optionalChain([totalPages, 'optionalAccess', _29 => _29.toString, 'call', _30 => _30()]) || "");
1994
+ syncAttribute("current-page", _optionalChain([currentPage, 'optionalAccess', _31 => _31.toString, 'call', _32 => _32()]) || "");
1941
1995
  const handlePageChange = (e) => {
1942
1996
  if (onPageChange) {
1943
1997
  onPageChange(e.detail.page);
@@ -2033,7 +2087,7 @@ var WavelengthInput = _react.forwardRef.call(void 0,
2033
2087
  const internalRef = _react.useRef.call(void 0, null);
2034
2088
  _react.useImperativeHandle.call(void 0, ref, () => ({
2035
2089
  ...internalRef.current,
2036
- validate: () => _optionalChain([internalRef, 'access', _34 => _34.current, 'optionalAccess', _35 => _35.validate, 'optionalCall', _36 => _36(true)])
2090
+ validate: () => _optionalChain([internalRef, 'access', _33 => _33.current, 'optionalAccess', _34 => _34.validate, 'optionalCall', _35 => _35(true)])
2037
2091
  }));
2038
2092
  _react.useEffect.call(void 0, () => {
2039
2093
  const el = internalRef.current;
@@ -2112,7 +2166,7 @@ var WavelengthInput = _react.forwardRef.call(void 0,
2112
2166
  const el = internalRef.current;
2113
2167
  if (!el || !onBlurCallback) return;
2114
2168
  const handler = (e) => {
2115
- const input = _optionalChain([el, 'access', _37 => _37.shadowRoot, 'optionalAccess', _38 => _38.querySelector, 'call', _39 => _39("input, textarea")]);
2169
+ const input = _optionalChain([el, 'access', _36 => _36.shadowRoot, 'optionalAccess', _37 => _37.querySelector, 'call', _38 => _38("input, textarea")]);
2116
2170
  if (input) {
2117
2171
  onBlurCallback();
2118
2172
  }
@@ -2124,7 +2178,7 @@ var WavelengthInput = _react.forwardRef.call(void 0,
2124
2178
  const el = internalRef.current;
2125
2179
  if (!el || !onChange) return;
2126
2180
  const handler = (e) => {
2127
- const input = _optionalChain([el, 'access', _40 => _40.shadowRoot, 'optionalAccess', _41 => _41.querySelector, 'call', _42 => _42("input, textarea")]);
2181
+ const input = _optionalChain([el, 'access', _39 => _39.shadowRoot, 'optionalAccess', _40 => _40.querySelector, 'call', _41 => _41("input, textarea")]);
2128
2182
  if (input) {
2129
2183
  const synthetic = {
2130
2184
  ...e,
@@ -2327,7 +2381,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2327
2381
  const [noRowsOpen, setNoRowsOpen] = _react.useState.call(void 0, false);
2328
2382
  const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
2329
2383
  const [searchItem, setSearchItem] = _react.useState.call(void 0, "");
2330
- const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _43 => _43[0], 'optionalAccess', _44 => _44.key]) || "");
2384
+ const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.key]) || "");
2331
2385
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
2332
2386
  const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
2333
2387
  const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
@@ -2481,7 +2535,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2481
2535
  ] }, index)
2482
2536
  ] }, `headCell-${index}`);
2483
2537
  });
2484
- const rows = !_optionalChain([currentPageData, 'optionalAccess', _45 => _45.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _46 => _46.map, 'call', _47 => _47((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
2538
+ const rows = !_optionalChain([currentPageData, 'optionalAccess', _44 => _44.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _45 => _45.map, 'call', _46 => _46((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
2485
2539
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2486
2540
  StyledInput,
2487
2541
  {
@@ -2757,7 +2811,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
2757
2811
  }
2758
2812
  if (sortSubOrder) {
2759
2813
  result.map(
2760
- (item) => _optionalChain([item, 'access', _48 => _48.Details, 'optionalAccess', _49 => _49.fileObjects, 'access', _50 => _50.sort, 'call', _51 => _51((c, d) => {
2814
+ (item) => _optionalChain([item, 'access', _47 => _47.Details, 'optionalAccess', _48 => _48.fileObjects, 'access', _49 => _49.sort, 'call', _50 => _50((c, d) => {
2761
2815
  const valueC = c[sortSubKey];
2762
2816
  const valueD = d[sortSubKey];
2763
2817
  if (typeof valueC === "string" && typeof valueD === "string") {
@@ -2818,24 +2872,24 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
2818
2872
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
2819
2873
  });
2820
2874
  const subDataRows = (itemId) => {
2821
- return processedRowData.filter((item) => _optionalChain([item, 'access', _52 => _52.Details, 'optionalAccess', _53 => _53.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _54 => _54.Details, 'optionalAccess', _55 => _55.fileObjects, 'access', _56 => _56.map, 'call', _57 => _57((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
2875
+ return processedRowData.filter((item) => _optionalChain([item, 'access', _51 => _51.Details, 'optionalAccess', _52 => _52.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _53 => _53.Details, 'optionalAccess', _54 => _54.fileObjects, 'access', _55 => _55.map, 'call', _56 => _56((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
2822
2876
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadArrow, { onClick: downloadArrowOnClick, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2823
2877
  "path",
2824
2878
  {
2825
2879
  d: "M8.5 12L3.5 7L4.9 5.55L7.5 8.15V0H9.5V8.15L12.1 5.55L13.5 7L8.5 12ZM2.5 16C1.95 16 1.47917 15.8042 1.0875 15.4125C0.695833 15.0208 0.5 14.55 0.5 14V11H2.5V14H14.5V11H16.5V14C16.5 14.55 16.3042 15.0208 15.9125 15.4125C15.5208 15.8042 15.05 16 14.5 16H2.5Z",
2826
2880
  fill: "#1C1B1F"
2827
2881
  }
2828
- ) }) }) }, `td-${_optionalChain([item, 'access', _58 => _58.Details, 'optionalAccess', _59 => _59.relationId])}-${fileItem.id}`),
2882
+ ) }) }) }, `td-${_optionalChain([item, 'access', _57 => _57.Details, 'optionalAccess', _58 => _58.relationId])}-${fileItem.id}`),
2829
2883
  SubDataColumns.map((column) => {
2830
2884
  const columnKey = trimBeforePeriod2(column.key);
2831
2885
  const value = fileItem[columnKey];
2832
2886
  if (value !== void 0) {
2833
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _60 => _60.Details, 'optionalAccess', _61 => _61.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _62 => _62.Details, 'optionalAccess', _63 => _63.relationId])}-${fileItem.id}-${index}-${column.title}`);
2887
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _59 => _59.Details, 'optionalAccess', _60 => _60.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _61 => _61.Details, 'optionalAccess', _62 => _62.relationId])}-${fileItem.id}-${index}-${column.title}`);
2834
2888
  }
2835
2889
  })
2836
- ] }, `${item}-${_optionalChain([item, 'access', _64 => _64.Details, 'optionalAccess', _65 => _65.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _66 => _66.Details, 'optionalAccess', _67 => _67.relationId])}`));
2890
+ ] }, `${item}-${_optionalChain([item, 'access', _63 => _63.Details, 'optionalAccess', _64 => _64.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _65 => _65.Details, 'optionalAccess', _66 => _66.relationId])}`));
2837
2891
  };
2838
- const dataRows = _optionalChain([processedRowData, 'optionalAccess', _68 => _68.map, 'call', _69 => _69((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
2892
+ const dataRows = _optionalChain([processedRowData, 'optionalAccess', _67 => _67.map, 'call', _68 => _68((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
2839
2893
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { $amountofColumns: HeadColumns.length, children: HeadColumns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBodyCell, { $primaryBoldState: column.PrimaryBoldText, children: item[column.key] }, `TableBodycell-${item.id}-${column.key}`)) }),
2840
2894
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ButtonStylingRow, { children: [
2841
2895
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadMissionButton, { onClick: downloadMissionOnClick, children: "Download Mission" }),
@@ -2929,8 +2983,8 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
2929
2983
  root = _client.createRoot.call(void 0, container);
2930
2984
  dropdownRoots.current.set(container, root);
2931
2985
  }
2932
- const item = _optionalChain([data, 'optionalAccess', _70 => _70.find, 'call', _71 => _71((i) => String(i.id) === String(itemId))]);
2933
- if (_optionalChain([item, 'optionalAccess', _72 => _72.dropdown]) && root) {
2986
+ const item = _optionalChain([data, 'optionalAccess', _69 => _69.find, 'call', _70 => _70((i) => String(i.id) === String(itemId))]);
2987
+ if (_optionalChain([item, 'optionalAccess', _71 => _71.dropdown]) && root) {
2934
2988
  root.render(item.dropdown);
2935
2989
  }
2936
2990
  };
@@ -3062,9 +3116,9 @@ var NestedDataTable = ({ data, columns, id }) => {
3062
3116
  const SubDataHeaders = SubDataColumns.map((column, index) => {
3063
3117
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: column.title }, `SubHeadCell-${index}`);
3064
3118
  });
3065
- const subDataRows = !_optionalChain([data, 'optionalAccess', _73 => _73.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
3119
+ const subDataRows = !_optionalChain([data, 'optionalAccess', _72 => _72.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
3066
3120
  const columnKey = trimBeforePeriod(column.key);
3067
- const value = _optionalChain([item, 'access', _74 => _74.Details, 'optionalAccess', _75 => _75[columnKey]]);
3121
+ const value = _optionalChain([item, 'access', _73 => _73.Details, 'optionalAccess', _74 => _74[columnKey]]);
3068
3122
  console.log("value: ", value);
3069
3123
  if (value !== void 0) {
3070
3124
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }) }, `Span-${item.id}-${colIndex}`);
@@ -3074,7 +3128,7 @@ var NestedDataTable = ({ data, columns, id }) => {
3074
3128
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: SubDataHeaders }) }),
3075
3129
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: subDataRows })
3076
3130
  ] });
3077
- const rows = !_optionalChain([data, 'optionalAccess', _76 => _76.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([data, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3131
+ const rows = !_optionalChain([data, 'optionalAccess', _75 => _75.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([data, 'optionalAccess', _76 => _76.map, 'call', _77 => _77((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3078
3132
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PrimaryTrRows, { $index: index, children: [
3079
3133
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownButton, { onClick: () => toggleDropdown(index), children: isAscending && isOpen && primaryRowIndex === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2227" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2228" }) }),
3080
3134
  HeadColumns.map((column, index2) => {
@@ -3671,10 +3725,10 @@ var WavelengthCheckboxList = ({ label, helperText, checkboxInformation, children
3671
3725
  if (!el) return;
3672
3726
  function verifyAttribute(attribute, value) {
3673
3727
  if (value === void 0 || value === null) {
3674
- _optionalChain([el, 'optionalAccess', _79 => _79.removeAttribute, 'call', _80 => _80(attribute)]);
3728
+ _optionalChain([el, 'optionalAccess', _78 => _78.removeAttribute, 'call', _79 => _79(attribute)]);
3675
3729
  return;
3676
3730
  }
3677
- _optionalChain([el, 'optionalAccess', _81 => _81.setAttribute, 'call', _82 => _82(attribute, value)]);
3731
+ _optionalChain([el, 'optionalAccess', _80 => _80.setAttribute, 'call', _81 => _81(attribute, value)]);
3678
3732
  }
3679
3733
  verifyAttribute("label", label);
3680
3734
  verifyAttribute("helper-text", helperText);
@@ -154,15 +154,17 @@ interface WavelengthNavBarProps extends React__default.HTMLAttributes<HTMLElemen
154
154
  }
155
155
  declare const WavelengthNavBar: React__default.FC<WavelengthNavBarProps>;
156
156
 
157
- interface IFileSelectedEventDetail {
157
+ interface FileSelectedEventDetail {
158
158
  files: File | File[];
159
159
  }
160
+ type IFileSelectedEventDetail = FileSelectedEventDetail;
160
161
  interface WavelengthFileDropZoneProps extends React__default.HTMLAttributes<HTMLElement> {
161
162
  acceptedTypes?: string;
162
163
  maxSize?: number;
163
164
  multiple?: boolean;
164
165
  dragText?: string;
165
166
  iconSrc?: string;
167
+ width?: string;
166
168
  onFilesSelected?: (files: File | File[]) => void;
167
169
  hostDisplay?: string;
168
170
  hostWidth?: string;
@@ -200,7 +202,7 @@ interface WavelengthFileDropZoneProps extends React__default.HTMLAttributes<HTML
200
202
  errorFontSize?: string;
201
203
  errorMarginTop?: string;
202
204
  }
203
- declare const WavelengthFileDropZone: React__default.FC<WavelengthFileDropZoneProps>;
205
+ declare const WavelengthFileDropZone: React__default.ForwardRefExoticComponent<WavelengthFileDropZoneProps & React__default.RefAttributes<HTMLElement>>;
204
206
 
205
207
  interface WavelengthWebSnackbarProps extends React__default.HTMLAttributes<HTMLElement> {
206
208
  message?: string;
@@ -838,4 +840,4 @@ interface WavelengthCheckboxListProps extends React__default.HTMLAttributes<HTML
838
840
  }
839
841
  declare const WavelengthCheckboxList: React__default.FC<WavelengthCheckboxListProps>;
840
842
 
841
- export { ChildDataTable, type DataGridColumn, type DataGridRow, type IFileSelectedEventDetail, type NavItem, NestedDataTable, SampleComponent, type SearchResult, type ThemeProperties, WavelengthAppLogo, WavelengthAppTheme, WavelengthAutoComplete, WavelengthBadge, type WavelengthBadgeProps, WavelengthBanner, WavelengthButton, WavelengthCard, WavelengthCheckbox, WavelengthCheckboxList, WavelengthCommentDisplay, WavelengthConfirmationModal, WavelengthContentPlaceholder, WavelengthDataGrid, WavelengthDataTable, WavelengthDatePicker, WavelengthDefaultIcon, WavelengthDialog, WavelengthDropdown, WavelengthExampleComponent, WavelengthFileDropZone, type WavelengthFileDropZoneProps, WavelengthForm, WavelengthInput, WavelengthManyPlanes, WavelengthMenu, WavelengthMultiSelectAutocomplete, WavelengthNavBar, type WavelengthNavBarProps, WavelengthNotAvailablePage, WavelengthNotificationPanel, WavelengthPagination, WavelengthPermissionAlert, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthProgressBar, WavelengthSearch, WavelengthSideBar, type WavelengthSideBarProps, WavelengthSlider, WavelengthSpinningLogo, WavelengthSwitch, WavelengthTitleBar, WavelengthToolTip, WavelengthWebSnackbar, type WavelengthWebSnackbarProps, add, concat, useThemeContext };
843
+ export { ChildDataTable, type DataGridColumn, type DataGridRow, type FileSelectedEventDetail, type IFileSelectedEventDetail, type NavItem, NestedDataTable, SampleComponent, type SearchResult, type ThemeProperties, WavelengthAppLogo, WavelengthAppTheme, WavelengthAutoComplete, WavelengthBadge, type WavelengthBadgeProps, WavelengthBanner, WavelengthButton, WavelengthCard, WavelengthCheckbox, WavelengthCheckboxList, WavelengthCommentDisplay, WavelengthConfirmationModal, WavelengthContentPlaceholder, WavelengthDataGrid, WavelengthDataTable, WavelengthDatePicker, WavelengthDefaultIcon, WavelengthDialog, WavelengthDropdown, WavelengthExampleComponent, WavelengthFileDropZone, type WavelengthFileDropZoneProps, WavelengthForm, WavelengthInput, WavelengthManyPlanes, WavelengthMenu, WavelengthMultiSelectAutocomplete, WavelengthNavBar, type WavelengthNavBarProps, WavelengthNotAvailablePage, WavelengthNotificationPanel, WavelengthPagination, WavelengthPermissionAlert, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthProgressBar, WavelengthSearch, WavelengthSideBar, type WavelengthSideBarProps, WavelengthSlider, WavelengthSpinningLogo, WavelengthSwitch, WavelengthTitleBar, WavelengthToolTip, WavelengthWebSnackbar, type WavelengthWebSnackbarProps, add, concat, useThemeContext };
@@ -154,15 +154,17 @@ interface WavelengthNavBarProps extends React__default.HTMLAttributes<HTMLElemen
154
154
  }
155
155
  declare const WavelengthNavBar: React__default.FC<WavelengthNavBarProps>;
156
156
 
157
- interface IFileSelectedEventDetail {
157
+ interface FileSelectedEventDetail {
158
158
  files: File | File[];
159
159
  }
160
+ type IFileSelectedEventDetail = FileSelectedEventDetail;
160
161
  interface WavelengthFileDropZoneProps extends React__default.HTMLAttributes<HTMLElement> {
161
162
  acceptedTypes?: string;
162
163
  maxSize?: number;
163
164
  multiple?: boolean;
164
165
  dragText?: string;
165
166
  iconSrc?: string;
167
+ width?: string;
166
168
  onFilesSelected?: (files: File | File[]) => void;
167
169
  hostDisplay?: string;
168
170
  hostWidth?: string;
@@ -200,7 +202,7 @@ interface WavelengthFileDropZoneProps extends React__default.HTMLAttributes<HTML
200
202
  errorFontSize?: string;
201
203
  errorMarginTop?: string;
202
204
  }
203
- declare const WavelengthFileDropZone: React__default.FC<WavelengthFileDropZoneProps>;
205
+ declare const WavelengthFileDropZone: React__default.ForwardRefExoticComponent<WavelengthFileDropZoneProps & React__default.RefAttributes<HTMLElement>>;
204
206
 
205
207
  interface WavelengthWebSnackbarProps extends React__default.HTMLAttributes<HTMLElement> {
206
208
  message?: string;
@@ -838,4 +840,4 @@ interface WavelengthCheckboxListProps extends React__default.HTMLAttributes<HTML
838
840
  }
839
841
  declare const WavelengthCheckboxList: React__default.FC<WavelengthCheckboxListProps>;
840
842
 
841
- export { ChildDataTable, type DataGridColumn, type DataGridRow, type IFileSelectedEventDetail, type NavItem, NestedDataTable, SampleComponent, type SearchResult, type ThemeProperties, WavelengthAppLogo, WavelengthAppTheme, WavelengthAutoComplete, WavelengthBadge, type WavelengthBadgeProps, WavelengthBanner, WavelengthButton, WavelengthCard, WavelengthCheckbox, WavelengthCheckboxList, WavelengthCommentDisplay, WavelengthConfirmationModal, WavelengthContentPlaceholder, WavelengthDataGrid, WavelengthDataTable, WavelengthDatePicker, WavelengthDefaultIcon, WavelengthDialog, WavelengthDropdown, WavelengthExampleComponent, WavelengthFileDropZone, type WavelengthFileDropZoneProps, WavelengthForm, WavelengthInput, WavelengthManyPlanes, WavelengthMenu, WavelengthMultiSelectAutocomplete, WavelengthNavBar, type WavelengthNavBarProps, WavelengthNotAvailablePage, WavelengthNotificationPanel, WavelengthPagination, WavelengthPermissionAlert, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthProgressBar, WavelengthSearch, WavelengthSideBar, type WavelengthSideBarProps, WavelengthSlider, WavelengthSpinningLogo, WavelengthSwitch, WavelengthTitleBar, WavelengthToolTip, WavelengthWebSnackbar, type WavelengthWebSnackbarProps, add, concat, useThemeContext };
843
+ export { ChildDataTable, type DataGridColumn, type DataGridRow, type FileSelectedEventDetail, type IFileSelectedEventDetail, type NavItem, NestedDataTable, SampleComponent, type SearchResult, type ThemeProperties, WavelengthAppLogo, WavelengthAppTheme, WavelengthAutoComplete, WavelengthBadge, type WavelengthBadgeProps, WavelengthBanner, WavelengthButton, WavelengthCard, WavelengthCheckbox, WavelengthCheckboxList, WavelengthCommentDisplay, WavelengthConfirmationModal, WavelengthContentPlaceholder, WavelengthDataGrid, WavelengthDataTable, WavelengthDatePicker, WavelengthDefaultIcon, WavelengthDialog, WavelengthDropdown, WavelengthExampleComponent, WavelengthFileDropZone, type WavelengthFileDropZoneProps, WavelengthForm, WavelengthInput, WavelengthManyPlanes, WavelengthMenu, WavelengthMultiSelectAutocomplete, WavelengthNavBar, type WavelengthNavBarProps, WavelengthNotAvailablePage, WavelengthNotificationPanel, WavelengthPagination, WavelengthPermissionAlert, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthProgressBar, WavelengthSearch, WavelengthSideBar, type WavelengthSideBarProps, WavelengthSlider, WavelengthSpinningLogo, WavelengthSwitch, WavelengthTitleBar, WavelengthToolTip, WavelengthWebSnackbar, type WavelengthWebSnackbarProps, add, concat, useThemeContext };
package/dist/esm/index.js CHANGED
@@ -823,118 +823,172 @@ var WavelengthNavBar = ({ items, bgColor, txtColor, hoverColor, height, padding,
823
823
  };
824
824
 
825
825
  // src/components/FileDropZone/WavelengthFileDropZone.tsx
826
- import { useEffect as useEffect6, useRef as useRef6 } from "react";
826
+ import { forwardRef, useEffect as useEffect6, useImperativeHandle, useMemo, useRef as useRef6 } from "react";
827
827
  import "@wavelengthusaf/web-components";
828
828
  import { jsx as jsx9 } from "react/jsx-runtime";
829
- var WavelengthFileDropZone = ({
830
- acceptedTypes,
831
- maxSize,
832
- multiple,
833
- dragText,
834
- iconSrc,
835
- onFilesSelected,
836
- hostDisplay,
837
- hostWidth,
838
- inputDisplay,
839
- borderWidth,
840
- borderStyle,
841
- borderColor,
842
- borderRadius,
843
- padding,
844
- textAlign,
845
- backgroundColor,
846
- cursor,
847
- transition,
848
- display,
849
- flexDirection,
850
- alignItems,
851
- gap,
852
- borderHoverColor,
853
- backgroundHoverColor,
854
- borderActiveColor,
855
- backgroundActiveColor,
856
- contentDisplay,
857
- contentFlexDirection,
858
- contentAlignItems,
859
- contentGap,
860
- textColor,
861
- fontFamily,
862
- fontStyle,
863
- fontSize,
864
- lineHeight,
865
- letterSpacing,
866
- iconSize,
867
- errorColor,
868
- errorFontFamily,
869
- errorFontSize,
870
- errorMarginTop,
871
- style,
872
- children,
873
- ...rest
874
- }) => {
875
- const ref = useRef6(null);
876
- useEffect6(() => {
877
- const el = ref.current;
878
- if (!el) return;
879
- if (acceptedTypes !== void 0) el.setAttribute("accepted-types", acceptedTypes);
880
- else el.removeAttribute("accepted-types");
881
- if (maxSize !== void 0) el.setAttribute("max-size", String(maxSize));
882
- else el.removeAttribute("max-size");
883
- if (dragText !== void 0) el.setAttribute("drag-text", dragText);
884
- else el.removeAttribute("drag-text");
885
- if (iconSrc !== void 0) el.setAttribute("icon-src", iconSrc);
886
- else el.removeAttribute("icon-src");
887
- if (multiple) el.setAttribute("multiple", "");
888
- else el.removeAttribute("multiple");
889
- const handleFilesSelected = (event) => {
890
- const customEvent = event;
891
- onFilesSelected?.(customEvent.detail.files);
892
- };
893
- el.addEventListener("files-selected", handleFilesSelected);
894
- return () => {
895
- el.removeEventListener("files-selected", handleFilesSelected);
896
- };
897
- }, [acceptedTypes, maxSize, multiple, dragText, iconSrc, onFilesSelected]);
898
- const mergedStyle = {
899
- ...style,
900
- "--hostDisplay": hostDisplay,
901
- "--hostWidth": hostWidth,
902
- "--inputDisplay": inputDisplay,
903
- "--borderWidth": borderWidth,
904
- "--borderStyle": borderStyle,
905
- "--borderColor": borderColor,
906
- "--borderRadius": borderRadius,
907
- "--padding": padding,
908
- "--textAlign": textAlign,
909
- "--backgroundColor": backgroundColor,
910
- "--cursor": cursor,
911
- "--transition": transition,
912
- "--display": display,
913
- "--flexDirection": flexDirection,
914
- "--alignItems": alignItems,
915
- "--gap": gap,
916
- "--borderHoverColor": borderHoverColor,
917
- "--backgroundHoverColor": backgroundHoverColor,
918
- "--borderActiveColor": borderActiveColor,
919
- "--backgroundActiveColor": backgroundActiveColor,
920
- "--contentDisplay": contentDisplay,
921
- "--contentFlexDirection": contentFlexDirection,
922
- "--contentAlignItems": contentAlignItems,
923
- "--contentGap": contentGap,
924
- "--textColor": textColor,
925
- "--fontFamily": fontFamily,
926
- "--fontStyle": fontStyle,
927
- "--fontSize": fontSize,
928
- "--lineHeight": lineHeight,
929
- "--letterSpacing": letterSpacing,
930
- "--iconSize": iconSize,
931
- "--errorColor": errorColor,
932
- "--errorFontFamily": errorFontFamily,
933
- "--errorFontSize": errorFontSize,
934
- "--errorMarginTop": errorMarginTop
935
- };
936
- return /* @__PURE__ */ jsx9("wavelength-file-drop-zone", { ref, style: mergedStyle, ...rest, children });
829
+ var setAttribute = (element, attribute, value) => {
830
+ if (value === void 0 || value === null) {
831
+ element.removeAttribute(attribute);
832
+ return;
833
+ }
834
+ element.setAttribute(attribute, String(value));
937
835
  };
836
+ var WavelengthFileDropZone = forwardRef(
837
+ ({
838
+ acceptedTypes,
839
+ maxSize,
840
+ multiple,
841
+ dragText,
842
+ iconSrc,
843
+ width,
844
+ onFilesSelected,
845
+ hostDisplay,
846
+ hostWidth,
847
+ inputDisplay,
848
+ borderWidth,
849
+ borderStyle,
850
+ borderColor,
851
+ borderRadius,
852
+ padding,
853
+ textAlign,
854
+ backgroundColor,
855
+ cursor,
856
+ transition,
857
+ display,
858
+ flexDirection,
859
+ alignItems,
860
+ gap,
861
+ borderHoverColor,
862
+ backgroundHoverColor,
863
+ borderActiveColor,
864
+ backgroundActiveColor,
865
+ contentDisplay,
866
+ contentFlexDirection,
867
+ contentAlignItems,
868
+ contentGap,
869
+ textColor,
870
+ fontFamily,
871
+ fontStyle,
872
+ fontSize,
873
+ lineHeight,
874
+ letterSpacing,
875
+ iconSize,
876
+ errorColor,
877
+ errorFontFamily,
878
+ errorFontSize,
879
+ errorMarginTop,
880
+ style,
881
+ children,
882
+ ...rest
883
+ }, ref) => {
884
+ const elementRef = useRef6(null);
885
+ useImperativeHandle(ref, () => elementRef.current);
886
+ useEffect6(() => {
887
+ const element = elementRef.current;
888
+ if (!element) return;
889
+ setAttribute(element, "accepted-types", acceptedTypes);
890
+ setAttribute(element, "max-size", maxSize);
891
+ setAttribute(element, "drag-text", dragText);
892
+ setAttribute(element, "icon-src", iconSrc);
893
+ if (multiple) {
894
+ element.setAttribute("multiple", "");
895
+ } else {
896
+ element.removeAttribute("multiple");
897
+ }
898
+ }, [acceptedTypes, maxSize, multiple, dragText, iconSrc]);
899
+ useEffect6(() => {
900
+ const element = elementRef.current;
901
+ if (!element || !onFilesSelected) return;
902
+ const handleFilesSelected = (event) => {
903
+ const customEvent = event;
904
+ onFilesSelected(customEvent.detail.files);
905
+ };
906
+ element.addEventListener("files-selected", handleFilesSelected);
907
+ return () => element.removeEventListener("files-selected", handleFilesSelected);
908
+ }, [onFilesSelected]);
909
+ const mergedStyle = useMemo(
910
+ () => ({
911
+ ...style,
912
+ "--hostDisplay": hostDisplay,
913
+ "--hostWidth": hostWidth ?? width,
914
+ "--inputDisplay": inputDisplay,
915
+ "--borderWidth": borderWidth,
916
+ "--borderStyle": borderStyle,
917
+ "--borderColor": borderColor,
918
+ "--borderRadius": borderRadius,
919
+ "--padding": padding,
920
+ "--textAlign": textAlign,
921
+ "--backgroundColor": backgroundColor,
922
+ "--cursor": cursor,
923
+ "--transition": transition,
924
+ "--display": display,
925
+ "--flexDirection": flexDirection,
926
+ "--alignItems": alignItems,
927
+ "--gap": gap,
928
+ "--borderHoverColor": borderHoverColor,
929
+ "--backgroundHoverColor": backgroundHoverColor,
930
+ "--borderActiveColor": borderActiveColor,
931
+ "--backgroundActiveColor": backgroundActiveColor,
932
+ "--contentDisplay": contentDisplay,
933
+ "--contentFlexDirection": contentFlexDirection,
934
+ "--contentAlignItems": contentAlignItems,
935
+ "--contentGap": contentGap,
936
+ "--textColor": textColor,
937
+ "--fontFamily": fontFamily,
938
+ "--fontStyle": fontStyle,
939
+ "--fontSize": fontSize,
940
+ "--lineHeight": lineHeight,
941
+ "--letterSpacing": letterSpacing,
942
+ "--iconSize": iconSize,
943
+ "--errorColor": errorColor,
944
+ "--errorFontFamily": errorFontFamily,
945
+ "--errorFontSize": errorFontSize,
946
+ "--errorMarginTop": errorMarginTop
947
+ }),
948
+ [
949
+ style,
950
+ hostDisplay,
951
+ hostWidth,
952
+ width,
953
+ inputDisplay,
954
+ borderWidth,
955
+ borderStyle,
956
+ borderColor,
957
+ borderRadius,
958
+ padding,
959
+ textAlign,
960
+ backgroundColor,
961
+ cursor,
962
+ transition,
963
+ display,
964
+ flexDirection,
965
+ alignItems,
966
+ gap,
967
+ borderHoverColor,
968
+ backgroundHoverColor,
969
+ borderActiveColor,
970
+ backgroundActiveColor,
971
+ contentDisplay,
972
+ contentFlexDirection,
973
+ contentAlignItems,
974
+ contentGap,
975
+ textColor,
976
+ fontFamily,
977
+ fontStyle,
978
+ fontSize,
979
+ lineHeight,
980
+ letterSpacing,
981
+ iconSize,
982
+ errorColor,
983
+ errorFontFamily,
984
+ errorFontSize,
985
+ errorMarginTop
986
+ ]
987
+ );
988
+ return /* @__PURE__ */ jsx9("wavelength-file-drop-zone", { ref: elementRef, style: mergedStyle, ...rest, children });
989
+ }
990
+ );
991
+ WavelengthFileDropZone.displayName = "WavelengthFileDropZone";
938
992
 
939
993
  // src/components/SnackBar/WavelengthWebSnackbar.tsx
940
994
  import { useEffect as useEffect7, useRef as useRef7 } from "react";
@@ -1268,7 +1322,7 @@ var WavelengthCommentDisplay = ({
1268
1322
  WavelengthCommentDisplay.displayName = "WavelengthCommentDisplay";
1269
1323
 
1270
1324
  // src/components/forms/WavelengthForm.tsx
1271
- import React12, { useEffect as useEffect13, useImperativeHandle, useRef as useRef13 } from "react";
1325
+ import React12, { useEffect as useEffect13, useImperativeHandle as useImperativeHandle2, useRef as useRef13 } from "react";
1272
1326
  import "@wavelengthusaf/web-components";
1273
1327
  import { jsx as jsx16 } from "react/jsx-runtime";
1274
1328
  function useStableCallback(fn) {
@@ -1376,7 +1430,7 @@ function WavelengthFormInner(props, ref) {
1376
1430
  el.removeEventListener("submit", onSubmitStable);
1377
1431
  };
1378
1432
  }, [onChangeStable, onValidStable, onInvalidStable, onLeftStable, onCenterStable, onRightStable, onSubmitStable]);
1379
- useImperativeHandle(
1433
+ useImperativeHandle2(
1380
1434
  ref,
1381
1435
  () => ({
1382
1436
  validate: () => hostRef.current?.validate?.() ?? false,
@@ -1620,9 +1674,9 @@ var WavelengthPopUpMenu = React16.forwardRef(
1620
1674
  WavelengthPopUpMenu.displayName = "WavelengthPopUpMenu";
1621
1675
 
1622
1676
  // src/components/modals/WavelengthDropdown.tsx
1623
- import { forwardRef, useEffect as useEffect20, useImperativeHandle as useImperativeHandle2, useRef as useRef20 } from "react";
1677
+ import { forwardRef as forwardRef2, useEffect as useEffect20, useImperativeHandle as useImperativeHandle3, useRef as useRef20 } from "react";
1624
1678
  import { jsx as jsx24 } from "react/jsx-runtime";
1625
- var WavelengthDropdown = forwardRef((props, ref) => {
1679
+ var WavelengthDropdown = forwardRef2((props, ref) => {
1626
1680
  const {
1627
1681
  options,
1628
1682
  defaultValue,
@@ -1647,7 +1701,7 @@ var WavelengthDropdown = forwardRef((props, ref) => {
1647
1701
  ...rest
1648
1702
  } = props;
1649
1703
  const elementRef = useRef20(null);
1650
- useImperativeHandle2(ref, () => elementRef.current);
1704
+ useImperativeHandle3(ref, () => elementRef.current);
1651
1705
  useEffect20(() => {
1652
1706
  const el = elementRef.current;
1653
1707
  if (!el || !onChange) return;
@@ -1990,10 +2044,10 @@ var WavelengthSlider = ({ children, customStyle, value, maxVal, minVal, step, ha
1990
2044
  WavelengthSlider.displayName = "WavelengthSlider";
1991
2045
 
1992
2046
  // src/components/TextField/WavelengthInput.tsx
1993
- import { useRef as useRef26, useEffect as useEffect26, forwardRef as forwardRef2, useImperativeHandle as useImperativeHandle3 } from "react";
2047
+ import { useRef as useRef26, useEffect as useEffect26, forwardRef as forwardRef3, useImperativeHandle as useImperativeHandle4 } from "react";
1994
2048
  import "@wavelengthusaf/web-components";
1995
2049
  import { jsx as jsx30 } from "react/jsx-runtime";
1996
- var WavelengthInput = forwardRef2(
2050
+ var WavelengthInput = forwardRef3(
1997
2051
  ({
1998
2052
  id,
1999
2053
  name,
@@ -2031,7 +2085,7 @@ var WavelengthInput = forwardRef2(
2031
2085
  ...rest
2032
2086
  }, ref) => {
2033
2087
  const internalRef = useRef26(null);
2034
- useImperativeHandle3(ref, () => ({
2088
+ useImperativeHandle4(ref, () => ({
2035
2089
  ...internalRef.current,
2036
2090
  validate: () => internalRef.current?.validate?.(true)
2037
2091
  }));
@@ -2542,7 +2596,7 @@ var WavelengthDataGrid = ({ columns, rows, pageSize = 10, checkboxSelection = fa
2542
2596
  WavelengthDataGrid.displayName = "WavelengthDataGrid";
2543
2597
 
2544
2598
  // src/components/DataTable/SubRowTable/ChildSubTable.tsx
2545
- import { useMemo as useMemo2, useState as useState2, Fragment as Fragment4 } from "react";
2599
+ import { useMemo as useMemo3, useState as useState2, Fragment as Fragment4 } from "react";
2546
2600
  import styled2 from "styled-components";
2547
2601
  import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
2548
2602
  var TableContainer = styled2.div`
@@ -2732,7 +2786,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
2732
2786
  const index = text.indexOf(".");
2733
2787
  return index === -1 ? text : text.substring(index + 1);
2734
2788
  }
2735
- const processedRowData = useMemo2(() => {
2789
+ const processedRowData = useMemo3(() => {
2736
2790
  const result = [...data ?? []];
2737
2791
  if (sortOrder) {
2738
2792
  result.sort((a, b) => {
@@ -2861,7 +2915,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
2861
2915
  ChildDataTable.displayName = "ChildDataTable";
2862
2916
 
2863
2917
  // src/components/DataTable/SubRowTable/ChildDataTable.tsx
2864
- import { useRef as useRef29, useEffect as useEffect29, useMemo as useMemo3 } from "react";
2918
+ import { useRef as useRef29, useEffect as useEffect29, useMemo as useMemo4 } from "react";
2865
2919
  import { createRoot } from "react-dom/client";
2866
2920
  import "@wavelengthusaf/web-components";
2867
2921
  import { jsx as jsx34 } from "react/jsx-runtime";
@@ -2877,7 +2931,7 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
2877
2931
  root.render(element);
2878
2932
  return container;
2879
2933
  };
2880
- const processedColumns = useMemo3(() => {
2934
+ const processedColumns = useMemo4(() => {
2881
2935
  if (!Array.isArray(columns)) return columns;
2882
2936
  return columns.map((col) => {
2883
2937
  if (typeof col.renderCell === "function") {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wavelengthusaf/components",
3
3
  "author": "563 EWS - Wavelength",
4
4
  "license": "MIT",
5
- "version": "5.0.0",
5
+ "version": "5.0.3",
6
6
  "description": "Common component library used by Wavelength developers",
7
7
  "main": "/dist/cjs/index.cjs",
8
8
  "module": "/dist/esm/index.js",
@@ -67,7 +67,7 @@
67
67
  "tsup": "^8.0.1"
68
68
  },
69
69
  "dependencies": {
70
- "@wavelengthusaf/web-components": "^2.0.0",
70
+ "@wavelengthusaf/web-components": "^2.0.3",
71
71
  "react": "^18.0.0",
72
72
  "styled-components": "^6.1.12",
73
73
  "typescript": "^5.5.2"