@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 +5 -0
- package/dist/cjs/index.cjs +66 -63
- 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 +66 -63
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
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
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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%,
|
|
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.
|
|
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
|
|
8701
|
+
var Label2 = _styledcomponents2.default.label`
|
|
8711
8702
|
position: absolute;
|
|
8712
8703
|
top: 50%;
|
|
8713
|
-
left:
|
|
8714
|
-
transform:
|
|
8715
|
-
|
|
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
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
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
|
|
8726
|
-
position:
|
|
8727
|
-
|
|
8728
|
-
|
|
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:
|
|
8737
|
-
height:
|
|
8738
|
-
|
|
8739
|
-
|
|
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
|
-
|
|
8724
|
+
box-sizing: border-box;
|
|
8743
8725
|
z-index: 1;
|
|
8744
|
-
background-color: ${(props) => props.$
|
|
8726
|
+
background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"}; //this works
|
|
8745
8727
|
|
|
8746
8728
|
&:focus {
|
|
8747
|
-
border:
|
|
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
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
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
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
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 = ({
|
|
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
|
-
|
|
8810
|
+
InputWrapper2,
|
|
8810
8811
|
{
|
|
8811
|
-
|
|
8812
|
-
$
|
|
8812
|
+
id: `${idName}-inputWrapper`,
|
|
8813
|
+
$inputBorderStyling: inputBorderStyle,
|
|
8814
|
+
$inputwidth: width2,
|
|
8815
|
+
$inputheight: height2,
|
|
8816
|
+
$inputFocusBorderColor: inputFocusBorderColor,
|
|
8813
8817
|
$labelColor: labelColor,
|
|
8814
|
-
$
|
|
8815
|
-
$
|
|
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:
|
|
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,
|
|
8837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8835
8838
|
]
|
|
8836
8839
|
}
|
|
8837
8840
|
);
|