@wavelengthusaf/components 2.3.5 → 2.4.0

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,13 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 2.4.0
18
+
19
+ - 03/03/2025
20
+ - Added 2 new components, WavelengthStyledButton, and WavelengthTextField
21
+ - Updated the confirmation modal to include more props making it more customizable
22
+ - Updated documentation to reflect these changes
23
+
17
24
  ### 2.3.5
18
25
 
19
26
  - Updated WavelengthDropdown by adding default values to some of the props
@@ -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 Fragment14 = REACT_FRAGMENT_TYPE;
209
+ var Fragment15 = 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 = Fragment14;
268
+ exports.Fragment = Fragment15;
269
269
  exports.Lazy = Lazy;
270
270
  exports.Memo = Memo2;
271
271
  exports.Portal = Portal;
@@ -2903,6 +2903,422 @@ function WavelengthFileDownloader({ fileLoc, fileURL, fileName, button, id }) {
2903
2903
  }
2904
2904
  }
2905
2905
 
2906
+ // src/components/buttons/WavelengthButton/WavelengthStyledButton.tsx
2907
+ var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
2908
+
2909
+ var ButtonPresets = {
2910
+ default: {
2911
+ width: "130px",
2912
+ height: "45px",
2913
+ display: "flex",
2914
+ flexDirection: "row",
2915
+ alignItems: "center",
2916
+ justifyContent: "center",
2917
+ borderRadius: "8px",
2918
+ border: "none",
2919
+ fontSize: "",
2920
+ fontWeight: 600,
2921
+ color: "",
2922
+ margin: "",
2923
+ padding: "",
2924
+ backgroundColor: "",
2925
+ hover: {
2926
+ backgroundColor: "",
2927
+ color: "",
2928
+ cursor: "pointer",
2929
+ width: "",
2930
+ height: "",
2931
+ border: "",
2932
+ fontSize: ""
2933
+ },
2934
+ disabled: {
2935
+ cursor: "",
2936
+ opacity: ""
2937
+ },
2938
+ active: {
2939
+ backgroundColor: "",
2940
+ boxShadow: "",
2941
+ transition: "",
2942
+ border: ""
2943
+ }
2944
+ },
2945
+ ewdms_primary: {
2946
+ width: "130px",
2947
+ height: "45px",
2948
+ display: "flex",
2949
+ flexDirection: "row",
2950
+ alignItems: "center",
2951
+ justifyContent: "center",
2952
+ borderRadius: "8px",
2953
+ border: "none",
2954
+ fontSize: "16px",
2955
+ fontWeight: 600,
2956
+ color: "white",
2957
+ margin: "",
2958
+ padding: "12px 32px",
2959
+ backgroundColor: "rgba(26, 128, 131, 1)",
2960
+ hover: {
2961
+ backgroundColor: "rgba(38, 186, 190, 1)",
2962
+ color: "rgba(247, 247, 249, 1)",
2963
+ cursor: "pointer",
2964
+ width: "",
2965
+ height: "",
2966
+ border: "",
2967
+ fontSize: ""
2968
+ },
2969
+ disabled: {
2970
+ cursor: "not-allowed",
2971
+ opacity: "0.4"
2972
+ },
2973
+ active: {
2974
+ backgroundColor: "#67a8aa",
2975
+ boxShadow: "",
2976
+ transition: "background-color 0.2s ease-in",
2977
+ border: ""
2978
+ }
2979
+ },
2980
+ ewdms_secondary: {
2981
+ width: "130px",
2982
+ height: "45px",
2983
+ display: "flex",
2984
+ flexDirection: "row",
2985
+ alignItems: "center",
2986
+ justifyContent: "center",
2987
+ borderRadius: "8px",
2988
+ border: "1px solid rgba(26, 128, 131, 1)",
2989
+ fontSize: "16px",
2990
+ fontWeight: 600,
2991
+ margin: "",
2992
+ color: "rgba(26, 128, 131, 1)",
2993
+ padding: "12px 32px",
2994
+ backgroundColor: "transparent",
2995
+ hover: {
2996
+ backgroundColor: "rgba(26, 128, 131, 0.1)",
2997
+ color: "rgba(26, 128, 131, 1)",
2998
+ cursor: "pointer",
2999
+ width: "",
3000
+ height: "",
3001
+ border: "",
3002
+ fontSize: ""
3003
+ },
3004
+ disabled: {
3005
+ cursor: "not-allowed",
3006
+ opacity: "0.4"
3007
+ },
3008
+ active: {
3009
+ backgroundColor: "#bad7da",
3010
+ boxShadow: "",
3011
+ transition: "background-color 0.2s ease-in",
3012
+ border: ""
3013
+ }
3014
+ },
3015
+ ewdms_tertiary: {
3016
+ width: "130px",
3017
+ height: "45px",
3018
+ display: "flex",
3019
+ margin: "",
3020
+ flexDirection: "row",
3021
+ alignItems: "center",
3022
+ justifyContent: "center",
3023
+ borderRadius: "8px",
3024
+ border: "none",
3025
+ fontSize: "16px",
3026
+ fontWeight: 600,
3027
+ color: "rgba(26, 128, 131, 1)",
3028
+ padding: "12px 32px",
3029
+ backgroundColor: "transparent",
3030
+ hover: {
3031
+ backgroundColor: "rgba(26, 128, 131, 0.1)",
3032
+ color: "rgba(26, 128, 131, 1)",
3033
+ cursor: "pointer",
3034
+ width: "",
3035
+ height: "",
3036
+ border: "",
3037
+ fontSize: ""
3038
+ },
3039
+ disabled: {
3040
+ cursor: "not-allowed",
3041
+ opacity: "0.4"
3042
+ },
3043
+ active: {
3044
+ backgroundColor: "#445C71",
3045
+ boxShadow: "",
3046
+ transition: "background-color 0.2s ease-in",
3047
+ border: ""
3048
+ }
3049
+ },
3050
+ channel_one_launch: {
3051
+ width: "62px",
3052
+ height: "24px",
3053
+ display: "flex",
3054
+ margin: "",
3055
+ flexDirection: "row",
3056
+ alignItems: "center",
3057
+ justifyContent: "center",
3058
+ borderRadius: "20px",
3059
+ border: "none",
3060
+ fontSize: "10px",
3061
+ fontWeight: 700,
3062
+ color: "white",
3063
+ padding: "0px 0px",
3064
+ backgroundColor: "#24A818",
3065
+ hover: {
3066
+ height: "28px",
3067
+ border: "0.5px solid white",
3068
+ fontSize: "12px",
3069
+ width: "72px",
3070
+ backgroundColor: "",
3071
+ color: "",
3072
+ cursor: "pointer"
3073
+ },
3074
+ disabled: {
3075
+ cursor: "not-allowed",
3076
+ opacity: "0.4"
3077
+ },
3078
+ active: {
3079
+ backgroundColor: "#6FC36E",
3080
+ boxShadow: "",
3081
+ transition: "background-color 0.2s ease-in",
3082
+ border: ""
3083
+ }
3084
+ },
3085
+ channel_one_request: {
3086
+ width: "100px",
3087
+ height: "24px",
3088
+ display: "flex",
3089
+ flexDirection: "row",
3090
+ alignItems: "center",
3091
+ margin: "",
3092
+ justifyContent: "center",
3093
+ borderRadius: "20px",
3094
+ border: "none",
3095
+ fontSize: "10px",
3096
+ fontWeight: 700,
3097
+ color: "white",
3098
+ padding: "0px 0px",
3099
+ backgroundColor: "#1D31E4",
3100
+ hover: {
3101
+ height: "28px",
3102
+ border: "0.5px solid white",
3103
+ fontSize: "12px",
3104
+ width: "110px",
3105
+ backgroundColor: "",
3106
+ color: "",
3107
+ cursor: "pointer"
3108
+ },
3109
+ disabled: {
3110
+ cursor: "not-allowed",
3111
+ opacity: "0.4"
3112
+ },
3113
+ active: {
3114
+ backgroundColor: "#5D78ED",
3115
+ boxShadow: "",
3116
+ transition: "background-color 0.2s ease-in",
3117
+ border: ""
3118
+ }
3119
+ },
3120
+ channel_one_pending: {
3121
+ width: "62px",
3122
+ height: "24px",
3123
+ display: "flex",
3124
+ flexDirection: "row",
3125
+ alignItems: "center",
3126
+ justifyContent: "center",
3127
+ borderRadius: "20px",
3128
+ border: "none",
3129
+ fontSize: "10px",
3130
+ fontWeight: 700,
3131
+ color: "white",
3132
+ padding: "0px 0px",
3133
+ margin: "",
3134
+ backgroundColor: "#F88805",
3135
+ hover: {
3136
+ height: "28px",
3137
+ border: "0.5px solid white",
3138
+ fontSize: "12px",
3139
+ width: "72px",
3140
+ backgroundColor: "",
3141
+ color: "",
3142
+ cursor: "pointer"
3143
+ },
3144
+ disabled: {
3145
+ cursor: "not-allowed",
3146
+ opacity: "0.4"
3147
+ },
3148
+ active: {
3149
+ backgroundColor: "#FAAD68",
3150
+ boxShadow: "",
3151
+ transition: "background-color 0.2s ease-in",
3152
+ border: ""
3153
+ }
3154
+ },
3155
+ channel_one_disabled: {
3156
+ width: "100px",
3157
+ height: "24px",
3158
+ display: "flex",
3159
+ margin: "",
3160
+ flexDirection: "row",
3161
+ alignItems: "center",
3162
+ justifyContent: "center",
3163
+ borderRadius: "20px",
3164
+ border: "none",
3165
+ fontSize: "10px",
3166
+ fontWeight: 700,
3167
+ color: "white",
3168
+ padding: "0px 0px",
3169
+ backgroundColor: "#9E9E9E",
3170
+ hover: {
3171
+ height: "",
3172
+ border: "",
3173
+ fontSize: "",
3174
+ width: "",
3175
+ backgroundColor: "",
3176
+ color: "",
3177
+ cursor: ""
3178
+ },
3179
+ disabled: {
3180
+ cursor: "not-allowed",
3181
+ opacity: "0.4"
3182
+ },
3183
+ active: {
3184
+ backgroundColor: "",
3185
+ boxShadow: "",
3186
+ transition: "",
3187
+ border: ""
3188
+ }
3189
+ },
3190
+ channel_one_transparent: {
3191
+ width: "70px",
3192
+ height: "25px",
3193
+ display: "flex",
3194
+ flexDirection: "row",
3195
+ alignItems: "center",
3196
+ margin: "",
3197
+ justifyContent: "center",
3198
+ borderRadius: "6px",
3199
+ border: "1px solid white",
3200
+ fontSize: "10px",
3201
+ fontWeight: 500,
3202
+ color: "white",
3203
+ padding: "0px !important",
3204
+ backgroundColor: "transparent",
3205
+ hover: {
3206
+ height: "",
3207
+ border: "",
3208
+ fontSize: "",
3209
+ width: "",
3210
+ backgroundColor: "",
3211
+ color: "",
3212
+ cursor: "pointer"
3213
+ },
3214
+ disabled: {
3215
+ cursor: "",
3216
+ opacity: ""
3217
+ },
3218
+ active: {
3219
+ backgroundColor: "rgba(255, 255, 255, 0.22)",
3220
+ boxShadow: "",
3221
+ transition: "background-color 0.2s ease-in",
3222
+ border: ""
3223
+ }
3224
+ },
3225
+ brewery: {
3226
+ width: "138px",
3227
+ height: "44px",
3228
+ display: "flex",
3229
+ flexDirection: "row",
3230
+ alignItems: "center",
3231
+ justifyContent: "center",
3232
+ borderRadius: "6px",
3233
+ border: "none",
3234
+ fontSize: "16px",
3235
+ margin: "",
3236
+ fontWeight: 500,
3237
+ color: "white",
3238
+ padding: "12px 16px",
3239
+ backgroundColor: "#D16A2F",
3240
+ hover: {
3241
+ height: "",
3242
+ border: "",
3243
+ fontSize: "",
3244
+ width: "",
3245
+ backgroundColor: "#D16A2F",
3246
+ color: "",
3247
+ cursor: "pointer"
3248
+ },
3249
+ disabled: {
3250
+ cursor: "not-allowed",
3251
+ opacity: "0.4"
3252
+ },
3253
+ active: {
3254
+ backgroundColor: "",
3255
+ boxShadow: "0 0 5px black",
3256
+ transition: "",
3257
+ border: ""
3258
+ }
3259
+ }
3260
+ };
3261
+ var Button3 = _styledcomponents2.default.button`
3262
+ ${({ type }) => {
3263
+ const preset = ButtonPresets[type];
3264
+ return `
3265
+ width: ${preset.width};
3266
+ height: ${preset.height};
3267
+ display: ${preset.display};
3268
+ flex-direction: ${preset.flexDirection};
3269
+ align-items: ${preset.alignItems};
3270
+ justify-content: ${preset.justifyContent};
3271
+ border-radius: ${preset.borderRadius};
3272
+ border: ${preset.border};
3273
+ font-size: ${preset.fontSize};
3274
+ font-weight: ${preset.fontWeight};
3275
+ color: ${preset.color};
3276
+ padding: ${preset.padding};
3277
+ background-color: ${preset.backgroundColor};
3278
+ margin: ${preset.margin};
3279
+
3280
+ &:hover {
3281
+ background-color: ${preset.hover.backgroundColor};
3282
+ color: ${preset.hover.color};
3283
+ cursor: ${preset.hover.cursor};
3284
+ width:${preset.hover.width};
3285
+ height:${preset.hover.height};
3286
+ border:${preset.hover.border};
3287
+ font-size:${preset.hover.fontSize};
3288
+ }
3289
+
3290
+ &:disabled {
3291
+ cursor: ${preset.disabled.cursor};
3292
+ opacity: ${preset.disabled.opacity};
3293
+ }
3294
+ &:active {
3295
+ background-color: ${preset.active.backgroundColor};
3296
+ box-shadow: ${preset.active.boxShadow};
3297
+ border: ${preset.active.border};
3298
+ transition: ${preset.active.transition};
3299
+ }
3300
+
3301
+ `;
3302
+ }}
3303
+
3304
+ ${({ styles }) => styles && { ...styles }}
3305
+ ${({ hoverstyles }) => hoverstyles && {
3306
+ "&:hover": { ...hoverstyles }
3307
+ }}
3308
+ ${({ activestyles }) => activestyles && {
3309
+ "&:active": { ...activestyles }
3310
+ }}
3311
+ ${({ disabledstyles }) => disabledstyles && {
3312
+ "&:disabled": { ...disabledstyles }
3313
+ }}
3314
+ `;
3315
+ function WavelengthStyledButton({ type = "default", styles, children, disabled = false, hoverstyles, icon, onClick, disabledstyles, activestyles }) {
3316
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button3, { type, styles, hoverstyles, disabledstyles, disabled, activestyles, onClick, children: [
3317
+ icon,
3318
+ children
3319
+ ] });
3320
+ }
3321
+
2906
3322
  // src/components/containers/WavelengthBox/WavelengthBox.tsx
2907
3323
  var _Grid = require('@mui/material/Grid'); var _Grid2 = _interopRequireDefault(_Grid);
2908
3324
 
@@ -2996,7 +3412,7 @@ var _ListItem = require('@mui/material/ListItem'); var _ListItem2 = _interopRequ
2996
3412
  var _Popper = require('@mui/material/Popper'); var _Popper2 = _interopRequireDefault(_Popper);
2997
3413
  var _Autocomplete = require('@mui/material/Autocomplete'); var _Autocomplete2 = _interopRequireDefault(_Autocomplete);
2998
3414
  var _ListItemText = require('@mui/material/ListItemText'); var _ListItemText2 = _interopRequireDefault(_ListItemText);
2999
- var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
3415
+
3000
3416
 
3001
3417
 
3002
3418
  var CustomPopper = (props) => {
@@ -4435,21 +4851,40 @@ function WavelengthPlaneTrail({ trailDir = "right", id }) {
4435
4851
 
4436
4852
 
4437
4853
  function WavelengthConfirmationModal(props) {
4438
- const { show, setShow, handleConfirmationModalOnConfirmProp, id } = props;
4854
+ const { show, setShow, id } = props;
4439
4855
  const handleClose = () => {
4440
4856
  setShow(false);
4441
4857
  };
4442
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Dialog, { id, "data-testid": "testId-WavelengthConfirmationModal", open: show, onClose: handleClose, "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", children: [
4443
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogTitle, { alignContent: `center`, id: "alert-dialog-title", children: _optionalChain([props, 'access', _7 => _7.textObj, 'optionalAccess', _8 => _8.title]) }),
4444
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _9 => _9.textObj, 'optionalAccess', _10 => _10.dialog]) }) }),
4445
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: [
4446
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthConfirmationModalCancelButton", onClick: handleClose, children: "Nevermind" }),
4447
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Button, { "data-testid": "testId-WavelengthConfirmationModalConfirmButton", onClick: handleConfirmationModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: [
4448
- "Yes, ",
4449
- _optionalChain([props, 'access', _11 => _11.textObj, 'optionalAccess', _12 => _12.purpose])
4450
- ] })
4451
- ] })
4452
- ] });
4858
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Modal, { open: show, onClose: handleClose, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
4859
+ _material.Box,
4860
+ {
4861
+ sx: {
4862
+ position: "absolute",
4863
+ top: "50%",
4864
+ left: "50%",
4865
+ transform: "translate(-50%, -50%)",
4866
+ width: props.width || "451px",
4867
+ // Custom width
4868
+ height: props.height || "256px",
4869
+ // Custom height
4870
+ boxSizing: "border-box",
4871
+ bgcolor: props.backgroundColor || "background.paper",
4872
+ borderRadius: "16px",
4873
+ color: props.textColor || "black",
4874
+ boxShadow: 24,
4875
+ padding: "32px",
4876
+ overflow: "scroll"
4877
+ },
4878
+ children: [
4879
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "28px", fontWeight: 500, padding: "0px", marginBottom: "16px", fontFamily: props.fontFamily }, children: _optionalChain([props, 'access', _7 => _7.textObj, 'optionalAccess', _8 => _8.title]) }),
4880
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "16px", lineHeight: "19.2px", fontFamily: props.fontFamily, fontWeight: 400, height: "60px" }, children: _optionalChain([props, 'access', _9 => _9.textObj, 'optionalAccess', _10 => _10.dialog]) }),
4881
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", flexDirection: "row", justifyContent: "flex-end", marginTop: "40px", gap: "8px" }, children: [
4882
+ props.cacelButton,
4883
+ props.submitButton
4884
+ ] })
4885
+ ]
4886
+ }
4887
+ ) });
4453
4888
  }
4454
4889
 
4455
4890
  // src/components/modals/WavelengthContentModal.tsx
@@ -4463,11 +4898,11 @@ function WavelengthContentModal(props) {
4463
4898
  };
4464
4899
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Dialog, { "data-testid": "testId-WavelengthContentModal", open: show, onClose: handleClose, "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", children: [
4465
4900
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogTitle, { alignContent: `center`, id: "alert-dialog-title", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { display: "flex", alignItems: "center", children: [
4466
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _13 => _13.textObj, 'optionalAccess', _14 => _14.title]) }),
4901
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _11 => _11.textObj, 'optionalAccess', _12 => _12.title]) }),
4467
4902
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { onClick: handleClose, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, {}) }) })
4468
4903
  ] }) }),
4469
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _15 => _15.textObj, 'optionalAccess', _16 => _16.dialog]) }) }),
4470
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _17 => _17.textObj, 'optionalAccess', _18 => _18.purpose]) }) })
4904
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _13 => _13.textObj, 'optionalAccess', _14 => _14.dialog]) }) }),
4905
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _15 => _15.textObj, 'optionalAccess', _16 => _16.purpose]) }) })
4471
4906
  ] });
4472
4907
  }
4473
4908
 
@@ -4584,7 +5019,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
4584
5019
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: customStyle, children: items.label }, index);
4585
5020
  }
4586
5021
  } else if (items.itemType === "link") {
4587
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _MenuItem2.default, { style: { textDecoration: "none" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Links, { href: items.link, hoverColor: "", children: items.label }) }, index);
5022
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _MenuItem2.default, { style: { textDecoration: "none" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Links, { href: items.link, hoverColor: items.hoverColor || "", children: items.label }) }, index);
4588
5023
  } else {
4589
5024
  if (items.link) {
4590
5025
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _MenuItem2.default, { href: items.link, children: items.label }, index);
@@ -4681,7 +5116,7 @@ function WavelengthDropdown({
4681
5116
  borderBottomRightRadius: "8px",
4682
5117
  borderTopRightRadius: "0px",
4683
5118
  borderTopLeftRadius: "0px",
4684
- boxShadow: _optionalChain([menuSx, 'optionalAccess', _19 => _19.boxShadow]),
5119
+ boxShadow: _optionalChain([menuSx, 'optionalAccess', _17 => _17.boxShadow]),
4685
5120
  width: myMenusx.width,
4686
5121
  backgroundColor: `${myMenusx.backgroundColor}`
4687
5122
  },
@@ -5363,6 +5798,65 @@ function DefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, bo
5363
5798
  }
5364
5799
  }
5365
5800
 
5801
+ // src/components/TextField/WavelengthTextField.tsx
5802
+
5803
+
5804
+
5805
+ function WavelengthTextField(props) {
5806
+ const [hasError, setHasError] = _react.useState.call(void 0, false);
5807
+ const handleChange = _react.useCallback.call(void 0,
5808
+ (event) => {
5809
+ const val = event.target.value;
5810
+ if (props.regex) {
5811
+ setHasError(!props.regex.test(val));
5812
+ }
5813
+ },
5814
+ [props.regex]
5815
+ // Ensures function doesn't change unless `regex` does
5816
+ );
5817
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5818
+ _TextField2.default,
5819
+ {
5820
+ required: props.required,
5821
+ label: props.label,
5822
+ onChange: (e) => {
5823
+ handleChange(e);
5824
+ _optionalChain([props, 'access', _18 => _18.onChange, 'optionalCall', _19 => _19(e)]);
5825
+ },
5826
+ error: hasError,
5827
+ helperText: hasError ? "Invalid Input" : "",
5828
+ sx: {
5829
+ "& .MuiInputBase-root": {
5830
+ height: props.height || "51px",
5831
+ width: props.width || "320px",
5832
+ borderRadius: "8px"
5833
+ },
5834
+ "&.MuiTextField-root": {
5835
+ "& label": { color: !hasError ? props.labelColor || "rgba(89, 99, 129, 1)" : "red" },
5836
+ "& .MuiOutlinedInput-root": {
5837
+ "& fieldset": {
5838
+ border: "1px solid",
5839
+ borderColor: !hasError ? props.borderColor || `rgba(89, 99, 129, 1)` : "red"
5840
+ },
5841
+ "&.Mui-focused fieldset": {
5842
+ borderColor: !hasError ? props.focusColor || `rgba(26, 128, 131, 0.1)` : "red"
5843
+ }
5844
+ }
5845
+ }
5846
+ },
5847
+ placeholder: props.placeholder,
5848
+ InputLabelProps: {
5849
+ shrink: true
5850
+ },
5851
+ InputProps: {
5852
+ style: { color: props.textColor || "inherit" }
5853
+ }
5854
+ }
5855
+ ) });
5856
+ }
5857
+
5858
+
5859
+
5366
5860
 
5367
5861
 
5368
5862
 
@@ -5404,7 +5898,7 @@ function DefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, bo
5404
5898
 
5405
5899
 
5406
5900
 
5407
- 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.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthTitleBar = WavelengthTitleBar; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
5901
+ 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.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; 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;
5408
5902
  /*! Bundled license information:
5409
5903
 
5410
5904
  react-is/cjs/react-is.production.min.js: