@learningpool/ui 1.3.0 → 1.4.0-beta.3

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.
Files changed (71) hide show
  1. package/assets/Images.d.ts +6 -0
  2. package/assets/Images.js +15 -0
  3. package/components/atoms/Autocomplete/Autocomplete.js +1 -2
  4. package/components/atoms/Button/Button.d.ts +2 -2
  5. package/components/atoms/Button/Button.js +1 -2
  6. package/components/atoms/Checkbox/Checkbox.js +1 -2
  7. package/components/atoms/IconButton/IconButton.js +1 -2
  8. package/components/atoms/Radio/Radio.js +1 -2
  9. package/components/atoms/Select/Select.js +1 -2
  10. package/components/atoms/Slider/Slider.js +1 -2
  11. package/components/atoms/Switch/Switch.js +1 -2
  12. package/components/atoms/TextField/TextField.js +1 -2
  13. package/components/atoms/ToggleButton/ToggleButton.js +1 -2
  14. package/components/datadisplay/Avatar/Avatar.js +16 -2
  15. package/components/datadisplay/Chip/Chip.js +1 -2
  16. package/components/datadisplay/List/List.js +1 -2
  17. package/components/datadisplay/Tooltip/Tooltip.js +1 -2
  18. package/components/feedback/Alert/Alert.js +1 -2
  19. package/components/navigation/Drawer/Drawer.d.ts +4 -1
  20. package/components/navigation/Drawer/Drawer.js +21 -2
  21. package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +18 -0
  22. package/components/navigation/VerticalNavigation/VerticalNavigation.js +194 -0
  23. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +94 -0
  24. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +146 -0
  25. package/components/pages/ErrorPage/ErrorPage.d.ts +8 -0
  26. package/components/pages/ErrorPage/ErrorPage.js +27 -0
  27. package/components/pages/ErrorPage/ErrorPageStyles.d.ts +28 -0
  28. package/components/pages/ErrorPage/ErrorPageStyles.js +32 -0
  29. package/components/pages/SideInSide/SideInSide.d.ts +2 -0
  30. package/components/pages/SideInSide/SideInSide.js +39 -0
  31. package/components/pages/SideInSide/SideInSideStyles.d.ts +12 -0
  32. package/components/pages/SideInSide/SideInSideStyles.js +60 -0
  33. package/index.d.ts +9 -0
  34. package/index.js +10 -0
  35. package/package.json +30 -25
  36. package/readme.md +9 -8
  37. package/utils/theme.js +10 -0
  38. package/components/atoms/Autocomplete/AutocompleteStyles.d.ts +0 -7
  39. package/components/atoms/Autocomplete/AutocompleteStyles.js +0 -2
  40. package/components/atoms/Button/ButtonStyles.d.ts +0 -7
  41. package/components/atoms/Button/ButtonStyles.js +0 -2
  42. package/components/atoms/Checkbox/CheckboxStyles.d.ts +0 -7
  43. package/components/atoms/Checkbox/CheckboxStyles.js +0 -2
  44. package/components/atoms/IconButton/IconButtonStyles.d.ts +0 -7
  45. package/components/atoms/IconButton/IconButtonStyles.js +0 -2
  46. package/components/atoms/Radio/RadioStyles.d.ts +0 -7
  47. package/components/atoms/Radio/RadioStyles.js +0 -2
  48. package/components/atoms/Select/SelectStyles.d.ts +0 -7
  49. package/components/atoms/Select/SelectStyles.js +0 -2
  50. package/components/atoms/Slider/SliderStyles.d.ts +0 -7
  51. package/components/atoms/Slider/SliderStyles.js +0 -2
  52. package/components/atoms/Switch/SwitchStyles.d.ts +0 -7
  53. package/components/atoms/Switch/SwitchStyles.js +0 -2
  54. package/components/atoms/TextField/TextFieldStyles.d.ts +0 -7
  55. package/components/atoms/TextField/TextFieldStyles.js +0 -2
  56. package/components/atoms/ToggleButton/ToggleButtonStyles.d.ts +0 -7
  57. package/components/atoms/ToggleButton/ToggleButtonStyles.js +0 -2
  58. package/components/datadisplay/Avatar/AvatarStyles.d.ts +0 -7
  59. package/components/datadisplay/Avatar/AvatarStyles.js +0 -14
  60. package/components/datadisplay/Chip/ChipStyles.d.ts +0 -7
  61. package/components/datadisplay/Chip/ChipStyles.js +0 -2
  62. package/components/datadisplay/List/ListStyles.d.ts +0 -7
  63. package/components/datadisplay/List/ListStyles.js +0 -2
  64. package/components/datadisplay/Tooltip/TooltipStyles.d.ts +0 -7
  65. package/components/datadisplay/Tooltip/TooltipStyles.js +0 -2
  66. package/components/feedback/Alert/AlertStyles.d.ts +0 -7
  67. package/components/feedback/Alert/AlertStyles.js +0 -2
  68. package/components/index.d.ts +0 -1
  69. package/components/index.js +0 -3
  70. package/components/navigation/Drawer/DrawerStyles.d.ts +0 -7
  71. package/components/navigation/Drawer/DrawerStyles.js +0 -2
@@ -0,0 +1,94 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react-addons-linked-state-mixin" />
3
+ import { Theme } from '@mui/material';
4
+ import { CSSObject } from '@mui/material/styles';
5
+ export declare const DRAWER_WIDTH: {
6
+ Collapsed: number;
7
+ Expanded: number;
8
+ };
9
+ export declare const paperStyles: (theme: Theme) => CSSObject;
10
+ export declare const openedMixin: (theme: Theme) => CSSObject;
11
+ export declare const closedMixin: (theme: Theme) => CSSObject;
12
+ export declare const DrawerHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const ListItem: import("@emotion/styled").StyledComponent<{
14
+ button?: false | undefined;
15
+ } & import("@mui/material").ListItemBaseProps & {
16
+ components?: {
17
+ Root?: import("react").ElementType<any> | undefined;
18
+ } | undefined;
19
+ componentsProps?: {
20
+ root?: (import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides) | undefined;
21
+ } | undefined;
22
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
23
+ ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
24
+ }, "className" | "style" | "classes" | "button" | "children" | "sx" | "alignItems" | "disabled" | "autoFocus" | "selected" | "dense" | "components" | "componentsProps" | "disablePadding" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "divider" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
25
+ export declare const DrawerToggle: import("@emotion/styled").StyledComponent<{
26
+ children?: import("react").ReactNode;
27
+ classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
28
+ color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | "default" | undefined;
29
+ disabled?: boolean | undefined;
30
+ disableFocusRipple?: boolean | undefined;
31
+ edge?: false | "end" | "start" | undefined;
32
+ size?: "small" | "large" | "medium" | undefined;
33
+ sx?: import("@mui/material").SxProps<Theme> | undefined;
34
+ } & Omit<{
35
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
36
+ centerRipple?: boolean | undefined;
37
+ children?: import("react").ReactNode;
38
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
39
+ disabled?: boolean | undefined;
40
+ disableRipple?: boolean | undefined;
41
+ disableTouchRipple?: boolean | undefined;
42
+ focusRipple?: boolean | undefined;
43
+ focusVisibleClassName?: string | undefined;
44
+ LinkComponent?: import("react").ElementType<any> | undefined;
45
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
46
+ sx?: import("@mui/material").SxProps<Theme> | undefined;
47
+ tabIndex?: number | undefined;
48
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
49
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
50
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
51
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
52
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
53
+ export declare const DrawerToggleHitboxContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
54
+ export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
55
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
56
+ centerRipple?: boolean | undefined;
57
+ children?: import("react").ReactNode;
58
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
59
+ disabled?: boolean | undefined;
60
+ disableRipple?: boolean | undefined;
61
+ disableTouchRipple?: boolean | undefined;
62
+ focusRipple?: boolean | undefined;
63
+ focusVisibleClassName?: string | undefined;
64
+ LinkComponent?: import("react").ElementType<any> | undefined;
65
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
66
+ sx?: import("@mui/material").SxProps<Theme> | undefined;
67
+ tabIndex?: number | undefined;
68
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
69
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
70
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
71
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
72
+ }, "className" | "style" | "classes" | "tabIndex" | "children" | "sx" | "alignItems" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
73
+ export declare const ListItemAvatar: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
74
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
75
+ centerRipple?: boolean | undefined;
76
+ children?: import("react").ReactNode;
77
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
78
+ disabled?: boolean | undefined;
79
+ disableRipple?: boolean | undefined;
80
+ disableTouchRipple?: boolean | undefined;
81
+ focusRipple?: boolean | undefined;
82
+ focusVisibleClassName?: string | undefined;
83
+ LinkComponent?: import("react").ElementType<any> | undefined;
84
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
85
+ sx?: import("@mui/material").SxProps<Theme> | undefined;
86
+ tabIndex?: number | undefined;
87
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
88
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
89
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
90
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
91
+ }, "className" | "style" | "classes" | "tabIndex" | "children" | "sx" | "alignItems" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
92
+ children?: import("react").ReactNode;
93
+ }, {}, {}>;
94
+ export declare const ListItemIcon: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
@@ -0,0 +1,146 @@
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 { ListItem as SSListItem, ListItemButton as SSListItemButton, ListItemIcon as SSListItemIcon, IconButton } from '../../../index';
13
+ import { styled } from '@mui/material/styles';
14
+ export var DRAWER_WIDTH = {
15
+ Collapsed: 60,
16
+ Expanded: 250
17
+ };
18
+ export var paperStyles = function (theme) { return ({
19
+ backgroundColor: theme.palette.mode === 'dark'
20
+ ? theme.palette.primary.main
21
+ : theme.palette.background.paper,
22
+ border: 0,
23
+ color: theme.palette.mode === 'dark'
24
+ ? theme.palette.primary.contrastText
25
+ : theme.palette.getContrastText(theme.palette.background.paper),
26
+ boxShadow: 'none'
27
+ }); };
28
+ export var openedMixin = function (theme) { return ({
29
+ width: DRAWER_WIDTH.Expanded,
30
+ transition: 'width 225ms cubic-bezier(0, 0, 0.2, 1) 0ms !important',
31
+ overflowX: 'hidden',
32
+ boxShadow: 'none'
33
+ }); };
34
+ export var closedMixin = function (theme) {
35
+ var _a;
36
+ return (_a = {
37
+ transition: 'width 225ms cubic-bezier(0, 0, 0.2, 1) 0ms !important',
38
+ width: "calc(".concat(theme.spacing(7), " + 1px)")
39
+ },
40
+ _a[theme.breakpoints.up('sm')] = {
41
+ width: "calc(".concat(theme.spacing(8), " + 1px)")
42
+ },
43
+ _a.overflowX = 'hidden',
44
+ _a.boxShadow = theme.shadows[1],
45
+ _a);
46
+ };
47
+ export var DrawerHeader = styled('div')(function (_a) {
48
+ var _b;
49
+ var theme = _a.theme;
50
+ return (__assign(__assign({ display: 'flex', alignItems: 'center', justifyContent: 'flex-start', padding: "".concat(theme.spacing(1), " 10px 0") }, theme.mixins.toolbar), (_b = { backgroundColor: theme.palette.mode === 'dark'
51
+ ? theme.palette.primary.main
52
+ : theme.palette.background.paper, minHeight: '56px !important' }, _b[theme.breakpoints.up('sm')] = {
53
+ minHeight: '64px !important'
54
+ }, _b)));
55
+ });
56
+ export var ListItem = styled(SSListItem)(function (_a) {
57
+ var theme = _a.theme;
58
+ return ({
59
+ color: theme.palette.mode === 'dark'
60
+ ? theme.palette.primary.contrastText
61
+ : theme.palette.getContrastText(theme.palette.background.paper)
62
+ // paddingLeft: theme.spacing(2),
63
+ // paddingRight: theme.spacing(2),
64
+ // [theme.breakpoints.up('sm')]: {
65
+ // paddingLeft: theme.spacing(2.5),
66
+ // paddingRight: theme.spacing(2.5)
67
+ // }
68
+ });
69
+ });
70
+ export var DrawerToggle = styled(IconButton)(function (_a) {
71
+ var _b;
72
+ var theme = _a.theme;
73
+ return (_b = {
74
+ width: '44px',
75
+ height: '44px',
76
+ position: 'fixed',
77
+ zIndex: theme.zIndex.drawer + 1,
78
+ background: 'transparent',
79
+ paddingLeft: theme.spacing(2),
80
+ paddingRight: theme.spacing(2),
81
+ top: '80.5px'
82
+ },
83
+ _b[theme.breakpoints.up('sm')] = {
84
+ paddingLeft: theme.spacing(2.5),
85
+ paddingRight: theme.spacing(2.5),
86
+ top: '88.5px'
87
+ },
88
+ _b.transition = 'left 225ms cubic-bezier(0, 0, 0.2, 1) 0ms !important',
89
+ _b);
90
+ });
91
+ export var DrawerToggleHitboxContent = styled('span')(function (_a) {
92
+ var theme = _a.theme;
93
+ return ({
94
+ backgroundColor: theme.palette.mode === 'dark'
95
+ ? theme.palette.primary.main
96
+ : theme.palette.background.paper,
97
+ borderRadius: '50%',
98
+ boxShadow: '5px 0 15px 0 rgb(0 0 0 / 10%)',
99
+ height: '1.75rem',
100
+ padding: theme.spacing(0.5),
101
+ width: '1.75rem'
102
+ });
103
+ });
104
+ export var ListItemButton = styled(SSListItemButton)(function (_a) {
105
+ var _b;
106
+ var theme = _a.theme;
107
+ return (_b = {
108
+ alignItems: 'center',
109
+ color: theme.palette.mode === 'dark'
110
+ ? theme.palette.primary.contrastText
111
+ : theme.palette.getContrastText(theme.palette.background.paper),
112
+ display: 'flex',
113
+ textTransform: 'none',
114
+ textDecoration: 'none',
115
+ padding: "".concat(theme.spacing(1), " ").concat(theme.spacing(2))
116
+ },
117
+ _b[theme.breakpoints.up('sm')] = {
118
+ paddingLeft: theme.spacing(2.5),
119
+ paddingRight: theme.spacing(2.5)
120
+ },
121
+ _b.width = '100%',
122
+ _b);
123
+ });
124
+ export var ListItemAvatar = styled(ListItemButton)(function (_a) {
125
+ var theme = _a.theme;
126
+ return ({
127
+ minHeight: 48,
128
+ '& .MuiListItemIcon-root': {
129
+ justifyContent: 'center',
130
+ minWidth: 0,
131
+ marginLeft: '-4px'
132
+ },
133
+ '& .MuiAvatar-root': {
134
+ height: 32,
135
+ width: 32
136
+ }
137
+ });
138
+ });
139
+ export var ListItemIcon = styled(SSListItemIcon)(function (_a) {
140
+ var theme = _a.theme;
141
+ return ({
142
+ color: theme.palette.mode === 'dark'
143
+ ? theme.palette.primary.contrastText
144
+ : theme.palette.getContrastText(theme.palette.background.paper)
145
+ });
146
+ });
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface ErrorPageProps {
3
+ errorCode: string;
4
+ errorTitle: string;
5
+ errorMessage: string;
6
+ }
7
+ export default function ErrorPage(props: ErrorPageProps): React.ReactElement;
8
+ export {};
@@ -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 { LearningPoolLogo } from '../../../assets/Images';
14
+ import CssBaseline from '@mui/material/CssBaseline';
15
+ import Typography from '@mui/material/Typography';
16
+ import { createTheme, ThemeProvider } from '@mui/material/styles';
17
+ import { StyledContainer, StyledBox, StyledLogoBox } from './ErrorPageStyles';
18
+ export default function ErrorPage(props) {
19
+ var errorCode = props.errorCode, errorTitle = props.errorTitle, errorMessage = props.errorMessage;
20
+ var theme = createTheme();
21
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(StyledContainer, __assign({ component: 'main' }, { children: [_jsx(CssBaseline, {}), _jsxs(StyledBox, { children: [_jsxs(Typography, __assign({ component: 'h1', variant: 'h4', sx: {
22
+ mb: 2
23
+ } }, { children: [errorCode ? (_jsxs("span", { children: [errorCode, " | "] })) : '', _jsx("span", { children: errorTitle })] })), _jsx(Typography, __assign({ variant: 'body1', sx: {
24
+ color: 'text.secondary',
25
+ mb: 3
26
+ } }, { children: errorMessage }))] }), _jsx(StyledLogoBox, { children: _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '200px', height: '45px' } }) })] })) })));
27
+ }
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react-addons-linked-state-mixin" />
3
+ export declare const StyledContainer: import("@emotion/styled").StyledComponent<{
4
+ children?: import("react").ReactNode;
5
+ classes?: Partial<import("@mui/material/Container").ContainerClasses> | undefined;
6
+ disableGutters?: boolean | undefined;
7
+ fixed?: boolean | undefined;
8
+ maxWidth?: false | import("@mui/material/styles").Breakpoint | undefined;
9
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
10
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "fixed" | "maxWidth" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
13
+ export declare const StyledBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
14
+ children?: import("react").ReactNode;
15
+ component?: import("react").ElementType<any> | undefined;
16
+ ref?: import("react").Ref<unknown> | undefined;
17
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
18
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
19
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
20
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
21
+ export declare const StyledLogoBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
22
+ children?: import("react").ReactNode;
23
+ component?: import("react").ElementType<any> | undefined;
24
+ ref?: import("react").Ref<unknown> | undefined;
25
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
26
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
27
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
28
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,32 @@
1
+ import Box from '@mui/material/Box';
2
+ import Container from '@mui/material/Container';
3
+ import { styled } from '@mui/material/styles';
4
+ export var StyledContainer = styled(Container)(function () { return ({
5
+ display: 'flex',
6
+ flexDirection: 'column',
7
+ height: '100vh',
8
+ textAlign: 'center'
9
+ }); });
10
+ export var StyledBox = styled(Box)(function () { return ({
11
+ alignItems: 'center',
12
+ display: 'flex',
13
+ flex: '1',
14
+ flexDirection: 'column',
15
+ height: '100%',
16
+ justifyContent: 'center',
17
+ overflow: 'hidden'
18
+ }); });
19
+ export var StyledLogoBox = styled(Box)(function (_a) {
20
+ var _b;
21
+ var theme = _a.theme;
22
+ return (_b = {
23
+ alignSelf: 'center',
24
+ marginRight: 0,
25
+ marginBottom: theme.spacing(5)
26
+ },
27
+ _b[theme.breakpoints.up('md')] = {
28
+ alignSelf: 'flex-end',
29
+ marginRight: theme.spacing(5)
30
+ },
31
+ _b);
32
+ });
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export default function SideInSide(props: any): React.ReactElement;
@@ -0,0 +1,39 @@
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, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { Button } from '../../../index';
14
+ import CssBaseline from '@mui/material/CssBaseline';
15
+ import Paper from '@mui/material/Paper';
16
+ import Box from '@mui/material/Box';
17
+ import Grid from '@mui/material/Grid';
18
+ import Typography from '@mui/material/Typography';
19
+ import Divider from '@mui/material/Divider';
20
+ import { createTheme, ThemeProvider } from '@mui/material/styles';
21
+ import { SideInSideStyles } from './SideInSideStyles';
22
+ import { LearningPoolLogo, StreamSuiteLogo } from '../../../assets/Images';
23
+ import { Link } from '@mui/material';
24
+ function Copyright(props) {
25
+ return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary", align: "center" }, props, { children: ['Copyright © ', _jsx(Link, __assign({ color: "inherit", href: "https://learningpool.com/" }, { children: "Learning Pool" })), ' ', new Date().getFullYear(), '.'] })));
26
+ }
27
+ var theme = createTheme();
28
+ export default function SideInSide(props) {
29
+ var classes = SideInSideStyles(props).classes;
30
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Grid, __assign({ container: true, component: "main", className: classes.root, style: props === null || props === void 0 ? void 0 : props.style }, { children: [_jsx(CssBaseline, {}), _jsx(Grid, __assign({ item: true, xs: false, sm: false, md: 6, lg: 7, xl: 8, className: classes.pageBackgroundContainer }, { children: _jsx(Box, __assign({ className: classes.pageBackgroundLogoContainer }, { children: (props === null || props === void 0 ? void 0 : props.pageBackgroundLogo)
31
+ ? (_jsx("img", { src: "".concat(String(props.pageBackgroundLogo)), alt: "".concat(String(props.pageBackgroundLogoAlt)), className: classes.pageBackgroundLogo }))
32
+ : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '200px', width: '200px' } }) })) })), _jsx(Grid, __assign({ item: true, xs: 12, sm: 12, md: 6, lg: 5, xl: 4, component: Paper, elevation: 6, square: true }, { children: _jsxs(Box, __assign({ className: classes.contentPanel }, { children: [_jsx(Box, __assign({ className: classes.contentPanelImageContainer }, { children: (props === null || props === void 0 ? void 0 : props.formLogo)
33
+ ? (_jsx("img", { src: "".concat(String(props.formLogo)), alt: "".concat(String(props.formLogoAlt)), className: classes.contentPanelImage }))
34
+ : _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '250px', height: '60px' } }) })), _jsx(Typography, __assign({ component: "h1", variant: "h6" }, { children: props.welcomeMessage })), (props === null || props === void 0 ? void 0 : props.children) ? props.children : null, (props === null || props === void 0 ? void 0 : props.isStreamHomeEnabled)
35
+ ? (_jsxs(_Fragment, { children: [_jsx(Divider, __assign({ sx: { mt: 1 } }, { children: "Or" })), _jsx(Button, __assign({ type: "submit", onClick: props === null || props === void 0 ? void 0 : props.handleStreamHomeLogin, fullWidth: true, className: classes.streamHomeButton, startIcon: (props === null || props === void 0 ? void 0 : props.startIcon)
36
+ ? props.startIcon
37
+ : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '25px', width: '25px' } }) }, { children: "Log in with Stream Home" }))] }))
38
+ : null, _jsx(Box, __assign({ className: classes.footerContent }, { children: (props === null || props === void 0 ? void 0 : props.footerContent) ? props.footerContent : _jsx(Copyright, {}) }))] })) }))] })) })));
39
+ }
@@ -0,0 +1,12 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ export declare const SideInSideStyles: (params: void, styleOverrides?: {
3
+ props: {
4
+ classes?: Record<string, string> | undefined;
5
+ } & Record<string, unknown>;
6
+ ownerState?: Record<string, unknown> | undefined;
7
+ } | undefined) => {
8
+ classes: Record<"root" | "pageBackgroundContainer" | "pageBackgroundLogoContainer" | "pageBackgroundLogo" | "contentPanel" | "contentPanelImageContainer" | "contentPanelImage" | "submitButton" | "streamHomeButton" | "footerContent", string>;
9
+ theme: Theme;
10
+ css: import("tss-react/types").Css;
11
+ cx: import("tss-react/types").Cx;
12
+ };
@@ -0,0 +1,60 @@
1
+ import { makeStyles } from 'tss-react/mui';
2
+ export var SideInSideStyles = makeStyles()(function (theme, props) { return ({
3
+ root: {
4
+ height: '100vh',
5
+ width: '100%'
6
+ },
7
+ pageBackgroundContainer: {
8
+ backgroundImage: (props === null || props === void 0 ? void 0 : props.pageBackgroundImage)
9
+ ? "url(".concat(String(props.pageBackgroundImage), ")")
10
+ : 'url(https://source.unsplash.com/YWIOwHvRBvU)',
11
+ backgroundRepeat: 'no-repeat',
12
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[50] : theme.palette.grey[900],
13
+ backgroundSize: 'cover',
14
+ backgroundPosition: 'center',
15
+ flex: 1
16
+ },
17
+ pageBackgroundLogoContainer: {
18
+ alignItems: 'center',
19
+ display: 'flex',
20
+ flexDirection: 'column',
21
+ height: '100%',
22
+ justifyContent: 'center'
23
+ },
24
+ pageBackgroundLogo: {
25
+ maxWidth: '250px'
26
+ },
27
+ contentPanel: {
28
+ alignItems: 'center',
29
+ display: 'flex',
30
+ flexDirection: 'column',
31
+ height: '100%',
32
+ marginLeft: theme.spacing(6),
33
+ marginRight: theme.spacing(6),
34
+ paddingBottom: theme.spacing(2),
35
+ paddingTop: theme.spacing(8)
36
+ },
37
+ contentPanelImageContainer: {
38
+ alignItems: 'center',
39
+ display: 'flex',
40
+ flexDirection: 'column',
41
+ marginBottom: theme.spacing(3),
42
+ marginTop: theme.spacing(1)
43
+ },
44
+ contentPanelImage: {
45
+ maxWidth: '400px',
46
+ width: '66%'
47
+ },
48
+ submitButton: {
49
+ marginBottom: theme.spacing(2),
50
+ marginTop: theme.spacing(3)
51
+ },
52
+ streamHomeButton: {
53
+ marginBottom: "".concat(theme.spacing(5), " !important"),
54
+ marginTop: "".concat(theme.spacing(3), " !important")
55
+ },
56
+ footerContent: {
57
+ marginTop: 'auto',
58
+ width: '100%'
59
+ }
60
+ }); });
package/index.d.ts CHANGED
@@ -1,9 +1,17 @@
1
1
  export { default as Avatar } from './components/datadisplay/Avatar/Avatar';
2
2
  export { default as Button } from './components/atoms/Button/Button';
3
+ export { default as IconButton } from './components/atoms/IconButton/IconButton';
4
+ export { default as Checkbox } from './components/atoms/Checkbox/Checkbox';
5
+ export { default as TextField } from './components/atoms/TextField/TextField';
3
6
  export { default as Drawer } from './components/navigation/Drawer/Drawer';
4
7
  export { default as List } from './components/datadisplay/List/List';
8
+ export { default as Tooltip } from './components/datadisplay/Tooltip/Tooltip';
9
+ export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
10
+ export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
5
11
  export { default as AvatarGroup } from '@mui/material/AvatarGroup';
6
12
  export { default as Backdrop } from '@mui/material/Backdrop';
13
+ export { default as CircularProgress } from '@mui/material/CircularProgress';
14
+ export { default as LinearProgress } from '@mui/material/LinearProgress';
7
15
  export { default as ListItem } from '@mui/material/ListItem';
8
16
  export { default as ListItemAvatar } from '@mui/material/ListItemAvatar';
9
17
  export { default as ListItemButton } from '@mui/material/ListItemButton';
@@ -11,3 +19,4 @@ export { default as ListItemIcon } from '@mui/material/ListItemIcon';
11
19
  export { default as ListItemSecondaryAction } from '@mui/material/ListItemSecondaryAction';
12
20
  export { default as ListItemText } from '@mui/material/ListItemText';
13
21
  export { default as ListSubheader } from '@mui/material/ListSubheader';
22
+ export { default as VerticalNavigation } from './components/navigation/VerticalNavigation/VerticalNavigation';
package/index.js CHANGED
@@ -1,11 +1,19 @@
1
1
  // Learning Pool intercepted
2
2
  export { default as Avatar } from './components/datadisplay/Avatar/Avatar';
3
3
  export { default as Button } from './components/atoms/Button/Button';
4
+ export { default as IconButton } from './components/atoms/IconButton/IconButton';
5
+ export { default as Checkbox } from './components/atoms/Checkbox/Checkbox';
6
+ export { default as TextField } from './components/atoms/TextField/TextField';
4
7
  export { default as Drawer } from './components/navigation/Drawer/Drawer';
5
8
  export { default as List } from './components/datadisplay/List/List';
9
+ export { default as Tooltip } from './components/datadisplay/Tooltip/Tooltip';
10
+ export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
11
+ export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
6
12
  // Straight through MUI
7
13
  export { default as AvatarGroup } from '@mui/material/AvatarGroup';
8
14
  export { default as Backdrop } from '@mui/material/Backdrop';
15
+ export { default as CircularProgress } from '@mui/material/CircularProgress';
16
+ export { default as LinearProgress } from '@mui/material/LinearProgress';
9
17
  export { default as ListItem } from '@mui/material/ListItem';
10
18
  export { default as ListItemAvatar } from '@mui/material/ListItemAvatar';
11
19
  export { default as ListItemButton } from '@mui/material/ListItemButton';
@@ -13,3 +21,5 @@ export { default as ListItemIcon } from '@mui/material/ListItemIcon';
13
21
  export { default as ListItemSecondaryAction } from '@mui/material/ListItemSecondaryAction';
14
22
  export { default as ListItemText } from '@mui/material/ListItemText';
15
23
  export { default as ListSubheader } from '@mui/material/ListSubheader';
24
+ // Stream Suite components
25
+ export { default as VerticalNavigation } from './components/navigation/VerticalNavigation/VerticalNavigation';
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@learningpool/ui",
3
3
  "author": "Learning Pool",
4
+ "description": "UI library for use on modern Learning Pool projects, built on top of MUI.",
4
5
  "license": "MIT",
5
6
  "keywords": [
6
7
  "learning-pool",
@@ -8,15 +9,16 @@
8
9
  "components",
9
10
  "ui"
10
11
  ],
11
- "version": "1.3.0",
12
+ "version": "1.4.0-beta.3",
12
13
  "private": false,
13
14
  "main": "dist/index.js",
14
15
  "module": "dist/index.js",
15
16
  "dependencies": {
16
17
  "@emotion/react": "^11.7.1",
17
18
  "@emotion/styled": "^11.6.0",
18
- "@mui/icons-material": "^5.4.1",
19
- "@mui/material": "^5.3.1",
19
+ "@learningpool/app-switcher": "^1.0.4",
20
+ "@mui/icons-material": "^5.8.4",
21
+ "@mui/material": "^5.8.5",
20
22
  "@testing-library/jest-dom": "^5.16.1",
21
23
  "@testing-library/react": "^12.1.2",
22
24
  "@testing-library/user-event": "^13.5.0",
@@ -25,6 +27,7 @@
25
27
  "@types/react": "^17.0.38",
26
28
  "@types/react-dom": "^17.0.11",
27
29
  "anysort": "^2.0.0",
30
+ "focus-trap-react": "^8.11.0",
28
31
  "react": "^17.0.2",
29
32
  "react-dom": "^17.0.2",
30
33
  "react-scripts": "5.0.1",
@@ -36,14 +39,16 @@
36
39
  "analyze:build": "source-map-explorer 'build/static/js/*.js'",
37
40
  "analyze:module": "source-map-explorer 'dist/*.js'",
38
41
  "build": "build-storybook",
39
- "build:module": "rm -rf dist && yarn run tsc",
42
+ "build:module": "rm -rf dist && tsc && npm run generate:package",
43
+ "generate:package": "node ./merge.js",
40
44
  "lint": "eslint --ext .tsx ./src",
41
45
  "lint:fix": "eslint --ext .tsx ./src --fix",
42
46
  "semantic-release": "ht2-release-public-circleci-lib-dist",
43
47
  "start": "start-storybook -p 6006",
44
- "start:run-tests": "yarn test:generate-output && yarn start",
48
+ "start:run-tests": "npm run test:generate-output && npm run start",
45
49
  "test": "jest",
46
- "test:update-snapshot": "jest --updateSnapshot",
50
+ "test:u": "jest --updateSnapshot && npm run lint:fix",
51
+ "test:update-snapshot": "test:u",
47
52
  "test:generate-output": "jest --json --outputFile=.jest-test-results.json"
48
53
  },
49
54
  "browserslist": {
@@ -59,33 +64,33 @@
59
64
  ]
60
65
  },
61
66
  "devDependencies": {
62
- "@babel/cli": "7.17.6",
63
- "@babel/core": "7.17.8",
64
- "@babel/preset-env": "7.16.11",
65
- "@babel/preset-react": "7.16.7",
66
- "@babel/preset-typescript": "7.16.7",
67
- "@ht2-labs/semantic-release": "2.0.105",
68
- "@storybook/addon-a11y": "6.4.20",
69
- "@storybook/addon-actions": "6.5.0-alpha.57",
70
- "@storybook/addon-essentials": "6.5.0-alpha.57",
71
- "@storybook/addon-jest": "6.4.20",
72
- "@storybook/addon-links": "6.5.0-alpha.57",
73
- "@storybook/addons": "6.4.20",
74
- "@storybook/builder-webpack5": "6.5.0-alpha.57",
75
- "@storybook/manager-webpack5": "6.5.0-alpha.57",
76
- "@storybook/node-logger": "6.5.0-alpha.57",
67
+ "@babel/cli": "7.17.10",
68
+ "@babel/core": "7.18.5",
69
+ "@babel/preset-env": "7.18.2",
70
+ "@babel/preset-react": "7.17.12",
71
+ "@babel/preset-typescript": "7.17.12",
72
+ "@ht2-labs/semantic-release": "3.0.0",
73
+ "@storybook/addon-a11y": "6.5.6",
74
+ "@storybook/addon-actions": "6.5.6",
75
+ "@storybook/addon-essentials": "6.5.6",
76
+ "@storybook/addon-jest": "6.5.6",
77
+ "@storybook/addon-links": "6.5.6",
78
+ "@storybook/addons": "6.5.6",
79
+ "@storybook/builder-webpack5": "6.5.6",
80
+ "@storybook/manager-webpack5": "6.5.6",
81
+ "@storybook/node-logger": "6.5.6",
77
82
  "@storybook/preset-create-react-app": "4.1.1",
78
- "@storybook/react": "6.5.0-alpha.57",
79
- "@storybook/theming": "6.4.20",
83
+ "@storybook/react": "6.5.6",
84
+ "@storybook/theming": "6.5.6",
80
85
  "babel-preset-minify": "0.5.2",
81
86
  "eslint-config-standard": "16.0.3",
82
87
  "eslint-config-standard-with-typescript": "21.0.1",
83
88
  "eslint-plugin-node": "11.1.0",
84
- "eslint-plugin-promise": "6.0.0",
89
+ "eslint-plugin-promise": "4.3.1",
85
90
  "source-map-explorer": "2.5.2",
86
91
  "source-map-loader": "3.0.1",
87
92
  "ts-node": "10.8.0",
88
- "webpack": "5.71.0"
93
+ "webpack": "5.72.1"
89
94
  },
90
95
  "release": {
91
96
  "branches": [