File tree Expand file tree Collapse file tree 12 files changed +34
-53
lines changed
apps/website/src/routes/docs/headless/checkbox/examples
packages/kit-headless/src/components/checklist Expand file tree Collapse file tree 12 files changed +34
-53
lines changed Original file line number Diff line number Diff line change 1
1
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' ;
8
3
// TODO: add logic to handle user passed sigs with trues
9
4
// this test basically ensures that the sig passed to the checklist controlls trumps all its children
10
5
export default component$ ( ( ) => {
11
6
const checklistSig = useSignal ( false ) ;
12
7
return (
13
8
< >
14
9
< 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" >
16
11
< Checkbox . Root
17
12
class = "flex items-center gap-3 bg-slate-900 text-white"
18
13
checklist = { true }
@@ -44,7 +39,7 @@ export default component$(() => {
44
39
< p > Im a true.tsx</ p >
45
40
</ div >
46
41
</ Checkbox . Root >
47
- </ Checklist >
42
+ </ Checklist . Root >
48
43
< p > You signal is: </ p >
49
44
< p id = "signal-to-text" > { `${ checklistSig . value } ` } </ p >
50
45
</ >
Original file line number Diff line number Diff line change 1
1
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' ;
5
3
export default component$ ( ( ) => {
6
4
const firstUserSig = useSignal ( false ) ;
7
5
const secondUserSig = useSignal ( false ) ;
8
6
return (
9
7
< >
10
8
< 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" >
12
10
< Checkbox . Root
13
11
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
14
12
checklist = { true }
@@ -32,7 +30,7 @@ export default component$(() => {
32
30
< p > No other stuff is needed here</ p >
33
31
</ div >
34
32
</ Checkbox . Root >
35
- </ Checklist >
33
+ </ Checklist . Root >
36
34
</ >
37
35
) ;
38
36
} ) ;
Original file line number Diff line number Diff line change 1
1
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' ;
6
3
export default component$ ( ( ) => {
7
4
const firstUserSig = useSignal ( false ) ;
8
5
const secondUserSig = useSignal ( true ) ;
9
6
return (
10
7
< >
11
8
< 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" >
13
10
< Checkbox . Root
14
11
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
15
12
checklist = { true }
@@ -18,7 +15,6 @@ export default component$(() => {
18
15
< div q :slot = "checkbox" id = "true-img" >
19
16
✅
20
17
</ div >
21
-
22
18
< div q :slot = "checklist" id = "mixed-img" >
23
19
➖
24
20
</ div >
@@ -39,7 +35,7 @@ export default component$(() => {
39
35
< p > No other stuff is needed here</ p >
40
36
</ div >
41
37
</ Checkbox . Root >
42
- </ Checklist >
38
+ </ Checklist . Root >
43
39
</ >
44
40
) ;
45
41
} ) ;
Original file line number Diff line number Diff line change 1
1
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' ;
8
3
// this test basically ensures that the sig passed to the checklist controlls trumps all its children
9
4
export default component$ ( ( ) => {
10
5
const checklistSig = useSignal ( true ) ;
11
6
return (
12
7
< >
13
8
< 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" >
15
10
< Checkbox . Root
16
11
class = "flex items-center gap-3 bg-slate-900 text-white"
17
12
checklist = { true }
@@ -43,7 +38,7 @@ export default component$(() => {
43
38
< p > Im a true.tsx</ p >
44
39
</ div >
45
40
</ Checkbox . Root >
46
- </ Checklist >
41
+ </ Checklist . Root >
47
42
< p > You signal is: </ p >
48
43
< p id = "signal-to-text" > { `${ checklistSig . value } ` } </ p >
49
44
</ >
Original file line number Diff line number Diff line change 1
1
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' ;
5
3
export default component$ ( ( ) => {
6
4
const firstUserSig = useSignal ( true ) ;
7
5
const secondUserSig = useSignal ( true ) ;
8
6
return (
9
7
< >
10
8
< 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" >
12
10
< Checkbox . Root
13
11
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
14
12
checklist = { true }
@@ -32,7 +30,7 @@ export default component$(() => {
32
30
< p > No other stuff is needed here</ p >
33
31
</ div >
34
32
</ Checkbox . Root >
35
- </ Checklist >
33
+ </ Checklist . Root >
36
34
</ >
37
35
) ;
38
36
} ) ;
Original file line number Diff line number Diff line change 1
1
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' ;
5
3
export default component$ ( ( ) => {
6
4
const firstUserSig = useSignal ( true ) ;
7
5
const secondUserSig = useSignal ( true ) ;
8
6
return (
9
7
< >
10
8
< 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" >
12
10
< Checkbox . Root
13
11
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
14
12
checklist = { true }
@@ -32,7 +30,7 @@ export default component$(() => {
32
30
< p > No other stuff is needed here</ p >
33
31
</ div >
34
32
</ Checkbox . Root >
35
- </ Checklist >
33
+ </ Checklist . Root >
36
34
</ >
37
35
) ;
38
36
} ) ;
Original file line number Diff line number Diff line change 1
1
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' ;
5
3
export default component$ ( ( ) => {
6
4
return (
7
5
< >
Original file line number Diff line number Diff line change 1
1
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' ;
4
3
5
4
export default component$ ( ( ) => {
6
5
const userSig = useSignal ( true ) ;
6
+ import { Checkbox , Checklist } from '@qwik-ui/headless' ;
7
7
return (
8
8
< >
9
9
< Checkbox . Root class = "bg-slate-900 text-white" checkBoxSig = { userSig } >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export default component$(() => {
4
4
return (
5
5
< >
6
6
< h3 id = "test123" > Pick a cat</ h3 >
7
-
7
+ import { ( Checkbox , Checklist ) } from '@qwik-ui/headless';
8
8
< Checklist . Root class = "flex flex-col gap-3" ariaLabeledBy = "test123" >
9
9
< Checkbox . Root
10
10
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
Original file line number Diff line number Diff line change 1
1
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' ;
5
3
export default component$ ( ( ) => {
6
4
const firstUserSig = useSignal ( true ) ;
7
5
const secondUserSig = useSignal ( true ) ;
6
+ import { Checkbox , Checklist } from '@qwik-ui/headless' ;
8
7
return (
9
8
< >
10
9
< 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" >
12
11
< Checkbox . Root
13
12
class = "flex items-center gap-3 bg-slate-900 p-2 text-white"
14
13
checklist = { true }
@@ -34,7 +33,7 @@ export default component$(() => {
34
33
< p > Second child</ p >
35
34
</ div >
36
35
</ Checkbox . Root >
37
- </ Checklist >
36
+ </ Checklist . Root >
38
37
</ >
39
38
) ;
40
39
} ) ;
You can’t perform that action at this time.
0 commit comments