@nuxt/devtools-ui-kit 0.3.2 → 0.4.0
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/assets/styles.css +0 -1
- package/dist/components/NButton.vue +1 -1
- package/dist/components/NCheckbox.vue +4 -4
- package/dist/components/NCodeBlock.vue +1 -2
- package/dist/components/NDialog.vue +2 -2
- package/dist/components/NDropdown.vue +1 -1
- package/dist/components/NIconTitle.vue +1 -1
- package/dist/components/NLink.vue +1 -1
- package/dist/components/NLoading.vue +3 -3
- package/dist/components/NPanelGrids.vue +5 -0
- package/dist/components/NRadio.vue +4 -4
- package/dist/components/NSectionBlock.vue +15 -8
- package/dist/components/NSelect.vue +4 -3
- package/dist/components/NSwitch.vue +4 -4
- package/dist/components/NTextInput.vue +3 -3
- package/dist/module.json +1 -1
- package/dist/runtime/client.d.ts +1 -1
- package/dist/unocss.mjs +17 -1
- package/package.json +14 -14
package/dist/assets/styles.css
CHANGED
|
@@ -14,7 +14,7 @@ defineProps<{
|
|
|
14
14
|
:is="to ? NuxtLink : 'button'"
|
|
15
15
|
:to="to"
|
|
16
16
|
v-bind="$attrs"
|
|
17
|
-
class="n-
|
|
17
|
+
class="n-button n-button-base active:n-button-active focus-visible:n-focus-base n-transition hover:n-button-hover n-disabled:n-disabled"
|
|
18
18
|
>
|
|
19
19
|
<slot name="icon">
|
|
20
20
|
<NIcon v-if="icon" :icon="icon" class="n-button-icon" />
|
|
@@ -16,19 +16,19 @@ const checked = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<label
|
|
19
|
-
class="
|
|
19
|
+
class="hover:n-checkbox-hover n-checkbox select-none items-center n-disabled:n-disabled"
|
|
20
20
|
:checked="checked || null"
|
|
21
21
|
:disabled="disabled || null"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
v-model="checked"
|
|
25
25
|
type="checkbox"
|
|
26
|
-
class="absolute op0
|
|
26
|
+
class="peer absolute op0"
|
|
27
27
|
:disabled="disabled"
|
|
28
28
|
@keypress.enter="checked = !checked"
|
|
29
29
|
>
|
|
30
|
-
<span class="n-
|
|
31
|
-
<NIcon class="n-
|
|
30
|
+
<span class="n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition">
|
|
31
|
+
<NIcon class="n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100" />
|
|
32
32
|
</span>
|
|
33
33
|
<span :class="checked ? '' : 'op50'" class="n-transition"><slot /></span>
|
|
34
34
|
</label>
|
|
@@ -27,8 +27,7 @@ const rendered = computed(() => devToolsClient.value?.devtools.renderCodeHighlig
|
|
|
27
27
|
<pre
|
|
28
28
|
class="n-code-block"
|
|
29
29
|
:class="lines ? 'n-code-block-lines' : ''"
|
|
30
|
-
|
|
31
|
-
/>
|
|
30
|
+
><pre class="shiki"><code><template v-for="line, _idx in code.split('\n')" :key="_idx"><span class="line" v-text="line" /><br></template></code></pre></pre>
|
|
32
31
|
</template>
|
|
33
32
|
</template>
|
|
34
33
|
|
|
@@ -47,13 +47,13 @@ export default {
|
|
|
47
47
|
<template>
|
|
48
48
|
<Teleport v-if="show" to="body">
|
|
49
49
|
<div
|
|
50
|
-
class="n-
|
|
50
|
+
class="n-dialog fixed inset-0 z-100 flex items-center justify-center n-transition"
|
|
51
51
|
:class="[
|
|
52
52
|
show ? '' : 'op0 pointer-events-none visibility-none',
|
|
53
53
|
]"
|
|
54
54
|
>
|
|
55
55
|
<div
|
|
56
|
-
class="inset-0
|
|
56
|
+
class="absolute inset-0 -z-1"
|
|
57
57
|
:class="[
|
|
58
58
|
dim ? 'bg-black/50' : '',
|
|
59
59
|
]"
|
|
@@ -22,7 +22,7 @@ onClickOutside(el, () => {
|
|
|
22
22
|
</slot>
|
|
23
23
|
|
|
24
24
|
<div
|
|
25
|
-
class="absolute
|
|
25
|
+
class="absolute z-10 border n-border-base rounded shadow n-transition n-bg-base"
|
|
26
26
|
:class="[enabled ? 'op-100' : 'op0 pointer-events-none -translate-y-1']"
|
|
27
27
|
>
|
|
28
28
|
<slot />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="n-loading">
|
|
3
|
-
<div class="flex flex-col items-center text-lg
|
|
4
|
-
<div class="
|
|
2
|
+
<div class="n-loading n-panel-grids">
|
|
3
|
+
<div class="flex flex-col animate-pulse items-center text-lg">
|
|
4
|
+
<div class="i-carbon-circle-dash animate-spin text-4xl op50" />
|
|
5
5
|
<slot>
|
|
6
6
|
Loading...
|
|
7
7
|
</slot>
|
|
@@ -19,21 +19,21 @@ const model = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
21
|
<label
|
|
22
|
-
class="n-
|
|
22
|
+
class="n-radio hover:n-radio-hover inline-flex select-none items-center n-disabled:n-disabled"
|
|
23
23
|
:checked="model === value || null"
|
|
24
24
|
:disabled="disabled || null"
|
|
25
25
|
>
|
|
26
26
|
<input
|
|
27
27
|
v-model="model"
|
|
28
28
|
type="radio"
|
|
29
|
-
class="absolute op0
|
|
29
|
+
class="peer absolute op0"
|
|
30
30
|
:disabled="disabled"
|
|
31
31
|
:name="name"
|
|
32
32
|
:value="value"
|
|
33
33
|
@keypress.enter="model = value!"
|
|
34
34
|
>
|
|
35
|
-
<span class="n-
|
|
36
|
-
<div class="n-
|
|
35
|
+
<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
|
+
<div class="n-radio-inner n-checked:n-radio-inner-checked n-transition" />
|
|
37
37
|
</span>
|
|
38
38
|
<span><slot /></span>
|
|
39
39
|
</label>
|
|
@@ -26,13 +26,15 @@ function onToggle(e: any) {
|
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
28
|
<details :open="open" @toggle="onToggle">
|
|
29
|
-
<summary class="
|
|
30
|
-
<NIconTitle :icon="icon" :text="text"
|
|
29
|
+
<summary class="cursor-pointer select-none hover:bg-active p4" :class="collapse ? '' : 'pointer-events-none'">
|
|
30
|
+
<NIconTitle :icon="icon" :text="text" text-xl transition :class="open ? 'op100' : 'op60'">
|
|
31
31
|
<div>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<div text-base>
|
|
33
|
+
<slot name="text">
|
|
34
|
+
{{ text }}
|
|
35
|
+
</slot>
|
|
36
|
+
</div>
|
|
37
|
+
<div v-if="description || $slots.description" text-sm op50>
|
|
36
38
|
<slot name="description">
|
|
37
39
|
{{ description }}
|
|
38
40
|
</slot>
|
|
@@ -43,11 +45,16 @@ function onToggle(e: any) {
|
|
|
43
45
|
<NIcon
|
|
44
46
|
v-if="collapse"
|
|
45
47
|
icon="carbon-chevron-down"
|
|
46
|
-
class="
|
|
48
|
+
class="chevron"
|
|
49
|
+
cursor-pointer place-self-start text-base op75 transition duration-500
|
|
47
50
|
/>
|
|
48
51
|
</NIconTitle>
|
|
49
52
|
</summary>
|
|
50
|
-
<div
|
|
53
|
+
<div
|
|
54
|
+
v-lazy-show="open"
|
|
55
|
+
class="flex flex-col flex-gap2 pb6 pt2"
|
|
56
|
+
:class="typeof padding === 'string' ? padding : padding ? 'px4' : ''"
|
|
57
|
+
>
|
|
51
58
|
<slot name="details" />
|
|
52
59
|
<div :class="containerClass" class="mt1">
|
|
53
60
|
<slot />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useVModel } from '@vueuse/core'
|
|
3
|
+
|
|
3
4
|
const props = withDefaults(
|
|
4
5
|
defineProps<{
|
|
5
6
|
modelValue?: any
|
|
@@ -20,12 +21,12 @@ const input = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
20
21
|
|
|
21
22
|
<template>
|
|
22
23
|
<div
|
|
23
|
-
class="
|
|
24
|
+
class="n-text-input flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"
|
|
24
25
|
>
|
|
25
26
|
<slot name="icon">
|
|
26
|
-
<NIcon v-if="icon" :icon="icon" class="
|
|
27
|
+
<NIcon v-if="icon" :icon="icon" class="mr-0.4em text-1.1em op50" />
|
|
27
28
|
</slot>
|
|
28
|
-
<select v-model="input" :disabled="disabled" class="
|
|
29
|
+
<select v-model="input" :disabled="disabled" class="w-full flex-auto n-bg-base !outline-none">
|
|
29
30
|
<option v-if="placeholder" value="" disabled hidden>
|
|
30
31
|
{{ placeholder }}
|
|
31
32
|
</option>
|
|
@@ -16,19 +16,19 @@ const checked = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<label
|
|
19
|
-
class="n-
|
|
19
|
+
class="n-switch n-switch-base n-disabled:n-disabled"
|
|
20
20
|
:checked="checked || null"
|
|
21
21
|
:disabled="disabled || null"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
v-model="checked"
|
|
25
25
|
type="checkbox"
|
|
26
|
-
class="absolute op0
|
|
26
|
+
class="peer absolute op0"
|
|
27
27
|
:disabled="disabled"
|
|
28
28
|
@keypress.enter="checked = !checked"
|
|
29
29
|
>
|
|
30
|
-
<div class="n-
|
|
31
|
-
<div class="n-
|
|
30
|
+
<div class="n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition">
|
|
31
|
+
<div class="n-checked:n-switch-thumb-checked n-switch-thumb n-transition" />
|
|
32
32
|
</div>
|
|
33
33
|
<slot />
|
|
34
34
|
</label>
|
|
@@ -20,13 +20,13 @@ const input = useVModel(props, 'modelValue', emit, { passive: true })
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<div class="n-
|
|
23
|
+
<div class="n-text-input flex flex items-center border n-border-base rounded py-1 pl-1 pr-2 focus-within:n-focus-base focus-within:border-context n-bg-base">
|
|
24
24
|
<slot name="icon">
|
|
25
|
-
<NIcon v-if="icon" :icon="icon" class="
|
|
25
|
+
<NIcon v-if="icon" :icon="icon" class="ml-0.3em mr-0.1em text-1.1em op50" />
|
|
26
26
|
</slot>
|
|
27
27
|
<input
|
|
28
28
|
v-model="input"
|
|
29
|
-
class="flex-auto n-bg-base
|
|
29
|
+
class="ml-0.4em w-full flex-auto n-bg-base !outline-none"
|
|
30
30
|
:type="type"
|
|
31
31
|
:disabled="disabled"
|
|
32
32
|
:placeholder="placeholder"
|
package/dist/module.json
CHANGED
package/dist/runtime/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/dist/client-api-
|
|
1
|
+
export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/dist/client-api-a2b0aa8f").c | undefined>;
|
package/dist/unocss.mjs
CHANGED
|
@@ -34,6 +34,21 @@ function unocssPreset() {
|
|
|
34
34
|
"opacity": 0.4,
|
|
35
35
|
"pointer-events": "none",
|
|
36
36
|
"filter": "saturate(0)"
|
|
37
|
+
}],
|
|
38
|
+
/**
|
|
39
|
+
* Credit to Nanda Syahrasyad (https://github.com/narendrasss)
|
|
40
|
+
*
|
|
41
|
+
* - https://github.com/narendrasss/NotANumber
|
|
42
|
+
* - https://www.nan.fyi/grid.svg
|
|
43
|
+
* - https://www.nan.fyi/grid-dark.svg
|
|
44
|
+
*/
|
|
45
|
+
["n-panel-grids-light", {
|
|
46
|
+
"background-image": `url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsla(0, 0%25, 98%25, 1)' fill='none'/%3E%3C/svg%3E")`,
|
|
47
|
+
"background-size": "40px 40px"
|
|
48
|
+
}],
|
|
49
|
+
["n-panel-grids-dark", {
|
|
50
|
+
"background-image": `url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='hsl(0, 0%25, 8.5%25)'/%3E%3Cpath d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z' stroke-width='0.2' stroke='hsl(0, 0%25, 11.0%25)' fill='none'/%3E%3C/svg%3E");`,
|
|
51
|
+
"background-size": "40px 40px"
|
|
37
52
|
}]
|
|
38
53
|
],
|
|
39
54
|
variants: [
|
|
@@ -103,7 +118,8 @@ function unocssPreset() {
|
|
|
103
118
|
// icon-button
|
|
104
119
|
"n-icon-button": "aspect-1/1 w-1.6em h-1.6em flex items-center justify-center rounded op50 hover:op100 hover:n-bg-active",
|
|
105
120
|
// loading
|
|
106
|
-
"n-loading": "flex h-full w-full justify-center items-center"
|
|
121
|
+
"n-loading": "flex h-full w-full justify-center items-center",
|
|
122
|
+
"n-panel-grids": "n-panel-grids-light dark:n-panel-grids-dark flex flex-col h-full gap-2 items-center justify-center"
|
|
107
123
|
}
|
|
108
124
|
};
|
|
109
125
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-ui-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
"*.cjs"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@nuxt/devtools": "0.
|
|
26
|
+
"@nuxt/devtools": "0.4.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@iconify-json/carbon": "^1.1.16",
|
|
30
|
-
"@nuxt/kit": "^3.3.
|
|
30
|
+
"@nuxt/kit": "^3.3.3",
|
|
31
31
|
"@nuxtjs/color-mode": "^3.2.0",
|
|
32
|
-
"@unocss/core": "^0.
|
|
33
|
-
"@unocss/nuxt": "^0.
|
|
34
|
-
"@unocss/preset-attributify": "^0.
|
|
35
|
-
"@unocss/preset-icons": "^0.
|
|
36
|
-
"@unocss/preset-mini": "^0.
|
|
37
|
-
"@unocss/reset": "^0.
|
|
32
|
+
"@unocss/core": "^0.51.4",
|
|
33
|
+
"@unocss/nuxt": "^0.51.4",
|
|
34
|
+
"@unocss/preset-attributify": "^0.51.4",
|
|
35
|
+
"@unocss/preset-icons": "^0.51.4",
|
|
36
|
+
"@unocss/preset-mini": "^0.51.4",
|
|
37
|
+
"@unocss/reset": "^0.51.4",
|
|
38
38
|
"@vueuse/core": "^9.13.0",
|
|
39
39
|
"@vueuse/integrations": "^9.13.0",
|
|
40
40
|
"@vueuse/nuxt": "^9.13.0",
|
|
41
41
|
"defu": "^6.1.2",
|
|
42
42
|
"focus-trap": "^7.4.0",
|
|
43
|
-
"unocss": "^0.
|
|
44
|
-
"v-lazy-show": "^0.2.
|
|
45
|
-
"@nuxt/devtools": "0.
|
|
46
|
-
"@nuxt/devtools-kit": "0.
|
|
43
|
+
"unocss": "^0.51.4",
|
|
44
|
+
"v-lazy-show": "^0.2.2",
|
|
45
|
+
"@nuxt/devtools": "0.4.0",
|
|
46
|
+
"@nuxt/devtools-kit": "0.4.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"nuxt": "^3.3.
|
|
49
|
+
"nuxt": "^3.3.3"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|