@juxtui/ui 0.7.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.
Files changed (2) hide show
  1. package/README.md +176 -24
  2. package/package.json +17 -4
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
- # juxt.ui | https://juliuss3722.github.io/juxt-library/
1
+ # juxt.ui
2
2
 
3
- **Thoughtfully crafted components for Nuxt & Vue.**
3
+ **Thoughtfully crafted, accessible components for Nuxt & Vue.**
4
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.
5
+ [Documentation](https://juliuss3722.github.io/juxt-library/) · [Playground](https://juliuss3722.github.io/juxt-library/playground/)
6
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.
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.**
8
10
 
9
11
  ```vue
10
12
  <JButton>
@@ -12,52 +14,202 @@ It is Multiple components, one token system and one motion language. It's mostly
12
14
  </JButton>
13
15
  ```
14
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
+
15
34
  ## Installation
16
35
 
17
36
  ```bash
18
37
  pnpm add @juxtui/ui
19
38
  ```
20
39
 
21
- **Nuxt**: add the module. Components, composables and styles are wired up for you.
40
+ ### Nuxt
41
+
42
+ Add the JuxtUI module to your `nuxt.config.ts`:
22
43
 
23
44
  ```ts
24
- // nuxt.config.ts
25
45
  export default defineNuxtConfig({
26
46
  modules: ['@juxtui/ui/nuxt'],
27
47
  })
28
48
  ```
29
49
 
30
- **Vue**: import the stylesheet once, then import what you use.
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:
31
61
 
32
62
  ```ts
33
63
  import '@juxtui/ui/style.css'
64
+
34
65
  import { JButton, toast } from '@juxtui/ui'
35
66
  ```
36
67
 
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.
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.
38
104
 
39
105
  ## Components
40
106
 
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` |
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
51
125
 
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.
126
+ See the documentation for component-specific keyboard shortcuts, ARIA behavior and examples.
53
127
 
54
128
  ## Design philosophy
55
129
 
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.
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.
61
213
 
62
214
  ## License
63
215
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@juxtui/ui",
3
- "version": "0.7.0",
4
- "description": "Thoughtfully crafted components for Nuxt & Vue.",
3
+ "version": "0.8.0",
4
+ "description": "Accessible, polished UI components for Nuxt & Vue 3.",
5
5
  "license": "MIT",
6
6
  "author": "Julius K.",
7
7
  "type": "module",
@@ -33,10 +33,23 @@
33
33
  ],
34
34
  "keywords": [
35
35
  "vue",
36
+ "vue3",
36
37
  "nuxt",
37
- "components",
38
+ "nuxt3",
39
+ "vue-components",
40
+ "nuxt-components",
41
+ "vue-ui",
42
+ "nuxt-ui",
43
+ "ui-library",
44
+ "component-library",
38
45
  "design-system",
39
- "ui"
46
+ "typescript",
47
+ "accessible",
48
+ "accessibility",
49
+ "a11y",
50
+ "tailwind",
51
+ "tailwindcss",
52
+ "dark-mode"
40
53
  ],
41
54
  "peerDependencies": {
42
55
  "@nuxt/kit": ">=3.15.0",