@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt",
3
3
  "configKey": "una",
4
- "version": "0.8.0-beta.1",
4
+ "version": "0.9.0-beta.2",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -7,7 +7,7 @@ import '@una-ui/preset/prefixes';
7
7
  import '@una-ui/extractor-vue-script';
8
8
 
9
9
  const name = "@una-ui/nuxt";
10
- const version = "0.8.0-beta.1";
10
+ const version = "0.9.0-beta.2";
11
11
 
12
12
  const module = defineNuxtModule({
13
13
  meta: {
@@ -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>
@@ -19,6 +19,7 @@ export * from './slider.js';
19
19
  export * from './progress.js';
20
20
  export * from './skeleton.js';
21
21
  export * from './select.js';
22
+ export * from './separator.js';
22
23
  export interface Colors {
23
24
  [key: string]: string;
24
25
  }
@@ -19,3 +19,4 @@ export * from "./slider.js";
19
19
  export * from "./progress.js";
20
20
  export * from "./skeleton.js";
21
21
  export * from "./select.js";
22
+ export * from "./separator.js";
@@ -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.8.0-beta.1",
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.8.0-beta.1",
52
- "@una-ui/preset": "^0.8.0-beta.1"
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",