@juxtui/ui 0.6.0 → 0.8.0

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 CHANGED
@@ -1,64 +1,216 @@
1
- # juxt.ui
2
-
3
- **Thoughtfully crafted components for Nuxt & Vue.**
4
-
5
- juxt.ui is a small component library that cares about the details you feel but rarely notice: how far a menu travels when it opens, where focus goes when a dialog closes, whether a loading button changes width, what happens when you press Escape with a select open inside a dialog.
6
-
7
- It is Multiple components, one token system and one motion language. It's mostly grayscale, and the green `#079D6B` is kept for state.
8
-
9
- ```vue
10
- <JButton>
11
- Save changes
12
- </JButton>
13
- ```
14
-
15
- ## Installation
16
-
17
- ```bash
18
- pnpm add @juxtui/ui
19
- ```
20
-
21
- **Nuxt**: add the module. Components, composables and styles are wired up for you.
22
-
23
- ```ts
24
- // nuxt.config.ts
25
- export default defineNuxtConfig({
26
- modules: ['@juxtui/ui/nuxt'],
27
- })
28
- ```
29
-
30
- **Vue**: import the stylesheet once, then import what you use.
31
-
32
- ```ts
33
- import '@juxtui/ui/style.css'
34
- import { JButton, toast } from '@juxtui/ui'
35
- ```
36
-
37
- Using Tailwind CSS v4? `@import '@juxtui/ui/tailwind.css'` maps the tokens onto utilities (`bg-surface`, `text-fg-muted`, `rounded-md`, `duration-fast`, …). juxt.ui's styles live in a `juxt` cascade layer, so your own classes always win.
38
-
39
- ## Components
40
-
41
- | | |
42
- | --- | --- |
43
- | **Actions** | Button |
44
- | **Forms** | Input · Textarea · Checkbox · Switch · Select |
45
- | **Overlays** | Dialog · Dropdown Menu · Tooltip · Command Palette |
46
- | **Feedback** | Toast · Badge |
47
- | **Display** | Avatar · Card |
48
- | **Navigation** | Tabs |
49
- | **Layout** | Navbar · Burger · Footer · Sidebar |
50
- | **Editor** | Rich text editor with toolbar, selection menu, slash commands and Markdown shortcuts, from `@juxtui/ui/editor` |
51
-
52
- Each one supports light and dark themes, full keyboard use, reduced motion and SSR. Its docs page lists the keys it handles and the ARIA it exposes.
53
-
54
- ## Design philosophy
55
-
56
- - **Quiet until it matters.** The interface is grayscale, and green marks state: focus, checked, success, where you are. Primary buttons use ink, not green.
57
- - **Motion is feedback.** There are four durations (80–240ms) and three curves, and only `transform` and `opacity` animate. Entrances are slower than exits. With reduced motion, things still fade but don't move.
58
- - **Accessible by construction.** Overlays trap focus, restore it when they close, and stack correctly: Escape and outside clicks go to the top-most layer only.
59
- - **Small APIs.** Props are named after what they do, and anything that holds state has a `v-model`. If you know one component, you know the rest.
60
- - **Tokens all the way down.** Colour, type, space, radius, elevation, motion and layering are CSS custom properties. Change `--juxt-accent` and the whole system follows.
61
-
62
- ## License
63
-
64
- MIT
1
+ # juxt.ui
2
+
3
+ **Thoughtfully crafted, accessible components for Nuxt & Vue.**
4
+
5
+ [Documentation](https://juliuss3722.github.io/juxt-library/) · [Playground](https://juliuss3722.github.io/juxt-library/playground/)
6
+
7
+ Build with JuxtUI, customize every component in the browser, and copy the generated Vue snippet directly into your project.
8
+
9
+ **44 components. One token system. One motion language.**
10
+
11
+ ```vue
12
+ <JButton>
13
+ Save changes
14
+ </JButton>
15
+ ```
16
+
17
+ ## Why juxt.ui?
18
+
19
+ juxt.ui is a small, polished component library for **Nuxt and Vue 3**.
20
+
21
+ It focuses on the details that make an interface feel good: predictable focus behavior, subtle motion, accessible interactions, consistent tokens, and APIs that stay small.
22
+
23
+ * **Nuxt-first** — automatic components, composables and styles
24
+ * **Accessible by construction** — keyboard navigation, focus management and ARIA patterns
25
+ * **SSR-safe** — designed for Nuxt SSR
26
+ * **Light & dark themes** — built in
27
+ * **Reduced motion** — respects user preferences
28
+ * **Small APIs** — consistent props and `v-model` state
29
+ * **Token-based** — colors, spacing, typography, radius, motion and layering
30
+ * **Tailwind CSS v4 support** — JuxtUI tokens map to utilities
31
+ * **Tree-shakable** — import what you use
32
+ * **MIT licensed**
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ pnpm add @juxtui/ui
38
+ ```
39
+
40
+ ### Nuxt
41
+
42
+ Add the JuxtUI module to your `nuxt.config.ts`:
43
+
44
+ ```ts
45
+ export default defineNuxtConfig({
46
+ modules: ['@juxtui/ui/nuxt'],
47
+ })
48
+ ```
49
+
50
+ Components, composables and styles are wired up automatically.
51
+
52
+ ```vue
53
+ <JButton>
54
+ Save changes
55
+ </JButton>
56
+ ```
57
+
58
+ ### Vue
59
+
60
+ Import the stylesheet once and import the components you use:
61
+
62
+ ```ts
63
+ import '@juxtui/ui/style.css'
64
+
65
+ import { JButton, toast } from '@juxtui/ui'
66
+ ```
67
+
68
+ ## Playground
69
+
70
+ ### Build it. Customize it. Copy the code.
71
+
72
+ The JuxtUI Playground lets you experiment with every component directly in the browser.
73
+
74
+ Change props, variants and content, see the result instantly, and copy the generated Vue snippet into your project.
75
+
76
+ **[Open the JuxtUI Playground →](https://juliuss3722.github.io/juxt-library/playground/)**
77
+
78
+ ## Documentation
79
+
80
+ Explore every component, its API, keyboard interactions, accessibility behavior and examples in the full documentation.
81
+
82
+ **[Read the documentation →](https://juliuss3722.github.io/juxt-library/)**
83
+
84
+ ## Tailwind CSS v4
85
+
86
+ Using Tailwind CSS v4?
87
+
88
+ Import the JuxtUI Tailwind entrypoint:
89
+
90
+ ```css
91
+ @import '@juxtui/ui/tailwind.css';
92
+ ```
93
+
94
+ JuxtUI maps its design tokens onto utilities such as:
95
+
96
+ ```text
97
+ bg-surface
98
+ text-fg-muted
99
+ rounded-md
100
+ duration-fast
101
+ ```
102
+
103
+ JuxtUI styles live in their own `juxt` cascade layer, so your application classes can override them naturally.
104
+
105
+ ## Components
106
+
107
+ | Category | Components |
108
+ | -------------- | ------------------------------------------------------------------------------------ |
109
+ | **Actions** | Button |
110
+ | **Forms** | Input · Textarea · Checkbox · Switch · Select |
111
+ | **Overlays** | Dialog · Dropdown Menu · Tooltip · Command Palette |
112
+ | **Feedback** | Toast · Badge |
113
+ | **Display** | Avatar · Card |
114
+ | **Navigation** | Tabs |
115
+ | **Layout** | Navbar · Burger · Footer · Sidebar |
116
+ | **Editor** | Rich text editor with toolbar, selection menu, slash commands and Markdown shortcuts |
117
+
118
+ Every component is designed with:
119
+
120
+ * Light and dark themes
121
+ * Keyboard interaction
122
+ * Reduced-motion support
123
+ * SSR compatibility
124
+ * Accessible focus management
125
+
126
+ See the documentation for component-specific keyboard shortcuts, ARIA behavior and examples.
127
+
128
+ ## Design philosophy
129
+
130
+ ### Quiet until it matters
131
+
132
+ The interface is primarily grayscale. Green `#079D6B` is reserved for state: focus, checked, success and context.
133
+
134
+ Primary actions use ink rather than turning the entire interface green.
135
+
136
+ ### Motion is feedback
137
+
138
+ JuxtUI uses four durations (80–240ms) and three motion curves.
139
+
140
+ Only `transform` and `opacity` are animated where possible. Entrances are slower than exits, and reduced-motion preferences are respected.
141
+
142
+ ### Accessible by construction
143
+
144
+ Overlays trap focus, restore it when they close, and stack predictably.
145
+
146
+ When multiple layers are open, Escape and outside clicks affect only the top-most layer.
147
+
148
+ ### Small APIs
149
+
150
+ Props describe what components do, and stateful components consistently use `v-model`.
151
+
152
+ If you know one JuxtUI component, the others should feel familiar.
153
+
154
+ ### Tokens all the way down
155
+
156
+ Color, typography, spacing, radius, elevation, motion and layering are exposed as CSS custom properties.
157
+
158
+ Change a token such as `--juxt-accent` and the system follows.
159
+
160
+ ## Editor
161
+
162
+ JuxtUI also includes a rich text editor with:
163
+
164
+ * Toolbar
165
+ * Selection menu
166
+ * Slash commands
167
+ * Markdown shortcuts
168
+ * Customizable extensions
169
+
170
+ Import it separately:
171
+
172
+ ```ts
173
+ import { JuxtEditor } from '@juxtui/ui/editor'
174
+ ```
175
+
176
+ ## Browser support
177
+
178
+ JuxtUI is built for modern browsers and Vue 3 applications.
179
+
180
+ Components are designed to work with both client-side Vue applications and Nuxt SSR.
181
+
182
+ ## Development
183
+
184
+ Clone the repository and install dependencies:
185
+
186
+ ```bash
187
+ pnpm install
188
+ ```
189
+
190
+ Run the documentation locally:
191
+
192
+ ```bash
193
+ pnpm dev
194
+ ```
195
+
196
+ Run tests:
197
+
198
+ ```bash
199
+ pnpm test
200
+ ```
201
+
202
+ Build the package:
203
+
204
+ ```bash
205
+ pnpm build
206
+ ```
207
+
208
+ ## Philosophy
209
+
210
+ juxt.ui intentionally favors **fewer, more polished components** over a large collection of loosely connected primitives.
211
+
212
+ Every component should feel like it belongs to the same system.
213
+
214
+ ## License
215
+
216
+ MIT