tycho-components 0.45.11 → 0.45.12

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.
@@ -22,6 +22,7 @@ type Props = {
22
22
  alternativeOptions?: React.ReactNode;
23
23
  hideBackdrop?: boolean;
24
24
  disableBackdropClose?: boolean;
25
+ extraHeaderActions?: React.ReactNode;
25
26
  };
26
- export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, }: Props): import("react").JSX.Element;
27
+ export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, extraHeaderActions, }: Props): import("react").JSX.Element;
27
28
  export {};
@@ -6,7 +6,7 @@ import { Button, Icon } from 'tycho-storybook';
6
6
  import './style.scss';
7
7
  import { useEffect } from 'react';
8
8
  import { attachCloseToEscape, stopEventPropagation } from './AppModalUtils';
9
- export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, }) {
9
+ export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, extraHeaderActions, }) {
10
10
  const { t } = useTranslation('common');
11
11
  const getClassNames = cx('modal-container', className);
12
12
  useEffect(() => {
@@ -21,7 +21,7 @@ export default function AppModal({ children, title, subtitle, className, close,
21
21
  if (disableClose)
22
22
  return;
23
23
  close();
24
- }, children: _jsx(Fade, { in: true, onEntered: () => onEntered && onEntered(), children: _jsxs(Box, { className: getClassNames, sx: style, children: [_jsxs("div", { className: "header", children: [_jsxs("div", { className: "titles", children: [_jsx("span", { className: "title", children: title }), subtitle && _jsx("span", { className: "subtitle", children: subtitle })] }), !disableClose && (_jsx(Icon, { name: "close", onClick: (e) => {
24
+ }, children: _jsx(Fade, { in: true, onEntered: () => onEntered && onEntered(), children: _jsxs(Box, { className: getClassNames, sx: style, children: [_jsxs("div", { className: "header", children: [_jsxs("div", { className: "titles", children: [_jsx("span", { className: "title", children: title }), subtitle && _jsx("span", { className: "subtitle", children: subtitle })] }), extraHeaderActions && (_jsx("div", { className: "extra-header-actions", children: extraHeaderActions })), !disableClose && (_jsx(Icon, { name: "close", onClick: (e) => {
25
25
  stopEventPropagation(e);
26
26
  close();
27
27
  }, className: "pointer" }))] }), _jsx("div", { className: "body", children: children }), !hideFooter ? (_jsxs("div", { className: "footer", children: [alternativeOptions && alternativeOptions, alternativeButton && (_jsx(Button, { className: "alternative", color: "white", onClick: alternativeButton.action, text: alternativeButton.title })), !disableCancel && (_jsx(Button, { onClick: (e) => {
@@ -7,8 +7,11 @@
7
7
  align-items: center;
8
8
  border-bottom: 1px solid var(--border-subtle-1);
9
9
  padding: var(--spacing-300) var(--spacing-200) var(--spacing-150);
10
+ gap: var(--spacing-150);
10
11
 
11
12
  .titles {
13
+ flex: 1;
14
+
12
15
  .title {
13
16
  @include label-large-2;
14
17
  display: block;
@@ -21,8 +24,12 @@
21
24
  }
22
25
  }
23
26
 
27
+ > .extra-header-actions {
28
+ display: flex;
29
+ align-items: center;
30
+ }
31
+
24
32
  > .ds-icon {
25
- margin-left: auto;
26
33
  margin-bottom: auto;
27
34
  }
28
35
  }
@@ -162,14 +162,13 @@
162
162
 
163
163
  @media (max-width: 1366px) {
164
164
  .modal-access-user {
165
- top: 50% !important;
165
+ width: 90vw !important;
166
+ max-width: 90vw !important;
166
167
  }
167
168
  }
168
169
 
169
170
  @media (max-width: 768px) {
170
171
  .modal-access-user {
171
- width: 90vw !important;
172
- max-width: 90vw !important;
173
172
  top: 30% !important;
174
173
 
175
174
  .body {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.45.11",
4
+ "version": "0.45.12",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {