From d3895465d68861516558d4be3c6ce221a6d47dee Mon Sep 17 00:00:00 2001 From: "stephan@stackworx.io" Date: Mon, 9 Sep 2024 17:07:00 +0200 Subject: [PATCH] fix: exclude src from package --- packages/mui/package.json | 1 + packages/mui/src/CheckboxWithLabel.tsx | 10 +++++----- packages/x-date-pickers-pro/package.json | 1 + packages/x-date-pickers/package.json | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/mui/package.json b/packages/mui/package.json index a971d35..88af83b 100644 --- a/packages/mui/package.json +++ b/packages/mui/package.json @@ -5,6 +5,7 @@ "typings": "dist/main.d.ts", "license": "MIT", "version": "0.0.4", + "files": ["dist"], "scripts": { "build": "tsc -b && vite build", "typecheck": "tsc -b", diff --git a/packages/mui/src/CheckboxWithLabel.tsx b/packages/mui/src/CheckboxWithLabel.tsx index 7534060..9cbe996 100644 --- a/packages/mui/src/CheckboxWithLabel.tsx +++ b/packages/mui/src/CheckboxWithLabel.tsx @@ -1,9 +1,9 @@ -import { FieldValues, FieldPath, useFormState } from 'react-hook-form'; -import { CheckboxProps, Checkbox } from './Checkbox'; +import { FieldPath, FieldValues, useFormState } from 'react-hook-form'; +import { Checkbox, CheckboxProps } from './Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; -export type CheckboxPropsWithLabelProps< +export type CheckboxPropsLabelProps< TName extends FieldPath, TFieldValues extends FieldValues = FieldValues, > = CheckboxProps & { label: string }; @@ -11,9 +11,9 @@ export type CheckboxPropsWithLabelProps< export function CheckboxWithLabel< TName extends FieldPath, TFieldValues extends FieldValues, ->({ label, ...props }: CheckboxPropsWithLabelProps) { +>({ label, control, ...props }: CheckboxPropsLabelProps) { const { errors } = useFormState({ - control: props.control, + control, }); return ( diff --git a/packages/x-date-pickers-pro/package.json b/packages/x-date-pickers-pro/package.json index cdc2d1a..b62e89f 100644 --- a/packages/x-date-pickers-pro/package.json +++ b/packages/x-date-pickers-pro/package.json @@ -5,6 +5,7 @@ "typings": "dist/main.d.ts", "license": "MIT", "version": "0.0.1-alpha.4", + "files": ["dist"], "scripts": { "build": "tsc -b && vite build", "typecheck": "tsc -b", diff --git a/packages/x-date-pickers/package.json b/packages/x-date-pickers/package.json index fd0c81f..c107c9c 100644 --- a/packages/x-date-pickers/package.json +++ b/packages/x-date-pickers/package.json @@ -5,6 +5,7 @@ "typings": "./dist/main.d.ts", "license": "MIT", "version": "0.0.1-alpha.5", + "files": ["dist"], "scripts": { "build": "tsc -b && vite build", "typecheck": "tsc -b",