@wireapp/react-ui-kit 8.17.3 → 8.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -7
- package/src/Form/Button.js +8 -8
- package/src/Form/Button.js.map +1 -1
- package/src/Form/ButtonLink.js +7 -7
- package/src/Form/ButtonLink.js.map +1 -1
- package/src/Form/Checkbox.js +19 -19
- package/src/Form/Checkbox.js.map +1 -1
- package/src/Form/CodeInput.js +13 -9
- package/src/Form/CodeInput.js.map +1 -1
- package/src/Form/DropFileInput.js +15 -10
- package/src/Form/DropFileInput.js.map +1 -1
- package/src/Form/ErrorMessage.js +8 -8
- package/src/Form/ErrorMessage.js.map +1 -1
- package/src/Form/Form.js +3 -3
- package/src/Form/Form.js.map +1 -1
- package/src/Form/Input.js +16 -10
- package/src/Form/Input.js.map +1 -1
- package/src/Form/InputBlock.js +6 -27
- package/src/Form/InputBlock.js.map +1 -1
- package/src/Form/InputLabel.js +6 -5
- package/src/Form/InputLabel.js.map +1 -1
- package/src/Form/InputSubmitCombo.js +10 -10
- package/src/Form/InputSubmitCombo.js.map +1 -1
- package/src/Form/RangeInput.js +7 -6
- package/src/Form/RangeInput.js.map +1 -1
- package/src/Form/RangeInput.styles.js +3 -4
- package/src/Form/RangeInput.styles.js.map +1 -1
- package/src/Form/RoundIconButton.js +8 -7
- package/src/Form/RoundIconButton.js.map +1 -1
- package/src/Form/Select.js +8 -7
- package/src/Form/Select.js.map +1 -1
- package/src/Form/SelectComponents.js +9 -8
- package/src/Form/SelectComponents.js.map +1 -1
- package/src/Form/SelectStyles.js +2 -3
- package/src/Form/SelectStyles.js.map +1 -1
- package/src/Form/ShakeBox.js +8 -25
- package/src/Form/ShakeBox.js.map +1 -1
- package/src/Form/Switch.js +6 -6
- package/src/Form/Switch.js.map +1 -1
- package/src/Form/TextArea.js +5 -5
- package/src/Form/TextArea.js.map +1 -1
- package/src/Form/Tooltip.js +6 -5
- package/src/Form/Tooltip.js.map +1 -1
- package/src/GlobalStyle.js +3 -3
- package/src/GlobalStyle.js.map +1 -1
- package/src/Icon/AddPeopleIcon.js +4 -26
- package/src/Icon/AddPeopleIcon.js.map +1 -1
- package/src/Icon/ArchiveIcon.js +2 -24
- package/src/Icon/ArchiveIcon.js.map +1 -1
- package/src/Icon/ArrowDown.js +5 -24
- package/src/Icon/ArrowDown.js.map +1 -1
- package/src/Icon/ArrowIcon.js +5 -5
- package/src/Icon/ArrowIcon.js.map +1 -1
- package/src/Icon/AttachmentIcon.js +2 -24
- package/src/Icon/AttachmentIcon.js.map +1 -1
- package/src/Icon/AudioVideoIcon.js +2 -24
- package/src/Icon/AudioVideoIcon.js.map +1 -1
- package/src/Icon/BlockIcon.js +2 -24
- package/src/Icon/BlockIcon.js.map +1 -1
- package/src/Icon/Brand/AndroidIcon.js +2 -24
- package/src/Icon/Brand/AndroidIcon.js.map +1 -1
- package/src/Icon/Brand/AppleIcon.js +2 -24
- package/src/Icon/Brand/AppleIcon.js.map +1 -1
- package/src/Icon/Brand/ChromeIcon.js +2 -24
- package/src/Icon/Brand/ChromeIcon.js.map +1 -1
- package/src/Icon/Brand/FacebookIcon.js +2 -24
- package/src/Icon/Brand/FacebookIcon.js.map +1 -1
- package/src/Icon/Brand/GitHubIcon.js +2 -24
- package/src/Icon/Brand/GitHubIcon.js.map +1 -1
- package/src/Icon/Brand/LinkedInIcon.js +2 -24
- package/src/Icon/Brand/LinkedInIcon.js.map +1 -1
- package/src/Icon/Brand/LinuxIcon.js +2 -24
- package/src/Icon/Brand/LinuxIcon.js.map +1 -1
- package/src/Icon/Brand/MicrosoftIcon.js +2 -24
- package/src/Icon/Brand/MicrosoftIcon.js.map +1 -1
- package/src/Icon/Brand/TwitterIcon.js +2 -24
- package/src/Icon/Brand/TwitterIcon.js.map +1 -1
- package/src/Icon/CallIcon.js +2 -24
- package/src/Icon/CallIcon.js.map +1 -1
- package/src/Icon/CamIcon.js +2 -24
- package/src/Icon/CamIcon.js.map +1 -1
- package/src/Icon/CameraIcon.js +4 -26
- package/src/Icon/CameraIcon.js.map +1 -1
- package/src/Icon/CheckIcon.js +2 -24
- package/src/Icon/CheckIcon.js.map +1 -1
- package/src/Icon/CheckRoundIcon.js +2 -24
- package/src/Icon/CheckRoundIcon.js.map +1 -1
- package/src/Icon/ChevronIcon.js +5 -5
- package/src/Icon/ChevronIcon.js.map +1 -1
- package/src/Icon/CloseIcon.js +2 -24
- package/src/Icon/CloseIcon.js.map +1 -1
- package/src/Icon/CopyIcon.js +2 -24
- package/src/Icon/CopyIcon.js.map +1 -1
- package/src/Icon/DeviceIcon.js +2 -24
- package/src/Icon/DeviceIcon.js.map +1 -1
- package/src/Icon/DownloadIcon.js +2 -24
- package/src/Icon/DownloadIcon.js.map +1 -1
- package/src/Icon/EditDocumentIcon.js +4 -26
- package/src/Icon/EditDocumentIcon.js.map +1 -1
- package/src/Icon/EditIcon.js +2 -24
- package/src/Icon/EditIcon.js.map +1 -1
- package/src/Icon/EnterIcon.js +2 -24
- package/src/Icon/EnterIcon.js.map +1 -1
- package/src/Icon/ErrorIcon.js +2 -24
- package/src/Icon/ErrorIcon.js.map +1 -1
- package/src/Icon/FileIcon.js +2 -24
- package/src/Icon/FileIcon.js.map +1 -1
- package/src/Icon/GifIcon.js +2 -24
- package/src/Icon/GifIcon.js.map +1 -1
- package/src/Icon/GridIcon.js +4 -26
- package/src/Icon/GridIcon.js.map +1 -1
- package/src/Icon/GroupIcon.js +2 -24
- package/src/Icon/GroupIcon.js.map +1 -1
- package/src/Icon/HangupIcon.js +2 -24
- package/src/Icon/HangupIcon.js.map +1 -1
- package/src/Icon/HideIcon.js +2 -24
- package/src/Icon/HideIcon.js.map +1 -1
- package/src/Icon/ImageIcon.js +2 -24
- package/src/Icon/ImageIcon.js.map +1 -1
- package/src/Icon/InfoIcon.js +2 -24
- package/src/Icon/InfoIcon.js.map +1 -1
- package/src/Icon/InviteIcon.js +2 -24
- package/src/Icon/InviteIcon.js.map +1 -1
- package/src/Icon/LeaveIcon.js +2 -24
- package/src/Icon/LeaveIcon.js.map +1 -1
- package/src/Icon/LinkIcon.js +4 -26
- package/src/Icon/LinkIcon.js.map +1 -1
- package/src/Icon/ListIcon.js +2 -24
- package/src/Icon/ListIcon.js.map +1 -1
- package/src/Icon/LockIcon.js +2 -24
- package/src/Icon/LockIcon.js.map +1 -1
- package/src/Icon/MessageIcon.js +2 -24
- package/src/Icon/MessageIcon.js.map +1 -1
- package/src/Icon/MinusIcon.js +2 -24
- package/src/Icon/MinusIcon.js.map +1 -1
- package/src/Icon/MoreIcon.js +2 -24
- package/src/Icon/MoreIcon.js.map +1 -1
- package/src/Icon/MuteIcon.js +2 -24
- package/src/Icon/MuteIcon.js.map +1 -1
- package/src/Icon/NotificationIcon.js +2 -24
- package/src/Icon/NotificationIcon.js.map +1 -1
- package/src/Icon/NotificationOffIcon.js +2 -24
- package/src/Icon/NotificationOffIcon.js.map +1 -1
- package/src/Icon/OptionsIcon.js +2 -24
- package/src/Icon/OptionsIcon.js.map +1 -1
- package/src/Icon/PeopleIcon.js +4 -26
- package/src/Icon/PeopleIcon.js.map +1 -1
- package/src/Icon/PingIcon.js +2 -24
- package/src/Icon/PingIcon.js.map +1 -1
- package/src/Icon/PlaneIcon.js +2 -24
- package/src/Icon/PlaneIcon.js.map +1 -1
- package/src/Icon/PlusIcon.js +2 -24
- package/src/Icon/PlusIcon.js.map +1 -1
- package/src/Icon/ProfileIcon.js +2 -24
- package/src/Icon/ProfileIcon.js.map +1 -1
- package/src/Icon/RecordBoldIcon.js +5 -5
- package/src/Icon/RecordBoldIcon.js.map +1 -1
- package/src/Icon/RecordIcon.js +2 -24
- package/src/Icon/RecordIcon.js.map +1 -1
- package/src/Icon/RecordPendingIcon.js +2 -24
- package/src/Icon/RecordPendingIcon.js.map +1 -1
- package/src/Icon/ReloadIcon.js +2 -24
- package/src/Icon/ReloadIcon.js.map +1 -1
- package/src/Icon/SVGIcon.js +6 -5
- package/src/Icon/SVGIcon.js.map +1 -1
- package/src/Icon/ScreenshareIcon.js +2 -24
- package/src/Icon/ScreenshareIcon.js.map +1 -1
- package/src/Icon/SearchIcon.js +2 -24
- package/src/Icon/SearchIcon.js.map +1 -1
- package/src/Icon/ServicesIcon.js +2 -24
- package/src/Icon/ServicesIcon.js.map +1 -1
- package/src/Icon/SettingsIcon.js +2 -24
- package/src/Icon/SettingsIcon.js.map +1 -1
- package/src/Icon/ShowIcon.js +2 -24
- package/src/Icon/ShowIcon.js.map +1 -1
- package/src/Icon/SignIcon.js +2 -24
- package/src/Icon/SignIcon.js.map +1 -1
- package/src/Icon/SpeakerIcon.js +2 -24
- package/src/Icon/SpeakerIcon.js.map +1 -1
- package/src/Icon/SupportIcon.js +2 -24
- package/src/Icon/SupportIcon.js.map +1 -1
- package/src/Icon/TeamIcon.js +2 -24
- package/src/Icon/TeamIcon.js.map +1 -1
- package/src/Icon/TimedIcon.js +2 -24
- package/src/Icon/TimedIcon.js.map +1 -1
- package/src/Icon/TrashCrossIcon.js +2 -24
- package/src/Icon/TrashCrossIcon.js.map +1 -1
- package/src/Icon/TrashIcon.js +2 -24
- package/src/Icon/TrashIcon.js.map +1 -1
- package/src/Icon/TriangleIcon.js +5 -5
- package/src/Icon/TriangleIcon.js.map +1 -1
- package/src/Icon/UploadIcon.js +2 -24
- package/src/Icon/UploadIcon.js.map +1 -1
- package/src/Icon/WireIcon.js +2 -24
- package/src/Icon/WireIcon.js.map +1 -1
- package/src/Identity/Animation.js +18 -17
- package/src/Identity/Animation.js.map +1 -1
- package/src/Identity/Avatar.js +10 -27
- package/src/Identity/Avatar.js.map +1 -1
- package/src/Identity/AvatarGrid.js +8 -7
- package/src/Identity/AvatarGrid.js.map +1 -1
- package/src/Identity/Logo.js +7 -7
- package/src/Identity/Logo.js.map +1 -1
- package/src/Identity/colors-v2.js +2 -3
- package/src/Identity/colors-v2.js.map +1 -1
- package/src/Identity/colors.js +11 -6
- package/src/Identity/colors.js.map +1 -1
- package/src/Identity/motions.js +6 -7
- package/src/Identity/motions.js.map +1 -1
- package/src/Layout/Box.js +3 -24
- package/src/Layout/Box.js.map +1 -1
- package/src/Layout/Column.js +6 -27
- package/src/Layout/Column.js.map +1 -1
- package/src/Layout/Container.js +10 -31
- package/src/Layout/Container.js.map +1 -1
- package/src/Layout/Content.js +3 -24
- package/src/Layout/Content.js.map +1 -1
- package/src/Layout/FlexBox.js +3 -24
- package/src/Layout/FlexBox.js.map +1 -1
- package/src/Layout/Footer.js +1 -1
- package/src/Layout/Footer.js.map +1 -1
- package/src/Layout/Header.js +3 -24
- package/src/Layout/Header.js.map +1 -1
- package/src/Layout/MatchMedia.js +17 -35
- package/src/Layout/MatchMedia.js.map +1 -1
- package/src/Layout/Spacer.js +1 -1
- package/src/Layout/Spacer.js.map +1 -1
- package/src/Layout/StyledApp.js +6 -5
- package/src/Layout/StyledApp.js.map +1 -1
- package/src/Layout/Theme.js +7 -7
- package/src/Layout/Theme.js.map +1 -1
- package/src/Layout/headerMenu/HeaderMenu.js +13 -8
- package/src/Layout/headerMenu/HeaderMenu.js.map +1 -1
- package/src/Layout/headerMenu/HeaderSubMenu.js +10 -9
- package/src/Layout/headerMenu/HeaderSubMenu.js.map +1 -1
- package/src/Layout/headerMenu/MenuContent.js +4 -5
- package/src/Layout/headerMenu/MenuContent.js.map +1 -1
- package/src/Layout/headerMenu/MenuItems.js +5 -26
- package/src/Layout/headerMenu/MenuItems.js.map +1 -1
- package/src/Layout/headerMenu/MenuLink.js +10 -10
- package/src/Layout/headerMenu/MenuLink.js.map +1 -1
- package/src/Layout/headerMenu/MenuOpenButton.js +6 -27
- package/src/Layout/headerMenu/MenuOpenButton.js.map +1 -1
- package/src/Layout/headerMenu/MenuScrollableItems.js +5 -26
- package/src/Layout/headerMenu/MenuScrollableItems.js.map +1 -1
- package/src/Layout/headerMenu/MenuSubLink.js +6 -7
- package/src/Layout/headerMenu/MenuSubLink.js.map +1 -1
- package/src/Menu/MenuModal.js +14 -13
- package/src/Menu/MenuModal.js.map +1 -1
- package/src/Menu/TabBar.js +13 -12
- package/src/Menu/TabBar.js.map +1 -1
- package/src/Misc/ButtonGroup.js +7 -7
- package/src/Misc/ButtonGroup.js.map +1 -1
- package/src/Misc/IconButton.js +7 -7
- package/src/Misc/IconButton.js.map +1 -1
- package/src/Misc/IsInViewport.js +13 -8
- package/src/Misc/IsInViewport.js.map +1 -1
- package/src/Misc/Loading.js +8 -7
- package/src/Misc/Loading.js.map +1 -1
- package/src/Misc/Pagination.js +6 -5
- package/src/Misc/Pagination.js.map +1 -1
- package/src/Misc/Pill.js +7 -7
- package/src/Misc/Pill.js.map +1 -1
- package/src/Misc/childrenWithDefaultProps.js +3 -3
- package/src/Misc/childrenWithDefaultProps.js.map +1 -1
- package/src/Misc/useTimeout.js +7 -22
- package/src/Misc/useTimeout.js.map +1 -1
- package/src/Modal/Modal.js +13 -12
- package/src/Modal/Modal.js.map +1 -1
- package/src/Modal/Overlay.js +11 -10
- package/src/Modal/Overlay.js.map +1 -1
- package/src/Text/Heading.js +16 -16
- package/src/Text/Heading.js.map +1 -1
- package/src/Text/Label.js +9 -9
- package/src/Text/Label.js.map +1 -1
- package/src/Text/Line.js +3 -24
- package/src/Text/Line.js.map +1 -1
- package/src/Text/Link.js +8 -8
- package/src/Text/Link.js.map +1 -1
- package/src/Text/Paragraph.js +10 -10
- package/src/Text/Paragraph.js.map +1 -1
- package/src/Text/Text.js +8 -29
- package/src/Text/Text.js.map +1 -1
- package/src/Text/TextLink.js +7 -7
- package/src/Text/TextLink.js.map +1 -1
- package/src/Text/Title.js +7 -7
- package/src/Text/Title.js.map +1 -1
- package/src/mediaQueries.js +11 -7
- package/src/mediaQueries.js.map +1 -1
- package/src/util.js +10 -6
- package/src/util.js.map +1 -1
package/src/Layout/Column.js
CHANGED
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.filterColumnsProps = exports.Columns = exports.Column = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
7
|
var _react = _interopRequireDefault(require("react"));
|
|
11
8
|
var _react2 = require("@emotion/react");
|
|
12
9
|
var _mediaQueries = require("../mediaQueries");
|
|
13
10
|
var _util = require("../util");
|
|
14
11
|
var _sizes = require("./sizes");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* This program is free software: you can redistribute it and/or modify
|
|
20
|
-
* it under the terms of the GNU General Public License as published by
|
|
21
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
22
|
-
* (at your option) any later version.
|
|
23
|
-
*
|
|
24
|
-
* This program is distributed in the hope that it will be useful,
|
|
25
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
27
|
-
* GNU General Public License for more details.
|
|
28
|
-
*
|
|
29
|
-
* You should have received a copy of the GNU General Public License
|
|
30
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/** @jsx jsx */
|
|
35
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
14
|
+
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; }
|
|
36
15
|
var filterColumnsProps = function filterColumnsProps(props) {
|
|
37
16
|
return (0, _util.filterProps)(props, ['query']);
|
|
38
17
|
};
|
|
@@ -40,7 +19,7 @@ exports.filterColumnsProps = filterColumnsProps;
|
|
|
40
19
|
var columnsStyle = function columnsStyle(_ref) {
|
|
41
20
|
var _ref$query = _ref.query,
|
|
42
21
|
query = _ref$query === void 0 ? _mediaQueries.QueryKeys.MOBILE : _ref$query;
|
|
43
|
-
return (
|
|
22
|
+
return _defineProperty({
|
|
44
23
|
display: 'flex',
|
|
45
24
|
marginLeft: "-".concat(_sizes.GUTTER, "px")
|
|
46
25
|
}, _mediaQueries.media[query], {
|
|
@@ -48,7 +27,7 @@ var columnsStyle = function columnsStyle(_ref) {
|
|
|
48
27
|
});
|
|
49
28
|
};
|
|
50
29
|
var Columns = function Columns(props) {
|
|
51
|
-
return (0, _react2.jsx)("div", (
|
|
30
|
+
return (0, _react2.jsx)("div", _extends({
|
|
52
31
|
css: columnsStyle(props)
|
|
53
32
|
}, filterColumnsProps(props)));
|
|
54
33
|
};
|
|
@@ -63,7 +42,7 @@ var columnStyle = function columnStyle(props) {
|
|
|
63
42
|
};
|
|
64
43
|
};
|
|
65
44
|
var Column = function Column(props) {
|
|
66
|
-
return (0, _react2.jsx)("div", (
|
|
45
|
+
return (0, _react2.jsx)("div", _extends({
|
|
67
46
|
css: columnStyle(props)
|
|
68
47
|
}, props));
|
|
69
48
|
};
|
package/src/Layout/Column.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Column.js","names":["filterColumnsProps","props","filterProps","columnsStyle","query","QueryKeys","MOBILE","display","marginLeft","GUTTER","media","flexDirection","Columns","columnStyle","flexBasis","flexGrow","flexShrink","Column"],"sources":["Column.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport React from 'react';\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {QueryKeys, media} from '../mediaQueries';\nimport {filterProps} from '../util';\nimport {GUTTER} from './sizes';\n\nexport interface ColumnsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n query?: QueryKeys;\n}\n\nexport const filterColumnsProps = (props: ColumnsProps) => {\n return filterProps(props, ['query']);\n};\n\nconst columnsStyle: <T>(props: ColumnsProps<T>) => CSSObject = ({query = QueryKeys.MOBILE}) => ({\n display: 'flex',\n marginLeft: `-${GUTTER}px`,\n [media[query]]: {flexDirection: 'column'},\n});\n\nexport const Columns = (props: ColumnsProps) => <div css={columnsStyle(props)} {...filterColumnsProps(props)} />;\n\nexport type ColumnProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nconst columnStyle: <T>(props: ColumnProps<T>) => CSSObject = props => ({\n display: 'block',\n flexBasis: '0',\n flexGrow: 1,\n flexShrink: 1,\n marginLeft: `${GUTTER}px`,\n});\n\nexport const Column = (props: ColumnProps) => <div css={columnStyle(props)} {...props} />;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Column.js","names":["filterColumnsProps","props","filterProps","columnsStyle","query","QueryKeys","MOBILE","display","marginLeft","GUTTER","media","flexDirection","Columns","columnStyle","flexBasis","flexGrow","flexShrink","Column"],"sources":["Column.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport React from 'react';\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {QueryKeys, media} from '../mediaQueries';\nimport {filterProps} from '../util';\nimport {GUTTER} from './sizes';\n\nexport interface ColumnsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n query?: QueryKeys;\n}\n\nexport const filterColumnsProps = (props: ColumnsProps) => {\n return filterProps(props, ['query']);\n};\n\nconst columnsStyle: <T>(props: ColumnsProps<T>) => CSSObject = ({query = QueryKeys.MOBILE}) => ({\n display: 'flex',\n marginLeft: `-${GUTTER}px`,\n [media[query]]: {flexDirection: 'column'},\n});\n\nexport const Columns = (props: ColumnsProps) => <div css={columnsStyle(props)} {...filterColumnsProps(props)} />;\n\nexport type ColumnProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nconst columnStyle: <T>(props: ColumnProps<T>) => CSSObject = props => ({\n display: 'block',\n flexBasis: '0',\n flexGrow: 1,\n flexShrink: 1,\n marginLeft: `${GUTTER}px`,\n});\n\nexport const Column = (props: ColumnProps) => <div css={columnStyle(props)} {...props} />;\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AACA;AACA;AAA+B;AAAA;AAAA;AAMxB,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB,CAAIC,KAAmB,EAAK;EACzD,OAAO,IAAAC,iBAAW,EAACD,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAAC;AAEF,IAAME,YAAsD,GAAG,SAAzDA,YAAsD;EAAA,sBAAKC,KAAK;IAALA,KAAK,2BAAGC,uBAAS,CAACC,MAAM;EAAA;IACvFC,OAAO,EAAE,MAAM;IACfC,UAAU,aAAMC,aAAM;EAAI,GACzBC,mBAAK,CAACN,KAAK,CAAC,EAAG;IAACO,aAAa,EAAE;EAAQ,CAAC;AAAA,CACzC;AAEK,IAAMC,OAAO,GAAG,SAAVA,OAAO,CAAIX,KAAmB;EAAA,OAAK;IAAK,GAAG,EAAEE,YAAY,CAACF,KAAK;EAAE,GAAKD,kBAAkB,CAACC,KAAK,CAAC,EAAI;AAAA;AAAC;AAIjH,IAAMY,WAAoD,GAAG,SAAvDA,WAAoD,CAAGZ,KAAK;EAAA,OAAK;IACrEM,OAAO,EAAE,OAAO;IAChBO,SAAS,EAAE,GAAG;IACdC,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE,CAAC;IACbR,UAAU,YAAKC,aAAM;EACvB,CAAC;AAAA,CAAC;AAEK,IAAMQ,MAAM,GAAG,SAATA,MAAM,CAAIhB,KAAkB;EAAA,OAAK;IAAK,GAAG,EAAEY,WAAW,CAACZ,KAAK;EAAE,GAAKA,KAAK,EAAI;AAAA;AAAC"}
|
package/src/Layout/Container.js
CHANGED
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.ContainerXXS = exports.ContainerXS = exports.ContainerSM = exports.ContainerMD = exports.ContainerLG = exports.Container = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
7
|
var _react = require("@emotion/react");
|
|
11
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
12
9
|
var _mediaQueries = require("../mediaQueries");
|
|
13
10
|
var _util = require("../util");
|
|
14
11
|
var _sizes = require("./sizes");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* This program is free software: you can redistribute it and/or modify
|
|
20
|
-
* it under the terms of the GNU General Public License as published by
|
|
21
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
22
|
-
* (at your option) any later version.
|
|
23
|
-
*
|
|
24
|
-
* This program is distributed in the hope that it will be useful,
|
|
25
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
27
|
-
* GNU General Public License for more details.
|
|
28
|
-
*
|
|
29
|
-
* You should have received a copy of the GNU General Public License
|
|
30
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/** @jsx jsx */
|
|
35
|
-
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
14
|
+
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; }
|
|
36
15
|
var LEVEL = {
|
|
37
16
|
lg: _sizes.WIDTH.DESKTOP_MAX,
|
|
38
17
|
md: _sizes.WIDTH.TABLET_MAX,
|
|
@@ -47,7 +26,7 @@ var containerStyle = function containerStyle(_ref) {
|
|
|
47
26
|
level = _ref$level === void 0 ? undefined : _ref$level,
|
|
48
27
|
_ref$verticalCenter = _ref.verticalCenter,
|
|
49
28
|
verticalCenter = _ref$verticalCenter === void 0 ? false : _ref$verticalCenter;
|
|
50
|
-
return (
|
|
29
|
+
return _defineProperty({
|
|
51
30
|
margin: verticalCenter ? 'auto' : '0 auto',
|
|
52
31
|
maxWidth: level ? "".concat(LEVEL[level], "px") : undefined,
|
|
53
32
|
position: 'relative',
|
|
@@ -62,42 +41,42 @@ var filterContainerProps = function filterContainerProps(props) {
|
|
|
62
41
|
return (0, _util.filterProps)(props, ['centerText', 'level', 'verticalCenter']);
|
|
63
42
|
};
|
|
64
43
|
var Container = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
65
|
-
return (0, _react.jsx)("div", (
|
|
44
|
+
return (0, _react.jsx)("div", _extends({
|
|
66
45
|
ref: ref,
|
|
67
46
|
css: containerStyle(props)
|
|
68
47
|
}, filterContainerProps(props)));
|
|
69
48
|
});
|
|
70
49
|
exports.Container = Container;
|
|
71
50
|
var ContainerLG = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
72
|
-
return (0, _react.jsx)(Container, (
|
|
51
|
+
return (0, _react.jsx)(Container, _extends({
|
|
73
52
|
ref: ref,
|
|
74
53
|
level: 'lg'
|
|
75
54
|
}, props));
|
|
76
55
|
});
|
|
77
56
|
exports.ContainerLG = ContainerLG;
|
|
78
57
|
var ContainerMD = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
79
|
-
return (0, _react.jsx)(Container, (
|
|
58
|
+
return (0, _react.jsx)(Container, _extends({
|
|
80
59
|
ref: ref,
|
|
81
60
|
level: 'md'
|
|
82
61
|
}, props));
|
|
83
62
|
});
|
|
84
63
|
exports.ContainerMD = ContainerMD;
|
|
85
64
|
var ContainerSM = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
86
|
-
return (0, _react.jsx)(Container, (
|
|
65
|
+
return (0, _react.jsx)(Container, _extends({
|
|
87
66
|
ref: ref,
|
|
88
67
|
level: 'sm'
|
|
89
68
|
}, props));
|
|
90
69
|
});
|
|
91
70
|
exports.ContainerSM = ContainerSM;
|
|
92
71
|
var ContainerXS = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
93
|
-
return (0, _react.jsx)(Container, (
|
|
72
|
+
return (0, _react.jsx)(Container, _extends({
|
|
94
73
|
ref: ref,
|
|
95
74
|
level: 'xs'
|
|
96
75
|
}, props));
|
|
97
76
|
});
|
|
98
77
|
exports.ContainerXS = ContainerXS;
|
|
99
78
|
var ContainerXXS = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
100
|
-
return (0, _react.jsx)(Container, (
|
|
79
|
+
return (0, _react.jsx)(Container, _extends({
|
|
101
80
|
ref: ref,
|
|
102
81
|
level: 'xxs'
|
|
103
82
|
}, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","names":["LEVEL","lg","WIDTH","DESKTOP_MAX","md","TABLET_MAX","sm","TABLET_MIN","xs","MOBILE","xxs","TINY","containerStyle","centerText","level","undefined","verticalCenter","margin","maxWidth","position","textAlign","width","media","QueryKeys","DESKTOP","padding","DESKTOP_MIN","GUTTER","filterContainerProps","props","filterProps","Container","React","forwardRef","ref","ContainerLG","ContainerMD","ContainerSM","ContainerXS","ContainerXXS"],"sources":["Container.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport React from 'react';\n\nimport {QueryKeys, media} from '../mediaQueries';\nimport {filterProps} from '../util';\nimport {GUTTER, WIDTH} from './sizes';\n\nexport interface ContainerProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n centerText?: boolean;\n level?: keyof Level;\n verticalCenter?: boolean;\n}\n\nexport interface Level {\n lg: number;\n md: number;\n sm: number;\n xs: number;\n xxs: number;\n}\n\nconst LEVEL: Level = {\n lg: WIDTH.DESKTOP_MAX,\n md: WIDTH.TABLET_MAX,\n sm: WIDTH.TABLET_MIN,\n xs: WIDTH.MOBILE,\n xxs: WIDTH.TINY,\n};\n\nconst containerStyle: <T>(props: ContainerProps<T>) => CSSObject = ({\n centerText = false,\n level = undefined,\n verticalCenter = false,\n}) => ({\n margin: verticalCenter ? 'auto' : '0 auto',\n maxWidth: level ? `${LEVEL[level]}px` : undefined,\n position: 'relative',\n textAlign: centerText ? 'center' : 'left',\n width: '100%',\n [media[QueryKeys.DESKTOP]]: level\n ? undefined\n : {\n padding: 0,\n width: `${WIDTH.DESKTOP_MIN - GUTTER * 2}px`,\n },\n});\n\nconst filterContainerProps = (props: ContainerProps) => filterProps(props, ['centerText', 'level', 'verticalCenter']);\n\nexport const Container: React.FC<ContainerProps> = React.forwardRef<HTMLDivElement, ContainerProps>((props, ref) => (\n <div ref={ref} css={containerStyle(props)} {...filterContainerProps(props)} />\n));\n\nexport type LevelContainerProps = Omit<ContainerProps, 'level'>;\n\nexport const ContainerLG = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'lg'} {...props} />\n));\nexport const ContainerMD = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'md'} {...props} />\n));\nexport const ContainerSM = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'sm'} {...props} />\n));\nexport const ContainerXS = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'xs'} {...props} />\n));\nexport const ContainerXXS = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'xxs'} {...props} />\n));\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Container.js","names":["LEVEL","lg","WIDTH","DESKTOP_MAX","md","TABLET_MAX","sm","TABLET_MIN","xs","MOBILE","xxs","TINY","containerStyle","centerText","level","undefined","verticalCenter","margin","maxWidth","position","textAlign","width","media","QueryKeys","DESKTOP","padding","DESKTOP_MIN","GUTTER","filterContainerProps","props","filterProps","Container","React","forwardRef","ref","ContainerLG","ContainerMD","ContainerSM","ContainerXS","ContainerXXS"],"sources":["Container.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport React from 'react';\n\nimport {QueryKeys, media} from '../mediaQueries';\nimport {filterProps} from '../util';\nimport {GUTTER, WIDTH} from './sizes';\n\nexport interface ContainerProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n centerText?: boolean;\n level?: keyof Level;\n verticalCenter?: boolean;\n}\n\nexport interface Level {\n lg: number;\n md: number;\n sm: number;\n xs: number;\n xxs: number;\n}\n\nconst LEVEL: Level = {\n lg: WIDTH.DESKTOP_MAX,\n md: WIDTH.TABLET_MAX,\n sm: WIDTH.TABLET_MIN,\n xs: WIDTH.MOBILE,\n xxs: WIDTH.TINY,\n};\n\nconst containerStyle: <T>(props: ContainerProps<T>) => CSSObject = ({\n centerText = false,\n level = undefined,\n verticalCenter = false,\n}) => ({\n margin: verticalCenter ? 'auto' : '0 auto',\n maxWidth: level ? `${LEVEL[level]}px` : undefined,\n position: 'relative',\n textAlign: centerText ? 'center' : 'left',\n width: '100%',\n [media[QueryKeys.DESKTOP]]: level\n ? undefined\n : {\n padding: 0,\n width: `${WIDTH.DESKTOP_MIN - GUTTER * 2}px`,\n },\n});\n\nconst filterContainerProps = (props: ContainerProps) => filterProps(props, ['centerText', 'level', 'verticalCenter']);\n\nexport const Container: React.FC<ContainerProps> = React.forwardRef<HTMLDivElement, ContainerProps>((props, ref) => (\n <div ref={ref} css={containerStyle(props)} {...filterContainerProps(props)} />\n));\n\nexport type LevelContainerProps = Omit<ContainerProps, 'level'>;\n\nexport const ContainerLG = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'lg'} {...props} />\n));\nexport const ContainerMD = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'md'} {...props} />\n));\nexport const ContainerSM = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'sm'} {...props} />\n));\nexport const ContainerXS = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'xs'} {...props} />\n));\nexport const ContainerXXS = React.forwardRef<HTMLDivElement, LevelContainerProps>((props, ref) => (\n <Container ref={ref} level={'xxs'} {...props} />\n));\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AACA;AACA;AAAsC;AAAA;AAAA;AAgBtC,IAAMA,KAAY,GAAG;EACnBC,EAAE,EAAEC,YAAK,CAACC,WAAW;EACrBC,EAAE,EAAEF,YAAK,CAACG,UAAU;EACpBC,EAAE,EAAEJ,YAAK,CAACK,UAAU;EACpBC,EAAE,EAAEN,YAAK,CAACO,MAAM;EAChBC,GAAG,EAAER,YAAK,CAACS;AACb,CAAC;AAED,IAAMC,cAA0D,GAAG,SAA7DA,cAA0D;EAAA,2BAC9DC,UAAU;IAAVA,UAAU,gCAAG,KAAK;IAAA,kBAClBC,KAAK;IAALA,KAAK,2BAAGC,SAAS;IAAA,2BACjBC,cAAc;IAAdA,cAAc,oCAAG,KAAK;EAAA;IAEtBC,MAAM,EAAED,cAAc,GAAG,MAAM,GAAG,QAAQ;IAC1CE,QAAQ,EAAEJ,KAAK,aAAMd,KAAK,CAACc,KAAK,CAAC,UAAOC,SAAS;IACjDI,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAEP,UAAU,GAAG,QAAQ,GAAG,MAAM;IACzCQ,KAAK,EAAE;EAAM,GACZC,mBAAK,CAACC,uBAAS,CAACC,OAAO,CAAC,EAAGV,KAAK,GAC7BC,SAAS,GACT;IACEU,OAAO,EAAE,CAAC;IACVJ,KAAK,YAAKnB,YAAK,CAACwB,WAAW,GAAGC,aAAM,GAAG,CAAC;EAC1C,CAAC;AAAA,CACL;AAEF,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoB,CAAIC,KAAqB;EAAA,OAAK,IAAAC,iBAAW,EAACD,KAAK,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAAA;AAE9G,IAAME,SAAmC,gBAAGC,kBAAK,CAACC,UAAU,CAAiC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC7G;IAAK,GAAG,EAAEA,GAAI;IAAC,GAAG,EAAEtB,cAAc,CAACiB,KAAK;EAAE,GAAKD,oBAAoB,CAACC,KAAK,CAAC,EAAI;AAAA,CAC/E,CAAC;AAAC;AAII,IAAMM,WAAW,gBAAGH,kBAAK,CAACC,UAAU,CAAsC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC1F,gBAAC,SAAS;IAAC,GAAG,EAAEA,GAAI;IAAC,KAAK,EAAE;EAAK,GAAKL,KAAK,EAAI;AAAA,CAChD,CAAC;AAAC;AACI,IAAMO,WAAW,gBAAGJ,kBAAK,CAACC,UAAU,CAAsC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC1F,gBAAC,SAAS;IAAC,GAAG,EAAEA,GAAI;IAAC,KAAK,EAAE;EAAK,GAAKL,KAAK,EAAI;AAAA,CAChD,CAAC;AAAC;AACI,IAAMQ,WAAW,gBAAGL,kBAAK,CAACC,UAAU,CAAsC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC1F,gBAAC,SAAS;IAAC,GAAG,EAAEA,GAAI;IAAC,KAAK,EAAE;EAAK,GAAKL,KAAK,EAAI;AAAA,CAChD,CAAC;AAAC;AACI,IAAMS,WAAW,gBAAGN,kBAAK,CAACC,UAAU,CAAsC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC1F,gBAAC,SAAS;IAAC,GAAG,EAAEA,GAAI;IAAC,KAAK,EAAE;EAAK,GAAKL,KAAK,EAAI;AAAA,CAChD,CAAC;AAAC;AACI,IAAMU,YAAY,gBAAGP,kBAAK,CAACC,UAAU,CAAsC,UAACJ,KAAK,EAAEK,GAAG;EAAA,OAC3F,gBAAC,SAAS;IAAC,GAAG,EAAEA,GAAI;IAAC,KAAK,EAAE;EAAM,GAAKL,KAAK,EAAI;AAAA,CACjD,CAAC;AAAC"}
|
package/src/Layout/Content.js
CHANGED
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.contentStyle = exports.Content = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
7
|
var _react = _interopRequireDefault(require("react"));
|
|
10
8
|
var _react2 = require("@emotion/react");
|
|
11
9
|
var _sizes = require("./sizes");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
15
|
-
*
|
|
16
|
-
* This program is free software: you can redistribute it and/or modify
|
|
17
|
-
* it under the terms of the GNU General Public License as published by
|
|
18
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
19
|
-
* (at your option) any later version.
|
|
20
|
-
*
|
|
21
|
-
* This program is distributed in the hope that it will be useful,
|
|
22
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
23
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
24
|
-
* GNU General Public License for more details.
|
|
25
|
-
*
|
|
26
|
-
* You should have received a copy of the GNU General Public License
|
|
27
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/** @jsx jsx */
|
|
32
|
-
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
33
12
|
var contentStyle = function contentStyle(props) {
|
|
34
13
|
return {
|
|
35
14
|
display: 'flex',
|
|
@@ -40,7 +19,7 @@ var contentStyle = function contentStyle(props) {
|
|
|
40
19
|
};
|
|
41
20
|
exports.contentStyle = contentStyle;
|
|
42
21
|
var Content = function Content(props) {
|
|
43
|
-
return (0, _react2.jsx)("div", (
|
|
22
|
+
return (0, _react2.jsx)("div", _extends({
|
|
44
23
|
css: contentStyle(props)
|
|
45
24
|
}, props));
|
|
46
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","names":["contentStyle","props","display","flexDirection","flexGrow","padding","GUTTER","Content"],"sources":["Content.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport React from 'react';\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {GUTTER} from './sizes';\n\nexport type ContentProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nexport const contentStyle: <T>(props: ContentProps<T>) => CSSObject = props => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n padding: `0 ${GUTTER}px`,\n});\n\nexport const Content = (props: ContentProps) => <div css={contentStyle(props)} {...props} />;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.js","names":["contentStyle","props","display","flexDirection","flexGrow","padding","GUTTER","Content"],"sources":["Content.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport React from 'react';\nimport {CSSObject, jsx} from '@emotion/react';\n\nimport {GUTTER} from './sizes';\n\nexport type ContentProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nexport const contentStyle: <T>(props: ContentProps<T>) => CSSObject = props => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n padding: `0 ${GUTTER}px`,\n});\n\nexport const Content = (props: ContentProps) => <div css={contentStyle(props)} {...props} />;\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AAA+B;AAAA;AAIxB,IAAMA,YAAsD,GAAG,SAAzDA,YAAsD,CAAGC,KAAK;EAAA,OAAK;IAC9EC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBC,QAAQ,EAAE,CAAC;IACXC,OAAO,cAAOC,aAAM;EACtB,CAAC;AAAA,CAAC;AAAC;AAEI,IAAMC,OAAO,GAAG,SAAVA,OAAO,CAAIN,KAAmB;EAAA,OAAK;IAAK,GAAG,EAAED,YAAY,CAACC,KAAK;EAAE,GAAKA,KAAK,EAAI;AAAA;AAAC"}
|
package/src/Layout/FlexBox.js
CHANGED
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.flexBoxStyle = exports.filterFlexBoxProps = exports.FlexBox = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
11
9
|
var _util = require("../util");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* Copyright (C) 2017 Wire Swiss GmbH
|
|
15
|
-
*
|
|
16
|
-
* This program is free software: you can redistribute it and/or modify
|
|
17
|
-
* it under the terms of the GNU General Public License as published by
|
|
18
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
19
|
-
* (at your option) any later version.
|
|
20
|
-
*
|
|
21
|
-
* This program is distributed in the hope that it will be useful,
|
|
22
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
23
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
24
|
-
* GNU General Public License for more details.
|
|
25
|
-
*
|
|
26
|
-
* You should have received a copy of the GNU General Public License
|
|
27
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/** @jsx jsx */
|
|
32
|
-
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
33
12
|
var flexBoxStyle = function flexBoxStyle(_ref) {
|
|
34
13
|
var _ref$align = _ref.align,
|
|
35
14
|
align = _ref$align === void 0 ? 'flex-start' : _ref$align,
|
|
@@ -53,7 +32,7 @@ var filterFlexBoxProps = function filterFlexBoxProps(props) {
|
|
|
53
32
|
};
|
|
54
33
|
exports.filterFlexBoxProps = filterFlexBoxProps;
|
|
55
34
|
var FlexBox = /*#__PURE__*/_react2["default"].forwardRef(function (props, ref) {
|
|
56
|
-
return (0, _react.jsx)("div", (
|
|
35
|
+
return (0, _react.jsx)("div", _extends({
|
|
57
36
|
ref: ref,
|
|
58
37
|
css: flexBoxStyle(props)
|
|
59
38
|
}, filterFlexBoxProps(props)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlexBox.js","names":["flexBoxStyle","align","column","justify","flexWrap","alignItems","display","flexDirection","justifyContent","filterFlexBoxProps","props","filterProps","FlexBox","React","forwardRef","ref"],"sources":["FlexBox.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2017 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {Property} from 'csstype';\nimport React from 'react';\n\nimport {filterProps} from '../util';\n\nexport interface FlexBoxProps<T = HTMLDivElement> extends React.PropsWithRef<React.HTMLProps<T>> {\n align?: string;\n column?: boolean;\n flexWrap?: Property.FlexWrap;\n justify?: string;\n}\n\nexport const flexBoxStyle: <T>(props: FlexBoxProps<T>) => CSSObject = ({\n align = 'flex-start',\n column = false,\n justify = 'flex-start',\n flexWrap = 'nowrap',\n}) => ({\n alignItems: align,\n display: 'flex',\n flexDirection: column ? 'column' : 'row',\n flexWrap: flexWrap,\n justifyContent: justify,\n});\n\nexport const filterFlexBoxProps = (props: FlexBoxProps) =>\n filterProps(props, ['align', 'column', 'justify', 'flexWrap']);\n\nexport const FlexBox: React.FC<FlexBoxProps> = React.forwardRef<HTMLDivElement, FlexBoxProps>((props, ref) => (\n <div ref={ref} css={flexBoxStyle(props)} {...filterFlexBoxProps(props)} />\n));\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlexBox.js","names":["flexBoxStyle","align","column","justify","flexWrap","alignItems","display","flexDirection","justifyContent","filterFlexBoxProps","props","filterProps","FlexBox","React","forwardRef","ref"],"sources":["FlexBox.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2017 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {Property} from 'csstype';\nimport React from 'react';\n\nimport {filterProps} from '../util';\n\nexport interface FlexBoxProps<T = HTMLDivElement> extends React.PropsWithRef<React.HTMLProps<T>> {\n align?: string;\n column?: boolean;\n flexWrap?: Property.FlexWrap;\n justify?: string;\n}\n\nexport const flexBoxStyle: <T>(props: FlexBoxProps<T>) => CSSObject = ({\n align = 'flex-start',\n column = false,\n justify = 'flex-start',\n flexWrap = 'nowrap',\n}) => ({\n alignItems: align,\n display: 'flex',\n flexDirection: column ? 'column' : 'row',\n flexWrap: flexWrap,\n justifyContent: justify,\n});\n\nexport const filterFlexBoxProps = (props: FlexBoxProps) =>\n filterProps(props, ['align', 'column', 'justify', 'flexWrap']);\n\nexport const FlexBox: React.FC<FlexBoxProps> = React.forwardRef<HTMLDivElement, FlexBoxProps>((props, ref) => (\n <div ref={ref} css={flexBoxStyle(props)} {...filterFlexBoxProps(props)} />\n));\n"],"mappings":";;;;;;AAoBA;AAEA;AAEA;AAAoC;AAAA;AAS7B,IAAMA,YAAsD,GAAG,SAAzDA,YAAsD;EAAA,sBACjEC,KAAK;IAALA,KAAK,2BAAG,YAAY;IAAA,mBACpBC,MAAM;IAANA,MAAM,4BAAG,KAAK;IAAA,oBACdC,OAAO;IAAPA,OAAO,6BAAG,YAAY;IAAA,qBACtBC,QAAQ;IAARA,QAAQ,8BAAG,QAAQ;EAAA,OACd;IACLC,UAAU,EAAEJ,KAAK;IACjBK,OAAO,EAAE,MAAM;IACfC,aAAa,EAAEL,MAAM,GAAG,QAAQ,GAAG,KAAK;IACxCE,QAAQ,EAAEA,QAAQ;IAClBI,cAAc,EAAEL;EAClB,CAAC;AAAA,CAAC;AAAC;AAEI,IAAMM,kBAAkB,GAAG,SAArBA,kBAAkB,CAAIC,KAAmB;EAAA,OACpD,IAAAC,iBAAW,EAACD,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAAA;AAAC;AAE1D,IAAME,OAA+B,gBAAGC,kBAAK,CAACC,UAAU,CAA+B,UAACJ,KAAK,EAAEK,GAAG;EAAA,OACvG;IAAK,GAAG,EAAEA,GAAI;IAAC,GAAG,EAAEf,YAAY,CAACU,KAAK;EAAE,GAAKD,kBAAkB,CAACC,KAAK,CAAC,EAAI;AAAA,CAC3E,CAAC;AAAC"}
|
package/src/Layout/Footer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.Footer = void 0;
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
/*
|
|
11
11
|
* Wire
|
|
12
12
|
* Copyright (C) 2018 Wire Swiss GmbH
|
package/src/Layout/Footer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","names":["Footer","props"],"sources":["Footer.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {jsx} from '@emotion/react';\nimport React from 'react';\n\ntype FooterProps = React.HTMLProps<HTMLElement>;\n\nexport const Footer = (props: FooterProps) => <footer {...props} />;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Footer.js","names":["Footer","props"],"sources":["Footer.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {jsx} from '@emotion/react';\nimport React from 'react';\n\ntype FooterProps = React.HTMLProps<HTMLElement>;\n\nexport const Footer = (props: FooterProps) => <footer {...props} />;\n"],"mappings":";;;;;;AAoBA;AACA;AAA0B;AArB1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAMO,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAkB;EAAA,OAAK,0BAAYA,KAAK,CAAI;AAAA;AAAC"}
|
package/src/Layout/Header.js
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.headerStyle = exports.Header = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
14
|
-
*
|
|
15
|
-
* This program is free software: you can redistribute it and/or modify
|
|
16
|
-
* it under the terms of the GNU General Public License as published by
|
|
17
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
18
|
-
* (at your option) any later version.
|
|
19
|
-
*
|
|
20
|
-
* This program is distributed in the hope that it will be useful,
|
|
21
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23
|
-
* GNU General Public License for more details.
|
|
24
|
-
*
|
|
25
|
-
* You should have received a copy of the GNU General Public License
|
|
26
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/** @jsx jsx */
|
|
31
|
-
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
32
11
|
var headerStyle = function headerStyle(props) {
|
|
33
12
|
return {
|
|
34
13
|
alignItems: 'center',
|
|
@@ -39,7 +18,7 @@ var headerStyle = function headerStyle(props) {
|
|
|
39
18
|
};
|
|
40
19
|
exports.headerStyle = headerStyle;
|
|
41
20
|
var Header = function Header(props) {
|
|
42
|
-
return (0, _react.jsx)("header", (
|
|
21
|
+
return (0, _react.jsx)("header", _extends({
|
|
43
22
|
css: headerStyle(props)
|
|
44
23
|
}, props));
|
|
45
24
|
};
|
package/src/Layout/Header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","names":["headerStyle","props","alignItems","display","height","justifyContent","Header"],"sources":["Header.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport React from 'react';\n\nexport type HeaderProps<T = HTMLHeadingElement> = React.HTMLProps<T>;\n\nexport const headerStyle: <T>(props: HeaderProps<T>) => CSSObject = props => ({\n alignItems: 'center',\n display: 'flex',\n height: '64px',\n justifyContent: 'space-between',\n});\n\nexport const Header = (props: HeaderProps) => <header css={headerStyle(props)} {...props} />;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.js","names":["headerStyle","props","alignItems","display","height","justifyContent","Header"],"sources":["Header.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport React from 'react';\n\nexport type HeaderProps<T = HTMLHeadingElement> = React.HTMLProps<T>;\n\nexport const headerStyle: <T>(props: HeaderProps<T>) => CSSObject = props => ({\n alignItems: 'center',\n display: 'flex',\n height: '64px',\n justifyContent: 'space-between',\n});\n\nexport const Header = (props: HeaderProps) => <header css={headerStyle(props)} {...props} />;\n"],"mappings":";;;;;;AAoBA;AACA;AAA0B;AAAA;AAInB,IAAMA,WAAoD,GAAG,SAAvDA,WAAoD,CAAGC,KAAK;EAAA,OAAK;IAC5EC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE;EAClB,CAAC;AAAA,CAAC;AAAC;AAEI,IAAMC,MAAM,GAAG,SAATA,MAAM,CAAIL,KAAkB;EAAA,OAAK;IAAQ,GAAG,EAAED,WAAW,CAACC,KAAK;EAAE,GAAKA,KAAK,EAAI;AAAA;AAAC"}
|
package/src/Layout/MatchMedia.js
CHANGED
|
@@ -1,46 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.useMatchMedia = exports.MatchMedia = exports.IsTabletUp = exports.IsTabletDown = exports.IsTablet = exports.IsMobileUp = exports.IsMobileDown = exports.IsMobile = exports.IsDesktopXL = exports.IsDesktop = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
8
|
var _react = require("@emotion/react");
|
|
12
9
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
13
10
|
var _mediaQueries = require("../mediaQueries");
|
|
14
11
|
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); }
|
|
15
12
|
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; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* (at your option) any later version.
|
|
24
|
-
*
|
|
25
|
-
* This program is distributed in the hope that it will be useful,
|
|
26
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
-
* GNU General Public License for more details.
|
|
29
|
-
*
|
|
30
|
-
* You should have received a copy of the GNU General Public License
|
|
31
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/** @jsx jsx */
|
|
36
|
-
/* @jsxFrag React.Fragment */
|
|
37
|
-
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
20
|
var useMatchMedia = function useMatchMedia(query) {
|
|
39
21
|
var matchMedia = (0, _react2.useMemo)(function () {
|
|
40
22
|
return window.matchMedia("(".concat(query, ")"));
|
|
41
23
|
}, [query]);
|
|
42
24
|
var _useState = (0, _react2.useState)(matchMedia.matches),
|
|
43
|
-
_useState2 = (
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
26
|
isMatching = _useState2[0],
|
|
45
27
|
setIsMatching = _useState2[1];
|
|
46
28
|
var updateMatching = function updateMatching(event) {
|
|
@@ -65,49 +47,49 @@ var MatchMedia = function MatchMedia(_ref) {
|
|
|
65
47
|
};
|
|
66
48
|
exports.MatchMedia = MatchMedia;
|
|
67
49
|
var IsDesktop = function IsDesktop(props) {
|
|
68
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
50
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
69
51
|
query: _mediaQueries.QueryKeys.DESKTOP
|
|
70
52
|
}, props));
|
|
71
53
|
};
|
|
72
54
|
exports.IsDesktop = IsDesktop;
|
|
73
55
|
var IsDesktopXL = function IsDesktopXL(props) {
|
|
74
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
56
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
75
57
|
query: _mediaQueries.QueryKeys.DESKTOP_XL
|
|
76
58
|
}, props));
|
|
77
59
|
};
|
|
78
60
|
exports.IsDesktopXL = IsDesktopXL;
|
|
79
61
|
var IsMobile = function IsMobile(props) {
|
|
80
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
62
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
81
63
|
query: _mediaQueries.QueryKeys.MOBILE
|
|
82
64
|
}, props));
|
|
83
65
|
};
|
|
84
66
|
exports.IsMobile = IsMobile;
|
|
85
67
|
var IsMobileDown = function IsMobileDown(props) {
|
|
86
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
68
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
87
69
|
query: _mediaQueries.QueryKeys.MOBILE_DOWN
|
|
88
70
|
}, props));
|
|
89
71
|
};
|
|
90
72
|
exports.IsMobileDown = IsMobileDown;
|
|
91
73
|
var IsMobileUp = function IsMobileUp(props) {
|
|
92
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
74
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
93
75
|
query: _mediaQueries.QueryKeys.MOBILE_UP
|
|
94
76
|
}, props));
|
|
95
77
|
};
|
|
96
78
|
exports.IsMobileUp = IsMobileUp;
|
|
97
79
|
var IsTablet = function IsTablet(props) {
|
|
98
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
80
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
99
81
|
query: _mediaQueries.QueryKeys.TABLET
|
|
100
82
|
}, props));
|
|
101
83
|
};
|
|
102
84
|
exports.IsTablet = IsTablet;
|
|
103
85
|
var IsTabletDown = function IsTabletDown(props) {
|
|
104
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
86
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
105
87
|
query: _mediaQueries.QueryKeys.TABLET_DOWN
|
|
106
88
|
}, props));
|
|
107
89
|
};
|
|
108
90
|
exports.IsTabletDown = IsTabletDown;
|
|
109
91
|
var IsTabletUp = function IsTabletUp(props) {
|
|
110
|
-
return (0, _react.jsx)(MatchMedia, (
|
|
92
|
+
return (0, _react.jsx)(MatchMedia, _extends({
|
|
111
93
|
query: _mediaQueries.QueryKeys.TABLET_UP
|
|
112
94
|
}, props));
|
|
113
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MatchMedia.js","names":["useMatchMedia","query","matchMedia","useMemo","window","useState","matches","isMatching","setIsMatching","updateMatching","event","useEffect","addEventListener","removeEventListener","MatchMedia","children","not","matchQuery","QUERY","IsDesktop","props","QueryKeys","DESKTOP","IsDesktopXL","DESKTOP_XL","IsMobile","MOBILE","IsMobileDown","MOBILE_DOWN","IsMobileUp","MOBILE_UP","IsTablet","TABLET","IsTabletDown","TABLET_DOWN","IsTabletUp","TABLET_UP"],"sources":["MatchMedia.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\n/* @jsxFrag React.Fragment */\nimport {jsx} from '@emotion/react';\nimport React, {ReactFragment, useEffect, useMemo, useState} from 'react';\n\nimport {QUERY, QueryKeys} from '../mediaQueries';\n\ntype Query = string | QueryKeys;\n\nexport interface MatchMediaProps extends React.HTMLProps<ReactFragment> {\n not?: boolean;\n query: Query;\n}\n\nexport const useMatchMedia = (query: Query) => {\n const matchMedia = useMemo(() => window.matchMedia(`(${query})`), [query]);\n\n const [isMatching, setIsMatching] = useState(matchMedia.matches);\n\n const updateMatching = (event: MediaQueryListEvent) => {\n setIsMatching(event.matches);\n };\n\n useEffect(() => {\n matchMedia.addEventListener('change', updateMatching);\n return () => matchMedia.removeEventListener('change', updateMatching);\n }, [matchMedia]);\n\n return isMatching;\n};\n\nexport const MatchMedia: React.FC<MatchMediaProps> = ({query, children, not}) => {\n const matchQuery = useMatchMedia(QUERY[query] || query);\n const isMatching = not ? !matchQuery : matchQuery;\n return isMatching ? <>{children}</> : null;\n};\n\nexport type NamedMatchMediaProps = Omit<MatchMediaProps, 'query'>;\n\nexport const IsDesktop = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.DESKTOP} {...props} />;\nexport const IsDesktopXL = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.DESKTOP_XL} {...props} />;\nexport const IsMobile = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE} {...props} />;\nexport const IsMobileDown = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE_DOWN} {...props} />;\nexport const IsMobileUp = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE_UP} {...props} />;\nexport const IsTablet = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET} {...props} />;\nexport const IsTabletDown = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET_DOWN} {...props} />;\nexport const IsTabletUp = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET_UP} {...props} />;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MatchMedia.js","names":["useMatchMedia","query","matchMedia","useMemo","window","useState","matches","isMatching","setIsMatching","updateMatching","event","useEffect","addEventListener","removeEventListener","MatchMedia","children","not","matchQuery","QUERY","IsDesktop","props","QueryKeys","DESKTOP","IsDesktopXL","DESKTOP_XL","IsMobile","MOBILE","IsMobileDown","MOBILE_DOWN","IsMobileUp","MOBILE_UP","IsTablet","TABLET","IsTabletDown","TABLET_DOWN","IsTabletUp","TABLET_UP"],"sources":["MatchMedia.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\n/* @jsxFrag React.Fragment */\nimport {jsx} from '@emotion/react';\nimport React, {ReactFragment, useEffect, useMemo, useState} from 'react';\n\nimport {QUERY, QueryKeys} from '../mediaQueries';\n\ntype Query = string | QueryKeys;\n\nexport interface MatchMediaProps extends React.HTMLProps<ReactFragment> {\n not?: boolean;\n query: Query;\n}\n\nexport const useMatchMedia = (query: Query) => {\n const matchMedia = useMemo(() => window.matchMedia(`(${query})`), [query]);\n\n const [isMatching, setIsMatching] = useState(matchMedia.matches);\n\n const updateMatching = (event: MediaQueryListEvent) => {\n setIsMatching(event.matches);\n };\n\n useEffect(() => {\n matchMedia.addEventListener('change', updateMatching);\n return () => matchMedia.removeEventListener('change', updateMatching);\n }, [matchMedia]);\n\n return isMatching;\n};\n\nexport const MatchMedia: React.FC<MatchMediaProps> = ({query, children, not}) => {\n const matchQuery = useMatchMedia(QUERY[query] || query);\n const isMatching = not ? !matchQuery : matchQuery;\n return isMatching ? <>{children}</> : null;\n};\n\nexport type NamedMatchMediaProps = Omit<MatchMediaProps, 'query'>;\n\nexport const IsDesktop = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.DESKTOP} {...props} />;\nexport const IsDesktopXL = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.DESKTOP_XL} {...props} />;\nexport const IsMobile = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE} {...props} />;\nexport const IsMobileDown = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE_DOWN} {...props} />;\nexport const IsMobileUp = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.MOBILE_UP} {...props} />;\nexport const IsTablet = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET} {...props} />;\nexport const IsTabletDown = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET_DOWN} {...props} />;\nexport const IsTabletUp = (props: NamedMatchMediaProps) => <MatchMedia query={QueryKeys.TABLET_UP} {...props} />;\n"],"mappings":";;;;;;;AAqBA;AACA;AAEA;AAAiD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS1C,IAAMA,aAAa,GAAG,SAAhBA,aAAa,CAAIC,KAAY,EAAK;EAC7C,IAAMC,UAAU,GAAG,IAAAC,eAAO,EAAC;IAAA,OAAMC,MAAM,CAACF,UAAU,YAAKD,KAAK,OAAI;EAAA,GAAE,CAACA,KAAK,CAAC,CAAC;EAE1E,gBAAoC,IAAAI,gBAAQ,EAACH,UAAU,CAACI,OAAO,CAAC;IAAA;IAAzDC,UAAU;IAAEC,aAAa;EAEhC,IAAMC,cAAc,GAAG,SAAjBA,cAAc,CAAIC,KAA0B,EAAK;IACrDF,aAAa,CAACE,KAAK,CAACJ,OAAO,CAAC;EAC9B,CAAC;EAED,IAAAK,iBAAS,EAAC,YAAM;IACdT,UAAU,CAACU,gBAAgB,CAAC,QAAQ,EAAEH,cAAc,CAAC;IACrD,OAAO;MAAA,OAAMP,UAAU,CAACW,mBAAmB,CAAC,QAAQ,EAAEJ,cAAc,CAAC;IAAA;EACvE,CAAC,EAAE,CAACP,UAAU,CAAC,CAAC;EAEhB,OAAOK,UAAU;AACnB,CAAC;AAAC;AAEK,IAAMO,UAAqC,GAAG,SAAxCA,UAAqC,OAA+B;EAAA,IAA1Bb,KAAK,QAALA,KAAK;IAAEc,QAAQ,QAARA,QAAQ;IAAEC,GAAG,QAAHA,GAAG;EACzE,IAAMC,UAAU,GAAGjB,aAAa,CAACkB,mBAAK,CAACjB,KAAK,CAAC,IAAIA,KAAK,CAAC;EACvD,IAAMM,UAAU,GAAGS,GAAG,GAAG,CAACC,UAAU,GAAGA,UAAU;EACjD,OAAOV,UAAU,GAAG,mDAAGQ,QAAQ,CAAI,GAAG,IAAI;AAC5C,CAAC;AAAC;AAIK,IAAMI,SAAS,GAAG,SAAZA,SAAS,CAAIC,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACC;EAAQ,GAAKF,KAAK,EAAI;AAAA;AAAC;AACvG,IAAMG,WAAW,GAAG,SAAdA,WAAW,CAAIH,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACG;EAAW,GAAKJ,KAAK,EAAI;AAAA;AAAC;AAC5G,IAAMK,QAAQ,GAAG,SAAXA,QAAQ,CAAIL,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACK;EAAO,GAAKN,KAAK,EAAI;AAAA;AAAC;AACrG,IAAMO,YAAY,GAAG,SAAfA,YAAY,CAAIP,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACO;EAAY,GAAKR,KAAK,EAAI;AAAA;AAAC;AAC9G,IAAMS,UAAU,GAAG,SAAbA,UAAU,CAAIT,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACS;EAAU,GAAKV,KAAK,EAAI;AAAA;AAAC;AAC1G,IAAMW,QAAQ,GAAG,SAAXA,QAAQ,CAAIX,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACW;EAAO,GAAKZ,KAAK,EAAI;AAAA;AAAC;AACrG,IAAMa,YAAY,GAAG,SAAfA,YAAY,CAAIb,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACa;EAAY,GAAKd,KAAK,EAAI;AAAA;AAAC;AAC9G,IAAMe,UAAU,GAAG,SAAbA,UAAU,CAAIf,KAA2B;EAAA,OAAK,gBAAC,UAAU;IAAC,KAAK,EAAEC,uBAAS,CAACe;EAAU,GAAKhB,KAAK,EAAI;AAAA;AAAC"}
|
package/src/Layout/Spacer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.Spacer = Spacer;
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
/*
|
|
11
11
|
* Wire
|
|
12
12
|
* Copyright (C) 2018 Wire Swiss GmbH
|
package/src/Layout/Spacer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.js","names":["Spacer","size","vertical","display","width","height"],"sources":["Spacer.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {jsx} from '@emotion/react';\nimport React from 'react';\n\nexport interface SpacerProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n size?: number;\n vertical?: boolean;\n}\n\nexport function Spacer({size = 8, vertical = false}: SpacerProps): React.ReactNode {\n return <div style={vertical ? {display: 'inline-block', width: size} : {height: size}} />;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spacer.js","names":["Spacer","size","vertical","display","width","height"],"sources":["Spacer.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {jsx} from '@emotion/react';\nimport React from 'react';\n\nexport interface SpacerProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n size?: number;\n vertical?: boolean;\n}\n\nexport function Spacer({size = 8, vertical = false}: SpacerProps): React.ReactNode {\n return <div style={vertical ? {display: 'inline-block', width: size} : {height: size}} />;\n}\n"],"mappings":";;;;;;AAoBA;AACA;AAA0B;AArB1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AASO,SAASA,MAAM,OAA6D;EAAA,qBAA3DC,IAAI;IAAJA,IAAI,0BAAG,CAAC;IAAA,qBAAEC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;EAChD,OAAO;IAAK,KAAK,EAAEA,QAAQ,GAAG;MAACC,OAAO,EAAE,cAAc;MAAEC,KAAK,EAAEH;IAAI,CAAC,GAAG;MAACI,MAAM,EAAEJ;IAAI;EAAE,EAAG;AAC3F"}
|