@symply.io/basic-components 1.0.0-alpha.6 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AlertDialog/index.d.ts +3 -2
- package/AlertDialog/index.js +10 -10
- package/AlertDialog/types.d.ts +3 -1
- package/BasicModal/index.d.ts +3 -2
- package/BasicModal/index.js +19 -19
- package/BasicModal/types.d.ts +3 -1
- package/DigitInput/index.d.ts +5 -2
- package/DigitInput/index.js +8 -6
- package/DigitInput/types.d.ts +3 -0
- package/DynamicHeaderBar/HeaderBar.d.ts +4 -2
- package/DynamicHeaderBar/HeaderBar.js +8 -8
- package/DynamicHeaderBar/HeaderButtons.d.ts +2 -2
- package/DynamicHeaderBar/HeaderButtons.js +21 -21
- package/DynamicHeaderBar/HeaderLine.d.ts +6 -3
- package/DynamicHeaderBar/HeaderLine.js +3 -4
- package/FormRadioGroup/index.d.ts +3 -2
- package/FormRadioGroup/index.js +16 -14
- package/FormRadioGroup/types.d.ts +3 -0
- package/FormSelector/MultipleSelector.d.ts +3 -2
- package/FormSelector/MultipleSelector.js +15 -13
- package/FormSelector/SimpleSelector.d.ts +3 -2
- package/FormSelector/SimpleSelector.js +15 -13
- package/FormSelector/types.d.ts +3 -1
- package/HelpCaption/index.d.ts +5 -3
- package/HelpCaption/index.js +16 -16
- package/LoadingModal/index.d.ts +3 -2
- package/LoadingModal/index.js +9 -7
- package/LoadingModal/types.d.ts +3 -0
- package/MenuButtonGroup/MenuItem.d.ts +2 -2
- package/MenuButtonGroup/MenuItem.js +5 -3
- package/MenuButtonGroup/index.d.ts +5 -3
- package/MenuButtonGroup/index.js +8 -6
- package/NumberInput/index.d.ts +7 -3
- package/NumberInput/index.js +9 -7
- package/PasswordInput/ConfirmPassword.d.ts +7 -3
- package/PasswordInput/ConfirmPassword.js +8 -6
- package/PasswordInput/Password.d.ts +6 -2
- package/PasswordInput/Password.js +10 -8
- package/PhoneNumberInput/index.d.ts +7 -3
- package/PhoneNumberInput/index.js +9 -7
- package/TabGroup/index.d.ts +3 -2
- package/TabGroup/index.js +19 -19
- package/TabGroup/types.d.ts +3 -0
- package/TextInput/index.d.ts +6 -3
- package/TextInput/index.js +9 -7
- package/ToastPrompt/Presentation.d.ts +16 -3
- package/ToastPrompt/Presentation.js +21 -21
- package/VideoPlayerModal/index.d.ts +4 -2
- package/VideoPlayerModal/index.js +9 -9
- package/VideoPlayerModal/types.d.ts +3 -0
- package/package.json +2 -1
- package/useCustomTheme.d.ts +6 -0
- package/useCustomTheme.js +51 -0
- package/withTheme.d.ts +0 -3
- package/withTheme.js +0 -35
@@ -1,8 +1,11 @@
|
|
1
|
+
import { CSSProperties } from "react";
|
1
2
|
import { ButtonProps } from "@mui/material/Button";
|
2
3
|
export interface VideoPlayerModalProps {
|
3
4
|
title?: string;
|
4
5
|
open: boolean;
|
5
6
|
pip?: boolean;
|
6
7
|
extraButtons?: Array<ButtonProps>;
|
8
|
+
primaryColor?: CSSProperties["color"];
|
9
|
+
secondaryColor?: CSSProperties["color"];
|
7
10
|
onClose: () => void;
|
8
11
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@symply.io/basic-components",
|
3
|
-
"version": "1.0.0-alpha.
|
3
|
+
"version": "1.0.0-alpha.7",
|
4
4
|
"description": "Basic and reusable components for all frontend of Symply apps",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -55,6 +55,7 @@
|
|
55
55
|
"@mui/icons-material": "^5.4.2",
|
56
56
|
"@mui/material": "^5.4.2",
|
57
57
|
"@mui/system": "^5.4.2",
|
58
|
+
"color-alpha": "^1.1.3",
|
58
59
|
"react-player": "^2.9.0",
|
59
60
|
"rifm": "^0.12.1"
|
60
61
|
},
|
@@ -0,0 +1,51 @@
|
|
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 colorAlpha from "color-alpha";
|
13
|
+
import { createTheme } from "@mui/material/styles";
|
14
|
+
function useCustomTheme(props) {
|
15
|
+
var _a = props || {}, primaryColor = _a.primaryColor, secondaryColor = _a.secondaryColor;
|
16
|
+
var themeOptions = {
|
17
|
+
components: {
|
18
|
+
MuiButton: {
|
19
|
+
styleOverrides: {
|
20
|
+
root: {
|
21
|
+
whiteSpace: "nowrap",
|
22
|
+
fontWeight: 600,
|
23
|
+
fontFamily: "Dinpro"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
},
|
28
|
+
typography: {
|
29
|
+
fontFamily: "Dinpro"
|
30
|
+
}
|
31
|
+
};
|
32
|
+
if (primaryColor) {
|
33
|
+
themeOptions = __assign(__assign({}, themeOptions), { palette: {
|
34
|
+
primary: {
|
35
|
+
main: primaryColor,
|
36
|
+
light: colorAlpha(primaryColor, 0.08)
|
37
|
+
}
|
38
|
+
} });
|
39
|
+
}
|
40
|
+
if (secondaryColor) {
|
41
|
+
themeOptions = __assign(__assign({}, themeOptions), { palette: {
|
42
|
+
secondary: {
|
43
|
+
main: secondaryColor,
|
44
|
+
light: colorAlpha(secondaryColor, 0.08)
|
45
|
+
}
|
46
|
+
} });
|
47
|
+
}
|
48
|
+
var theme = createTheme(themeOptions);
|
49
|
+
return theme;
|
50
|
+
}
|
51
|
+
export default useCustomTheme;
|
package/withTheme.d.ts
DELETED
package/withTheme.js
DELETED
@@ -1,35 +0,0 @@
|
|
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 { createTheme, ThemeProvider } from '@mui/material/styles';
|
14
|
-
import CssBaseline from '@mui/material/CssBaseline';
|
15
|
-
var theme = createTheme({
|
16
|
-
components: {
|
17
|
-
MuiButton: {
|
18
|
-
styleOverrides: {
|
19
|
-
root: {
|
20
|
-
whiteSpace: 'nowrap',
|
21
|
-
fontWeight: 600,
|
22
|
-
fontFamily: 'Dinpro'
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
26
|
-
},
|
27
|
-
typography: {
|
28
|
-
fontFamily: 'Dinpro'
|
29
|
-
}
|
30
|
-
});
|
31
|
-
var withTheme = function (Component) {
|
32
|
-
var CustomComponent = function (props) { return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(CssBaseline, {}, void 0), _jsx(Component, __assign({}, props), void 0)] }), void 0)); };
|
33
|
-
return CustomComponent;
|
34
|
-
};
|
35
|
-
export default withTheme;
|