@wavelengthusaf/components 2.6.0 → 2.7.1
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 +170 -39
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +19 -2
- package/dist/components/PageComponents/WavelengthCommentDisplay.d.ts +16 -0
- package/dist/components/PageComponents/WavelengthCommentDisplay.d.ts.map +1 -0
- package/dist/components/TextField/WavelengthTextField.d.ts +4 -1
- package/dist/components/TextField/WavelengthTextField.d.ts.map +1 -1
- package/dist/esm/index.d.ts +19 -2
- package/dist/esm/index.js +363 -232
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.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
|
+
### 2.7.1
|
|
18
|
+
|
|
19
|
+
- 4/1/2025
|
|
20
|
+
- Updated WavelengthTextField component to have another variant.
|
|
21
|
+
|
|
22
|
+
### 2.7.0
|
|
23
|
+
|
|
24
|
+
- 3/24/2025
|
|
25
|
+
- Added a Comment Component
|
|
26
|
+
|
|
17
27
|
### 2.6.0
|
|
18
28
|
|
|
19
29
|
- Added a new component, WavelengthProgressBar
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef2 = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment14 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo2 = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element;
|
|
267
267
|
exports.ForwardRef = ForwardRef2;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment14;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo2;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -4714,6 +4714,62 @@ function WavelengthProgressBar({ width: width2 = "425px", height: height2 = "12p
|
|
|
4714
4714
|
] });
|
|
4715
4715
|
}
|
|
4716
4716
|
|
|
4717
|
+
// src/components/PageComponents/WavelengthCommentDisplay.tsx
|
|
4718
|
+
|
|
4719
|
+
var _CheckCircleOutline = require('@mui/icons-material/CheckCircleOutline'); var _CheckCircleOutline2 = _interopRequireDefault(_CheckCircleOutline);
|
|
4720
|
+
var _CheckCircle = require('@mui/icons-material/CheckCircle'); var _CheckCircle2 = _interopRequireDefault(_CheckCircle);
|
|
4721
|
+
|
|
4722
|
+
|
|
4723
|
+
function WavelengthCommentDisplay(props) {
|
|
4724
|
+
const [selected, setSelected] = _react.useState.call(void 0, false);
|
|
4725
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4726
|
+
"div",
|
|
4727
|
+
{
|
|
4728
|
+
style: {
|
|
4729
|
+
display: "flex",
|
|
4730
|
+
flexDirection: "column",
|
|
4731
|
+
width: props.width || "332px",
|
|
4732
|
+
minHeight: "fit",
|
|
4733
|
+
height: props.height || "fit-content",
|
|
4734
|
+
backgroundColor: props.backgroundColor || "rgba(250, 242, 236, 1)",
|
|
4735
|
+
border: props.border || "1px solid rgba(0, 0, 0, 0.05)",
|
|
4736
|
+
borderRadius: "6px",
|
|
4737
|
+
padding: "12px",
|
|
4738
|
+
color: props.textColor || "black"
|
|
4739
|
+
},
|
|
4740
|
+
children: [
|
|
4741
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { fontSize: "14px", fontWeight: 600, display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", padding: 0 }, children: [
|
|
4742
|
+
props.author,
|
|
4743
|
+
!selected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4744
|
+
_material.IconButton,
|
|
4745
|
+
{
|
|
4746
|
+
onClick: () => {
|
|
4747
|
+
setSelected(!selected);
|
|
4748
|
+
props.onClick;
|
|
4749
|
+
},
|
|
4750
|
+
style: { padding: "0px" },
|
|
4751
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircleOutline2.default, { fontSize: "small" })
|
|
4752
|
+
}
|
|
4753
|
+
),
|
|
4754
|
+
selected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4755
|
+
_material.IconButton,
|
|
4756
|
+
{
|
|
4757
|
+
onClick: () => {
|
|
4758
|
+
setSelected(!selected);
|
|
4759
|
+
props.onClick;
|
|
4760
|
+
},
|
|
4761
|
+
style: { padding: "0px" },
|
|
4762
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircle2.default, { fontSize: "small", sx: { color: props.iconSelectedColor || "rgba(209, 106, 47, 1)" } })
|
|
4763
|
+
}
|
|
4764
|
+
)
|
|
4765
|
+
] }),
|
|
4766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { style: { fontSize: "12px", fontWeight: 400, opacity: 0.6 }, children: props.date }),
|
|
4767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { fontSize: "14px", fontWeight: 400 }, children: props.comments })
|
|
4768
|
+
]
|
|
4769
|
+
}
|
|
4770
|
+
);
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4717
4773
|
// src/components/footers/WavelengthFooter/WavelengthFooter.tsx
|
|
4718
4774
|
|
|
4719
4775
|
|
|
@@ -5903,6 +5959,54 @@ function DefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, bo
|
|
|
5903
5959
|
|
|
5904
5960
|
|
|
5905
5961
|
|
|
5962
|
+
|
|
5963
|
+
var InputWrapper = _styledcomponents2.default.div`
|
|
5964
|
+
position: relative;
|
|
5965
|
+
width: 100%;
|
|
5966
|
+
`;
|
|
5967
|
+
var StandardTextField = _styledcomponents2.default.input`
|
|
5968
|
+
width: ${(props) => props.width || "320px"};
|
|
5969
|
+
height: ${(props) => props.height || "35px"};
|
|
5970
|
+
padding-left: 12px;
|
|
5971
|
+
font-size: 16px;
|
|
5972
|
+
border: none;
|
|
5973
|
+
border-bottom: 2px solid ${(props) => props.error ? "red" : props.borderColor || "#ccc"}; /* Red border when error */
|
|
5974
|
+
color: ${(props) => props.textColor || "black"};
|
|
5975
|
+
outline: none;
|
|
5976
|
+
box-sizing: border-box;
|
|
5977
|
+
background-color: transparent;
|
|
5978
|
+
|
|
5979
|
+
&:focus {
|
|
5980
|
+
border-bottom-color: ${(props) => props.error ? "red" : props.focusColor || "#d16a2f"};
|
|
5981
|
+
}
|
|
5982
|
+
|
|
5983
|
+
&::placeholder {
|
|
5984
|
+
opacity: 0.4;
|
|
5985
|
+
color: ${(props) => props.error ? "red" : "#888"}; /* Placeholder color changes to red on error */
|
|
5986
|
+
}
|
|
5987
|
+
|
|
5988
|
+
&:focus + label,
|
|
5989
|
+
&:valid + label {
|
|
5990
|
+
top: -5px;
|
|
5991
|
+
font-size: 12px;
|
|
5992
|
+
color: ${(props) => props.error ? "red" : props.labelColor}; // Change label color on error
|
|
5993
|
+
}
|
|
5994
|
+
|
|
5995
|
+
&:not(:placeholder-shown) + label {
|
|
5996
|
+
top: -8px;
|
|
5997
|
+
font-size: 12px;
|
|
5998
|
+
color: ${(props) => props.error ? "red" : props.labelColor}; // Label color when input has a value
|
|
5999
|
+
}
|
|
6000
|
+
`;
|
|
6001
|
+
var StyledLabel = _styledcomponents2.default.label`
|
|
6002
|
+
position: absolute;
|
|
6003
|
+
top: 8px;
|
|
6004
|
+
left: 16px;
|
|
6005
|
+
font-size: 14px;
|
|
6006
|
+
color: ${(props) => props.color || "#aaa"};
|
|
6007
|
+
pointer-events: none;
|
|
6008
|
+
transition: all 0.3s ease-out;
|
|
6009
|
+
`;
|
|
5906
6010
|
function WavelengthTextField(props) {
|
|
5907
6011
|
const [hasError, setHasError] = _react.useState.call(void 0, false);
|
|
5908
6012
|
const handleChange = _react.useCallback.call(void 0,
|
|
@@ -5913,48 +6017,74 @@ function WavelengthTextField(props) {
|
|
|
5913
6017
|
}
|
|
5914
6018
|
},
|
|
5915
6019
|
[props.regex]
|
|
5916
|
-
// Ensures function doesn't change unless `regex` does
|
|
5917
6020
|
);
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
error: hasError,
|
|
5929
|
-
helperText: hasError ? "Invalid Input" : "",
|
|
5930
|
-
sx: {
|
|
5931
|
-
"& .MuiInputBase-root": {
|
|
5932
|
-
height: props.height || "51px",
|
|
5933
|
-
width: props.width || "320px",
|
|
5934
|
-
borderRadius: "8px"
|
|
6021
|
+
if (props.variant === "outlined") {
|
|
6022
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6023
|
+
_TextField2.default,
|
|
6024
|
+
{
|
|
6025
|
+
type: props.type,
|
|
6026
|
+
required: props.required,
|
|
6027
|
+
label: props.label,
|
|
6028
|
+
onChange: (e) => {
|
|
6029
|
+
handleChange(e);
|
|
6030
|
+
_optionalChain([props, 'access', _18 => _18.onChange, 'optionalCall', _19 => _19(e)]);
|
|
5935
6031
|
},
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
6032
|
+
error: hasError,
|
|
6033
|
+
helperText: hasError ? props.errorMessage : "",
|
|
6034
|
+
sx: {
|
|
6035
|
+
"& .MuiInputBase-root": {
|
|
6036
|
+
height: props.height || "51px",
|
|
6037
|
+
width: props.width || "320px",
|
|
6038
|
+
borderRadius: "8px"
|
|
6039
|
+
},
|
|
6040
|
+
"&.MuiTextField-root": {
|
|
6041
|
+
"& label": { color: !hasError ? props.labelColor || "rgba(89, 99, 129, 1)" : "red" },
|
|
6042
|
+
"& .MuiOutlinedInput-root": {
|
|
6043
|
+
"& fieldset": {
|
|
6044
|
+
border: "1px solid",
|
|
6045
|
+
borderColor: !hasError ? props.borderColor || `rgba(89, 99, 129, 1)` : "red"
|
|
6046
|
+
},
|
|
6047
|
+
"&.Mui-focused fieldset": {
|
|
6048
|
+
borderColor: !hasError ? props.focusColor || `rgba(26, 128, 131, 0.1)` : "red"
|
|
6049
|
+
}
|
|
5945
6050
|
}
|
|
5946
6051
|
}
|
|
6052
|
+
},
|
|
6053
|
+
placeholder: props.placeholder,
|
|
6054
|
+
InputLabelProps: {
|
|
6055
|
+
shrink: props.shrink
|
|
6056
|
+
},
|
|
6057
|
+
InputProps: {
|
|
6058
|
+
style: { color: props.textColor || "inherit" }
|
|
5947
6059
|
}
|
|
5948
|
-
},
|
|
5949
|
-
placeholder: props.placeholder,
|
|
5950
|
-
InputLabelProps: {
|
|
5951
|
-
shrink: props.shrink
|
|
5952
|
-
},
|
|
5953
|
-
InputProps: {
|
|
5954
|
-
style: { color: props.textColor || "inherit" }
|
|
5955
6060
|
}
|
|
5956
|
-
|
|
5957
|
-
)
|
|
6061
|
+
);
|
|
6062
|
+
} else if (props.variant === "standard") {
|
|
6063
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputWrapper, { children: [
|
|
6064
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6065
|
+
StandardTextField,
|
|
6066
|
+
{
|
|
6067
|
+
type: props.type,
|
|
6068
|
+
id: "custom-input",
|
|
6069
|
+
placeholder: props.placeholder,
|
|
6070
|
+
required: props.required,
|
|
6071
|
+
focusColor: props.focusColor,
|
|
6072
|
+
borderColor: props.borderColor,
|
|
6073
|
+
width: props.width,
|
|
6074
|
+
height: props.height,
|
|
6075
|
+
textColor: props.textColor,
|
|
6076
|
+
error: hasError,
|
|
6077
|
+
onChange: (e) => {
|
|
6078
|
+
handleChange(e);
|
|
6079
|
+
_optionalChain([props, 'access', _20 => _20.onChange, 'optionalCall', _21 => _21(e)]);
|
|
6080
|
+
}
|
|
6081
|
+
}
|
|
6082
|
+
),
|
|
6083
|
+
props.label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledLabel, { htmlFor: "custom-input", color: props.labelColor, children: props.label }),
|
|
6084
|
+
props.error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { fontSize: ".75rem", color: "red", paddingLeft: "12px", marginTop: "3px" }, children: props.errorMessage })
|
|
6085
|
+
] });
|
|
6086
|
+
}
|
|
6087
|
+
return null;
|
|
5958
6088
|
}
|
|
5959
6089
|
|
|
5960
6090
|
|
|
@@ -6002,7 +6132,8 @@ function WavelengthTextField(props) {
|
|
|
6002
6132
|
|
|
6003
6133
|
|
|
6004
6134
|
|
|
6005
|
-
|
|
6135
|
+
|
|
6136
|
+
exports.AppLogo = AppLogo; exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultIcon = DefaultIcon; exports.DefaultPagination = DefaultPagination; exports.ManyPlanesComponent = ManyPlanesComponent; exports.NotAvailablePage = NotAvailablePage; exports.SearchTextField = SearchTextField; exports.SliderCardCarousel = SliderCardCarousel; exports.TestSnackbar = TestSnackbar; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
|
|
6006
6137
|
/*! Bundled license information:
|
|
6007
6138
|
|
|
6008
6139
|
react-is/cjs/react-is.production.min.js:
|