@byyuurin/ui 0.0.6 → 0.0.8
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/README.md +4 -5
- package/dist/module.cjs +5 -0
- package/dist/module.json +12 -0
- package/dist/{nuxt.mjs → module.mjs} +8 -8
- package/dist/module.mjs.map +1 -0
- package/dist/runtime/app/injections.d.ts +16 -0
- package/dist/runtime/app/injections.js +31 -0
- package/dist/runtime/components/Accordion.vue +27 -38
- package/dist/runtime/components/Alert.vue +23 -16
- package/dist/runtime/components/App.vue +15 -15
- package/dist/runtime/components/Avatar.vue +73 -0
- package/dist/runtime/components/AvatarGroup.vue +90 -0
- package/dist/runtime/components/Badge.vue +15 -10
- package/dist/runtime/components/Breadcrumb.vue +105 -0
- package/dist/runtime/components/Button.vue +22 -23
- package/dist/runtime/components/ButtonGroup.vue +12 -10
- package/dist/runtime/components/Card.vue +16 -8
- package/dist/runtime/components/Carousel.vue +19 -12
- package/dist/runtime/components/Checkbox.vue +16 -12
- package/dist/runtime/components/Chip.vue +17 -12
- package/dist/runtime/components/Collapsible.vue +56 -0
- package/dist/runtime/components/Drawer.vue +18 -17
- package/dist/runtime/components/Input.vue +28 -28
- package/dist/runtime/components/InputNumber.vue +169 -0
- package/dist/runtime/components/Kbd.vue +51 -0
- package/dist/runtime/components/Link.vue +301 -72
- package/dist/runtime/components/LinkBase.vue +88 -0
- package/dist/runtime/components/Modal.vue +11 -9
- package/dist/runtime/components/ModalProvider.vue +2 -1
- package/dist/runtime/components/Pagination.vue +30 -30
- package/dist/runtime/components/PinInput.vue +7 -7
- package/dist/runtime/components/Popover.vue +7 -7
- package/dist/runtime/components/Progress.vue +165 -0
- package/dist/runtime/components/RadioGroup.vue +33 -29
- package/dist/runtime/components/Select.vue +40 -40
- package/dist/runtime/components/Separator.vue +63 -0
- package/dist/runtime/components/Skeleton.vue +33 -0
- package/dist/runtime/components/Slider.vue +6 -6
- package/dist/runtime/components/Switch.vue +14 -15
- package/dist/runtime/components/Table.vue +300 -0
- package/dist/runtime/components/Tabs.vue +25 -21
- package/dist/runtime/components/Textarea.vue +11 -11
- package/dist/runtime/components/Toast.vue +15 -14
- package/dist/runtime/components/Toaster.vue +5 -39
- package/dist/runtime/components/Tooltip.vue +7 -7
- package/dist/runtime/composables/useAvatarGroup.d.ts +4 -0
- package/dist/runtime/composables/useAvatarGroup.js +8 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +4 -12
- package/dist/runtime/composables/{useButtonGroup.mjs → useButtonGroup.js} +1 -6
- package/dist/runtime/composables/useComponentIcons.d.ts +9 -9
- package/dist/runtime/composables/useComponentIcons.js +24 -0
- package/dist/runtime/composables/useKbd.d.ts +35 -0
- package/dist/runtime/composables/useKbd.js +49 -0
- package/dist/runtime/composables/useLocale.d.ts +8 -0
- package/dist/runtime/composables/useLocale.js +22 -0
- package/dist/runtime/composables/useModal.d.ts +2 -7
- package/dist/runtime/composables/{useModal.mjs → useModal.js} +1 -6
- package/dist/runtime/composables/useTheme.d.ts +2 -6
- package/dist/runtime/composables/useTheme.js +16 -0
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/index.d.ts +40 -0
- package/dist/runtime/index.js +40 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +28 -0
- package/dist/runtime/locale/index.d.ts +2 -0
- package/dist/runtime/locale/index.js +2 -0
- package/dist/runtime/locale/zh-tw.d.ts +2 -0
- package/dist/runtime/locale/zh-tw.js +28 -0
- package/dist/runtime/theme/accordion.d.ts +5 -5
- package/dist/runtime/theme/{accordion.mjs → accordion.js} +2 -2
- package/dist/runtime/theme/alert.d.ts +2 -2
- package/dist/runtime/theme/{alert.mjs → alert.js} +4 -4
- package/dist/runtime/theme/app.d.ts +8 -5
- package/dist/runtime/theme/app.js +18 -0
- package/dist/runtime/theme/avatar-group.d.ts +52 -0
- package/dist/runtime/theme/avatar-group.js +32 -0
- package/dist/runtime/theme/avatar.d.ts +56 -0
- package/dist/runtime/theme/avatar.js +34 -0
- package/dist/runtime/theme/badge.d.ts +45 -21
- package/dist/runtime/theme/{badge.mjs → badge.js} +2 -2
- package/dist/runtime/theme/breadcrumb.d.ts +67 -0
- package/dist/runtime/theme/breadcrumb.js +44 -0
- package/dist/runtime/theme/button-group.d.ts +2 -2
- package/dist/runtime/theme/button.d.ts +61 -115
- package/dist/runtime/theme/button.js +164 -0
- package/dist/runtime/theme/card.d.ts +38 -38
- package/dist/runtime/theme/card.js +37 -0
- package/dist/runtime/theme/carousel.d.ts +2 -2
- package/dist/runtime/theme/{carousel.mjs → carousel.js} +2 -2
- package/dist/runtime/theme/checkbox.d.ts +1 -1
- package/dist/runtime/theme/{checkbox.mjs → checkbox.js} +3 -3
- package/dist/runtime/theme/chip.d.ts +47 -14
- package/dist/runtime/theme/{chip.mjs → chip.js} +7 -9
- package/dist/runtime/theme/collapsible.d.ts +38 -0
- package/dist/runtime/theme/collapsible.js +10 -0
- package/dist/runtime/theme/drawer.d.ts +43 -43
- package/dist/runtime/theme/{drawer.mjs → drawer.js} +33 -22
- package/dist/runtime/theme/index.d.ts +37 -27
- package/dist/runtime/theme/index.js +37 -0
- package/dist/runtime/theme/input-number.d.ts +141 -0
- package/dist/runtime/theme/input-number.js +95 -0
- package/dist/runtime/theme/input.d.ts +77 -105
- package/dist/runtime/theme/{input.mjs → input.js} +25 -25
- package/dist/runtime/theme/kbd.d.ts +39 -0
- package/dist/runtime/theme/kbd.js +26 -0
- package/dist/runtime/theme/link.d.ts +2 -2
- package/dist/runtime/theme/{link.mjs → link.js} +1 -1
- package/dist/runtime/theme/modal.d.ts +31 -8
- package/dist/runtime/theme/{modal.mjs → modal.js} +4 -9
- package/dist/runtime/theme/pagination.d.ts +17 -17
- package/dist/runtime/theme/pinInput.d.ts +42 -42
- package/dist/runtime/theme/{pinInput.mjs → pinInput.js} +10 -10
- package/dist/runtime/theme/popover.d.ts +8 -8
- package/dist/runtime/theme/{popover.mjs → popover.js} +1 -1
- package/dist/runtime/theme/progress.d.ts +122 -0
- package/dist/runtime/theme/progress.js +95 -0
- package/dist/runtime/theme/radio-group.d.ts +1 -1
- package/dist/runtime/theme/{radio-group.mjs → radio-group.js} +1 -1
- package/dist/runtime/theme/scroll-area.d.ts +17 -17
- package/dist/runtime/theme/{scroll-area.mjs → scroll-area.js} +2 -2
- package/dist/runtime/theme/select.d.ts +93 -108
- package/dist/runtime/theme/{select.mjs → select.js} +31 -31
- package/dist/runtime/theme/separator.d.ts +95 -0
- package/dist/runtime/theme/separator.js +53 -0
- package/dist/runtime/theme/skeleton.d.ts +8 -0
- package/dist/runtime/theme/skeleton.js +7 -0
- package/dist/runtime/theme/slider.d.ts +1 -1
- package/dist/runtime/theme/{slider.mjs → slider.js} +3 -3
- package/dist/runtime/theme/switch.d.ts +1 -1
- package/dist/runtime/theme/{switch.mjs → switch.js} +3 -3
- package/dist/runtime/theme/table.d.ts +89 -0
- package/dist/runtime/theme/table.js +35 -0
- package/dist/runtime/theme/tabs.d.ts +70 -53
- package/dist/runtime/theme/{tabs.mjs → tabs.js} +12 -12
- package/dist/runtime/theme/textarea.d.ts +43 -37
- package/dist/runtime/theme/{textarea.mjs → textarea.js} +10 -10
- package/dist/runtime/theme/toast.d.ts +2 -2
- package/dist/runtime/theme/{toast.mjs → toast.js} +3 -3
- package/dist/runtime/theme/toaster.d.ts +42 -27
- package/dist/runtime/theme/tooltip.d.ts +11 -11
- package/dist/runtime/theme/tooltip.js +11 -0
- package/dist/runtime/types/components.d.ts +37 -27
- package/dist/runtime/types/index.d.ts +5 -4
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/locale.d.ts +23 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +1 -1
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/utils/index.d.ts +9 -4
- package/dist/runtime/utils/{index.mjs → index.js} +9 -7
- package/dist/runtime/utils/link.d.ts +22 -7
- package/dist/runtime/utils/link.js +30 -0
- package/dist/runtime/utils/styler.d.ts +1 -1
- package/dist/runtime/utils/translator.d.ts +18 -0
- package/dist/runtime/utils/translator.js +8 -0
- package/dist/runtime/vue/stubs.d.ts +9 -0
- package/dist/runtime/vue/stubs.js +16 -0
- package/dist/shared/ui.ba24b380.mjs +4 -0
- package/dist/shared/ui.ba24b380.mjs.map +1 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/unocss.d.mts +6 -11
- package/dist/unocss.d.ts +6 -11
- package/dist/unocss.mjs +40 -21
- package/dist/unocss.mjs.map +1 -1
- package/dist/unplugin.mjs +35 -8
- package/dist/unplugin.mjs.map +1 -1
- package/dist/vite.d.mts +0 -1
- package/dist/vite.d.ts +0 -1
- package/dist/vite.mjs +3 -1
- package/dist/vite.mjs.map +1 -1
- package/package.json +50 -38
- package/dist/index.d.ts +0 -29
- package/dist/index.mjs +0 -29
- package/dist/nuxt.mjs.map +0 -1
- package/dist/runtime/composables/useComponentIcons.mjs +0 -24
- package/dist/runtime/composables/useTheme.mjs +0 -26
- package/dist/runtime/theme/app.mjs +0 -15
- package/dist/runtime/theme/button.mjs +0 -148
- package/dist/runtime/theme/card.mjs +0 -14
- package/dist/runtime/theme/index.mjs +0 -27
- package/dist/runtime/theme/tooltip.mjs +0 -11
- package/dist/runtime/types/components.mjs +0 -27
- package/dist/runtime/types/index.mjs +0 -2
- package/dist/runtime/utils/link.mjs +0 -4
- package/dist/shared/ui.D4zm1r0C.mjs +0 -4
- package/dist/shared/ui.D4zm1r0C.mjs.map +0 -1
- /package/dist/{nuxt.d.mts → module.d.mts} +0 -0
- /package/dist/{nuxt.d.ts → module.d.ts} +0 -0
- /package/dist/runtime/composables/{useToast.mjs → useToast.js} +0 -0
- /package/dist/runtime/theme/{button-group.mjs → button-group.js} +0 -0
- /package/dist/runtime/theme/{pagination.mjs → pagination.js} +0 -0
- /package/dist/runtime/theme/{toaster.mjs → toaster.js} +0 -0
- /package/dist/runtime/types/{utils.mjs → components.js} +0 -0
- /package/dist/runtime/utils/{extend-theme.mjs → extend-theme.js} +0 -0
- /package/dist/runtime/utils/{styler.mjs → styler.js} +0 -0
- /package/dist/runtime/{composables/defineInjection.d.ts → utils/vue.d.ts} +0 -0
- /package/dist/runtime/{composables/defineInjection.mjs → utils/vue.js} +0 -0
package/README.md
CHANGED
|
@@ -47,9 +47,8 @@ export default defineConfig({
|
|
|
47
47
|
radiusSwitch: '0rem', // optional
|
|
48
48
|
radiusTabs: '0rem', // optional
|
|
49
49
|
cb: '#1f2937', // optional
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
c3: '#e5e6e6', // optional
|
|
50
|
+
cp: '#1f2937', // optional
|
|
51
|
+
cx: '#ffffff', // optional
|
|
53
52
|
}),
|
|
54
53
|
],
|
|
55
54
|
})
|
|
@@ -58,8 +57,8 @@ export default defineConfig({
|
|
|
58
57
|
New Rules
|
|
59
58
|
|
|
60
59
|
- `ui-[color]`
|
|
61
|
-
- `bg-
|
|
62
|
-
- `bg-
|
|
60
|
+
- `bg-soft-[color]`
|
|
61
|
+
- `bg-soft-[color]/[mix-ratio]`
|
|
63
62
|
|
|
64
63
|
### Vite
|
|
65
64
|
|
package/dist/module.cjs
ADDED
package/dist/module.json
ADDED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineNuxtModule, useLogger, createResolver, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
|
-
import {
|
|
2
|
+
import { n as name } from './shared/ui.ba24b380.mjs';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const module = defineNuxtModule({
|
|
5
5
|
meta: {
|
|
6
|
-
name:
|
|
6
|
+
name: name,
|
|
7
7
|
configKey: "ui",
|
|
8
8
|
compatibility: {
|
|
9
9
|
nuxt: ">=3.13.1"
|
|
@@ -13,15 +13,15 @@ const nuxt = defineNuxtModule({
|
|
|
13
13
|
prefix: "U"
|
|
14
14
|
},
|
|
15
15
|
setup(options, nuxt) {
|
|
16
|
-
const logger = useLogger(
|
|
16
|
+
const logger = useLogger(name);
|
|
17
17
|
const { resolve } = createResolver(import.meta.url);
|
|
18
18
|
if (!nuxt.options.modules.includes("@unocss/nuxt")) {
|
|
19
|
-
logger.error(`\`${
|
|
19
|
+
logger.error(`\`${name}\` requires the \`@unocss/nuxt\` module to be installed.`);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
nuxt.options.vite.optimizeDeps ??= {};
|
|
23
23
|
nuxt.options.vite.optimizeDeps.include ??= [];
|
|
24
|
-
nuxt.options.vite.optimizeDeps.include.push(`${
|
|
24
|
+
nuxt.options.vite.optimizeDeps.include.push(`${name}/unocss`);
|
|
25
25
|
nuxt.options.alias["#ui"] = resolve("./runtime");
|
|
26
26
|
addComponentsDir({
|
|
27
27
|
path: resolve("./runtime/components"),
|
|
@@ -32,5 +32,5 @@ const nuxt = defineNuxtModule({
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
export {
|
|
36
|
-
//# sourceMappingURL=
|
|
35
|
+
export { module as default };
|
|
36
|
+
//# sourceMappingURL=module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.mjs","sources":["../src/module.ts"],"sourcesContent":["import { addComponentsDir, addImportsDir, createResolver, defineNuxtModule, useLogger } from '@nuxt/kit'\nimport { packageName } from './shared'\n\nexport interface ModuleOptions {\n /**\n * prefix for components used in templates\n *\n * @default \"U\"\n */\n prefix?: string\n}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: packageName,\n configKey: 'ui',\n compatibility: {\n nuxt: '>=3.13.1',\n },\n },\n defaults: {\n prefix: 'U',\n },\n setup(options, nuxt) {\n const logger = useLogger(packageName)\n const { resolve } = createResolver(import.meta.url)\n\n // Make sure the UnoCSS Nuxt module is installed\n if (!nuxt.options.modules.includes('@unocss/nuxt')) {\n logger.error(`\\`${packageName}\\` requires the \\`@unocss/nuxt\\` module to be installed.`)\n return\n }\n\n nuxt.options.vite.optimizeDeps ??= {}\n nuxt.options.vite.optimizeDeps.include ??= []\n nuxt.options.vite.optimizeDeps.include.push(`${packageName}/unocss`)\n\n nuxt.options.alias['#ui'] = resolve('./runtime')\n\n addComponentsDir({\n path: resolve('./runtime/components'),\n prefix: options.prefix,\n pathPrefix: false,\n })\n\n addImportsDir(resolve('./runtime/composables'))\n },\n})\n"],"names":["packageName"],"mappings":";;;AAYA,eAAe,gBAAgC,CAAA;AAAA,EAC7C,IAAM,EAAA;AAAA,IACJ,IAAM,EAAAA,IAAA;AAAA,IACN,SAAW,EAAA,IAAA;AAAA,IACX,aAAe,EAAA;AAAA,MACb,IAAM,EAAA,UAAA;AAAA,KACR;AAAA,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,MAAQ,EAAA,GAAA;AAAA,GACV;AAAA,EACA,KAAA,CAAM,SAAS,IAAM,EAAA;AACnB,IAAM,MAAA,MAAA,GAAS,UAAUA,IAAW,CAAA,CAAA;AACpC,IAAA,MAAM,EAAE,OAAA,EAAY,GAAA,cAAA,CAAe,YAAY,GAAG,CAAA,CAAA;AAGlD,IAAA,IAAI,CAAC,IAAK,CAAA,OAAA,CAAQ,OAAQ,CAAA,QAAA,CAAS,cAAc,CAAG,EAAA;AAClD,MAAO,MAAA,CAAA,KAAA,CAAM,CAAK,EAAA,EAAAA,IAAW,CAA0D,wDAAA,CAAA,CAAA,CAAA;AACvF,MAAA,OAAA;AAAA,KACF;AAEA,IAAK,IAAA,CAAA,OAAA,CAAQ,IAAK,CAAA,YAAA,KAAiB,EAAC,CAAA;AACpC,IAAA,IAAA,CAAK,OAAQ,CAAA,IAAA,CAAK,YAAa,CAAA,OAAA,KAAY,EAAC,CAAA;AAC5C,IAAA,IAAA,CAAK,QAAQ,IAAK,CAAA,YAAA,CAAa,QAAQ,IAAK,CAAA,CAAA,EAAGA,IAAW,CAAS,OAAA,CAAA,CAAA,CAAA;AAEnE,IAAA,IAAA,CAAK,OAAQ,CAAA,KAAA,CAAM,KAAK,CAAA,GAAI,QAAQ,WAAW,CAAA,CAAA;AAE/C,IAAiB,gBAAA,CAAA;AAAA,MACf,IAAA,EAAM,QAAQ,sBAAsB,CAAA;AAAA,MACpC,QAAQ,OAAQ,CAAA,MAAA;AAAA,MAChB,UAAY,EAAA,KAAA;AAAA,KACb,CAAA,CAAA;AAED,IAAc,aAAA,CAAA,OAAA,CAAQ,uBAAuB,CAAC,CAAA,CAAA;AAAA,GAChD;AACF,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UserConfig } from '@unocss/core';
|
|
2
|
+
import type { Component, ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue';
|
|
3
|
+
import type { AvatarGroupProps, ButtonGroupProps, Messages, ModalProps } from '../types/index.js';
|
|
4
|
+
import type { Locale } from '../utils/index.js';
|
|
5
|
+
export type AvatarGroupProvideValue = Pick<AvatarGroupProps, 'size'>;
|
|
6
|
+
export declare const InjectionKeyAvatarGroup: import("vue").InjectionKey<ComputedRef<AvatarGroupProvideValue>>, injectAvatarGroup: () => ComputedRef<AvatarGroupProvideValue> | undefined, provideAvatarGroup: (value: ComputedRef<AvatarGroupProvideValue>) => void;
|
|
7
|
+
export type ButtonGroupProvideValue = Pick<ButtonGroupProps, 'size' | 'orientation'>;
|
|
8
|
+
export declare const InjectionKeyButtonGroup: import("vue").InjectionKey<ComputedRef<ButtonGroupProvideValue>>, injectButtonGroup: () => ComputedRef<ButtonGroupProvideValue> | undefined, provideButtonGroup: (value: ComputedRef<ButtonGroupProvideValue>) => void;
|
|
9
|
+
export declare const InjectionKeyLocaleContext: import("vue").InjectionKey<MaybeRefOrGetter<Locale<Messages> | undefined>>, injectLocaleContext: () => MaybeRefOrGetter<Locale<Messages> | undefined>, provideLocaleContext: (value: MaybeRefOrGetter<Locale<Messages> | undefined>) => void;
|
|
10
|
+
export interface ModalStateProvideValue {
|
|
11
|
+
component: Component | string;
|
|
12
|
+
props: ModalProps;
|
|
13
|
+
}
|
|
14
|
+
export declare const InjectionKeyModalState: import("vue").InjectionKey<ShallowRef<ModalStateProvideValue>>, injectModalState: () => ShallowRef<ModalStateProvideValue> | undefined, provideModalState: (value: ShallowRef<ModalStateProvideValue>) => void;
|
|
15
|
+
export declare const InjectionKeyThemeExtension: import("vue").InjectionKey<MaybeRefOrGetter<import("..").PartialTheme<typeof import("../theme")>>>, provideThemeExtension: (value: MaybeRefOrGetter<import("..").PartialTheme<typeof import("../theme")>>) => void, injectThemeExtension: () => MaybeRefOrGetter<import("..").PartialTheme<typeof import("../theme")>>;
|
|
16
|
+
export declare const InjectionKeyUnoConfig: import("vue").InjectionKey<MaybeRefOrGetter<UserConfig<object>>>, provideUnoConfig: (value: MaybeRefOrGetter<UserConfig<object>>) => void, injectUnoConfig: () => MaybeRefOrGetter<UserConfig<object>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineInjection } from "../utils/index.js";
|
|
2
|
+
export const {
|
|
3
|
+
InjectionKey: InjectionKeyAvatarGroup,
|
|
4
|
+
inject: injectAvatarGroup,
|
|
5
|
+
provide: provideAvatarGroup
|
|
6
|
+
} = defineInjection("ui.avatar-group");
|
|
7
|
+
export const {
|
|
8
|
+
InjectionKey: InjectionKeyButtonGroup,
|
|
9
|
+
inject: injectButtonGroup,
|
|
10
|
+
provide: provideButtonGroup
|
|
11
|
+
} = defineInjection("ui.button-group");
|
|
12
|
+
export const {
|
|
13
|
+
InjectionKey: InjectionKeyLocaleContext,
|
|
14
|
+
inject: injectLocaleContext,
|
|
15
|
+
provide: provideLocaleContext
|
|
16
|
+
} = defineInjection("ui.locale-context");
|
|
17
|
+
export const {
|
|
18
|
+
InjectionKey: InjectionKeyModalState,
|
|
19
|
+
inject: injectModalState,
|
|
20
|
+
provide: provideModalState
|
|
21
|
+
} = defineInjection("ui.modal");
|
|
22
|
+
export const {
|
|
23
|
+
InjectionKey: InjectionKeyThemeExtension,
|
|
24
|
+
provide: provideThemeExtension,
|
|
25
|
+
inject: injectThemeExtension
|
|
26
|
+
} = defineInjection("ui.theme-extension", {});
|
|
27
|
+
export const {
|
|
28
|
+
InjectionKey: InjectionKeyUnoConfig,
|
|
29
|
+
provide: provideUnoConfig,
|
|
30
|
+
inject: injectUnoConfig
|
|
31
|
+
} = defineInjection("ui.uno-config", {});
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { AccordionRootEmits, AccordionRootProps
|
|
2
|
+
import type { AccordionRootEmits, AccordionRootProps } from 'reka-ui'
|
|
3
3
|
import type { accordion } from '../theme'
|
|
4
4
|
import type { ComponentAttrs, DynamicSlots } from '../types'
|
|
5
5
|
|
|
6
|
+
export interface AccordionEmits extends AccordionRootEmits {}
|
|
7
|
+
|
|
8
|
+
type SlotProps<T> = (props: { item: T, index: number, open: boolean }) => any
|
|
9
|
+
|
|
10
|
+
export type AccordionSlots<T extends { slot?: string }> = {
|
|
11
|
+
default?: SlotProps<T>
|
|
12
|
+
leading?: SlotProps<T>
|
|
13
|
+
trailing?: SlotProps<T>
|
|
14
|
+
content?: SlotProps<T>
|
|
15
|
+
body?: SlotProps<T>
|
|
16
|
+
} & DynamicSlots<T, SlotProps<T>>
|
|
17
|
+
|
|
6
18
|
export interface AccordionItem {
|
|
7
19
|
label?: string
|
|
8
20
|
icon?: string
|
|
@@ -14,20 +26,13 @@ export interface AccordionItem {
|
|
|
14
26
|
disabled?: boolean
|
|
15
27
|
}
|
|
16
28
|
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
-
type SlotProps<T> = (props: { item: T, index: number, open: boolean }) => any
|
|
20
|
-
|
|
21
|
-
export type AccordionSlots<T extends { slot?: string }> = {
|
|
22
|
-
default?: SlotProps<T>
|
|
23
|
-
icon?: SlotProps<T>
|
|
24
|
-
content?: SlotProps<T>
|
|
25
|
-
body?: SlotProps<T>
|
|
26
|
-
} & DynamicSlots<T, SlotProps<T>>
|
|
27
|
-
|
|
28
|
-
export interface AccordionProps<T> extends ComponentAttrs<typeof accordion>, Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled' | 'unmountOnHide'> {
|
|
29
|
-
as?: PrimitiveProps['as']
|
|
29
|
+
export interface AccordionProps<T> extends ComponentAttrs<typeof accordion>, Pick<AccordionRootProps, 'as' | 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled' | 'unmountOnHide'> {
|
|
30
30
|
items?: T[]
|
|
31
|
+
/**
|
|
32
|
+
* The icon displayed on the right side of the trigger.
|
|
33
|
+
* @default app.icons.chevronDown
|
|
34
|
+
*/
|
|
35
|
+
trailingIcon?: string
|
|
31
36
|
labelKey?: string
|
|
32
37
|
}
|
|
33
38
|
</script>
|
|
@@ -44,11 +49,11 @@ const props = withDefaults(defineProps<AccordionProps<T>>(), {
|
|
|
44
49
|
collapsible: true,
|
|
45
50
|
unmountOnHide: true,
|
|
46
51
|
labelKey: 'label',
|
|
47
|
-
items: () => [],
|
|
48
52
|
})
|
|
49
|
-
const slots = defineSlots<AccordionSlots<T>>()
|
|
50
53
|
|
|
51
|
-
const
|
|
54
|
+
const emit = defineEmits<AccordionEmits>()
|
|
55
|
+
const slots = defineSlots<AccordionSlots<T>>()
|
|
56
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'collapsible', 'defaultValue', 'disabled', 'modelValue', 'type', 'unmountOnHide'), emit)
|
|
52
57
|
|
|
53
58
|
const { theme, createStyler } = useTheme()
|
|
54
59
|
const style = computed(() => {
|
|
@@ -69,16 +74,16 @@ const style = computed(() => {
|
|
|
69
74
|
>
|
|
70
75
|
<AccordionHeader :class="style.header({ class: props.ui?.header })">
|
|
71
76
|
<AccordionTrigger :class="style.trigger({ class: props.ui?.trigger, disabled: item.disabled })">
|
|
72
|
-
<slot name="
|
|
73
|
-
<
|
|
77
|
+
<slot name="leading" v-bind="{ item, index, open }">
|
|
78
|
+
<span v-if="item.icon" :class="style.leadingIcon({ class: [item.icon, props.ui?.leadingIcon] })"></span>
|
|
74
79
|
</slot>
|
|
75
80
|
|
|
76
81
|
<span v-if="get(item, props.labelKey) || slots.default" :class="style.label({ class: props.ui?.label })">
|
|
77
82
|
<slot v-bind="{ item, index, open }">{{ get(item, props.labelKey) }}</slot>
|
|
78
83
|
</span>
|
|
79
84
|
|
|
80
|
-
<slot name="trailing
|
|
81
|
-
<
|
|
85
|
+
<slot name="trailing" v-bind="{ item, index, open }">
|
|
86
|
+
<span :class="style.trailingIcon({ class: [item.trailingIcon || props.trailingIcon || theme.app.icons.chevronDown, props.ui?.trailingIcon] })"></span>
|
|
82
87
|
</slot>
|
|
83
88
|
</AccordionTrigger>
|
|
84
89
|
</AccordionHeader>
|
|
@@ -100,21 +105,5 @@ const style = computed(() => {
|
|
|
100
105
|
</template>
|
|
101
106
|
|
|
102
107
|
<style>
|
|
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
|
-
}
|
|
108
|
+
@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)}}
|
|
120
109
|
</style>
|
|
@@ -4,9 +4,26 @@ import type { PrimitiveProps } from 'reka-ui'
|
|
|
4
4
|
import type { alert } from '../theme'
|
|
5
5
|
import type { ButtonProps, ComponentAttrs } from '../types'
|
|
6
6
|
|
|
7
|
+
export interface AlertEmits {
|
|
8
|
+
(event: 'update:open', value: boolean): void
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface AlertSlots {
|
|
12
|
+
leading?: (props?: {}) => any
|
|
13
|
+
title?: (props?: {}) => any
|
|
14
|
+
description?: (props?: {}) => any
|
|
15
|
+
actions?: (props?: {}) => any
|
|
16
|
+
close?: (props: { ui: ComponentAttrs<typeof alert>['ui'] }) => any
|
|
17
|
+
}
|
|
18
|
+
|
|
7
19
|
type AlertVariants = VariantProps<typeof alert>
|
|
8
20
|
|
|
9
|
-
export interface AlertProps extends ComponentAttrs<typeof alert
|
|
21
|
+
export interface AlertProps extends ComponentAttrs<typeof alert> {
|
|
22
|
+
/**
|
|
23
|
+
* The element or component this component should render as.
|
|
24
|
+
* @default "div"
|
|
25
|
+
*/
|
|
26
|
+
as?: PrimitiveProps['as']
|
|
10
27
|
title?: string
|
|
11
28
|
description?: string
|
|
12
29
|
icon?: string
|
|
@@ -29,23 +46,12 @@ export interface AlertProps extends ComponentAttrs<typeof alert>, Pick<Primitive
|
|
|
29
46
|
*/
|
|
30
47
|
closeIcon?: string
|
|
31
48
|
}
|
|
32
|
-
|
|
33
|
-
export interface AlertEmits {
|
|
34
|
-
(event: 'update:open', value: boolean): void
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface AlertSlots {
|
|
38
|
-
prepend?: (props?: {}) => any
|
|
39
|
-
title?: (props?: {}) => any
|
|
40
|
-
description?: (props?: {}) => any
|
|
41
|
-
actions?: (props?: {}) => any
|
|
42
|
-
close?: (props: { ui: ComponentAttrs<typeof alert>['ui'] }) => any
|
|
43
|
-
}
|
|
44
49
|
</script>
|
|
45
50
|
|
|
46
51
|
<script setup lang="ts">
|
|
47
52
|
import { Primitive } from 'reka-ui'
|
|
48
53
|
import { computed } from 'vue'
|
|
54
|
+
import { useLocale } from '../composables/useLocale'
|
|
49
55
|
import { useTheme } from '../composables/useTheme'
|
|
50
56
|
import Button from './Button.vue'
|
|
51
57
|
|
|
@@ -57,6 +63,7 @@ const props = withDefaults(defineProps<AlertProps>(), {
|
|
|
57
63
|
const emit = defineEmits<AlertEmits>()
|
|
58
64
|
const slots = defineSlots<AlertSlots>()
|
|
59
65
|
|
|
66
|
+
const { t } = useLocale()
|
|
60
67
|
const { theme, createStyler } = useTheme()
|
|
61
68
|
const style = computed(() => {
|
|
62
69
|
const styler = createStyler(theme.value.alert)
|
|
@@ -73,8 +80,8 @@ const style = computed(() => {
|
|
|
73
80
|
:data-orientation="props.orientation"
|
|
74
81
|
:class="style.root({ class: [props.class, props.ui?.root] })"
|
|
75
82
|
>
|
|
76
|
-
<slot name="
|
|
77
|
-
<
|
|
83
|
+
<slot name="leading">
|
|
84
|
+
<span v-if="props.icon" :class="style.icon({ class: [props.icon, props.ui?.icon] })"></span>
|
|
78
85
|
</slot>
|
|
79
86
|
|
|
80
87
|
<div :class="style.wrapper({ class: props.ui?.wrapper })">
|
|
@@ -109,7 +116,7 @@ const style = computed(() => {
|
|
|
109
116
|
:icon="props.closeIcon || theme.app.icons.close"
|
|
110
117
|
size="md"
|
|
111
118
|
variant="link"
|
|
112
|
-
aria-label="
|
|
119
|
+
:aria-label="t('alert.close')"
|
|
113
120
|
v-bind="typeof props.close === 'object' ? props.close : undefined"
|
|
114
121
|
:class="style.close({ class: props.ui?.close })"
|
|
115
122
|
@click="emit('update:open', false)"
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { UserConfig } from '@unocss/core'
|
|
3
3
|
import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui'
|
|
4
|
-
import type { ThemeExtension, ToasterProps } from '../types'
|
|
4
|
+
import type { Messages, ThemeExtension, ToasterProps } from '../types'
|
|
5
|
+
import type { Locale } from '../utils'
|
|
6
|
+
|
|
7
|
+
export interface AppSlots {
|
|
8
|
+
default: (props?: {}) => any
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
export interface AppProps extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
|
|
7
12
|
unoConfig?: UserConfig
|
|
8
13
|
ui?: ThemeExtension
|
|
9
|
-
tooltip?: TooltipProviderProps
|
|
10
14
|
toaster?: ToasterProps
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export interface AppSlots {
|
|
14
|
-
default: (props?: Record<string, unknown>) => any
|
|
15
|
+
tooltip?: TooltipProviderProps
|
|
16
|
+
locale?: Locale<Messages>
|
|
15
17
|
}
|
|
16
18
|
</script>
|
|
17
19
|
|
|
18
20
|
<script setup lang="ts">
|
|
19
21
|
import { reactivePick } from '@vueuse/core'
|
|
20
22
|
import { ConfigProvider, TooltipProvider, useForwardProps } from 'reka-ui'
|
|
21
|
-
import {
|
|
22
|
-
import type {
|
|
23
|
-
import { provideModalState } from '../
|
|
24
|
-
import { provideThemeExtension, provideUnoConfig } from '../composables/useTheme'
|
|
23
|
+
import { shallowRef, toRef, useId } from 'vue'
|
|
24
|
+
import type { ModalStateProvideValue } from '../app/injections'
|
|
25
|
+
import { provideLocaleContext, provideModalState, provideThemeExtension, provideUnoConfig } from '../app/injections'
|
|
25
26
|
import ModalProvider from './ModalProvider.vue'
|
|
26
27
|
import Toaster from './Toaster.vue'
|
|
27
28
|
|
|
@@ -36,16 +37,15 @@ const configProviderProps = useForwardProps(reactivePick(props, 'scrollBody'))
|
|
|
36
37
|
const tooltipProps = toRef(() => props.tooltip)
|
|
37
38
|
const toasterProps = toRef(() => props.toaster)
|
|
38
39
|
|
|
39
|
-
const modalState = shallowRef<
|
|
40
|
+
const modalState = shallowRef<ModalStateProvideValue>({
|
|
40
41
|
component: 'div',
|
|
41
42
|
props: {},
|
|
42
43
|
})
|
|
43
44
|
|
|
44
|
-
const themeExtension = computed(() => props.ui)
|
|
45
|
-
|
|
46
45
|
provideModalState(modalState)
|
|
47
|
-
provideUnoConfig(props.unoConfig)
|
|
48
|
-
provideThemeExtension(
|
|
46
|
+
provideUnoConfig(() => props.unoConfig)
|
|
47
|
+
provideThemeExtension(() => props.ui)
|
|
48
|
+
provideLocaleContext(() => props.locale)
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VariantProps } from '@byyuurin/ui-kit'
|
|
3
|
+
import type { AvatarRootProps } from 'reka-ui'
|
|
4
|
+
import type { avatar } from '../theme'
|
|
5
|
+
import type { ComponentAttrs } from '../types'
|
|
6
|
+
|
|
7
|
+
export interface AvatarSlots {
|
|
8
|
+
default?: (props?: {}) => any
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type AvatarVariants = VariantProps<typeof avatar>
|
|
12
|
+
|
|
13
|
+
export interface AvatarProps extends ComponentAttrs<typeof avatar> {
|
|
14
|
+
/**
|
|
15
|
+
* The element or component this component should render as.
|
|
16
|
+
* @default "span"
|
|
17
|
+
*/
|
|
18
|
+
as?: AvatarRootProps['as']
|
|
19
|
+
src?: string
|
|
20
|
+
alt?: string
|
|
21
|
+
icon?: string
|
|
22
|
+
text?: string
|
|
23
|
+
size?: AvatarVariants['size']
|
|
24
|
+
style?: string | HTMLElement['style']
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { AvatarFallback, AvatarImage, AvatarRoot } from 'reka-ui'
|
|
30
|
+
import { computed, shallowRef, watch } from 'vue'
|
|
31
|
+
import { useAvatarGroup } from '../composables/useAvatarGroup'
|
|
32
|
+
import { useTheme } from '../composables/useTheme'
|
|
33
|
+
|
|
34
|
+
defineOptions({ inheritAttrs: false })
|
|
35
|
+
|
|
36
|
+
const props = withDefaults(defineProps<AvatarProps>(), {
|
|
37
|
+
src: '',
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const { size } = useAvatarGroup(props)
|
|
41
|
+
const fallback = computed(() => props.text || (props.alt || '').split(' ').map((word) => word.charAt(0)).join('').slice(0, 2))
|
|
42
|
+
|
|
43
|
+
const { theme, createStyler } = useTheme()
|
|
44
|
+
const style = computed(() => {
|
|
45
|
+
const styler = createStyler(theme.value.avatar)
|
|
46
|
+
return styler({
|
|
47
|
+
...props,
|
|
48
|
+
size: size.value,
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
const error = shallowRef(false)
|
|
53
|
+
|
|
54
|
+
watch(() => props.src, () => {
|
|
55
|
+
if (error.value)
|
|
56
|
+
error.value = false
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<AvatarRoot :as="props.as" :class="style.root({ class: [props.class, props.ui?.root] })" :style="props.style">
|
|
62
|
+
<AvatarImage
|
|
63
|
+
:src="props.src"
|
|
64
|
+
:alt="props.alt"
|
|
65
|
+
:class="style.image({ class: props.ui?.image })"
|
|
66
|
+
/>
|
|
67
|
+
|
|
68
|
+
<AvatarFallback as-child>
|
|
69
|
+
<span v-if="props.icon" :class="style.icon({ class: [props.icon, props.ui?.icon] })"></span>
|
|
70
|
+
<span v-else :class="style.fallback({ class: props.ui?.fallback })">{{ fallback || ' ' }}</span>
|
|
71
|
+
</AvatarFallback>
|
|
72
|
+
</AvatarRoot>
|
|
73
|
+
</template>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VariantProps } from '@byyuurin/ui-kit'
|
|
3
|
+
import type { PrimitiveProps } from 'reka-ui'
|
|
4
|
+
import type { avatarGroup } from '../theme'
|
|
5
|
+
import type { ComponentAttrs } from '../types'
|
|
6
|
+
|
|
7
|
+
export interface AvatarGroupSlots {
|
|
8
|
+
default?: (props?: {}) => any
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type AvatarGroupVariants = VariantProps<typeof avatarGroup>
|
|
12
|
+
|
|
13
|
+
export interface AvatarGroupProps extends ComponentAttrs<typeof avatarGroup> {
|
|
14
|
+
/**
|
|
15
|
+
* The element or component this component should render as.
|
|
16
|
+
* @default "div"
|
|
17
|
+
*/
|
|
18
|
+
as?: PrimitiveProps['as']
|
|
19
|
+
size?: AvatarGroupVariants['size']
|
|
20
|
+
/**
|
|
21
|
+
* The maximum number of avatars to display.
|
|
22
|
+
*/
|
|
23
|
+
max?: number | string
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
import { computed } from 'vue'
|
|
30
|
+
import { provideAvatarGroup } from '../app/injections'
|
|
31
|
+
import { useTheme } from '../composables/useTheme'
|
|
32
|
+
import Avatar from './Avatar.vue'
|
|
33
|
+
|
|
34
|
+
const props = defineProps<AvatarGroupProps>()
|
|
35
|
+
const slots = defineSlots<AvatarGroupSlots>()
|
|
36
|
+
|
|
37
|
+
const max = computed(() => typeof props.max === 'string' ? Number.parseInt(props.max, 10) : props.max)
|
|
38
|
+
|
|
39
|
+
const children = computed(() => {
|
|
40
|
+
let nodes = slots.default?.()
|
|
41
|
+
|
|
42
|
+
if (Array.isArray(nodes) && nodes?.length) {
|
|
43
|
+
nodes = nodes.flatMap((child) => {
|
|
44
|
+
if (typeof child.type === 'symbol') {
|
|
45
|
+
// `v-if="false"` or commented node
|
|
46
|
+
if (typeof child.children === 'string')
|
|
47
|
+
return null
|
|
48
|
+
|
|
49
|
+
return child.children
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return child
|
|
53
|
+
}).filter(Boolean)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return nodes || []
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const visibleAvatars = computed(() => {
|
|
60
|
+
if (children.value.length === 0)
|
|
61
|
+
return []
|
|
62
|
+
|
|
63
|
+
if (!max.value || max.value <= 0)
|
|
64
|
+
return [...children.value].reverse()
|
|
65
|
+
|
|
66
|
+
return [...children.value].slice(0, max.value).reverse()
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
const hiddenCount = computed(() => {
|
|
70
|
+
if (children.value.length === 0)
|
|
71
|
+
return 0
|
|
72
|
+
|
|
73
|
+
return children.value.length - visibleAvatars.value.length
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
const { theme, createStyler } = useTheme()
|
|
77
|
+
const style = computed(() => {
|
|
78
|
+
const styler = createStyler(theme.value.avatarGroup)
|
|
79
|
+
return styler(props)
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
provideAvatarGroup(computed(() => props))
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<Primitive :as="props.as" :class="style.root({ class: [props.class, props.ui?.root] })">
|
|
87
|
+
<Avatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="style.base({ class: props.ui?.base })" />
|
|
88
|
+
<component :is="avatar" v-for="(avatar, index) in visibleAvatars" :key="index" :class="style.base({ class: props.ui?.base })" />
|
|
89
|
+
</Primitive>
|
|
90
|
+
</template>
|
|
@@ -4,9 +4,23 @@ import type { PrimitiveProps } from 'reka-ui'
|
|
|
4
4
|
import type { badge } from '../theme'
|
|
5
5
|
import type { ComponentAttrs } from '../types'
|
|
6
6
|
|
|
7
|
+
export interface BadgeEmits {
|
|
8
|
+
(e: 'update:show', payload: boolean): void
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BadgeSlots {
|
|
12
|
+
default?: (props?: {}) => any
|
|
13
|
+
content?: (props?: {}) => any
|
|
14
|
+
}
|
|
15
|
+
|
|
7
16
|
type BadgeVariants = VariantProps<typeof badge>
|
|
8
17
|
|
|
9
|
-
export interface BadgeProps extends ComponentAttrs<typeof badge
|
|
18
|
+
export interface BadgeProps extends ComponentAttrs<typeof badge> {
|
|
19
|
+
/**
|
|
20
|
+
* The element or component this component should render as.
|
|
21
|
+
* @default "div"
|
|
22
|
+
*/
|
|
23
|
+
as?: PrimitiveProps['as']
|
|
10
24
|
text?: string | number
|
|
11
25
|
size?: BadgeVariants['size']
|
|
12
26
|
position?: BadgeVariants['position']
|
|
@@ -16,15 +30,6 @@ export interface BadgeProps extends ComponentAttrs<typeof badge>, Pick<Primitive
|
|
|
16
30
|
/** When `true`, render the badge relatively to the parent. */
|
|
17
31
|
standalone?: boolean
|
|
18
32
|
}
|
|
19
|
-
|
|
20
|
-
export interface BadgeEmits {
|
|
21
|
-
(e: 'update:show', payload: boolean): void
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface BadgeSlots {
|
|
25
|
-
default?: (props?: {}) => any
|
|
26
|
-
content?: (props?: {}) => any
|
|
27
|
-
}
|
|
28
33
|
</script>
|
|
29
34
|
|
|
30
35
|
<script setup lang="ts">
|