Skip to content

Commit

Permalink
Merge pull request #5 from stackworx/fix/typings
Browse files Browse the repository at this point in the history
  • Loading branch information
cliedeman authored Sep 7, 2024
2 parents 71f47ba + 676f588 commit 3f821c1
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 172 deletions.
112 changes: 55 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"private": true,
"version": "0.0.0",
"scripts": {
"build": "tsc && vite build",
"typecheck": "tsc",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"lint": "eslint \"./{src,packages/*/src}/**/*.{tsx,ts,js}\"",
Expand Down Expand Up @@ -55,8 +53,8 @@
"react-dom": "^18.3.1",
"typescript": "^5.5.4",
"typescript-eslint": "^8.3.0",
"vite": "5.4.2",
"vite-plugin-dts": "^4.0.3",
"vite": "5.4.3",
"vite-plugin-dts": "^4.1.1",
"vitest": "^2.0.5"
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions packages/mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "@stackworx/react-hook-form-mui",
"type": "module",
"main": "./dist/main.js",
"typings": "dist/main.d.ts",
"license": "MIT",
"version": "0.0.2",
"scripts": {
"build": "tsc && vite build",
"typecheck": "tsc",
"build": "tsc -b && vite build",
"typecheck": "tsc -b",
"test": "vitest",
"prepublishOnly": "npm run build"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/mui/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import MuiTextField, {
TextFieldProps as MuiTextFieldProps,
} from '@mui/material/TextField';

export type TextFieldProps<
export type SelectProps<
TName extends FieldPath<TFieldValues>,
TFieldValues extends FieldValues = FieldValues,
> = UseControllerProps<TFieldValues, TName> &
Expand All @@ -17,7 +17,7 @@ export type TextFieldProps<
export function Select<
TName extends FieldPath<TFieldValues>,
TFieldValues extends FieldValues,
>({ control, name, rules, ...props }: TextFieldProps<TName, TFieldValues>) {
>({ control, name, rules, ...props }: SelectProps<TName, TFieldValues>) {
const {
field: { onChange, onBlur, value, ref },
fieldState: { error },
Expand Down
16 changes: 8 additions & 8 deletions packages/mui/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export * from './Autocomplete.js';
export * from './Checkbox.js';
export * from './CheckboxGroup.js';
export * from './RadioGroup.js';
export * from './Select.js';
export * from './Switch.js';
export * from './TextField.js';
export * from './ToggleButtonGroup.js';
export * from './Autocomplete';
export * from './Checkbox';
export * from './CheckboxGroup';
export * from './RadioGroup';
export * from './Select';
export * from './Switch';
export * from './TextField';
export * from './ToggleButtonGroup';
5 changes: 3 additions & 2 deletions packages/x-date-pickers-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "@stackworx/react-hook-form-mui-x-date-pickers-pro",
"type": "module",
"main": "./dist/main.js",
"typings": "dist/main.d.ts",
"license": "MIT",
"version": "0.0.1-alpha.2",
"scripts": {
"build": "tsc && vite build",
"typecheck": "tsc",
"build": "tsc -b && vite build",
"typecheck": "tsc -b",
"test": "vitest",
"prepublishOnly": "npm run build"
},
Expand Down
Loading

0 comments on commit 3f821c1

Please sign in to comment.