@occmundial/occ-atomic 2.0.0-beta.0 → 2.0.0-beta.10
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 +1354 -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 +66 -33
- package/build/Button/Button.test.js +23 -28
- package/build/Button/Loading.js +82 -0
- package/build/Button/__snapshots__/Button.test.js.snap +322 -0
- package/build/Button/index.js +4 -2
- package/build/Button/styles.js +185 -173
- 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 +85 -42
- package/build/Icon/Icon.test.js +15 -13
- package/build/Icon/__snapshots__/Icon.test.js.snap +32 -0
- package/build/Icon/index.js +4 -2
- package/build/Icon/styles.js +14 -4
- 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 +15 -12
- 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 +24 -19
- package/build/NavAside/NavAside.test.js +15 -13
- package/build/NavAside/__snapshots__/NavAside.test.js.snap +116 -0
- package/build/NavAside/index.js +16 -12
- package/build/NavIcon/NavIcon.js +41 -20
- package/build/NavIcon/styles.js +6 -16
- package/build/NavItem/NavItem.js +29 -16
- package/build/NavTab/NavTab.js +38 -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/Provider/Provider.js +89 -0
- package/build/Provider/index.js +13 -0
- package/build/Provider/useAtomic.js +17 -0
- package/build/Provider/usePrevious.js +19 -0
- 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 +41 -27
- package/build/SlideDown/SlideDown.test.js +22 -16
- 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 +454 -122
- package/build/Text/Text.test.js +13 -13
- package/build/Text/__snapshots__/Text.test.js.snap +216 -0
- package/build/Text/styles.js +171 -78
- 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 +8 -8
- 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 +82 -8
- package/build/plugin/babel.js +61 -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 +25 -8
- package/build/subatomic/icons/occHorizontal.js +25 -8
- package/build/subatomic/icons/occLogo.js +65 -0
- package/build/subatomic/icons/occVertical.js +25 -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/subatomic/mappedIcons.js +171 -0
- 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
@@ -0,0 +1,116 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`ModalPortal matches the snapshot 1`] = `ShallowWrapper {}`;
|
4
|
+
|
5
|
+
exports[`NavAside matches the snapshot 1`] = `ShallowWrapper {}`;
|
6
|
+
|
7
|
+
exports[`NavAside styles matches the snapshot 1`] = `
|
8
|
+
Object {
|
9
|
+
"@global": Object {
|
10
|
+
"body": Object {
|
11
|
+
"overflow": "hidden",
|
12
|
+
},
|
13
|
+
},
|
14
|
+
"@keyframes asideShow": Object {
|
15
|
+
"from": Object {
|
16
|
+
"left": [Function],
|
17
|
+
},
|
18
|
+
"to": Object {
|
19
|
+
"left": "0px",
|
20
|
+
},
|
21
|
+
},
|
22
|
+
"@keyframes asideShowRight": Object {
|
23
|
+
"from": Object {
|
24
|
+
"right": [Function],
|
25
|
+
},
|
26
|
+
"to": Object {
|
27
|
+
"right": "0px",
|
28
|
+
},
|
29
|
+
},
|
30
|
+
"@keyframes overlayFadeIn": Object {
|
31
|
+
"from": Object {
|
32
|
+
"opacity": 0,
|
33
|
+
},
|
34
|
+
"to": Object {
|
35
|
+
"opacity": 1,
|
36
|
+
},
|
37
|
+
},
|
38
|
+
"OpenElement": Object {
|
39
|
+
"animation": "0.3s asideShow ease-out",
|
40
|
+
"left": "0px !important",
|
41
|
+
},
|
42
|
+
"OpenElementRight": Object {
|
43
|
+
"animation": "0.3s asideShowRight ease-out",
|
44
|
+
"right": "0px !important",
|
45
|
+
},
|
46
|
+
"ShowElement": Object {
|
47
|
+
"backgroundColor": "#ffffff",
|
48
|
+
"height": "100%",
|
49
|
+
"left": "-320px",
|
50
|
+
"maxWidth": "calc(100% - 32px)",
|
51
|
+
"opacity": "1 !important",
|
52
|
+
"overflow": "hidden",
|
53
|
+
"position": "fixed",
|
54
|
+
"top": "0",
|
55
|
+
"transition": "0.4s all",
|
56
|
+
"width": "320px",
|
57
|
+
},
|
58
|
+
"card": Object {
|
59
|
+
"cursor": "auto",
|
60
|
+
"height": "100%",
|
61
|
+
"overflow": "auto",
|
62
|
+
"padding": 0,
|
63
|
+
},
|
64
|
+
"closeIcon": Object {
|
65
|
+
"alignItems": "center",
|
66
|
+
"display": "flex",
|
67
|
+
"height": 32,
|
68
|
+
},
|
69
|
+
"content": Object {
|
70
|
+
"@media screen and (min-width:768px)": Object {
|
71
|
+
"padding": 32,
|
72
|
+
},
|
73
|
+
"backgroundColor": "#ffffff",
|
74
|
+
"padding": 16,
|
75
|
+
},
|
76
|
+
"customeWidth": Object {
|
77
|
+
"left": [Function],
|
78
|
+
"width": [Function],
|
79
|
+
},
|
80
|
+
"customeWidthRight": Object {
|
81
|
+
"right": [Function],
|
82
|
+
"width": [Function],
|
83
|
+
},
|
84
|
+
"overlay": Object {
|
85
|
+
"background": "rgba(0, 0, 5, 0.85)",
|
86
|
+
"cursor": "pointer",
|
87
|
+
"height": "100%",
|
88
|
+
"left": 0,
|
89
|
+
"opacity": 0,
|
90
|
+
"position": "fixed",
|
91
|
+
"top": 0,
|
92
|
+
"transition": "0.3s opacity",
|
93
|
+
"transitionDelay": "0.2s",
|
94
|
+
"width": "100%",
|
95
|
+
"zIndex": 1000,
|
96
|
+
},
|
97
|
+
"overlayShow": Object {
|
98
|
+
"animation": "0.3s overlayFadeIn linear",
|
99
|
+
"opacity": 1,
|
100
|
+
},
|
101
|
+
"showRight": Object {
|
102
|
+
"left": "auto",
|
103
|
+
"right": "-320px",
|
104
|
+
},
|
105
|
+
"top": Object {
|
106
|
+
"@media screen and (min-width:768px)": Object {
|
107
|
+
"padding": 32,
|
108
|
+
},
|
109
|
+
"backgroundColor": "#f5f5f8",
|
110
|
+
"padding": 16,
|
111
|
+
},
|
112
|
+
"topContent": Object {
|
113
|
+
"minWidth": 0,
|
114
|
+
},
|
115
|
+
}
|
116
|
+
`;
|
package/build/NavAside/index.js
CHANGED
@@ -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
|
});
|
@@ -17,8 +19,6 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
17
19
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
19
21
|
|
20
|
-
function _typeof(obj) { 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); }
|
21
|
-
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
23
23
|
|
24
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
@@ -27,29 +27,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
27
27
|
|
28
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
29
29
|
|
30
|
-
function
|
30
|
+
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); }
|
31
|
+
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
31
33
|
|
32
|
-
function
|
34
|
+
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); }; }
|
35
|
+
|
36
|
+
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); }
|
33
37
|
|
34
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
35
39
|
|
36
|
-
function
|
40
|
+
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; } }
|
37
41
|
|
38
|
-
function
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
39
43
|
|
40
44
|
var NavAside = (0, _reactJss["default"])(_styles["default"])(_NavAside["default"]);
|
41
45
|
|
42
|
-
var NavAsidePortal =
|
43
|
-
/*#__PURE__*/
|
44
|
-
function (_React$Component) {
|
46
|
+
var NavAsidePortal = /*#__PURE__*/function (_React$Component) {
|
45
47
|
_inherits(NavAsidePortal, _React$Component);
|
46
48
|
|
49
|
+
var _super = _createSuper(NavAsidePortal);
|
50
|
+
|
47
51
|
function NavAsidePortal(props) {
|
48
52
|
var _this;
|
49
53
|
|
50
54
|
_classCallCheck(this, NavAsidePortal);
|
51
55
|
|
52
|
-
_this =
|
56
|
+
_this = _super.call(this, props);
|
53
57
|
_this.state = {
|
54
58
|
mount: false
|
55
59
|
};
|
@@ -81,12 +85,12 @@ function (_React$Component) {
|
|
81
85
|
container = _this$props.container,
|
82
86
|
show = _this$props.show;
|
83
87
|
|
84
|
-
var NavAsideComponent = _react["default"].createElement(NavAside, _extends({}, this.props, {
|
88
|
+
var NavAsideComponent = /*#__PURE__*/_react["default"].createElement(NavAside, _extends({}, this.props, {
|
85
89
|
onTransitionEnd: !show && mount ? this.onTransitionEnd : null
|
86
90
|
}));
|
87
91
|
|
88
92
|
if (container) {
|
89
|
-
return mount ? _reactDom["default"].createPortal(NavAsideComponent, container) : null;
|
93
|
+
return mount ? /*#__PURE__*/_reactDom["default"].createPortal(NavAsideComponent, container) : null;
|
90
94
|
} else {
|
91
95
|
return mount ? NavAsideComponent : null;
|
92
96
|
}
|
package/build/NavIcon/NavIcon.js
CHANGED
@@ -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
|
});
|
@@ -13,9 +15,11 @@ var _Text = _interopRequireDefault(require("../Text"));
|
|
13
15
|
|
14
16
|
var _Flexbox = _interopRequireDefault(require("../Flexbox"));
|
15
17
|
|
16
|
-
|
18
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
17
19
|
|
18
|
-
|
20
|
+
var _colors = _interopRequireDefault(require("../subatomic/colors"));
|
21
|
+
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
19
23
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
21
25
|
|
@@ -23,25 +27,29 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
23
27
|
|
24
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
25
29
|
|
26
|
-
function
|
30
|
+
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); }
|
27
31
|
|
28
|
-
function
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
29
33
|
|
30
|
-
function
|
34
|
+
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); }; }
|
31
35
|
|
32
|
-
function
|
36
|
+
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); }
|
33
37
|
|
34
|
-
function
|
38
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
39
|
+
|
40
|
+
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; } }
|
35
41
|
|
36
|
-
|
37
|
-
|
38
|
-
function (_React$Component) {
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
43
|
+
|
44
|
+
var NavIcon = /*#__PURE__*/function (_React$Component) {
|
39
45
|
_inherits(NavIcon, _React$Component);
|
40
46
|
|
47
|
+
var _super = _createSuper(NavIcon);
|
48
|
+
|
41
49
|
function NavIcon() {
|
42
50
|
_classCallCheck(this, NavIcon);
|
43
51
|
|
44
|
-
return
|
52
|
+
return _super.apply(this, arguments);
|
45
53
|
}
|
46
54
|
|
47
55
|
_createClass(NavIcon, [{
|
@@ -53,21 +61,29 @@ function (_React$Component) {
|
|
53
61
|
label = _this$props.label,
|
54
62
|
onClick = _this$props.onClick,
|
55
63
|
direction = _this$props.direction,
|
56
|
-
className = _this$props.className
|
57
|
-
|
64
|
+
className = _this$props.className,
|
65
|
+
testId = _this$props.testId,
|
66
|
+
id = _this$props.id,
|
67
|
+
iconName = _this$props.iconName,
|
68
|
+
white = _this$props.white;
|
69
|
+
var iconColor = white ? _colors["default"].bgWhite : _colors["default"].grey600;
|
70
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
58
71
|
className: "".concat(classes.cont).concat(selected ? " ".concat(classes.selected) : '').concat(className ? " ".concat(className) : ''),
|
59
|
-
onClick: onClick
|
60
|
-
|
72
|
+
onClick: onClick,
|
73
|
+
"data-testid": testId,
|
74
|
+
id: id
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
61
76
|
display: "flex",
|
62
77
|
direction: direction,
|
63
78
|
justifyContent: "center",
|
64
79
|
alignItems: "center",
|
65
80
|
className: classes.flex
|
66
|
-
}, _react["default"].createElement("
|
67
|
-
|
68
|
-
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
82
|
+
iconName: iconName,
|
83
|
+
colors: [iconColor]
|
84
|
+
}), label && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
69
85
|
micro: true
|
70
|
-
}, _react["default"].createElement("span", {
|
86
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
71
87
|
className: classes.text
|
72
88
|
}, label))));
|
73
89
|
}
|
@@ -85,7 +101,12 @@ NavIcon.propTypes = {
|
|
85
101
|
width: _propTypes["default"].number,
|
86
102
|
showBar: _propTypes["default"].bool,
|
87
103
|
direction: _propTypes["default"].oneOf(['col', 'row']),
|
88
|
-
className: _propTypes["default"].string
|
104
|
+
className: _propTypes["default"].string,
|
105
|
+
|
106
|
+
/** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
|
107
|
+
testId: _propTypes["default"].string,
|
108
|
+
id: _propTypes["default"].string,
|
109
|
+
white: _propTypes["default"].bool
|
89
110
|
};
|
90
111
|
var _default = NavIcon;
|
91
112
|
exports["default"] = _default;
|
package/build/NavIcon/styles.js
CHANGED
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
7
7
|
|
8
8
|
var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
|
9
9
|
|
10
|
-
var _icons = _interopRequireDefault(require("../subatomic/icons"));
|
11
|
-
|
12
10
|
var _colors = _interopRequireDefault(require("../subatomic/colors"));
|
13
11
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
@@ -22,9 +20,9 @@ var _default = {
|
|
22
20
|
height: _spacing["default"].xLarge,
|
23
21
|
cursor: 'pointer',
|
24
22
|
position: 'relative',
|
25
|
-
'&:hover $
|
26
|
-
|
27
|
-
return
|
23
|
+
'&:hover $svg': {
|
24
|
+
fill: function fill(props) {
|
25
|
+
return props.white ? _colors["default"].bgWhite : _colors["default"].grey900;
|
28
26
|
},
|
29
27
|
opacity: function opacity(props) {
|
30
28
|
return props.white ? 0.6 : null;
|
@@ -53,9 +51,9 @@ var _default = {
|
|
53
51
|
height: _spacing["default"].xLarge
|
54
52
|
},
|
55
53
|
selected: {
|
56
|
-
'& $
|
57
|
-
|
58
|
-
return
|
54
|
+
'& $svg, &:hover $svg': {
|
55
|
+
fill: function fill(props) {
|
56
|
+
return props.white ? _colors["default"].bgWhite : _colors["default"].prim;
|
59
57
|
}
|
60
58
|
},
|
61
59
|
'& $text, &:hover $text': {
|
@@ -69,14 +67,6 @@ var _default = {
|
|
69
67
|
}
|
70
68
|
}
|
71
69
|
},
|
72
|
-
icon: {
|
73
|
-
width: _spacing["default"].base,
|
74
|
-
height: _spacing["default"].base,
|
75
|
-
background: function background(props) {
|
76
|
-
return _icons["default"].base(_icons["default"][props.iconName].icon([props.white ? _colors["default"].bgWhite : _colors["default"].grey600]));
|
77
|
-
},
|
78
|
-
transition: '0.3s all'
|
79
|
-
},
|
80
70
|
text: {
|
81
71
|
color: function color(props) {
|
82
72
|
return props.white ? _colors["default"].white : _colors["default"].inkLight;
|
package/build/NavItem/NavItem.js
CHANGED
@@ -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
|
});
|
@@ -13,8 +15,6 @@ var _Text = _interopRequireDefault(require("../Text"));
|
|
13
15
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
17
|
|
16
|
-
function _typeof(obj) { 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); }
|
17
|
-
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
19
|
|
20
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
@@ -23,26 +23,30 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
23
23
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
25
25
|
|
26
|
-
function
|
26
|
+
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); }
|
27
27
|
|
28
|
-
function
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
29
29
|
|
30
|
-
function
|
30
|
+
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); }; }
|
31
31
|
|
32
|
-
function
|
32
|
+
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); }
|
33
33
|
|
34
|
-
function
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
35
|
+
|
36
|
+
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; } }
|
37
|
+
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
35
39
|
|
36
40
|
/** This component is used inside the NavTab component. You can just pass a link and a text, wrap it or send a custom link component. */
|
37
|
-
var NavItem =
|
38
|
-
/*#__PURE__*/
|
39
|
-
function (_React$Component) {
|
41
|
+
var NavItem = /*#__PURE__*/function (_React$Component) {
|
40
42
|
_inherits(NavItem, _React$Component);
|
41
43
|
|
44
|
+
var _super = _createSuper(NavItem);
|
45
|
+
|
42
46
|
function NavItem() {
|
43
47
|
_classCallCheck(this, NavItem);
|
44
48
|
|
45
|
-
return
|
49
|
+
return _super.apply(this, arguments);
|
46
50
|
}
|
47
51
|
|
48
52
|
_createClass(NavItem, [{
|
@@ -60,19 +64,24 @@ function (_React$Component) {
|
|
60
64
|
notification = _this$props.notification,
|
61
65
|
white = _this$props.white,
|
62
66
|
small = _this$props.small,
|
63
|
-
className = _this$props.className
|
67
|
+
className = _this$props.className,
|
68
|
+
testId = _this$props.testId,
|
69
|
+
id = _this$props.id;
|
64
70
|
var AnchorTag = customComponent ? customComponent : 'a';
|
65
|
-
return _react["default"].createElement(AnchorTag, _extends({
|
71
|
+
return /*#__PURE__*/_react["default"].createElement(AnchorTag, _extends({
|
66
72
|
className: "".concat(classes.link).concat(className ? " ".concat(className) : ''),
|
67
73
|
href: !selected ? link : null,
|
68
74
|
onClick: !selected ? onClick : null,
|
69
75
|
target: target
|
70
|
-
}, customComponent && customProps
|
76
|
+
}, customComponent && customProps, {
|
77
|
+
"data-testid": testId,
|
78
|
+
id: id
|
79
|
+
}), /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
71
80
|
tag: "span",
|
72
81
|
white: white,
|
73
82
|
small: small,
|
74
83
|
className: "".concat(classes.text).concat(selected ? " ".concat(classes.selected) : '')
|
75
|
-
}, children), notification && _react["default"].createElement("span", {
|
84
|
+
}, children), notification && /*#__PURE__*/_react["default"].createElement("span", {
|
76
85
|
className: classes.notification
|
77
86
|
}));
|
78
87
|
}
|
@@ -111,7 +120,11 @@ NavItem.propTypes = {
|
|
111
120
|
|
112
121
|
/** Custom properties to apply directly to the custom component. */
|
113
122
|
customProps: _propTypes["default"].object,
|
114
|
-
className: _propTypes["default"].string
|
123
|
+
className: _propTypes["default"].string,
|
124
|
+
|
125
|
+
/** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
|
126
|
+
testId: _propTypes["default"].string,
|
127
|
+
id: _propTypes["default"].string
|
115
128
|
};
|
116
129
|
var _default = NavItem;
|
117
130
|
exports["default"] = _default;
|