hrm_ui_lib 3.1.3 → 3.1.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.
@@ -1,5 +1,6 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  import { TButtonPropTypes } from '../Button/types';
3
+ import { TTitleSize } from './types';
3
4
  type TProps = {
4
5
  title?: string;
5
6
  subtitle?: string;
@@ -15,6 +16,7 @@ type TProps = {
15
16
  confirm: TButtonPropTypes;
16
17
  };
17
18
  onSubmit?: () => void;
19
+ titleSize?: TTitleSize;
18
20
  };
19
- export declare const ModalContent: ({ title, subtitle, dataIdPrefix, closeIcon, onClose, children, withFooter, confirmBtnTooltipText, buttonProps, onSubmit }: TProps) => ReactElement;
21
+ export declare const ModalContent: ({ title, subtitle, dataIdPrefix, closeIcon, onClose, children, withFooter, confirmBtnTooltipText, buttonProps, onSubmit, titleSize }: TProps) => ReactElement;
20
22
  export {};
@@ -5,6 +5,6 @@ import { Button } from '../Button';
5
5
  import { Text } from '../Text';
6
6
  import { Tooltip } from '../Tooltip';
7
7
  import { noop } from '../../utils/helpers';
8
- export const ModalContent = ({ title, subtitle, dataIdPrefix, closeIcon, onClose, children, withFooter = true, confirmBtnTooltipText, buttonProps, onSubmit }) => {
9
- return (_jsxs(_Fragment, { children: [title ? (_jsxs("div", { className: "modal__header", children: [_jsxs("div", { children: [_jsx(Text, { lineHeight: "large", size: "large", weight: 'bolder', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-title` : '', children: title }), subtitle ? (_jsx(Text, { className: 'mt-12', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-title` : '', children: subtitle })) : null] }), closeIcon ? (_jsx(Button, { className: 'modal__close ml-16', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-close-button` : '', iconProps: { Component: IconDismiss }, onClick: onClose, type: "tertiary" })) : null] })) : null, _jsx("div", { className: "modal__content scrollbar scrollbar--vertical", children: children }), withFooter && buttonProps ? (_jsxs("div", { className: "modal__footer", children: [buttonProps.cancel && (_jsx(Button, Object.assign({ type: "tertiary", className: "modal__footer__btn mr-16", onClick: onClose, dataId: dataIdPrefix ? `${dataIdPrefix}-modal-cancel-button` : '' }, (buttonProps.cancel || {})))), confirmBtnTooltipText ? (_jsx(Tooltip, { text: confirmBtnTooltipText, id: 'confirm-btn-tooltip', position: Positions.TOP_CENTER })) : null, _jsx(Button, Object.assign({ id: 'confirm-btn-tooltip', className: 'modal__footer__btn', type: "primary", onClick: onSubmit ? onSubmit : noop, dataId: dataIdPrefix ? `${dataIdPrefix}-modal-confirm-button` : '' }, buttonProps.confirm))] })) : null] }));
8
+ export const ModalContent = ({ title, subtitle, dataIdPrefix, closeIcon, onClose, children, withFooter = true, confirmBtnTooltipText, buttonProps, onSubmit, titleSize = 'large' }) => {
9
+ return (_jsxs(_Fragment, { children: [title ? (_jsxs("div", { className: "modal__header", children: [_jsxs("div", { children: [_jsx(Text, { lineHeight: "large", size: titleSize, weight: 'bolder', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-title` : '', children: title }), subtitle ? (_jsx(Text, { className: 'mt-12', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-title` : '', children: subtitle })) : null] }), closeIcon ? (_jsx(Button, { className: 'modal__close ml-16', dataId: dataIdPrefix ? `${dataIdPrefix}-modal-close-button` : '', iconProps: { Component: IconDismiss }, onClick: onClose, type: "tertiary" })) : null] })) : null, _jsx("div", { className: "modal__content scrollbar scrollbar--vertical", children: children }), withFooter && buttonProps ? (_jsxs("div", { className: "modal__footer", children: [buttonProps.cancel && (_jsx(Button, Object.assign({ type: "tertiary", className: "modal__footer__btn mr-16", onClick: onClose, dataId: dataIdPrefix ? `${dataIdPrefix}-modal-cancel-button` : '' }, (buttonProps.cancel || {})))), confirmBtnTooltipText ? (_jsx(Tooltip, { text: confirmBtnTooltipText, id: 'confirm-btn-tooltip', position: Positions.TOP_CENTER })) : null, _jsx(Button, Object.assign({ id: 'confirm-btn-tooltip', className: 'modal__footer__btn', type: "primary", onClick: onSubmit ? onSubmit : noop, dataId: dataIdPrefix ? `${dataIdPrefix}-modal-confirm-button` : '' }, buttonProps.confirm))] })) : null] }));
10
10
  };
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TButtonPropTypes } from '../Button/types';
3
+ export type TTitleSize = 'medium' | 'large';
3
4
  export interface TModalPropTypes {
4
5
  dataIdPrefix?: string;
5
6
  closeOnOutsideClick?: boolean;
@@ -9,6 +10,7 @@ export interface TModalPropTypes {
9
10
  title?: string;
10
11
  subtitle?: string;
11
12
  size?: 'small' | 'medium' | 'large' | 'xlarge';
13
+ titleSize?: TTitleSize;
12
14
  withFooter?: boolean;
13
15
  buttonProps?: {
14
16
  cancel?: TButtonPropTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",