@octoguide/mui-ui-toolkit 0.7.6 → 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.d.mts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +182 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +132 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,
|
|
@@ -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
|
|
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
|
|
3082
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3020
3083
|
var ARIA_REANNOUNCE_INTERVAL = 3e4;
|
|
3021
|
-
var PageSpinner =
|
|
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,
|
|
3094
|
+
const internalRef = (0, import_react11.useRef)(null);
|
|
3032
3095
|
const mergedRef = (0, import_utils.useForkRef)(ref, internalRef);
|
|
3033
|
-
(0,
|
|
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,
|
|
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,
|
|
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,
|
|
3062
|
-
/* @__PURE__ */ (0,
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
3072
|
-
srText && /* @__PURE__ */ (0,
|
|
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
|
|
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
|
|
3150
|
-
var Pagination =
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
3212
|
-
var Paragraph =
|
|
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,
|
|
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
|
|
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
|
|
3272
|
-
var PasswordRule = ({ valid = false, rule = "", idx }) => /* @__PURE__ */ (0,
|
|
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,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3280
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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,
|
|
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,
|
|
3336
|
-
/* @__PURE__ */ (0,
|
|
3337
|
-
PasswordRules.map((item, idx) => /* @__PURE__ */ (0,
|
|
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
|
|
3356
|
-
var Password =
|
|
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,
|
|
3370
|
-
const [showCriteria, setShowCriteria] = (0,
|
|
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,
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
|
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
|
|
3503
|
-
var Spinner =
|
|
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,
|
|
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,
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3515
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
3518
|
-
srText && /* @__PURE__ */ (0,
|
|
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
|
|
3707
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3645
3708
|
function Toggle({
|
|
3646
3709
|
name,
|
|
3647
3710
|
checked = false,
|
|
@@ -3653,11 +3716,11 @@ function Toggle({
|
|
|
3653
3716
|
...restProps
|
|
3654
3717
|
}) {
|
|
3655
3718
|
const testId = restProps["data-testid"];
|
|
3656
|
-
return /* @__PURE__ */ (0,
|
|
3657
|
-
label && /* @__PURE__ */ (0,
|
|
3658
|
-
description && /* @__PURE__ */ (0,
|
|
3659
|
-
/* @__PURE__ */ (0,
|
|
3660
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
3661
3724
|
StyledSwitch,
|
|
3662
3725
|
{
|
|
3663
3726
|
htmlFor: `${name}off`,
|
|
@@ -3665,7 +3728,7 @@ function Toggle({
|
|
|
3665
3728
|
controlType: "off",
|
|
3666
3729
|
"data-testid": testId ? `${testId}-off` : void 0,
|
|
3667
3730
|
children: [
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3731
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3669
3732
|
"input",
|
|
3670
3733
|
{
|
|
3671
3734
|
checked: !checked,
|
|
@@ -3681,7 +3744,7 @@ function Toggle({
|
|
|
3681
3744
|
]
|
|
3682
3745
|
}
|
|
3683
3746
|
),
|
|
3684
|
-
/* @__PURE__ */ (0,
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3685
3748
|
StyledSwitch,
|
|
3686
3749
|
{
|
|
3687
3750
|
htmlFor: `${name}on`,
|
|
@@ -3689,7 +3752,7 @@ function Toggle({
|
|
|
3689
3752
|
controlType: "on",
|
|
3690
3753
|
"data-testid": testId ? `${testId}-on` : void 0,
|
|
3691
3754
|
children: [
|
|
3692
|
-
/* @__PURE__ */ (0,
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3693
3756
|
"input",
|
|
3694
3757
|
{
|
|
3695
3758
|
checked,
|
|
@@ -3706,7 +3769,7 @@ function Toggle({
|
|
|
3706
3769
|
}
|
|
3707
3770
|
)
|
|
3708
3771
|
] }),
|
|
3709
|
-
error && /* @__PURE__ */ (0,
|
|
3772
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_FormHelperText.default, { error: true, children: error })
|
|
3710
3773
|
] });
|
|
3711
3774
|
}
|
|
3712
3775
|
Toggle.displayName = "ToolkitToggle";
|
|
@@ -3714,7 +3777,7 @@ Toggle.displayName = "ToolkitToggle";
|
|
|
3714
3777
|
// src/components/Table/Table.tsx
|
|
3715
3778
|
var import_material11 = require("@mui/material");
|
|
3716
3779
|
var import_styles23 = require("@mui/material/styles");
|
|
3717
|
-
var
|
|
3780
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3718
3781
|
var StyledTableContainer = (0, import_styles23.styled)(import_material11.TableContainer)(() => ({
|
|
3719
3782
|
overflowX: "auto"
|
|
3720
3783
|
}));
|
|
@@ -3725,25 +3788,25 @@ var StyledHeadCell = (0, import_styles23.styled)(import_material11.TableCell)(({
|
|
|
3725
3788
|
borderBottomColor: theme.tokens.components.table.borderColor
|
|
3726
3789
|
}));
|
|
3727
3790
|
function Table(props) {
|
|
3728
|
-
return /* @__PURE__ */ (0,
|
|
3791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.Table, { ...props });
|
|
3729
3792
|
}
|
|
3730
3793
|
function TableHead(props) {
|
|
3731
|
-
return /* @__PURE__ */ (0,
|
|
3794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableHead, { ...props });
|
|
3732
3795
|
}
|
|
3733
3796
|
function TableBody(props) {
|
|
3734
|
-
return /* @__PURE__ */ (0,
|
|
3797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableBody, { ...props });
|
|
3735
3798
|
}
|
|
3736
3799
|
function TableRow(props) {
|
|
3737
|
-
return /* @__PURE__ */ (0,
|
|
3800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableRow, { ...props });
|
|
3738
3801
|
}
|
|
3739
3802
|
function TableCell(props) {
|
|
3740
|
-
return /* @__PURE__ */ (0,
|
|
3803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material11.TableCell, { ...props });
|
|
3741
3804
|
}
|
|
3742
3805
|
function TableHeadCell(props) {
|
|
3743
|
-
return /* @__PURE__ */ (0,
|
|
3806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledHeadCell, { component: "th", scope: "col", ...props });
|
|
3744
3807
|
}
|
|
3745
3808
|
function TableContainer(props) {
|
|
3746
|
-
return /* @__PURE__ */ (0,
|
|
3809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StyledTableContainer, { ...props });
|
|
3747
3810
|
}
|
|
3748
3811
|
var TablePagination = import_material11.TablePagination;
|
|
3749
3812
|
var TableSortLabel = import_material11.TableSortLabel;
|
|
@@ -3756,144 +3819,144 @@ TableHeadCell.displayName = "ToolkitTableHeadCell";
|
|
|
3756
3819
|
TableContainer.displayName = "ToolkitTableContainer";
|
|
3757
3820
|
|
|
3758
3821
|
// src/foundation/H1/H1.tsx
|
|
3759
|
-
var
|
|
3822
|
+
var import_react16 = __toESM(require("react"));
|
|
3760
3823
|
var import_material12 = require("@mui/material");
|
|
3761
|
-
var
|
|
3762
|
-
var H1 =
|
|
3824
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3825
|
+
var H1 = import_react16.default.forwardRef(
|
|
3763
3826
|
function H12({ color = "text.primary", children, ...props }, ref) {
|
|
3764
|
-
return /* @__PURE__ */ (0,
|
|
3827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material12.Typography, { ref, variant: "h1", color, ...props, children });
|
|
3765
3828
|
}
|
|
3766
3829
|
);
|
|
3767
3830
|
H1.displayName = "ToolkitH1";
|
|
3768
3831
|
|
|
3769
3832
|
// src/foundation/H2/H2.tsx
|
|
3770
|
-
var
|
|
3833
|
+
var import_react17 = __toESM(require("react"));
|
|
3771
3834
|
var import_material13 = require("@mui/material");
|
|
3772
|
-
var
|
|
3773
|
-
var H2 =
|
|
3835
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3836
|
+
var H2 = import_react17.default.forwardRef(
|
|
3774
3837
|
function H22({ color = "text.primary", children, ...props }, ref) {
|
|
3775
|
-
return /* @__PURE__ */ (0,
|
|
3838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material13.Typography, { ref, variant: "h2", color, ...props, children });
|
|
3776
3839
|
}
|
|
3777
3840
|
);
|
|
3778
3841
|
H2.displayName = "ToolkitH2";
|
|
3779
3842
|
|
|
3780
3843
|
// src/foundation/H3/H3.tsx
|
|
3781
|
-
var
|
|
3844
|
+
var import_react18 = __toESM(require("react"));
|
|
3782
3845
|
var import_material14 = require("@mui/material");
|
|
3783
|
-
var
|
|
3784
|
-
var H3 =
|
|
3846
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3847
|
+
var H3 = import_react18.default.forwardRef(
|
|
3785
3848
|
function H32({ color = "text.primary", children, ...props }, ref) {
|
|
3786
|
-
return /* @__PURE__ */ (0,
|
|
3849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material14.Typography, { ref, variant: "h3", color, ...props, children });
|
|
3787
3850
|
}
|
|
3788
3851
|
);
|
|
3789
3852
|
H3.displayName = "ToolkitH3";
|
|
3790
3853
|
|
|
3791
3854
|
// src/foundation/H4/H4.tsx
|
|
3792
|
-
var
|
|
3855
|
+
var import_react19 = __toESM(require("react"));
|
|
3793
3856
|
var import_material15 = require("@mui/material");
|
|
3794
|
-
var
|
|
3795
|
-
var H4 =
|
|
3857
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3858
|
+
var H4 = import_react19.default.forwardRef(
|
|
3796
3859
|
function H42({ color = "text.primary", children, ...props }, ref) {
|
|
3797
|
-
return /* @__PURE__ */ (0,
|
|
3860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material15.Typography, { ref, variant: "h4", color, ...props, children });
|
|
3798
3861
|
}
|
|
3799
3862
|
);
|
|
3800
3863
|
H4.displayName = "ToolkitH4";
|
|
3801
3864
|
|
|
3802
3865
|
// src/foundation/H5/H5.tsx
|
|
3803
|
-
var
|
|
3866
|
+
var import_react20 = __toESM(require("react"));
|
|
3804
3867
|
var import_material16 = require("@mui/material");
|
|
3805
|
-
var
|
|
3806
|
-
var H5 =
|
|
3868
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3869
|
+
var H5 = import_react20.default.forwardRef(
|
|
3807
3870
|
function H52({ color = "text.primary", children, ...props }, ref) {
|
|
3808
|
-
return /* @__PURE__ */ (0,
|
|
3871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material16.Typography, { ref, variant: "h5", color, ...props, children });
|
|
3809
3872
|
}
|
|
3810
3873
|
);
|
|
3811
3874
|
H5.displayName = "ToolkitH5";
|
|
3812
3875
|
|
|
3813
3876
|
// src/foundation/H6/H6.tsx
|
|
3814
|
-
var
|
|
3877
|
+
var import_react21 = __toESM(require("react"));
|
|
3815
3878
|
var import_material17 = require("@mui/material");
|
|
3816
|
-
var
|
|
3817
|
-
var H6 =
|
|
3879
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3880
|
+
var H6 = import_react21.default.forwardRef(
|
|
3818
3881
|
function H62({ color = "text.primary", children, ...props }, ref) {
|
|
3819
|
-
return /* @__PURE__ */ (0,
|
|
3882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material17.Typography, { ref, variant: "h6", color, ...props, children });
|
|
3820
3883
|
}
|
|
3821
3884
|
);
|
|
3822
3885
|
H6.displayName = "ToolkitH6";
|
|
3823
3886
|
|
|
3824
3887
|
// src/foundation/Subtitle1/Subtitle1.tsx
|
|
3825
|
-
var
|
|
3888
|
+
var import_react22 = __toESM(require("react"));
|
|
3826
3889
|
var import_material18 = require("@mui/material");
|
|
3827
|
-
var
|
|
3828
|
-
var Subtitle1 =
|
|
3890
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3891
|
+
var Subtitle1 = import_react22.default.forwardRef(
|
|
3829
3892
|
function Subtitle12({ color = "text.primary", children, ...props }, ref) {
|
|
3830
|
-
return /* @__PURE__ */ (0,
|
|
3893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material18.Typography, { ref, variant: "subtitle1", color, ...props, children });
|
|
3831
3894
|
}
|
|
3832
3895
|
);
|
|
3833
3896
|
Subtitle1.displayName = "ToolkitSubtitle1";
|
|
3834
3897
|
|
|
3835
3898
|
// src/foundation/Subtitle2/Subtitle2.tsx
|
|
3836
|
-
var
|
|
3899
|
+
var import_react23 = __toESM(require("react"));
|
|
3837
3900
|
var import_material19 = require("@mui/material");
|
|
3838
|
-
var
|
|
3839
|
-
var Subtitle2 =
|
|
3901
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3902
|
+
var Subtitle2 = import_react23.default.forwardRef(
|
|
3840
3903
|
function Subtitle22({ color = "text.primary", children, ...props }, ref) {
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
3904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material19.Typography, { ref, variant: "subtitle2", color, ...props, children });
|
|
3842
3905
|
}
|
|
3843
3906
|
);
|
|
3844
3907
|
Subtitle2.displayName = "ToolkitSubtitle2";
|
|
3845
3908
|
|
|
3846
3909
|
// src/foundation/Body1/Body1.tsx
|
|
3847
|
-
var
|
|
3910
|
+
var import_react24 = __toESM(require("react"));
|
|
3848
3911
|
var import_material20 = require("@mui/material");
|
|
3849
|
-
var
|
|
3850
|
-
var Body1 =
|
|
3912
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3913
|
+
var Body1 = import_react24.default.forwardRef(
|
|
3851
3914
|
function Body12({ color = "text.primary", children, ...props }, ref) {
|
|
3852
|
-
return /* @__PURE__ */ (0,
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material20.Typography, { ref, variant: "body1", color, ...props, children });
|
|
3853
3916
|
}
|
|
3854
3917
|
);
|
|
3855
3918
|
Body1.displayName = "ToolkitBody1";
|
|
3856
3919
|
|
|
3857
3920
|
// src/foundation/Body2/Body2.tsx
|
|
3858
|
-
var
|
|
3921
|
+
var import_react25 = __toESM(require("react"));
|
|
3859
3922
|
var import_material21 = require("@mui/material");
|
|
3860
|
-
var
|
|
3861
|
-
var Body2 =
|
|
3923
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3924
|
+
var Body2 = import_react25.default.forwardRef(
|
|
3862
3925
|
function Body22({ color = "text.primary", children, ...props }, ref) {
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material21.Typography, { ref, variant: "body2", color, ...props, children });
|
|
3864
3927
|
}
|
|
3865
3928
|
);
|
|
3866
3929
|
Body2.displayName = "ToolkitBody2";
|
|
3867
3930
|
|
|
3868
3931
|
// src/foundation/Caption/Caption.tsx
|
|
3869
|
-
var
|
|
3932
|
+
var import_react26 = __toESM(require("react"));
|
|
3870
3933
|
var import_material22 = require("@mui/material");
|
|
3871
|
-
var
|
|
3872
|
-
var Caption =
|
|
3934
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3935
|
+
var Caption = import_react26.default.forwardRef(
|
|
3873
3936
|
function Caption2({ color = "text.primary", children, ...props }, ref) {
|
|
3874
|
-
return /* @__PURE__ */ (0,
|
|
3937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material22.Typography, { ref, variant: "caption", color, ...props, children });
|
|
3875
3938
|
}
|
|
3876
3939
|
);
|
|
3877
3940
|
Caption.displayName = "ToolkitCaption";
|
|
3878
3941
|
|
|
3879
3942
|
// src/foundation/Overline/Overline.tsx
|
|
3880
|
-
var
|
|
3943
|
+
var import_react27 = __toESM(require("react"));
|
|
3881
3944
|
var import_material23 = require("@mui/material");
|
|
3882
|
-
var
|
|
3883
|
-
var Overline =
|
|
3945
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3946
|
+
var Overline = import_react27.default.forwardRef(
|
|
3884
3947
|
function Overline2({ color = "text.primary", children, ...props }, ref) {
|
|
3885
|
-
return /* @__PURE__ */ (0,
|
|
3948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material23.Typography, { ref, variant: "overline", color, ...props, children });
|
|
3886
3949
|
}
|
|
3887
3950
|
);
|
|
3888
3951
|
Overline.displayName = "ToolkitOverline";
|
|
3889
3952
|
|
|
3890
3953
|
// src/foundation/TypographyButton/TypographyButton.tsx
|
|
3891
|
-
var
|
|
3954
|
+
var import_react28 = __toESM(require("react"));
|
|
3892
3955
|
var import_material24 = require("@mui/material");
|
|
3893
|
-
var
|
|
3894
|
-
var TypographyButton =
|
|
3956
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3957
|
+
var TypographyButton = import_react28.default.forwardRef(
|
|
3895
3958
|
function TypographyButton2({ color = "text.primary", children, ...props }, ref) {
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material24.Typography, { ref, variant: "button", color, ...props, children });
|
|
3897
3960
|
}
|
|
3898
3961
|
);
|
|
3899
3962
|
TypographyButton.displayName = "ToolkitTypographyButton";
|
|
@@ -3943,6 +4006,7 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
3943
4006
|
MobileDateTimePicker,
|
|
3944
4007
|
MobileTimePicker,
|
|
3945
4008
|
MultiSelect,
|
|
4009
|
+
OtpInput,
|
|
3946
4010
|
Overline,
|
|
3947
4011
|
PageSpinner,
|
|
3948
4012
|
Pagination,
|