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 CHANGED
@@ -1,10 +1,9 @@
1
1
  # nuxt-ui-ink
2
2
 
3
- A theme for [Nuxt UI](https://ui.nuxt.com) 4, as a Nuxt layer. Monochrome, with one blue accent, in light and dark.
3
+ A monochrome theme for Nuxt UI.
4
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. Controls are a little smaller
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, Hugeicons for the icons Nuxt UI renders itself, and the
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` | A gradient button with a beveled edge: `<UButton class="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: a landing page, the components in groups under `/components`, and a page
106
- per overlay where it is already open (`/open/modal`, `/open/toast`, `/open/dropdown` and so on).
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
- `pnpm test` checks every component, slot and variant name in the overrides against the themes Nuxt UI generates, so a
109
- renamed slot in a new Nuxt UI version fails the test instead of silently styling nothing.
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
- // Hugeicons (stroke rounded) for every icon the library renders on its own
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-hugeicons-arrow-down-02',
107
- arrowLeft: 'i-hugeicons-arrow-left-02',
108
- arrowRight: 'i-hugeicons-arrow-right-02',
109
- arrowUp: 'i-hugeicons-arrow-up-02',
110
- caution: 'i-hugeicons-alert-circle',
111
- check: 'i-hugeicons-tick-02',
112
- chevronDoubleLeft: 'i-hugeicons-arrow-left-double',
113
- chevronDoubleRight: 'i-hugeicons-arrow-right-double',
114
- chevronDown: 'i-hugeicons-arrow-down-01',
115
- chevronLeft: 'i-hugeicons-arrow-left-01',
116
- chevronRight: 'i-hugeicons-arrow-right-01',
117
- chevronUp: 'i-hugeicons-arrow-up-01',
118
- close: 'i-hugeicons-cancel-01',
119
- copy: 'i-hugeicons-copy-01',
120
- copyCheck: 'i-hugeicons-checkmark-circle-02',
121
- dark: 'i-hugeicons-moon-02',
122
- drag: 'i-hugeicons-drag-drop-vertical',
123
- edit: 'i-hugeicons-pencil-edit-01',
124
- ellipsis: 'i-hugeicons-more-horizontal',
125
- error: 'i-hugeicons-cancel-circle',
126
- external: 'i-hugeicons-arrow-up-right-01',
127
- eye: 'i-hugeicons-view',
128
- eyeOff: 'i-hugeicons-view-off',
129
- file: 'i-hugeicons-file-01',
130
- folder: 'i-hugeicons-folder-01',
131
- folderOpen: 'i-hugeicons-folder-open',
132
- hash: 'i-hugeicons-grid',
133
- info: 'i-hugeicons-information-circle',
134
- light: 'i-hugeicons-sun-03',
135
- loading: 'i-hugeicons-loading-03',
136
- menu: 'i-hugeicons-menu-01',
137
- minus: 'i-hugeicons-minus-sign',
138
- panelClose: 'i-hugeicons-sidebar-left-01',
139
- panelOpen: 'i-hugeicons-sidebar-left',
140
- plus: 'i-hugeicons-plus-sign',
141
- reload: 'i-hugeicons-refresh',
142
- search: 'i-hugeicons-search-01',
143
- star: 'i-hugeicons-star',
144
- stop: 'i-hugeicons-stop',
145
- success: 'i-hugeicons-checkmark-circle-02',
146
- system: 'i-hugeicons-computer',
147
- tip: 'i-hugeicons-idea-01',
148
- trash: 'i-hugeicons-delete-02',
149
- upload: 'i-hugeicons-upload-01',
150
- warning: 'i-hugeicons-alert-02'
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 dark chip
171
- { color: 'primary', variant: 'solid', class: 'hover:bg-primary/90 active:bg-primary/90' },
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.2.0",
4
- "description": "A monochrome theme for Nuxt UI, as a Nuxt layer.",
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/hugeicons": "^1.2.36"
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 optional gradient button (`btn-ink`) */
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
- /* A gradient button with a beveled edge, for the one action a page is about: `<UButton class="btn-ink">` */
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
- border: 1px solid transparent;
202
- background:
203
- linear-gradient(var(--ink-btn-top), var(--ink-btn-bottom)) padding-box,
204
- linear-gradient(var(--ink-btn-edge-1), var(--ink-btn-edge-2), var(--ink-btn-edge-3)) border-box;
205
- box-shadow: 0 0 0 1px var(--ink-btn-ring), 0 2px 4px rgb(0 0 0 / 0.1);
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