Skip to content
This repository was archived by the owner on Jul 25, 2023. It is now read-only.

Commit e665ba7

Browse files
committed
feat: tabs, tests and bumps
1 parent e120ad1 commit e665ba7

45 files changed

Lines changed: 2187 additions & 968 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ pnpm-debug.log*
2525

2626
# macOS-specific files
2727
.DS_Store
28+
29+
# coverage
30+
coverage/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ export function App() {
6969
- [ ] Slider
7070
- [ ] Snackbar
7171
- [x] Switch
72-
- [ ] Tabs
72+
- [x] Tabs
7373
- [x] Text Field
7474
- [ ] Time Fields
75-
- [ ] Top App Bar
75+
- [x] Top App Bar
7676

7777
### Library related
7878

apps/docs/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @solidjs-material/docs
22

3+
## 0.0.4
4+
5+
### Patch Changes
6+
7+
- Add tabs component
8+
Add tests
9+
Bump kobalte version
10+
Fix components interactions
11+
- Updated dependencies
12+
- @solidjs-material/core@0.0.10
13+
314
## 0.0.3
415

516
### Patch Changes

apps/docs/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solidjs-material/docs",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -13,18 +13,18 @@
1313
},
1414
"dependencies": {
1515
"@fontsource/poppins": "^4.5.10",
16-
"@solidjs-material/core": "workspace:^0.0.9",
16+
"@solidjs-material/core": "workspace:^0.0.10",
1717
"solid-icons": "^1.0.4",
18-
"solid-js": "^1.4.3",
19-
"tailwindcss": "^3.0.24"
18+
"solid-js": "^1.6.11",
19+
"tailwindcss": "^3.2.7"
2020
},
2121
"devDependencies": {
22-
"@astrojs/mdx": "^0.15.1",
23-
"@astrojs/solid-js": "^2.0.0",
24-
"@astrojs/tailwind": "^3.0.0",
25-
"@solidjs-material/configuration": "workspace:^0.0.5",
26-
"@solidjs-material/tailwind": "workspace:^0.0.5",
22+
"@astrojs/mdx": "^0.17.0",
23+
"@astrojs/solid-js": "^2.0.2",
24+
"@astrojs/tailwind": "^3.0.1",
25+
"@solidjs-material/configuration": "workspace:^0.0.6",
26+
"@solidjs-material/tailwind": "workspace:^0.0.6",
2727
"@tailwindcss/typography": "^0.5.9",
28-
"astro": "^2.0.4"
28+
"astro": "^2.0.14"
2929
}
3030
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { Tabs } from "@solidjs-material/core";
2+
import { AiOutlineCompass, AiOutlineShopping } from "solid-icons/ai";
3+
4+
export function BasicExample() {
5+
return (
6+
<Tabs.Root
7+
hasIcons
8+
items={() => (
9+
<>
10+
<Tabs.Item icon={() => <AiOutlineShopping />} value="shop">
11+
Shop
12+
</Tabs.Item>
13+
<Tabs.Item icon={() => <AiOutlineCompass />} value="explore">
14+
Explore
15+
</Tabs.Item>
16+
</>
17+
)}
18+
>
19+
<Tabs.Content value="shop">Shop content</Tabs.Content>
20+
<Tabs.Content value="explore">Explore content</Tabs.Content>
21+
</Tabs.Root>
22+
);
23+
}
24+
25+
export function WithoutIconsExample() {
26+
return (
27+
<Tabs.Root
28+
items={() => (
29+
<>
30+
<Tabs.Item value="shop">Shop</Tabs.Item>
31+
<Tabs.Item value="explore">Explore</Tabs.Item>
32+
</>
33+
)}
34+
>
35+
<Tabs.Content value="shop">Shop content</Tabs.Content>
36+
<Tabs.Content value="explore">Explore content</Tabs.Content>
37+
</Tabs.Root>
38+
);
39+
}
40+
41+
export function SecondaryExample() {
42+
return (
43+
<Tabs.Root
44+
variant="secondary"
45+
items={() => (
46+
<>
47+
<Tabs.Item value="shop">Shop</Tabs.Item>
48+
<Tabs.Item value="explore">Explore</Tabs.Item>
49+
</>
50+
)}
51+
>
52+
<Tabs.Content value="shop">Shop content</Tabs.Content>
53+
<Tabs.Content value="explore">Explore content</Tabs.Content>
54+
</Tabs.Root>
55+
);
56+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Tabs
3+
layout: ~/layouts/docs.astro
4+
---
5+
6+
import Playground from "~/components/playground.astro";
7+
import { BasicExample, WithoutIconsExample, SecondaryExample } from "~/components/examples/tabs";
8+
9+
# {frontmatter.title}
10+
11+
Tabs make it easy to explore and switch between different views.
12+
13+
## Basic usage
14+
15+
The `Tabs` comes with two variants: primary and secondary.
16+
17+
### Primary
18+
19+
With icons:
20+
21+
<Playground>
22+
<BasicExample client:load />
23+
</Playground>
24+
25+
Without icons:
26+
27+
<Playground>
28+
<WithoutIconsExample client:load />
29+
</Playground>
30+
31+
### Secondary
32+
33+
<Playground>
34+
<SecondaryExample client:load />
35+
</Playground>

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
"ci:publish": "turbo run lint build --filter=\"./packages/*\" && git status && changeset publish",
1616
"ci:version": "changeset version && pnpm install --no-frozen-lockfile && git add .",
1717
"dev": "turbo dev --parallel",
18-
"lint": "turbo lint"
18+
"lint": "turbo lint",
19+
"test": "turbo test"
1920
},
2021
"devDependencies": {
2122
"@changesets/cli": "^2.26.0",
22-
"prettier": "^2.8.3",
23+
"prettier": "^2.8.4",
2324
"prettier-plugin-astro": "^0.8.0",
24-
"prettier-plugin-packagejson": "^2.4.0",
25-
"turbo": "^1.7.0",
26-
"typescript": "^4.9.4"
25+
"prettier-plugin-packagejson": "^2.4.3",
26+
"turbo": "^1.8.1",
27+
"typescript": "^4.9.5"
2728
}
2829
}

packages/configuration/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @solidjs-material/configuration
22

3+
## 0.0.6
4+
5+
### Patch Changes
6+
7+
- Add tabs component
8+
Add tests
9+
Bump kobalte version
10+
Fix components interactions
11+
312
## 0.0.5
413

514
### Patch Changes

packages/configuration/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solidjs-material/configuration",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "Solid material base configuration",
55
"keywords": [],
66
"license": "MIT",
@@ -13,20 +13,21 @@
1313
"tsconfig.base.json",
1414
"eslint.base.cjs",
1515
"eslint.solid.cjs",
16-
"eslint.astro.cjs"
16+
"eslint.astro.cjs",
17+
"utils.ts"
1718
],
1819
"dependencies": {
19-
"@typescript-eslint/eslint-plugin": "^5.49.0",
20-
"@typescript-eslint/parser": "^5.49.0",
21-
"eslint": "^8.32.0",
20+
"@typescript-eslint/eslint-plugin": "^5.52.0",
21+
"@typescript-eslint/parser": "^5.52.0",
22+
"eslint": "^8.34.0",
2223
"eslint-config-airbnb-base": "^15.0.0",
2324
"eslint-config-airbnb-typescript": "^17.0.0",
2425
"eslint-config-prettier": "^8.6.0",
2526
"eslint-plugin-astro": "^0.23.0",
2627
"eslint-plugin-import": "^2.27.5",
2728
"eslint-plugin-prettier": "^4.2.1",
28-
"eslint-plugin-solid": "^0.9.3",
29-
"eslint-plugin-tailwindcss": "^3.8.2"
29+
"eslint-plugin-solid": "^0.10.0",
30+
"eslint-plugin-tailwindcss": "^3.9.0"
3031
},
3132
"publishConfig": {
3233
"access": "public"

packages/configuration/tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"importsNotUsedAsValues": "error",
88
"noEmit": true,
99
"esModuleInterop": true,
10+
"skipLibCheck": true,
1011
"allowJs": true,
1112
"strict": true
1213
}

0 commit comments

Comments
 (0)