@symply.io/basic-components 1.0.0-beta.11 → 1.0.0-beta.13
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 +1 -0
- package/Autocomplete/index.d.ts +2 -1
- package/Autocomplete/index.js +3 -3
- package/Autocomplete/types.d.ts +5 -3
- package/AutocompleteWithFilter/index.d.ts +2 -1
- package/AutocompleteWithFilter/index.js +3 -3
- package/AutocompleteWithFilter/types.d.ts +4 -4
- package/BasicModal/Content.d.ts +1 -0
- package/BasicModal/index.d.ts +1 -0
- package/BasicTable/TableBodyRow.d.ts +1 -0
- package/BasicTable/TableFooter.d.ts +1 -0
- package/BasicTable/TableHeader.d.ts +1 -0
- package/BasicTable/index.d.ts +1 -0
- package/BreadCrumbs/index.d.ts +1 -0
- package/CheckBox/CheckBox.d.ts +1 -0
- package/CheckBox/CheckBoxGroup.d.ts +1 -0
- package/CheckBox/types.d.ts +2 -2
- package/Copyright/index.d.ts +1 -0
- package/DateInput/FullDateInput/index.d.ts +1 -0
- package/DateInput/MonthDayInput/index.d.ts +1 -0
- package/DateInput/MonthYearInput/index.d.ts +1 -0
- package/DigitInput/index.d.ts +1 -0
- package/DynamicHeaderBar/HeaderButtons.d.ts +1 -0
- package/FeinInput/index.d.ts +1 -0
- package/FormRadioGroup/index.d.ts +1 -0
- package/FormRadioGroup/index.js +1 -1
- package/FormSelector/MultipleSelector.d.ts +1 -0
- package/FormSelector/SimpleSelector.d.ts +1 -0
- package/LoadingModal/index.d.ts +1 -0
- package/MenuButtonGroup/MenuItem.d.ts +1 -0
- package/README.md +4 -4
- package/Sidebar/SidebarItem.d.ts +1 -0
- package/Sidebar/SidebarLink.d.ts +1 -0
- package/Sidebar/index.d.ts +1 -0
- package/SocialInput/index.d.ts +1 -0
- package/TablePagination/Actions.d.ts +1 -0
- package/TablePagination/index.d.ts +1 -0
- package/VideoPlayerModal/index.d.ts +1 -0
- package/package.json +8 -6
package/AlertDialog/index.d.ts
CHANGED
package/Autocomplete/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { AutocompleteProps } from "./types";
|
2
|
-
declare function CustomAutocomplete<T, multiple extends boolean | undefined>(props: AutocompleteProps<T, multiple>): JSX.Element;
|
3
|
+
declare function CustomAutocomplete<T, multiple extends boolean | undefined = false>(props: AutocompleteProps<T, multiple>): JSX.Element;
|
3
4
|
export default CustomAutocomplete;
|
4
5
|
export * from "./types";
|
package/Autocomplete/index.js
CHANGED
@@ -30,9 +30,9 @@ function CustomAutocomplete(props) {
|
|
30
30
|
var size = props.size, value = props.value, options = props.options, multiple = props.multiple, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onChange = props.onChange, rest = __rest(props, ["size", "value", "options", "multiple", "primaryColor", "secondaryColor", "onChange"]);
|
31
31
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
32
32
|
var _a = useInteractions(), inputValue = _a.inputValue, onInputChange = _a.onInputChange;
|
33
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Autocomplete, { size: size, fullWidth: true, options: options, multiple: multiple, onChange: function (_,
|
34
|
-
onChange(
|
35
|
-
}, inputValue: inputValue, onInputChange: onInputChange, renderInput: function (params) { return _jsx(TextField, __assign({}, params, rest, { size: size })); } }) })));
|
33
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Autocomplete, { size: size, fullWidth: true, options: options, multiple: multiple, onChange: function (_, val) {
|
34
|
+
onChange(val);
|
35
|
+
}, isOptionEqualToValue: function (opt, val) { return opt.label === val.label; }, value: value, 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,12 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
import { TextFieldProps } from "@mui/material/TextField";
|
3
|
-
export declare type AutocompleteOptionType<T
|
3
|
+
export declare type AutocompleteOptionType<T = {
|
4
|
+
[name: string]: unknown;
|
5
|
+
}> = T & {
|
4
6
|
label: string;
|
5
7
|
};
|
6
|
-
export declare type AutocompleteValueType<T, multiple> = multiple extends false | undefined ? AutocompleteOptionType<T> | null : Array<AutocompleteOptionType<T
|
7
|
-
export interface AutocompleteProps<T, multiple> extends Omit<TextFieldProps, "onChange"> {
|
8
|
+
export declare type AutocompleteValueType<T, multiple extends boolean | undefined> = multiple extends false | undefined ? AutocompleteOptionType<T> | null : Array<AutocompleteOptionType<T>>;
|
9
|
+
export interface AutocompleteProps<T, multiple extends boolean | undefined> extends Omit<TextFieldProps, "onChange"> {
|
8
10
|
multiple?: multiple;
|
9
11
|
options: Array<AutocompleteOptionType<T>>;
|
10
12
|
value: AutocompleteValueType<T, multiple>;
|
@@ -1,4 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
import { AutocompleteWithFilterProps } from "./types";
|
2
|
-
declare function AutocompleteWithFilter<T, multiple extends boolean | undefined>(props: AutocompleteWithFilterProps<T, multiple>): JSX.Element;
|
3
|
+
declare function AutocompleteWithFilter<T, multiple extends boolean | undefined = false>(props: AutocompleteWithFilterProps<T, multiple>): JSX.Element;
|
3
4
|
export default AutocompleteWithFilter;
|
4
5
|
export * from "./types";
|
@@ -39,9 +39,9 @@ function AutocompleteWithFilter(props) {
|
|
39
39
|
stringify: function (option) { return option.label; }
|
40
40
|
});
|
41
41
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
42
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Autocomplete, { size: size, fullWidth: true, limitTags: 1, options: options, multiple: multiple, filterOptions: filter, onChange: function (_,
|
43
|
-
onChange(
|
44
|
-
}, disableCloseOnSelect: disableCloseOnSelect || multiple, getOptionLabel: function (option) {
|
42
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Autocomplete, { size: size, fullWidth: true, limitTags: 1, options: options, multiple: multiple, filterOptions: filter, onChange: function (_, val) {
|
43
|
+
onChange(val);
|
44
|
+
}, value: value, disableCloseOnSelect: disableCloseOnSelect || multiple, getOptionLabel: function (option) {
|
45
45
|
return option.label || "";
|
46
46
|
}, renderOption: function (props, option, _a) {
|
47
47
|
var selected = _a.selected;
|
@@ -3,13 +3,13 @@ import { TextFieldProps } from "@mui/material/TextField";
|
|
3
3
|
export declare type AutocompleteWithFilterOptionType<T> = T & {
|
4
4
|
label: string;
|
5
5
|
};
|
6
|
-
export declare type
|
7
|
-
export interface AutocompleteWithFilterProps<T, multiple> extends Omit<TextFieldProps, "onChange"> {
|
8
|
-
value:
|
6
|
+
export declare type AutocompleteWithFilterlValueType<T, multiple extends boolean | undefined> = multiple extends false | undefined ? AutocompleteWithFilterOptionType<T> | null : Array<AutocompleteWithFilterOptionType<T>>;
|
7
|
+
export interface AutocompleteWithFilterProps<T, multiple extends boolean | undefined> extends Omit<TextFieldProps, "onChange"> {
|
8
|
+
value: AutocompleteWithFilterlValueType<T, multiple>;
|
9
9
|
options: Array<AutocompleteWithFilterOptionType<T>>;
|
10
10
|
disableCloseOnSelect?: boolean;
|
11
11
|
multiple?: multiple;
|
12
12
|
primaryColor?: CSSProperties["color"];
|
13
13
|
secondaryColor?: CSSProperties["color"];
|
14
|
-
onChange: (value:
|
14
|
+
onChange: (value: AutocompleteWithFilterlValueType<T, multiple>) => void;
|
15
15
|
}
|
package/BasicModal/Content.d.ts
CHANGED
package/BasicModal/index.d.ts
CHANGED
package/BasicTable/index.d.ts
CHANGED
package/BreadCrumbs/index.d.ts
CHANGED
package/CheckBox/CheckBox.d.ts
CHANGED
package/CheckBox/types.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { CSSProperties,
|
1
|
+
import { CSSProperties, ReactElement } from "react";
|
2
2
|
import { CheckboxProps } from "@mui/material/Checkbox";
|
3
3
|
import { FormGroupProps } from "@mui/material/FormGroup";
|
4
4
|
export interface CheckBoxProps extends Omit<CheckboxProps, "onChange"> {
|
5
|
-
label: string |
|
5
|
+
label: string | ReactElement;
|
6
6
|
onChange: (val: boolean) => void;
|
7
7
|
primaryColor?: CSSProperties["color"];
|
8
8
|
secondaryColor?: CSSProperties["color"];
|
package/Copyright/index.d.ts
CHANGED
package/DigitInput/index.d.ts
CHANGED
package/FeinInput/index.d.ts
CHANGED
package/FormRadioGroup/index.js
CHANGED
@@ -26,7 +26,7 @@ function FormRadioGroup(props) {
|
|
26
26
|
onChange(event.target.value);
|
27
27
|
}, sx: {
|
28
28
|
my: 1,
|
29
|
-
"& label span:first-
|
29
|
+
"& label span:first-of-type span:first-of-type": {
|
30
30
|
margin: "-5px 0 -5px 0"
|
31
31
|
}
|
32
32
|
} }, { children: options.map(function (opt) {
|
package/LoadingModal/index.d.ts
CHANGED
package/README.md
CHANGED
@@ -298,10 +298,10 @@ import CheckBox from '@symply.io/basic-components/CheckBox/CheckBox';
|
|
298
298
|
|
299
299
|
<h5>Props</h5>
|
300
300
|
|
301
|
-
| Name | Type
|
302
|
-
| -------- |
|
303
|
-
| label | string \|
|
304
|
-
| onChange | func
|
301
|
+
| Name | Type | Default | Required | Description |
|
302
|
+
| -------- | ---------------------- | ------- | -------- | ------------------------------------------------------------ |
|
303
|
+
| label | string \| ReactElement | | true | The label of the checkbox. |
|
304
|
+
| 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. |
|
305
305
|
|
306
306
|
|
307
307
|
|
package/Sidebar/SidebarItem.d.ts
CHANGED
package/Sidebar/SidebarLink.d.ts
CHANGED
package/Sidebar/index.d.ts
CHANGED
package/SocialInput/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@symply.io/basic-components",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.13",
|
4
4
|
"description": "Basic and reusable components for all frontend of Symply apps",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -45,19 +45,21 @@
|
|
45
45
|
"devDependencies": {
|
46
46
|
"@types/body-parser": "^1.19.2",
|
47
47
|
"@types/reach__router": "^1.3.10",
|
48
|
-
"@types/react": "
|
49
|
-
"@types/react-dom": "
|
48
|
+
"@types/react": "17.0.27",
|
49
|
+
"@types/react-dom": "17.0.9",
|
50
50
|
"babel-loader": "^8.2.2",
|
51
51
|
"typescript": "~4.6.3"
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
54
|
"@emotion/react": "^11.7.1",
|
55
55
|
"@emotion/styled": "^11.6.0",
|
56
|
-
"@mui/icons-material": "
|
57
|
-
"@mui/material": "
|
58
|
-
"@mui/system": "
|
56
|
+
"@mui/icons-material": "~5.4.2",
|
57
|
+
"@mui/material": "~5.4.2",
|
58
|
+
"@mui/system": "~5.4.2",
|
59
59
|
"@reach/router": "^1.3.4",
|
60
60
|
"color-alpha": "^1.1.3",
|
61
|
+
"react": "17.0.2",
|
62
|
+
"react-dom": "17.0.2",
|
61
63
|
"react-player": "^2.9.0",
|
62
64
|
"rifm": "^0.12.1"
|
63
65
|
},
|