@wavelengthusaf/components 3.3.5 → 3.3.7

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.7
18
+
19
+ - 8/11/2025
20
+ - Introduced formAssociated = true for `WavelengthInput`. It allows the input to be recognized when utilized within a form element.
21
+
22
+ ### 3.3.6
23
+
24
+ - 8/11/2025
25
+ - Updated `WLAutoComplete` to have the outline styling refactored, the component also features a `id` and `name` prop for form handling. Fixed dropdown visibility issues.
26
+
17
27
  ### 3.3.5
18
28
 
19
29
  - 8/08/2025
@@ -27,7 +37,7 @@ npm install @wavelengthusaf/components
27
37
  ### 3.3.3
28
38
 
29
39
  - 8/05/2025
30
- - Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
40
+ - Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
31
41
 
32
42
  ### 3.3.2
33
43
 
@@ -37,7 +47,7 @@ npm install @wavelengthusaf/components
37
47
  ### 3.3.1
38
48
 
39
49
  - 6/22/2025
40
- - Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
50
+ - Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
41
51
 
42
52
  ### 3.3.0
43
53
 
@@ -57,7 +67,7 @@ npm install @wavelengthusaf/components
57
67
  ### 3.1.0
58
68
 
59
69
  - 6/2/2025
60
- - Added `WLChildDataTable`; Changed naming conventions for components into their respective categories.
70
+ - Added `WLChildDataTable`; Changed naming conventions for components into their respective categories.
61
71
 
62
72
  ### 3.0.3
63
73
 
@@ -1790,9 +1790,9 @@ var WavelengthInput = class extends HTMLElement {
1790
1790
  this._debounceValidate = () => {
1791
1791
  };
1792
1792
  this._debounceTimeout = null;
1793
- this.internals = null;
1794
1793
  this._onInput = () => {
1795
1794
  this.setAttribute("value", this.inputEl.value);
1795
+ this.internals.setFormValue(this.inputEl.value);
1796
1796
  this.dispatchEvent(
1797
1797
  new CustomEvent("inputChange", {
1798
1798
  bubbles: true,
@@ -1837,6 +1837,7 @@ var WavelengthInput = class extends HTMLElement {
1837
1837
  })
1838
1838
  );
1839
1839
  };
1840
+ this.internals = this.attachInternals();
1840
1841
  const shadow = this.attachShadow({ mode: "open" });
1841
1842
  shadow.appendChild(template3.content.cloneNode(true));
1842
1843
  this.inputEl = document.createElement("input");
@@ -1846,9 +1847,6 @@ var WavelengthInput = class extends HTMLElement {
1846
1847
  this.clearButtonEl.addEventListener("click", this._onClearClick);
1847
1848
  shadow.querySelector(".input-wrapper").appendChild(this.inputEl);
1848
1849
  shadow.appendChild(this.placeholderStyleEl);
1849
- if (this.attachInternals) {
1850
- this.internals = this.attachInternals();
1851
- }
1852
1850
  }
1853
1851
  static get observedAttributes() {
1854
1852
  return [
@@ -2225,6 +2223,7 @@ var WavelengthInput = class extends HTMLElement {
2225
2223
  val ? this.setAttribute("clearable", "") : this.removeAttribute("clearable");
2226
2224
  }
2227
2225
  };
2226
+ WavelengthInput.formAssociated = true;
2228
2227
  if (!customElements.get("wavelength-input")) {
2229
2228
  customElements.define("wavelength-input", WavelengthInput);
2230
2229
  }
@@ -8402,9 +8401,6 @@ var OuterContainer = _styledcomponents2.default.div`
8402
8401
  align-items: center;
8403
8402
  justify-content: center;
8404
8403
  border-radius: 5px;
8405
- background-color: ${(props) => props.$primary || "#FFFFFF"};
8406
- height: calc(${(props) => props.$inputheight || "51px"} * 1.45);
8407
- width: calc(${(props) => props.$inputwidth || "320px"} * 1.07);
8408
8404
  `;
8409
8405
  var AutoContainer = _styledcomponents2.default.div`
8410
8406
  position: absolute;
@@ -8420,7 +8416,6 @@ var Label = _styledcomponents2.default.label`
8420
8416
  top: 50%;
8421
8417
  left: 10px;
8422
8418
  transform: translateY(-50%);
8423
- color: ${(props) => props.$primary || "#ccc"};
8424
8419
  font-size: 16px;
8425
8420
  pointer-events: none;
8426
8421
  transition: 0.3s ease all;
@@ -8453,7 +8448,8 @@ var Input = _styledcomponents2.default.input`
8453
8448
  &:focus + ${Label}, &:not(:placeholder-shown) + ${Label} {
8454
8449
  top: 0;
8455
8450
  left: 10px;
8456
- padding: 0 2px;
8451
+
8452
+ padding: 0 5px;
8457
8453
  color: ${(props) => {
8458
8454
  const { $focusedLabelColor, $dropDownVisible, $suggestBoolean } = props;
8459
8455
  if (!$focusedLabelColor) return "#4a90e2";
@@ -8461,7 +8457,12 @@ var Input = _styledcomponents2.default.input`
8461
8457
  if (!$suggestBoolean) return "#FF0000";
8462
8458
  return $focusedLabelColor;
8463
8459
  }};
8464
- background-color: ${(props) => props.$primary || "#FFFFFF"};
8460
+ transform: translate(0%, -50%) scale(0.8);
8461
+ background: linear-gradient(to bottom, transparent 50%, white 0%);
8462
+ }
8463
+
8464
+ &:not(:focus) + ${Label} {
8465
+ color: ${(props) => props.$defaultLabelColor || "#ccc"};
8465
8466
  }
8466
8467
  `;
8467
8468
  var DropDownList = _styledcomponents2.default.ul`
@@ -8478,8 +8479,9 @@ var DropDownList = _styledcomponents2.default.ul`
8478
8479
  max-height: 390px; //neccesary for limiting scroll options, limit to 10 per view
8479
8480
  `;
8480
8481
  var ActiveListItem = _styledcomponents2.default.li`
8482
+ position: relative;
8483
+ z-index: 9999;
8481
8484
  padding: 10px;
8482
- cursor: pointer;
8483
8485
  border-radius: 8px;
8484
8486
  background-color: ${(props) => props.$highlighted ? "#eee" : "white"};
8485
8487
  cursor: pointer;
@@ -8493,6 +8495,8 @@ var ActiveListItem = _styledcomponents2.default.li`
8493
8495
  }
8494
8496
  `;
8495
8497
  var NoHoverListItem = _styledcomponents2.default.li`
8498
+ position: relative;
8499
+ z-index: 9999;
8496
8500
  padding: 10px;
8497
8501
  cursor: pointer;
8498
8502
  background-color: white;
@@ -8518,7 +8522,8 @@ var WLAutoComplete = ({
8518
8522
  autoBackGroundColor,
8519
8523
  labelColor,
8520
8524
  FocusedlabelColor,
8521
- id
8525
+ id,
8526
+ name
8522
8527
  }) => {
8523
8528
  const inputRef = _react.useRef.call(void 0, null);
8524
8529
  const listRef = _react.useRef.call(void 0, null);
@@ -8605,12 +8610,13 @@ var WLAutoComplete = ({
8605
8610
  break;
8606
8611
  }
8607
8612
  };
8608
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { id: idName, 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: [
8609
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { id: `${idName}-inputwrapper`, $primary: autoBackGroundColor, $inputheight: height2, $inputwidth: width2, children: [
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: [
8614
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { id: `${idName}-inputwrapper`, $inputheight: height2, $inputwidth: width2, children: [
8610
8615
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8611
8616
  Input,
8612
8617
  {
8613
- id: `${idName}-input`,
8618
+ id: idName,
8619
+ name,
8614
8620
  "data-testid": "InputSearchBar",
8615
8621
  type: "text",
8616
8622
  $primary: autoBackGroundColor,
@@ -8619,16 +8625,18 @@ var WLAutoComplete = ({
8619
8625
  $suggestBoolean: suggestHasItems,
8620
8626
  $dropDownVisible: isDropdownVisible,
8621
8627
  $focusedLabelColor: FocusedlabelColor,
8628
+ $defaultLabelColor: labelColor,
8622
8629
  value: inputValue,
8623
8630
  ref: inputRef,
8624
8631
  onClick: handleInputClick,
8625
8632
  onInput: handleChange,
8626
8633
  onKeyDown: handleKeyDown,
8627
8634
  onBlur: handleBlur,
8628
- placeholder: ""
8635
+ placeholder: "",
8636
+ autoComplete: "off"
8629
8637
  }
8630
8638
  ),
8631
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { id: `${idName}-label`, $primary: labelColor, children: floatLabel })
8639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
8632
8640
  ] }),
8633
8641
  isDropdownVisible && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropDownList, { id: `${idName}-droplist`, ref: listRef, $inputwidth: width2, "data-testid": "InputSearchOptionsList", children: suggestHasItems ? (
8634
8642
  //suggestions length controls showing the suggestions
@@ -8646,7 +8654,7 @@ var WLAutoComplete = ({
8646
8654
  `ActivelistItem-${item}-${index}`
8647
8655
  ))
8648
8656
  ) : /* @__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" }) })
8649
- ] }) }) }) });
8657
+ ] }) }) });
8650
8658
  };
8651
8659
 
8652
8660
  // src/components/inputs/WavelengthInputDatePicketer.tsx