Skip to content

Commit 2ec4270

Browse files
committed
Merge branch 'main' into styled-select
2 parents 5221e00 + 35f122b commit 2ec4270

37 files changed

+4195
-10774
lines changed

.github/actions/setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
node_version:
77
description: Node Version
88
required: false
9-
default: '16'
9+
default: '18'
1010

1111
runs:
1212
using: composite
@@ -25,7 +25,7 @@ runs:
2525
- name: Setup pnpm
2626
uses: pnpm/[email protected]
2727
with:
28-
version: 7
28+
version: 8
2929

3030
- name: Use Node
3131
uses: actions/setup-node@v4

.github/actions/test/action.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ runs:
1414
using: composite
1515

1616
steps:
17-
# - name: Commitlint
18-
# shell: bash
19-
# run: npx --no-install commitlint --from=last-release
20-
2117
- name: Lint
2218
shell: bash
2319
run: npx nx run-many -t lint --exclude website # --base=last-release <- add that back after fix
@@ -26,10 +22,6 @@ runs:
2622
shell: bash
2723
run: npx nx run-many -t build --parallel=false --exclude website # --base=last-release <- add that back
2824

29-
# - name: Build storybook
30-
# shell: bash
31-
# run: npx nx build-storybook headless
32-
3325
- name: Test all except headless
3426
shell: bash
3527
run: npx nx run-many -t test # --base=last-release <- add that back
@@ -41,15 +33,6 @@ runs:
4133
with:
4234
command: 'pnpm test.headless.ci'
4335

44-
# - name: Publish to Chromatic
45-
# uses: chromaui/action@v1
46-
# # Chromatic GitHub Action options
47-
# with:
48-
# # 👇 Chromatic projectToken, refer to the manage page to obtain it.
49-
# projectToken: ${{ inputs.chromatic_token }}
50-
# storybookBuildDir: dist/storybook/headless
51-
# zip: true
52-
5336
# - name: Build
5437
# shell: bash
5538
# run: npx nx affected:build --base=last-release --exclude=website

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node_version: [16, 18, 20, 21]
14+
node_version: [18, 20, 21, 22]
1515

1616
steps:
1717
- uses: actions/checkout@v3

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
node_version: [16, 18, 20, 21]
13+
node_version: [18, 20, 22]
1414

1515
steps:
1616
- name: Cancel Previous Runs

.storybook/main.ts

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

.storybook/package.json

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

.storybook/tsconfig.json

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

apps/website/src/routes/docs/headless/select/examples/controlled-value.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@ import { $, component$, useSignal, useStyles$ } from '@builder.io/qwik';
22
import { Select } from '@qwik-ui/headless';
33
export default component$(() => {
44
useStyles$(styles);
5-
const users = ['Tim', 'Ryan', 'Jim', 'Jessie', 'Abby'];
6-
const selected = useSignal<string>('Ryan');
5+
const users = [
6+
{ id: '0', name: 'Tim' },
7+
{ id: '1', name: 'Ryan' }, // 👈 start with Ryan
8+
{ id: '2', name: 'Jim' },
9+
{ id: '3', name: 'Jessie' },
10+
{ id: '4', name: 'Abby' },
11+
];
12+
const selectedId = useSignal<string>('1');
713

814
return (
915
<>
10-
<Select.Root bind:value={selected} class="select">
16+
<Select.Root bind:value={selectedId} class="select">
1117
<Select.Label>Logged in users</Select.Label>
1218
<Select.Trigger class="select-trigger">
1319
<Select.DisplayText placeholder="Select an option" />
1420
</Select.Trigger>
1521
<Select.Popover class="select-popover">
1622
<Select.Listbox class="select-listbox">
17-
{users.map((user, index) => (
18-
<Select.Item value={index.toString()} key={user}>
19-
<Select.ItemLabel>{user}</Select.ItemLabel>
23+
{users.map((user) => (
24+
<Select.Item value={user.id} key={user.id}>
25+
<Select.ItemLabel>{user.name}</Select.ItemLabel>
2026
</Select.Item>
2127
))}
2228
</Select.Listbox>
2329
</Select.Popover>
2430
</Select.Root>
25-
<button onClick$={$(() => (selected.value = '4'))}>Change to Abby</button>
31+
<button onClick$={$(() => (selectedId.value = '4'))}>Change to Abby</button>
2632
</>
2733
);
2834
});

apps/website/src/routes/docs/headless/select/examples/validation.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
import { component$, useStyles$, $ } from '@builder.io/qwik';
22
import { LuCheck } from '@qwikest/icons/lucide';
33
import { Select } from '@qwik-ui/headless';
4-
import { useForm, required, InitialValues } from '@modular-forms/qwik';
5-
import { routeLoader$ } from '@builder.io/qwik-city';
4+
import { useForm, required } from '@modular-forms/qwik';
65

76
type Users = {
87
firstName: string;
98
};
109

11-
export const useSelectFormLoader = routeLoader$<InitialValues<Users>>(() => ({
12-
firstName: '',
13-
}));
14-
1510
export default component$(() => {
1611
const users = ['Tim', 'Ryan', 'Jim', 'Jessie', 'Abby'];
1712
const [, { Form, Field }] = useForm<Users>({
18-
loader: useSelectFormLoader(),
13+
loader: { value: { firstName: '' } },
1914
});
2015

2116
useStyles$(styles);

apps/website/src/routes/docs/headless/select/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ title: Qwik UI | Select
44

55
import { FeatureList } from '~/components/feature-list/feature-list';
66
import { statusByComponent } from '~/_state/component-statuses';
7-
import { useSelectFormLoader } from './examples/validation.tsx';
8-
export { useSelectFormLoader } from './examples/validation.tsx';
97

108
<StatusBanner status={statusByComponent.headless.Select} />
119

0 commit comments

Comments
 (0)