Skip to content

Commit 28dd588

Browse files
authored
feat: add material package (#105)
* feat: add material package * fix: add remove material style dynamically * isolate material style
1 parent 816fa37 commit 28dd588

File tree

20 files changed

+9451
-11
lines changed

20 files changed

+9451
-11
lines changed

package-lock.json

Lines changed: 67 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/material/.eslintrc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": [
3+
"../../.eslintrc.json",
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:qwik/recommended"
7+
],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"project": ["packages/material/tsconfig.*?.json"],
11+
"ecmaVersion": 2021,
12+
"sourceType": "module",
13+
"ecmaFeatures": {
14+
"jsx": true
15+
}
16+
},
17+
"plugins": ["@typescript-eslint"],
18+
"ignorePatterns": ["!**/*"],
19+
"overrides": [
20+
{
21+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
22+
"rules": {}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"rules": {}
27+
},
28+
{
29+
"files": ["*.js", "*.jsx"],
30+
"rules": {}
31+
}
32+
]
33+
}

packages/material/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Qwik UI - Material

packages/material/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "@qwik-ui/theme-material",
3+
"version": "0.0.0",
4+
"description": "Qwik UI components library - Material theme",
5+
"publishConfig": {
6+
"access": "public"
7+
},
8+
"main": "./lib/index.qwik.cjs",
9+
"qwik": "./lib/index.qwik.mjs",
10+
"module": "./lib/index.qwik.mjs",
11+
"types": "./lib-types/packages/core/src/index.d.ts",
12+
"type": "module",
13+
"exports": {
14+
".": {
15+
"import": "./lib/index.qwik.mjs",
16+
"require": "./lib/index.qwik.cjs"
17+
}
18+
},
19+
"files": [
20+
"lib",
21+
"lib-types"
22+
],
23+
"engines": {
24+
"node": ">=16.0.0"
25+
},
26+
"private": false,
27+
"scripts": {
28+
"build": "qwik build",
29+
"build.lib": "vite build --mode lib",
30+
"build.types": "tsc --emitDeclarationOnly",
31+
"dev": "vite --mode ssr",
32+
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
33+
"fmt": "prettier --write .",
34+
"fmt.check": "prettier --check .",
35+
"release": "np",
36+
"start": "vite --open --mode ssr",
37+
"qwik": "qwik"
38+
},
39+
"dependencies": {}
40+
}

packages/material/project.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "material",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "packages/material/src",
5+
"projectType": "library",
6+
"targets": {
7+
"build": {
8+
"executor": "@nrwl/vite:build",
9+
"outputs": ["{options.outputPath}"],
10+
"defaultConfiguration": "production",
11+
"options": {
12+
"outputPath": "dist/packages/material",
13+
"mode": "lib"
14+
},
15+
"configurations": {
16+
"development": {},
17+
"production": {}
18+
}
19+
},
20+
"test": {
21+
"executor": "@nrwl/vite:test",
22+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
23+
"options": {
24+
"passWithNoTests": true
25+
}
26+
},
27+
"lint": {
28+
"executor": "@nrwl/linter:eslint",
29+
"outputs": ["{options.outputFile}"],
30+
"options": {
31+
"lintFilePatterns": ["packages/material/**/*.{ts,tsx,js,jsx}"]
32+
}
33+
}
34+
},
35+
"tags": []
36+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { component$, QwikIntrinsicElements, Slot } from '@builder.io/qwik';
2+
import { Button as HeadlessButton } from '@qwik-ui/headless';
3+
4+
export type ButtonProps = QwikIntrinsicElements['button'];
5+
6+
export const Button = component$(
7+
(props: ButtonProps) => {
8+
return (
9+
<HeadlessButton class="waves-effect waves-light btn-large" {...props}>
10+
<Slot />
11+
</HeadlessButton>
12+
);
13+
}
14+
);

packages/material/src/index.ts

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

packages/material/tsconfig.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"allowJs": true,
5+
"target": "ES2017",
6+
"module": "ES2020",
7+
"lib": ["es2020", "DOM", "WebWorker", "DOM.Iterable"],
8+
"jsx": "react-jsx",
9+
"jsxImportSource": "@builder.io/qwik",
10+
"forceConsistentCasingInFileNames": true,
11+
"strict": true,
12+
"noImplicitReturns": true,
13+
"noFallthroughCasesInSwitch": true,
14+
"resolveJsonModule": true,
15+
"moduleResolution": "node",
16+
"esModuleInterop": true,
17+
"skipLibCheck": true,
18+
"incremental": true,
19+
"isolatedModules": true,
20+
"outDir": "tmp",
21+
"noEmit": true
22+
},
23+
"files": [],
24+
"include": [],
25+
"references": [
26+
{
27+
"path": "./tsconfig.lib.json"
28+
},
29+
{
30+
"path": "./tsconfig.spec.json"
31+
}
32+
]
33+
}

packages/material/tsconfig.lib.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"types": ["node", "vite/client"]
6+
},
7+
"files": [],
8+
"exclude": [],
9+
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
10+
}

packages/material/tsconfig.spec.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"types": ["vitest/globals", "node"]
6+
},
7+
"include": [
8+
"vite.config.ts",
9+
"src/**/*.test.ts",
10+
"src/**/*.spec.ts",
11+
"src/**/*.test.tsx",
12+
"src/**/*.spec.tsx",
13+
"src/**/*.test.js",
14+
"src/**/*.spec.js",
15+
"src/**/*.test.jsx",
16+
"src/**/*.spec.jsx",
17+
"src/**/*.d.ts"
18+
]
19+
}

0 commit comments

Comments
 (0)