@npm_leadtech/legal-lib-components 5.38.1 → 5.39.0

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.
@@ -14,7 +14,7 @@ const themes = {
14
14
  icon: _jsx(Done24pxOutline, {})
15
15
  }
16
16
  };
17
- const Feedback = ({ theme = 'success', title, text, button, cancel, large = false, fluid = false, imgSrc = '', dataQa = '' }) => {
17
+ const Feedback = ({ theme = 'success', title, text, button, cancel, large, fluid, imgSrc = '', dataQa = '' }) => {
18
18
  const currentTheme = themes[theme] ?? {};
19
19
  if (Object.keys(currentTheme).length === 0 && imgSrc.length === 0) {
20
20
  return null;
@@ -28,8 +28,8 @@ const Feedback: FC<FeedbackProps> = ({
28
28
  text,
29
29
  button,
30
30
  cancel,
31
- large = false,
32
- fluid = false,
31
+ large,
32
+ fluid,
33
33
  imgSrc = '',
34
34
  dataQa = ''
35
35
  }) => {
@@ -4,8 +4,8 @@ export interface FeedbackProps {
4
4
  title?: string;
5
5
  text?: string;
6
6
  imgSrc?: string;
7
- large?: boolean;
8
- fluid?: boolean;
7
+ large: boolean;
8
+ fluid: boolean;
9
9
  dataQa?: string;
10
10
  button?: ButtonProps;
11
11
  cancel?: {
@@ -5,8 +5,8 @@ export interface FeedbackProps {
5
5
  title?: string
6
6
  text?: string
7
7
  imgSrc?: string
8
- large?: boolean
9
- fluid?: boolean
8
+ large: boolean
9
+ fluid: boolean
10
10
  dataQa?: string
11
11
  button?: ButtonProps
12
12
  cancel?: {
@@ -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, iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, linkText }) => {
5
+ const RatafiaSubscriptionCard = ({ cardStyle = 'primary', iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, 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, link: linkText ?? '#' }) }))] }));
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 }) }))] }));
11
11
  };
12
12
  export default RatafiaSubscriptionCard;
@@ -6,14 +6,14 @@ import { RatafiaSubscriptionCardStyled } from './RatafiaSubscriptionCard.styled'
6
6
  import { stringSlugify } from '../../../utils/stringSlugify'
7
7
 
8
8
  const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
9
- cardStyle,
9
+ cardStyle = 'primary',
10
10
  iconTitle,
11
11
  title,
12
12
  priceText,
13
13
  mainFeatures,
14
14
  AIFeatures,
15
15
  buttonText,
16
- linkText
16
+ handleClick
17
17
  }) => {
18
18
  if (!title) return null
19
19
  const buttonStyle = cardStyle === 'Secondary' ? 'primary3' : 'primary'
@@ -48,7 +48,8 @@ const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
48
48
  givenClass='ratafia-card__button'
49
49
  color={buttonStyle}
50
50
  label={buttonText}
51
- link={linkText ?? '#'}
51
+ noLink
52
+ onClick={handleClick}
52
53
  />
53
54
  </div>
54
55
  )}
@@ -6,7 +6,7 @@ export interface RatafiaSubscriptionCardProps {
6
6
  mainFeatures?: BenefitProps[];
7
7
  AIFeatures?: BenefitProps[];
8
8
  buttonText?: string;
9
- linkText?: string;
9
+ handleClick?: () => void;
10
10
  }
11
11
  interface IconTitleProps {
12
12
  name?: string;
@@ -6,7 +6,7 @@ export interface RatafiaSubscriptionCardProps {
6
6
  mainFeatures?: BenefitProps[]
7
7
  AIFeatures?: BenefitProps[]
8
8
  buttonText?: string
9
- linkText?: string
9
+ handleClick?: () => void
10
10
  }
11
11
 
12
12
  interface IconTitleProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.38.1",
3
+ "version": "5.39.0",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",