@wavelengthusaf/components 3.3.6 → 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 +13 -3
- package/dist/cjs/index.cjs +69 -67
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +8 -6
- package/dist/esm/index.d.ts +8 -6
- package/dist/esm/index.js +69 -67
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,16 @@ 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
|
+
|
|
22
|
+
### 3.3.7
|
|
23
|
+
|
|
24
|
+
- 8/11/2025
|
|
25
|
+
- Introduced formAssociated = true for `WavelengthInput`. It allows the input to be recognized when utilized within a form element.
|
|
26
|
+
|
|
17
27
|
### 3.3.6
|
|
18
28
|
|
|
19
29
|
- 8/11/2025
|
|
@@ -32,7 +42,7 @@ npm install @wavelengthusaf/components
|
|
|
32
42
|
### 3.3.3
|
|
33
43
|
|
|
34
44
|
- 8/05/2025
|
|
35
|
-
- Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
|
|
45
|
+
- Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
|
|
36
46
|
|
|
37
47
|
### 3.3.2
|
|
38
48
|
|
|
@@ -42,7 +52,7 @@ npm install @wavelengthusaf/components
|
|
|
42
52
|
### 3.3.1
|
|
43
53
|
|
|
44
54
|
- 6/22/2025
|
|
45
|
-
- Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
|
|
55
|
+
- Updated `WLAutoComplete` to be able to have scroll functionality and basic validation.
|
|
46
56
|
|
|
47
57
|
### 3.3.0
|
|
48
58
|
|
|
@@ -62,7 +72,7 @@ npm install @wavelengthusaf/components
|
|
|
62
72
|
### 3.1.0
|
|
63
73
|
|
|
64
74
|
- 6/2/2025
|
|
65
|
-
- Added `WLChildDataTable`; Changed naming conventions for components into their respective categories.
|
|
75
|
+
- Added `WLChildDataTable`; Changed naming conventions for components into their respective categories.
|
|
66
76
|
|
|
67
77
|
### 3.0.3
|
|
68
78
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
}
|
|
@@ -8397,16 +8396,6 @@ var NestedDataTable = ({ data, columns }) => {
|
|
|
8397
8396
|
|
|
8398
8397
|
|
|
8399
8398
|
|
|
8400
|
-
var OuterContainer = _styledcomponents2.default.div`
|
|
8401
|
-
display: flex;
|
|
8402
|
-
align-items: center;
|
|
8403
|
-
justify-content: center;
|
|
8404
|
-
border-radius: 5px;
|
|
8405
|
-
`;
|
|
8406
|
-
var AutoContainer = _styledcomponents2.default.div`
|
|
8407
|
-
position: absolute;
|
|
8408
|
-
border-radius: 6px;
|
|
8409
|
-
`;
|
|
8410
8399
|
var InputWrapper = _styledcomponents2.default.div`
|
|
8411
8400
|
position: relative;
|
|
8412
8401
|
width: ${(props) => props.$inputwidth || "320px"};
|
|
@@ -8459,7 +8448,7 @@ var Input = _styledcomponents2.default.input`
|
|
|
8459
8448
|
return $focusedLabelColor;
|
|
8460
8449
|
}};
|
|
8461
8450
|
transform: translate(0%, -50%) scale(0.8);
|
|
8462
|
-
background: linear-gradient(to bottom, transparent 50%,
|
|
8451
|
+
background: linear-gradient(to bottom, transparent 50%, ${(props) => props.$primary !== null ? props.$primary : "#FFFFFF"} 0%);
|
|
8463
8452
|
}
|
|
8464
8453
|
|
|
8465
8454
|
&:not(:focus) + ${Label} {
|
|
@@ -8468,6 +8457,7 @@ var Input = _styledcomponents2.default.input`
|
|
|
8468
8457
|
`;
|
|
8469
8458
|
var DropDownList = _styledcomponents2.default.ul`
|
|
8470
8459
|
position: absolute;
|
|
8460
|
+
z-index: 5;
|
|
8471
8461
|
width: ${(props) => props.$inputwidth || "320px"};
|
|
8472
8462
|
background-color: white;
|
|
8473
8463
|
border: 1px solid #ccc;
|
|
@@ -8589,7 +8579,7 @@ var WLAutoComplete = ({
|
|
|
8589
8579
|
setIsDropdownVisible(false);
|
|
8590
8580
|
} else {
|
|
8591
8581
|
if (data.includes(inputValue)) {
|
|
8592
|
-
onDataChange(inputValue);
|
|
8582
|
+
if (onDataChange !== void 0) onDataChange(inputValue);
|
|
8593
8583
|
} else {
|
|
8594
8584
|
handleBlur;
|
|
8595
8585
|
}
|
|
@@ -8611,7 +8601,7 @@ var WLAutoComplete = ({
|
|
|
8611
8601
|
break;
|
|
8612
8602
|
}
|
|
8613
8603
|
};
|
|
8614
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.
|
|
8604
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
8615
8605
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { id: `${idName}-inputwrapper`, $inputheight: height2, $inputwidth: width2, children: [
|
|
8616
8606
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8617
8607
|
Input,
|
|
@@ -8655,7 +8645,7 @@ var WLAutoComplete = ({
|
|
|
8655
8645
|
`ActivelistItem-${item}-${index}`
|
|
8656
8646
|
))
|
|
8657
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" }) })
|
|
8658
|
-
] }) })
|
|
8648
|
+
] }) });
|
|
8659
8649
|
};
|
|
8660
8650
|
|
|
8661
8651
|
// src/components/inputs/WavelengthInputDatePicketer.tsx
|
|
@@ -8708,65 +8698,75 @@ var WLInputDatePicker2 = () => {
|
|
|
8708
8698
|
|
|
8709
8699
|
|
|
8710
8700
|
|
|
8711
|
-
var
|
|
8701
|
+
var Label2 = _styledcomponents2.default.label`
|
|
8712
8702
|
position: absolute;
|
|
8713
8703
|
top: 50%;
|
|
8714
|
-
left:
|
|
8715
|
-
transform:
|
|
8716
|
-
|
|
8717
|
-
transition: all 0.2s ease-in-out;
|
|
8704
|
+
left: 10px;
|
|
8705
|
+
transform: translateY(-50%);
|
|
8706
|
+
font-size: 16px;
|
|
8718
8707
|
pointer-events: none;
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
transform: translateY(-100%) scale(0.75);
|
|
8724
|
-
}
|
|
8708
|
+
transition: 0.3s ease all;
|
|
8709
|
+
z-index: 999;
|
|
8710
|
+
padding: 0 5px;
|
|
8711
|
+
background-color: transparent;
|
|
8725
8712
|
`;
|
|
8726
|
-
var
|
|
8727
|
-
position:
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
border: 10px solid ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
|
|
8731
|
-
border-radius: 4px;
|
|
8732
|
-
background-color: ${(props) => props.$inputBackground !== null && props.$inputBackground !== void 0 && props.$inputBackground !== "" ? props.$inputBackground : "#FFFFFF"};
|
|
8733
|
-
color: ${(props) => props.$labelColor !== null && props.$labelColor !== void 0 && props.$labelColor !== "" ? props.$labelColor : "#000000"};
|
|
8734
|
-
align-items: center;
|
|
8713
|
+
var InputWrapper2 = _styledcomponents2.default.div`
|
|
8714
|
+
position: relative;
|
|
8715
|
+
width: ${(props) => props.$inputwidth || "320px"};
|
|
8716
|
+
height: ${(props) => props.$inputheight || "51px"};
|
|
8735
8717
|
|
|
8736
8718
|
input {
|
|
8737
|
-
width:
|
|
8738
|
-
height:
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
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
|
|
8742
8723
|
border-radius: 4px;
|
|
8743
|
-
|
|
8724
|
+
box-sizing: border-box;
|
|
8744
8725
|
z-index: 1;
|
|
8745
|
-
background-color: ${(props) => props.$
|
|
8726
|
+
background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"}; //this works
|
|
8746
8727
|
|
|
8747
8728
|
&:focus {
|
|
8748
|
-
border:
|
|
8729
|
+
border-color: ${(props) => props.$inputFocusBorderColor !== null ? props.$inputFocusBorderColor : "#4a90e2"};
|
|
8730
|
+
outline: none;
|
|
8731
|
+
background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"};
|
|
8749
8732
|
}
|
|
8750
8733
|
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
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%);
|
|
8754
8742
|
}
|
|
8755
|
-
}
|
|
8756
8743
|
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
transform: translate(-50%, -50%) scale(0.75);
|
|
8761
|
-
color: ${(props) => props.$focuslabel !== null && props.$focuslabel !== void 0 && props.$focuslabel !== "" ? props.$focuslabel : "#0047AB"}; /* Example active color */
|
|
8762
|
-
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
|
+
}
|
|
8763
8747
|
}
|
|
8764
8748
|
`;
|
|
8765
|
-
var WLDatePicker = ({
|
|
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
|
+
}) => {
|
|
8766
8765
|
const [inputType, setInputType] = _react.useState.call(void 0, "");
|
|
8767
8766
|
const [value, setValue] = _react.useState.call(void 0, "");
|
|
8768
8767
|
const [minAdjusted, setMinAdjusted] = _react.useState.call(void 0, "");
|
|
8769
8768
|
const [maxAdjusted, setMaxAdjusted] = _react.useState.call(void 0, "");
|
|
8769
|
+
const idName = id ? id : "WlDatePick";
|
|
8770
8770
|
_react.useEffect.call(void 0, () => {
|
|
8771
8771
|
const minDate = new Date(min || "");
|
|
8772
8772
|
const maxDate = new Date(max || "");
|
|
@@ -8804,24 +8804,26 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
|
|
|
8804
8804
|
const handleChange = (e) => {
|
|
8805
8805
|
const dateString = e.target.value;
|
|
8806
8806
|
setValue(dateString);
|
|
8807
|
-
OnDataChange(new Date(dateString));
|
|
8807
|
+
if (OnDataChange !== void 0) OnDataChange(new Date(dateString));
|
|
8808
8808
|
};
|
|
8809
8809
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8810
|
-
|
|
8810
|
+
InputWrapper2,
|
|
8811
8811
|
{
|
|
8812
|
-
|
|
8813
|
-
$
|
|
8812
|
+
id: `${idName}-inputWrapper`,
|
|
8813
|
+
$inputBorderStyling: inputBorderStyle,
|
|
8814
|
+
$inputwidth: width2,
|
|
8815
|
+
$inputheight: height2,
|
|
8816
|
+
$inputFocusBorderColor: inputFocusBorderColor,
|
|
8814
8817
|
$labelColor: labelColor,
|
|
8815
|
-
$
|
|
8816
|
-
$
|
|
8817
|
-
$inputBackground: backgroundColor2,
|
|
8818
|
-
$focuslabel: FocusLabelColor,
|
|
8818
|
+
$FocusLabelColor: FocusLabelColor,
|
|
8819
|
+
$inputBackGroundColor: backgroundColor2,
|
|
8819
8820
|
children: [
|
|
8820
8821
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8821
8822
|
"input",
|
|
8822
8823
|
{
|
|
8823
8824
|
type: inputType,
|
|
8824
|
-
id:
|
|
8825
|
+
id: idName,
|
|
8826
|
+
name,
|
|
8825
8827
|
"data-testid": "my_wl_date_input",
|
|
8826
8828
|
onFocus: handleFocus,
|
|
8827
8829
|
onBlur: handleBlur,
|
|
@@ -8832,7 +8834,7 @@ var WLDatePicker = ({ labelVariant, labelColor, borderColor: borderColor2, Focus
|
|
|
8832
8834
|
max: maxAdjusted
|
|
8833
8835
|
}
|
|
8834
8836
|
),
|
|
8835
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8836
8838
|
]
|
|
8837
8839
|
}
|
|
8838
8840
|
);
|