nuxt-ui-ink 0.2.0 → 0.4.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 +19 -12
- package/app/app.config.ts +62 -48
- package/package.json +8 -5
- 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
|
|
|
@@ -29,8 +28,8 @@ export default defineNuxtConfig({
|
|
|
29
28
|
@import "nuxt-ui-ink/theme.css";
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
The layer adds the Nuxt UI module, the component overrides,
|
|
33
|
-
Inter font. The stylesheet has to be imported from yours so Tailwind compiles both together.
|
|
31
|
+
The layer adds the Nuxt UI module, the component overrides, Solar icons for the icons Nuxt UI renders itself, and
|
|
32
|
+
the Inter font. Use the same set in your own components with `i-solar-…-bold`. The stylesheet has to be imported from yours so Tailwind compiles both together.
|
|
34
33
|
|
|
35
34
|
## Classes
|
|
36
35
|
|
|
@@ -47,7 +46,7 @@ Inter font. The stylesheet has to be imported from yours so Tailwind compiles bo
|
|
|
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,12 +101,20 @@ 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
|
|
|
113
|
-
MIT
|
|
119
|
+
MIT. The icons are [Solar](https://www.figma.com/community/file/1166831539721848736) by 480 Design, under CC BY 4.0,
|
|
120
|
+
which asks for attribution: credit them somewhere in a product that ships these icons.
|
package/app/app.config.ts
CHANGED
|
@@ -101,53 +101,54 @@ export default defineAppConfig({
|
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
|
|
104
|
-
//
|
|
104
|
+
// Solar for every icon the library renders on its own: the filled style for things, the line style for
|
|
105
|
+
// arrows, chevrons and the search glass, whose filled versions are solid shapes
|
|
105
106
|
icons: {
|
|
106
|
-
arrowDown: 'i-
|
|
107
|
-
arrowLeft: 'i-
|
|
108
|
-
arrowRight: 'i-
|
|
109
|
-
arrowUp: 'i-
|
|
110
|
-
caution: 'i-
|
|
111
|
-
check: 'i-
|
|
112
|
-
chevronDoubleLeft: 'i-
|
|
113
|
-
chevronDoubleRight: 'i-
|
|
114
|
-
chevronDown: 'i-
|
|
115
|
-
chevronLeft: 'i-
|
|
116
|
-
chevronRight: 'i-
|
|
117
|
-
chevronUp: 'i-
|
|
118
|
-
close: 'i-
|
|
119
|
-
copy: 'i-
|
|
120
|
-
copyCheck: 'i-
|
|
121
|
-
dark: 'i-
|
|
122
|
-
drag: 'i-
|
|
123
|
-
edit: 'i-
|
|
124
|
-
ellipsis: 'i-
|
|
125
|
-
error: 'i-
|
|
126
|
-
external: 'i-
|
|
127
|
-
eye: 'i-
|
|
128
|
-
eyeOff: 'i-
|
|
129
|
-
file: 'i-
|
|
130
|
-
folder: 'i-
|
|
131
|
-
folderOpen: 'i-
|
|
132
|
-
hash: 'i-
|
|
133
|
-
info: 'i-
|
|
134
|
-
light: 'i-
|
|
135
|
-
loading: 'i-
|
|
136
|
-
menu: 'i-
|
|
137
|
-
minus: 'i-
|
|
138
|
-
panelClose: 'i-
|
|
139
|
-
panelOpen: 'i-
|
|
140
|
-
plus: 'i-
|
|
141
|
-
reload: 'i-
|
|
142
|
-
search: 'i-
|
|
143
|
-
star: 'i-
|
|
144
|
-
stop: 'i-
|
|
145
|
-
success: 'i-
|
|
146
|
-
system: 'i-
|
|
147
|
-
tip: 'i-
|
|
148
|
-
trash: 'i-
|
|
149
|
-
upload: 'i-
|
|
150
|
-
warning: 'i-
|
|
107
|
+
arrowDown: 'i-solar-arrow-down-linear',
|
|
108
|
+
arrowLeft: 'i-solar-arrow-left-linear',
|
|
109
|
+
arrowRight: 'i-solar-arrow-right-linear',
|
|
110
|
+
arrowUp: 'i-solar-arrow-up-linear',
|
|
111
|
+
caution: 'i-solar-danger-circle-bold',
|
|
112
|
+
check: 'i-solar-check-bold',
|
|
113
|
+
chevronDoubleLeft: 'i-solar-double-alt-arrow-left-linear',
|
|
114
|
+
chevronDoubleRight: 'i-solar-double-alt-arrow-right-linear',
|
|
115
|
+
chevronDown: 'i-solar-alt-arrow-down-linear',
|
|
116
|
+
chevronLeft: 'i-solar-alt-arrow-left-linear',
|
|
117
|
+
chevronRight: 'i-solar-alt-arrow-right-linear',
|
|
118
|
+
chevronUp: 'i-solar-alt-arrow-up-linear',
|
|
119
|
+
close: 'i-solar-close-bold',
|
|
120
|
+
copy: 'i-solar-copy-bold',
|
|
121
|
+
copyCheck: 'i-solar-copy-check-bold',
|
|
122
|
+
dark: 'i-solar-moon-bold',
|
|
123
|
+
drag: 'i-solar-reorder-linear',
|
|
124
|
+
edit: 'i-solar-pen-new-square-bold',
|
|
125
|
+
ellipsis: 'i-solar-menu-dots-bold',
|
|
126
|
+
error: 'i-solar-close-circle-bold',
|
|
127
|
+
external: 'i-solar-arrow-right-up-linear',
|
|
128
|
+
eye: 'i-solar-eye-bold',
|
|
129
|
+
eyeOff: 'i-solar-eye-closed-bold',
|
|
130
|
+
file: 'i-solar-file-bold',
|
|
131
|
+
folder: 'i-solar-folder-bold',
|
|
132
|
+
folderOpen: 'i-solar-folder-open-bold',
|
|
133
|
+
hash: 'i-solar-hashtag-bold',
|
|
134
|
+
info: 'i-solar-info-circle-bold',
|
|
135
|
+
light: 'i-solar-sun-2-bold',
|
|
136
|
+
loading: 'i-solar-loader-bold',
|
|
137
|
+
menu: 'i-solar-hamburger-menu-linear',
|
|
138
|
+
minus: 'i-solar-minus-bold',
|
|
139
|
+
panelClose: 'i-solar-panel-left-close-bold',
|
|
140
|
+
panelOpen: 'i-solar-panel-left-open-bold',
|
|
141
|
+
plus: 'i-solar-add-bold',
|
|
142
|
+
reload: 'i-solar-restart-bold',
|
|
143
|
+
search: 'i-solar-magnifier-linear',
|
|
144
|
+
star: 'i-solar-star-bold',
|
|
145
|
+
stop: 'i-solar-stop-bold',
|
|
146
|
+
success: 'i-solar-check-circle-bold',
|
|
147
|
+
system: 'i-solar-monitor-bold',
|
|
148
|
+
tip: 'i-solar-lightbulb-bold',
|
|
149
|
+
trash: 'i-solar-trash-bin-trash-bold',
|
|
150
|
+
upload: 'i-solar-upload-bold',
|
|
151
|
+
warning: 'i-solar-danger-triangle-bold'
|
|
151
152
|
},
|
|
152
153
|
|
|
153
154
|
/* ── Elements ─────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -167,8 +168,8 @@ export default defineAppConfig({
|
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
compoundVariants: [
|
|
170
|
-
// A
|
|
171
|
-
{ color: 'primary', variant: 'solid', class: '
|
|
171
|
+
// A gradient with a beveled edge
|
|
172
|
+
{ color: 'primary', variant: 'solid', class: 'btn-ink' },
|
|
172
173
|
// White, drawn by its shadow
|
|
173
174
|
{ 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' },
|
|
174
175
|
{ color: 'neutral', variant: 'soft', class: 'bg-elevated text-highlighted hover:bg-accented active:bg-accented' },
|
|
@@ -532,6 +533,19 @@ export default defineAppConfig({
|
|
|
532
533
|
}
|
|
533
534
|
},
|
|
534
535
|
|
|
536
|
+
// The line between two panels, which Nuxt UI leaves invisible
|
|
537
|
+
splitter: {
|
|
538
|
+
slots: {
|
|
539
|
+
handle: 'after:absolute after:bg-(--ink-stroke) after:transition-colors hover:after:bg-edge focus-visible:outline-focus'
|
|
540
|
+
},
|
|
541
|
+
variants: {
|
|
542
|
+
orientation: {
|
|
543
|
+
horizontal: { handle: 'after:inset-y-0 after:left-1/2 after:w-px' },
|
|
544
|
+
vertical: { handle: 'after:inset-x-0 after:top-1/2 after:h-px' }
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
|
|
535
549
|
/* ── Navigation ───────────────────────────────────────────────────────────────────────────────────────── */
|
|
536
550
|
|
|
537
551
|
// Pill tabs as a segmented control: a raised knob on a tinted track, 28px high at the default size
|
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.0",
|
|
4
|
+
"description": "A monochrome theme for Nuxt UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "miguilim",
|
|
@@ -35,10 +35,11 @@
|
|
|
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
|
-
"@iconify-json/
|
|
42
|
+
"@iconify-json/solar": "^1.2.0"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
45
|
"@nuxt/ui": "^4.13.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
|
|