@nuxt/devtools-ui-kit 2.4.1 → 2.5.0-beta.2
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/NBadge.vue.d.ts +12 -0
- package/dist/components/NBadgeHashed.vue +11 -13
- package/dist/components/NBadgeHashed.vue.d.ts +15 -0
- package/dist/components/NCard.vue.d.ts +12 -0
- package/dist/components/NCheckbox.vue +8 -15
- package/dist/components/NCheckbox.vue.d.ts +23 -0
- package/dist/components/NCodeBlock.vue +20 -33
- package/dist/components/NCodeBlock.vue.d.ts +13 -0
- package/dist/components/NDarkToggle.vue +31 -49
- package/dist/components/NDarkToggle.vue.d.ts +12 -0
- package/dist/components/NDialog.vue +30 -47
- package/dist/components/NDialog.vue.d.ts +27 -0
- package/dist/components/NDrawer.vue +28 -41
- package/dist/components/NDrawer.vue.d.ts +25 -0
- package/dist/components/NDropdown.vue +12 -17
- package/dist/components/NDropdown.vue.d.ts +27 -0
- package/dist/components/NIcon.vue +4 -4
- package/dist/components/NIcon.vue.d.ts +5 -0
- package/dist/components/NIconTitle.vue +5 -5
- package/dist/components/NIconTitle.vue.d.ts +16 -0
- package/dist/components/NLink.vue +13 -15
- package/dist/components/NLink.vue.d.ts +18 -0
- package/dist/components/NLoading.vue.d.ts +12 -0
- package/dist/components/NMarkdown.vue +6 -9
- package/dist/components/NMarkdown.vue.d.ts +6 -0
- package/dist/components/NNavbar.vue +9 -13
- package/dist/components/NNavbar.vue.d.ts +24 -0
- package/dist/components/NNotification.vue +21 -25
- package/dist/components/NNotification.vue.d.ts +2 -0
- package/dist/components/NPanelGrids.vue.d.ts +12 -0
- package/dist/components/NRadio.vue +11 -18
- package/dist/components/NRadio.vue.d.ts +25 -0
- package/dist/components/NSectionBlock.vue +16 -26
- package/dist/components/NSectionBlock.vue.d.ts +37 -0
- package/dist/components/NSelect.vue +10 -19
- package/dist/components/NSelect.vue.d.ts +29 -0
- package/dist/components/NSelectTabs.vue +14 -21
- package/dist/components/NSelectTabs.vue.d.ts +17 -0
- package/dist/components/NSplitPane.vue +22 -32
- package/dist/components/NSplitPane.vue.d.ts +27 -0
- package/dist/components/NSwitch.vue +7 -12
- package/dist/components/NSwitch.vue.d.ts +25 -0
- package/dist/components/NTextInput.vue +15 -27
- package/dist/components/NTextInput.vue.d.ts +33 -0
- package/dist/components/NTip.vue +4 -4
- package/dist/components/NTip.vue.d.ts +17 -0
- package/dist/module.json +2 -2
- package/dist/runtime/client.d.ts +3 -0
- package/dist/types.d.mts +3 -1
- package/dist/unocss.mjs +1 -1
- package/package.json +18 -18
- package/dist/module.cjs +0 -5
- package/dist/types.d.ts +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
icon?: string;
|
|
3
|
+
text?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { computed } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const link = computed(() => props.href || props.to)
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
to: { type: String, required: false },
|
|
5
|
+
href: { type: String, required: false },
|
|
6
|
+
target: { type: String, required: false },
|
|
7
|
+
underline: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const link = computed(() => props.href || props.to);
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
12
|
<template>
|
|
15
13
|
<NuxtLink
|
|
16
14
|
v-bind="link ? {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
href: link,
|
|
16
|
+
target,
|
|
17
|
+
rel: target === '_blank' ? 'noopener noreferrer' : null
|
|
18
|
+
} : {}"
|
|
21
19
|
:class="{ 'n-link n-transition hover:n-link-hover n-link-base': link || underline }"
|
|
22
20
|
>
|
|
23
21
|
<slot />
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
to?: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
target?: string;
|
|
5
|
+
underline?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_6: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_6) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
markdown: string
|
|
8
|
-
tag?: string
|
|
9
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { devToolsClient } from "../runtime/client";
|
|
3
|
+
defineProps({
|
|
4
|
+
markdown: { type: String, required: true },
|
|
5
|
+
tag: { type: String, required: false }
|
|
6
|
+
});
|
|
10
7
|
</script>
|
|
11
8
|
|
|
12
9
|
<template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
markdown: string;
|
|
3
|
+
tag?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
defineProps
|
|
3
|
-
search
|
|
4
|
-
noPadding
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(
|
|
9
|
-
}>()
|
|
10
|
-
|
|
11
|
-
function update(event: any) {
|
|
12
|
-
emit('update:search', event.target.value)
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
search: { type: String, required: false },
|
|
4
|
+
noPadding: { type: Boolean, required: false }
|
|
5
|
+
});
|
|
6
|
+
const emit = defineEmits(["update:search"]);
|
|
7
|
+
function update(event) {
|
|
8
|
+
emit("update:search", event.target.value);
|
|
13
9
|
}
|
|
14
10
|
</script>
|
|
15
11
|
|
|
@@ -18,7 +14,7 @@ function update(event: any) {
|
|
|
18
14
|
<div flex="~ gap4 wrap" items-center>
|
|
19
15
|
<slot name="search">
|
|
20
16
|
<NTextInput
|
|
21
|
-
v-if="search !==
|
|
17
|
+
v-if="search !== void 0"
|
|
22
18
|
placeholder="Search..."
|
|
23
19
|
icon="carbon-search"
|
|
24
20
|
n="primary" flex-auto
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
search?: string;
|
|
3
|
+
noPadding?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {}, __VLS_11: {}, __VLS_13: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
search?: (props: typeof __VLS_1) => any;
|
|
8
|
+
} & {
|
|
9
|
+
actions?: (props: typeof __VLS_11) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_13) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:search": (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const text = ref<string>()
|
|
10
|
-
const classes = ref<string>()
|
|
11
|
-
const position = ref<DevtoolsUiShowNotificationPosition>('top-center')
|
|
12
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { devtoolsUiProvideNotificationFn } from "../composables/notification";
|
|
4
|
+
const show = ref(false);
|
|
5
|
+
const icon = ref();
|
|
6
|
+
const text = ref();
|
|
7
|
+
const classes = ref();
|
|
8
|
+
const position = ref("top-center");
|
|
13
9
|
devtoolsUiProvideNotificationFn((data) => {
|
|
14
|
-
text.value = data.message
|
|
15
|
-
icon.value = data.icon
|
|
16
|
-
classes.value = data.classes ??
|
|
17
|
-
icon.value = data.icon
|
|
18
|
-
show.value = true
|
|
19
|
-
position.value = data.position ??
|
|
10
|
+
text.value = data.message;
|
|
11
|
+
icon.value = data.icon;
|
|
12
|
+
classes.value = data.classes ?? "text-primary border-primary";
|
|
13
|
+
icon.value = data.icon;
|
|
14
|
+
show.value = true;
|
|
15
|
+
position.value = data.position ?? "top-center";
|
|
20
16
|
setTimeout(() => {
|
|
21
|
-
show.value = false
|
|
22
|
-
}, data.duration ?? 1500)
|
|
23
|
-
})
|
|
17
|
+
show.value = false;
|
|
18
|
+
}, data.duration ?? 1500);
|
|
19
|
+
});
|
|
24
20
|
</script>
|
|
25
21
|
|
|
26
22
|
<template>
|
|
27
23
|
<div
|
|
28
24
|
fixed left-0 right-0 z-999 text-center
|
|
29
25
|
:class="[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
{ 'pointer-events-none overflow-hidden': !show },
|
|
27
|
+
{ 'top-0': position.startsWith('top') },
|
|
28
|
+
{ 'bottom-0': position.startsWith('bottom') }
|
|
29
|
+
]"
|
|
34
30
|
>
|
|
35
31
|
<div flex :style="{ justifyContent: position.includes('right') ? 'right' : position.includes('left') ? 'left' : 'center' }">
|
|
36
32
|
<div
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useVModel } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
modelValue: '',
|
|
13
|
-
disabled: false,
|
|
14
|
-
},
|
|
15
|
-
)
|
|
16
|
-
const emit = defineEmits<{ (...args: any): void }>()
|
|
17
|
-
const model = useVModel(props, 'modelValue', emit, { passive: true })
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: String, required: false, default: "" },
|
|
5
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
6
|
+
name: { type: String, required: false },
|
|
7
|
+
value: { type: String, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits([]);
|
|
10
|
+
const model = useVModel(props, "modelValue", emit, { passive: true });
|
|
18
11
|
</script>
|
|
19
12
|
|
|
20
13
|
<template>
|
|
@@ -30,7 +23,7 @@ const model = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
30
23
|
:disabled="disabled"
|
|
31
24
|
:name="name"
|
|
32
25
|
:value="value"
|
|
33
|
-
@keypress.enter="model = value
|
|
26
|
+
@keypress.enter="model = value"
|
|
34
27
|
>
|
|
35
28
|
<span class="n-radio-box n-checked:n-radio-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition">
|
|
36
29
|
<div class="n-radio-inner n-checked:n-radio-inner-checked n-transition" />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
name?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
[x: string]: never;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
[x: `on${Capitalize<any>}`]: ((...args: unknown[]) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
modelValue: string;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useVModel } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
containerClass: '',
|
|
17
|
-
open: true,
|
|
18
|
-
padding: true,
|
|
19
|
-
collapse: true,
|
|
20
|
-
},
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
const open = useVModel(props, 'open', undefined, { passive: true })
|
|
24
|
-
function onToggle(e: any) {
|
|
25
|
-
open.value = e.target.open
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
icon: { type: String, required: false },
|
|
5
|
+
text: { type: String, required: false },
|
|
6
|
+
description: { type: String, required: false },
|
|
7
|
+
containerClass: { type: String, required: false, default: "" },
|
|
8
|
+
headerClass: { type: String, required: false },
|
|
9
|
+
collapse: { type: Boolean, required: false, default: true },
|
|
10
|
+
open: { type: Boolean, required: false, default: true },
|
|
11
|
+
padding: { type: [Boolean, String], required: false, default: true }
|
|
12
|
+
});
|
|
13
|
+
const open = useVModel(props, "open", void 0, { passive: true });
|
|
14
|
+
function onToggle(e) {
|
|
15
|
+
open.value = e.target.open;
|
|
26
16
|
}
|
|
27
17
|
</script>
|
|
28
18
|
|
|
29
19
|
<template>
|
|
30
20
|
<!-- TODO: Seems something wrong with the DOM type -->
|
|
31
21
|
<!-- @vue-ignore -->
|
|
32
|
-
<details :open="open" @toggle="
|
|
22
|
+
<details :open="open" @toggle="onToggle">
|
|
33
23
|
<summary
|
|
34
24
|
class="cursor-pointer select-none hover:bg-active p4"
|
|
35
25
|
:class="collapse ? '' : 'pointer-events-none'"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
icon?: string;
|
|
3
|
+
text?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
containerClass?: string;
|
|
6
|
+
headerClass?: string;
|
|
7
|
+
collapse?: boolean;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
padding?: boolean | string;
|
|
10
|
+
};
|
|
11
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
text?: (props: typeof __VLS_5) => any;
|
|
14
|
+
} & {
|
|
15
|
+
description?: (props: typeof __VLS_7) => any;
|
|
16
|
+
} & {
|
|
17
|
+
actions?: (props: typeof __VLS_9) => any;
|
|
18
|
+
} & {
|
|
19
|
+
details?: (props: typeof __VLS_15) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_17) => any;
|
|
22
|
+
} & {
|
|
23
|
+
footer?: (props: typeof __VLS_19) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
containerClass: string;
|
|
27
|
+
collapse: boolean;
|
|
28
|
+
open: boolean;
|
|
29
|
+
padding: boolean | string;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useVModel } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
modelValue: undefined,
|
|
13
|
-
placeholder: '',
|
|
14
|
-
disabled: false,
|
|
15
|
-
icon: '',
|
|
16
|
-
},
|
|
17
|
-
)
|
|
18
|
-
const emit = defineEmits<{ (...args: any): void }>()
|
|
19
|
-
const input = useVModel(props, 'modelValue', emit, { passive: true })
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: null, required: false, default: void 0 },
|
|
5
|
+
placeholder: { type: String, required: false, default: "" },
|
|
6
|
+
icon: { type: String, required: false, default: "" },
|
|
7
|
+
disabled: { type: Boolean, required: false, default: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits([]);
|
|
10
|
+
const input = useVModel(props, "modelValue", emit, { passive: true });
|
|
20
11
|
</script>
|
|
21
12
|
|
|
22
13
|
<template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: any;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {}, __VLS_7: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_7) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
[x: string]: never;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
[x: `on${Capitalize<any>}`]: ((...args: unknown[]) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
modelValue: any;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
icon: string;
|
|
21
|
+
placeholder: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useVModel } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
modelValue: undefined,
|
|
12
|
-
disabled: false,
|
|
13
|
-
},
|
|
14
|
-
)
|
|
15
|
-
const emit = defineEmits<{ (...args: any): void }>()
|
|
16
|
-
const input = useVModel(props, 'modelValue', emit, { passive: true })
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: null, required: false, default: void 0 },
|
|
5
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
6
|
+
options: { type: Array, required: true }
|
|
7
|
+
});
|
|
8
|
+
const emit = defineEmits([]);
|
|
9
|
+
const input = useVModel(props, "modelValue", emit, { passive: true });
|
|
17
10
|
</script>
|
|
18
11
|
|
|
19
12
|
<template>
|
|
@@ -26,15 +19,15 @@ const input = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
26
19
|
:disabled="disabled"
|
|
27
20
|
class="relative n-border-base hover:n-bg-active px-0.5em py-0.1em"
|
|
28
21
|
:class="[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
idx ? 'border-l n-border-base ml--1px' : '',
|
|
23
|
+
i.value === input ? 'n-bg-active' : ''
|
|
24
|
+
]"
|
|
32
25
|
:title="i.label"
|
|
33
26
|
>
|
|
34
27
|
<div
|
|
35
28
|
:class="[
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
i.value === input ? '' : 'op35'
|
|
30
|
+
]"
|
|
38
31
|
>{{ i.label }}</div>
|
|
39
32
|
<input
|
|
40
33
|
v-model="input"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: any;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
options: {
|
|
5
|
+
value: any;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
[x: `on${Capitalize<any>}`]: ((...args: unknown[]) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
modelValue: any;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useLocalStorage } from
|
|
3
|
-
import { Pane, Splitpanes } from
|
|
4
|
-
import { computed, ref } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const DEFAULT = 30
|
|
24
|
-
|
|
25
|
-
const key = props.storageKey
|
|
26
|
-
const size = key
|
|
27
|
-
? computed({
|
|
28
|
-
get: () => state.value[key] || props.leftSize || DEFAULT,
|
|
29
|
-
set: (v) => { state.value[key] = v },
|
|
30
|
-
})
|
|
31
|
-
: ref(props.leftSize || DEFAULT)
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useLocalStorage } from "@vueuse/core";
|
|
3
|
+
import { Pane, Splitpanes } from "splitpanes";
|
|
4
|
+
import { computed, ref } from "vue";
|
|
5
|
+
import "splitpanes/dist/splitpanes.css";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
storageKey: { type: String, required: false },
|
|
8
|
+
stateKey: { type: String, required: false, default: "nuxt-devtools-panels-state" },
|
|
9
|
+
leftSize: { type: Number, required: false },
|
|
10
|
+
minSize: { type: Number, required: false },
|
|
11
|
+
horizontal: { type: Boolean, required: false }
|
|
12
|
+
});
|
|
13
|
+
const state = useLocalStorage(props.stateKey, {}, { listenToStorageChanges: false });
|
|
14
|
+
const DEFAULT = 30;
|
|
15
|
+
const key = props.storageKey;
|
|
16
|
+
const size = key ? computed({
|
|
17
|
+
get: () => state.value[key] || props.leftSize || DEFAULT,
|
|
18
|
+
set: (v) => {
|
|
19
|
+
state.value[key] = v;
|
|
20
|
+
}
|
|
21
|
+
}) : ref(props.leftSize || DEFAULT);
|
|
32
22
|
</script>
|
|
33
23
|
|
|
34
24
|
<template>
|
|
35
25
|
<Splitpanes :horizontal="horizontal" h-full of-hidden @resize="size = $event[0].size">
|
|
36
|
-
<Pane h-full class="of-auto!" :size="size" :min-size="$slots.right ?
|
|
26
|
+
<Pane h-full class="of-auto!" :size="size" :min-size="$slots.right ? minSize || 10 : 100">
|
|
37
27
|
<slot name="left" />
|
|
38
28
|
</Pane>
|
|
39
29
|
<Pane v-if="$slots.right" relative h-full class="of-auto!" :min-size="minSize || 10">
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import 'splitpanes/dist/splitpanes.css';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* The key to use for storing the pane sizes in localStorage.
|
|
5
|
+
*/
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
stateKey?: string;
|
|
8
|
+
leftSize?: number;
|
|
9
|
+
minSize?: number;
|
|
10
|
+
horizontal?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_14: {}, __VLS_20: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
left?: (props: typeof __VLS_14) => any;
|
|
15
|
+
} & {
|
|
16
|
+
right?: (props: typeof __VLS_20) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
+
stateKey: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|