daisy-ui-kit 1.0.4 → 1.0.6
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/components/Drawer.vue
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject } from 'vue'
|
|
3
|
+
import { drawerStateKey } from './drawer-utils'
|
|
3
4
|
|
|
4
5
|
interface DrawerState {
|
|
5
6
|
isDrawerOpen: boolean
|
|
6
|
-
openDrawer:
|
|
7
|
-
closeDrawer:
|
|
8
|
-
toggleDrawer:
|
|
7
|
+
openDrawer: () => void
|
|
8
|
+
closeDrawer: () => void
|
|
9
|
+
toggleDrawer: () => void
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const drawerState: DrawerState = inject(
|
|
12
|
+
const drawerState: DrawerState | undefined = inject(drawerStateKey)
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
15
|
<template>
|
|
15
16
|
<div class="drawer-side">
|
|
16
|
-
<div class="drawer-overlay" @click="() => drawerState
|
|
17
|
+
<div class="drawer-overlay" @click="() => drawerState?.closeDrawer()" />
|
|
17
18
|
<slot v-bind="drawerState" />
|
|
18
19
|
</div>
|
|
19
20
|
</template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, reactive } from 'vue'
|
|
2
|
+
import { computed, provide, reactive } from 'vue'
|
|
3
|
+
import { drawerStateKey } from './drawer-utils'
|
|
3
4
|
|
|
4
5
|
const props = defineProps({
|
|
5
6
|
right: Boolean,
|
|
@@ -17,7 +18,8 @@ const drawerState = reactive({
|
|
|
17
18
|
drawerState.isDrawerOpen = !drawerState.isDrawerOpen
|
|
18
19
|
},
|
|
19
20
|
})
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
provide(drawerStateKey, drawerState)
|
|
21
23
|
|
|
22
24
|
const classes = computed(() => {
|
|
23
25
|
return {
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject } from 'vue'
|
|
3
|
+
import { drawerStateKey } from './drawer-utils'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
interface DrawerState {
|
|
6
|
+
isDrawerOpen: boolean
|
|
7
|
+
openDrawer: () => void
|
|
8
|
+
closeDrawer: () => void
|
|
9
|
+
toggleDrawer: () => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const drawerState: DrawerState | undefined = inject(drawerStateKey)
|
|
5
13
|
</script>
|
|
6
14
|
|
|
7
15
|
<template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue'
|
|
2
|
+
|
|
3
|
+
export interface DrawerState {
|
|
4
|
+
isDrawerOpen: boolean
|
|
5
|
+
openDrawer: () => void
|
|
6
|
+
closeDrawer: () => void
|
|
7
|
+
toggleDrawer: () => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const drawerStateKey = Symbol('drawerState') as InjectionKey<DrawerState>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "daisy-ui-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxi build",
|
|
@@ -19,42 +19,42 @@
|
|
|
19
19
|
"nuxt.js"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@vueuse/core": "^9.
|
|
22
|
+
"@vueuse/core": "^9.13.0",
|
|
23
23
|
"prismjs": "^1.29.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"daisyui": "^2.13.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@antfu/eslint-config": "^0.
|
|
30
|
-
"@headlessui/vue": "^1.7.
|
|
31
|
-
"@heroicons/vue": "^2.0.
|
|
32
|
-
"@iconify/json": "^2.2.
|
|
29
|
+
"@antfu/eslint-config": "^0.36.0",
|
|
30
|
+
"@headlessui/vue": "^1.7.12",
|
|
31
|
+
"@heroicons/vue": "^2.0.16",
|
|
32
|
+
"@iconify/json": "^2.2.36",
|
|
33
33
|
"@nuxt/kit": "@nuxt/kit",
|
|
34
34
|
"@nuxtjs/color-mode": "^3.2.0",
|
|
35
|
-
"@nuxtjs/tailwindcss": "^6.
|
|
36
|
-
"@pinia/nuxt": "^0.4.
|
|
35
|
+
"@nuxtjs/tailwindcss": "^6.6.0",
|
|
36
|
+
"@pinia/nuxt": "^0.4.7",
|
|
37
37
|
"@popperjs/core": "^2.11.6",
|
|
38
38
|
"@rovit/popper": "^3.9.0",
|
|
39
39
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
40
40
|
"@tailwindcss/forms": "^0.5.3",
|
|
41
41
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
42
42
|
"@tailwindcss/typography": "^0.5.9",
|
|
43
|
-
"@vueuse/nuxt": "^9.
|
|
44
|
-
"autoprefixer": "^10.4.
|
|
43
|
+
"@vueuse/nuxt": "^9.13.0",
|
|
44
|
+
"autoprefixer": "^10.4.14",
|
|
45
45
|
"cookie": "^0.5.0",
|
|
46
|
-
"daisyui": "^2.
|
|
47
|
-
"eslint": "^8.
|
|
46
|
+
"daisyui": "^2.51.4",
|
|
47
|
+
"eslint": "^8.36.0",
|
|
48
48
|
"feathers-pinia": "^0.36.5",
|
|
49
49
|
"mobile-detect": "^1.4.5",
|
|
50
|
-
"nuxt": "^3.1
|
|
51
|
-
"nuxt-icon": "^0.
|
|
50
|
+
"nuxt": "^3.3.1",
|
|
51
|
+
"nuxt-icon": "^0.3.3",
|
|
52
52
|
"ohmyfetch": "^0.4.21",
|
|
53
|
-
"pinia": "^2.0.
|
|
53
|
+
"pinia": "^2.0.33",
|
|
54
54
|
"postcss": "^8.4.21",
|
|
55
|
-
"tailwindcss": "^3.2.
|
|
56
|
-
"typescript": "^
|
|
57
|
-
"unplugin-icons": "^0.15.
|
|
55
|
+
"tailwindcss": "^3.2.7",
|
|
56
|
+
"typescript": "^5.0.2",
|
|
57
|
+
"unplugin-icons": "^0.15.3",
|
|
58
58
|
"vue": "^3.2.47"
|
|
59
59
|
}
|
|
60
60
|
}
|