Skip to content

Commit 443e3c7

Browse files
Merge branch 'qwikifiers:main' into accordion-changes
2 parents 261162d + 95b760a commit 443e3c7

File tree

8 files changed

+61
-16
lines changed

8 files changed

+61
-16
lines changed

apps/website/src/components/api-table/api-table.tsx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { component$ } from '@builder.io/qwik';
2-
2+
import { Tooltip } from '@qwik-ui/headless';
3+
import { Popover, PopoverContent, PopoverTrigger } from '@qwik-ui/headless';
4+
import {} from '@qwik-ui/headless';
5+
import { Button } from '@qwik-ui/tailwind';
36
type APITableProps = {
47
propDescriptors: {
58
name: string;
9+
info: string;
610
type: string;
711
description: string;
812
}[];
@@ -28,8 +32,37 @@ export const APITable = component$(({ propDescriptors }: APITableProps) => {
2832
<code>{propDescriptor.name}</code>
2933
</td>
3034
<td class="prose prose-sm py-3 align-baseline">
31-
<span class="">
35+
<span class="flex items-center">
3236
<code>{propDescriptor.type}</code>
37+
{propDescriptor.info && (
38+
<Popover placement="top">
39+
<PopoverContent>
40+
<div class="bg-[#202425] text-[#7881fa] max-w-xs mb-2 text-md px-4 py-2 rounded-md">
41+
{propDescriptor?.info}
42+
</div>
43+
</PopoverContent>
44+
<PopoverTrigger>
45+
<div class="hover:bg-slate-500 hover:bg-opacity-50 h-[31px] mt-2 p-2 rounded-md">
46+
<svg
47+
width="15"
48+
height="15"
49+
viewBox="0 0 15 15"
50+
fill="none"
51+
xmlns="http://www.w3.org/2000/svg"
52+
aria-hidden="true"
53+
focusable="false"
54+
>
55+
<path
56+
d="M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z"
57+
fill="currentColor"
58+
fill-rule="evenodd"
59+
clip-rule="evenodd"
60+
></path>
61+
</svg>
62+
</div>{' '}
63+
</PopoverTrigger>
64+
</Popover>
65+
)}
3366
</span>
3467
</td>
3568
<td class="py-3 align-baseline">

apps/website/src/routes/docs/headless/(components)/accordion/index.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,15 @@ Thanks to `QwikIntrinsicAttributes` , you can use most if not all normal JSX pro
317317
{
318318
name: 'onClick$',
319319
type: 'function',
320-
description:
321-
'A custom click handler that executes when the element is clicked.',
322-
},
323-
{
320+
info: 'PropFunction<() => void>',
321+
description: 'A custom click handler that executes when the element is clicked.',
322+
},
323+
{
324324
name: 'onKeyDown$',
325325
type: 'function',
326326
description:
327327
'A custom click handler that executes when the key is pressed down.',
328+
},
328329
},
329330
]}
330331
/>

apps/website/src/routes/docs/headless/(components)/autocomplete/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ By default, the API holds available attributes of both native DOM elements and c
164164
},
165165
{
166166
name: 'onClick$',
167-
type: 'PropFunction<() => void>',
167+
type: 'function',
168+
info: 'PropFunction<() => void>',
168169
description: 'A custom click handler',
169170
},
170171
]}

apps/website/src/routes/docs/headless/(components)/popover/index.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ import { APITable } from '../../../../../components/api-table/api-table';
6565
propDescriptors={[
6666
{
6767
name: 'placement',
68-
type: '"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"',
68+
type:"enum",
69+
info: '"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"',
6970
description: 'The side where to show the popover.',
7071
},
7172
{
7273
name: 'triggerEvent',
73-
type: '"click" | "mouseOver"',
74+
type: 'enum',
75+
info: '"click" | "mouseOver"',
7476
description: 'Popover is opened when trigger is clicked or mouse overed.',
7577
},
7678
{
@@ -91,8 +93,11 @@ import { APITable } from '../../../../../components/api-table/api-table';
9193
},
9294
{
9395
name: 'onUpdate$',
94-
type: 'PropFunction<(isOpen: boolean) => void>',
96+
type: 'function',
97+
info: 'PropFunction<(isOpen: boolean) => void>',
98+
9599
description: 'Notify a state update to the parent.',
96100
},
97-
]}
101+
102+
]}
98103
/>

apps/website/src/routes/docs/headless/(components)/tabs/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ return <div>
385385
},
386386
{
387387
name: 'onSelectedIndexChange$',
388-
type: '(index: number) => void',
388+
type: 'function',
389+
info: '(index: number) => void',
389390
description:
390391
'An event hook that getting notified whenever the selected index changes',
391392
},
@@ -403,7 +404,8 @@ return <div>
403404
},
404405
{
405406
name: 'onClick',
406-
type: '(event: QwikMouseEvent) => void',
407+
info: '(event: QwikMouseEvent) => void',
408+
type: 'function',
407409
description: 'A custom click handler to wire to tab click event',
408410
},
409411
{

apps/website/src/routes/docs/headless/(components)/toggle/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ import { APITable } from '../../../../../components/api-table/api-table';
8282
},
8383
{
8484
name: 'onClick$',
85-
type: 'PropFunction<() => void>',
85+
info: 'PropFunction<() => void>',
86+
type: 'function',
8687
description: 'A custom click handler to wire to the toggle click event',
8788
},
8889
{

apps/website/src/routes/docs/headless/(components)/tooltip/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ import { APITable } from '../../../../../components/api-table/api-table';
9999
},
100100
{
101101
name: 'position',
102-
type: '"bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"',
102+
type: 'enum',
103+
info: '"bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"',
103104
description: 'Determines the position the Tooltip is rendered.',
104105
},
105106
]}

apps/website/src/routes/docs/tailwind/(components)/accordion/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ import { APITable } from '../../../../../components/api-table/api-table';
143143
},
144144
{
145145
name: 'onClick$',
146-
type: 'PropFunction<() => void>',
146+
info: 'PropFunction<() => void>',
147+
type: 'function',
147148
description: 'A custom click handler',
148149
},
149150
]}

0 commit comments

Comments
 (0)