@npm_leadtech/legal-lib-components 2.1.8 → 2.1.10
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/components/atoms/Button/ButtonProps.types.d.ts +2 -1
- package/dist/cjs/src/components/atoms/DatePickerCustom/DatePickerCustom.d.ts +2 -5
- package/dist/cjs/src/components/atoms/LogoText/LogoTextProps.types.d.ts +3 -3
- package/dist/cjs/src/components/atoms/MenuItems/MenuItemProps.types.d.ts +9 -8
- package/dist/cjs/src/components/atoms/Message/MessageProps.types.d.ts +1 -1
- package/dist/cjs/src/components/atoms/Message/__stories__/Message.stories.d.ts +1 -1
- package/dist/cjs/src/components/atoms/SidemenuTab/SideMenuTabProps.types.d.ts +4 -4
- package/dist/cjs/src/components/atoms/TextArea/TextAreaProps.types.d.ts +6 -6
- package/dist/cjs/src/components/atoms/TextArea/__stories__/TextArea.stories.d.ts +1 -1
- package/dist/cjs/src/components/atoms/Tooltip/TooltipProps.types.d.ts +2 -2
- package/dist/cjs/src/components/molecules/Feedback/__stories__/Feedback.stories.d.ts +1 -1
- package/dist/cjs/src/components/molecules/Snackbar/SnackbarProps.types.d.ts +2 -2
- package/dist/cjs/src/components/molecules/Snackbar/__stories__/Snackbar.stories.d.ts +1 -1
- package/dist/cjs/src/components/molecules/TextInput/stories/TextInput.stories.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/components/atoms/Button/ButtonProps.types.d.ts +2 -1
- package/dist/esm/src/components/atoms/DatePickerCustom/DatePickerCustom.d.ts +2 -5
- package/dist/esm/src/components/atoms/LogoText/LogoTextProps.types.d.ts +3 -3
- package/dist/esm/src/components/atoms/MenuItems/MenuItemProps.types.d.ts +9 -8
- package/dist/esm/src/components/atoms/Message/MessageProps.types.d.ts +1 -1
- package/dist/esm/src/components/atoms/Message/__stories__/Message.stories.d.ts +1 -1
- package/dist/esm/src/components/atoms/SidemenuTab/SideMenuTabProps.types.d.ts +4 -4
- package/dist/esm/src/components/atoms/TextArea/TextAreaProps.types.d.ts +6 -6
- package/dist/esm/src/components/atoms/TextArea/__stories__/TextArea.stories.d.ts +1 -1
- package/dist/esm/src/components/atoms/Tooltip/TooltipProps.types.d.ts +2 -2
- package/dist/esm/src/components/molecules/Feedback/__stories__/Feedback.stories.d.ts +1 -1
- package/dist/esm/src/components/molecules/Snackbar/SnackbarProps.types.d.ts +2 -2
- package/dist/esm/src/components/molecules/Snackbar/__stories__/Snackbar.stories.d.ts +1 -1
- package/dist/esm/src/components/molecules/TextInput/stories/TextInput.stories.d.ts +1 -1
- package/dist/index.d.ts +31 -32
- package/package.json +16 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface ButtonProps {
|
|
3
|
-
label
|
|
3
|
+
label: string;
|
|
4
4
|
dataQa?: string;
|
|
5
5
|
labelMobile?: string;
|
|
6
6
|
link?: string;
|
|
7
|
+
LinkComponent?: any;
|
|
7
8
|
noLink?: boolean;
|
|
8
9
|
noLinkNoFunc?: boolean;
|
|
9
10
|
onClick?: (functionParameters?: any) => void;
|
|
@@ -5,11 +5,8 @@ import './DatePickerCustom.scss';
|
|
|
5
5
|
declare class DatePickerCustom extends Component<DatePickerCustomProps> {
|
|
6
6
|
constructor(props: DatePickerCustomProps);
|
|
7
7
|
componentDidMount(): void;
|
|
8
|
-
returnYears: (currentYear:
|
|
9
|
-
handleChange: (date:
|
|
10
|
-
handleFocus: ({ focused }: {
|
|
11
|
-
focused: any;
|
|
12
|
-
}) => void;
|
|
8
|
+
returnYears: (currentYear: number) => JSX.Element[];
|
|
9
|
+
handleChange: (date: Date) => void;
|
|
13
10
|
addDays: (date: any, days: any) => Date;
|
|
14
11
|
render(): JSX.Element;
|
|
15
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export interface MenuItemProps {
|
|
2
2
|
spacing?: boolean;
|
|
3
|
-
list:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
list: MenuListItem[];
|
|
4
|
+
}
|
|
5
|
+
export interface MenuListItem {
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
image?: any;
|
|
9
|
+
content?: string;
|
|
10
|
+
href?: string;
|
|
11
|
+
dataQA?: string;
|
|
11
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface SideMenuTabProps {
|
|
3
|
-
text
|
|
3
|
+
text?: string;
|
|
4
4
|
active?: boolean;
|
|
5
|
-
mobile
|
|
5
|
+
mobile?: boolean;
|
|
6
6
|
menu?: any;
|
|
7
|
-
onClick
|
|
8
|
-
image
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
image?: React.ReactNode;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface TextAreaProps {
|
|
3
|
-
value
|
|
3
|
+
value?: string;
|
|
4
4
|
label?: string;
|
|
5
|
-
name
|
|
6
|
-
placeholder
|
|
5
|
+
name?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
7
|
tooltip?: string;
|
|
8
8
|
customClass?: string;
|
|
9
9
|
errorMessage?: string;
|
|
10
|
-
validate
|
|
11
|
-
disabled
|
|
12
|
-
onChange
|
|
10
|
+
validate?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
13
|
}
|
|
@@ -4,6 +4,6 @@ declare const meta: Meta<typeof TextArea>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof TextArea>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const WithError: Story;
|
|
8
8
|
export declare const WithLabel: Story;
|
|
9
9
|
export declare const WithTooltip: Story;
|
|
@@ -6,11 +6,11 @@ export interface TooltipProps {
|
|
|
6
6
|
inverted?: boolean;
|
|
7
7
|
allowHTML?: boolean;
|
|
8
8
|
interactive?: boolean;
|
|
9
|
-
hideOnClick?: boolean |
|
|
9
|
+
hideOnClick?: boolean | 'toggle';
|
|
10
10
|
position?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'auto' | 'auto-start' | 'auto-end';
|
|
11
11
|
trigger?: 'click' | 'focus' | 'focusin' | 'mouseenter' | 'mouseenter focus' | 'mouseenter click' | 'manual' | 'hover';
|
|
12
12
|
content?: React.ReactNode | string | any;
|
|
13
|
-
children?: React.
|
|
13
|
+
children?: React.ReactElement<any>;
|
|
14
14
|
onClick?: () => void;
|
|
15
15
|
onClickOutside?: () => void;
|
|
16
16
|
}
|
|
@@ -6,7 +6,7 @@ type Story = StoryObj<typeof Snackbar>;
|
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithoutType: Story;
|
|
8
8
|
export declare const TypeSuccess: Story;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const WithError: Story;
|
|
10
10
|
export declare const TypeReminder: Story;
|
|
11
11
|
export declare const WithButton: Story;
|
|
12
12
|
export declare const WithButtonSuccess: Story;
|
|
@@ -5,7 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof TextInput>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Password: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const WithError: Story;
|
|
9
9
|
export declare const WithLabel: Story;
|
|
10
10
|
export declare const WithTooltip: Story;
|
|
11
11
|
export declare const WithDialogMenu: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,10 +47,11 @@ interface BreadcrumItemProps {
|
|
|
47
47
|
declare const BreadcrumItem: FC<BreadcrumItemProps>;
|
|
48
48
|
|
|
49
49
|
interface ButtonProps {
|
|
50
|
-
label
|
|
50
|
+
label: string;
|
|
51
51
|
dataQa?: string;
|
|
52
52
|
labelMobile?: string;
|
|
53
53
|
link?: string;
|
|
54
|
+
LinkComponent?: any;
|
|
54
55
|
noLink?: boolean;
|
|
55
56
|
noLinkNoFunc?: boolean;
|
|
56
57
|
onClick?: (functionParameters?: any) => void;
|
|
@@ -130,11 +131,8 @@ interface DatePickerCustomProps {
|
|
|
130
131
|
declare class DatePickerCustom extends Component<DatePickerCustomProps> {
|
|
131
132
|
constructor(props: DatePickerCustomProps);
|
|
132
133
|
componentDidMount(): void;
|
|
133
|
-
returnYears: (currentYear:
|
|
134
|
-
handleChange: (date:
|
|
135
|
-
handleFocus: ({ focused }: {
|
|
136
|
-
focused: any;
|
|
137
|
-
}) => void;
|
|
134
|
+
returnYears: (currentYear: number) => JSX.Element[];
|
|
135
|
+
handleChange: (date: Date) => void;
|
|
138
136
|
addDays: (date: any, days: any) => Date;
|
|
139
137
|
render(): JSX.Element;
|
|
140
138
|
}
|
|
@@ -204,30 +202,31 @@ interface InfoBoxProps {
|
|
|
204
202
|
declare const InfoBox: FC<InfoBoxProps>;
|
|
205
203
|
|
|
206
204
|
interface LogoTextProps {
|
|
207
|
-
logo
|
|
208
|
-
children
|
|
209
|
-
description
|
|
205
|
+
logo?: string;
|
|
206
|
+
children?: any;
|
|
207
|
+
description?: string;
|
|
210
208
|
}
|
|
211
209
|
|
|
212
210
|
declare const LogoText: FC<LogoTextProps>;
|
|
213
211
|
|
|
214
212
|
interface MenuItemProps {
|
|
215
213
|
spacing?: boolean;
|
|
216
|
-
list:
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
214
|
+
list: MenuListItem[];
|
|
215
|
+
}
|
|
216
|
+
interface MenuListItem {
|
|
217
|
+
className?: string;
|
|
218
|
+
onClick?: () => void;
|
|
219
|
+
image?: any;
|
|
220
|
+
content?: string;
|
|
221
|
+
href?: string;
|
|
222
|
+
dataQA?: string;
|
|
224
223
|
}
|
|
225
224
|
|
|
226
225
|
declare const MenuItems: FC<MenuItemProps>;
|
|
227
226
|
|
|
228
227
|
interface MessageProps {
|
|
229
228
|
message: string;
|
|
230
|
-
type
|
|
229
|
+
type?: 'error' | 'success' | 'neutral';
|
|
231
230
|
}
|
|
232
231
|
|
|
233
232
|
declare const Message: FC<MessageProps>;
|
|
@@ -315,12 +314,12 @@ interface SearchSelectProps {
|
|
|
315
314
|
declare const SearchSelect: FC<SearchSelectProps>;
|
|
316
315
|
|
|
317
316
|
interface SideMenuTabProps {
|
|
318
|
-
text
|
|
317
|
+
text?: string;
|
|
319
318
|
active?: boolean;
|
|
320
|
-
mobile
|
|
319
|
+
mobile?: boolean;
|
|
321
320
|
menu?: any;
|
|
322
|
-
onClick
|
|
323
|
-
image
|
|
321
|
+
onClick?: () => void;
|
|
322
|
+
image?: React.ReactNode;
|
|
324
323
|
children?: React.ReactNode;
|
|
325
324
|
}
|
|
326
325
|
|
|
@@ -334,16 +333,16 @@ interface SpinnerProps {
|
|
|
334
333
|
declare const Spinner: FC<SpinnerProps>;
|
|
335
334
|
|
|
336
335
|
interface TextAreaProps {
|
|
337
|
-
value
|
|
336
|
+
value?: string;
|
|
338
337
|
label?: string;
|
|
339
|
-
name
|
|
340
|
-
placeholder
|
|
338
|
+
name?: string;
|
|
339
|
+
placeholder?: string;
|
|
341
340
|
tooltip?: string;
|
|
342
341
|
customClass?: string;
|
|
343
342
|
errorMessage?: string;
|
|
344
|
-
validate
|
|
345
|
-
disabled
|
|
346
|
-
onChange
|
|
343
|
+
validate?: boolean;
|
|
344
|
+
disabled?: boolean;
|
|
345
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
347
346
|
}
|
|
348
347
|
|
|
349
348
|
declare const TextArea: FC<TextAreaProps>;
|
|
@@ -363,11 +362,11 @@ interface TooltipProps {
|
|
|
363
362
|
inverted?: boolean;
|
|
364
363
|
allowHTML?: boolean;
|
|
365
364
|
interactive?: boolean;
|
|
366
|
-
hideOnClick?: boolean |
|
|
365
|
+
hideOnClick?: boolean | 'toggle';
|
|
367
366
|
position?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'auto' | 'auto-start' | 'auto-end';
|
|
368
367
|
trigger?: 'click' | 'focus' | 'focusin' | 'mouseenter' | 'mouseenter focus' | 'mouseenter click' | 'manual' | 'hover';
|
|
369
368
|
content?: React.ReactNode | string | any;
|
|
370
|
-
children?: React.
|
|
369
|
+
children?: React.ReactElement<any>;
|
|
371
370
|
onClick?: () => void;
|
|
372
371
|
onClickOutside?: () => void;
|
|
373
372
|
}
|
|
@@ -513,9 +512,9 @@ interface PricingCardProps {
|
|
|
513
512
|
declare const PricingCard: FC<PricingCardProps>;
|
|
514
513
|
|
|
515
514
|
interface SnackbarProps {
|
|
516
|
-
type
|
|
515
|
+
type?: 'welcome' | 'success' | 'error' | 'reminder';
|
|
517
516
|
title?: string;
|
|
518
|
-
text
|
|
517
|
+
text?: string;
|
|
519
518
|
button?: {
|
|
520
519
|
label: string;
|
|
521
520
|
onClick: () => void;
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npm_leadtech/legal-lib-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@testing-library/jest-dom": "^5.16.5",
|
|
6
6
|
"@tippyjs/react": "4.2.6",
|
|
7
|
-
"eslint-plugin-react-refresh": "^0.4.0",
|
|
8
7
|
"postcss-url": "^10.1.3",
|
|
9
8
|
"react-datepicker": "^4.11.0",
|
|
10
9
|
"react-input-mask": "^2.0.4",
|
|
@@ -33,8 +32,9 @@
|
|
|
33
32
|
"@babel/preset-env": "^7.21.4",
|
|
34
33
|
"@babel/preset-flow": "^7.21.4",
|
|
35
34
|
"@babel/preset-react": "^7.18.6",
|
|
36
|
-
"@babel/preset-typescript": "^7.21.
|
|
35
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
37
36
|
"@gatsbyjs/reach-router": "^2.0.1",
|
|
37
|
+
"@jest/globals": "^29.5.0",
|
|
38
38
|
"@rollup/plugin-babel": "^6.0.3",
|
|
39
39
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
40
40
|
"@rollup/plugin-image": "^3.0.2",
|
|
@@ -50,8 +50,10 @@
|
|
|
50
50
|
"@storybook/react-webpack5": "^7.0.5",
|
|
51
51
|
"@testing-library/jest-dom": "^5.16.5",
|
|
52
52
|
"@testing-library/react": "^14.0.0",
|
|
53
|
+
"@types/jest": "^29.5.1",
|
|
53
54
|
"@types/node": "^18.15.11",
|
|
54
55
|
"@types/react": "^18.0.33",
|
|
56
|
+
"@types/react-datepicker": "^4.11.2",
|
|
55
57
|
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
56
58
|
"@typescript-eslint/parser": "^5.57.1",
|
|
57
59
|
"autoprefixer": "^10.4.14",
|
|
@@ -81,6 +83,8 @@
|
|
|
81
83
|
"husky": "^8.0.0",
|
|
82
84
|
"identity-obj-proxy": "^3.0.0",
|
|
83
85
|
"jest": "^29.5.0",
|
|
86
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
87
|
+
"jest-sonar-reporter": "^2.0.0",
|
|
84
88
|
"jest-svg-transformer": "^1.0.0",
|
|
85
89
|
"node-sass": "^8.0.0",
|
|
86
90
|
"path": "^0.12.7",
|
|
@@ -102,6 +106,8 @@
|
|
|
102
106
|
"sass-loader": "13.2.2",
|
|
103
107
|
"storybook": "^7.0.5",
|
|
104
108
|
"style-loader": "^3.3.2",
|
|
109
|
+
"ts-jest": "^29.1.0",
|
|
110
|
+
"ts-node": "^10.9.1",
|
|
105
111
|
"tslib": "^2.5.0",
|
|
106
112
|
"typescript": "^5.0.4"
|
|
107
113
|
},
|
|
@@ -118,6 +124,7 @@
|
|
|
118
124
|
"upgrade-minor": "yarn prepare-upgrade && npm version minor -m \"Update minor version number\" && git push && git push --tags",
|
|
119
125
|
"upgrade-major": "yarn prepare-upgrade && npm version major -m \"Update major version number\" && git push && git push --tags",
|
|
120
126
|
"format": "prettier --write \"**/*.(js|jsx|json|md)\"",
|
|
127
|
+
"jest": "jest --maxWorkers=2",
|
|
121
128
|
"test": "jest --coverage",
|
|
122
129
|
"prepare": "husky install",
|
|
123
130
|
"eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\""
|
|
@@ -128,5 +135,10 @@
|
|
|
128
135
|
"type": "module",
|
|
129
136
|
"files": [
|
|
130
137
|
"dist"
|
|
131
|
-
]
|
|
138
|
+
],
|
|
139
|
+
"jestSonar": {
|
|
140
|
+
"reportPath": "coverage",
|
|
141
|
+
"reportFile": "test-reporter.xml",
|
|
142
|
+
"indent": 4
|
|
143
|
+
}
|
|
132
144
|
}
|