@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/Pill/styles.js
CHANGED
@@ -25,8 +25,8 @@ var _default = {
|
|
25
25
|
},
|
26
26
|
label: {
|
27
27
|
fontFamily: _fonts["default"].body,
|
28
|
-
fontSize:
|
29
|
-
lineHeight:
|
28
|
+
fontSize: 14,
|
29
|
+
lineHeight: 1.5,
|
30
30
|
color: _colors["default"].ink,
|
31
31
|
transition: '0.3s all',
|
32
32
|
'& a': {
|
@@ -55,6 +55,10 @@ var _default = {
|
|
55
55
|
},
|
56
56
|
errorIcon: {
|
57
57
|
marginBottom: -2
|
58
|
+
},
|
59
|
+
choiceGroup: {
|
60
|
+
display: 'flex',
|
61
|
+
flexWrap: 'wrap'
|
58
62
|
}
|
59
63
|
};
|
60
64
|
exports["default"] = _default;
|
@@ -20,11 +20,11 @@ var Placeholder = function Placeholder(_ref) {
|
|
20
20
|
round = _ref.round,
|
21
21
|
top = _ref.top,
|
22
22
|
bottom = _ref.bottom;
|
23
|
-
return _react["default"].createElement(_Flexbox["default"], {
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
|
24
24
|
display: "flex",
|
25
25
|
alignItems: "center",
|
26
26
|
className: "".concat(textSize ? classes[textSize] : '').concat(top ? " ".concat(classes["top".concat(top)]) : '').concat(bottom ? " ".concat(classes["bottom".concat(bottom)]) : '')
|
27
|
-
}, _react["default"].createElement("div", {
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
28
28
|
className: "".concat(classes.placeholder).concat(round ? " ".concat(classes.round) : '')
|
29
29
|
}));
|
30
30
|
};
|
@@ -21,13 +21,13 @@ var reduceClasses = function reduceClasses(prev, curr) {
|
|
21
21
|
var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
|
22
22
|
describe('Placeholder', function () {
|
23
23
|
it('matches the snapshot', function () {
|
24
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Placeholder["default"], {
|
24
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Placeholder["default"], {
|
25
25
|
classes: classes
|
26
26
|
}));
|
27
27
|
expect(wrapper).toMatchSnapshot();
|
28
28
|
});
|
29
29
|
it('has the right classNames', function () {
|
30
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Placeholder["default"], {
|
30
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Placeholder["default"], {
|
31
31
|
classes: classes
|
32
32
|
}));
|
33
33
|
expect(wrapper.prop('className')).toBe('');
|
@@ -47,7 +47,7 @@ describe('Placeholder', function () {
|
|
47
47
|
});
|
48
48
|
describe("PlaceholderJSS", function () {
|
49
49
|
it('matches the snapshot', function () {
|
50
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], null));
|
50
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null));
|
51
51
|
expect(wrapper).toMatchSnapshot();
|
52
52
|
});
|
53
53
|
});
|
@@ -0,0 +1,130 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Placeholder matches the snapshot 1`] = `ShallowWrapper {}`;
|
4
|
+
|
5
|
+
exports[`Placeholder styles matches the snapshot 1`] = `
|
6
|
+
Object {
|
7
|
+
"@keyframes progress": Object {
|
8
|
+
"0%": Object {
|
9
|
+
"transform": "translate3d(-100%, 0, 0)",
|
10
|
+
},
|
11
|
+
"100%": Object {
|
12
|
+
"transform": "translate3d(100%, 0, 0)",
|
13
|
+
},
|
14
|
+
},
|
15
|
+
"bottombase": Object {
|
16
|
+
"marginBottom": 24,
|
17
|
+
},
|
18
|
+
"bottomlarge": Object {
|
19
|
+
"marginBottom": 48,
|
20
|
+
},
|
21
|
+
"bottommedium": Object {
|
22
|
+
"marginBottom": 32,
|
23
|
+
},
|
24
|
+
"bottomsmall": Object {
|
25
|
+
"marginBottom": 16,
|
26
|
+
},
|
27
|
+
"bottomtiny": Object {
|
28
|
+
"marginBottom": 8,
|
29
|
+
},
|
30
|
+
"bottomxLarge": Object {
|
31
|
+
"marginBottom": 64,
|
32
|
+
},
|
33
|
+
"bottomxTiny": Object {
|
34
|
+
"marginBottom": 4,
|
35
|
+
},
|
36
|
+
"heading": Object {
|
37
|
+
"& $placeholder": Object {
|
38
|
+
"height": 22,
|
39
|
+
},
|
40
|
+
"height": 32,
|
41
|
+
},
|
42
|
+
"headline": Object {
|
43
|
+
"& $placeholder": Object {
|
44
|
+
"height": 36,
|
45
|
+
},
|
46
|
+
"height": 48,
|
47
|
+
},
|
48
|
+
"hero": Object {
|
49
|
+
"& $placeholder": Object {
|
50
|
+
"height": 57,
|
51
|
+
},
|
52
|
+
"height": 72,
|
53
|
+
},
|
54
|
+
"large": Object {
|
55
|
+
"& $placeholder": Object {
|
56
|
+
"height": 17,
|
57
|
+
},
|
58
|
+
"height": 24,
|
59
|
+
},
|
60
|
+
"micro": Object {
|
61
|
+
"& $placeholder": Object {
|
62
|
+
"height": 11,
|
63
|
+
},
|
64
|
+
"height": 16,
|
65
|
+
},
|
66
|
+
"placeholder": Object {
|
67
|
+
"&:after": Object {
|
68
|
+
"animation": "progress 2s ease-in-out infinite",
|
69
|
+
"background": "linear-gradient(90deg, rgba(204, 204, 204, 0), rgba(204, 204, 204, 0.7), rgba(204, 204, 204, 0))",
|
70
|
+
"content": "\\"\\"",
|
71
|
+
"height": "100%",
|
72
|
+
"left": 0,
|
73
|
+
"position": "absolute",
|
74
|
+
"top": 0,
|
75
|
+
"width": "100%",
|
76
|
+
},
|
77
|
+
"background": "#f2f2f2",
|
78
|
+
"borderRadius": 4,
|
79
|
+
"height": [Function],
|
80
|
+
"mixBlendMode": "multiply",
|
81
|
+
"overflow": "hidden",
|
82
|
+
"position": "relative",
|
83
|
+
"width": [Function],
|
84
|
+
},
|
85
|
+
"round": Object {
|
86
|
+
"borderRadius": "50%",
|
87
|
+
},
|
88
|
+
"small": Object {
|
89
|
+
"& $placeholder": Object {
|
90
|
+
"height": 13,
|
91
|
+
},
|
92
|
+
"height": 16,
|
93
|
+
},
|
94
|
+
"standard": Object {
|
95
|
+
"& $placeholder": Object {
|
96
|
+
"height": 15,
|
97
|
+
},
|
98
|
+
"height": 24,
|
99
|
+
},
|
100
|
+
"subheading": Object {
|
101
|
+
"& $placeholder": Object {
|
102
|
+
"height": 17,
|
103
|
+
},
|
104
|
+
"height": 24,
|
105
|
+
},
|
106
|
+
"topbase": Object {
|
107
|
+
"marginTop": 24,
|
108
|
+
},
|
109
|
+
"toplarge": Object {
|
110
|
+
"marginTop": 48,
|
111
|
+
},
|
112
|
+
"topmedium": Object {
|
113
|
+
"marginTop": 32,
|
114
|
+
},
|
115
|
+
"topsmall": Object {
|
116
|
+
"marginTop": 16,
|
117
|
+
},
|
118
|
+
"toptiny": Object {
|
119
|
+
"marginTop": 8,
|
120
|
+
},
|
121
|
+
"topxLarge": Object {
|
122
|
+
"marginTop": 64,
|
123
|
+
},
|
124
|
+
"topxTiny": Object {
|
125
|
+
"marginTop": 4,
|
126
|
+
},
|
127
|
+
}
|
128
|
+
`;
|
129
|
+
|
130
|
+
exports[`PlaceholderJSS matches the snapshot 1`] = `ShallowWrapper {}`;
|
@@ -5,22 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
-
var _colors = _interopRequireDefault(require("../subatomic/colors"));
|
9
|
-
|
10
8
|
var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
|
11
9
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
13
11
|
|
14
12
|
var _default = {
|
15
|
-
'@keyframes
|
13
|
+
'@keyframes progress': {
|
16
14
|
'0%': {
|
17
|
-
|
18
|
-
},
|
19
|
-
'50%': {
|
20
|
-
opacity: 1
|
15
|
+
transform: 'translate3d(-100%, 0, 0)'
|
21
16
|
},
|
22
17
|
'100%': {
|
23
|
-
|
18
|
+
transform: 'translate3d(100%, 0, 0)'
|
24
19
|
}
|
25
20
|
},
|
26
21
|
placeholder: {
|
@@ -30,9 +25,21 @@ var _default = {
|
|
30
25
|
height: function height(props) {
|
31
26
|
return props.height ? props.height : 14;
|
32
27
|
},
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
borderRadius: _spacing["default"].xTiny,
|
29
|
+
position: 'relative',
|
30
|
+
overflow: 'hidden',
|
31
|
+
background: '#f2f2f2',
|
32
|
+
mixBlendMode: 'multiply',
|
33
|
+
'&:after': {
|
34
|
+
content: '""',
|
35
|
+
position: 'absolute',
|
36
|
+
top: 0,
|
37
|
+
left: 0,
|
38
|
+
width: '100%',
|
39
|
+
height: '100%',
|
40
|
+
background: "linear-gradient(90deg, rgba(204, 204, 204, 0), rgba(204, 204, 204, 0.7), rgba(204, 204, 204, 0))",
|
41
|
+
animation: 'progress 2s ease-in-out infinite'
|
42
|
+
}
|
36
43
|
},
|
37
44
|
round: {
|
38
45
|
borderRadius: '50%'
|
@@ -58,31 +65,31 @@ var _default = {
|
|
58
65
|
subheading: {
|
59
66
|
height: 24,
|
60
67
|
'& $placeholder': {
|
61
|
-
height:
|
68
|
+
height: 17
|
62
69
|
}
|
63
70
|
},
|
64
71
|
large: {
|
65
72
|
height: 24,
|
66
73
|
'& $placeholder': {
|
67
|
-
height:
|
74
|
+
height: 17
|
68
75
|
}
|
69
76
|
},
|
70
77
|
standard: {
|
71
78
|
height: 24,
|
72
79
|
'& $placeholder': {
|
73
|
-
height:
|
80
|
+
height: 15
|
74
81
|
}
|
75
82
|
},
|
76
83
|
small: {
|
77
84
|
height: 16,
|
78
85
|
'& $placeholder': {
|
79
|
-
height:
|
86
|
+
height: 13
|
80
87
|
}
|
81
88
|
},
|
82
89
|
micro: {
|
83
90
|
height: 16,
|
84
91
|
'& $placeholder': {
|
85
|
-
height:
|
92
|
+
height: 11
|
86
93
|
}
|
87
94
|
},
|
88
95
|
topxTiny: {
|
package/build/Radio/Radio.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,7 +15,7 @@ var _Text = _interopRequireDefault(require("../Text"));
|
|
13
15
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
17
|
|
16
|
-
function
|
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); }
|
17
19
|
|
18
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
19
21
|
|
@@ -21,27 +23,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
21
23
|
|
22
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
23
25
|
|
24
|
-
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); }
|
25
27
|
|
26
|
-
function
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
29
|
+
|
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
|
+
|
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); }
|
27
33
|
|
28
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
29
35
|
|
30
|
-
function
|
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; } }
|
31
37
|
|
32
|
-
function
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
33
39
|
|
34
|
-
var Radio =
|
35
|
-
/*#__PURE__*/
|
36
|
-
function (_React$Component) {
|
40
|
+
var Radio = /*#__PURE__*/function (_React$Component) {
|
37
41
|
_inherits(Radio, _React$Component);
|
38
42
|
|
43
|
+
var _super = _createSuper(Radio);
|
44
|
+
|
39
45
|
function Radio(props) {
|
40
46
|
var _this;
|
41
47
|
|
42
48
|
_classCallCheck(this, Radio);
|
43
49
|
|
44
|
-
_this =
|
50
|
+
_this = _super.call(this, props);
|
45
51
|
_this.state = {
|
46
52
|
selected: props.selected
|
47
53
|
};
|
@@ -82,24 +88,28 @@ function (_React$Component) {
|
|
82
88
|
textOverflow = _this$props.textOverflow,
|
83
89
|
className = _this$props.className,
|
84
90
|
style = _this$props.style;
|
85
|
-
return _react["default"].createElement("div", {
|
91
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
86
92
|
id: id
|
87
93
|
}, options.map(function (option) {
|
88
|
-
return _react["default"].createElement("div", {
|
94
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
89
95
|
id: option.trk,
|
90
96
|
key: option.value,
|
97
|
+
"data-testid": option.testId
|
98
|
+
}, option.testId && {
|
99
|
+
'data-value': selected == option.value ? 1 : 0
|
100
|
+
}, {
|
91
101
|
className: "".concat(classes.cont).concat(selected == option.value ? " ".concat(classes.active) : '').concat(option.disabled ? " ".concat(classes.disabled) : '').concat(className ? " ".concat(className) : ''),
|
92
102
|
onClick: function onClick() {
|
93
103
|
_this2.onChange(option);
|
94
104
|
},
|
95
105
|
style: style
|
96
|
-
}, _react["default"].createElement("div", {
|
106
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
97
107
|
className: classes.radio,
|
98
108
|
id: option.trk
|
99
|
-
}), option.label && _react["default"].createElement(_Text["default"], {
|
109
|
+
}), option.label && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
100
110
|
tag: "label",
|
101
111
|
className: "".concat(classes.label).concat(textOverflow ? " ".concat(classes.overflow) : '')
|
102
|
-
}, option.label), option.right && _react["default"].createElement(_Text["default"], {
|
112
|
+
}, option.label), option.right && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
103
113
|
tag: "label",
|
104
114
|
mid: true,
|
105
115
|
className: classes.right
|
@@ -128,7 +138,11 @@ Radio.propTypes = {
|
|
128
138
|
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
129
139
|
label: _propTypes["default"].string,
|
130
140
|
right: _propTypes["default"].string,
|
131
|
-
trk: _propTypes["default"].string
|
141
|
+
trk: _propTypes["default"].string,
|
142
|
+
|
143
|
+
/** The testId property adds the data attribute data-testid to
|
144
|
+
* the main element and should be used for testing only. */
|
145
|
+
testId: _propTypes["default"].string
|
132
146
|
})),
|
133
147
|
|
134
148
|
/** Use this prop to overflow the text of the label, adding '...' and the end. */
|
@@ -31,14 +31,14 @@ var options = [{
|
|
31
31
|
}];
|
32
32
|
describe("Radio", function () {
|
33
33
|
it('matches the snapshot', function () {
|
34
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Radio["default"], {
|
34
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
35
35
|
classes: classes,
|
36
36
|
options: options
|
37
37
|
}));
|
38
38
|
expect(wrapper).toMatchSnapshot();
|
39
39
|
});
|
40
40
|
it('has the right state', function () {
|
41
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Radio["default"], {
|
41
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
42
42
|
classes: classes,
|
43
43
|
options: options,
|
44
44
|
selected: 3
|
@@ -61,7 +61,7 @@ describe("Radio", function () {
|
|
61
61
|
label: 'Option 3',
|
62
62
|
disabled: true
|
63
63
|
}];
|
64
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Radio["default"], {
|
64
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
65
65
|
classes: classes,
|
66
66
|
options: options2
|
67
67
|
}));
|
@@ -70,7 +70,7 @@ describe("Radio", function () {
|
|
70
70
|
expect(wrapper.find('.cont').at(2).prop('className')).toEqual('cont disabled');
|
71
71
|
});
|
72
72
|
it('changes the value on click', function () {
|
73
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Radio["default"], {
|
73
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
74
74
|
classes: classes,
|
75
75
|
options: options
|
76
76
|
}));
|
@@ -80,7 +80,7 @@ describe("Radio", function () {
|
|
80
80
|
});
|
81
81
|
it('calls onChange function', function () {
|
82
82
|
var onChange = jest.fn();
|
83
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Radio["default"], {
|
83
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
84
84
|
classes: classes,
|
85
85
|
onChange: onChange,
|
86
86
|
options: options
|
@@ -91,7 +91,7 @@ describe("Radio", function () {
|
|
91
91
|
});
|
92
92
|
describe("RadioJSS", function () {
|
93
93
|
it('matches the snapshot', function () {
|
94
|
-
var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], null));
|
94
|
+
var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null));
|
95
95
|
expect(wrapper).toMatchSnapshot();
|
96
96
|
});
|
97
97
|
});
|
@@ -0,0 +1,83 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Radio matches the snapshot 1`] = `ShallowWrapper {}`;
|
4
|
+
|
5
|
+
exports[`Radio styles matches the snapshot 1`] = `
|
6
|
+
Object {
|
7
|
+
"active": Object {
|
8
|
+
"& $radio:after": Object {
|
9
|
+
"background": Array [
|
10
|
+
"#083cae",
|
11
|
+
"!important",
|
12
|
+
],
|
13
|
+
},
|
14
|
+
},
|
15
|
+
"cont": Object {
|
16
|
+
"&:after": Object {
|
17
|
+
"clear": "both",
|
18
|
+
"content": "\\"\\"",
|
19
|
+
"display": "table",
|
20
|
+
},
|
21
|
+
"&:hover $radio:after": Object {
|
22
|
+
"background": "#dddddd",
|
23
|
+
},
|
24
|
+
"alignItems": "start",
|
25
|
+
"boxSizing": "border-box",
|
26
|
+
"cursor": "pointer",
|
27
|
+
"display": "flex",
|
28
|
+
"outline": "0",
|
29
|
+
"paddingBottom": 8,
|
30
|
+
"paddingTop": 8,
|
31
|
+
},
|
32
|
+
"disabled": Object {
|
33
|
+
"opacity": 0.4,
|
34
|
+
"pointerEvents": "none",
|
35
|
+
},
|
36
|
+
"label": Object {
|
37
|
+
"cursor": "pointer",
|
38
|
+
"flex": "1",
|
39
|
+
"float": "left",
|
40
|
+
"marginLeft": 8,
|
41
|
+
},
|
42
|
+
"overflow": Object {
|
43
|
+
"overflow": "hidden",
|
44
|
+
"textOverflow": "ellipsis",
|
45
|
+
"whiteSpace": "nowrap",
|
46
|
+
},
|
47
|
+
"radio": Object {
|
48
|
+
"&:after": Object {
|
49
|
+
"background": "transparent",
|
50
|
+
"borderRadius": "50%",
|
51
|
+
"content": "\\"\\"",
|
52
|
+
"height": 6,
|
53
|
+
"left": "50%",
|
54
|
+
"position": "absolute",
|
55
|
+
"top": "50%",
|
56
|
+
"transform": "translate(-50%, -50%)",
|
57
|
+
"transition": "0.3s all",
|
58
|
+
"width": 6,
|
59
|
+
},
|
60
|
+
"&:before": Object {
|
61
|
+
"background": "#ffffff",
|
62
|
+
"border": "1px solid #dddddd",
|
63
|
+
"borderRadius": "50%",
|
64
|
+
"content": "\\"\\"",
|
65
|
+
"height": 16,
|
66
|
+
"left": "50%",
|
67
|
+
"position": "absolute",
|
68
|
+
"top": "50%",
|
69
|
+
"transform": "translate(-50%, -50%)",
|
70
|
+
"width": 16,
|
71
|
+
},
|
72
|
+
"height": 24,
|
73
|
+
"position": "relative",
|
74
|
+
"width": 24,
|
75
|
+
},
|
76
|
+
"right": Object {
|
77
|
+
"float": "right",
|
78
|
+
"marginLeft": 8,
|
79
|
+
},
|
80
|
+
}
|
81
|
+
`;
|
82
|
+
|
83
|
+
exports[`RadioJSS matches the snapshot 1`] = `ShallowWrapper {}`;
|
@@ -0,0 +1,110 @@
|
|
1
|
+
"use strict";
|
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
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
11
|
+
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
|
+
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
|
+
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17
|
+
|
18
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
19
|
+
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
21
|
+
|
22
|
+
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); }
|
23
|
+
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
25
|
+
|
26
|
+
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); }; }
|
27
|
+
|
28
|
+
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); }
|
29
|
+
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
31
|
+
|
32
|
+
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; } }
|
33
|
+
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
35
|
+
|
36
|
+
/** Use this component in lists with pagination. It will display information about the current page and its elements. */
|
37
|
+
var RangeCounter = /*#__PURE__*/function (_React$Component) {
|
38
|
+
_inherits(RangeCounter, _React$Component);
|
39
|
+
|
40
|
+
var _super = _createSuper(RangeCounter);
|
41
|
+
|
42
|
+
function RangeCounter() {
|
43
|
+
_classCallCheck(this, RangeCounter);
|
44
|
+
|
45
|
+
return _super.apply(this, arguments);
|
46
|
+
}
|
47
|
+
|
48
|
+
_createClass(RangeCounter, [{
|
49
|
+
key: "numberWithCommas",
|
50
|
+
value: function numberWithCommas(num) {
|
51
|
+
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
52
|
+
}
|
53
|
+
}, {
|
54
|
+
key: "render",
|
55
|
+
value: function render() {
|
56
|
+
var _this$props = this.props,
|
57
|
+
classes = _this$props.classes,
|
58
|
+
min = _this$props.min,
|
59
|
+
max = _this$props.max,
|
60
|
+
symbol = _this$props.symbol,
|
61
|
+
total = _this$props.total,
|
62
|
+
type = _this$props.type,
|
63
|
+
of = _this$props.of,
|
64
|
+
id = _this$props.id,
|
65
|
+
className = _this$props.className,
|
66
|
+
style = _this$props.style;
|
67
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
68
|
+
className: "".concat(classes.cont).concat(className ? " ".concat(className) : ''),
|
69
|
+
id: id,
|
70
|
+
style: style
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
72
|
+
className: classes.num
|
73
|
+
}, this.numberWithCommas(min), symbol, this.numberWithCommas(max)), " ", of, " ", this.numberWithCommas(total), " ", type);
|
74
|
+
}
|
75
|
+
}]);
|
76
|
+
|
77
|
+
return RangeCounter;
|
78
|
+
}(_react["default"].Component);
|
79
|
+
|
80
|
+
RangeCounter.propTypes = {
|
81
|
+
classes: _propTypes["default"].object,
|
82
|
+
|
83
|
+
/** The number of the first item. */
|
84
|
+
min: _propTypes["default"].number,
|
85
|
+
|
86
|
+
/** The number of the last item. */
|
87
|
+
max: _propTypes["default"].number,
|
88
|
+
|
89
|
+
/** A symbol to separate the min and max numbers. */
|
90
|
+
symbol: _propTypes["default"].string,
|
91
|
+
|
92
|
+
/** A semantic separator between the min and max, with the total. */
|
93
|
+
of: _propTypes["default"].string,
|
94
|
+
|
95
|
+
/** The total number of elements on the whole list. */
|
96
|
+
total: _propTypes["default"].number,
|
97
|
+
|
98
|
+
/** The type of items that the list is showing. */
|
99
|
+
type: _propTypes["default"].string,
|
100
|
+
id: _propTypes["default"].string,
|
101
|
+
className: _propTypes["default"].string,
|
102
|
+
style: _propTypes["default"].object
|
103
|
+
};
|
104
|
+
RangeCounter.defaultProps = {
|
105
|
+
symbol: ' - ',
|
106
|
+
type: '',
|
107
|
+
of: '/'
|
108
|
+
};
|
109
|
+
var _default = RangeCounter;
|
110
|
+
exports["default"] = _default;
|