@byyuurin/ui 0.0.2 → 0.0.4

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.
Files changed (109) hide show
  1. package/README.md +76 -4
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.mjs +3 -3
  4. package/dist/nuxt.d.mts +13 -0
  5. package/dist/nuxt.d.ts +6 -3
  6. package/dist/nuxt.mjs +6 -3
  7. package/dist/resolver.d.mts +13 -0
  8. package/dist/resolver.d.ts +6 -3
  9. package/dist/resolver.mjs +5 -2
  10. package/dist/{components → runtime/components}/Accordion.vue +19 -3
  11. package/dist/{components → runtime/components}/App.vue +5 -1
  12. package/dist/{components → runtime/components}/Button.vue +92 -94
  13. package/dist/{components → runtime/components}/Checkbox.vue +101 -104
  14. package/dist/{components → runtime/components}/Input.vue +5 -1
  15. package/dist/{components → runtime/components}/ModalProvider.vue +1 -1
  16. package/dist/{components → runtime/components}/RadioGroup.vue +174 -180
  17. package/dist/runtime/components/ScrollArea.vue +72 -0
  18. package/dist/{components → runtime/components}/Select.vue +262 -258
  19. package/dist/{components → runtime/components}/Switch.vue +98 -99
  20. package/dist/{components → runtime/components}/Tabs.vue +117 -117
  21. package/dist/runtime/components/Textarea.vue +173 -0
  22. package/dist/{components → runtime/components}/Toast.vue +1 -1
  23. package/dist/{components → runtime/components}/Toaster.vue +35 -1
  24. package/dist/{components → runtime/components}/index.d.ts +2 -0
  25. package/dist/{components → runtime/components}/index.mjs +2 -0
  26. package/dist/runtime/composables/defineInjection.d.ts +11 -0
  27. package/dist/runtime/composables/defineInjection.mjs +9 -0
  28. package/dist/{composables → runtime/composables}/index.d.ts +1 -0
  29. package/dist/{composables → runtime/composables}/index.mjs +1 -0
  30. package/dist/{composables → runtime/composables}/useModal.d.ts +1 -1
  31. package/dist/{composables → runtime/composables}/useModal.mjs +3 -2
  32. package/dist/{composables → runtime/composables}/useTheme.d.ts +3 -2
  33. package/dist/runtime/composables/useTheme.mjs +26 -0
  34. package/dist/{composables → runtime/composables}/useToast.d.ts +1 -1
  35. package/dist/{theme → runtime/theme}/button.d.ts +0 -8
  36. package/dist/{theme → runtime/theme}/button.mjs +1 -9
  37. package/dist/{theme → runtime/theme}/checkbox.d.ts +0 -12
  38. package/dist/{theme → runtime/theme}/checkbox.mjs +4 -9
  39. package/dist/{theme → runtime/theme}/index.d.ts +2 -0
  40. package/dist/{theme → runtime/theme}/index.mjs +2 -0
  41. package/dist/{theme → runtime/theme}/radioGroup.d.ts +0 -24
  42. package/dist/{theme → runtime/theme}/radioGroup.mjs +8 -20
  43. package/dist/runtime/theme/scrollArea.d.ts +51 -0
  44. package/dist/runtime/theme/scrollArea.mjs +30 -0
  45. package/dist/{theme → runtime/theme}/switch.d.ts +0 -12
  46. package/dist/{theme → runtime/theme}/switch.mjs +2 -8
  47. package/dist/{theme → runtime/theme}/tabs.d.ts +32 -11
  48. package/dist/{theme → runtime/theme}/tabs.mjs +19 -12
  49. package/dist/runtime/theme/textarea.d.ts +90 -0
  50. package/dist/runtime/theme/textarea.mjs +100 -0
  51. package/dist/{theme → runtime/theme}/toast.mjs +1 -1
  52. package/dist/{types → runtime/types}/components.d.ts +2 -0
  53. package/dist/{types → runtime/types}/index.d.ts +1 -1
  54. package/dist/{utils → runtime/utils}/index.d.ts +3 -12
  55. package/dist/{utils → runtime/utils}/index.mjs +3 -12
  56. package/dist/{internal → runtime/utils}/styler.d.ts +0 -1
  57. package/dist/runtime/utils/styler.mjs +10 -0
  58. package/dist/{internal/constants.mjs → shared/ui.Cmq14xN9.mjs} +6 -2
  59. package/dist/unocss-preset.d.mts +57 -0
  60. package/dist/unocss-preset.d.ts +29 -9
  61. package/dist/unocss-preset.mjs +164 -110
  62. package/package.json +18 -12
  63. package/dist/composables/useTheme.mjs +0 -18
  64. package/dist/internal/constants.d.ts +0 -3
  65. package/dist/internal/index.d.ts +0 -4
  66. package/dist/internal/index.mjs +0 -4
  67. package/dist/internal/styler.mjs +0 -236
  68. package/dist/utils/unocss.d.ts +0 -3
  69. package/dist/utils/unocss.mjs +0 -50
  70. /package/dist/{components → runtime/components}/Card.vue +0 -0
  71. /package/dist/{components → runtime/components}/Drawer.vue +0 -0
  72. /package/dist/{components → runtime/components}/Link.vue +0 -0
  73. /package/dist/{components → runtime/components}/Modal.vue +0 -0
  74. /package/dist/{components → runtime/components}/Popover.vue +0 -0
  75. /package/dist/{components → runtime/components}/Tooltip.vue +0 -0
  76. /package/dist/{composables → runtime/composables}/useComponentIcons.d.ts +0 -0
  77. /package/dist/{composables → runtime/composables}/useComponentIcons.mjs +0 -0
  78. /package/dist/{composables → runtime/composables}/useToast.mjs +0 -0
  79. /package/dist/{theme → runtime/theme}/accordion.d.ts +0 -0
  80. /package/dist/{theme → runtime/theme}/accordion.mjs +0 -0
  81. /package/dist/{theme → runtime/theme}/app.d.ts +0 -0
  82. /package/dist/{theme → runtime/theme}/app.mjs +0 -0
  83. /package/dist/{theme → runtime/theme}/card.d.ts +0 -0
  84. /package/dist/{theme → runtime/theme}/card.mjs +0 -0
  85. /package/dist/{theme → runtime/theme}/drawer.d.ts +0 -0
  86. /package/dist/{theme → runtime/theme}/drawer.mjs +0 -0
  87. /package/dist/{theme → runtime/theme}/input.d.ts +0 -0
  88. /package/dist/{theme → runtime/theme}/input.mjs +0 -0
  89. /package/dist/{theme → runtime/theme}/link.d.ts +0 -0
  90. /package/dist/{theme → runtime/theme}/link.mjs +0 -0
  91. /package/dist/{theme → runtime/theme}/modal.d.ts +0 -0
  92. /package/dist/{theme → runtime/theme}/modal.mjs +0 -0
  93. /package/dist/{theme → runtime/theme}/popover.d.ts +0 -0
  94. /package/dist/{theme → runtime/theme}/popover.mjs +0 -0
  95. /package/dist/{theme → runtime/theme}/select.d.ts +0 -0
  96. /package/dist/{theme → runtime/theme}/select.mjs +0 -0
  97. /package/dist/{theme → runtime/theme}/toast.d.ts +0 -0
  98. /package/dist/{theme → runtime/theme}/toaster.d.ts +0 -0
  99. /package/dist/{theme → runtime/theme}/toaster.mjs +0 -0
  100. /package/dist/{theme → runtime/theme}/tooltip.d.ts +0 -0
  101. /package/dist/{theme → runtime/theme}/tooltip.mjs +0 -0
  102. /package/dist/{types → runtime/types}/components.mjs +0 -0
  103. /package/dist/{types → runtime/types}/index.mjs +0 -0
  104. /package/dist/{types → runtime/types}/utils.d.ts +0 -0
  105. /package/dist/{types → runtime/types}/utils.mjs +0 -0
  106. /package/dist/{internal → runtime/utils}/extend-theme.d.ts +0 -0
  107. /package/dist/{internal → runtime/utils}/extend-theme.mjs +0 -0
  108. /package/dist/{internal → runtime/utils}/link.d.ts +0 -0
  109. /package/dist/{internal → runtime/utils}/link.mjs +0 -0
package/README.md CHANGED
@@ -15,10 +15,18 @@ https://byyuurin-ui.netlify.app/
15
15
  ## Installation
16
16
 
17
17
  ```ssh
18
- pnpm i @byyuurin/ui
18
+ pnpm i -D unocss @unocss/reset @byyuurin/ui
19
19
  ```
20
20
 
21
- ## UnoCSS
21
+ icons
22
+
23
+ ```ssh
24
+ pnpm i -D @iconify-json/[the-collection-you-want]
25
+ ```
26
+
27
+ ## Setup
28
+
29
+ ### UnoCSS
22
30
 
23
31
  ```ts
24
32
  // uno.config.ts
@@ -28,8 +36,19 @@ import { defineConfig, presetIcons, presetUno } from 'unocss'
28
36
  export default defineConfig({
29
37
  presets: [
30
38
  presetUno(),
31
- presetIcons(),
32
- ui(),
39
+ presetIcons({
40
+ cdn: 'https://esm.sh/', // OR install @iconify-json/[the-collection-you-want]
41
+ }),
42
+ ui({
43
+ radius: '0rem', // optional
44
+ radiusBox: '0rem', // optional
45
+ radiusButton: '0rem', // optional
46
+ radiusTabs: '0rem', // optional
47
+ cb: '#1f2937', // optional
48
+ c1: '#ffffff', // optional
49
+ c2: '#f2f2f2', // optional
50
+ c3: '#e5e6e6', // optional
51
+ }),
33
52
  ],
34
53
  content: {
35
54
  pipeline: {
@@ -42,11 +61,64 @@ export default defineConfig({
42
61
  })
43
62
  ```
44
63
 
64
+ ### Vite
65
+
66
+ ```ts
67
+ // vite.config.ts
68
+
69
+ import UIResolver from '@byyuurin/ui/resolver'
70
+ import Vue from '@vitejs/plugin-vue'
71
+ import UnoCSS from 'unocss/vite'
72
+ import AutoImport from 'unplugin-auto-import/vite'
73
+ import VueComponents from 'unplugin-vue-components/vite'
74
+ import { defineConfig } from 'vite'
75
+
76
+ export default defineConfig({
77
+ plugins: [
78
+ UnoCSS(),
79
+ Vue(),
80
+ VueComponents({
81
+ dts: 'src/typed-components.d.ts',
82
+ resolvers: [
83
+ UIResolver({
84
+ prefix: 'U', // optional
85
+ }),
86
+ ],
87
+ }),
88
+ AutoImport({
89
+ dts: 'src/typed-imports.d.ts',
90
+ imports: ['vue'],
91
+ }),
92
+ ],
93
+ })
94
+ ```
95
+
96
+ ### Nuxt
97
+
98
+ ```ts
99
+ // nuxt.config.ts
100
+
101
+ export default defineNuxtConfig({
102
+ modules: [
103
+ '@unocss/nuxt',
104
+ '@byyuurin/ui/nuxt',
105
+ ],
106
+ css: [
107
+ '@unocss/reset/tailwind.css',
108
+ ],
109
+ ui: {
110
+ prefix: 'U', // optional
111
+ },
112
+ })
113
+ ```
114
+
45
115
  ## Credits
46
116
 
47
117
  - [UnoCSS](https://github.com/unocss/unocss)
48
118
  - [daisyui](https://github.com/saadeghi/daisyui)
49
119
  - [@nuxt/ui](https://github.com/nuxt/ui)
120
+ - [Reka UI](https://github.com/unovue/radix-vue)
121
+ - [VueUse](https://github.com/vueuse/vueuse)
50
122
 
51
123
  ## License
52
124
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './components';
2
- export * from './composables';
3
- export * from './types';
1
+ export * from './runtime/components';
2
+ export * from './runtime/composables';
3
+ export * from './runtime/types';
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./components/index.mjs";
2
- export * from "./composables/index.mjs";
3
- export * from "./types/index.mjs";
1
+ export * from "./runtime/components/index.mjs";
2
+ export * from "./runtime/composables/index.mjs";
3
+ export * from "./runtime/types/index.mjs";
@@ -0,0 +1,13 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ /**
5
+ * prefix for components used in templates
6
+ *
7
+ * @default ""
8
+ */
9
+ prefix?: string;
10
+ }
11
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
12
+
13
+ export { type ModuleOptions, _default as default };
package/dist/nuxt.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export interface ModuleOptions {
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
2
4
  /**
3
5
  * prefix for components used in templates
4
6
  *
@@ -6,5 +8,6 @@ export interface ModuleOptions {
6
8
  */
7
9
  prefix?: string;
8
10
  }
9
- declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
10
- export default _default;
11
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
12
+
13
+ export { type ModuleOptions, _default as default };
package/dist/nuxt.mjs CHANGED
@@ -1,6 +1,7 @@
1
- import { addComponent, defineNuxtModule, useLogger } from "@nuxt/kit";
2
- import { componentNames, packageName } from "./internal/index.mjs";
3
- export default defineNuxtModule({
1
+ import { defineNuxtModule, useLogger, addComponent } from '@nuxt/kit';
2
+ import { p as packageName, c as componentNames } from './shared/ui.Cmq14xN9.mjs';
3
+
4
+ const nuxt = defineNuxtModule({
4
5
  meta: {
5
6
  name: packageName,
6
7
  configKey: "ui",
@@ -26,3 +27,5 @@ export default defineNuxtModule({
26
27
  }
27
28
  }
28
29
  });
30
+
31
+ export { nuxt as default };
@@ -0,0 +1,13 @@
1
+ import { ComponentResolver } from 'unplugin-vue-components';
2
+
3
+ interface ResolverOptions {
4
+ /**
5
+ * prefix for components used in templates
6
+ *
7
+ * @default ""
8
+ */
9
+ prefix?: string;
10
+ }
11
+ declare function export_default(options?: ResolverOptions): ComponentResolver;
12
+
13
+ export { type ResolverOptions, export_default as default };
@@ -1,5 +1,6 @@
1
- import type { ComponentResolver } from 'unplugin-vue-components';
2
- export interface ResolverOptions {
1
+ import { ComponentResolver } from 'unplugin-vue-components';
2
+
3
+ interface ResolverOptions {
3
4
  /**
4
5
  * prefix for components used in templates
5
6
  *
@@ -7,4 +8,6 @@ export interface ResolverOptions {
7
8
  */
8
9
  prefix?: string;
9
10
  }
10
- export default function (options?: ResolverOptions): ComponentResolver;
11
+ declare function export_default(options?: ResolverOptions): ComponentResolver;
12
+
13
+ export { type ResolverOptions, export_default as default };
package/dist/resolver.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { componentNames, packageName } from "./internal/constants.mjs";
2
- export default function(options = {}) {
1
+ import { c as componentNames, p as packageName } from './shared/ui.Cmq14xN9.mjs';
2
+
3
+ function resolver(options = {}) {
3
4
  const { prefix = "" } = options;
4
5
  return {
5
6
  type: "component",
@@ -16,3 +17,5 @@ export default function(options = {}) {
16
17
  }
17
18
  };
18
19
  }
20
+
21
+ export { resolver as default };
@@ -73,8 +73,8 @@ const style = computed(() => {
73
73
  <i v-if="item.icon" :class="style.icon({ class: [item.icon, props.ui?.icon] })"></i>
74
74
  </slot>
75
75
 
76
- <span v-if="get(item, props.labelKey as string) || slots.default" :class="style.label({ class: props.ui?.label })">
77
- <slot v-bind="{ item, index, open }">{{ get(item, props.labelKey as string) }}</slot>
76
+ <span v-if="get(item, props.labelKey) || slots.default" :class="style.label({ class: props.ui?.label })">
77
+ <slot v-bind="{ item, index, open }">{{ get(item, props.labelKey) }}</slot>
78
78
  </span>
79
79
 
80
80
  <slot name="trailing-icon" v-bind="{ item, index, open }">
@@ -100,5 +100,21 @@ const style = computed(() => {
100
100
  </template>
101
101
 
102
102
  <style>
103
- @keyframes accordion-up{0%{height:var(--reka-accordion-content-height)}to{height:0}}@keyframes accordion-down{0%{height:0}to{height:var(--reka-accordion-content-height)}}
103
+ @keyframes accordion-up {
104
+ from {
105
+ height: var(--reka-accordion-content-height);
106
+ }
107
+ to {
108
+ height: 0;
109
+ }
110
+ }
111
+
112
+ @keyframes accordion-down {
113
+ from {
114
+ height: 0;
115
+ }
116
+ to {
117
+ height: var(--reka-accordion-content-height);
118
+ }
119
+ }
104
120
  </style>
@@ -1,8 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui'
3
+ import type { UserConfig } from 'unocss'
3
4
  import type { ThemeExtension, ToasterProps } from '../types'
4
5
 
5
6
  export interface AppProps extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
7
+ unoConfig?: UserConfig
6
8
  ui?: ThemeExtension
7
9
  tooltip?: TooltipProviderProps
8
10
  toaster?: ToasterProps
@@ -19,11 +21,12 @@ import { ConfigProvider, TooltipProvider, useForwardProps } from 'reka-ui'
19
21
  import { computed, shallowRef, toRef, useId } from 'vue'
20
22
  import type { ModalState } from '../composables/useModal'
21
23
  import { provideModalState } from '../composables/useModal'
22
- import { provideThemeExtension } from '../composables/useTheme'
24
+ import { provideThemeExtension, provideUnoConfig } from '../composables/useTheme'
23
25
  import ModalProvider from './ModalProvider.vue'
24
26
  import Toaster from './Toaster.vue'
25
27
 
26
28
  const props = withDefaults(defineProps<AppProps>(), {
29
+ unoConfig: () => ({}),
27
30
  ui: () => ({}),
28
31
  })
29
32
 
@@ -41,6 +44,7 @@ const modalState = shallowRef<ModalState>({
41
44
  const themeExtension = computed(() => props.ui)
42
45
 
43
46
  provideModalState(modalState)
47
+ provideUnoConfig(props.unoConfig)
44
48
  provideThemeExtension(themeExtension)
45
49
  </script>
46
50
 
@@ -1,94 +1,92 @@
1
- <script lang="ts">
2
- import type { VariantProps } from '@byyuurin/ui-kit'
3
- import type { UseComponentIconsProps } from '../composables/useComponentIcons'
4
- import type { button } from '../theme'
5
- import type { ComponentAttrs } from '../types'
6
- import type { LinkProps } from './Link.vue'
7
-
8
- export interface ButtonSlots {
9
- default?: (props?: any) => any
10
- prefix?: (props?: any) => any
11
- suffix?: (props?: any) => any
12
- }
13
-
14
- type ButtonVariants = VariantProps<typeof button>
15
- type UIOptions = ComponentAttrs<typeof button>['ui'] & LinkProps['ui']
16
-
17
- export interface ButtonProps extends Omit<ComponentAttrs<typeof button>, 'ui'>, UseComponentIconsProps, Omit<LinkProps, 'ui' | 'raw'> {
18
- icon?: string
19
- label?: string
20
- variant?: ButtonVariants['variant']
21
- size?: ButtonVariants['size']
22
- round?: boolean
23
- loading?: boolean
24
- active?: boolean
25
- disabled?: boolean
26
- ui?: UIOptions
27
- }
28
- </script>
29
-
30
- <script lang="ts" setup>
31
- import { computed } from 'vue'
32
- import { useComponentIcons, useTheme } from '../composables'
33
- import { pickLinkProps } from '../internal'
34
- import { omit } from '../utils'
35
- import Link from './Link.vue'
36
-
37
- const props = withDefaults(defineProps<ButtonProps>(), {
38
- variant: 'solid',
39
- size: 'md',
40
- })
41
-
42
- const slots = defineSlots<ButtonSlots>()
43
-
44
- const { isPrefix, isSuffix, prefixIconName, suffixIconName } = useComponentIcons(
45
- computed(() => ({ ...props, loading: props.loading })),
46
- )
47
-
48
- const linkProps = pickLinkProps(props)
49
-
50
- const { theme, createStyler } = useTheme()
51
-
52
- const style = computed(() => {
53
- const styler = createStyler(theme.value.button)
54
- return styler({
55
- ...props,
56
- prefix: isPrefix.value,
57
- suffix: isSuffix.value,
58
- class: [
59
- props.class,
60
- props.active ? props.ui?.active : props.ui?.inactive,
61
- props.disabled ? props.ui?.disabled : undefined,
62
- ],
63
- })
64
- })
65
- </script>
66
-
67
- <template>
68
- <Link
69
- :class="style.base({ class: [props.class, props.ui?.base] })"
70
- :type="props.type"
71
- :disabled="props.disabled || props.loading"
72
- v-bind="omit(linkProps, ['type', 'disabled'])"
73
- raw
74
- >
75
- <slot name="prefix">
76
- <i
77
- v-if="isPrefix && prefixIconName"
78
- :class="style.prefixIcon({ class: [prefixIconName, props.ui?.prefixIcon] })"
79
- ></i>
80
- </slot>
81
- <span
82
- v-if="slots.default || props.label"
83
- :class="style.label({ class: props.ui?.label })"
84
- >
85
- <slot>{{ label }}</slot>
86
- </span>
87
- <slot name="suffix">
88
- <i
89
- v-if="isSuffix && suffixIconName"
90
- :class="style.suffixIcon({ class: [suffixIconName, props.ui?.suffixIcon] })"
91
- ></i>
92
- </slot>
93
- </Link>
94
- </template>
1
+ <script lang="ts">
2
+ import type { VariantProps } from '@byyuurin/ui-kit'
3
+ import type { UseComponentIconsProps } from '../composables/useComponentIcons'
4
+ import type { button } from '../theme'
5
+ import type { ComponentAttrs } from '../types'
6
+ import type { LinkProps } from './Link.vue'
7
+
8
+ export interface ButtonSlots {
9
+ default?: (props?: any) => any
10
+ prefix?: (props?: any) => any
11
+ suffix?: (props?: any) => any
12
+ }
13
+
14
+ type ButtonVariants = VariantProps<typeof button>
15
+ type UIOptions = ComponentAttrs<typeof button>['ui'] & LinkProps['ui']
16
+
17
+ export interface ButtonProps extends Omit<ComponentAttrs<typeof button>, 'ui'>, UseComponentIconsProps, Omit<LinkProps, 'ui' | 'raw'> {
18
+ icon?: string
19
+ label?: string
20
+ variant?: ButtonVariants['variant']
21
+ size?: ButtonVariants['size']
22
+ loading?: boolean
23
+ active?: boolean
24
+ disabled?: boolean
25
+ ui?: UIOptions
26
+ }
27
+ </script>
28
+
29
+ <script lang="ts" setup>
30
+ import { computed } from 'vue'
31
+ import { useComponentIcons, useTheme } from '../composables'
32
+ import { omit, pickLinkProps } from '../utils'
33
+ import Link from './Link.vue'
34
+
35
+ const props = withDefaults(defineProps<ButtonProps>(), {
36
+ variant: 'solid',
37
+ size: 'md',
38
+ })
39
+
40
+ const slots = defineSlots<ButtonSlots>()
41
+
42
+ const { isPrefix, isSuffix, prefixIconName, suffixIconName } = useComponentIcons(
43
+ computed(() => ({ ...props, loading: props.loading })),
44
+ )
45
+
46
+ const linkProps = pickLinkProps(props)
47
+
48
+ const { theme, createStyler } = useTheme()
49
+
50
+ const style = computed(() => {
51
+ const styler = createStyler(theme.value.button)
52
+ return styler({
53
+ ...props,
54
+ prefix: isPrefix.value,
55
+ suffix: isSuffix.value,
56
+ class: [
57
+ props.class,
58
+ props.active ? props.ui?.active : props.ui?.inactive,
59
+ props.disabled ? props.ui?.disabled : undefined,
60
+ ],
61
+ })
62
+ })
63
+ </script>
64
+
65
+ <template>
66
+ <Link
67
+ :class="style.base({ class: [props.class, props.ui?.base] })"
68
+ :type="props.type"
69
+ :disabled="props.disabled || props.loading"
70
+ v-bind="omit(linkProps, ['type', 'disabled'])"
71
+ raw
72
+ >
73
+ <slot name="prefix">
74
+ <i
75
+ v-if="isPrefix && prefixIconName"
76
+ :class="style.prefixIcon({ class: [prefixIconName, props.ui?.prefixIcon] })"
77
+ ></i>
78
+ </slot>
79
+ <span
80
+ v-if="slots.default || props.label"
81
+ :class="style.label({ class: props.ui?.label })"
82
+ >
83
+ <slot>{{ label }}</slot>
84
+ </span>
85
+ <slot name="suffix">
86
+ <i
87
+ v-if="isSuffix && suffixIconName"
88
+ :class="style.suffixIcon({ class: [suffixIconName, props.ui?.suffixIcon] })"
89
+ ></i>
90
+ </slot>
91
+ </Link>
92
+ </template>