@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.
Files changed (291) hide show
  1. package/package.json +2 -7
  2. package/src/Form/Button.js +8 -8
  3. package/src/Form/Button.js.map +1 -1
  4. package/src/Form/ButtonLink.js +7 -7
  5. package/src/Form/ButtonLink.js.map +1 -1
  6. package/src/Form/Checkbox.js +19 -19
  7. package/src/Form/Checkbox.js.map +1 -1
  8. package/src/Form/CodeInput.js +13 -9
  9. package/src/Form/CodeInput.js.map +1 -1
  10. package/src/Form/DropFileInput.js +15 -10
  11. package/src/Form/DropFileInput.js.map +1 -1
  12. package/src/Form/ErrorMessage.js +8 -8
  13. package/src/Form/ErrorMessage.js.map +1 -1
  14. package/src/Form/Form.js +3 -3
  15. package/src/Form/Form.js.map +1 -1
  16. package/src/Form/Input.js +16 -10
  17. package/src/Form/Input.js.map +1 -1
  18. package/src/Form/InputBlock.js +6 -27
  19. package/src/Form/InputBlock.js.map +1 -1
  20. package/src/Form/InputLabel.js +6 -5
  21. package/src/Form/InputLabel.js.map +1 -1
  22. package/src/Form/InputSubmitCombo.js +10 -10
  23. package/src/Form/InputSubmitCombo.js.map +1 -1
  24. package/src/Form/RangeInput.js +7 -6
  25. package/src/Form/RangeInput.js.map +1 -1
  26. package/src/Form/RangeInput.styles.js +3 -4
  27. package/src/Form/RangeInput.styles.js.map +1 -1
  28. package/src/Form/RoundIconButton.js +8 -7
  29. package/src/Form/RoundIconButton.js.map +1 -1
  30. package/src/Form/Select.js +8 -7
  31. package/src/Form/Select.js.map +1 -1
  32. package/src/Form/SelectComponents.js +9 -8
  33. package/src/Form/SelectComponents.js.map +1 -1
  34. package/src/Form/SelectStyles.js +2 -3
  35. package/src/Form/SelectStyles.js.map +1 -1
  36. package/src/Form/ShakeBox.js +8 -25
  37. package/src/Form/ShakeBox.js.map +1 -1
  38. package/src/Form/Switch.js +6 -6
  39. package/src/Form/Switch.js.map +1 -1
  40. package/src/Form/TextArea.js +5 -5
  41. package/src/Form/TextArea.js.map +1 -1
  42. package/src/Form/Tooltip.js +6 -5
  43. package/src/Form/Tooltip.js.map +1 -1
  44. package/src/GlobalStyle.js +3 -3
  45. package/src/GlobalStyle.js.map +1 -1
  46. package/src/Icon/AddPeopleIcon.js +4 -26
  47. package/src/Icon/AddPeopleIcon.js.map +1 -1
  48. package/src/Icon/ArchiveIcon.js +2 -24
  49. package/src/Icon/ArchiveIcon.js.map +1 -1
  50. package/src/Icon/ArrowDown.js +5 -24
  51. package/src/Icon/ArrowDown.js.map +1 -1
  52. package/src/Icon/ArrowIcon.js +5 -5
  53. package/src/Icon/ArrowIcon.js.map +1 -1
  54. package/src/Icon/AttachmentIcon.js +2 -24
  55. package/src/Icon/AttachmentIcon.js.map +1 -1
  56. package/src/Icon/AudioVideoIcon.js +2 -24
  57. package/src/Icon/AudioVideoIcon.js.map +1 -1
  58. package/src/Icon/BlockIcon.js +2 -24
  59. package/src/Icon/BlockIcon.js.map +1 -1
  60. package/src/Icon/Brand/AndroidIcon.js +2 -24
  61. package/src/Icon/Brand/AndroidIcon.js.map +1 -1
  62. package/src/Icon/Brand/AppleIcon.js +2 -24
  63. package/src/Icon/Brand/AppleIcon.js.map +1 -1
  64. package/src/Icon/Brand/ChromeIcon.js +2 -24
  65. package/src/Icon/Brand/ChromeIcon.js.map +1 -1
  66. package/src/Icon/Brand/FacebookIcon.js +2 -24
  67. package/src/Icon/Brand/FacebookIcon.js.map +1 -1
  68. package/src/Icon/Brand/GitHubIcon.js +2 -24
  69. package/src/Icon/Brand/GitHubIcon.js.map +1 -1
  70. package/src/Icon/Brand/LinkedInIcon.js +2 -24
  71. package/src/Icon/Brand/LinkedInIcon.js.map +1 -1
  72. package/src/Icon/Brand/LinuxIcon.js +2 -24
  73. package/src/Icon/Brand/LinuxIcon.js.map +1 -1
  74. package/src/Icon/Brand/MicrosoftIcon.js +2 -24
  75. package/src/Icon/Brand/MicrosoftIcon.js.map +1 -1
  76. package/src/Icon/Brand/TwitterIcon.js +2 -24
  77. package/src/Icon/Brand/TwitterIcon.js.map +1 -1
  78. package/src/Icon/CallIcon.js +2 -24
  79. package/src/Icon/CallIcon.js.map +1 -1
  80. package/src/Icon/CamIcon.js +2 -24
  81. package/src/Icon/CamIcon.js.map +1 -1
  82. package/src/Icon/CameraIcon.js +4 -26
  83. package/src/Icon/CameraIcon.js.map +1 -1
  84. package/src/Icon/CheckIcon.js +2 -24
  85. package/src/Icon/CheckIcon.js.map +1 -1
  86. package/src/Icon/CheckRoundIcon.js +2 -24
  87. package/src/Icon/CheckRoundIcon.js.map +1 -1
  88. package/src/Icon/ChevronIcon.js +5 -5
  89. package/src/Icon/ChevronIcon.js.map +1 -1
  90. package/src/Icon/CloseIcon.js +2 -24
  91. package/src/Icon/CloseIcon.js.map +1 -1
  92. package/src/Icon/CopyIcon.js +2 -24
  93. package/src/Icon/CopyIcon.js.map +1 -1
  94. package/src/Icon/DeviceIcon.js +2 -24
  95. package/src/Icon/DeviceIcon.js.map +1 -1
  96. package/src/Icon/DownloadIcon.js +2 -24
  97. package/src/Icon/DownloadIcon.js.map +1 -1
  98. package/src/Icon/EditDocumentIcon.js +4 -26
  99. package/src/Icon/EditDocumentIcon.js.map +1 -1
  100. package/src/Icon/EditIcon.js +2 -24
  101. package/src/Icon/EditIcon.js.map +1 -1
  102. package/src/Icon/EnterIcon.js +2 -24
  103. package/src/Icon/EnterIcon.js.map +1 -1
  104. package/src/Icon/ErrorIcon.js +2 -24
  105. package/src/Icon/ErrorIcon.js.map +1 -1
  106. package/src/Icon/FileIcon.js +2 -24
  107. package/src/Icon/FileIcon.js.map +1 -1
  108. package/src/Icon/GifIcon.js +2 -24
  109. package/src/Icon/GifIcon.js.map +1 -1
  110. package/src/Icon/GridIcon.js +4 -26
  111. package/src/Icon/GridIcon.js.map +1 -1
  112. package/src/Icon/GroupIcon.js +2 -24
  113. package/src/Icon/GroupIcon.js.map +1 -1
  114. package/src/Icon/HangupIcon.js +2 -24
  115. package/src/Icon/HangupIcon.js.map +1 -1
  116. package/src/Icon/HideIcon.js +2 -24
  117. package/src/Icon/HideIcon.js.map +1 -1
  118. package/src/Icon/ImageIcon.js +2 -24
  119. package/src/Icon/ImageIcon.js.map +1 -1
  120. package/src/Icon/InfoIcon.js +2 -24
  121. package/src/Icon/InfoIcon.js.map +1 -1
  122. package/src/Icon/InviteIcon.js +2 -24
  123. package/src/Icon/InviteIcon.js.map +1 -1
  124. package/src/Icon/LeaveIcon.js +2 -24
  125. package/src/Icon/LeaveIcon.js.map +1 -1
  126. package/src/Icon/LinkIcon.js +4 -26
  127. package/src/Icon/LinkIcon.js.map +1 -1
  128. package/src/Icon/ListIcon.js +2 -24
  129. package/src/Icon/ListIcon.js.map +1 -1
  130. package/src/Icon/LockIcon.js +2 -24
  131. package/src/Icon/LockIcon.js.map +1 -1
  132. package/src/Icon/MessageIcon.js +2 -24
  133. package/src/Icon/MessageIcon.js.map +1 -1
  134. package/src/Icon/MinusIcon.js +2 -24
  135. package/src/Icon/MinusIcon.js.map +1 -1
  136. package/src/Icon/MoreIcon.js +2 -24
  137. package/src/Icon/MoreIcon.js.map +1 -1
  138. package/src/Icon/MuteIcon.js +2 -24
  139. package/src/Icon/MuteIcon.js.map +1 -1
  140. package/src/Icon/NotificationIcon.js +2 -24
  141. package/src/Icon/NotificationIcon.js.map +1 -1
  142. package/src/Icon/NotificationOffIcon.js +2 -24
  143. package/src/Icon/NotificationOffIcon.js.map +1 -1
  144. package/src/Icon/OptionsIcon.js +2 -24
  145. package/src/Icon/OptionsIcon.js.map +1 -1
  146. package/src/Icon/PeopleIcon.js +4 -26
  147. package/src/Icon/PeopleIcon.js.map +1 -1
  148. package/src/Icon/PingIcon.js +2 -24
  149. package/src/Icon/PingIcon.js.map +1 -1
  150. package/src/Icon/PlaneIcon.js +2 -24
  151. package/src/Icon/PlaneIcon.js.map +1 -1
  152. package/src/Icon/PlusIcon.js +2 -24
  153. package/src/Icon/PlusIcon.js.map +1 -1
  154. package/src/Icon/ProfileIcon.js +2 -24
  155. package/src/Icon/ProfileIcon.js.map +1 -1
  156. package/src/Icon/RecordBoldIcon.js +5 -5
  157. package/src/Icon/RecordBoldIcon.js.map +1 -1
  158. package/src/Icon/RecordIcon.js +2 -24
  159. package/src/Icon/RecordIcon.js.map +1 -1
  160. package/src/Icon/RecordPendingIcon.js +2 -24
  161. package/src/Icon/RecordPendingIcon.js.map +1 -1
  162. package/src/Icon/ReloadIcon.js +2 -24
  163. package/src/Icon/ReloadIcon.js.map +1 -1
  164. package/src/Icon/SVGIcon.js +6 -5
  165. package/src/Icon/SVGIcon.js.map +1 -1
  166. package/src/Icon/ScreenshareIcon.js +2 -24
  167. package/src/Icon/ScreenshareIcon.js.map +1 -1
  168. package/src/Icon/SearchIcon.js +2 -24
  169. package/src/Icon/SearchIcon.js.map +1 -1
  170. package/src/Icon/ServicesIcon.js +2 -24
  171. package/src/Icon/ServicesIcon.js.map +1 -1
  172. package/src/Icon/SettingsIcon.js +2 -24
  173. package/src/Icon/SettingsIcon.js.map +1 -1
  174. package/src/Icon/ShowIcon.js +2 -24
  175. package/src/Icon/ShowIcon.js.map +1 -1
  176. package/src/Icon/SignIcon.js +2 -24
  177. package/src/Icon/SignIcon.js.map +1 -1
  178. package/src/Icon/SpeakerIcon.js +2 -24
  179. package/src/Icon/SpeakerIcon.js.map +1 -1
  180. package/src/Icon/SupportIcon.js +2 -24
  181. package/src/Icon/SupportIcon.js.map +1 -1
  182. package/src/Icon/TeamIcon.js +2 -24
  183. package/src/Icon/TeamIcon.js.map +1 -1
  184. package/src/Icon/TimedIcon.js +2 -24
  185. package/src/Icon/TimedIcon.js.map +1 -1
  186. package/src/Icon/TrashCrossIcon.js +2 -24
  187. package/src/Icon/TrashCrossIcon.js.map +1 -1
  188. package/src/Icon/TrashIcon.js +2 -24
  189. package/src/Icon/TrashIcon.js.map +1 -1
  190. package/src/Icon/TriangleIcon.js +5 -5
  191. package/src/Icon/TriangleIcon.js.map +1 -1
  192. package/src/Icon/UploadIcon.js +2 -24
  193. package/src/Icon/UploadIcon.js.map +1 -1
  194. package/src/Icon/WireIcon.js +2 -24
  195. package/src/Icon/WireIcon.js.map +1 -1
  196. package/src/Identity/Animation.js +18 -17
  197. package/src/Identity/Animation.js.map +1 -1
  198. package/src/Identity/Avatar.js +10 -27
  199. package/src/Identity/Avatar.js.map +1 -1
  200. package/src/Identity/AvatarGrid.js +8 -7
  201. package/src/Identity/AvatarGrid.js.map +1 -1
  202. package/src/Identity/Logo.js +7 -7
  203. package/src/Identity/Logo.js.map +1 -1
  204. package/src/Identity/colors-v2.js +2 -3
  205. package/src/Identity/colors-v2.js.map +1 -1
  206. package/src/Identity/colors.js +11 -6
  207. package/src/Identity/colors.js.map +1 -1
  208. package/src/Identity/motions.js +6 -7
  209. package/src/Identity/motions.js.map +1 -1
  210. package/src/Layout/Box.js +3 -24
  211. package/src/Layout/Box.js.map +1 -1
  212. package/src/Layout/Column.js +6 -27
  213. package/src/Layout/Column.js.map +1 -1
  214. package/src/Layout/Container.js +10 -31
  215. package/src/Layout/Container.js.map +1 -1
  216. package/src/Layout/Content.js +3 -24
  217. package/src/Layout/Content.js.map +1 -1
  218. package/src/Layout/FlexBox.js +3 -24
  219. package/src/Layout/FlexBox.js.map +1 -1
  220. package/src/Layout/Footer.js +1 -1
  221. package/src/Layout/Footer.js.map +1 -1
  222. package/src/Layout/Header.js +3 -24
  223. package/src/Layout/Header.js.map +1 -1
  224. package/src/Layout/MatchMedia.js +17 -35
  225. package/src/Layout/MatchMedia.js.map +1 -1
  226. package/src/Layout/Spacer.js +1 -1
  227. package/src/Layout/Spacer.js.map +1 -1
  228. package/src/Layout/StyledApp.js +6 -5
  229. package/src/Layout/StyledApp.js.map +1 -1
  230. package/src/Layout/Theme.js +7 -7
  231. package/src/Layout/Theme.js.map +1 -1
  232. package/src/Layout/headerMenu/HeaderMenu.js +13 -8
  233. package/src/Layout/headerMenu/HeaderMenu.js.map +1 -1
  234. package/src/Layout/headerMenu/HeaderSubMenu.js +10 -9
  235. package/src/Layout/headerMenu/HeaderSubMenu.js.map +1 -1
  236. package/src/Layout/headerMenu/MenuContent.js +4 -5
  237. package/src/Layout/headerMenu/MenuContent.js.map +1 -1
  238. package/src/Layout/headerMenu/MenuItems.js +5 -26
  239. package/src/Layout/headerMenu/MenuItems.js.map +1 -1
  240. package/src/Layout/headerMenu/MenuLink.js +10 -10
  241. package/src/Layout/headerMenu/MenuLink.js.map +1 -1
  242. package/src/Layout/headerMenu/MenuOpenButton.js +6 -27
  243. package/src/Layout/headerMenu/MenuOpenButton.js.map +1 -1
  244. package/src/Layout/headerMenu/MenuScrollableItems.js +5 -26
  245. package/src/Layout/headerMenu/MenuScrollableItems.js.map +1 -1
  246. package/src/Layout/headerMenu/MenuSubLink.js +6 -7
  247. package/src/Layout/headerMenu/MenuSubLink.js.map +1 -1
  248. package/src/Menu/MenuModal.js +14 -13
  249. package/src/Menu/MenuModal.js.map +1 -1
  250. package/src/Menu/TabBar.js +13 -12
  251. package/src/Menu/TabBar.js.map +1 -1
  252. package/src/Misc/ButtonGroup.js +7 -7
  253. package/src/Misc/ButtonGroup.js.map +1 -1
  254. package/src/Misc/IconButton.js +7 -7
  255. package/src/Misc/IconButton.js.map +1 -1
  256. package/src/Misc/IsInViewport.js +13 -8
  257. package/src/Misc/IsInViewport.js.map +1 -1
  258. package/src/Misc/Loading.js +8 -7
  259. package/src/Misc/Loading.js.map +1 -1
  260. package/src/Misc/Pagination.js +6 -5
  261. package/src/Misc/Pagination.js.map +1 -1
  262. package/src/Misc/Pill.js +7 -7
  263. package/src/Misc/Pill.js.map +1 -1
  264. package/src/Misc/childrenWithDefaultProps.js +3 -3
  265. package/src/Misc/childrenWithDefaultProps.js.map +1 -1
  266. package/src/Misc/useTimeout.js +7 -22
  267. package/src/Misc/useTimeout.js.map +1 -1
  268. package/src/Modal/Modal.js +13 -12
  269. package/src/Modal/Modal.js.map +1 -1
  270. package/src/Modal/Overlay.js +11 -10
  271. package/src/Modal/Overlay.js.map +1 -1
  272. package/src/Text/Heading.js +16 -16
  273. package/src/Text/Heading.js.map +1 -1
  274. package/src/Text/Label.js +9 -9
  275. package/src/Text/Label.js.map +1 -1
  276. package/src/Text/Line.js +3 -24
  277. package/src/Text/Line.js.map +1 -1
  278. package/src/Text/Link.js +8 -8
  279. package/src/Text/Link.js.map +1 -1
  280. package/src/Text/Paragraph.js +10 -10
  281. package/src/Text/Paragraph.js.map +1 -1
  282. package/src/Text/Text.js +8 -29
  283. package/src/Text/Text.js.map +1 -1
  284. package/src/Text/TextLink.js +7 -7
  285. package/src/Text/TextLink.js.map +1 -1
  286. package/src/Text/Title.js +7 -7
  287. package/src/Text/Title.js.map +1 -1
  288. package/src/mediaQueries.js +11 -7
  289. package/src/mediaQueries.js.map +1 -1
  290. package/src/util.js +10 -6
  291. package/src/util.js.map +1 -1
@@ -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":";;;;;;;;;;AAoBA;AAEA;AACA;AACA;AAEA;AAAkE;AAAA;AAAA;AAM3D,IAAMA,aAAsE,GAAG,SAAzEA,aAAsE,CACjFC,KAAK;EAAA;EAAA,qBACJC,IAAI;IAAJA,IAAI,0BAAG,IAAI;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AQ,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
+ {"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,IA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H;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
- * Wire
16
- * Copyright (C) 2018 Wire Swiss GmbH
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
- }, (0, _defineProperty2["default"])(_ref2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], {
36
+ }, _defineProperty(_ref2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], {
58
37
  display: 'none'
59
- }), (0, _defineProperty2["default"])(_ref2, "zIndex", 2), _ref2;
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", (0, _extends2["default"])({
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":";;;;;;;;;AAoBA;AACA;AAEA;AACA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAYO,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,2CACAE,mBAAK,CAACC,uBAAS,CAACC,OAAO,CAAC,EAAG;IAC1Bd,OAAO,EAAE;EACX,CAAC,qDACO,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
+ {"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
- * Wire
15
- * Copyright (C) 2018 Wire Swiss GmbH
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 (0, _defineProperty2["default"])({
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", (0, _extends2["default"])({
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":";;;;;;;;;AAoBA;AACA;AAEA;AAvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAUO,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
+ {"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) { (0, _defineProperty2["default"])(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 _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
- }, (0, _defineProperty2["default"])(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.DESKTOP], {
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
- }), (0, _defineProperty2["default"])(_objectSpread2, _mediaQueries.media[_mediaQueries.QueryKeys.TABLET_DOWN], {
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", (0, _extends2["default"])({
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":";;;;;;;;;AAoBA;AAEA;AACA;AACA;AAAgD;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,oDAC5BC,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,oDAEAP,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"}
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"}
@@ -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) { (0, _defineProperty2["default"])(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; }
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", (0, _extends2["default"])({
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", (0, _extends2["default"])({
38
+ return (0, _react.jsx)("div", _extends({
38
39
  css: function css(theme) {
39
- return (0, _defineProperty2["default"])({
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", (0, _extends2["default"])({
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", (0, _extends2["default"])({
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 = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
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 = (0, _objectWithoutProperties2["default"])(_ref3, _excluded2);
100
- return (0, _react.jsx)("li", (0, _extends2["default"])({
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":";;;;;;;;AAoBA;AAA8C;AAAA;AAC9C;AAEA;AACA;AAEA;AACA;AACA;AAA6B;EAAA;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,UA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AQ,+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"}
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;Q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,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"}
@@ -1,14 +1,9 @@
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.TabBarItem = exports.TabBar = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
12
7
  var _react = require("@emotion/react");
13
8
  var _react2 = _interopRequireDefault(require("react"));
14
9
  var _Identity = require("../Identity");
@@ -17,10 +12,16 @@ var _util = require("../util");
17
12
  var _excluded = ["children"],
18
13
  _excluded2 = ["block", "center", "color", "bold", "active", "fontSize", "textTransform"],
19
14
  _excluded3 = ["children"];
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
16
  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) { (0, _defineProperty2["default"])(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; }
17
+ 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; }
18
+ 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; }
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
+ 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; }
21
+ 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; }
22
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
22
23
  var tabBarStyle = function tabBarStyle(_ref) {
23
- (0, _objectDestructuringEmpty2["default"])(_ref);
24
+ _objectDestructuringEmpty(_ref);
24
25
  return {
25
26
  display: 'flex',
26
27
  width: '100%'
@@ -32,8 +33,8 @@ var filteredTabBarProps = function filteredTabBarProps(props) {
32
33
  var TabBar = function TabBar(_ref2) {
33
34
  var _ref2$children = _ref2.children,
34
35
  children = _ref2$children === void 0 ? null : _ref2$children,
35
- props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
36
- return (0, _react.jsx)("div", (0, _extends2["default"])({
36
+ props = _objectWithoutProperties(_ref2, _excluded);
37
+ return (0, _react.jsx)("div", _extends({
37
38
  css: tabBarStyle(props)
38
39
  }, filteredTabBarProps(props)), children);
39
40
  };
@@ -53,7 +54,7 @@ var tabBarItemStyle = function tabBarItemStyle(theme, _ref3) {
53
54
  fontSize = _ref3$fontSize === void 0 ? '11px' : _ref3$fontSize,
54
55
  _ref3$textTransform = _ref3.textTransform,
55
56
  textTransform = _ref3$textTransform === void 0 ? 'uppercase' : _ref3$textTransform,
56
- props = (0, _objectWithoutProperties2["default"])(_ref3, _excluded2);
57
+ props = _objectWithoutProperties(_ref3, _excluded2);
57
58
  return _objectSpread(_objectSpread({}, (0, _Text.textStyle)(theme, _objectSpread({
58
59
  block: block,
59
60
  bold: bold,
@@ -74,8 +75,8 @@ var tabBarItemStyle = function tabBarItemStyle(theme, _ref3) {
74
75
  var TabBarItem = function TabBarItem(_ref4) {
75
76
  var _ref4$children = _ref4.children,
76
77
  children = _ref4$children === void 0 ? null : _ref4$children,
77
- props = (0, _objectWithoutProperties2["default"])(_ref4, _excluded3);
78
- return (0, _react.jsx)("span", (0, _extends2["default"])({
78
+ props = _objectWithoutProperties(_ref4, _excluded3);
79
+ return (0, _react.jsx)("span", _extends({
79
80
  css: function css(theme) {
80
81
  return tabBarItemStyle(theme, props);
81
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TabBar.js","names":["tabBarStyle","display","width","filteredTabBarProps","props","filterProps","TabBar","children","tabBarItemStyle","theme","block","center","color","general","bold","active","fontSize","textTransform","textStyle","borderBottom","COLOR","GRAY_DARKEN_48","GRAY_LIGHTEN_40","cursor","flexGrow","justifyContent","opacity","padding","TabBarItem"],"sources":["TabBar.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2019 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 {Theme} from '../Layout';\nimport {TextProps, textStyle} from '../Text';\nimport {filterProps} from '../util';\n\nexport type TabBarProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nconst tabBarStyle: <T>(props: TabBarProps<T>) => CSSObject = ({}) => {\n return {\n display: 'flex',\n width: '100%',\n };\n};\n\nconst filteredTabBarProps = (props: TabBarProps) => filterProps(props, []);\n\nexport const TabBar = ({children = null, ...props}: TabBarProps) => (\n <div css={tabBarStyle(props)} {...filteredTabBarProps(props)}>\n {children}\n </div>\n);\n\nexport interface TabBarItemProps<T = HTMLSpanElement> extends TextProps<T> {\n active: boolean;\n}\n\nconst tabBarItemStyle: <T>(theme: Theme, props: TabBarItemProps<T>) => CSSObject = (\n theme,\n {\n block = true,\n center = true,\n color = theme.general.color,\n bold = true,\n active = false,\n fontSize = '11px',\n textTransform = 'uppercase',\n ...props\n },\n) => {\n return {\n ...textStyle(theme, {block, bold, center, color, fontSize, textTransform, ...props}),\n borderBottom: active ? `1px solid ${COLOR.GRAY_DARKEN_48}` : `1px solid ${COLOR.GRAY_LIGHTEN_40}`,\n cursor: 'pointer',\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'center',\n opacity: active ? 1 : 0.56,\n padding: '8px 0',\n };\n};\n\nexport const TabBarItem = ({children = null, ...props}: TabBarItemProps) => (\n <span css={(theme: Theme) => tabBarItemStyle(theme, props)} {...props}>\n {children}\n </span>\n);\n"],"mappings":";;;;;;;;;;;AAoBA;AACA;AAEA;AAEA;AACA;AAAoC;EAAA;EAAA;AAAA;AAAA;AAIpC,IAAMA,WAAoD,GAAG,SAAvDA,WAAoD,OAAW;EAAA;EACnE,OAAO;IACLC,OAAO,EAAE,MAAM;IACfC,KAAK,EAAE;EACT,CAAC;AACH,CAAC;AAED,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmB,CAAIC,KAAkB;EAAA,OAAK,IAAAC,iBAAW,EAACD,KAAK,EAAE,EAAE,CAAC;AAAA;AAEnE,IAAME,MAAM,GAAG,SAATA,MAAM;EAAA,2BAAKC,QAAQ;IAARA,QAAQ,+BAAG,IAAI;IAAKH,KAAK;EAAA,OAC/C;IAAK,GAAG,EAAEJ,WAAW,CAACI,KAAK;EAAE,GAAKD,mBAAmB,CAACC,KAAK,CAAC,GACzDG,QAAQ,CACL;AAAA,CACP;AAAC;AAMF,IAAMC,eAA0E,GAAG,SAA7EA,eAA0E,CAC9EC,KAAK,SAWF;EAAA,wBATDC,KAAK;IAALA,KAAK,4BAAG,IAAI;IAAA,qBACZC,MAAM;IAANA,MAAM,6BAAG,IAAI;IAAA,oBACbC,KAAK;IAALA,KAAK,4BAAGH,KAAK,CAACI,OAAO,CAACD,KAAK;IAAA,mBAC3BE,IAAI;IAAJA,IAAI,2BAAG,IAAI;IAAA,qBACXC,MAAM;IAANA,MAAM,6BAAG,KAAK;IAAA,uBACdC,QAAQ;IAARA,QAAQ,+BAAG,MAAM;IAAA,4BACjBC,aAAa;IAAbA,aAAa,oCAAG,WAAW;IACxBb,KAAK;EAGV,uCACK,IAAAc,eAAS,EAACT,KAAK;IAAGC,KAAK,EAALA,KAAK;IAAEI,IAAI,EAAJA,IAAI;IAAEH,MAAM,EAANA,MAAM;IAAEC,KAAK,EAALA,KAAK;IAAEI,QAAQ,EAARA,QAAQ;IAAEC,aAAa,EAAbA;EAAa,GAAKb,KAAK,EAAE;IACpFe,YAAY,EAAEJ,MAAM,uBAAgBK,eAAK,CAACC,cAAc,wBAAkBD,eAAK,CAACE,eAAe,CAAE;IACjGC,MAAM,EAAE,SAAS;IACjBtB,OAAO,EAAE,MAAM;IACfuB,QAAQ,EAAE,CAAC;IACXC,cAAc,EAAE,QAAQ;IACxBC,OAAO,EAAEX,MAAM,GAAG,CAAC,GAAG,IAAI;IAC1BY,OAAO,EAAE;EAAO;AAEpB,CAAC;AAEM,IAAMC,UAAU,GAAG,SAAbA,UAAU;EAAA,2BAAKrB,QAAQ;IAARA,QAAQ,+BAAG,IAAI;IAAKH,KAAK;EAAA,OACnD;IAAM,GAAG,EAAE,aAACK,KAAY;MAAA,OAAKD,eAAe,CAACC,KAAK,EAAEL,KAAK,CAAC;IAAA;EAAC,GAAKA,KAAK,GAClEG,QAAQ,CACJ;AAAA,CACR;AAAC"}
1
+ {"version":3,"file":"TabBar.js","names":["tabBarStyle","display","width","filteredTabBarProps","props","filterProps","TabBar","children","tabBarItemStyle","theme","block","center","color","general","bold","active","fontSize","textTransform","textStyle","borderBottom","COLOR","GRAY_DARKEN_48","GRAY_LIGHTEN_40","cursor","flexGrow","justifyContent","opacity","padding","TabBarItem"],"sources":["TabBar.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2019 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 {Theme} from '../Layout';\nimport {TextProps, textStyle} from '../Text';\nimport {filterProps} from '../util';\n\nexport type TabBarProps<T = HTMLDivElement> = React.HTMLProps<T>;\n\nconst tabBarStyle: <T>(props: TabBarProps<T>) => CSSObject = ({}) => {\n return {\n display: 'flex',\n width: '100%',\n };\n};\n\nconst filteredTabBarProps = (props: TabBarProps) => filterProps(props, []);\n\nexport const TabBar = ({children = null, ...props}: TabBarProps) => (\n <div css={tabBarStyle(props)} {...filteredTabBarProps(props)}>\n {children}\n </div>\n);\n\nexport interface TabBarItemProps<T = HTMLSpanElement> extends TextProps<T> {\n active: boolean;\n}\n\nconst tabBarItemStyle: <T>(theme: Theme, props: TabBarItemProps<T>) => CSSObject = (\n theme,\n {\n block = true,\n center = true,\n color = theme.general.color,\n bold = true,\n active = false,\n fontSize = '11px',\n textTransform = 'uppercase',\n ...props\n },\n) => {\n return {\n ...textStyle(theme, {block, bold, center, color, fontSize, textTransform, ...props}),\n borderBottom: active ? `1px solid ${COLOR.GRAY_DARKEN_48}` : `1px solid ${COLOR.GRAY_LIGHTEN_40}`,\n cursor: 'pointer',\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'center',\n opacity: active ? 1 : 0.56,\n padding: '8px 0',\n };\n};\n\nexport const TabBarItem = ({children = null, ...props}: TabBarItemProps) => (\n <span css={(theme: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C,aAAa,EAAbA;EAAa,GAAKb,KAAK,EAAE;IACpFe,YAAY,EAAEJ,MAAM,uBAAgBK,eAAK,CAACC,cAAc,wBAAkBD,eAAK,CAACE,eAAe,CAAE;IACjGC,MAAM,EAAE,SAAS;IACjBtB,OAAO,EAAE,MAAM;IACfuB,QAAQ,EAAE,CAAC;IACXC,cAAc,EAAE,QAAQ;IACxBC,OAAO,EAAEX,MAAM,GAAG,CAAC,GAAG,IAAI;IAC1BY,OAAO,EAAE;EAAO;AAEpB,CAAC;AAEM,IAAMC,UAAU,GAAG,SAAbA,UAAU;EAAA,2BAAKrB,QAAQ;IAARA,QAAQ,+BAAG,IAAI;IAAKH,KAAK;EAAA,OACnD;IAAM,GAAG,EAAE,aAACK,KAAY;MAAA,OAAKD,eAAe,CAACC,KAAK,EAAEL,KAAK,CAAC;IAAA;EAAC,GAAKA,KAAK,GAClEG,QAAQ,CACJ;AAAA,CACR;AAAC"}
@@ -1,18 +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.ButtonGroup = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
7
  var _react = require("@emotion/react");
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
8
  var _Identity = require("../Identity");
13
9
  var _excluded = ["children", "icon"];
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); }
11
+ 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; }
12
+ 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; }
14
13
  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) { (0, _defineProperty2["default"])(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 _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; }
15
+ 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
16
  var buttonGroupStyle = function buttonGroupStyle() {
17
17
  return {
18
18
  display: 'flex',
@@ -79,8 +79,8 @@ exports.ButtonGroup = ButtonGroup;
79
79
  var Button = function Button(_ref3) {
80
80
  var children = _ref3.children,
81
81
  icon = _ref3.icon,
82
- props = (0, _objectWithoutProperties2["default"])(_ref3, _excluded);
83
- return (0, _react.jsx)("button", (0, _extends2["default"])({
82
+ props = _objectWithoutProperties(_ref3, _excluded);
83
+ return (0, _react.jsx)("button", _extends({
84
84
  css: function css(theme) {
85
85
  return buttonStyle(theme, props);
86
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.js","names":["buttonGroupStyle","display","alignItems","buttonStyle","theme","disabled","height","borderRadius","padding","background","COLOR_V2","WHITE","border","GRAY_40","cursor","backgroundColor","GRAY_20","svg","fill","GRAY_70","BLACK","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","borderColor","GRAY_50","GRAY_60","BLUE_LIGHT_50","BLUE_LIGHT_300","BLUE","ButtonGroup","children","Button","icon","props","marginLeft","fontSize","fontWeight","lineHeight","letterSpacing"],"sources":["ButtonGroup.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2022 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 {ReactElement} from 'react';\n\nimport {COLOR_V2} from '../Identity';\nimport {Theme} from '../Layout';\nimport {IconButtonProps} from './IconButton';\n\nconst buttonGroupStyle: <T>(theme: Theme) => CSSObject = () => ({\n display: 'flex',\n alignItems: 'center',\n});\n\nconst buttonStyle: <T>(theme: Theme, props: IconButtonProps<T>) => CSSObject = (theme, {disabled = false}) => ({\n height: '32px',\n borderRadius: '12px',\n padding: '0 12px',\n background: COLOR_V2.WHITE,\n border: `1px solid ${COLOR_V2.GRAY_40}`,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n backgroundColor: disabled ? COLOR_V2.GRAY_20 : COLOR_V2.WHITE,\n svg: {\n fill: disabled ? COLOR_V2.GRAY_70 : COLOR_V2.BLACK,\n },\n '&:not(:last-child)': {\n borderTopRightRadius: '0',\n borderBottomRightRadius: '0',\n },\n '&:not(:first-child)': {\n borderTopLeftRadius: '0',\n borderBottomLeftRadius: '0',\n },\n '&:first-child:last-child': {\n borderRadius: '0',\n },\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.GRAY_20,\n },\n '&:hover': {\n borderColor: COLOR_V2.GRAY_50,\n },\n '&:focus': {\n borderColor: COLOR_V2.GRAY_60,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_50,\n borderColor: COLOR_V2.BLUE_LIGHT_300,\n svg: {\n fill: COLOR_V2.BLUE,\n },\n },\n }),\n});\n\ninterface GroupButtonProps<T = HTMLButtonElement> {\n children?: ReactElement | string;\n icon?: ReactElement;\n}\n\nconst ButtonGroup = ({children}) => (\n <div css={(theme: Theme) => buttonGroupStyle(theme)} role=\"group\" aria-label=\"Button Group\">\n {children}\n </div>\n);\n\nconst Button = ({children, icon, ...props}: GroupButtonProps) => {\n return (\n <button css={(theme: Theme) => buttonStyle(theme, props)} {...props}>\n {icon}\n {children && (\n <span\n css={{\n marginLeft: !!icon && '6px',\n fontSize: '12px',\n fontWeight: 'bold',\n lineHeight: '14px',\n letterSpacing: '0.25px',\n }}\n >\n {children}\n </span>\n )}\n </button>\n );\n};\n\nButtonGroup.Button = Button;\n\nexport {ButtonGroup};\n"],"mappings":";;;;;;;;AAoBA;AAA8C;AAAA;AAG9C;AAAqC;AAAA;AAAA;AAIrC,IAAMA,gBAAgD,GAAG,SAAnDA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F;EACF,CAAC;AAAA,CACD;AAOF,IAAMC,WAAW,GAAG,SAAdA,WAAW;EAAA,IAAKC,QAAQ,SAARA,QAAQ;EAAA,OAC5B;IAAK,GAAG,EAAE,aAAC5B,KAAY;MAAA,OAAKJ,gBAAgB,CAACI,KAAK,CAAC;IAAA,CAAC;IAAC,IAAI,EAAC,OAAO;IAAC,cAAW;EAAc,GACxF4B,QAAQ,CACL;AAAA,CACP;AAAC;AAEF,IAAMC,MAAM,GAAG,SAATA,MAAM,QAAqD;EAAA,IAAhDD,QAAQ,SAARA,QAAQ;IAAEE,IAAI,SAAJA,IAAI;IAAKC,KAAK;EACvC,OACE;IAAQ,GAAG,EAAE,aAAC/B,KAAY;MAAA,OAAKD,WAAW,CAACC,KAAK,EAAE+B,KAAK,CAAC;IAAA;EAAC,GAAKA,KAAK,GAChED,IAAI,EACJF,QAAQ,IACP;IACE,GAAG,+BAAE;MACHI,UAAU,EAAE,CAAC,CAACF,IAAI,IAAI,KAAK;MAC3BG,QAAQ,EAAE,MAAM;MAChBC,UAAU,EAAE,MAAM;MAClBC,UAAU,EAAE,MAAM;MAClBC,aAAa,EAAE;IACjB,CAAC;EAAC,GAEDR,QAAQ,CAEZ,CACM;AAEb,CAAC;AAEDD,WAAW,CAACE,MAAM,GAAGA,MAAM"}
1
+ {"version":3,"file":"ButtonGroup.js","names":["buttonGroupStyle","display","alignItems","buttonStyle","theme","disabled","height","borderRadius","padding","background","COLOR_V2","WHITE","border","GRAY_40","cursor","backgroundColor","GRAY_20","svg","fill","GRAY_70","BLACK","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","borderColor","GRAY_50","GRAY_60","BLUE_LIGHT_50","BLUE_LIGHT_300","BLUE","ButtonGroup","children","Button","icon","props","marginLeft","fontSize","fontWeight","lineHeight","letterSpacing"],"sources":["ButtonGroup.tsx"],"sourcesContent":["/*\n * Wire\n * Copyright (C) 2022 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 {ReactElement} from 'react';\n\nimport {COLOR_V2} from '../Identity';\nimport {Theme} from '../Layout';\nimport {IconButtonProps} from './IconButton';\n\nconst buttonGroupStyle: <T>(theme: Theme) => CSSObject = () => ({\n display: 'flex',\n alignItems: 'center',\n});\n\nconst buttonStyle: <T>(theme: Theme, props: IconButtonProps<T>) => CSSObject = (theme, {disabled = false}) => ({\n height: '32px',\n borderRadius: '12px',\n padding: '0 12px',\n background: COLOR_V2.WHITE,\n border: `1px solid ${COLOR_V2.GRAY_40}`,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n backgroundColor: disabled ? COLOR_V2.GRAY_20 : COLOR_V2.WHITE,\n svg: {\n fill: disabled ? COLOR_V2.GRAY_70 : COLOR_V2.BLACK,\n },\n '&:not(:last-child)': {\n borderTopRightRadius: '0',\n borderBottomRightRadius: '0',\n },\n '&:not(:first-child)': {\n borderTopLeftRadius: '0',\n borderBottomLeftRadius: '0',\n },\n '&:first-child:last-child': {\n borderRadius: '0',\n },\n ...(!disabled && {\n '&:hover, &:focus': {\n backgroundColor: COLOR_V2.GRAY_20,\n },\n '&:hover': {\n borderColor: COLOR_V2.GRAY_50,\n },\n '&:focus': {\n borderColor: COLOR_V2.GRAY_60,\n },\n '&:active': {\n backgroundColor: COLOR_V2.BLUE_LIGHT_50,\n borderColor: COLOR_V2.BLUE_LIGHT_300,\n svg: {\n fill: COLOR_V2.BLUE,\n },\n },\n }),\n});\n\ninterface GroupButtonProps<T = HTMLButtonElement> {\n children?: ReactElement | string;\n icon?: ReactElement;\n}\n\nconst ButtonGroup = ({children}) => (\n <div css={(theme: Theme) => buttonGroupStyle(theme)} role=\"group\" aria-label=\"Button Group\">\n {children}\n </div>\n);\n\nconst Button = ({children, icon, ...props}: GroupButtonProps) => {\n return (\n <button css={(theme: Theme) => buttonStyle(theme, props)} {...props}>\n {icon}\n {children && (\n <span\n css={{\n marginLeft: !!icon && '6px',\n fontSize: '12px',\n fontWeight: 'bold',\n lineHeight: '14px',\n letterSpacing: '0.25px',\n }}\n >\n {children}\n </span>\n )}\n </button>\n );\n};\n\nButtonGroup.Button = Button;\n\nexport {ButtonGroup};\n"],"mappings":";;;;;;AAoBA;AAGA;AAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIrC,IAAMA,gBAAgD,GAAG,SAAnDA,gBAAgD;EAAA,OAAU;IAC9DC,OAAO,EAAE,MAAM;IACfC,UAAU,EAAE;EACd,CAAC;AAAA,CAAC;AAEF,IAAMC,WAAsE,GAAG,SAAzEA,WAAsE,CAAIC,KAAK;EAAA,yBAAGC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;EAAA;IACtGC,MAAM,EAAE,MAAM;IACdC,YAAY,EAAE,MAAM;IACpBC,OAAO,EAAE,QAAQ;IACjBC,UAAU,EAAEC,kBAAQ,CAACC,KAAK;IAC1BC,MAAM,sBAAeF,kBAAQ,CAACG,OAAO,CAAE;IACvCC,MAAM,EAAE,SAAS;IACjBb,OAAO,EAAE,MAAM;IACfC,UAAU,EAAE,QAAQ;IACpBa,eAAe,EAAEV,QAAQ,GAAGK,kBAAQ,CAACM,OAAO,GAAGN,kBAAQ,CAACC,KAAK;IAC7DM,GAAG,EAAE;MACHC,IAAI,EAAEb,QAAQ,GAAGK,kBAAQ,CAACS,OAAO,GAAGT,kBAAQ,CAACU;IAC/C,CAAC;IACD,oBAAoB,EAAE;MACpBC,oBAAoB,EAAE,GAAG;MACzBC,uBAAuB,EAAE;IAC3B,CAAC;IACD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C;EAAC,GAEDR,QAAQ,CAEZ,CACM;AAEb,CAAC;AAEDD,WAAW,CAACE,MAAM,GAAGA,MAAM"}
@@ -1,20 +1,20 @@
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.iconButtonStyle = exports.IconButtonVariant = exports.IconButton = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
7
  var _react = require("@emotion/react");
12
8
  var _motions = require("../Identity/motions");
13
9
  var _Text = require("../Text");
14
10
  var _util = require("../util");
15
11
  var _excluded = ["children"];
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 _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; }
14
+ 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; }
16
15
  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; }
17
- 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) { (0, _defineProperty2["default"])(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 _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; }
17
+ 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; }
18
18
  var IconButtonVariant;
19
19
  exports.IconButtonVariant = IconButtonVariant;
20
20
  (function (IconButtonVariant) {
@@ -91,8 +91,8 @@ var iconButtonStyle = function iconButtonStyle(theme, _ref) {
91
91
  exports.iconButtonStyle = iconButtonStyle;
92
92
  var IconButton = function IconButton(_ref2) {
93
93
  var children = _ref2.children,
94
- props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
95
- return (0, _react.jsx)("button", (0, _extends2["default"])({
94
+ props = _objectWithoutProperties(_ref2, _excluded);
95
+ return (0, _react.jsx)("button", _extends({
96
96
  css: function css(theme) {
97
97
  return iconButtonStyle(theme, props);
98
98
  }