@occmundial/occ-atomic 1.20.0 → 1.21.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [1.21.1](https://github.com/occmundial/occ-atomic/compare/v1.21.0...v1.21.1) (2022-05-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Change in dimensions of full screen modal ([c3434a2](https://github.com/occmundial/occ-atomic/commit/c3434a28d1bf6455205b5f37419cd14567ddb126))
7
+ * Ignore plugin directory in doc gen ([d06e206](https://github.com/occmundial/occ-atomic/commit/d06e2064f9ec30066fef70432122d3d49a6ae99f))
8
+
9
+ # [1.21.0](https://github.com/occmundial/occ-atomic/compare/v1.20.1...v1.21.0) (2022-02-16)
10
+
11
+
12
+ ### Features
13
+
14
+ * Implement babel plugin ([a73c4fe](https://github.com/occmundial/occ-atomic/commit/a73c4fe73abd82e8c159ed7b6bfae0e26ecb613b))
15
+
16
+ ## [1.20.1](https://github.com/occmundial/occ-atomic/compare/v1.20.0...v1.20.1) (2022-01-31)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * Change in location icon and new locationSolid icon ([4ec15e1](https://github.com/occmundial/occ-atomic/commit/4ec15e18dabf7f23469d989d57812d45be17f5d4))
22
+
1
23
  # [1.20.0](https://github.com/occmundial/occ-atomic/compare/v1.19.0...v1.20.0) (2022-01-19)
2
24
 
3
25
 
@@ -67,8 +67,8 @@ var _default = {
67
67
  },
68
68
  cardWrapper: {
69
69
  position: 'relative',
70
- maxWidth: '100vw',
71
- maxHeight: '100vh'
70
+ maxWidth: '100%',
71
+ maxHeight: '100%'
72
72
  },
73
73
  cardBlock: _defineProperty({
74
74
  margin: _spacing["default"].gutter
@@ -92,7 +92,7 @@ var _default = {
92
92
  },
93
93
  minHeight: function minHeight(_ref3) {
94
94
  var fullSize = _ref3.fullSize;
95
- return fullSize && '100vh';
95
+ return fullSize && '100%';
96
96
  },
97
97
  borderRadius: function borderRadius(_ref4) {
98
98
  var fullSize = _ref4.fullSize;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ var types = require('@babel/types');
4
+
5
+ function error(msg) {
6
+ throw new Error("babel-plugin-occ-atomic: ".concat(msg));
7
+ }
8
+
9
+ function getImportsList(path) {
10
+ return path.node.specifiers.filter(function (specifier) {
11
+ if (specifier.type !== 'ImportSpecifier') {
12
+ error('Import entire module detected. Using this syntax means we cannot tree shake properly.');
13
+ } else return true;
14
+ });
15
+ }
16
+
17
+ function importDeclaration(specifier, path) {
18
+ return types.importDeclaration([specifier], types.stringLiteral(path));
19
+ }
20
+
21
+ function replaceImport(path, statements) {
22
+ if (statements.length > 0) {
23
+ path.replaceWithMultiple(statements);
24
+ }
25
+
26
+ return path;
27
+ }
28
+
29
+ var subatomic = ['colors', 'fonts', 'grid', 'icons', 'iconSizes', 'shadows', 'spacing'];
30
+
31
+ function importModule(path) {
32
+ var importsList = getImportsList(path);
33
+ var importStatements = importsList.map(function (specifier) {
34
+ var importName = specifier.imported.name;
35
+
36
+ if (importName === 'toaster') {
37
+ return importDeclaration(specifier, '@occmundial/occ-atomic/build/Toaster/functions');
38
+ } else if (importName === 'Nav' || importName === 'Menu') {
39
+ return importDeclaration(specifier, "@occmundial/occ-atomic/build/Header/".concat(importName));
40
+ } else if (subatomic.includes(importName)) {
41
+ return importDeclaration(types.importDefaultSpecifier(types.identifier(importName)), "@occmundial/occ-atomic/build/subatomic/".concat(importName));
42
+ }
43
+
44
+ return importDeclaration(types.importDefaultSpecifier(types.identifier(importName)), "@occmundial/occ-atomic/build/".concat(importName));
45
+ });
46
+ replaceImport(path, importStatements);
47
+ }
48
+
49
+ module.exports = function () {
50
+ return {
51
+ visitor: {
52
+ ImportDeclaration: function ImportDeclaration(path) {
53
+ if (path.node.source.value === '@occmundial/occ-atomic') {
54
+ return importModule(path);
55
+ }
56
+ }
57
+ }
58
+ };
59
+ };
@@ -17,7 +17,7 @@ var _default = {
17
17
  display: 'inline-block',
18
18
  icon: function icon() {
19
19
  var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [_colors["default"].grey900];
20
- return "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 24 24\">\n <path fill=\"".concat(color[0], "\" d=\"M19.24,2.6A1.71,1.71,0,0,1,21,3l0,0,0,0a1.72,1.72,0,0,1,.34,1.73h0L15.07,20.41A1.67,1.67,0,0,1,13.5,21.5h-.05a1.67,1.67,0,0,1-1.58-1.17v0L10.17,14a1,1,0,0,0-.67-.68L3.75,11.77a1.63,1.63,0,0,1-.68-.37,2,2,0,0,1-.41-.54l0,0v0a1.65,1.65,0,0,1,1-2.18l15.6-6Z\"/>\n </svg>");
20
+ return "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<path fill=\"".concat(color[0], "\" fill-rule=\"evenodd\"\n\t\t\td=\"M19.6181 2.09917C20.1976 1.91098 20.9207 1.96873 21.4505 2.48484L21.4903 2.52359L21.5255 2.5665C21.8305 2.93788 22.1915 3.63242 21.8855 4.38224C21.885 4.38329 21.8846 4.38434 21.8842 4.38539L15.2368 20.8519C14.9746 21.573 14.2698 22 13.5791 22H13.5275C12.6346 22 12.0633 21.3686 11.8587 20.7697L11.8476 20.7372L10.0728 14.0808C9.98053 13.7346 9.71012 13.4643 9.36394 13.3721L3.3172 11.7616C3.00999 11.6838 2.76733 11.517 2.59946 11.3652C2.42359 11.2061 2.27046 11.01 2.16132 10.7974L2.14768 10.7708L2.13565 10.7434C1.71767 9.79326 2.29079 8.7748 3.16161 8.44964L19.5922 2.10756L19.6181 2.09917ZM19.8164 4.16485L4.60724 10.0355L9.87868 11.4395C10.9172 11.7161 11.7284 12.5271 12.0053 13.5655L13.6028 19.557L19.8164 4.16485Z\" />\n\t</svg>");
21
21
  }
22
22
  };
23
23
  exports["default"] = _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _colors = _interopRequireDefault(require("../colors"));
9
+
10
+ var _spacing = _interopRequireDefault(require("../spacing"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ var _default = {
15
+ width: _spacing["default"].base,
16
+ height: _spacing["default"].base,
17
+ display: 'inline-block',
18
+ icon: function icon() {
19
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [_colors["default"].grey900];
20
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 24 24\">\n <path fill=\"".concat(color[0], "\" d=\"M19.24,2.6A1.71,1.71,0,0,1,21,3l0,0,0,0a1.72,1.72,0,0,1,.34,1.73h0L15.07,20.41A1.67,1.67,0,0,1,13.5,21.5h-.05a1.67,1.67,0,0,1-1.58-1.17v0L10.17,14a1,1,0,0,0-.67-.68L3.75,11.77a1.63,1.63,0,0,1-.68-.37,2,2,0,0,1-.41-.54l0,0v0a1.65,1.65,0,0,1,1-2.18l15.6-6Z\"/>\n </svg>");
21
+ }
22
+ };
23
+ exports["default"] = _default;
@@ -203,6 +203,8 @@ var _book = _interopRequireDefault(require("./icons/book"));
203
203
 
204
204
  var _location = _interopRequireDefault(require("./icons/location"));
205
205
 
206
+ var _locationSolid = _interopRequireDefault(require("./icons/locationSolid"));
207
+
206
208
  var _suitcase = _interopRequireDefault(require("./icons/suitcase"));
207
209
 
208
210
  var _suitcaseSolid = _interopRequireDefault(require("./icons/suitcaseSolid"));
@@ -343,6 +345,7 @@ var _default = {
343
345
  hourGlass: _hourGlass["default"],
344
346
  book: _book["default"],
345
347
  location: _location["default"],
348
+ locationSolid: _locationSolid["default"],
346
349
  suitcase: _suitcase["default"],
347
350
  suitcaseSolid: _suitcaseSolid["default"],
348
351
  profile: _profile["default"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occmundial/occ-atomic",
3
- "version": "1.20.0",
3
+ "version": "1.21.1",
4
4
  "description": "Collection of shareable styled React components for OCC applications.",
5
5
  "homepage": "http://occmundial.github.io/occ-atomic",
6
6
  "main": "build/index.js",
@@ -21,7 +21,8 @@
21
21
  "prepare": "npm run build && husky install",
22
22
  "predeploy": "npm run build:bundle",
23
23
  "deploy": "node scripts/deploy.js",
24
- "semantic-release": "semantic-release"
24
+ "semantic-release": "semantic-release",
25
+ "audit-fix": "cross-env npm_config_yes=true npx yarn-audit-fix"
25
26
  },
26
27
  "repository": {
27
28
  "type": "git",
@@ -63,6 +64,7 @@
63
64
  "base64-url": "^2.2.2",
64
65
  "buffer": "^6.0.3",
65
66
  "chokidar": "^3.5.2",
67
+ "cross-env": "^7.0.3",
66
68
  "css-loader": "^6.3.0",
67
69
  "enzyme": "^3.3.0",
68
70
  "enzyme-adapter-react-16": "^1.1.1",