@symply.io/basic-components 1.0.0-alpha.9 → 1.0.0-beta.2
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/AlertDialog/index.d.ts +0 -1
- package/AlertDialog/index.js +2 -2
- package/Autocomplete/index.d.ts +4 -0
- package/Autocomplete/index.js +38 -0
- package/Autocomplete/types.d.ts +14 -0
- package/Autocomplete/types.js +1 -0
- package/Autocomplete/useInteractions.d.ts +5 -0
- package/Autocomplete/useInteractions.js +9 -0
- package/AutocompleteWithFilter/index.d.ts +4 -0
- package/AutocompleteWithFilter/index.js +52 -0
- package/AutocompleteWithFilter/types.d.ts +15 -0
- package/AutocompleteWithFilter/types.js +1 -0
- package/BasicModal/Content.d.ts +0 -1
- package/BasicModal/Content.js +1 -1
- package/BasicModal/index.d.ts +0 -1
- package/BasicModal/index.js +3 -6
- package/BreadCrumbs/index.d.ts +4 -0
- package/BreadCrumbs/index.js +37 -0
- package/BreadCrumbs/types.d.ts +9 -0
- package/BreadCrumbs/types.js +1 -0
- 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/Copyright/index.d.ts +4 -0
- package/Copyright/index.js +25 -0
- package/Copyright/types.d.ts +5 -0
- package/Copyright/types.js +1 -0
- package/DateInput/FullDateInput/index.d.ts +5 -0
- package/DateInput/FullDateInput/index.js +66 -0
- package/DateInput/FullDateInput/types.d.ts +14 -0
- package/DateInput/FullDateInput/types.js +1 -0
- package/DateInput/FullDateInput/useInteractions.d.ts +8 -0
- package/DateInput/FullDateInput/useInteractions.js +20 -0
- package/DateInput/MonthDayInput/index.d.ts +5 -0
- package/DateInput/MonthDayInput/index.js +54 -0
- package/DateInput/MonthDayInput/types.d.ts +14 -0
- package/DateInput/MonthDayInput/types.js +1 -0
- package/DateInput/MonthDayInput/useInteractions.d.ts +8 -0
- package/DateInput/MonthDayInput/useInteractions.js +19 -0
- package/DateInput/MonthYearInput/index.d.ts +5 -0
- package/DateInput/MonthYearInput/index.js +55 -0
- package/DateInput/MonthYearInput/types.d.ts +14 -0
- package/DateInput/MonthYearInput/types.js +1 -0
- package/DateInput/MonthYearInput/useInteractions.d.ts +8 -0
- package/DateInput/MonthYearInput/useInteractions.js +19 -0
- package/DateInput/index.d.ts +6 -0
- package/DateInput/index.js +6 -0
- package/DigitInput/index.d.ts +1 -4
- package/DigitInput/index.js +3 -3
- package/DigitInput/types.d.ts +2 -1
- package/DynamicHeaderBar/HeaderBar.js +1 -1
- package/DynamicHeaderBar/HeaderButtons.d.ts +0 -1
- package/DynamicHeaderBar/HeaderButtons.js +5 -5
- package/DynamicHeaderBar/HeaderLine.js +1 -1
- package/DynamicHeaderBar/index.js +2 -2
- 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/FormRadioGroup/index.d.ts +0 -1
- package/FormRadioGroup/index.js +3 -3
- package/FormSelector/MultipleSelector.d.ts +1 -3
- package/FormSelector/MultipleSelector.js +2 -2
- package/FormSelector/SimpleSelector.d.ts +1 -3
- package/FormSelector/SimpleSelector.js +2 -2
- package/FormSelector/types.d.ts +2 -1
- package/HelpCaption/index.js +2 -2
- package/LoadingModal/index.d.ts +0 -1
- package/LoadingModal/index.js +1 -1
- package/MenuButtonGroup/MenuItem.d.ts +0 -1
- package/MenuButtonGroup/MenuItem.js +1 -1
- package/MenuButtonGroup/index.js +2 -2
- package/NumberInput/index.d.ts +2 -3
- package/NumberInput/index.js +1 -1
- package/PasswordInput/ConfirmPassword.d.ts +2 -3
- package/PasswordInput/ConfirmPassword.js +1 -1
- package/PasswordInput/Password.d.ts +3 -4
- package/PasswordInput/Password.js +2 -2
- package/PhoneNumberInput/index.d.ts +2 -3
- package/PhoneNumberInput/index.js +2 -2
- package/README.md +370 -2
- package/Sidebar/SidebarItem.d.ts +3 -0
- package/Sidebar/SidebarItem.js +62 -0
- package/Sidebar/SidebarItemsGroup.d.ts +5 -0
- package/Sidebar/SidebarItemsGroup.js +38 -0
- package/Sidebar/SidebarLink.d.ts +3 -0
- package/Sidebar/SidebarLink.js +37 -0
- package/Sidebar/index.d.ts +7 -0
- package/Sidebar/index.js +30 -0
- package/Sidebar/types.d.ts +31 -0
- package/Sidebar/types.js +1 -0
- package/SocialInput/index.d.ts +6 -0
- package/SocialInput/index.js +76 -0
- package/SocialInput/types.d.ts +9 -0
- package/SocialInput/types.js +1 -0
- package/SocialInput/useInteractions.d.ts +10 -0
- package/SocialInput/useInteractions.js +26 -0
- package/TabGroup/index.js +10 -5
- package/TablePagination/Actions.d.ts +3 -0
- package/TablePagination/Actions.js +27 -0
- package/TablePagination/index.d.ts +4 -0
- package/TablePagination/index.js +30 -0
- package/TablePagination/types.d.ts +14 -0
- package/TablePagination/types.js +1 -0
- package/TablePagination/useInteractions.d.ts +14 -0
- package/TablePagination/useInteractions.js +23 -0
- package/TextInput/index.d.ts +2 -3
- package/TextInput/index.js +13 -3
- package/ToastPrompt/Presentation.js +3 -3
- package/ToastPrompt/index.js +1 -1
- package/VideoPlayerModal/index.d.ts +1 -3
- package/VideoPlayerModal/index.js +2 -2
- package/VideoPlayerModal/types.d.ts +2 -1
- package/index.d.ts +18 -0
- package/index.js +18 -0
- package/package.json +8 -2
@@ -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 }
|
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;
|
package/MenuButtonGroup/index.js
CHANGED
@@ -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" }
|
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
|
-
}) })
|
101
|
+
}) }))] })));
|
102
102
|
}
|
103
103
|
export default MenuButtonGroup;
|
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;
|
package/NumberInput/index.js
CHANGED
@@ -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)
|
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
|
-
|
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;
|
@@ -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)
|
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
|
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
|
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
|
-
}) }
|
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)
|
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
|
-
|
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;
|
@@ -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" })
|
58
|
+
startAdornment: (_jsx(InputAdornment, __assign({ position: "start" }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: "+1" })) }))),
|
59
59
|
endAdornment: endAdornment
|
60
|
-
}, onChange: rifm.onChange }, rest)
|
60
|
+
}, onChange: rifm.onChange }, rest)) })));
|
61
61
|
}
|
62
62
|
export default PhoneInput;
|
package/README.md
CHANGED
@@ -12,8 +12,19 @@
|
|
12
12
|
- [License](#license)
|
13
13
|
- [Components](#components)
|
14
14
|
- [AlertDialog](#alertdialog)
|
15
|
+
- [Autocomplete](#autocomplete)
|
16
|
+
- [AutocompleteWithFilter](#autocompletewithfilter)
|
15
17
|
- [BasicModal](#basicmodal)
|
18
|
+
- [BreadCrumbs](#breadcrumbs)
|
19
|
+
- [CheckBox](#checkbox)
|
20
|
+
- [CheckBoxGroup](#checkboxgroup)
|
21
|
+
- [Copyright](#copyright)
|
22
|
+
- [DateInput](#dateinput)
|
23
|
+
- [FullDateInput](#fulldateinput)
|
24
|
+
- [MonthDayInput](#monthdayinput)
|
25
|
+
- [MonthYearInput](#monthyearinput)
|
16
26
|
- [DigitInput](#digitinput)
|
27
|
+
- [FeinInput](#feininput)
|
17
28
|
- [FormRadioGroup](#formradiogroup)
|
18
29
|
- [FormSelector](#formselector)
|
19
30
|
- [HelpCaption](#helpcaption)
|
@@ -22,7 +33,10 @@
|
|
22
33
|
- [NumberInput](#numberinput)
|
23
34
|
- [PasswordInput](#passwordinput)
|
24
35
|
- [PhoneNumberInput](#phonenumberinput)
|
36
|
+
- [Sidebar](#sidebar)
|
37
|
+
- [SocialInput](#socialinput)
|
25
38
|
- [TabGroup](#tabgroup)
|
39
|
+
- [TablePagination](#tablepagination)
|
26
40
|
- [TextInput](#textinput)
|
27
41
|
- [ToastPrompt](#toastprompt)
|
28
42
|
- [VideoPlayerModal](#videoplayermodal)
|
@@ -46,7 +60,18 @@ yarn add @symply.io/basic-components
|
|
46
60
|
|
47
61
|
<h2>License</h2>
|
48
62
|
|
49
|
-
This project is licensed under the terms of the [MIT license](https://github.com/
|
63
|
+
This project is licensed under the terms of the [MIT license](https://github.com/baseline-software/symply-basic-components/blob/main/LICENSE).
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
<h2>Common Properties</h2>
|
68
|
+
|
69
|
+
All components include these 2 properties to customize the theme
|
70
|
+
|
71
|
+
| Name | Type | Default | Required | Description |
|
72
|
+
| -------------- | ---------------------- | ------- | -------- | ----------------------------- |
|
73
|
+
| primaryColor | CSSProperties["color"] | | false | Primary color for the theme |
|
74
|
+
| secondaryColor | CSSProperties["color"] | | false | Secondary color for the theme |
|
50
75
|
|
51
76
|
|
52
77
|
|
@@ -77,6 +102,71 @@ import AlertDialog from '@symply.io/basic-components/AlertDialog';
|
|
77
102
|
|
78
103
|
|
79
104
|
|
105
|
+
<h3>Autocomplete</h3>
|
106
|
+
|
107
|
+
A normal text input enhanced by a panel of suggested options.
|
108
|
+
|
109
|
+
It is extended from `@mui/material/TextField`, so it includes all properties of `@mui/material/TextField`.
|
110
|
+
|
111
|
+
<h5>Import</h5>
|
112
|
+
|
113
|
+
```typescript
|
114
|
+
import { Autocomplete } from '@symply.io/basic-components/';
|
115
|
+
// or
|
116
|
+
import Autocomplete from '@symply.io/basic-components/Autocomplete';
|
117
|
+
```
|
118
|
+
|
119
|
+
<h5>Option Props (AutocompleteOptionType)</h5>
|
120
|
+
|
121
|
+
| Name | Type | Default | Required | Description |
|
122
|
+
| ------ | ------- | ------- | -------- | -------------------------- |
|
123
|
+
| label | string | | true | Option label. |
|
124
|
+
| [name] | Unknown | | false | Customized option property |
|
125
|
+
|
126
|
+
<h5>Props</h5>
|
127
|
+
|
128
|
+
| Name | Type | Default | Required | Description |
|
129
|
+
| -------- | ------------------------------- | ------- | -------- | ------------------------------------------------------------ |
|
130
|
+
| multiple | bool | false | false | If `true`, `value` must be an array and the menu will support multiple selections. |
|
131
|
+
| onChange | func | | true | Callback fired when the `Input` value is changed.<br />**Signature:**<br/>`function(value: Array<AutocompleteOptionType)|AutocompleteOptionType|null => void`<br/>*value:* The value of the `Input` element. |
|
132
|
+
| options | Array\<AutocompleteOptionType\> | | true | Array of suggestion options. |
|
133
|
+
| value | AutocompleteOptionType | | true | The value of the `Input` element. |
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<h3>AutocompleteWithFilter</h3>
|
138
|
+
|
139
|
+
A normal text input enhanced by a panel of suggested options and filter.
|
140
|
+
|
141
|
+
It is extended from `@mui/material/TextField`, so it includes all properties of `@mui/material/TextField`.
|
142
|
+
|
143
|
+
<h5>Import</h5>
|
144
|
+
|
145
|
+
```typescript
|
146
|
+
import { AutocompleteWithFilter } from '@symply.io/basic-components/';
|
147
|
+
// or
|
148
|
+
import AutocompleteWithFilter from '@symply.io/basic-components/AutocompleteWithFilter';
|
149
|
+
```
|
150
|
+
|
151
|
+
<h5>Option Props (AutocompleteOptionType)</h5>
|
152
|
+
|
153
|
+
| Name | Type | Default | Required | Description |
|
154
|
+
| ------ | ------- | ------- | -------- | -------------------------- |
|
155
|
+
| label | string | | true | Option label. |
|
156
|
+
| [name] | Unknown | | false | Customized option property |
|
157
|
+
|
158
|
+
<h5>Props</h5>
|
159
|
+
|
160
|
+
| Name | Type | Default | Required | Description |
|
161
|
+
| -------------------- | ------------------------------- | ------- | -------- | ------------------------------------------------------------ |
|
162
|
+
| disableCloseOnSelect | bool | false | false | If `true`, the popup won't close when a value is selected. |
|
163
|
+
| multiple | bool | false | false | If `true`, `value` must be an array and the menu will support multiple selections. |
|
164
|
+
| onChange | func | | true | Callback fired when the `Input` value is changed.<br />**Signature:**<br/>`function(value: Array<AutocompleteOptionType)|AutocompleteOptionType|null => void`<br/>*value:* The value of the `Input` element. |
|
165
|
+
| options | Array\<AutocompleteOptionType\> | | true | Array of suggestion options. |
|
166
|
+
| value | AutocompleteOptionType | | true | The value of the `Input` element. |
|
167
|
+
|
168
|
+
|
169
|
+
|
80
170
|
<h3>BasicModal</h3>
|
81
171
|
|
82
172
|
Reusable modal component.
|
@@ -111,6 +201,177 @@ import BasicModal from '@symply.io/basic-components/BasicModal';
|
|
111
201
|
|
112
202
|
|
113
203
|
|
204
|
+
<h3>BreadCrumbs</h3>
|
205
|
+
|
206
|
+
A list of links that help a user visualize a page's location within the hierarchical structure of a website, and allow navigation up to any of its "ancestors".
|
207
|
+
|
208
|
+
<h5>Import</h5>
|
209
|
+
|
210
|
+
```typescript
|
211
|
+
import { BreadCrumbs } from '@symply.io/basic-components/';
|
212
|
+
// or
|
213
|
+
import BreadCrumbs from '@symply.io/basic-components/BreadCrumbs';
|
214
|
+
```
|
215
|
+
|
216
|
+
<h5>Props</h5>
|
217
|
+
|
218
|
+
| Name | Type | Default | Required | Description |
|
219
|
+
| ------ | --------------------------------------- | ------- | -------- | ------------------------- |
|
220
|
+
| routes | Array<{ href?: string; label: string }> | | true | All routes of "ancestors" |
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<h3>CheckBox</h3>
|
225
|
+
|
226
|
+
Checkboxes allow the user to select one or more items from a set.
|
227
|
+
|
228
|
+
It is extended from `@mui/material/Checkbox`, so it includes all properties of `@mui/material/Checkbox`.
|
229
|
+
|
230
|
+
<h5>Import</h5>
|
231
|
+
|
232
|
+
```typescript
|
233
|
+
import { CheckBox } from '@symply.io/basic-components/';
|
234
|
+
// or
|
235
|
+
import { CheckBox } from '@symply.io/basic-components/CheckBox';
|
236
|
+
// or
|
237
|
+
import CheckBox from '@symply.io/basic-components/CheckBox/CheckBox';
|
238
|
+
```
|
239
|
+
|
240
|
+
<h5>Props</h5>
|
241
|
+
|
242
|
+
| Name | Type | Default | Required | Description |
|
243
|
+
| -------- | ------------------- | ------- | -------- | ------------------------------------------------------------ |
|
244
|
+
| label | string \| ReactNode | | true | The label of the checkbox. |
|
245
|
+
| 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. |
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<h3>CheckBoxGroup</h3>
|
250
|
+
|
251
|
+
Checkboxes allow the user to select one or more items from a set for a group.
|
252
|
+
|
253
|
+
It is extended from `@mui/material/FormGroup`, so it includes all properties of `@mui/material/FormGroup`.
|
254
|
+
|
255
|
+
<h5>Import</h5>
|
256
|
+
|
257
|
+
```typescript
|
258
|
+
import { CheckBoxGroup } from '@symply.io/basic-components/';
|
259
|
+
// or
|
260
|
+
import { CheckBoxGroup } from '@symply.io/basic-components/CheckBox';
|
261
|
+
// or
|
262
|
+
import CheckBoxGroup from '@symply.io/basic-components/CheckBox/CheckBoxGroup';
|
263
|
+
```
|
264
|
+
|
265
|
+
<h5>Props</h5>
|
266
|
+
|
267
|
+
| Name | Type | Default | Required | Description |
|
268
|
+
| ---------- | ---------------------- | ------- | -------- | ------------------------------------------------------------ |
|
269
|
+
| Checkboxes | Array\<CheckBoxProps\> | | true | The array of checkboxes.<br />See the property of [CheckBox](#checkbox) |
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<h3>Copyright</h3>
|
274
|
+
|
275
|
+
A common component for rendering the copyright
|
276
|
+
|
277
|
+
<h5>Import</h5>
|
278
|
+
|
279
|
+
```typescript
|
280
|
+
import { Copyright } from '@symply.io/basic-components/';
|
281
|
+
// or
|
282
|
+
import Copyright from '@symply.io/basic-components/Copyright';
|
283
|
+
```
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<h3>DateInput</h3>
|
288
|
+
|
289
|
+
<h4>FullDateInput</h4>
|
290
|
+
|
291
|
+
Input component for full date (MM/DD/YYYY)
|
292
|
+
|
293
|
+
<h5>Import</h5>
|
294
|
+
|
295
|
+
```typescript
|
296
|
+
import { FullDateInput } from '@symply.io/basic-components/';
|
297
|
+
// or
|
298
|
+
import { FullDateInput } from '@symply.io/basic-components/DateInput';
|
299
|
+
// or
|
300
|
+
import FullDateInput from '@symply.io/basic-components/DateInput/FullDateInput';
|
301
|
+
```
|
302
|
+
|
303
|
+
<h5>Props</h5>
|
304
|
+
|
305
|
+
| Name | Type | Default | Required | Description |
|
306
|
+
| ---------- | ----------------------------- | ------- | -------- | ------------------------------------------------------------ |
|
307
|
+
| error | boolean | | false | If `true`, the label is displayed in an error state. |
|
308
|
+
| helperText | string | | false | The helper text content. |
|
309
|
+
| margin | 'dense' \| 'none' \| 'normal' | 'none' | false | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
|
310
|
+
| name | string | | false | Name attribute of the `input` element. |
|
311
|
+
| onBlur | func | | false | Callback fired when the `input` is blurred. Notice that the first argument (event) might be undefined. |
|
312
|
+
| 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. |
|
313
|
+
| onFocus | func | | false | Callback fired when the `input` is focused. |
|
314
|
+
| value | string | | true | The value of the `Input` element. |
|
315
|
+
| verifyFn | func | | false | Customized verification function. |
|
316
|
+
|
317
|
+
<h4>MonthDayInput</h4>
|
318
|
+
|
319
|
+
Input component for month day (MM/DD)
|
320
|
+
|
321
|
+
<h5>Import</h5>
|
322
|
+
|
323
|
+
```typescript
|
324
|
+
import { MonthDayInput } from '@symply.io/basic-components/';
|
325
|
+
// or
|
326
|
+
import { MonthDayInput } from '@symply.io/basic-components/DateInput';
|
327
|
+
// or
|
328
|
+
import MonthDayInput from '@symply.io/basic-components/DateInput/MonthDayInput';
|
329
|
+
```
|
330
|
+
|
331
|
+
<h5>Props</h5>
|
332
|
+
|
333
|
+
| Name | Type | Default | Required | Description |
|
334
|
+
| ---------- | ----------------------------- | ------- | -------- | ------------------------------------------------------------ |
|
335
|
+
| error | boolean | | false | If `true`, the label is displayed in an error state. |
|
336
|
+
| helperText | string | | false | The helper text content. |
|
337
|
+
| margin | 'dense' \| 'none' \| 'normal' | 'none' | false | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
|
338
|
+
| name | string | | false | Name attribute of the `input` element. |
|
339
|
+
| onBlur | func | | false | Callback fired when the `input` is blurred. Notice that the first argument (event) might be undefined. |
|
340
|
+
| 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. |
|
341
|
+
| onFocus | func | | false | Callback fired when the `input` is focused. |
|
342
|
+
| value | string | | true | The value of the `Input` element. |
|
343
|
+
| verifyFn | func | | false | Customized verification function. |
|
344
|
+
|
345
|
+
<h4>MonthYearInput</h4>
|
346
|
+
|
347
|
+
Input component for month year (MM/YYYY)
|
348
|
+
|
349
|
+
<h5>Import</h5>
|
350
|
+
|
351
|
+
```typescript
|
352
|
+
import { MonthYearInput } from '@symply.io/basic-components/';
|
353
|
+
// or
|
354
|
+
import { MonthYearInput } from '@symply.io/basic-components/DateInput';
|
355
|
+
// or
|
356
|
+
import MonthYearInput from '@symply.io/basic-components/DateInput/MonthYearInput';
|
357
|
+
```
|
358
|
+
|
359
|
+
<h5>Props</h5>
|
360
|
+
|
361
|
+
| Name | Type | Default | Required | Description |
|
362
|
+
| ---------- | ----------------------------- | ------- | -------- | ------------------------------------------------------------ |
|
363
|
+
| error | boolean | | false | If `true`, the label is displayed in an error state. |
|
364
|
+
| helperText | string | | false | The helper text content. |
|
365
|
+
| margin | 'dense' \| 'none' \| 'normal' | 'none' | false | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
|
366
|
+
| name | string | | false | Name attribute of the `input` element. |
|
367
|
+
| onBlur | func | | false | Callback fired when the `input` is blurred. Notice that the first argument (event) might be undefined. |
|
368
|
+
| 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. |
|
369
|
+
| onFocus | func | | false | Callback fired when the `input` is focused. |
|
370
|
+
| value | string | | true | The value of the `Input` element. |
|
371
|
+
| verifyFn | func | | false | Customized verification function. |
|
372
|
+
|
373
|
+
|
374
|
+
|
114
375
|
<h3>DigitInput</h3>
|
115
376
|
|
116
377
|
Input component for digits.
|
@@ -138,6 +399,30 @@ import DigitInput from '@symply.io/basic-components/DigitInput';
|
|
138
399
|
|
139
400
|
|
140
401
|
|
402
|
+
<h3>FeinInput</h3>
|
403
|
+
|
404
|
+
Input component for FEIN.
|
405
|
+
|
406
|
+
It is extended from `@mui/material/TextField`, so it includes all properties of `@mui/material/TextField`.
|
407
|
+
|
408
|
+
<h5>Import</h5>
|
409
|
+
|
410
|
+
```typescript
|
411
|
+
import { FeinInput } from '@symply.io/basic-components/';
|
412
|
+
// or
|
413
|
+
import FeinInput from '@symply.io/basic-components/FeinInput';
|
414
|
+
```
|
415
|
+
|
416
|
+
<h5>Props</h5>
|
417
|
+
|
418
|
+
| Name | Type | Default | Required | Description |
|
419
|
+
| -------- | ------ | ------- | -------- | ------------------------------------------------------------ |
|
420
|
+
| 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. |
|
421
|
+
| value | string | | true | The value of the `Input` element. |
|
422
|
+
| verifyFn | func | | false | Customized verification function. |
|
423
|
+
|
424
|
+
|
425
|
+
|
141
426
|
<h3>FormRadioGroup</h3>
|
142
427
|
|
143
428
|
Radio Group allow the user to select one option from a set.
|
@@ -165,7 +450,7 @@ import FormRadioGroup from '@symply.io/basic-components/FormRadioGroup';
|
|
165
450
|
| color | 'primary' \| 'secondary' \| 'success' \| 'error' \| 'info' \| 'warning' | 'primary' | false | The main color of the component. |
|
166
451
|
| disabled | bool | false | false | If `true`, the component is disabled. |
|
167
452
|
| formLabel | string | | false | The label of the `Radio` element. |
|
168
|
-
| 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. |
|
453
|
+
| 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. |
|
169
454
|
| options | Array\<IRadioOption\> | | true | The radio options. See the **Radio Option Props** above. |
|
170
455
|
| value | string \| number \| bool | | true | The value of the `Radio` element. |
|
171
456
|
| tooltip | string | | false | A tooltip for the `Radio` element. |
|
@@ -391,6 +676,63 @@ import PhoneNumberInput from '@symply.io/basic-components/PhoneNumberInput';
|
|
391
676
|
|
392
677
|
|
393
678
|
|
679
|
+
<h3>Sidebar</h3>
|
680
|
+
|
681
|
+
Sidebars for navigation.
|
682
|
+
|
683
|
+
<h5>Import</h5>
|
684
|
+
|
685
|
+
```typescript
|
686
|
+
import { Sidebar } from '@symply.io/basic-components/';
|
687
|
+
// or
|
688
|
+
import Sidebar from '@symply.io/basic-components/Sidebar';
|
689
|
+
```
|
690
|
+
|
691
|
+
<h5>Sidebar Item Props</h5>
|
692
|
+
|
693
|
+
| Name | Type | Default | Required | Description |
|
694
|
+
| ------------ | ------------------------- | ------------------------------------- | -------- | ------------------------------------------------------------ |
|
695
|
+
| beta | boolean | | false | If `true` the beta tag will be rendered. |
|
696
|
+
| betaTagColor | CSSProperties["color"] | \#00A2A9 | false | The value of the `Input` element. |
|
697
|
+
| children | Array\<SidebarItemProps\> | | false | If not undefined the sub sidebar items would be rendered. |
|
698
|
+
| icon | Element | | true | The icon adornment. |
|
699
|
+
| lock | boolean | | false | If `true` the lock icon will be rendered, and the sidebar item would be disabled. |
|
700
|
+
| name | string | | true | The sidebar item label. |
|
701
|
+
| path | string | | true | The link path of the sidebar item. |
|
702
|
+
| titleForLock | string | "Feature is unavailable on Free plan" | false | The tip when the lock is `true` |
|
703
|
+
|
704
|
+
<h5>Props</h5>
|
705
|
+
|
706
|
+
| Name | Type | Default | Required | Description |
|
707
|
+
| ----- | ------------------------- | ------- | -------- | -------------- |
|
708
|
+
| items | Array\<SidebarItemProps\> | | true | Sidebar items. |
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
<h3>SocialInput</h3>
|
713
|
+
|
714
|
+
Input component for Social Security Number (SSN).
|
715
|
+
|
716
|
+
It is extended from `@mui/material/TextField`, so it includes all properties of `@mui/material/TextField`.
|
717
|
+
|
718
|
+
<h5>Import</h5>
|
719
|
+
|
720
|
+
```typescript
|
721
|
+
import { SocialInput } from '@symply.io/basic-components/';
|
722
|
+
// or
|
723
|
+
import SocialInput from '@symply.io/basic-components/SocialInput';
|
724
|
+
```
|
725
|
+
|
726
|
+
<h5>Props</h5>
|
727
|
+
|
728
|
+
| Name | Type | Default | Required | Description |
|
729
|
+
| -------- | ------ | ------- | -------- | ------------------------------------------------------------ |
|
730
|
+
| 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. |
|
731
|
+
| value | string | | true | The value of the `Input` element. |
|
732
|
+
| verifyFn | func | | false | Customized verification function. |
|
733
|
+
|
734
|
+
|
735
|
+
|
394
736
|
<h3>TabGroup</h3>
|
395
737
|
|
396
738
|
Tabs group.
|
@@ -415,6 +757,32 @@ import TabGroup from '@symply.io/basic-components/TabGroup';
|
|
415
757
|
|
416
758
|
|
417
759
|
|
760
|
+
<h3>TablePagination</h3>
|
761
|
+
|
762
|
+
Reusable pagination component for the material table
|
763
|
+
|
764
|
+
<h5>Import</h5>
|
765
|
+
|
766
|
+
```typescript
|
767
|
+
import { TablePagination } from '@symply.io/basic-components/';
|
768
|
+
// or
|
769
|
+
import TablePagination from '@symply.io/basic-components/TablePagination';
|
770
|
+
```
|
771
|
+
|
772
|
+
<h5>Props</h5>
|
773
|
+
|
774
|
+
| Name | Type | Default | Required | Description |
|
775
|
+
| ------------------- | --------------- | ------- | -------- | ------------------------------------------------------------ |
|
776
|
+
| colSpan | number | | true | The number of columns a cell should span. |
|
777
|
+
| count | number | | true | The total count of all data. |
|
778
|
+
| onPageChange | func | | true | Callback fired when the `page` value is changed.<br />**Signature:**<br/>`function(event: MouseEvent<HTMLButtonElement> ) => void,value: number`<br/>*value:* The value of the `page` . |
|
779
|
+
| onRowsPerPageChange | func | | true | Callback fired when the `Select` value is changed.<br />**Signature:**<br/>`function(event: ChangeEvent<HTMLInputElement ` |
|
780
|
+
| page | number | | true | The current page index. |
|
781
|
+
| rowsPerPage | number | | true | How many rows per page. |
|
782
|
+
| rowsPerPageOptions | Array\<number\> | | true | The options for setting how many rows per page. |
|
783
|
+
|
784
|
+
|
785
|
+
|
418
786
|
<h3>TextInput</h3>
|
419
787
|
|
420
788
|
Regular Input component.
|
@@ -0,0 +1,62 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
13
|
+
import colorAlpha from "color-alpha";
|
14
|
+
import Chip from "@mui/material/Chip";
|
15
|
+
import ListItem from "@mui/material/ListItem";
|
16
|
+
import ListItemText from "@mui/material/ListItemText";
|
17
|
+
import ListItemIcon from "@mui/material/ListItemIcon";
|
18
|
+
import LockIcon from "@mui/icons-material/LockRounded";
|
19
|
+
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
20
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
21
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
22
|
+
import useCustomTheme from "../useCustomTheme";
|
23
|
+
function SidebarItem(props) {
|
24
|
+
var icon = props.icon, name = props.name, active = props.active, expand = props.expand, lock = props.lock, beta = props.beta, isSub = props.isSub, hasChildren = props.hasChildren, _a = props.betaTagColor, betaTagColor = _a === void 0 ? "#00A2A9" : _a, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onClick = props.onClick;
|
25
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
26
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(ListItem, __assign({ button: true, onClick: onClick, disabled: lock, sx: {
|
27
|
+
paddingLeft: isSub ? theme.spacing(4) : undefined,
|
28
|
+
display: "flex",
|
29
|
+
width: "100%",
|
30
|
+
"&:hover": {
|
31
|
+
backgroundColor: colorAlpha(theme.palette.primary.main, 0.3)
|
32
|
+
},
|
33
|
+
backgroundColor: active
|
34
|
+
? colorAlpha(theme.palette.primary.main, 0.2)
|
35
|
+
: undefined
|
36
|
+
} }, { children: [_jsx(ListItemIcon, __assign({ sx: {
|
37
|
+
color: active ? theme.palette.primary.main : undefined,
|
38
|
+
borderRadius: active ? "5px" : undefined,
|
39
|
+
opacity: active ? "1" : undefined,
|
40
|
+
fontWeight: active ? 600 : undefined
|
41
|
+
} }, { children: icon })), _jsx(ListItemText, { primaryTypographyProps: {
|
42
|
+
color: active ? theme.palette.primary.main : "textPrimary",
|
43
|
+
sx: {
|
44
|
+
overflow: "hidden",
|
45
|
+
textOverflow: "ellipsis",
|
46
|
+
whiteSpace: "nowrap",
|
47
|
+
borderRadius: active ? "5px" : undefined,
|
48
|
+
opacity: active ? "1" : undefined,
|
49
|
+
fontWeight: active ? 600 : undefined
|
50
|
+
}
|
51
|
+
}, primary: name }), lock && (_jsx(LockIcon, { fontSize: "small", color: "error", sx: {
|
52
|
+
fontSize: "1rem"
|
53
|
+
}, "data-nw": "".concat(name, "_lock") })), beta && (_jsx(Chip, { label: "BETA", color: "primary", size: "small", sx: {
|
54
|
+
borderRadius: theme.spacing(0.5),
|
55
|
+
backgroundColor: betaTagColor,
|
56
|
+
color: "white",
|
57
|
+
height: theme.spacing(2.5),
|
58
|
+
fontSize: theme.spacing(1.25),
|
59
|
+
padding: theme.spacing(0, 0.75)
|
60
|
+
} })), hasChildren && (expand ? _jsx(ExpandMoreIcon, {}) : _jsx(ChevronRightIcon, {}))] })) })));
|
61
|
+
}
|
62
|
+
export default SidebarItem;
|