Skip to content

Commit f7116a7

Browse files
refactor(accordion): major accordion aria / functionality refactor
1 parent b225360 commit f7116a7

File tree

22 files changed

+915
-392
lines changed

22 files changed

+915
-392
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:8080",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

.vscode/qwik.code-snippets

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"Qwik component (simple)": {
3+
"scope": "javascriptreact,typescriptreact",
4+
"prefix": "qcomponent$",
5+
"description": "Simple Qwik component",
6+
"body": [
7+
"export const ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}} = component$(() => {",
8+
" return <${2:div}>$4</$2>",
9+
"});"
10+
]
11+
},
12+
"Qwik component (props)": {
13+
"scope": "typescriptreact",
14+
"prefix": "qcomponent$ + props",
15+
"description": "Qwik component w/ props",
16+
"body": [
17+
"export interface ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}}Props {",
18+
" $2",
19+
"}",
20+
"",
21+
"export const $1 = component$<$1Props>((props) => {",
22+
" const ${2:count} = useSignal(0);",
23+
" return (",
24+
" <${3:div} on${4:Click}$={(ev) => {$5}}>",
25+
" $6",
26+
" </${3}>",
27+
" );",
28+
"});"
29+
]
30+
},
31+
"Qwik signal": {
32+
"scope": "javascriptreact,typescriptreact",
33+
"prefix": "quseSignal",
34+
"description": "useSignal() declaration",
35+
"body": ["const ${1:foo} = useSignal($2);", "$0"]
36+
},
37+
"Qwik store": {
38+
"scope": "javascriptreact,typescriptreact",
39+
"prefix": "quseStore",
40+
"description": "useStore() declaration",
41+
"body": ["const ${1:state} = useStore({", " $2", "});", "$0"]
42+
},
43+
"$ hook": {
44+
"scope": "javascriptreact,typescriptreact",
45+
"prefix": "q$",
46+
"description": "$() function hook",
47+
"body": ["$(() => {", " $0", "});", ""]
48+
},
49+
"useVisibleTask": {
50+
"scope": "javascriptreact,typescriptreact",
51+
"prefix": "quseVisibleTask",
52+
"description": "useVisibleTask$() function hook",
53+
"body": ["useVisibleTask$(({ track }) => {", " $0", "});", ""]
54+
},
55+
"useTask": {
56+
"scope": "javascriptreact,typescriptreact",
57+
"prefix": "quseTask$",
58+
"description": "useTask$() function hook",
59+
"body": [
60+
"useTask$(({ track }) => {",
61+
" track(() => $1);",
62+
" $0",
63+
"});",
64+
""
65+
]
66+
},
67+
"useResource": {
68+
"scope": "javascriptreact,typescriptreact",
69+
"prefix": "quseResource$",
70+
"description": "useResource$() declaration",
71+
"body": [
72+
"const $1 = useResource$(({ track, cleanup }) => {",
73+
" $0",
74+
"});",
75+
""
76+
]
77+
}
78+
}

apps/website/postcss.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const path = require('path');
22

33
module.exports = {
44
plugins: {
5+
'tailwindcss/nesting': 'postcss-nested',
56
tailwindcss: {
67
config: path.join(__dirname, 'tailwind.config.cjs'),
78
},

apps/website/src/routes/docs.css

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
11
.docs {
2-
@apply lg:ml-80 w-full lg:max-w-4xl xl:max-w-6xl py-8 px-8 lg:px-16;
3-
}
4-
5-
.docs h1 {
6-
@apply text-5xl font-bold mb-12;
7-
}
8-
9-
.docs h2 {
10-
@apply text-3xl font-bold mt-20 mb-12 border-b-2;
11-
}
12-
13-
.docs h3 {
14-
@apply text-xl font-bold mb-6;
15-
}
16-
17-
.docs h4 {
18-
@apply text-lg mb-6;
19-
}
20-
21-
/* Styles Jack has added / will change */
22-
.docs a {
23-
@apply border-b-2 border-[#00B9FC] font-bold;
24-
}
25-
26-
/* adds sufficient padding to the table items */
27-
.docs td article {
28-
@apply pt-4 pb-4 mb-0;
29-
}
30-
31-
.docs p {
32-
@apply mb-4;
33-
}
34-
35-
.docs td p {
36-
@apply mb-0;
2+
& {
3+
@apply lg:ml-80 w-full lg:max-w-4xl xl:max-w-6xl py-8 px-8 lg:px-16;
4+
}
5+
6+
/*
7+
Styles that are direct descendents of .docs
8+
this should not affect the styles inside of the tabpanel
9+
A.K.A the components
10+
*/
11+
& > {
12+
p {
13+
@apply mb-4;
14+
}
15+
16+
h1 {
17+
@apply text-5xl font-bold mb-12;
18+
}
19+
20+
h2 {
21+
@apply text-3xl font-bold mt-20 mb-12 border-b-2;
22+
}
23+
24+
h3 {
25+
@apply text-xl font-bold mb-6;
26+
}
27+
28+
h4 {
29+
@apply text-lg mb-6;
30+
}
31+
32+
a {
33+
@apply border-b-2 border-[#00B9FC] font-bold;
34+
}
35+
}
36+
37+
/* adds sufficient padding to the table items / API Component */
38+
td article {
39+
@apply pt-4 pb-4 mb-0;
40+
}
41+
42+
td p {
43+
@apply mb-0;
44+
}
3745
}

0 commit comments

Comments
 (0)