@nuxt/devtools-ui-kit 2.4.0 → 2.5.0-beta.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.
Files changed (54) hide show
  1. package/dist/components/NBadge.vue.d.ts +12 -0
  2. package/dist/components/NBadgeHashed.vue +11 -13
  3. package/dist/components/NBadgeHashed.vue.d.ts +15 -0
  4. package/dist/components/NButton.mjs +11 -9
  5. package/dist/components/NCard.vue.d.ts +12 -0
  6. package/dist/components/NCheckbox.vue +8 -15
  7. package/dist/components/NCheckbox.vue.d.ts +23 -0
  8. package/dist/components/NCodeBlock.vue +20 -33
  9. package/dist/components/NCodeBlock.vue.d.ts +13 -0
  10. package/dist/components/NDarkToggle.vue +31 -49
  11. package/dist/components/NDarkToggle.vue.d.ts +12 -0
  12. package/dist/components/NDialog.vue +30 -47
  13. package/dist/components/NDialog.vue.d.ts +27 -0
  14. package/dist/components/NDrawer.vue +28 -41
  15. package/dist/components/NDrawer.vue.d.ts +25 -0
  16. package/dist/components/NDropdown.vue +12 -17
  17. package/dist/components/NDropdown.vue.d.ts +27 -0
  18. package/dist/components/NIcon.vue +4 -4
  19. package/dist/components/NIcon.vue.d.ts +5 -0
  20. package/dist/components/NIconTitle.vue +5 -5
  21. package/dist/components/NIconTitle.vue.d.ts +16 -0
  22. package/dist/components/NLink.vue +13 -15
  23. package/dist/components/NLink.vue.d.ts +18 -0
  24. package/dist/components/NLoading.vue.d.ts +12 -0
  25. package/dist/components/NMarkdown.vue +6 -9
  26. package/dist/components/NMarkdown.vue.d.ts +6 -0
  27. package/dist/components/NNavbar.vue +9 -13
  28. package/dist/components/NNavbar.vue.d.ts +24 -0
  29. package/dist/components/NNotification.vue +21 -25
  30. package/dist/components/NNotification.vue.d.ts +2 -0
  31. package/dist/components/NPanelGrids.vue.d.ts +12 -0
  32. package/dist/components/NRadio.vue +11 -18
  33. package/dist/components/NRadio.vue.d.ts +25 -0
  34. package/dist/components/NSectionBlock.vue +16 -26
  35. package/dist/components/NSectionBlock.vue.d.ts +37 -0
  36. package/dist/components/NSelect.vue +10 -19
  37. package/dist/components/NSelect.vue.d.ts +29 -0
  38. package/dist/components/NSelectTabs.vue +14 -21
  39. package/dist/components/NSelectTabs.vue.d.ts +17 -0
  40. package/dist/components/NSplitPane.vue +22 -32
  41. package/dist/components/NSplitPane.vue.d.ts +27 -0
  42. package/dist/components/NSwitch.vue +7 -12
  43. package/dist/components/NSwitch.vue.d.ts +25 -0
  44. package/dist/components/NTextInput.vue +15 -27
  45. package/dist/components/NTextInput.vue.d.ts +33 -0
  46. package/dist/components/NTip.vue +4 -4
  47. package/dist/components/NTip.vue.d.ts +17 -0
  48. package/dist/module.json +2 -2
  49. package/dist/runtime/client.d.ts +3 -0
  50. package/dist/types.d.mts +3 -1
  51. package/dist/unocss.mjs +1 -1
  52. package/package.json +18 -18
  53. package/dist/module.cjs +0 -5
  54. package/dist/types.d.ts +0 -1
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ direction?: 'start' | 'end';
4
+ };
5
+ declare var __VLS_1: {
6
+ enabled: any;
7
+ click: () => boolean;
8
+ }, __VLS_11: {};
9
+ type __VLS_Slots = {} & {
10
+ trigger?: (props: typeof __VLS_1) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_11) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
+ [x: string]: never;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ [x: `on${Capitalize<any>}`]: ((...args: unknown[]) => any) | undefined;
18
+ }>, {
19
+ direction: "start" | "end";
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
+ };
@@ -1,7 +1,7 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- icon?: string
4
- }>()
1
+ <script setup>
2
+ defineProps({
3
+ icon: { type: String, required: false }
4
+ });
5
5
  </script>
6
6
 
7
7
  <template>
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ icon?: string;
3
+ };
4
+ 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>;
5
+ export default _default;
@@ -1,8 +1,8 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- icon?: string
4
- text?: string
5
- }>()
1
+ <script setup>
2
+ defineProps({
3
+ icon: { type: String, required: false },
4
+ text: { type: String, required: false }
5
+ });
6
6
  </script>
7
7
 
8
8
  <template>
@@ -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 lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- to?: string
6
- href?: string
7
- target?: string
8
- underline?: boolean
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
- href: link,
18
- target,
19
- rel: target === '_blank' ? 'noopener noreferrer' : null,
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 lang="ts">
2
- // This components requires to run in DevTools to render correctly
3
-
4
- import { devToolsClient } from '../runtime/client'
5
-
6
- defineProps<{
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 lang="ts">
2
- defineProps<{
3
- search?: string
4
- noPadding?: boolean
5
- }>()
6
-
7
- const emit = defineEmits<{
8
- (event: 'update:search', value: string): void
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 !== undefined"
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 lang='ts'>
2
- import type { DevtoolsUiShowNotificationPosition } from '../composables/notification'
3
-
4
- import { ref } from 'vue'
5
- import { devtoolsUiProvideNotificationFn } from '../composables/notification'
6
-
7
- const show = ref(false)
8
- const icon = ref<string>()
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 ?? 'text-primary border-primary'
17
- icon.value = data.icon
18
- show.value = true
19
- position.value = data.position ?? 'top-center'
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
- { 'pointer-events-none overflow-hidden': !show },
31
- { 'top-0': position.startsWith('top') },
32
- { 'bottom-0': position.startsWith('bottom') },
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 lang="ts">
2
- import { useVModel } from '@vueuse/core'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- modelValue?: string
7
- disabled?: boolean
8
- name?: string
9
- value?: string
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 lang="ts">
2
- import { useVModel } from '@vueuse/core'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- icon?: string
7
- text?: string
8
- description?: string
9
- containerClass?: string
10
- headerClass?: string
11
- collapse?: boolean
12
- open?: boolean
13
- padding?: boolean | string
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="(onToggle as any)">
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 lang="ts">
2
- import { useVModel } from '@vueuse/core'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- modelValue?: any
7
- placeholder?: string
8
- icon?: string
9
- disabled?: boolean
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 lang="ts">
2
- import { useVModel } from '@vueuse/core'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- modelValue?: any
7
- disabled?: boolean
8
- options: { value: any, label: string }[]
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
- idx ? 'border-l n-border-base ml--1px' : '',
30
- i.value === input ? 'n-bg-active' : '',
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
- i.value === input ? '' : 'op35',
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;