@nuxt/devtools-ui-kit 1.0.0-beta.1 → 1.0.0-beta.3
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/NDialog.vue +1 -1
- package/dist/components/NDropdown.vue +7 -2
- package/dist/components/NNavbar.vue +2 -1
- package/dist/components/NNotification.vue +48 -0
- package/dist/components/NTextInput.vue +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/package.json +6 -6
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
<Teleport v-if="shown" to="body">
|
|
60
60
|
<div
|
|
61
61
|
v-show="show"
|
|
62
|
-
class="
|
|
62
|
+
class="fixed inset-0 z-100 flex items-center justify-center n-transition n-glass-effect"
|
|
63
63
|
role="dialog"
|
|
64
64
|
aria-modal="true"
|
|
65
65
|
:class="[
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { onClickOutside, useVModel } from '@vueuse/core'
|
|
4
4
|
|
|
5
|
-
const props = defineProps<{
|
|
5
|
+
const props = withDefaults(defineProps<{
|
|
6
|
+
modelValue?: boolean
|
|
7
|
+
direction?: 'start' | 'end'
|
|
8
|
+
}>(), {
|
|
9
|
+
direction: 'start',
|
|
10
|
+
})
|
|
6
11
|
const emit = defineEmits<{ (...args: any): void }>()
|
|
7
12
|
|
|
8
13
|
const enabled = useVModel(props, 'modelValue', emit, { passive: true })
|
|
@@ -23,7 +28,7 @@ onClickOutside(el, () => {
|
|
|
23
28
|
|
|
24
29
|
<div
|
|
25
30
|
class="absolute z-10 border n-border-base rounded shadow n-transition n-bg-base"
|
|
26
|
-
:class="[enabled ? 'op-100' : 'op0 pointer-events-none -translate-y-1']"
|
|
31
|
+
:class="[enabled ? 'op-100' : 'op0 pointer-events-none -translate-y-1', direction === 'end' ? 'right-0' : 'left-0']"
|
|
27
32
|
>
|
|
28
33
|
<slot />
|
|
29
34
|
</div>
|
|
@@ -16,8 +16,9 @@ function update(event: any) {
|
|
|
16
16
|
<template>
|
|
17
17
|
<div flex="~ col gap2" border="b base" flex-1 n-navbar-glass :class="[{ p4: !noPadding }]">
|
|
18
18
|
<div flex="~ gap4" items-center>
|
|
19
|
-
<slot
|
|
19
|
+
<slot name="search">
|
|
20
20
|
<NTextInput
|
|
21
|
+
v-if="search !== undefined"
|
|
21
22
|
placeholder="Search..."
|
|
22
23
|
icon="carbon-search"
|
|
23
24
|
n="primary" flex-auto
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup lang='ts'>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import type { DevtoolsUiShowNotificationPosition } from '../composables/notification'
|
|
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
|
+
|
|
13
|
+
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'
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
show.value = false
|
|
22
|
+
}, data.duration ?? 1500)
|
|
23
|
+
})
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
fixed left-0 right-0 z-999 text-center
|
|
29
|
+
:class="[
|
|
30
|
+
{ 'pointer-events-none overflow-hidden': !show },
|
|
31
|
+
{ 'top-0': position.startsWith('top') },
|
|
32
|
+
{ 'bottom-0': position.startsWith('bottom') },
|
|
33
|
+
]"
|
|
34
|
+
>
|
|
35
|
+
<div flex :style="{ justifyContent: position.includes('right') ? 'right' : position.includes('left') ? 'left' : 'center' }">
|
|
36
|
+
<div
|
|
37
|
+
border="~ base"
|
|
38
|
+
flex="~ inline gap2"
|
|
39
|
+
m-3 inline-block items-center rounded px-4 py-1 transition-all duration-300 bg-base
|
|
40
|
+
:style="show ? {} : { transform: `translateY(${position.startsWith('top') ? '-' : ''}300%)` }"
|
|
41
|
+
:class="[show ? 'shadow' : 'shadow-none', classes]"
|
|
42
|
+
>
|
|
43
|
+
<div v-if="icon" :class="icon" />
|
|
44
|
+
<div>{{ text }}</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import { defineNuxtModule, addComponentsDir, createResolver, installModule } from '@nuxt/kit';
|
|
2
|
+
import { defineNuxtModule, addImportsDir, addComponentsDir, createResolver, installModule } from '@nuxt/kit';
|
|
3
3
|
import defu from 'defu';
|
|
4
4
|
import { extendUnocssOptions } from './unocss.mjs';
|
|
5
5
|
export { unocssPreset } from './unocss.mjs';
|
|
@@ -21,6 +21,7 @@ const module = defineNuxtModule({
|
|
|
21
21
|
dev: false
|
|
22
22
|
},
|
|
23
23
|
async setup(options, nuxt) {
|
|
24
|
+
addImportsDir(rPath("./composables"));
|
|
24
25
|
addComponentsDir({ path: rPath("./components") });
|
|
25
26
|
nuxt.options.css.unshift(rPath("assets/styles.css"));
|
|
26
27
|
if (!options.dev)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-ui-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@nuxt/devtools": "1.0.0-beta.
|
|
26
|
+
"@nuxt/devtools": "1.0.0-beta.3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@iconify-json/carbon": "^1.1.21",
|
|
30
30
|
"@iconify-json/logos": "^1.1.37",
|
|
31
31
|
"@iconify-json/ri": "^1.1.12",
|
|
32
|
-
"@iconify-json/tabler": "^1.1.
|
|
32
|
+
"@iconify-json/tabler": "^1.1.95",
|
|
33
33
|
"@nuxt/kit": "^3.7.4",
|
|
34
34
|
"@nuxtjs/color-mode": "^3.3.0",
|
|
35
35
|
"@unocss/core": "^0.56.5",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"@vueuse/integrations": "^10.5.0",
|
|
43
43
|
"@vueuse/nuxt": "^10.5.0",
|
|
44
44
|
"defu": "^6.1.2",
|
|
45
|
-
"focus-trap": "^7.5.
|
|
45
|
+
"focus-trap": "^7.5.4",
|
|
46
46
|
"splitpanes": "^3.1.5",
|
|
47
47
|
"unocss": "^0.56.5",
|
|
48
48
|
"v-lazy-show": "^0.2.3",
|
|
49
|
-
"@nuxt/devtools-kit": "1.0.0-beta.
|
|
49
|
+
"@nuxt/devtools-kit": "1.0.0-beta.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"nuxt": "^3.7.4",
|
|
53
|
-
"@nuxt/devtools": "1.0.0-beta.
|
|
53
|
+
"@nuxt/devtools": "1.0.0-beta.3"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|