@nuxt/ui 0.0.0-alpha.3 → 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,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "0.0.0-alpha.3",
3
+ "version": "0.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -27,19 +27,19 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@nuxt/kit": "npm:@nuxt/kit-edge@latest",
30
- "@unocss/core": "^0.16.0",
31
- "@unocss/nuxt": "^0.16.0",
32
- "@unocss/preset-attributify": "^0.16.0",
33
- "@unocss/preset-icons": "^0.16.0",
34
- "@unocss/preset-mini": "^0.16.0",
35
- "@unocss/preset-uno": "^0.16.0",
36
- "@unocss/reset": "^0.16.0",
37
- "@vueuse/integrations": "^7.2.2",
38
- "@vueuse/nuxt": "^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",
39
39
  "focus-trap": "^6.7.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@antfu/eslint-config": "^0.12.2",
42
+ "@antfu/eslint-config": "^0.13.1",
43
43
  "@iconify-json/carbon": "^1.0.12",
44
44
  "bumpp": "^7.1.1",
45
45
  "eslint": "^8.4.1",