Skip to content

Commit 5f46f05

Browse files
Merge pull request #576 from maiieul/up-1.3.1
chore: prepare 1.3.1 upgrade
2 parents 75df085 + 46690f7 commit 5f46f05

File tree

97 files changed

+5337
-8130
lines changed

Some content is hidden

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

97 files changed

+5337
-8130
lines changed

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

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
1-
import { stringifyClassList } from '@qwik-ui/utils';
2-
import { QwikIntrinsicElements, component$, useSignal } from '@builder.io/qwik';
1+
import { cn } from '@qwik-ui/utils';
2+
import { PropsOf, QwikIntrinsicElements, component$, useSignal } from '@builder.io/qwik';
33
import { Button } from '@qwik-ui/fluffy';
4-
import { OmitSignalClass } from '@qwik-ui/utils';
54
import copy from 'clipboard-copy';
6-
import { twMerge } from 'tailwind-merge';
75

8-
export type CodeCopyProps = OmitSignalClass<QwikIntrinsicElements['button']> & {
6+
export type CodeCopyProps = PropsOf<typeof Button> & {
97
code?: string;
108
};
119

12-
export const CodeCopy = component$(
13-
({ code = '', class: outsideClass, ...restOfProps }: CodeCopyProps) => {
14-
const copied = useSignal(false);
10+
export const CodeCopy = component$(({ code = '', class: outsideClass, ...props }) => {
11+
const copied = useSignal(false);
1512

16-
return (
17-
<Button
18-
look="ghost"
19-
intent="basic"
20-
animation={!copied.value ? 'bouncy' : 'none'}
21-
{...restOfProps}
22-
title={copied.value ? 'Copied to Clipboard' : 'Copy to Clipboard'}
23-
class={twMerge(stringifyClassList(outsideClass))}
24-
onClick$={async () => {
25-
await copy(code);
26-
copied.value = true;
13+
return (
14+
<Button
15+
look="ghost"
16+
intent="basic"
17+
animation={!copied.value ? 'bouncy' : 'none'}
18+
{...props}
19+
title={copied.value ? 'Copied to Clipboard' : 'Copy to Clipboard'}
20+
class={cn(outsideClass)}
21+
onClick$={async () => {
22+
await copy(code);
23+
copied.value = true;
2724

28-
setTimeout(() => {
29-
copied.value = false;
30-
}, 4000);
31-
}}
32-
>
33-
{!copied.value ? <CopyIcon /> : <ClipboardCheck />}
34-
</Button>
35-
);
36-
},
37-
);
25+
setTimeout(() => {
26+
copied.value = false;
27+
}, 4000);
28+
}}
29+
>
30+
{!copied.value ? <CopyIcon /> : <ClipboardCheck />}
31+
</Button>
32+
);
33+
});
3834

3935
export function CopyIcon(props: QwikIntrinsicElements['svg'], key: string) {
4036
return (

apps/website/src/components/header/header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { $, component$, useComputed$ } from '@builder.io/qwik';
33
import { version as headlessVersion } from '../../../../../packages/kit-headless/package.json';
44
// eslint-disable-next-line @nx/enforce-module-boundaries
55
import { useLocation } from '@builder.io/qwik-city';
6-
import { KitName } from 'apps/website/src/_state/kit-name.type';
7-
import { useAppState } from 'apps/website/src/_state/use-app-state';
6+
import { KitName } from '~/_state/kit-name.type';
7+
import { useAppState } from '~/_state/use-app-state';
88
import { version as fluffyVersion } from '../../../../../packages/kit-fluffy/package.json';
99
import { CloseIcon } from '../icons/CloseIcon';
1010
import { GitHubIcon } from '../icons/GitHubIcon';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const CloseIcon = () => (
22
<svg
33
viewBox="0 0 10 9"
44
fill="none"
5-
strokeLinecap="round"
5+
stroke-linecap="round"
66
aria-hidden="true"
77
class="h-8 w-8 rounded-xl stroke-black p-1 hover:bg-gray-100 dark:stroke-white dark:hover:bg-slate-600"
88
>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const MenuIcon = () => (
22
<svg
33
viewBox="0 0 10 9"
44
fill="none"
5-
strokeLinecap="round"
5+
stroke-linecap="round"
66
aria-hidden="true"
77
class="h-6 w-6 stroke-black hover:bg-gray-100 dark:stroke-white dark:hover:bg-slate-600"
88
>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const SunIcon = () => (
77
>
88
<path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" />
99
<path
10-
strokeLinecap="round"
10+
stroke-linecap="round"
1111
d="M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"
1212
/>
1313
</svg>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const DiscordIcon = () => (
77
aria-label="Discord Logo"
88
width="22"
99
height="22"
10-
q:key="yB_0"
10+
key="yB_0"
1111
>
1212
<path d="M464 66.52A50 50 0 00414.12 17L97.64 16A49.65 49.65 0 0048 65.52V392c0 27.3 22.28 48 49.64 48H368l-13-44 109 100zM324.65 329.81s-8.72-10.39-16-19.32C340.39 301.55 352.5 282 352.5 282a139 139 0 01-27.85 14.25 173.31 173.31 0 01-35.11 10.39 170.05 170.05 0 01-62.72-.24 184.45 184.45 0 01-35.59-10.4 141.46 141.46 0 01-17.68-8.21c-.73-.48-1.45-.72-2.18-1.21-.49-.24-.73-.48-1-.48-4.36-2.42-6.78-4.11-6.78-4.11s11.62 19.09 42.38 28.26c-7.27 9.18-16.23 19.81-16.23 19.81-53.51-1.69-73.85-36.47-73.85-36.47 0-77.06 34.87-139.62 34.87-139.62 34.87-25.85 67.8-25.12 67.8-25.12l2.42 2.9c-43.59 12.32-63.44 31.4-63.44 31.4s5.32-2.9 14.28-6.77c25.91-11.35 46.5-14.25 55-15.21a24 24 0 014.12-.49 205.62 205.62 0 0148.91-.48 201.62 201.62 0 0172.89 22.95s-19.13-18.15-60.3-30.45l3.39-3.86s33.17-.73 67.81 25.16c0 0 34.87 62.56 34.87 139.62 0-.28-20.35 34.5-73.86 36.19z"></path>
1313
<path d="M212.05 218c-13.8 0-24.7 11.84-24.7 26.57s11.14 26.57 24.7 26.57c13.8 0 24.7-11.83 24.7-26.57.25-14.76-10.9-26.57-24.7-26.57zM300.43 218c-13.8 0-24.7 11.84-24.7 26.57s11.14 26.57 24.7 26.57c13.81 0 24.7-11.83 24.7-26.57S314 218 300.43 218z"></path>

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

Lines changed: 13 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { QwikIntrinsicElements, Signal, Slot, component$ } from '@builder.io/qwik';
1+
import { QwikIntrinsicElements, 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';
@@ -8,21 +8,13 @@ import { Showcase } from '../showcase/showcase';
88
import { CodeSnippet } from '../code-snippet/code-snippet';
99
import { InstallSnippet } from '../install-snippet/install-snippet';
1010
import { Note } from '../note/note';
11-
import { twMerge } from 'tailwind-merge';
11+
import { cn } from '@qwik-ui/utils';
1212

1313
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1414
export const components: Record<string, any> = {
1515
p: component$<QwikIntrinsicElements['p']>(({ ...props }) => {
1616
return (
17-
<p
18-
{...props}
19-
class={[
20-
twMerge(
21-
'mb-6 last:mb-0',
22-
(props.class as Signal<string>)?.value ?? (props.class as string),
23-
),
24-
]}
25-
>
17+
<p {...props} class={[cn('mb-6 last:mb-0', props.class)]}>
2618
<Slot />
2719
</p>
2820
);
@@ -31,12 +23,7 @@ export const components: Record<string, any> = {
3123
return (
3224
<h1
3325
{...props}
34-
class={[
35-
twMerge(
36-
'mb-6 pt-6 text-3xl font-extrabold md:text-5xl',
37-
(props.class as Signal<string>)?.value ?? (props.class as string),
38-
),
39-
]}
26+
class={[cn('mb-6 pt-6 text-3xl font-extrabold md:text-5xl', props.class)]}
4027
>
4128
<Slot />
4229
</h1>
@@ -47,9 +34,9 @@ export const components: Record<string, any> = {
4734
<h2
4835
{...props}
4936
class={[
50-
twMerge(
37+
cn(
5138
'mb-8 mt-20 scroll-mt-32 border-b-[1px] pb-2 text-2xl font-extrabold',
52-
(props.class as Signal<string>)?.value ?? (props.class as string),
39+
props.class,
5340
),
5441
]}
5542
>
@@ -59,45 +46,21 @@ export const components: Record<string, any> = {
5946
}),
6047
h3: component$<QwikIntrinsicElements['h3']>(({ ...props }) => {
6148
return (
62-
<h3
63-
{...props}
64-
class={[
65-
twMerge(
66-
'mb-6 mt-8 text-xl font-semibold',
67-
(props.class as Signal<string>)?.value ?? (props.class as string),
68-
),
69-
]}
70-
>
49+
<h3 {...props} class={[cn('mb-6 mt-8 text-xl font-semibold', props.class)]}>
7150
<Slot />
7251
</h3>
7352
);
7453
}),
7554
h4: component$<QwikIntrinsicElements['h4']>(({ ...props }) => {
7655
return (
77-
<h4
78-
{...props}
79-
class={[
80-
twMerge(
81-
'mb-4 mt-6 text-lg font-medium',
82-
(props.class as Signal<string>)?.value ?? (props.class as string),
83-
),
84-
]}
85-
>
56+
<h4 {...props} class={[cn('mb-4 mt-6 text-lg font-medium', props.class)]}>
8657
<Slot />
8758
</h4>
8859
);
8960
}),
9061
h5: component$<QwikIntrinsicElements['h5']>(({ ...props }) => {
9162
return (
92-
<h5
93-
{...props}
94-
class={[
95-
twMerge(
96-
'text-base font-[700]',
97-
(props.class as Signal<string>)?.value ?? (props.class as string),
98-
),
99-
]}
100-
>
63+
<h5 {...props} class={[cn('text-base font-[700]', props.class)]}>
10164
<Slot />
10265
</h5>
10366
);
@@ -111,30 +74,14 @@ export const components: Record<string, any> = {
11174
}),
11275
ul: component$<QwikIntrinsicElements['ul']>(({ ...props }) => {
11376
return (
114-
<ul
115-
{...props}
116-
class={[
117-
twMerge(
118-
'mb-4 list-disc px-6 font-medium',
119-
(props.class as Signal<string>)?.value ?? (props.class as string),
120-
),
121-
]}
122-
>
77+
<ul {...props} class={[cn('mb-4 list-disc px-6 font-medium', props.class)]}>
12378
<Slot />
12479
</ul>
12580
);
12681
}),
12782
li: component$<QwikIntrinsicElements['li']>(({ ...props }) => {
12883
return (
129-
<li
130-
{...props}
131-
class={[
132-
twMerge(
133-
'py-2',
134-
(props.class as Signal<string>)?.value ?? (props.class as string),
135-
),
136-
]}
137-
>
84+
<li {...props} class={[cn('py-2', props.class)]}>
13885
<Slot />
13986
</li>
14087
);
@@ -148,9 +95,9 @@ export const components: Record<string, any> = {
14895
<div
14996
{...props}
15097
class={[
151-
twMerge(
98+
cn(
15299
'code-example relative -mx-6 mb-6 max-h-[31.25rem] rounded-xl bg-slate-900 lg:-mx-8',
153-
(props.class as Signal<string>)?.value ?? (props.class as string),
100+
props.class,
154101
),
155102
]}
156103
>

apps/website/src/components/navigation-docs/navigation-docs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { component$ } from '@builder.io/qwik';
22
import { useLocation } from '@builder.io/qwik-city';
3-
import { ComponentStatus } from 'apps/website/src/_state/component-status.type';
4-
import { KitName } from 'apps/website/src/_state/kit-name.type';
5-
import { useAppState } from 'apps/website/src/_state/use-app-state';
3+
import { ComponentStatus } from '~/_state/component-status.type';
4+
import { KitName } from '~/_state/kit-name.type';
5+
import { useAppState } from '~/_state/use-app-state';
66
import { StatusBadge } from '../component-status-badge/component-status-badge';
77
import { useSelectedKit } from '../../routes/docs/use-selected-kit';
88

apps/website/src/components/status-banner/status-banner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
useSignal,
55
useStylesScoped$,
66
} from '@builder.io/qwik';
7-
import { ComponentStatus } from 'apps/website/src/_state/component-status.type';
7+
import { ComponentStatus } from '~/_state/component-status.type';
88
import { getClassByStatus } from '../component-status-badge/component-status-badge';
99

1010
export interface StatusBannerProps {

apps/website/src/routes/docs/fluffy/alert/_index.tsx

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)