@nuxt/ui 0.4.0 → 0.4.1

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.
@@ -1,7 +1,17 @@
1
+ <script setup lang="ts">
2
+ import { NuxtLink } from '#components'
3
+
4
+ defineProps<{
5
+ to?: string
6
+ icon?: string
7
+ }>()
8
+ </script>
9
+
1
10
  <template>
2
11
  <Component
3
- :is="to ? 'a' : 'button'"
4
- :href="to"
12
+ :is="to ? NuxtLink : 'button'"
13
+ :to="to"
14
+ v-bind="$attrs"
5
15
  class="n-button n-transition n-button-base hover:n-button-hover active:n-button-active focus-visible:n-focus-base n-disabled:n-disabled"
6
16
  >
7
17
  <slot name="icon">
@@ -10,10 +20,3 @@
10
20
  <slot />
11
21
  </Component>
12
22
  </template>
13
-
14
- <script setup lang="ts">
15
- defineProps<{
16
- to?: string
17
- icon?: string
18
- }>()
19
- </script>
@@ -1,17 +1,20 @@
1
- <template>
2
- <Component
3
- :is="(href || target) ? 'a' : 'nuxt-link'"
4
- v-bind="$props"
5
- class="n-link n-link-base hover:n-link-hover n-transition"
6
- >
7
- <slot />
8
- </Component>
9
- </template>
10
1
 
11
2
  <script setup lang="ts">
3
+ import { NuxtLink } from '#components'
4
+
12
5
  defineProps<{
13
6
  to?: string
14
7
  href?: string
15
8
  target?: string
16
9
  }>()
17
10
  </script>
11
+
12
+ <template>
13
+ <Component
14
+ :is="(href || target) ? 'a' : NuxtLink"
15
+ v-bind="$props"
16
+ class="n-link n-link-base hover:n-link-hover n-transition"
17
+ >
18
+ <slot />
19
+ </Component>
20
+ </template>
@@ -5,7 +5,7 @@
5
5
  </slot>
6
6
  <input
7
7
  v-model="input"
8
- class="!outline-none flex-auto n-bg-base"
8
+ class="!outline-none flex-auto n-bg-base w-full"
9
9
  :type="type"
10
10
  :placeholder="placeholder"
11
11
  >
package/dist/unocss.mjs CHANGED
@@ -56,6 +56,7 @@ const NuxtUIPreset = () => ({
56
56
  }
57
57
  ],
58
58
  shortcuts: {
59
+ // general
59
60
  "n-bg-base": "bg-white dark:bg-[#222]",
60
61
  "n-border-base": "border-gray-400/50",
61
62
  "n-border-300": "border-gray-400/40",
@@ -64,26 +65,34 @@ const NuxtUIPreset = () => ({
64
65
  "n-focus-base": "ring-2 ring-context/50",
65
66
  "n-active-base": "ring-3 ring-context/10",
66
67
  "n-borderless": "!border-none !shadow-none",
68
+ // link
67
69
  "n-link-base": "underline underline-offset-2 underline-black/20 dark:underline-white/40",
68
70
  "n-link-hover": "decoration-dotted text-context underline-context",
71
+ // card
69
72
  "n-card-base": "border n-border-200 rounded n-bg-base shadow-sm",
73
+ // header
70
74
  "n-header-upper": "text-sm uppercase mb-2 leading-1.2em tracking-wide op50",
71
- "n-button-base": "border n-border-base rounded shadow-sm px-1em py-0.25em inline-flex items-center gap-1 op80 !outline-none",
75
+ // button
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 touch-manipulation",
72
77
  "n-button-hover": "op100 !border-context text-context",
73
78
  "n-button-active": "n-active-base bg-context/5",
74
79
  "n-button-icon": "-ml-0.2em mr-0.2em text-1.1em",
80
+ // checkbox
75
81
  "n-checkbox-box": "border n-border-base w-1.1em h-1.1em mr-1 text-white flex flex-none items-center rounded-sm overflow-visible",
76
82
  "n-checkbox-box-checked": "bg-context border-context",
77
83
  "n-checkbox-icon": "carbon-checkmark",
84
+ // radio
78
85
  "n-radio-box": "border n-border-base w-1.2em h-1.2em mr-1 text-white flex flex-none rounded-full overflow-visible",
79
86
  "n-radio-box-checked": "border-context",
80
87
  "n-radio-inner": "bg-context rounded-1/2 w-0 h-0 m-auto",
81
88
  "n-radio-inner-checked": "w-0.8em h-0.8em",
89
+ // switch
82
90
  "n-switch-base": "inline-flex items-center select-none",
83
91
  "n-switch-slider": "mr-1 rounded-full border n-border-base relative p-2px",
84
92
  "n-switch-slider-checked": "border-context/20 bg-context/10",
85
93
  "n-switch-thumb": "h-1em w-1em rounded-1/2 border n-border-base ml-0 mr-0.8em",
86
94
  "n-switch-thumb-checked": "bg-context border-context ml-0.8em mr-0",
95
+ // tip
87
96
  "n-tip-base": "bg-context/8 text-context px-1em py-0.4em rounded flex items-center dark:bg-context/12",
88
97
  "n-tip-icon": "-ml-0.2em mr-0.4em text-1.1em"
89
98
  }
@@ -103,6 +112,7 @@ function extendUnocssOptions(user = {}) {
103
112
  display: "inline-block",
104
113
  "vertical-align": "middle"
105
114
  }
115
+ // ...(user?.icons || {})
106
116
  }),
107
117
  NuxtUIPreset(),
108
118
  ...user.presets || []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,28 +29,28 @@
29
29
  "playground:build": "nuxi build playground"
30
30
  },
31
31
  "dependencies": {
32
- "@iconify-json/carbon": "^1.1.13",
33
- "@nuxt/kit": "^3.0.0",
32
+ "@iconify-json/carbon": "^1.1.14",
33
+ "@nuxt/kit": "^3.1.1",
34
34
  "@nuxtjs/color-mode": "^3.2.0",
35
- "@unocss/core": "^0.48.2",
36
- "@unocss/nuxt": "^0.48.2",
37
- "@unocss/preset-attributify": "^0.48.2",
38
- "@unocss/preset-icons": "^0.48.2",
39
- "@unocss/preset-mini": "^0.48.2",
40
- "@unocss/reset": "^0.48.2",
41
- "@vueuse/core": "^9.10.0",
42
- "@vueuse/integrations": "^9.10.0",
43
- "@vueuse/nuxt": "^9.10.0",
44
- "defu": "^6.1.1",
35
+ "@unocss/core": "^0.49.1",
36
+ "@unocss/nuxt": "^0.49.1",
37
+ "@unocss/preset-attributify": "^0.49.1",
38
+ "@unocss/preset-icons": "^0.49.1",
39
+ "@unocss/preset-mini": "^0.49.1",
40
+ "@unocss/reset": "^0.49.1",
41
+ "@vueuse/core": "^9.12.0",
42
+ "@vueuse/integrations": "^9.12.0",
43
+ "@vueuse/nuxt": "^9.12.0",
44
+ "defu": "^6.1.2",
45
45
  "focus-trap": "^7.2.0",
46
- "unocss": "^0.48.2"
46
+ "unocss": "^0.49.1"
47
47
  },
48
48
  "devDependencies": {
49
- "nuxt": "^3.0.0",
50
- "unbuild": "^1.0.2"
49
+ "nuxt": "^3.1.1",
50
+ "unbuild": "^1.1.1"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "15c58aff5280f43ab3e0567a697e4ec3399c0954"
55
+ "gitHead": "1163a392fca9e0f6686fab4e2ab254acbd6e3ec1"
56
56
  }