From bc2b7cfeebbf4846c08bc974a317e7ff969d8ddc Mon Sep 17 00:00:00 2001 From: TOMIKAWA Sotaro <15074382+ssssota@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:19:07 +0900 Subject: [PATCH] feat(jsx): add popover api attributes (#3323) --- src/jsx/intrinsic-elements.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/jsx/intrinsic-elements.ts b/src/jsx/intrinsic-elements.ts index dd15aeb5..f6c2292a 100644 --- a/src/jsx/intrinsic-elements.ts +++ b/src/jsx/intrinsic-elements.ts @@ -181,7 +181,8 @@ export namespace JSX { lang?: string | undefined nonce?: string | undefined placeholder?: string | undefined - popover?: string | undefined + /** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */ + popover?: boolean | 'auto' | 'manual' | undefined slot?: string | undefined spellcheck?: boolean | undefined style?: CSSProperties | string | undefined @@ -238,6 +239,9 @@ export namespace JSX { cite?: string | undefined } + /** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */ + type HTMLAttributePopoverTargetAction = 'show' | 'hide' | 'toggle' + interface ButtonHTMLAttributes extends HTMLAttributes { disabled?: boolean | undefined form?: string | undefined @@ -248,6 +252,8 @@ export namespace JSX { name?: string | undefined type?: 'submit' | 'reset' | 'button' | undefined value?: string | ReadonlyArray | number | undefined + popovertarget?: string | undefined + popovertargetaction?: HTMLAttributePopoverTargetAction | undefined // React 19 compatibility formAction?: string | Function | undefined @@ -462,6 +468,8 @@ export namespace JSX { type?: HTMLInputTypeAttribute | undefined value?: string | ReadonlyArray | number | undefined width?: number | string | undefined + popovertarget?: string | undefined + popovertargetaction?: HTMLAttributePopoverTargetAction | undefined // React 19 compatibility formAction?: string | Function | undefined