@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.
- package/assets/Images.d.ts +6 -0
- package/assets/Images.js +15 -0
- package/components/atoms/Autocomplete/Autocomplete.js +1 -2
- package/components/atoms/Button/Button.d.ts +2 -2
- package/components/atoms/Button/Button.js +1 -2
- package/components/atoms/Checkbox/Checkbox.js +1 -2
- package/components/atoms/IconButton/IconButton.js +1 -2
- package/components/atoms/Radio/Radio.js +1 -2
- package/components/atoms/Select/Select.js +1 -2
- package/components/atoms/Slider/Slider.js +1 -2
- package/components/atoms/Switch/Switch.js +1 -2
- package/components/atoms/TextField/TextField.js +1 -2
- package/components/atoms/ToggleButton/ToggleButton.js +1 -2
- package/components/datadisplay/Avatar/Avatar.js +16 -2
- package/components/datadisplay/Chip/Chip.js +1 -2
- package/components/datadisplay/List/List.js +1 -2
- package/components/datadisplay/Tooltip/Tooltip.js +1 -2
- package/components/feedback/Alert/Alert.js +1 -2
- package/components/navigation/Drawer/Drawer.d.ts +4 -1
- package/components/navigation/Drawer/Drawer.js +21 -2
- package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +18 -0
- package/components/navigation/VerticalNavigation/VerticalNavigation.js +194 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +94 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +146 -0
- package/components/pages/ErrorPage/ErrorPage.d.ts +8 -0
- package/components/pages/ErrorPage/ErrorPage.js +27 -0
- package/components/pages/ErrorPage/ErrorPageStyles.d.ts +28 -0
- package/components/pages/ErrorPage/ErrorPageStyles.js +32 -0
- package/components/pages/SideInSide/SideInSide.d.ts +2 -0
- package/components/pages/SideInSide/SideInSide.js +39 -0
- package/components/pages/SideInSide/SideInSideStyles.d.ts +12 -0
- package/components/pages/SideInSide/SideInSideStyles.js +60 -0
- package/index.d.ts +9 -0
- package/index.js +10 -0
- package/package.json +30 -25
- package/readme.md +9 -8
- package/utils/theme.js +10 -0
- package/components/atoms/Autocomplete/AutocompleteStyles.d.ts +0 -7
- package/components/atoms/Autocomplete/AutocompleteStyles.js +0 -2
- package/components/atoms/Button/ButtonStyles.d.ts +0 -7
- package/components/atoms/Button/ButtonStyles.js +0 -2
- package/components/atoms/Checkbox/CheckboxStyles.d.ts +0 -7
- package/components/atoms/Checkbox/CheckboxStyles.js +0 -2
- package/components/atoms/IconButton/IconButtonStyles.d.ts +0 -7
- package/components/atoms/IconButton/IconButtonStyles.js +0 -2
- package/components/atoms/Radio/RadioStyles.d.ts +0 -7
- package/components/atoms/Radio/RadioStyles.js +0 -2
- package/components/atoms/Select/SelectStyles.d.ts +0 -7
- package/components/atoms/Select/SelectStyles.js +0 -2
- package/components/atoms/Slider/SliderStyles.d.ts +0 -7
- package/components/atoms/Slider/SliderStyles.js +0 -2
- package/components/atoms/Switch/SwitchStyles.d.ts +0 -7
- package/components/atoms/Switch/SwitchStyles.js +0 -2
- package/components/atoms/TextField/TextFieldStyles.d.ts +0 -7
- package/components/atoms/TextField/TextFieldStyles.js +0 -2
- package/components/atoms/ToggleButton/ToggleButtonStyles.d.ts +0 -7
- package/components/atoms/ToggleButton/ToggleButtonStyles.js +0 -2
- package/components/datadisplay/Avatar/AvatarStyles.d.ts +0 -7
- package/components/datadisplay/Avatar/AvatarStyles.js +0 -14
- package/components/datadisplay/Chip/ChipStyles.d.ts +0 -7
- package/components/datadisplay/Chip/ChipStyles.js +0 -2
- package/components/datadisplay/List/ListStyles.d.ts +0 -7
- package/components/datadisplay/List/ListStyles.js +0 -2
- package/components/datadisplay/Tooltip/TooltipStyles.d.ts +0 -7
- package/components/datadisplay/Tooltip/TooltipStyles.js +0 -2
- package/components/feedback/Alert/AlertStyles.d.ts +0 -7
- package/components/feedback/Alert/AlertStyles.js +0 -2
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -3
- package/components/navigation/Drawer/DrawerStyles.d.ts +0 -7
- package/components/navigation/Drawer/DrawerStyles.js +0 -2
package/readme.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# @learningpool/ui
|
|
2
2
|
|
|
3
3
|

|
|
4
|
+

|
|
4
5
|

|
|
5
6
|

|
|
6
7
|

|
|
@@ -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
|
-
### `
|
|
17
|
+
### `npm install`
|
|
17
18
|
|
|
18
19
|
## Available Scripts
|
|
19
20
|
|
|
20
21
|
In the project directory, you can run:
|
|
21
22
|
|
|
22
|
-
### `
|
|
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
|
-
### `
|
|
31
|
-
The same as the `
|
|
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
|
-
### `
|
|
34
|
+
### `npm run build-storybook`
|
|
34
35
|
Builds the Storybook app for pushing to the public subdomain.
|
|
35
36
|
|
|
36
|
-
### `
|
|
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
|
-
### `
|
|
40
|
+
### `npm run test:update-snapshot`
|
|
40
41
|
Updates the Jest snapshot.
|
|
41
42
|
|
|
42
|
-
### `
|
|
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,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
|
-
});
|
package/components/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './atoms/Button/Button';
|
package/components/index.js
DELETED