@wavelengthusaf/components 3.3.7 → 3.3.9

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
+ ### 3.3.9
18
+
19
+ - 8/18/2025
20
+ - Updated `WlAutoComplete` and `WlDatePicker` to be able to accept percentages values for width, as well as fixing the transperancy issues with the floating label.
21
+
22
+ ### 3.3.8
23
+
24
+ - 8/11/2025
25
+ - 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.
26
+
17
27
  ### 3.3.7
18
28
 
19
29
  - 8/11/2025
@@ -8396,21 +8396,16 @@ 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
8399
  var AutoContainer = _styledcomponents2.default.div`
8406
- position: absolute;
8407
- border-radius: 6px;
8408
- `;
8409
- var InputWrapper = _styledcomponents2.default.div`
8400
+ //position: relative;
8410
8401
  position: relative;
8411
8402
  width: ${(props) => props.$inputwidth || "320px"};
8412
8403
  height: ${(props) => props.$inputheight || "51px"};
8413
8404
  `;
8405
+ var InputWrapper = _styledcomponents2.default.div`
8406
+ width: 100%;
8407
+ height: 100%;
8408
+ `;
8414
8409
  var Label = _styledcomponents2.default.label`
8415
8410
  position: absolute;
8416
8411
  top: 50%;
@@ -8424,8 +8419,8 @@ var Label = _styledcomponents2.default.label`
8424
8419
  background-color: transparent;
8425
8420
  `;
8426
8421
  var Input = _styledcomponents2.default.input`
8427
- width: inherit;
8428
- height: inherit;
8422
+ width: 100%; //this must be 100%, as width inherit inherits the litaral experession, not the value
8423
+ height: 100%;
8429
8424
  padding: 0.5rem 0.75rem;
8430
8425
  border: ${(props) => props.$inputBorderStyling || "2px solid #ccc"};
8431
8426
  border-radius: 4px;
@@ -8458,7 +8453,7 @@ var Input = _styledcomponents2.default.input`
8458
8453
  return $focusedLabelColor;
8459
8454
  }};
8460
8455
  transform: translate(0%, -50%) scale(0.8);
8461
- background: linear-gradient(to bottom, transparent 50%, white 0%);
8456
+ background: linear-gradient(to bottom, transparent 50%, ${(props) => props.$primary ? props.$primary : "#FFFFFF"} 0%);
8462
8457
  }
8463
8458
 
8464
8459
  &:not(:focus) + ${Label} {
@@ -8467,7 +8462,8 @@ var Input = _styledcomponents2.default.input`
8467
8462
  `;
8468
8463
  var DropDownList = _styledcomponents2.default.ul`
8469
8464
  position: absolute;
8470
- width: ${(props) => props.$inputwidth || "320px"};
8465
+ z-index: 5;
8466
+ width: 100%;
8471
8467
  background-color: white;
8472
8468
  border: 1px solid #ccc;
8473
8469
  margin-top: 0px;
@@ -8480,6 +8476,7 @@ var DropDownList = _styledcomponents2.default.ul`
8480
8476
  `;
8481
8477
  var ActiveListItem = _styledcomponents2.default.li`
8482
8478
  position: relative;
8479
+ width: 100%;
8483
8480
  z-index: 9999;
8484
8481
  padding: 10px;
8485
8482
  border-radius: 8px;
@@ -8588,7 +8585,7 @@ var WLAutoComplete = ({
8588
8585
  setIsDropdownVisible(false);
8589
8586
  } else {
8590
8587
  if (data.includes(inputValue)) {
8591
- onDataChange(inputValue);
8588
+ if (onDataChange !== void 0) onDataChange(inputValue);
8592
8589
  } else {
8593
8590
  handleBlur;
8594
8591
  }
@@ -8610,7 +8607,7 @@ var WLAutoComplete = ({
8610
8607
  break;
8611
8608
  }
8612
8609
  };
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: [
8610
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AutoContainer, { $inputheight: height2, $inputwidth: width2, children: [
8614
8611
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { id: `${idName}-inputwrapper`, $inputheight: height2, $inputwidth: width2, children: [
8615
8612
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8616
8613
  Input,
@@ -8654,7 +8651,7 @@ var WLAutoComplete = ({
8654
8651
  `ActivelistItem-${item}-${index}`
8655
8652
  ))
8656
8653
  ) : /* @__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
- ] }) }) });
8654
+ ] }) });
8658
8655
  };
8659
8656
 
8660
8657
  // src/components/inputs/WavelengthInputDatePicketer.tsx
@@ -8707,65 +8704,75 @@ var WLInputDatePicker2 = () => {
8707
8704
 
8708
8705
 
8709
8706
 
8710
- var FloatLabel = _styledcomponents2.default.label`
8707
+ var Label2 = _styledcomponents2.default.label`
8711
8708
  position: absolute;
8712
8709
  top: 50%;
8713
- left: 20%;
8714
- transform: translate(-50%, -50%);
8715
- z-index: 99;
8716
- transition: all 0.2s ease-in-out;
8710
+ left: 10px;
8711
+ transform: translateY(-50%);
8712
+ font-size: 16px;
8717
8713
  pointer-events: none;
8718
- padding-left: 4px;
8719
- padding-right: 4px;
8720
-
8721
- &:active {
8722
- transform: translateY(-100%) scale(0.75);
8723
- }
8714
+ transition: 0.3s ease all;
8715
+ z-index: 999;
8716
+ padding: 0 5px;
8717
+ background-color: transparent;
8724
8718
  `;
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;
8719
+ var InputWrapper2 = _styledcomponents2.default.div`
8720
+ position: relative;
8721
+ width: ${(props) => props.$inputwidth || "320px"};
8722
+ height: ${(props) => props.$inputheight || "51px"};
8734
8723
 
8735
8724
  input {
8736
8725
  width: 100%;
8737
8726
  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"};
8727
+ padding: 0.5rem 0.75rem;
8728
+ border: ${(props) => props.$inputBorderStyling || "2px solid #ccc"}; //works
8741
8729
  border-radius: 4px;
8742
- outline: none;
8730
+ box-sizing: border-box;
8743
8731
  z-index: 1;
8744
- background-color: ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
8732
+ background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"}; //this works
8745
8733
 
8746
8734
  &:focus {
8747
- border: 1px solid ${(props) => props.$focusBordCol !== null && props.$focusBordCol !== void 0 && props.$focusBordCol !== "" ? props.$focusBordCol : "#CCFFFF"};
8735
+ border-color: ${(props) => props.$inputFocusBorderColor !== null ? props.$inputFocusBorderColor : "#4a90e2"};
8736
+ outline: none;
8737
+ background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"};
8748
8738
  }
8749
8739
 
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;
8740
+ &:focus + ${Label2}, &:not(:placeholder-shown) + ${Label2} {
8741
+ top: 0;
8742
+ left: 10px;
8743
+
8744
+ padding: 0 5px;
8745
+ color: ${(props) => props.$FocusLabelColor || "#4a90e2"};
8746
+ transform: translate(0%, -50%) scale(0.8);
8747
+ background: linear-gradient(to bottom, transparent 50%, ${(props) => props.$inputBackGroundColor ? props.$inputBackGroundColor : "#FFFFFF"} 0%);
8753
8748
  }
8754
- }
8755
8749
 
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"};
8750
+ &:not(:focus) + ${Label2} {
8751
+ color: ${(props) => props.$labelColor || "#ccc"};
8752
+ }
8762
8753
  }
8763
8754
  `;
8764
- var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, FocusBorderColor, FocusLabelColor, backgroundColor: backgroundColor2, height: height2, width: width2, min, max, inputTimeType, OnDataChange }) => {
8755
+ var WLDatePicker = ({
8756
+ id,
8757
+ name,
8758
+ inputBorderStyle,
8759
+ floatLabel,
8760
+ labelColor,
8761
+ inputFocusBorderColor,
8762
+ FocusLabelColor,
8763
+ backgroundColor: backgroundColor2,
8764
+ height: height2,
8765
+ width: width2,
8766
+ min,
8767
+ max,
8768
+ inputTimeType,
8769
+ OnDataChange
8770
+ }) => {
8765
8771
  const [inputType, setInputType] = _react.useState.call(void 0, "");
8766
8772
  const [value, setValue] = _react.useState.call(void 0, "");
8767
8773
  const [minAdjusted, setMinAdjusted] = _react.useState.call(void 0, "");
8768
8774
  const [maxAdjusted, setMaxAdjusted] = _react.useState.call(void 0, "");
8775
+ const idName = id ? id : "WlDatePick";
8769
8776
  _react.useEffect.call(void 0, () => {
8770
8777
  const minDate = new Date(min || "");
8771
8778
  const maxDate = new Date(max || "");
@@ -8803,24 +8810,26 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
8803
8810
  const handleChange = (e) => {
8804
8811
  const dateString = e.target.value;
8805
8812
  setValue(dateString);
8806
- OnDataChange(new Date(dateString));
8813
+ if (OnDataChange !== void 0) OnDataChange(new Date(dateString));
8807
8814
  };
8808
8815
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
8809
- FloatLabelContainer,
8816
+ InputWrapper2,
8810
8817
  {
8811
- $height: height2,
8812
- $width: width2,
8818
+ id: `${idName}-inputWrapper`,
8819
+ $inputBorderStyling: inputBorderStyle,
8820
+ $inputwidth: width2,
8821
+ $inputheight: height2,
8822
+ $inputFocusBorderColor: inputFocusBorderColor,
8813
8823
  $labelColor: labelColor,
8814
- $borderInpCol: borderColor2,
8815
- $focusBordCol: FocusBorderColor,
8816
- $inputBackground: backgroundColor2,
8817
- $focuslabel: FocusLabelColor,
8824
+ $FocusLabelColor: FocusLabelColor,
8825
+ $inputBackGroundColor: backgroundColor2,
8818
8826
  children: [
8819
8827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8820
8828
  "input",
8821
8829
  {
8822
8830
  type: inputType,
8823
- id: "Wl_date_picker_input",
8831
+ id: idName,
8832
+ name,
8824
8833
  "data-testid": "my_wl_date_input",
8825
8834
  onFocus: handleFocus,
8826
8835
  onBlur: handleBlur,
@@ -8831,7 +8840,7 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
8831
8840
  max: maxAdjusted
8832
8841
  }
8833
8842
  ),
8834
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FloatLabel, { $height: height2, $width: width2, htmlFor: "Wl_date_picker_input", children: labelVariant })
8843
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
8835
8844
  ]
8836
8845
  }
8837
8846
  );