@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.
- package/.prettierrc +6 -6
- package/.whitesource +11 -11
- package/CHANGELOG.md +943 -913
- package/CONTRIBUTING.md +24 -0
- package/README.md +21 -21
- package/build/Autocomplete/Autocomplete.js +20 -16
- package/build/Autocomplete/Autocomplete.test.js +11 -11
- package/build/Avatar/Avatar.js +20 -16
- package/build/Avatar/Avatar.test.js +2 -2
- package/build/Avatar/AvatarContent/AvatarContent.js +5 -5
- package/build/Avatar/AvatarContent/AvatarContent.test.js +6 -6
- package/build/Avatar/index.js +4 -2
- package/build/Banner/Banner.js +6 -6
- package/build/Banner/Banner.test.js +2 -2
- package/build/Button/Button.js +26 -22
- package/build/Button/Button.test.js +13 -13
- package/build/Button/index.js +4 -2
- package/build/ButtonAlign/ButtonAlign.js +20 -16
- package/build/ButtonAlign/ButtonAlign.test.js +3 -3
- package/build/Card/Card.js +1 -1
- package/build/Card/Card.test.js +4 -4
- package/build/Card/index.js +4 -2
- package/build/Check/Check.js +18 -14
- package/build/Check/Check.test.js +7 -7
- package/build/Checkbox/Checkbox.js +18 -14
- package/build/Checkbox/Checkbox.test.js +8 -8
- package/build/Checkbox/index.js +4 -2
- package/build/Column/Column.js +1 -1
- package/build/Column/Column.test.js +3 -3
- package/build/Container/Container.js +1 -1
- package/build/Container/Container.test.js +4 -4
- package/build/Droplist/Droplist.js +33 -29
- package/build/Droplist/Droplist.test.js +11 -11
- package/build/Droplist/index.js +4 -2
- package/build/Flexbox/Flexbox.js +16 -12
- package/build/Flexbox/Flexbox.test.js +3 -3
- package/build/Flexbox/index.js +4 -2
- package/build/Footer/Footer.js +16 -16
- package/build/Footer/Footer.test.js +2 -2
- package/build/Footer/List/List.js +25 -21
- package/build/Grid/Col/Col.js +1 -1
- package/build/Grid/Col/Col.test.js +3 -3
- package/build/Grid/Col/index.js +4 -2
- package/build/Grid/Grid.js +18 -12
- package/build/Grid/Row/Row.js +1 -1
- package/build/Grid/Row/Row.test.js +2 -2
- package/build/Grid/Row/index.js +4 -2
- package/build/Grid/index.js +4 -2
- package/build/Header/Header.js +35 -31
- package/build/Header/Header.test.js +8 -8
- package/build/Header/Menu/Menu.js +23 -19
- package/build/Header/Menu/Menu.test.js +7 -7
- package/build/Header/Nav/Nav.js +19 -15
- package/build/Header/Nav/Nav.test.js +5 -5
- package/build/Hidden/Hidden.js +17 -13
- package/build/Hidden/Hidden.test.js +6 -6
- package/build/Hidden/index.js +4 -2
- package/build/Icon/Icon.js +16 -12
- package/build/Icon/Icon.test.js +3 -3
- package/build/Icon/index.js +4 -2
- package/build/Input/Input.js +29 -25
- package/build/Input/Input.test.js +21 -21
- package/build/Input/index.js +17 -13
- package/build/Label/Label.js +17 -13
- package/build/Label/Label.test.js +6 -6
- package/build/LayerApp/LayerApp.js +22 -18
- package/build/LayerApp/LayerApp.test.js +4 -4
- package/build/Modal/Modal.js +38 -33
- package/build/Modal/Modal.test.js +10 -10
- package/build/Modal/index.js +19 -13
- package/build/Modal/styles.js +11 -8
- package/build/NavAside/NavAside.js +22 -18
- package/build/NavAside/NavAside.test.js +12 -12
- package/build/NavAside/index.js +16 -12
- package/build/NavIcon/NavIcon.js +20 -16
- package/build/NavItem/NavItem.js +18 -14
- package/build/NavTab/NavTab.js +32 -28
- package/build/NavTop/NavTop.js +20 -16
- package/build/OrderBy/OrderBy.js +23 -19
- package/build/OrderBy/OrderBy.test.js +6 -6
- package/build/Pager/Break/Break.js +1 -1
- package/build/Pager/Break/Break.test.js +4 -4
- package/build/Pager/Page/Page.js +1 -1
- package/build/Pager/Page/Page.test.js +5 -5
- package/build/Pager/Pager.js +21 -17
- package/build/Pager/Pager.test.js +10 -10
- package/build/Pill/Choice/Choice.js +18 -14
- package/build/Pill/Group/Group.js +2 -2
- package/build/Pill/Pill.js +28 -22
- package/build/Pill/Pill.test.js +12 -12
- package/build/Pill/Stack/Stack.js +4 -4
- package/build/Placeholder/Placeholder.js +2 -2
- package/build/Placeholder/Placeholder.test.js +3 -3
- package/build/Radio/Radio.js +19 -15
- package/build/Radio/Radio.test.js +6 -6
- package/build/RangeCounter/RangeCounter.js +17 -13
- package/build/RangeCounter/RangeCounter.test.js +3 -3
- package/build/Row/Row.js +1 -1
- package/build/Row/Row.test.js +2 -2
- package/build/SightLogo/SightLogo.js +2 -2
- package/build/SightLogo/SightLogo.test.js +2 -2
- package/build/SlideDown/SlideDown.js +28 -22
- package/build/SlideDown/SlideDown.test.js +9 -9
- package/build/SlideToggle/SlideToggle.js +19 -15
- package/build/SlideToggle/SlideToggle.test.js +7 -7
- package/build/SubHeader/SubHeader.js +20 -16
- package/build/SubHeader/SubHeader.test.js +7 -7
- package/build/SwitchGroup/SwitchGroup.js +17 -13
- package/build/SwitchGroup/SwitchGroup.test.js +6 -6
- package/build/Tag/Tag.js +4 -4
- package/build/Tag/Tag.test.js +6 -6
- package/build/Text/Text.js +18 -12
- package/build/Text/Text.test.js +8 -8
- package/build/TextField/TextField.js +42 -38
- package/build/TextField/TextField.test.js +19 -19
- package/build/Tip/Tip.js +16 -12
- package/build/Tip/Tip.test.js +5 -5
- package/build/Title/Title.js +16 -12
- package/build/Title/Title.test.js +3 -3
- package/build/Toaster/Toast/Toast.js +11 -11
- package/build/Toaster/Toaster.js +27 -23
- package/build/Toaster/Toaster.test.js +6 -6
- package/build/TourTip/TourTip.js +15 -11
- package/build/TourTip/TourTip.test.js +2 -2
- package/build/Visible/Visible.js +16 -12
- package/build/Visible/Visible.test.js +4 -4
- package/build/WindowSize/WindowSize.js +17 -11
- package/build/WindowSize/WindowSize.test.js +4 -4
- package/build/subatomic/icons/occDart.js +7 -5
- package/build/subatomic/icons/occHorizontal.js +7 -5
- package/build/subatomic/icons/occVertical.js +7 -5
- package/build/subatomic/icons/{emoji.js → warning.js} +1 -1
- package/build/subatomic/icons/warningSolid.js +23 -0
- package/build/subatomic/icons.js +6 -9
- package/commitlint.config.js +6 -0
- package/package.json +122 -114
- package/playroom/FrameComponent.js +31 -22
- package/playroom/styles.js +14 -14
- package/playroom.config.js +7 -7
- package/.vscode/settings.json +0 -22
- package/build/Grid/Grid.test.js +0 -22
- package/build/Grid/Row/Rowdsd.js +0 -39
- package/build/hooks/useEventListener.js +0 -23
- package/build/hooks/usePrevious.js +0 -19
- package/yarn-error.log +0 -11800
package/package.json
CHANGED
@@ -1,114 +1,122 @@
|
|
1
|
-
{
|
2
|
-
"name": "@occmundial/occ-atomic",
|
3
|
-
"version": "1.
|
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": "
|
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": "
|
23
|
-
"deploy": "
|
24
|
-
"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"
|
29
|
-
|
30
|
-
|
31
|
-
"
|
32
|
-
"
|
33
|
-
|
34
|
-
"@babel/
|
35
|
-
"@babel/
|
36
|
-
"@babel/
|
37
|
-
"@babel/plugin-proposal-
|
38
|
-
"@babel/plugin-proposal-
|
39
|
-
"@babel/plugin-proposal-
|
40
|
-
"@babel/plugin-proposal-export-
|
41
|
-
"@babel/plugin-proposal-
|
42
|
-
"@babel/plugin-proposal-function-
|
43
|
-
"@babel/plugin-proposal-
|
44
|
-
"@babel/plugin-proposal-
|
45
|
-
"@babel/plugin-proposal-
|
46
|
-
"@babel/plugin-proposal-
|
47
|
-
"@babel/plugin-proposal-
|
48
|
-
"@babel/plugin-proposal-
|
49
|
-
"@babel/plugin-proposal-
|
50
|
-
"@babel/plugin-proposal-
|
51
|
-
"@babel/plugin-
|
52
|
-
"@babel/plugin-syntax-
|
53
|
-
"@babel/
|
54
|
-
"@babel/preset-
|
55
|
-
"@
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"babel-
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"eslint
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
76
|
-
"
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"
|
80
|
-
"react-
|
81
|
-
"
|
82
|
-
"react
|
83
|
-
"react-test-
|
84
|
-
"
|
85
|
-
"
|
86
|
-
"
|
87
|
-
"
|
88
|
-
|
89
|
-
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"
|
95
|
-
|
96
|
-
|
97
|
-
"
|
98
|
-
"
|
99
|
-
"
|
100
|
-
|
101
|
-
|
102
|
-
"
|
103
|
-
"
|
104
|
-
"
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
"
|
111
|
-
|
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
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
|
22
|
-
|
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);
|
package/playroom/styles.js
CHANGED
@@ -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
|
+
};
|
package/playroom.config.js
CHANGED
@@ -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
|
+
};
|
package/.vscode/settings.json
DELETED
@@ -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
|
-
}
|
package/build/Grid/Grid.test.js
DELETED
@@ -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
|
-
});
|
package/build/Grid/Row/Rowdsd.js
DELETED
@@ -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;
|