diff --git a/.changeset/happy-melons-push.md b/.changeset/happy-melons-push.md new file mode 100644 index 0000000000..7deba5ce35 --- /dev/null +++ b/.changeset/happy-melons-push.md @@ -0,0 +1,5 @@ +--- +'@shopify/ui-extensions': patch +--- + +Fix incorrect types for POS UI Extensions using typecript instead of preact diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components.d.ts index b57d1c52c8..ef439bf9dd 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components.d.ts @@ -3227,7 +3227,9 @@ interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -type IntrinsicElementProps = T & BaseElementPropsWithChildren; +type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +type HtmlElementTagNameProps = T & HTMLElement; interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -3288,7 +3290,7 @@ interface ButtonJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$t]: ButtonJSXProps; + [tagName$t]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3331,7 +3333,7 @@ interface TextJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$s]: TextJSXProps; + [tagName$s]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3461,7 +3463,7 @@ interface ScrollBoxJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$r]: ScrollBoxJSXProps; + [tagName$r]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3491,7 +3493,7 @@ interface TileJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$q]: TileJSXProps; + [tagName$q]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3531,7 +3533,7 @@ interface BannerJSXProps extends Pick { type ElementProps$9 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$p]: ElementProps$9; + [tagName$p]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3665,7 +3667,7 @@ interface BoxJSXProps { } declare global { interface HTMLElementTagNameMap { - [tagName$o]: BoxJSXProps; + [tagName$o]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -3816,7 +3818,7 @@ interface IconJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$n]: IconJSXProps; + [tagName$n]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4020,7 +4022,7 @@ interface StackJSXProps extends PickedProps { } declare global { interface HTMLElementTagNameMap { - [tagName$m]: StackJSXProps; + [tagName$m]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4049,7 +4051,7 @@ interface BadgeJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$l]: BadgeJSXProps; + [tagName$l]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4078,7 +4080,7 @@ interface ChoiceListJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$k]: ChoiceListJSXProps; + [tagName$k]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4096,7 +4098,7 @@ interface ChoiceJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$j]: ChoiceJSXProps; + [tagName$j]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4137,7 +4139,7 @@ interface ModalJSXProps extends Pick { type ElementProps$8 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$i]: ElementProps$8; + [tagName$i]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4186,7 +4188,7 @@ interface TextFieldJSXProps type ElementProps$7 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$h]: ElementProps$7; + [tagName$h]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4219,7 +4221,7 @@ interface SearchFieldJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$g]: SearchFieldJSXProps; + [tagName$g]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4268,7 +4270,7 @@ interface EmailFieldJSXProps type ElementProps$6 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$f]: ElementProps$6; + [tagName$f]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4292,7 +4294,7 @@ interface ClickableJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$e]: ClickableJSXProps; + [tagName$e]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4342,7 +4344,7 @@ interface TextAreaJSXProps type ElementProps$5 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$d]: ElementProps$5; + [tagName$d]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4455,7 +4457,7 @@ interface NumberFieldJSXProps type ElementProps$4 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$c]: ElementProps$4; + [tagName$c]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4492,7 +4494,7 @@ interface DateFieldJSXProps type ElementProps$3 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$b]: ElementProps$3; + [tagName$b]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4524,7 +4526,7 @@ interface DatePickerJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$a]: DatePickerJSXProps; + [tagName$a]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4556,7 +4558,7 @@ interface DateSpinnerJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$9]: DateSpinnerJSXProps; + [tagName$9]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4587,7 +4589,7 @@ interface SectionJSXProps extends Pick { type ElementProps$2 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$8]: ElementProps$2; + [tagName$8]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4607,7 +4609,7 @@ interface HeadingJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$7]: HeadingJSXProps; + [tagName$7]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4639,7 +4641,7 @@ interface TimePickerJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$6]: TimePickerJSXProps; + [tagName$6]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4678,7 +4680,7 @@ interface ImageJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName$5]: ImageJSXProps; + [tagName$5]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4717,7 +4719,7 @@ interface PageJSXProps extends Pick { type ElementProps$1 = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$4]: ElementProps$1; + [tagName$4]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4753,7 +4755,7 @@ interface TimeFieldJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName$3]: TimeFieldJSXProps; + [tagName$3]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4778,7 +4780,7 @@ interface PosBlockJSXProps extends Pick { type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName$2]: ElementProps; + [tagName$2]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4793,7 +4795,7 @@ declare const tagName$1 = 's-qr-code'; interface QrCodeJSXProps extends Pick {} declare global { interface HTMLElementTagNameMap { - [tagName$1]: QrCodeJSXProps; + [tagName$1]: HtmlElementTagNameProps; } } declare module 'preact' { @@ -4808,7 +4810,7 @@ declare const tagName = 's-divider'; interface DividerJSXProps extends Pick {} declare global { interface HTMLElementTagNameMap { - [tagName]: DividerJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Badge.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Badge.d.ts index d178d9a9e5..547165ef75 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Badge.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Badge.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-badge'; export interface BadgeJSXProps extends Pick { @@ -46,7 +48,7 @@ export interface BadgeJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName]: BadgeJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Banner.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Banner.d.ts index c66e6b0c06..e7da80d193 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Banner.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Banner.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-banner'; export interface BannerJSXProps extends Pick { @@ -62,7 +64,7 @@ export interface BannerJSXProps extends Pick { export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Box.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Box.d.ts index 930afd42a3..bfdfa9399e 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Box.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Box.d.ts @@ -35,7 +35,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-box'; export type PaddingKeyword = SizeKeyword | 'none'; @@ -160,7 +162,7 @@ export interface BoxJSXProps { } declare global { interface HTMLElementTagNameMap { - [tagName]: BoxJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Button.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Button.d.ts index f83dce4144..ad3ce30548 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Button.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Button.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -87,7 +89,7 @@ export interface ButtonJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: ButtonJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Choice.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Choice.d.ts index 9a427a5007..f5948f79ad 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Choice.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Choice.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-choice'; export interface ChoiceJSXProps @@ -35,7 +37,7 @@ export interface ChoiceJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: ChoiceJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/ChoiceList.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/ChoiceList.d.ts index 86588a1d0e..c50a2615d1 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/ChoiceList.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/ChoiceList.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -55,7 +57,7 @@ export interface ChoiceListJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: ChoiceListJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Clickable.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Clickable.d.ts index ea157461b1..ffbad06fd5 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Clickable.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Clickable.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -51,7 +53,7 @@ export interface ClickableJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: ClickableJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/DateField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/DateField.d.ts index 3ff77baccc..bdc6add838 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/DateField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/DateField.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -63,7 +65,7 @@ export interface DateFieldJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/DatePicker.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/DatePicker.d.ts index e72e795371..563a5d0254 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/DatePicker.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/DatePicker.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -59,7 +61,7 @@ export interface DatePickerJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: DatePickerJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/DateSpinner.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/DateSpinner.d.ts index 0fc388b42c..49301376d7 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/DateSpinner.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/DateSpinner.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -59,7 +61,7 @@ export interface DateSpinnerJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: DateSpinnerJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Divider.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Divider.d.ts index 51ce1069bd..9d9f9f0cb1 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Divider.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Divider.d.ts @@ -26,14 +26,16 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-divider'; export interface DividerJSXProps extends Pick {} declare global { interface HTMLElementTagNameMap { - [tagName]: DividerJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/EmailField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/EmailField.d.ts index 5f4b1cfa2b..280784a31c 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/EmailField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/EmailField.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -80,7 +82,7 @@ export interface EmailFieldJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Heading.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Heading.d.ts index 6abd0912e9..554b5f83c7 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Heading.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Heading.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-heading'; export interface HeadingJSXProps extends Pick { @@ -37,7 +39,7 @@ export interface HeadingJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName]: HeadingJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Icon.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Icon.d.ts index 42211fdc81..cda006efea 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Icon.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Icon.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-icon'; export type SupportedIconNames = Extract< @@ -168,7 +170,7 @@ export interface IconJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: IconJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Image.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Image.d.ts index 16bad9e8fa..008a367a6c 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Image.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Image.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-image'; export interface ImageJSXProps extends Pick { @@ -56,7 +58,7 @@ export interface ImageJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName]: ImageJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Modal.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Modal.d.ts index 5f9e5f60b4..2b074e8a33 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Modal.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Modal.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -75,7 +77,7 @@ export type ElementProps = Omit< >; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/NumberField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/NumberField.d.ts index fe64717713..fd716065f4 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/NumberField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/NumberField.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -144,7 +146,7 @@ export interface NumberFieldJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Page.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Page.d.ts index 39d7ae4108..6c823f229c 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Page.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Page.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-page'; export interface PageJSXProps extends Pick { @@ -61,7 +63,7 @@ export interface PageJSXProps extends Pick { export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/PosBlock.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/PosBlock.d.ts index b5099b427f..123fb7cb39 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/PosBlock.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/PosBlock.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-pos-block'; export interface PosBlockJSXProps @@ -48,7 +50,7 @@ export interface PosBlockJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/QrCode.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/QrCode.d.ts index 656581e855..be19ae44b5 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/QrCode.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/QrCode.d.ts @@ -26,13 +26,15 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-qr-code'; export interface QrCodeJSXProps extends Pick {} declare global { interface HTMLElementTagNameMap { - [tagName]: QrCodeJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/ScrollBox.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/ScrollBox.d.ts index 58422a15cc..2b4f5f8967 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/ScrollBox.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/ScrollBox.d.ts @@ -36,7 +36,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export type PaddingKeyword = SizeKeyword | 'none'; declare const tagName = 's-scroll-box'; @@ -157,7 +159,7 @@ export interface ScrollBoxJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName]: ScrollBoxJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/SearchField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/SearchField.d.ts index 4ebad35c45..8809487719 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/SearchField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/SearchField.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -59,7 +61,7 @@ export interface SearchFieldJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: SearchFieldJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Section.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Section.d.ts index 76f356ee9b..9c8f2c160e 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Section.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Section.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-section'; export interface SectionJSXProps extends Pick { @@ -53,7 +55,7 @@ export interface SectionJSXProps extends Pick { export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Stack.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Stack.d.ts index 5f4bbc7287..dcbc270278 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Stack.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Stack.d.ts @@ -40,7 +40,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-stack'; export type PaddingKeyword = SizeKeyword | 'none'; @@ -235,7 +237,7 @@ export interface StackJSXProps extends PickedProps { } declare global { interface HTMLElementTagNameMap { - [tagName]: StackJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Text.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Text.d.ts index e94edd09c5..2b2b84ceb1 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Text.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Text.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; declare const tagName = 's-text'; export interface TextJSXProps extends Pick { @@ -60,7 +62,7 @@ export interface TextJSXProps extends Pick { } declare global { interface HTMLElementTagNameMap { - [tagName]: TextJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/TextArea.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/TextArea.d.ts index 3bec50166a..b7042ddb1d 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/TextArea.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/TextArea.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -81,7 +83,7 @@ export interface TextAreaJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/TextField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/TextField.d.ts index 0bb4ec2b76..f4e3898fe2 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/TextField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/TextField.d.ts @@ -31,7 +31,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -80,7 +82,7 @@ export interface TextFieldJSXProps export type ElementProps = Omit; declare global { interface HTMLElementTagNameMap { - [tagName]: ElementProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/Tile.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/Tile.d.ts index c0ede5a776..fdc0491ccb 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/Tile.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/Tile.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -56,7 +58,7 @@ export interface TileJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: TileJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/TimeField.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/TimeField.d.ts index 9588d7bf41..92f82510f1 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/TimeField.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/TimeField.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -62,7 +64,7 @@ export interface TimeFieldJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: TimeFieldJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/components/TimePicker.d.ts b/packages/ui-extensions/src/surfaces/point-of-sale/components/TimePicker.d.ts index 3202921657..9debcb6905 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/components/TimePicker.d.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/components/TimePicker.d.ts @@ -26,7 +26,9 @@ export interface BaseElementPropsWithChildren extends BaseElementProps { children?: ComponentChildren; } -export type IntrinsicElementProps = T & BaseElementPropsWithChildren; +export type IntrinsicElementProps = T & + BaseElementPropsWithChildren; +export type HtmlElementTagNameProps = T & HTMLElement; export interface CallbackEvent { currentTarget: HTMLElementTagNameMap[T]; bubbles?: boolean; @@ -59,7 +61,7 @@ export interface TimePickerJSXProps } declare global { interface HTMLElementTagNameMap { - [tagName]: TimePickerJSXProps; + [tagName]: HtmlElementTagNameProps; } } declare module 'preact' {