@npm_leadtech/legal-lib-components 7.95.1 → 7.95.3

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,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from 'classnames';
2
3
  import { Button } from '../../atoms/Button';
3
4
  import { SignerStatusItem } from '../../atoms/SignerStatusItem';
4
5
  import { SignersStatusTooltipContentStyled } from './SignersStatusTooltipContent.styled';
5
- export const SignersStatusTooltipContent = ({ title = 'Signers Status', signers, linkLabel, linkOnClick, linkDataQa = 'manage_requests_button', givenClass = '' }) => {
6
- const hasLink = linkLabel !== '' && linkOnClick !== undefined;
7
- return (_jsxs(SignersStatusTooltipContentStyled, { className: `signers-status-tooltip-content ${givenClass}`.trim(), children: [_jsx("h3", { children: title }), _jsx("ul", { className: 'signers-status-tooltip-content__signers', children: signers.map((signer, index) => (_jsx(SignerStatusItem, { status: signer.status, children: signer.children }, `${signer.status}-${index}`))) }), hasLink && (_jsx("div", { className: 'signers-status-tooltip-content__button', children: _jsx(Button, { noLink: true, color: 'tertiary', givenClass: 'underline-button', label: linkLabel, dataQa: linkDataQa, onClick: linkOnClick }) }))] }));
6
+ export const SignersStatusTooltipContent = ({ title = 'Signers Status', signers, linkLabel = '', linkOnClick, linkDataQa = 'manage_requests_button', givenClass = '' }) => {
7
+ const hasLink = Boolean(linkLabel?.length && linkOnClick !== undefined);
8
+ return (_jsxs(SignersStatusTooltipContentStyled, { className: classNames('signers-status-tooltip-content', givenClass), children: [_jsx("h3", { children: title }), _jsx("ul", { className: 'signers-status-tooltip-content__signers', children: signers.map((signer, index) => (_jsx(SignerStatusItem, { status: signer.status, children: signer.children }, `${signer.status}-${index}`))) }), hasLink && (_jsx("div", { className: 'signers-status-tooltip-content__button', children: _jsx(Button, { noLink: true, color: 'tertiary', givenClass: 'underline-button', label: linkLabel, dataQa: linkDataQa, onClick: linkOnClick }) }))] }));
8
9
  };
@@ -1,4 +1,5 @@
1
1
  import React, { type FC } from 'react'
2
+ import classNames from 'classnames'
2
3
 
3
4
  import { Button } from '../../atoms/Button'
4
5
  import { SignerStatusItem } from '../../atoms/SignerStatusItem'
@@ -8,14 +9,14 @@ import { SignersStatusTooltipContentStyled } from './SignersStatusTooltipContent
8
9
  export const SignersStatusTooltipContent: FC<SignersStatusTooltipContentProps> = ({
9
10
  title = 'Signers Status',
10
11
  signers,
11
- linkLabel,
12
+ linkLabel = '',
12
13
  linkOnClick,
13
14
  linkDataQa = 'manage_requests_button',
14
15
  givenClass = ''
15
16
  }) => {
16
- const hasLink = linkLabel !== '' && linkOnClick !== undefined
17
+ const hasLink = Boolean(linkLabel?.length && linkOnClick !== undefined)
17
18
  return (
18
- <SignersStatusTooltipContentStyled className={`signers-status-tooltip-content ${givenClass}`.trim()}>
19
+ <SignersStatusTooltipContentStyled className={classNames('signers-status-tooltip-content', givenClass)}>
19
20
  <h3>{title}</h3>
20
21
  <ul className='signers-status-tooltip-content__signers'>
21
22
  {signers.map((signer, index) => (
@@ -2,8 +2,8 @@ import type { SignerStatusItemProps } from '../../atoms/SignerStatusItem/SignerS
2
2
  export interface SignersStatusTooltipContentProps {
3
3
  title?: string;
4
4
  signers: SignerStatusItemProps[];
5
- linkLabel: string;
6
- linkOnClick: () => void;
5
+ linkLabel?: string;
6
+ linkOnClick?: () => void;
7
7
  linkDataQa?: string;
8
8
  givenClass?: string;
9
9
  }
@@ -3,8 +3,8 @@ import type { SignerStatusItemProps } from '../../atoms/SignerStatusItem/SignerS
3
3
  export interface SignersStatusTooltipContentProps {
4
4
  title?: string
5
5
  signers: SignerStatusItemProps[]
6
- linkLabel: string
7
- linkOnClick: () => void
6
+ linkLabel?: string
7
+ linkOnClick?: () => void
8
8
  linkDataQa?: string
9
9
  givenClass?: string
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.95.1",
3
+ "version": "7.95.3",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",