@wireapp/react-ui-kit 9.18.0 → 9.18.1

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 (183) hide show
  1. package/lib/Form/Button.js +1 -15
  2. package/lib/Form/Button.styles.js +157 -110
  3. package/lib/Form/ButtonLink.d.ts.map +1 -1
  4. package/lib/Form/ButtonLink.js +5 -16
  5. package/lib/Form/Checkbox.js +75 -45
  6. package/lib/Form/CodeInput.js +17 -6
  7. package/lib/Form/DropFileInput.js +5 -14
  8. package/lib/Form/ErrorMessage.js +8 -19
  9. package/lib/Form/Form.d.ts.map +1 -1
  10. package/lib/Form/Form.js +2 -2
  11. package/lib/Form/IndicatorRangeInput.js +6 -19
  12. package/lib/Form/IndicatorRangeInput.styles.js +36 -6
  13. package/lib/Form/Input.js +21 -18
  14. package/lib/Form/InputBlock.d.ts +1 -1
  15. package/lib/Form/InputBlock.d.ts.map +1 -1
  16. package/lib/Form/InputBlock.js +1 -1
  17. package/lib/Form/InputLabel.js +6 -20
  18. package/lib/Form/InputSubmitCombo.js +22 -25
  19. package/lib/Form/RangeInput.d.ts +0 -1
  20. package/lib/Form/RangeInput.d.ts.map +1 -1
  21. package/lib/Form/RangeInput.js +2 -14
  22. package/lib/Form/RangeInput.styles.js +26 -14
  23. package/lib/Form/RoundIconButton.js +14 -16
  24. package/lib/Form/Select.d.ts.map +1 -1
  25. package/lib/Form/Select.js +9 -16
  26. package/lib/Form/SelectComponents.d.ts.map +1 -1
  27. package/lib/Form/SelectComponents.js +21 -35
  28. package/lib/Form/SelectStyles.js +164 -82
  29. package/lib/Form/TextArea.js +11 -4
  30. package/lib/Form/Tooltip.js +2 -14
  31. package/lib/GlobalStyle.d.ts +0 -1
  32. package/lib/GlobalStyle.d.ts.map +1 -1
  33. package/lib/GlobalStyle.js +17 -3
  34. package/lib/Icon/AddPeopleIcon.js +1 -15
  35. package/lib/Icon/ArchiveIcon.js +1 -1
  36. package/lib/Icon/ArrowDown.js +1 -15
  37. package/lib/Icon/ArrowIcon.js +1 -15
  38. package/lib/Icon/AttachmentIcon.js +1 -1
  39. package/lib/Icon/AudioVideoIcon.js +1 -1
  40. package/lib/Icon/BlockIcon.js +1 -1
  41. package/lib/Icon/Brand/AndroidIcon.js +1 -1
  42. package/lib/Icon/Brand/AppleIcon.js +1 -1
  43. package/lib/Icon/Brand/ChromeIcon.js +1 -1
  44. package/lib/Icon/Brand/FacebookIcon.js +1 -1
  45. package/lib/Icon/Brand/GitHubIcon.js +1 -1
  46. package/lib/Icon/Brand/LinkedInIcon.js +1 -1
  47. package/lib/Icon/Brand/LinuxIcon.js +1 -1
  48. package/lib/Icon/Brand/MicrosoftIcon.js +1 -1
  49. package/lib/Icon/Brand/TwitterIcon.js +1 -1
  50. package/lib/Icon/CallIcon.js +1 -1
  51. package/lib/Icon/CamIcon.js +1 -1
  52. package/lib/Icon/CameraIcon.js +1 -15
  53. package/lib/Icon/CertificateExpired.js +1 -1
  54. package/lib/Icon/CertificateRevoked.js +1 -1
  55. package/lib/Icon/CheckIcon.js +1 -1
  56. package/lib/Icon/CheckRoundIcon.js +1 -1
  57. package/lib/Icon/ChevronIcon.js +1 -15
  58. package/lib/Icon/CircleCloseIcon.js +1 -1
  59. package/lib/Icon/CloseIcon.js +1 -1
  60. package/lib/Icon/CopyIcon.js +1 -1
  61. package/lib/Icon/DeviceIcon.js +1 -1
  62. package/lib/Icon/DownloadIcon.js +1 -1
  63. package/lib/Icon/EditDocumentIcon.js +1 -15
  64. package/lib/Icon/EditIcon.js +1 -1
  65. package/lib/Icon/EnterIcon.js +1 -1
  66. package/lib/Icon/ErrorIcon.js +1 -1
  67. package/lib/Icon/ExpiresSoon.js +1 -1
  68. package/lib/Icon/FileIcon.js +1 -1
  69. package/lib/Icon/GifIcon.js +1 -1
  70. package/lib/Icon/GridIcon.js +1 -15
  71. package/lib/Icon/GroupIcon.js +1 -1
  72. package/lib/Icon/HangupIcon.js +1 -1
  73. package/lib/Icon/HideIcon.js +1 -1
  74. package/lib/Icon/ImageIcon.js +1 -1
  75. package/lib/Icon/InfoIcon.js +1 -1
  76. package/lib/Icon/InviteIcon.js +1 -1
  77. package/lib/Icon/LeaveIcon.js +1 -1
  78. package/lib/Icon/LinkIcon.js +1 -15
  79. package/lib/Icon/ListIcon.js +1 -1
  80. package/lib/Icon/LockIcon.js +1 -1
  81. package/lib/Icon/MLSVerified.js +1 -1
  82. package/lib/Icon/MessageIcon.js +1 -1
  83. package/lib/Icon/MinusIcon.js +1 -1
  84. package/lib/Icon/MoreIcon.js +1 -1
  85. package/lib/Icon/MuteIcon.js +1 -1
  86. package/lib/Icon/NotificationIcon.js +1 -1
  87. package/lib/Icon/NotificationOffIcon.js +1 -1
  88. package/lib/Icon/OptionsIcon.js +1 -1
  89. package/lib/Icon/OutlineCheck.js +1 -1
  90. package/lib/Icon/PeopleIcon.js +1 -15
  91. package/lib/Icon/PingIcon.js +1 -1
  92. package/lib/Icon/PlaneIcon.js +1 -1
  93. package/lib/Icon/PlusIcon.js +1 -1
  94. package/lib/Icon/ProfileIcon.js +1 -1
  95. package/lib/Icon/ProteusVerified.js +1 -1
  96. package/lib/Icon/RecordBoldIcon.js +4 -18
  97. package/lib/Icon/RecordIcon.js +1 -1
  98. package/lib/Icon/RecordPendingIcon.js +1 -1
  99. package/lib/Icon/ReloadIcon.js +1 -1
  100. package/lib/Icon/SVGIcon.js +2 -14
  101. package/lib/Icon/ScreenshareIcon.js +1 -1
  102. package/lib/Icon/SearchIcon.js +1 -1
  103. package/lib/Icon/ServicesIcon.js +1 -1
  104. package/lib/Icon/SettingsIcon.js +1 -1
  105. package/lib/Icon/ShowIcon.js +1 -1
  106. package/lib/Icon/SignIcon.js +1 -1
  107. package/lib/Icon/SpeakerIcon.js +1 -1
  108. package/lib/Icon/StarIcon.js +1 -1
  109. package/lib/Icon/SupportIcon.js +1 -1
  110. package/lib/Icon/TeamIcon.js +1 -1
  111. package/lib/Icon/TimedIcon.js +1 -1
  112. package/lib/Icon/TrashCrossIcon.js +1 -1
  113. package/lib/Icon/TrashIcon.js +1 -1
  114. package/lib/Icon/TriangleIcon.js +1 -15
  115. package/lib/Icon/UploadIcon.js +1 -1
  116. package/lib/Icon/VerificationShieldIcon.js +1 -4
  117. package/lib/Icon/WireIcon.js +1 -1
  118. package/lib/Identity/Animation.js +62 -88
  119. package/lib/Identity/Avatar.js +2 -2
  120. package/lib/Identity/AvatarGrid.js +4 -16
  121. package/lib/Identity/Logo.js +1 -15
  122. package/lib/Identity/colors-v2.js +25 -3
  123. package/lib/Identity/colors.js +11 -2
  124. package/lib/Layout/Box.d.ts +1 -1
  125. package/lib/Layout/Box.d.ts.map +1 -1
  126. package/lib/Layout/Box.js +1 -1
  127. package/lib/Layout/Column.d.ts +1 -1
  128. package/lib/Layout/Column.d.ts.map +1 -1
  129. package/lib/Layout/Column.js +2 -2
  130. package/lib/Layout/Container.js +6 -20
  131. package/lib/Layout/Content.d.ts +1 -1
  132. package/lib/Layout/Content.d.ts.map +1 -1
  133. package/lib/Layout/Content.js +1 -1
  134. package/lib/Layout/FlexBox.js +1 -1
  135. package/lib/Layout/Footer.d.ts.map +1 -1
  136. package/lib/Layout/Footer.js +1 -1
  137. package/lib/Layout/Header.d.ts +1 -1
  138. package/lib/Layout/Header.d.ts.map +1 -1
  139. package/lib/Layout/Header.js +1 -1
  140. package/lib/Layout/MatchMedia.js +8 -8
  141. package/lib/Layout/Spacer.js +1 -2
  142. package/lib/Layout/StyledApp.js +2 -16
  143. package/lib/Layout/headerMenu/HeaderMenu.js +2 -14
  144. package/lib/Layout/headerMenu/HeaderSubMenu.d.ts +1 -1
  145. package/lib/Layout/headerMenu/HeaderSubMenu.d.ts.map +1 -1
  146. package/lib/Layout/headerMenu/HeaderSubMenu.js +4 -16
  147. package/lib/Layout/headerMenu/MenuContent.js +14 -2
  148. package/lib/Layout/headerMenu/MenuItems.js +1 -1
  149. package/lib/Layout/headerMenu/MenuLink.js +28 -35
  150. package/lib/Layout/headerMenu/MenuOpenButton.js +1 -1
  151. package/lib/Layout/headerMenu/MenuScrollableItems.js +1 -1
  152. package/lib/Layout/headerMenu/MenuSubLink.js +15 -5
  153. package/lib/Menu/MenuModal.d.ts.map +1 -1
  154. package/lib/Menu/MenuModal.js +28 -35
  155. package/lib/Menu/TabBar.d.ts +1 -1
  156. package/lib/Menu/TabBar.d.ts.map +1 -1
  157. package/lib/Menu/TabBar.js +13 -22
  158. package/lib/Misc/ButtonGroup.js +38 -35
  159. package/lib/Misc/IconButton.js +63 -50
  160. package/lib/Misc/IsInViewport.js +2 -14
  161. package/lib/Misc/Loading.js +3 -15
  162. package/lib/Misc/Pagination.js +2 -14
  163. package/lib/Misc/Pill.js +1 -1
  164. package/lib/Misc/childrenWithDefaultProps.d.ts.map +1 -1
  165. package/lib/Misc/childrenWithDefaultProps.js +1 -1
  166. package/lib/Modal/Modal.js +11 -22
  167. package/lib/Modal/Overlay.d.ts +2 -2
  168. package/lib/Modal/Overlay.d.ts.map +1 -1
  169. package/lib/Modal/Overlay.js +5 -19
  170. package/lib/Text/Heading.js +49 -45
  171. package/lib/Text/Label.d.ts.map +1 -1
  172. package/lib/Text/Label.js +13 -23
  173. package/lib/Text/Line.js +1 -1
  174. package/lib/Text/Link.js +26 -31
  175. package/lib/Text/Paragraph.js +15 -23
  176. package/lib/Text/Text.js +6 -6
  177. package/lib/Text/TextLink.d.ts.map +1 -1
  178. package/lib/Text/TextLink.js +4 -16
  179. package/lib/Text/Title.js +5 -16
  180. package/lib/Theme/Theme.js +1 -1
  181. package/lib/mediaQueries.js +1 -1
  182. package/lib/util.js +1 -1
  183. package/package.json +3 -3
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.MenuItem = exports.MenuModal = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -18,9 +7,16 @@ const motions_1 = require("../Identity/motions");
18
7
  const mediaQueries_1 = require("../mediaQueries");
19
8
  const Overlay_1 = require("../Modal/Overlay");
20
9
  const util_1 = require("../util");
21
- const menuModalWrapperStyle = props => (Object.assign(Object.assign({}, (0, Overlay_1.overlayBackgroundStyle)(props)), { alignItems: 'flex-end', alignSelf: 'flex-end', display: 'flex', overflowY: 'hidden', padding: 0 }));
22
- const MenuModalWrapper = (props) => (0, jsx_runtime_1.jsx)("div", Object.assign({ css: menuModalWrapperStyle }, props));
23
- const MenuModalBody = (props) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: (theme) => ({
10
+ const menuModalWrapperStyle = props => ({
11
+ ...(0, Overlay_1.overlayBackgroundStyle)(props),
12
+ alignItems: 'flex-end',
13
+ alignSelf: 'flex-end',
14
+ display: 'flex',
15
+ overflowY: 'hidden',
16
+ padding: 0,
17
+ });
18
+ const MenuModalWrapper = (props) => (0, jsx_runtime_1.jsx)("div", { css: menuModalWrapperStyle, ...props });
19
+ const MenuModalBody = (props) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => ({
24
20
  animation: `${motions_1.ANIMATION.bottomUpMovement} ${motions_1.DURATION.DEFAULT}ms ${motions_1.EASE.EXPONENTIAL}`,
25
21
  backgroundColor: Identity_1.COLOR.tint(theme.general.backgroundColor, 0.16),
26
22
  boxShadow: '0 16px 64px 0 rgba(0, 0, 0, 0.16)',
@@ -36,8 +32,8 @@ const MenuModalBody = (props) => ((0, jsx_runtime_1.jsx)("div", Object.assign({
36
32
  [mediaQueries_1.media[mediaQueries_1.QueryKeys.TABLET_DOWN]]: {
37
33
  width: '100%',
38
34
  },
39
- }) }, props)));
40
- const MenuModalContent = (props) => ((0, jsx_runtime_1.jsx)("ul", Object.assign({ css: {
35
+ }), ...props }));
36
+ const MenuModalContent = (props) => ((0, jsx_runtime_1.jsx)("ul", { css: {
41
37
  li: {
42
38
  borderBottom: `1px solid ${Identity_1.COLOR.GRAY_LIGHTEN_72}`,
43
39
  },
@@ -48,24 +44,21 @@ const MenuModalContent = (props) => ((0, jsx_runtime_1.jsx)("ul", Object.assign(
48
44
  maxWidth: '100%',
49
45
  minWidth: '100%',
50
46
  padding: 0,
51
- } }, props)));
52
- const modalBackgroundStyle = props => (Object.assign(Object.assign({}, (0, Overlay_1.overlayBackgroundStyle)(props)), { background: 'rgba(50, 54, 57, 0.4)' }));
53
- const MenuModalBackground = (props) => (0, jsx_runtime_1.jsx)("div", Object.assign({ css: modalBackgroundStyle }, props));
54
- const MenuModal = (_a) => {
55
- var { children = null, onBackgroundClick = util_1.noop } = _a, props = __rest(_a, ["children", "onBackgroundClick"]);
56
- return ((0, jsx_runtime_1.jsxs)(MenuModalWrapper, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(MenuModalBody, { children: (0, jsx_runtime_1.jsx)(MenuModalContent, { children: children }) }), (0, jsx_runtime_1.jsx)(MenuModalBackground, { onClick: onBackgroundClick, "data-uie-name": "menu-background" })] })));
57
- };
47
+ }, ...props }));
48
+ const modalBackgroundStyle = props => ({
49
+ ...(0, Overlay_1.overlayBackgroundStyle)(props),
50
+ background: 'rgba(50, 54, 57, 0.4)',
51
+ });
52
+ const MenuModalBackground = (props) => (0, jsx_runtime_1.jsx)("div", { css: modalBackgroundStyle, ...props });
53
+ const MenuModal = ({ children = null, onBackgroundClick = util_1.noop, ...props }) => ((0, jsx_runtime_1.jsxs)(MenuModalWrapper, { ...props, children: [(0, jsx_runtime_1.jsx)(MenuModalBody, { children: (0, jsx_runtime_1.jsx)(MenuModalContent, { children: children }) }), (0, jsx_runtime_1.jsx)(MenuModalBackground, { onClick: onBackgroundClick, "data-uie-name": "menu-background" })] }));
58
54
  exports.MenuModal = MenuModal;
59
- const MenuItem = (_a) => {
60
- var { children = null } = _a, props = __rest(_a, ["children"]);
61
- return ((0, jsx_runtime_1.jsx)("li", Object.assign({ css: (theme) => ({
62
- alignItems: 'center',
63
- color: theme.general.color,
64
- cursor: 'pointer',
65
- display: 'flex',
66
- height: '56px',
67
- listStyleType: 'none',
68
- maxWidth: '100%',
69
- }) }, props, { children: children })));
70
- };
55
+ const MenuItem = ({ children = null, ...props }) => ((0, jsx_runtime_1.jsx)("li", { css: (theme) => ({
56
+ alignItems: 'center',
57
+ color: theme.general.color,
58
+ cursor: 'pointer',
59
+ display: 'flex',
60
+ height: '56px',
61
+ listStyleType: 'none',
62
+ maxWidth: '100%',
63
+ }), ...props, children: children }));
71
64
  exports.MenuItem = MenuItem;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TextProps } from '../Text';
3
3
  export type TabBarProps<T = HTMLDivElement> = React.HTMLProps<T>;
4
- export declare const TabBar: ({ children, ...props }: TabBarProps<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
+ export declare const TabBar: ({ children, ...props }: TabBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
5
  export interface TabBarItemProps<T = HTMLSpanElement> extends TextProps<T> {
6
6
  active: boolean;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/Menu/TabBar.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAC,SAAS,EAAY,MAAM,SAAS,CAAC;AAG7C,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAWjE,eAAO,MAAM,MAAM,2GAIlB,CAAC;AAEF,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,eAAe,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACxE,MAAM,EAAE,OAAO,CAAC;CACjB;AA2BD,eAAO,MAAM,UAAU,2BAAiC,eAAe,qDAItE,CAAC"}
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/Menu/TabBar.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAC,SAAS,EAAY,MAAM,SAAS,CAAC;AAG7C,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAWjE,eAAO,MAAM,MAAM,2BAAiC,WAAW,qDAI9D,CAAC;AAEF,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,eAAe,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACxE,MAAM,EAAE,OAAO,CAAC;CACjB;AA2BD,eAAO,MAAM,UAAU,2BAAiC,eAAe,qDAItE,CAAC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.TabBarItem = exports.TabBar = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -23,17 +12,19 @@ const tabBarStyle = ({}) => {
23
12
  };
24
13
  };
25
14
  const filteredTabBarProps = (props) => (0, util_1.filterProps)(props, []);
26
- const TabBar = (_a) => {
27
- var { children = null } = _a, props = __rest(_a, ["children"]);
28
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: tabBarStyle(props) }, filteredTabBarProps(props), { children: children })));
29
- };
15
+ const TabBar = ({ children = null, ...props }) => ((0, jsx_runtime_1.jsx)("div", { css: tabBarStyle(props), ...filteredTabBarProps(props), children: children }));
30
16
  exports.TabBar = TabBar;
31
- const tabBarItemStyle = (theme, _a) => {
32
- var { block = true, center = true, color = theme.general.color, bold = true, active = false, fontSize = theme.fontSizes.extraSmall, textTransform = 'uppercase' } = _a, props = __rest(_a, ["block", "center", "color", "bold", "active", "fontSize", "textTransform"]);
33
- return Object.assign(Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({ block, bold, center, color, fontSize, textTransform }, props))), { borderBottom: active ? `1px solid ${Identity_1.COLOR.GRAY_DARKEN_48}` : `1px solid ${Identity_1.COLOR.GRAY_LIGHTEN_40}`, cursor: 'pointer', display: 'flex', flexGrow: 1, justifyContent: 'center', opacity: active ? 1 : 0.56, padding: '8px 0' });
34
- };
35
- const TabBarItem = (_a) => {
36
- var { children = null } = _a, props = __rest(_a, ["children"]);
37
- return ((0, jsx_runtime_1.jsx)("span", Object.assign({ css: (theme) => tabBarItemStyle(theme, props) }, props, { children: children })));
17
+ const tabBarItemStyle = (theme, { block = true, center = true, color = theme.general.color, bold = true, active = false, fontSize = theme.fontSizes.extraSmall, textTransform = 'uppercase', ...props }) => {
18
+ return {
19
+ ...(0, Text_1.textStyle)(theme, { block, bold, center, color, fontSize, textTransform, ...props }),
20
+ borderBottom: active ? `1px solid ${Identity_1.COLOR.GRAY_DARKEN_48}` : `1px solid ${Identity_1.COLOR.GRAY_LIGHTEN_40}`,
21
+ cursor: 'pointer',
22
+ display: 'flex',
23
+ flexGrow: 1,
24
+ justifyContent: 'center',
25
+ opacity: active ? 1 : 0.56,
26
+ padding: '8px 0',
27
+ };
38
28
  };
29
+ const TabBarItem = ({ children = null, ...props }) => ((0, jsx_runtime_1.jsx)("span", { css: (theme) => tabBarItemStyle(theme, props), ...props, children: children }));
39
30
  exports.TabBarItem = TabBarItem;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.ButtonGroup = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -18,44 +7,58 @@ const buttonGroupStyle = () => ({
18
7
  display: 'flex',
19
8
  alignItems: 'center',
20
9
  });
21
- const buttonStyle = (_, { disabled = false }) => (Object.assign({ height: '32px', borderRadius: '12px', padding: '0 12px', background: Identity_1.COLOR_V2.WHITE, border: `1px solid ${Identity_1.COLOR_V2.GRAY_40}`, cursor: 'pointer', display: 'flex', alignItems: 'center', backgroundColor: disabled ? Identity_1.COLOR_V2.GRAY_20 : Identity_1.COLOR_V2.WHITE, svg: {
10
+ const buttonStyle = (_, { disabled = false }) => ({
11
+ height: '32px',
12
+ borderRadius: '12px',
13
+ padding: '0 12px',
14
+ background: Identity_1.COLOR_V2.WHITE,
15
+ border: `1px solid ${Identity_1.COLOR_V2.GRAY_40}`,
16
+ cursor: 'pointer',
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ backgroundColor: disabled ? Identity_1.COLOR_V2.GRAY_20 : Identity_1.COLOR_V2.WHITE,
20
+ svg: {
22
21
  fill: disabled ? Identity_1.COLOR_V2.GRAY_70 : Identity_1.COLOR_V2.BLACK,
23
- }, '&:not(:last-child)': {
22
+ },
23
+ '&:not(:last-child)': {
24
24
  borderTopRightRadius: '0',
25
25
  borderBottomRightRadius: '0',
26
- }, '&:not(:first-child)': {
26
+ },
27
+ '&:not(:first-child)': {
27
28
  borderTopLeftRadius: '0',
28
29
  borderBottomLeftRadius: '0',
29
- }, '&:first-child:last-child': {
30
- borderRadius: '0',
31
- } }, (!disabled && {
32
- '&:hover, &:focus': {
33
- backgroundColor: Identity_1.COLOR_V2.GRAY_20,
34
- },
35
- '&:hover': {
36
- borderColor: Identity_1.COLOR_V2.GRAY_50,
37
30
  },
38
- '&:focus': {
39
- borderColor: Identity_1.COLOR_V2.GRAY_60,
31
+ '&:first-child:last-child': {
32
+ borderRadius: '0',
40
33
  },
41
- '&:active': {
42
- backgroundColor: Identity_1.COLOR_V2.BLUE_LIGHT_50,
43
- borderColor: Identity_1.COLOR_V2.BLUE_LIGHT_300,
44
- svg: {
45
- fill: Identity_1.COLOR_V2.BLUE,
34
+ ...(!disabled && {
35
+ '&:hover, &:focus': {
36
+ backgroundColor: Identity_1.COLOR_V2.GRAY_20,
46
37
  },
47
- },
48
- })));
38
+ '&:hover': {
39
+ borderColor: Identity_1.COLOR_V2.GRAY_50,
40
+ },
41
+ '&:focus': {
42
+ borderColor: Identity_1.COLOR_V2.GRAY_60,
43
+ },
44
+ '&:active': {
45
+ backgroundColor: Identity_1.COLOR_V2.BLUE_LIGHT_50,
46
+ borderColor: Identity_1.COLOR_V2.BLUE_LIGHT_300,
47
+ svg: {
48
+ fill: Identity_1.COLOR_V2.BLUE,
49
+ },
50
+ },
51
+ }),
52
+ });
49
53
  const ButtonGroup = ({ children }) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => buttonGroupStyle(theme), role: "group", "aria-label": "Button Group", children: children }));
50
54
  exports.ButtonGroup = ButtonGroup;
51
- const Button = (_a) => {
52
- var { children, icon } = _a, props = __rest(_a, ["children", "icon"]);
53
- return ((0, jsx_runtime_1.jsxs)("button", Object.assign({ css: (theme) => buttonStyle(theme, props) }, props, { children: [icon, children && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({
55
+ const Button = ({ children, icon, ...props }) => {
56
+ return ((0, jsx_runtime_1.jsxs)("button", { css: (theme) => buttonStyle(theme, props), ...props, children: [icon, children && ((0, jsx_runtime_1.jsx)("span", { css: (theme) => ({
54
57
  marginLeft: !!icon && '6px',
55
58
  fontSize: theme.fontSizes.small,
56
59
  fontWeight: 'bold',
57
60
  lineHeight: '0.875rem',
58
61
  letterSpacing: '0.25px',
59
- }), children: children }))] })));
62
+ }), children: children }))] }));
60
63
  };
61
64
  ButtonGroup.Button = Button;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.IconButton = exports.iconButtonStyle = exports.IconButtonVariant = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -21,52 +10,76 @@ var IconButtonVariant;
21
10
  IconButtonVariant["PRIMARY"] = "primary";
22
11
  IconButtonVariant["SECONDARY"] = "secondary";
23
12
  })(IconButtonVariant || (exports.IconButtonVariant = IconButtonVariant = {}));
24
- const iconButtonStyle = (theme, { variant = IconButtonVariant.PRIMARY, backgroundColor, disabled = false }) => (Object.assign(Object.assign({ border: 0, borderRadius: '12px', cursor: disabled ? 'default' : 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', marginBottom: '16px', padding: 0, outline: 'none', textDecoration: 'none', touchAction: 'manipulation', transition: motions_1.defaultTransition, width: '40px', height: '32px', '&:hover, &:focus': {
25
- textDecoration: 'none',
26
- } }, (variant === IconButtonVariant.PRIMARY && Object.assign({ backgroundColor: disabled
27
- ? theme.IconButton.primaryDisabledBgColor
28
- : backgroundColor || theme.IconButton.primaryBgColor, border: disabled
29
- ? `1px solid ${theme.IconButton.primaryDisabledBorderColor}`
30
- : `1px solid ${theme.IconButton.primaryBorderColor}`, svg: {
31
- fill: disabled ? theme.Input.placeholderColor : theme.general.color,
32
- } }, (!disabled && {
13
+ const iconButtonStyle = (theme, { variant = IconButtonVariant.PRIMARY, backgroundColor, disabled = false }) => ({
14
+ border: 0,
15
+ borderRadius: '12px',
16
+ cursor: disabled ? 'default' : 'pointer',
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ justifyContent: 'center',
20
+ marginBottom: '16px',
21
+ padding: 0,
22
+ outline: 'none',
23
+ textDecoration: 'none',
24
+ touchAction: 'manipulation',
25
+ transition: motions_1.defaultTransition,
26
+ width: '40px',
27
+ height: '32px',
33
28
  '&:hover, &:focus': {
34
- backgroundColor: theme.IconButton.hoverPrimaryBgColor,
35
- },
36
- '&:hover': {
37
- borderColor: theme.IconButton.primaryHoverBorderColor,
38
- },
39
- '&:focus': {
40
- borderColor: theme.IconButton.focusBorderColor,
29
+ textDecoration: 'none',
41
30
  },
42
- '&:active': {
43
- backgroundColor: theme.IconButton.activePrimaryBgColor,
44
- borderColor: theme.IconButton.focusBorderColor,
31
+ ...(variant === IconButtonVariant.PRIMARY && {
32
+ backgroundColor: disabled
33
+ ? theme.IconButton.primaryDisabledBgColor
34
+ : backgroundColor || theme.IconButton.primaryBgColor,
35
+ border: disabled
36
+ ? `1px solid ${theme.IconButton.primaryDisabledBorderColor}`
37
+ : `1px solid ${theme.IconButton.primaryBorderColor}`,
45
38
  svg: {
46
- fill: theme.general.primaryColor,
39
+ fill: disabled ? theme.Input.placeholderColor : theme.general.color,
47
40
  },
48
- },
49
- })))), (variant === IconButtonVariant.SECONDARY && Object.assign({ backgroundColor: 'inherit', svg: {
50
- fill: disabled ? theme.Input.placeholderColor : theme.general.color,
51
- } }, (!disabled && {
52
- '&:hover, &:focus, &:active': {
41
+ ...(!disabled && {
42
+ '&:hover, &:focus': {
43
+ backgroundColor: theme.IconButton.hoverPrimaryBgColor,
44
+ },
45
+ '&:hover': {
46
+ borderColor: theme.IconButton.primaryHoverBorderColor,
47
+ },
48
+ '&:focus': {
49
+ borderColor: theme.IconButton.focusBorderColor,
50
+ },
51
+ '&:active': {
52
+ backgroundColor: theme.IconButton.activePrimaryBgColor,
53
+ borderColor: theme.IconButton.focusBorderColor,
54
+ svg: {
55
+ fill: theme.general.primaryColor,
56
+ },
57
+ },
58
+ }),
59
+ }),
60
+ ...(variant === IconButtonVariant.SECONDARY && {
61
+ backgroundColor: 'inherit',
53
62
  svg: {
54
- fill: theme.general.primaryColor,
63
+ fill: disabled ? theme.Input.placeholderColor : theme.general.color,
55
64
  },
56
- },
57
- '&:focus': {
58
- border: `1px solid ${theme.IconButton.focusBorderColor}`,
59
- },
60
- '&:active': {
61
- border: `1px solid ${theme.IconButton.secondaryActiveBorderColor}`,
62
- backgroundColor: theme.Input.backgroundColor,
63
- },
64
- })))));
65
+ ...(!disabled && {
66
+ '&:hover, &:focus, &:active': {
67
+ svg: {
68
+ fill: theme.general.primaryColor,
69
+ },
70
+ },
71
+ '&:focus': {
72
+ border: `1px solid ${theme.IconButton.focusBorderColor}`,
73
+ },
74
+ '&:active': {
75
+ border: `1px solid ${theme.IconButton.secondaryActiveBorderColor}`,
76
+ backgroundColor: theme.Input.backgroundColor,
77
+ },
78
+ }),
79
+ }),
80
+ });
65
81
  exports.iconButtonStyle = iconButtonStyle;
66
- const IconButton = (_a) => {
67
- var { children } = _a, props = __rest(_a, ["children"]);
68
- return ((0, jsx_runtime_1.jsx)("button", Object.assign({ css: (theme) => (0, exports.iconButtonStyle)(theme, props) }, filterButtonProps(props), { children: children })));
69
- };
82
+ const IconButton = ({ children, ...props }) => ((0, jsx_runtime_1.jsx)("button", { css: (theme) => (0, exports.iconButtonStyle)(theme, props), ...filterButtonProps(props), children: children }));
70
83
  exports.IconButton = IconButton;
71
84
  const filterButtonProps = (props) => {
72
85
  return (0, util_1.filterProps)((0, Text_1.filterTextProps)(props), ['backgroundColor']);
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.IsInViewport = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
@@ -32,8 +21,7 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
32
21
  *
33
22
  */
34
23
  const react_1 = require("react");
35
- const IsInViewport = (_a) => {
36
- var { onEnterViewport, disabled = false, checkViewportOnce = false } = _a, props = __rest(_a, ["onEnterViewport", "disabled", "checkViewportOnce"]);
24
+ const IsInViewport = ({ onEnterViewport, disabled = false, checkViewportOnce = false, ...props }) => {
37
25
  const element = (0, react_1.useRef)();
38
26
  (0, react_1.useEffect)(() => {
39
27
  let observer = undefined;
@@ -56,6 +44,6 @@ const IsInViewport = (_a) => {
56
44
  }
57
45
  };
58
46
  }, [onEnterViewport]);
59
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ ref: element }, props));
47
+ return (0, jsx_runtime_1.jsx)("div", { ref: element, ...props });
60
48
  };
61
49
  exports.IsInViewport = IsInViewport;
@@ -1,23 +1,11 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.Loading = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
16
5
  const react_1 = require("@emotion/react");
17
6
  const Identity_1 = require("../Identity");
18
7
  const motions_1 = require("../Identity/motions");
19
- const Loading = (_a) => {
20
- var { progress = undefined, size = 43, color = '#218fd1' } = _a, props = __rest(_a, ["progress", "size", "color"]);
8
+ const Loading = ({ progress = undefined, size = 43, color = '#218fd1', ...props }) => {
21
9
  const pathLength = 125.68;
22
10
  const rotationOffset = -0.75;
23
11
  const rotationDelay = motions_1.DURATION.EXTRA_LONG * rotationOffset;
@@ -29,12 +17,12 @@ const Loading = (_a) => {
29
17
  stroke-dashoffset: 0;
30
18
  }
31
19
  `;
32
- return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: size, height: size, viewBox: "0 0 43 43", strokeWidth: "3", fill: "none" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: "21.5", cy: "21.5", r: "20", stroke: Identity_1.COLOR.opaque(color, 0.08) }), (0, jsx_runtime_1.jsx)("circle", { css: !progress && {
20
+ return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 43 43", strokeWidth: "3", fill: "none", ...props, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "21.5", cy: "21.5", r: "20", stroke: Identity_1.COLOR.opaque(color, 0.08) }), (0, jsx_runtime_1.jsx)("circle", { css: !progress && {
33
21
  animation: `${fillAnimation} ${motions_1.DURATION.EXTRA_LONG}ms ease-in-out infinite,
34
22
  ${motions_1.ANIMATION.rotate} ${motions_1.DURATION.EXTRA_LONG}ms linear ${rotationDelay}ms infinite`,
35
23
  strokeDasharray: pathLength,
36
24
  transformOrigin: '50% 50%',
37
- }, cx: "21.5", cy: "21.5", r: "20", stroke: color, strokeLinecap: "round", strokeDasharray: pathLength, strokeDashoffset: progress && `${pathLength - pathLength * progress}` })] })));
25
+ }, cx: "21.5", cy: "21.5", r: "20", stroke: color, strokeLinecap: "round", strokeDasharray: pathLength, strokeDashoffset: progress && `${pathLength - pathLength * progress}` })] }));
38
26
  };
39
27
  exports.Loading = Loading;
40
28
  exports.Loading.defaultProps = {
@@ -1,23 +1,11 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.Pagination = void 0;
15
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
16
5
  const Identity_1 = require("../Identity");
17
6
  const Layout_1 = require("../Layout");
18
7
  const Text_1 = require("../Text");
19
- const Pagination = (_a) => {
20
- var { currentPage = 0, numberOfPages = 1, goPage, previousPageComponent: PreviousPageComponent = () => '<', nextPageComponent: NextPageComponent = () => '>' } = _a, props = __rest(_a, ["currentPage", "numberOfPages", "goPage", "previousPageComponent", "nextPageComponent"]);
8
+ const Pagination = ({ currentPage = 0, numberOfPages = 1, goPage, previousPageComponent: PreviousPageComponent = () => '<', nextPageComponent: NextPageComponent = () => '>', ...props }) => {
21
9
  const isLastPage = currentPage === numberOfPages - 1;
22
10
  const isFirstPage = currentPage === 0;
23
11
  const renderPageList = () => {
@@ -40,6 +28,6 @@ const Pagination = (_a) => {
40
28
  }
41
29
  return pages;
42
30
  };
43
- return ((0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, Object.assign({ align: "flex-end", "data-uie-name": "element-pagination" }, props, { children: [(0, jsx_runtime_1.jsx)("div", { css: { flexBasis: 100 }, children: !isFirstPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage - 1), "data-uie-name": "go-previous-page", children: (0, jsx_runtime_1.jsx)(PreviousPageComponent, {}) })) }), (0, jsx_runtime_1.jsx)("div", { css: { alignItems: 'flex-end', display: 'flex', flexDirection: 'row', margin: '0 auto' }, "data-uie-name": "list-pages", children: renderPageList() }), (0, jsx_runtime_1.jsx)("div", { css: { display: 'flex', flexBasis: 100, justifyContent: 'flex-end' }, children: !isLastPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage + 1), "data-uie-name": "go-next-page", children: (0, jsx_runtime_1.jsx)(NextPageComponent, {}) })) })] })));
31
+ return ((0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, { align: "flex-end", "data-uie-name": "element-pagination", ...props, children: [(0, jsx_runtime_1.jsx)("div", { css: { flexBasis: 100 }, children: !isFirstPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage - 1), "data-uie-name": "go-previous-page", children: (0, jsx_runtime_1.jsx)(PreviousPageComponent, {}) })) }), (0, jsx_runtime_1.jsx)("div", { css: { alignItems: 'flex-end', display: 'flex', flexDirection: 'row', margin: '0 auto' }, "data-uie-name": "list-pages", children: renderPageList() }), (0, jsx_runtime_1.jsx)("div", { css: { display: 'flex', flexBasis: 100, justifyContent: 'flex-end' }, children: !isLastPage && ((0, jsx_runtime_1.jsx)(Text_1.Link, { block: true, onClick: () => goPage(currentPage + 1), "data-uie-name": "go-next-page", children: (0, jsx_runtime_1.jsx)(NextPageComponent, {}) })) })] }));
44
32
  };
45
33
  exports.Pagination = Pagination;
package/lib/Misc/Pill.js CHANGED
@@ -52,5 +52,5 @@ const pillStyle = (theme, { active = false, type = null }) => {
52
52
  exports.pillStyle = pillStyle;
53
53
  const filterPillProps = (props) => (0, util_1.filterProps)(props, ['active']);
54
54
  exports.filterPillProps = filterPillProps;
55
- const Pill = (props) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ css: (theme) => (0, exports.pillStyle)(theme, props), "data-uie-name": "element-pill", "data-uie-status": props.type }, (0, exports.filterPillProps)(props))));
55
+ const Pill = (props) => ((0, jsx_runtime_1.jsx)("span", { css: (theme) => (0, exports.pillStyle)(theme, props), "data-uie-name": "element-pill", "data-uie-status": props.type, ...(0, exports.filterPillProps)(props) }));
56
56
  exports.Pill = Pill;
@@ -1 +1 @@
1
- {"version":3,"file":"childrenWithDefaultProps.d.ts","sourceRoot":"","sources":["../../src/Misc/childrenWithDefaultProps.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,wBAAwB,gDAA6C,cAAc,CAAC,EAAE,CAAC,CAAC,6IAYjG,CAAC"}
1
+ {"version":3,"file":"childrenWithDefaultProps.d.ts","sourceRoot":"","sources":["../../src/Misc/childrenWithDefaultProps.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,OAAO,EAAE,CAAC,yBAAqB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,6IAYjG,CAAC"}
@@ -52,6 +52,6 @@ const childrenWithDefaultProps = (props) => React.Children.map(props.children, n
52
52
  return node;
53
53
  }
54
54
  const elementChild = node;
55
- return React.cloneElement(elementChild, Object.assign(Object.assign({}, props.defaultProps), elementChild.props));
55
+ return React.cloneElement(elementChild, { ...props.defaultProps, ...elementChild.props });
56
56
  });
57
57
  exports.childrenWithDefaultProps = childrenWithDefaultProps;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
@@ -43,8 +32,8 @@ const modalBodyStyle = (theme, { fullscreen = false }) => ({
43
32
  },
44
33
  });
45
34
  const filterModalBodyProps = (props) => (0, util_1.filterProps)(props, ['fullscreen']);
46
- const ModalBody = (props) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: (theme) => modalBodyStyle(theme, props) }, filterModalBodyProps(props))));
47
- const ModalClose = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, Object.assign({ width: 16, height: 16, css: {
35
+ const ModalBody = (props) => ((0, jsx_runtime_1.jsx)("div", { css: (theme) => modalBodyStyle(theme, props), ...filterModalBodyProps(props) }));
36
+ const ModalClose = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, { width: 16, height: 16, css: {
48
37
  alignItems: 'center',
49
38
  cursor: 'pointer',
50
39
  display: 'flex',
@@ -52,14 +41,17 @@ const ModalClose = (props) => ((0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, Object.a
52
41
  position: 'absolute',
53
42
  right: 16,
54
43
  top: 16,
55
- } }, props)));
56
- const ModalContent = props => ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: {
44
+ }, ...props }));
45
+ const ModalContent = props => ((0, jsx_runtime_1.jsx)("div", { css: {
57
46
  maxWidth: '100%',
58
47
  overflowY: 'auto',
59
48
  padding: '40px',
60
- } }, props)));
61
- const modalBackgroundStyle = props => (Object.assign(Object.assign({}, (0, Overlay_1.overlayBackgroundStyle)(props)), { backgroundColor: 'rgba(50, 54, 57, 0.4)' }));
62
- const ModalBackground = (props) => (0, jsx_runtime_1.jsx)("div", Object.assign({ css: modalBackgroundStyle(props) }, props));
49
+ }, ...props }));
50
+ const modalBackgroundStyle = props => ({
51
+ ...(0, Overlay_1.overlayBackgroundStyle)(props),
52
+ backgroundColor: 'rgba(50, 54, 57, 0.4)',
53
+ });
54
+ const ModalBackground = (props) => (0, jsx_runtime_1.jsx)("div", { css: modalBackgroundStyle(props), ...props });
63
55
  const modalActionsWrapperStyles = () => ({
64
56
  borderTop: `1px solid ${Identity_1.COLOR.GRAY_LIGHTEN_72}`,
65
57
  bottom: 0,
@@ -96,10 +88,7 @@ const modalActionStyles = ({ bold }) => ({
96
88
  padding: '8px 0',
97
89
  });
98
90
  const ModalActions = ({ actions }) => ((0, jsx_runtime_1.jsx)("div", { css: modalActionsWrapperStyles(), children: actions.map(action => ((0, jsx_runtime_1.jsx)("div", { onClick: action.onClick, css: modalActionStyles({ bold: action.bold }), "data-uie-name": action.dataUieName, children: action.title }, action.title))) }));
99
- const Modal = (_a) => {
100
- var { actions = [], children, bodyStyle, fullscreen, onClose, onBackgroundClick } = _a, props = __rest(_a, ["actions", "children", "bodyStyle", "fullscreen", "onClose", "onBackgroundClick"]);
101
- return ((0, jsx_runtime_1.jsxs)(Overlay_1.OverlayWrapper, Object.assign({}, props, { "data-uie-name": "modal", children: [(0, jsx_runtime_1.jsxs)(ModalBody, { fullscreen: fullscreen, style: bodyStyle, children: [(0, jsx_runtime_1.jsx)(ModalContent, { children: children }), onClose !== util_1.noop && (0, jsx_runtime_1.jsx)(ModalClose, { onClick: onClose, "data-uie-name": "do-close" }), actions.length > 0 && (0, jsx_runtime_1.jsx)(ModalActions, { actions: actions, "data-uie-name": "modal-actions" })] }), !fullscreen && ((0, jsx_runtime_1.jsx)(ModalBackground, { onClick: onBackgroundClick === util_1.noop ? onClose : onBackgroundClick, "data-uie-name": "modal-background" }))] })));
102
- };
91
+ const Modal = ({ actions = [], children, bodyStyle, fullscreen, onClose, onBackgroundClick, ...props }) => ((0, jsx_runtime_1.jsxs)(Overlay_1.OverlayWrapper, { ...props, "data-uie-name": "modal", children: [(0, jsx_runtime_1.jsxs)(ModalBody, { fullscreen: fullscreen, style: bodyStyle, children: [(0, jsx_runtime_1.jsx)(ModalContent, { children: children }), onClose !== util_1.noop && (0, jsx_runtime_1.jsx)(ModalClose, { onClick: onClose, "data-uie-name": "do-close" }), actions.length > 0 && (0, jsx_runtime_1.jsx)(ModalActions, { actions: actions, "data-uie-name": "modal-actions" })] }), !fullscreen && ((0, jsx_runtime_1.jsx)(ModalBackground, { onClick: onBackgroundClick === util_1.noop ? onClose : onBackgroundClick, "data-uie-name": "modal-background" }))] }));
103
92
  exports.Modal = Modal;
104
93
  exports.Modal.defaultProps = {
105
94
  actions: [],
@@ -2,11 +2,11 @@ import * as React from 'react';
2
2
  import { CSSObject } from '@emotion/react';
3
3
  export type OverlayWrapperProps<T = HTMLDivElement> = React.HTMLProps<T>;
4
4
  export declare const overlayWrapperStyle: <T>(props: OverlayWrapperProps<T>) => CSSObject;
5
- export declare const OverlayWrapper: (props: OverlayWrapperProps<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export declare const OverlayWrapper: (props: OverlayWrapperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
6
  export declare const OverlayContent: (props: React.HTMLProps<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  export type OverlayBackgroundProps<T = HTMLDivElement> = React.HTMLProps<T>;
8
8
  export declare const overlayBackgroundStyle: <T>(props: OverlayBackgroundProps<T>) => CSSObject;
9
- export declare const OverlayBackground: (props: OverlayBackgroundProps<HTMLDivElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export declare const OverlayBackground: (props: OverlayBackgroundProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
10
  export interface OverlayProps<T = HTMLDivElement> extends React.HTMLProps<T> {
11
11
  onBackgroundClick?: () => void;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Modal/Overlay.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAOzC,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,SAUtE,CAAC;AAEH,eAAO,MAAM,cAAc,kGAA+E,CAAC;AAE3G,eAAO,MAAM,cAAc,UAAW,MAAM,SAAS,CAAC,cAAc,CAAC,qDAsBpE,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAE5E,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,SAS5E,CAAC;AAEH,eAAO,MAAM,iBAAiB,qGAAqF,CAAC;AAEpH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,cAAc,CAAE,SAAQ,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1E,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,OAAO,8CAA2D,YAAY,qDAK1F,CAAC"}
1
+ {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Modal/Overlay.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAOzC,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,SAUtE,CAAC;AAEH,eAAO,MAAM,cAAc,UAAW,mBAAmB,qDAAiD,CAAC;AAE3G,eAAO,MAAM,cAAc,UAAW,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,qDAsBpE,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAE5E,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,SAS5E,CAAC;AAEH,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAAoD,CAAC;AAEpH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,cAAc,CAAE,SAAQ,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1E,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,OAAO,8CAA2D,YAAY,qDAK1F,CAAC"}