@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
package/readme.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # @learningpool/ui
2
2
 
3
3
  ![npm (scoped)](https://img.shields.io/npm/v/@learningpool/ui)
4
+ ![npm (tag)](https://img.shields.io/npm/v/@learningpool/ui/beta)
4
5
  ![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/@learningpool/ui)
5
6
  ![NPM](https://img.shields.io/npm/l/@learningpool/ui)
6
7
  ![Website](https://img.shields.io/website?label=documentation&url=https%3A%2F%2Fmain.d5creizgamf62.amplifyapp.com)
@@ -13,13 +14,13 @@ Our documentation is provided via [Storybook](https://storybook.js.org) and our
13
14
 
14
15
  First clone the repo then run:
15
16
 
16
- ### `yarn install`
17
+ ### `npm install`
17
18
 
18
19
  ## Available Scripts
19
20
 
20
21
  In the project directory, you can run:
21
22
 
22
- ### `yarn start`
23
+ ### `npm run start`
23
24
 
24
25
  Runs the app in the development mode.\
25
26
  Open [http://localhost:6006](http://localhost:6006) to view it in the browser.
@@ -27,19 +28,19 @@ Open [http://localhost:6006](http://localhost:6006) to view it in the browser.
27
28
  The page will reload if you make edits.\
28
29
  You will also see any lint errors in the console.
29
30
 
30
- ### `yarn start:run-test`
31
- The same as the `yarn start` command but runs the `yarn test:generate-output` command first, so the test results displayed within Storybook are up-to-date.
31
+ ### `npm run start:run-test`
32
+ The same as the `npm run start` command but runs the `npm run test:generate-output` command first, so the test results displayed within Storybook are up-to-date.
32
33
 
33
- ### `yarn build-storybook`
34
+ ### `npm run build-storybook`
34
35
  Builds the Storybook app for pushing to the public subdomain.
35
36
 
36
- ### `yarn test`
37
+ ### `npm run test`
37
38
  Runs the component Jest tests. If its the first run it also takes a snapshot for comparison, on successive runs.
38
39
 
39
- ### `yarn test:update-snapshot`
40
+ ### `npm run test:update-snapshot`
40
41
  Updates the Jest snapshot.
41
42
 
42
- ### `yarn test:generate-output`
43
+ ### `npm run test:generate-output`
43
44
  Runs the tests and outputs the results to a file `.jest-test-results.json` for use within the [Storybook addon Jest](https://storybook.js.org/addons/@storybook/addon-jest/)
44
45
 
45
46
  ## Getting started
package/utils/theme.js CHANGED
@@ -19,6 +19,16 @@ var DEFAULT_BODY_TYPOGRAPHY = {
19
19
  // @TODO: Discuss this with the experience design team, according to the UUI Figma
20
20
  export var defaultTheme = {
21
21
  typography: __assign(__assign({}, DEFAULT_BODY_TYPOGRAPHY), { h1: DEFAULT_HEADER_TYPOGRAPHY, h2: DEFAULT_HEADER_TYPOGRAPHY, h3: DEFAULT_HEADER_TYPOGRAPHY, h4: DEFAULT_HEADER_TYPOGRAPHY, h5: DEFAULT_HEADER_TYPOGRAPHY, h6: DEFAULT_HEADER_TYPOGRAPHY, subtitle1: DEFAULT_BODY_TYPOGRAPHY, subtitle2: DEFAULT_BODY_TYPOGRAPHY, body1: DEFAULT_BODY_TYPOGRAPHY, body2: DEFAULT_BODY_TYPOGRAPHY, button: __assign(__assign({}, DEFAULT_BODY_TYPOGRAPHY), { fontWeight: 700 }), caption: DEFAULT_BODY_TYPOGRAPHY, overline: DEFAULT_BODY_TYPOGRAPHY })
22
+ // overrides: {
23
+ // MuiCssBaseline: {
24
+ // '@global': {
25
+ // '.MuiAvatarGroup-root .MuiAvatar-root:first-of-type': {
26
+ // backgroundColor: '#eee',
27
+ // color: '#333'
28
+ // }
29
+ // }
30
+ // }
31
+ // }
22
32
  };
23
33
  export var lightTheme = {
24
34
  palette: {
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const AutocompleteStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var AutocompleteStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const ButtonStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var ButtonStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const CheckboxStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var CheckboxStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const IconButtonStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var IconButtonStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const RadioStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var RadioStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const SelectStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var SelectStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const SliderStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var SliderStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const SwitchStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var SwitchStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const TextFieldStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var TextFieldStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const ToggleButtonStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var ToggleButtonStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const AvatarStyles: (params: void) => {
3
- classes: Record<"root", string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,14 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var AvatarStyles = makeStyles()(function (theme, props) {
3
- var _a, _b, _c;
4
- return ({
5
- root: {
6
- backgroundColor: ((_a = props === null || props === void 0 ? void 0 : props.sx) === null || _a === void 0 ? void 0 : _a.bgcolor)
7
- ? props.sx.bgcolor
8
- : theme.palette.primary.main,
9
- color: ((_b = props === null || props === void 0 ? void 0 : props.sx) === null || _b === void 0 ? void 0 : _b.bgcolor)
10
- ? (_c = props.sx.color) !== null && _c !== void 0 ? _c : theme.palette.getContrastText(props.sx.bgcolor)
11
- : theme.palette.primary.contrastText
12
- }
13
- });
14
- });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const ChipStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var ChipStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const ListStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var ListStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const TooltipStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var TooltipStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const AlertStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var AlertStyles = makeStyles()(function (theme) { return ({}); });
@@ -1 +0,0 @@
1
- export { default as Button } from './atoms/Button/Button';
@@ -1,3 +0,0 @@
1
- /* Export */
2
- /* Atoms */
3
- export { default as Button } from './atoms/Button/Button';
@@ -1,7 +0,0 @@
1
- import { Theme } from '@mui/material/styles';
2
- export declare const DrawerStyles: (params: void) => {
3
- classes: Record<never, string>;
4
- theme: Theme;
5
- css: import("tss-react").Css;
6
- cx: import("tss-react").Cx;
7
- };
@@ -1,2 +0,0 @@
1
- import { makeStyles } from 'tss-react/mui';
2
- export var DrawerStyles = makeStyles()(function (theme) { return ({}); });