nuxt-ui-ink 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 miguilim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,107 @@
1
- # Temporary Holding Version
1
+ # nuxt-ui-ink
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A theme for [Nuxt UI](https://ui.nuxt.com) 4, as a Nuxt layer. Monochrome, with one blue accent, in light and dark.
4
+
5
+ Surfaces have no border: a card, a field or a menu is drawn by a half-pixel line and a small shadow. The primary
6
+ button is a dark chip. A focused field darkens its edge instead of growing a ring.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install nuxt-ui-ink
12
+ ```
13
+
14
+ `nuxt.config.ts`
15
+
16
+ ```ts
17
+ export default defineNuxtConfig({
18
+ extends: ['nuxt-ui-ink'],
19
+ css: ['~/assets/css/main.css']
20
+ })
21
+ ```
22
+
23
+ `app/assets/css/main.css`
24
+
25
+ ```css
26
+ @import "tailwindcss";
27
+ @import "@nuxt/ui";
28
+ @import "nuxt-ui-ink/theme.css";
29
+ ```
30
+
31
+ The layer adds the Nuxt UI module, the component overrides, Hugeicons for the icons Nuxt UI renders itself, and the
32
+ Inter font. The stylesheet has to be imported from yours so Tailwind compiles both together.
33
+
34
+ ## Classes
35
+
36
+ | Class | Use |
37
+ | --- | --- |
38
+ | `bg-page` | The gray page behind cards. Already set on `body`. |
39
+ | `bg-stage` | A well inside a card, such as the area behind a picture. |
40
+ | `bg-raised` | A surface on a tinted track, such as the knob of a segmented control. |
41
+ | `ring-stroke`, `border-stroke`, `divide-stroke` | Lines between things. |
42
+ | `ring-edge`, `border-edge` | A firmer line, as on a checkbox. |
43
+ | `shadow-card`, `shadow-card-hover` | A surface at rest and hovered. |
44
+ | `shadow-focus` | A focused field. |
45
+ | `shadow-lift` | A hovered card that links somewhere. |
46
+ | `shadow-pop`, `shadow-dialog` | Menus and popovers; dialogs. |
47
+ | `rounded-card`, `rounded-dialog` | 10px and 14px, between Nuxt UI's steps. |
48
+ | `btn-ink` | A gradient button with a beveled edge: `<UButton class="btn-ink" />`. |
49
+ | `hero-glow`, `dot-grid` | Backdrops for a hero. |
50
+ | `scrollbar-none`, `scrollbar-thin` | Scrolling rows and panels. |
51
+
52
+ ## Customizing
53
+
54
+ Colors, shadows and the radius are CSS variables. Set them after the import:
55
+
56
+ ```css
57
+ :root {
58
+ --ui-radius: 0.375rem;
59
+ --ink-page: #fafafa;
60
+ }
61
+
62
+ .dark {
63
+ --ink-page: #000;
64
+ }
65
+ ```
66
+
67
+ `theme.css` lists all of them.
68
+
69
+ Component overrides are in the layer's `app/app.config.ts`. Your own `app.config.ts` is merged over it:
70
+
71
+ ```ts
72
+ export default defineAppConfig({
73
+ ui: {
74
+ colors: { secondary: 'violet', info: 'violet' },
75
+ card: { slots: { body: 'p-6' } }
76
+ }
77
+ })
78
+ ```
79
+
80
+ ## Notes
81
+
82
+ - `bg-elevated` and `bg-accented` are translucent (black at 4% and 7% in light mode), so they show on the gray page
83
+ and on white cards alike. Two of them stacked get darker, and they do not hide what is behind them. Use
84
+ `bg-(--ink-solid)` where that matters.
85
+ - The half-pixel lines are sharp on high-density screens and can look softer on a 1x display.
86
+ - Component sizes are Nuxt UI's own. Only color, shape and shadow change.
87
+
88
+ ## Development
89
+
90
+ ```sh
91
+ pnpm install
92
+ pnpm dev # playground on http://localhost:4310
93
+ pnpm test
94
+ pnpm typecheck
95
+ pnpm preview # the production build, in the Workers runtime
96
+ pnpm deploy # build and publish the showcase to Cloudflare Workers
97
+ ```
98
+
99
+ The playground is also the showcase site: a landing page, the components in groups under `/components`, and a page
100
+ per overlay where it is already open (`/open/modal`, `/open/toast`, `/open/dropdown` and so on).
101
+
102
+ `pnpm test` checks every component, slot and variant name in the overrides against the themes Nuxt UI generates, so a
103
+ renamed slot in a new Nuxt UI version fails the test instead of silently styling nothing.
104
+
105
+ ## License
106
+
107
+ MIT
@@ -0,0 +1,750 @@
1
+ /*
2
+ * The theme's component overrides. A project that extends the layer can override any of it in its own app.config:
3
+ * Nuxt merges the two, the project's values last.
4
+ *
5
+ * Surfaces have no border here: their edge is the half-pixel line in their shadow (`shadow-card`, `shadow-pop`).
6
+ */
7
+
8
+ /** What holds content: a card and its relatives */
9
+ const surface = 'ring-0 shadow-card'
10
+
11
+ /** What floats over the page: menus, popovers, toasts */
12
+ const pop = 'bg-default ring-0 shadow-pop rounded-xl'
13
+
14
+ /** A menu row lights up at the full tint; half of it would not show */
15
+ const row = 'before:rounded-lg data-highlighted:not-data-disabled:before:bg-elevated'
16
+ const rowByState = 'data-highlighted:before:bg-elevated data-[state=open]:before:bg-elevated'
17
+
18
+ /** A field at rest and hovered */
19
+ const field = 'bg-default ring-0 shadow-card hover:shadow-card-hover disabled:shadow-card'
20
+ const fieldSoft = 'bg-elevated hover:bg-accented focus:bg-accented has-focus:bg-accented'
21
+ const fieldSubtle = 'ring-stroke'
22
+
23
+ /** A focused field darkens its edge; it gets no ring and no halo */
24
+ const focus = { color: 'primary' as const, variant: 'outline' as const, class: 'outline-0 focus-visible:outline-0 focus-visible:shadow-focus' }
25
+ const focusWithin = { color: 'primary' as const, variant: 'outline' as const, class: 'outline-0 has-focus-visible:outline-0 has-focus-visible:shadow-focus' }
26
+
27
+ /** A tag inside a field */
28
+ const tag = 'rounded-sm ring-0 bg-accented'
29
+
30
+ /** A chosen option shown as a card or a table row: a quiet tint and a firmer edge */
31
+ const chosen = 'has-data-[state=checked]:bg-muted has-data-[state=checked]:border-edge'
32
+
33
+ /** What dims the page behind a dialog */
34
+ const scrim = 'bg-(--ink-scrim)'
35
+
36
+ /** The four ways a block can be drawn, for the components that share them */
37
+ const blocks = {
38
+ outline: { root: surface },
39
+ soft: { root: 'bg-elevated' },
40
+ subtle: { root: 'bg-elevated ring-stroke' }
41
+ }
42
+
43
+ /** Thin lines inside a menu */
44
+ const line = 'bg-(--ink-stroke)'
45
+
46
+ export default defineAppConfig({
47
+ ui: {
48
+ colors: {
49
+ primary: 'neutral',
50
+ secondary: 'azure',
51
+ info: 'azure',
52
+ success: 'emerald',
53
+ warning: 'amber',
54
+ error: 'rose',
55
+ neutral: 'neutral'
56
+ },
57
+
58
+ // The theme's own shadows and radii replace Nuxt UI's when both are on an element
59
+ tv: {
60
+ twMergeConfig: {
61
+ extend: {
62
+ classGroups: {
63
+ shadow: [{ shadow: ['card', 'card-hover', 'focus', 'lift', 'pop', 'dialog', 'knob'] }],
64
+ rounded: [{ rounded: ['card', 'dialog'] }]
65
+ }
66
+ }
67
+ }
68
+ },
69
+
70
+ // Hugeicons (stroke rounded) for every icon the library renders on its own
71
+ icons: {
72
+ arrowDown: 'i-hugeicons-arrow-down-02',
73
+ arrowLeft: 'i-hugeicons-arrow-left-02',
74
+ arrowRight: 'i-hugeicons-arrow-right-02',
75
+ arrowUp: 'i-hugeicons-arrow-up-02',
76
+ caution: 'i-hugeicons-alert-circle',
77
+ check: 'i-hugeicons-tick-02',
78
+ chevronDoubleLeft: 'i-hugeicons-arrow-left-double',
79
+ chevronDoubleRight: 'i-hugeicons-arrow-right-double',
80
+ chevronDown: 'i-hugeicons-arrow-down-01',
81
+ chevronLeft: 'i-hugeicons-arrow-left-01',
82
+ chevronRight: 'i-hugeicons-arrow-right-01',
83
+ chevronUp: 'i-hugeicons-arrow-up-01',
84
+ close: 'i-hugeicons-cancel-01',
85
+ copy: 'i-hugeicons-copy-01',
86
+ copyCheck: 'i-hugeicons-checkmark-circle-02',
87
+ dark: 'i-hugeicons-moon-02',
88
+ drag: 'i-hugeicons-drag-drop-vertical',
89
+ edit: 'i-hugeicons-pencil-edit-01',
90
+ ellipsis: 'i-hugeicons-more-horizontal',
91
+ error: 'i-hugeicons-cancel-circle',
92
+ external: 'i-hugeicons-arrow-up-right-01',
93
+ eye: 'i-hugeicons-view',
94
+ eyeOff: 'i-hugeicons-view-off',
95
+ file: 'i-hugeicons-file-01',
96
+ folder: 'i-hugeicons-folder-01',
97
+ folderOpen: 'i-hugeicons-folder-open',
98
+ hash: 'i-hugeicons-grid',
99
+ info: 'i-hugeicons-information-circle',
100
+ light: 'i-hugeicons-sun-03',
101
+ loading: 'i-hugeicons-loading-03',
102
+ menu: 'i-hugeicons-menu-01',
103
+ minus: 'i-hugeicons-minus-sign',
104
+ panelClose: 'i-hugeicons-sidebar-left-01',
105
+ panelOpen: 'i-hugeicons-sidebar-left',
106
+ plus: 'i-hugeicons-plus-sign',
107
+ reload: 'i-hugeicons-refresh',
108
+ search: 'i-hugeicons-search-01',
109
+ star: 'i-hugeicons-star',
110
+ stop: 'i-hugeicons-stop',
111
+ success: 'i-hugeicons-checkmark-circle-02',
112
+ system: 'i-hugeicons-computer',
113
+ tip: 'i-hugeicons-idea-01',
114
+ trash: 'i-hugeicons-delete-02',
115
+ upload: 'i-hugeicons-upload-01',
116
+ warning: 'i-hugeicons-alert-02'
117
+ },
118
+
119
+ /* ── Elements ─────────────────────────────────────────────────────────────────────────────────────────── */
120
+
121
+ button: {
122
+ slots: {
123
+ base: 'font-medium transition-[background-color,color,box-shadow,scale] active:scale-[0.98]'
124
+ },
125
+ compoundVariants: [
126
+ // A dark chip
127
+ { color: 'primary', variant: 'solid', class: 'hover:bg-primary/90 active:bg-primary/90' },
128
+ // White, drawn by its shadow
129
+ { color: 'neutral', variant: 'outline', class: 'bg-default text-highlighted ring-0 shadow-card hover:bg-default hover:shadow-card-hover active:bg-default focus-visible:ring-0' },
130
+ { color: 'neutral', variant: 'soft', class: 'bg-elevated text-highlighted hover:bg-accented active:bg-accented' },
131
+ { color: 'neutral', variant: 'subtle', class: 'bg-elevated text-highlighted ring-stroke hover:bg-accented' },
132
+ // A muted label until hovered
133
+ { color: 'neutral', variant: 'ghost', class: 'text-toned hover:text-highlighted hover:bg-elevated active:bg-elevated' }
134
+ ]
135
+ },
136
+
137
+ badge: {
138
+ slots: {
139
+ base: 'rounded-sm font-medium'
140
+ },
141
+ compoundVariants: [
142
+ { color: 'neutral', variant: 'outline', class: 'bg-default text-toned ring-0 shadow-card' },
143
+ { color: 'neutral', variant: 'soft', class: 'bg-accented text-toned' },
144
+ { color: 'neutral', variant: 'subtle', class: 'bg-elevated text-toned ring-stroke' }
145
+ ]
146
+ },
147
+
148
+ kbd: {
149
+ compoundVariants: [
150
+ { color: 'neutral', variant: 'outline', class: 'bg-accented text-toned ring-0' },
151
+ { color: 'neutral', variant: 'subtle', class: 'bg-elevated text-toned ring-stroke' }
152
+ ]
153
+ },
154
+
155
+ card: {
156
+ slots: {
157
+ root: 'rounded-card',
158
+ header: 'p-4 sm:px-5',
159
+ body: 'p-4 sm:p-5',
160
+ footer: 'p-4 sm:px-5'
161
+ },
162
+ variants: {
163
+ variant: {
164
+ outline: { root: `${surface} divide-stroke` },
165
+ soft: { root: 'bg-elevated divide-stroke' },
166
+ subtle: { root: 'bg-elevated ring-stroke divide-stroke' }
167
+ }
168
+ }
169
+ },
170
+
171
+ alert: {
172
+ slots: {
173
+ root: 'rounded-card',
174
+ title: 'font-medium'
175
+ },
176
+ compoundVariants: [
177
+ { color: 'neutral', variant: 'outline', class: { root: surface } },
178
+ { color: 'neutral', variant: 'soft', class: { root: 'bg-elevated' } },
179
+ { color: 'neutral', variant: 'subtle', class: { root: 'bg-elevated ring-stroke' } }
180
+ ]
181
+ },
182
+
183
+ avatar: {
184
+ slots: {
185
+ root: 'bg-(--ink-solid)',
186
+ fallback: 'text-toned'
187
+ }
188
+ },
189
+
190
+ empty: {
191
+ slots: {
192
+ root: 'rounded-card'
193
+ },
194
+ variants: {
195
+ variant: blocks
196
+ }
197
+ },
198
+
199
+ skeleton: {
200
+ base: 'bg-accented'
201
+ },
202
+
203
+ progress: {
204
+ slots: {
205
+ base: 'bg-accented'
206
+ }
207
+ },
208
+
209
+ progressGroup: {
210
+ slots: {
211
+ base: 'bg-accented'
212
+ }
213
+ },
214
+
215
+ carousel: {
216
+ slots: {
217
+ dot: 'size-2 bg-(--ink-track) data-[state=active]:bg-inverted'
218
+ }
219
+ },
220
+
221
+ /* ── Forms ────────────────────────────────────────────────────────────────────────────────────────────── */
222
+
223
+ input: {
224
+ slots: {
225
+ base: 'transition-[box-shadow,background-color]'
226
+ },
227
+ variants: {
228
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
229
+ },
230
+ compoundVariants: [focus]
231
+ },
232
+
233
+ textarea: {
234
+ slots: {
235
+ base: 'transition-[box-shadow,background-color]'
236
+ },
237
+ variants: {
238
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
239
+ },
240
+ compoundVariants: [focus]
241
+ },
242
+
243
+ inputNumber: {
244
+ slots: {
245
+ base: 'transition-[box-shadow,background-color]'
246
+ },
247
+ variants: {
248
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
249
+ },
250
+ compoundVariants: [focus]
251
+ },
252
+
253
+ pinInput: {
254
+ slots: {
255
+ base: 'transition-[box-shadow,background-color]'
256
+ },
257
+ variants: {
258
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
259
+ },
260
+ compoundVariants: [focus]
261
+ },
262
+
263
+ inputTags: {
264
+ slots: {
265
+ base: 'transition-[box-shadow,background-color]',
266
+ item: tag
267
+ },
268
+ variants: {
269
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
270
+ },
271
+ compoundVariants: [focusWithin]
272
+ },
273
+
274
+ inputDate: {
275
+ slots: {
276
+ base: 'transition-[box-shadow,background-color]'
277
+ },
278
+ variants: {
279
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
280
+ },
281
+ compoundVariants: [focusWithin]
282
+ },
283
+
284
+ inputTime: {
285
+ slots: {
286
+ base: 'transition-[box-shadow,background-color]'
287
+ },
288
+ variants: {
289
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
290
+ },
291
+ compoundVariants: [focusWithin]
292
+ },
293
+
294
+ inputMenu: {
295
+ slots: {
296
+ base: 'transition-[box-shadow,background-color]',
297
+ content: pop,
298
+ item: row,
299
+ separator: line,
300
+ tagsItem: tag
301
+ },
302
+ variants: {
303
+ variant: { outline: field, soft: fieldSoft, subtle: fieldSubtle }
304
+ },
305
+ compoundVariants: [focusWithin]
306
+ },
307
+
308
+ select: {
309
+ slots: {
310
+ base: 'transition-[box-shadow,background-color]',
311
+ content: pop,
312
+ item: row,
313
+ separator: line
314
+ },
315
+ variants: {
316
+ variant: { outline: `${field} hover:bg-default`, soft: fieldSoft, subtle: fieldSubtle }
317
+ },
318
+ compoundVariants: [focus]
319
+ },
320
+
321
+ selectMenu: {
322
+ slots: {
323
+ base: 'transition-[box-shadow,background-color]',
324
+ content: pop,
325
+ item: row,
326
+ separator: line,
327
+ input: 'border-stroke'
328
+ },
329
+ variants: {
330
+ variant: { outline: `${field} hover:bg-default`, soft: fieldSoft, subtle: fieldSubtle }
331
+ },
332
+ compoundVariants: [focus]
333
+ },
334
+
335
+ checkbox: {
336
+ slots: {
337
+ base: 'rounded-[4.5px] bg-default ring-edge'
338
+ },
339
+ variants: {
340
+ variant: {
341
+ card: { root: 'rounded-card bg-default border-stroke shadow-card' }
342
+ }
343
+ },
344
+ compoundVariants: [
345
+ { color: 'primary', variant: 'card', class: { root: chosen } }
346
+ ]
347
+ },
348
+
349
+ checkboxGroup: {
350
+ variants: {
351
+ variant: {
352
+ table: { item: 'bg-default border-stroke' }
353
+ }
354
+ },
355
+ compoundVariants: [
356
+ { color: 'primary', variant: 'table', class: { item: chosen } }
357
+ ]
358
+ },
359
+
360
+ radioGroup: {
361
+ slots: {
362
+ base: 'bg-default ring-edge'
363
+ },
364
+ variants: {
365
+ variant: {
366
+ card: { item: 'rounded-card bg-default border-stroke shadow-card' },
367
+ table: { item: 'bg-default border-stroke' }
368
+ }
369
+ },
370
+ compoundVariants: [
371
+ { color: 'primary', variant: ['card', 'table'], class: { item: chosen } }
372
+ ]
373
+ },
374
+
375
+ switch: {
376
+ slots: {
377
+ base: 'data-[state=unchecked]:bg-(--ink-track)',
378
+ thumb: 'shadow-knob'
379
+ }
380
+ },
381
+
382
+ slider: {
383
+ slots: {
384
+ track: 'bg-(--ink-track)',
385
+ thumb: 'bg-white ring-0 shadow-knob'
386
+ }
387
+ },
388
+
389
+ fileUpload: {
390
+ slots: {
391
+ base: 'rounded-card border-accented',
392
+ file: 'rounded-lg'
393
+ }
394
+ },
395
+
396
+ listbox: {
397
+ slots: {
398
+ root: `rounded-card bg-default ${surface}`,
399
+ input: 'border-stroke',
400
+ item: row,
401
+ separator: line
402
+ }
403
+ },
404
+
405
+ colorPicker: {
406
+ slots: {
407
+ selectorThumb: 'shadow-knob',
408
+ trackThumb: 'shadow-knob'
409
+ }
410
+ },
411
+
412
+ /* ── Data ─────────────────────────────────────────────────────────────────────────────────────────────── */
413
+
414
+ table: {
415
+ slots: {
416
+ th: 'text-xs font-medium text-muted uppercase tracking-wide',
417
+ tbody: 'divide-stroke'
418
+ }
419
+ },
420
+
421
+ // A chart's readout is a small popover, not one of the dark hints below
422
+ chart: {
423
+ slots: {
424
+ tooltip: 'bg-raised text-default ring-0 shadow-pop rounded-lg gap-0.5 px-3 py-2'
425
+ }
426
+ },
427
+
428
+ accordion: {
429
+ slots: {
430
+ item: 'border-stroke',
431
+ trigger: 'text-highlighted'
432
+ }
433
+ },
434
+
435
+ timeline: {
436
+ slots: {
437
+ separator: 'bg-accented'
438
+ }
439
+ },
440
+
441
+ tree: {
442
+ slots: {
443
+ listWithChildren: 'border-stroke'
444
+ },
445
+ compoundVariants: [
446
+ { selected: false, disabled: false, class: { link: 'hover:before:bg-elevated' } }
447
+ ]
448
+ },
449
+
450
+ user: {
451
+ slots: {
452
+ name: 'font-medium text-highlighted'
453
+ }
454
+ },
455
+
456
+ /* ── Navigation ───────────────────────────────────────────────────────────────────────────────────────── */
457
+
458
+ // Pill tabs as a segmented control: a raised knob on a tinted track
459
+ tabs: {
460
+ compoundVariants: [
461
+ {
462
+ color: ['primary', 'neutral'],
463
+ variant: 'pill',
464
+ class: {
465
+ list: 'bg-elevated',
466
+ indicator: 'bg-raised shadow-card',
467
+ trigger: 'data-[state=active]:text-highlighted data-[state=inactive]:text-toned'
468
+ }
469
+ }
470
+ ]
471
+ },
472
+
473
+ navigationMenu: {
474
+ slots: {
475
+ viewport: 'ring-0 shadow-pop rounded-xl',
476
+ separator: line,
477
+ childLink: 'before:rounded-lg'
478
+ },
479
+ variants: {
480
+ active: {
481
+ false: {
482
+ childLink: 'hover:before:bg-elevated'
483
+ }
484
+ }
485
+ },
486
+ compoundVariants: [
487
+ { disabled: false, active: false, variant: 'pill', class: { link: 'hover:before:bg-elevated' } },
488
+ { disabled: false, variant: 'pill', highlight: false, active: false, orientation: 'horizontal', class: { link: 'data-[state=open]:before:bg-elevated' } }
489
+ ]
490
+ },
491
+
492
+ stepper: {
493
+ slots: {
494
+ separator: 'bg-accented'
495
+ }
496
+ },
497
+
498
+ header: {
499
+ slots: {
500
+ root: 'bg-page/75 backdrop-blur-xl border-b border-stroke'
501
+ }
502
+ },
503
+
504
+ footer: {
505
+ slots: {
506
+ root: 'border-t border-stroke'
507
+ }
508
+ },
509
+
510
+ /* ── Overlays ─────────────────────────────────────────────────────────────────────────────────────────── */
511
+
512
+ dropdownMenu: {
513
+ slots: {
514
+ content: pop,
515
+ item: 'before:rounded-lg',
516
+ input: 'border-stroke',
517
+ separator: line
518
+ },
519
+ variants: {
520
+ active: {
521
+ false: { item: rowByState }
522
+ }
523
+ }
524
+ },
525
+
526
+ contextMenu: {
527
+ slots: {
528
+ content: pop,
529
+ item: 'before:rounded-lg',
530
+ separator: line
531
+ },
532
+ variants: {
533
+ active: {
534
+ false: { item: rowByState }
535
+ }
536
+ }
537
+ },
538
+
539
+ popover: {
540
+ slots: {
541
+ content: pop
542
+ }
543
+ },
544
+
545
+ // The one dark surface: a hint reads as a label, not as a panel
546
+ tooltip: {
547
+ slots: {
548
+ content: 'bg-inverted/92 text-inverted ring-0 shadow-[0_4px_12px_-4px_rgb(0_0_0/0.24)] rounded-md backdrop-blur-sm'
549
+ }
550
+ },
551
+
552
+ modal: {
553
+ slots: {
554
+ content: 'divide-stroke',
555
+ title: 'font-medium'
556
+ },
557
+ variants: {
558
+ fullscreen: {
559
+ false: { content: 'rounded-dialog ring-0 shadow-dialog' }
560
+ },
561
+ overlay: {
562
+ true: { overlay: scrim }
563
+ }
564
+ }
565
+ },
566
+
567
+ slideover: {
568
+ slots: {
569
+ overlay: scrim,
570
+ content: 'divide-stroke sm:ring-0 sm:shadow-dialog',
571
+ title: 'font-medium'
572
+ }
573
+ },
574
+
575
+ drawer: {
576
+ slots: {
577
+ overlay: scrim,
578
+ content: 'ring-0 shadow-dialog',
579
+ title: 'font-medium'
580
+ }
581
+ },
582
+
583
+ toast: {
584
+ slots: {
585
+ root: 'ring-0 shadow-pop rounded-xl'
586
+ }
587
+ },
588
+
589
+ commandPalette: {
590
+ slots: {
591
+ root: 'divide-stroke',
592
+ item: row
593
+ }
594
+ },
595
+
596
+ /* ── Page building blocks ─────────────────────────────────────────────────────────────────────────────── */
597
+
598
+ pageCard: {
599
+ slots: {
600
+ root: 'rounded-card'
601
+ },
602
+ variants: {
603
+ variant: blocks
604
+ }
605
+ },
606
+
607
+ pageCTA: {
608
+ variants: {
609
+ variant: blocks
610
+ }
611
+ },
612
+
613
+ pageHeader: {
614
+ slots: {
615
+ root: 'border-stroke'
616
+ }
617
+ },
618
+
619
+ blogPost: {
620
+ slots: {
621
+ root: 'rounded-card'
622
+ },
623
+ variants: {
624
+ variant: blocks
625
+ }
626
+ },
627
+
628
+ pricingPlan: {
629
+ slots: {
630
+ root: 'rounded-card'
631
+ },
632
+ variants: {
633
+ variant: blocks
634
+ }
635
+ },
636
+
637
+ pricingTable: {
638
+ slots: {
639
+ item: 'rounded-card bg-default border-stroke shadow-card',
640
+ th: 'border-stroke',
641
+ td: 'border-stroke'
642
+ }
643
+ },
644
+
645
+ changelogVersion: {
646
+ slots: {
647
+ footer: 'border-stroke',
648
+ dot: 'ring-0 shadow-card'
649
+ }
650
+ },
651
+
652
+ /* ── Dashboard ────────────────────────────────────────────────────────────────────────────────────────── */
653
+
654
+ dashboardNavbar: {
655
+ slots: {
656
+ root: 'border-stroke'
657
+ }
658
+ },
659
+
660
+ dashboardToolbar: {
661
+ slots: {
662
+ root: 'border-stroke'
663
+ }
664
+ },
665
+
666
+ dashboardPanel: {
667
+ slots: {
668
+ root: 'lg:not-last:border-stroke'
669
+ }
670
+ },
671
+
672
+ sidebar: {
673
+ slots: {
674
+ inner: 'divide-stroke'
675
+ },
676
+ variants: {
677
+ variant: {
678
+ floating: { inner: 'rounded-xl ring-0 shadow-pop' }
679
+ }
680
+ }
681
+ },
682
+
683
+ /* ── Chat and editor ──────────────────────────────────────────────────────────────────────────────────── */
684
+
685
+ chatPrompt: {
686
+ slots: {
687
+ root: 'rounded-xl'
688
+ },
689
+ variants: {
690
+ variant: {
691
+ outline: { root: `bg-default ${surface}` },
692
+ soft: { root: 'bg-elevated' },
693
+ subtle: { root: 'bg-elevated ring-stroke' }
694
+ }
695
+ }
696
+ },
697
+
698
+ chatAttachment: {
699
+ variants: {
700
+ variant: {
701
+ card: { root: 'border-stroke shadow-card' }
702
+ }
703
+ }
704
+ },
705
+
706
+ chatTool: {
707
+ variants: {
708
+ variant: {
709
+ card: { root: `rounded-lg ${surface}` }
710
+ }
711
+ }
712
+ },
713
+
714
+ chatPalette: {
715
+ slots: {
716
+ prompt: 'border-stroke'
717
+ }
718
+ },
719
+
720
+ editorEmojiMenu: {
721
+ slots: {
722
+ content: pop,
723
+ item: 'before:rounded-lg',
724
+ separator: line
725
+ }
726
+ },
727
+
728
+ editorMentionMenu: {
729
+ slots: {
730
+ content: pop,
731
+ item: 'before:rounded-lg',
732
+ separator: line
733
+ }
734
+ },
735
+
736
+ editorSuggestionMenu: {
737
+ slots: {
738
+ content: pop,
739
+ item: 'before:rounded-lg',
740
+ separator: line
741
+ }
742
+ },
743
+
744
+ editorToolbar: {
745
+ slots: {
746
+ separator: line
747
+ }
748
+ }
749
+ }
750
+ })
package/nuxt.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ // The layer: `extends: ['nuxt-ui-ink']` in a project's nuxt.config, plus one line in its stylesheet
2
+ // (`@import "nuxt-ui-ink/theme.css";` after the Tailwind and Nuxt UI imports).
3
+ export default defineNuxtConfig({
4
+ modules: ['@nuxt/ui'],
5
+
6
+ $meta: {
7
+ name: 'nuxt-ui-ink'
8
+ },
9
+
10
+ // The theme is set in Inter at medium weights; Nuxt UI's font module fetches and self-hosts it
11
+ fonts: {
12
+ families: [
13
+ { name: 'Inter', weights: [400, 500, 600, 700], global: true }
14
+ ]
15
+ }
16
+ })
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "nuxt-ui-ink",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "A monochrome theme for Nuxt UI, as a Nuxt layer.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "miguilim",
8
+ "homepage": "https://nuxt-ui-ink.miguilim.workers.dev",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/miguilimzero/nuxt-ui-ink.git"
12
+ },
13
+ "bugs": "https://github.com/miguilimzero/nuxt-ui-ink/issues",
14
+ "keywords": [
15
+ "nuxt",
16
+ "nuxt-ui",
17
+ "nuxt-layer",
18
+ "theme",
19
+ "tailwindcss"
20
+ ],
21
+ "main": "./nuxt.config.ts",
22
+ "exports": {
23
+ ".": "./nuxt.config.ts",
24
+ "./theme.css": "./theme.css"
25
+ },
26
+ "files": [
27
+ "app",
28
+ "nuxt.config.ts",
29
+ "theme.css"
30
+ ],
31
+ "scripts": {
32
+ "dev": "nuxt dev playground --port 4310",
33
+ "build": "nuxt build playground",
34
+ "prepare:playground": "nuxt prepare playground",
35
+ "typecheck": "nuxt typecheck playground",
36
+ "test": "nuxt prepare playground && vitest run",
37
+ "deploy": "nuxt build playground && wrangler deploy --cwd playground",
38
+ "preview": "nuxt build playground && wrangler dev --cwd playground --port 4310"
39
+ },
40
+ "dependencies": {
41
+ "@iconify-json/hugeicons": "^1.2.36"
42
+ },
43
+ "peerDependencies": {
44
+ "@nuxt/ui": "^4.13.0",
45
+ "nuxt": "^4.0.0",
46
+ "tailwindcss": "^4.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "@iconify-json/simple-icons": "^1.2.104",
50
+ "@internationalized/date": "^3.8.0",
51
+ "@nuxt/ui": "^4.13.0",
52
+ "nuxt": "^4.6.3",
53
+ "tailwindcss": "^4.3.3",
54
+ "typescript": "^6.0.3",
55
+ "vitest": "^5.1.1",
56
+ "vue-tsc": "^3.3.13",
57
+ "wrangler": "^4.169.0"
58
+ }
59
+ }
package/theme.css ADDED
@@ -0,0 +1,247 @@
1
+ /*
2
+ * nuxt-ui-ink
3
+ *
4
+ * Import after Tailwind and Nuxt UI:
5
+ *
6
+ * @import "tailwindcss";
7
+ * @import "@nuxt/ui";
8
+ * @import "nuxt-ui-ink/theme.css";
9
+ *
10
+ * Every value below is a CSS variable, so a project overrides what it wants after the import.
11
+ */
12
+
13
+ /* The component overrides live in the layer's app.config; their classes are picked up from here */
14
+ @source "./app/app.config.ts";
15
+
16
+ @theme static {
17
+ --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
18
+
19
+ /* The accent, used as Nuxt UI's `secondary` and `info` colors */
20
+ --color-azure-50: #f0f8fd;
21
+ --color-azure-100: #e0f0fa;
22
+ --color-azure-200: #bbe1f5;
23
+ --color-azure-300: #7fc8ec;
24
+ --color-azure-400: #3dabe0;
25
+ --color-azure-500: #1d93d2;
26
+ --color-azure-600: #1176b0;
27
+ --color-azure-700: #0f5e8e;
28
+ --color-azure-800: #114f75;
29
+ --color-azure-900: #144362;
30
+ --color-azure-950: #0d2b41;
31
+
32
+ /* Colors Nuxt UI has no token for: `bg-page`, `bg-stage`, `bg-raised`, `ring-stroke`, `ring-edge`… */
33
+ --color-page: var(--ink-page);
34
+ --color-stage: var(--ink-stage);
35
+ --color-raised: var(--ink-raised);
36
+ --color-stroke: var(--ink-stroke);
37
+ --color-edge: var(--ink-edge);
38
+
39
+ /* `rounded-card` and `rounded-dialog` sit between Nuxt UI's steps */
40
+ --radius-card: calc(var(--ui-radius) * 2.5);
41
+ --radius-dialog: calc(var(--ui-radius) * 3.5);
42
+
43
+ --shadow-card: var(--ink-shadow-card);
44
+ --shadow-card-hover: var(--ink-shadow-card-hover);
45
+ --shadow-focus: var(--ink-shadow-focus);
46
+ --shadow-lift: var(--ink-shadow-lift);
47
+ --shadow-pop: var(--ink-shadow-pop);
48
+ --shadow-dialog: var(--ink-shadow-dialog);
49
+ --shadow-knob: var(--ink-shadow-knob);
50
+
51
+ --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
52
+ --default-transition-duration: 140ms;
53
+ --default-transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
54
+ }
55
+
56
+ /* Light */
57
+ :root {
58
+ /* Buttons and fields 6px (md), menu rows 8px (lg), cards 10px, menus 12px (xl), dialogs 14px */
59
+ --ui-radius: 0.25rem;
60
+
61
+ --ui-primary: #1f1f1f;
62
+
63
+ --ui-text-dimmed: #a3a3a3;
64
+ --ui-text-muted: #737373;
65
+ --ui-text-toned: #636363;
66
+ --ui-text: #1f1f1f;
67
+ --ui-text-highlighted: #0a0a0a;
68
+ --ui-text-inverted: #fcfcfc;
69
+
70
+ --ui-bg: #fff;
71
+ --ui-bg-muted: #fafafa;
72
+ /* The two tints are ink at a low opacity, so they show on the gray page as well as on a white card */
73
+ --ui-bg-elevated: rgb(0 0 0 / 0.04);
74
+ --ui-bg-accented: rgb(0 0 0 / 0.07);
75
+ --ui-bg-inverted: #18181b;
76
+
77
+ --ui-border: rgb(0 0 0 / 0.08);
78
+ --ui-border-muted: rgb(0 0 0 / 0.06);
79
+ --ui-border-accented: rgb(0 0 0 / 0.16);
80
+ --ui-border-inverted: #18181b;
81
+
82
+ /* Chart lines: ink first, then hues ordered so neighbors stay apart for color-blind readers */
83
+ --ui-chart-1: #1f1f1f;
84
+ --ui-chart-2: #1d93d2;
85
+ --ui-chart-3: #be123c;
86
+ --ui-chart-4: #c2710c;
87
+ --ui-chart-5: #8b5cf6;
88
+ --ui-chart-6: #0a8f67;
89
+
90
+ /* The page behind cards, and a well inside one */
91
+ --ink-page: #f5f5f5;
92
+ --ink-stage: #fafafa;
93
+ /* A surface on top of a tinted track: the knob of a segmented control */
94
+ --ink-raised: #fff;
95
+ /* A tint that hides what is under it: avatars that overlap */
96
+ --ink-solid: #f0f0f0;
97
+ /* Lines between things, and the firmer edge of a checkbox */
98
+ --ink-stroke: rgb(0 0 0 / 0.07);
99
+ --ink-edge: rgb(0 0 0 / 0.18);
100
+ /* A switch that is off */
101
+ --ink-track: rgb(0 0 0 / 0.12);
102
+ /* What dims the page behind a dialog */
103
+ --ink-scrim: rgb(0 0 0 / 0.16);
104
+
105
+ /* A surface is drawn by its shadow: a half-pixel edge and a small drop, no border */
106
+ --ink-shadow-card: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 1px 1px -1px rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.05);
107
+ --ink-shadow-card-hover: 0 0 0 0.5px rgb(0 0 0 / 0.13), 0 1px 1px -1px rgb(0 0 0 / 0.12), 0 1px 2px 0 rgb(0 0 0 / 0.06);
108
+ --ink-shadow-focus: 0 0 0 1px rgb(0 0 0 / 0.28), 0 1px 2px 0 rgb(0 0 0 / 0.06);
109
+ --ink-shadow-lift: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 2px 6px -1px rgb(0 0 0 / 0.08), 0 1px 2px 0 rgb(0 0 0 / 0.05);
110
+ --ink-shadow-pop: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 12px 32px -8px rgb(0 0 0 / 0.16);
111
+ --ink-shadow-dialog: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 24px 48px -12px rgb(0 0 0 / 0.22), 0 4px 12px -4px rgb(0 0 0 / 0.06);
112
+ --ink-shadow-knob: 0 1px 2px rgb(0 0 0 / 0.18), 0 0 0 0.5px rgb(0 0 0 / 0.04);
113
+
114
+ /* The optional gradient button (`btn-ink`) */
115
+ --ink-btn-top: #323137;
116
+ --ink-btn-bottom: #201e25;
117
+ --ink-btn-top-hover: #3c3b42;
118
+ --ink-btn-bottom-hover: #29272f;
119
+ --ink-btn-edge-1: #4b4951;
120
+ --ink-btn-edge-2: #31303a;
121
+ --ink-btn-edge-3: #18171b;
122
+ --ink-btn-ring: #0d0d0d;
123
+ --ink-btn-text: #fafafa;
124
+ }
125
+
126
+ /* Dark */
127
+ .dark {
128
+ --ui-primary: #e8e8e8;
129
+
130
+ --ui-text-dimmed: #6b6b70;
131
+ --ui-text-muted: #8f8f93;
132
+ --ui-text-toned: #a6a6aa;
133
+ --ui-text: #e6e6e6;
134
+ --ui-text-highlighted: #f5f5f5;
135
+ --ui-text-inverted: #161618;
136
+
137
+ --ui-bg: #1c1c1e;
138
+ --ui-bg-muted: #202022;
139
+ --ui-bg-elevated: rgb(255 255 255 / 0.06);
140
+ --ui-bg-accented: rgb(255 255 255 / 0.1);
141
+ --ui-bg-inverted: #f4f4f5;
142
+
143
+ --ui-border: rgb(255 255 255 / 0.09);
144
+ --ui-border-muted: rgb(255 255 255 / 0.06);
145
+ --ui-border-accented: rgb(255 255 255 / 0.2);
146
+ --ui-border-inverted: #f4f4f5;
147
+
148
+ --ui-chart-1: #e8e8e8;
149
+ --ui-chart-2: #3dabe0;
150
+ --ui-chart-3: #fb7185;
151
+ --ui-chart-4: #fbbf24;
152
+ --ui-chart-5: #a78bfa;
153
+ --ui-chart-6: #34d399;
154
+
155
+ --ink-page: #111113;
156
+ --ink-stage: #161618;
157
+ --ink-raised: #2c2c2f;
158
+ --ink-solid: #2c2c2f;
159
+ --ink-stroke: rgb(255 255 255 / 0.08);
160
+ --ink-edge: rgb(255 255 255 / 0.22);
161
+ --ink-track: rgb(255 255 255 / 0.16);
162
+ --ink-scrim: rgb(0 0 0 / 0.5);
163
+
164
+ --ink-shadow-card: 0 0 0 0.5px rgb(255 255 255 / 0.12), 0 1px 2px 0 rgb(0 0 0 / 0.4);
165
+ --ink-shadow-card-hover: 0 0 0 0.5px rgb(255 255 255 / 0.2), 0 1px 2px 0 rgb(0 0 0 / 0.4);
166
+ --ink-shadow-focus: 0 0 0 1px rgb(255 255 255 / 0.3), 0 1px 2px 0 rgb(0 0 0 / 0.4);
167
+ --ink-shadow-lift: 0 0 0 0.5px rgb(255 255 255 / 0.16), 0 2px 6px rgb(0 0 0 / 0.4);
168
+ --ink-shadow-pop: 0 0 0 0.5px rgb(255 255 255 / 0.14), 0 12px 32px -8px rgb(0 0 0 / 0.6);
169
+ --ink-shadow-dialog: 0 0 0 0.5px rgb(255 255 255 / 0.14), 0 24px 48px -12px rgb(0 0 0 / 0.6);
170
+ --ink-shadow-knob: 0 1px 2px rgb(0 0 0 / 0.5);
171
+
172
+ --ink-btn-top: #f4f4f5;
173
+ --ink-btn-bottom: #e4e4e7;
174
+ --ink-btn-top-hover: #fff;
175
+ --ink-btn-bottom-hover: #ececef;
176
+ --ink-btn-edge-1: #fff;
177
+ --ink-btn-edge-2: #f0f0f2;
178
+ --ink-btn-edge-3: #d4d4d8;
179
+ --ink-btn-ring: rgb(0 0 0 / 0.6);
180
+ --ink-btn-text: #121213;
181
+ }
182
+
183
+ @layer base {
184
+ body {
185
+ background-color: var(--ink-page);
186
+ font-feature-settings: 'cv11', 'ss01', 'ss03';
187
+ -webkit-font-smoothing: antialiased;
188
+ }
189
+
190
+ h1, h2, h3 {
191
+ letter-spacing: -0.02em;
192
+ }
193
+ }
194
+
195
+ /* A gradient button with a beveled edge, for the one action a page is about: `<UButton class="btn-ink">` */
196
+ @utility btn-ink {
197
+ border: 1px solid transparent;
198
+ background:
199
+ linear-gradient(var(--ink-btn-top), var(--ink-btn-bottom)) padding-box,
200
+ linear-gradient(var(--ink-btn-edge-1), var(--ink-btn-edge-2), var(--ink-btn-edge-3)) border-box;
201
+ box-shadow: 0 0 0 1px var(--ink-btn-ring), 0 2px 4px rgb(0 0 0 / 0.1);
202
+ color: var(--ink-btn-text);
203
+
204
+ &:hover:not(:disabled, [aria-disabled='true']) {
205
+ background:
206
+ linear-gradient(var(--ink-btn-top-hover), var(--ink-btn-bottom-hover)) padding-box,
207
+ linear-gradient(var(--ink-btn-edge-1), var(--ink-btn-edge-2), var(--ink-btn-edge-3)) border-box;
208
+ }
209
+ }
210
+
211
+ /* An accent-colored glow, for behind a page hero */
212
+ @utility hero-glow {
213
+ background-image:
214
+ radial-gradient(50% 70% at 50% 0%, color-mix(in oklab, var(--ui-color-secondary-500) 10%, transparent), transparent 70%);
215
+ }
216
+
217
+ /* A dotted grid that fades out, for behind a page hero */
218
+ @utility dot-grid {
219
+ background-image: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--ui-text-muted) 22%, transparent) 1px, transparent 0);
220
+ background-size: 22px 22px;
221
+ mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
222
+ }
223
+
224
+ @utility scrollbar-none {
225
+ scrollbar-width: none;
226
+
227
+ &::-webkit-scrollbar {
228
+ display: none;
229
+ }
230
+ }
231
+
232
+ @utility scrollbar-thin {
233
+ scrollbar-width: thin;
234
+ scrollbar-color: var(--ui-border-accented) transparent;
235
+ }
236
+
237
+ /* People who ask for less motion get none */
238
+ @media (prefers-reduced-motion: reduce) {
239
+ *,
240
+ ::before,
241
+ ::after {
242
+ animation-duration: 0.01ms !important;
243
+ animation-iteration-count: 1 !important;
244
+ scroll-behavior: auto !important;
245
+ transition-duration: 0.01ms !important;
246
+ }
247
+ }