@symply.io/basic-components 1.0.0-alpha.8 → 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 +0 -1
  70. package/FormSelector/MultipleSelector.js +14 -3
  71. package/FormSelector/SimpleSelector.d.ts +0 -1
  72. package/FormSelector/SimpleSelector.js +3 -3
  73. package/FormSelector/types.d.ts +2 -7
  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 +380 -14
  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
@@ -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;
@@ -36,6 +36,6 @@ function NumberInput(props) {
36
36
  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: function () {
37
37
  onCloseTooltip();
38
38
  handleBlur();
39
- }, onChange: handleChange, error: error || exceedError, helperText: helperText || (exceedError ? EXCEED_ERROR : "") }, rest), void 0) }), void 0) }), void 0));
39
+ }, onChange: handleChange, error: error || exceedError, helperText: helperText || (exceedError ? EXCEED_ERROR : "") }, rest)) })) })));
40
40
  }
41
41
  export default NumberInput;
@@ -1,12 +1,11 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { TextFieldProps } from "@mui/material/TextField";
3
- declare type TextInputProps = Omit<TextFieldProps, "onChange">;
4
- export interface ConfirmPasswordProps {
3
+ export interface ConfirmPasswordProps extends Omit<TextFieldProps, "onChange"> {
5
4
  password: string;
6
5
  value: string;
7
6
  primaryColor?: CSSProperties["color"];
8
7
  secondaryColor?: CSSProperties["color"];
9
8
  onChange: (value: string) => void;
10
9
  }
11
- declare function ConfirmPassword(props: ConfirmPasswordProps & TextInputProps): JSX.Element;
10
+ declare function ConfirmPassword(props: ConfirmPasswordProps): JSX.Element;
12
11
  export default ConfirmPassword;
@@ -36,6 +36,6 @@ function ConfirmPassword(props) {
36
36
  }, [value, password]);
37
37
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ error: !isMatched, label: label, value: value, variant: variant, margin: margin, disabled: disabled, type: "password", size: "small", helperText: !isMatched && helperText, onChange: function (event) {
38
38
  onChange(event.target.value);
39
- }, fullWidth: true, required: true }, rest), void 0) }), void 0));
39
+ }, fullWidth: true, required: true }, rest)) })));
40
40
  }
41
41
  export default ConfirmPassword;
@@ -1,14 +1,13 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { TextFieldProps } from "@mui/material/TextField";
3
- declare type TextInputProps = Omit<TextFieldProps, "onChange">;
4
3
  export interface PasswordStrategyProps {
5
4
  [key: string]: {
6
5
  label: string;
7
6
  regex: RegExp;
8
7
  };
9
8
  }
10
- export interface PasswordProps {
11
- strategies: PasswordStrategyProps;
9
+ export interface PasswordProps extends Omit<TextFieldProps, "onChange"> {
10
+ strategies?: PasswordStrategyProps;
12
11
  value: string;
13
12
  successColor?: CSSProperties["color"];
14
13
  primaryColor?: CSSProperties["color"];
@@ -16,5 +15,5 @@ export interface PasswordProps {
16
15
  onChange: (value: string) => void;
17
16
  onVerify?: (value: string) => boolean;
18
17
  }
19
- declare function Password(props: PasswordProps & TextInputProps): JSX.Element;
18
+ declare function Password(props: PasswordProps): JSX.Element;
20
19
  export default Password;
@@ -67,10 +67,10 @@ function Password(props) {
67
67
  return (_jsx(_Fragment, { children: Object.keys(strategies).map(function (key) {
68
68
  var label = strategies[key].label;
69
69
  return (_jsx(Typography, __assign({ component: "li", variant: "caption", style: { color: helperTextColor[key] } }, { children: label }), key));
70
- }) }, void 0));
70
+ }) }));
71
71
  }, [helperTextColor, strategies]);
72
72
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ error: !isValidPassword || error, helperText: helperText, type: "password", label: "Password", size: "small", margin: "dense", value: value, onChange: function (event) {
73
73
  onChange(event.target.value);
74
- }, fullWidth: true, required: true }, rest), void 0) }), void 0));
74
+ }, fullWidth: true, required: true }, rest)) })));
75
75
  }
76
76
  export default Password;
@@ -1,8 +1,7 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { InputProps } from "@mui/material/Input";
3
3
  import { TextFieldProps } from "@mui/material/TextField";
4
- declare type TextInputProps = Omit<TextFieldProps, "onChange">;
5
- export interface PhoneInputProps {
4
+ export interface PhoneInputProps extends Omit<TextFieldProps, "onChange"> {
6
5
  value: string;
7
6
  endAdornment?: InputProps["endAdornment"];
8
7
  primaryColor?: CSSProperties["color"];
@@ -10,5 +9,5 @@ export interface PhoneInputProps {
10
9
  onChange: (val: string) => void;
11
10
  }
12
11
  export declare function phoneFormat(str: string): string;
13
- declare function PhoneInput(props: TextInputProps & PhoneInputProps): JSX.Element;
12
+ declare function PhoneInput(props: PhoneInputProps): JSX.Element;
14
13
  export default PhoneInput;
@@ -55,8 +55,8 @@ function PhoneInput(props) {
55
55
  format: phoneFormat
56
56
  });
57
57
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ value: rifm.value, InputProps: {
58
- startAdornment: (_jsx(InputAdornment, __assign({ position: "start" }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: "+1" }), void 0) }), void 0)),
58
+ startAdornment: (_jsx(InputAdornment, __assign({ position: "start" }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: "+1" })) }))),
59
59
  endAdornment: endAdornment
60
- }, onChange: rifm.onChange }, rest), void 0) }), void 0));
60
+ }, onChange: rifm.onChange }, rest)) })));
61
61
  }
62
62
  export default PhoneInput;