Skip to content

Commit d948d6f

Browse files
committed
chore: update website
1 parent 4525937 commit d948d6f

File tree

34 files changed

+373
-391
lines changed

34 files changed

+373
-391
lines changed

apps/docs/content/_components/select.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ Since this component uses the native `<select>` element, it inherits its accessi
6464

6565
## Props
6666

67-
| Prop name | Type | Default value | Possible values |
68-
| ------------------ | ------------------------------------------------------------------- | ------------- | ----------------------- |
69-
| `class?` | `string` | | |
70-
| `size?` | `SfSelectSize` | `'base'` | `'sm'`, `'base'`,`'lg'` |
71-
| `invalid?` | `boolean` | `false` | |
72-
| `wrapperClass?` | `string` | | |
73-
| `showSlotChevron?` | `boolean` | | |
74-
| `onChange$?` | `PropFunction<(event: QwikChangeEvent<HTMLSelectElement>) => void>` | | |
67+
| Prop name | Type | Default value | Possible values |
68+
| --------------- | ------------------------------------------------------------------- | ------------- | ----------------------- |
69+
| `class?` | `string` | | |
70+
| `size?` | `SfSelectSize` | `'base'` | `'sm'`, `'base'`,`'lg'` |
71+
| `invalid?` | `boolean` | `false` | |
72+
| `wrapperClass?` | `string` | | |
73+
| `slotChevron?` | `boolean` | | |
74+
| `onChange$?` | `PropFunction<(event: QwikChangeEvent<HTMLSelectElement>) => void>` | | |
7575

7676
## Slots
7777

apps/website/src/components/router-head/router-head.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { component$ } from '@builder.io/qwik';
2-
import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
1+
import { component$ } from "@builder.io/qwik";
2+
import { useDocumentHead, useLocation } from "@builder.io/qwik-city";
33

44
/**
55
* The RouterHead component is placed inside of the document `<head>` element.
@@ -17,18 +17,16 @@ export const RouterHead = component$(() => {
1717
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
1818

1919
{head.meta.map((m) => (
20-
<meta {...m} />
20+
<meta key={m.key} {...m} />
2121
))}
2222

2323
{head.links.map((l) => (
24-
<link {...l} />
24+
<link key={l.key} {...l} />
2525
))}
2626

2727
{head.styles.map((s) => (
28-
<style {...s.props} dangerouslySetInnerHTML={s.style} />
28+
<style key={s.key} {...s.props} dangerouslySetInnerHTML={s.style} />
2929
))}
30-
31-
<script async defer src="https://buttons.github.io/buttons.js"></script>
3230
</>
3331
);
3432
});

apps/website/src/entry.cloudflare-pages.tsx

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

apps/website/src/entry.dev.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* - More code is transferred to the browser than in SSR mode.
1010
* - Optimizer/Serialization/Deserialization code is not exercised!
1111
*/
12-
import { render, RenderOptions } from '@builder.io/qwik';
13-
import Root from './root';
12+
import { render, type RenderOptions } from "@builder.io/qwik";
13+
import Root from "./root";
1414

1515
export default function (opts: RenderOptions) {
1616
return render(document, <Root />, opts);

apps/website/src/entry.preview.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
* - https://vitejs.dev/config/preview-options.html#preview-options
1111
*
1212
*/
13-
import { createQwikCity } from '@builder.io/qwik-city/middleware/node';
14-
import render from './entry.ssr';
15-
import qwikCityPlan from '@qwik-city-plan';
13+
import { createQwikCity } from "@builder.io/qwik-city/middleware/node";
14+
import qwikCityPlan from "@qwik-city-plan";
15+
import render from "./entry.ssr";
1616

1717
/**
18-
* The default export is the QwikCity adaptor used by Vite preview.
18+
* The default export is the QwikCity adapter used by Vite preview.
1919
*/
2020
export default createQwikCity({ render, qwikCityPlan });

apps/website/src/entry.ssr.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* WHAT IS THIS FILE?
33
*
4-
* SSR entry point, in all cases the application is render outside the browser, this
4+
* SSR entry point, in all cases the application is rendered outside the browser, this
55
* entry point will be the common one.
66
*
77
* - Server (express, cloudflare...)
@@ -13,17 +13,17 @@
1313
import {
1414
renderToStream,
1515
type RenderToStreamOptions,
16-
} from '@builder.io/qwik/server';
17-
import { manifest } from '@qwik-client-manifest';
18-
import Root from './root';
16+
} from "@builder.io/qwik/server";
17+
import { manifest } from "@qwik-client-manifest";
18+
import Root from "./root";
1919

2020
export default function (opts: RenderToStreamOptions) {
2121
return renderToStream(<Root />, {
2222
manifest,
2323
...opts,
2424
// Use container attributes to set attributes on the html tag.
2525
containerAttributes: {
26-
lang: 'en-us',
26+
lang: "en-us",
2727
...opts.containerAttributes,
2828
},
2929
});

apps/website/src/routes/404.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { component$ } from '@builder.io/qwik';
2+
3+
export default component$(() => {
4+
return (
5+
<div class='e-page-examples'>
6+
<div class='e-page'>
7+
<div class='e-page-component'>
8+
<div
9+
role='alert'
10+
class='bg-neutral-100 max-w-[600px] shadow-md pr-2 pl-4 ring-1 ring-neutral-300 typography-text-sm md:typography-text-base py-1 rounded-md'
11+
>
12+
<p class='py-2'>Coming soon....</p>
13+
</div>
14+
</div>
15+
</div>
16+
</div>
17+
);
18+
});

apps/website/src/routes/examples/SfAccordionItem/index.tsx

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,54 @@ import { component$, useContext, useTask$ } from '@builder.io/qwik';
22
import { SfAccordionItem, SfIconChevronLeft } from 'qwik-storefront-ui';
33
import { EXAMPLES_STATE } from '../layout';
44
import { ComponentExample } from '../../../components/utils/ComponentExample';
5-
import { ControlsType } from '../../../components/utils/types';
5+
import type { ControlsType } from '../../../components/utils/types';
66

77
export default component$(() => {
8-
const examplesState = useContext(EXAMPLES_STATE);
8+
const examplesState = useContext(EXAMPLES_STATE);
99

10-
useTask$(() => {
11-
examplesState.data = {
12-
controls: [
13-
{
14-
type: 'boolean',
15-
modelName: 'open',
16-
propDefaultValue: false,
17-
propType: 'boolean',
18-
},
19-
] satisfies ControlsType,
20-
state: { open: true },
21-
};
22-
});
10+
useTask$(() => {
11+
examplesState.data = {
12+
controls: [
13+
{
14+
type: 'boolean',
15+
modelName: 'open',
16+
propDefaultValue: false,
17+
propType: 'boolean',
18+
},
19+
] satisfies ControlsType,
20+
state: { open: true },
21+
};
22+
});
2323

24-
return (
25-
<ComponentExample>
26-
<SfAccordionItem
27-
open={examplesState.data.state.open}
28-
onToggle$={() => {
29-
examplesState.data.state.open = !examplesState.data.state.open;
30-
}}
31-
class="rounded border"
32-
>
33-
<div class="flex justify-between p-2 bg-gray-100">
34-
<p>Click me to see the content</p>
35-
<SfIconChevronLeft
36-
class={`${
37-
examplesState.data.state.open ? 'rotate-90' : '-rotate-90'
38-
}`}
39-
/>
40-
</div>
41-
<div q:slot="detail">
42-
<p class="p-2">
43-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
44-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
45-
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
46-
aliquip ex ea commodo consequat. Duis aute irure dolor in
47-
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
48-
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
49-
culpa qui officia deserunt mollit anim id est laborum.
50-
</p>
51-
</div>
52-
</SfAccordionItem>
53-
</ComponentExample>
54-
);
24+
return (
25+
<ComponentExample>
26+
<SfAccordionItem
27+
open={examplesState.data.state.open}
28+
onToggle$={() => {
29+
examplesState.data.state.open = !examplesState.data.state.open;
30+
}}
31+
class='rounded border'
32+
>
33+
<div class='flex justify-between p-2 bg-gray-100'>
34+
<p>Click me to see the content</p>
35+
<SfIconChevronLeft
36+
class={`${
37+
examplesState.data.state.open ? 'rotate-90' : '-rotate-90'
38+
}`}
39+
/>
40+
</div>
41+
<div q:slot='detail'>
42+
<p class='p-2'>
43+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
44+
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
45+
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
46+
aliquip ex ea commodo consequat. Duis aute irure dolor in
47+
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
48+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
49+
culpa qui officia deserunt mollit anim id est laborum.
50+
</p>
51+
</div>
52+
</SfAccordionItem>
53+
</ComponentExample>
54+
);
5555
});

apps/website/src/routes/examples/SfChip/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
SfThumbnailSize,
77
} from 'qwik-storefront-ui';
88
import { ComponentExample } from '../../../components/utils/ComponentExample';
9-
import { ControlsType } from '../../../components/utils/types';
9+
import type { ControlsType } from '../../../components/utils/types';
1010
import { EXAMPLES_STATE } from '../layout';
1111

1212
export default component$(() => {
@@ -79,7 +79,7 @@ export default component$(() => {
7979
value: examplesState.data.state.value,
8080
onChange$: selectHandler,
8181
}}
82-
showSlotPrefix={true}
82+
slotPrefix={true}
8383
>
8484
<div q:slot="prefix">
8585
<SfThumbnail

apps/website/src/routes/examples/SfDrawer/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { component$, useContext, useTask$ } from '@builder.io/qwik';
2-
import { SfButton, SfDrawer, SfDrawerPlacement } from 'qwik-storefront-ui';
2+
import { SfButton, SfDrawer } from 'qwik-storefront-ui';
33
import { ComponentExample } from '../../../components/utils/ComponentExample';
4-
import { ControlsType } from '../../../components/utils/types';
4+
import type { ControlsType } from '../../../components/utils/types';
55
import { EXAMPLES_STATE } from '../layout';
6+
import { SfDrawerPlacement } from 'qwik-storefront-ui';
67

78
export default component$(() => {
89
const examplesState = useContext(EXAMPLES_STATE);

0 commit comments

Comments
 (0)