File tree Expand file tree Collapse file tree 7 files changed +8
-15
lines changed
packages/forms/components Expand file tree Collapse file tree 7 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 2
2
import {asyncContext } from ' @astro-utils/context' ;
3
3
import {createFormToken } from ' ../dist/form-tools/csrf.js' ;
4
4
import {FORM_OPTIONS } from ' ../dist/settings.js' ;
5
- import type { HTMLAttributes } from ' astro/types' ;
6
5
7
- export interface Props extends HTMLAttributes < ' form ' > {
6
+ export interface Props extends astroHTML . JSX . FormHTMLAttributes {
8
7
}
9
8
10
9
const context = {
Original file line number Diff line number Diff line change 2
2
import getContext from ' @astro-utils/context' ;
3
3
import {createUniqueContinuanceName } from ' ../../dist/form-tools/connectId.js' ;
4
4
import {isPost , validateAction } from ' ../../dist/form-tools/post.js' ;
5
- import type { HTMLAttributes } from ' astro/types' ;
6
5
7
- export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends HTMLAttributes < ' button ' > {
6
+ export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends astroHTML . JSX . ButtonHTMLAttributes {
8
7
onClick: Function ;
9
8
connectId? : string ;
10
9
whenFormOK? : boolean ;
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ import getContext from '@astro-utils/context';
3
3
import {caseTypes , inputReturnValueAttr , validateFormInput } from ' ../../dist/components/input-parse.js' ;
4
4
import {validatePostRequest } from ' ../../dist/form-tools/post.js' ;
5
5
import {ModifyDeep } from ' ../../dist/utils.js' ;
6
- import type { HTMLAttributes } from ' astro/types' ;
7
6
8
- type inputTypes = HTMLAttributes < ' input ' > [' type' ] | ' int' ;
7
+ type inputTypes = astroHTML . JSX . InputHTMLAttributes [' type' ] | ' int' ;
9
8
10
9
interface ModifyInputProps {
11
10
type? : inputTypes ;
@@ -14,7 +13,7 @@ interface ModifyInputProps {
14
13
maxlength? : number ;
15
14
}
16
15
17
- export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends Partial <ModifyDeep <HTMLAttributes < ' input ' > , ModifyInputProps >> {
16
+ export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends Partial <ModifyDeep <astroHTML . JSX . InputHTMLAttributes , ModifyInputProps >> {
18
17
name: string ;
19
18
errorMessage? : string ;
20
19
validate? : Function ;
Original file line number Diff line number Diff line change 2
2
import getContext from ' @astro-utils/context' ;
3
3
import {validatePostRequest } from ' ../../dist/form-tools/post.js' ;
4
4
import {validateSelectOption } from ' ../../dist/components/select.js' ;
5
- import type { HTMLAttributes } from ' astro/types' ;
6
5
7
- export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends HTMLAttributes < ' option ' > {
6
+ export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends astroHTML . JSX . OptionHTMLAttributes {
8
7
as? : T ;
9
8
props? : React .ComponentProps <T >;
10
9
};
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ import {validateSelect} from '../../dist/components/select.js';
4
4
import {getSelectValue } from ' ../../dist/components/select.js' ;
5
5
import getContext from ' @astro-utils/context' ;
6
6
import Context from ' @astro-utils/context/Context.astro' ;
7
- import type { HTMLAttributes } from ' astro/types' ;
8
7
9
- export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends HTMLAttributes < ' select ' > {
8
+ export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends astroHTML . JSX . SelectHTMLAttributes {
10
9
name: string
11
10
errorMessage? : string
12
11
type? : ' string' | ' number' | ' date' ,
Original file line number Diff line number Diff line change @@ -3,14 +3,13 @@ import getContext from '@astro-utils/context';
3
3
import {validateFormInput } from ' ../../dist/components/input-parse.js' ;
4
4
import {validatePostRequest } from ' ../../dist/form-tools/post.js' ;
5
5
import {ModifyDeep } from ' ../../dist/utils.js' ;
6
- import type { HTMLAttributes } from ' astro/types' ;
7
6
8
7
interface ModifyInputProps {
9
8
minlength? : number ;
10
9
maxlength? : number ;
11
10
}
12
11
13
- export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends Partial <ModifyDeep <HTMLAttributes < ' textarea ' > , ModifyInputProps >> {
12
+ export interface Props <T extends keyof JSX .IntrinsicElements | React .JSXElementConstructor <any >> extends Partial <ModifyDeep <astroHTML . JSX . TextareaHTMLAttributes , ModifyInputProps >> {
14
13
name: string ;
15
14
errorMessage? : string ;
16
15
validate? : Function ;
Original file line number Diff line number Diff line change 1
1
---
2
2
import getContext from ' @astro-utils/context' ;
3
- import type { HTMLAttributes } from ' astro/types' ;
4
3
5
- export interface Props extends HTMLAttributes < ' div ' > {
4
+ export interface Props extends astroHTML . JSX . HTMLAttributes {
6
5
title? : string
7
6
};
8
7
You can’t perform that action at this time.
0 commit comments