Skip to content

Commit 6550c52

Browse files
Apply suggestions from code review
Co-authored-by: Heath C <[email protected]>
1 parent a64b465 commit 6550c52

File tree

14 files changed

+32
-31
lines changed

14 files changed

+32
-31
lines changed

packages/primereact/package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,32 @@
55
"main": "dist/index.js",
66
"module": "lib/index.js",
77
"typings": "lib/index.d.ts",
8+
"type": "module",
89
"exports": {
910
".": {
11+
"types": "./lib/index.d.ts",
1012
"require": "./dist/index.js",
11-
"import": "./lib/index.js",
12-
"types": "./lib/index.d.ts"
13+
"import": "./lib/index.js"
1314
},
1415
"./lib": {
16+
"types": "./lib/index.d.ts",
1517
"require": "./dist/index.js",
16-
"import": "./lib/index.js",
17-
"types": "./lib/index.d.ts"
18+
"import": "./lib/index.js"
1819
},
1920
"./lib/*.js": {
21+
"types": "./lib/*.d.ts",
2022
"require": "./dist/*.js",
21-
"import": "./lib/*.js",
22-
"types": "./lib/*.d.ts"
23+
"import": "./lib/*.js"
2324
},
2425
"./dist": {
26+
"types": "./lib/index.d.ts",
2527
"require": "./dist/index.js",
26-
"import": "./lib/index.js",
27-
"types": "./lib/index.d.ts"
28+
"import": "./lib/index.js"
2829
},
2930
"./dist/*.js": {
31+
"types": "./lib/*.d.ts",
3032
"require": "./dist/*.js",
31-
"import": "./lib/*.js",
32-
"types": "./lib/*.d.ts"
33+
"import": "./lib/*.js"
3334
}
3435
},
3536
"scripts": {
@@ -64,7 +65,7 @@
6465
"@rjsf/utils": "^6.x",
6566
"primeicons": ">=6.0.0",
6667
"primereact": ">=8.0.0",
67-
"react": "^16.14.0 || >=17"
68+
"react": ">=18"
6869
},
6970
"devDependencies": {
7071
"@babel/cli": "^7.23.9",

packages/primereact/src/AutoCompleteWidget/AutoCompleteWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ChangeEvent, useState } from 'react';
12
import {
23
ariaDescribedByIds,
34
FormContextType,
@@ -6,7 +7,6 @@ import {
67
StrictRJSFSchema,
78
WidgetProps,
89
} from '@rjsf/utils';
9-
import { ChangeEvent, useState } from 'react';
1010
import { AutoComplete, AutoCompleteCompleteEvent } from 'primereact/autocomplete';
1111

1212
export default function AutoCompleteWidget<

packages/primereact/src/BaseInputTemplate/BaseInputTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ChangeEvent } from 'react';
12
import {
23
ariaDescribedByIds,
34
BaseInputTemplateProps,
@@ -7,7 +8,6 @@ import {
78
RJSFSchema,
89
StrictRJSFSchema,
910
} from '@rjsf/utils';
10-
import { ChangeEvent } from 'react';
1111
import { InputText } from 'primereact/inputtext';
1212

1313
/** The `BaseInputTemplate` is the template the fallback if no widget is specified.

packages/primereact/src/CheckboxWidget/CheckboxWidget.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
WidgetProps,
1111
} from '@rjsf/utils';
1212
import { Checkbox, CheckboxChangeEvent } from 'primereact/checkbox';
13+
1314
import { Label } from '../util';
1415

1516
/** The `CheckBoxWidget` is a widget for rendering boolean properties.

packages/primereact/src/CheckboxesWidget/CheckboxesWidget.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
descriptionId,
1313
getTemplate,
1414
} from '@rjsf/utils';
15+
1516
import { Label } from '../util';
1617

1718
/** The `CheckboxesWidget` is a widget for rendering checkbox groups.

packages/primereact/src/ColorWidget/ColorWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ChangeEvent } from 'react';
12
import {
23
ariaDescribedByIds,
34
FormContextType,
@@ -6,7 +7,6 @@ import {
67
StrictRJSFSchema,
78
WidgetProps,
89
} from '@rjsf/utils';
9-
import { ChangeEvent } from 'react';
1010
import { ColorPicker } from 'primereact/colorpicker';
1111

1212
export default function ColorWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(

packages/primereact/src/FieldTemplate/FieldTemplate.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
RJSFSchema,
77
StrictRJSFSchema,
88
} from '@rjsf/utils';
9+
910
import { Label } from '../util';
1011

1112
export default function FieldTemplate<

packages/primereact/src/GridTemplate/GridTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { GridTemplateProps } from '@rjsf/utils';
21
import { useEffect, useState } from 'react';
2+
import { GridTemplateProps } from '@rjsf/utils';
33

44
const breakpoints = {
55
xs: 0,

packages/primereact/src/PasswordWidget/PasswordWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ChangeEvent } from 'react';
12
import {
23
ariaDescribedByIds,
34
FormContextType,
@@ -6,7 +7,6 @@ import {
67
StrictRJSFSchema,
78
WidgetProps,
89
} from '@rjsf/utils';
9-
import { ChangeEvent } from 'react';
1010
import { Password } from 'primereact/password';
1111

1212
export default function PasswordWidget<

packages/primereact/src/TextareaWidget/TextareaWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import { ChangeEvent } from 'react';
22
import { InputTextarea } from 'primereact/inputtextarea';
33
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
44

@@ -20,7 +20,7 @@ export default function TextareaWidget<
2020
rows = Number(options.rows);
2121
}
2222

23-
const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
23+
const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
2424
onChange(event.target.value === '' ? options.emptyValue : event.target.value);
2525
};
2626

0 commit comments

Comments
 (0)