@npm_leadtech/legal-lib-components 5.39.3 → 5.39.5

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.
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, IconSvgURLWithThemeColor, RichTextStrapi } from '../../atoms';
3
3
  import { RatafiaSubscriptionCardStyled } from './RatafiaSubscriptionCard.styled';
4
4
  import { stringSlugify } from '../../../utils/stringSlugify';
5
- const RatafiaSubscriptionCard = ({ cardStyle = 'primary', iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, handleClick }) => {
5
+ const RatafiaSubscriptionCard = ({ cardStyle = 'primary', iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, dataQa, handleClick }) => {
6
6
  if (!title)
7
7
  return null;
8
8
  const buttonStyle = cardStyle === 'Secondary' ? 'primary3' : 'primary';
9
9
  const renderFeatures = (features, className) => features.map((feature) => (_jsxs("div", { className: `ratafia-card__feature ${className ?? ''}`, children: [feature.image?.url && _jsx(IconSvgURLWithThemeColor, { url: feature.image.url, height: '16', width: '16' }), _jsx(RichTextStrapi, { html: feature.title })] }, feature.title)));
10
- return (_jsxs(RatafiaSubscriptionCardStyled, { className: `ratafia-card ${cardStyle ? stringSlugify(cardStyle) : 'primary'}`, children: [_jsxs("div", { className: 'ratafia-card__header', children: [title && (_jsxs("div", { className: 'ratafia-card__title', children: [iconTitle?.url && _jsx(IconSvgURLWithThemeColor, { url: iconTitle.url, height: '26', width: '26' }), _jsx(RichTextStrapi, { html: title })] })), priceText && _jsx("div", { className: 'ratafia-card__price-text', children: priceText })] }), _jsx("hr", {}), _jsxs("div", { className: 'ratafia-card__body', children: [mainFeatures && renderFeatures(mainFeatures, 'main-feature'), AIFeatures && renderFeatures(AIFeatures, 'ratafia-feature')] }), buttonText && (_jsx("div", { className: 'ratafia-card__footer', children: _jsx(Button, { dataQa: 'ratafia-card-button', givenClass: 'ratafia-card__button', color: buttonStyle, label: buttonText, noLink: true, onClick: handleClick }) }))] }));
10
+ return (_jsxs(RatafiaSubscriptionCardStyled, { className: `ratafia-card ${cardStyle ? stringSlugify(cardStyle) : 'primary'}`, children: [_jsxs("div", { className: 'ratafia-card__header', children: [title && (_jsxs("div", { className: 'ratafia-card__title', children: [iconTitle?.url && _jsx(IconSvgURLWithThemeColor, { url: iconTitle.url, height: '26', width: '26' }), _jsx(RichTextStrapi, { html: title })] })), priceText && _jsx("div", { className: 'ratafia-card__price-text', children: priceText })] }), _jsx("hr", {}), _jsxs("div", { className: 'ratafia-card__body', children: [mainFeatures && renderFeatures(mainFeatures, 'main-feature'), AIFeatures && renderFeatures(AIFeatures, 'ratafia-feature')] }), buttonText && (_jsx("div", { className: 'ratafia-card__footer', children: _jsx(Button, { dataQa: `${dataQa ?? 'ratafia-card-button'}`, givenClass: 'ratafia-card__button', color: buttonStyle, label: buttonText, noLink: true, onClick: handleClick }) }))] }));
11
11
  };
12
12
  export default RatafiaSubscriptionCard;
@@ -13,6 +13,7 @@ const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
13
13
  mainFeatures,
14
14
  AIFeatures,
15
15
  buttonText,
16
+ dataQa,
16
17
  handleClick
17
18
  }) => {
18
19
  if (!title) return null
@@ -44,7 +45,7 @@ const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
44
45
  {buttonText && (
45
46
  <div className='ratafia-card__footer'>
46
47
  <Button
47
- dataQa='ratafia-card-button'
48
+ dataQa={`${dataQa ?? 'ratafia-card-button'}`}
48
49
  givenClass='ratafia-card__button'
49
50
  color={buttonStyle}
50
51
  label={buttonText}
@@ -1,4 +1,5 @@
1
1
  export interface RatafiaSubscriptionCardProps {
2
+ subscriptionTypeName?: string;
2
3
  cardStyle?: CardStyleType;
3
4
  iconTitle?: IconTitleProps;
4
5
  title?: string;
@@ -6,6 +7,7 @@ export interface RatafiaSubscriptionCardProps {
6
7
  mainFeatures?: BenefitProps[];
7
8
  AIFeatures?: BenefitProps[];
8
9
  buttonText?: string;
10
+ dataQa?: string;
9
11
  handleClick?: () => void;
10
12
  }
11
13
  interface IconTitleProps {
@@ -1,4 +1,5 @@
1
1
  export interface RatafiaSubscriptionCardProps {
2
+ subscriptionTypeName?: string
2
3
  cardStyle?: CardStyleType
3
4
  iconTitle?: IconTitleProps
4
5
  title?: string
@@ -6,6 +7,7 @@ export interface RatafiaSubscriptionCardProps {
6
7
  mainFeatures?: BenefitProps[]
7
8
  AIFeatures?: BenefitProps[]
8
9
  buttonText?: string
10
+ dataQa?: string
9
11
  handleClick?: () => void
10
12
  }
11
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.39.3",
3
+ "version": "5.39.5",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",