@symply.io/basic-components 1.0.0-alpha.16 → 1.0.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Autocomplete/index.d.ts +1 -3
- package/Autocomplete/index.js +1 -1
- package/Autocomplete/types.d.ts +2 -1
- package/AutocompleteWithFilter/index.d.ts +1 -3
- package/AutocompleteWithFilter/types.d.ts +2 -1
- package/CheckBox/CheckBox.d.ts +3 -0
- package/CheckBox/CheckBox.js +36 -0
- package/CheckBox/CheckBoxGroup.d.ts +3 -0
- package/CheckBox/CheckBoxGroup.js +30 -0
- package/CheckBox/index.d.ts +3 -0
- package/CheckBox/index.js +3 -0
- package/CheckBox/types.d.ts +12 -0
- package/CheckBox/types.js +1 -0
- package/DigitInput/index.d.ts +1 -3
- package/DigitInput/types.d.ts +2 -1
- package/FeinInput/index.d.ts +6 -0
- package/FeinInput/index.js +73 -0
- package/FeinInput/types.d.ts +9 -0
- package/FeinInput/types.js +1 -0
- package/FeinInput/useInteractions.d.ts +8 -0
- package/FeinInput/useInteractions.js +16 -0
- package/FormSelector/MultipleSelector.d.ts +1 -2
- package/FormSelector/SimpleSelector.d.ts +1 -2
- package/FormSelector/types.d.ts +2 -1
- package/NumberInput/index.d.ts +2 -3
- package/PasswordInput/ConfirmPassword.d.ts +2 -3
- package/PasswordInput/Password.d.ts +2 -3
- package/PhoneNumberInput/index.d.ts +2 -3
- package/README.md +73 -1
- package/TextInput/index.d.ts +2 -3
- package/VideoPlayerModal/index.d.ts +1 -2
- package/VideoPlayerModal/types.d.ts +2 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +1 -1
package/Autocomplete/index.d.ts
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
import { TextFieldProps } from "@mui/material/TextField";
|
2
1
|
import { CustomAutocompleteProps } from "./types";
|
3
|
-
declare
|
4
|
-
declare function CustomAutocomplete(props: CustomAutocompleteProps & textFieldProps): JSX.Element;
|
2
|
+
declare function CustomAutocomplete(props: CustomAutocompleteProps): JSX.Element;
|
5
3
|
export default CustomAutocomplete;
|
6
4
|
export * from "./types";
|
package/Autocomplete/index.js
CHANGED
@@ -32,7 +32,7 @@ function CustomAutocomplete(props) {
|
|
32
32
|
var _a = useInteractions(), inputValue = _a.inputValue, onInputChange = _a.onInputChange;
|
33
33
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Autocomplete, { size: size, fullWidth: true, options: options, multiple: multiple, onChange: function (_, value) {
|
34
34
|
onChange(value);
|
35
|
-
}, inputValue: inputValue, onInputChange: onInputChange, renderInput: function (params) { return
|
35
|
+
}, inputValue: inputValue, onInputChange: onInputChange, renderInput: function (params) { return _jsx(TextField, __assign({}, params, rest, { size: size })); } }) })));
|
36
36
|
}
|
37
37
|
export default CustomAutocomplete;
|
38
38
|
export * from "./types";
|
package/Autocomplete/types.d.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
|
+
import { TextFieldProps } from "@mui/material/TextField";
|
2
3
|
export interface IAutocompleteOption {
|
3
4
|
label: string;
|
4
5
|
[name: string]: unknown;
|
5
6
|
}
|
6
7
|
export declare type AutocompleteOptionType = IAutocompleteOption | string;
|
7
|
-
export interface CustomAutocompleteProps {
|
8
|
+
export interface CustomAutocompleteProps extends Omit<TextFieldProps, "onChange"> {
|
8
9
|
multiple?: boolean;
|
9
10
|
options: Array<AutocompleteOptionType>;
|
10
11
|
value: Array<AutocompleteOptionType> | AutocompleteOptionType | null;
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { TextFieldProps } from "@mui/material/TextField";
|
2
1
|
import { AutoCompleteWithFilterProps } from "./types";
|
3
|
-
declare
|
4
|
-
declare function AutocompleteWithFilter(props: AutoCompleteWithFilterProps & textFieldProps): JSX.Element;
|
2
|
+
declare function AutocompleteWithFilter(props: AutoCompleteWithFilterProps): JSX.Element;
|
5
3
|
export default AutocompleteWithFilter;
|
6
4
|
export * from "./types";
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
|
+
import { TextFieldProps } from "@mui/material/TextField";
|
2
3
|
export interface IAutoCompleteWithFilterOption {
|
3
4
|
label: string;
|
4
5
|
[name: string]: unknown;
|
5
6
|
}
|
6
7
|
export declare type AutoCompleteWithFilterOptionType = IAutoCompleteWithFilterOption | string;
|
7
|
-
export interface AutoCompleteWithFilterProps {
|
8
|
+
export interface AutoCompleteWithFilterProps extends Omit<TextFieldProps, "onChange"> {
|
8
9
|
multiple?: boolean;
|
9
10
|
value: Array<AutoCompleteWithFilterOptionType> | AutoCompleteWithFilterOptionType | null;
|
10
11
|
options: Array<AutoCompleteWithFilterOptionType>;
|
@@ -0,0 +1,36 @@
|
|
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 Checkbox from "@mui/material/Checkbox";
|
25
|
+
import FormControlLabel from "@mui/material/FormControlLabel";
|
26
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
27
|
+
import useCustomTheme from "../useCustomTheme";
|
28
|
+
export function CheckBox(props) {
|
29
|
+
var label = props.label, onChange = props.onChange, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["label", "onChange", "primaryColor", "secondaryColor"]);
|
30
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
31
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(FormControlLabel, { control: _jsx(Checkbox, __assign({ onChange: function (event) {
|
32
|
+
event.stopPropagation();
|
33
|
+
onChange(event.target.checked);
|
34
|
+
} }, rest)), label: label }) })));
|
35
|
+
}
|
36
|
+
export default CheckBox;
|
@@ -0,0 +1,30 @@
|
|
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 FormGroup from "@mui/material/FormGroup";
|
25
|
+
import CheckBox from "./CheckBox";
|
26
|
+
export function CheckBoxGroup(props) {
|
27
|
+
var checkboxes = props.checkboxes, rest = __rest(props, ["checkboxes"]);
|
28
|
+
return (_jsx(FormGroup, __assign({}, rest, { children: checkboxes.map(function (checkbox, index) { return (_jsx(CheckBox, __assign({}, checkbox), index)); }) })));
|
29
|
+
}
|
30
|
+
export default CheckBoxGroup;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { CSSProperties } from "react";
|
2
|
+
import { CheckboxProps } from "@mui/material/Checkbox";
|
3
|
+
import { FormGroupProps } from "@mui/material/FormGroup";
|
4
|
+
export interface CheckBoxProps extends Omit<CheckboxProps, "onChange"> {
|
5
|
+
label: string;
|
6
|
+
onChange: (val: boolean) => void;
|
7
|
+
primaryColor?: CSSProperties["color"];
|
8
|
+
secondaryColor?: CSSProperties["color"];
|
9
|
+
}
|
10
|
+
export interface CheckBoxGroupProps extends FormGroupProps {
|
11
|
+
checkboxes: Array<CheckBoxProps>;
|
12
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/DigitInput/index.d.ts
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
import { TextFieldProps } from "@mui/material/TextField";
|
2
1
|
import { DigitInputProps } from "./types";
|
3
|
-
declare
|
4
|
-
declare function DigitInput(props: DigitInputProps & TextProps): JSX.Element;
|
2
|
+
declare function DigitInput(props: DigitInputProps): JSX.Element;
|
5
3
|
export default DigitInput;
|
6
4
|
export * from "./types";
|
package/DigitInput/types.d.ts
CHANGED
@@ -1,6 +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
|
+
export interface DigitInputProps extends Omit<TextFieldProps, "onChange"> {
|
4
5
|
onChange: (value: string) => void;
|
5
6
|
value: string;
|
6
7
|
tooltip?: string;
|
@@ -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,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
|
-
import { FormControlProps } from "@mui/material/FormControl";
|
2
1
|
import { MultipleSelectorProps } from "./types";
|
3
|
-
declare function MultipleSelector(props: MultipleSelectorProps
|
2
|
+
declare function MultipleSelector(props: MultipleSelectorProps): JSX.Element;
|
4
3
|
export default MultipleSelector;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { FormControlProps } from "@mui/material/FormControl";
|
2
1
|
import { SimpleSelectorProps } from "./types";
|
3
|
-
declare function SimpleSelector(props: SimpleSelectorProps
|
2
|
+
declare function SimpleSelector(props: SimpleSelectorProps): JSX.Element;
|
4
3
|
export default SimpleSelector;
|
package/FormSelector/types.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ReactNode, CSSProperties } from "react";
|
2
2
|
import { SelectProps } from "@mui/material/Select";
|
3
|
-
|
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;
|
package/NumberInput/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
import { TextFieldProps } from "@mui/material/TextField";
|
3
|
-
|
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
|
13
|
+
declare function NumberInput(props: NumberInputProps): JSX.Element;
|
15
14
|
export default NumberInput;
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
import { TextFieldProps } from "@mui/material/TextField";
|
3
|
-
|
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
|
10
|
+
declare function ConfirmPassword(props: ConfirmPasswordProps): JSX.Element;
|
12
11
|
export default ConfirmPassword;
|
@@ -1,13 +1,12 @@
|
|
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 {
|
9
|
+
export interface PasswordProps extends Omit<TextFieldProps, "onChange"> {
|
11
10
|
strategies: PasswordStrategyProps;
|
12
11
|
value: string;
|
13
12
|
successColor?: 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
|
18
|
+
declare function Password(props: PasswordProps): JSX.Element;
|
20
19
|
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
|
-
|
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:
|
12
|
+
declare function PhoneInput(props: PhoneInputProps): JSX.Element;
|
14
13
|
export default PhoneInput;
|
package/README.md
CHANGED
@@ -16,6 +16,8 @@
|
|
16
16
|
- [AutocompleteWithFilter](#autocompletewithfilter)
|
17
17
|
- [BasicModal](#basicmodal)
|
18
18
|
- [BreadCrumbs](#breadcrumbs)
|
19
|
+
- [CheckBox](#checkbox)
|
20
|
+
- [CheckBoxGroup](#checkboxgroup)
|
19
21
|
- [Copyright](#copyright)
|
20
22
|
- [DigitInput](#digitinput)
|
21
23
|
- [FormRadioGroup](#formradiogroup)
|
@@ -27,6 +29,7 @@
|
|
27
29
|
- [PasswordInput](#passwordinput)
|
28
30
|
- [PhoneNumberInput](#phonenumberinput)
|
29
31
|
- [TabGroup](#tabgroup)
|
32
|
+
- [TablePagination](#tablepagination)
|
30
33
|
- [TextInput](#textinput)
|
31
34
|
- [ToastPrompt](#toastprompt)
|
32
35
|
- [VideoPlayerModal](#videoplayermodal)
|
@@ -211,6 +214,51 @@ import BreadCrumbs from '@symply.io/basic-components/BreadCrumbs';
|
|
211
214
|
|
212
215
|
|
213
216
|
|
217
|
+
<h3>CheckBox</h3>
|
218
|
+
|
219
|
+
Checkboxes allow the user to select one or more items from a set.
|
220
|
+
|
221
|
+
It is extended from `@mui/material/Checkbox`, so it includes all properties of `@mui/material/Checkbox`.
|
222
|
+
|
223
|
+
<h5>Import</h5>
|
224
|
+
|
225
|
+
```typescript
|
226
|
+
import { CheckBox } from '@symply.io/basic-components/';
|
227
|
+
// or
|
228
|
+
import { CheckBox } from '@symply.io/basic-components/CheckBox';
|
229
|
+
```
|
230
|
+
|
231
|
+
<h5>Props</h5>
|
232
|
+
|
233
|
+
| Name | Type | Default | Required | Description |
|
234
|
+
| -------- | ------ | ------- | -------- | ------------------------------------------------------------ |
|
235
|
+
| label | string | | true | The label of the checkbox. |
|
236
|
+
| onChange | func | | true | Callback fired when the `checkbox` value is changed.<br />**Signature:**<br/>`function(value: boolean) => void`<br/>*value:* The value of the `checkbox` element. |
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<h3>CheckBoxGroup</h3>
|
241
|
+
|
242
|
+
Checkboxes allow the user to select one or more items from a set for a group.
|
243
|
+
|
244
|
+
It is extended from `@mui/material/FormGroup`, so it includes all properties of `@mui/material/FormGroup`.
|
245
|
+
|
246
|
+
<h5>Import</h5>
|
247
|
+
|
248
|
+
```typescript
|
249
|
+
import { CheckBoxGroup } from '@symply.io/basic-components/';
|
250
|
+
// or
|
251
|
+
import { CheckBoxGroup } from '@symply.io/basic-components/CheckBox';
|
252
|
+
```
|
253
|
+
|
254
|
+
<h5>Props</h5>
|
255
|
+
|
256
|
+
| Name | Type | Default | Required | Description |
|
257
|
+
| ---------- | ---------------------- | ------- | -------- | ------------------------------------------------------------ |
|
258
|
+
| Checkboxes | Array\<CheckBoxProps\> | | true | The array of checkboxes.<br />See the property of [CheckBox](#checkbox) |
|
259
|
+
|
260
|
+
|
261
|
+
|
214
262
|
<h3>Copyright</h3>
|
215
263
|
|
216
264
|
A common component for rendering the copyright
|
@@ -252,6 +300,30 @@ import DigitInput from '@symply.io/basic-components/DigitInput';
|
|
252
300
|
|
253
301
|
|
254
302
|
|
303
|
+
<h3>FeinInput</h3>
|
304
|
+
|
305
|
+
Input component for FEIN.
|
306
|
+
|
307
|
+
It is extended from `@mui/material/TextField`, so it includes all properties of `@mui/material/TextField`.
|
308
|
+
|
309
|
+
<h5>Import</h5>
|
310
|
+
|
311
|
+
```typescript
|
312
|
+
import { FeinInput } from '@symply.io/basic-components/';
|
313
|
+
// or
|
314
|
+
import FeinInput from '@symply.io/basic-components/FeinInput';
|
315
|
+
```
|
316
|
+
|
317
|
+
<h5>Props</h5>
|
318
|
+
|
319
|
+
| Name | Type | Default | Required | Description |
|
320
|
+
| -------- | ------ | ------- | -------- | ------------------------------------------------------------ |
|
321
|
+
| onChange | func | | true | Callback fired when the `Input` value is changed.<br />**Signature:**<br/>`function(value: string) => void`<br/>*value:* The value of the `Input` element. |
|
322
|
+
| value | string | | true | The value of the `Input` element. |
|
323
|
+
| verifyFn | func | | false | Customized verification function. |
|
324
|
+
|
325
|
+
|
326
|
+
|
255
327
|
<h3>FormRadioGroup</h3>
|
256
328
|
|
257
329
|
Radio Group allow the user to select one option from a set.
|
@@ -279,7 +351,7 @@ import FormRadioGroup from '@symply.io/basic-components/FormRadioGroup';
|
|
279
351
|
| color | 'primary' \| 'secondary' \| 'success' \| 'error' \| 'info' \| 'warning' | 'primary' | false | The main color of the component. |
|
280
352
|
| disabled | bool | false | false | If `true`, the component is disabled. |
|
281
353
|
| formLabel | string | | false | The label of the `Radio` element. |
|
282
|
-
| onChange | func | | true | Callback fired when the `Radio` value is changed.<br />**Signature:**<br/>`function(value: string) => void`<br/>*value:* The value of the `Radio` element. |
|
354
|
+
| onChange | func | | true | Callback fired when the `Radio` value is changed.<br />**Signature:**<br/>`function(value: string|number|boolean) => void`<br/>*value:* The value of the `Radio` element. |
|
283
355
|
| options | Array\<IRadioOption\> | | true | The radio options. See the **Radio Option Props** above. |
|
284
356
|
| value | string \| number \| bool | | true | The value of the `Radio` element. |
|
285
357
|
| tooltip | string | | false | A tooltip for the `Radio` element. |
|
package/TextInput/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
import { TextFieldProps } from "@mui/material/TextField";
|
3
|
-
|
4
|
-
export interface TextInputProps {
|
3
|
+
export interface TextInputProps extends Omit<TextFieldProps, "onChange"> {
|
5
4
|
onChange: (value: string) => void;
|
6
5
|
value: string;
|
7
6
|
tooltip?: TextFieldProps;
|
@@ -10,5 +9,5 @@ export interface TextInputProps {
|
|
10
9
|
primaryColor?: CSSProperties["color"];
|
11
10
|
secondaryColor?: CSSProperties["color"];
|
12
11
|
}
|
13
|
-
declare const TextInput: (props: TextInputProps
|
12
|
+
declare const TextInput: (props: TextInputProps) => JSX.Element;
|
14
13
|
export default TextInput;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { ReactPlayerProps } from "react-player";
|
2
1
|
import { VideoPlayerModalProps } from "./types";
|
3
|
-
declare function VideoPlayerModal(props: VideoPlayerModalProps
|
2
|
+
declare function VideoPlayerModal(props: VideoPlayerModalProps): JSX.Element;
|
4
3
|
export default VideoPlayerModal;
|
5
4
|
export * from "./types";
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
import { ButtonProps } from "@mui/material/Button";
|
3
|
-
|
3
|
+
import { ReactPlayerProps } from "react-player";
|
4
|
+
export interface VideoPlayerModalProps extends ReactPlayerProps {
|
4
5
|
title?: string;
|
5
6
|
open: boolean;
|
6
7
|
pip?: boolean;
|
package/index.d.ts
CHANGED
@@ -3,9 +3,11 @@ export * from "./Autocomplete";
|
|
3
3
|
export * from "./AutocompleteWithFilter";
|
4
4
|
export * from "./BasicModal";
|
5
5
|
export * from "./BreadCrumbs";
|
6
|
+
export * from "./CheckBox";
|
6
7
|
export * from "./Copyright";
|
7
8
|
export * from "./DigitInput";
|
8
9
|
export * from "./DynamicHeaderBar";
|
10
|
+
export * from "./FeinInput";
|
9
11
|
export * from "./FormRadioGroup";
|
10
12
|
export * from "./FormSelector";
|
11
13
|
export * from "./HelpCaption";
|
@@ -27,6 +29,7 @@ export { default as BreadCrumbs } from "./BreadCrumbs";
|
|
27
29
|
export { default as Copyright } from "./Copyright";
|
28
30
|
export { default as DigitInput } from "./DigitInput";
|
29
31
|
export { default as DynamicHeaderBar } from "./DynamicHeaderBar";
|
32
|
+
export { default as FeinInput } from "./FeinInput";
|
30
33
|
export { default as FormRadioGroup } from "./FormRadioGroup";
|
31
34
|
export { default as HelpCaption } from "./HelpCaption";
|
32
35
|
export { default as LoadingModal } from "./LoadingModal";
|
package/index.js
CHANGED
@@ -3,9 +3,11 @@ export * from "./Autocomplete";
|
|
3
3
|
export * from "./AutocompleteWithFilter";
|
4
4
|
export * from "./BasicModal";
|
5
5
|
export * from "./BreadCrumbs";
|
6
|
+
export * from "./CheckBox";
|
6
7
|
export * from "./Copyright";
|
7
8
|
export * from "./DigitInput";
|
8
9
|
export * from "./DynamicHeaderBar";
|
10
|
+
export * from "./FeinInput";
|
9
11
|
export * from "./FormRadioGroup";
|
10
12
|
export * from "./FormSelector";
|
11
13
|
export * from "./HelpCaption";
|
@@ -27,6 +29,7 @@ export { default as BreadCrumbs } from "./BreadCrumbs";
|
|
27
29
|
export { default as Copyright } from "./Copyright";
|
28
30
|
export { default as DigitInput } from "./DigitInput";
|
29
31
|
export { default as DynamicHeaderBar } from "./DynamicHeaderBar";
|
32
|
+
export { default as FeinInput } from "./FeinInput";
|
30
33
|
export { default as FormRadioGroup } from "./FormRadioGroup";
|
31
34
|
export { default as HelpCaption } from "./HelpCaption";
|
32
35
|
export { default as LoadingModal } from "./LoadingModal";
|