@nuxt/devtools-ui-kit 3.4.1 → 3.4.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.
Files changed (52) hide show
  1. package/dist/components/NBadge.d.vue.ts +13 -5
  2. package/dist/components/NBadge.vue +5 -0
  3. package/dist/components/NBadgeHashed.d.vue.ts +16 -21
  4. package/dist/components/NBadgeHashed.vue +19 -0
  5. package/dist/components/NCard.d.vue.ts +13 -5
  6. package/dist/components/NCard.vue +5 -0
  7. package/dist/components/NCheckbox.d.vue.ts +24 -36
  8. package/dist/components/NCheckbox.vue +29 -0
  9. package/dist/components/NCodeBlock.d.vue.ts +18 -64
  10. package/dist/components/NCodeBlock.vue +38 -0
  11. package/dist/components/NDarkToggle.d.vue.ts +18 -74
  12. package/dist/components/NDarkToggle.vue +60 -0
  13. package/dist/components/NDialog.d.vue.ts +28 -80
  14. package/dist/components/NDialog.vue +63 -0
  15. package/dist/components/NDrawer.d.vue.ts +26 -77
  16. package/dist/components/NDrawer.vue +64 -0
  17. package/dist/components/NDropdown.d.vue.ts +28 -36
  18. package/dist/components/NDropdown.vue +31 -0
  19. package/dist/components/NIcon.d.vue.ts +6 -9
  20. package/dist/components/NIcon.vue +9 -0
  21. package/dist/components/NIconTitle.d.vue.ts +17 -15
  22. package/dist/components/NIconTitle.vue +15 -0
  23. package/dist/components/NLink.d.vue.ts +19 -29
  24. package/dist/components/NLink.vue +27 -0
  25. package/dist/components/NLoading.d.vue.ts +13 -10
  26. package/dist/components/NLoading.vue +10 -0
  27. package/dist/components/NMarkdown.d.vue.ts +7 -19
  28. package/dist/components/NMarkdown.vue +16 -0
  29. package/dist/components/NNavbar.d.vue.ts +25 -34
  30. package/dist/components/NNavbar.vue +30 -0
  31. package/dist/components/NNotification.d.vue.ts +3 -48
  32. package/dist/components/NNotification.vue +44 -0
  33. package/dist/components/NPanelGrids.d.vue.ts +13 -5
  34. package/dist/components/NPanelGrids.vue +5 -0
  35. package/dist/components/NRadio.d.vue.ts +26 -40
  36. package/dist/components/NRadio.vue +33 -0
  37. package/dist/components/NSectionBlock.d.vue.ts +38 -97
  38. package/dist/components/NSectionBlock.vue +67 -0
  39. package/dist/components/NSelect.d.vue.ts +30 -37
  40. package/dist/components/NSelect.vue +28 -0
  41. package/dist/components/NSelectTabs.d.vue.ts +18 -49
  42. package/dist/components/NSelectTabs.vue +42 -0
  43. package/dist/components/NSplitPane.d.vue.ts +28 -82
  44. package/dist/components/NSplitPane.vue +37 -0
  45. package/dist/components/NSwitch.d.vue.ts +27 -34
  46. package/dist/components/NSwitch.vue +29 -0
  47. package/dist/components/NTextInput.d.vue.ts +34 -40
  48. package/dist/components/NTextInput.vue +28 -0
  49. package/dist/components/NTip.d.vue.ts +18 -16
  50. package/dist/components/NTip.vue +16 -0
  51. package/dist/module.json +1 -1
  52. package/package.json +4 -4
@@ -1,82 +1,28 @@
1
- <script setup lang="ts">
2
- import { useLocalStorage } from '@vueuse/core'
3
- import { Pane, Splitpanes } from 'splitpanes'
4
- import { computed, ref } from 'vue'
5
-
6
- import 'splitpanes/dist/splitpanes.css'
7
-
8
- const props = withDefaults(defineProps<{
9
- /**
10
- * The key to use for storing the pane sizes in localStorage.
11
- */
12
- storageKey?: string
13
- stateKey?: string
14
- leftSize?: number
15
- minSize?: number
16
- horizontal?: boolean
17
- }>(), {
18
- stateKey: 'nuxt-devtools-panels-state',
19
- })
20
-
21
- const state = useLocalStorage<Record<string, number>>(props.stateKey, {} as any, { listenToStorageChanges: false })
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)
32
- </script>
33
-
34
- <template>
35
- <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 ? (minSize || 10) : 100">
37
- <slot name="left" />
38
- </Pane>
39
- <Pane v-if="$slots.right" relative h-full class="of-auto!" :min-size="minSize || 10">
40
- <slot name="right" />
41
- </Pane>
42
- </Splitpanes>
43
- </template>
44
-
45
- <style>
46
- .splitpanes__splitter {
47
- position: relative;
48
- }
49
- .splitpanes__splitter:before {
50
- position: absolute;
51
- left: 0;
52
- top: 0;
53
- transition: 0.2s ease;
54
- content: '';
55
- transition: opacity 0.4s;
56
- z-index: 1;
57
- }
58
- .splitpanes__splitter:hover:before {
59
- background: #8881;
60
- opacity: 1;
61
- }
62
- .splitpanes--vertical > .splitpanes__splitter {
63
- min-width: 0 !important;
64
- width: 0 !important;
65
- --at-apply: border-r border-base;
66
- }
67
- .splitpanes--horizontal > .splitpanes__splitter {
68
- min-height: 0 !important;
69
- height: 0 !important;
70
- --at-apply: border-t border-base;
71
- }
72
- .splitpanes--vertical > .splitpanes__splitter:before {
73
- left: -5px;
74
- right: -4px;
75
- height: 100%;
76
- }
77
- .splitpanes--horizontal > .splitpanes__splitter:before {
78
- top: -5px;
79
- bottom: -4px;
80
- width: 100%;
81
- }
82
- </style>
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_16: {}, __VLS_24: {};
13
+ type __VLS_Slots = {} & {
14
+ left?: (props: typeof __VLS_16) => any;
15
+ } & {
16
+ right?: (props: typeof __VLS_24) => any;
17
+ };
18
+ declare const __VLS_base: 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 __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,37 @@
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);
22
+ </script>
23
+
24
+ <template>
25
+ <Splitpanes :horizontal="horizontal" h-full of-hidden @resize="size = $event[0].size">
26
+ <Pane h-full class="of-auto!" :size="size" :min-size="$slots.right ? minSize || 10 : 100">
27
+ <slot name="left" />
28
+ </Pane>
29
+ <Pane v-if="$slots.right" relative h-full class="of-auto!" :min-size="minSize || 10">
30
+ <slot name="right" />
31
+ </Pane>
32
+ </Splitpanes>
33
+ </template>
34
+
35
+ <style>
36
+ .splitpanes__splitter{position:relative}.splitpanes__splitter:before{content:"";left:0;position:absolute;top:0;transition:.2s ease;transition:opacity .4s;z-index:1}.splitpanes__splitter:hover:before{background:#8881;opacity:1}.splitpanes--vertical>.splitpanes__splitter{min-width:0!important;width:0!important;--at-apply:border-r border-base}.splitpanes--horizontal>.splitpanes__splitter{height:0!important;min-height:0!important;--at-apply:border-t border-base}.splitpanes--vertical>.splitpanes__splitter:before{height:100%;left:-5px;right:-4px}.splitpanes--horizontal>.splitpanes__splitter:before{bottom:-4px;top:-5px;width:100%}
37
+ </style>
@@ -1,34 +1,27 @@
1
- <script setup lang="ts">
2
- withDefaults(
3
- defineProps<{
4
- disabled?: boolean
5
- }>(),
6
- {
7
- disabled: false,
8
- },
9
- )
10
- const checked = defineModel('modelValue', {
11
- type: Boolean,
12
- default: false,
13
- })
14
- </script>
15
-
16
- <template>
17
- <label
18
- class="n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled"
19
- :checked="checked || null"
20
- :disabled="disabled || null"
21
- >
22
- <input
23
- v-model="checked"
24
- type="checkbox"
25
- class="peer absolute op0"
26
- :disabled="disabled"
27
- @keypress.enter="checked = !checked"
28
- >
29
- <div class="n-switch-slider n-transition n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base">
30
- <div class="n-switch-thumb n-transition n-checked:n-switch-thumb-checked" />
31
- </div>
32
- <slot />
33
- </label>
34
- </template>
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ };
4
+ declare const checked: import("vue").ModelRef<boolean, string, boolean, boolean>;
5
+ type __VLS_ModelProps = {
6
+ 'modelValue'?: typeof checked['value'];
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare var __VLS_1: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_1) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: boolean) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ }>, {
18
+ disabled: boolean;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,29 @@
1
+ <script setup>
2
+ defineProps({
3
+ disabled: { type: Boolean, required: false, default: false }
4
+ });
5
+ const checked = defineModel("modelValue", {
6
+ type: Boolean,
7
+ default: false
8
+ });
9
+ </script>
10
+
11
+ <template>
12
+ <label
13
+ class="n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled"
14
+ :checked="checked || null"
15
+ :disabled="disabled || null"
16
+ >
17
+ <input
18
+ v-model="checked"
19
+ type="checkbox"
20
+ class="peer absolute op0"
21
+ :disabled="disabled"
22
+ @keypress.enter="checked = !checked"
23
+ >
24
+ <div class="n-switch-slider n-transition n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base">
25
+ <div class="n-switch-thumb n-transition n-checked:n-switch-thumb-checked" />
26
+ </div>
27
+ <slot />
28
+ </label>
29
+ </template>
@@ -1,40 +1,34 @@
1
- <script setup lang="ts">
2
- import { useVModel } from '@vueuse/core'
3
-
4
- const props = withDefaults(
5
- defineProps<{
6
- modelValue?: string | number
7
- icon?: string
8
- placeholder?: string
9
- disabled?: boolean
10
- autofocus?: boolean
11
- autocomplete?: string
12
- readonly?: boolean
13
- type?: string
14
- }>(),
15
- {
16
- modelValue: '',
17
- type: 'text',
18
- },
19
- )
20
-
21
- const emit = defineEmits<{
22
- (name: 'keydown', event: KeyboardEvent): void
23
- (name: 'keyup', event: KeyboardEvent): void
24
- (name: 'change', event: Event): void
25
- }>()
26
- const input = useVModel(props, 'modelValue', emit, { passive: true })
27
- </script>
28
-
29
- <template>
30
- <div class="n-text-input flex flex items-center border n-border-base rounded n-bg-base py-1 pl-1 pr-2 focus-within:border-context focus-within:n-focus-base">
31
- <slot name="icon">
32
- <NIcon v-if="icon" :icon="icon" class="ml-0.3em mr-0.1em text-1.1em op50" />
33
- </slot>
34
- <input
35
- v-model="input"
36
- v-bind="$props as any"
37
- class="ml-0.4em w-full flex-auto n-bg-base !outline-none"
38
- >
39
- </div>
40
- </template>
1
+ type __VLS_Props = {
2
+ modelValue?: string | number;
3
+ icon?: string;
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ autofocus?: boolean;
7
+ autocomplete?: string;
8
+ readonly?: boolean;
9
+ type?: string;
10
+ };
11
+ declare var __VLS_1: {};
12
+ type __VLS_Slots = {} & {
13
+ icon?: (props: typeof __VLS_1) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
+ keydown: (event: KeyboardEvent) => any;
17
+ keyup: (event: KeyboardEvent) => any;
18
+ change: (event: Event) => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onKeydown?: ((event: KeyboardEvent) => any) | undefined;
21
+ onKeyup?: ((event: KeyboardEvent) => any) | undefined;
22
+ onChange?: ((event: Event) => any) | undefined;
23
+ }>, {
24
+ modelValue: string | number;
25
+ type: string;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import { useVModel } from "@vueuse/core";
3
+ const props = defineProps({
4
+ modelValue: { type: [String, Number], required: false, default: "" },
5
+ icon: { type: String, required: false },
6
+ placeholder: { type: String, required: false },
7
+ disabled: { type: Boolean, required: false },
8
+ autofocus: { type: Boolean, required: false },
9
+ autocomplete: { type: String, required: false },
10
+ readonly: { type: Boolean, required: false },
11
+ type: { type: String, required: false, default: "text" }
12
+ });
13
+ const emit = defineEmits(["keydown", "keyup", "change"]);
14
+ const input = useVModel(props, "modelValue", emit, { passive: true });
15
+ </script>
16
+
17
+ <template>
18
+ <div class="n-text-input flex flex items-center border n-border-base rounded n-bg-base py-1 pl-1 pr-2 focus-within:border-context focus-within:n-focus-base">
19
+ <slot name="icon">
20
+ <NIcon v-if="icon" :icon="icon" class="ml-0.3em mr-0.1em text-1.1em op50" />
21
+ </slot>
22
+ <input
23
+ v-model="input"
24
+ v-bind="$props"
25
+ class="ml-0.4em w-full flex-auto n-bg-base !outline-none"
26
+ >
27
+ </div>
28
+ </template>
@@ -1,16 +1,18 @@
1
- <script setup lang="ts">
2
- defineProps<{
3
- icon?: string
4
- }>()
5
- </script>
6
-
7
- <template>
8
- <div class="n-tip n-tip-base">
9
- <slot name="icon">
10
- <NIcon v-if="icon" :icon="icon" class="n-tip-icon" />
11
- </slot>
12
- <div>
13
- <slot />
14
- </div>
15
- </div>
16
- </template>
1
+ type __VLS_Props = {
2
+ icon?: string;
3
+ };
4
+ declare var __VLS_1: {}, __VLS_8: {};
5
+ type __VLS_Slots = {} & {
6
+ icon?: (props: typeof __VLS_1) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: 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>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,16 @@
1
+ <script setup>
2
+ defineProps({
3
+ icon: { type: String, required: false }
4
+ });
5
+ </script>
6
+
7
+ <template>
8
+ <div class="n-tip n-tip-base">
9
+ <slot name="icon">
10
+ <NIcon v-if="icon" :icon="icon" class="n-tip-icon" />
11
+ </slot>
12
+ <div>
13
+ <slot />
14
+ </div>
15
+ </div>
16
+ </template>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-ui-kit",
3
3
  "configKey": "devtoolsUIKit",
4
- "version": "3.4.1",
4
+ "version": "3.4.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-ui-kit",
3
3
  "type": "module",
4
- "version": "3.4.1",
4
+ "version": "3.4.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://devtools.nuxt.com/module/ui-kit",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@nuxt/devtools": "3.4.1"
31
+ "@nuxt/devtools": "3.4.2"
32
32
  },
33
33
  "dependencies": {
34
34
  "@iconify-json/carbon": "^1.2.25",
@@ -50,11 +50,11 @@
50
50
  "splitpanes": "^4.1.2",
51
51
  "unocss": "^66.7.5",
52
52
  "v-lazy-show": "^0.3.0",
53
- "@nuxt/devtools-kit": "3.4.1"
53
+ "@nuxt/devtools-kit": "3.4.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "nuxt": "^4.5.1",
57
- "@nuxt/devtools": "3.4.1"
57
+ "@nuxt/devtools": "3.4.2"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"