@una-ui/nuxt 0.8.0-beta.1 → 0.9.0-beta.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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/elements/Separator.vue +49 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/separator.d.ts +43 -0
- package/dist/runtime/types/separator.js +0 -0
- package/package.json +3 -3
- package/playground/.nuxt/components.d.ts +112 -104
- package/playground/.nuxt/imports.d.ts +3 -3
- package/playground/.nuxt/types/imports.d.ts +765 -1149
- package/playground/.nuxt/types/nitro-imports.d.ts +5 -5
- package/playground/.nuxt/types/nitro-routes.d.ts +1 -1
- package/playground/.nuxt/types/plugins.d.ts +13 -13
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Separator } from 'radix-vue'
|
|
4
|
+
import { cn, omitProps } from '../../utils'
|
|
5
|
+
import type { NSeparatorProps } from '../../types'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<NSeparatorProps>(), {
|
|
8
|
+
orientation: 'horizontal',
|
|
9
|
+
label: '',
|
|
10
|
+
una: () => ({
|
|
11
|
+
separatorDefaultVariant: 'separator-default-variant',
|
|
12
|
+
}),
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const delegatedProps = computed(() => {
|
|
16
|
+
const { class: _, ...delegated } = omitProps(props, ['una'])
|
|
17
|
+
|
|
18
|
+
return delegated
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<Separator
|
|
24
|
+
v-bind="omitProps(delegatedProps, ['una', 'separatorPosition'])"
|
|
25
|
+
:class="
|
|
26
|
+
cn(
|
|
27
|
+
'separator',
|
|
28
|
+
props.una?.separatorDefaultVariant,
|
|
29
|
+
props.una?.separator,
|
|
30
|
+
props.orientation === 'vertical' ? 'separator-vertical' : 'separator-horizontal',
|
|
31
|
+
props.class,
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<span
|
|
36
|
+
v-if="props.label || $slots.default"
|
|
37
|
+
:separator-position="props.separatorPosition || 'center'"
|
|
38
|
+
:class="cn(
|
|
39
|
+
'separator-content',
|
|
40
|
+
props.una?.separatorContent,
|
|
41
|
+
props.orientation === 'vertical' ? 'separator-content-vertical' : 'separator-content-horizontal',
|
|
42
|
+
)"
|
|
43
|
+
>
|
|
44
|
+
<slot>
|
|
45
|
+
{{ props.label }}
|
|
46
|
+
</slot>
|
|
47
|
+
</span>
|
|
48
|
+
</Separator>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import type { SeparatorProps } from 'radix-vue';
|
|
3
|
+
type Extensions = SeparatorProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface NSeparatorProps extends Extensions {
|
|
8
|
+
/**
|
|
9
|
+
* Allows you to add `UnaUI` separator preset properties,
|
|
10
|
+
* Think of it as a shortcut for adding options or variants to the preset if available.
|
|
11
|
+
*
|
|
12
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/separator.ts
|
|
13
|
+
* @example
|
|
14
|
+
* separator="solid-green"
|
|
15
|
+
*/
|
|
16
|
+
separator?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Allows you to change the orientation and position of the separator.
|
|
19
|
+
*
|
|
20
|
+
* @default horizontal-center
|
|
21
|
+
*/
|
|
22
|
+
separatorPosition?: HTMLAttributes['class'];
|
|
23
|
+
/**
|
|
24
|
+
* Allows you to change the size of the separator.
|
|
25
|
+
*
|
|
26
|
+
* @default md
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* size="sm" | size="2cm" | size="2rem" | size="2px"
|
|
30
|
+
*/
|
|
31
|
+
size?: string;
|
|
32
|
+
/**
|
|
33
|
+
* `UnaUI` preset configuration
|
|
34
|
+
*
|
|
35
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/separator.ts
|
|
36
|
+
*/
|
|
37
|
+
una?: {
|
|
38
|
+
separator?: HTMLAttributes['class'];
|
|
39
|
+
separatorContent?: HTMLAttributes['class'];
|
|
40
|
+
separatorDefaultVariant?: HTMLAttributes['class'];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
File without changes
|
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.9.0-beta.2",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"typescript": "^5.5.3",
|
|
49
49
|
"unocss": "^0.61.5",
|
|
50
50
|
"unocss-preset-animations": "^1.1.0",
|
|
51
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
52
|
-
"@una-ui/preset": "^0.
|
|
51
|
+
"@una-ui/extractor-vue-script": "^0.9.0-beta.2",
|
|
52
|
+
"@una-ui/preset": "^0.9.0-beta.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@nuxt/module-builder": "^0.8.1",
|