nuxt-ui-ink 0.3.0 → 0.4.1
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 +15 -9
- package/app/app.config.ts +26 -4
- package/package.json +7 -4
- package/theme.css +15 -10
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# nuxt-ui-ink
|
|
2
2
|
|
|
3
|
-
A theme for
|
|
3
|
+
A monochrome theme for Nuxt UI.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
than Nuxt UI's.
|
|
5
|
+
A Nuxt layer that changes how [Nuxt UI](https://ui.nuxt.com)'s components look: colors, shadows, corners and sizes,
|
|
6
|
+
in light and dark. [See it](https://nuxt-ui-ink.miguilim.workers.dev).
|
|
8
7
|
|
|
9
8
|
## Install
|
|
10
9
|
|
|
@@ -47,7 +46,7 @@ the Inter font. Use the same set in your own components with `i-solar-…-bold`.
|
|
|
47
46
|
| `shadow-lift` | A hovered card that links somewhere. |
|
|
48
47
|
| `shadow-pop`, `shadow-dialog` | Menus and popovers; dialogs. |
|
|
49
48
|
| `rounded-card`, `rounded-dialog` | 10px and 14px, between Nuxt UI's steps. |
|
|
50
|
-
| `btn-ink` |
|
|
49
|
+
| `btn-ink` | The primary button's gradient and beveled edge, for other elements. |
|
|
51
50
|
| `hero-glow`, `dot-grid` | Backdrops for a hero. |
|
|
52
51
|
| `scrollbar-none`, `scrollbar-thin` | Scrolling rows and panels. |
|
|
53
52
|
|
|
@@ -102,11 +101,18 @@ pnpm preview # the production build, in the Workers runtime
|
|
|
102
101
|
pnpm deploy # build and publish the showcase to Cloudflare Workers
|
|
103
102
|
```
|
|
104
103
|
|
|
105
|
-
The playground is also the showcase site
|
|
106
|
-
|
|
104
|
+
The playground is also the showcase site. Each component has a demo in `playground/app/demos` and an entry in
|
|
105
|
+
`playground/app/utils/catalog.ts`, which the sidebar, the search and the component pages are built from. Overlays
|
|
106
|
+
also have a page where they are already open (`/open/modal`, `/open/toast`, `/open/dropdown` and so on).
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
Three checks keep the theme and the showcase in step with Nuxt UI, and CI runs them on every pull request,
|
|
109
|
+
including the weekly ones Dependabot opens for new Nuxt UI releases:
|
|
110
|
+
|
|
111
|
+
- `pnpm test` holds every component, slot and variant name in the overrides against the themes Nuxt UI generates, so
|
|
112
|
+
a renamed slot fails instead of silently styling nothing.
|
|
113
|
+
- The same command holds the showcase against Nuxt UI's component list. A new component fails it until it has a
|
|
114
|
+
page, appears in a demo, or is listed under `NOT_SHOWN` in the catalog with a reason.
|
|
115
|
+
- `pnpm check:pages`, after `pnpm build`, opens every page of the showcase and fails if one does not render.
|
|
110
116
|
|
|
111
117
|
## License
|
|
112
118
|
|
package/app/app.config.ts
CHANGED
|
@@ -47,7 +47,8 @@ const fieldIcons = [
|
|
|
47
47
|
/** A field that opens a menu: its rows follow */
|
|
48
48
|
const pickerSizes = {
|
|
49
49
|
md: { ...fieldSizes.md, item: small, itemLeadingIcon: 'size-4 my-0.5', itemTrailingIcon: 'size-4 my-0.5' },
|
|
50
|
-
|
|
50
|
+
// The field's text is 13px at this size too, so its rows are
|
|
51
|
+
lg: { ...fieldSizes.lg, item: small, itemLeadingIcon: 'size-4 my-0.5', itemTrailingIcon: 'size-4 my-0.5' }
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
/** A menu row at the default size */
|
|
@@ -168,8 +169,8 @@ export default defineAppConfig({
|
|
|
168
169
|
}
|
|
169
170
|
},
|
|
170
171
|
compoundVariants: [
|
|
171
|
-
// A
|
|
172
|
-
{ color: 'primary', variant: 'solid', class: '
|
|
172
|
+
// A gradient with a beveled edge
|
|
173
|
+
{ color: 'primary', variant: 'solid', class: 'btn-ink' },
|
|
173
174
|
// White, drawn by its shadow
|
|
174
175
|
{ 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' },
|
|
175
176
|
{ color: 'neutral', variant: 'soft', class: 'bg-elevated text-highlighted hover:bg-accented active:bg-accented' },
|
|
@@ -459,10 +460,11 @@ export default defineAppConfig({
|
|
|
459
460
|
}
|
|
460
461
|
},
|
|
461
462
|
|
|
463
|
+
// The knob keeps Nuxt UI's ring in the slider's color: it covers the end of the filled track under it
|
|
462
464
|
slider: {
|
|
463
465
|
slots: {
|
|
464
466
|
track: 'bg-(--ink-track)',
|
|
465
|
-
thumb: '
|
|
467
|
+
thumb: 'shadow-knob'
|
|
466
468
|
}
|
|
467
469
|
},
|
|
468
470
|
|
|
@@ -533,6 +535,19 @@ export default defineAppConfig({
|
|
|
533
535
|
}
|
|
534
536
|
},
|
|
535
537
|
|
|
538
|
+
// The line between two panels, which Nuxt UI leaves invisible
|
|
539
|
+
splitter: {
|
|
540
|
+
slots: {
|
|
541
|
+
handle: 'after:absolute after:bg-(--ink-stroke) after:transition-colors hover:after:bg-edge focus-visible:outline-focus'
|
|
542
|
+
},
|
|
543
|
+
variants: {
|
|
544
|
+
orientation: {
|
|
545
|
+
horizontal: { handle: 'after:inset-y-0 after:left-1/2 after:w-px' },
|
|
546
|
+
vertical: { handle: 'after:inset-x-0 after:top-1/2 after:h-px' }
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
|
|
536
551
|
/* ── Navigation ───────────────────────────────────────────────────────────────────────────────────────── */
|
|
537
552
|
|
|
538
553
|
// Pill tabs as a segmented control: a raised knob on a tinted track, 28px high at the default size
|
|
@@ -583,6 +598,13 @@ export default defineAppConfig({
|
|
|
583
598
|
]
|
|
584
599
|
},
|
|
585
600
|
|
|
601
|
+
// A page number is the same square as the arrow and the ellipsis beside it
|
|
602
|
+
pagination: {
|
|
603
|
+
slots: {
|
|
604
|
+
label: 'min-w-4 leading-4'
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
|
|
586
608
|
stepper: {
|
|
587
609
|
slots: {
|
|
588
610
|
separator: 'bg-accented'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-ui-ink",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A monochrome theme for Nuxt UI
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "A monochrome theme for Nuxt UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "miguilim",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"typecheck": "nuxt typecheck playground",
|
|
36
36
|
"test": "nuxt prepare playground && vitest run",
|
|
37
37
|
"deploy": "nuxt build playground && wrangler deploy --cwd playground",
|
|
38
|
-
"preview": "nuxt build playground && wrangler dev --cwd playground --port 4310"
|
|
38
|
+
"preview": "nuxt build playground && wrangler dev --cwd playground --port 4310",
|
|
39
|
+
"check:pages": "node scripts/check-pages.mjs"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"@iconify-json/solar": "^1.2.0"
|
|
@@ -49,11 +50,13 @@
|
|
|
49
50
|
"@iconify-json/simple-icons": "^1.2.104",
|
|
50
51
|
"@internationalized/date": "^3.8.0",
|
|
51
52
|
"@nuxt/ui": "^4.13.0",
|
|
53
|
+
"@tanstack/charts": "^1.5.0",
|
|
52
54
|
"nuxt": "^4.6.3",
|
|
53
55
|
"tailwindcss": "^4.3.3",
|
|
54
56
|
"typescript": "^6.0.3",
|
|
55
57
|
"vitest": "^5.1.1",
|
|
56
58
|
"vue-tsc": "^3.3.13",
|
|
57
59
|
"wrangler": "^4.169.0"
|
|
58
|
-
}
|
|
60
|
+
},
|
|
61
|
+
"packageManager": "pnpm@12.15.0"
|
|
59
62
|
}
|
package/theme.css
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
--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);
|
|
115
115
|
--ink-shadow-knob: 0 1px 2px rgb(0 0 0 / 0.18), 0 0 0 0.5px rgb(0 0 0 / 0.04);
|
|
116
116
|
|
|
117
|
-
/* The
|
|
117
|
+
/* The primary button's gradient and edge (`btn-ink`) */
|
|
118
118
|
--ink-btn-top: #323137;
|
|
119
119
|
--ink-btn-bottom: #201e25;
|
|
120
120
|
--ink-btn-top-hover: #3c3b42;
|
|
@@ -196,19 +196,24 @@
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
/*
|
|
199
|
+
/*
|
|
200
|
+
* The primary button: a top-down gradient with a beveled edge. Solid primary buttons get it through the layer's
|
|
201
|
+
* app.config; the class also works on any other element. The edge is drawn with inset shadows, not a border, so the
|
|
202
|
+
* button keeps the height of the buttons beside it.
|
|
203
|
+
*/
|
|
200
204
|
@utility btn-ink {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
background: linear-gradient(var(--ink-btn-top), var(--ink-btn-bottom));
|
|
206
|
+
box-shadow:
|
|
207
|
+
inset 0 1px 0 var(--ink-btn-edge-1),
|
|
208
|
+
inset 1px 0 0 var(--ink-btn-edge-2),
|
|
209
|
+
inset -1px 0 0 var(--ink-btn-edge-2),
|
|
210
|
+
inset 0 -1px 0 var(--ink-btn-edge-3),
|
|
211
|
+
0 0 0 1px var(--ink-btn-ring),
|
|
212
|
+
0 2px 4px rgb(0 0 0 / 0.1);
|
|
206
213
|
color: var(--ink-btn-text);
|
|
207
214
|
|
|
208
215
|
&:hover:not(:disabled, [aria-disabled='true']) {
|
|
209
|
-
background:
|
|
210
|
-
linear-gradient(var(--ink-btn-top-hover), var(--ink-btn-bottom-hover)) padding-box,
|
|
211
|
-
linear-gradient(var(--ink-btn-edge-1), var(--ink-btn-edge-2), var(--ink-btn-edge-3)) border-box;
|
|
216
|
+
background: linear-gradient(var(--ink-btn-top-hover), var(--ink-btn-bottom-hover));
|
|
212
217
|
}
|
|
213
218
|
}
|
|
214
219
|
|