@mjhls/mjh-framework 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -15,12 +15,15 @@ npm install --save mjh-framework
15
15
  ```jsx
16
16
  import React, { Component } from 'react'
17
17
 
18
- import MyComponent from 'mjh-framework'
18
+ import { NavMagazine, DeckQueue } from 'mjh-framework'
19
19
 
20
- class Example extends Component {
21
- render () {
20
+ export default class App extends Component {
21
+ render() {
22
22
  return (
23
- <MyComponent />
23
+ <div>
24
+ <NavMagazine />
25
+ <DeckQueue />
26
+ </div>
24
27
  )
25
28
  }
26
29
  }
package/dist/index.es.js CHANGED
@@ -1,113 +1,28 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- function styleInject(css, ref) {
5
- if ( ref === void 0 ) ref = {};
6
- var insertAt = ref.insertAt;
7
-
8
- if (!css || typeof document === 'undefined') { return; }
9
-
10
- var head = document.head || document.getElementsByTagName('head')[0];
11
- var style = document.createElement('style');
12
- style.type = 'text/css';
13
-
14
- if (insertAt === 'top') {
15
- if (head.firstChild) {
16
- head.insertBefore(style, head.firstChild);
17
- } else {
18
- head.appendChild(style);
19
- }
20
- } else {
21
- head.appendChild(style);
22
- }
23
-
24
- if (style.styleSheet) {
25
- style.styleSheet.cssText = css;
26
- } else {
27
- style.appendChild(document.createTextNode(css));
28
- }
29
- }
30
-
31
- var css = "/* add css styles here (optional) */\n\n.styles_test__3OKZ1 {\n display: inline-block;\n margin: 2em auto;\n border: 2px solid #000;\n font-size: 2em;\n}\n";
32
- var styles = { "test": "styles_test__3OKZ1" };
33
- styleInject(css);
34
-
35
- var classCallCheck = function (instance, Constructor) {
36
- if (!(instance instanceof Constructor)) {
37
- throw new TypeError("Cannot call a class as a function");
38
- }
39
- };
40
-
41
- var createClass = function () {
42
- function defineProperties(target, props) {
43
- for (var i = 0; i < props.length; i++) {
44
- var descriptor = props[i];
45
- descriptor.enumerable = descriptor.enumerable || false;
46
- descriptor.configurable = true;
47
- if ("value" in descriptor) descriptor.writable = true;
48
- Object.defineProperty(target, descriptor.key, descriptor);
49
- }
50
- }
51
-
52
- return function (Constructor, protoProps, staticProps) {
53
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
54
- if (staticProps) defineProperties(Constructor, staticProps);
55
- return Constructor;
56
- };
57
- }();
58
-
59
- var inherits = function (subClass, superClass) {
60
- if (typeof superClass !== "function" && superClass !== null) {
61
- throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
62
- }
63
-
64
- subClass.prototype = Object.create(superClass && superClass.prototype, {
65
- constructor: {
66
- value: subClass,
67
- enumerable: false,
68
- writable: true,
69
- configurable: true
70
- }
71
- });
72
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
73
- };
74
-
75
- var possibleConstructorReturn = function (self, call) {
76
- if (!self) {
77
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
78
- }
79
-
80
- return call && (typeof call === "object" || typeof call === "function") ? call : self;
1
+ import React from 'react';
2
+
3
+ var NavMagazine = function NavMagazine() {
4
+ return React.createElement(
5
+ 'div',
6
+ null,
7
+ React.createElement(
8
+ 'h1',
9
+ null,
10
+ 'Magazine Navigation'
11
+ )
12
+ );
81
13
  };
82
14
 
83
- var ExampleComponent = function (_Component) {
84
- inherits(ExampleComponent, _Component);
85
-
86
- function ExampleComponent() {
87
- classCallCheck(this, ExampleComponent);
88
- return possibleConstructorReturn(this, (ExampleComponent.__proto__ || Object.getPrototypeOf(ExampleComponent)).apply(this, arguments));
89
- }
90
-
91
- createClass(ExampleComponent, [{
92
- key: 'render',
93
- value: function render() {
94
- var text = this.props.text;
95
-
96
-
97
- return React.createElement(
98
- 'div',
99
- { className: styles.test },
100
- 'Example Component: ',
101
- text
102
- );
103
- }
104
- }]);
105
- return ExampleComponent;
106
- }(Component);
107
-
108
- ExampleComponent.propTypes = {
109
- text: PropTypes.string
15
+ var DeckQueue = function DeckQueue() {
16
+ return React.createElement(
17
+ 'div',
18
+ null,
19
+ React.createElement(
20
+ 'h1',
21
+ null,
22
+ 'Dect Queue'
23
+ )
24
+ );
110
25
  };
111
26
 
112
- export default ExampleComponent;
27
+ export { NavMagazine, DeckQueue };
113
28
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport styles from './styles.css'\n\nexport default class ExampleComponent extends Component {\n static propTypes = {\n text: PropTypes.string\n }\n\n render() {\n const {\n text\n } = this.props\n\n return (\n <div className={styles.test}>\n Example Component: {text}\n </div>\n )\n }\n}\n"],"names":["ExampleComponent","text","props","styles","test","Component","propTypes","PropTypes","string"],"mappings":";;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;EAC7B,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;EAC/B,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;;EAE5B,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;;EAExD,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;EACrE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;EAC5C,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;;EAExB,IAAI,QAAQ,KAAK,KAAK,EAAE;IACtB,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;KAC3C,MAAM;MACL,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACzB;GACF,MAAM;IACL,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;GACzB;;EAED,IAAI,KAAK,CAAC,UAAU,EAAE;IACpB,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;GAChC,MAAM;IACL,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;GACjD;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICpBoBA;;;;;;;;;;6BAKV;UAELC,IAFK,GAGH,KAAKC,KAHF,CAELD,IAFK;;;aAML;;UAAK,WAAWE,OAAOC,IAAvB;;;OADF;;;;EAV0CC;;AAAzBL,iBACZM,YAAY;QACXC,UAAUC;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/navigation/NavMagazine.js","../src/deck/DeckQueue.js"],"sourcesContent":["import React from 'react'\r\n\r\nexport const NavMagazine = () => {\r\n return (\r\n <div>\r\n <h1>Magazine Navigation</h1>\r\n </div>\r\n )\r\n}\r\n","import React from 'react'\r\n\r\nexport const DeckQueue = () => {\r\n return (\r\n <div>\r\n <h1>Dect Queue</h1>\r\n </div>\r\n )\r\n}\r\n"],"names":["NavMagazine","DeckQueue"],"mappings":";;IAEaA,cAAc,SAAdA,WAAc,GAAM;SAE7B;;;;;;;;GADF;CADK;;ICAMC,YAAY,SAAZA,SAAY,GAAM;SAE3B;;;;;;;;GADF;CADK;;;;"}
package/dist/index.js CHANGED
@@ -1,118 +1,35 @@
1
1
  'use strict';
2
2
 
3
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
-
5
- var React = require('react');
6
- var React__default = _interopDefault(React);
7
- var PropTypes = _interopDefault(require('prop-types'));
8
-
9
- function styleInject(css, ref) {
10
- if ( ref === void 0 ) ref = {};
11
- var insertAt = ref.insertAt;
12
-
13
- if (!css || typeof document === 'undefined') { return; }
14
-
15
- var head = document.head || document.getElementsByTagName('head')[0];
16
- var style = document.createElement('style');
17
- style.type = 'text/css';
18
-
19
- if (insertAt === 'top') {
20
- if (head.firstChild) {
21
- head.insertBefore(style, head.firstChild);
22
- } else {
23
- head.appendChild(style);
24
- }
25
- } else {
26
- head.appendChild(style);
27
- }
28
-
29
- if (style.styleSheet) {
30
- style.styleSheet.cssText = css;
31
- } else {
32
- style.appendChild(document.createTextNode(css));
33
- }
34
- }
35
-
36
- var css = "/* add css styles here (optional) */\n\n.styles_test__3OKZ1 {\n display: inline-block;\n margin: 2em auto;\n border: 2px solid #000;\n font-size: 2em;\n}\n";
37
- var styles = { "test": "styles_test__3OKZ1" };
38
- styleInject(css);
39
-
40
- var classCallCheck = function (instance, Constructor) {
41
- if (!(instance instanceof Constructor)) {
42
- throw new TypeError("Cannot call a class as a function");
43
- }
44
- };
45
-
46
- var createClass = function () {
47
- function defineProperties(target, props) {
48
- for (var i = 0; i < props.length; i++) {
49
- var descriptor = props[i];
50
- descriptor.enumerable = descriptor.enumerable || false;
51
- descriptor.configurable = true;
52
- if ("value" in descriptor) descriptor.writable = true;
53
- Object.defineProperty(target, descriptor.key, descriptor);
54
- }
55
- }
3
+ Object.defineProperty(exports, '__esModule', { value: true });
56
4
 
57
- return function (Constructor, protoProps, staticProps) {
58
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
59
- if (staticProps) defineProperties(Constructor, staticProps);
60
- return Constructor;
61
- };
62
- }();
63
-
64
- var inherits = function (subClass, superClass) {
65
- if (typeof superClass !== "function" && superClass !== null) {
66
- throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
67
- }
68
-
69
- subClass.prototype = Object.create(superClass && superClass.prototype, {
70
- constructor: {
71
- value: subClass,
72
- enumerable: false,
73
- writable: true,
74
- configurable: true
75
- }
76
- });
77
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
78
- };
79
-
80
- var possibleConstructorReturn = function (self, call) {
81
- if (!self) {
82
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
83
- }
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
84
6
 
85
- return call && (typeof call === "object" || typeof call === "function") ? call : self;
7
+ var React = _interopDefault(require('react'));
8
+
9
+ var NavMagazine = function NavMagazine() {
10
+ return React.createElement(
11
+ 'div',
12
+ null,
13
+ React.createElement(
14
+ 'h1',
15
+ null,
16
+ 'Magazine Navigation'
17
+ )
18
+ );
86
19
  };
87
20
 
88
- var ExampleComponent = function (_Component) {
89
- inherits(ExampleComponent, _Component);
90
-
91
- function ExampleComponent() {
92
- classCallCheck(this, ExampleComponent);
93
- return possibleConstructorReturn(this, (ExampleComponent.__proto__ || Object.getPrototypeOf(ExampleComponent)).apply(this, arguments));
94
- }
95
-
96
- createClass(ExampleComponent, [{
97
- key: 'render',
98
- value: function render() {
99
- var text = this.props.text;
100
-
101
-
102
- return React__default.createElement(
103
- 'div',
104
- { className: styles.test },
105
- 'Example Component: ',
106
- text
107
- );
108
- }
109
- }]);
110
- return ExampleComponent;
111
- }(React.Component);
112
-
113
- ExampleComponent.propTypes = {
114
- text: PropTypes.string
21
+ var DeckQueue = function DeckQueue() {
22
+ return React.createElement(
23
+ 'div',
24
+ null,
25
+ React.createElement(
26
+ 'h1',
27
+ null,
28
+ 'Dect Queue'
29
+ )
30
+ );
115
31
  };
116
32
 
117
- module.exports = ExampleComponent;
33
+ exports.NavMagazine = NavMagazine;
34
+ exports.DeckQueue = DeckQueue;
118
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport styles from './styles.css'\n\nexport default class ExampleComponent extends Component {\n static propTypes = {\n text: PropTypes.string\n }\n\n render() {\n const {\n text\n } = this.props\n\n return (\n <div className={styles.test}>\n Example Component: {text}\n </div>\n )\n }\n}\n"],"names":["ExampleComponent","text","props","React","styles","test","Component","propTypes","PropTypes","string"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;EAC7B,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;EAC/B,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;;EAE5B,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;;EAExD,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;EACrE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;EAC5C,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;;EAExB,IAAI,QAAQ,KAAK,KAAK,EAAE;IACtB,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;KAC3C,MAAM;MACL,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACzB;GACF,MAAM;IACL,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;GACzB;;EAED,IAAI,KAAK,CAAC,UAAU,EAAE;IACpB,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;GAChC,MAAM;IACL,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;GACjD;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICpBoBA;;;;;;;;;;6BAKV;UAELC,IAFK,GAGH,KAAKC,KAHF,CAELD,IAFK;;;aAMLE;;UAAK,WAAWC,OAAOC,IAAvB;;;OADF;;;;EAV0CC;;AAAzBN,iBACZO,YAAY;QACXC,UAAUC;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/navigation/NavMagazine.js","../src/deck/DeckQueue.js"],"sourcesContent":["import React from 'react'\r\n\r\nexport const NavMagazine = () => {\r\n return (\r\n <div>\r\n <h1>Magazine Navigation</h1>\r\n </div>\r\n )\r\n}\r\n","import React from 'react'\r\n\r\nexport const DeckQueue = () => {\r\n return (\r\n <div>\r\n <h1>Dect Queue</h1>\r\n </div>\r\n )\r\n}\r\n"],"names":["NavMagazine","DeckQueue"],"mappings":";;;;;;;;IAEaA,cAAc,SAAdA,WAAc,GAAM;SAE7B;;;;;;;;GADF;CADK;;ICAMC,YAAY,SAAZA,SAAY,GAAM;SAE3B;;;;;;;;GADF;CADK;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",