@nuxt/ui 0.1.1 → 0.2.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
|
@@ -12,7 +12,7 @@ UI kit for Nuxt 3's examples and internal tooling UI.
|
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
14
|
// nuxt.config.js
|
|
15
|
-
import { defineNuxtConfig } from '
|
|
15
|
+
import { defineNuxtConfig } from 'nuxt'
|
|
16
16
|
|
|
17
17
|
export default defineNuxtConfig({
|
|
18
18
|
modules: [
|
|
@@ -61,7 +61,7 @@ It's also possible to override the default theme globally, for example:
|
|
|
61
61
|
|
|
62
62
|
```ts
|
|
63
63
|
// nuxt.config.js
|
|
64
|
-
import { defineNuxtConfig } from '
|
|
64
|
+
import { defineNuxtConfig } from 'nuxt'
|
|
65
65
|
|
|
66
66
|
export default defineNuxtConfig({
|
|
67
67
|
modules: [
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg viewBox="0 0 236 65" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M29.3445 12.5176c-1.8181-3.10288-6.3636-3.10288-8.1819 0L1.34708 46.334c-1.8182 3.1029.45453 6.9814 4.09096 6.9814H20.9071c-1.5538-1.3478-2.1292-3.6793-.9532-5.68l15.0073-25.5327-5.6167-9.5851Z" fill="#80EEC0" />
|
|
4
|
+
<path d="M41.9001 19.9353c1.5048-2.5387 5.2665-2.5387 6.7712 0l16.3991 27.6679c1.5048 2.5387-.3762 5.7122-3.3855 5.7122H28.8867c-3.0093 0-4.8904-3.1735-3.3857-5.7122l16.3991-27.6679Z" fill="#00DC82" />
|
|
5
|
+
<path d="M93.247 53.206c7.271 0 12.682-4.1739 13.273-10.2874h-5.579c-.508 3.2042-3.6358 5.4388-7.694 5.4388-5.1572 0-9.0462-3.5415-9.0462-10.2451 0-6.7037 3.889-10.2875 9.0462-10.2875 3.9735 0 7.102 2.2345 7.524 5.4811h5.834c-.803-6.1135-6.214-10.2875-13.358-10.2875-7.7358 0-14.6684 5.0593-14.6684 15.0939 0 10.0344 6.8059 15.0937 14.6684 15.0937Zm26.866 0c6.468 0 11.118-4.6378 11.118-10.962 0-6.3242-4.65-10.962-11.118-10.962-6.51 0-11.159 4.6378-11.159 10.962 0 6.3242 4.649 10.962 11.159 10.962Zm0-4.4692c-3.55 0-5.918-2.6562-5.918-6.4928 0-3.8368 2.368-6.4927 5.918-6.4927 3.509 0 5.877 2.6559 5.877 6.4927 0 3.8366-2.368 6.4928-5.877 6.4928Zm19.826 4.1319V41.2743c0-3.12 2.029-5.3967 4.946-5.3967 2.663 0 4.439 2.0239 4.439 4.933v12.0581h5.199V39.7143c0-4.975-3.128-8.4323-7.947-8.4323-3.044 0-5.453 1.3071-6.637 3.6259v-3.2886h-5.199v21.2494h5.199Zm21.158-21.2494h-4.185v4.3427h4.185v9.4864c0 4.722 3.044 7.4203 7.694 7.4203h3.424v-4.3849h-2.833c-1.943 0-3.085-1.0961-3.085-3.2464V35.962h5.918v-4.3427h-5.918v-6.4085h-5.2v6.4085Zm28.684 14.1662c-.55 2.0237-2.283 3.12-4.946 3.12-3.297 0-5.495-2.1924-5.876-5.6074h15.725c.043-.4217.085-1.0541.085-1.7709 0-5.0593-3.211-10.2452-10.357-10.2452-6.974 0-10.441 5.2703-10.441 10.8776 0 5.5654 3.89 11.0464 10.864 11.0464 5.243 0 9.215-2.9092 10.018-7.4205h-5.072Zm-5.369-10.6245c3.086 0 4.947 2.0237 5.158 4.722h-10.483c.549-3.2044 2.408-4.722 5.325-4.722Zm19.141 17.7077V41.2743c0-3.12 2.029-5.3967 4.947-5.3967 2.663 0 4.439 2.0239 4.439 4.933v12.0581h5.199V39.7143c0-4.975-3.128-8.4323-7.947-8.4323-3.044 0-5.453 1.3071-6.638 3.6259v-3.2886h-5.199v21.2494h5.199Zm21.159-21.2494h-4.185v4.3427h4.185v9.4864c0 4.722 3.043 7.4203 7.693 7.4203h3.425v-4.3849h-2.833c-1.945 0-3.086-1.0961-3.086-3.2464V35.962h5.919v-4.3427h-5.919v-6.4085h-5.199v6.4085Z" fill="currentColor" />
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import NIcon from './NIcon.vue'
|
|
3
|
-
import
|
|
3
|
+
import NuxtLogo from './NuxtLogo.vue'
|
|
4
|
+
import NuxtContentLogo from './NuxtContentLogo.vue'
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
example?: string
|
|
@@ -22,8 +23,9 @@ const openInEditor = () => {
|
|
|
22
23
|
<div class="relative font-sans" n="green6">
|
|
23
24
|
<div class="container max-w-200 mx-auto py-10 px-4">
|
|
24
25
|
<div class="flex items-end gap-3 mb-4 relative">
|
|
25
|
-
<slot name="
|
|
26
|
-
<
|
|
26
|
+
<slot name="logo">
|
|
27
|
+
<NuxtContentLogo v-if="repo === 'nuxt/content'" class="h-10" />
|
|
28
|
+
<NuxtLogo v-else class="h-10" />
|
|
27
29
|
</slot>
|
|
28
30
|
<div class="text-xl flex">
|
|
29
31
|
<div class="op-50">
|
package/dist/nuxt.mjs
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import { defineNuxtModule, addComponentsDir, installModule } from '@nuxt/kit';
|
|
2
|
+
import { defineNuxtModule, addComponentsDir, createResolver, installModule } from '@nuxt/kit';
|
|
3
3
|
import defu from 'defu';
|
|
4
|
-
import UnocssModule from '@unocss/nuxt';
|
|
5
|
-
import VueUseModule from '@vueuse/nuxt';
|
|
6
|
-
import NuxtColorMode from '@nuxtjs/color-mode';
|
|
7
4
|
import { parseColor } from '@unocss/preset-mini/utils';
|
|
8
5
|
import { theme } from '@unocss/preset-mini';
|
|
9
6
|
import { fonts } from '@unocss/preset-mini/rules';
|
|
10
|
-
import { mergeDeep, presetUno, presetAttributify, presetIcons, transformerDirectives, transformerVariantGroup } from 'unocss';
|
|
7
|
+
import { mergeDeep, presetUno, presetAttributify, presetTypography, presetIcons, transformerDirectives, transformerVariantGroup } from 'unocss';
|
|
11
8
|
|
|
12
9
|
const NuxtUIPreset = {
|
|
13
10
|
name: "nuxt-ui",
|
|
@@ -101,6 +98,7 @@ function extendUnocssOptions(user = {}) {
|
|
|
101
98
|
presets: [
|
|
102
99
|
presetUno(),
|
|
103
100
|
presetAttributify(),
|
|
101
|
+
presetTypography(),
|
|
104
102
|
presetIcons({
|
|
105
103
|
prefix: "",
|
|
106
104
|
scale: 1.2,
|
|
@@ -136,11 +134,12 @@ const nuxt = defineNuxtModule({
|
|
|
136
134
|
if (!options.dev) {
|
|
137
135
|
nuxt.options.unocss = extendUnocssOptions(nuxt.options.unocss);
|
|
138
136
|
}
|
|
139
|
-
nuxt.options.vueuse =
|
|
137
|
+
nuxt.options.vueuse = nuxt.options.vueuse || {};
|
|
140
138
|
nuxt.options.colorMode = defu(nuxt.options.colorMode, { classSuffix: "" });
|
|
141
|
-
|
|
142
|
-
await installModule(
|
|
143
|
-
await installModule(
|
|
139
|
+
const resolver = createResolver(import.meta.url);
|
|
140
|
+
await installModule(await resolver.resolvePath("@unocss/nuxt"));
|
|
141
|
+
await installModule(await resolver.resolvePath("@vueuse/nuxt"));
|
|
142
|
+
await installModule(await resolver.resolvePath("@nuxtjs/color-mode"));
|
|
144
143
|
}
|
|
145
144
|
});
|
|
146
145
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,34 +20,34 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "unbuild",
|
|
23
|
-
"dev": "
|
|
23
|
+
"dev": "nuxi dev playground",
|
|
24
24
|
"lint": "eslint . --ext .vue,.ts",
|
|
25
25
|
"prepack": "npm run build",
|
|
26
|
-
"playground:build": "
|
|
26
|
+
"playground:build": "nuxi build playground"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@iconify-json/carbon": "^1.1.
|
|
30
|
-
"@nuxt/kit": "
|
|
31
|
-
"@nuxtjs/color-mode": "^3.
|
|
32
|
-
"@unocss/core": "^0.
|
|
33
|
-
"@unocss/nuxt": "^0.
|
|
34
|
-
"@unocss/preset-attributify": "^0.
|
|
35
|
-
"@unocss/preset-icons": "^0.
|
|
36
|
-
"@unocss/preset-mini": "^0.
|
|
37
|
-
"@unocss/reset": "^0.
|
|
38
|
-
"@vueuse/core": "^8.2
|
|
39
|
-
"@vueuse/integrations": "^8.2
|
|
40
|
-
"@vueuse/nuxt": "^8.2
|
|
29
|
+
"@iconify-json/carbon": "^1.1.6",
|
|
30
|
+
"@nuxt/kit": "^3.0.0-rc.4",
|
|
31
|
+
"@nuxtjs/color-mode": "^3.1.4",
|
|
32
|
+
"@unocss/core": "^0.44.1",
|
|
33
|
+
"@unocss/nuxt": "^0.44.1",
|
|
34
|
+
"@unocss/preset-attributify": "^0.44.1",
|
|
35
|
+
"@unocss/preset-icons": "^0.44.1",
|
|
36
|
+
"@unocss/preset-mini": "^0.44.1",
|
|
37
|
+
"@unocss/reset": "^0.44.1",
|
|
38
|
+
"@vueuse/core": "^8.9.2",
|
|
39
|
+
"@vueuse/integrations": "^8.9.2",
|
|
40
|
+
"@vueuse/nuxt": "^8.9.2",
|
|
41
41
|
"defu": "^6.0.0",
|
|
42
|
-
"focus-trap": "^6.
|
|
43
|
-
"unocss": "^0.
|
|
42
|
+
"focus-trap": "^6.9.4",
|
|
43
|
+
"unocss": "^0.44.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"
|
|
46
|
+
"nuxt": "3.0.0-rc.4",
|
|
47
47
|
"unbuild": "^0.7.4"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1d10fbfe28e7256c18c04404f4e1f0805a4e454a"
|
|
53
53
|
}
|