@bigbinary/neeto-molecules 1.0.16 → 1.0.17

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,235 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+
7
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
8
+
9
+ var classnames = {exports: {}};
10
+
11
+ /*!
12
+ Copyright (c) 2018 Jed Watson.
13
+ Licensed under the MIT License (MIT), see
14
+ http://jedwatson.github.io/classnames
15
+ */
16
+
17
+ (function (module) {
18
+ /* global define */
19
+
20
+ (function () {
21
+
22
+ var hasOwn = {}.hasOwnProperty;
23
+
24
+ function classNames() {
25
+ var classes = [];
26
+
27
+ for (var i = 0; i < arguments.length; i++) {
28
+ var arg = arguments[i];
29
+ if (!arg) continue;
30
+
31
+ var argType = typeof arg;
32
+
33
+ if (argType === 'string' || argType === 'number') {
34
+ classes.push(arg);
35
+ } else if (Array.isArray(arg)) {
36
+ if (arg.length) {
37
+ var inner = classNames.apply(null, arg);
38
+ if (inner) {
39
+ classes.push(inner);
40
+ }
41
+ }
42
+ } else if (argType === 'object') {
43
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
44
+ classes.push(arg.toString());
45
+ continue;
46
+ }
47
+
48
+ for (var key in arg) {
49
+ if (hasOwn.call(arg, key) && arg[key]) {
50
+ classes.push(key);
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ return classes.join(' ');
57
+ }
58
+
59
+ if (module.exports) {
60
+ classNames.default = classNames;
61
+ module.exports = classNames;
62
+ } else {
63
+ window.classNames = classNames;
64
+ }
65
+ }());
66
+ } (classnames));
67
+
68
+ var classNames = classnames.exports;
69
+
70
+ function cov_2pe656guy1() {
71
+ var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/TableWrapper/index.jsx";
72
+ var hash = "2e8f830646a90399b1c7c4d1b52186adb04b8606";
73
+ var global = new Function("return this")();
74
+ var gcv = "__coverage__";
75
+ var coverageData = {
76
+ path: "/home/runner/work/neeto-molecules/neeto-molecules/src/components/TableWrapper/index.jsx",
77
+ statementMap: {
78
+ "0": {
79
+ start: {
80
+ line: 6,
81
+ column: 21
82
+ },
83
+ end: {
84
+ line: 22,
85
+ column: 1
86
+ }
87
+ },
88
+ "1": {
89
+ start: {
90
+ line: 7,
91
+ column: 2
92
+ },
93
+ end: {
94
+ line: 21,
95
+ column: 8
96
+ }
97
+ },
98
+ "2": {
99
+ start: {
100
+ line: 24,
101
+ column: 0
102
+ },
103
+ end: {
104
+ line: 35,
105
+ column: 2
106
+ }
107
+ }
108
+ },
109
+ fnMap: {
110
+ "0": {
111
+ name: "(anonymous_0)",
112
+ decl: {
113
+ start: {
114
+ line: 6,
115
+ column: 21
116
+ },
117
+ end: {
118
+ line: 6,
119
+ column: 22
120
+ }
121
+ },
122
+ loc: {
123
+ start: {
124
+ line: 7,
125
+ column: 2
126
+ },
127
+ end: {
128
+ line: 21,
129
+ column: 8
130
+ }
131
+ },
132
+ line: 7
133
+ }
134
+ },
135
+ branchMap: {
136
+ "0": {
137
+ loc: {
138
+ start: {
139
+ line: 6,
140
+ column: 34
141
+ },
142
+ end: {
143
+ line: 6,
144
+ column: 48
145
+ }
146
+ },
147
+ type: "default-arg",
148
+ locations: [{
149
+ start: {
150
+ line: 6,
151
+ column: 46
152
+ },
153
+ end: {
154
+ line: 6,
155
+ column: 48
156
+ }
157
+ }],
158
+ line: 6
159
+ },
160
+ "1": {
161
+ loc: {
162
+ start: {
163
+ line: 6,
164
+ column: 50
165
+ },
166
+ end: {
167
+ line: 6,
168
+ column: 71
169
+ }
170
+ },
171
+ type: "default-arg",
172
+ locations: [{
173
+ start: {
174
+ line: 6,
175
+ column: 66
176
+ },
177
+ end: {
178
+ line: 6,
179
+ column: 71
180
+ }
181
+ }],
182
+ line: 6
183
+ }
184
+ },
185
+ s: {
186
+ "0": 0,
187
+ "1": 0,
188
+ "2": 0
189
+ },
190
+ f: {
191
+ "0": 0
192
+ },
193
+ b: {
194
+ "0": [0],
195
+ "1": [0]
196
+ },
197
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
198
+ hash: "2e8f830646a90399b1c7c4d1b52186adb04b8606"
199
+ };
200
+ var coverage = global[gcv] || (global[gcv] = {});
201
+ if (!coverage[path] || coverage[path].hash !== hash) {
202
+ coverage[path] = coverageData;
203
+ }
204
+ var actualCoverage = coverage[path];
205
+ {
206
+ // @ts-ignore
207
+ cov_2pe656guy1 = function () {
208
+ return actualCoverage;
209
+ };
210
+ }
211
+ return actualCoverage;
212
+ }
213
+ cov_2pe656guy1();
214
+ cov_2pe656guy1().s[0]++;
215
+ var TableWrapper = function TableWrapper(_ref) {
216
+ var children = _ref.children,
217
+ _ref$className = _ref.className,
218
+ className = _ref$className === void 0 ? (cov_2pe656guy1().b[0][0]++, "") : _ref$className,
219
+ _ref$hasPagination = _ref.hasPagination,
220
+ hasPagination = _ref$hasPagination === void 0 ? (cov_2pe656guy1().b[1][0]++, false) : _ref$hasPagination;
221
+ cov_2pe656guy1().f[0]++;
222
+ cov_2pe656guy1().s[1]++;
223
+ return /*#__PURE__*/React__default["default"].createElement("div", {
224
+ "data-testid": "table-wrapper",
225
+ className: classNames("flex min-h-0 w-full flex-grow flex-col pb-6", className)
226
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
227
+ className: classNames("min-h-0 flex-grow", {
228
+ "pb-11": hasPagination
229
+ })
230
+ }, children));
231
+ };
232
+ cov_2pe656guy1().s[2]++;
233
+
234
+ module.exports = TableWrapper;
235
+ //# sourceMappingURL=TableWrapper.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableWrapper.cjs.js","sources":["../node_modules/classnames/index.js","../src/components/TableWrapper/index.jsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst TableWrapper = ({ children, className = \"\", hasPagination = false }) => (\n <div\n data-testid=\"table-wrapper\"\n className={classNames(\n \"flex min-h-0 w-full flex-grow flex-col pb-6\",\n className\n )}\n >\n <div\n className={classNames(\"min-h-0 flex-grow\", {\n \"pb-11\": hasPagination,\n })}\n >\n {children}\n </div>\n </div>\n);\n\nTableWrapper.propTypes = {\n /**\n * Custom classnames for table wrapper.\n */\n className: PropTypes.string,\n /**\n * Handles table wrapper height when pagination is enabled.\n *\n * `hasPagination={totalCount > defaultPageSize}`\n */\n hasPagination: PropTypes.bool,\n};\n\nexport default TableWrapper;\n"],"names":["cov_2pe656guy1","actualCoverage","s","TableWrapper","_ref","children","_ref$className","className","b","_ref$hasPagination","hasPagination","f","React","createElement","classNames"],"mappings":";;;;;;;;;;;;;;;;;AAKA;AACA;AACA,CAAA,CAAC,YAAY;AAEb;AACA,EAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAEhC;EACC,SAAS,UAAU,GAAG;AACvB,GAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,GAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,IAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1B,IAAG,IAAI,CAAC,GAAG,EAAE,SAAS;AACtB;AACA,IAAG,IAAI,OAAO,GAAG,OAAO,GAAG,CAAC;AAC5B;IACG,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE;AACrD,KAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAClB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;AAClC,KAAI,IAAI,GAAG,CAAC,MAAM,EAAE;MACf,IAAI,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;MACxC,IAAI,KAAK,EAAE;AAChB,OAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;OACpB;MACD;AACL,KAAI,MAAM,IAAI,OAAO,KAAK,QAAQ,EAAE;KAChC,IAAI,G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AAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,cAAA,GAAAF,IAAA,CAAEG,SAAS;IAATA,SAAS,GAAAD,cAAA,KAAAN,KAAAA,CAAAA,IAAAA,cAAA,GAAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAG,EAAE,IAAAF,cAAA;IAAAG,kBAAA,GAAAL,IAAA,CAAEM,aAAa;IAAbA,aAAa,GAAAD,kBAAA,KAAAT,KAAAA,CAAAA,IAAAA,cAAA,GAAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAG,KAAK,IAAAC,kBAAA,CAAA;AAAAT,EAAAA,cAAA,GAAAW,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;AAAAX,EAAAA,cAAA,GAAAE,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;EACrE,oBAAAU,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BN,IAAAA,SAAS,EAAEO,UAAU,CACnB,6CAA6C,EAC7CP,SAAS,CAAA;GAGXK,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEN,IAAAA,SAAS,EAAEO,UAAU,CAAC,mBAAmB,EAAE;AACzC,MAAA,OAAO,EAAEJ,aAAAA;KACV,CAAA;GAEAL,EAAAA,QAAQ,CACL,CACF,CAAA;AAAD,EACN;AAACL,cAAA,GAAAE,CAAA,CAAA,CAAA,CAAA,EAAA;;;;"}
@@ -0,0 +1,229 @@
1
+ import React from 'react';
2
+
3
+ var classnames = {exports: {}};
4
+
5
+ /*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
8
+ http://jedwatson.github.io/classnames
9
+ */
10
+
11
+ (function (module) {
12
+ /* global define */
13
+
14
+ (function () {
15
+
16
+ var hasOwn = {}.hasOwnProperty;
17
+
18
+ function classNames() {
19
+ var classes = [];
20
+
21
+ for (var i = 0; i < arguments.length; i++) {
22
+ var arg = arguments[i];
23
+ if (!arg) continue;
24
+
25
+ var argType = typeof arg;
26
+
27
+ if (argType === 'string' || argType === 'number') {
28
+ classes.push(arg);
29
+ } else if (Array.isArray(arg)) {
30
+ if (arg.length) {
31
+ var inner = classNames.apply(null, arg);
32
+ if (inner) {
33
+ classes.push(inner);
34
+ }
35
+ }
36
+ } else if (argType === 'object') {
37
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
38
+ classes.push(arg.toString());
39
+ continue;
40
+ }
41
+
42
+ for (var key in arg) {
43
+ if (hasOwn.call(arg, key) && arg[key]) {
44
+ classes.push(key);
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ return classes.join(' ');
51
+ }
52
+
53
+ if (module.exports) {
54
+ classNames.default = classNames;
55
+ module.exports = classNames;
56
+ } else {
57
+ window.classNames = classNames;
58
+ }
59
+ }());
60
+ } (classnames));
61
+
62
+ var classNames = classnames.exports;
63
+
64
+ function cov_2pe656guy1() {
65
+ var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/TableWrapper/index.jsx";
66
+ var hash = "2e8f830646a90399b1c7c4d1b52186adb04b8606";
67
+ var global = new Function("return this")();
68
+ var gcv = "__coverage__";
69
+ var coverageData = {
70
+ path: "/home/runner/work/neeto-molecules/neeto-molecules/src/components/TableWrapper/index.jsx",
71
+ statementMap: {
72
+ "0": {
73
+ start: {
74
+ line: 6,
75
+ column: 21
76
+ },
77
+ end: {
78
+ line: 22,
79
+ column: 1
80
+ }
81
+ },
82
+ "1": {
83
+ start: {
84
+ line: 7,
85
+ column: 2
86
+ },
87
+ end: {
88
+ line: 21,
89
+ column: 8
90
+ }
91
+ },
92
+ "2": {
93
+ start: {
94
+ line: 24,
95
+ column: 0
96
+ },
97
+ end: {
98
+ line: 35,
99
+ column: 2
100
+ }
101
+ }
102
+ },
103
+ fnMap: {
104
+ "0": {
105
+ name: "(anonymous_0)",
106
+ decl: {
107
+ start: {
108
+ line: 6,
109
+ column: 21
110
+ },
111
+ end: {
112
+ line: 6,
113
+ column: 22
114
+ }
115
+ },
116
+ loc: {
117
+ start: {
118
+ line: 7,
119
+ column: 2
120
+ },
121
+ end: {
122
+ line: 21,
123
+ column: 8
124
+ }
125
+ },
126
+ line: 7
127
+ }
128
+ },
129
+ branchMap: {
130
+ "0": {
131
+ loc: {
132
+ start: {
133
+ line: 6,
134
+ column: 34
135
+ },
136
+ end: {
137
+ line: 6,
138
+ column: 48
139
+ }
140
+ },
141
+ type: "default-arg",
142
+ locations: [{
143
+ start: {
144
+ line: 6,
145
+ column: 46
146
+ },
147
+ end: {
148
+ line: 6,
149
+ column: 48
150
+ }
151
+ }],
152
+ line: 6
153
+ },
154
+ "1": {
155
+ loc: {
156
+ start: {
157
+ line: 6,
158
+ column: 50
159
+ },
160
+ end: {
161
+ line: 6,
162
+ column: 71
163
+ }
164
+ },
165
+ type: "default-arg",
166
+ locations: [{
167
+ start: {
168
+ line: 6,
169
+ column: 66
170
+ },
171
+ end: {
172
+ line: 6,
173
+ column: 71
174
+ }
175
+ }],
176
+ line: 6
177
+ }
178
+ },
179
+ s: {
180
+ "0": 0,
181
+ "1": 0,
182
+ "2": 0
183
+ },
184
+ f: {
185
+ "0": 0
186
+ },
187
+ b: {
188
+ "0": [0],
189
+ "1": [0]
190
+ },
191
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
192
+ hash: "2e8f830646a90399b1c7c4d1b52186adb04b8606"
193
+ };
194
+ var coverage = global[gcv] || (global[gcv] = {});
195
+ if (!coverage[path] || coverage[path].hash !== hash) {
196
+ coverage[path] = coverageData;
197
+ }
198
+ var actualCoverage = coverage[path];
199
+ {
200
+ // @ts-ignore
201
+ cov_2pe656guy1 = function () {
202
+ return actualCoverage;
203
+ };
204
+ }
205
+ return actualCoverage;
206
+ }
207
+ cov_2pe656guy1();
208
+ cov_2pe656guy1().s[0]++;
209
+ var TableWrapper = function TableWrapper(_ref) {
210
+ var children = _ref.children,
211
+ _ref$className = _ref.className,
212
+ className = _ref$className === void 0 ? (cov_2pe656guy1().b[0][0]++, "") : _ref$className,
213
+ _ref$hasPagination = _ref.hasPagination,
214
+ hasPagination = _ref$hasPagination === void 0 ? (cov_2pe656guy1().b[1][0]++, false) : _ref$hasPagination;
215
+ cov_2pe656guy1().f[0]++;
216
+ cov_2pe656guy1().s[1]++;
217
+ return /*#__PURE__*/React.createElement("div", {
218
+ "data-testid": "table-wrapper",
219
+ className: classNames("flex min-h-0 w-full flex-grow flex-col pb-6", className)
220
+ }, /*#__PURE__*/React.createElement("div", {
221
+ className: classNames("min-h-0 flex-grow", {
222
+ "pb-11": hasPagination
223
+ })
224
+ }, children));
225
+ };
226
+ cov_2pe656guy1().s[2]++;
227
+
228
+ export { TableWrapper as default };
229
+ //# sourceMappingURL=TableWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableWrapper.js","sources":["../node_modules/classnames/index.js","../src/components/TableWrapper/index.jsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nconst TableWrapper = ({ children, className = \"\", hasPagination = false }) => (\n <div\n data-testid=\"table-wrapper\"\n className={classNames(\n \"flex min-h-0 w-full flex-grow flex-col pb-6\",\n className\n )}\n >\n <div\n className={classNames(\"min-h-0 flex-grow\", {\n \"pb-11\": hasPagination,\n })}\n >\n {children}\n </div>\n </div>\n);\n\nTableWrapper.propTypes = {\n /**\n * Custom classnames for table wrapper.\n */\n className: PropTypes.string,\n /**\n * Handles table wrapper height when pagination is enabled.\n *\n * `hasPagination={totalCount > defaultPageSize}`\n */\n hasPagination: PropTypes.bool,\n};\n\nexport default TableWrapper;\n"],"names":["cov_2pe656guy1","actualCoverage","s","TableWrapper","_ref","children","_ref$className","className","b","_ref$hasPagination","hasPagination","f","React","createElement","classNames"],"mappings":";;;;;;;;;;;AAKA;AACA;AACA,CAAA,CAAC,YAAY;AAEb;AACA,EAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAEhC;EACC,SAAS,UAAU,GAAG;AACvB,GAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,GAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAA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A,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BN,IAAAA,SAAS,EAAEO,UAAU,CACnB,6CAA6C,EAC7CP,SAAS,CAAA;GAGXK,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEN,IAAAA,SAAS,EAAEO,UAAU,CAAC,mBAAmB,EAAE;AACzC,MAAA,OAAO,EAAEJ,aAAAA;KACV,CAAA;GAEAL,EAAAA,QAAQ,CACL,CACF,CAAA;AAAD,EACN;AAACL,cAAA,GAAAE,CAAA,CAAA,CAAA,CAAA,EAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -13,7 +13,7 @@
13
13
  "build": "NODE_ENV=production build-storybook",
14
14
  "serve": "node .storybook/db",
15
15
  "watch": "rollup -c rollup.config.js --watch",
16
- "storybook": "node .storybook/db & NODE_ENV=development start-storybook -p 6006",
16
+ "storybook": "(trap 'kill 0' SIGINT; node .storybook/db & NODE_ENV=development start-storybook -p 6006)",
17
17
  "build:jsdoc": "node ./.scripts/jsdoc-builder.mjs"
18
18
  },
19
19
  "engines": {
@@ -120,6 +120,7 @@
120
120
  "qrcode.react": "^3.1.0",
121
121
  "qs": "^6.11.0",
122
122
  "ramda": "^0.28.0",
123
+ "raw-loader": "^4.0.2",
123
124
  "react": "^17.0.2",
124
125
  "react-dom": "17.0.2",
125
126
  "react-helmet": "^6.1.0",
package/types/Header.d.ts CHANGED
@@ -1,15 +1,28 @@
1
1
  import React from "react";
2
-
2
+ /**
3
+ *
4
+ * The Header component can be used to display the page title and an action block
5
+ *
6
+ * to perform the main operations on the page.
7
+ *
8
+ * @example
9
+ *
10
+ * import Header from "@bigbinary/neeto-molecules/Header";
11
+ *
12
+ * const App = () => (
13
+ * <Header title="Heading" actionBlock={<Button label="Primary action" />} />
14
+ * );
15
+ * @endexample
16
+ */
3
17
  const Header: React.FC<{
4
- title?: React.ReactNode;
5
- className?: string,
6
- actionBlock?: React.ReactNode,
7
- searchProps?: object,
8
- breadcrumbs?: {
9
- text: string,
10
- link: string,
11
- }[],
12
- menuBarToggle?: (...args: any[]) => any,
18
+ title?: React.ReactNode;
19
+ className?: string;
20
+ actionBlock?: React.ReactNode;
21
+ searchProps?: object;
22
+ breadcrumbs?: {
23
+ text: string;
24
+ link: string;
25
+ }[];
26
+ menuBarToggle?: (...args: any[]) => any;
13
27
  }>;
14
-
15
- export default Header;
28
+ export default Header;
@@ -1,9 +1,34 @@
1
1
  import React from "react";
2
-
2
+ /**
3
+ *
4
+ * The SubHeader component is used alongside the header component to display
5
+ *
6
+ * additional information or actions.
7
+ *
8
+ * @example
9
+ *
10
+ * import SubHeader from "@bigbinary/neeto-molecules/SubHeader";
11
+ *
12
+ * const App = () => (
13
+ * <SubHeader
14
+ * leftActionBlock={
15
+ * <Typography component="h4" style="h4">
16
+ * 118 Contacts
17
+ * </Typography>
18
+ * }
19
+ * rightActionBlock={
20
+ * <>
21
+ * <Button icon={Delete} label="Delete" style="secondary" />
22
+ * <Button label="Disable" style="secondary" />
23
+ * </>
24
+ * }
25
+ * />
26
+ * );
27
+ * @endexample
28
+ */
3
29
  const SubHeader: React.FC<{
4
- className?: string,
5
- leftActionBlock?: React.ReactNode,
6
- rightActionBlock?: React.ReactNode,
30
+ className?: string;
31
+ leftActionBlock?: React.ReactNode;
32
+ rightActionBlock?: React.ReactNode;
7
33
  }>;
8
-
9
- export default SubHeader;
34
+ export default SubHeader;
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * TableWrapper is used to wrap the table component.
5
+ *
6
+ * It is used to avoid the dynamic height calculation and
7
+ *
8
+ * inconsistency in heights for the parent container of the table component.
9
+ *
10
+ * TableWrapper should be used only with Tables used in the listing layout as
11
+ *
12
+ * shown below.
13
+ *
14
+ * @example
15
+ *
16
+ * import TableWrapper from "@bigbinary/neeto-molecules/TableWrapper";
17
+ *
18
+ * const App = () => (
19
+ * <Container>
20
+ * <Header />
21
+ * <SubHeader />
22
+ * <TableWrapper>
23
+ * <Table columnData={columnData} rowData={rowData} />
24
+ * </TableWrapper>
25
+ * </Container>
26
+ * );
27
+ * @endexample
28
+ */
29
+ const TableWrapper: React.FC<{
30
+ hasPagination?: boolean;
31
+ className?: string;
32
+ children: React.ReactNode;
33
+ }>;
34
+ export default TableWrapper;