@npm_leadtech/legal-lib-components 5.2.10 → 5.2.11
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/dist/css/styles.css +5 -0
- package/dist/src/components/atoms/CardPane/CardPane.scss +6 -0
- package/dist/src/components/atoms/CardPane/CardPaneInfo.js +5 -4
- package/dist/src/components/atoms/CardPane/CardPaneInfo.tsx +14 -3
- package/dist/src/components/atoms/CardPane/CardPaneProps.types.d.ts +1 -0
- package/dist/src/components/atoms/CardPane/CardPaneProps.types.ts +1 -0
- package/package.json +1 -1
package/dist/css/styles.css
CHANGED
|
@@ -1314,6 +1314,8 @@ html[data-theme=lawdistrict] .e-button.--primary-3 {
|
|
|
1314
1314
|
text-indent: -0.625rem;
|
|
1315
1315
|
}
|
|
1316
1316
|
.pane--title {
|
|
1317
|
+
border: none;
|
|
1318
|
+
background: none;
|
|
1317
1319
|
color: var(--neutral-neutral-2);
|
|
1318
1320
|
font-size: 0.875rem;
|
|
1319
1321
|
line-height: 1.29;
|
|
@@ -1333,6 +1335,9 @@ html[data-theme=lawdistrict] .e-button.--primary-3 {
|
|
|
1333
1335
|
font-size: 0.875rem;
|
|
1334
1336
|
}
|
|
1335
1337
|
}
|
|
1338
|
+
.pane--title.pane--title--button {
|
|
1339
|
+
cursor: pointer;
|
|
1340
|
+
}
|
|
1336
1341
|
.pane--description {
|
|
1337
1342
|
color: var(--neutral-main);
|
|
1338
1343
|
font-size: 1rem;
|
|
@@ -80,6 +80,8 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
&--title {
|
|
83
|
+
border: none;
|
|
84
|
+
background: none;
|
|
83
85
|
color: get-color(neutral, neutral-2);
|
|
84
86
|
font-size: 0.875rem;
|
|
85
87
|
line-height: 1.29;
|
|
@@ -92,6 +94,10 @@
|
|
|
92
94
|
@include laptop {
|
|
93
95
|
font-size: 0.875rem;
|
|
94
96
|
}
|
|
97
|
+
|
|
98
|
+
&.pane--title--button {
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
95
101
|
}
|
|
96
102
|
&--description {
|
|
97
103
|
color: get-color(neutral);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
const CardPaneInfo = ({ description, subdescription, id, title }) => {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const CardPaneInfo = ({ description, subdescription, id, title, handleClick }) => {
|
|
3
|
+
const paneTitle = (_jsx(_Fragment, { children: handleClick ? (_jsx("button", { onClick: handleClick, className: 'pane--title pane--title--button', children: title })) : (_jsx("div", { className: 'pane--title', children: title })) }));
|
|
3
4
|
if (description === 'Active' || description === 'Inactive') {
|
|
4
5
|
let descriptionClass;
|
|
5
6
|
if (description === 'Active') {
|
|
@@ -8,8 +9,8 @@ const CardPaneInfo = ({ description, subdescription, id, title }) => {
|
|
|
8
9
|
else if (description === 'Inactive') {
|
|
9
10
|
descriptionClass = 'pane--description--inactive';
|
|
10
11
|
}
|
|
11
|
-
return (_jsxs("div", { className: 'pane-wrapper', children: [
|
|
12
|
+
return (_jsxs("div", { className: 'pane-wrapper', children: [paneTitle, _jsx("div", { "data-testid": 'description-div', className: descriptionClass, children: _jsx("li", { className: 'position', children: _jsx("div", { className: 'marker', children: description }) }) })] }, id));
|
|
12
13
|
}
|
|
13
|
-
return (_jsxs("div", { className: 'pane-wrapper', children: [
|
|
14
|
+
return (_jsxs("div", { className: 'pane-wrapper', children: [paneTitle, _jsxs("div", { className: 'pane--description', children: [description, subdescription !== undefined && _jsx("span", { className: 'pane--description--subdescription', children: subdescription })] })] }, id));
|
|
14
15
|
};
|
|
15
16
|
export default CardPaneInfo;
|
|
@@ -4,7 +4,18 @@ import React, { type FC } from 'react'
|
|
|
4
4
|
|
|
5
5
|
import { type CardPaneInfoProps } from './CardPaneProps.types'
|
|
6
6
|
|
|
7
|
-
const CardPaneInfo: FC<CardPaneInfoProps> = ({ description, subdescription, id, title }) => {
|
|
7
|
+
const CardPaneInfo: FC<CardPaneInfoProps> = ({ description, subdescription, id, title, handleClick }) => {
|
|
8
|
+
const paneTitle = (
|
|
9
|
+
<>
|
|
10
|
+
{handleClick ? (
|
|
11
|
+
<button onClick={handleClick} className='pane--title pane--title--button'>
|
|
12
|
+
{title}
|
|
13
|
+
</button>
|
|
14
|
+
) : (
|
|
15
|
+
<div className='pane--title'>{title}</div>
|
|
16
|
+
)}
|
|
17
|
+
</>
|
|
18
|
+
)
|
|
8
19
|
if (description === 'Active' || description === 'Inactive') {
|
|
9
20
|
let descriptionClass
|
|
10
21
|
if (description === 'Active') {
|
|
@@ -14,7 +25,7 @@ const CardPaneInfo: FC<CardPaneInfoProps> = ({ description, subdescription, id,
|
|
|
14
25
|
}
|
|
15
26
|
return (
|
|
16
27
|
<div key={id} className='pane-wrapper'>
|
|
17
|
-
|
|
28
|
+
{paneTitle}
|
|
18
29
|
<div data-testid='description-div' className={descriptionClass}>
|
|
19
30
|
<li className='position'>
|
|
20
31
|
<div className='marker'>{description}</div>
|
|
@@ -26,7 +37,7 @@ const CardPaneInfo: FC<CardPaneInfoProps> = ({ description, subdescription, id,
|
|
|
26
37
|
|
|
27
38
|
return (
|
|
28
39
|
<div key={id} className='pane-wrapper'>
|
|
29
|
-
|
|
40
|
+
{paneTitle}
|
|
30
41
|
<div className='pane--description'>
|
|
31
42
|
{description}
|
|
32
43
|
{subdescription !== undefined && <span className='pane--description--subdescription'>{subdescription}</span>}
|