Skip to content

Commit 1edc6ea

Browse files
committed
chore(qwikintrinsicelements): replace it by PropsOf
1 parent 87c004a commit 1edc6ea

File tree

80 files changed

+211
-363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+211
-363
lines changed

apps/website/src/components/code-copy/code-copy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cn } from '@qwik-ui/utils';
2-
import { PropsOf, QwikIntrinsicElements, component$, useSignal } from '@builder.io/qwik';
2+
import { PropsOf, component$, useSignal } from '@builder.io/qwik';
33
import { Button } from '@qwik-ui/fluffy';
44
import copy from 'clipboard-copy';
55

@@ -32,7 +32,7 @@ export const CodeCopy = component$(({ code = '', class: outsideClass, ...props }
3232
);
3333
});
3434

35-
export function CopyIcon(props: QwikIntrinsicElements['svg'], key: string) {
35+
export function CopyIcon(props: PropsOf<'svg'>, key: string) {
3636
return (
3737
<svg
3838
xmlns="http://www.w3.org/2000/svg"
@@ -54,7 +54,7 @@ export function CopyIcon(props: QwikIntrinsicElements['svg'], key: string) {
5454
);
5555
}
5656

57-
export function ClipboardCheck(props: QwikIntrinsicElements['svg'], key: string) {
57+
export function ClipboardCheck(props: PropsOf<'svg'>, key: string) {
5858
return (
5959
<svg
6060
xmlns="http://www.w3.org/2000/svg"

apps/website/src/components/code-snippet/code-snippet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { QwikIntrinsicElements, component$, useSignal, useTask$ } from '@builder.io/qwik';
1+
import { PropsOf, component$, useSignal, useTask$ } from '@builder.io/qwik';
22
import { useLocation } from '@builder.io/qwik-city';
33
import { isDev } from '@builder.io/qwik/build';
44
import { Highlight } from '../highlight/highlight';
@@ -14,7 +14,7 @@ const codeSnippets: any = import.meta.glob('/src/routes/docs/**/**/snippets/*',
1414
eager: isDev ? false : true,
1515
});
1616

17-
type CodeSnippetProps = QwikIntrinsicElements['div'] & {
17+
type CodeSnippetProps = PropsOf<'div'> & {
1818
name: string;
1919
};
2020

apps/website/src/components/highlight/highlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import {
22
ClassList,
3-
QwikIntrinsicElements,
3+
PropsOf,
44
component$,
55
useSignal,
66
useVisibleTask$,
77
} from '@builder.io/qwik';
88
import { OmitSignalClass } from '@qwik-ui/utils';
99
import { CodeCopy } from '../code-copy/code-copy';
1010

11-
export type HighlightProps = OmitSignalClass<QwikIntrinsicElements['div']> & {
11+
export type HighlightProps = OmitSignalClass<PropsOf<'div'>> & {
1212
code: string;
1313
copyCodeClass?: ClassList;
1414
language?: 'tsx' | 'html' | 'css';

apps/website/src/components/icons/Check.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { QwikIntrinsicElements } from '@builder.io/qwik';
1+
import { PropsOf } from '@builder.io/qwik';
22

3-
export function CheckIcon(props: QwikIntrinsicElements['svg'], key: string) {
3+
export function CheckIcon(props: PropsOf<'svg'>, key: string) {
44
return (
55
<svg
66
xmlns="http://www.w3.org/2000/svg"

apps/website/src/components/icons/CollapsibleIcon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { type QwikIntrinsicElements } from '@builder.io/qwik';
1+
import { PropsOf } from '@builder.io/qwik';
22

3-
export function CollapsibleIcon(props: QwikIntrinsicElements['svg']) {
3+
export function CollapsibleIcon(props: PropsOf<'svg'>) {
44
return (
55
<svg
66
xmlns="http://www.w3.org/2000/svg"

apps/website/src/components/mdx-components/index.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { QwikIntrinsicElements, Slot, component$ } from '@builder.io/qwik';
1+
import { PropsOf, Slot, component$ } from '@builder.io/qwik';
22
import { StatusBanner } from '../status-banner/status-banner';
33
import { AnatomyTable } from '../anatomy-table/anatomy-table';
44
import { APITable } from '../api-table/api-table';
@@ -12,14 +12,14 @@ import { cn } from '@qwik-ui/utils';
1212

1313
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1414
export const components: Record<string, any> = {
15-
p: component$<QwikIntrinsicElements['p']>(({ ...props }) => {
15+
p: component$<PropsOf<'p'>>(({ ...props }) => {
1616
return (
1717
<p {...props} class={[cn('mb-6 last:mb-0', props.class)]}>
1818
<Slot />
1919
</p>
2020
);
2121
}),
22-
h1: component$<QwikIntrinsicElements['h1']>(({ ...props }) => {
22+
h1: component$<PropsOf<'h1'>>(({ ...props }) => {
2323
return (
2424
<h1
2525
{...props}
@@ -29,7 +29,7 @@ export const components: Record<string, any> = {
2929
</h1>
3030
);
3131
}),
32-
h2: component$<QwikIntrinsicElements['h2']>(({ ...props }) => {
32+
h2: component$<PropsOf<'h2'>>(({ ...props }) => {
3333
return (
3434
<h2
3535
{...props}
@@ -44,21 +44,21 @@ export const components: Record<string, any> = {
4444
</h2>
4545
);
4646
}),
47-
h3: component$<QwikIntrinsicElements['h3']>(({ ...props }) => {
47+
h3: component$<PropsOf<'h3'>>(({ ...props }) => {
4848
return (
4949
<h3 {...props} class={[cn('mb-6 mt-8 text-xl font-semibold', props.class)]}>
5050
<Slot />
5151
</h3>
5252
);
5353
}),
54-
h4: component$<QwikIntrinsicElements['h4']>(({ ...props }) => {
54+
h4: component$<PropsOf<'h4'>>(({ ...props }) => {
5555
return (
5656
<h4 {...props} class={[cn('mb-4 mt-6 text-lg font-medium', props.class)]}>
5757
<Slot />
5858
</h4>
5959
);
6060
}),
61-
h5: component$<QwikIntrinsicElements['h5']>(({ ...props }) => {
61+
h5: component$<PropsOf<'h5'>>(({ ...props }) => {
6262
return (
6363
<h5 {...props} class={[cn('text-base font-[700]', props.class)]}>
6464
<Slot />
@@ -72,22 +72,22 @@ export const components: Record<string, any> = {
7272
</Note>
7373
);
7474
}),
75-
ul: component$<QwikIntrinsicElements['ul']>(({ ...props }) => {
75+
ul: component$<PropsOf<'ul'>>(({ ...props }) => {
7676
return (
7777
<ul {...props} class={[cn('mb-4 list-disc px-6 font-medium', props.class)]}>
7878
<Slot />
7979
</ul>
8080
);
8181
}),
82-
li: component$<QwikIntrinsicElements['li']>(({ ...props }) => {
82+
li: component$<PropsOf<'li'>>(({ ...props }) => {
8383
return (
8484
<li {...props} class={[cn('py-2', props.class)]}>
8585
<Slot />
8686
</li>
8787
);
8888
}),
8989
pre: component$<
90-
QwikIntrinsicElements['div'] & {
90+
PropsOf<'div'> & {
9191
__rawString__?: string;
9292
}
9393
>(({ __rawString__, ...props }) => {
@@ -116,7 +116,7 @@ export const components: Record<string, any> = {
116116
</div>
117117
);
118118
}),
119-
code: component$<QwikIntrinsicElements['code']>(() => {
119+
code: component$<PropsOf<'code'>>(() => {
120120
return (
121121
<code class="whitespace-pre-wrap">
122122
<Slot />

apps/website/src/components/note/note.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { component$, Slot, QwikIntrinsicElements } from '@builder.io/qwik';
1+
import { component$, PropsOf, Slot } from '@builder.io/qwik';
22

33
export enum NoteStatus {
44
Info = 'info',
@@ -56,7 +56,7 @@ export const Note = component$<NoteProps>(({ status, ...props }) => {
5656
);
5757
});
5858

59-
export function InfoIcon(props: QwikIntrinsicElements['svg'], key: string) {
59+
export function InfoIcon(props: PropsOf<'svg'>, key: string) {
6060
return (
6161
<svg
6262
xmlns="http://www.w3.org/2000/svg"
@@ -74,7 +74,7 @@ export function InfoIcon(props: QwikIntrinsicElements['svg'], key: string) {
7474
);
7575
}
7676

77-
export function WarningIcon(props: QwikIntrinsicElements['svg'], key: string) {
77+
export function WarningIcon(props: PropsOf<'svg'>, key: string) {
7878
return (
7979
<svg
8080
xmlns="http://www.w3.org/2000/svg"
@@ -92,7 +92,7 @@ export function WarningIcon(props: QwikIntrinsicElements['svg'], key: string) {
9292
);
9393
}
9494

95-
export function CautionIcon(props: QwikIntrinsicElements['svg'], key: string) {
95+
export function CautionIcon(props: PropsOf<'svg'>, key: string) {
9696
return (
9797
<svg
9898
xmlns="http://www.w3.org/2000/svg"

apps/website/src/components/showcase/showcase.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
Component,
3-
QwikIntrinsicElements,
4-
component$,
5-
useSignal,
6-
useTask$,
7-
} from '@builder.io/qwik';
1+
import { Component, PropsOf, component$, useSignal, useTask$ } from '@builder.io/qwik';
82
import { Tab, TabList, TabPanel, Tabs } from '@qwik-ui/headless';
93
import { useLocation } from '@builder.io/qwik-city';
104
import { isDev } from '@builder.io/qwik/build';
@@ -33,7 +27,7 @@ const rawComponents: Record<string, any> = import.meta.glob(
3327
},
3428
);
3529

36-
type ShowcaseProps = QwikIntrinsicElements['div'] & {
30+
type ShowcaseProps = PropsOf<'div'> & {
3731
name?: string;
3832
};
3933

apps/website/src/routes/docs/headless/accordion/examples/focused-index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default component$(() => {
1515
<div class="flex w-full flex-col items-center gap-4">
1616
<AccordionRoot
1717
class="w-[min(400px,_100%)]"
18-
onFocusIndexChange$={(index) => {
18+
onFocusIndexChange$={(index: number) => {
1919
focusedIndexSig.value = index;
2020
}}
2121
>

apps/website/src/routes/docs/headless/accordion/examples/selected-index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default component$(() => {
1515
<div class="flex w-full flex-col items-center gap-4">
1616
<AccordionRoot
1717
class="w-[min(400px,_100%)]"
18-
onSelectedIndexChange$={(index) => {
18+
onSelectedIndexChange$={(index: number) => {
1919
selectedIndexSig.value = index;
2020
}}
2121
>

0 commit comments

Comments
 (0)