@una-ui/nuxt 0.17.0-beta.1 → 0.18.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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/elements/popover/Popover.vue +17 -4
- package/dist/runtime/components/elements/popover/PopoverContent.vue +2 -2
- package/dist/runtime/composables/useUnaSettings.js +2 -2
- package/dist/runtime/types/index.d.ts +6 -6
- package/dist/runtime/types/popover.d.ts +2 -0
- package/package.json +3 -3
- package/playground/.nuxt/components.d.ts +1578 -1578
- package/playground/.nuxt/imports.d.ts +33 -33
- package/playground/.nuxt/nuxt.d.ts +1 -1
- package/playground/.nuxt/types/app-defaults.d.ts +1 -2
- package/playground/.nuxt/types/app.config.d.ts +12 -13
- package/playground/.nuxt/types/build.d.ts +22 -22
- package/playground/.nuxt/types/imports.d.ts +772 -771
- package/playground/.nuxt/types/middleware.d.ts +1 -1
- package/playground/.nuxt/types/nitro-config.d.ts +3 -3
- package/playground/.nuxt/types/nitro-imports.d.ts +7 -7
- package/playground/.nuxt/types/nitro-nuxt.d.ts +2 -3
- package/playground/.nuxt/types/nitro-routes.d.ts +3 -2
- package/playground/.nuxt/types/nitro.d.ts +1 -1
- package/playground/.nuxt/types/plugins.d.ts +16 -16
- package/playground/.nuxt/types/schema.d.ts +45 -44
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { PopoverRoot, useForwardPropsEmits } from 'radix-vue'
|
|
2
|
+
import { PopoverRoot, PopoverTrigger, useForwardPropsEmits } from 'radix-vue'
|
|
3
|
+
import { computed } from 'vue'
|
|
3
4
|
import type { PopoverRootEmits } from 'radix-vue'
|
|
4
5
|
import type { NPopoverProps } from '../../../types'
|
|
6
|
+
import NPopoverContent from './PopoverContent.vue'
|
|
5
7
|
|
|
6
8
|
const props = defineProps<NPopoverProps>()
|
|
7
9
|
const emits = defineEmits<PopoverRootEmits>()
|
|
8
10
|
|
|
9
|
-
const
|
|
11
|
+
const delegatedProps = computed(() => {
|
|
12
|
+
const { _popoverContent, ...delegated } = props
|
|
13
|
+
|
|
14
|
+
return delegated
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
10
18
|
</script>
|
|
11
19
|
|
|
12
20
|
<template>
|
|
13
|
-
<PopoverRoot v-bind="forwarded">
|
|
14
|
-
<
|
|
21
|
+
<PopoverRoot v-slot="{ open }" v-bind="forwarded">
|
|
22
|
+
<PopoverTrigger as-child>
|
|
23
|
+
<slot name="default" :open />
|
|
24
|
+
</PopoverTrigger>
|
|
25
|
+
<NPopoverContent v-bind="_popoverContent">
|
|
26
|
+
<slot name="content" />
|
|
27
|
+
</NPopoverContent>
|
|
15
28
|
</PopoverRoot>
|
|
16
29
|
</template>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
2
|
import {
|
|
4
3
|
PopoverContent,
|
|
5
4
|
type PopoverContentEmits,
|
|
6
5
|
PopoverPortal,
|
|
7
6
|
useForwardPropsEmits,
|
|
8
7
|
} from 'radix-vue'
|
|
8
|
+
import { computed } from 'vue'
|
|
9
9
|
import { cn } from '../../../utils'
|
|
10
10
|
import type { NPopoverContentProps } from '../../../types'
|
|
11
11
|
|
|
@@ -37,7 +37,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
|
37
37
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
38
38
|
:class="
|
|
39
39
|
cn(
|
|
40
|
-
'popover',
|
|
40
|
+
'popover-content',
|
|
41
41
|
props.class,
|
|
42
42
|
)
|
|
43
43
|
"
|
|
@@ -15,8 +15,8 @@ export function useUnaSettings() {
|
|
|
15
15
|
};
|
|
16
16
|
const settings = useStorage("una-settings", defaultSettings);
|
|
17
17
|
watchEffect(() => {
|
|
18
|
-
settings.value.primaryColors = getPrimaryColors(settings.value.primary);
|
|
19
|
-
settings.value.grayColors = getGrayColors(settings.value.gray);
|
|
18
|
+
settings.value.primaryColors = getPrimaryColors(settings.value.primary || una.primary);
|
|
19
|
+
settings.value.grayColors = getGrayColors(settings.value.gray || una.gray);
|
|
20
20
|
});
|
|
21
21
|
function reset() {
|
|
22
22
|
settings.value.primary = defaultSettings.primary;
|
|
@@ -45,10 +45,10 @@ export interface ColorPalette {
|
|
|
45
45
|
950: string;
|
|
46
46
|
}
|
|
47
47
|
export interface UnaSettings {
|
|
48
|
-
primaryColors
|
|
49
|
-
grayColors
|
|
50
|
-
primary
|
|
51
|
-
gray
|
|
52
|
-
fontSize
|
|
53
|
-
radius
|
|
48
|
+
primaryColors?: Colors;
|
|
49
|
+
grayColors?: Colors;
|
|
50
|
+
primary?: string;
|
|
51
|
+
gray?: string;
|
|
52
|
+
fontSize?: number;
|
|
53
|
+
radius?: number;
|
|
54
54
|
}
|
|
@@ -4,6 +4,8 @@ interface BaseExtensions {
|
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
5
|
}
|
|
6
6
|
export interface NPopoverProps extends PopoverRootProps {
|
|
7
|
+
/** Props for the popover content */
|
|
8
|
+
_popoverContent?: NPopoverContentProps;
|
|
7
9
|
}
|
|
8
10
|
export interface NPopoverContentProps extends PopoverContentProps, BaseExtensions {
|
|
9
11
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0-beta.1",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "^5.5.4",
|
|
50
50
|
"unocss": "^0.62.3",
|
|
51
51
|
"unocss-preset-animations": "^1.1.0",
|
|
52
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
53
|
-
"@una-ui/preset": "^0.
|
|
52
|
+
"@una-ui/extractor-vue-script": "^0.18.0-beta.1",
|
|
53
|
+
"@una-ui/preset": "^0.18.0-beta.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@nuxt/module-builder": "^0.8.1",
|