@occmundial/occ-atomic 1.16.0 → 1.18.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.
Files changed (145) hide show
  1. package/.prettierrc +6 -6
  2. package/.whitesource +11 -11
  3. package/CHANGELOG.md +943 -913
  4. package/CONTRIBUTING.md +24 -0
  5. package/README.md +21 -21
  6. package/build/Autocomplete/Autocomplete.js +20 -16
  7. package/build/Autocomplete/Autocomplete.test.js +11 -11
  8. package/build/Avatar/Avatar.js +20 -16
  9. package/build/Avatar/Avatar.test.js +2 -2
  10. package/build/Avatar/AvatarContent/AvatarContent.js +5 -5
  11. package/build/Avatar/AvatarContent/AvatarContent.test.js +6 -6
  12. package/build/Avatar/index.js +4 -2
  13. package/build/Banner/Banner.js +6 -6
  14. package/build/Banner/Banner.test.js +2 -2
  15. package/build/Button/Button.js +26 -22
  16. package/build/Button/Button.test.js +13 -13
  17. package/build/Button/index.js +4 -2
  18. package/build/ButtonAlign/ButtonAlign.js +20 -16
  19. package/build/ButtonAlign/ButtonAlign.test.js +3 -3
  20. package/build/Card/Card.js +1 -1
  21. package/build/Card/Card.test.js +4 -4
  22. package/build/Card/index.js +4 -2
  23. package/build/Check/Check.js +18 -14
  24. package/build/Check/Check.test.js +7 -7
  25. package/build/Checkbox/Checkbox.js +18 -14
  26. package/build/Checkbox/Checkbox.test.js +8 -8
  27. package/build/Checkbox/index.js +4 -2
  28. package/build/Column/Column.js +1 -1
  29. package/build/Column/Column.test.js +3 -3
  30. package/build/Container/Container.js +1 -1
  31. package/build/Container/Container.test.js +4 -4
  32. package/build/Droplist/Droplist.js +33 -29
  33. package/build/Droplist/Droplist.test.js +11 -11
  34. package/build/Droplist/index.js +4 -2
  35. package/build/Flexbox/Flexbox.js +16 -12
  36. package/build/Flexbox/Flexbox.test.js +3 -3
  37. package/build/Flexbox/index.js +4 -2
  38. package/build/Footer/Footer.js +16 -16
  39. package/build/Footer/Footer.test.js +2 -2
  40. package/build/Footer/List/List.js +25 -21
  41. package/build/Grid/Col/Col.js +1 -1
  42. package/build/Grid/Col/Col.test.js +3 -3
  43. package/build/Grid/Col/index.js +4 -2
  44. package/build/Grid/Grid.js +18 -12
  45. package/build/Grid/Row/Row.js +1 -1
  46. package/build/Grid/Row/Row.test.js +2 -2
  47. package/build/Grid/Row/index.js +4 -2
  48. package/build/Grid/index.js +4 -2
  49. package/build/Header/Header.js +35 -31
  50. package/build/Header/Header.test.js +8 -8
  51. package/build/Header/Menu/Menu.js +23 -19
  52. package/build/Header/Menu/Menu.test.js +7 -7
  53. package/build/Header/Nav/Nav.js +19 -15
  54. package/build/Header/Nav/Nav.test.js +5 -5
  55. package/build/Hidden/Hidden.js +17 -13
  56. package/build/Hidden/Hidden.test.js +6 -6
  57. package/build/Hidden/index.js +4 -2
  58. package/build/Icon/Icon.js +16 -12
  59. package/build/Icon/Icon.test.js +3 -3
  60. package/build/Icon/index.js +4 -2
  61. package/build/Input/Input.js +29 -25
  62. package/build/Input/Input.test.js +21 -21
  63. package/build/Input/index.js +17 -13
  64. package/build/Label/Label.js +17 -13
  65. package/build/Label/Label.test.js +6 -6
  66. package/build/LayerApp/LayerApp.js +22 -18
  67. package/build/LayerApp/LayerApp.test.js +4 -4
  68. package/build/Modal/Modal.js +38 -33
  69. package/build/Modal/Modal.test.js +10 -10
  70. package/build/Modal/index.js +19 -13
  71. package/build/Modal/styles.js +11 -8
  72. package/build/NavAside/NavAside.js +22 -18
  73. package/build/NavAside/NavAside.test.js +12 -12
  74. package/build/NavAside/index.js +16 -12
  75. package/build/NavIcon/NavIcon.js +20 -16
  76. package/build/NavItem/NavItem.js +18 -14
  77. package/build/NavTab/NavTab.js +32 -28
  78. package/build/NavTop/NavTop.js +20 -16
  79. package/build/OrderBy/OrderBy.js +23 -19
  80. package/build/OrderBy/OrderBy.test.js +6 -6
  81. package/build/Pager/Break/Break.js +1 -1
  82. package/build/Pager/Break/Break.test.js +4 -4
  83. package/build/Pager/Page/Page.js +1 -1
  84. package/build/Pager/Page/Page.test.js +5 -5
  85. package/build/Pager/Pager.js +21 -17
  86. package/build/Pager/Pager.test.js +10 -10
  87. package/build/Pill/Choice/Choice.js +18 -14
  88. package/build/Pill/Group/Group.js +2 -2
  89. package/build/Pill/Pill.js +28 -22
  90. package/build/Pill/Pill.test.js +12 -12
  91. package/build/Pill/Stack/Stack.js +4 -4
  92. package/build/Placeholder/Placeholder.js +2 -2
  93. package/build/Placeholder/Placeholder.test.js +3 -3
  94. package/build/Radio/Radio.js +19 -15
  95. package/build/Radio/Radio.test.js +6 -6
  96. package/build/RangeCounter/RangeCounter.js +17 -13
  97. package/build/RangeCounter/RangeCounter.test.js +3 -3
  98. package/build/Row/Row.js +1 -1
  99. package/build/Row/Row.test.js +2 -2
  100. package/build/SightLogo/SightLogo.js +2 -2
  101. package/build/SightLogo/SightLogo.test.js +2 -2
  102. package/build/SlideDown/SlideDown.js +28 -22
  103. package/build/SlideDown/SlideDown.test.js +9 -9
  104. package/build/SlideToggle/SlideToggle.js +19 -15
  105. package/build/SlideToggle/SlideToggle.test.js +7 -7
  106. package/build/SubHeader/SubHeader.js +20 -16
  107. package/build/SubHeader/SubHeader.test.js +7 -7
  108. package/build/SwitchGroup/SwitchGroup.js +17 -13
  109. package/build/SwitchGroup/SwitchGroup.test.js +6 -6
  110. package/build/Tag/Tag.js +4 -4
  111. package/build/Tag/Tag.test.js +6 -6
  112. package/build/Text/Text.js +18 -12
  113. package/build/Text/Text.test.js +8 -8
  114. package/build/TextField/TextField.js +42 -38
  115. package/build/TextField/TextField.test.js +19 -19
  116. package/build/Tip/Tip.js +16 -12
  117. package/build/Tip/Tip.test.js +5 -5
  118. package/build/Title/Title.js +16 -12
  119. package/build/Title/Title.test.js +3 -3
  120. package/build/Toaster/Toast/Toast.js +11 -11
  121. package/build/Toaster/Toaster.js +27 -23
  122. package/build/Toaster/Toaster.test.js +6 -6
  123. package/build/TourTip/TourTip.js +15 -11
  124. package/build/TourTip/TourTip.test.js +2 -2
  125. package/build/Visible/Visible.js +16 -12
  126. package/build/Visible/Visible.test.js +4 -4
  127. package/build/WindowSize/WindowSize.js +17 -11
  128. package/build/WindowSize/WindowSize.test.js +4 -4
  129. package/build/subatomic/icons/occDart.js +7 -5
  130. package/build/subatomic/icons/occHorizontal.js +7 -5
  131. package/build/subatomic/icons/occVertical.js +7 -5
  132. package/build/subatomic/icons/{emoji.js → warning.js} +1 -1
  133. package/build/subatomic/icons/warningSolid.js +23 -0
  134. package/build/subatomic/icons.js +6 -9
  135. package/commitlint.config.js +6 -0
  136. package/package.json +122 -114
  137. package/playroom/FrameComponent.js +31 -22
  138. package/playroom/styles.js +14 -14
  139. package/playroom.config.js +7 -7
  140. package/.vscode/settings.json +0 -22
  141. package/build/Grid/Grid.test.js +0 -22
  142. package/build/Grid/Row/Rowdsd.js +0 -39
  143. package/build/hooks/useEventListener.js +0 -23
  144. package/build/hooks/usePrevious.js +0 -19
  145. package/yarn-error.log +0 -11800
package/package.json CHANGED
@@ -1,114 +1,122 @@
1
- {
2
- "name": "@occmundial/occ-atomic",
3
- "version": "1.16.0",
4
- "description": "Collection of shareable styled React components for OCC applications.",
5
- "homepage": "http://occmundial.github.io/occ-atomic",
6
- "main": "build/index.js",
7
- "scripts": {
8
- "prestart": "npm run gen-docs",
9
- "start": "set NODE_ENV=development && npm-run-all --parallel start-docs gen-docs:watch",
10
- "start:mac": "NODE_ENV=development npm-run-all --parallel start-docs gen-docs:watch",
11
- "start-docs": "node scripts/server.js",
12
- "gen-docs": "node scripts/generateComponentData.js",
13
- "gen-docs:watch": "npm run gen-docs -- --watch",
14
- "test": "jest",
15
- "test:watch": "jest --watch",
16
- "build": "babel lib -d build",
17
- "build:watch": "babel lib -w -d build",
18
- "build:bundle": "babel-node scripts/build.js",
19
- "lint": "esw webpack.config.* lib src --color",
20
- "lint:watch": "npm run lint -- --watch",
21
- "prepare": "npm run build",
22
- "predeploy": "set NODE_ENV=production && npm run build:bundle && npm run playroom:build",
23
- "deploy": "gh-pages -d dist",
24
- "playroom:start": "playroom start",
25
- "playroom:build": "playroom build"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/occmundial/occ-atomic"
30
- },
31
- "author": "OCCMundial",
32
- "license": "ISC",
33
- "devDependencies": {
34
- "@babel/cli": "^7.4.4",
35
- "@babel/core": "^7.4.5",
36
- "@babel/node": "^7.0.0",
37
- "@babel/plugin-proposal-class-properties": "^7.0.0",
38
- "@babel/plugin-proposal-decorators": "^7.0.0",
39
- "@babel/plugin-proposal-do-expressions": "^7.0.0",
40
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
41
- "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
42
- "@babel/plugin-proposal-function-bind": "^7.0.0",
43
- "@babel/plugin-proposal-function-sent": "^7.0.0",
44
- "@babel/plugin-proposal-json-strings": "^7.0.0",
45
- "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
46
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
47
- "@babel/plugin-proposal-numeric-separator": "^7.0.0",
48
- "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
49
- "@babel/plugin-proposal-optional-chaining": "^7.0.0",
50
- "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
51
- "@babel/plugin-proposal-throw-expressions": "^7.0.0",
52
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
53
- "@babel/plugin-syntax-import-meta": "^7.0.0",
54
- "@babel/preset-env": "^7.0.0",
55
- "@babel/preset-react": "^7.0.0",
56
- "babel-core": "^7.0.0-bridge.0",
57
- "babel-eslint": "^9.0.0",
58
- "babel-jest": "^23.4.2",
59
- "babel-loader": "^8.0.2",
60
- "base64-url": "^2.2.2",
61
- "chokidar": "^2.0.3",
62
- "css-loader": "^1.0.0",
63
- "enzyme": "^3.3.0",
64
- "enzyme-adapter-react-16": "^1.1.1",
65
- "eslint": "^4.13.0",
66
- "eslint-plugin-import": "^2.8.0",
67
- "eslint-plugin-jsx-a11y": "^6.0.2",
68
- "eslint-plugin-react": "^7.5.1",
69
- "eslint-watch": "^3.1.3",
70
- "gh-pages": "^1.2.0",
71
- "highlight.js": "^10.4.1",
72
- "jest": "^22.4.3",
73
- "jsdom": "^11.11.0",
74
- "npm-run-all": "^4.1.3",
75
- "playroom": "^0.9.1",
76
- "prettier": "^2.0.4",
77
- "prop-types": "^15.6.0",
78
- "react": "^16.4.1",
79
- "react-addons-test-utils": "^15.6.2",
80
- "react-docgen": "^2.20.1",
81
- "react-dom": "^16.4.1",
82
- "react-meta-tags": "^0.7.4",
83
- "react-test-renderer": "^16.3.1",
84
- "style-loader": "^0.21.0",
85
- "terser-webpack-plugin": "^5.1.1",
86
- "webpack": "^5.32.0",
87
- "webpack-dev-server": "^3.7.2"
88
- },
89
- "dependencies": {
90
- "class-autobind": "^0.1.4",
91
- "hex-rgba": "^1.0.2",
92
- "idx": "^2.5.6",
93
- "jquery": "^3.2.1",
94
- "lodash": "^4.17.14",
95
- "natives": "1.1.6",
96
- "react-jss": "8.6.0",
97
- "react-text-mask": "^5.4.3",
98
- "react-waypoint": "^8.0.0",
99
- "unorm": "^1.6.0"
100
- },
101
- "jest": {
102
- "testURL": "https://occmundial.github.io/occ-atomic",
103
- "setupTestFrameworkScriptFile": "./setupTests.js",
104
- "collectCoverageFrom": [
105
- "lib/**/*.js"
106
- ],
107
- "coverageReporters": [
108
- "lcov"
109
- ],
110
- "roots": [
111
- "<rootDir>/lib/"
112
- ]
113
- }
114
- }
1
+ {
2
+ "name": "@occmundial/occ-atomic",
3
+ "version": "1.18.2",
4
+ "description": "Collection of shareable styled React components for OCC applications.",
5
+ "homepage": "http://occmundial.github.io/occ-atomic",
6
+ "main": "build/index.js",
7
+ "scripts": {
8
+ "prestart": "npm run gen-docs",
9
+ "start": "set NODE_ENV=development && npm-run-all --parallel start-docs gen-docs:watch",
10
+ "start:mac": "NODE_ENV=development npm-run-all --parallel start-docs gen-docs:watch",
11
+ "start-docs": "webpack serve --port 3030 --config webpack.config.dev.js",
12
+ "gen-docs": "node scripts/generateComponentData.js",
13
+ "gen-docs:watch": "npm run gen-docs -- --watch",
14
+ "test": "jest",
15
+ "test:watch": "jest --watch",
16
+ "build": "babel lib -d build",
17
+ "build:watch": "babel lib -w -d build",
18
+ "build:bundle": "babel-node scripts/build.js",
19
+ "lint": "esw webpack.config.* lib src --color",
20
+ "lint:watch": "npm run lint -- --watch",
21
+ "prepare": "npm run build && husky install",
22
+ "predeploy": "npm run build:bundle",
23
+ "deploy": "node scripts/deploy.js",
24
+ "semantic-release": "semantic-release"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/occmundial/occ-atomic.git"
29
+ },
30
+ "author": "OCCMundial",
31
+ "license": "ISC",
32
+ "devDependencies": {
33
+ "@babel/cli": "^7.4.4",
34
+ "@babel/core": "^7.4.5",
35
+ "@babel/node": "^7.0.0",
36
+ "@babel/plugin-proposal-class-properties": "^7.0.0",
37
+ "@babel/plugin-proposal-decorators": "^7.0.0",
38
+ "@babel/plugin-proposal-do-expressions": "^7.0.0",
39
+ "@babel/plugin-proposal-export-default-from": "^7.0.0",
40
+ "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
41
+ "@babel/plugin-proposal-function-bind": "^7.0.0",
42
+ "@babel/plugin-proposal-function-sent": "^7.0.0",
43
+ "@babel/plugin-proposal-json-strings": "^7.0.0",
44
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
45
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
46
+ "@babel/plugin-proposal-numeric-separator": "^7.0.0",
47
+ "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
48
+ "@babel/plugin-proposal-optional-chaining": "^7.0.0",
49
+ "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
50
+ "@babel/plugin-proposal-throw-expressions": "^7.0.0",
51
+ "@babel/plugin-syntax-dynamic-import": "^7.0.0",
52
+ "@babel/plugin-syntax-import-meta": "^7.0.0",
53
+ "@babel/preset-env": "^7.0.0",
54
+ "@babel/preset-react": "^7.0.0",
55
+ "@commitlint/cli": "13.1.0",
56
+ "@commitlint/config-angular": "13.1.0",
57
+ "@semantic-release/changelog": "6.0.0",
58
+ "@semantic-release/git": "10.0.0",
59
+ "babel-core": "^7.0.0-bridge.0",
60
+ "babel-eslint": "^9.0.0",
61
+ "babel-jest": "^27.2.1",
62
+ "babel-loader": "^8.0.2",
63
+ "base64-url": "^2.2.2",
64
+ "buffer": "^6.0.3",
65
+ "chokidar": "^3.5.2",
66
+ "css-loader": "^6.3.0",
67
+ "enzyme": "^3.3.0",
68
+ "enzyme-adapter-react-16": "^1.1.1",
69
+ "eslint": "^4.13.0",
70
+ "eslint-plugin-import": "^2.8.0",
71
+ "eslint-plugin-jsx-a11y": "^6.0.2",
72
+ "eslint-plugin-react": "^7.5.1",
73
+ "eslint-watch": "^7.0.0",
74
+ "gh-pages": "^3.2.3",
75
+ "husky": "^7.0.0",
76
+ "jest": "^27.2.1",
77
+ "jsdom": "^11.11.0",
78
+ "npm-run-all": "^4.1.3",
79
+ "prettier": "^2.0.4",
80
+ "prism-react-renderer": "^1.2.1",
81
+ "prop-types": "^15.6.0",
82
+ "react": "^16.4.1",
83
+ "react-addons-test-utils": "^15.6.2",
84
+ "react-docgen": "^2.20.1",
85
+ "react-dom": "^16.4.1",
86
+ "react-meta-tags": "^0.7.4",
87
+ "react-test-renderer": "^16.3.1",
88
+ "semantic-release": "18.0.0",
89
+ "semantic-release-slack-bot": "^2.1.1",
90
+ "style-loader": "^0.21.0",
91
+ "terser-webpack-plugin": "^5.1.1",
92
+ "webpack": "^5.32.0",
93
+ "webpack-cli": "^4.8.0",
94
+ "webpack-dev-server": "^4.2.0"
95
+ },
96
+ "dependencies": {
97
+ "class-autobind": "^0.1.4",
98
+ "hex-rgba": "^1.0.2",
99
+ "idx": "^2.5.6",
100
+ "jquery": "^3.2.1",
101
+ "lodash": "^4.17.21",
102
+ "natives": "1.1.6",
103
+ "react-jss": "8.6.0",
104
+ "react-text-mask": "^5.4.3",
105
+ "react-waypoint": "^8.0.0",
106
+ "unorm": "^1.6.0"
107
+ },
108
+ "jest": {
109
+ "testURL": "https://occmundial.github.io/occ-atomic",
110
+ "setupTestFrameworkScriptFile": "./setupTests.js",
111
+ "testEnvironment": "jsdom",
112
+ "collectCoverageFrom": [
113
+ "lib/**/*.js"
114
+ ],
115
+ "coverageReporters": [
116
+ "lcov"
117
+ ],
118
+ "roots": [
119
+ "<rootDir>/lib/"
120
+ ]
121
+ }
122
+ }
@@ -1,22 +1,31 @@
1
- import React from 'react';
2
- import injectSheet from 'react-jss';
3
- import MetaTags from 'react-meta-tags';
4
-
5
- import styles from './styles';
6
-
7
- class FrameComponent extends React.Component {
8
- render() {
9
- const { children, classes } = this.props;
10
-
11
- return (
12
- <>
13
- <MetaTags>
14
- <link href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,600|Open+Sans:400,600,700" rel="stylesheet" />
15
- </MetaTags>
16
- {children}
17
- </>
18
- );
19
- }
20
- }
21
-
22
- export default injectSheet(styles)(FrameComponent);
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import injectSheet from 'react-jss';
4
+ import MetaTags from 'react-meta-tags';
5
+
6
+ import styles from './styles';
7
+
8
+ class FrameComponent extends React.Component {
9
+ render() {
10
+ const { children } = this.props;
11
+
12
+ return (
13
+ <>
14
+ <MetaTags>
15
+ <link
16
+ href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,600|Open+Sans:400,600,700"
17
+ rel="stylesheet"
18
+ />
19
+ </MetaTags>
20
+ {children}
21
+ </>
22
+ );
23
+ }
24
+ }
25
+
26
+ FrameComponent.propTypes = {
27
+ children: PropTypes.node.isRequired,
28
+ classes: PropTypes.object.isRequired
29
+ };
30
+
31
+ export default injectSheet(styles)(FrameComponent);
@@ -1,14 +1,14 @@
1
- import colors from '../lib/subatomic/colors';
2
-
3
- export default {
4
- '@global': {
5
- '*': {
6
- boxSizing: 'border-box',
7
- },
8
- body: {
9
- padding: 0,
10
- margin: 0,
11
- background: colors.bgGrey
12
- }
13
- }
14
- };
1
+ import colors from '../lib/subatomic/colors';
2
+
3
+ export default {
4
+ '@global': {
5
+ '*': {
6
+ boxSizing: 'border-box',
7
+ },
8
+ body: {
9
+ padding: 0,
10
+ margin: 0,
11
+ background: colors.bgGrey
12
+ }
13
+ }
14
+ };
@@ -1,7 +1,7 @@
1
- module.exports = {
2
- components: './build/index',
3
- outputPath: './dist/playroom',
4
- frameComponent: './playroom/FrameComponent.js',
5
- title: 'OCC-Atomic',
6
- widths: [320, 576, 768, 992, 1200, 1500]
7
- };
1
+ module.exports = {
2
+ components: './build/index',
3
+ outputPath: './dist/playroom',
4
+ frameComponent: './playroom/FrameComponent.js',
5
+ title: 'OCC-Atomic',
6
+ widths: [320, 576, 768, 992, 1200, 1500]
7
+ };
@@ -1,22 +0,0 @@
1
- {
2
- "deno.enable": false,
3
- "typescript.validate.enable": false,
4
- "javascript.validate.enable": false,
5
- "workbench.colorCustomizations": {
6
- "activityBar.activeBackground": "#65c89b",
7
- "activityBar.activeBorder": "#945bc4",
8
- "activityBar.background": "#65c89b",
9
- "activityBar.foreground": "#15202b",
10
- "activityBar.inactiveForeground": "#15202b99",
11
- "activityBarBadge.background": "#945bc4",
12
- "activityBarBadge.foreground": "#e7e7e7",
13
- "statusBar.background": "#42b883",
14
- "statusBar.foreground": "#15202b",
15
- "statusBarItem.hoverBackground": "#359268",
16
- "titleBar.activeBackground": "#42b883",
17
- "titleBar.activeForeground": "#15202b",
18
- "titleBar.inactiveBackground": "#42b88399",
19
- "titleBar.inactiveForeground": "#15202b99"
20
- },
21
- "peacock.color": "#42b883",
22
- }
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- var _react = _interopRequireDefault(require("react"));
4
-
5
- var _enzyme = require("enzyme");
6
-
7
- var _Grid = _interopRequireDefault(require("./Grid"));
8
-
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
-
11
- describe("Grid", function () {
12
- it('matches the snapshot', function () {
13
- var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Grid["default"], null));
14
- expect(wrapper.html()).toMatchSnapshot();
15
- });
16
- it('matches the snapshot with the fluid prop', function () {
17
- var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Grid["default"], {
18
- fluid: true
19
- }));
20
- expect(wrapper.html()).toMatchSnapshot();
21
- });
22
- });
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _styles = _interopRequireDefault(require("./styles"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- /** Use the Row component inside a Grid. To make your grid as complex as you need, you can nest a Column inside a Row and then nest a Row inside a Column to start a new grid. */
19
- var Row = function Row(_ref) {
20
- var children = _ref.children,
21
- className = _ref.className,
22
- id = _ref.id,
23
- style = _ref.style;
24
- var classes = (0, _styles["default"])();
25
- return _react["default"].createElement("div", {
26
- className: (0, _classnames["default"])(classes.row, className),
27
- style: style,
28
- id: id
29
- }, children);
30
- };
31
-
32
- Row.propTypes = {
33
- children: _propTypes["default"].node,
34
- id: _propTypes["default"].string,
35
- className: _propTypes["default"].string,
36
- style: _propTypes["default"].object
37
- };
38
- var _default = Row;
39
- exports["default"] = _default;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = require("react");
9
-
10
- var useEventListener = function useEventListener(eventName, handler, element) {
11
- element = element || global;
12
- (0, _react.useEffect)(function () {
13
- var isSupported = element && element.addEventListener;
14
- if (!isSupported) return;
15
- element.addEventListener(eventName, handler);
16
- return function () {
17
- return element.removeEventListener(eventName, handler);
18
- };
19
- }, [eventName, element, handler]);
20
- };
21
-
22
- var _default = useEventListener;
23
- exports["default"] = _default;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = require("react");
9
-
10
- var usePrevious = function usePrevious(value) {
11
- var ref = (0, _react.useRef)();
12
- (0, _react.useEffect)(function () {
13
- ref.current = value;
14
- });
15
- return ref.current;
16
- };
17
-
18
- var _default = usePrevious;
19
- exports["default"] = _default;