@nuxt/devtools-ui-kit-nightly 2.0.0-28980754.13f6fd0 → 2.0.0-28994885.580efe5
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/dist/components/NButton.d.ts +33 -0
- package/dist/components/NButton.mjs +41 -0
- package/dist/module.json +1 -1
- package/package.json +16 -16
- package/dist/components/NButton.vue +0 -34
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
to: StringConstructor;
|
|
4
|
+
icon: StringConstructor;
|
|
5
|
+
border: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
disabled: BooleanConstructor;
|
|
10
|
+
type: {
|
|
11
|
+
type: PropType<"submit" | "reset" | "button">;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
to: StringConstructor;
|
|
18
|
+
icon: StringConstructor;
|
|
19
|
+
border: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
disabled: BooleanConstructor;
|
|
24
|
+
type: {
|
|
25
|
+
type: PropType<"submit" | "reset" | "button">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
border: boolean;
|
|
31
|
+
type: "submit" | "reset" | "button";
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NuxtLink } from "#components";
|
|
2
|
+
import { defineComponent, h, renderSlot } from "vue";
|
|
3
|
+
import NIcon from "./NIcon.vue";
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: "NButton",
|
|
6
|
+
props: {
|
|
7
|
+
to: String,
|
|
8
|
+
icon: String,
|
|
9
|
+
border: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: true
|
|
12
|
+
},
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "button"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props, { attrs, slots }) {
|
|
20
|
+
return () => h(props.to ? NuxtLink : "button", {
|
|
21
|
+
to: props.to,
|
|
22
|
+
...attrs,
|
|
23
|
+
...!props.to && { type: props.type },
|
|
24
|
+
...props.disabled ? { disabled: true } : { tabindex: 0 },
|
|
25
|
+
// @ts-expect-error ignore type
|
|
26
|
+
class: [
|
|
27
|
+
props.border ? "n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover" : "",
|
|
28
|
+
slots.default ? "" : "n-icon-button",
|
|
29
|
+
"n-button n-transition n-disabled:n-disabled"
|
|
30
|
+
].join(" ")
|
|
31
|
+
}, [
|
|
32
|
+
renderSlot(slots, "icon", {}, () => props.icon ? [
|
|
33
|
+
h(NIcon, {
|
|
34
|
+
icon: props.icon,
|
|
35
|
+
class: slots.default ? "n-button-icon" : ""
|
|
36
|
+
})
|
|
37
|
+
] : []),
|
|
38
|
+
renderSlot(slots, "default")
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
});
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-ui-kit-nightly",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-
|
|
4
|
+
"version": "2.0.0-28994885.580efe5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://devtools.nuxt.com/module/ui-kit",
|
|
7
7
|
"repository": {
|
|
@@ -28,32 +28,32 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-
|
|
31
|
+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-28994885.580efe5"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@iconify-json/carbon": "^1.2.
|
|
34
|
+
"@iconify-json/carbon": "^1.2.7",
|
|
35
35
|
"@iconify-json/logos": "^1.2.4",
|
|
36
36
|
"@iconify-json/ri": "^1.2.5",
|
|
37
|
-
"@iconify-json/tabler": "^1.2.
|
|
38
|
-
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@2.0.0-
|
|
37
|
+
"@iconify-json/tabler": "^1.2.16",
|
|
38
|
+
"@nuxt/devtools-kit": "npm:@nuxt/devtools-kit-nightly@2.0.0-28994885.580efe5",
|
|
39
39
|
"@nuxt/kit": "^3.15.4",
|
|
40
|
-
"@unocss/core": "^65.
|
|
41
|
-
"@unocss/nuxt": "^65.
|
|
42
|
-
"@unocss/preset-attributify": "^65.
|
|
43
|
-
"@unocss/preset-icons": "^65.
|
|
44
|
-
"@unocss/preset-mini": "^65.
|
|
45
|
-
"@unocss/reset": "^65.
|
|
46
|
-
"@vueuse/core": "^12.
|
|
47
|
-
"@vueuse/integrations": "^12.
|
|
48
|
-
"@vueuse/nuxt": "^12.
|
|
40
|
+
"@unocss/core": "^65.5.0",
|
|
41
|
+
"@unocss/nuxt": "^65.5.0",
|
|
42
|
+
"@unocss/preset-attributify": "^65.5.0",
|
|
43
|
+
"@unocss/preset-icons": "^65.5.0",
|
|
44
|
+
"@unocss/preset-mini": "^65.5.0",
|
|
45
|
+
"@unocss/reset": "^65.5.0",
|
|
46
|
+
"@vueuse/core": "^12.7.0",
|
|
47
|
+
"@vueuse/integrations": "^12.7.0",
|
|
48
|
+
"@vueuse/nuxt": "^12.7.0",
|
|
49
49
|
"defu": "^6.1.4",
|
|
50
50
|
"focus-trap": "^7.6.4",
|
|
51
51
|
"splitpanes": "^3.1.8",
|
|
52
|
-
"unocss": "^65.
|
|
52
|
+
"unocss": "^65.5.0",
|
|
53
53
|
"v-lazy-show": "^0.3.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-
|
|
56
|
+
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@2.0.0-28994885.580efe5",
|
|
57
57
|
"nuxt": "^3.15.4"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// eslint-disable-next-line ts/ban-ts-comment
|
|
3
|
-
// @ts-ignore tsconfig
|
|
4
|
-
import { NuxtLink } from '#components'
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<{
|
|
7
|
-
to?: string
|
|
8
|
-
icon?: string
|
|
9
|
-
border?: boolean
|
|
10
|
-
disabled?: boolean
|
|
11
|
-
type?: 'submit' | 'reset' | 'button'
|
|
12
|
-
}>(), {
|
|
13
|
-
border: true,
|
|
14
|
-
type: 'button',
|
|
15
|
-
})
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<Component
|
|
20
|
-
:is="to ? NuxtLink : 'button'"
|
|
21
|
-
:to="to"
|
|
22
|
-
v-bind="{ ...$attrs, ...(!to && { type }), ...(disabled ? { disabled: true } : { tabindex: 0 }) }"
|
|
23
|
-
:class="[
|
|
24
|
-
{ 'n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover': border },
|
|
25
|
-
{ 'n-icon-button': !$slots.default },
|
|
26
|
-
]"
|
|
27
|
-
class="n-button n-transition n-disabled:n-disabled"
|
|
28
|
-
>
|
|
29
|
-
<slot name="icon">
|
|
30
|
-
<NIcon v-if="icon" :icon="icon" :class="{ 'n-button-icon': $slots.default }" />
|
|
31
|
-
</slot>
|
|
32
|
-
<slot />
|
|
33
|
-
</Component>
|
|
34
|
-
</template>
|