Skip to content

Commit ecd5088

Browse files
committed
fix: added roots
1 parent e55f6da commit ecd5088

File tree

12 files changed

+34
-53
lines changed

12 files changed

+34
-53
lines changed

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list-false.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import {
3-
CheckboxIndicator,
4-
Checkbox,
5-
ChecklistIndicator,
6-
Checklist,
7-
} from 'packages/kit-headless/src/components/checkbox/index';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
83
// TODO: add logic to handle user passed sigs with trues
94
// this test basically ensures that the sig passed to the checklist controlls trumps all its children
105
export default component$(() => {
116
const checklistSig = useSignal(false);
127
return (
138
<>
149
<h3 id="test123">Pick a cat</h3>
15-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
10+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1611
<Checkbox.Root
1712
class="flex items-center gap-3 bg-slate-900 text-white"
1813
checklist={true}
@@ -44,7 +39,7 @@ export default component$(() => {
4439
<p>Im a true.tsx</p>
4540
</div>
4641
</Checkbox.Root>
47-
</Checklist>
42+
</Checklist.Root>
4843
<p>You signal is: </p>
4944
<p id="signal-to-text">{`${checklistSig.value}`}</p>
5045
</>

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list-falses.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
import { Checklist } from 'packages/kit-headless/src/components/checkbox/checklist';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
53
export default component$(() => {
64
const firstUserSig = useSignal(false);
75
const secondUserSig = useSignal(false);
86
return (
97
<>
108
<h3 id="test123">Pick a cat</h3>
11-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
9+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1210
<Checkbox.Root
1311
class="flex items-center gap-3 bg-slate-900 p-2 text-white"
1412
checklist={true}
@@ -32,7 +30,7 @@ export default component$(() => {
3230
<p>No other stuff is needed here</p>
3331
</div>
3432
</Checkbox.Root>
35-
</Checklist>
33+
</Checklist.Root>
3634
</>
3735
);
3836
});

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list-mixed.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
import { Checklist } from 'packages/kit-headless/src/components/checkbox/checklist';
5-
import { Checkbox } from '@qwik-ui/headless';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
63
export default component$(() => {
74
const firstUserSig = useSignal(false);
85
const secondUserSig = useSignal(true);
96
return (
107
<>
118
<h3 id="test123">Pick a cat</h3>
12-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
9+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1310
<Checkbox.Root
1411
class="flex items-center gap-3 bg-slate-900 p-2 text-white"
1512
checklist={true}
@@ -18,7 +15,6 @@ export default component$(() => {
1815
<div q:slot="checkbox" id="true-img">
1916
2017
</div>
21-
2218
<div q:slot="checklist" id="mixed-img">
2319
2420
</div>
@@ -39,7 +35,7 @@ export default component$(() => {
3935
<p>No other stuff is needed here</p>
4036
</div>
4137
</Checkbox.Root>
42-
</Checklist>
38+
</Checklist.Root>
4339
</>
4440
);
4541
});

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list-true.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import {
3-
CheckboxIndicator,
4-
Checkbox,
5-
ChecklistIndicator,
6-
Checklist,
7-
} from 'packages/kit-headless/src/components/checkbox/index';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
83
// this test basically ensures that the sig passed to the checklist controlls trumps all its children
94
export default component$(() => {
105
const checklistSig = useSignal(true);
116
return (
127
<>
138
<h3 id="test123">Pick a cat</h3>
14-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
9+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1510
<Checkbox.Root
1611
class="flex items-center gap-3 bg-slate-900 text-white"
1712
checklist={true}
@@ -43,7 +38,7 @@ export default component$(() => {
4338
<p>Im a true.tsx</p>
4439
</div>
4540
</Checkbox.Root>
46-
</Checklist>
41+
</Checklist.Root>
4742
<p>You signal is: </p>
4843
<p id="signal-to-text">{`${checklistSig.value}`}</p>
4944
</>

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list-trues.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
import { Checklist } from 'packages/kit-headless/src/components/checkbox/checklist';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
53
export default component$(() => {
64
const firstUserSig = useSignal(true);
75
const secondUserSig = useSignal(true);
86
return (
97
<>
108
<h3 id="test123">Pick a cat</h3>
11-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
9+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1210
<Checkbox.Root
1311
class="flex items-center gap-3 bg-slate-900 p-2 text-white"
1412
checklist={true}
@@ -32,7 +30,7 @@ export default component$(() => {
3230
<p>No other stuff is needed here</p>
3331
</div>
3432
</Checkbox.Root>
35-
</Checklist>
33+
</Checklist.Root>
3634
</>
3735
);
3836
});

apps/website/src/routes/docs/headless/checkbox/examples/test-controlled-list.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
import { Checklist } from 'packages/kit-headless/src/components/checkbox/checklist';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
53
export default component$(() => {
64
const firstUserSig = useSignal(true);
75
const secondUserSig = useSignal(true);
86
return (
97
<>
108
<h3 id="test123">Pick a cat</h3>
11-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
9+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1210
<Checkbox.Root
1311
class="flex items-center gap-3 bg-slate-900 p-2 text-white"
1412
checklist={true}
@@ -32,7 +30,7 @@ export default component$(() => {
3230
<p>No other stuff is needed here</p>
3331
</div>
3432
</Checkbox.Root>
35-
</Checklist>
33+
</Checklist.Root>
3634
</>
3735
);
3836
});

apps/website/src/routes/docs/headless/checkbox/examples/test-default.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
53
export default component$(() => {
64
return (
75
<>

apps/website/src/routes/docs/headless/checkbox/examples/test-hero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
2+
import { Checkbox } from '@qwik-ui/headless';
43

54
export default component$(() => {
65
const userSig = useSignal(true);
6+
import { Checkbox, Checklist } from '@qwik-ui/headless';
77
return (
88
<>
99
<Checkbox.Root class="bg-slate-900 text-white" checkBoxSig={userSig}>

apps/website/src/routes/docs/headless/checkbox/examples/test-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default component$(() => {
44
return (
55
<>
66
<h3 id="test123">Pick a cat</h3>
7-
7+
import {(Checkbox, Checklist)} from '@qwik-ui/headless';
88
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
99
<Checkbox.Root
1010
class="flex items-center gap-3 bg-slate-900 p-2 text-white"

apps/website/src/routes/docs/headless/checkbox/examples/test-props-ids-list.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { component$, useSignal, useStyles$ } from '@builder.io/qwik';
2-
import { CheckboxIndicator } from 'packages/kit-headless/src/components/checkbox/checkbox-indicator';
3-
import { Checkbox } from 'packages/kit-headless/src/components/checkbox/checkbox';
4-
import { Checklist } from 'packages/kit-headless/src/components/checkbox/checklist';
2+
import { Checkbox, Checklist } from '@qwik-ui/headless';
53
export default component$(() => {
64
const firstUserSig = useSignal(true);
75
const secondUserSig = useSignal(true);
6+
import { Checkbox, Checklist } from '@qwik-ui/headless';
87
return (
98
<>
109
<h3 id="test123">Pick a cat</h3>
11-
<Checklist class="flex flex-col gap-3" ariaLabeledBy="test123">
10+
<Checklist.Root class="flex flex-col gap-3" ariaLabeledBy="test123">
1211
<Checkbox.Root
1312
class="flex items-center gap-3 bg-slate-900 p-2 text-white"
1413
checklist={true}
@@ -34,7 +33,7 @@ export default component$(() => {
3433
<p>Second child</p>
3534
</div>
3635
</Checkbox.Root>
37-
</Checklist>
36+
</Checklist.Root>
3837
</>
3938
);
4039
});

0 commit comments

Comments
 (0)