@perfect-design/ui 0.1.4 → 0.1.7
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 +86 -0
- package/package.json +21 -1
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @perfect-design/ui
|
|
2
|
+
|
|
3
|
+
Vue 3 component library for the Perfect Design system: tokens, primitives, forms, overlays,
|
|
4
|
+
navigation, data display, marketing sections and charts. Runtime dependencies are only
|
|
5
|
+
**reka-ui** and **tailwind-merge**; peers are **vue**, **pinia** and **tailwindcss** (Tailwind 4).
|
|
6
|
+
|
|
7
|
+
- Docs, every component with live examples: <https://perfect-design.raczylo.com>
|
|
8
|
+
- Source and releases: <https://github.com/lukaszraczylo/perfect-design>
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
GitHub Releases are the primary channel; the npm registry mirrors the same build.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
pnpm add @perfect-design/ui
|
|
16
|
+
pnpm add pinia tailwindcss vue # peers the package does not bundle
|
|
17
|
+
pnpm add @fortawesome/free-solid-svg-icons # optional: icon data for <Icon>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Prefer a GitHub Release tarball? Every tag attaches one:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pnpm add https://github.com/lukaszraczylo/perfect-design/releases/download/v0.1.5/perfect-design-ui-0.1.5.tgz
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
/* src/style.css */
|
|
30
|
+
@import "tailwindcss";
|
|
31
|
+
@import "@perfect-design/ui/theme.css";
|
|
32
|
+
@import "@perfect-design/ui/themes/emerald.css"; /* optional accent preset */
|
|
33
|
+
@source "../node_modules/@perfect-design/ui/src"; /* Tailwind must scan the component classes */
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
// main.ts
|
|
38
|
+
import { createApp } from 'vue'
|
|
39
|
+
import { createPinia } from 'pinia'
|
|
40
|
+
import { useThemeStore } from '@perfect-design/ui'
|
|
41
|
+
import App from './App.vue'
|
|
42
|
+
import './style.css'
|
|
43
|
+
|
|
44
|
+
const app = createApp(App)
|
|
45
|
+
app.use(createPinia())
|
|
46
|
+
useThemeStore().init() // applies dark class and accent, persists the choice
|
|
47
|
+
app.mount('#app')
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Use
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<script setup lang="ts">
|
|
54
|
+
import { Button, Card, CardHeader, CardTitle, CardContent, Input, Field } from '@perfect-design/ui'
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<Card>
|
|
59
|
+
<CardHeader><CardTitle>Sign in</CardTitle></CardHeader>
|
|
60
|
+
<CardContent class="space-y-4">
|
|
61
|
+
<Field label="Email"><Input type="email" /></Field>
|
|
62
|
+
<Button class="w-full">Continue</Button>
|
|
63
|
+
</CardContent>
|
|
64
|
+
</Card>
|
|
65
|
+
</template>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Every component is customised the same way: pass classes (tailwind-merge resolves conflicts),
|
|
69
|
+
override CSS custom properties, or switch the whole surface with a style pack
|
|
70
|
+
(`useThemeStore().setStyle('editorial')`).
|
|
71
|
+
|
|
72
|
+
## What is inside
|
|
73
|
+
|
|
74
|
+
- `theme.css` — tokens (colour, type, radius, spacing) and five accent presets under `themes/`
|
|
75
|
+
- six style packs under `packs/` — workbench, tactile, editorial, raw, contrast, terminal
|
|
76
|
+
- components across primitives, typography, layout, forms, feedback, overlays, navigation,
|
|
77
|
+
data display (including charts) and marketing sections
|
|
78
|
+
- Pinia stores and composables for theme, motion and hotkeys
|
|
79
|
+
- a small Mermaid parser and renderer, no extra dependency
|
|
80
|
+
|
|
81
|
+
## Links
|
|
82
|
+
|
|
83
|
+
- [Getting started](https://perfect-design.raczylo.com/guides/getting-started)
|
|
84
|
+
- [Customisation contract](https://perfect-design.raczylo.com/guides/customisation)
|
|
85
|
+
- [Components](https://perfect-design.raczylo.com/components/)
|
|
86
|
+
- [Repository](https://github.com/lukaszraczylo/perfect-design)
|
package/package.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfect-design/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Universal Vue 3 + Tailwind 4 component library. Runtime deps: reka-ui, tailwind-merge; peers: vue, pinia, tailwindcss.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"vue3",
|
|
8
|
+
"component-library",
|
|
9
|
+
"design-system",
|
|
10
|
+
"tailwindcss",
|
|
11
|
+
"tailwind",
|
|
12
|
+
"ui",
|
|
13
|
+
"components",
|
|
14
|
+
"typescript",
|
|
15
|
+
"reka-ui",
|
|
16
|
+
"pinia",
|
|
17
|
+
"accessibility",
|
|
18
|
+
"a11y"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/lukaszraczylo/perfect-design.git",
|
|
23
|
+
"directory": "packages/ui"
|
|
24
|
+
},
|
|
5
25
|
"type": "module",
|
|
6
26
|
"sideEffects": [
|
|
7
27
|
"**/*.css"
|