@wireapp/react-ui-kit 8.17.3 → 8.17.5
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 +17 -15
- 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
|
@@ -1,17 +1,16 @@
|
|
|
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.menuContentStyle = exports.MenuContent = 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 _util = require("../../util");
|
|
12
9
|
var _Content = require("../Content");
|
|
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); }
|
|
13
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
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; }
|
|
15
14
|
var menuContentStyle = function menuContentStyle(props) {
|
|
16
15
|
return _objectSpread(_objectSpread({}, (0, _Content.contentStyle)(props)), {}, {
|
|
17
16
|
alignItems: 'center',
|
|
@@ -31,7 +30,7 @@ var filterMenuContentProps = function filterMenuContentProps(props) {
|
|
|
31
30
|
return (0, _util.filterProps)(props, ['open']);
|
|
32
31
|
};
|
|
33
32
|
var MenuContent = function MenuContent(props) {
|
|
34
|
-
return (0, _react.jsx)("div", (
|
|
33
|
+
return (0, _react.jsx)("div", _extends({
|
|
35
34
|
css: menuContentStyle(props)
|
|
36
35
|
}, filterMenuContentProps(props)));
|
|
37
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContent.js","names":["menuContentStyle","props","contentStyle","alignItems","display","gridColumnGap","gridTemplateColumns","height","justifyContent","left","open","undefined","position","width","zIndex","filterMenuContentProps","filterProps","MenuContent"],"sources":["MenuContent.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';\n\nimport {TextProps} from '../../Text';\nimport {filterProps} from '../../util';\nimport {contentStyle} from '../Content';\n\nexport interface MenuContentProps<T = HTMLDivElement> extends TextProps<T> {\n open?: boolean;\n}\n\nexport const menuContentStyle: <T>(props: MenuContentProps<T>) => CSSObject = props => ({\n ...contentStyle(props),\n alignItems: 'center',\n display: 'grid',\n gridColumnGap: '8px',\n gridTemplateColumns: '1fr auto 1fr',\n height: '64px',\n justifyContent: 'space-between',\n left: props.open ? 0 : undefined,\n position: props.open ? 'fixed' : undefined,\n width: props.open ? '100%' : undefined,\n zIndex: props.open ? 10000 : undefined,\n});\n\nconst filterMenuContentProps = (props: MenuContentProps) => filterProps(props, ['open']);\n\nexport const MenuContent = (props: MenuContentProps) => (\n <div css={menuContentStyle(props)} {...filterMenuContentProps(props)} />\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuContent.js","names":["menuContentStyle","props","contentStyle","alignItems","display","gridColumnGap","gridTemplateColumns","height","justifyContent","left","open","undefined","position","width","zIndex","filterMenuContentProps","filterProps","MenuContent"],"sources":["MenuContent.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';\n\nimport {TextProps} from '../../Text';\nimport {filterProps} from '../../util';\nimport {contentStyle} from '../Content';\n\nexport interface MenuContentProps<T = HTMLDivElement> extends TextProps<T> {\n open?: boolean;\n}\n\nexport const menuContentStyle: <T>(props: MenuContentProps<T>) => CSSObject = props => ({\n ...contentStyle(props),\n alignItems: 'center',\n display: 'grid',\n gridColumnGap: '8px',\n gridTemplateColumns: '1fr auto 1fr',\n height: '64px',\n justifyContent: 'space-between',\n left: props.open ? 0 : undefined,\n position: props.open ? 'fixed' : undefined,\n width: props.open ? '100%' : undefined,\n zIndex: props.open ? 10000 : undefined,\n});\n\nconst filterMenuContentProps = (props: MenuContentProps) => filterProps(props, ['open']);\n\nexport const MenuContent = (props: MenuContentProps) => (\n <div css={menuContentStyle(props)} {...filterMenuContentProps(props)} />\n);\n"],"mappings":";;;;;;AAoBA;AAGA;AACA;AAAwC;AAAA;AAAA;AAAA;AAMjC,IAAMA,gBAA8D,GAAG,SAAjEA,gBAA8D,CAAGC,KAAK;EAAA,uCAC9E,IAAAC,qBAAY,EAACD,KAAK,CAAC;IACtBE,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,cAAc;IACnCC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE,eAAe;IAC/BC,IAAI,EAAER,KAAK,CAACS,IAAI,GAAG,CAAC,GAAGC,SAAS;IAChCC,QAAQ,EAAEX,KAAK,CAACS,IAAI,GAAG,OAAO,GAAGC,SAAS;IAC1CE,KAAK,EAAEZ,KAAK,CAACS,IAAI,GAAG,MAAM,GAAGC,SAAS;IACtCG,MAAM,EAAEb,KAAK,CAACS,IAAI,GAAG,KAAK,GAAGC;EAAS;AAAA,CACtC;AAAC;AAEH,IAAMI,sBAAsB,GAAG,SAAzBA,sBAAsB,CAAId,KAAuB;EAAA,OAAK,IAAAe,iBAAW,EAACf,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;AAAA;AAEjF,IAAMgB,WAAW,GAAG,SAAdA,WAAW,CAAIhB,KAAuB;EAAA,OACjD;IAAK,GAAG,EAAED,gBAAgB,CAACC,KAAK;EAAE,GAAKc,sBAAsB,CAACd,KAAK,CAAC,EAAI;AAAA,CACzE;AAAC"}
|
|
@@ -1,39 +1,18 @@
|
|
|
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.menuItemsStyle = exports.MenuItems = 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* This program is free software: you can redistribute it and/or modify
|
|
19
|
-
* it under the terms of the GNU General Public License as published by
|
|
20
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
21
|
-
* (at your option) any later version.
|
|
22
|
-
*
|
|
23
|
-
* This program is distributed in the hope that it will be useful,
|
|
24
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
25
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
26
|
-
* GNU General Public License for more details.
|
|
27
|
-
*
|
|
28
|
-
* You should have received a copy of the GNU General Public License
|
|
29
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
35
14
|
var menuItemsStyle = function menuItemsStyle(theme, props) {
|
|
36
|
-
return (
|
|
15
|
+
return _defineProperty({
|
|
37
16
|
alignSelf: 'center',
|
|
38
17
|
display: 'flex',
|
|
39
18
|
justifySelf: 'end'
|
|
@@ -55,7 +34,7 @@ var filterMenuItemProps = function filterMenuItemProps(props) {
|
|
|
55
34
|
return (0, _util.filterProps)(props, ['open']);
|
|
56
35
|
};
|
|
57
36
|
var MenuItems = function MenuItems(props) {
|
|
58
|
-
return (0, _react2.jsx)("div", (
|
|
37
|
+
return (0, _react2.jsx)("div", _extends({
|
|
59
38
|
css: function css(theme) {
|
|
60
39
|
return menuItemsStyle(theme, props);
|
|
61
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItems.js","names":["menuItemsStyle","theme","props","alignSelf","display","justifySelf","media","QueryKeys","TABLET_DOWN","backgroundColor","general","bottom","left","overflowY","position","right","top","transform","open","transition","zIndex","filterMenuItemProps","filterProps","MenuItems"],"sources":["MenuItems.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 {Theme} from '../Theme';\n\nexport interface MenuItemsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuItemsStyle: <T>(theme: Theme, props: MenuItemsProps<T>) => CSSObject = (theme, props) => ({\n alignSelf: 'center',\n display: 'flex',\n justifySelf: 'end',\n [media[QueryKeys.TABLET_DOWN]]: {\n backgroundColor: theme.general.backgroundColor,\n bottom: 0,\n left: 0,\n overflowY: 'auto',\n position: 'fixed',\n right: 0,\n top: 0,\n transform: props.open ? 'translateX(0)' : 'translateX(110%)',\n transition: 'transform 0.25s ease',\n zIndex: 1,\n },\n});\n\nconst filterMenuItemProps = (props: MenuItemsProps) => filterProps(props, ['open']);\n\nexport const MenuItems = (props: MenuItemsProps) => (\n <div css={(theme: Theme) => menuItemsStyle(theme, props)} {...filterMenuItemProps(props)} />\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuItems.js","names":["menuItemsStyle","theme","props","alignSelf","display","justifySelf","media","QueryKeys","TABLET_DOWN","backgroundColor","general","bottom","left","overflowY","position","right","top","transform","open","transition","zIndex","filterMenuItemProps","filterProps","MenuItems"],"sources":["MenuItems.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 {Theme} from '../Theme';\n\nexport interface MenuItemsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuItemsStyle: <T>(theme: Theme, props: MenuItemsProps<T>) => CSSObject = (theme, props) => ({\n alignSelf: 'center',\n display: 'flex',\n justifySelf: 'end',\n [media[QueryKeys.TABLET_DOWN]]: {\n backgroundColor: theme.general.backgroundColor,\n bottom: 0,\n left: 0,\n overflowY: 'auto',\n position: 'fixed',\n right: 0,\n top: 0,\n transform: props.open ? 'translateX(0)' : 'translateX(110%)',\n transition: 'transform 0.25s ease',\n zIndex: 1,\n },\n});\n\nconst filterMenuItemProps = (props: MenuItemsProps) => filterProps(props, ['open']);\n\nexport const MenuItems = (props: MenuItemsProps) => (\n <div css={(theme: Theme) => menuItemsStyle(theme, props)} {...filterMenuItemProps(props)} />\n);\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AACA;AAAuC;AAAA;AAAA;AAOhC,IAAMA,cAAwE,GAAG,SAA3EA,cAAwE,CAAIC,KAAK,EAAEC,KAAK;EAAA;IACnGC,SAAS,EAAE,QAAQ;IACnBC,OAAO,EAAE,MAAM;IACfC,WAAW,EAAE;EAAK,GACjBC,mBAAK,CAACC,uBAAS,CAACC,WAAW,CAAC,EAAG;IAC9BC,eAAe,EAAER,KAAK,CAACS,OAAO,CAACD,eAAe;IAC9CE,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,MAAM;IACjBC,QAAQ,EAAE,OAAO;IACjBC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACNC,SAAS,EAAEf,KAAK,CAACgB,IAAI,GAAG,eAAe,GAAG,kBAAkB;IAC5DC,UAAU,EAAE,sBAAsB;IAClCC,MAAM,EAAE;EACV,CAAC;AAAA,CACD;AAAC;AAEH,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAInB,KAAqB;EAAA,OAAK,IAAAoB,iBAAW,EAACpB,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;AAAA;AAE5E,IAAMqB,SAAS,GAAG,SAAZA,SAAS,CAAIrB,KAAqB;EAAA,OAC7C;IAAK,GAAG,EAAE,aAACD,KAAY;MAAA,OAAKD,cAAc,CAACC,KAAK,EAAEC,KAAK,CAAC;IAAA;EAAC,GAAKmB,mBAAmB,CAACnB,KAAK,CAAC,EAAI;AAAA,CAC7F;AAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
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.menuLinkStyle = exports.filterMenuLinkProps = exports.MenuLink = exports.MENU_LINK_CLASSNAME = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
7
|
var _react = require("@emotion/react");
|
|
12
8
|
var _mediaQueries = require("../../mediaQueries");
|
|
13
9
|
var _Text = require("../../Text");
|
|
14
10
|
var _util = require("../../util");
|
|
15
11
|
var _HeaderSubMenu = require("./HeaderSubMenu");
|
|
16
12
|
var _excluded = ["bold", "color", "fontSize", "textTransform", "button"];
|
|
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); }
|
|
17
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
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; }
|
|
17
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
var menuLinkStyle = function menuLinkStyle(theme, _ref) {
|
|
20
20
|
var _objectSpread2;
|
|
21
21
|
var _ref$bold = _ref.bold,
|
|
@@ -28,13 +28,13 @@ var menuLinkStyle = function menuLinkStyle(theme, _ref) {
|
|
|
28
28
|
textTransform = _ref$textTransform === void 0 ? 'uppercase' : _ref$textTransform,
|
|
29
29
|
_ref$button = _ref.button,
|
|
30
30
|
button = _ref$button === void 0 ? false : _ref$button,
|
|
31
|
-
props = (
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
32
|
return _objectSpread(_objectSpread({}, (0, _Text.linkStyle)(theme, _objectSpread({
|
|
33
33
|
bold: bold,
|
|
34
34
|
color: color,
|
|
35
35
|
fontSize: fontSize,
|
|
36
36
|
textTransform: textTransform
|
|
37
|
-
}, props))), {}, (_objectSpread2 = {}, (
|
|
37
|
+
}, props))), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], _defineProperty({
|
|
38
38
|
'&:first-of-type': {
|
|
39
39
|
marginLeft: 0
|
|
40
40
|
},
|
|
@@ -49,14 +49,14 @@ var menuLinkStyle = function menuLinkStyle(theme, _ref) {
|
|
|
49
49
|
'&:last-of-type': {
|
|
50
50
|
marginRight: '26px'
|
|
51
51
|
}
|
|
52
|
-
})), (
|
|
52
|
+
})), _defineProperty(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.TABLET_DOWN], {
|
|
53
53
|
border: 'none',
|
|
54
54
|
fontSize: '32px !important',
|
|
55
55
|
fontWeight: 300,
|
|
56
56
|
maxWidth: '480px',
|
|
57
57
|
padding: '8px 24px',
|
|
58
58
|
textTransform: 'none !important'
|
|
59
|
-
}), (
|
|
59
|
+
}), _defineProperty(_objectSpread2, "border", button ? '1px solid rgb(219, 226, 231)' : undefined), _defineProperty(_objectSpread2, "borderRadius", button ? '4px' : undefined), _defineProperty(_objectSpread2, "padding", button ? '10px 16px' : undefined), _objectSpread2));
|
|
60
60
|
};
|
|
61
61
|
exports.menuLinkStyle = menuLinkStyle;
|
|
62
62
|
var MENU_LINK_CLASSNAME = 'menu-link';
|
|
@@ -66,7 +66,7 @@ var filterMenuLinkProps = function filterMenuLinkProps(props) {
|
|
|
66
66
|
};
|
|
67
67
|
exports.filterMenuLinkProps = filterMenuLinkProps;
|
|
68
68
|
var MenuLink = function MenuLink(props) {
|
|
69
|
-
return (0, _react.jsx)("a", (
|
|
69
|
+
return (0, _react.jsx)("a", _extends({
|
|
70
70
|
className: MENU_LINK_CLASSNAME,
|
|
71
71
|
css: function css(theme) {
|
|
72
72
|
return menuLinkStyle(theme, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuLink.js","names":["menuLinkStyle","theme","bold","color","general","fontSize","textTransform","button","props","linkStyle","media","QueryKeys","DESKTOP","marginLeft","marginRight","margin","DESKTOP_HEADER_SUB_MENU_CLASSNAME","TABLET_DOWN","border","fontWeight","maxWidth","padding","undefined","MENU_LINK_CLASSNAME","filterMenuLinkProps","filterProps","filterLinkProps","MenuLink"],"sources":["MenuLink.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';\n\nimport {QueryKeys, media} from '../../mediaQueries';\nimport {LinkProps, filterLinkProps, linkStyle} from '../../Text';\nimport {filterProps} from '../../util';\nimport {Theme} from '../Theme';\nimport {DESKTOP_HEADER_SUB_MENU_CLASSNAME} from './HeaderSubMenu';\n\nexport interface MenuLinkProps<T = HTMLAnchorElement> extends LinkProps<T> {\n button?: boolean;\n}\n\nexport const menuLinkStyle: <T>(theme: Theme, props: MenuLinkProps<T>) => CSSObject = (\n theme,\n {bold = true, color = theme.general.color, fontSize = '11px', textTransform = 'uppercase', button = false, ...props},\n) => ({\n ...linkStyle(theme, {bold, color, fontSize, textTransform, ...props}),\n [media[QueryKeys.DESKTOP]]: {\n '&:first-of-type': {\n marginLeft: 0,\n },\n '&:last-of-type': {\n marginRight: 0,\n },\n margin: '0 26px 0 10px',\n [`.${DESKTOP_HEADER_SUB_MENU_CLASSNAME} &`]: {\n '&:first-of-type': {\n marginLeft: '10px',\n },\n '&:last-of-type': {\n marginRight: '26px',\n },\n },\n },\n [media[QueryKeys.TABLET_DOWN]]: {\n border: 'none',\n fontSize: '32px !important',\n fontWeight: 300,\n maxWidth: '480px',\n padding: '8px 24px',\n textTransform: 'none !important',\n },\n border: button ? '1px solid rgb(219, 226, 231)' : undefined,\n borderRadius: button ? '4px' : undefined,\n padding: button ? '10px 16px' : undefined,\n});\n\nexport const MENU_LINK_CLASSNAME = 'menu-link';\n\nexport const filterMenuLinkProps = (props: MenuLinkProps) =>\n filterProps(filterLinkProps(props) as MenuLinkProps, ['button']);\n\nexport const MenuLink = (props: MenuLinkProps) => (\n <a\n className={MENU_LINK_CLASSNAME}\n css={(theme: Theme) => menuLinkStyle(theme, props)}\n {...filterMenuLinkProps(props)}\n />\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuLink.js","names":["menuLinkStyle","theme","bold","color","general","fontSize","textTransform","button","props","linkStyle","media","QueryKeys","DESKTOP","marginLeft","marginRight","margin","DESKTOP_HEADER_SUB_MENU_CLASSNAME","TABLET_DOWN","border","fontWeight","maxWidth","padding","undefined","MENU_LINK_CLASSNAME","filterMenuLinkProps","filterProps","filterLinkProps","MenuLink"],"sources":["MenuLink.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';\n\nimport {QueryKeys, media} from '../../mediaQueries';\nimport {LinkProps, filterLinkProps, linkStyle} from '../../Text';\nimport {filterProps} from '../../util';\nimport {Theme} from '../Theme';\nimport {DESKTOP_HEADER_SUB_MENU_CLASSNAME} from './HeaderSubMenu';\n\nexport interface MenuLinkProps<T = HTMLAnchorElement> extends LinkProps<T> {\n button?: boolean;\n}\n\nexport const menuLinkStyle: <T>(theme: Theme, props: MenuLinkProps<T>) => CSSObject = (\n theme,\n {bold = true, color = theme.general.color, fontSize = '11px', textTransform = 'uppercase', button = false, ...props},\n) => ({\n ...linkStyle(theme, {bold, color, fontSize, textTransform, ...props}),\n [media[QueryKeys.DESKTOP]]: {\n '&:first-of-type': {\n marginLeft: 0,\n },\n '&:last-of-type': {\n marginRight: 0,\n },\n margin: '0 26px 0 10px',\n [`.${DESKTOP_HEADER_SUB_MENU_CLASSNAME} &`]: {\n '&:first-of-type': {\n marginLeft: '10px',\n },\n '&:last-of-type': {\n marginRight: '26px',\n },\n },\n },\n [media[QueryKeys.TABLET_DOWN]]: {\n border: 'none',\n fontSize: '32px !important',\n fontWeight: 300,\n maxWidth: '480px',\n padding: '8px 24px',\n textTransform: 'none !important',\n },\n border: button ? '1px solid rgb(219, 226, 231)' : undefined,\n borderRadius: button ? '4px' : undefined,\n padding: button ? '10px 16px' : undefined,\n});\n\nexport const MENU_LINK_CLASSNAME = 'menu-link';\n\nexport const filterMenuLinkProps = (props: MenuLinkProps) =>\n filterProps(filterLinkProps(props) as MenuLinkProps, ['button']);\n\nexport const MenuLink = (props: MenuLinkProps) => (\n <a\n className={MENU_LINK_CLASSNAME}\n css={(theme: Theme) => menuLinkStyle(theme, props)}\n {...filterMenuLinkProps(props)}\n />\n);\n"],"mappings":";;;;;;AAoBA;AAEA;AACA;AACA;AAEA;AAAkE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAM3D,IAAMA,aAAsE,GAAG,SAAzEA,aAAsE,CACjFC,KAAK;EAAA;EAAA,qBACJC,IAAI;IAAJA,IAAI,0BAAG,IAAI;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAGF,KAAK,CAACG,OAAO,CAACD,KAAK;IAAA,qBAAEE,QAAQ;IAARA,QAAQ,8BAAG,MAAM;IAAA,0BAAEC,aAAa;IAAbA,aAAa,mCAAG,WAAW;IAAA,mBAAEC,MAAM;IAANA,MAAM,4BAAG,KAAK;IAAKC,KAAK;EAAA,uCAEhH,IAAAC,eAAS,EAACR,KAAK;IAAGC,IAAI,EAAJA,IAAI;IAAEC,KAAK,EAALA,KAAK;IAAEE,QAAQ,EAARA,QAAQ;IAAEC,aAAa,EAAbA;EAAa,GAAKE,KAAK,EAAE,6DACpEE,mBAAK,CAACC,uBAAS,CAACC,OAAO,CAAC;IACvB,iBAAiB,EAAE;MACjBC,UAAU,EAAE;IACd,CAAC;IACD,gBAAgB,EAAE;MAChBC,WAAW,EAAE;IACf,CAAC;IACDC,MAAM,EAAE;EAAe,cAClBC,gDAAiC,SAAO;IAC3C,iBAAiB,EAAE;MACjBH,UAAU,EAAE;IACd,CAAC;IACD,gBAAgB,EAAE;MAChBC,WAAW,EAAE;IACf;EACF,CAAC,oCAEFJ,mBAAK,CAACC,uBAAS,CAACM,WAAW,CAAC,EAAG;IAC9BC,MAAM,EAAE,MAAM;IACdb,QAAQ,EAAE,iBAAiB;IAC3Bc,UAAU,EAAE,GAAG;IACfC,QAAQ,EAAE,OAAO;IACjBC,OAAO,EAAE,UAAU;IACnBf,aAAa,EAAE;EACjB,CAAC,6CACOC,MAAM,GAAG,8BAA8B,GAAGe,SAAS,mDAC7Cf,MAAM,GAAG,KAAK,GAAGe,SAAS,8CAC/Bf,MAAM,GAAG,WAAW,GAAGe,SAAS;AAAA,CACzC;AAAC;AAEI,IAAMC,mBAAmB,GAAG,WAAW;AAAC;AAExC,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAIhB,KAAoB;EAAA,OACtD,IAAAiB,iBAAW,EAAC,IAAAC,qBAAe,EAAClB,KAAK,CAAC,EAAmB,CAAC,QAAQ,CAAC,CAAC;AAAA;AAAC;AAE5D,IAAMmB,QAAQ,GAAG,SAAXA,QAAQ,CAAInB,KAAoB;EAAA,OAC3C;IACE,SAAS,EAAEe,mBAAoB;IAC/B,GAAG,EAAE,aAACtB,KAAY;MAAA,OAAKD,aAAa,CAACC,KAAK,EAAEO,KAAK,CAAC;IAAA;EAAC,GAC/CgB,mBAAmB,CAAChB,KAAK,CAAC,EAC9B;AAAA,CACH;AAAC"}
|
|
@@ -1,37 +1,16 @@
|
|
|
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.menuOpenButtonStyle = exports.MenuOpenButton = 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* This program is free software: you can redistribute it and/or modify
|
|
19
|
-
* it under the terms of the GNU General Public License as published by
|
|
20
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
21
|
-
* (at your option) any later version.
|
|
22
|
-
*
|
|
23
|
-
* This program is distributed in the hope that it will be useful,
|
|
24
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
25
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
26
|
-
* GNU General Public License for more details.
|
|
27
|
-
*
|
|
28
|
-
* You should have received a copy of the GNU General Public License
|
|
29
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
35
14
|
var menuOpenButtonStyle = function menuOpenButtonStyle(theme, _ref) {
|
|
36
15
|
var _ref2;
|
|
37
16
|
var open = _ref.open;
|
|
@@ -54,16 +33,16 @@ var menuOpenButtonStyle = function menuOpenButtonStyle(theme, _ref) {
|
|
|
54
33
|
'div:nth-of-type(3)': {
|
|
55
34
|
transform: open ? 'translateY(-6px) rotate(45deg)' : undefined
|
|
56
35
|
}
|
|
57
|
-
}, (
|
|
36
|
+
}, _defineProperty(_ref2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], {
|
|
58
37
|
display: 'none'
|
|
59
|
-
}), (
|
|
38
|
+
}), _defineProperty(_ref2, "zIndex", 2), _ref2;
|
|
60
39
|
};
|
|
61
40
|
exports.menuOpenButtonStyle = menuOpenButtonStyle;
|
|
62
41
|
var filterMenuOpenButtonProps = function filterMenuOpenButtonProps(props) {
|
|
63
42
|
return (0, _util.filterProps)(props, ['open']);
|
|
64
43
|
};
|
|
65
44
|
var MenuOpenButton = function MenuOpenButton(props) {
|
|
66
|
-
return (0, _react.jsx)("div", (
|
|
45
|
+
return (0, _react.jsx)("div", _extends({
|
|
67
46
|
css: function css(theme) {
|
|
68
47
|
return menuOpenButtonStyle(theme, props);
|
|
69
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuOpenButton.js","names":["menuOpenButtonStyle","theme","open","display","div","backgroundColor","general","color","height","margin","transition","width","transform","undefined","opacity","media","QueryKeys","DESKTOP","filterMenuOpenButtonProps","props","filterProps","MenuOpenButton"],"sources":["MenuOpenButton.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 {Theme} from '../Theme';\n\nexport interface MenuOpenButtonProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuOpenButtonStyle: <T>(theme: Theme, props: MenuOpenButtonProps<T>) => CSSObject = (theme, {open}) => ({\n display: 'block',\n div: {\n backgroundColor: theme.general.color,\n height: '2px',\n margin: '4px',\n transition: 'all 0.25s ease-in-out',\n width: '16px',\n },\n 'div:nth-of-type(1)': {\n transform: open ? 'translateY(6px) rotate(-45deg)' : undefined,\n },\n 'div:nth-of-type(2)': {\n opacity: open ? 0 : undefined,\n transform: open ? 'scale(0, 1)' : undefined,\n },\n 'div:nth-of-type(3)': {\n transform: open ? 'translateY(-6px) rotate(45deg)' : undefined,\n },\n [media[QueryKeys.DESKTOP]]: {\n display: 'none',\n },\n zIndex: 2,\n});\n\nconst filterMenuOpenButtonProps = (props: MenuOpenButtonProps) => filterProps(props, ['open']);\n\nexport const MenuOpenButton = (props: MenuOpenButtonProps) => (\n <div css={(theme: Theme) => menuOpenButtonStyle(theme, props)} {...filterMenuOpenButtonProps(props)}>\n <div />\n <div />\n <div />\n </div>\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuOpenButton.js","names":["menuOpenButtonStyle","theme","open","display","div","backgroundColor","general","color","height","margin","transition","width","transform","undefined","opacity","media","QueryKeys","DESKTOP","filterMenuOpenButtonProps","props","filterProps","MenuOpenButton"],"sources":["MenuOpenButton.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 {Theme} from '../Theme';\n\nexport interface MenuOpenButtonProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuOpenButtonStyle: <T>(theme: Theme, props: MenuOpenButtonProps<T>) => CSSObject = (theme, {open}) => ({\n display: 'block',\n div: {\n backgroundColor: theme.general.color,\n height: '2px',\n margin: '4px',\n transition: 'all 0.25s ease-in-out',\n width: '16px',\n },\n 'div:nth-of-type(1)': {\n transform: open ? 'translateY(6px) rotate(-45deg)' : undefined,\n },\n 'div:nth-of-type(2)': {\n opacity: open ? 0 : undefined,\n transform: open ? 'scale(0, 1)' : undefined,\n },\n 'div:nth-of-type(3)': {\n transform: open ? 'translateY(-6px) rotate(45deg)' : undefined,\n },\n [media[QueryKeys.DESKTOP]]: {\n display: 'none',\n },\n zIndex: 2,\n});\n\nconst filterMenuOpenButtonProps = (props: MenuOpenButtonProps) => filterProps(props, ['open']);\n\nexport const MenuOpenButton = (props: MenuOpenButtonProps) => (\n <div css={(theme: Theme) => menuOpenButtonStyle(theme, props)} {...filterMenuOpenButtonProps(props)}>\n <div />\n <div />\n <div />\n </div>\n);\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AACA;AAAuC;AAAA;AAAA;AAOhC,IAAMA,mBAAkF,GAAG,SAArFA,mBAAkF,CAAIC,KAAK;EAAA;EAAA,IAAGC,IAAI,QAAJA,IAAI;EAAA;IAC7GC,OAAO,EAAE,OAAO;IAChBC,GAAG,EAAE;MACHC,eAAe,EAAEJ,KAAK,CAACK,OAAO,CAACC,KAAK;MACpCC,MAAM,EAAE,KAAK;MACbC,MAAM,EAAE,KAAK;MACbC,UAAU,EAAE,uBAAuB;MACnCC,KAAK,EAAE;IACT,CAAC;IACD,oBAAoB,EAAE;MACpBC,SAAS,EAAEV,IAAI,GAAG,gCAAgC,GAAGW;IACvD,CAAC;IACD,oBAAoB,EAAE;MACpBC,OAAO,EAAEZ,IAAI,GAAG,CAAC,GAAGW,SAAS;MAC7BD,SAAS,EAAEV,IAAI,GAAG,aAAa,GAAGW;IACpC,CAAC;IACD,oBAAoB,EAAE;MACpBD,SAAS,EAAEV,IAAI,GAAG,gCAAgC,GAAGW;IACvD;EAAC,0BACAE,mBAAK,CAACC,uBAAS,CAACC,OAAO,CAAC,EAAG;IAC1Bd,OAAO,EAAE;EACX,CAAC,oCACO,CAAC;AAAA,CACT;AAAC;AAEH,IAAMe,yBAAyB,GAAG,SAA5BA,yBAAyB,CAAIC,KAA0B;EAAA,OAAK,IAAAC,iBAAW,EAACD,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;AAAA;AAEvF,IAAME,cAAc,GAAG,SAAjBA,cAAc,CAAIF,KAA0B;EAAA,OACvD;IAAK,GAAG,EAAE,aAAClB,KAAY;MAAA,OAAKD,mBAAmB,CAACC,KAAK,EAAEkB,KAAK,CAAC;IAAA;EAAC,GAAKD,yBAAyB,CAACC,KAAK,CAAC,GACjG,4BAAO,EACP,4BAAO,EACP,4BAAO,CACH;AAAA,CACP;AAAC"}
|
|
@@ -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.menuScrollableItemsStyle = exports.MenuScrollableItems = 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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
* This program is free software: you can redistribute it and/or modify
|
|
18
|
-
* it under the terms of the GNU General Public License as published by
|
|
19
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
20
|
-
* (at your option) any later version.
|
|
21
|
-
*
|
|
22
|
-
* This program is distributed in the hope that it will be useful,
|
|
23
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
-
* GNU General Public License for more details.
|
|
26
|
-
*
|
|
27
|
-
* You should have received a copy of the GNU General Public License
|
|
28
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/** @jsx jsx */
|
|
33
|
-
|
|
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); }
|
|
12
|
+
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; }
|
|
34
13
|
var menuScrollableItemsStyle = function menuScrollableItemsStyle(props) {
|
|
35
|
-
return (
|
|
14
|
+
return _defineProperty({
|
|
36
15
|
alignItems: 'center',
|
|
37
16
|
alignSelf: 'center',
|
|
38
17
|
display: 'flex'
|
|
@@ -44,7 +23,7 @@ var menuScrollableItemsStyle = function menuScrollableItemsStyle(props) {
|
|
|
44
23
|
};
|
|
45
24
|
exports.menuScrollableItemsStyle = menuScrollableItemsStyle;
|
|
46
25
|
var MenuScrollableItems = function MenuScrollableItems(props) {
|
|
47
|
-
return (0, _react.jsx)("div", (
|
|
26
|
+
return (0, _react.jsx)("div", _extends({
|
|
48
27
|
css: menuScrollableItemsStyle(props)
|
|
49
28
|
}, props));
|
|
50
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuScrollableItems.js","names":["menuScrollableItemsStyle","props","alignItems","alignSelf","display","media","QueryKeys","TABLET_DOWN","flexDirection","margin","MenuScrollableItems"],"sources":["MenuScrollableItems.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';\n\nexport interface MenuScrollableItemsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuScrollableItemsStyle: <T>(props: MenuScrollableItemsProps<T>) => CSSObject = props => ({\n alignItems: 'center',\n alignSelf: 'center',\n display: 'flex',\n [media[QueryKeys.TABLET_DOWN]]: {\n alignItems: 'center',\n flexDirection: 'column',\n margin: 'auto',\n },\n});\n\nexport const MenuScrollableItems = (props: MenuScrollableItemsProps) => (\n <div css={menuScrollableItemsStyle(props)} {...props} />\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuScrollableItems.js","names":["menuScrollableItemsStyle","props","alignItems","alignSelf","display","media","QueryKeys","TABLET_DOWN","flexDirection","margin","MenuScrollableItems"],"sources":["MenuScrollableItems.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';\n\nexport interface MenuScrollableItemsProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n open?: boolean;\n}\n\nexport const menuScrollableItemsStyle: <T>(props: MenuScrollableItemsProps<T>) => CSSObject = props => ({\n alignItems: 'center',\n alignSelf: 'center',\n display: 'flex',\n [media[QueryKeys.TABLET_DOWN]]: {\n alignItems: 'center',\n flexDirection: 'column',\n margin: 'auto',\n },\n});\n\nexport const MenuScrollableItems = (props: MenuScrollableItemsProps) => (\n <div css={menuScrollableItemsStyle(props)} {...props} />\n);\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AAAoD;AAAA;AAAA;AAM7C,IAAMA,wBAA8E,GAAG,SAAjFA,wBAA8E,CAAGC,KAAK;EAAA;IACjGC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAE,QAAQ;IACnBC,OAAO,EAAE;EAAM,GACdC,mBAAK,CAACC,uBAAS,CAACC,WAAW,CAAC,EAAG;IAC9BL,UAAU,EAAE,QAAQ;IACpBM,aAAa,EAAE,QAAQ;IACvBC,MAAM,EAAE;EACV,CAAC;AAAA,CACD;AAAC;AAEI,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAIT,KAA+B;EAAA,OACjE;IAAK,GAAG,EAAED,wBAAwB,CAACC,KAAK;EAAE,GAAKA,KAAK,EAAI;AAAA,CACzD;AAAC"}
|
|
@@ -1,18 +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.menuSubLinkStyle = exports.MenuSubLink = 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 _motions = require("../../Identity/motions");
|
|
12
9
|
var _mediaQueries = require("../../mediaQueries");
|
|
13
10
|
var _Text = require("../../Text");
|
|
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); }
|
|
14
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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; }
|
|
16
15
|
var menuSubLinkStyle = function menuSubLinkStyle(theme, props) {
|
|
17
16
|
var _objectSpread2;
|
|
18
17
|
return _objectSpread(_objectSpread({}, (0, _Text.textStyle)(theme, props)), {}, (_objectSpread2 = {
|
|
@@ -24,7 +23,7 @@ var menuSubLinkStyle = function menuSubLinkStyle(theme, props) {
|
|
|
24
23
|
fontWeight: 600,
|
|
25
24
|
textDecoration: 'none',
|
|
26
25
|
transition: _motions.defaultTransition
|
|
27
|
-
}, (
|
|
26
|
+
}, _defineProperty(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], {
|
|
28
27
|
'&:first-of-type': {
|
|
29
28
|
marginLeft: 0
|
|
30
29
|
},
|
|
@@ -34,7 +33,7 @@ var menuSubLinkStyle = function menuSubLinkStyle(theme, props) {
|
|
|
34
33
|
fontSize: '11px',
|
|
35
34
|
margin: '0 26px 0 10px',
|
|
36
35
|
textTransform: 'uppercase'
|
|
37
|
-
}), (
|
|
36
|
+
}), _defineProperty(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.TABLET_DOWN], {
|
|
38
37
|
border: 'none',
|
|
39
38
|
fontSize: '32px !important',
|
|
40
39
|
fontWeight: '300 !important',
|
|
@@ -45,7 +44,7 @@ var menuSubLinkStyle = function menuSubLinkStyle(theme, props) {
|
|
|
45
44
|
};
|
|
46
45
|
exports.menuSubLinkStyle = menuSubLinkStyle;
|
|
47
46
|
var MenuSubLink = function MenuSubLink(props) {
|
|
48
|
-
return (0, _react.jsx)("div", (
|
|
47
|
+
return (0, _react.jsx)("div", _extends({
|
|
49
48
|
css: function css(theme) {
|
|
50
49
|
return menuSubLinkStyle(theme, props);
|
|
51
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSubLink.js","names":["menuSubLinkStyle","theme","props","textStyle","filter","color","general","cursor","fontWeight","textDecoration","transition","defaultTransition","media","QueryKeys","DESKTOP","marginLeft","marginRight","fontSize","margin","textTransform","TABLET_DOWN","border","maxWidth","padding","MenuSubLink"],"sources":["MenuSubLink.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';\n\nimport {defaultTransition} from '../../Identity/motions';\nimport {QueryKeys, media} from '../../mediaQueries';\nimport {TextProps, textStyle} from '../../Text';\nimport {Theme} from '../Theme';\n\ntype MenuSubLinkProps<T = HTMLDivElement> = TextProps<T>;\n\nexport const menuSubLinkStyle: <T>(theme: Theme, props: MenuSubLinkProps<T>) => CSSObject = (theme, props) => ({\n ...textStyle(theme, props),\n '&:hover': {\n filter: 'brightness(70%)',\n },\n color: theme.general.color,\n cursor: 'pointer',\n fontWeight: 600,\n textDecoration: 'none',\n transition: defaultTransition,\n [media[QueryKeys.DESKTOP]]: {\n '&:first-of-type': {\n marginLeft: 0,\n },\n '&:last-child': {\n marginRight: 0,\n },\n fontSize: '11px',\n margin: '0 26px 0 10px',\n textTransform: 'uppercase',\n },\n\n [media[QueryKeys.TABLET_DOWN]]: {\n border: 'none',\n fontSize: '32px !important',\n fontWeight: '300 !important',\n maxWidth: '480px',\n padding: '8px 24px',\n textTransform: 'none !important',\n },\n});\n\nexport const MenuSubLink = (props: MenuSubLinkProps) => (\n <div css={(theme: Theme) => menuSubLinkStyle(theme, props)} {...props} />\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuSubLink.js","names":["menuSubLinkStyle","theme","props","textStyle","filter","color","general","cursor","fontWeight","textDecoration","transition","defaultTransition","media","QueryKeys","DESKTOP","marginLeft","marginRight","fontSize","margin","textTransform","TABLET_DOWN","border","maxWidth","padding","MenuSubLink"],"sources":["MenuSubLink.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';\n\nimport {defaultTransition} from '../../Identity/motions';\nimport {QueryKeys, media} from '../../mediaQueries';\nimport {TextProps, textStyle} from '../../Text';\nimport {Theme} from '../Theme';\n\ntype MenuSubLinkProps<T = HTMLDivElement> = TextProps<T>;\n\nexport const menuSubLinkStyle: <T>(theme: Theme, props: MenuSubLinkProps<T>) => CSSObject = (theme, props) => ({\n ...textStyle(theme, props),\n '&:hover': {\n filter: 'brightness(70%)',\n },\n color: theme.general.color,\n cursor: 'pointer',\n fontWeight: 600,\n textDecoration: 'none',\n transition: defaultTransition,\n [media[QueryKeys.DESKTOP]]: {\n '&:first-of-type': {\n marginLeft: 0,\n },\n '&:last-child': {\n marginRight: 0,\n },\n fontSize: '11px',\n margin: '0 26px 0 10px',\n textTransform: 'uppercase',\n },\n\n [media[QueryKeys.TABLET_DOWN]]: {\n border: 'none',\n fontSize: '32px !important',\n fontWeight: '300 !important',\n maxWidth: '480px',\n padding: '8px 24px',\n textTransform: 'none !important',\n },\n});\n\nexport const MenuSubLink = (props: MenuSubLinkProps) => (\n <div css={(theme: Theme) => menuSubLinkStyle(theme, props)} {...props} />\n);\n"],"mappings":";;;;;;AAoBA;AAEA;AACA;AACA;AAAgD;AAAA;AAAA;AAAA;AAKzC,IAAMA,gBAA4E,GAAG,SAA/EA,gBAA4E,CAAIC,KAAK,EAAEC,KAAK;EAAA;EAAA,uCACpG,IAAAC,eAAS,EAACF,KAAK,EAAEC,KAAK,CAAC;IAC1B,SAAS,EAAE;MACTE,MAAM,EAAE;IACV,CAAC;IACDC,KAAK,EAAEJ,KAAK,CAACK,OAAO,CAACD,KAAK;IAC1BE,MAAM,EAAE,SAAS;IACjBC,UAAU,EAAE,GAAG;IACfC,cAAc,EAAE,MAAM;IACtBC,UAAU,EAAEC;EAAiB,mCAC5BC,mBAAK,CAACC,uBAAS,CAACC,OAAO,CAAC,EAAG;IAC1B,iBAAiB,EAAE;MACjBC,UAAU,EAAE;IACd,CAAC;IACD,cAAc,EAAE;MACdC,WAAW,EAAE;IACf,CAAC;IACDC,QAAQ,EAAE,MAAM;IAChBC,MAAM,EAAE,eAAe;IACvBC,aAAa,EAAE;EACjB,CAAC,mCAEAP,mBAAK,CAACC,uBAAS,CAACO,WAAW,CAAC,EAAG;IAC9BC,MAAM,EAAE,MAAM;IACdJ,QAAQ,EAAE,iBAAiB;IAC3BT,UAAU,EAAE,gBAAgB;IAC5Bc,QAAQ,EAAE,OAAO;IACjBC,OAAO,EAAE,UAAU;IACnBJ,aAAa,EAAE;EACjB,CAAC;AAAA,CACD;AAAC;AAEI,IAAMK,WAAW,GAAG,SAAdA,WAAW,CAAItB,KAAuB;EAAA,OACjD;IAAK,GAAG,EAAE,aAACD,KAAY;MAAA,OAAKD,gBAAgB,CAACC,KAAK,EAAEC,KAAK,CAAC;IAAA;EAAC,GAAKA,KAAK,EAAI;AAAA,CAC1E;AAAC"}
|
package/src/Menu/MenuModal.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
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.MenuModal = exports.MenuItem = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
8
|
var _react2 = _interopRequireDefault(require("react"));
|
|
13
9
|
var _Identity = require("../Identity/");
|
|
14
10
|
var _motions = require("../Identity/motions");
|
|
@@ -17,8 +13,13 @@ var _Overlay = require("../Modal/Overlay");
|
|
|
17
13
|
var _util = require("../util");
|
|
18
14
|
var _excluded = ["children", "onBackgroundClick"],
|
|
19
15
|
_excluded2 = ["children"];
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
+
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); }
|
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
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; }
|
|
22
23
|
var menuModalWrapperStyle = function menuModalWrapperStyle(props) {
|
|
23
24
|
return _objectSpread(_objectSpread({}, (0, _Overlay.overlayBackgroundStyle)(props)), {}, {
|
|
24
25
|
alignItems: 'flex-end',
|
|
@@ -29,14 +30,14 @@ var menuModalWrapperStyle = function menuModalWrapperStyle(props) {
|
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
var MenuModalWrapper = function MenuModalWrapper(props) {
|
|
32
|
-
return (0, _react.jsx)("div", (
|
|
33
|
+
return (0, _react.jsx)("div", _extends({
|
|
33
34
|
css: menuModalWrapperStyle
|
|
34
35
|
}, props));
|
|
35
36
|
};
|
|
36
37
|
var MenuModalBody = function MenuModalBody(props) {
|
|
37
|
-
return (0, _react.jsx)("div", (
|
|
38
|
+
return (0, _react.jsx)("div", _extends({
|
|
38
39
|
css: function css(theme) {
|
|
39
|
-
return (
|
|
40
|
+
return _defineProperty({
|
|
40
41
|
animation: "".concat(_motions.ANIMATION.bottomUpMovement, " ").concat(_motions.DURATION.DEFAULT, "ms ").concat(_motions.EASE.EXPONENTIAL),
|
|
41
42
|
backgroundColor: _Identity.COLOR.tint(theme.general.backgroundColor, 0.16),
|
|
42
43
|
boxShadow: '0 16px 64px 0 rgba(0, 0, 0, 0.16)',
|
|
@@ -56,7 +57,7 @@ var MenuModalBody = function MenuModalBody(props) {
|
|
|
56
57
|
}, props));
|
|
57
58
|
};
|
|
58
59
|
var MenuModalContent = function MenuModalContent(props) {
|
|
59
|
-
return (0, _react.jsx)("ul", (
|
|
60
|
+
return (0, _react.jsx)("ul", _extends({
|
|
60
61
|
css: /*#__PURE__*/(0, _react.css)({
|
|
61
62
|
li: {
|
|
62
63
|
borderBottom: "1px solid ".concat(_Identity.COLOR.GRAY_LIGHTEN_72)
|
|
@@ -77,7 +78,7 @@ var modalBackgroundStyle = function modalBackgroundStyle(props) {
|
|
|
77
78
|
});
|
|
78
79
|
};
|
|
79
80
|
var MenuModalBackground = function MenuModalBackground(props) {
|
|
80
|
-
return (0, _react.jsx)("div", (
|
|
81
|
+
return (0, _react.jsx)("div", _extends({
|
|
81
82
|
css: modalBackgroundStyle
|
|
82
83
|
}, props));
|
|
83
84
|
};
|
|
@@ -86,7 +87,7 @@ var MenuModal = function MenuModal(_ref2) {
|
|
|
86
87
|
children = _ref2$children === void 0 ? null : _ref2$children,
|
|
87
88
|
_ref2$onBackgroundCli = _ref2.onBackgroundClick,
|
|
88
89
|
onBackgroundClick = _ref2$onBackgroundCli === void 0 ? _util.noop : _ref2$onBackgroundCli,
|
|
89
|
-
props = (
|
|
90
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
90
91
|
return (0, _react.jsx)(MenuModalWrapper, props, (0, _react.jsx)(MenuModalBody, null, (0, _react.jsx)(MenuModalContent, null, children)), (0, _react.jsx)(MenuModalBackground, {
|
|
91
92
|
onClick: onBackgroundClick,
|
|
92
93
|
"data-uie-name": "menu-background"
|
|
@@ -96,8 +97,8 @@ exports.MenuModal = MenuModal;
|
|
|
96
97
|
var MenuItem = function MenuItem(_ref3) {
|
|
97
98
|
var _ref3$children = _ref3.children,
|
|
98
99
|
children = _ref3$children === void 0 ? null : _ref3$children,
|
|
99
|
-
props = (
|
|
100
|
-
return (0, _react.jsx)("li", (
|
|
100
|
+
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
101
|
+
return (0, _react.jsx)("li", _extends({
|
|
101
102
|
css: function css(theme) {
|
|
102
103
|
return {
|
|
103
104
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuModal.js","names":["menuModalWrapperStyle","props","overlayBackgroundStyle","alignItems","alignSelf","display","overflowY","padding","MenuModalWrapper","MenuModalBody","theme","animation","ANIMATION","bottomUpMovement","DURATION","DEFAULT","EASE","EXPONENTIAL","backgroundColor","COLOR","tint","general","boxShadow","flexDirection","justifyContent","marginLeft","marginRight","position","width","zIndex","media","QueryKeys","TABLET_DOWN","MenuModalContent","li","borderBottom","GRAY_LIGHTEN_72","margin","maxWidth","minWidth","modalBackgroundStyle","background","MenuModalBackground","MenuModal","children","onBackgroundClick","noop","MenuItem","color","cursor","height","listStyleType"],"sources":["MenuModal.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 {COLOR} from '../Identity/';\nimport {ANIMATION, DURATION, EASE} from '../Identity/motions';\nimport {Theme} from '../Layout';\nimport {QueryKeys, media} from '../mediaQueries';\nimport {OverlayBackgroundProps, OverlayWrapperProps, overlayBackgroundStyle} from '../Modal/Overlay';\nimport {noop} from '../util';\n\nconst menuModalWrapperStyle: <T>(props: OverlayWrapperProps<T>) => CSSObject = props => ({\n ...overlayBackgroundStyle(props),\n alignItems: 'flex-end',\n alignSelf: 'flex-end',\n display: 'flex',\n overflowY: 'hidden',\n padding: 0,\n});\n\nconst MenuModalWrapper = (props: OverlayWrapperProps) => <div css={menuModalWrapperStyle} {...props} />;\n\nconst MenuModalBody = (props: React.HTMLProps<HTMLDivElement>) => (\n <div\n css={(theme: Theme) => ({\n animation: `${ANIMATION.bottomUpMovement} ${DURATION.DEFAULT}ms ${EASE.EXPONENTIAL}`,\n backgroundColor: COLOR.tint(theme.general.backgroundColor, 0.16),\n boxShadow: '0 16px 64px 0 rgba(0, 0, 0, 0.16)',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n marginLeft: 'auto',\n marginRight: 'auto',\n padding: '8px 16px',\n position: 'relative',\n width: '767px',\n zIndex: 9999,\n [media[QueryKeys.TABLET_DOWN]]: {\n width: '100%',\n },\n })}\n {...props}\n />\n);\n\nconst MenuModalContent = (props: React.HTMLProps<HTMLUListElement>) => (\n <ul\n css={{\n li: {\n borderBottom: `1px solid ${COLOR.GRAY_LIGHTEN_72}`,\n },\n 'li:last-child': {\n borderBottom: 0,\n },\n margin: 0,\n maxWidth: '100%',\n minWidth: '100%',\n padding: 0,\n }}\n {...props}\n />\n);\n\nconst modalBackgroundStyle: <T>(props: OverlayBackgroundProps<T>) => CSSObject = props => ({\n ...overlayBackgroundStyle(props),\n background: 'rgba(50, 54, 57, 0.4)',\n});\n\nconst MenuModalBackground = (props: OverlayBackgroundProps) => <div css={modalBackgroundStyle} {...props} />;\n\ninterface MenuModalProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n onBackgroundClick?: () => void;\n}\n\nexport const MenuModal = ({\n children = null,\n onBackgroundClick = noop,\n ...props\n}: MenuModalProps & React.HTMLProps<HTMLDivElement>) => (\n <MenuModalWrapper {...props}>\n <MenuModalBody>\n <MenuModalContent>{children}</MenuModalContent>\n </MenuModalBody>\n <MenuModalBackground onClick={onBackgroundClick} data-uie-name=\"menu-background\" />\n </MenuModalWrapper>\n);\n\nexport type MenuItemProps<T = HTMLLIElement> = React.HTMLProps<T>;\n\nexport const MenuItem = ({children = null, ...props}: MenuItemProps & React.HTMLProps<HTMLLIElement>) => (\n <li\n css={(theme: Theme) => ({\n alignItems: 'center',\n color: theme.general.color,\n cursor: 'pointer',\n display: 'flex',\n height: '56px',\n listStyleType: 'none',\n maxWidth: '100%',\n })}\n {...props}\n >\n {children}\n </li>\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuModal.js","names":["menuModalWrapperStyle","props","overlayBackgroundStyle","alignItems","alignSelf","display","overflowY","padding","MenuModalWrapper","MenuModalBody","theme","animation","ANIMATION","bottomUpMovement","DURATION","DEFAULT","EASE","EXPONENTIAL","backgroundColor","COLOR","tint","general","boxShadow","flexDirection","justifyContent","marginLeft","marginRight","position","width","zIndex","media","QueryKeys","TABLET_DOWN","MenuModalContent","li","borderBottom","GRAY_LIGHTEN_72","margin","maxWidth","minWidth","modalBackgroundStyle","background","MenuModalBackground","MenuModal","children","onBackgroundClick","noop","MenuItem","color","cursor","height","listStyleType"],"sources":["MenuModal.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 {COLOR} from '../Identity/';\nimport {ANIMATION, DURATION, EASE} from '../Identity/motions';\nimport {Theme} from '../Layout';\nimport {QueryKeys, media} from '../mediaQueries';\nimport {OverlayBackgroundProps, OverlayWrapperProps, overlayBackgroundStyle} from '../Modal/Overlay';\nimport {noop} from '../util';\n\nconst menuModalWrapperStyle: <T>(props: OverlayWrapperProps<T>) => CSSObject = props => ({\n ...overlayBackgroundStyle(props),\n alignItems: 'flex-end',\n alignSelf: 'flex-end',\n display: 'flex',\n overflowY: 'hidden',\n padding: 0,\n});\n\nconst MenuModalWrapper = (props: OverlayWrapperProps) => <div css={menuModalWrapperStyle} {...props} />;\n\nconst MenuModalBody = (props: React.HTMLProps<HTMLDivElement>) => (\n <div\n css={(theme: Theme) => ({\n animation: `${ANIMATION.bottomUpMovement} ${DURATION.DEFAULT}ms ${EASE.EXPONENTIAL}`,\n backgroundColor: COLOR.tint(theme.general.backgroundColor, 0.16),\n boxShadow: '0 16px 64px 0 rgba(0, 0, 0, 0.16)',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n marginLeft: 'auto',\n marginRight: 'auto',\n padding: '8px 16px',\n position: 'relative',\n width: '767px',\n zIndex: 9999,\n [media[QueryKeys.TABLET_DOWN]]: {\n width: '100%',\n },\n })}\n {...props}\n />\n);\n\nconst MenuModalContent = (props: React.HTMLProps<HTMLUListElement>) => (\n <ul\n css={{\n li: {\n borderBottom: `1px solid ${COLOR.GRAY_LIGHTEN_72}`,\n },\n 'li:last-child': {\n borderBottom: 0,\n },\n margin: 0,\n maxWidth: '100%',\n minWidth: '100%',\n padding: 0,\n }}\n {...props}\n />\n);\n\nconst modalBackgroundStyle: <T>(props: OverlayBackgroundProps<T>) => CSSObject = props => ({\n ...overlayBackgroundStyle(props),\n background: 'rgba(50, 54, 57, 0.4)',\n});\n\nconst MenuModalBackground = (props: OverlayBackgroundProps) => <div css={modalBackgroundStyle} {...props} />;\n\ninterface MenuModalProps<T = HTMLDivElement> extends React.HTMLProps<T> {\n onBackgroundClick?: () => void;\n}\n\nexport const MenuModal = ({\n children = null,\n onBackgroundClick = noop,\n ...props\n}: MenuModalProps & React.HTMLProps<HTMLDivElement>) => (\n <MenuModalWrapper {...props}>\n <MenuModalBody>\n <MenuModalContent>{children}</MenuModalContent>\n </MenuModalBody>\n <MenuModalBackground onClick={onBackgroundClick} data-uie-name=\"menu-background\" />\n </MenuModalWrapper>\n);\n\nexport type MenuItemProps<T = HTMLLIElement> = React.HTMLProps<T>;\n\nexport const MenuItem = ({children = null, ...props}: MenuItemProps & React.HTMLProps<HTMLLIElement>) => (\n <li\n css={(theme: Theme) => ({\n alignItems: 'center',\n color: theme.general.color,\n cursor: 'pointer',\n display: 'flex',\n height: '56px',\n listStyleType: 'none',\n maxWidth: '100%',\n })}\n {...props}\n >\n {children}\n </li>\n);\n"],"mappings":";;;;;;AAoBA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAA6B;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE7B,IAAMA,qBAAsE,GAAG,SAAzEA,qBAAsE,CAAGC,KAAK;EAAA,uCAC/E,IAAAC,+BAAsB,EAACD,KAAK,CAAC;IAChCE,UAAU,EAAE,UAAU;IACtBC,SAAS,EAAE,UAAU;IACrBC,OAAO,EAAE,MAAM;IACfC,SAAS,EAAE,QAAQ;IACnBC,OAAO,EAAE;EAAC;AAAA,CACV;AAEF,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgB,CAAIP,KAA0B;EAAA,OAAK;IAAK,GAAG,EAAED;EAAsB,GAAKC,KAAK,EAAI;AAAA;AAEvG,IAAMQ,aAAa,GAAG,SAAhBA,aAAa,CAAIR,KAAsC;EAAA,OAC3D;IACE,GAAG,EAAE,aAACS,KAAY;MAAA;QAChBC,SAAS,YAAKC,kBAAS,CAACC,gBAAgB,cAAIC,iBAAQ,CAACC,OAAO,gBAAMC,aAAI,CAACC,WAAW,CAAE;QACpFC,eAAe,EAAEC,eAAK,CAACC,IAAI,CAACV,KAAK,CAACW,OAAO,CAACH,eAAe,EAAE,IAAI,CAAC;QAChEI,SAAS,EAAE,mCAAmC;QAC9CjB,OAAO,EAAE,MAAM;QACfkB,aAAa,EAAE,QAAQ;QACvBC,cAAc,EAAE,eAAe;QAC/BC,UAAU,EAAE,MAAM;QAClBC,WAAW,EAAE,MAAM;QACnBnB,OAAO,EAAE,UAAU;QACnBoB,QAAQ,EAAE,UAAU;QACpBC,KAAK,EAAE,OAAO;QACdC,MAAM,EAAE;MAAI,GACXC,mBAAK,CAACC,uBAAS,CAACC,WAAW,CAAC,EAAG;QAC9BJ,KAAK,EAAE;MACT,CAAC;IAAA;EACA,GACC3B,KAAK,EACT;AAAA,CACH;AAED,IAAMgC,gBAAgB,GAAG,SAAnBA,gBAAgB,CAAIhC,KAAwC;EAAA,OAChE;IACE,GAAG,+BAAE;MACHiC,EAAE,EAAE;QACFC,YAAY,sBAAehB,eAAK,CAACiB,eAAe;MAClD,CAAC;MACD,eAAe,EAAE;QACfD,YAAY,EAAE;MAChB,CAAC;MACDE,MAAM,EAAE,CAAC;MACTC,QAAQ,EAAE,MAAM;MAChBC,QAAQ,EAAE,MAAM;MAChBhC,OAAO,EAAE;IACX,CAAC;EAAC,GACEN,KAAK,EACT;AAAA,CACH;AAED,IAAMuC,oBAAwE,GAAG,SAA3EA,oBAAwE,CAAGvC,KAAK;EAAA,uCACjF,IAAAC,+BAAsB,EAACD,KAAK,CAAC;IAChCwC,UAAU,EAAE;EAAuB;AAAA,CACnC;AAEF,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAIzC,KAA6B;EAAA,OAAK;IAAK,GAAG,EAAEuC;EAAqB,GAAKvC,KAAK,EAAI;AAAA;AAMrG,IAAM0C,SAAS,GAAG,SAAZA,SAAS;EAAA,2BACpBC,QAAQ;IAARA,QAAQ,+BAAG,IAAI;IAAA,8BACfC,iBAAiB;IAAjBA,iBAAiB,sCAAGC,UAAI;IACrB7C,KAAK;EAAA,OAER,gBAAC,gBAAgB,EAAKA,KAAK,EACzB,gBAAC,aAAa,QACZ,gBAAC,gBAAgB,QAAE2C,QAAQ,CAAoB,CACjC,EAChB,gBAAC,mBAAmB;IAAC,OAAO,EAAEC,iBAAkB;IAAC,iBAAc;EAAiB,EAAG,CAClE;AAAA,CACpB;AAAC;AAIK,IAAME,QAAQ,GAAG,SAAXA,QAAQ;EAAA,2BAAKH,QAAQ;IAARA,QAAQ,+BAAG,IAAI;IAAK3C,KAAK;EAAA,OACjD;IACE,GAAG,EAAE,aAACS,KAAY;MAAA,OAAM;QACtBP,UAAU,EAAE,QAAQ;QACpB6C,KAAK,EAAEtC,KAAK,CAACW,OAAO,CAAC2B,KAAK;QAC1BC,MAAM,EAAE,SAAS;QACjB5C,OAAO,EAAE,MAAM;QACf6C,MAAM,EAAE,MAAM;QACdC,aAAa,EAAE,MAAM;QACrBb,QAAQ,EAAE;MACZ,CAAC;IAAA;EAAE,GACCrC,KAAK,GAER2C,QAAQ,CACN;AAAA,CACN;AAAC"}
|