@meistrari/tela-build 1.30.2 → 1.30.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.
@@ -105,11 +105,12 @@ A versatile badge component for displaying small pieces of information, counts,
105
105
  type BadgeVariant = 'outline' | 'filled'
106
106
 
107
107
  type BadgeProps = {
108
+ class?: HTMLAttributes['class']
109
+ textClass?: HTMLAttributes['class']
108
110
  variant?: BadgeVariant
109
- containerClass?: string
110
- textClass?: string
111
111
  icon?: string
112
- to?: string
112
+ to?: RouteLocationRaw
113
+ target?: HTMLAnchorElement['target']
113
114
  }
114
115
  ```
115
116
 
@@ -1,16 +1,16 @@
1
1
  <script setup lang="ts">
2
- import { NuxtLink } from '#components'
3
2
  import type { HTMLAttributes } from 'vue'
3
+ import { NuxtLink } from '#components'
4
4
 
5
5
  const props = withDefaults(defineProps<{
6
6
  class?: HTMLAttributes['class']
7
7
  textClass?: HTMLAttributes['class']
8
8
  variant?: 'outline' | 'filled'
9
9
  icon?: string
10
- to?: boolean
10
+ to?: InstanceType<typeof NuxtLink>['$props']['to']
11
+ target?: HTMLAnchorElement['target']
11
12
  }>(), {
12
13
  variant: 'outline',
13
- to: false,
14
14
  })
15
15
 
16
16
  const tag = computed(() => props.to ? NuxtLink : 'div')
@@ -19,6 +19,7 @@ const tag = computed(() => props.to ? NuxtLink : 'div')
19
19
  <template>
20
20
  <component
21
21
  :is="tag"
22
+ v-bind="props.to ? { to: props.to, target: props.target } : {}"
22
23
  :class="cn(
23
24
  'inline-block px-[5px] py-[3px] rounded-[5px] select-none',
24
25
  variant === 'outline' && 'border-[0.5px] border-border',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.30.2",
3
+ "version": "1.30.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",