@learningpool/ui 1.1.1 → 1.2.0
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/components/atoms/Autocomplete/Autocomplete.d.ts +6 -0
- package/components/atoms/Autocomplete/Autocomplete.js +18 -0
- package/components/atoms/Autocomplete/AutocompleteStyles.d.ts +7 -0
- package/components/atoms/Autocomplete/AutocompleteStyles.js +2 -0
- package/components/atoms/IconButton/IconButton.d.ts +5 -4
- package/components/atoms/IconButton/IconButton.js +3 -15
- package/components/datadisplay/Chip/Chip.d.ts +1 -1
- package/components/datadisplay/List/List.d.ts +4 -0
- package/components/datadisplay/List/List.js +16 -0
- package/components/datadisplay/List/ListStyles.d.ts +7 -0
- package/components/datadisplay/List/ListStyles.js +2 -0
- package/components/datadisplay/Tooltip/Tooltip.d.ts +4 -3
- package/components/datadisplay/Tooltip/Tooltip.js +2 -3
- package/components/navigation/Drawer/Drawer.d.ts +4 -0
- package/components/navigation/Drawer/Drawer.js +16 -0
- package/components/navigation/Drawer/DrawerStyles.d.ts +7 -0
- package/components/navigation/Drawer/DrawerStyles.js +2 -0
- package/index.d.ts +11 -2
- package/index.js +13 -2
- package/package.json +11 -30
- package/readme.md +7 -4
- package/components/atoms/Button/PrimaryButton.d.ts +0 -3
- package/components/atoms/Button/PrimaryButton.js +0 -29
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
|
+
interface IAutocompleteProps extends AutocompleteProps<any, true, true, true, 'div'> {
|
|
4
|
+
}
|
|
5
|
+
declare const Autocomplete: (props: IAutocompleteProps) => JSX.Element;
|
|
6
|
+
export default Autocomplete;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 MUIAutocomplete from '@mui/material/Autocomplete';
|
|
14
|
+
import { AutocompleteStyles } from './AutocompleteStyles';
|
|
15
|
+
var Autocomplete = function (props) {
|
|
16
|
+
return (_jsx(MUIAutocomplete, __assign({}, props, { classes: AutocompleteStyles().classes })));
|
|
17
|
+
};
|
|
18
|
+
export default Autocomplete;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconButtonProps } from '@mui/material/IconButton';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
declare const IconButton: {
|
|
4
|
+
(props: IconButtonProps): JSX.Element;
|
|
5
|
+
muiName: string;
|
|
6
|
+
};
|
|
7
|
+
export default IconButton;
|
|
@@ -9,21 +9,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
13
|
import MUIIconButton from '@mui/material/IconButton';
|
|
25
14
|
import { IconButtonStyles } from './IconButtonStyles';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
15
|
+
var IconButton = function (props) { return (_jsx(MUIIconButton, __assign({ classes: IconButtonStyles().classes }, props))); };
|
|
16
|
+
IconButton.muiName = 'MUIIconButton';
|
|
17
|
+
export default IconButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 MUIList from '@mui/material/List';
|
|
14
|
+
import { ListStyles } from './ListStyles';
|
|
15
|
+
var List = function (props) { return (_jsx(MUIList, __assign({}, props, { classes: ListStyles().classes }))); };
|
|
16
|
+
export default List;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TooltipProps } from '@mui/material/Tooltip';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const Tooltip: {
|
|
4
|
+
(props: TooltipProps): JSX.Element;
|
|
5
|
+
muiName: string;
|
|
6
|
+
};
|
|
6
7
|
export default Tooltip;
|
|
@@ -12,7 +12,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import MUITooltip from '@mui/material/Tooltip';
|
|
14
14
|
import { TooltipStyles } from './TooltipStyles';
|
|
15
|
-
var Tooltip = function (props) {
|
|
16
|
-
|
|
17
|
-
};
|
|
15
|
+
var Tooltip = function (props) { return (_jsx(MUITooltip, __assign({}, props, { classes: TooltipStyles().classes }))); };
|
|
16
|
+
Tooltip.muiName = 'MUITooltip';
|
|
18
17
|
export default Tooltip;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 MUIDrawer from '@mui/material/Drawer';
|
|
14
|
+
import { DrawerStyles } from './DrawerStyles';
|
|
15
|
+
var Drawer = function (props) { return (_jsx(MUIDrawer, __assign({}, props, { classes: DrawerStyles().classes }))); };
|
|
16
|
+
export default Drawer;
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
export { default as Button } from './components/atoms/Button/Button';
|
|
2
|
+
export { default as Drawer } from './components/navigation/Drawer/Drawer';
|
|
3
|
+
export { default as List } from './components/datadisplay/List/List';
|
|
4
|
+
export { default as Backdrop } from '@mui/material/Backdrop';
|
|
5
|
+
export { default as ListItem } from '@mui/material/ListItem';
|
|
6
|
+
export { default as ListItemAvatar } from '@mui/material/ListItemAvatar';
|
|
7
|
+
export { default as ListItemButton } from '@mui/material/ListItemButton';
|
|
8
|
+
export { default as ListItemIcon } from '@mui/material/ListItemIcon';
|
|
9
|
+
export { default as ListItemSecondaryAction } from '@mui/material/ListItemSecondaryAction';
|
|
10
|
+
export { default as ListItemText } from '@mui/material/ListItemText';
|
|
11
|
+
export { default as ListSubheader } from '@mui/material/ListSubheader';
|
package/index.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export { Button };
|
|
1
|
+
// Learning Pool intercepted
|
|
2
|
+
export { default as Button } from './components/atoms/Button/Button';
|
|
3
|
+
export { default as Drawer } from './components/navigation/Drawer/Drawer';
|
|
4
|
+
export { default as List } from './components/datadisplay/List/List';
|
|
5
|
+
// Straight through MUI
|
|
6
|
+
export { default as Backdrop } from '@mui/material/Backdrop';
|
|
7
|
+
export { default as ListItem } from '@mui/material/ListItem';
|
|
8
|
+
export { default as ListItemAvatar } from '@mui/material/ListItemAvatar';
|
|
9
|
+
export { default as ListItemButton } from '@mui/material/ListItemButton';
|
|
10
|
+
export { default as ListItemIcon } from '@mui/material/ListItemIcon';
|
|
11
|
+
export { default as ListItemSecondaryAction } from '@mui/material/ListItemSecondaryAction';
|
|
12
|
+
export { default as ListItemText } from '@mui/material/ListItemText';
|
|
13
|
+
export { default as ListSubheader } from '@mui/material/ListSubheader';
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"components",
|
|
9
9
|
"ui"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.2.0",
|
|
12
12
|
"private": false,
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"module": "dist/index.js",
|
|
@@ -35,39 +35,16 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"analyze:build": "source-map-explorer 'build/static/js/*.js'",
|
|
37
37
|
"analyze:module": "source-map-explorer 'dist/*.js'",
|
|
38
|
-
"start": "start-storybook -p 6006",
|
|
39
|
-
"start:run-tests": "yarn test:generate-output && yarn start",
|
|
40
38
|
"build": "build-storybook",
|
|
41
39
|
"build:module": "rm -rf dist && yarn run tsc",
|
|
40
|
+
"lint": "eslint --ext .tsx ./src",
|
|
41
|
+
"lint:fix": "eslint --ext .tsx ./src --fix",
|
|
42
|
+
"semantic-release": "ht2-release-public-circleci-lib-dist",
|
|
43
|
+
"start": "start-storybook -p 6006",
|
|
44
|
+
"start:run-tests": "yarn test:generate-output && yarn start",
|
|
42
45
|
"test": "jest",
|
|
43
46
|
"test:update-snapshot": "jest --updateSnapshot",
|
|
44
|
-
"test:generate-output": "jest --json --outputFile=.jest-test-results.json"
|
|
45
|
-
"semantic-release": "ht2-release-public-circleci-lib-dist"
|
|
46
|
-
},
|
|
47
|
-
"jest": {
|
|
48
|
-
"setupFilesAfterEnv": [
|
|
49
|
-
"./jest.setup.ts"
|
|
50
|
-
],
|
|
51
|
-
"collectCoverageFrom": [
|
|
52
|
-
"./src/lib/**/*.{ts,tsx}"
|
|
53
|
-
],
|
|
54
|
-
"collectCoverage": true
|
|
55
|
-
},
|
|
56
|
-
"eslintConfig": {
|
|
57
|
-
"extends": [
|
|
58
|
-
"react-app",
|
|
59
|
-
"react-app/jest"
|
|
60
|
-
],
|
|
61
|
-
"overrides": [
|
|
62
|
-
{
|
|
63
|
-
"files": [
|
|
64
|
-
"**/*.stories.*"
|
|
65
|
-
],
|
|
66
|
-
"rules": {
|
|
67
|
-
"import/no-anonymous-default-export": "off"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
]
|
|
47
|
+
"test:generate-output": "jest --json --outputFile=.jest-test-results.json"
|
|
71
48
|
},
|
|
72
49
|
"browserslist": {
|
|
73
50
|
"production": [
|
|
@@ -101,6 +78,10 @@
|
|
|
101
78
|
"@storybook/react": "^6.5.0-alpha.34",
|
|
102
79
|
"@storybook/theming": "^6.4.18",
|
|
103
80
|
"babel-preset-minify": "^0.5.1",
|
|
81
|
+
"eslint-config-standard": "^16.0.3",
|
|
82
|
+
"eslint-config-standard-with-typescript": "^21.0.1",
|
|
83
|
+
"eslint-plugin-node": "^11.1.0",
|
|
84
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
104
85
|
"source-map-explorer": "^2.5.2",
|
|
105
86
|
"source-map-loader": "^3.0.1",
|
|
106
87
|
"ts-node": "^10.5.0",
|
package/readme.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @learningpool/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
@learningpool/ui is the Component library for use on modern Learning Pool projects, built on top of [MUI](https://mui.com) and bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
6
9
|
|
|
7
|
-
Our
|
|
10
|
+
Our documentation is provided via [Storybook](https://storybook.js.org) and our tests are written using [Jest](https://jestjs.io).
|
|
8
11
|
|
|
9
12
|
## Installation
|
|
10
13
|
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
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 MUIButton from '@mui/material/Button';
|
|
25
|
-
import { ButtonStyles } from './ButtonStyles';
|
|
26
|
-
export default function PrimaryButton(_a) {
|
|
27
|
-
var rest = __rest(_a, []);
|
|
28
|
-
return (_jsx(MUIButton, __assign({ disableElevation: true, variant: 'contained', color: 'primary' }, rest, { classes: ButtonStyles().classes })));
|
|
29
|
-
}
|