@globalbrain/sefirot 2.35.0 → 2.36.0

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.
@@ -1,13 +1,26 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
3
 
4
- const props = defineProps({
5
- href: { type: String, default: null }
4
+ const props = withDefaults(defineProps<{
5
+ href?: string | null
6
+ external?: boolean | null
7
+ }>(), {
8
+ external: null
6
9
  })
7
10
 
8
11
  const OUTBOUND_REGEX = /^[a-z]+:/i
9
12
 
10
- const isExternal = computed(() => OUTBOUND_REGEX.test(props.href))
13
+ const isExternal = computed(() => {
14
+ if (!props.href) {
15
+ return false
16
+ }
17
+
18
+ if (props.external !== null) {
19
+ return props.external
20
+ }
21
+
22
+ return OUTBOUND_REGEX.test(props.href)
23
+ })
11
24
 
12
25
  const component = computed(() => {
13
26
  if (!props.href) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "packageManager": "pnpm@8.5.0",
5
5
  "description": "Vue Components for Global Brain Design System.",
6
6
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",