@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 +10 -0
- package/dist/cjs/index.cjs +73 -64
- 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 +73 -64
- 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.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
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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:
|
|
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:
|
|
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%,
|
|
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
|
-
|
|
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.
|
|
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
|
|
8707
|
+
var Label2 = _styledcomponents2.default.label`
|
|
8711
8708
|
position: absolute;
|
|
8712
8709
|
top: 50%;
|
|
8713
|
-
left:
|
|
8714
|
-
transform:
|
|
8715
|
-
|
|
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
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
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
|
|
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;
|
|
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
|
-
|
|
8739
|
-
|
|
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
|
-
|
|
8730
|
+
box-sizing: border-box;
|
|
8743
8731
|
z-index: 1;
|
|
8744
|
-
background-color: ${(props) => props.$
|
|
8732
|
+
background-color: ${(props) => props.$inputBackGroundColor !== null ? props.$inputBackGroundColor : "#FFFFFF"}; //this works
|
|
8745
8733
|
|
|
8746
8734
|
&:focus {
|
|
8747
|
-
border:
|
|
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
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
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
|
-
|
|
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"};
|
|
8750
|
+
&:not(:focus) + ${Label2} {
|
|
8751
|
+
color: ${(props) => props.$labelColor || "#ccc"};
|
|
8752
|
+
}
|
|
8762
8753
|
}
|
|
8763
8754
|
`;
|
|
8764
|
-
var WLDatePicker = ({
|
|
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
|
-
|
|
8816
|
+
InputWrapper2,
|
|
8810
8817
|
{
|
|
8811
|
-
|
|
8812
|
-
$
|
|
8818
|
+
id: `${idName}-inputWrapper`,
|
|
8819
|
+
$inputBorderStyling: inputBorderStyle,
|
|
8820
|
+
$inputwidth: width2,
|
|
8821
|
+
$inputheight: height2,
|
|
8822
|
+
$inputFocusBorderColor: inputFocusBorderColor,
|
|
8813
8823
|
$labelColor: labelColor,
|
|
8814
|
-
$
|
|
8815
|
-
$
|
|
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:
|
|
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,
|
|
8843
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8835
8844
|
]
|
|
8836
8845
|
}
|
|
8837
8846
|
);
|