@npm_leadtech/legal-lib-components 5.33.2 → 5.33.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.
Files changed (17) hide show
  1. package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.js +2 -2
  2. package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.tsx +3 -4
  3. package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCardProps.types.d.ts +1 -1
  4. package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCardProps.types.ts +1 -1
  5. package/dist/src/components/organisms/CardFunctionality/CardFunctionality.js +3 -1
  6. package/dist/src/components/organisms/CardFunctionality/CardFunctionality.styled.js +5 -0
  7. package/dist/src/components/organisms/CardFunctionality/CardFunctionality.styled.ts +5 -0
  8. package/dist/src/components/organisms/CardFunctionality/CardFunctionality.tsx +9 -1
  9. package/dist/src/components/organisms/CardFunctionality/CardFunctionalityProps.d.ts +1 -0
  10. package/dist/src/components/organisms/CardFunctionality/CardFunctionalityProps.ts +1 -0
  11. package/dist/src/components/pages/ErrorRatafiaPage/ErrorRatafiaPage.styled.js +1 -0
  12. package/dist/src/components/pages/ErrorRatafiaPage/ErrorRatafiaPage.styled.ts +1 -0
  13. package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.js +0 -1
  14. package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.styled.js +1 -3
  15. package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.styled.ts +1 -3
  16. package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.tsx +0 -1
  17. package/package.json +1 -1
@@ -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, iconTitle, title, priceText, mainFeatures, AIFeatures, buttonText, linkText }) => {
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: 'ratafia-card-button', givenClass: 'ratafia-card__button', color: buttonStyle, label: buttonText, link: linkText ?? '#' }) }))] }));
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 = 'primary',
9
+ cardStyle,
10
10
  iconTitle,
11
11
  title,
12
12
  priceText,
13
13
  mainFeatures,
14
14
  AIFeatures,
15
15
  buttonText,
16
- handleClick
16
+ linkText
17
17
  }) => {
18
18
  if (!title) return null
19
19
  const buttonStyle = cardStyle === 'Secondary' ? 'primary3' : 'primary'
@@ -48,8 +48,7 @@ const RatafiaSubscriptionCard: FC<RatafiaSubscriptionCardProps> = ({
48
48
  givenClass='ratafia-card__button'
49
49
  color={buttonStyle}
50
50
  label={buttonText}
51
- noLink
52
- onClick={handleClick}
51
+ link={linkText ?? '#'}
53
52
  />
54
53
  </div>
55
54
  )}
@@ -6,7 +6,7 @@ export interface RatafiaSubscriptionCardProps {
6
6
  mainFeatures?: BenefitProps[];
7
7
  AIFeatures?: BenefitProps[];
8
8
  buttonText?: string;
9
- handleClick?: () => void;
9
+ linkText?: string;
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
- handleClick?: () => void
9
+ linkText?: string
10
10
  }
11
11
 
12
12
  interface IconTitleProps {
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Tag } from '../../atoms';
3
3
  import { CardFunctionalityStyled } from './CardFunctionality.styled';
4
- export const CardFunctionality = ({ icon, title, text, tags, cta }) => {
4
+ export const CardFunctionality = ({ icon, title, text, tags, cta, isHidden = false }) => {
5
+ if (isHidden)
6
+ return null;
5
7
  return (_jsxs(CardFunctionalityStyled, { children: [_jsxs("div", { className: 'content-tags', children: [_jsxs("div", { className: 'content', children: [_jsxs("div", { className: 'header', children: [_jsx("div", { className: 'icon', children: icon }), _jsx("p", { className: 'title', children: title })] }), _jsx("div", { title: text, className: 'text', children: text })] }), _jsx("div", { className: 'tags', children: tags.map((tag) => (_jsx(Tag, { ...tag }, tag.id))) })] }), _jsx(Button, { ...cta, givenClass: 'cta-card' })] }));
6
8
  };
@@ -1,3 +1,4 @@
1
+ import { device } from '../../../globalStyles/breakpoints';
1
2
  import styled from 'styled-components';
2
3
  export const CardFunctionalityStyled = styled.article `
3
4
  border-radius: var(--global-border-radius);
@@ -6,6 +7,10 @@ export const CardFunctionalityStyled = styled.article `
6
7
  flex-direction: column;
7
8
  gap: var(--global-gap);
8
9
  padding: 1em;
10
+ width: 100%;
11
+ @media ${device.laptop} {
12
+ width: 50%;
13
+ }
9
14
 
10
15
  .content-tags {
11
16
  display: flex;
@@ -1,3 +1,4 @@
1
+ import { device } from '../../../globalStyles/breakpoints'
1
2
  import styled from 'styled-components'
2
3
 
3
4
  export const CardFunctionalityStyled = styled.article`
@@ -7,6 +8,10 @@ export const CardFunctionalityStyled = styled.article`
7
8
  flex-direction: column;
8
9
  gap: var(--global-gap);
9
10
  padding: 1em;
11
+ width: 100%;
12
+ @media ${device.laptop} {
13
+ width: 50%;
14
+ }
10
15
 
11
16
  .content-tags {
12
17
  display: flex;
@@ -4,7 +4,15 @@ import { Button, Tag } from '../../atoms'
4
4
  import { type CardFunctionalityProps } from './CardFunctionalityProps'
5
5
  import { CardFunctionalityStyled } from './CardFunctionality.styled'
6
6
 
7
- export const CardFunctionality: React.FC<CardFunctionalityProps> = ({ icon, title, text, tags, cta }) => {
7
+ export const CardFunctionality: React.FC<CardFunctionalityProps> = ({
8
+ icon,
9
+ title,
10
+ text,
11
+ tags,
12
+ cta,
13
+ isHidden = false
14
+ }) => {
15
+ if (isHidden) return null
8
16
  return (
9
17
  <CardFunctionalityStyled>
10
18
  <div className='content-tags'>
@@ -6,4 +6,5 @@ export interface CardFunctionalityProps {
6
6
  tags: TagProps[];
7
7
  cta: ButtonProps;
8
8
  id: string;
9
+ isHidden: boolean;
9
10
  }
@@ -7,4 +7,5 @@ export interface CardFunctionalityProps {
7
7
  tags: TagProps[]
8
8
  cta: ButtonProps
9
9
  id: string
10
+ isHidden: boolean
10
11
  }
@@ -14,6 +14,7 @@ export const ErrorRatafiaPageStyled = styled.div `
14
14
  &__button {
15
15
  display: block;
16
16
  width: 100%;
17
+ height: auto;
17
18
  &:first-child {
18
19
  margin-bottom: 1rem;
19
20
  }
@@ -15,6 +15,7 @@ export const ErrorRatafiaPageStyled = styled.div`
15
15
  &__button {
16
16
  display: block;
17
17
  width: 100%;
18
+ height: auto;
18
19
  &:first-child {
19
20
  margin-bottom: 1rem;
20
21
  }
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CardFunctionality } from '../../organisms';
3
3
  import { FunctionalityCardsSectionStyled } from './FunctionalityCardsSection.styled';
4
- // import './FunctionalityCardsSection.scss'
5
4
  export const FunctionalityCardsSection = ({ cards = [] }) => {
6
5
  if (cards.length === 0)
7
6
  return null;
@@ -3,12 +3,10 @@ import styled from 'styled-components';
3
3
  export const FunctionalityCardsSectionStyled = styled.section `
4
4
  display: flex;
5
5
  flex-direction: column;
6
- gap: $global-gap;
7
- margin-bottom: 2rem;
6
+ gap: var(--global-gap);
8
7
  width: 100%;
9
8
 
10
9
  @media ${device.laptop} {
11
10
  flex-direction: row;
12
- width: 50%;
13
11
  }
14
12
  `;
@@ -4,12 +4,10 @@ import styled from 'styled-components'
4
4
  export const FunctionalityCardsSectionStyled = styled.section`
5
5
  display: flex;
6
6
  flex-direction: column;
7
- gap: $global-gap;
8
- margin-bottom: 2rem;
7
+ gap: var(--global-gap);
9
8
  width: 100%;
10
9
 
11
10
  @media ${device.laptop} {
12
11
  flex-direction: row;
13
- width: 50%;
14
12
  }
15
13
  `
@@ -3,7 +3,6 @@ import React from 'react'
3
3
  import { CardFunctionality } from '../../organisms'
4
4
  import { type FunctionalityCardsSectionProps } from './FunctionalityCardsSectionProps'
5
5
  import { FunctionalityCardsSectionStyled } from './FunctionalityCardsSection.styled'
6
- // import './FunctionalityCardsSection.scss'
7
6
 
8
7
  export const FunctionalityCardsSection: React.FC<FunctionalityCardsSectionProps> = ({ cards = [] }) => {
9
8
  if (cards.length === 0) return null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "5.33.2",
3
+ "version": "5.33.3",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",