diff --git a/packages/forms/components/WebForms.astro b/packages/forms/components/WebForms.astro index ca5acec..0641d02 100644 --- a/packages/forms/components/WebForms.astro +++ b/packages/forms/components/WebForms.astro @@ -2,9 +2,8 @@ import {asyncContext} from '@astro-utils/context'; import {createFormToken} from '../dist/form-tools/csrf.js'; import {FORM_OPTIONS} from '../dist/settings.js'; -import type { HTMLAttributes } from 'astro/types'; -export interface Props extends HTMLAttributes<'form'> { +export interface Props extends astroHTML.JSX.FormHTMLAttributes { } const context = { diff --git a/packages/forms/components/form/BButton.astro b/packages/forms/components/form/BButton.astro index 11df19d..3d62326 100644 --- a/packages/forms/components/form/BButton.astro +++ b/packages/forms/components/form/BButton.astro @@ -2,9 +2,8 @@ import getContext from '@astro-utils/context'; import {createUniqueContinuanceName} from '../../dist/form-tools/connectId.js'; import {isPost, validateAction} from '../../dist/form-tools/post.js'; -import type { HTMLAttributes } from 'astro/types'; -export interface Props> extends HTMLAttributes<'button'> { +export interface Props> extends astroHTML.JSX.ButtonHTMLAttributes { onClick: Function; connectId?: string; whenFormOK?: boolean; diff --git a/packages/forms/components/form/BInput.astro b/packages/forms/components/form/BInput.astro index c4783cf..b805206 100644 --- a/packages/forms/components/form/BInput.astro +++ b/packages/forms/components/form/BInput.astro @@ -3,9 +3,8 @@ import getContext from '@astro-utils/context'; import {caseTypes, inputReturnValueAttr, validateFormInput} from '../../dist/components/input-parse.js'; import {validatePostRequest} from '../../dist/form-tools/post.js'; import {ModifyDeep} from '../../dist/utils.js'; -import type { HTMLAttributes } from 'astro/types'; -type inputTypes = HTMLAttributes<'input'>['type'] | 'int'; +type inputTypes = astroHTML.JSX.InputHTMLAttributes['type'] | 'int'; interface ModifyInputProps { type?: inputTypes; @@ -14,7 +13,7 @@ interface ModifyInputProps { maxlength?: number; } -export interface Props> extends Partial, ModifyInputProps>> { +export interface Props> extends Partial> { name: string; errorMessage?: string; validate?: Function; diff --git a/packages/forms/components/form/BOption.astro b/packages/forms/components/form/BOption.astro index 5d0099a..949816d 100644 --- a/packages/forms/components/form/BOption.astro +++ b/packages/forms/components/form/BOption.astro @@ -2,9 +2,8 @@ import getContext from '@astro-utils/context'; import {validatePostRequest} from '../../dist/form-tools/post.js'; import {validateSelectOption} from '../../dist/components/select.js'; -import type { HTMLAttributes } from 'astro/types'; -export interface Props> extends HTMLAttributes<'option'> { +export interface Props> extends astroHTML.JSX.OptionHTMLAttributes { as?: T; props?: React.ComponentProps; }; diff --git a/packages/forms/components/form/BSelect.astro b/packages/forms/components/form/BSelect.astro index 6146056..03917dd 100644 --- a/packages/forms/components/form/BSelect.astro +++ b/packages/forms/components/form/BSelect.astro @@ -4,9 +4,8 @@ import {validateSelect} from '../../dist/components/select.js'; import {getSelectValue} from '../../dist/components/select.js'; import getContext from '@astro-utils/context'; import Context from '@astro-utils/context/Context.astro'; -import type { HTMLAttributes } from 'astro/types'; -export interface Props> extends HTMLAttributes<'select'> { +export interface Props> extends astroHTML.JSX.SelectHTMLAttributes { name: string errorMessage?: string type?: 'string' | 'number' | 'date', diff --git a/packages/forms/components/form/BTextarea.astro b/packages/forms/components/form/BTextarea.astro index aa425da..182f92e 100644 --- a/packages/forms/components/form/BTextarea.astro +++ b/packages/forms/components/form/BTextarea.astro @@ -3,14 +3,13 @@ import getContext from '@astro-utils/context'; import {validateFormInput} from '../../dist/components/input-parse.js'; import {validatePostRequest} from '../../dist/form-tools/post.js'; import {ModifyDeep} from '../../dist/utils.js'; -import type { HTMLAttributes } from 'astro/types'; interface ModifyInputProps { minlength?: number; maxlength?: number; } -export interface Props> extends Partial, ModifyInputProps>> { +export interface Props> extends Partial> { name: string; errorMessage?: string; validate?: Function; diff --git a/packages/forms/components/form/FormErrors.astro b/packages/forms/components/form/FormErrors.astro index 842a4b5..fdb3ad0 100644 --- a/packages/forms/components/form/FormErrors.astro +++ b/packages/forms/components/form/FormErrors.astro @@ -1,8 +1,7 @@ --- import getContext from '@astro-utils/context'; -import type { HTMLAttributes } from 'astro/types'; -export interface Props extends HTMLAttributes<'div'> { +export interface Props extends astroHTML.JSX.HTMLAttributes { title?: string };