Skip to content

Commit 6329146

Browse files
committed
feat(types): add new HTML attributes for improved JSX support
- Move `enterKeyHint`, `exportparts`, and `part` attributes to `HTMLAttributes`. - Added `fetchpriority` attribute to `ImgHTMLAttributes`. - Updated `IntrinsicElementAttributes` to include `set` element support.
1 parent 2c6c079 commit 6329146

File tree

1 file changed

+18
-8
lines changed
  • packages/runtime-dom/src

1 file changed

+18
-8
lines changed

packages/runtime-dom/src/jsx.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
264264
contextmenu?: string
265265
dir?: string
266266
draggable?: Booleanish
267+
enterKeyHint?:
268+
| 'enter'
269+
| 'done'
270+
| 'go'
271+
| 'next'
272+
| 'previous'
273+
| 'search'
274+
| 'send'
267275
hidden?: Booleanish | '' | 'hidden' | 'until-found'
268276
id?: string
269277
inert?: Booleanish
@@ -323,6 +331,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
323331
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
324332
*/
325333
is?: string
334+
/**
335+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
336+
*/
337+
exportparts?: string
338+
/**
339+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
340+
*/
341+
part?: string
326342
}
327343

328344
type HTMLAttributeReferrerPolicy =
@@ -475,6 +491,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
475491
alt?: string
476492
crossorigin?: 'anonymous' | 'use-credentials' | ''
477493
decoding?: 'async' | 'auto' | 'sync'
494+
fetchpriority?: 'high' | 'low' | 'auto'
478495
height?: Numberish
479496
loading?: 'eager' | 'lazy'
480497
referrerpolicy?: HTMLAttributeReferrerPolicy
@@ -524,14 +541,6 @@ export interface InputHTMLAttributes extends HTMLAttributes {
524541
checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support
525542
crossorigin?: string
526543
disabled?: Booleanish
527-
enterKeyHint?:
528-
| 'enter'
529-
| 'done'
530-
| 'go'
531-
| 'next'
532-
| 'previous'
533-
| 'search'
534-
| 'send'
535544
form?: string
536545
formaction?: string
537546
formenctype?: string
@@ -1257,6 +1266,7 @@ export interface IntrinsicElementAttributes {
12571266
polyline: SVGAttributes
12581267
radialGradient: SVGAttributes
12591268
rect: SVGAttributes
1269+
set: SVGAttributes
12601270
stop: SVGAttributes
12611271
switch: SVGAttributes
12621272
symbol: SVGAttributes

0 commit comments

Comments
 (0)