@symply.io/basic-components 1.0.0-alpha.9 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/AlertDialog/index.d.ts +0 -1
  2. package/AlertDialog/index.js +2 -2
  3. package/Autocomplete/index.d.ts +4 -0
  4. package/Autocomplete/index.js +38 -0
  5. package/Autocomplete/types.d.ts +15 -0
  6. package/Autocomplete/types.js +1 -0
  7. package/Autocomplete/useInteractions.d.ts +5 -0
  8. package/Autocomplete/useInteractions.js +9 -0
  9. package/AutocompleteWithFilter/index.d.ts +4 -0
  10. package/AutocompleteWithFilter/index.js +54 -0
  11. package/AutocompleteWithFilter/types.d.ts +16 -0
  12. package/AutocompleteWithFilter/types.js +1 -0
  13. package/BasicModal/Content.d.ts +0 -1
  14. package/BasicModal/Content.js +1 -1
  15. package/BasicModal/index.d.ts +0 -1
  16. package/BasicModal/index.js +3 -6
  17. package/BreadCrumbs/index.d.ts +4 -0
  18. package/BreadCrumbs/index.js +37 -0
  19. package/BreadCrumbs/types.d.ts +9 -0
  20. package/BreadCrumbs/types.js +1 -0
  21. package/CheckBox/CheckBox.d.ts +3 -0
  22. package/CheckBox/CheckBox.js +36 -0
  23. package/CheckBox/CheckBoxGroup.d.ts +3 -0
  24. package/CheckBox/CheckBoxGroup.js +30 -0
  25. package/CheckBox/index.d.ts +3 -0
  26. package/CheckBox/index.js +3 -0
  27. package/CheckBox/types.d.ts +12 -0
  28. package/CheckBox/types.js +1 -0
  29. package/Copyright/index.d.ts +4 -0
  30. package/Copyright/index.js +25 -0
  31. package/Copyright/types.d.ts +5 -0
  32. package/Copyright/types.js +1 -0
  33. package/DateInput/FullDateInput/index.d.ts +5 -0
  34. package/DateInput/FullDateInput/index.js +66 -0
  35. package/DateInput/FullDateInput/types.d.ts +14 -0
  36. package/DateInput/FullDateInput/types.js +1 -0
  37. package/DateInput/FullDateInput/useInteractions.d.ts +8 -0
  38. package/DateInput/FullDateInput/useInteractions.js +20 -0
  39. package/DateInput/MonthDayInput/index.d.ts +5 -0
  40. package/DateInput/MonthDayInput/index.js +54 -0
  41. package/DateInput/MonthDayInput/types.d.ts +14 -0
  42. package/DateInput/MonthDayInput/types.js +1 -0
  43. package/DateInput/MonthDayInput/useInteractions.d.ts +8 -0
  44. package/DateInput/MonthDayInput/useInteractions.js +19 -0
  45. package/DateInput/MonthYearInput/index.d.ts +5 -0
  46. package/DateInput/MonthYearInput/index.js +55 -0
  47. package/DateInput/MonthYearInput/types.d.ts +14 -0
  48. package/DateInput/MonthYearInput/types.js +1 -0
  49. package/DateInput/MonthYearInput/useInteractions.d.ts +8 -0
  50. package/DateInput/MonthYearInput/useInteractions.js +19 -0
  51. package/DateInput/index.d.ts +6 -0
  52. package/DateInput/index.js +6 -0
  53. package/DigitInput/index.d.ts +1 -4
  54. package/DigitInput/index.js +3 -3
  55. package/DigitInput/types.d.ts +2 -1
  56. package/DynamicHeaderBar/HeaderBar.js +1 -1
  57. package/DynamicHeaderBar/HeaderButtons.d.ts +0 -1
  58. package/DynamicHeaderBar/HeaderButtons.js +5 -5
  59. package/DynamicHeaderBar/HeaderLine.js +1 -1
  60. package/DynamicHeaderBar/index.js +2 -2
  61. package/FeinInput/index.d.ts +6 -0
  62. package/FeinInput/index.js +73 -0
  63. package/FeinInput/types.d.ts +9 -0
  64. package/FeinInput/types.js +1 -0
  65. package/FeinInput/useInteractions.d.ts +8 -0
  66. package/FeinInput/useInteractions.js +16 -0
  67. package/FormRadioGroup/index.d.ts +0 -1
  68. package/FormRadioGroup/index.js +3 -3
  69. package/FormSelector/MultipleSelector.d.ts +1 -3
  70. package/FormSelector/MultipleSelector.js +2 -2
  71. package/FormSelector/SimpleSelector.d.ts +1 -3
  72. package/FormSelector/SimpleSelector.js +2 -2
  73. package/FormSelector/types.d.ts +2 -1
  74. package/HelpCaption/index.js +2 -2
  75. package/LoadingModal/index.d.ts +0 -1
  76. package/LoadingModal/index.js +1 -1
  77. package/MenuButtonGroup/MenuItem.d.ts +0 -1
  78. package/MenuButtonGroup/MenuItem.js +1 -1
  79. package/MenuButtonGroup/index.js +2 -2
  80. package/NumberInput/index.d.ts +2 -3
  81. package/NumberInput/index.js +1 -1
  82. package/PasswordInput/ConfirmPassword.d.ts +2 -3
  83. package/PasswordInput/ConfirmPassword.js +1 -1
  84. package/PasswordInput/Password.d.ts +3 -4
  85. package/PasswordInput/Password.js +2 -2
  86. package/PhoneNumberInput/index.d.ts +2 -3
  87. package/PhoneNumberInput/index.js +2 -2
  88. package/README.md +370 -2
  89. package/Sidebar/SidebarItem.d.ts +3 -0
  90. package/Sidebar/SidebarItem.js +62 -0
  91. package/Sidebar/SidebarItemsGroup.d.ts +5 -0
  92. package/Sidebar/SidebarItemsGroup.js +38 -0
  93. package/Sidebar/SidebarLink.d.ts +3 -0
  94. package/Sidebar/SidebarLink.js +37 -0
  95. package/Sidebar/index.d.ts +7 -0
  96. package/Sidebar/index.js +30 -0
  97. package/Sidebar/types.d.ts +31 -0
  98. package/Sidebar/types.js +1 -0
  99. package/SocialInput/index.d.ts +6 -0
  100. package/SocialInput/index.js +76 -0
  101. package/SocialInput/types.d.ts +9 -0
  102. package/SocialInput/types.js +1 -0
  103. package/SocialInput/useInteractions.d.ts +10 -0
  104. package/SocialInput/useInteractions.js +26 -0
  105. package/TabGroup/index.js +10 -5
  106. package/TablePagination/Actions.d.ts +3 -0
  107. package/TablePagination/Actions.js +27 -0
  108. package/TablePagination/index.d.ts +4 -0
  109. package/TablePagination/index.js +30 -0
  110. package/TablePagination/types.d.ts +14 -0
  111. package/TablePagination/types.js +1 -0
  112. package/TablePagination/useInteractions.d.ts +14 -0
  113. package/TablePagination/useInteractions.js +23 -0
  114. package/TextInput/index.d.ts +2 -3
  115. package/TextInput/index.js +13 -3
  116. package/ToastPrompt/Presentation.js +3 -3
  117. package/ToastPrompt/index.js +1 -1
  118. package/VideoPlayerModal/index.d.ts +1 -3
  119. package/VideoPlayerModal/index.js +2 -2
  120. package/VideoPlayerModal/types.d.ts +2 -1
  121. package/index.d.ts +18 -0
  122. package/index.js +18 -0
  123. package/package.json +8 -2
@@ -0,0 +1,54 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useRifm } from "rifm";
14
+ import TextField from "@mui/material/TextField";
15
+ import ThemeProvider from "@mui/material/styles/ThemeProvider";
16
+ import useInteractions from "./useInteractions";
17
+ import useCustomTheme from "../../useCustomTheme";
18
+ export function MonthDayFormat(str) {
19
+ var digits = (str.match(/\d+/g) || []).join("");
20
+ var chars = digits.split("");
21
+ return chars.reduce(function (prev, curr, index) {
22
+ if (index === 2) {
23
+ return "".concat(prev, " / ").concat(curr);
24
+ }
25
+ else {
26
+ return "".concat(prev).concat(curr);
27
+ }
28
+ }, "");
29
+ }
30
+ export function verifyMonthDayDate(monthDayString) {
31
+ var reg = /^((((0[1,3,5,7,8]{1})|(1[0,2]{1}))\s?\/\s?((0[1-9]{1})|([1-2]{1}\d{1})|(3[0-1]{1})))|(((0[4,6,9]{1})|(11))\s?\/\s?((0[1-9]{1})|([1-2]{1}\d{1})|(30)))|((02)\s?\/\s?(0[1-9]{1})|([1-2]{1}\d{1})))$/g;
32
+ return reg.test(monthDayString);
33
+ }
34
+ function MonthDayInput(props) {
35
+ var name = props.name, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, value = props.value, _a = props.margin, margin = _a === void 0 ? "normal" : _a, error = props.error, _b = props.helperText, helperText = _b === void 0 ? "Please enter a valid date" : _b, verifyFn = props.verifyFn, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
36
+ var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
37
+ var _c = useInteractions({ value: value }), valLength = _c.valLength, addMask = _c.addMask;
38
+ var rifm = useRifm({
39
+ mask: true,
40
+ value: String(value),
41
+ onChange: onChange,
42
+ replace: addMask,
43
+ format: MonthDayFormat
44
+ });
45
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, { placeholder: "MM / DD", error: error ||
46
+ (valLength > 0 &&
47
+ (verifyFn ? !verifyFn(value) : !verifyMonthDayDate(value))), margin: margin, name: name, value: rifm.value, onChange: rifm.onChange, helperText: valLength > 0 &&
48
+ (verifyFn ? !verifyFn(value) : !verifyMonthDayDate(value))
49
+ ? helperText
50
+ : "", onFocus: onFocus, onBlur: onBlur, InputLabelProps: {
51
+ shrink: true
52
+ } }) })));
53
+ }
54
+ export default MonthDayInput;
@@ -0,0 +1,14 @@
1
+ import { CSSProperties } from "react";
2
+ export interface DateInputprops {
3
+ name: string;
4
+ onChange: (value: string) => void;
5
+ onFocus?: () => void;
6
+ onBlur?: () => void;
7
+ verifyFn?: (value?: string) => boolean;
8
+ helperText?: string;
9
+ margin?: "none" | "normal" | "dense" | undefined;
10
+ error?: boolean;
11
+ value: string;
12
+ primaryColor?: CSSProperties["color"];
13
+ secondaryColor?: CSSProperties["color"];
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ interface InteractionProps {
2
+ value: string;
3
+ }
4
+ declare function useInteractions(props: InteractionProps): {
5
+ valLength: number;
6
+ addMask: (str: string) => string;
7
+ };
8
+ export default useInteractions;
@@ -0,0 +1,19 @@
1
+ import { useCallback, useMemo } from "react";
2
+ function useInteractions(props) {
3
+ var value = props.value;
4
+ var addMask = useCallback(function (str) {
5
+ var digits = (str.match(/\d+/g) || []).join("");
6
+ var month = digits.slice(0, 2).padEnd(2, "_");
7
+ var day = digits.slice(2, 4).padEnd(2, "_");
8
+ if (digits) {
9
+ return "".concat(month, " / ").concat(day);
10
+ }
11
+ return "";
12
+ }, []);
13
+ var valLength = useMemo(function () {
14
+ var digitsArr = String(value).match(/\d/g);
15
+ return digitsArr ? digitsArr.length : 0;
16
+ }, [value]);
17
+ return { valLength: valLength, addMask: addMask };
18
+ }
19
+ export default useInteractions;
@@ -0,0 +1,5 @@
1
+ import { DateInputprops } from "./types";
2
+ export declare function MonthYearFormat(str: string): string;
3
+ export declare function verifyMonthYearDate(monthYearString: string): boolean;
4
+ declare function MonthYearInput(props: DateInputprops): JSX.Element;
5
+ export default MonthYearInput;
@@ -0,0 +1,55 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useRifm } from "rifm";
14
+ import TextField from "@mui/material/TextField";
15
+ import ThemeProvider from "@mui/material/styles/ThemeProvider";
16
+ import useInteractions from "./useInteractions";
17
+ import useCustomTheme from "../../useCustomTheme";
18
+ export function MonthYearFormat(str) {
19
+ var digits = (str.match(/\d+/g) || []).join("");
20
+ var chars = digits.split("");
21
+ return chars.reduce(function (prev, curr, index) {
22
+ if (index === 2) {
23
+ return "".concat(prev, " / ").concat(curr);
24
+ }
25
+ else {
26
+ return "".concat(prev).concat(curr);
27
+ }
28
+ }, "");
29
+ }
30
+ export function verifyMonthYearDate(monthYearString) {
31
+ var reg = /^(((0[1-9]{1})|(1[0-2]{1}))\s?\/\s?([1-2]{1}\d{3}))$/g;
32
+ reg.lastIndex = 0;
33
+ return reg.test(monthYearString);
34
+ }
35
+ function MonthYearInput(props) {
36
+ var name = props.name, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, value = props.value, _a = props.margin, margin = _a === void 0 ? "normal" : _a, error = props.error, _b = props.helperText, helperText = _b === void 0 ? "Please enter a valid date" : _b, verifyFn = props.verifyFn, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
37
+ var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
38
+ var _c = useInteractions({ value: value }), valLength = _c.valLength, addMask = _c.addMask;
39
+ var rifm = useRifm({
40
+ mask: true,
41
+ value: String(value),
42
+ onChange: onChange,
43
+ replace: addMask,
44
+ format: MonthYearFormat
45
+ });
46
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, { placeholder: "MM / YYYY", error: error ||
47
+ (valLength > 0 &&
48
+ (verifyFn ? !verifyFn(value) : !verifyMonthYearDate(value))), margin: margin, name: name, value: rifm.value, onChange: rifm.onChange, helperText: valLength > 0 &&
49
+ (verifyFn ? !verifyFn(value) : !verifyMonthYearDate(value))
50
+ ? helperText
51
+ : "", onFocus: onFocus, onBlur: onBlur, InputLabelProps: {
52
+ shrink: true
53
+ } }) })));
54
+ }
55
+ export default MonthYearInput;
@@ -0,0 +1,14 @@
1
+ import { CSSProperties } from "react";
2
+ export interface DateInputprops {
3
+ name: string;
4
+ onChange: (value: string) => void;
5
+ onFocus?: () => void;
6
+ onBlur?: () => void;
7
+ verifyFn?: (value?: string) => boolean;
8
+ helperText?: string;
9
+ margin?: "none" | "normal" | "dense" | undefined;
10
+ error?: boolean;
11
+ value: string;
12
+ primaryColor?: CSSProperties["color"];
13
+ secondaryColor?: CSSProperties["color"];
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ interface InteractionProps {
2
+ value: string;
3
+ }
4
+ declare function useInteractions(props: InteractionProps): {
5
+ valLength: number;
6
+ addMask: (str: string) => string;
7
+ };
8
+ export default useInteractions;
@@ -0,0 +1,19 @@
1
+ import { useCallback, useMemo } from "react";
2
+ function useInteractions(props) {
3
+ var value = props.value;
4
+ var addMask = useCallback(function (str) {
5
+ var digits = (str.match(/\d+/g) || []).join("");
6
+ var month = digits.slice(0, 2).padEnd(2, "_");
7
+ var Year = digits.slice(2, 6).padEnd(4, "_");
8
+ if (digits) {
9
+ return "".concat(month, " / ").concat(Year);
10
+ }
11
+ return "";
12
+ }, []);
13
+ var valLength = useMemo(function () {
14
+ var digitsArr = String(value).match(/\d/g);
15
+ return digitsArr ? digitsArr.length : 0;
16
+ }, [value]);
17
+ return { valLength: valLength, addMask: addMask };
18
+ }
19
+ export default useInteractions;
@@ -0,0 +1,6 @@
1
+ export * from "./MonthDayInput";
2
+ export * from "./MonthYearInput";
3
+ export * from "./FullDateInput";
4
+ export { default as MonthDayInput } from "./MonthDayInput";
5
+ export { default as MonthYearInput } from "./MonthYearInput";
6
+ export { default as FullDateInput } from "./FullDateInput";
@@ -0,0 +1,6 @@
1
+ export * from "./MonthDayInput";
2
+ export * from "./MonthYearInput";
3
+ export * from "./FullDateInput";
4
+ export { default as MonthDayInput } from "./MonthDayInput";
5
+ export { default as MonthYearInput } from "./MonthYearInput";
6
+ export { default as FullDateInput } from "./FullDateInput";
@@ -1,7 +1,4 @@
1
- /// <reference types="react" />
2
- import { TextFieldProps } from "@mui/material/TextField";
3
1
  import { DigitInputProps } from "./types";
4
- declare type TextProps = Omit<TextFieldProps, "onChange">;
5
- declare function DigitInput(props: DigitInputProps & TextProps): JSX.Element;
2
+ declare function DigitInput(props: DigitInputProps): JSX.Element;
6
3
  export default DigitInput;
7
4
  export * from "./types";
@@ -27,12 +27,12 @@ import ThemeProvider from "@mui/material/styles/ThemeProvider";
27
27
  import useInteractions from "./useInteractions";
28
28
  import useCustomTheme from "../useCustomTheme";
29
29
  function DigitInput(props) {
30
- var onChange = props.onChange, value = props.value, _a = props.size, size = _a === void 0 ? "small" : _a, tooltip = props.tooltip, error = props.error, helperText = props.helperText, _b = props.maxLength, maxLength = _b === void 0 ? 999 : _b, _c = props.minLength, minLength = _c === void 0 ? 0 : _c, endAdornment = props.endAdornment, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["onChange", "value", "size", "tooltip", "error", "helperText", "maxLength", "minLength", "endAdornment", "primaryColor", "secondaryColor"]);
30
+ var onChange = props.onChange, value = props.value, _a = props.size, size = _a === void 0 ? "small" : _a, tooltip = props.tooltip, _b = props.maxLength, maxLength = _b === void 0 ? 999 : _b, _c = props.minLength, minLength = _c === void 0 ? 0 : _c, endAdornment = props.endAdornment, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["onChange", "value", "size", "tooltip", "maxLength", "minLength", "endAdornment", "primaryColor", "secondaryColor"]);
31
31
  var _d = useInteractions({ onChange: onChange }), tooltipOpen = _d.tooltipOpen, handleChange = _d.handleChange, onOpenTooltip = _d.onOpenTooltip, onCloseTooltip = _d.onCloseTooltip;
32
32
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
33
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsx(Field, __assign({ size: size, margin: "dense", type: "number", value: value === undefined || value === null ? "" : value, onFocus: onOpenTooltip, onBlur: onCloseTooltip, inputProps: { maxLength: maxLength, minLength: minLength }, InputProps: {
33
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsx(Field, __assign({ size: size, margin: "dense", type: "text", value: value === undefined || value === null ? "" : value, onFocus: onOpenTooltip, onBlur: onCloseTooltip, inputProps: { maxLength: maxLength, minLength: minLength }, InputProps: {
34
34
  endAdornment: endAdornment
35
- }, onChange: handleChange }, rest), void 0) }), void 0) }), void 0));
35
+ }, onChange: handleChange }, rest)) })) })));
36
36
  }
37
37
  export default DigitInput;
38
38
  export * from "./types";
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { InputProps } from "@mui/material/Input";
3
- export interface DigitInputProps {
3
+ import { TextFieldProps } from "@mui/material/TextField";
4
+ export interface DigitInputProps extends Omit<TextFieldProps, "onChange"> {
4
5
  onChange: (value: string) => void;
5
6
  value: string;
6
7
  tooltip?: string;
@@ -27,6 +27,6 @@ function HeaderBar(props) {
27
27
  var hasButtons = useMemo(function () { return buttons.length > 0; }, [buttons.length]);
28
28
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Grid, __assign({ sx: { mb: 1 } }, { children: [_jsxs(Grid, __assign({ container: true, direction: "row", justifyContent: "flex-start", alignItems: "center" }, { children: [_jsx(Grid, __assign({ item: true, xs: 12, sm: hasButtons ? 6 : 12, md: hasButtons ? 5 : 12, lg: hasButtons ? 4 : 12, xl: hasButtons ? 3 : 12 }, { children: _jsxs(Grid, __assign({ container: true, direction: "row", justifyContent: "flex-start", alignItems: "center" }, { children: [showBackButton && (_jsx(IconButton, __assign({ onClick: function () {
29
29
  onBack ? onBack() : window.history.back();
30
- } }, { children: _jsx(ArrowBackIcon, { fontSize: "small" }, void 0) }), void 0)), _jsx(Typography, __assign({ align: "left", variant: isLessThanSm ? "h6" : "h3", sx: { fontWeight: 600 } }, { children: title }), void 0)] }), void 0) }), void 0), hasButtons ? (_jsx(Grid, __assign({ item: true, xs: 12, sm: 6, md: 7, lg: 8, xl: 9 }, { children: _jsx(HeaderButtons, { buttons: buttons }, void 0) }), void 0)) : (_jsx(_Fragment, {}, void 0))] }), void 0), _jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: _jsx(HeaderLine, { color: color }, void 0) }), void 0) }), void 0), subtitle && (_jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: typeof subtitle === "string" ? (_jsx(Typography, { children: subtitle }, void 0)) : (cloneElement(subtitle)) }), void 0) }), void 0)), bottomEl && (_jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: cloneElement(bottomEl) }), void 0) }), void 0))] }), void 0) }), void 0));
30
+ } }, { children: _jsx(ArrowBackIcon, { fontSize: "small" }) }))), _jsx(Typography, __assign({ align: "left", variant: isLessThanSm ? "h6" : "h3", sx: { fontWeight: 600 } }, { children: title }))] })) })), hasButtons ? (_jsx(Grid, __assign({ item: true, xs: 12, sm: 6, md: 7, lg: 8, xl: 9 }, { children: _jsx(HeaderButtons, { buttons: buttons }) }))) : (_jsx(_Fragment, {}))] })), _jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: _jsx(HeaderLine, { color: color }) })) })), subtitle && (_jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: typeof subtitle === "string" ? (_jsx(Typography, { children: subtitle })) : (cloneElement(subtitle)) })) }))), bottomEl && (_jsx(Grid, __assign({ container: true, direction: "row" }, { children: _jsx(Grid, __assign({ item: true, xs: 12, sx: { mt: 1 } }, { children: cloneElement(bottomEl) })) })))] })) })));
31
31
  }
32
32
  export default HeaderBar;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { HeaderButtonProps } from "./types";
3
2
  export interface HeaderButtonsProps {
4
3
  buttons: Array<HeaderButtonProps>;
@@ -26,19 +26,19 @@ function HeaderButtons(props) {
26
26
  switch (button.type) {
27
27
  case HeaderButtonCategory.TextButton: {
28
28
  var _a = button.variant, variant = _a === void 0 ? "contained" : _a, text = button.text, onClick = button.onClick, color = button.color, size = button.size, startIcon = button.startIcon, endIcon = button.endIcon, disabled = button.disabled;
29
- return (_jsx(Grid, __assign({ item: true, xs: isLessThanSm ? 12 : undefined, style: { textAlign: "end" } }, { children: _jsx(Button, __assign({ fullWidth: isLessThanSm, variant: variant, onClick: onClick, color: color, size: isLessThanSm ? "small" : size, startIcon: startIcon, endIcon: endIcon, disabled: disabled }, { children: text }), void 0) }), text));
29
+ return (_jsx(Grid, __assign({ item: true, xs: isLessThanSm ? 12 : undefined, style: { textAlign: "end" } }, { children: _jsx(Button, __assign({ fullWidth: isLessThanSm, variant: variant, onClick: onClick, color: color, size: isLessThanSm ? "small" : size, startIcon: startIcon, endIcon: endIcon, disabled: disabled }, { children: text })) }), text));
30
30
  }
31
31
  case HeaderButtonCategory.IconButton: {
32
32
  var title = button.title, onClick = button.onClick, color = button.color, _b = button.size, size = _b === void 0 ? "medium" : _b, icon = button.icon;
33
- return (_jsx(Grid, __assign({ item: true, style: { textAlign: "end" } }, { children: _jsx(Fab, __assign({ onClick: onClick, color: color, title: title, size: isLessThanSm ? "small" : size }, { children: icon }), void 0) }), title));
33
+ return (_jsx(Grid, __assign({ item: true, style: { textAlign: "end" } }, { children: _jsx(Fab, __assign({ onClick: onClick, color: color, title: title, size: isLessThanSm ? "small" : size }, { children: icon })) }), title));
34
34
  }
35
35
  case HeaderButtonCategory.MenuButton: {
36
36
  var btns = button.buttons, buttonText = button.buttonText, disabled = button.disabled, variant = button.variant, size = button.size;
37
- return (_jsx(Grid, __assign({ item: true, xs: isLessThanSm ? 12 : undefined, style: { textAlign: "end" } }, { children: _jsx(MenuButtonGroup, { size: isLessThanSm ? "small" : size, variant: variant, buttons: btns, buttonText: buttonText, disabled: disabled }, void 0) }), buttonText));
37
+ return (_jsx(Grid, __assign({ item: true, xs: isLessThanSm ? 12 : undefined, style: { textAlign: "end" } }, { children: _jsx(MenuButtonGroup, { size: isLessThanSm ? "small" : size, variant: variant, buttons: btns, buttonText: buttonText, disabled: disabled }) }), buttonText));
38
38
  }
39
39
  default:
40
- return _jsx(_Fragment, {}, void 0);
40
+ return _jsx(_Fragment, {});
41
41
  }
42
- }) }), void 0) }), void 0));
42
+ }) })) })));
43
43
  }
44
44
  export default HeaderButtons;
@@ -7,6 +7,6 @@ function HeaderLine(props) {
7
7
  return (_jsx(Divider, { sx: {
8
8
  height: "3px",
9
9
  backgroundColor: color || theme.palette.primary.main
10
- } }, void 0));
10
+ } }));
11
11
  }
12
12
  export default HeaderLine;
@@ -37,13 +37,13 @@ export function HeaderProvider(props) {
37
37
  setHeight(node.getBoundingClientRect().height);
38
38
  }
39
39
  }, [headerProps]);
40
- return (_jsx(HeaderContext.Provider, __assign({ value: { onInit: onInit, onHide: onHide, onShow: onShow } }, { children: _jsxs(_Fragment, { children: [visible ? (_jsx(Grid, __assign({ container: true, direction: "row", sx: __assign({}, sx), ref: measureRef }, { children: _jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(HeaderBar, __assign({}, headerProps), void 0) }), void 0) }), void 0)) : (_jsx(_Fragment, {}, void 0)), cloneElement(children, {
40
+ return (_jsx(HeaderContext.Provider, __assign({ value: { onInit: onInit, onHide: onHide, onShow: onShow } }, { children: _jsxs(_Fragment, { children: [visible ? (_jsx(Grid, __assign({ container: true, direction: "row", sx: __assign({}, sx), ref: measureRef }, { children: _jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(HeaderBar, __assign({}, headerProps)) })) }))) : (_jsx(_Fragment, {})), cloneElement(children, {
41
41
  sx: {
42
42
  p: 3,
43
43
  py: 1,
44
44
  pt: height ? "calc(".concat(height, "px)") : undefined,
45
45
  },
46
- })] }, void 0) }), void 0));
46
+ })] }) })));
47
47
  }
48
48
  export function useHeaderBar() {
49
49
  return useContext(HeaderContext);
@@ -0,0 +1,6 @@
1
+ import { FeinInputProps } from "./types";
2
+ export declare function FeinInputFormat(str: string): string;
3
+ export declare function verifyFein(feinString: string): boolean;
4
+ declare function FeinInput(props: FeinInputProps): JSX.Element;
5
+ export default FeinInput;
6
+ export * from "./types";
@@ -0,0 +1,73 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { useRifm } from "rifm";
25
+ import ThemeProvider from "@mui/material/styles/ThemeProvider";
26
+ import TextField from "@mui/material/TextField";
27
+ import useInteractions from "./useInteractions";
28
+ import useCustomTheme from "../useCustomTheme";
29
+ export function FeinInputFormat(str) {
30
+ var digits = (str.match(/\d+/g) || []).join("");
31
+ var chars = digits.split("");
32
+ return chars.reduce(function (prev, curr, index) {
33
+ if (index === 2) {
34
+ return "".concat(prev, " - ").concat(curr);
35
+ }
36
+ else {
37
+ return "".concat(prev).concat(curr);
38
+ }
39
+ }, "");
40
+ }
41
+ export function verifyFein(feinString) {
42
+ var reg = /^\d{2}\s?-\s?\d{7}$/g;
43
+ return reg.test(feinString);
44
+ }
45
+ function FeinInput(props) {
46
+ var value = props.value, _a = props.error, error = _a === void 0 ? false : _a, _b = props.helperText, helperText = _b === void 0 ? "Please enter a valid FEIN" : _b, onChange = props.onChange, verifyFn = props.verifyFn, onFocus = props.onFocus, onBlur = props.onBlur, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["value", "error", "helperText", "onChange", "verifyFn", "onFocus", "onBlur", "primaryColor", "secondaryColor"]);
47
+ var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
48
+ var _c = useInteractions({ value: value }), valLength = _c.valLength, addMask = _c.addMask;
49
+ var rifm = useRifm({
50
+ mask: true,
51
+ value: String(value),
52
+ onChange: onChange,
53
+ replace: addMask,
54
+ format: FeinInputFormat
55
+ });
56
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ value: rifm.value, onChange: rifm.onChange, error: error ||
57
+ (valLength > 0 && (verifyFn ? !verifyFn(value) : verifyFein(value))), helperText: valLength > 0 && (verifyFn ? !verifyFn(value) : verifyFein(value))
58
+ ? helperText
59
+ : "", onFocus: function (event) {
60
+ if (onFocus) {
61
+ onFocus(event);
62
+ }
63
+ }, onBlur: function (event) {
64
+ onChange(value.trim());
65
+ if (onBlur) {
66
+ onBlur(event);
67
+ }
68
+ }, InputLabelProps: {
69
+ shrink: true
70
+ } }, rest)) })));
71
+ }
72
+ export default FeinInput;
73
+ export * from "./types";
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from "react";
2
+ import { TextFieldProps } from "@mui/material/TextField";
3
+ export interface FeinInputProps extends Omit<TextFieldProps, "onChange"> {
4
+ onChange: (value: string) => void;
5
+ verifyFn?: (value?: string) => boolean;
6
+ value: string;
7
+ primaryColor?: CSSProperties["color"];
8
+ secondaryColor?: CSSProperties["color"];
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ interface InteractionProps {
2
+ value: string;
3
+ }
4
+ declare function useInteractions(props: InteractionProps): {
5
+ valLength: number;
6
+ addMask: (str: string) => string;
7
+ };
8
+ export default useInteractions;
@@ -0,0 +1,16 @@
1
+ import { useCallback, useMemo } from "react";
2
+ function useInteractions(props) {
3
+ var value = props.value;
4
+ var addMask = useCallback(function (str) {
5
+ var digits = (str.match(/\d+/g) || []).join("");
6
+ var areaCode = digits.slice(0, 2).padEnd(2, "_");
7
+ var prefixCode = digits.slice(2, 9).padEnd(7, "_");
8
+ return "".concat(areaCode, " - ").concat(prefixCode);
9
+ }, []);
10
+ var valLength = useMemo(function () {
11
+ var digitsArr = String(value).match(/\d/g);
12
+ return digitsArr ? digitsArr.length : 0;
13
+ }, [value]);
14
+ return { valLength: valLength, addMask: addMask };
15
+ }
16
+ export default useInteractions;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormRadioGroupProps } from "./types";
3
2
  declare function FormRadioGroup(props: FormRadioGroupProps): JSX.Element;
4
3
  export default FormRadioGroup;
@@ -22,7 +22,7 @@ import useCustomTheme from "../useCustomTheme";
22
22
  function FormRadioGroup(props) {
23
23
  var formLabel = props.formLabel, color = props.color, value = props.value, options = props.options, disabled = props.disabled, tooltip = props.tooltip, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onChange = props.onChange;
24
24
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
25
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(FormControl, __assign({ sx: { mt: 3 }, component: "fieldset", disabled: disabled }, { children: [tooltip ? (_jsx(Tooltip, __assign({ title: tooltip, placement: "right", disableTouchListener: true }, { children: _jsx(FormLabel, __assign({ sx: { lineHeight: "24px" }, component: "legend" }, { children: formLabel }), void 0) }), void 0)) : (_jsx(FormLabel, __assign({ sx: { lineHeight: "24px" }, component: "legend" }, { children: formLabel }), void 0)), _jsx(RadioGroup, __assign({ value: value, onChange: function (event) {
25
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(FormControl, __assign({ sx: { mt: 3 }, component: "fieldset", disabled: disabled }, { children: [tooltip ? (_jsx(Tooltip, __assign({ title: tooltip, placement: "right", disableTouchListener: true }, { children: _jsx(FormLabel, __assign({ sx: { lineHeight: "24px" }, component: "legend" }, { children: formLabel })) }))) : (_jsx(FormLabel, __assign({ sx: { lineHeight: "24px" }, component: "legend" }, { children: formLabel }))), _jsx(RadioGroup, __assign({ value: value, onChange: function (event) {
26
26
  onChange(event.target.value);
27
27
  }, sx: {
28
28
  my: 1,
@@ -31,8 +31,8 @@ function FormRadioGroup(props) {
31
31
  }
32
32
  } }, { children: options.map(function (opt) {
33
33
  var _a;
34
- return (_jsx(FormControlLabel, { value: opt.value, control: _jsx(Radio, { color: color || "primary" }, void 0), label: _jsx(Typography, { children: opt.label }, void 0), disabled: ((_a = opt.disabled) !== null && _a !== void 0 ? _a : false) || disabled }, String(opt.value)));
35
- }) }), void 0)] }), void 0) }), void 0));
34
+ return (_jsx(FormControlLabel, { value: opt.value, control: _jsx(Radio, { color: color || "primary" }), label: _jsx(Typography, { children: opt.label }), disabled: ((_a = opt.disabled) !== null && _a !== void 0 ? _a : false) || disabled }, String(opt.value)));
35
+ }) }))] })) })));
36
36
  }
37
37
  export default FormRadioGroup;
38
38
  export * from "./types";
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- import { FormControlProps } from "@mui/material/FormControl";
3
1
  import { MultipleSelectorProps } from "./types";
4
- declare function MultipleSelector(props: MultipleSelectorProps & FormControlProps): JSX.Element;
2
+ declare function MultipleSelector(props: MultipleSelectorProps): JSX.Element;
5
3
  export default MultipleSelector;
@@ -34,7 +34,7 @@ function MultipleSelector(props) {
34
34
  var label = props.label, _a = props.variant, variant = _a === void 0 ? "outlined" : _a, value = props.value, tooltip = props.tooltip, _b = props.required, required = _b === void 0 ? false : _b, _c = props.disabled, disabled = _c === void 0 ? false : _c, _d = props.multiple, multiple = _d === void 0 ? false : _d, _e = props.showHelperText, showHelperText = _e === void 0 ? false : _e, helperText = props.helperText, _f = props.options, options = _f === void 0 ? [] : _f, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onChange = props.onChange, rest = __rest(props, ["label", "variant", "value", "tooltip", "required", "disabled", "multiple", "showHelperText", "helperText", "options", "primaryColor", "secondaryColor", "onChange"]);
35
35
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
36
36
  var _g = useInteractions(), tooltipOpen = _g.tooltipOpen, onOpenTooltip = _g.onOpenTooltip, onCloseTooltip = _g.onCloseTooltip;
37
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsxs(FormControl, __assign({ variant: variant, disabled: disabled, required: required }, rest, { children: [label && (_jsx(InputLabel, __assign({ id: "symply-multiple-select" }, { children: label }), void 0)), _jsx(Select, __assign({ disabled: disabled, required: required, value: value, multiple: true, onChange: function (event) {
37
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsxs(FormControl, __assign({ variant: variant, disabled: disabled, required: required }, rest, { children: [label && (_jsx(InputLabel, __assign({ id: "symply-multiple-select" }, { children: label }))), _jsx(Select, __assign({ disabled: disabled, required: required, value: value, multiple: true, onChange: function (event) {
38
38
  var _a;
39
39
  onChange((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value);
40
40
  }, inputProps: {
@@ -43,6 +43,6 @@ function MultipleSelector(props) {
43
43
  }, label: label, renderValue: multiple ? function (selected) { return selected.join("; "); } : undefined }, { children: (options === null || options === void 0 ? void 0 : options.length) > 0 ? (options.map(function (option) {
44
44
  var _a = option, label = _a.label, value = _a.value;
45
45
  return (_jsx(MenuItem, __assign({ value: value }, { children: label }), value));
46
- })) : (_jsx(MenuItem, __assign({ value: "", disabled: true }, { children: "No Options" }), void 0)) }), void 0), !!helperText && showHelperText && (_jsx(FormHelperText, { children: showHelperText }, void 0))] }), void 0) }), void 0) }), void 0));
46
+ })) : (_jsx(MenuItem, __assign({ value: "", disabled: true }, { children: "No Options" }))) })), !!helperText && showHelperText && (_jsx(FormHelperText, { children: showHelperText }))] })) })) })));
47
47
  }
48
48
  export default MultipleSelector;
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- import { FormControlProps } from "@mui/material/FormControl";
3
1
  import { SimpleSelectorProps } from "./types";
4
- declare function SimpleSelector(props: SimpleSelectorProps & FormControlProps): JSX.Element;
2
+ declare function SimpleSelector(props: SimpleSelectorProps): JSX.Element;
5
3
  export default SimpleSelector;
@@ -34,7 +34,7 @@ function SimpleSelector(props) {
34
34
  var label = props.label, _a = props.variant, variant = _a === void 0 ? "outlined" : _a, value = props.value, tooltip = props.tooltip, _b = props.disabled, disabled = _b === void 0 ? false : _b, _c = props.required, required = _c === void 0 ? false : _c, _d = props.showHelperText, showHelperText = _d === void 0 ? false : _d, helperText = props.helperText, _e = props.options, options = _e === void 0 ? [] : _e, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onChange = props.onChange, rest = __rest(props, ["label", "variant", "value", "tooltip", "disabled", "required", "showHelperText", "helperText", "options", "primaryColor", "secondaryColor", "onChange"]);
35
35
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
36
36
  var _f = useInteractions(), tooltipOpen = _f.tooltipOpen, onOpenTooltip = _f.onOpenTooltip, onCloseTooltip = _f.onCloseTooltip;
37
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsxs(FormControl, __assign({ variant: variant, disabled: disabled, required: required }, rest, { children: [label && (_jsx(InputLabel, __assign({ id: "symply-simple-selector" }, { children: label }), void 0)), _jsx(Select, __assign({ value: value, required: required, disabled: disabled, onChange: function (event) {
37
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsxs(FormControl, __assign({ variant: variant, disabled: disabled, required: required }, rest, { children: [label && (_jsx(InputLabel, __assign({ id: "symply-simple-selector" }, { children: label }))), _jsx(Select, __assign({ value: value, required: required, disabled: disabled, onChange: function (event) {
38
38
  var _a;
39
39
  onChange((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value);
40
40
  }, inputProps: {
@@ -43,6 +43,6 @@ function SimpleSelector(props) {
43
43
  }, label: label }, { children: (options === null || options === void 0 ? void 0 : options.length) > 0 ? (options.map(function (option) {
44
44
  var label = option.label, value = option.value, disabled = option.disabled;
45
45
  return (_jsx(MenuItem, __assign({ value: value, disabled: disabled }, { children: label }), value));
46
- })) : (_jsx(MenuItem, __assign({ value: "", disabled: true }, { children: "No Options" }), void 0)) }), void 0), !!helperText && showHelperText && (_jsx(FormHelperText, { children: showHelperText }, void 0))] }), void 0) }), void 0) }), void 0));
46
+ })) : (_jsx(MenuItem, __assign({ value: "", disabled: true }, { children: "No Options" }))) })), !!helperText && showHelperText && (_jsx(FormHelperText, { children: showHelperText }))] })) })) })));
47
47
  }
48
48
  export default SimpleSelector;
@@ -1,6 +1,7 @@
1
1
  import { ReactNode, CSSProperties } from "react";
2
2
  import { SelectProps } from "@mui/material/Select";
3
- interface SelectorBaseProps {
3
+ import { FormControlProps } from "@mui/material/FormControl";
4
+ interface SelectorBaseProps extends Omit<FormControlProps, "onChange"> {
4
5
  label?: string;
5
6
  tooltip?: ReactNode;
6
7
  showHelperText?: boolean;
@@ -20,7 +20,7 @@ function HelpCaption(props) {
20
20
  var mainCaption = props.mainCaption, subCaption = props.subCaption, linkUrl = props.linkUrl, _a = props.linkText, linkText = _a === void 0 ? "Watch Demo" : _a, _b = props.linkType, linkType = _b === void 0 ? "WEBPAGE" : _b, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
21
21
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
22
22
  var _c = useInteractions(), videoModalOpen = _c.videoModalOpen, onOpenVideoModal = _c.onOpenVideoModal, onCloseVideoModal = _c.onCloseVideoModal;
23
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Grid, __assign({ container: true, spacing: 1, direction: subCaption ? "column" : "row" }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsx(Typography, __assign({ align: "left", component: "span" }, { children: mainCaption }), void 0) }), void 0), _jsxs(Grid, __assign({ item: true }, { children: [subCaption && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ align: "left", component: "span" }, { children: subCaption }), void 0), "\u00A0"] }, void 0)), linkUrl && (_jsx(Typography, __assign({ onClick: linkType === "WEBPAGE"
23
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Grid, __assign({ container: true, spacing: 1, direction: subCaption ? "column" : "row" }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsx(Typography, __assign({ align: "left", component: "span" }, { children: mainCaption })) })), _jsxs(Grid, __assign({ item: true }, { children: [subCaption && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ align: "left", component: "span" }, { children: subCaption })), "\u00A0"] })), linkUrl && (_jsx(Typography, __assign({ onClick: linkType === "WEBPAGE"
24
24
  ? function () {
25
25
  window.open(linkUrl);
26
26
  }
@@ -30,6 +30,6 @@ function HelpCaption(props) {
30
30
  color: theme.palette.primary.dark,
31
31
  textDecoration: "underline"
32
32
  }
33
- } }, { children: _jsx("b", { children: linkText }, void 0) }), void 0))] }), void 0), linkUrl && (_jsx(VideoPlayerModal, { open: videoModalOpen, url: linkUrl, onClose: onCloseVideoModal }, void 0))] }), void 0) }), void 0));
33
+ } }, { children: _jsx("b", { children: linkText }) })))] })), linkUrl && (_jsx(VideoPlayerModal, { open: videoModalOpen, url: linkUrl, onClose: onCloseVideoModal }))] })) })));
34
34
  }
35
35
  export default HelpCaption;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LoadingModalProps } from "./types";
3
2
  declare function LoadingModal(props: LoadingModalProps): JSX.Element;
4
3
  export default LoadingModal;
@@ -24,7 +24,7 @@ function LoadingModal(props) {
24
24
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Dialog, __assign({ maxWidth: "xs", open: open, sx: { backgroundColor: "#7A7A7A97" }, PaperProps: { sx: { backgroundColor: "#F2F2F2CF" } }, onClose: function (_, reason) {
25
25
  if (reason === "backdropClick")
26
26
  return;
27
- }, disableEscapeKeyDown: true }, { children: _jsx(DialogContent, { children: _jsxs(Grid, __assign({ container: true, direction: direction, justifyContent: "space-between", alignItems: "center", "data-testid": "loading-grid" }, { children: [_jsxs(Box, __assign({ position: "relative", display: "inline-flex", sx: { mt: 1.25 } }, { children: [_jsx(CircularProgress, { size: showProgess ? 56 : 40, value: percent, variant: showProgess ? "determinate" : "indeterminate" }, void 0), showProgess && percent >= 0 && (_jsx(Box, __assign({ top: 0, left: 0, bottom: 0, right: 0, position: "absolute", display: "flex", alignItems: "center", justifyContent: "center" }, { children: _jsxs(Typography, __assign({ variant: "caption" }, { children: [Math.round(percent), "%"] }), void 0) }), void 0))] }), void 0), _jsx(Typography, __assign({ variant: "subtitle1", component: "span", sx: { mt: 1 } }, { children: text }), void 0)] }), void 0) }, void 0) }), void 0) }), void 0));
27
+ }, disableEscapeKeyDown: true }, { children: _jsx(DialogContent, { children: _jsxs(Grid, __assign({ container: true, direction: direction, justifyContent: "space-between", alignItems: "center", "data-testid": "loading-grid" }, { children: [_jsxs(Box, __assign({ position: "relative", display: "inline-flex", sx: { mt: 1.25 } }, { children: [_jsx(CircularProgress, { size: showProgess ? 56 : 40, value: percent, variant: showProgess ? "determinate" : "indeterminate" }), showProgess && percent >= 0 && (_jsx(Box, __assign({ top: 0, left: 0, bottom: 0, right: 0, position: "absolute", display: "flex", alignItems: "center", justifyContent: "center" }, { children: _jsxs(Typography, __assign({ variant: "caption" }, { children: [Math.round(percent), "%"] })) })))] })), _jsx(Typography, __assign({ variant: "subtitle1", component: "span", sx: { mt: 1 } }, { children: text }))] })) }) })) })));
28
28
  }
29
29
  export default LoadingModal;
30
30
  export * from "./types";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuItemProps } from "@mui/material/MenuItem";
3
2
  import { ListItemIconProps } from "@mui/material/ListItemIcon";
4
3
  export interface ButtonItemProps {