@npm_leadtech/legal-lib-components 5.0.1 → 5.0.2
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/src/components/atoms/Button/Button.tsx +1 -0
- package/dist/src/components/atoms/Button/ButtonProps.types.ts +1 -0
- package/dist/src/components/atoms/ButtonIcon/ButtonIconProps.types.ts +1 -0
- package/dist/src/components/atoms/CardPane/CardPane.tsx +1 -0
- package/dist/src/components/atoms/CardPane/CardPaneInfo.tsx +2 -0
- package/dist/src/components/atoms/Checkbox/CheckboxProps.types.ts +1 -0
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.js +4 -0
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.tsx +4 -0
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustomProps.types.ts +1 -0
- package/dist/src/components/atoms/DatePickerCustom/index.js.map +2 -2
- package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.js +3 -1
- package/dist/src/components/atoms/DialogMenuIcon/DialogMenuIcon.tsx +4 -1
- package/dist/src/components/atoms/Disclaimer/Disclaimer.js +1 -0
- package/dist/src/components/atoms/Disclaimer/Disclaimer.tsx +1 -0
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.js +1 -0
- package/dist/src/components/atoms/DisclaimerRatafia/DisclaimerRatafia.tsx +1 -0
- package/dist/src/components/atoms/Divider/Divider.tsx +2 -0
- package/dist/src/components/atoms/Divider/DividerProps.types.ts +1 -0
- package/dist/src/components/atoms/GoogleButton/GoogleButton.tsx +1 -0
- package/dist/src/components/atoms/IconImage/IconImage.tsx +1 -0
- package/dist/src/components/atoms/IconSvgURLWithThemeColor/IconSvgURLWithThemeColor.tsx +1 -0
- package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.js +1 -0
- package/dist/src/components/atoms/IconTextInfoSection/IconTextInfoSection.tsx +1 -0
- package/dist/src/components/atoms/InfoBox/InfoBox.tsx +2 -1
- package/dist/src/components/atoms/InfoBox/InfoBoxProps.types.ts +1 -0
- package/dist/src/components/atoms/Logo/Logo.tsx +3 -0
- package/dist/src/components/atoms/LogoText/LogoTextProps.types.ts +1 -0
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.ts +1 -0
- package/dist/src/components/atoms/MenuItems/MenuItems.js +4 -0
- package/dist/src/components/atoms/MenuItems/MenuItems.tsx +4 -0
- package/dist/src/components/atoms/MessageInformation/MessageInformation.tsx +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBarProps.types.ts +1 -0
- package/dist/src/components/atoms/Radio/Radio.js +1 -1
- package/dist/src/components/atoms/Radio/Radio.tsx +4 -2
- 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 +1 -0
- package/dist/src/components/atoms/RichTextStrapi/RichTextStrapi.tsx +0 -2
- package/dist/src/components/atoms/RichTextStrapi/useFormattedText.js +1 -0
- package/dist/src/components/atoms/RichTextStrapi/useFormattedText.tsx +1 -0
- package/dist/src/components/atoms/SearchSelect/SearchSelect.js +2 -2
- package/dist/src/components/atoms/SearchSelect/SearchSelect.tsx +8 -3
- package/dist/src/components/atoms/SearchSelect/SearchSelectProps.types.ts +1 -0
- package/dist/src/components/atoms/SidemenuTab/SideMenuTabProps.types.ts +1 -0
- package/dist/src/components/atoms/SidemenuTab/SidemenuTab.tsx +2 -0
- package/dist/src/components/atoms/TestAB/TestAB.js +4 -1
- package/dist/src/components/atoms/TestAB/TestAB.tsx +5 -1
- package/dist/src/components/atoms/TextArea/TextArea.tsx +1 -0
- package/dist/src/components/atoms/Tooltip/TooltipProps.types.d.ts +1 -1
- package/dist/src/components/atoms/Tooltip/TooltipProps.types.ts +2 -1
- 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 +2 -1
- package/dist/src/components/molecules/AccordionItem/AccordionItem.js +2 -3
- package/dist/src/components/molecules/AccordionItem/AccordionItem.tsx +3 -4
- 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 +1 -0
- package/dist/src/components/molecules/BottomFixedBar/BottomFixedBar.tsx +1 -0
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.js +2 -1
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.tsx +2 -1
- package/dist/src/components/molecules/BottomOverlay/BottomOverlayProps.types.ts +1 -0
- package/dist/src/components/molecules/BoxForm/BoxFormProps.types.ts +1 -0
- 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 +1 -0
- package/dist/src/components/molecules/CountDownMessage/CountDownMessage.tsx +1 -0
- package/dist/src/components/molecules/Feedback/Feedback.js +1 -1
- package/dist/src/components/molecules/Feedback/Feedback.tsx +2 -1
- package/dist/src/components/molecules/FreeDocModalContent/FreeDocModalContent.tsx +1 -0
- package/dist/src/components/molecules/MenuItemsSection/MenuItemsSection.tsx +1 -0
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.js +2 -0
- package/dist/src/components/molecules/NavBarDropDown/NavBarDropDown.tsx +2 -0
- package/dist/src/components/molecules/Pagination/PageStepControl.js +1 -0
- package/dist/src/components/molecules/Pagination/PageStepControl.tsx +1 -0
- package/dist/src/components/molecules/Pagination/PageSteps.tsx +1 -0
- package/dist/src/components/molecules/Pagination/Pagination.js +1 -0
- package/dist/src/components/molecules/Pagination/Pagination.tsx +1 -0
- package/dist/src/components/molecules/PhoneContactBoxDesktop/PhoneContactBoxDesktop.tsx +2 -0
- package/dist/src/components/molecules/PhoneContactBoxMobile/PhoneContactBoxMobile.tsx +1 -0
- package/dist/src/components/molecules/PricingCard/PricingCard.js +3 -2
- package/dist/src/components/molecules/PricingCard/PricingCard.tsx +4 -3
- package/dist/src/components/molecules/PricingCard/PricingCardProps.types.ts +1 -0
- package/dist/src/components/molecules/Snackbar/Snackbar.js +1 -0
- package/dist/src/components/molecules/Snackbar/Snackbar.tsx +1 -0
- package/dist/src/components/molecules/Snackbar/SnackbarProps.types.ts +1 -0
- package/dist/src/components/molecules/TextInput/Input.js +2 -0
- package/dist/src/components/molecules/TextInput/Input.tsx +2 -0
- package/dist/src/components/molecules/TextInput/TextInput.js +4 -2
- package/dist/src/components/molecules/TextInput/TextInput.tsx +3 -2
- package/dist/src/components/molecules/TextInput/TextInputMessage.tsx +1 -0
- package/dist/src/components/molecules/TextInput/TextInputProps.types.ts +1 -0
- package/dist/src/components/molecules/TextInput/TextInputTooltip.tsx +1 -0
- 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 +1 -0
- package/dist/src/components/organisms/Accordion/Accordion.context.d.ts +1 -1
- package/dist/src/components/organisms/Accordion/Accordion.context.js +2 -0
- package/dist/src/components/organisms/Accordion/Accordion.context.tsx +4 -2
- package/dist/src/components/organisms/Accordion/Accordion.d.ts +2 -1
- package/dist/src/components/organisms/Accordion/Accordion.js +1 -0
- package/dist/src/components/organisms/Accordion/Accordion.tsx +2 -1
- package/dist/src/components/organisms/ArticlesList/ArticlesList.tsx +1 -0
- package/dist/src/components/organisms/MobileBottomBar/MobileBottomBar.tsx +1 -0
- package/dist/src/components/organisms/MobileBottomBar/MobileBottomBarProps.types.ts +1 -0
- package/dist/src/components/pages/AboutUsPage/AboutUsPage.tsx +1 -0
- package/dist/src/components/pages/ErrorRatafiaPage/ErrorRatafiaPageProps.types.ts +1 -0
- package/dist/src/components/pages/KeyFactsResultRatafiaPage/KeyFactsResultRatafiaPageProps.types.ts +1 -0
- package/dist/src/components/sections/AboutUsSection/AboutUsSection.tsx +1 -0
- 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 +1 -0
- package/dist/src/components/sections/HowGetYourFormsSection/HowGetYourFormsSection.tsx +1 -0
- package/dist/src/custom.d.ts +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +35 -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,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
1
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
4
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
@@ -47,7 +48,7 @@ const Feedback: FC<FeedbackProps> = ({
|
|
|
47
48
|
if (cancel?.onClick != null) {
|
|
48
49
|
buttons.push(
|
|
49
50
|
<a key='feedback-cancel-button' className='feedback__cancel__a' onClick={cancel.onClick}>
|
|
50
|
-
{cancel
|
|
51
|
+
{cancel.label ?? 'Cancel'}
|
|
51
52
|
</a>
|
|
52
53
|
)
|
|
53
54
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
2
3
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
4
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
5
|
import { useEffect } from 'react';
|
|
@@ -17,6 +18,7 @@ export const NavBarDropDown = ({ isOpen, list, hasBullets = true, initialActiveC
|
|
|
17
18
|
};
|
|
18
19
|
const onTouchMove = (event) => {
|
|
19
20
|
const touchEndPosY = event.changedTouches[0];
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
20
22
|
if (isDisabledScroll && touchEndPosY?.screenY - touchStartPosY?.screenY > 0) {
|
|
21
23
|
enableScrollbarOnClose(true);
|
|
22
24
|
isDisabledScroll = false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
1
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
4
|
import React, { type FC, useEffect } from 'react'
|
|
@@ -28,6 +29,7 @@ export const NavBarDropDown: FC<NavBarDropDownProps> = ({
|
|
|
28
29
|
|
|
29
30
|
const onTouchMove = (event: TouchEvent): void => {
|
|
30
31
|
const touchEndPosY = event.changedTouches[0]
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
31
33
|
if (isDisabledScroll && touchEndPosY?.screenY - touchStartPosY?.screenY > 0) {
|
|
32
34
|
enableScrollbarOnClose(true)
|
|
33
35
|
isDisabledScroll = false
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
3
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
4
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
5
|
import { useCallback } from 'react';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
3
|
import { useState } from 'react';
|
|
3
4
|
import { Button, Message } from '../../atoms';
|
|
4
5
|
// import './PricingCard.scss'
|
|
@@ -6,7 +7,7 @@ const PricingCard = ({ order, subscriptionId, onChangeRadio, isChecked = false,
|
|
|
6
7
|
const [cardState, setCardState] = useState({ expanded: false });
|
|
7
8
|
if (planName === undefined ||
|
|
8
9
|
(onChangeRadio != null && subscriptionId === undefined) ||
|
|
9
|
-
(featuresList
|
|
10
|
+
(featuresList.length === 0 && children === undefined)) {
|
|
10
11
|
return null;
|
|
11
12
|
}
|
|
12
13
|
const isSelectableCard = onChangeRadio != null;
|
|
@@ -24,7 +25,7 @@ const PricingCard = ({ order, subscriptionId, onChangeRadio, isChecked = false,
|
|
|
24
25
|
};
|
|
25
26
|
const renderMoreMobileButton = (_jsx(Button, { dataQa: '', givenClass: 'see-more-button', color: 'tertiary', label: cardState.expanded ? 'See less' : 'See more', noLink: true, onClick: toggleCardContent }));
|
|
26
27
|
const renderHeaderContent = (_jsx("div", { className: 'pricing-card__header', children: _jsx("h5", { className: 'sans-serif --big pricing-card__header__text', children: _jsx("strong", { children: planName }) }) }));
|
|
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
|
|
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.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 })] }));
|
|
28
29
|
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 }) }))] }));
|
|
29
30
|
};
|
|
30
31
|
export default PricingCard;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
1
2
|
import React, { type FC, useState } from 'react'
|
|
2
3
|
|
|
3
4
|
import { Button, Message } from '../../atoms'
|
|
@@ -23,7 +24,7 @@ const PricingCard: FC<PricingCardProps> = ({
|
|
|
23
24
|
if (
|
|
24
25
|
planName === undefined ||
|
|
25
26
|
(onChangeRadio != null && subscriptionId === undefined) ||
|
|
26
|
-
(featuresList
|
|
27
|
+
(featuresList.length === 0 && children === undefined)
|
|
27
28
|
) {
|
|
28
29
|
return null
|
|
29
30
|
}
|
|
@@ -71,11 +72,11 @@ const PricingCard: FC<PricingCardProps> = ({
|
|
|
71
72
|
{Boolean(underPricingText) && <div className={'pricing-card__body__text'}>{underPricingText}</div>}
|
|
72
73
|
</div>
|
|
73
74
|
)}
|
|
74
|
-
{Boolean(featuresList
|
|
75
|
+
{Boolean(featuresList.length) && (
|
|
75
76
|
<div className={`pricing-card__body__features-list ${expandedContentClass}`}>
|
|
76
77
|
<hr />
|
|
77
78
|
<ul>
|
|
78
|
-
{featuresList
|
|
79
|
+
{featuresList.map((feature) => (
|
|
79
80
|
<li key={'feature-item-' + feature} className='pricing-card__body__features-list__item'>
|
|
80
81
|
{feature}
|
|
81
82
|
</li>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
3
|
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
|
|
3
4
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
4
5
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
@@ -1,4 +1,6 @@
|
|
|
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 */
|
|
2
4
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
3
5
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
6
|
import React, { useState } from 'react';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
3
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
2
4
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
5
|
import React, { useState } from 'react'
|
|
@@ -1,4 +1,6 @@
|
|
|
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 */
|
|
2
4
|
import { NumericFormat } from 'react-number-format';
|
|
3
5
|
import React from 'react';
|
|
4
6
|
import classNames from 'classnames';
|
|
@@ -7,14 +9,14 @@ import { TextInputLabel } from './TextInputLabel';
|
|
|
7
9
|
import { TextInputMessage } from './TextInputMessage';
|
|
8
10
|
import { TextInputTooltip } from './TextInputTooltip';
|
|
9
11
|
// import './TextInput.scss'
|
|
10
|
-
const TextInput = React.forwardRef(({ label, value, validate = true, isValidGroup = true,
|
|
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) => {
|
|
11
13
|
const classnames = classNames('e-text', {
|
|
12
14
|
[givenClass]: givenClass,
|
|
13
15
|
'e-text--is-invalid': !validate,
|
|
14
16
|
'e-text--group-invalid': !isValidGroup
|
|
15
17
|
});
|
|
16
18
|
const handleChange = (event) => {
|
|
17
|
-
onChange
|
|
19
|
+
onChange(event);
|
|
18
20
|
};
|
|
19
21
|
const handleKeyDown = (event) => {
|
|
20
22
|
onKeyDown?.(event);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
3
|
import { NumericFormat } from 'react-number-format'
|
|
2
4
|
import React from 'react'
|
|
3
5
|
import classNames from 'classnames'
|
|
@@ -16,7 +18,6 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
16
18
|
value,
|
|
17
19
|
validate = true,
|
|
18
20
|
isValidGroup = true,
|
|
19
|
-
mask = ' ',
|
|
20
21
|
format = undefined,
|
|
21
22
|
name,
|
|
22
23
|
placeholder,
|
|
@@ -44,7 +45,7 @@ const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
44
45
|
})
|
|
45
46
|
|
|
46
47
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
47
|
-
onChange
|
|
48
|
+
onChange(event)
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
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): JSX.Element;
|
|
40
|
+
declare function AccordionProvider({ children, elements }: AccordionProviderProps): React.JSX.Element;
|
|
41
41
|
declare function useDispatchDataAccordionItem(): {
|
|
42
42
|
dispatch: Dispatch;
|
|
43
43
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
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 */
|
|
2
4
|
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
|
3
5
|
import React from 'react';
|
|
4
6
|
const AccordionContext = React.createContext(undefined);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
1
3
|
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
|
2
4
|
import React from 'react'
|
|
3
5
|
|
|
@@ -79,12 +81,12 @@ const actions = {
|
|
|
79
81
|
|
|
80
82
|
function accordionDataReducer(state: State, action: Action): State {
|
|
81
83
|
if (actions[action.type]) {
|
|
82
|
-
return actions[action.type](state, action)
|
|
84
|
+
return actions[action.type](state, action)!
|
|
83
85
|
}
|
|
84
86
|
throw new Error(`Unhandled action type: ${action.type}`)
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
function AccordionProvider({ children, elements }: AccordionProviderProps): JSX.Element {
|
|
89
|
+
function AccordionProvider({ children, elements }: AccordionProviderProps): React.JSX.Element {
|
|
88
90
|
const itemsDataAccordion = {
|
|
89
91
|
itemsDataAccordion: Array.from(Array(elements).keys()).map(() => ({
|
|
90
92
|
isLoading: false,
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AccordionProps } from './AccordionProps.types';
|
|
2
|
-
export declare const Accordion: ({ data, defaultActiveIndex, defaultHeightItem }: AccordionProps) => JSX.Element;
|
|
3
|
+
export declare const Accordion: ({ data, defaultActiveIndex, defaultHeightItem }: AccordionProps) => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
1
2
|
import React, { useState } from 'react'
|
|
2
3
|
import { AccordionItem } from '../../molecules'
|
|
3
4
|
import { type AccordionProps } from './AccordionProps.types'
|
|
@@ -5,7 +6,7 @@ import { AccordionProvider } from './Accordion.context'
|
|
|
5
6
|
|
|
6
7
|
// import './Accordion.scss'
|
|
7
8
|
|
|
8
|
-
export const Accordion = ({ data, defaultActiveIndex = 0, defaultHeightItem }: AccordionProps): JSX.Element => {
|
|
9
|
+
export const Accordion = ({ data, defaultActiveIndex = 0, defaultHeightItem }: AccordionProps): React.JSX.Element => {
|
|
9
10
|
const [activeIndex, setActiveIndex] = useState(defaultActiveIndex)
|
|
10
11
|
|
|
11
12
|
const handleItemClick = (index: number): void => {
|
package/dist/src/custom.d.ts
CHANGED