@npm_leadtech/legal-lib-components 7.90.0 → 7.90.2

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 (79) hide show
  1. package/dist/css/styles.css +16 -0
  2. package/dist/images/componentsSvg/ArrowRight.js +1 -1
  3. package/dist/images/componentsSvg/ArrowRight.tsx +1 -1
  4. package/dist/images/componentsSvg/CloseIcon.js +1 -1
  5. package/dist/images/componentsSvg/CloseIcon.tsx +3 -6
  6. package/dist/images/componentsSvg/Delete24p.tsx +1 -2
  7. package/dist/images/componentsSvg/Done24px.d.ts +1 -1
  8. package/dist/images/componentsSvg/Done24px.js +1 -1
  9. package/dist/images/componentsSvg/Done24px.tsx +4 -7
  10. package/dist/images/componentsSvg/Edit24p.tsx +1 -1
  11. package/dist/images/componentsSvg/EditText24px.tsx +1 -1
  12. package/dist/images/componentsSvg/Eye24pxOptimized.tsx +1 -1
  13. package/dist/images/componentsSvg/IconDuplicate24px.tsx +1 -1
  14. package/dist/images/componentsSvg/InfoError24pxOutlined.js +1 -1
  15. package/dist/images/componentsSvg/InfoError24pxOutlined.tsx +1 -1
  16. package/dist/images/componentsSvg/MenuCollapse24p.js +1 -1
  17. package/dist/images/componentsSvg/MenuCollapse24p.tsx +1 -1
  18. package/dist/images/componentsSvg/NewRelease24p.d.ts +1 -1
  19. package/dist/images/componentsSvg/NewRelease24p.js +2 -2
  20. package/dist/images/componentsSvg/NewRelease24p.tsx +4 -19
  21. package/dist/images/componentsSvg/RatafiaIcon24px.tsx +3 -3
  22. package/dist/images/componentsSvg/Sign24px.d.ts +2 -2
  23. package/dist/images/componentsSvg/Sign24px.js +1 -1
  24. package/dist/images/componentsSvg/Sign24px.tsx +7 -6
  25. package/dist/images/componentsSvg/Time24px.d.ts +1 -1
  26. package/dist/images/componentsSvg/Time24px.js +2 -2
  27. package/dist/images/componentsSvg/Time24px.tsx +8 -26
  28. package/dist/src/components/atoms/Button/Button.js +1 -1
  29. package/dist/src/components/atoms/Button/Button.scss +19 -0
  30. package/dist/src/components/atoms/Button/Button.tsx +1 -1
  31. package/dist/src/components/atoms/Button/ButtonProps.types.d.ts +1 -1
  32. package/dist/src/components/atoms/Button/ButtonProps.types.ts +1 -0
  33. package/dist/src/components/atoms/DocumentStatus/DocumentStatus.js +5 -15
  34. package/dist/src/components/atoms/DocumentStatus/DocumentStatus.styled.js +41 -40
  35. package/dist/src/components/atoms/DocumentStatus/DocumentStatus.styled.ts +41 -40
  36. package/dist/src/components/atoms/DocumentStatus/DocumentStatus.tsx +7 -35
  37. package/dist/src/components/atoms/DocumentStatus/DocumentStatusProps.types.d.ts +4 -6
  38. package/dist/src/components/atoms/DocumentStatus/DocumentStatusProps.types.ts +5 -6
  39. package/dist/src/components/atoms/PreFooter/PreFooter.js +3 -3
  40. package/dist/src/components/atoms/PreFooter/PreFooter.tsx +2 -2
  41. package/dist/src/components/atoms/PreFooter/PreFooterProps.d.ts +1 -1
  42. package/dist/src/components/atoms/PreFooter/PreFooterProps.ts +1 -1
  43. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.d.ts +3 -0
  44. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.js +16 -0
  45. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.styled.d.ts +1 -0
  46. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.styled.js +60 -0
  47. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.styled.ts +61 -0
  48. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.tsx +28 -0
  49. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItemProps.types.d.ts +6 -0
  50. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItemProps.types.js +1 -0
  51. package/dist/src/components/atoms/SignerStatusItem/SignerStatusItemProps.types.ts +7 -0
  52. package/dist/src/components/atoms/SignerStatusItem/index.d.ts +2 -0
  53. package/dist/src/components/atoms/SignerStatusItem/index.js +1 -0
  54. package/dist/src/components/atoms/SignerStatusItem/index.ts +2 -0
  55. package/dist/src/components/atoms/Tooltip/Tooltip.js +0 -2
  56. package/dist/src/components/atoms/Tooltip/Tooltip.tsx +0 -2
  57. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.d.ts +3 -0
  58. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.js +7 -0
  59. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.styled.d.ts +1 -0
  60. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.styled.js +27 -0
  61. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.styled.ts +28 -0
  62. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContent.tsx +38 -0
  63. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContentProps.types.d.ts +9 -0
  64. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContentProps.types.js +1 -0
  65. package/dist/src/components/molecules/SignersStatusTooltipContent/SignersStatusTooltipContentProps.types.ts +10 -0
  66. package/dist/src/components/molecules/SignersStatusTooltipContent/index.d.ts +2 -0
  67. package/dist/src/components/molecules/SignersStatusTooltipContent/index.js +1 -0
  68. package/dist/src/components/molecules/SignersStatusTooltipContent/index.ts +2 -0
  69. package/dist/src/components/molecules/TextInput/tests/Input.test.tsx +29 -18
  70. package/dist/src/components/molecules/TextInput/tests/TextInput.test.tsx +16 -9
  71. package/dist/src/components/molecules/TextInput/tests/TextInputMessage.test.tsx +2 -2
  72. package/dist/src/components/molecules/TextInput/tests/TextInputTooltip.test.tsx +1 -1
  73. package/dist/src/components/molecules/index.d.ts +1 -0
  74. package/dist/src/components/molecules/index.js +1 -0
  75. package/dist/src/components/molecules/index.ts +1 -0
  76. package/dist/src/globalStyles/variables.scss +12 -31
  77. package/dist/src/globalStyles/variablesCss.scss +0 -10
  78. package/dist/tsconfig.build.tsbuildinfo +1 -1
  79. package/package.json +5 -1
@@ -9,8 +9,13 @@ export const DocumentStatusStyled = styled.div `
9
9
  align-items: center;
10
10
  align-self: center;
11
11
  padding: 0.125rem 0.5rem 0.125rem 0.25rem;
12
- margin-right: 0.5rem;
13
- width: 7.36rem;
12
+ width: fit-content;
13
+ cursor: pointer;
14
+
15
+ background-color: var(--neutral-neutral-4);
16
+ border-color: var(--neutral-neutral-2);
17
+ color: var(--neutral-neutral-1);
18
+
14
19
  @include laptop {
15
20
  align-self: flex-start;
16
21
  }
@@ -20,60 +25,56 @@ export const DocumentStatusStyled = styled.div `
20
25
  }
21
26
 
22
27
  &.document-status {
28
+ & > .document-status__icon > path {
29
+ fill: var(--neutral-neutral-1);
30
+ }
31
+
23
32
  span {
24
33
  font-weight: bold;
25
34
  }
26
35
 
27
- .icon {
28
- margin-right: 0.25rem;
36
+ &.in-progress {
37
+ background-color: var(--neutral-neutral-6);
38
+ border-color: var(--neutral-neutral-4);
39
+ color: var(--neutral-neutral-2);
40
+ & > .document-status__icon > path {
41
+ fill: var(--neutral-neutral-2);
42
+ }
29
43
  }
30
44
 
31
- &.--is-completed {
32
- background-color: var(--primary-main-light-5);
33
- border-color: var(--primary-main-light-3);
34
- color: var(--primary-main);
35
-
36
- svg {
37
- path {
38
- fill: var(--primary-main);
39
- }
45
+ &.awaiting {
46
+ background-color: var(--secondary-main-light-4);
47
+ border-color: var(--secondary-main-light-3);
48
+ color: var(--secondary-main-dark-2);
49
+ & > .document-status__icon > path {
50
+ fill: var(--secondary-main-dark-2);
40
51
  }
41
52
  }
42
53
 
43
- &.--in-progress {
44
- background-color: var(--neutral-neutral-5);
45
- border-color: var(--neutral-neutral-3);
54
+ &.no-response {
55
+ background-color: var(--neutral-neutral-4);
56
+ border-color: var(--neutral-neutral-2);
46
57
  color: var(--neutral-neutral-1);
47
-
48
- svg {
49
- g > g {
50
- fill: var(--neutral-neutral-1);
51
- }
58
+ & > .document-status__icon > path {
59
+ fill: var(--neutral-neutral-1);
52
60
  }
53
61
  }
54
62
 
55
- &.--is-new {
56
- background-color: var(--primary-main-light-1);
57
- border-color: var(--primary-main);
58
- color: var(--secondary-main-light-4);
59
-
60
- .icon {
61
- margin-right: 1.4rem;
63
+ &.declined {
64
+ background-color: var(--error-error-3);
65
+ border-color: var(--error-error-2);
66
+ color: var(--error-main);
67
+ & > .document-status__icon > path {
68
+ fill: var(--error-main);
62
69
  }
63
70
  }
64
71
 
65
- &.--is-signed {
66
- width: fit-content;
67
- background-color: var(--primary-main-dark-2);
68
- border-color: var(--primary-main-dark-2);
69
- color: var(--others-white);
70
-
71
- svg {
72
- margin-right: 0.25rem;
73
-
74
- path {
75
- fill: var(--others-white);
76
- }
72
+ &.signed {
73
+ background-color: var(--primary-main-light-4);
74
+ border-color: var(--primary-main-light-2);
75
+ color: var(--primary-main-light-1);
76
+ & > .document-status__icon > path {
77
+ fill: var(--primary-main-light-1);
77
78
  }
78
79
  }
79
80
  }
@@ -10,8 +10,13 @@ export const DocumentStatusStyled = styled.div`
10
10
  align-items: center;
11
11
  align-self: center;
12
12
  padding: 0.125rem 0.5rem 0.125rem 0.25rem;
13
- margin-right: 0.5rem;
14
- width: 7.36rem;
13
+ width: fit-content;
14
+ cursor: pointer;
15
+
16
+ background-color: var(--neutral-neutral-4);
17
+ border-color: var(--neutral-neutral-2);
18
+ color: var(--neutral-neutral-1);
19
+
15
20
  @include laptop {
16
21
  align-self: flex-start;
17
22
  }
@@ -21,60 +26,56 @@ export const DocumentStatusStyled = styled.div`
21
26
  }
22
27
 
23
28
  &.document-status {
29
+ & > .document-status__icon > path {
30
+ fill: var(--neutral-neutral-1);
31
+ }
32
+
24
33
  span {
25
34
  font-weight: bold;
26
35
  }
27
36
 
28
- .icon {
29
- margin-right: 0.25rem;
37
+ &.in-progress {
38
+ background-color: var(--neutral-neutral-6);
39
+ border-color: var(--neutral-neutral-4);
40
+ color: var(--neutral-neutral-2);
41
+ & > .document-status__icon > path {
42
+ fill: var(--neutral-neutral-2);
43
+ }
30
44
  }
31
45
 
32
- &.--is-completed {
33
- background-color: var(--primary-main-light-5);
34
- border-color: var(--primary-main-light-3);
35
- color: var(--primary-main);
36
-
37
- svg {
38
- path {
39
- fill: var(--primary-main);
40
- }
46
+ &.awaiting {
47
+ background-color: var(--secondary-main-light-4);
48
+ border-color: var(--secondary-main-light-3);
49
+ color: var(--secondary-main-dark-2);
50
+ & > .document-status__icon > path {
51
+ fill: var(--secondary-main-dark-2);
41
52
  }
42
53
  }
43
54
 
44
- &.--in-progress {
45
- background-color: var(--neutral-neutral-5);
46
- border-color: var(--neutral-neutral-3);
55
+ &.no-response {
56
+ background-color: var(--neutral-neutral-4);
57
+ border-color: var(--neutral-neutral-2);
47
58
  color: var(--neutral-neutral-1);
48
-
49
- svg {
50
- g > g {
51
- fill: var(--neutral-neutral-1);
52
- }
59
+ & > .document-status__icon > path {
60
+ fill: var(--neutral-neutral-1);
53
61
  }
54
62
  }
55
63
 
56
- &.--is-new {
57
- background-color: var(--primary-main-light-1);
58
- border-color: var(--primary-main);
59
- color: var(--secondary-main-light-4);
60
-
61
- .icon {
62
- margin-right: 1.4rem;
64
+ &.declined {
65
+ background-color: var(--error-error-3);
66
+ border-color: var(--error-error-2);
67
+ color: var(--error-main);
68
+ & > .document-status__icon > path {
69
+ fill: var(--error-main);
63
70
  }
64
71
  }
65
72
 
66
- &.--is-signed {
67
- width: fit-content;
68
- background-color: var(--primary-main-dark-2);
69
- border-color: var(--primary-main-dark-2);
70
- color: var(--others-white);
71
-
72
- svg {
73
- margin-right: 0.25rem;
74
-
75
- path {
76
- fill: var(--others-white);
77
- }
73
+ &.signed {
74
+ background-color: var(--primary-main-light-4);
75
+ border-color: var(--primary-main-light-2);
76
+ color: var(--primary-main-light-1);
77
+ & > .document-status__icon > path {
78
+ fill: var(--primary-main-light-1);
78
79
  }
79
80
  }
80
81
  }
@@ -1,44 +1,16 @@
1
1
  import React, { type FC } from 'react'
2
2
 
3
3
  import { type DocumentStatusProps } from './DocumentStatusProps.types'
4
- import { DocumentStatusStyled } from './DocumentStatus.styled'
5
- import { Done24px } from '../../../../images/componentsSvg/Done24px'
6
- import { NewRelease24p } from '../../../../images/componentsSvg/NewRelease24p'
7
4
  import { Sign24px } from '../../../../images/componentsSvg/Sign24px'
8
- import { Time24px } from '../../../../images/componentsSvg/Time24px'
9
5
 
10
- const DocumentStatus: FC<DocumentStatusProps> = ({
11
- type,
12
- statusCompletedText,
13
- statusNewText,
14
- statusInProgressText,
15
- statusSignedText
16
- }) => {
17
- if (type === 'complete' || type === 'downloaded' || type === 'pdf_processing' || type === 'pdf_generated') {
18
- return (
19
- <DocumentStatusStyled data-testid='document-status' className={'document-status --is-completed'}>
20
- <Done24px className='icon' /> <span className={'sans-serif --small'}>{statusCompletedText}</span>
21
- </DocumentStatusStyled>
22
- )
23
- }
24
- if (type === 'new') {
25
- return (
26
- <DocumentStatusStyled data-testid='document-status' className={'document-status --is-new'}>
27
- <NewRelease24p className='icon' /> <span className={'sans-serif --small'}>{statusNewText}</span>
28
- </DocumentStatusStyled>
29
- )
30
- }
31
- if (type === 'signed') {
32
- return (
33
- <DocumentStatusStyled data-testid='document-status' className={'document-status --is-signed'}>
34
- <Sign24px className='icon' /> <span className={'sans-serif --small'}>{statusSignedText}</span>
35
- </DocumentStatusStyled>
36
- )
37
- }
6
+ import { DocumentStatusStyled } from './DocumentStatus.styled'
7
+
8
+ const DocumentStatus: FC<DocumentStatusProps> = ({ label, type = 'default', givenClass = '' }) => {
9
+ if (!label) return null
38
10
  return (
39
- <DocumentStatusStyled data-testid='document-status' className={'document-status --in-progress'}>
40
- <Time24px className='icon' />
41
- <span className={'sans-serif --small'}>{statusInProgressText}</span>
11
+ <DocumentStatusStyled data-testid='document-status' className={`document-status ${type} ${givenClass}`}>
12
+ <Sign24px className='document-status__icon' />
13
+ <span className={'sans-serif --small'}>{label}</span>
42
14
  </DocumentStatusStyled>
43
15
  )
44
16
  }
@@ -1,8 +1,6 @@
1
1
  export interface DocumentStatusProps {
2
- type: string;
3
- statusCompletedText: string;
4
- statusNewText: string;
5
- statusInProgressText: string;
6
- statusAIReviewedText: string;
7
- statusSignedText: string;
2
+ label: string;
3
+ type?: DocumentStatusType;
4
+ givenClass?: string;
8
5
  }
6
+ export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | 'signed';
@@ -1,8 +1,7 @@
1
1
  export interface DocumentStatusProps {
2
- type: string
3
- statusCompletedText: string
4
- statusNewText: string
5
- statusInProgressText: string
6
- statusAIReviewedText: string
7
- statusSignedText: string
2
+ label: string
3
+ type?: DocumentStatusType
4
+ givenClass?: string
8
5
  }
6
+
7
+ export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | 'signed'
@@ -1,8 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button } from '../Button';
3
3
  import { PreFooterStyled } from './PreFooter.styled';
4
- export const PreFooter = ({ siteTitle, content, ctaLabel, ctaOnClick, ctaDataQa, ctaLink }) => {
5
- return (_jsx(PreFooterStyled, { children: _jsx("div", { className: 'wrapper', children: _jsxs("div", { className: 'prefooter', children: [_jsx("div", { className: 'serif --hero prefooter__title', children: siteTitle }), _jsx("div", { className: 'prefooter__columns', children: content.map((text, index) => {
4
+ export const PreFooter = ({ siteName, content, ctaLabel, ctaOnClick, ctaDataQa, ctaLink }) => {
5
+ return (_jsx(PreFooterStyled, { children: _jsx("div", { className: 'wrapper', children: _jsxs("div", { className: 'prefooter', children: [_jsxs("div", { className: 'serif --hero prefooter__title', children: ["Try ", siteName, " Now"] }), _jsx("div", { className: 'prefooter__columns', children: content.map((text, index) => {
6
6
  return (_jsx("p", { className: 'prefooter__columns__text', children: text }, index));
7
7
  }) }), _jsx(Button, { label: ctaLabel, onClick: ctaOnClick, link: ctaLink, dataQa: ctaDataQa, isExternal: true, hasNoFollow: true })] }) }) }));
8
8
  };
@@ -5,7 +5,7 @@ import { PreFooterProps } from './PreFooterProps'
5
5
  import { PreFooterStyled } from './PreFooter.styled'
6
6
 
7
7
  export const PreFooter: React.FC<PreFooterProps> = ({
8
- siteTitle,
8
+ siteName,
9
9
  content,
10
10
  ctaLabel,
11
11
  ctaOnClick,
@@ -16,7 +16,7 @@ export const PreFooter: React.FC<PreFooterProps> = ({
16
16
  <PreFooterStyled>
17
17
  <div className='wrapper'>
18
18
  <div className='prefooter'>
19
- <div className='serif --hero prefooter__title'>{siteTitle}</div>
19
+ <div className='serif --hero prefooter__title'>Try {siteName} Now</div>
20
20
  <div className='prefooter__columns'>
21
21
  {content.map((text, index) => {
22
22
  return (
@@ -1,5 +1,5 @@
1
1
  export interface PreFooterProps {
2
- siteTitle: string;
2
+ siteName: string;
3
3
  content: string[];
4
4
  ctaLabel: string;
5
5
  ctaOnClick: () => void;
@@ -1,5 +1,5 @@
1
1
  export interface PreFooterProps {
2
- siteTitle: string
2
+ siteName: string
3
3
  content: string[]
4
4
  ctaLabel: string
5
5
  ctaOnClick: () => void
@@ -0,0 +1,3 @@
1
+ import { type FC } from 'react';
2
+ import { type SignerStatusItemProps } from './SignerStatusItemProps.types';
3
+ export declare const SignerStatusItem: FC<SignerStatusItemProps>;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CloseIcon } from '../../../../images/componentsSvg/CloseIcon';
3
+ import { Done24px } from '../../../../images/componentsSvg/Done24px';
4
+ import { NewRelease24p } from '../../../../images/componentsSvg/NewRelease24p';
5
+ import { Time24px } from '../../../../images/componentsSvg/Time24px';
6
+ import { SignerStatusItemStyled } from './SignerStatusItem.styled';
7
+ const iconByStatus = {
8
+ signed: _jsx(Done24px, {}),
9
+ 'in-progress': _jsx(Time24px, {}),
10
+ declined: _jsx(CloseIcon, {}),
11
+ awaiting: _jsx(Time24px, {}),
12
+ 'no-response': _jsx(NewRelease24p, {})
13
+ };
14
+ export const SignerStatusItem = ({ status, children, givenClass = '' }) => {
15
+ return (_jsxs(SignerStatusItemStyled, { className: `signer-status-item signer-status-item--${status} ${givenClass}`, children: [_jsx("span", { className: 'signer-status-item__icon', "aria-hidden": true, children: iconByStatus[status] }), children] }));
16
+ };
@@ -0,0 +1 @@
1
+ export declare const SignerStatusItemStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
@@ -0,0 +1,60 @@
1
+ import styled from 'styled-components';
2
+ export const SignerStatusItemStyled = styled.li `
3
+ display: flex;
4
+ align-items: center;
5
+ padding: 0.25rem 0.5rem;
6
+ border-radius: 0.25rem;
7
+ font-family: var(--font-sans);
8
+ list-style: none;
9
+ gap: 0.25rem;
10
+
11
+ .signer-status-item__icon {
12
+ flex-shrink: 0;
13
+ width: 16px;
14
+ height: 16px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ color: currentColor;
19
+ }
20
+
21
+ &.signer-status-item--signed {
22
+ background-color: var(--primary-main-light-4);
23
+
24
+ svg > path {
25
+ fill: var(--primary-main-light-1);
26
+ }
27
+ }
28
+
29
+ &.signer-status-item--in-progress {
30
+ background-color: var(--neutral-neutral-6);
31
+
32
+ svg > path {
33
+ fill: var(--neutral-neutral-2);
34
+ }
35
+ }
36
+
37
+ &.signer-status-item--declined {
38
+ background-color: var(--error-error-3);
39
+
40
+ svg > path {
41
+ fill: var(--error-main);
42
+ }
43
+ }
44
+
45
+ &.signer-status-item--awaiting {
46
+ background-color: var(--secondary-main-light-4);
47
+
48
+ svg > path {
49
+ fill: var(--secondary-main-dark-2);
50
+ }
51
+ }
52
+
53
+ &.signer-status-item--no-response {
54
+ background-color: var(--neutral-neutral-4);
55
+
56
+ svg > path {
57
+ fill: var(--neutral-neutral-1);
58
+ }
59
+ }
60
+ `;
@@ -0,0 +1,61 @@
1
+ import styled from 'styled-components'
2
+
3
+ export const SignerStatusItemStyled = styled.li`
4
+ display: flex;
5
+ align-items: center;
6
+ padding: 0.25rem 0.5rem;
7
+ border-radius: 0.25rem;
8
+ font-family: var(--font-sans);
9
+ list-style: none;
10
+ gap: 0.25rem;
11
+
12
+ .signer-status-item__icon {
13
+ flex-shrink: 0;
14
+ width: 16px;
15
+ height: 16px;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ color: currentColor;
20
+ }
21
+
22
+ &.signer-status-item--signed {
23
+ background-color: var(--primary-main-light-4);
24
+
25
+ svg > path {
26
+ fill: var(--primary-main-light-1);
27
+ }
28
+ }
29
+
30
+ &.signer-status-item--in-progress {
31
+ background-color: var(--neutral-neutral-6);
32
+
33
+ svg > path {
34
+ fill: var(--neutral-neutral-2);
35
+ }
36
+ }
37
+
38
+ &.signer-status-item--declined {
39
+ background-color: var(--error-error-3);
40
+
41
+ svg > path {
42
+ fill: var(--error-main);
43
+ }
44
+ }
45
+
46
+ &.signer-status-item--awaiting {
47
+ background-color: var(--secondary-main-light-4);
48
+
49
+ svg > path {
50
+ fill: var(--secondary-main-dark-2);
51
+ }
52
+ }
53
+
54
+ &.signer-status-item--no-response {
55
+ background-color: var(--neutral-neutral-4);
56
+
57
+ svg > path {
58
+ fill: var(--neutral-neutral-1);
59
+ }
60
+ }
61
+ `
@@ -0,0 +1,28 @@
1
+ import React, { type FC } from 'react'
2
+
3
+ import { type SignatureStatus, type SignerStatusItemProps } from './SignerStatusItemProps.types'
4
+ import { CloseIcon } from '../../../../images/componentsSvg/CloseIcon'
5
+ import { Done24px } from '../../../../images/componentsSvg/Done24px'
6
+ import { NewRelease24p } from '../../../../images/componentsSvg/NewRelease24p'
7
+ import { Time24px } from '../../../../images/componentsSvg/Time24px'
8
+
9
+ import { SignerStatusItemStyled } from './SignerStatusItem.styled'
10
+
11
+ const iconByStatus: Record<SignatureStatus, React.ReactNode> = {
12
+ signed: <Done24px />,
13
+ 'in-progress': <Time24px />,
14
+ declined: <CloseIcon />,
15
+ awaiting: <Time24px />,
16
+ 'no-response': <NewRelease24p />
17
+ }
18
+
19
+ export const SignerStatusItem: FC<SignerStatusItemProps> = ({ status, children, givenClass = '' }) => {
20
+ return (
21
+ <SignerStatusItemStyled className={`signer-status-item signer-status-item--${status} ${givenClass}`}>
22
+ <span className='signer-status-item__icon' aria-hidden>
23
+ {iconByStatus[status]}
24
+ </span>
25
+ {children}
26
+ </SignerStatusItemStyled>
27
+ )
28
+ }
@@ -0,0 +1,6 @@
1
+ export type SignatureStatus = 'signed' | 'in-progress' | 'declined' | 'awaiting' | 'no-response';
2
+ export interface SignerStatusItemProps {
3
+ status: SignatureStatus;
4
+ children: React.ReactNode;
5
+ givenClass?: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ export type SignatureStatus = 'signed' | 'in-progress' | 'declined' | 'awaiting' | 'no-response'
2
+
3
+ export interface SignerStatusItemProps {
4
+ status: SignatureStatus
5
+ children: React.ReactNode
6
+ givenClass?: string
7
+ }
@@ -0,0 +1,2 @@
1
+ export { SignerStatusItem } from './SignerStatusItem';
2
+ export type { SignerStatusItemProps, SignatureStatus } from './SignerStatusItemProps.types';
@@ -0,0 +1 @@
1
+ export { SignerStatusItem } from './SignerStatusItem';
@@ -0,0 +1,2 @@
1
+ export { SignerStatusItem } from './SignerStatusItem'
2
+ export type { SignerStatusItemProps, SignatureStatus } from './SignerStatusItemProps.types'
@@ -1,8 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Tippy from '@tippyjs/react';
3
3
  import classNames from 'classnames';
4
- // import 'tippy.js/dist/tippy.css'
5
- // import './Tooltip.scss'
6
4
  const Tooltip = ({ children, position = 'top', inverted, trigger = 'hover', ...rest }) => {
7
5
  if (children === undefined)
8
6
  return null;
@@ -3,8 +3,6 @@ import Tippy from '@tippyjs/react'
3
3
  import classNames from 'classnames'
4
4
 
5
5
  import { type TooltipProps } from './TooltipProps.types'
6
- // import 'tippy.js/dist/tippy.css'
7
- // import './Tooltip.scss'
8
6
 
9
7
  const Tooltip: FC<TooltipProps> = ({ children, position = 'top', inverted, trigger = 'hover', ...rest }) => {
10
8
  if (children === undefined) return null
@@ -0,0 +1,3 @@
1
+ import { type FC } from 'react';
2
+ import type { SignersStatusTooltipContentProps } from './SignersStatusTooltipContentProps.types';
3
+ export declare const SignersStatusTooltipContent: FC<SignersStatusTooltipContentProps>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from '../../atoms/Button';
3
+ import { SignerStatusItem } from '../../atoms/SignerStatusItem';
4
+ import { SignersStatusTooltipContentStyled } from './SignersStatusTooltipContent.styled';
5
+ export const SignersStatusTooltipContent = ({ title = 'Signers Status', signers, manageRequestsLabel, onManageRequestsClick, manageRequestsDataQa = 'manage_requests_button', givenClass = '' }) => {
6
+ 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}`))) }), _jsx("div", { className: 'signers-status-tooltip-content__button', children: _jsx(Button, { noLink: true, color: 'tertiary', givenClass: 'underline-button', label: manageRequestsLabel, dataQa: manageRequestsDataQa, onClick: onManageRequestsClick }) })] }));
7
+ };
@@ -0,0 +1 @@
1
+ export declare const SignersStatusTooltipContentStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,27 @@
1
+ import { device } from '../../../globalStyles/breakpoints';
2
+ import styled from 'styled-components';
3
+ export const SignersStatusTooltipContentStyled = styled.div `
4
+ padding: 0.5rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 0.5rem;
8
+ width: max-content;
9
+ font-family: var(--font-sans);
10
+
11
+ @media ${device.mobile} {
12
+ width: auto;
13
+ }
14
+
15
+ .signers-status-tooltip-content__signers {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 0.5rem;
19
+ padding-bottom: 0.5rem;
20
+ margin: 0;
21
+ list-style: none;
22
+ }
23
+
24
+ .signers-status-tooltip-content__button {
25
+ margin-top: 0;
26
+ }
27
+ `;
@@ -0,0 +1,28 @@
1
+ import { device } from '../../../globalStyles/breakpoints'
2
+ import styled from 'styled-components'
3
+
4
+ export const SignersStatusTooltipContentStyled = styled.div`
5
+ padding: 0.5rem;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.5rem;
9
+ width: max-content;
10
+ font-family: var(--font-sans);
11
+
12
+ @media ${device.mobile} {
13
+ width: auto;
14
+ }
15
+
16
+ .signers-status-tooltip-content__signers {
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 0.5rem;
20
+ padding-bottom: 0.5rem;
21
+ margin: 0;
22
+ list-style: none;
23
+ }
24
+
25
+ .signers-status-tooltip-content__button {
26
+ margin-top: 0;
27
+ }
28
+ `