@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.
@@ -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;
@@ -0,0 +1,7 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import { makeStyles } from 'tss-react/mui';
2
+ export var AutocompleteStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonProps } from '@mui/material/IconButton';
3
- interface IIconButtonProps extends IconButtonProps {
4
- }
5
- export default function IconButton({ ...rest }: IIconButtonProps): JSX.Element;
6
- export {};
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
- export default function IconButton(_a) {
27
- var rest = __rest(_a, []);
28
- return (_jsx(MUIIconButton, __assign({ classes: IconButtonStyles().classes }, rest)));
29
- }
15
+ var IconButton = function (props) { return (_jsx(MUIIconButton, __assign({ classes: IconButtonStyles().classes }, props))); };
16
+ IconButton.muiName = 'MUIIconButton';
17
+ export default IconButton;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ChipProps } from '@mui/material/Chip';
2
+ import type { ChipProps } from '@mui/material/Chip';
3
3
  interface IChipProps extends ChipProps {
4
4
  }
5
5
  export default function Chip({ ...rest }: IChipProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ListProps } from '@mui/material/List';
3
+ declare const List: (props: ListProps) => React.ReactElement;
4
+ export default List;
@@ -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;
@@ -0,0 +1,7 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import { makeStyles } from 'tss-react/mui';
2
+ export var ListStyles = makeStyles()(function (theme) { return ({}); });
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { TooltipProps } from '@mui/material/Tooltip';
3
- interface ITooltipProps extends TooltipProps {
4
- }
5
- declare const Tooltip: (props: ITooltipProps) => JSX.Element;
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
- return (_jsx(MUITooltip, __assign({}, props, { classes: TooltipStyles().classes })));
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,4 @@
1
+ import React from 'react';
2
+ import { DrawerProps } from '@mui/material/Drawer';
3
+ declare const Drawer: (props: DrawerProps) => React.ReactElement;
4
+ export default Drawer;
@@ -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;
@@ -0,0 +1,7 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ import { makeStyles } from 'tss-react/mui';
2
+ export var DrawerStyles = makeStyles()(function (theme) { return ({}); });
package/index.d.ts CHANGED
@@ -1,2 +1,11 @@
1
- import Button from './components/atoms/Button/Button';
2
- export { Button };
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
- import Button from './components/atoms/Button/Button';
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.1.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
- # Learningpool UI (Component library)
1
+ # @learningpool/ui
2
2
 
3
- Learningpool UI is the Component library for use on Learningpool projects. There is a long-term vision, for now though, there are only a handful of components to utilize.
3
+ ![npm (scoped)](https://img.shields.io/npm/v/@learningpool/ui)
4
+ ![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/@learningpool/ui)
5
+ ![NPM](https://img.shields.io/npm/l/@learningpool/ui)
6
+ ![Website](https://img.shields.io/website?label=documentation&url=https%3A%2F%2Fmain.d5creizgamf62.amplifyapp.com)
4
7
 
5
- It is built on top of [MUI](https://mui.com) and bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Our documentation is provided via [Storybook](https://storybook.js.org) and our tests are written using [Jest](https://jestjs.io).
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 module uses [semantic versionsing](https://semver.org) and publishes to [NPM](https://www.npmjs.com).
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,3 +0,0 @@
1
- import React from 'react';
2
- import MUIButton from '@mui/material/Button';
3
- export default function PrimaryButton({ ...rest }: {} & React.ComponentPropsWithoutRef<typeof MUIButton>): JSX.Element;
@@ -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
- }