@bitrix24/b24ui-nuxt 0.2.9 → 0.3.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.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const defu = require('defu');
4
4
  const kit = require('@nuxt/kit');
5
- const templates = require('./shared/b24ui-nuxt.DcPkWX-m.cjs');
5
+ const templates = require('./shared/b24ui-nuxt.DkKTVBhL.cjs');
6
6
  require('node:url');
7
7
  require('scule');
8
8
 
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.13.1"
6
6
  },
7
7
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
8
- "version": "0.2.9",
8
+ "version": "0.3.1",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.0h2uYsyZ.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CxFyzKH7.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
 
@@ -133,9 +133,9 @@ const b24ui = computed(() => button({
133
133
  v-if="isLoading"
134
134
  class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
135
135
  >
136
- <LoaderWaitIcon v-if="useWait" class="size-2xl" aria-hidden="true" />
137
- <LoaderClockIcon v-else-if="useClock" class="size-2xl" aria-hidden="true" />
138
- <SpinnerIcon v-else class="animate-spin stroke-2 size-lg" />
136
+ <LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
137
+ <LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
138
+ <SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
139
139
  </div>
140
140
  <div
141
141
  :class="[
@@ -44,6 +44,8 @@ import { useFormField } from '../composables/useFormField'
44
44
  import Minus20Icon from '@bitrix24/b24icons-vue/actions/Minus20Icon'
45
45
  import CheckIcon from '@bitrix24/b24icons-vue/main/CheckIcon'
46
46
 
47
+ defineOptions({ inheritAttrs: false })
48
+
47
49
  const props = defineProps<CheckboxProps>()
48
50
  const slots = defineSlots<CheckboxSlots>()
49
51
  const emits = defineEmits<CheckboxEmits>()
@@ -78,7 +80,7 @@ function onUpdate(value: any) {
78
80
  <div :class="b24ui.container({ class: props.b24ui?.container })">
79
81
  <CheckboxRoot
80
82
  :id="id"
81
- v-bind="{ ...rootProps, ...ariaAttrs }"
83
+ v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
82
84
  v-model="modelValue"
83
85
  :name="name"
84
86
  :disabled="disabled"
@@ -14,10 +14,13 @@ const appConfigInputMenu = _appConfig as AppConfig & { b24ui: { inputMenu: Parti
14
14
 
15
15
  const inputMenu = tv({ extend: tv(theme), ...(appConfigInputMenu.b24ui?.inputMenu || {}) })
16
16
 
17
+ type InputMenuVariants = VariantProps<typeof inputMenu>
18
+
17
19
  export interface InputMenuItem {
18
20
  label?: string
19
21
  icon?: IconComponent
20
22
  avatar?: AvatarProps
23
+ color?: InputMenuVariants['color']
21
24
  chip?: ChipProps
22
25
  /**
23
26
  * The item type.
@@ -28,8 +31,6 @@ export interface InputMenuItem {
28
31
  onSelect?(e?: Event): void
29
32
  }
30
33
 
31
- type InputMenuVariants = VariantProps<typeof inputMenu>
32
-
33
34
  export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<InputMenuItem | AcceptableValue | boolean> = MaybeArrayOfArray<InputMenuItem | AcceptableValue | boolean>, V extends SelectItemKey<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'highlightOnHover'>, UseComponentIconsProps {
34
35
  /**
35
36
  * The element or component this component should render as.
@@ -453,7 +454,7 @@ defineExpose({
453
454
 
454
455
  <ComboboxItem
455
456
  v-else
456
- :class="b24ui.item({ class: props.b24ui?.item })"
457
+ :class="b24ui.item({ class: props.b24ui?.item, colorItem: item?.color })"
457
458
  :disabled="item.disabled"
458
459
  :value="valueKey && typeof item === 'object' ? get(item, props.valueKey as string) : item"
459
460
  @select="item.onSelect"
@@ -463,16 +464,16 @@ defineExpose({
463
464
  <Component
464
465
  :is="item.icon"
465
466
  v-if="item.icon"
466
- :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon })"
467
+ :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon, colorItem: item?.color })"
467
468
  />
468
- <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
469
+ <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar, colorItem: item?.color })" />
469
470
  <B24Chip
470
471
  v-else-if="item.chip"
471
472
  :size="((props.b24ui?.itemLeadingChipSize || b24ui.itemLeadingChipSize()) as ChipProps['size'])"
472
473
  inset
473
474
  standalone
474
475
  v-bind="item.chip"
475
- :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip })"
476
+ :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip, colorItem: item?.color })"
476
477
  />
477
478
  </slot>
478
479
 
@@ -482,13 +483,13 @@ defineExpose({
482
483
  </slot>
483
484
  </span>
484
485
 
485
- <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing })">
486
+ <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing, colorItem: item?.color })">
486
487
  <slot name="item-trailing" :item="(item as T)" :index="index" />
487
488
 
488
489
  <ComboboxItemIndicator as-child>
489
490
  <Component
490
491
  :is="selectedIcon || icons.check"
491
- :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon })"
492
+ :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon, colorItem: item?.color })"
492
493
  />
493
494
  </ComboboxItemIndicator>
494
495
  </span>
@@ -51,6 +51,7 @@ export interface ModalProps extends DialogRootProps {
51
51
  * @defaultValue true
52
52
  */
53
53
  dismissible?: boolean
54
+ scrollbarThin?: boolean
54
55
  class?: any
55
56
  b24ui?: Partial<typeof modal.slots>
56
57
  }
@@ -83,7 +84,8 @@ const props = withDefaults(defineProps<ModalProps>(), {
83
84
  overlay: true,
84
85
  transition: true,
85
86
  modal: true,
86
- dismissible: true
87
+ dismissible: true,
88
+ scrollbarThin: true
87
89
  })
88
90
  const emits = defineEmits<ModalEmits>()
89
91
  const slots = defineSlots<ModalSlots>()
@@ -170,7 +172,7 @@ const b24ui = computed(() => modal({
170
172
  </slot>
171
173
  </div>
172
174
 
173
- <div v-if="!!slots.body" :class="b24ui.body({ class: props.b24ui?.body })">
175
+ <div v-if="!!slots.body" :class="b24ui.body({ class: props.b24ui?.body, scrollbarThin: Boolean(props.scrollbarThin) })">
174
176
  <slot name="body" />
175
177
  </div>
176
178
 
@@ -13,10 +13,13 @@ const appConfigSelect = _appConfig as AppConfig & { b24ui: { select: Partial<typ
13
13
 
14
14
  const select = tv({ extend: tv(theme), ...(appConfigSelect.b24ui?.select || {}) })
15
15
 
16
+ type SelectVariants = VariantProps<typeof select>
17
+
16
18
  export interface SelectItem {
17
19
  label?: string
18
20
  icon?: IconComponent
19
21
  avatar?: AvatarProps
22
+ color?: SelectVariants['color']
20
23
  chip?: ChipProps
21
24
  /**
22
25
  * The item type.
@@ -27,8 +30,6 @@ export interface SelectItem {
27
30
  disabled?: boolean
28
31
  }
29
32
 
30
- type SelectVariants = VariantProps<typeof select>
31
-
32
33
  export interface SelectProps<T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<SelectItem | AcceptableValue | boolean> = MaybeArrayOfArray<SelectItem | AcceptableValue | boolean>, V extends SelectItemKey<T> | undefined = undefined, M extends boolean = false> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps {
33
34
  id?: string
34
35
  /** The placeholder text when the select is empty. */
@@ -125,6 +126,8 @@ import icons from '../dictionary/icons'
125
126
  import B24Avatar from './Avatar.vue'
126
127
  import B24Chip from './Chip.vue'
127
128
 
129
+ defineOptions({ inheritAttrs: false })
130
+
128
131
  const props = withDefaults(defineProps<SelectProps<T, I, V, M>>(), {
129
132
  valueKey: 'value' as never,
130
133
  labelKey: 'label' as never,
@@ -214,7 +217,7 @@ function onUpdateOpen(value: boolean) {
214
217
  @update:model-value="onUpdate"
215
218
  @update:open="onUpdateOpen"
216
219
  >
217
- <SelectTrigger :id="id" :class="b24ui.base({ class: [props.class, props.b24ui?.base] })" v-bind="ariaAttrs">
220
+ <SelectTrigger :id="id" :class="b24ui.base({ class: [props.class, props.b24ui?.base] })" v-bind="{ ...$attrs, ...ariaAttrs }">
218
221
  <div v-if="isTag" :class="b24ui.tag({ class: props.b24ui?.tag })">
219
222
  {{ props.tag }}
220
223
  </div>
@@ -271,7 +274,7 @@ function onUpdateOpen(value: boolean) {
271
274
 
272
275
  <SelectItem
273
276
  v-else
274
- :class="b24ui.item({ class: props.b24ui?.item })"
277
+ :class="b24ui.item({ class: props.b24ui?.item, colorItem: item?.color })"
275
278
  :disabled="item.disabled"
276
279
  :value="typeof item === 'object' ? get(item, props.valueKey as string) : item"
277
280
  >
@@ -280,16 +283,16 @@ function onUpdateOpen(value: boolean) {
280
283
  <Component
281
284
  :is="item.icon"
282
285
  v-if="item.icon"
283
- :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon })"
286
+ :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon, colorItem: item?.color })"
284
287
  />
285
- <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
288
+ <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar, colorItem: item?.color })" />
286
289
  <B24Chip
287
290
  v-else-if="item.chip"
288
291
  :size="((props.b24ui?.itemLeadingChipSize || b24ui.itemLeadingChipSize()) as ChipProps['size'])"
289
292
  inset
290
293
  standalone
291
294
  v-bind="item.chip"
292
- :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip })"
295
+ :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip, colorItem: item?.color })"
293
296
  />
294
297
  </slot>
295
298
 
@@ -299,13 +302,13 @@ function onUpdateOpen(value: boolean) {
299
302
  </slot>
300
303
  </SelectItemText>
301
304
 
302
- <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing })">
305
+ <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing, colorItem: item?.color })">
303
306
  <slot name="item-trailing" :item="(item as T)" :index="index" />
304
307
 
305
308
  <SelectItemIndicator as-child>
306
309
  <Component
307
310
  :is="selectedIcon || icons.check"
308
- :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon })"
311
+ :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon, colorItem: item?.color })"
309
312
  />
310
313
  </SelectItemIndicator>
311
314
  </span>
@@ -13,10 +13,13 @@ const appConfigSelectMenu = _appConfig as AppConfig & { b24ui: { selectMenu: Par
13
13
 
14
14
  const selectMenu = tv({ extend: tv(theme), ...(appConfigSelectMenu.b24ui?.selectMenu || {}) })
15
15
 
16
+ type SelectMenuVariants = VariantProps<typeof selectMenu>
17
+
16
18
  export interface SelectMenuItem {
17
19
  label?: string
18
20
  icon?: IconComponent
19
21
  avatar?: AvatarProps
22
+ color?: SelectMenuVariants['color']
20
23
  chip?: ChipProps
21
24
  /**
22
25
  * The item type.
@@ -27,8 +30,6 @@ export interface SelectMenuItem {
27
30
  onSelect?(e?: Event): void
28
31
  }
29
32
 
30
- type SelectMenuVariants = VariantProps<typeof selectMenu>
31
-
32
33
  export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<SelectMenuItem | AcceptableValue | boolean> = MaybeArrayOfArray<SelectMenuItem | AcceptableValue | boolean>, V extends SelectItemKey<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'highlightOnHover'>, UseComponentIconsProps {
33
34
  id?: string
34
35
  /** The placeholder text when the select is empty. */
@@ -172,6 +173,8 @@ import B24Avatar from './Avatar.vue'
172
173
  import B24Chip from './Chip.vue'
173
174
  import B24Input from './Input.vue'
174
175
 
176
+ defineOptions({ inheritAttrs: false })
177
+
175
178
  const props = withDefaults(defineProps<SelectMenuProps<T, I, V, M>>(), {
176
179
  portal: true,
177
180
  searchInput: true,
@@ -341,7 +344,7 @@ function onUpdateOpen(value: boolean) {
341
344
  <ComboboxRoot
342
345
  :id="id"
343
346
  v-slot="{ modelValue, open }"
344
- v-bind="{ ...rootProps, ...ariaAttrs }"
347
+ v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
345
348
  ignore-filter
346
349
  as-child
347
350
  :name="name"
@@ -414,7 +417,7 @@ function onUpdateOpen(value: boolean) {
414
417
 
415
418
  <ComboboxItem
416
419
  v-else
417
- :class="b24ui.item({ class: props.b24ui?.item })"
420
+ :class="b24ui.item({ class: props.b24ui?.item, colorItem: item?.color })"
418
421
  :disabled="item.disabled"
419
422
  :value="valueKey && typeof item === 'object' ? get(item, props.valueKey as string) : item"
420
423
  @select="item.onSelect"
@@ -424,16 +427,16 @@ function onUpdateOpen(value: boolean) {
424
427
  <Component
425
428
  :is="item.icon"
426
429
  v-if="item.icon"
427
- :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon })"
430
+ :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon, colorItem: item?.color })"
428
431
  />
429
- <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
432
+ <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar, colorItem: item?.color })" />
430
433
  <B24Chip
431
434
  v-else-if="item.chip"
432
435
  :size="((props.b24ui?.itemLeadingChipSize || b24ui.itemLeadingChipSize()) as ChipProps['size'])"
433
436
  inset
434
437
  standalone
435
438
  v-bind="item.chip"
436
- :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip })"
439
+ :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip, colorItem: item?.color })"
437
440
  />
438
441
  </slot>
439
442
 
@@ -443,13 +446,13 @@ function onUpdateOpen(value: boolean) {
443
446
  </slot>
444
447
  </span>
445
448
 
446
- <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing })">
449
+ <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing, colorItem: item?.color })">
447
450
  <slot name="item-trailing" :item="(item as T)" :index="index" />
448
451
 
449
452
  <ComboboxItemIndicator as-child>
450
453
  <Component
451
454
  :is="selectedIcon || icons.check"
452
- :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon })"
455
+ :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon, colorItem: item?.color })"
453
456
  />
454
457
  </ComboboxItemIndicator>
455
458
  </span>
@@ -54,8 +54,11 @@ import { computed, useId } from 'vue'
54
54
  import { Primitive, SwitchRoot, SwitchThumb, useForwardProps, Label } from 'reka-ui'
55
55
  import { reactivePick } from '@vueuse/core'
56
56
  import { useFormField } from '../composables/useFormField'
57
+ import { omit } from '../utils'
57
58
  import icons from '../dictionary/icons'
58
59
 
60
+ defineOptions({ inheritAttrs: false })
61
+
59
62
  const props = defineProps<SwitchProps>()
60
63
  const slots = defineSlots<SwitchSlots>()
61
64
  const emits = defineEmits<SwitchEmits>()
@@ -89,7 +92,7 @@ function onUpdate(value: any) {
89
92
  <div :class="b24ui.container({ class: props.b24ui?.container })">
90
93
  <SwitchRoot
91
94
  :id="id"
92
- v-bind="{ ...rootProps, ...ariaAttrs }"
95
+ v-bind="{ ...rootProps, ...omit({ ...$attrs }, ['data-state']), ...ariaAttrs }"
93
96
  v-model="modelValue"
94
97
  :name="name"
95
98
  :disabled="disabled || loading"
@@ -46,9 +46,10 @@ import { omit } from '../utils'
46
46
  import B24Toast from './Toast.vue'
47
47
 
48
48
  const props = withDefaults(defineProps<ToasterProps>(), {
49
+ position: 'top-right' as const,
49
50
  expand: true,
50
- portal: true,
51
- duration: 5000
51
+ duration: 5000,
52
+ portal: true
52
53
  })
53
54
  defineSlots<ToasterSlots>()
54
55
 
@@ -28,13 +28,15 @@ export default defineNuxtPlugin(() => {
28
28
  }]
29
29
  };
30
30
  if (import.meta.client && nuxtApp.isHydrating && !nuxtApp.payload.serverRendered) {
31
- const style = document.createElement("style");
32
- style.innerHTML = root.value;
33
- style.setAttribute("data-bitrix24-ui-colors", "");
34
- document.head.appendChild(style);
35
- headData.script = [{
36
- innerHTML: "document.head.removeChild(document.querySelector('[data-bitrix24-ui-colors]'))"
37
- }];
31
+ if (typeof document !== "undefined") {
32
+ const style = document.createElement("style");
33
+ style.innerHTML = root.value;
34
+ style.setAttribute("data-bitrix24-ui-colors", "");
35
+ document.head.appendChild(style);
36
+ headData.script = [{
37
+ innerHTML: "document.head.removeChild(document.querySelector('[data-bitrix24-ui-colors]'))"
38
+ }];
39
+ }
38
40
  }
39
41
  useHead(headData);
40
42
  });
@@ -131,7 +131,7 @@ const route = computed(() => {
131
131
 
132
132
  const routerLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass', 'to', 'raw', 'class'))
133
133
 
134
- const ui = computed(() => tv({
134
+ const b24ui = computed(() => tv({
135
135
  extend: link,
136
136
  variants: {
137
137
  active: {
@@ -193,7 +193,7 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
193
193
  return [props.class, active ? props.activeClass : props.inactiveClass]
194
194
  }
195
195
 
196
- return ui.value({
196
+ return b24ui.value({
197
197
  class: props.class,
198
198
  active,
199
199
  disabled: props.disabled,
@@ -201,12 +201,31 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
201
201
  })
202
202
  }
203
203
 
204
+ function resolveLinkClassNoRouter() {
205
+ if (props.raw) {
206
+ return [props.class, props.inactiveClass]
207
+ }
208
+
209
+ return b24ui.value({
210
+ class: props.class,
211
+ disabled: props.disabled,
212
+ isAction: Boolean(props.isAction)
213
+ })
214
+ }
215
+
204
216
  // Handle navigation without vue-router
205
217
  const handleNavigation = (href: string) => {
206
218
  if (isExternal.value) {
207
219
  window.location.href = href
208
220
  } else {
209
- window.location.pathname = href
221
+ const [path, hash] = href.split('#')
222
+
223
+ window.location.pathname = path || ''
224
+ if (hash) {
225
+ window.location.hash = hash
226
+ } else {
227
+ window.location.hash = ''
228
+ }
210
229
  }
211
230
  }
212
231
  </script>
@@ -266,9 +285,9 @@ const handleNavigation = (href: string) => {
266
285
  as,
267
286
  type,
268
287
  disabled,
269
- href: to ? (isExternal ? to as string : href as string) : undefined
288
+ href: to ? (isExternal ? to as string : to as string) : href as string
270
289
  }"
271
- :class="ui({ class: props.class, disabled })"
290
+ :class="resolveLinkClassNoRouter()"
272
291
  @click="to && handleNavigation(to as string)"
273
292
  >
274
293
  <slot :active="false" />