@nuxt/ui 0.0.0-alpha.0 → 0.0.0-alpha.4

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.
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <Component
3
+ :is="(href || target) ? 'a' : 'nuxt-link'"
4
+ v-bind="$props"
5
+ class="n-link n-link-base n-transition"
6
+ >
7
+ <slot />
8
+ </Component>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ defineProps<{
13
+ to?: string
14
+ href?: string
15
+ target?: string
16
+ }>()
17
+ </script>
@@ -0,0 +1,53 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps<{
3
+ name?: string
4
+ showTips?: boolean
5
+ class?: string
6
+ openPath?: string
7
+ }>()
8
+
9
+ const openInEditor = () => {
10
+ fetch(`/__open-in-editor?file=${encodeURIComponent(props.openPath || 'app.vue')}`)
11
+ }
12
+ </script>
13
+
14
+ <template>
15
+ <div class="relative font-sans" n="green6">
16
+ <div class="container max-w-200 mx-auto py-10 px-4">
17
+ <div class="flex flex-col gap-2 items-center mb-4">
18
+ <img src="https://raw.githubusercontent.com/nuxt/framework/main/playground/assets/logo.svg" h="12">
19
+ <div class="text-xl flex">
20
+ <div class="op-50">
21
+ examples/
22
+ </div>
23
+ <slot name="name">
24
+ <NLink :href="`https://github.com/nuxt/framework/tree/main/examples/${name}`" target="_blank">
25
+ {{ name }}
26
+ </NLink>
27
+ </slot>
28
+ </div>
29
+ <slot name="subtitle" />
30
+ </div>
31
+
32
+ <slot name="nav" />
33
+
34
+ <NCard class="p-6 flex flex-col gap-2 text-center" :class="$props.class">
35
+ <slot />
36
+ </NCard>
37
+
38
+ <div
39
+ v-if="$slots.tips"
40
+ :class="showTips ? 'opacity-100' : 'opacity-0'"
41
+ class="transition py-5 flex items-center gap-2 text-gray-400"
42
+ >
43
+ <NIcon icon="carbon-idea" class="text-xl flex-none" />
44
+ <slot name="tips" />
45
+ <NButton icon="carbon-edit" class="flex-none" @click="openInEditor">
46
+ Open in Editor
47
+ </NButton>
48
+ </div>
49
+
50
+ <slot name="footer" />
51
+ </div>
52
+ </div>
53
+ </template>
package/dist/nuxt.cjs CHANGED
@@ -39,7 +39,7 @@ const NuxtUIPreset = {
39
39
  };
40
40
  }
41
41
  }],
42
- [/^n-(.*)$/, rules.fontSizes[0][1]],
42
+ [/^n-(.*)$/, rules.fonts[1][1]],
43
43
  ["n-dashed", { "border-style": "dashed" }],
44
44
  ["n-solid", {
45
45
  "background-color": "rgba(var(--nui-c-context), 1) !important",
@@ -80,8 +80,9 @@ const NuxtUIPreset = {
80
80
  "n-transition": "transition-all duration-200",
81
81
  "n-focus-base": "ring-2 ring-context/50",
82
82
  "n-active-base": "ring-3 ring-context/10",
83
+ "n-link-base": "hover:decoration-dotted hover:underline-offset-2 hover:text-context hover:underline",
83
84
  "n-card-base": "border n-border-200 rounded n-bg-base shadow-sm",
84
- "n-header-upper": "text-sm case-upper mb-2 leading-1.2em tracking-wide op50",
85
+ "n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
85
86
  "n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none",
86
87
  "n-button-hover": "op100 !border-context text-context",
87
88
  "n-button-active": "n-active-base bg-context/5",
package/dist/nuxt.mjs CHANGED
@@ -6,7 +6,7 @@ import UnocssModule from '@unocss/nuxt';
6
6
  import VueUseModule from '@vueuse/nuxt';
7
7
  import { mergeDeep } from '@unocss/core';
8
8
  import presetUno, { theme } from '@unocss/preset-uno';
9
- import { parseColorUtil, fontSizes } from '@unocss/preset-mini/rules';
9
+ import { parseColorUtil, fonts } from '@unocss/preset-mini/rules';
10
10
  import presetIcons from '@unocss/preset-icons';
11
11
  import presetAttributify from '@unocss/preset-attributify';
12
12
 
@@ -29,7 +29,7 @@ const NuxtUIPreset = {
29
29
  };
30
30
  }
31
31
  }],
32
- [/^n-(.*)$/, fontSizes[0][1]],
32
+ [/^n-(.*)$/, fonts[1][1]],
33
33
  ["n-dashed", { "border-style": "dashed" }],
34
34
  ["n-solid", {
35
35
  "background-color": "rgba(var(--nui-c-context), 1) !important",
@@ -70,8 +70,9 @@ const NuxtUIPreset = {
70
70
  "n-transition": "transition-all duration-200",
71
71
  "n-focus-base": "ring-2 ring-context/50",
72
72
  "n-active-base": "ring-3 ring-context/10",
73
+ "n-link-base": "hover:decoration-dotted hover:underline-offset-2 hover:text-context hover:underline",
73
74
  "n-card-base": "border n-border-200 rounded n-bg-base shadow-sm",
74
- "n-header-upper": "text-sm case-upper mb-2 leading-1.2em tracking-wide op50",
75
+ "n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
75
76
  "n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none",
76
77
  "n-button-hover": "op100 !border-context text-context",
77
78
  "n-button-active": "n-active-base bg-context/5",
package/nuxt.cjs ADDED
@@ -0,0 +1,6 @@
1
+ // CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
2
+ module.exports = function(...args) {
3
+ return import('./dist/nuxt.mjs').then(m => m.default.call(this, ...args))
4
+ }
5
+
6
+ module.exports.meta = require('./package.json')
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "0.0.0-alpha.0",
3
+ "version": "0.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "build": "unbuild && cp -R src/components dist/",
8
8
  "lint": "eslint . --ext .vue,.ts",
9
- "dev": "yarn nuxi dev playground"
9
+ "dev": "yarn nuxi dev playground",
10
+ "prepublishOnly": "npm run build",
11
+ "release": "bumpp --commit --tag --push --preid alpha && yarn publish --non-interactive"
10
12
  },
11
13
  "main": "./dist/nuxt.mjs",
12
14
  "exports": {
@@ -20,27 +22,29 @@
20
22
  }
21
23
  },
22
24
  "files": [
23
- "dist"
25
+ "dist",
26
+ "*.cjs"
24
27
  ],
25
28
  "dependencies": {
26
29
  "@nuxt/kit": "npm:@nuxt/kit-edge@latest",
27
- "@unocss/core": "^0.15.6",
28
- "@unocss/nuxt": "^0.15.6",
29
- "@unocss/preset-attributify": "^0.15.6",
30
- "@unocss/preset-icons": "^0.15.6",
31
- "@unocss/preset-mini": "^0.15.6",
32
- "@unocss/preset-uno": "^0.15.6",
33
- "@unocss/reset": "^0.15.6",
34
- "@vueuse/nuxt": "^7.2.2",
35
- "@vueuse/integrations": "^7.2.2",
30
+ "@unocss/core": "^0.16.3",
31
+ "@unocss/nuxt": "^0.16.3",
32
+ "@unocss/preset-attributify": "^0.16.3",
33
+ "@unocss/preset-icons": "^0.16.3",
34
+ "@unocss/preset-mini": "^0.16.3",
35
+ "@unocss/preset-uno": "^0.16.3",
36
+ "@unocss/reset": "^0.16.3",
37
+ "@vueuse/integrations": "^7.3.0",
38
+ "@vueuse/nuxt": "^7.3.0",
36
39
  "focus-trap": "^6.7.1"
37
40
  },
38
41
  "devDependencies": {
39
- "@antfu/eslint-config": "^0.12.2",
42
+ "@antfu/eslint-config": "^0.13.1",
40
43
  "@iconify-json/carbon": "^1.0.12",
44
+ "bumpp": "^7.1.1",
41
45
  "eslint": "^8.4.1",
42
46
  "nuxt3": "latest",
43
- "typescript": "^4.5.2",
47
+ "typescript": "^4.5.3",
44
48
  "unbuild": "^0.6.3"
45
49
  },
46
50
  "eslintConfig": {