@octoguide/mui-ui-toolkit 0.7.5 → 0.8.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/dist/index.js CHANGED
@@ -74,6 +74,7 @@ __export(index_exports, {
74
74
  MobileDateTimePicker: () => MobileDateTimePicker,
75
75
  MobileTimePicker: () => MobileTimePicker,
76
76
  MultiSelect: () => MultiSelect,
77
+ OtpInput: () => OtpInput,
77
78
  Overline: () => Overline,
78
79
  PageSpinner: () => PageSpinner,
79
80
  Pagination: () => Pagination,
@@ -2376,7 +2377,7 @@ var StyledSelectionContainer = (0, import_styles13.styled)("button")(
2376
2377
  outline: "none"
2377
2378
  },
2378
2379
  '&:focus:not([data-lose-focus="true"])': {
2379
- boxShadow: "rgba(0, 0, 0, 0.65) 0 0 0 3px",
2380
+ boxShadow: `${(0, import_styles13.alpha)(theme.palette.text.primary, 0.65)} 0 0 0 3px`,
2380
2381
  outlineColor: "transparent",
2381
2382
  outlineStyle: "solid",
2382
2383
  borderColor: theme.palette.text.primary,
@@ -2805,8 +2806,70 @@ var MultiSelect = ({
2805
2806
  };
2806
2807
  MultiSelect.displayName = "ToolkitMultiSelect";
2807
2808
 
2809
+ // src/components/OtpInput/OtpInput.tsx
2810
+ var import_react10 = require("react");
2811
+ var import_Box5 = __toESM(require("@mui/material/Box"));
2812
+ var import_OutlinedInput = __toESM(require("@mui/material/OutlinedInput"));
2813
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2814
+ var OTP_LENGTH = 6;
2815
+ var OtpInput = ({ value, onChange, error, disabled }) => {
2816
+ const inputRefs = (0, import_react10.useRef)([]);
2817
+ const digits = Array.from({ length: OTP_LENGTH }, (_, i) => value[i] ?? "");
2818
+ const handleChange = (0, import_react10.useCallback)(
2819
+ (index, char) => {
2820
+ const digit = char.replace(/\D/g, "").slice(-1);
2821
+ const next = digits.map((d, i) => i === index ? digit : d).join("");
2822
+ onChange(next);
2823
+ if (digit && index < OTP_LENGTH - 1) inputRefs.current[index + 1]?.focus();
2824
+ },
2825
+ [digits, onChange]
2826
+ );
2827
+ const handleKeyDown = (0, import_react10.useCallback)(
2828
+ (index, e) => {
2829
+ if (e.key === "Backspace" && !digits[index] && index > 0) {
2830
+ inputRefs.current[index - 1]?.focus();
2831
+ }
2832
+ },
2833
+ [digits]
2834
+ );
2835
+ const handlePaste = (0, import_react10.useCallback)(
2836
+ (e) => {
2837
+ const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, OTP_LENGTH);
2838
+ if (pasted) {
2839
+ onChange(pasted.padEnd(OTP_LENGTH, "").slice(0, OTP_LENGTH));
2840
+ inputRefs.current[Math.min(pasted.length, OTP_LENGTH - 1)]?.focus();
2841
+ }
2842
+ e.preventDefault();
2843
+ },
2844
+ [onChange]
2845
+ );
2846
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Box5.default, { sx: { display: "flex", gap: 1.5, justifyContent: "space-between", mb: 2.5 }, children: digits.map((digit, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2847
+ import_OutlinedInput.default,
2848
+ {
2849
+ inputRef: (el) => {
2850
+ inputRefs.current[i] = el;
2851
+ },
2852
+ value: digit,
2853
+ onChange: (e) => handleChange(i, e.target.value),
2854
+ onKeyDown: (e) => handleKeyDown(i, e),
2855
+ onPaste: handlePaste,
2856
+ placeholder: "-",
2857
+ disabled,
2858
+ inputProps: {
2859
+ maxLength: 1,
2860
+ autoComplete: "one-time-code",
2861
+ style: { textAlign: "center", fontSize: "1.25rem", padding: "12px 0" }
2862
+ },
2863
+ error,
2864
+ sx: { width: 48, "& .MuiOutlinedInput-notchedOutline": { borderRadius: 1.5 } }
2865
+ },
2866
+ i
2867
+ )) });
2868
+ };
2869
+ OtpInput.displayName = "ToolkitOtpInput";
2870
+
2808
2871
  // src/components/PageSpinner/PageSpinner.tsx
2809
- var import_react10 = __toESM(require("react"));
2872
+ var import_react11 = __toESM(require("react"));
2810
2873
  var import_Portal = __toESM(require("@mui/material/Portal"));
2811
2874
  var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"));
2812
2875
  var import_utils = require("@mui/material/utils");
@@ -3016,9 +3079,9 @@ var StyledScreenReaderOnly2 = (0, import_styles14.styled)("span")(() => ({
3016
3079
  }));
3017
3080
 
3018
3081
  // src/components/PageSpinner/PageSpinner.tsx
3019
- var import_jsx_runtime19 = require("react/jsx-runtime");
3082
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3020
3083
  var ARIA_REANNOUNCE_INTERVAL = 3e4;
3021
- var PageSpinner = import_react10.default.forwardRef(
3084
+ var PageSpinner = import_react11.default.forwardRef(
3022
3085
  function PageSpinner2({
3023
3086
  message = "Processing, please wait",
3024
3087
  customMessageLayout,
@@ -3028,14 +3091,14 @@ var PageSpinner = import_react10.default.forwardRef(
3028
3091
  messageTone = "assertive",
3029
3092
  ...restProps
3030
3093
  }, ref) {
3031
- const internalRef = (0, import_react10.useRef)(null);
3094
+ const internalRef = (0, import_react11.useRef)(null);
3032
3095
  const mergedRef = (0, import_utils.useForkRef)(ref, internalRef);
3033
- (0, import_react10.useEffect)(() => {
3096
+ (0, import_react11.useEffect)(() => {
3034
3097
  const blockKeyDown = (e) => e.preventDefault();
3035
3098
  document.addEventListener("keydown", blockKeyDown);
3036
3099
  return () => document.removeEventListener("keydown", blockKeyDown);
3037
3100
  }, [rootNode]);
3038
- (0, import_react10.useEffect)(() => {
3101
+ (0, import_react11.useEffect)(() => {
3039
3102
  const ariaRole = messageTone === "polite" ? "status" : "alert";
3040
3103
  setA11yMessage(message, messageTone, ariaRole);
3041
3104
  const interval = setInterval(() => {
@@ -3050,7 +3113,7 @@ var PageSpinner = import_react10.default.forwardRef(
3050
3113
  backgroundScrollTether(false);
3051
3114
  };
3052
3115
  }, [message, rootNode, messageTone]);
3053
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Portal.default, { container: rootNode, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3116
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Portal.default, { container: rootNode, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3054
3117
  StyledPageSpinnerRoot,
3055
3118
  {
3056
3119
  "data-component-id": "PageSpinner",
@@ -3058,9 +3121,9 @@ var PageSpinner = import_react10.default.forwardRef(
3058
3121
  ref: mergedRef,
3059
3122
  ...getCleanProps(restProps),
3060
3123
  children: [
3061
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledOverlay, { $darkBg: isOnDarkBg }),
3062
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(StyledSpinnerCentre, { children: [
3063
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3124
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledOverlay, { $darkBg: isOnDarkBg }),
3125
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(StyledSpinnerCentre, { children: [
3126
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3064
3127
  import_CircularProgress2.default,
3065
3128
  {
3066
3129
  size: 60,
@@ -3068,8 +3131,8 @@ var PageSpinner = import_react10.default.forwardRef(
3068
3131
  "aria-hidden": "true"
3069
3132
  }
3070
3133
  ),
3071
- customMessageLayout ?? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledSpinnerMessage, { $darkBg: isOnDarkBg, children: message }),
3072
- srText && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledScreenReaderOnly2, { children: srText })
3134
+ customMessageLayout ?? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledSpinnerMessage, { $darkBg: isOnDarkBg, children: message }),
3135
+ srText && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledScreenReaderOnly2, { children: srText })
3073
3136
  ] })
3074
3137
  ]
3075
3138
  }
@@ -3079,7 +3142,7 @@ var PageSpinner = import_react10.default.forwardRef(
3079
3142
  PageSpinner.displayName = "ToolkitPageSpinner";
3080
3143
 
3081
3144
  // src/components/Pagination/Pagination.tsx
3082
- var import_react11 = __toESM(require("react"));
3145
+ var import_react12 = __toESM(require("react"));
3083
3146
  var import_Pagination = __toESM(require("@mui/material/Pagination"));
3084
3147
 
3085
3148
  // src/components/Pagination/Pagination.styles.tsx
@@ -3146,15 +3209,15 @@ var StyledPaginationItem = (0, import_styles16.styled)(import_PaginationItem.def
3146
3209
  });
3147
3210
 
3148
3211
  // src/components/Pagination/Pagination.tsx
3149
- var import_jsx_runtime20 = require("react/jsx-runtime");
3150
- var Pagination = import_react11.default.forwardRef(
3212
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3213
+ var Pagination = import_react12.default.forwardRef(
3151
3214
  function Pagination2({ variant = "text", shape = "circular", color = "default", ...restProps }, ref) {
3152
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3215
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3153
3216
  import_Pagination.default,
3154
3217
  {
3155
3218
  ref,
3156
3219
  "data-component-id": "Pagination",
3157
- renderItem: (item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3220
+ renderItem: (item) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3158
3221
  StyledPaginationItem,
3159
3222
  {
3160
3223
  $variant: variant,
@@ -3171,7 +3234,7 @@ var Pagination = import_react11.default.forwardRef(
3171
3234
  Pagination.displayName = "ToolkitPagination";
3172
3235
 
3173
3236
  // src/components/Paragraph/Paragraph.tsx
3174
- var import_react12 = __toESM(require("react"));
3237
+ var import_react13 = __toESM(require("react"));
3175
3238
 
3176
3239
  // src/components/Paragraph/Paragraph.styles.tsx
3177
3240
  var import_styles17 = require("@mui/material/styles");
@@ -3208,10 +3271,10 @@ var StyledParagraph = (0, import_styles17.styled)("p", {
3208
3271
  }));
3209
3272
 
3210
3273
  // src/components/Paragraph/Paragraph.tsx
3211
- var import_jsx_runtime21 = require("react/jsx-runtime");
3212
- var Paragraph = import_react12.default.forwardRef(
3274
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3275
+ var Paragraph = import_react13.default.forwardRef(
3213
3276
  function Paragraph2({ children, variant = "regular", isOnDarkBg = false, ...restProps }, ref) {
3214
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3277
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3215
3278
  StyledParagraph,
3216
3279
  {
3217
3280
  $variant: variant,
@@ -3227,7 +3290,7 @@ var Paragraph = import_react12.default.forwardRef(
3227
3290
  Paragraph.displayName = "ToolkitParagraph";
3228
3291
 
3229
3292
  // src/components/Password/Password.tsx
3230
- var import_react13 = __toESM(require("react"));
3293
+ var import_react14 = __toESM(require("react"));
3231
3294
 
3232
3295
  // src/components/Password/PasswordRule.tsx
3233
3296
  var import_CheckCircle = __toESM(require("@mui/icons-material/CheckCircle"));
@@ -3268,16 +3331,16 @@ var StyledScreenReaderOnly3 = (0, import_styles18.styled)("span")({
3268
3331
  });
3269
3332
 
3270
3333
  // src/components/Password/PasswordRule.tsx
3271
- var import_jsx_runtime22 = require("react/jsx-runtime");
3272
- var PasswordRule = ({ valid = false, rule = "", idx }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3334
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3335
+ var PasswordRule = ({ valid = false, rule = "", idx }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3273
3336
  StyledPasswordRule,
3274
3337
  {
3275
3338
  className: valid ? "PasswordRule--valid" : "PasswordRule--invalid",
3276
3339
  "data-testid": `password-rule-${idx}`,
3277
3340
  children: [
3278
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StyledPasswordRuleIcon, { children: valid ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_CheckCircle.default, { fontSize: "small", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_Cancel.default, { fontSize: "small", "aria-hidden": "true" }) }),
3279
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StyledPasswordRuleText, { children: rule }),
3280
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StyledScreenReaderOnly3, { children: valid ? "supplied" : "not supplied" })
3341
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledPasswordRuleIcon, { children: valid ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_CheckCircle.default, { fontSize: "small", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_Cancel.default, { fontSize: "small", "aria-hidden": "true" }) }),
3342
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledPasswordRuleText, { children: rule }),
3343
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledScreenReaderOnly3, { children: valid ? "supplied" : "not supplied" })
3281
3344
  ]
3282
3345
  }
3283
3346
  );
@@ -3306,7 +3369,7 @@ var StyledPasswordRuleTitle = (0, import_styles19.styled)("div")(({ theme }) =>
3306
3369
  }));
3307
3370
 
3308
3371
  // src/components/Password/PasswordCriteria.tsx
3309
- var import_jsx_runtime23 = require("react/jsx-runtime");
3372
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3310
3373
  var PasswordRules = [
3311
3374
  { key: "minLength", rule: "Minimum 8 characters" },
3312
3375
  { key: "lowercase", rule: "At least one lowercase letter" },
@@ -3323,7 +3386,7 @@ var passwordValidator = (value) => ({
3323
3386
  });
3324
3387
  var PasswordCriteria = ({ show = false, value = "", id = "passwordCriteria" }) => {
3325
3388
  const validity = passwordValidator(value);
3326
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3389
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3327
3390
  StyledPasswordCriteriaContainer,
3328
3391
  {
3329
3392
  $show: show,
@@ -3332,9 +3395,9 @@ var PasswordCriteria = ({ show = false, value = "", id = "passwordCriteria" }) =
3332
3395
  "data-testid": "password-criteria",
3333
3396
  role: "status",
3334
3397
  "aria-live": "polite",
3335
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Card, { compact: true, children: [
3336
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledPasswordRuleTitle, { children: "Password must contain:" }),
3337
- PasswordRules.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PasswordRule, { valid: validity[item.key], rule: item.rule, idx }, item.key))
3398
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Card, { compact: true, children: [
3399
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledPasswordRuleTitle, { children: "Password must contain:" }),
3400
+ PasswordRules.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PasswordRule, { valid: validity[item.key], rule: item.rule, idx }, item.key))
3338
3401
  ] })
3339
3402
  }
3340
3403
  );
@@ -3352,8 +3415,8 @@ var StyledPasswordInputWrapper = (0, import_styles20.styled)("div")({
3352
3415
  });
3353
3416
 
3354
3417
  // src/components/Password/Password.tsx
3355
- var import_jsx_runtime24 = require("react/jsx-runtime");
3356
- var Password = import_react13.default.forwardRef(
3418
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3419
+ var Password = import_react14.default.forwardRef(
3357
3420
  function Password2({
3358
3421
  isInvalid,
3359
3422
  value: initialValue,
@@ -3366,8 +3429,8 @@ var Password = import_react13.default.forwardRef(
3366
3429
  id,
3367
3430
  ...rest
3368
3431
  }, ref) {
3369
- const [value, setValue] = (0, import_react13.useState)(initialValue ?? "");
3370
- const [showCriteria, setShowCriteria] = (0, import_react13.useState)(false);
3432
+ const [value, setValue] = (0, import_react14.useState)(initialValue ?? "");
3433
+ const [showCriteria, setShowCriteria] = (0, import_react14.useState)(false);
3371
3434
  const handleFocus = () => {
3372
3435
  setShowCriteria(true);
3373
3436
  };
@@ -3384,8 +3447,8 @@ var Password = import_react13.default.forwardRef(
3384
3447
  };
3385
3448
  const criteriaId = id ? `${id}-criteria` : "passwordCriteria";
3386
3449
  const cleanRest = getCleanProps(rest);
3387
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(StyledPasswordRoot, { className, ...cleanRest, children: [
3388
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledPasswordInputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3450
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(StyledPasswordRoot, { className, ...cleanRest, children: [
3451
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledPasswordInputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3389
3452
  TextField,
3390
3453
  {
3391
3454
  ref,
@@ -3404,14 +3467,14 @@ var Password = import_react13.default.forwardRef(
3404
3467
  onChange: handleChange
3405
3468
  }
3406
3469
  ) }),
3407
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PasswordCriteria, { show: showCriteria, value, id: criteriaId })
3470
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PasswordCriteria, { show: showCriteria, value, id: criteriaId })
3408
3471
  ] });
3409
3472
  }
3410
3473
  );
3411
3474
  Password.displayName = "ToolkitPassword";
3412
3475
 
3413
3476
  // src/components/Spinner/Spinner.tsx
3414
- var import_react14 = __toESM(require("react"));
3477
+ var import_react15 = __toESM(require("react"));
3415
3478
 
3416
3479
  // src/components/Spinner/Spinner.styles.tsx
3417
3480
  var import_styles21 = require("@mui/material/styles");
@@ -3499,10 +3562,10 @@ var StyledScreenReaderOnly4 = (0, import_styles21.styled)("span")({
3499
3562
  });
3500
3563
 
3501
3564
  // src/components/Spinner/Spinner.tsx
3502
- var import_jsx_runtime25 = require("react/jsx-runtime");
3503
- var Spinner = import_react14.default.forwardRef(
3565
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3566
+ var Spinner = import_react15.default.forwardRef(
3504
3567
  function Spinner2({ size = "sm", message, isOnDarkBg = false, srText, isInline = false, ...restProps }, ref) {
3505
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3568
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3506
3569
  StyledSpinnerContainer,
3507
3570
  {
3508
3571
  ref,
@@ -3510,12 +3573,12 @@ var Spinner = import_react14.default.forwardRef(
3510
3573
  "data-component-id": "Spinner",
3511
3574
  ...getCleanProps(restProps),
3512
3575
  children: [
3513
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(StyledSpinnerIconContainer, { $size: size, "aria-hidden": "true", children: [
3514
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledSpinnerBackground, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" }),
3515
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledSpinner, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" })
3576
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledSpinnerIconContainer, { $size: size, "aria-hidden": "true", children: [
3577
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledSpinnerBackground, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" }),
3578
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledSpinner, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" })
3516
3579
  ] }),
3517
- message && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledSpinnerMessage2, { $darkBg: isOnDarkBg, $inline: isInline, children: message }),
3518
- srText && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledScreenReaderOnly4, { children: srText })
3580
+ message && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledSpinnerMessage2, { $darkBg: isOnDarkBg, $inline: isInline, children: message }),
3581
+ srText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledScreenReaderOnly4, { children: srText })
3519
3582
  ]
3520
3583
  }
3521
3584
  );
@@ -3641,7 +3704,7 @@ var StyledSwitch = (0, import_styles22.styled)("label", {
3641
3704
  }));
3642
3705
 
3643
3706
  // src/components/Toggle/Toggle.tsx
3644
- var import_jsx_runtime26 = require("react/jsx-runtime");
3707
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3645
3708
  function Toggle({
3646
3709
  name,
3647
3710
  checked = false,
@@ -3652,18 +3715,20 @@ function Toggle({
3652
3715
  onBlur,
3653
3716
  ...restProps
3654
3717
  }) {
3655
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledFieldset, { "data-component-id": "toggle", ...getCleanProps(restProps), children: [
3656
- label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledLegend, { children: label }),
3657
- description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_FormHelperText.default, { children: description }),
3658
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledToggleWrapper, { children: [
3659
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3718
+ const testId = restProps["data-testid"];
3719
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(StyledFieldset, { "data-component-id": "toggle", ...getCleanProps(restProps), children: [
3720
+ label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StyledLegend, { children: label }),
3721
+ description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_FormHelperText.default, { children: description }),
3722
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(StyledToggleWrapper, { children: [
3723
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3660
3724
  StyledSwitch,
3661
3725
  {
3662
3726
  htmlFor: `${name}off`,
3663
3727
  selected: !checked,
3664
3728
  controlType: "off",
3729
+ "data-testid": testId ? `${testId}-off` : void 0,
3665
3730
  children: [
3666
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3731
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3667
3732
  "input",
3668
3733
  {
3669
3734
  checked: !checked,
@@ -3679,14 +3744,15 @@ function Toggle({
3679
3744
  ]
3680
3745
  }
3681
3746
  ),
3682
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3747
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3683
3748
  StyledSwitch,
3684
3749
  {
3685
3750
  htmlFor: `${name}on`,
3686
3751
  selected: checked,
3687
3752
  controlType: "on",
3753
+ "data-testid": testId ? `${testId}-on` : void 0,
3688
3754
  children: [
3689
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3755
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3690
3756
  "input",
3691
3757
  {
3692
3758
  checked,
@@ -3703,7 +3769,7 @@ function Toggle({
3703
3769
  }
3704
3770
  )
3705
3771
  ] }),
3706
- error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_FormHelperText.default, { error: true, children: error })
3772
+ error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_FormHelperText.default, { error: true, children: error })
3707
3773
  ] });
3708
3774
  }
3709
3775
  Toggle.displayName = "ToolkitToggle";
@@ -3711,7 +3777,7 @@ Toggle.displayName = "ToolkitToggle";
3711
3777
  // src/components/Table/Table.tsx
3712
3778
  var import_material11 = require("@mui/material");
3713
3779
  var import_styles23 = require("@mui/material/styles");
3714
- var import_jsx_runtime27 = require("react/jsx-runtime");
3780
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3715
3781
  var StyledTableContainer = (0, import_styles23.styled)(import_material11.TableContainer)(() => ({
3716
3782
  overflowX: "auto"
3717
3783
  }));
@@ -3722,25 +3788,25 @@ var StyledHeadCell = (0, import_styles23.styled)(import_material11.TableCell)(({
3722
3788
  borderBottomColor: theme.tokens.components.table.borderColor
3723
3789
  }));
3724
3790
  function Table(props) {
3725
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material11.Table, { ...props });
3791
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.Table, { ...props });
3726
3792
  }
3727
3793
  function TableHead(props) {
3728
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material11.TableHead, { ...props });
3794
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableHead, { ...props });
3729
3795
  }
3730
3796
  function TableBody(props) {
3731
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material11.TableBody, { ...props });
3797
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableBody, { ...props });
3732
3798
  }
3733
3799
  function TableRow(props) {
3734
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material11.TableRow, { ...props });
3800
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableRow, { ...props });
3735
3801
  }
3736
3802
  function TableCell(props) {
3737
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material11.TableCell, { ...props });
3803
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableCell, { ...props });
3738
3804
  }
3739
3805
  function TableHeadCell(props) {
3740
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StyledHeadCell, { component: "th", scope: "col", ...props });
3806
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledHeadCell, { component: "th", scope: "col", ...props });
3741
3807
  }
3742
3808
  function TableContainer(props) {
3743
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StyledTableContainer, { ...props });
3809
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledTableContainer, { ...props });
3744
3810
  }
3745
3811
  var TablePagination = import_material11.TablePagination;
3746
3812
  var TableSortLabel = import_material11.TableSortLabel;
@@ -3753,144 +3819,144 @@ TableHeadCell.displayName = "ToolkitTableHeadCell";
3753
3819
  TableContainer.displayName = "ToolkitTableContainer";
3754
3820
 
3755
3821
  // src/foundation/H1/H1.tsx
3756
- var import_react15 = __toESM(require("react"));
3822
+ var import_react16 = __toESM(require("react"));
3757
3823
  var import_material12 = require("@mui/material");
3758
- var import_jsx_runtime28 = require("react/jsx-runtime");
3759
- var H1 = import_react15.default.forwardRef(
3824
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3825
+ var H1 = import_react16.default.forwardRef(
3760
3826
  function H12({ color = "text.primary", children, ...props }, ref) {
3761
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material12.Typography, { ref, variant: "h1", color, ...props, children });
3827
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material12.Typography, { ref, variant: "h1", color, ...props, children });
3762
3828
  }
3763
3829
  );
3764
3830
  H1.displayName = "ToolkitH1";
3765
3831
 
3766
3832
  // src/foundation/H2/H2.tsx
3767
- var import_react16 = __toESM(require("react"));
3833
+ var import_react17 = __toESM(require("react"));
3768
3834
  var import_material13 = require("@mui/material");
3769
- var import_jsx_runtime29 = require("react/jsx-runtime");
3770
- var H2 = import_react16.default.forwardRef(
3835
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3836
+ var H2 = import_react17.default.forwardRef(
3771
3837
  function H22({ color = "text.primary", children, ...props }, ref) {
3772
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material13.Typography, { ref, variant: "h2", color, ...props, children });
3838
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material13.Typography, { ref, variant: "h2", color, ...props, children });
3773
3839
  }
3774
3840
  );
3775
3841
  H2.displayName = "ToolkitH2";
3776
3842
 
3777
3843
  // src/foundation/H3/H3.tsx
3778
- var import_react17 = __toESM(require("react"));
3844
+ var import_react18 = __toESM(require("react"));
3779
3845
  var import_material14 = require("@mui/material");
3780
- var import_jsx_runtime30 = require("react/jsx-runtime");
3781
- var H3 = import_react17.default.forwardRef(
3846
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3847
+ var H3 = import_react18.default.forwardRef(
3782
3848
  function H32({ color = "text.primary", children, ...props }, ref) {
3783
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material14.Typography, { ref, variant: "h3", color, ...props, children });
3849
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material14.Typography, { ref, variant: "h3", color, ...props, children });
3784
3850
  }
3785
3851
  );
3786
3852
  H3.displayName = "ToolkitH3";
3787
3853
 
3788
3854
  // src/foundation/H4/H4.tsx
3789
- var import_react18 = __toESM(require("react"));
3855
+ var import_react19 = __toESM(require("react"));
3790
3856
  var import_material15 = require("@mui/material");
3791
- var import_jsx_runtime31 = require("react/jsx-runtime");
3792
- var H4 = import_react18.default.forwardRef(
3857
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3858
+ var H4 = import_react19.default.forwardRef(
3793
3859
  function H42({ color = "text.primary", children, ...props }, ref) {
3794
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material15.Typography, { ref, variant: "h4", color, ...props, children });
3860
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material15.Typography, { ref, variant: "h4", color, ...props, children });
3795
3861
  }
3796
3862
  );
3797
3863
  H4.displayName = "ToolkitH4";
3798
3864
 
3799
3865
  // src/foundation/H5/H5.tsx
3800
- var import_react19 = __toESM(require("react"));
3866
+ var import_react20 = __toESM(require("react"));
3801
3867
  var import_material16 = require("@mui/material");
3802
- var import_jsx_runtime32 = require("react/jsx-runtime");
3803
- var H5 = import_react19.default.forwardRef(
3868
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3869
+ var H5 = import_react20.default.forwardRef(
3804
3870
  function H52({ color = "text.primary", children, ...props }, ref) {
3805
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material16.Typography, { ref, variant: "h5", color, ...props, children });
3871
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material16.Typography, { ref, variant: "h5", color, ...props, children });
3806
3872
  }
3807
3873
  );
3808
3874
  H5.displayName = "ToolkitH5";
3809
3875
 
3810
3876
  // src/foundation/H6/H6.tsx
3811
- var import_react20 = __toESM(require("react"));
3877
+ var import_react21 = __toESM(require("react"));
3812
3878
  var import_material17 = require("@mui/material");
3813
- var import_jsx_runtime33 = require("react/jsx-runtime");
3814
- var H6 = import_react20.default.forwardRef(
3879
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3880
+ var H6 = import_react21.default.forwardRef(
3815
3881
  function H62({ color = "text.primary", children, ...props }, ref) {
3816
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material17.Typography, { ref, variant: "h6", color, ...props, children });
3882
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material17.Typography, { ref, variant: "h6", color, ...props, children });
3817
3883
  }
3818
3884
  );
3819
3885
  H6.displayName = "ToolkitH6";
3820
3886
 
3821
3887
  // src/foundation/Subtitle1/Subtitle1.tsx
3822
- var import_react21 = __toESM(require("react"));
3888
+ var import_react22 = __toESM(require("react"));
3823
3889
  var import_material18 = require("@mui/material");
3824
- var import_jsx_runtime34 = require("react/jsx-runtime");
3825
- var Subtitle1 = import_react21.default.forwardRef(
3890
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3891
+ var Subtitle1 = import_react22.default.forwardRef(
3826
3892
  function Subtitle12({ color = "text.primary", children, ...props }, ref) {
3827
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material18.Typography, { ref, variant: "subtitle1", color, ...props, children });
3893
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material18.Typography, { ref, variant: "subtitle1", color, ...props, children });
3828
3894
  }
3829
3895
  );
3830
3896
  Subtitle1.displayName = "ToolkitSubtitle1";
3831
3897
 
3832
3898
  // src/foundation/Subtitle2/Subtitle2.tsx
3833
- var import_react22 = __toESM(require("react"));
3899
+ var import_react23 = __toESM(require("react"));
3834
3900
  var import_material19 = require("@mui/material");
3835
- var import_jsx_runtime35 = require("react/jsx-runtime");
3836
- var Subtitle2 = import_react22.default.forwardRef(
3901
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3902
+ var Subtitle2 = import_react23.default.forwardRef(
3837
3903
  function Subtitle22({ color = "text.primary", children, ...props }, ref) {
3838
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material19.Typography, { ref, variant: "subtitle2", color, ...props, children });
3904
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material19.Typography, { ref, variant: "subtitle2", color, ...props, children });
3839
3905
  }
3840
3906
  );
3841
3907
  Subtitle2.displayName = "ToolkitSubtitle2";
3842
3908
 
3843
3909
  // src/foundation/Body1/Body1.tsx
3844
- var import_react23 = __toESM(require("react"));
3910
+ var import_react24 = __toESM(require("react"));
3845
3911
  var import_material20 = require("@mui/material");
3846
- var import_jsx_runtime36 = require("react/jsx-runtime");
3847
- var Body1 = import_react23.default.forwardRef(
3912
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3913
+ var Body1 = import_react24.default.forwardRef(
3848
3914
  function Body12({ color = "text.primary", children, ...props }, ref) {
3849
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material20.Typography, { ref, variant: "body1", color, ...props, children });
3915
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material20.Typography, { ref, variant: "body1", color, ...props, children });
3850
3916
  }
3851
3917
  );
3852
3918
  Body1.displayName = "ToolkitBody1";
3853
3919
 
3854
3920
  // src/foundation/Body2/Body2.tsx
3855
- var import_react24 = __toESM(require("react"));
3921
+ var import_react25 = __toESM(require("react"));
3856
3922
  var import_material21 = require("@mui/material");
3857
- var import_jsx_runtime37 = require("react/jsx-runtime");
3858
- var Body2 = import_react24.default.forwardRef(
3923
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3924
+ var Body2 = import_react25.default.forwardRef(
3859
3925
  function Body22({ color = "text.primary", children, ...props }, ref) {
3860
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material21.Typography, { ref, variant: "body2", color, ...props, children });
3926
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material21.Typography, { ref, variant: "body2", color, ...props, children });
3861
3927
  }
3862
3928
  );
3863
3929
  Body2.displayName = "ToolkitBody2";
3864
3930
 
3865
3931
  // src/foundation/Caption/Caption.tsx
3866
- var import_react25 = __toESM(require("react"));
3932
+ var import_react26 = __toESM(require("react"));
3867
3933
  var import_material22 = require("@mui/material");
3868
- var import_jsx_runtime38 = require("react/jsx-runtime");
3869
- var Caption = import_react25.default.forwardRef(
3934
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3935
+ var Caption = import_react26.default.forwardRef(
3870
3936
  function Caption2({ color = "text.primary", children, ...props }, ref) {
3871
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material22.Typography, { ref, variant: "caption", color, ...props, children });
3937
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material22.Typography, { ref, variant: "caption", color, ...props, children });
3872
3938
  }
3873
3939
  );
3874
3940
  Caption.displayName = "ToolkitCaption";
3875
3941
 
3876
3942
  // src/foundation/Overline/Overline.tsx
3877
- var import_react26 = __toESM(require("react"));
3943
+ var import_react27 = __toESM(require("react"));
3878
3944
  var import_material23 = require("@mui/material");
3879
- var import_jsx_runtime39 = require("react/jsx-runtime");
3880
- var Overline = import_react26.default.forwardRef(
3945
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3946
+ var Overline = import_react27.default.forwardRef(
3881
3947
  function Overline2({ color = "text.primary", children, ...props }, ref) {
3882
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material23.Typography, { ref, variant: "overline", color, ...props, children });
3948
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material23.Typography, { ref, variant: "overline", color, ...props, children });
3883
3949
  }
3884
3950
  );
3885
3951
  Overline.displayName = "ToolkitOverline";
3886
3952
 
3887
3953
  // src/foundation/TypographyButton/TypographyButton.tsx
3888
- var import_react27 = __toESM(require("react"));
3954
+ var import_react28 = __toESM(require("react"));
3889
3955
  var import_material24 = require("@mui/material");
3890
- var import_jsx_runtime40 = require("react/jsx-runtime");
3891
- var TypographyButton = import_react27.default.forwardRef(
3956
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3957
+ var TypographyButton = import_react28.default.forwardRef(
3892
3958
  function TypographyButton2({ color = "text.primary", children, ...props }, ref) {
3893
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material24.Typography, { ref, variant: "button", color, ...props, children });
3959
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material24.Typography, { ref, variant: "button", color, ...props, children });
3894
3960
  }
3895
3961
  );
3896
3962
  TypographyButton.displayName = "ToolkitTypographyButton";
@@ -3940,6 +4006,7 @@ TypographyButton.displayName = "ToolkitTypographyButton";
3940
4006
  MobileDateTimePicker,
3941
4007
  MobileTimePicker,
3942
4008
  MultiSelect,
4009
+ OtpInput,
3943
4010
  Overline,
3944
4011
  PageSpinner,
3945
4012
  Pagination,