@npm_leadtech/legal-lib-components 2.1.7 → 2.1.9
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/__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/__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 +29 -30
- package/package.json +15 -3
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npm_leadtech/legal-lib-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@testing-library/jest-dom": "^5.16.5",
|
|
6
6
|
"@tippyjs/react": "4.2.6",
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"@babel/preset-env": "^7.21.4",
|
|
33
33
|
"@babel/preset-flow": "^7.21.4",
|
|
34
34
|
"@babel/preset-react": "^7.18.6",
|
|
35
|
-
"@babel/preset-typescript": "^7.21.
|
|
35
|
+
"@babel/preset-typescript": "^7.21.5",
|
|
36
36
|
"@gatsbyjs/reach-router": "^2.0.1",
|
|
37
|
+
"@jest/globals": "^29.5.0",
|
|
37
38
|
"@rollup/plugin-babel": "^6.0.3",
|
|
38
39
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
39
40
|
"@rollup/plugin-image": "^3.0.2",
|
|
@@ -49,8 +50,10 @@
|
|
|
49
50
|
"@storybook/react-webpack5": "^7.0.5",
|
|
50
51
|
"@testing-library/jest-dom": "^5.16.5",
|
|
51
52
|
"@testing-library/react": "^14.0.0",
|
|
53
|
+
"@types/jest": "^29.5.1",
|
|
52
54
|
"@types/node": "^18.15.11",
|
|
53
55
|
"@types/react": "^18.0.33",
|
|
56
|
+
"@types/react-datepicker": "^4.11.2",
|
|
54
57
|
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
55
58
|
"@typescript-eslint/parser": "^5.57.1",
|
|
56
59
|
"autoprefixer": "^10.4.14",
|
|
@@ -80,6 +83,8 @@
|
|
|
80
83
|
"husky": "^8.0.0",
|
|
81
84
|
"identity-obj-proxy": "^3.0.0",
|
|
82
85
|
"jest": "^29.5.0",
|
|
86
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
87
|
+
"jest-sonar-reporter": "^2.0.0",
|
|
83
88
|
"jest-svg-transformer": "^1.0.0",
|
|
84
89
|
"node-sass": "^8.0.0",
|
|
85
90
|
"path": "^0.12.7",
|
|
@@ -101,6 +106,8 @@
|
|
|
101
106
|
"sass-loader": "13.2.2",
|
|
102
107
|
"storybook": "^7.0.5",
|
|
103
108
|
"style-loader": "^3.3.2",
|
|
109
|
+
"ts-jest": "^29.1.0",
|
|
110
|
+
"ts-node": "^10.9.1",
|
|
104
111
|
"tslib": "^2.5.0",
|
|
105
112
|
"typescript": "^5.0.4"
|
|
106
113
|
},
|
|
@@ -127,5 +134,10 @@
|
|
|
127
134
|
"type": "module",
|
|
128
135
|
"files": [
|
|
129
136
|
"dist"
|
|
130
|
-
]
|
|
137
|
+
],
|
|
138
|
+
"jestSonar": {
|
|
139
|
+
"reportPath": "coverage",
|
|
140
|
+
"reportFile": "test-reporter.xml",
|
|
141
|
+
"indent": 4
|
|
142
|
+
}
|
|
131
143
|
}
|