@symply.io/basic-components 1.0.0-alpha.9 → 1.0.0-bata.7

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 (140) 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 +14 -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 +52 -0
  11. package/AutocompleteWithFilter/types.d.ts +15 -0
  12. package/AutocompleteWithFilter/types.js +1 -0
  13. package/BasicModal/Content.d.ts +0 -1
  14. package/BasicModal/Content.js +6 -6
  15. package/BasicModal/index.d.ts +0 -1
  16. package/BasicModal/index.js +3 -6
  17. package/BasicTable/TableBody.d.ts +4 -0
  18. package/BasicTable/TableBody.js +51 -0
  19. package/BasicTable/TableBodyRow.d.ts +3 -0
  20. package/BasicTable/TableBodyRow.js +42 -0
  21. package/BasicTable/TableFooter.d.ts +3 -0
  22. package/BasicTable/TableFooter.js +44 -0
  23. package/BasicTable/TableHeader.d.ts +3 -0
  24. package/BasicTable/TableHeader.js +47 -0
  25. package/BasicTable/index.d.ts +5 -0
  26. package/BasicTable/index.js +88 -0
  27. package/BasicTable/types.d.ts +70 -0
  28. package/BasicTable/types.js +1 -0
  29. package/BasicTable/useScroll.d.ts +9 -0
  30. package/BasicTable/useScroll.js +76 -0
  31. package/BasicTable/useTable.d.ts +38 -0
  32. package/BasicTable/useTable.js +94 -0
  33. package/BreadCrumbs/index.d.ts +4 -0
  34. package/BreadCrumbs/index.js +37 -0
  35. package/BreadCrumbs/types.d.ts +9 -0
  36. package/BreadCrumbs/types.js +1 -0
  37. package/CheckBox/CheckBox.d.ts +3 -0
  38. package/CheckBox/CheckBox.js +36 -0
  39. package/CheckBox/CheckBoxGroup.d.ts +3 -0
  40. package/CheckBox/CheckBoxGroup.js +30 -0
  41. package/CheckBox/index.d.ts +3 -0
  42. package/CheckBox/index.js +3 -0
  43. package/CheckBox/types.d.ts +12 -0
  44. package/CheckBox/types.js +1 -0
  45. package/Copyright/index.d.ts +4 -0
  46. package/Copyright/index.js +25 -0
  47. package/Copyright/types.d.ts +5 -0
  48. package/Copyright/types.js +1 -0
  49. package/DateInput/FullDateInput/index.d.ts +5 -0
  50. package/DateInput/FullDateInput/index.js +79 -0
  51. package/DateInput/FullDateInput/types.d.ts +9 -0
  52. package/DateInput/FullDateInput/types.js +1 -0
  53. package/DateInput/FullDateInput/useInteractions.d.ts +8 -0
  54. package/DateInput/FullDateInput/useInteractions.js +20 -0
  55. package/DateInput/MonthDayInput/index.d.ts +5 -0
  56. package/DateInput/MonthDayInput/index.js +65 -0
  57. package/DateInput/MonthDayInput/types.d.ts +9 -0
  58. package/DateInput/MonthDayInput/types.js +1 -0
  59. package/DateInput/MonthDayInput/useInteractions.d.ts +8 -0
  60. package/DateInput/MonthDayInput/useInteractions.js +19 -0
  61. package/DateInput/MonthYearInput/index.d.ts +5 -0
  62. package/DateInput/MonthYearInput/index.js +66 -0
  63. package/DateInput/MonthYearInput/types.d.ts +9 -0
  64. package/DateInput/MonthYearInput/types.js +1 -0
  65. package/DateInput/MonthYearInput/useInteractions.d.ts +8 -0
  66. package/DateInput/MonthYearInput/useInteractions.js +19 -0
  67. package/DateInput/index.d.ts +6 -0
  68. package/DateInput/index.js +6 -0
  69. package/DigitInput/index.d.ts +1 -4
  70. package/DigitInput/index.js +3 -3
  71. package/DigitInput/types.d.ts +2 -1
  72. package/DynamicHeaderBar/HeaderBar.js +1 -1
  73. package/DynamicHeaderBar/HeaderButtons.d.ts +0 -1
  74. package/DynamicHeaderBar/HeaderButtons.js +6 -6
  75. package/DynamicHeaderBar/HeaderLine.js +1 -1
  76. package/DynamicHeaderBar/index.js +2 -2
  77. package/DynamicHeaderBar/types.d.ts +3 -0
  78. package/FeinInput/index.d.ts +6 -0
  79. package/FeinInput/index.js +75 -0
  80. package/FeinInput/types.d.ts +9 -0
  81. package/FeinInput/types.js +1 -0
  82. package/FeinInput/useInteractions.d.ts +8 -0
  83. package/FeinInput/useInteractions.js +16 -0
  84. package/FormRadioGroup/index.d.ts +0 -1
  85. package/FormRadioGroup/index.js +3 -3
  86. package/FormSelector/MultipleSelector.d.ts +1 -3
  87. package/FormSelector/MultipleSelector.js +2 -2
  88. package/FormSelector/SimpleSelector.d.ts +1 -3
  89. package/FormSelector/SimpleSelector.js +2 -2
  90. package/FormSelector/types.d.ts +2 -1
  91. package/HelpCaption/index.js +2 -2
  92. package/LoadingModal/index.d.ts +0 -1
  93. package/LoadingModal/index.js +1 -1
  94. package/MenuButtonGroup/MenuItem.d.ts +0 -1
  95. package/MenuButtonGroup/MenuItem.js +1 -1
  96. package/MenuButtonGroup/index.js +2 -2
  97. package/NumberInput/index.d.ts +2 -3
  98. package/NumberInput/index.js +1 -1
  99. package/PasswordInput/ConfirmPassword.d.ts +2 -3
  100. package/PasswordInput/ConfirmPassword.js +1 -1
  101. package/PasswordInput/Password.d.ts +5 -5
  102. package/PasswordInput/Password.js +9 -8
  103. package/PhoneNumberInput/index.d.ts +4 -3
  104. package/PhoneNumberInput/index.js +15 -4
  105. package/README.md +428 -3
  106. package/Sidebar/SidebarItem.d.ts +3 -0
  107. package/Sidebar/SidebarItem.js +62 -0
  108. package/Sidebar/SidebarItemsGroup.d.ts +5 -0
  109. package/Sidebar/SidebarItemsGroup.js +38 -0
  110. package/Sidebar/SidebarLink.d.ts +3 -0
  111. package/Sidebar/SidebarLink.js +37 -0
  112. package/Sidebar/index.d.ts +7 -0
  113. package/Sidebar/index.js +30 -0
  114. package/Sidebar/types.d.ts +31 -0
  115. package/Sidebar/types.js +1 -0
  116. package/SocialInput/index.d.ts +6 -0
  117. package/SocialInput/index.js +77 -0
  118. package/SocialInput/types.d.ts +9 -0
  119. package/SocialInput/types.js +1 -0
  120. package/SocialInput/useInteractions.d.ts +10 -0
  121. package/SocialInput/useInteractions.js +26 -0
  122. package/TabGroup/index.js +10 -5
  123. package/TablePagination/Actions.d.ts +3 -0
  124. package/TablePagination/Actions.js +27 -0
  125. package/TablePagination/index.d.ts +4 -0
  126. package/TablePagination/index.js +30 -0
  127. package/TablePagination/types.d.ts +14 -0
  128. package/TablePagination/types.js +1 -0
  129. package/TablePagination/useInteractions.d.ts +14 -0
  130. package/TablePagination/useInteractions.js +23 -0
  131. package/TextInput/index.d.ts +2 -3
  132. package/TextInput/index.js +13 -3
  133. package/ToastPrompt/Presentation.js +3 -3
  134. package/ToastPrompt/index.js +1 -1
  135. package/VideoPlayerModal/index.d.ts +1 -3
  136. package/VideoPlayerModal/index.js +2 -2
  137. package/VideoPlayerModal/types.d.ts +2 -1
  138. package/index.d.ts +20 -0
  139. package/index.js +20 -0
  140. package/package.json +8 -2
@@ -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 onValidateMonthYear(monthYearString: string): boolean;
4
+ declare function MonthYearInput(props: DateInputprops): JSX.Element;
5
+ export default MonthYearInput;
@@ -0,0 +1,66 @@
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 TextField from "@mui/material/TextField";
26
+ import ThemeProvider from "@mui/material/styles/ThemeProvider";
27
+ import useInteractions from "./useInteractions";
28
+ import useCustomTheme from "../../useCustomTheme";
29
+ export function MonthYearFormat(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 onValidateMonthYear(monthYearString) {
42
+ var reg = /^(((0[1-9]{1})|(1[0-2]{1}))\s?\/\s?([1-2]{1}\d{3}))$/g;
43
+ reg.lastIndex = 0;
44
+ return reg.test(monthYearString);
45
+ }
46
+ function MonthYearInput(props) {
47
+ var onChange = props.onChange, 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, onValidate = props.onValidate, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["onChange", "value", "margin", "error", "helperText", "onValidate", "primaryColor", "secondaryColor"]);
48
+ var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
49
+ var _c = useInteractions({ value: value }), valLength = _c.valLength, addMask = _c.addMask;
50
+ var rifm = useRifm({
51
+ mask: true,
52
+ value: String(value),
53
+ onChange: onChange,
54
+ replace: addMask,
55
+ format: MonthYearFormat
56
+ });
57
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ placeholder: "MM / YYYY", error: error ||
58
+ (valLength > 0 &&
59
+ (onValidate ? !onValidate(value) : !onValidateMonthYear(value))), margin: margin, value: rifm.value, onChange: rifm.onChange, helperText: valLength > 0 &&
60
+ (onValidate ? !onValidate(value) : !onValidateMonthYear(value))
61
+ ? helperText
62
+ : "", InputLabelProps: {
63
+ shrink: true
64
+ } }, rest)) })));
65
+ }
66
+ export default MonthYearInput;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from "react";
2
+ import { TextFieldProps } from "@mui/material/TextField";
3
+ export interface DateInputprops extends Omit<TextFieldProps, "onChange"> {
4
+ onChange: (value: string) => void;
5
+ onValidate?: (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,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
- 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));
32
+ var title = button.title, onClick = button.onClick, color = button.color, _b = button.size, size = _b === void 0 ? "medium" : _b, icon = button.icon, disabled = button.disabled, variant = button.variant;
33
+ return (_jsx(Grid, __assign({ item: true, style: { textAlign: "end" } }, { children: _jsx(Fab, __assign({ onClick: onClick, color: color, title: title, size: isLessThanSm ? "small" : size, disabled: disabled, variant: variant }, { 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);
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from "react";
2
2
  import { ButtonProps } from "@mui/material/Button";
3
3
  import { IconButtonProps } from "@mui/material/IconButton";
4
+ import { FabProps } from "@mui/material/Fab";
4
5
  import { MenuButtonGroupProps } from "../MenuButtonGroup";
5
6
  export declare enum HeaderButtonCategory {
6
7
  IconButton = "icon",
@@ -21,7 +22,9 @@ interface HeaderTextButtonProps {
21
22
  interface HeaderIconButtonProps {
22
23
  title: string;
23
24
  icon: ReactElement;
25
+ disabled?: boolean;
24
26
  type: HeaderButtonCategory.IconButton;
27
+ variant?: FabProps["variant"];
25
28
  color?: IconButtonProps["color"];
26
29
  size?: IconButtonProps["size"];
27
30
  onClick: IconButtonProps["onClick"];
@@ -0,0 +1,6 @@
1
+ import { FeinInputProps } from "./types";
2
+ export declare function FeinInputFormat(str: string): string;
3
+ export declare function onValidateFein(feinString: string): boolean;
4
+ declare function FeinInput(props: FeinInputProps): JSX.Element;
5
+ export default FeinInput;
6
+ export * from "./types";
@@ -0,0 +1,75 @@
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 onValidateFein(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, onBlur = props.onBlur, onFocus = props.onFocus, onChange = props.onChange, onValidate = props.onValidate, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["value", "error", "helperText", "onBlur", "onFocus", "onChange", "onValidate", "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 &&
58
+ (onValidate ? !onValidate(value) : !onValidateFein(value))), helperText: valLength > 0 &&
59
+ (onValidate ? !onValidate(value) : !onValidateFein(value))
60
+ ? helperText
61
+ : "", onFocus: function (event) {
62
+ if (onFocus) {
63
+ onFocus(event);
64
+ }
65
+ }, onBlur: function (event) {
66
+ onChange(value.trim());
67
+ if (onBlur) {
68
+ onBlur(event);
69
+ }
70
+ }, InputLabelProps: {
71
+ shrink: true
72
+ } }, rest)) })));
73
+ }
74
+ export default FeinInput;
75
+ 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
+ onValidate?: (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 {
@@ -18,6 +18,6 @@ import useCustomTheme from "../useCustomTheme";
18
18
  function ButtonMenuItem(props) {
19
19
  var buttonText = props.buttonText, buttonIcon = props.buttonIcon, _a = props.disabled, disabled = _a === void 0 ? false : _a, onClick = props.onClick;
20
20
  var theme = useCustomTheme();
21
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(MenuItem, __assign({ onClick: onClick, disabled: disabled }, { children: [buttonIcon && _jsx(ListItemIcon, { children: buttonIcon }, void 0), _jsx(ListItemText, { primary: buttonText }, void 0)] }), void 0) }), void 0));
21
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(MenuItem, __assign({ onClick: onClick, disabled: disabled }, { children: [buttonIcon && _jsx(ListItemIcon, { children: buttonIcon }), _jsx(ListItemText, { primary: buttonText })] })) })));
22
22
  }
23
23
  export default ButtonMenuItem;
@@ -75,7 +75,7 @@ function MenuButtonGroup(props) {
75
75
  var onClose = function () {
76
76
  setAnchorEl(null);
77
77
  };
78
- return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Button, __assign({ "aria-controls": "customized-menu", "data-nw": "download-button", "aria-haspopup": "true", variant: variant, color: color, onClick: onClick, fullWidth: true, size: size, endIcon: _jsx(ArrowDropDownIcon, { fontSize: "small" }, void 0), disabled: disabled }, { children: buttonText }), void 0), _jsx(Menu, __assign({ id: "button-menu", anchorEl: anchorEl, keepMounted: true, elevation: 2, anchorOrigin: {
78
+ return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Button, __assign({ "aria-controls": "customized-menu", "data-nw": "download-button", "aria-haspopup": "true", variant: variant, color: color, onClick: onClick, fullWidth: true, size: size, endIcon: _jsx(ArrowDropDownIcon, { fontSize: "small" }), disabled: disabled }, { children: buttonText })), _jsx(Menu, __assign({ id: "button-menu", anchorEl: anchorEl, keepMounted: true, elevation: 2, anchorOrigin: {
79
79
  vertical: "bottom",
80
80
  horizontal: "center"
81
81
  }, transformOrigin: {
@@ -98,6 +98,6 @@ function MenuButtonGroup(props) {
98
98
  }
99
99
  });
100
100
  }); } }), buttonText));
101
- }) }), void 0)] }), void 0));
101
+ }) }))] })));
102
102
  }
103
103
  export default MenuButtonGroup;
@@ -1,7 +1,6 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { TextFieldProps } from "@mui/material/TextField";
3
- declare type TextProps = Omit<TextFieldProps, "onChange">;
4
- export interface NumberInputProps {
3
+ export interface NumberInputProps extends Omit<TextFieldProps, "onChange"> {
5
4
  onChange: (value: string) => void;
6
5
  value: string;
7
6
  integerOnly?: boolean;
@@ -11,5 +10,5 @@ export interface NumberInputProps {
11
10
  primaryColor?: CSSProperties["color"];
12
11
  secondaryColor?: CSSProperties["color"];
13
12
  }
14
- declare function NumberInput(props: NumberInputProps & TextProps): JSX.Element;
13
+ declare function NumberInput(props: NumberInputProps): JSX.Element;
15
14
  export default NumberInput;