Skip to content

Commit 2faf9a2

Browse files
shaireznaorpeledwmertensnsdonato
committed
feat(cva): added qwik cva package
Co-authored-by: Naor Peled <[email protected]> Co-authored-by: Wout Mertens <[email protected]> Co-authored-by: Noelia <[email protected]>
1 parent 5bd9c99 commit 2faf9a2

File tree

18 files changed

+3419
-783
lines changed

18 files changed

+3419
-783
lines changed

.verdaccio/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
logs:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

apps/website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "The Qwik UI Website",
44
"private": true,
55
"dependencies": {
6+
"@qwik-ui/cva": "workspace:*",
67
"@qwik-ui/headless": "workspace:*",
78
"@qwik-ui/tailwind": "workspace:*",
89
"@qwik-ui/material": "workspace:*",

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@k11r/nx-cloudflare-wrangler": "2.4.2",
3333
"@nx/cypress": "16.5.1",
3434
"@nx/eslint-plugin": "16.5.1",
35+
"@nx/js": "16.7.4",
3536
"@nx/linter": "16.5.1",
3637
"@nx/storybook": "16.5.1",
3738
"@nx/vite": "16.5.1",
@@ -54,13 +55,12 @@
5455
"@types/testing-library__jest-dom": "5.14.5",
5556
"@typescript-eslint/eslint-plugin": "5.62.0",
5657
"@typescript-eslint/parser": "5.62.0",
57-
"@vitest/coverage-c8": "0.31.0",
58-
"@vitest/ui": "0.31.0",
58+
"@vitest/coverage-c8": "~0.32.0",
59+
"@vitest/ui": "~0.32.0",
5960
"all-contributors-cli": "^6.24.0",
6061
"autoprefixer": "^10.4.13",
6162
"axe-core": "4.6.3",
6263
"chromatic": "6.17.3",
63-
"class-variance-authority": "0.7.0",
6464
"commitizen": "^4.3.0",
6565
"commitlint": "^17.4.3",
6666
"country-list-json": "1.1.0",
@@ -97,11 +97,12 @@
9797
"ts-node": "10.9.1",
9898
"typescript": "5.1.6",
9999
"undici": "5.22.1",
100+
"verdaccio": "^5.0.4",
100101
"vite": "4.4.0",
101102
"vite-plugin-dts": "2.3.0",
102103
"vite-plugin-eslint": "^1.8.1",
103104
"vite-tsconfig-paths": "4.2.0",
104-
"vitest": "0.31.0",
105+
"vitest": "~0.32.0",
105106
"wrangler": "3.2.0"
106107
},
107108
"config": {
@@ -116,5 +117,8 @@
116117
],
117118
"dependencies": {
118119
"tslib": "^2.3.0"
120+
},
121+
"nx": {
122+
"includedScripts": []
119123
}
120124
}

packages/cva/.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

packages/cva/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 HiRez.io, Qwikifiers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/cva/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Qwik cva
2+
3+
This is a version of the original code from [cva](https://cva.style/) but optimized for Qwik apps.
4+
5+
# License
6+
7+
MIT

packages/cva/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "@qwik-ui/cva",
3+
"version": "0.0.1",
4+
"dependencies": {},
5+
"main": "./index.js",
6+
"module": "./index.mjs",
7+
"typings": "./index.d.ts"
8+
}

packages/cva/project.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "cva",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "packages/cva/src",
5+
"projectType": "library",
6+
"targets": {
7+
"build": {
8+
"executor": "@nx/vite:build",
9+
"outputs": ["{options.outputPath}"],
10+
"options": {
11+
"outputPath": "dist/packages/cva"
12+
}
13+
},
14+
"test": {
15+
"executor": "@nx/vite:test",
16+
"outputs": ["coverage/packages/cva"],
17+
"options": {
18+
"passWithNoTests": true,
19+
"reportsDirectory": "../../coverage/packages/cva"
20+
}
21+
},
22+
"lint": {
23+
"executor": "@nx/linter:eslint",
24+
"outputs": ["{options.outputFile}"],
25+
"options": {
26+
"lintFilePatterns": ["packages/cva/**/*.ts"]
27+
}
28+
},
29+
"version-dry": {
30+
"executor": "@jscutlery/semver:version",
31+
"options": {
32+
"dryRun": true,
33+
"releaseAs": "patch"
34+
}
35+
},
36+
"version": {
37+
"executor": "@jscutlery/semver:version",
38+
"options": {
39+
"releaseAs": "patch"
40+
}
41+
},
42+
"version-publish": {
43+
"executor": "@jscutlery/semver:version",
44+
"options": {
45+
"noVerify": true,
46+
"push": true,
47+
"releaseAs": "patch",
48+
"postTargets": ["cva:publish", "cva:push-to-github"]
49+
}
50+
},
51+
"publish": {
52+
"executor": "ngx-deploy-npm:deploy",
53+
"options": {
54+
"access": "public"
55+
}
56+
},
57+
"push-to-github": {
58+
"executor": "@jscutlery/semver:github",
59+
"options": {
60+
"tag": "${tag}",
61+
"notes": "${notes}",
62+
"title": "@qwik-ui/cva@${version}"
63+
}
64+
}
65+
},
66+
"tags": []
67+
}

packages/cva/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lib/cva';

packages/cva/tsconfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"module": "commonjs",
5+
"forceConsistentCasingInFileNames": true,
6+
"strict": true,
7+
"noImplicitOverride": true,
8+
"noPropertyAccessFromIndexSignature": true,
9+
"noImplicitReturns": true,
10+
"noFallthroughCasesInSwitch": true,
11+
"types": ["vitest"]
12+
},
13+
"files": [],
14+
"include": [],
15+
"references": [
16+
{
17+
"path": "./tsconfig.lib.json"
18+
},
19+
{
20+
"path": "./tsconfig.spec.json"
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)