@npm_leadtech/legal-lib-components 5.0.2 → 5.1.1
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 +17 -0
- package/dist/src/components/atoms/Button/Button.tsx +0 -1
- package/dist/src/components/atoms/Button/ButtonProps.types.ts +0 -1
- package/dist/src/components/atoms/ButtonIcon/ButtonIconProps.types.ts +0 -1
- package/dist/src/components/atoms/CardPane/CardPane.tsx +0 -1
- package/dist/src/components/atoms/CardPane/CardPaneInfo.tsx +0 -2
- package/dist/src/components/atoms/Checkbox/CheckboxProps.types.ts +0 -1
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.js +0 -4
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.tsx +0 -4
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustomProps.types.ts +0 -1
- package/dist/src/components/atoms/DatePickerCustom/index.js.map +2 -2
- package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.js +1 -3
- package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.tsx +1 -4
- package/dist/src/components/atoms/Disclaimer/Disclaimer.js +0 -1
- package/dist/src/components/atoms/Disclaimer/Disclaimer.tsx +0 -1
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.js +0 -1
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.tsx +0 -1
- package/dist/src/components/atoms/Divider/Divider.tsx +0 -2
- package/dist/src/components/atoms/Divider/DividerProps.types.ts +0 -1
- package/dist/src/components/atoms/GoogleButton/GoogleButton.tsx +0 -1
- package/dist/src/components/atoms/IconImage/IconImage.tsx +0 -1
- package/dist/src/components/atoms/IconSvgURLWithThemeColor/IconSvgURLWithThemeColor.tsx +0 -1
- package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.js +0 -1
- package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.tsx +0 -1
- package/dist/src/components/atoms/InfoBox/InfoBox.tsx +1 -2
- package/dist/src/components/atoms/InfoBox/InfoBoxProps.types.ts +0 -1
- package/dist/src/components/atoms/Logo/Logo.tsx +0 -3
- package/dist/src/components/atoms/LogoText/LogoTextProps.types.ts +0 -1
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.ts +0 -1
- package/dist/src/components/atoms/MenuItems/MenuItems.js +0 -4
- package/dist/src/components/atoms/MenuItems/MenuItems.tsx +0 -4
- package/dist/src/components/atoms/MessageInformation/MessageInformation.tsx +0 -1
- package/dist/src/components/atoms/MoreDocsItem/MoreDocsItem.js +1 -1
- package/dist/src/components/atoms/MoreDocsItem/MoreDocsItem.tsx +1 -1
- package/dist/src/components/atoms/NavMenuItem/NavMenuItemProps.d.ts +2 -2
- package/dist/src/components/atoms/NavMenuItem/NavMenuItemProps.ts +2 -2
- package/dist/src/components/atoms/PaypalButton/PaypalButton.tsx +0 -1
- package/dist/src/components/atoms/PopularDocsItem/PopularDocsItem.js +1 -1
- package/dist/src/components/atoms/PopularDocsItem/PopularDocsItem.tsx +1 -1
- package/dist/src/components/atoms/ProgressBar/ProgressBar.tsx +0 -1
- package/dist/src/components/atoms/ProgressBar/ProgressBarProps.types.ts +0 -1
- package/dist/src/components/atoms/Radio/Radio.js +1 -1
- package/dist/src/components/atoms/Radio/Radio.tsx +2 -4
- package/dist/src/components/atoms/Radio/RadioProps.types.d.ts +2 -2
- package/dist/src/components/atoms/Radio/RadioProps.types.ts +1 -1
- package/dist/src/components/atoms/RemoveButton/RemoveButton.tsx +0 -1
- package/dist/src/components/atoms/RichTextStrapi/RichTextStrapi.tsx +2 -0
- package/dist/src/components/atoms/RichTextStrapi/useFormattedText.js +0 -1
- package/dist/src/components/atoms/RichTextStrapi/useFormattedText.tsx +0 -1
- package/dist/src/components/atoms/SearchSelect/SearchSelect.js +2 -2
- package/dist/src/components/atoms/SearchSelect/SearchSelect.tsx +3 -8
- package/dist/src/components/atoms/SearchSelect/SearchSelectProps.types.ts +0 -1
- package/dist/src/components/atoms/SidemenuTab/SideMenuTabProps.types.ts +0 -1
- package/dist/src/components/atoms/SidemenuTab/SidemenuTab.tsx +0 -2
- package/dist/src/components/atoms/Tag/Tag.scss +4 -0
- package/dist/src/components/atoms/TestAB/TestAB.js +1 -4
- package/dist/src/components/atoms/TestAB/TestAB.tsx +1 -5
- package/dist/src/components/atoms/TextArea/TextArea.tsx +0 -1
- package/dist/src/components/atoms/Tooltip/TooltipProps.types.d.ts +1 -1
- package/dist/src/components/atoms/Tooltip/TooltipProps.types.ts +1 -2
- package/dist/src/components/atoms/WideInfoBar/WideInfoBar.d.ts +1 -1
- package/dist/src/components/atoms/WideInfoBar/WideInfoBar.tsx +1 -1
- package/dist/src/components/molecules/AccordionItem/AccordionItem.d.ts +1 -2
- package/dist/src/components/molecules/AccordionItem/AccordionItem.js +3 -2
- package/dist/src/components/molecules/AccordionItem/AccordionItem.tsx +4 -3
- package/dist/src/components/molecules/AlsoKnownAs/AlsoKnownAs.js +1 -1
- package/dist/src/components/molecules/AlsoKnownAs/AlsoKnownAs.tsx +1 -1
- package/dist/src/components/molecules/BaseBoxList/BaseBoxListProps.types.ts +0 -1
- package/dist/src/components/molecules/BottomFixedBar/BottomFixedBar.tsx +0 -1
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.js +1 -2
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.tsx +1 -2
- package/dist/src/components/molecules/BottomOverlay/BottomOverlayProps.types.ts +0 -1
- package/dist/src/components/molecules/BoxForm/BoxFormProps.types.ts +0 -1
- package/dist/src/components/molecules/Breadcrumb/BreadcrumbProps.types.d.ts +2 -2
- package/dist/src/components/molecules/Breadcrumb/BreadcrumbProps.types.ts +1 -1
- package/dist/src/components/molecules/CountDownMessage/CountDownMessage.js +0 -1
- package/dist/src/components/molecules/CountDownMessage/CountDownMessage.tsx +0 -1
- package/dist/src/components/molecules/Feedback/Feedback.js +1 -1
- package/dist/src/components/molecules/Feedback/Feedback.tsx +1 -2
- package/dist/src/components/molecules/FreeDocModalContent/FreeDocModalContent.tsx +0 -1
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSection.tsx +0 -1
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.js +0 -2
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.tsx +0 -2
- package/dist/src/components/molecules/Pagination/PageStepControl.js +0 -1
- package/dist/src/components/molecules/Pagination/PageStepControl.tsx +0 -1
- package/dist/src/components/molecules/Pagination/PageSteps.tsx +0 -1
- package/dist/src/components/molecules/Pagination/Pagination.js +0 -1
- package/dist/src/components/molecules/Pagination/Pagination.tsx +0 -1
- package/dist/src/components/molecules/PhoneContactBoxDesktop/PhoneContactBoxDesktop.tsx +0 -2
- package/dist/src/components/molecules/PhoneContactBoxMobile/PhoneContactBoxMobile.tsx +0 -1
- package/dist/src/components/molecules/PricingCard/PricingCard.js +2 -3
- package/dist/src/components/molecules/PricingCard/PricingCard.tsx +3 -4
- package/dist/src/components/molecules/PricingCard/PricingCardProps.types.ts +0 -1
- package/dist/src/components/molecules/Snackbar/Snackbar.js +0 -1
- package/dist/src/components/molecules/Snackbar/Snackbar.tsx +0 -1
- package/dist/src/components/molecules/Snackbar/SnackbarProps.types.ts +0 -1
- package/dist/src/components/molecules/TextInput/Input.js +0 -2
- package/dist/src/components/molecules/TextInput/Input.tsx +0 -2
- package/dist/src/components/molecules/TextInput/TextInput.js +2 -4
- package/dist/src/components/molecules/TextInput/TextInput.tsx +2 -3
- package/dist/src/components/molecules/TextInput/TextInputMessage.tsx +0 -1
- package/dist/src/components/molecules/TextInput/TextInputProps.types.ts +0 -1
- package/dist/src/components/molecules/TextInput/TextInputTooltip.tsx +0 -1
- package/dist/src/components/molecules/TooltipMenu/TooltipMenuProps.types.d.ts +2 -2
- package/dist/src/components/molecules/TooltipMenu/TooltipMenuProps.types.ts +2 -2
- package/dist/src/components/molecules/TypeModulesList/TypeModulesList.tsx +0 -1
- package/dist/src/components/organisms/Accordion/Accordion.context.d.ts +1 -1
- package/dist/src/components/organisms/Accordion/Accordion.context.js +0 -2
- package/dist/src/components/organisms/Accordion/Accordion.context.tsx +2 -4
- package/dist/src/components/organisms/Accordion/Accordion.d.ts +1 -2
- package/dist/src/components/organisms/Accordion/Accordion.js +0 -1
- package/dist/src/components/organisms/Accordion/Accordion.tsx +1 -2
- package/dist/src/components/organisms/ArticlesList/ArticlesList.tsx +0 -1
- package/dist/src/components/organisms/CardFunctionality/CardFunctionality.d.ts +3 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionality.js +6 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionality.scss +61 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionality.tsx +29 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionalityProps.d.ts +9 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionalityProps.js +1 -0
- package/dist/src/components/organisms/CardFunctionality/CardFunctionalityProps.ts +10 -0
- package/dist/src/components/organisms/CardFunctionality/index.d.ts +2 -0
- package/dist/src/components/organisms/CardFunctionality/index.js +2 -0
- package/dist/src/components/organisms/CardFunctionality/index.ts +2 -0
- package/dist/src/components/organisms/MobileBottomBar/MobileBottomBar.tsx +0 -1
- package/dist/src/components/organisms/MobileBottomBar/MobileBottomBarProps.types.ts +0 -1
- package/dist/src/components/organisms/index.d.ts +1 -1
- package/dist/src/components/organisms/index.js +1 -1
- package/dist/src/components/organisms/index.ts +1 -1
- package/dist/src/components/pages/AboutUsPage/AboutUsPage.tsx +0 -1
- package/dist/src/components/pages/ErrorRatafiaPage/ErrorRatafiaPageProps.types.ts +0 -1
- package/dist/src/components/pages/KeyFactsResultRatafiaPage/KeyFactsResultRatafiaPageProps.types.ts +0 -1
- package/dist/src/components/sections/AboutUsSection/AboutUsSection.tsx +0 -1
- package/dist/src/components/sections/AsideMenuSection/AsideMenuSectionProps.d.ts +2 -2
- package/dist/src/components/sections/AsideMenuSection/AsideMenuSectionProps.ts +2 -2
- package/dist/src/components/sections/BlogSection/BlogSection.tsx +0 -1
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.d.ts +3 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.js +8 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.scss +15 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSection.tsx +17 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSectionProps.d.ts +4 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSectionProps.js +1 -0
- package/dist/src/components/sections/FunctionalityCardsSection/FunctionalityCardsSectionProps.ts +5 -0
- package/dist/src/components/sections/FunctionalityCardsSection/index.d.ts +2 -0
- package/dist/src/components/sections/FunctionalityCardsSection/index.js +2 -0
- package/dist/src/components/sections/FunctionalityCardsSection/index.ts +2 -0
- package/dist/src/components/sections/HowGetYourFormsSection/HowGetYourFormsSection.tsx +0 -1
- package/dist/src/components/sections/WhyLawDistrictSection/WhyLawDistrictSection.scss +1 -0
- package/dist/src/components/sections/index.d.ts +1 -0
- package/dist/src/components/sections/index.js +1 -0
- package/dist/src/components/sections/index.ts +1 -0
- package/dist/src/custom.d.ts +0 -1
- package/dist/src/globalStyles/styles.scss +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +36 -35
|
@@ -25,7 +25,7 @@ const Feedback = ({ theme = 'success', title, text, button, cancel, large, fluid
|
|
|
25
25
|
buttons.push(_jsx(Button, { ...button }, 'feedback-accept-button'));
|
|
26
26
|
}
|
|
27
27
|
if (cancel?.onClick != null) {
|
|
28
|
-
buttons.push(_jsx("a", { className: 'feedback__cancel__a', onClick: cancel.onClick, children: cancel
|
|
28
|
+
buttons.push(_jsx("a", { className: 'feedback__cancel__a', onClick: cancel.onClick, children: cancel?.label ?? 'Cancel' }, 'feedback-cancel-button'));
|
|
29
29
|
}
|
|
30
30
|
if (buttons.length === 0) {
|
|
31
31
|
return null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
3
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
@@ -48,7 +47,7 @@ const Feedback: FC<FeedbackProps> = ({
|
|
|
48
47
|
if (cancel?.onClick != null) {
|
|
49
48
|
buttons.push(
|
|
50
49
|
<a key='feedback-cancel-button' className='feedback__cancel__a' onClick={cancel.onClick}>
|
|
51
|
-
{cancel
|
|
50
|
+
{cancel?.label ?? 'Cancel'}
|
|
52
51
|
</a>
|
|
53
52
|
)
|
|
54
53
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
3
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
4
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
5
4
|
import { useEffect } from 'react';
|
|
@@ -18,7 +17,6 @@ export const NavBarDropDown = ({ isOpen, list, hasBullets = true, initialActiveC
|
|
|
18
17
|
};
|
|
19
18
|
const onTouchMove = (event) => {
|
|
20
19
|
const touchEndPosY = event.changedTouches[0];
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
22
20
|
if (isDisabledScroll && touchEndPosY?.screenY - touchStartPosY?.screenY > 0) {
|
|
23
21
|
enableScrollbarOnClose(true);
|
|
24
22
|
isDisabledScroll = false;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
2
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
3
|
import React, { type FC, useEffect } from 'react'
|
|
@@ -29,7 +28,6 @@ export const NavBarDropDown: FC<NavBarDropDownProps> = ({
|
|
|
29
28
|
|
|
30
29
|
const onTouchMove = (event: TouchEvent): void => {
|
|
31
30
|
const touchEndPosY = event.changedTouches[0]
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
33
31
|
if (isDisabledScroll && touchEndPosY?.screenY - touchStartPosY?.screenY > 0) {
|
|
34
32
|
enableScrollbarOnClose(true)
|
|
35
33
|
isDisabledScroll = false
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
4
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
5
4
|
import { useCallback } from 'react';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
2
|
import { useState } from 'react';
|
|
4
3
|
import { Button, Message } from '../../atoms';
|
|
5
4
|
// import './PricingCard.scss'
|
|
@@ -7,7 +6,7 @@ const PricingCard = ({ order, subscriptionId, onChangeRadio, isChecked = false,
|
|
|
7
6
|
const [cardState, setCardState] = useState({ expanded: false });
|
|
8
7
|
if (planName === undefined ||
|
|
9
8
|
(onChangeRadio != null && subscriptionId === undefined) ||
|
|
10
|
-
(featuresList
|
|
9
|
+
(featuresList?.length === 0 && children === undefined)) {
|
|
11
10
|
return null;
|
|
12
11
|
}
|
|
13
12
|
const isSelectableCard = onChangeRadio != null;
|
|
@@ -25,7 +24,7 @@ const PricingCard = ({ order, subscriptionId, onChangeRadio, isChecked = false,
|
|
|
25
24
|
};
|
|
26
25
|
const renderMoreMobileButton = (_jsx(Button, { dataQa: '', givenClass: 'see-more-button', color: 'tertiary', label: cardState.expanded ? 'See less' : 'See more', noLink: true, onClick: toggleCardContent }));
|
|
27
26
|
const renderHeaderContent = (_jsx("div", { className: 'pricing-card__header', children: _jsx("h5", { className: 'sans-serif --big pricing-card__header__text', children: _jsx("strong", { children: planName }) }) }));
|
|
28
|
-
const renderBodyContent = (_jsxs("div", { className: 'pricing-card__body', children: [Boolean(price) && (_jsxs("div", { className: 'sans-serif pricing-card__body__price', children: [_jsx("strong", { children: price }), _jsx("span", { children: currency }), Boolean(underPricingText) && _jsx("div", { className: 'pricing-card__body__text', children: underPricingText })] })), Boolean(featuresList
|
|
27
|
+
const renderBodyContent = (_jsxs("div", { className: 'pricing-card__body', children: [Boolean(price) && (_jsxs("div", { className: 'sans-serif pricing-card__body__price', children: [_jsx("strong", { children: price }), _jsx("span", { children: currency }), Boolean(underPricingText) && _jsx("div", { className: 'pricing-card__body__text', children: underPricingText })] })), Boolean(featuresList?.length) && (_jsxs("div", { className: `pricing-card__body__features-list ${expandedContentClass}`, children: [_jsx("hr", {}), _jsx("ul", { children: featuresList?.map((feature) => (_jsx("li", { className: 'pricing-card__body__features-list__item', children: feature }, 'feature-item-' + feature))) })] })), children, featuresList != null && renderMoreMobileButton, cardButton, message != null && _jsx(Message, { ...message })] }));
|
|
29
28
|
return (_jsxs("li", { style: style, className: `pricing-card grid__column ${selectableCardClass} ${selectedCardClass}`, children: [_jsx("div", { className: 'pricing-card__wrapper', children: isSelectableCard ? (_jsxs("label", { className: 'pricing-card__radio-label', "data-qa": planName, children: [_jsx("input", { className: 'radio-input', type: 'radio', value: subscriptionId, onChange: onChangeRadio, name: 'pricing', checked: isChecked }), _jsx("span", { className: 'radio-checkbox' }), renderHeaderContent, renderBodyContent] })) : (_jsxs(_Fragment, { children: [renderHeaderContent, renderBodyContent] })) }), Boolean(disclaimer) && (_jsx("div", { className: 'pricing-card__disclaimer', children: _jsx("small", { children: disclaimer }) }))] }));
|
|
30
29
|
};
|
|
31
30
|
export default PricingCard;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
1
|
import React, { type FC, useState } from 'react'
|
|
3
2
|
|
|
4
3
|
import { Button, Message } from '../../atoms'
|
|
@@ -24,7 +23,7 @@ const PricingCard: FC<PricingCardProps> = ({
|
|
|
24
23
|
if (
|
|
25
24
|
planName === undefined ||
|
|
26
25
|
(onChangeRadio != null && subscriptionId === undefined) ||
|
|
27
|
-
(featuresList
|
|
26
|
+
(featuresList?.length === 0 && children === undefined)
|
|
28
27
|
) {
|
|
29
28
|
return null
|
|
30
29
|
}
|
|
@@ -72,11 +71,11 @@ const PricingCard: FC<PricingCardProps> = ({
|
|
|
72
71
|
{Boolean(underPricingText) && <div className={'pricing-card__body__text'}>{underPricingText}</div>}
|
|
73
72
|
</div>
|
|
74
73
|
)}
|
|
75
|
-
{Boolean(featuresList
|
|
74
|
+
{Boolean(featuresList?.length) && (
|
|
76
75
|
<div className={`pricing-card__body__features-list ${expandedContentClass}`}>
|
|
77
76
|
<hr />
|
|
78
77
|
<ul>
|
|
79
|
-
{featuresList
|
|
78
|
+
{featuresList?.map((feature) => (
|
|
80
79
|
<li key={'feature-item-' + feature} className='pricing-card__body__features-list__item'>
|
|
81
80
|
{feature}
|
|
82
81
|
</li>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
2
|
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
|
|
4
3
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
5
4
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
2
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
5
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
6
4
|
import React, { useState } from 'react';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
3
1
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
4
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
5
3
|
import React, { useState } from 'react'
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
4
2
|
import { NumericFormat } from 'react-number-format';
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import classNames from 'classnames';
|
|
@@ -9,14 +7,14 @@ import { TextInputLabel } from './TextInputLabel';
|
|
|
9
7
|
import { TextInputMessage } from './TextInputMessage';
|
|
10
8
|
import { TextInputTooltip } from './TextInputTooltip';
|
|
11
9
|
// import './TextInput.scss'
|
|
12
|
-
const TextInput = React.forwardRef(({ label, value, validate = true, isValidGroup = true, format = undefined, name, placeholder, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength, errorMessage = '', notes, dialogMenuTip, tooltip = '', givenClass = '', children }, ref) => {
|
|
10
|
+
const TextInput = React.forwardRef(({ label, value, validate = true, isValidGroup = true, mask = ' ', format = undefined, name, placeholder, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength, errorMessage = '', notes, dialogMenuTip, tooltip = '', givenClass = '', children }, ref) => {
|
|
13
11
|
const classnames = classNames('e-text', {
|
|
14
12
|
[givenClass]: givenClass,
|
|
15
13
|
'e-text--is-invalid': !validate,
|
|
16
14
|
'e-text--group-invalid': !isValidGroup
|
|
17
15
|
});
|
|
18
16
|
const handleChange = (event) => {
|
|
19
|
-
onChange(event);
|
|
17
|
+
onChange?.(event);
|
|
20
18
|
};
|
|
21
19
|
const handleKeyDown = (event) => {
|
|
22
20
|
onKeyDown?.(event);
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
3
1
|
import { NumericFormat } from 'react-number-format'
|
|
4
2
|
import React from 'react'
|
|
5
3
|
import classNames from 'classnames'
|
|
@@ -18,6 +16,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
18
16
|
value,
|
|
19
17
|
validate = true,
|
|
20
18
|
isValidGroup = true,
|
|
19
|
+
mask = ' ',
|
|
21
20
|
format = undefined,
|
|
22
21
|
name,
|
|
23
22
|
placeholder,
|
|
@@ -45,7 +44,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
45
44
|
})
|
|
46
45
|
|
|
47
46
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
48
|
-
onChange(event)
|
|
47
|
+
onChange?.(event)
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {
|
|
@@ -37,7 +37,7 @@ interface AccordionProviderProps {
|
|
|
37
37
|
children: React.ReactNode;
|
|
38
38
|
elements: number;
|
|
39
39
|
}
|
|
40
|
-
declare function AccordionProvider({ children, elements }: AccordionProviderProps):
|
|
40
|
+
declare function AccordionProvider({ children, elements }: AccordionProviderProps): JSX.Element;
|
|
41
41
|
declare function useDispatchDataAccordionItem(): {
|
|
42
42
|
dispatch: Dispatch;
|
|
43
43
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
4
2
|
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
|
5
3
|
import React from 'react';
|
|
6
4
|
const AccordionContext = React.createContext(undefined);
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
3
1
|
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
|
4
2
|
import React from 'react'
|
|
5
3
|
|
|
@@ -81,12 +79,12 @@ const actions = {
|
|
|
81
79
|
|
|
82
80
|
function accordionDataReducer(state: State, action: Action): State {
|
|
83
81
|
if (actions[action.type]) {
|
|
84
|
-
return actions[action.type](state, action)
|
|
82
|
+
return actions[action.type](state, action) as State
|
|
85
83
|
}
|
|
86
84
|
throw new Error(`Unhandled action type: ${action.type}`)
|
|
87
85
|
}
|
|
88
86
|
|
|
89
|
-
function AccordionProvider({ children, elements }: AccordionProviderProps):
|
|
87
|
+
function AccordionProvider({ children, elements }: AccordionProviderProps): JSX.Element {
|
|
90
88
|
const itemsDataAccordion = {
|
|
91
89
|
itemsDataAccordion: Array.from(Array(elements).keys()).map(() => ({
|
|
92
90
|
isLoading: false,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type AccordionProps } from './AccordionProps.types';
|
|
3
|
-
export declare const Accordion: ({ data, defaultActiveIndex, defaultHeightItem }: AccordionProps) =>
|
|
2
|
+
export declare const Accordion: ({ data, defaultActiveIndex, defaultHeightItem }: AccordionProps) => JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
1
|
import React, { useState } from 'react'
|
|
3
2
|
import { AccordionItem } from '../../molecules'
|
|
4
3
|
import { type AccordionProps } from './AccordionProps.types'
|
|
@@ -6,7 +5,7 @@ import { AccordionProvider } from './Accordion.context'
|
|
|
6
5
|
|
|
7
6
|
// import './Accordion.scss'
|
|
8
7
|
|
|
9
|
-
export const Accordion = ({ data, defaultActiveIndex = 0, defaultHeightItem }: AccordionProps):
|
|
8
|
+
export const Accordion = ({ data, defaultActiveIndex = 0, defaultHeightItem }: AccordionProps): JSX.Element => {
|
|
10
9
|
const [activeIndex, setActiveIndex] = useState(defaultActiveIndex)
|
|
11
10
|
|
|
12
11
|
const handleItemClick = (index: number): void => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Tag } from '../../atoms';
|
|
3
|
+
// import './CardFunctionality.scss'
|
|
4
|
+
export const CardFunctionality = ({ icon, title, text, tags, cta }) => {
|
|
5
|
+
return (_jsxs("article", { className: 'card-functionality', 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
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import '../../../globalStyles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.card-functionality {
|
|
4
|
+
border-radius: $global-border-radius;
|
|
5
|
+
box-shadow: $box-shadow-medium;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: $global-gap;
|
|
9
|
+
padding: 1em;
|
|
10
|
+
|
|
11
|
+
.content-tags {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: $global-gap;
|
|
15
|
+
|
|
16
|
+
.content {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: $global-gap/2;
|
|
20
|
+
|
|
21
|
+
.header {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 10px;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
|
|
27
|
+
.icon {
|
|
28
|
+
padding: 2px;
|
|
29
|
+
border-radius: $global-border-radius;
|
|
30
|
+
background: get-color(primary, main-light-5);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.title {
|
|
34
|
+
color: get-color(neutral, neutral-1);
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text {
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
color: get-color(neutral, neutral-1);
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
display: -webkit-box;
|
|
44
|
+
-webkit-line-clamp: 2;
|
|
45
|
+
line-clamp: 2;
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tags {
|
|
51
|
+
display: flex;
|
|
52
|
+
gap: $global-gap * 2;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cta-card {
|
|
58
|
+
align-self: flex-start;
|
|
59
|
+
margin-top: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { Button, Tag } from '../../atoms'
|
|
4
|
+
import { type CardFunctionalityProps } from './CardFunctionalityProps'
|
|
5
|
+
// import './CardFunctionality.scss'
|
|
6
|
+
|
|
7
|
+
export const CardFunctionality: React.FC<CardFunctionalityProps> = ({ icon, title, text, tags, cta }) => {
|
|
8
|
+
return (
|
|
9
|
+
<article className='card-functionality'>
|
|
10
|
+
<div className='content-tags'>
|
|
11
|
+
<div className='content'>
|
|
12
|
+
<div className='header'>
|
|
13
|
+
<div className='icon'>{icon}</div>
|
|
14
|
+
<p className='title'>{title}</p>
|
|
15
|
+
</div>
|
|
16
|
+
<div title={text} className='text'>
|
|
17
|
+
{text}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div className='tags'>
|
|
21
|
+
{tags.map((tag) => (
|
|
22
|
+
<Tag key={tag.id} {...tag} />
|
|
23
|
+
))}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<Button {...cta} givenClass='cta-card' />
|
|
27
|
+
</article>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,7 @@ export * from './AboutUsContent';
|
|
|
2
2
|
export * from './Accordion';
|
|
3
3
|
export * from './ArticlesList';
|
|
4
4
|
export * from './AsSeeInContent';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './CardFunctionality';
|
|
6
6
|
export * from './ContactJumbotron';
|
|
7
7
|
export * from './CookiePolicyBar';
|
|
8
8
|
export * from './ErrorContentRatafia';
|
|
@@ -2,7 +2,7 @@ export * from './AboutUsContent';
|
|
|
2
2
|
export * from './Accordion';
|
|
3
3
|
export * from './ArticlesList';
|
|
4
4
|
export * from './AsSeeInContent';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './CardFunctionality';
|
|
6
6
|
export * from './ContactJumbotron';
|
|
7
7
|
export * from './CookiePolicyBar';
|
|
8
8
|
export * from './ErrorContentRatafia';
|
|
@@ -2,7 +2,7 @@ export * from './AboutUsContent'
|
|
|
2
2
|
export * from './Accordion'
|
|
3
3
|
export * from './ArticlesList'
|
|
4
4
|
export * from './AsSeeInContent'
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './CardFunctionality'
|
|
6
6
|
export * from './ContactJumbotron'
|
|
7
7
|
export * from './CookiePolicyBar'
|
|
8
8
|
export * from './ErrorContentRatafia'
|