@occmundial/occ-atomic 2.0.0-beta.0 → 2.0.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.prettierrc +6 -0
- package/.whitesource +12 -0
- package/CHANGELOG.md +1276 -581
- package/CONTRIBUTING.md +24 -0
- package/README.md +21 -21
- package/build/Autocomplete/Autocomplete.js +35 -23
- package/build/Autocomplete/Autocomplete.test.js +14 -14
- package/build/Autocomplete/__snapshots__/Autocomplete.test.js.snap +20 -0
- package/build/Avatar/Avatar.js +21 -17
- 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/AvatarContent/__snapshots__/AvatarContent.test.js.snap +41 -0
- package/build/Avatar/AvatarContent/styles.js +10 -6
- package/build/Avatar/__snapshots__/Avatar.test.js.snap +17 -0
- package/build/Avatar/index.js +4 -2
- package/build/Banner/Banner.js +76 -0
- package/build/Banner/Banner.test.js +40 -0
- package/build/Banner/__snapshots__/Banner.test.js.snap +33 -0
- package/build/Banner/index.js +18 -0
- package/build/Banner/styles.js +41 -0
- package/build/Button/Button.js +51 -30
- package/build/Button/Button.test.js +20 -25
- package/build/Button/Loading.js +89 -0
- package/build/Button/__snapshots__/Button.test.js.snap +334 -0
- package/build/Button/index.js +4 -2
- package/build/Button/styles.js +174 -155
- package/build/ButtonAlign/ButtonAlign.js +86 -0
- package/build/ButtonAlign/ButtonAlign.test.js +50 -0
- package/build/ButtonAlign/__snapshots__/ButtonAlign.test.js.snap +19 -0
- package/build/ButtonAlign/index.js +18 -0
- package/build/ButtonAlign/styles.js +18 -0
- package/build/Card/Card.js +1 -1
- package/build/Card/Card.test.js +4 -4
- package/build/Card/__snapshots__/Card.test.js.snap +46 -0
- package/build/Card/index.js +4 -2
- package/build/Check/Check.js +151 -0
- package/build/Check/Check.test.js +85 -0
- package/build/Check/__snapshots__/Check.test.js.snap +92 -0
- package/build/Check/index.js +18 -0
- package/build/Check/styles.js +100 -0
- package/build/Checkbox/Checkbox.js +29 -16
- package/build/Checkbox/Checkbox.test.js +8 -8
- package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +92 -0
- package/build/Checkbox/index.js +4 -2
- package/build/Column/Column.js +67 -0
- package/build/Column/Column.test.js +59 -0
- package/build/Column/__snapshots__/Column.test.js.snap +647 -0
- package/build/Column/index.js +18 -0
- package/build/Column/styles.js +93 -0
- package/build/Container/Container.js +50 -0
- package/build/Container/Container.test.js +53 -0
- package/build/Container/__snapshots__/Container.test.js.snap +43 -0
- package/build/Container/index.js +18 -0
- package/build/Container/styles.js +49 -0
- package/build/Droplist/Droplist.js +82 -33
- package/build/Droplist/Droplist.test.js +50 -11
- package/build/Droplist/__snapshots__/Droplist.test.js.snap +65 -0
- package/build/Droplist/functions.js +9 -2
- package/build/Droplist/index.js +4 -2
- package/build/Droplist/styles.js +39 -10
- package/build/Flexbox/Flexbox.js +16 -12
- package/build/Flexbox/Flexbox.test.js +3 -3
- package/build/Flexbox/__snapshots__/Flexbox.test.js.snap +106 -0
- package/build/Flexbox/index.js +4 -2
- package/build/Footer/Footer.js +42 -30
- package/build/Footer/Footer.test.js +2 -2
- package/build/Footer/List/List.js +32 -25
- package/build/Footer/__snapshots__/Footer.test.js.snap +90 -0
- package/build/Footer/styles.js +5 -0
- package/build/Grid/Col/Col.js +1 -1
- package/build/Grid/Col/Col.test.js +3 -3
- package/build/Grid/Col/__snapshots__/Col.test.js.snap +963 -0
- 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/__snapshots__/Row.test.js.snap +22 -0
- package/build/Grid/Row/index.js +4 -2
- package/build/Grid/index.js +4 -2
- package/build/Header/Header.js +163 -0
- package/build/Header/Header.test.js +118 -0
- package/build/Header/Menu/Menu.js +135 -0
- package/build/Header/Menu/Menu.test.js +107 -0
- package/build/Header/Menu/__snapshots__/Menu.test.js.snap +113 -0
- package/build/Header/Menu/index.js +18 -0
- package/build/Header/Menu/styles.js +123 -0
- package/build/Header/Nav/Nav.js +95 -0
- package/build/Header/Nav/Nav.test.js +81 -0
- package/build/Header/Nav/__snapshots__/Nav.test.js.snap +101 -0
- package/build/Header/Nav/index.js +18 -0
- package/build/Header/Nav/styles.js +110 -0
- package/build/Header/__snapshots__/Header.test.js.snap +79 -0
- package/build/Header/index.js +18 -0
- package/build/Header/styles.js +94 -0
- package/build/Hidden/Hidden.js +17 -13
- package/build/Hidden/Hidden.test.js +6 -6
- package/build/Hidden/__snapshots__/Hidden.test.js.snap +3 -0
- package/build/Hidden/index.js +4 -2
- package/build/Icon/Icon.js +27 -15
- package/build/Icon/Icon.test.js +3 -3
- package/build/Icon/__snapshots__/Icon.test.js.snap +26 -0
- package/build/Icon/index.js +4 -2
- package/build/Input/Input.js +442 -0
- package/build/Input/Input.test.js +258 -0
- package/build/Input/__snapshots__/Input.test.js.snap +194 -0
- package/build/Input/index.js +78 -0
- package/build/Input/styles.js +202 -0
- package/build/Input/stylesFlat.js +74 -0
- package/build/Label/Label.js +98 -0
- package/build/Label/Label.test.js +73 -0
- package/build/Label/__snapshots__/Label.test.js.snap +82 -0
- package/build/Label/index.js +18 -0
- package/build/Label/styles.js +90 -0
- package/build/LayerApp/LayerApp.js +113 -0
- package/build/LayerApp/LayerApp.test.js +56 -0
- package/build/LayerApp/__snapshots__/LayerApp.test.js.snap +37 -0
- package/build/LayerApp/index.js +18 -0
- package/build/LayerApp/styles.js +43 -0
- package/build/Modal/Modal.js +55 -37
- package/build/Modal/Modal.test.js +10 -10
- package/build/Modal/__snapshots__/Modal.test.js.snap +208 -0
- package/build/Modal/index.js +19 -13
- package/build/Modal/styles.js +43 -31
- package/build/NavAside/NavAside.js +22 -18
- package/build/NavAside/NavAside.test.js +12 -12
- package/build/NavAside/__snapshots__/NavAside.test.js.snap +116 -0
- package/build/NavAside/index.js +16 -12
- package/build/NavIcon/NavIcon.js +31 -19
- package/build/NavItem/NavItem.js +29 -16
- package/build/NavTab/NavTab.js +36 -29
- package/build/NavTop/NavTop.js +20 -16
- package/build/OrderBy/OrderBy.js +23 -19
- package/build/OrderBy/OrderBy.test.js +6 -6
- package/build/OrderBy/__snapshots__/OrderBy.test.js.snap +54 -0
- package/build/Pager/Break/Break.js +1 -1
- package/build/Pager/Break/Break.test.js +4 -4
- package/build/Pager/Break/__snapshots__/Break.test.js.snap +13 -0
- package/build/Pager/Page/Page.js +1 -1
- package/build/Pager/Page/Page.test.js +5 -5
- package/build/Pager/Page/__snapshots__/Page.test.js.snap +27 -0
- package/build/Pager/Pager.js +21 -17
- package/build/Pager/Pager.test.js +10 -10
- package/build/Pager/__snapshots__/Pager.test.js.snap +50 -0
- package/build/Pager/styles.js +1 -1
- package/build/Pill/Choice/Choice.js +23 -18
- package/build/Pill/Choice/styles.js +8 -3
- package/build/Pill/Group/Group.js +7 -4
- package/build/Pill/Group/styles.js +7 -4
- package/build/Pill/Pill.js +36 -23
- package/build/Pill/Pill.test.js +12 -12
- package/build/Pill/Stack/Stack.js +10 -7
- package/build/Pill/Stack/styles.js +4 -1
- package/build/Pill/__snapshots__/Pill.test.js.snap +62 -0
- package/build/Pill/styles.js +6 -2
- package/build/Placeholder/Placeholder.js +2 -2
- package/build/Placeholder/Placeholder.test.js +3 -3
- package/build/Placeholder/__snapshots__/Placeholder.test.js.snap +130 -0
- package/build/Placeholder/styles.js +23 -16
- package/build/Radio/Radio.js +29 -15
- package/build/Radio/Radio.test.js +6 -6
- package/build/Radio/__snapshots__/Radio.test.js.snap +83 -0
- package/build/RangeCounter/RangeCounter.js +110 -0
- package/build/RangeCounter/RangeCounter.test.js +57 -0
- package/build/RangeCounter/__snapshots__/RangeCounter.test.js.snap +20 -0
- package/build/RangeCounter/index.js +18 -0
- package/build/RangeCounter/styles.js +26 -0
- package/build/Row/Row.js +41 -0
- package/build/Row/Row.test.js +40 -0
- package/build/Row/__snapshots__/Row.test.js.snap +22 -0
- package/build/Row/index.js +18 -0
- package/build/Row/styles.js +21 -0
- package/build/SightLogo/SightLogo.js +41 -0
- package/build/SightLogo/SightLogo.test.js +40 -0
- package/build/SightLogo/__snapshots__/SightLogo.test.js.snap +24 -0
- package/build/SightLogo/index.js +18 -0
- package/build/SightLogo/styles.js +28 -0
- package/build/SlideDown/SlideDown.js +37 -26
- package/build/SlideDown/SlideDown.test.js +9 -9
- package/build/SlideDown/__snapshots__/SlideDown.test.js.snap +42 -0
- package/build/SlideToggle/SlideToggle.js +31 -17
- package/build/SlideToggle/SlideToggle.test.js +7 -7
- package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +62 -0
- package/build/SubHeader/SubHeader.js +113 -0
- package/build/SubHeader/SubHeader.test.js +81 -0
- package/build/SubHeader/__snapshots__/SubHeader.test.js.snap +50 -0
- package/build/SubHeader/index.js +18 -0
- package/build/SubHeader/styles.js +59 -0
- package/build/SwitchGroup/SwitchGroup.js +114 -0
- package/build/SwitchGroup/SwitchGroup.test.js +91 -0
- package/build/SwitchGroup/__snapshots__/SwitchGroup.test.js.snap +52 -0
- package/build/SwitchGroup/index.js +18 -0
- package/build/SwitchGroup/styles.js +58 -0
- package/build/Tag/Tag.js +27 -10
- package/build/Tag/Tag.test.js +8 -8
- package/build/Tag/__snapshots__/Tag.test.js.snap +137 -0
- package/build/Tag/styles.js +72 -27
- package/build/Text/Text.js +30 -15
- package/build/Text/Text.test.js +8 -8
- package/build/Text/__snapshots__/Text.test.js.snap +158 -0
- package/build/Text/styles.js +32 -23
- package/build/TextField/TextField.js +151 -92
- package/build/TextField/TextField.test.js +27 -19
- package/build/TextField/__snapshots__/TextField.test.js.snap +258 -0
- package/build/TextField/styles.js +74 -17
- package/build/Tip/Tip.js +91 -27
- package/build/Tip/Tip.test.js +5 -5
- package/build/Tip/__snapshots__/Tip.test.js.snap +49 -0
- package/build/Tip/styles.js +32 -12
- package/build/Title/Title.js +89 -0
- package/build/Title/Title.test.js +50 -0
- package/build/Title/__snapshots__/Title.test.js.snap +31 -0
- package/build/Title/index.js +18 -0
- package/build/Title/styles.js +37 -0
- 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/Toaster/__snapshots__/Toaster.test.js.snap +5 -0
- package/build/Tooltip/Tooltip.js +210 -0
- package/build/Tooltip/Tooltip.test.js +35 -0
- package/build/Tooltip/__snapshots__/Tooltip.test.js.snap +33 -0
- package/build/Tooltip/hooks.js +132 -0
- package/build/Tooltip/index.js +18 -0
- package/build/Tooltip/styles.js +44 -0
- package/build/TourTip/TourTip.js +152 -0
- package/build/TourTip/TourTip.test.js +45 -0
- package/build/TourTip/__snapshots__/TourTip.test.js.snap +74 -0
- package/build/TourTip/index.js +18 -0
- package/build/TourTip/styles.js +82 -0
- package/build/Visible/Visible.js +119 -0
- package/build/Visible/Visible.test.js +31 -0
- package/build/Visible/__snapshots__/Visible.test.js.snap +3 -0
- package/build/Visible/index.js +13 -0
- package/build/WindowSize/WindowSize.js +17 -11
- package/build/WindowSize/WindowSize.test.js +4 -4
- package/build/WindowSize/__snapshots__/WindowSize.test.js.snap +3 -0
- package/build/index.js +79 -8
- package/build/plugin/babel.js +59 -0
- package/build/subatomic/colors.js +8 -3
- package/build/subatomic/fonts.js +1 -1
- package/build/subatomic/icons/attachment.js +23 -0
- package/build/subatomic/icons/attachmentSolid.js +23 -0
- package/build/subatomic/icons/avatarSmile.js +23 -0
- package/build/subatomic/icons/book.js +23 -0
- package/build/subatomic/icons/cash.js +23 -0
- package/build/subatomic/icons/copy.js +23 -0
- package/build/subatomic/icons/copySolid.js +23 -0
- package/build/subatomic/icons/crossSolid.js +23 -0
- package/build/subatomic/icons/dislike.js +1 -1
- package/build/subatomic/icons/dislikeSolid.js +23 -0
- package/build/subatomic/icons/energy.js +23 -0
- package/build/subatomic/icons/energySolid.js +23 -0
- package/build/subatomic/icons/eye.js +1 -1
- package/build/subatomic/icons/eyeClosed.js +1 -1
- package/build/subatomic/icons/eyeClosedSolid.js +23 -0
- package/build/subatomic/icons/eyeSolid.js +23 -0
- package/build/subatomic/icons/hourGlass.js +23 -0
- package/build/subatomic/icons/like.js +1 -1
- package/build/subatomic/icons/likeSolid.js +23 -0
- package/build/subatomic/icons/location.js +23 -0
- package/build/subatomic/icons/locationSolid.js +23 -0
- package/build/subatomic/icons/matchJob.js +23 -0
- package/build/subatomic/icons/messages.js +1 -1
- package/build/subatomic/icons/messagesSolid.js +1 -1
- package/build/subatomic/icons/moreOptionsHorizontal.js +23 -0
- package/build/subatomic/icons/noMessages.js +23 -0
- package/build/subatomic/icons/noMessagesSolid.js +23 -0
- package/build/subatomic/icons/occDart.js +23 -8
- package/build/subatomic/icons/occHorizontal.js +23 -8
- package/build/subatomic/icons/occLogo.js +63 -0
- package/build/subatomic/icons/occVertical.js +23 -8
- package/build/subatomic/icons/profile.js +23 -0
- package/build/subatomic/icons/profileSolid.js +23 -0
- package/build/subatomic/icons/profileView.js +23 -0
- package/build/subatomic/icons/refresh.js +23 -0
- package/build/subatomic/icons/refreshSolid.js +23 -0
- package/build/subatomic/icons/sendMessage.js +23 -0
- package/build/subatomic/icons/sendMessageSolid.js +23 -0
- package/build/subatomic/icons/starsSolid.js +23 -0
- package/build/subatomic/icons/suitcase.js +23 -0
- package/build/subatomic/icons/suitcaseSolid.js +23 -0
- package/build/subatomic/icons/tag.js +1 -1
- package/build/subatomic/icons/tagSolid.js +23 -0
- package/build/subatomic/icons/trash.js +1 -1
- package/build/subatomic/icons/trashSolid.js +1 -1
- package/build/subatomic/icons/warning.js +23 -0
- package/build/subatomic/icons/warningSolid.js +23 -0
- package/build/subatomic/icons/webSite.js +23 -0
- package/build/subatomic/icons/webSiteSolid.js +23 -0
- package/build/subatomic/icons.js +230 -112
- package/build/tokens/borderRadius.json +8 -0
- package/build/tokens/colors.json +567 -0
- package/build/tokens/fonts.json +231 -0
- package/build/tokens/index.js +47 -0
- package/build/tokens/shadows.json +13 -0
- package/build/tokens/spacing.json +16 -0
- package/commitlint.config.js +6 -0
- package/package.json +124 -111
- package/playroom/FrameComponent.js +31 -22
- package/playroom/styles.js +14 -14
- package/playroom.config.js +7 -7
- package/yarn-error.log +0 -10737
package/build/Footer/Footer.js
CHANGED
@@ -30,8 +30,8 @@ var itemTypes = {
|
|
30
30
|
icon: 'icon',
|
31
31
|
custom: 'custom'
|
32
32
|
};
|
33
|
-
/** Customisable footer component. This component can receive an array of columns. Those columns can contain an array of lists, and those lists can contain a title and and array of items. The items are objects that must define a type (one of 'link,', 'icon' or 'cursom').
|
34
|
-
It can also receive a copy string, to show the copyright data, and an array of links to show above it.
|
33
|
+
/** Customisable footer component. This component can receive an array of columns. Those columns can contain an array of lists, and those lists can contain a title and and array of items. The items are objects that must define a type (one of 'link,', 'icon' or 'cursom').
|
34
|
+
It can also receive a copy string, to show the copyright data, and an array of links to show above it.
|
35
35
|
*/
|
36
36
|
|
37
37
|
var Footer = function Footer(_ref) {
|
@@ -40,73 +40,79 @@ var Footer = function Footer(_ref) {
|
|
40
40
|
winWidth = _ref.winWidth,
|
41
41
|
bottomLinks = _ref.bottomLinks,
|
42
42
|
copyText = _ref.copyText,
|
43
|
-
aux = _ref.aux
|
43
|
+
aux = _ref.aux,
|
44
|
+
bottomItem = _ref.bottomItem,
|
45
|
+
listClassName = _ref.listClassName;
|
44
46
|
var text = aux.text,
|
45
47
|
icon = aux.icon,
|
46
48
|
href = aux.href,
|
47
49
|
target = aux.target,
|
48
|
-
iconRight = aux.iconRight
|
50
|
+
iconRight = aux.iconRight,
|
51
|
+
auxClassName = aux.className;
|
49
52
|
var isMobile = winWidth < _grid["default"].sm;
|
50
|
-
return _react["default"].createElement("div", {
|
53
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
51
54
|
className: columns.length > 0 ? classes.footer : classes.footerWithoutColumns
|
52
|
-
}, _react["default"].createElement(_Grid["default"], {
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
53
56
|
fluid: winWidth < _grid["default"].xl
|
54
|
-
}, _react["default"].createElement(_Grid["default"].Row, null, _react["default"].createElement(_Flexbox["default"], {
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"].Row, null, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
55
58
|
display: "flex",
|
56
59
|
direction: isMobile ? 'col' : 'row',
|
57
60
|
className: classes.column
|
58
61
|
}, columns.map(function (column, index) {
|
59
|
-
return _react["default"].createElement(_Flexbox["default"], {
|
62
|
+
return /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
60
63
|
key: index,
|
61
|
-
flex: "1"
|
64
|
+
flex: "1",
|
65
|
+
className: !isMobile ? classes.list : ''
|
62
66
|
}, column.map(function (list) {
|
63
|
-
return _react["default"].createElement(_List["default"], {
|
67
|
+
return /*#__PURE__*/_react["default"].createElement(_List["default"], {
|
64
68
|
list: list,
|
65
69
|
isMobile: isMobile,
|
66
|
-
key: list.key
|
70
|
+
key: list.key,
|
71
|
+
listClassName: listClassName
|
67
72
|
});
|
68
73
|
}));
|
69
|
-
})), _react["default"].createElement("div", {
|
74
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
70
75
|
className: classes.footerBottom
|
71
|
-
}, _react["default"].createElement(_Flexbox["default"], {
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
72
77
|
display: "flex",
|
73
78
|
alignItems: "start",
|
74
79
|
className: classes.bottomWrap,
|
75
80
|
direction: isMobile ? 'col' : 'row'
|
76
|
-
}, _react["default"].createElement(_Flexbox["default"], {
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
77
82
|
flex: "1"
|
78
|
-
}, _react["default"].createElement(
|
83
|
+
}, aux && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
84
|
+
href: href,
|
85
|
+
target: target,
|
86
|
+
icon: icon,
|
87
|
+
iconRight: iconRight,
|
88
|
+
size: "md",
|
89
|
+
theme: "ghostPink",
|
90
|
+
className: "".concat(isMobile ? classes.buttonMobile : '', " ").concat(auxClassName)
|
91
|
+
}, text), /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
79
92
|
small: true,
|
80
93
|
mid: true,
|
81
94
|
bottomTiny: true,
|
82
95
|
tag: "div"
|
83
96
|
}, bottomLinks.map(function (item) {
|
84
|
-
return _react["default"].createElement("div", {
|
97
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
85
98
|
className: isMobile ? classes.mobileListElement : classes.listElement,
|
86
99
|
key: item.key
|
87
|
-
}, _react["default"].createElement(_Text["default"], {
|
100
|
+
}, /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
88
101
|
tag: "label",
|
89
102
|
small: true,
|
90
|
-
mid: true
|
91
|
-
|
103
|
+
mid: true,
|
104
|
+
testId: item.testId
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
92
106
|
className: classes.link,
|
93
107
|
href: item.href,
|
94
108
|
target: item.target,
|
95
109
|
rel: item.rel,
|
96
110
|
onClick: item.onClick
|
97
111
|
}, item.text)));
|
98
|
-
})), copyText && _react["default"].createElement(_Text["default"], {
|
112
|
+
})), copyText && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
99
113
|
small: true,
|
100
114
|
mid: true
|
101
|
-
}, copyText)),
|
102
|
-
href: href,
|
103
|
-
target: target,
|
104
|
-
icon: icon,
|
105
|
-
iconRight: iconRight,
|
106
|
-
size: "md",
|
107
|
-
theme: "ghostPink",
|
108
|
-
className: isMobile ? classes.buttonMobile : ''
|
109
|
-
}, text))))));
|
115
|
+
}, copyText)), bottomItem)))));
|
110
116
|
};
|
111
117
|
|
112
118
|
var columnPropTypes = _propTypes["default"].arrayOf(_propTypes["default"].arrayOf(_propTypes["default"].shape({
|
@@ -152,7 +158,13 @@ Footer.propTypes = {
|
|
152
158
|
href: _propTypes["default"].string,
|
153
159
|
target: _propTypes["default"].string,
|
154
160
|
iconRight: _propTypes["default"].string
|
155
|
-
})
|
161
|
+
}),
|
162
|
+
|
163
|
+
/** Custom component to render on the bottom right, at the end of the footer */
|
164
|
+
bottomItem: _propTypes["default"].node,
|
165
|
+
|
166
|
+
/** Footer list className. */
|
167
|
+
listClassName: _propTypes["default"].string
|
156
168
|
};
|
157
169
|
Footer.defaultProps = {
|
158
170
|
bottomLinks: [],
|
@@ -21,7 +21,7 @@ var reduceClasses = function reduceClasses(prev, curr) {
|
|
21
21
|
var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
|
22
22
|
describe("Footer", function () {
|
23
23
|
it('matches the snapshot', function () {
|
24
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Footer["default"], {
|
24
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Footer["default"], {
|
25
25
|
classes: classes
|
26
26
|
}));
|
27
27
|
expect(wrapper).toMatchSnapshot();
|
@@ -29,7 +29,7 @@ describe("Footer", function () {
|
|
29
29
|
});
|
30
30
|
describe("FooterJSS", function () {
|
31
31
|
it('matches the snapshot', function () {
|
32
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], null));
|
32
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null));
|
33
33
|
expect(wrapper).toMatchSnapshot();
|
34
34
|
});
|
35
35
|
});
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
+
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
4
6
|
value: true
|
5
7
|
});
|
@@ -19,9 +21,9 @@ var _colors = _interopRequireDefault(require("../../subatomic/colors"));
|
|
19
21
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
21
23
|
|
22
|
-
function
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
25
|
|
24
|
-
function
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
27
|
|
26
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
27
29
|
|
@@ -29,15 +31,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
29
31
|
|
30
32
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
31
33
|
|
32
|
-
function
|
34
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
33
35
|
|
34
|
-
function
|
36
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
37
|
+
|
38
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
39
|
+
|
40
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
35
41
|
|
36
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
37
43
|
|
38
|
-
function
|
44
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
39
45
|
|
40
|
-
function
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
41
47
|
|
42
48
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
43
49
|
|
@@ -47,14 +53,12 @@ var itemTypes = {
|
|
47
53
|
custom: 'custom'
|
48
54
|
};
|
49
55
|
|
50
|
-
var List =
|
51
|
-
/*#__PURE__*/
|
52
|
-
function (_Component) {
|
56
|
+
var List = /*#__PURE__*/function (_Component) {
|
53
57
|
_inherits(List, _Component);
|
54
58
|
|
55
|
-
|
56
|
-
var _getPrototypeOf2;
|
59
|
+
var _super = _createSuper(List);
|
57
60
|
|
61
|
+
function List() {
|
58
62
|
var _this;
|
59
63
|
|
60
64
|
_classCallCheck(this, List);
|
@@ -63,7 +67,7 @@ function (_Component) {
|
|
63
67
|
args[_key] = arguments[_key];
|
64
68
|
}
|
65
69
|
|
66
|
-
_this =
|
70
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
67
71
|
|
68
72
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
69
73
|
toggle: false
|
@@ -77,11 +81,11 @@ function (_Component) {
|
|
77
81
|
|
78
82
|
_defineProperty(_assertThisInitialized(_this), "renderLink", function (item) {
|
79
83
|
var classes = _this.props.classes;
|
80
|
-
return _react["default"].createElement(_Text["default"], {
|
84
|
+
return /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
81
85
|
key: item.key,
|
82
86
|
small: true,
|
83
87
|
bottomTiny: true
|
84
|
-
}, _react["default"].createElement("a", {
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
85
89
|
href: item.href,
|
86
90
|
target: item.target,
|
87
91
|
rel: item.rel,
|
@@ -92,20 +96,21 @@ function (_Component) {
|
|
92
96
|
|
93
97
|
_defineProperty(_assertThisInitialized(_this), "renderIcon", function (item) {
|
94
98
|
var classes = _this.props.classes;
|
95
|
-
return _react["default"].createElement("div", {
|
99
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
96
100
|
key: item.key,
|
97
101
|
className: classes.iconWrapper,
|
98
102
|
title: item.title
|
99
|
-
}, _react["default"].createElement(_Icon["default"], {
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
100
104
|
iconName: item.iconName,
|
101
105
|
className: classes.icon,
|
102
106
|
onClick: item.onClick,
|
103
|
-
colors: [_colors["default"].grey600]
|
107
|
+
colors: [_colors["default"].grey600],
|
108
|
+
ariaLabel: item.title
|
104
109
|
}));
|
105
110
|
});
|
106
111
|
|
107
112
|
_defineProperty(_assertThisInitialized(_this), "renderCustom", function (item) {
|
108
|
-
return _react["default"].createElement("div", {
|
113
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
109
114
|
key: item.key
|
110
115
|
}, item.custom);
|
111
116
|
});
|
@@ -128,21 +133,22 @@ function (_Component) {
|
|
128
133
|
title = _this$props$list.title,
|
129
134
|
items = _this$props$list.items,
|
130
135
|
isMobile = _this$props.isMobile,
|
131
|
-
classes = _this$props.classes
|
136
|
+
classes = _this$props.classes,
|
137
|
+
listClassName = _this$props.listClassName;
|
132
138
|
var toggle = this.state.toggle;
|
133
139
|
var isCollapsible = collapse || isMobile;
|
134
|
-
return _react["default"].createElement("div", null, _react["default"].createElement("div", {
|
140
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
135
141
|
onClick: isCollapsible ? this.toggleList : null,
|
136
142
|
className: "".concat(classes.title, " ").concat(isCollapsible ? classes.collapsible : '')
|
137
|
-
}, _react["default"].createElement(_Text["default"], {
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
138
144
|
tag: "span"
|
139
|
-
}, title), isCollapsible && _react["default"].createElement(_Icon["default"], {
|
145
|
+
}, title), isCollapsible && /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
140
146
|
iconName: "forward",
|
141
147
|
width: _spacing["default"].small,
|
142
148
|
height: _spacing["default"].small,
|
143
149
|
className: "".concat(classes.arrow, " ").concat(toggle ? classes.arrowUp : classes.arrowDown)
|
144
|
-
})), _react["default"].createElement("div", {
|
145
|
-
className: "".concat(classes.list, " ").concat(toggle || !isCollapsible ? classes.toggle : '')
|
150
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
151
|
+
className: "".concat(classes.list, " ").concat(toggle || !isCollapsible ? classes.toggle : '', " ").concat(listClassName)
|
146
152
|
}, items.map(function (item) {
|
147
153
|
return _this2.renderItem(item);
|
148
154
|
})));
|
@@ -155,7 +161,8 @@ function (_Component) {
|
|
155
161
|
List.propTypes = {
|
156
162
|
classes: _propTypes["default"].object,
|
157
163
|
list: _propTypes["default"].object,
|
158
|
-
isMobile: _propTypes["default"].bool
|
164
|
+
isMobile: _propTypes["default"].bool,
|
165
|
+
listClassName: _propTypes["default"].string
|
159
166
|
};
|
160
167
|
var _default = List;
|
161
168
|
exports["default"] = _default;
|
@@ -0,0 +1,90 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Footer matches the snapshot 1`] = `ShallowWrapper {}`;
|
4
|
+
|
5
|
+
exports[`Footer styles matches the snapshot 1`] = `
|
6
|
+
Object {
|
7
|
+
"bottomWrap": Object {
|
8
|
+
"borderTop": "1px solid #dddddd",
|
9
|
+
"paddingTop": 24,
|
10
|
+
},
|
11
|
+
"buttonMobile": Object {
|
12
|
+
"marginTop": 16,
|
13
|
+
},
|
14
|
+
"column": Object {
|
15
|
+
"paddingBottom": 16,
|
16
|
+
"paddingLeft": 12,
|
17
|
+
"paddingRight": 12,
|
18
|
+
},
|
19
|
+
"footer": Object {
|
20
|
+
"@media (min-width: 992px)": Object {
|
21
|
+
"padding": Array [
|
22
|
+
32,
|
23
|
+
0,
|
24
|
+
32,
|
25
|
+
],
|
26
|
+
},
|
27
|
+
"backgroundColor": "#f5f5f8",
|
28
|
+
"padding": Array [
|
29
|
+
24,
|
30
|
+
0,
|
31
|
+
32,
|
32
|
+
],
|
33
|
+
},
|
34
|
+
"footerBottom": Object {
|
35
|
+
"paddingLeft": 12,
|
36
|
+
"paddingRight": 12,
|
37
|
+
},
|
38
|
+
"footerWithoutColumns": Object {
|
39
|
+
"@media (min-width: 992px)": Object {
|
40
|
+
"padding": Array [
|
41
|
+
0,
|
42
|
+
0,
|
43
|
+
32,
|
44
|
+
],
|
45
|
+
},
|
46
|
+
"backgroundColor": "#f5f5f8",
|
47
|
+
"padding": Array [
|
48
|
+
0,
|
49
|
+
0,
|
50
|
+
32,
|
51
|
+
],
|
52
|
+
},
|
53
|
+
"link": Object {
|
54
|
+
"&:hover, &:focus, &:active": Object {
|
55
|
+
"color": "#777777",
|
56
|
+
},
|
57
|
+
"color": "#777777",
|
58
|
+
"cursor": "pointer",
|
59
|
+
"textDecoration": "none",
|
60
|
+
},
|
61
|
+
"list": Object {
|
62
|
+
"&:not(:first-child)": Object {
|
63
|
+
"marginLeft": 16,
|
64
|
+
},
|
65
|
+
},
|
66
|
+
"listElement": Object {
|
67
|
+
"&:first-child": Object {
|
68
|
+
"paddingLeft": 0,
|
69
|
+
},
|
70
|
+
"&:not(:last-child)": Object {
|
71
|
+
"&::after": Object {
|
72
|
+
"content": "\\"|\\"",
|
73
|
+
"position": "absolute",
|
74
|
+
"right": -2,
|
75
|
+
},
|
76
|
+
},
|
77
|
+
"display": "inline-block",
|
78
|
+
"paddingLeft": 16,
|
79
|
+
"paddingRight": 16,
|
80
|
+
"position": "relative",
|
81
|
+
},
|
82
|
+
"mobileListElement": Object {
|
83
|
+
"display": "block",
|
84
|
+
"paddingBottom": 8,
|
85
|
+
"paddingLeft": 0,
|
86
|
+
},
|
87
|
+
}
|
88
|
+
`;
|
89
|
+
|
90
|
+
exports[`FooterJSS matches the snapshot 1`] = `ShallowWrapper {}`;
|
package/build/Footer/styles.js
CHANGED
@@ -33,6 +33,11 @@ var _default = {
|
|
33
33
|
paddingRight: _spacing["default"].gutter,
|
34
34
|
paddingBottom: _spacing["default"].small
|
35
35
|
},
|
36
|
+
list: {
|
37
|
+
'&:not(:first-child)': {
|
38
|
+
marginLeft: _spacing["default"].small
|
39
|
+
}
|
40
|
+
},
|
36
41
|
link: {
|
37
42
|
color: _colors["default"].grey600,
|
38
43
|
textDecoration: 'none',
|
package/build/Grid/Col/Col.js
CHANGED
@@ -34,7 +34,7 @@ var Col = function Col(_ref) {
|
|
34
34
|
id = _ref.id,
|
35
35
|
className = _ref.className,
|
36
36
|
style = _ref.style;
|
37
|
-
return _react["default"].createElement("div", {
|
37
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
38
38
|
className: "".concat(classes.col).concat(xxs ? getClasses('xxs', xxs, classes) : '').concat(xs ? getClasses('xs', xs, classes) : '').concat(sm ? getClasses('sm', sm, classes) : '').concat(md ? getClasses('md', md, classes) : '').concat(lg ? getClasses('lg', lg, classes) : '').concat(xl ? getClasses('xl', xl, classes) : '').concat(className ? " ".concat(className) : ''),
|
39
39
|
id: id,
|
40
40
|
style: style
|
@@ -21,7 +21,7 @@ var reduceClasses = function reduceClasses(prev, curr) {
|
|
21
21
|
var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
|
22
22
|
describe("Col", function () {
|
23
23
|
it('matches the snapshot', function () {
|
24
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Col["default"], {
|
24
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Col["default"], {
|
25
25
|
xs: {
|
26
26
|
col: 12
|
27
27
|
},
|
@@ -30,7 +30,7 @@ describe("Col", function () {
|
|
30
30
|
expect(wrapper).toMatchSnapshot();
|
31
31
|
});
|
32
32
|
it('matches the classes', function () {
|
33
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Col["default"], {
|
33
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Col["default"], {
|
34
34
|
xxs: {
|
35
35
|
col: 6,
|
36
36
|
offset: 3,
|
@@ -44,7 +44,7 @@ describe("Col", function () {
|
|
44
44
|
});
|
45
45
|
describe("ColJSS", function () {
|
46
46
|
it('matches the snapshot', function () {
|
47
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], {
|
47
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
|
48
48
|
xs: {
|
49
49
|
col: 12
|
50
50
|
}
|