@symply.io/basic-components 1.0.0-alpha.9 → 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.
- 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 +15 -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 +54 -0
- package/AutocompleteWithFilter/types.d.ts +16 -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
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { SidebarItemsGroupProps } from "./types";
|
3
|
+
declare function SidebarItemsGroup(props: SidebarItemsGroupProps): JSX.Element;
|
4
|
+
declare const _default: import("react").MemoExoticComponent<typeof SidebarItemsGroup>;
|
5
|
+
export default _default;
|
@@ -0,0 +1,38 @@
|
|
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 { useState, memo, useMemo, useEffect, useCallback } from "react";
|
14
|
+
import { Match, useLocation } from "@reach/router";
|
15
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
16
|
+
import Collapse from "@mui/material/Collapse";
|
17
|
+
import List from "@mui/material/List";
|
18
|
+
import useCustomTheme from "../useCustomTheme";
|
19
|
+
import SidebarItem from "./SidebarItem";
|
20
|
+
import SidebarLink from "./SidebarLink";
|
21
|
+
function SidebarItemsGroup(props) {
|
22
|
+
var item = props.item;
|
23
|
+
var name = item.name, path = item.path, icon = item.icon, children = item.children, lock = item.lock, beta = item.beta, titleForLock = item.titleForLock, betaTagColor = item.betaTagColor, primaryColor = item.primaryColor, secondaryColor = item.secondaryColor;
|
24
|
+
var pathname = useLocation().pathname;
|
25
|
+
var match = useMemo(function () {
|
26
|
+
return pathname.includes(path);
|
27
|
+
}, [path, pathname]);
|
28
|
+
var _a = useState(match), expand = _a[0], setExpand = _a[1];
|
29
|
+
var onToggleExpand = useCallback(function () {
|
30
|
+
setExpand(function (v) { return !v; });
|
31
|
+
}, []);
|
32
|
+
useEffect(function () {
|
33
|
+
setExpand(match);
|
34
|
+
}, [match]);
|
35
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
36
|
+
return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(List, __assign({ component: "div", disablePadding: true }, { children: _jsx(SidebarItem, { active: false, name: name, icon: icon, lock: lock, beta: beta, expand: expand, hasChildren: true, betaTagColor: betaTagColor, primaryColor: primaryColor, secondaryColor: secondaryColor, onClick: onToggleExpand }) })), children && (_jsx(Collapse, __assign({ in: expand, timeout: "auto" }, { children: _jsx(List, __assign({ component: "div", disablePadding: true }, { children: children.map(function (c) { return (_jsx(Match, __assign({ path: c.path }, { children: function (prop) { return (_jsx(SidebarLink, { name: c.name, path: c.path, icon: c.icon, lock: c.lock, beta: c.beta, titleForLock: titleForLock, active: prop.match !== null, betaTagColor: c.betaTagColor, primaryColor: c.primaryColor, secondaryColor: c.secondaryColor, isSub: true })); } }), c.name)); }) })) })))] })));
|
37
|
+
}
|
38
|
+
export default memo(SidebarItemsGroup);
|
@@ -0,0 +1,37 @@
|
|
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 { Link, useLocation } from "@reach/router";
|
25
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
26
|
+
import useCustomTheme from "../useCustomTheme";
|
27
|
+
import SidebarItem from "./SidebarItem";
|
28
|
+
function SidebarLink(props) {
|
29
|
+
var pathname = useLocation().pathname;
|
30
|
+
var name = props.name, path = props.path, icon = props.icon, lock = props.lock, beta = props.beta, active = props.active, titleForLock = props.titleForLock, betaTagColor = props.betaTagColor, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["name", "path", "icon", "lock", "beta", "active", "titleForLock", "betaTagColor", "primaryColor", "secondaryColor"]);
|
31
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
32
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Link, __assign({ to: lock ? pathname : path, title: lock ? titleForLock || "Feature is unavailable on Free plan" : name, style: {
|
33
|
+
color: primaryColor || theme.palette.primary.main,
|
34
|
+
textDecoration: "none"
|
35
|
+
} }, { children: _jsx(SidebarItem, __assign({ name: name, icon: icon, lock: lock, beta: beta, active: active, betaTagColor: betaTagColor, primaryColor: primaryColor, secondaryColor: secondaryColor }, rest), name) })) })));
|
36
|
+
}
|
37
|
+
export default SidebarLink;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import SidebarItem from "./SidebarItem";
|
2
|
+
import SidebarItemsGroup from "./SidebarItemsGroup";
|
3
|
+
import { SidebarProps } from "./types";
|
4
|
+
declare function Sidebar(props: SidebarProps): JSX.Element;
|
5
|
+
export default Sidebar;
|
6
|
+
export { SidebarItem, SidebarItemsGroup };
|
7
|
+
export * from "./types";
|
package/Sidebar/index.js
ADDED
@@ -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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
+
import { Match } from "@reach/router";
|
14
|
+
import List from "@mui/material/List";
|
15
|
+
import useTheme from "@mui/material/styles/useTheme";
|
16
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
17
|
+
import SidebarItem from "./SidebarItem";
|
18
|
+
import SidebarItemsGroup from "./SidebarItemsGroup";
|
19
|
+
import SidebarLink from "./SidebarLink";
|
20
|
+
function Sidebar(props) {
|
21
|
+
var items = props.items;
|
22
|
+
var theme = useTheme();
|
23
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(List, { children: items.map(function (i) {
|
24
|
+
var children = i.children, path = i.path, icon = i.icon, name = i.name, lock = i.lock, beta = i.beta, titleForLock = i.titleForLock, betaTagColor = i.betaTagColor, primaryColor = i.primaryColor, secondaryColor = i.secondaryColor;
|
25
|
+
return children ? (_jsx(SidebarItemsGroup, { item: i }, name)) : (_jsx(Match, __assign({ path: path === "/" ? path : path.concat("/*") }, { children: function (prop) { return (_jsx(SidebarLink, { name: name, path: path, icon: icon, lock: lock, beta: beta, titleForLock: titleForLock, active: prop.match !== null, betaTagColor: betaTagColor, primaryColor: primaryColor, secondaryColor: secondaryColor }, name)); } }), name));
|
26
|
+
}) }) })));
|
27
|
+
}
|
28
|
+
export default Sidebar;
|
29
|
+
export { SidebarItem, SidebarItemsGroup };
|
30
|
+
export * from "./types";
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { CSSProperties, ReactElement } from "react";
|
2
|
+
export interface SidebarItemBaseProps {
|
3
|
+
path: string;
|
4
|
+
name: string;
|
5
|
+
lock?: boolean;
|
6
|
+
beta?: boolean;
|
7
|
+
titleForLock?: string;
|
8
|
+
betaTagColor?: CSSProperties["color"];
|
9
|
+
primaryColor?: CSSProperties["color"];
|
10
|
+
secondaryColor?: CSSProperties["color"];
|
11
|
+
icon: ReactElement;
|
12
|
+
}
|
13
|
+
export interface SidebarBaseProps extends SidebarItemBaseProps {
|
14
|
+
children?: Array<SidebarItemBaseProps>;
|
15
|
+
}
|
16
|
+
export interface SidebarProps {
|
17
|
+
items: Array<SidebarBaseProps>;
|
18
|
+
}
|
19
|
+
export interface SidebarItemProps extends Omit<SidebarItemBaseProps, "path"> {
|
20
|
+
active?: boolean;
|
21
|
+
expand?: boolean;
|
22
|
+
isSub?: boolean;
|
23
|
+
hasChildren?: boolean;
|
24
|
+
onClick?: () => void;
|
25
|
+
}
|
26
|
+
export interface SidebarLinkProps extends SidebarItemProps {
|
27
|
+
path: string;
|
28
|
+
}
|
29
|
+
export interface SidebarItemsGroupProps {
|
30
|
+
item: SidebarBaseProps;
|
31
|
+
}
|
package/Sidebar/types.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { SocialInputProps } from "./types";
|
2
|
+
export declare function SocialInputFormat(str: string): string;
|
3
|
+
export declare function verifySocial(socialString: string): boolean;
|
4
|
+
declare function SocialInput(props: SocialInputProps): JSX.Element;
|
5
|
+
export default SocialInput;
|
6
|
+
export * from "./types";
|
@@ -0,0 +1,76 @@
|
|
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 InputAdornment from "@mui/material/InputAdornment";
|
27
|
+
import Visibility from "@mui/icons-material/Visibility";
|
28
|
+
import VisibilityOff from "@mui/icons-material/VisibilityOff";
|
29
|
+
import IconButton from "@mui/material/IconButton";
|
30
|
+
import TextField from "@mui/material/TextField";
|
31
|
+
import useInteractions from "./useInteractions";
|
32
|
+
import useCustomTheme from "../useCustomTheme";
|
33
|
+
export function SocialInputFormat(str) {
|
34
|
+
var digits = (str.match(/\d+/g) || []).join("");
|
35
|
+
var chars = digits.split("");
|
36
|
+
return chars.reduce(function (prev, curr, index) {
|
37
|
+
if (index === 3) {
|
38
|
+
return "".concat(prev, " - ").concat(curr);
|
39
|
+
}
|
40
|
+
else if (index === 5) {
|
41
|
+
return "".concat(prev, " - ").concat(curr);
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
return "".concat(prev).concat(curr);
|
45
|
+
}
|
46
|
+
}, "");
|
47
|
+
}
|
48
|
+
export function verifySocial(socialString) {
|
49
|
+
var reg = /^\d{3}\s?-\s?\d{2}\s?-\s?\d{4}$/g;
|
50
|
+
return reg.test(socialString);
|
51
|
+
}
|
52
|
+
function SocialInput(props) {
|
53
|
+
var value = props.value, _a = props.helperText, helperText = _a === void 0 ? "Please enter a valid SSN" : _a, error = props.error, verifyFn = props.verifyFn, onChange = props.onChange, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["value", "helperText", "error", "verifyFn", "onChange", "primaryColor", "secondaryColor"]);
|
54
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
55
|
+
var _b = useInteractions({
|
56
|
+
value: value
|
57
|
+
}), visible = _b.visible, valLength = _b.valLength, addMask = _b.addMask, onSwitching = _b.onSwitching;
|
58
|
+
var rifm = useRifm({
|
59
|
+
mask: true,
|
60
|
+
value: String(value),
|
61
|
+
onChange: onChange,
|
62
|
+
replace: addMask,
|
63
|
+
format: SocialInputFormat
|
64
|
+
});
|
65
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(TextField, __assign({ helperText: valLength > 0 && (verifyFn ? !verifyFn(value) : !verifySocial(value))
|
66
|
+
? helperText
|
67
|
+
: "", value: rifm.value, onChange: rifm.onChange, type: visible ? "text" : "password", error: error ||
|
68
|
+
(valLength > 0 &&
|
69
|
+
(verifyFn ? !verifyFn(value) : !verifySocial(value))), InputProps: {
|
70
|
+
endAdornment: (_jsx(InputAdornment, __assign({ position: "end" }, { children: valLength === 9 && (_jsx(IconButton, __assign({ "aria-label": "Toggle SSN visibility", onClick: onSwitching }, { children: visible ? _jsx(Visibility, {}) : _jsx(VisibilityOff, {}) }))) })))
|
71
|
+
}, InputLabelProps: {
|
72
|
+
shrink: true
|
73
|
+
} }, rest)) })));
|
74
|
+
}
|
75
|
+
export default SocialInput;
|
76
|
+
export * from "./types";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { CSSProperties } from "react";
|
2
|
+
import { TextFieldProps } from "@mui/material/TextField";
|
3
|
+
export interface SocialInputProps 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,26 @@
|
|
1
|
+
import { useCallback, useMemo, useState, useEffect } from "react";
|
2
|
+
function useInteractions(props) {
|
3
|
+
var value = props.value;
|
4
|
+
var _a = useState(false), visible = _a[0], setVisible = _a[1];
|
5
|
+
var valLength = useMemo(function () {
|
6
|
+
var digitsArr = String(value).match(/\d/g);
|
7
|
+
return digitsArr ? digitsArr.length : 0;
|
8
|
+
}, [value]);
|
9
|
+
var addMask = useCallback(function (str) {
|
10
|
+
var digits = (str.match(/\d+/g) || []).join("");
|
11
|
+
var headerCode = digits.slice(0, 3).padEnd(3, "_");
|
12
|
+
var middleCode = digits.slice(3, 5).padEnd(2, "_");
|
13
|
+
var tailCode = digits.slice(5, 9).padEnd(4, "_");
|
14
|
+
return "".concat(headerCode, " - ").concat(middleCode, " - ").concat(tailCode);
|
15
|
+
}, []);
|
16
|
+
var onSwitching = useCallback(function () {
|
17
|
+
setVisible(function (v) { return !v; });
|
18
|
+
}, []);
|
19
|
+
useEffect(function () {
|
20
|
+
if (!visible && valLength !== 9) {
|
21
|
+
setVisible(true);
|
22
|
+
}
|
23
|
+
}, [valLength, visible]);
|
24
|
+
return { visible: visible, valLength: valLength, addMask: addMask, onSwitching: onSwitching };
|
25
|
+
}
|
26
|
+
export default useInteractions;
|
package/TabGroup/index.js
CHANGED
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
10
10
|
return __assign.apply(this, arguments);
|
11
11
|
};
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
-
import { useState, forwardRef, useImperativeHandle } from "react";
|
13
|
+
import { useState, useEffect, forwardRef, useImperativeHandle } from "react";
|
14
14
|
import Tab from "@mui/material/Tab";
|
15
15
|
import Tabs from "@mui/material/Tabs";
|
16
16
|
import Typography from "@mui/material/Typography";
|
@@ -18,30 +18,35 @@ import useMediaQuery from "@mui/material/useMediaQuery";
|
|
18
18
|
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
19
19
|
import useCustomTheme from "../useCustomTheme";
|
20
20
|
var TabGroup = forwardRef(function (props, ref) {
|
21
|
-
var tabs = props.tabs, _a = props.textColor, textColor = _a === void 0 ? "primary" : _a, _b = props.variant, variant = _b === void 0 ? "scrollable" : _b, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onTabChange = props.onTabChange,
|
21
|
+
var tabs = props.tabs, _a = props.textColor, textColor = _a === void 0 ? "primary" : _a, _b = props.variant, variant = _b === void 0 ? "scrollable" : _b, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onTabChange = props.onTabChange, outerTabIndex = props.currentTabIndex;
|
22
22
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
23
23
|
var mobileViewport = useMediaQuery(theme.breakpoints.down("md"));
|
24
|
-
var
|
24
|
+
var _c = useState(outerTabIndex || 0), currentTabIndex = _c[0], setCurrentTabIndex = _c[1];
|
25
25
|
var onClick = function (index) {
|
26
26
|
setCurrentTabIndex(index);
|
27
27
|
};
|
28
28
|
useImperativeHandle(ref, function () { return ({
|
29
29
|
tabIndex: currentTabIndex
|
30
30
|
}); });
|
31
|
+
useEffect(function () {
|
32
|
+
if (outerTabIndex !== undefined && outerTabIndex !== currentTabIndex) {
|
33
|
+
setCurrentTabIndex(outerTabIndex);
|
34
|
+
}
|
35
|
+
}, [outerTabIndex, currentTabIndex]);
|
31
36
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tabs, __assign({ value: currentTabIndex, TabIndicatorProps: { hidden: true }, variant: mobileViewport ? "scrollable" : variant, textColor: textColor, onChange: function (_, val) {
|
32
37
|
onClick(val);
|
33
38
|
onTabChange(val);
|
34
39
|
} }, { children: tabs.map(function (tab, index) {
|
35
40
|
var text = tab.text, _a = tab.disabled, disabled = _a === void 0 ? false : _a;
|
36
41
|
var active = currentTabIndex === index;
|
37
|
-
return (_jsx(Tab, { disableFocusRipple: true, disableRipple: true, label: _jsx(Typography, __assign({ variant: "body2" }, { children: text })
|
42
|
+
return (_jsx(Tab, { disableFocusRipple: true, disableRipple: true, label: _jsx(Typography, __assign({ variant: "body2" }, { children: text })), disabled: disabled, sx: {
|
38
43
|
cursor: disabled ? "not-allowed" : "pointer",
|
39
44
|
margin: theme.spacing(0.75, 0.25),
|
40
45
|
background: active ? "#fff" : undefined,
|
41
46
|
borderRadius: active ? theme.spacing(0.5) : undefined,
|
42
47
|
boxShadow: active ? "0px 4px 6px #acc1c2" : undefined
|
43
48
|
} }, index));
|
44
|
-
}) })
|
49
|
+
}) })) })));
|
45
50
|
});
|
46
51
|
export default TabGroup;
|
47
52
|
export * from "./types";
|
@@ -0,0 +1,27 @@
|
|
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 Box from "@mui/material/Box";
|
14
|
+
import IconButton from "@mui/material/IconButton";
|
15
|
+
import FirstPageIcon from "@mui/icons-material/FirstPage";
|
16
|
+
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
|
17
|
+
import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight";
|
18
|
+
import LastPageIcon from "@mui/icons-material/LastPage";
|
19
|
+
import useInteractions from "./useInteractions";
|
20
|
+
import useCustomTheme from "../useCustomTheme";
|
21
|
+
function TablePaginationActions(props) {
|
22
|
+
var count = props.count, page = props.page, rowsPerPage = props.rowsPerPage, onPageChange = props.onPageChange;
|
23
|
+
var theme = useCustomTheme();
|
24
|
+
var _a = useInteractions({ count: count, page: page, rowsPerPage: rowsPerPage, onPageChange: onPageChange }), onBackButtonClick = _a.onBackButtonClick, onNextButtonClick = _a.onNextButtonClick, onLastPageButtonClick = _a.onLastPageButtonClick, onFirstPageButtonClick = _a.onFirstPageButtonClick;
|
25
|
+
return (_jsxs(Box, __assign({ sx: { flexShrink: 0, ml: 2.5 } }, { children: [_jsx(IconButton, __assign({ onClick: onFirstPageButtonClick, disabled: page === 0, "aria-label": "first page" }, { children: theme.direction === "rtl" ? _jsx(LastPageIcon, {}) : _jsx(FirstPageIcon, {}) })), _jsx(IconButton, __assign({ onClick: onBackButtonClick, disabled: page === 0, "aria-label": "previous page" }, { children: theme.direction === "rtl" ? (_jsx(KeyboardArrowRight, {})) : (_jsx(KeyboardArrowLeft, {})) })), _jsx(IconButton, __assign({ onClick: onNextButtonClick, disabled: page >= Math.ceil(count / rowsPerPage) - 1, "aria-label": "next page" }, { children: theme.direction === "rtl" ? (_jsx(KeyboardArrowLeft, {})) : (_jsx(KeyboardArrowRight, {})) })), _jsx(IconButton, __assign({ onClick: onLastPageButtonClick, disabled: page >= Math.ceil(count / rowsPerPage) - 1, "aria-label": "last page" }, { children: theme.direction === "rtl" ? _jsx(FirstPageIcon, {}) : _jsx(LastPageIcon, {}) }))] })));
|
26
|
+
}
|
27
|
+
export default TablePaginationActions;
|
@@ -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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
+
import TableRow from "@mui/material/TableRow";
|
14
|
+
import TableFooter from "@mui/material/TableFooter";
|
15
|
+
import TablePagination from "@mui/material/TablePagination";
|
16
|
+
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
17
|
+
import TablePaginationActions from "./Actions";
|
18
|
+
import useCustomTheme from "../useCustomTheme";
|
19
|
+
function Pagination(props) {
|
20
|
+
var colSpan = props.colSpan, count = props.count, page = props.page, rowsPerPage = props.rowsPerPage, _a = props.rowsPerPageOptions, rowsPerPageOptions = _a === void 0 ? [5, 10, 20, 30] : _a, onPageChange = props.onPageChange, onRowsPerPageChange = props.onRowsPerPageChange, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
|
21
|
+
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
22
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: count && (_jsx(TableFooter, { children: _jsx(TableRow, { children: _jsx(TablePagination, { colSpan: colSpan, count: count, rowsPerPage: rowsPerPage, page: page, SelectProps: {
|
23
|
+
inputProps: {
|
24
|
+
"aria-label": "rows per page",
|
25
|
+
},
|
26
|
+
native: true,
|
27
|
+
}, rowsPerPageOptions: rowsPerPageOptions, onPageChange: onPageChange, onRowsPerPageChange: onRowsPerPageChange, ActionsComponent: TablePaginationActions }) }) })) })));
|
28
|
+
}
|
29
|
+
export default Pagination;
|
30
|
+
export * from "./types";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { MouseEvent, ChangeEvent, CSSProperties } from "react";
|
2
|
+
export interface TablePaginationActionsProps {
|
3
|
+
count: number;
|
4
|
+
page: number;
|
5
|
+
rowsPerPage: number;
|
6
|
+
onPageChange: (event: MouseEvent<HTMLButtonElement> | null, newPage: number) => void;
|
7
|
+
}
|
8
|
+
export interface TablePaginationProps extends TablePaginationActionsProps {
|
9
|
+
colSpan: number;
|
10
|
+
rowsPerPageOptions?: Array<number>;
|
11
|
+
onRowsPerPageChange: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
12
|
+
primaryColor?: CSSProperties["color"];
|
13
|
+
secondaryColor?: CSSProperties["color"];
|
14
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { MouseEvent } from "react";
|
2
|
+
interface InteractionProps {
|
3
|
+
count: number;
|
4
|
+
page: number;
|
5
|
+
rowsPerPage: number;
|
6
|
+
onPageChange: (event: MouseEvent<HTMLButtonElement> | null, newPage: number) => void;
|
7
|
+
}
|
8
|
+
declare function useInteractions(props: InteractionProps): {
|
9
|
+
onBackButtonClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
10
|
+
onNextButtonClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
11
|
+
onLastPageButtonClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
12
|
+
onFirstPageButtonClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
13
|
+
};
|
14
|
+
export default useInteractions;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { useCallback } from "react";
|
2
|
+
function useInteractions(props) {
|
3
|
+
var count = props.count, page = props.page, rowsPerPage = props.rowsPerPage, onPageChange = props.onPageChange;
|
4
|
+
var onFirstPageButtonClick = useCallback(function (event) {
|
5
|
+
onPageChange(event, 0);
|
6
|
+
}, [onPageChange]);
|
7
|
+
var onBackButtonClick = useCallback(function (event) {
|
8
|
+
onPageChange(event, page - 1);
|
9
|
+
}, [onPageChange, page]);
|
10
|
+
var onNextButtonClick = useCallback(function (event) {
|
11
|
+
onPageChange(event, page + 1);
|
12
|
+
}, [onPageChange, page]);
|
13
|
+
var onLastPageButtonClick = useCallback(function (event) {
|
14
|
+
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
15
|
+
}, [count, onPageChange, rowsPerPage]);
|
16
|
+
return {
|
17
|
+
onBackButtonClick: onBackButtonClick,
|
18
|
+
onNextButtonClick: onNextButtonClick,
|
19
|
+
onLastPageButtonClick: onLastPageButtonClick,
|
20
|
+
onFirstPageButtonClick: onFirstPageButtonClick,
|
21
|
+
};
|
22
|
+
}
|
23
|
+
export default useInteractions;
|
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;
|
package/TextInput/index.js
CHANGED
@@ -27,12 +27,22 @@ import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
|
27
27
|
import useInteractions from "./useInteractions";
|
28
28
|
import useCustomTheme from "../useCustomTheme";
|
29
29
|
var TextInput = function (props) {
|
30
|
-
var _a = props.type, type = _a === void 0 ? "text" : _a, onChange = props.onChange, value = props.value, _b = props.size, size = _b === void 0 ? "small" : _b, tooltip = props.tooltip, _c = props.maxLength, maxLength = _c === void 0 ? 999 : _c, _d = props.minLength, minLength = _d === void 0 ? 0 : _d, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, rest = __rest(props, ["type", "onChange", "value", "size", "tooltip", "maxLength", "minLength", "primaryColor", "secondaryColor"]);
|
30
|
+
var _a = props.type, type = _a === void 0 ? "text" : _a, onChange = props.onChange, value = props.value, _b = props.size, size = _b === void 0 ? "small" : _b, tooltip = props.tooltip, _c = props.maxLength, maxLength = _c === void 0 ? 999 : _c, _d = props.minLength, minLength = _d === void 0 ? 0 : _d, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onBlur = props.onBlur, onFocus = props.onFocus, rest = __rest(props, ["type", "onChange", "value", "size", "tooltip", "maxLength", "minLength", "primaryColor", "secondaryColor", "onBlur", "onFocus"]);
|
31
31
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
32
32
|
var _e = useInteractions(), tooltipOpen = _e.tooltipOpen, onOpenTooltip = _e.onOpenTooltip, onCloseTooltip = _e.onCloseTooltip;
|
33
|
-
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: type, value: value, onFocus:
|
33
|
+
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: type, value: value, onFocus: function (event) {
|
34
|
+
onOpenTooltip();
|
35
|
+
if (onFocus) {
|
36
|
+
onFocus(event);
|
37
|
+
}
|
38
|
+
}, onBlur: function (event) {
|
39
|
+
onCloseTooltip();
|
40
|
+
if (onBlur) {
|
41
|
+
onBlur(event);
|
42
|
+
}
|
43
|
+
}, onChange: function (event) {
|
34
44
|
event.preventDefault();
|
35
45
|
onChange(event.target.value);
|
36
|
-
}, inputProps: { maxLength: maxLength, minLength: minLength } }, rest)
|
46
|
+
}, inputProps: { maxLength: maxLength, minLength: minLength } }, rest)) })) })));
|
37
47
|
};
|
38
48
|
export default TextInput;
|
@@ -34,7 +34,7 @@ import { green, amber, red, blue } from "@mui/material/colors";
|
|
34
34
|
import useCustomTheme from "../useCustomTheme";
|
35
35
|
var ToastPrompt = function (props) {
|
36
36
|
var _a;
|
37
|
-
var _b = props.open, open = _b === void 0 ? false : _b, _c = props.vertical, vertical = _c === void 0 ? "top" : _c, _d = props.horizontal, horizontal = _d === void 0 ? "center" : _d, _e = props.timeout, timeout = _e === void 0 ? 3000 : _e, onClose = props.onClose, _f = props.transitionDirection, transitionDirection = _f === void 0 ? "down" : _f, _g = props.message, message = _g === void 0 ? "Unknown message" : _g, _h = props.icon, icon = _h === void 0 ? _jsx(_Fragment, {}
|
37
|
+
var _b = props.open, open = _b === void 0 ? false : _b, _c = props.vertical, vertical = _c === void 0 ? "top" : _c, _d = props.horizontal, horizontal = _d === void 0 ? "center" : _d, _e = props.timeout, timeout = _e === void 0 ? 3000 : _e, onClose = props.onClose, _f = props.transitionDirection, transitionDirection = _f === void 0 ? "down" : _f, _g = props.message, message = _g === void 0 ? "Unknown message" : _g, _h = props.icon, icon = _h === void 0 ? _jsx(_Fragment, {}) : _h, _j = props.variant, variant = _j === void 0 ? "info" : _j, other = __rest(props, ["open", "vertical", "horizontal", "timeout", "onClose", "transitionDirection", "message", "icon", "variant"]);
|
38
38
|
var theme = useCustomTheme();
|
39
39
|
var styles = {
|
40
40
|
success: {
|
@@ -51,7 +51,7 @@ var ToastPrompt = function (props) {
|
|
51
51
|
}
|
52
52
|
};
|
53
53
|
var Transition = function (args) {
|
54
|
-
return _jsx(Slide, __assign({}, args, { direction: transitionDirection })
|
54
|
+
return _jsx(Slide, __assign({}, args, { direction: transitionDirection }));
|
55
55
|
};
|
56
56
|
var VariantIcon = {
|
57
57
|
success: SuccessIcon,
|
@@ -76,6 +76,6 @@ var ToastPrompt = function (props) {
|
|
76
76
|
fontSize: 20,
|
77
77
|
opacity: 0.9,
|
78
78
|
marginRight: theme.spacing(1)
|
79
|
-
} }
|
79
|
+
} })) : (_jsx(_Fragment, { children: icon })), message] })) }, other)) }), "".concat(Date.now() * Math.round(Math.random()))) })));
|
80
80
|
};
|
81
81
|
export default ToastPrompt;
|
package/ToastPrompt/index.js
CHANGED
@@ -22,7 +22,7 @@ export var PromptProvider = function (props) {
|
|
22
22
|
var _a = ((toastRef === null || toastRef === void 0 ? void 0 : toastRef.current) || {}).show, show = _a === void 0 ? function () { } : _a;
|
23
23
|
show(type, message, timeout);
|
24
24
|
}
|
25
|
-
return (_jsx(PromptContext.Provider, __assign({ value: { showPrompt: showPrompt } }, { children: _jsxs(_Fragment, { children: [children, _jsx(Logics, __assign({ ref: toastRef }, { children: _jsx(ToastPrompt, {}
|
25
|
+
return (_jsx(PromptContext.Provider, __assign({ value: { showPrompt: showPrompt } }, { children: _jsxs(_Fragment, { children: [children, _jsx(Logics, __assign({ ref: toastRef }, { children: _jsx(ToastPrompt, {}) }))] }) })));
|
26
26
|
};
|
27
27
|
export function usePrompt() {
|
28
28
|
return useContext(PromptContext);
|
@@ -1,6 +1,4 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { ReactPlayerProps } from "react-player";
|
3
1
|
import { VideoPlayerModalProps } from "./types";
|
4
|
-
declare function VideoPlayerModal(props: VideoPlayerModalProps
|
2
|
+
declare function VideoPlayerModal(props: VideoPlayerModalProps): JSX.Element;
|
5
3
|
export default VideoPlayerModal;
|
6
4
|
export * from "./types";
|
@@ -35,9 +35,9 @@ function VideoPlayerModal(props) {
|
|
35
35
|
var url = props.url, _a = props.pip, pip = _a === void 0 ? false : _a, _b = props.open, open = _b === void 0 ? false : _b, title = props.title, onClose = props.onClose, _c = props.extraButtons, extraButtons = _c === void 0 ? [] : _c, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, playerProps = __rest(props, ["url", "pip", "open", "title", "onClose", "extraButtons", "primaryColor", "secondaryColor"]);
|
36
36
|
var theme = useCustomTheme();
|
37
37
|
var fullScreen = useMediaQuery(theme.breakpoints.down("sm"));
|
38
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Dialog, __assign({ open: open, fullScreen: fullScreen, onClose: onClose, fullWidth: true, maxWidth: "lg", "aria-labelledby": "react-video-dialog" }, { children: [title && _jsx(DialogTitle, { children: title }
|
38
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Dialog, __assign({ open: open, fullScreen: fullScreen, onClose: onClose, fullWidth: true, maxWidth: "lg", "aria-labelledby": "react-video-dialog" }, { children: [title && _jsx(DialogTitle, { children: title }), _jsx(DialogContent, { children: _jsx(ReactPlayer, __assign({ controls: true, url: url, style: { minHeight: "480px" }, width: "100%", config: {
|
39
39
|
file: { attributes: { disablePictureInPicture: !pip } }
|
40
|
-
} }, playerProps)
|
40
|
+
} }, playerProps)) }), _jsxs(DialogActions, { children: [extraButtons.map(function (buttonProps, index) { return (_jsx(Grid, __assign({ item: true, xs: 12, md: 3, lg: 2 }, { children: _jsx(Button, __assign({}, buttonProps)) }), "extraButton_".concat(index))); }), _jsx(Button, __assign({ variant: "outlined", color: "secondary", onClick: onClose }, { children: "Close" }))] })] })) })));
|
41
41
|
}
|
42
42
|
export default VideoPlayerModal;
|
43
43
|
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;
|