@synerise/ds-modal 1.2.24 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.3.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-modal@1.2.24...@synerise/ds-modal@1.3.0) (2026-02-02)
7
+
8
+ ### Features
9
+
10
+ - **modal:** add tabs to modal header ([afca822](https://github.com/synerise/synerise-design/commit/afca822e930e06505161938d5a0ef16a7eec5271))
11
+
6
12
  ## [1.2.24](https://github.com/synerise/synerise-design/compare/@synerise/ds-modal@1.2.23...@synerise/ds-modal@1.2.24) (2026-01-29)
7
13
 
8
14
  **Note:** Version bump only for package @synerise/ds-modal
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type ModalProps } from '../../Modal.types';
3
- type ModalTitleProps = Pick<ModalProps, 'headerActions' | 'onCancel' | 'titleContainerStyle' | 'blank' | 'description' | 'title' | 'headerBottomBar'>;
4
- export declare const ModalTitle: ({ headerActions, blank, titleContainerStyle, onCancel, title, description, headerBottomBar, }: ModalTitleProps) => React.JSX.Element;
3
+ type ModalTitleProps = Pick<ModalProps, 'headerActions' | 'headerTabProps' | 'onCancel' | 'titleContainerStyle' | 'blank' | 'description' | 'title' | 'headerBottomBar'>;
4
+ export declare const ModalTitle: ({ headerActions, blank, titleContainerStyle, onCancel, title, description, headerTabProps, headerBottomBar, }: ModalTitleProps) => React.JSX.Element;
5
5
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import Button from '@synerise/ds-button';
3
3
  import Icon, { CloseM } from '@synerise/ds-icon';
4
+ import Tabs from '@synerise/ds-tabs';
4
5
  import * as S from './ModalTitle.styles';
5
6
  export var ModalTitle = function ModalTitle(_ref) {
6
7
  var headerActions = _ref.headerActions,
@@ -9,6 +10,7 @@ export var ModalTitle = function ModalTitle(_ref) {
9
10
  onCancel = _ref.onCancel,
10
11
  title = _ref.title,
11
12
  description = _ref.description,
13
+ headerTabProps = _ref.headerTabProps,
12
14
  headerBottomBar = _ref.headerBottomBar;
13
15
  return /*#__PURE__*/React.createElement(React.Fragment, null, blank && onCancel && /*#__PURE__*/React.createElement(Button, {
14
16
  mode: "single-icon",
@@ -18,8 +20,9 @@ export var ModalTitle = function ModalTitle(_ref) {
18
20
  onClick: onCancel
19
21
  }, /*#__PURE__*/React.createElement(Icon, {
20
22
  component: /*#__PURE__*/React.createElement(CloseM, null)
21
- })), (title || description) && /*#__PURE__*/React.createElement(S.ModalTitleWrapper, {
22
- withDescription: !!description
23
+ })), (title || description || headerTabProps) && /*#__PURE__*/React.createElement(S.ModalTitleWrapper, {
24
+ withDescription: !!description,
25
+ withTabs: !!headerTabProps
23
26
  }, title && /*#__PURE__*/React.createElement(S.TitleContainer, {
24
27
  style: titleContainerStyle,
25
28
  "data-testid": "modal-title"
@@ -33,5 +36,5 @@ export var ModalTitle = function ModalTitle(_ref) {
33
36
  onClick: onCancel
34
37
  }, /*#__PURE__*/React.createElement(Icon, {
35
38
  component: /*#__PURE__*/React.createElement(CloseM, null)
36
- })))), description && /*#__PURE__*/React.createElement(S.Description, null, description)), headerBottomBar && /*#__PURE__*/React.createElement(S.BottomBar, null, headerBottomBar));
39
+ })))), description && /*#__PURE__*/React.createElement(S.Description, null, description), headerTabProps && /*#__PURE__*/React.createElement(S.TabsWrapper, null, /*#__PURE__*/React.createElement(Tabs, headerTabProps))), headerBottomBar && /*#__PURE__*/React.createElement(S.BottomBar, null, headerBottomBar));
37
40
  };
@@ -4,5 +4,7 @@ export declare const ActionButtons: import("styled-components").StyledComponent<
4
4
  export declare const BottomBar: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const ModalTitleWrapper: import("styled-components").StyledComponent<"div", any, {
6
6
  withDescription?: boolean;
7
+ withTabs?: boolean;
7
8
  }, never>;
8
9
  export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const TabsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,14 @@
1
1
  import styled from 'styled-components';
2
2
  import Typography from '@synerise/ds-typography';
3
+ var getBottomPadding = function getBottomPadding(withTabs, withDescription) {
4
+ if (withTabs) {
5
+ return 0;
6
+ }
7
+ if (withDescription) {
8
+ return 12;
9
+ }
10
+ return 20;
11
+ };
3
12
  export var TitleContainer = styled.div.withConfig({
4
13
  displayName: "ModalTitlestyles__TitleContainer",
5
14
  componentId: "sc-hnk65g-0"
@@ -17,14 +26,14 @@ export var ActionButtons = styled.div.withConfig({
17
26
  export var BottomBar = styled.div.withConfig({
18
27
  displayName: "ModalTitlestyles__BottomBar",
19
28
  componentId: "sc-hnk65g-3"
20
- })(["border-bottom:1px solid ", ";"], function (props) {
29
+ })(["padding:12px 24px;border-bottom:1px solid ", ";"], function (props) {
21
30
  return props.theme.palette['grey-100'];
22
31
  });
23
32
  export var ModalTitleWrapper = styled.div.withConfig({
24
33
  displayName: "ModalTitlestyles__ModalTitleWrapper",
25
34
  componentId: "sc-hnk65g-4"
26
- })(["padding:", ";font-size:18px;line-height:32px;border-bottom:1px solid ", ";"], function (props) {
27
- return props.withDescription ? '20px 24px 12px' : '20px 24px';
35
+ })(["padding:20px 24px;padding-bottom:", "px;font-size:18px;line-height:32px;border-bottom:1px solid ", ";"], function (props) {
36
+ return getBottomPadding(!!props.withTabs, !!props.withDescription);
28
37
  }, function (props) {
29
38
  return props.theme.palette['grey-100'];
30
39
  });
@@ -35,4 +44,8 @@ export var Description = styled.div.withConfig({
35
44
  return props.theme.palette['grey-600'];
36
45
  }, function (props) {
37
46
  return props.theme.palette['grey-300'];
38
- });
47
+ });
48
+ export var TabsWrapper = styled.div.withConfig({
49
+ displayName: "ModalTitlestyles__TabsWrapper",
50
+ componentId: "sc-hnk65g-6"
51
+ })(["padding-bottom:1px;"]);
@@ -1,11 +1,16 @@
1
1
  import { type ModalProps as AntdModalProps } from 'antd/lib/modal';
2
2
  import type { CSSProperties, ComponentType, ReactNode } from 'react';
3
3
  import { type ButtonProps } from '@synerise/ds-button';
4
+ import { type TabsProps } from '@synerise/ds-tabs';
4
5
  export type Props = ModalProps;
5
6
  export type ModalProps = {
7
+ /**
8
+ * @deprecated - this prop will be removed soon
9
+ */
6
10
  description?: ReactNode;
7
11
  headerBottomBar?: ReactNode;
8
12
  headerActions?: ReactNode;
13
+ headerTabProps?: TabsProps;
9
14
  size?: 'small' | 'medium' | 'large' | 'extraLarge' | 'fullSize' | 'fullScreen';
10
15
  bodyBackground?: 'white' | 'grey';
11
16
  blank?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-modal",
3
- "version": "1.2.24",
3
+ "version": "1.3.0",
4
4
  "description": "Modal UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -23,8 +23,8 @@
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
26
- "test": "jest",
27
- "test:watch": "pnpm run test -- --watchAll",
26
+ "test": "vitest",
27
+ "test:watch": "pnpm run test -- --watch",
28
28
  "types": "tsc --noEmit",
29
29
  "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
30
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
@@ -35,17 +35,21 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.5.6",
39
- "@synerise/ds-icon": "^1.10.1",
40
- "@synerise/ds-scrollbar": "^1.2.6",
41
- "@synerise/ds-typography": "^1.1.1",
38
+ "@synerise/ds-button": "^1.5.7",
39
+ "@synerise/ds-icon": "^1.11.0",
40
+ "@synerise/ds-scrollbar": "^1.2.7",
41
+ "@synerise/ds-tabs": "^1.1.13",
42
+ "@synerise/ds-typography": "^1.1.2",
42
43
  "classnames": "^2.5.1"
43
44
  },
45
+ "devDependencies": {
46
+ "vitest": "4"
47
+ },
44
48
  "peerDependencies": {
45
49
  "@synerise/ds-core": "*",
46
50
  "antd": "4.24.16",
47
51
  "react": ">=16.9.0 <= 18.3.1",
48
52
  "styled-components": "^5.3.3"
49
53
  },
50
- "gitHead": "e1a3b7417480ba1bbf0b68becf985dd2d5f5a924"
54
+ "gitHead": "6a3a82f8bc80e10eeb818795035e05393550e82e"
51
55
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
package/dist/modules.d.js DELETED
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom';