@kayord/ui 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/package.json +17 -14
package/README.md
CHANGED
|
@@ -10,3 +10,94 @@ Pnpm command to install ui library.
|
|
|
10
10
|
# create a new project in the current directory
|
|
11
11
|
pnpm add -D @kayord/ui
|
|
12
12
|
```
|
|
13
|
+
|
|
14
|
+
### Manual Setup New Project
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Setup new sveltekit project
|
|
18
|
+
npm create svelte@latest my-app
|
|
19
|
+
|
|
20
|
+
npx svelte-add@latest tailwindcss
|
|
21
|
+
pnpm i
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Change tailwind config
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
// postcss.config.cjs
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
plugins: {
|
|
31
|
+
tailwindcss: {},
|
|
32
|
+
autoprefixer: {}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import type { Config } from "tailwindcss";
|
|
39
|
+
import { fontFamily } from "tailwindcss/defaultTheme";
|
|
40
|
+
import { kayordPlugin } from "@kayord/ui";
|
|
41
|
+
// import forms from '@tailwindcss/forms';
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
darkMode: ["class"],
|
|
45
|
+
content: ["./src/**/*.{html,js,svelte,ts}"],
|
|
46
|
+
theme: {
|
|
47
|
+
container: {
|
|
48
|
+
center: true,
|
|
49
|
+
padding: "2rem",
|
|
50
|
+
screens: {
|
|
51
|
+
"2xl": "1400px",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
extend: {
|
|
55
|
+
colors: {
|
|
56
|
+
border: "hsl(var(--border))",
|
|
57
|
+
input: "hsl(var(--input))",
|
|
58
|
+
ring: "hsl(var(--ring))",
|
|
59
|
+
background: "hsl(var(--background))",
|
|
60
|
+
foreground: "hsl(var(--foreground))",
|
|
61
|
+
primary: {
|
|
62
|
+
DEFAULT: "hsl(var(--primary))",
|
|
63
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
64
|
+
},
|
|
65
|
+
secondary: {
|
|
66
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
67
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
68
|
+
},
|
|
69
|
+
destructive: {
|
|
70
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
71
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
72
|
+
},
|
|
73
|
+
muted: {
|
|
74
|
+
DEFAULT: "hsl(var(--muted))",
|
|
75
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
76
|
+
},
|
|
77
|
+
accent: {
|
|
78
|
+
DEFAULT: "hsl(var(--accent))",
|
|
79
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
80
|
+
},
|
|
81
|
+
popover: {
|
|
82
|
+
DEFAULT: "hsl(var(--popover))",
|
|
83
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
84
|
+
},
|
|
85
|
+
card: {
|
|
86
|
+
DEFAULT: "hsl(var(--card))",
|
|
87
|
+
foreground: "hsl(var(--card-foreground))",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
borderRadius: {
|
|
91
|
+
lg: "var(--radius)",
|
|
92
|
+
md: "calc(var(--radius) - 2px)",
|
|
93
|
+
sm: "calc(var(--radius) - 4px)",
|
|
94
|
+
},
|
|
95
|
+
fontFamily: {
|
|
96
|
+
sans: [...fontFamily.sans],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
plugins: [kayordPlugin],
|
|
101
|
+
} satisfies Config;
|
|
102
|
+
|
|
103
|
+
```
|
package/dist/index.d.ts
CHANGED
|
@@ -33,3 +33,4 @@ export { Toggle } from "./components/ui/toggle";
|
|
|
33
33
|
export { Tooltip } from "./components/ui/tooltip";
|
|
34
34
|
export { Loader } from "./components/custom/loader";
|
|
35
35
|
export { ThemeSwitch } from "./components/custom/theme-switch";
|
|
36
|
+
export { kayordPlugin } from "./tailwind";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// Utils
|
|
1
2
|
export { cn, flyAndScale } from "./utils";
|
|
2
3
|
// ShadCN components
|
|
3
4
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/ui/accordion";
|
|
@@ -35,3 +36,5 @@ export { Tooltip } from "./components/ui/tooltip";
|
|
|
35
36
|
// Custom components
|
|
36
37
|
export { Loader } from "./components/custom/loader";
|
|
37
38
|
export { ThemeSwitch } from "./components/custom/theme-switch";
|
|
39
|
+
// Tailwind Plugin
|
|
40
|
+
export { kayordPlugin } from "./tailwind";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayord/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -16,36 +16,39 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"svelte": "^4.0.0"
|
|
18
18
|
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"bits-ui": "^0.5.7",
|
|
21
|
+
"clsx": "^2.0.0",
|
|
22
|
+
"formsnap": "^0.1.4",
|
|
23
|
+
"lucide-svelte": "^0.284.0"
|
|
24
|
+
},
|
|
19
25
|
"devDependencies": {
|
|
20
26
|
"@playwright/test": "^1.28.1",
|
|
21
27
|
"@sveltejs/adapter-auto": "^2.0.0",
|
|
22
28
|
"@sveltejs/kit": "^1.20.4",
|
|
23
29
|
"@sveltejs/package": "^2.0.0",
|
|
30
|
+
"@tailwindcss/forms": "^0.5.6",
|
|
24
31
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
25
32
|
"@typescript-eslint/parser": "^6.0.0",
|
|
26
33
|
"autoprefixer": "^10.4.14",
|
|
27
34
|
"eslint": "^8.28.0",
|
|
28
|
-
"eslint-config-prettier": "^
|
|
35
|
+
"eslint-config-prettier": "^9.0.0",
|
|
29
36
|
"eslint-plugin-svelte": "^2.30.0",
|
|
30
37
|
"postcss": "^8.4.24",
|
|
31
38
|
"postcss-load-config": "^4.0.1",
|
|
32
|
-
"prettier": "^
|
|
33
|
-
"prettier-plugin-svelte": "^
|
|
34
|
-
"publint": "^0.
|
|
39
|
+
"prettier": "^3.0.3",
|
|
40
|
+
"prettier-plugin-svelte": "^3.0.3",
|
|
41
|
+
"publint": "^0.2.3",
|
|
35
42
|
"svelte": "^4.0.5",
|
|
36
43
|
"svelte-check": "^3.4.3",
|
|
37
|
-
"tailwindcss": "^3.3.2",
|
|
38
|
-
"tslib": "^2.4.1",
|
|
39
|
-
"typescript": "^5.0.0",
|
|
40
|
-
"vite": "^4.4.2",
|
|
41
|
-
"vitest": "^0.32.2",
|
|
42
|
-
"bits-ui": "^0.5.7",
|
|
43
|
-
"clsx": "^2.0.0",
|
|
44
|
-
"formsnap": "^0.1.4",
|
|
45
|
-
"lucide-svelte": "^0.284.0",
|
|
46
44
|
"sveltekit-superforms": "^1.8.0",
|
|
47
45
|
"tailwind-merge": "^1.14.0",
|
|
48
46
|
"tailwind-variants": "^0.1.14",
|
|
47
|
+
"tailwindcss": "^3.3.2",
|
|
48
|
+
"tslib": "^2.4.1",
|
|
49
|
+
"typescript": "^5.0.0",
|
|
50
|
+
"vite": "^4.4.11",
|
|
51
|
+
"vitest": "^0.34.6",
|
|
49
52
|
"zod": "^3.22.4"
|
|
50
53
|
},
|
|
51
54
|
"svelte": "./dist/index.js",
|