@wavelengthusaf/components 3.3.7 → 3.3.8

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,11 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 3.3.8
18
+
19
+ - 8/11/2025
20
+ - Updated `WlAutoComplete` and `WlDatePicker` to have the same outline styling, removal of `position: absolute` in components and reordering of css behavior. Both components contain an optional `OnDataChange` prop and the storybook documentation has been updated.
21
+
17
22
  ### 3.3.7
18
23
 
19
24
  - 8/11/2025
@@ -8396,16 +8396,6 @@ var NestedDataTable = ({ data, columns }) => {
8396
8396
 
8397
8397
 
8398
8398
 
8399
- var OuterContainer = _styledcomponents2.default.div`
8400
- display: flex;
8401
- align-items: center;
8402
- justify-content: center;
8403
- border-radius: 5px;
8404
- `;
8405
- var AutoContainer = _styledcomponents2.default.div`
8406
- position: absolute;
8407
- border-radius: 6px;
8408
- `;
8409
8399
  var InputWrapper = _styledcomponents2.default.div`
8410
8400
  position: relative;
8411
8401
  width: ${(props) => props.$inputwidth || "320px"};
@@ -8458,7 +8448,7 @@ var Input = _styledcomponents2.default.input`
8458
8448
  return $focusedLabelColor;
8459
8449
  }};
8460
8450
  transform: translate(0%, -50%) scale(0.8);
8461
- background: linear-gradient(to bottom, transparent 50%, white 0%);
8451
+ background: linear-gradient(to bottom, transparent 50%, ${(props) => props.$primary !== null ? props.$primary : "#FFFFFF"} 0%);
8462
8452
  }
8463
8453
 
8464
8454
  &:not(:focus) + ${Label} {
@@ -8467,6 +8457,7 @@ var Input = _styledcomponents2.default.input`
8467
8457
  `;
8468
8458
  var DropDownList = _styledcomponents2.default.ul`
8469
8459
  position: absolute;
8460
+ z-index: 5;
8470
8461
  width: ${(props) => props.$inputwidth || "320px"};
8471
8462
  background-color: white;
8472
8463
  border: 1px solid #ccc;
@@ -8588,7 +8579,7 @@ var WLAutoComplete = ({
8588
8579
  setIsDropdownVisible(false);
8589
8580
  } else {
8590
8581
  if (data.includes(inputValue)) {
8591
- onDataChange(inputValue);
8582
+ if (onDataChange !== void 0) onDataChange(inputValue);
8592
8583
  } else {
8593
8584
  handleBlur;
8594
8585
  }
@@ -8610,7 +8601,7 @@ var WLAutoComplete = ({
8610
8601
  break;
8611
8602
  }
8612
8603
  };
8613
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, OuterContainer, { id: `${idName}-outercontain`, $primary: autoBackGroundColor, $inputheight: height2, $inputwidth: width2, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AutoContainer, { id: `${idName}-autocontain`, $primary: autoBackGroundColor, children: [
8604
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8614
8605
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { id: `${idName}-inputwrapper`, $inputheight: height2, $inputwidth: width2, children: [
8615
8606
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8616
8607
  Input,
@@ -8654,7 +8645,7 @@ var WLAutoComplete = ({
8654
8645
  `ActivelistItem-${item}-${index}`
8655
8646
  ))
8656
8647
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoHoverListItem, { "data-testid": "NoOptionsListitem", ref: noItemListRef, id: "No-Option-List-item", onMouseDown: (e) => e.preventDefault(), children: "No Options found" }) })
8657
- ] }) }) });
8648
+ ] }) });
8658
8649
  };
8659
8650
 
8660
8651
  // src/components/inputs/WavelengthInputDatePicketer.tsx
@@ -8707,65 +8698,75 @@ var WLInputDatePicker2 = () => {
8707
8698
 
8708
8699
 
8709
8700
 
8710
- var FloatLabel = _styledcomponents2.default.label`
8701
+ var Label2 = _styledcomponents2.default.label`
8711
8702
  position: absolute;
8712
8703
  top: 50%;
8713
- left: 20%;
8714
- transform: translate(-50%, -50%);
8715
- z-index: 99;
8716
- transition: all 0.2s ease-in-out;
8704
+ left: 10px;
8705
+ transform: translateY(-50%);
8706
+ font-size: 16px;
8717
8707
  pointer-events: none;
8718
- padding-left: 4px;
8719
- padding-right: 4px;
8720
-
8721
- &:active {
8722
- transform: translateY(-100%) scale(0.75);
8723
- }
8708
+ transition: 0.3s ease all;
8709
+ z-index: 999;
8710
+ padding: 0 5px;
8711
+ background-color: transparent;
8724
8712
  `;
8725
- var FloatLabelContainer = _styledcomponents2.default.div`
8726
- position: absolute;
8727
- height: ${(props) => props.$height !== null ? props.$height : "40px"};
8728
- width: ${(props) => props.$width !== null ? props.$width : "150px"};
8729
- border: 10px solid ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
8730
- border-radius: 4px;
8731
- background-color: ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
8732
- color: ${(props) => props.$labelColor !== null && props.$labelColor !== void 0 && props.$labelColor !== "" ? props.$labelColor : "#000000"};
8733
- align-items: center;
8713
+ var InputWrapper2 = _styledcomponents2.default.div`
8714
+ position: relative;
8715
+ width: ${(props) => props.$inputwidth || "320px"};
8716
+ height: ${(props) => props.$inputheight || "51px"};
8734
8717
 
8735
8718
  input {
8736
- width: 100%;
8737
- height: 100%;
8738
- box-sizing: border-box;
8739
- padding: 10px;
8740
- border: 1px solid ${(props) => props.$borderInpCol !== null && props.$borderInpCol !== void 0 && props.$borderInpCol !== "" ? props.$borderInpCol : "#ccc"};
8719
+ width: inherit;
8720
+ height: inherit;
8721
+ padding: 0.5rem 0.75rem;
8722
+ border: ${(props) => props.$inputBorderStyling || "2px solid #ccc"}; //works
8741
8723
  border-radius: 4px;
8742
- outline: none;
8724
+ box-sizing: border-box;
8743
8725
  z-index: 1;
8744
- background-color: ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
8726
+ background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"}; //this works
8745
8727
 
8746
8728
  &:focus {
8747
- border: 1px solid ${(props) => props.$focusBordCol !== null && props.$focusBordCol !== void 0 && props.$focusBordCol !== "" ? props.$focusBordCol : "#CCFFFF"};
8729
+ border-color: ${(props) => props.$inputFocusBorderColor !== null ? props.$inputFocusBorderColor : "#4a90e2"};
8730
+ outline: none;
8731
+ background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"};
8748
8732
  }
8749
8733
 
8750
- &::-webkit-calendar-picker-indicator {
8751
- background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2221%22%20viewBox%3D%220%200%2018%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M11.5%2016.5C10.8%2016.5%2010.2083%2016.2583%209.725%2015.775C9.24167%2015.2917%209%2014.7%209%2014C9%2013.3%209.24167%2012.7083%209.725%2012.225C10.2083%2011.7417%2010.8%2011.5%2011.5%2011.5C12.2%2011.5%2012.7917%2011.7417%2013.275%2012.225C13.7583%2012.7083%2014%2013.3%2014%2014C14%2014.7%2013.7583%2015.2917%2013.275%2015.775C12.7917%2016.2583%2012.2%2016.5%2011.5%2016.5ZM2%2020.5C1.45%2020.5%200.979167%2020.3042%200.5875%2019.9125C0.195833%2019.5208%200%2019.05%200%2018.5V4.5C0%203.95%200.195833%203.47917%200.5875%203.0875C0.979167%202.69583%201.45%202.5%202%202.5H3V0.5H5V2.5H13V0.5H15V2.5H16C16.55%202.5%2017.0208%202.69583%2017.4125%203.0875C17.8042%203.47917%2018%203.95%2018%204.5V18.5C18%2019.05%2017.8042%2019.5208%2017.4125%2019.9125C17.0208%2020.3042%2016.55%2020.5%2016%2020.5H2ZM2%2018.5H16V8.5H2V18.5ZM2%206.5H16V4.5H2V6.5Z%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A");
8752
- cursor: pointer;
8734
+ &:focus + ${Label2}, &:not(:placeholder-shown) + ${Label2} {
8735
+ top: 0;
8736
+ left: 10px;
8737
+
8738
+ padding: 0 5px;
8739
+ color: ${(props) => props.$FocusLabelColor || "#4a90e2"};
8740
+ transform: translate(0%, -50%) scale(0.8);
8741
+ background: linear-gradient(to bottom, transparent 50%, ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"} 0%);
8753
8742
  }
8754
- }
8755
8743
 
8756
- input:focus + ${FloatLabel}, input:not(:placeholder-shown) + ${FloatLabel} {
8757
- top: 0%;
8758
- left: 20%;
8759
- transform: translate(-50%, -50%) scale(0.75);
8760
- color: ${(props) => props.$focuslabel !== null && props.$focuslabel !== void 0 && props.$focuslabel !== "" ? props.$focuslabel : "#0047AB"}; /* Example active color */
8761
- background-color: ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
8744
+ &:not(:focus) + ${Label2} {
8745
+ color: ${(props) => props.$labelColor || "#ccc"};
8746
+ }
8762
8747
  }
8763
8748
  `;
8764
- var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, FocusBorderColor, FocusLabelColor, backgroundColor: backgroundColor2, height: height2, width: width2, min, max, inputTimeType, OnDataChange }) => {
8749
+ var WLDatePicker = ({
8750
+ id,
8751
+ name,
8752
+ inputBorderStyle,
8753
+ floatLabel,
8754
+ labelColor,
8755
+ inputFocusBorderColor,
8756
+ FocusLabelColor,
8757
+ backgroundColor: backgroundColor2,
8758
+ height: height2,
8759
+ width: width2,
8760
+ min,
8761
+ max,
8762
+ inputTimeType,
8763
+ OnDataChange
8764
+ }) => {
8765
8765
  const [inputType, setInputType] = _react.useState.call(void 0, "");
8766
8766
  const [value, setValue] = _react.useState.call(void 0, "");
8767
8767
  const [minAdjusted, setMinAdjusted] = _react.useState.call(void 0, "");
8768
8768
  const [maxAdjusted, setMaxAdjusted] = _react.useState.call(void 0, "");
8769
+ const idName = id ? id : "WlDatePick";
8769
8770
  _react.useEffect.call(void 0, () => {
8770
8771
  const minDate = new Date(min || "");
8771
8772
  const maxDate = new Date(max || "");
@@ -8803,24 +8804,26 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
8803
8804
  const handleChange = (e) => {
8804
8805
  const dateString = e.target.value;
8805
8806
  setValue(dateString);
8806
- OnDataChange(new Date(dateString));
8807
+ if (OnDataChange !== void 0) OnDataChange(new Date(dateString));
8807
8808
  };
8808
8809
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
8809
- FloatLabelContainer,
8810
+ InputWrapper2,
8810
8811
  {
8811
- $height: height2,
8812
- $width: width2,
8812
+ id: `${idName}-inputWrapper`,
8813
+ $inputBorderStyling: inputBorderStyle,
8814
+ $inputwidth: width2,
8815
+ $inputheight: height2,
8816
+ $inputFocusBorderColor: inputFocusBorderColor,
8813
8817
  $labelColor: labelColor,
8814
- $borderInpCol: borderColor2,
8815
- $focusBordCol: FocusBorderColor,
8816
- $inputBackground: backgroundColor2,
8817
- $focuslabel: FocusLabelColor,
8818
+ $FocusLabelColor: FocusLabelColor,
8819
+ $inputBackGroundColor: backgroundColor2,
8818
8820
  children: [
8819
8821
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8820
8822
  "input",
8821
8823
  {
8822
8824
  type: inputType,
8823
- id: "Wl_date_picker_input",
8825
+ id: idName,
8826
+ name,
8824
8827
  "data-testid": "my_wl_date_input",
8825
8828
  onFocus: handleFocus,
8826
8829
  onBlur: handleBlur,
@@ -8831,7 +8834,7 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
8831
8834
  max: maxAdjusted
8832
8835
  }
8833
8836
  ),
8834
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FloatLabel, { $height: height2, $width: width2, htmlFor: "Wl_date_picker_input", children: labelVariant })
8837
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
8835
8838
  ]
8836
8839
  }
8837
8840
  );