From 3ece649d25853a4285ce58cdf12cf891c15b945c Mon Sep 17 00:00:00 2001 From: Tanner Reits Date: Sun, 12 Nov 2023 21:19:36 -0500 Subject: [PATCH 1/3] feat(declarations): add popover attributes --- src/declarations/stencil-public-runtime.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/declarations/stencil-public-runtime.ts b/src/declarations/stencil-public-runtime.ts index 8fd2d1e6784..58b95647c36 100644 --- a/src/declarations/stencil-public-runtime.ts +++ b/src/declarations/stencil-public-runtime.ts @@ -899,6 +899,11 @@ export namespace JSXBase { name?: string; type?: string; value?: string | string[] | number; + + // popover + popoverTargetAction?: 'hide' | 'show' | 'toggle'; + popoverTargetElement?: Element; + popoverTarget?: string; } export interface CanvasHTMLAttributes extends HTMLAttributes { @@ -1074,6 +1079,11 @@ export namespace JSXBase { webkitdirectory?: boolean; webkitEntries?: any; width?: number | string; + + // popover + popoverTargetAction?: 'hide' | 'show' | 'toggle'; + popoverTargetElement?: Element; + popoverTarget?: string; } export interface KeygenHTMLAttributes extends HTMLAttributes { @@ -1364,6 +1374,7 @@ export namespace JSXBase { tabIndex?: number; tabindex?: number | string; title?: string; + popover?: 'auto' | 'manual'; // Unknown inputMode?: string; From 68c7696bf1e139919c281ca0ad20a888f924f0ab Mon Sep 17 00:00:00 2001 From: Tanner Reits Date: Wed, 15 Nov 2023 10:57:55 -0500 Subject: [PATCH 2/3] align types with lib.dom.ts types --- src/declarations/stencil-public-runtime.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/declarations/stencil-public-runtime.ts b/src/declarations/stencil-public-runtime.ts index 58b95647c36..659d7a1cf3c 100644 --- a/src/declarations/stencil-public-runtime.ts +++ b/src/declarations/stencil-public-runtime.ts @@ -901,8 +901,8 @@ export namespace JSXBase { value?: string | string[] | number; // popover - popoverTargetAction?: 'hide' | 'show' | 'toggle'; - popoverTargetElement?: Element; + popoverTargetAction?: string; + popoverTargetElement?: Element | null; popoverTarget?: string; } @@ -1081,8 +1081,8 @@ export namespace JSXBase { width?: number | string; // popover - popoverTargetAction?: 'hide' | 'show' | 'toggle'; - popoverTargetElement?: Element; + popoverTargetAction?: string; + popoverTargetElement?: Element | null; popoverTarget?: string; } @@ -1374,7 +1374,7 @@ export namespace JSXBase { tabIndex?: number; tabindex?: number | string; title?: string; - popover?: 'auto' | 'manual'; + popover?: string | null; // Unknown inputMode?: string; From c2a9dc64fc56e74dbc61b4ee27f7a96a31272332 Mon Sep 17 00:00:00 2001 From: Tanner Reits Date: Wed, 15 Nov 2023 11:01:10 -0500 Subject: [PATCH 3/3] add comment --- src/declarations/stencil-public-runtime.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarations/stencil-public-runtime.ts b/src/declarations/stencil-public-runtime.ts index 659d7a1cf3c..55e250f646f 100644 --- a/src/declarations/stencil-public-runtime.ts +++ b/src/declarations/stencil-public-runtime.ts @@ -1374,6 +1374,10 @@ export namespace JSXBase { tabIndex?: number; tabindex?: number | string; title?: string; + // These types don't allow you to use popover as a boolean attribute + // so you can't write HTML like `
` and get the default value. + // Developer must explicitly specify one of the valid popover values or it will fallback + // to `manual` (following the HTML spec). popover?: string | null; // Unknown