@ug666/ui-vue 0.1.0 → 0.2.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.
- package/dist/aliases-CKe0wVQy.cjs +2 -0
- package/dist/aliases-CKe0wVQy.cjs.map +1 -0
- package/dist/aliases-u3xep8jx.js +2732 -0
- package/dist/aliases-u3xep8jx.js.map +1 -0
- package/dist/aliases.d.ts +49 -0
- package/dist/aliases.d.ts.map +1 -0
- package/dist/blocks/feature-grid.vue.d.ts +44 -0
- package/dist/blocks/feature-grid.vue.d.ts.map +1 -0
- package/dist/blocks/index.cjs +2 -0
- package/dist/blocks/index.cjs.map +1 -0
- package/dist/blocks/index.d.ts +10 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +137 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/landing-hero.vue.d.ts +59 -0
- package/dist/blocks/landing-hero.vue.d.ts.map +1 -0
- package/dist/button-C10AiP5_.cjs +2 -0
- package/dist/button-C10AiP5_.cjs.map +1 -0
- package/dist/button-Sy9e0tiI.js +1742 -0
- package/dist/button-Sy9e0tiI.js.map +1 -0
- package/dist/component-layers.d.ts +199 -0
- package/dist/component-layers.d.ts.map +1 -0
- package/dist/components/card.vue.d.ts.map +1 -1
- package/dist/components/checkbox.vue.d.ts.map +1 -1
- package/dist/components/context-menu.vue.d.ts.map +1 -1
- package/dist/components/descriptions.vue.d.ts.map +1 -1
- package/dist/components/dropdown.vue.d.ts.map +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.ts +50 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +5 -0
- package/dist/components/pagination.vue.d.ts.map +1 -1
- package/dist/components/popover.vue.d.ts.map +1 -1
- package/dist/components/progress.vue.d.ts +4 -3
- package/dist/components/progress.vue.d.ts.map +1 -1
- package/dist/components/radio.vue.d.ts.map +1 -1
- package/dist/components/select.vue.d.ts +2 -0
- package/dist/components/select.vue.d.ts.map +1 -1
- package/dist/components/sidebar.vue.d.ts +39 -5
- package/dist/components/sidebar.vue.d.ts.map +1 -1
- package/dist/components/steps.vue.d.ts.map +1 -1
- package/dist/components/switch.vue.d.ts.map +1 -1
- package/dist/components/tag.vue.d.ts +1 -1
- package/dist/components/tag.vue.d.ts.map +1 -1
- package/dist/components/tooltip.vue.d.ts.map +1 -1
- package/dist/composables/index.cjs +1 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/index.js +3 -2
- package/dist/composables-GXmQiqgg.cjs +2 -0
- package/dist/composables-GXmQiqgg.cjs.map +1 -0
- package/dist/{composables-BwdwEG7n.js → composables-YMNfao5g.js} +68 -113
- package/dist/composables-YMNfao5g.js.map +1 -0
- package/dist/global.cjs +1 -0
- package/dist/global.d.ts +107 -0
- package/dist/global.d.ts.map +1 -0
- package/dist/global.js +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +321 -2927
- package/dist/index.js.map +1 -1
- package/dist/internal/cn.d.ts +3 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/labs/index.cjs +2 -0
- package/dist/labs/index.cjs.map +1 -0
- package/dist/labs/index.d.ts +10 -0
- package/dist/labs/index.d.ts.map +1 -0
- package/dist/labs/index.js +9 -0
- package/dist/labs/index.js.map +1 -0
- package/dist/patterns/admin-shell.vue.d.ts +73 -0
- package/dist/patterns/admin-shell.vue.d.ts.map +1 -0
- package/dist/patterns/confirm-dialog.vue.d.ts +62 -0
- package/dist/patterns/confirm-dialog.vue.d.ts.map +1 -0
- package/dist/patterns/copy-field.vue.d.ts +51 -0
- package/dist/patterns/copy-field.vue.d.ts.map +1 -0
- package/dist/patterns/index.cjs +2 -0
- package/dist/patterns/index.cjs.map +1 -0
- package/dist/patterns/index.d.ts +14 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +295 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/page-header.vue.d.ts +46 -0
- package/dist/patterns/page-header.vue.d.ts.map +1 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/primitives/index.cjs +1 -0
- package/dist/primitives/index.d.ts +14 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +3 -0
- package/dist/resolver.cjs +2 -0
- package/dist/resolver.cjs.map +1 -0
- package/dist/resolver.d.ts +20 -0
- package/dist/resolver.d.ts.map +1 -0
- package/dist/resolver.js +33 -0
- package/dist/resolver.js.map +1 -0
- package/dist/separator-BnNQAp6A.js +259 -0
- package/dist/separator-BnNQAp6A.js.map +1 -0
- package/dist/separator-Bynwn-we.cjs +2 -0
- package/dist/separator-Bynwn-we.cjs.map +1 -0
- package/dist/sidebar-BnZB7vlK.js +344 -0
- package/dist/sidebar-BnZB7vlK.js.map +1 -0
- package/dist/sidebar-xKPzL0NQ.cjs +2 -0
- package/dist/sidebar-xKPzL0NQ.cjs.map +1 -0
- package/dist/styles.css +2502 -0
- package/dist/theme.d.ts +77 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/toast-state-BBoVvR0u.cjs +2 -0
- package/dist/toast-state-BBoVvR0u.cjs.map +1 -0
- package/dist/toast-state-Crugc-IE.js +50 -0
- package/dist/toast-state-Crugc-IE.js.map +1 -0
- package/dist/tokens.css +86 -9
- package/package.json +46 -6
- package/dist/composables-BwdwEG7n.js.map +0 -1
- package/dist/composables-Cxcf-3ov.cjs +0 -2
- package/dist/composables-Cxcf-3ov.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/internal/cn.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/labs/index.ts"],"sourcesContent":["/**\n * @description: Vue labs 子入口 — 实验组件占位入口,稳定前不进入主入口\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n\nexport const vueLabStatus = {\n status: 'empty',\n description: '用于孵化还未稳定的 ug-ui Vue 组件,正式使用前需要先晋升到 patterns、blocks 或 components。',\n} as const\n"],"mappings":"mEAMA,IAAa,EAAe,CAC1B,OAAQ,QACR,YAAa,mEACd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: Vue labs 子入口 — 实验组件占位入口,稳定前不进入主入口
|
|
3
|
+
* @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。
|
|
4
|
+
* @date: 2026-05-30
|
|
5
|
+
*/
|
|
6
|
+
export declare const vueLabStatus: {
|
|
7
|
+
readonly status: "empty";
|
|
8
|
+
readonly description: "用于孵化还未稳定的 ug-ui Vue 组件,正式使用前需要先晋升到 patterns、blocks 或 components。";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/labs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,YAAY;;;CAGf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/labs/index.ts"],"sourcesContent":["/**\n * @description: Vue labs 子入口 — 实验组件占位入口,稳定前不进入主入口\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n\nexport const vueLabStatus = {\n status: 'empty',\n description: '用于孵化还未稳定的 ug-ui Vue 组件,正式使用前需要先晋升到 patterns、blocks 或 components。',\n} as const\n"],"mappings":";AAMA,IAAa,IAAe;CAC1B,QAAQ;CACR,aAAa;CACd"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
interface AdminShellNavItem {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
icon: Component;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
children?: AdminShellNavItem[];
|
|
9
|
+
}
|
|
10
|
+
type SidebarVariant = 'primary' | 'dark';
|
|
11
|
+
interface Props {
|
|
12
|
+
/** 侧栏导航项 */
|
|
13
|
+
navItems: AdminShellNavItem[];
|
|
14
|
+
/** 侧栏视觉风格 */
|
|
15
|
+
sidebarVariant?: SidebarVariant;
|
|
16
|
+
/** 是否启用侧栏搜索 */
|
|
17
|
+
sidebarSearchable?: boolean;
|
|
18
|
+
/** 是否启用侧栏折叠 */
|
|
19
|
+
sidebarCollapsible?: boolean;
|
|
20
|
+
/** 受控折叠状态 */
|
|
21
|
+
sidebarCollapsed?: boolean;
|
|
22
|
+
/** 非受控默认折叠状态 */
|
|
23
|
+
defaultSidebarCollapsed?: boolean;
|
|
24
|
+
/** 受控移动端侧栏状态 */
|
|
25
|
+
mobileSidebarOpen?: boolean;
|
|
26
|
+
/** main 元素类名 */
|
|
27
|
+
mainClass?: string;
|
|
28
|
+
/** 内容容器类名 */
|
|
29
|
+
contentClass?: string;
|
|
30
|
+
/** 容器额外 CSS 类名 */
|
|
31
|
+
class?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function __VLS_template(): {
|
|
34
|
+
attrs: Partial<{}>;
|
|
35
|
+
slots: {
|
|
36
|
+
sidebarHeader?(_: {}): any;
|
|
37
|
+
sidebarFooter?(_: {}): any;
|
|
38
|
+
topbar?(_: {}): any;
|
|
39
|
+
topbarStart?(_: {}): any;
|
|
40
|
+
topbarEnd?(_: {}): any;
|
|
41
|
+
default?(_: {}): any;
|
|
42
|
+
};
|
|
43
|
+
refs: {};
|
|
44
|
+
rootEl: HTMLDivElement;
|
|
45
|
+
};
|
|
46
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
47
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
48
|
+
"update:sidebarCollapsed": (collapsed: boolean) => any;
|
|
49
|
+
sidebarCollapsedChange: (collapsed: boolean) => any;
|
|
50
|
+
"update:mobileSidebarOpen": (open: boolean) => any;
|
|
51
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
52
|
+
"onUpdate:sidebarCollapsed"?: ((collapsed: boolean) => any) | undefined;
|
|
53
|
+
onSidebarCollapsedChange?: ((collapsed: boolean) => any) | undefined;
|
|
54
|
+
"onUpdate:mobileSidebarOpen"?: ((open: boolean) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
class: string;
|
|
57
|
+
sidebarVariant: SidebarVariant;
|
|
58
|
+
sidebarSearchable: boolean;
|
|
59
|
+
sidebarCollapsible: boolean;
|
|
60
|
+
sidebarCollapsed: boolean;
|
|
61
|
+
defaultSidebarCollapsed: boolean;
|
|
62
|
+
mobileSidebarOpen: boolean;
|
|
63
|
+
mainClass: string;
|
|
64
|
+
contentClass: string;
|
|
65
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
66
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=admin-shell.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-shell.vue.d.ts","sourceRoot":"","sources":["../../src/patterns/admin-shell.vue"],"names":[],"mappings":"AAKA;AA2IA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAUnD,UAAU,iBAAiB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC/B;AAED,KAAK,cAAc,GAAG,SAAS,GAAG,MAAM,CAAA;AAExC,UAAU,KAAK;IACb,YAAY;IACZ,QAAQ,EAAE,iBAAiB,EAAE,CAAA;IAC7B,aAAa;IACb,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,eAAe;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,gBAAgB;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gBAAgB;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAkDD,iBAAS,cAAc;WAiKT,OAAO,IAA6B;;+BAff,GAAG;+BACF,GAAG;wBACV,GAAG;6BACE,GAAG;2BACL,GAAG;yBACL,GAAG;;;;EAehC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;WA3OX,MAAM;oBAhBG,cAAc;uBAEX,OAAO;wBAEN,OAAO;sBAET,OAAO;6BAEA,OAAO;uBAEb,OAAO;eAEf,MAAM;kBAEH,MAAM;wFAsPrB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
type ConfirmDialogVariant = 'default' | 'destructive';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** 是否打开 */
|
|
4
|
+
open?: boolean;
|
|
5
|
+
/** 标题 */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** 描述 */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** 变体,destructive 用于危险操作 */
|
|
10
|
+
variant?: ConfirmDialogVariant;
|
|
11
|
+
/** 取消按钮文案 */
|
|
12
|
+
cancelText?: string;
|
|
13
|
+
/** 确认按钮文案 */
|
|
14
|
+
confirmText?: string;
|
|
15
|
+
/** 是否展示确认按钮 loading */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** 是否禁用确认按钮 */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** 确认后是否自动关闭 */
|
|
20
|
+
closeOnConfirm?: boolean;
|
|
21
|
+
/** 内容区域额外 CSS 类名 */
|
|
22
|
+
class?: string;
|
|
23
|
+
}
|
|
24
|
+
declare function __VLS_template(): {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: {
|
|
27
|
+
title?(_: {}): any;
|
|
28
|
+
description?(_: {}): any;
|
|
29
|
+
default?(_: {}): any;
|
|
30
|
+
};
|
|
31
|
+
refs: {};
|
|
32
|
+
rootEl: any;
|
|
33
|
+
};
|
|
34
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
35
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
cancel: () => any;
|
|
37
|
+
"update:open": (open: boolean) => any;
|
|
38
|
+
confirm: () => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
40
|
+
onCancel?: (() => any) | undefined;
|
|
41
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
42
|
+
onConfirm?: (() => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
variant: ConfirmDialogVariant;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
class: string;
|
|
48
|
+
title: string;
|
|
49
|
+
open: boolean;
|
|
50
|
+
description: string;
|
|
51
|
+
cancelText: string;
|
|
52
|
+
confirmText: string;
|
|
53
|
+
closeOnConfirm: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=confirm-dialog.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.vue.d.ts","sourceRoot":"","sources":["../../src/patterns/confirm-dialog.vue"],"names":[],"mappings":"AAKA;AA0IA,KAAK,oBAAoB,GAAG,SAAS,GAAG,aAAa,CAAA;AAErD,UAAU,KAAK;IACb,WAAW;IACX,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS;IACT,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS;IACT,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,aAAa;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AA+DD,iBAAS,cAAc;WAiKT,OAAO,IAA6B;;uBAZtB,GAAG;6BACG,GAAG;yBACP,GAAG;;;;EAehC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;aArQT,oBAAoB;aAMpB,OAAO;cAEN,OAAO;WAIV,MAAM;WAhBN,MAAM;UAFP,OAAO;iBAIA,MAAM;gBAIP,MAAM;iBAEL,MAAM;oBAMH,OAAO;6EAoQxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** 实际复制的值 */
|
|
3
|
+
value: string;
|
|
4
|
+
/** 字段标签 */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** 展示值;不传时展示 value */
|
|
7
|
+
displayValue?: string;
|
|
8
|
+
/** 是否使用等宽字体展示 */
|
|
9
|
+
monospace?: boolean;
|
|
10
|
+
/** 是否禁用复制 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 复制按钮文案 */
|
|
13
|
+
copyLabel?: string;
|
|
14
|
+
/** 复制成功后的短暂文案 */
|
|
15
|
+
copiedLabel?: string;
|
|
16
|
+
/** 容器额外 CSS 类名 */
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: {
|
|
22
|
+
label?(_: {}): any;
|
|
23
|
+
default?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
copied: (value: string) => any;
|
|
31
|
+
copyError: (error: unknown) => any;
|
|
32
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
33
|
+
onCopied?: ((value: string) => any) | undefined;
|
|
34
|
+
onCopyError?: ((error: unknown) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
class: string;
|
|
38
|
+
label: string;
|
|
39
|
+
displayValue: string;
|
|
40
|
+
monospace: boolean;
|
|
41
|
+
copyLabel: string;
|
|
42
|
+
copiedLabel: string;
|
|
43
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=copy-field.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-field.vue.d.ts","sourceRoot":"","sources":["../../src/patterns/copy-field.vue"],"names":[],"mappings":"AAKA;AAoHA,UAAU,KAAK;IACb,aAAa;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sBAAsB;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAgED,iBAAS,cAAc;WA6FT,OAAO,IAA6B;;uBAXvB,GAAG;yBACD,GAAG;;;;EAe/B;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;cA7LR,OAAO;WAMV,MAAM;WAZN,MAAM;kBAEC,MAAM;eAET,OAAO;eAIP,MAAM;iBAEJ,MAAM;wFAkMpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../button-C10AiP5_.cjs`),t=require(`../sidebar-xKPzL0NQ.cjs`);let n=require(`vue`),r=require(`lucide-vue-next`);var i={class:`flex min-h-screen min-w-0`},a={class:`flex min-w-0 flex-1 flex-col`},o={class:`sticky top-0 z-30 flex min-h-14 items-center gap-3 border-b border-border-base bg-surface-0/95 px-4 backdrop-blur sm:px-6 lg:px-8`},s={key:0,class:`min-w-0 flex-1`},c={class:`min-w-0 flex-1`},l={key:0,class:`flex shrink-0 items-center gap-2`},u=(0,n.defineComponent)({name:`UAdminShell`,__name:`admin-shell`,props:{navItems:{},sidebarVariant:{default:`dark`},sidebarSearchable:{type:Boolean,default:!1},sidebarCollapsible:{type:Boolean,default:!0},sidebarCollapsed:{type:Boolean,default:void 0},defaultSidebarCollapsed:{type:Boolean,default:!1},mobileSidebarOpen:{type:Boolean,default:void 0},mainClass:{default:void 0},contentClass:{default:void 0},class:{default:void 0}},emits:[`update:sidebarCollapsed`,`sidebarCollapsedChange`,`update:mobileSidebarOpen`],setup(u,{emit:d}){let f=u,p=d,m=(0,n.ref)(!1),h=(0,n.computed)(()=>f.mobileSidebarOpen??m.value);function g(e){f.mobileSidebarOpen===void 0&&(m.value=e),p(`update:mobileSidebarOpen`,e)}function _(e){p(`update:sidebarCollapsed`,e),p(`sidebarCollapsedChange`,e)}return(d,p)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)((0,n.unref)(e.n)(`min-h-screen bg-surface-0 text-text-primary`,f.class))},[(0,n.createElementVNode)(`div`,i,[(0,n.createVNode)(t.t,{items:u.navItems,variant:u.sidebarVariant,searchable:u.sidebarSearchable,collapsible:u.sidebarCollapsible,collapsed:u.sidebarCollapsed,"default-collapsed":u.defaultSidebarCollapsed,responsive:``,"mobile-open":h.value,class:`shrink-0`,"onUpdate:collapsed":_,onCollapseChange:_,"onUpdate:mobileOpen":g},(0,n.createSlots)({_:2},[d.$slots.sidebarHeader?{name:`header`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(d.$slots,`sidebarHeader`)]),key:`0`}:void 0,d.$slots.sidebarFooter?{name:`footer`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(d.$slots,`sidebarFooter`)]),key:`1`}:void 0]),1032,[`items`,`variant`,`searchable`,`collapsible`,`collapsed`,`default-collapsed`,`mobile-open`]),(0,n.createElementVNode)(`div`,a,[(0,n.createElementVNode)(`header`,o,[(0,n.createVNode)(e.t,{type:`button`,variant:`ghost`,size:`icon`,class:`md:hidden`,"aria-label":`打开侧边栏`,onClick:p[0]||(p[0]=e=>g(!0))},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.Menu),{size:18})]),_:1}),d.$slots.topbar?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,s,[(0,n.renderSlot)(d.$slots,`topbar`)])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createElementVNode)(`div`,c,[(0,n.renderSlot)(d.$slots,`topbarStart`)]),d.$slots.topbarEnd?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,l,[(0,n.renderSlot)(d.$slots,`topbarEnd`)])):(0,n.createCommentVNode)(``,!0)],64))]),(0,n.createElementVNode)(`main`,{class:(0,n.normalizeClass)((0,n.unref)(e.n)(`min-w-0 flex-1 overflow-x-hidden`,u.mainClass))},[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)((0,n.unref)(e.n)(`mx-auto w-full max-w-7xl px-4 py-6 sm:px-6 lg:px-8`,u.contentClass))},[(0,n.renderSlot)(d.$slots,`default`)],2)],2)])])],2))}}),d={key:0,class:`min-w-0`},f={class:`flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`},p={class:`min-w-0 space-y-3`},m={key:0,class:`text-xs font-semibold uppercase text-primary`},h={class:`flex min-w-0 flex-wrap items-center gap-2.5`},g={class:`min-w-0 break-words text-2xl font-bold leading-tight text-text-primary sm:text-3xl`},_={key:0,class:`shrink-0`},v={key:1,class:`max-w-3xl text-sm leading-6 text-text-secondary`},y={key:2,class:`flex min-w-0 flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-tertiary`},b={key:0,class:`flex shrink-0 flex-wrap items-center gap-2 lg:justify-end`},x={key:1,class:`min-w-0`},S=(0,n.defineComponent)({name:`UPageHeader`,__name:`page-header`,props:{eyebrow:{default:void 0},title:{default:void 0},description:{default:void 0},badge:{default:void 0},meta:{default:void 0},class:{default:void 0}},setup(t){let r=t,i=(0,n.computed)(()=>e.n(`flex min-w-0 flex-col gap-5 border-b border-border-base pb-6`,r.class));return(e,r)=>((0,n.openBlock)(),(0,n.createElementBlock)(`header`,{class:(0,n.normalizeClass)(i.value)},[e.$slots.breadcrumb?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,d,[(0,n.renderSlot)(e.$slots,`breadcrumb`)])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,f,[(0,n.createElementVNode)(`div`,p,[t.eyebrow||e.$slots.eyebrow?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,m,[(0,n.renderSlot)(e.$slots,`eyebrow`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.eyebrow),1)])])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,h,[(0,n.createElementVNode)(`h1`,g,[(0,n.renderSlot)(e.$slots,`title`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.title),1)])]),t.badge||e.$slots.badge?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,_,[(0,n.renderSlot)(e.$slots,`badge`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.badge),1)])])):(0,n.createCommentVNode)(``,!0)]),t.description||e.$slots.description?((0,n.openBlock)(),(0,n.createElementBlock)(`p`,v,[(0,n.renderSlot)(e.$slots,`description`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.description),1)])])):(0,n.createCommentVNode)(``,!0),t.meta||e.$slots.meta?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,y,[(0,n.renderSlot)(e.$slots,`meta`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.meta),1)])])):(0,n.createCommentVNode)(``,!0)]),e.$slots.actions?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,b,[(0,n.renderSlot)(e.$slots,`actions`)])):(0,n.createCommentVNode)(``,!0)]),e.$slots.default?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,x,[(0,n.renderSlot)(e.$slots,`default`)])):(0,n.createCommentVNode)(``,!0)],2))}}),C={key:0,class:`text-xs font-medium text-text-secondary`},w=[`title`],T={class:`flex shrink-0 items-center border-l border-border-base bg-surface-2 px-1.5`},E=(0,n.defineComponent)({name:`UCopyField`,__name:`copy-field`,props:{value:{},label:{default:void 0},displayValue:{default:void 0},monospace:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},copyLabel:{default:`复制`},copiedLabel:{default:`已复制`},class:{default:void 0}},emits:[`copied`,`copyError`],setup(t,{emit:i}){let a=t,o=i,s=(0,n.ref)(!1),c,l=(0,n.computed)(()=>e.n(`space-y-2`,a.class)),u=(0,n.computed)(()=>e.n(`min-w-0 flex-1 truncate px-3 py-2 text-sm text-text-primary`,a.monospace&&`font-mono`)),d=(0,n.computed)(()=>a.displayValue??a.value);async function f(){if(!a.disabled)try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard API is not available`);await navigator.clipboard.writeText(a.value),s.value=!0,o(`copied`,a.value),c&&clearTimeout(c),c=setTimeout(()=>{s.value=!1},1400)}catch(e){o(`copyError`,e)}}return(0,n.onBeforeUnmount)(()=>{c&&clearTimeout(c)}),(i,a)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)(l.value)},[t.label||i.$slots.label?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,C,[(0,n.renderSlot)(i.$slots,`label`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.label),1)])])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)((0,n.unref)(e.n)(`flex min-w-0 items-stretch overflow-hidden rounded-md border border-border-base bg-surface-1`,t.disabled&&`opacity-60`))},[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)(u.value),title:d.value},[(0,n.renderSlot)(i.$slots,`default`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(d.value),1)])],10,w),(0,n.createElementVNode)(`div`,T,[(0,n.createVNode)(e.t,{type:`button`,variant:`ghost`,size:`sm`,disabled:t.disabled,"aria-live":`polite`,onClick:f},{default:(0,n.withCtx)(()=>[s.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.Check),{key:0,size:15})):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.Copy),{key:1,size:15})),(0,n.createTextVNode)(` `+(0,n.toDisplayString)(s.value?t.copiedLabel:t.copyLabel),1)]),_:1},8,[`disabled`])])],2)],2))}}),D={class:`flex min-w-0 items-start gap-3`},O={class:`min-w-0 flex-1 space-y-1 text-left`},k={class:`break-words text-base font-semibold text-text-primary`},A={key:0,class:`text-sm leading-6 text-text-secondary`},j={key:0,class:`text-sm text-text-secondary`},M=(0,n.defineComponent)({name:`UConfirmDialog`,__name:`confirm-dialog`,props:{open:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},variant:{default:`destructive`},cancelText:{default:`取消`},confirmText:{default:`确认`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnConfirm:{type:Boolean,default:!0},class:{default:void 0}},emits:[`update:open`,`cancel`,`confirm`],setup(i,{emit:a}){let o=i,s=a,c=(0,n.computed)({get:()=>o.open,set:e=>s(`update:open`,e)}),l=(0,n.computed)(()=>e.n(`flex h-10 w-10 shrink-0 items-center justify-center rounded-md`,o.variant===`destructive`?`bg-danger-soft text-danger-soft-fg`:`bg-primary-soft text-primary-soft-fg`));function u(){s(`cancel`),s(`update:open`,!1)}function d(){s(`confirm`),o.closeOnConfirm&&s(`update:open`,!1)}return(a,s)=>((0,n.openBlock)(),(0,n.createBlock)(t.n,{open:c.value,"onUpdate:open":s[0]||(s[0]=e=>c.value=e),"show-close-button":!1,"max-width":`max-w-md`,class:(0,n.normalizeClass)(o.class),onClose:u},{header:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,D,[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)(l.value)},[i.variant===`destructive`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.AlertTriangle),{key:0,size:20,"aria-hidden":`true`})):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.HelpCircle),{key:1,size:20,"aria-hidden":`true`}))],2),(0,n.createElementVNode)(`div`,O,[(0,n.createElementVNode)(`h2`,k,[(0,n.renderSlot)(a.$slots,`title`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(i.title),1)])]),i.description||a.$slots.description?((0,n.openBlock)(),(0,n.createElementBlock)(`p`,A,[(0,n.renderSlot)(a.$slots,`description`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(i.description),1)])])):(0,n.createCommentVNode)(``,!0)])])]),footer:(0,n.withCtx)(()=>[(0,n.createVNode)(e.t,{type:`button`,variant:`outline`,disabled:i.loading,onClick:u},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(i.cancelText),1)]),_:1},8,[`disabled`]),(0,n.createVNode)(e.t,{type:`button`,variant:i.variant===`destructive`?`destructive`:`default`,loading:i.loading,disabled:i.disabled,onClick:d},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(i.confirmText),1)]),_:1},8,[`variant`,`loading`,`disabled`])]),default:(0,n.withCtx)(()=>[a.$slots.default?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,j,[(0,n.renderSlot)(a.$slots,`default`)])):(0,n.createCommentVNode)(``,!0)]),_:3},8,[`open`,`class`]))}});exports.UAdminShell=u,exports.UGAdminShell=u,exports.UConfirmDialog=M,exports.UGConfirmDialog=M,exports.UCopyField=E,exports.UGCopyField=E,exports.UGPageHeader=S,exports.UPageHeader=S;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["$slots","$slots","$slots","$slots"],"sources":["../../src/patterns/admin-shell.vue","../../src/patterns/admin-shell.vue","../../src/patterns/page-header.vue","../../src/patterns/page-header.vue","../../src/patterns/copy-field.vue","../../src/patterns/copy-field.vue","../../src/patterns/confirm-dialog.vue","../../src/patterns/confirm-dialog.vue"],"sourcesContent":["/**\n * @description: UAdminShell 后台框架模式 — 组合侧栏、顶栏和内容区域\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed, ref, type Component } from 'vue'\nimport { Menu } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport USidebar from '../components/sidebar.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UAdminShell',\n})\n\ninterface AdminShellNavItem {\n id?: string\n label: string\n href?: string\n icon: Component\n active?: boolean\n children?: AdminShellNavItem[]\n}\n\ntype SidebarVariant = 'primary' | 'dark'\n\ninterface Props {\n /** 侧栏导航项 */\n navItems: AdminShellNavItem[]\n /** 侧栏视觉风格 */\n sidebarVariant?: SidebarVariant\n /** 是否启用侧栏搜索 */\n sidebarSearchable?: boolean\n /** 是否启用侧栏折叠 */\n sidebarCollapsible?: boolean\n /** 受控折叠状态 */\n sidebarCollapsed?: boolean\n /** 非受控默认折叠状态 */\n defaultSidebarCollapsed?: boolean\n /** 受控移动端侧栏状态 */\n mobileSidebarOpen?: boolean\n /** main 元素类名 */\n mainClass?: string\n /** 内容容器类名 */\n contentClass?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n sidebarVariant: 'dark',\n sidebarSearchable: false,\n sidebarCollapsible: true,\n sidebarCollapsed: undefined,\n defaultSidebarCollapsed: false,\n mobileSidebarOpen: undefined,\n mainClass: undefined,\n contentClass: undefined,\n class: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:sidebarCollapsed': [collapsed: boolean]\n 'sidebarCollapsedChange': [collapsed: boolean]\n 'update:mobileSidebarOpen': [open: boolean]\n}>()\n\nconst internalMobileOpen = ref(false)\nconst effectiveMobileOpen = computed(() => props.mobileSidebarOpen ?? internalMobileOpen.value)\n\nfunction setMobileOpen(open: boolean) {\n if (props.mobileSidebarOpen === undefined) {\n internalMobileOpen.value = open\n }\n emit('update:mobileSidebarOpen', open)\n}\n\nfunction handleCollapsedChange(collapsed: boolean) {\n emit('update:sidebarCollapsed', collapsed)\n emit('sidebarCollapsedChange', collapsed)\n}\n</script>\n\n<template>\n <div :class=\"cn('min-h-screen bg-surface-0 text-text-primary', props.class)\">\n <div class=\"flex min-h-screen min-w-0\">\n <USidebar\n :items=\"navItems\"\n :variant=\"sidebarVariant\"\n :searchable=\"sidebarSearchable\"\n :collapsible=\"sidebarCollapsible\"\n :collapsed=\"sidebarCollapsed\"\n :default-collapsed=\"defaultSidebarCollapsed\"\n responsive\n :mobile-open=\"effectiveMobileOpen\"\n class=\"shrink-0\"\n @update:collapsed=\"handleCollapsedChange\"\n @collapse-change=\"handleCollapsedChange\"\n @update:mobile-open=\"setMobileOpen\"\n >\n <template v-if=\"$slots.sidebarHeader\" #header>\n <slot name=\"sidebarHeader\" />\n </template>\n <template v-if=\"$slots.sidebarFooter\" #footer>\n <slot name=\"sidebarFooter\" />\n </template>\n </USidebar>\n\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <header class=\"sticky top-0 z-30 flex min-h-14 items-center gap-3 border-b border-border-base bg-surface-0/95 px-4 backdrop-blur sm:px-6 lg:px-8\">\n <UButton type=\"button\" variant=\"ghost\" size=\"icon\" class=\"md:hidden\" aria-label=\"打开侧边栏\" @click=\"setMobileOpen(true)\">\n <Menu :size=\"18\" />\n </UButton>\n\n <div v-if=\"$slots.topbar\" class=\"min-w-0 flex-1\">\n <slot name=\"topbar\" />\n </div>\n <template v-else>\n <div class=\"min-w-0 flex-1\">\n <slot name=\"topbarStart\" />\n </div>\n <div v-if=\"$slots.topbarEnd\" class=\"flex shrink-0 items-center gap-2\">\n <slot name=\"topbarEnd\" />\n </div>\n </template>\n </header>\n\n <main :class=\"cn('min-w-0 flex-1 overflow-x-hidden', mainClass)\">\n <div :class=\"cn('mx-auto w-full max-w-7xl px-4 py-6 sm:px-6 lg:px-8', contentClass)\">\n <slot />\n </div>\n </main>\n </div>\n </div>\n </div>\n</template>\n","/**\n * @description: UAdminShell 后台框架模式 — 组合侧栏、顶栏和内容区域\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed, ref, type Component } from 'vue'\nimport { Menu } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport USidebar from '../components/sidebar.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UAdminShell',\n})\n\ninterface AdminShellNavItem {\n id?: string\n label: string\n href?: string\n icon: Component\n active?: boolean\n children?: AdminShellNavItem[]\n}\n\ntype SidebarVariant = 'primary' | 'dark'\n\ninterface Props {\n /** 侧栏导航项 */\n navItems: AdminShellNavItem[]\n /** 侧栏视觉风格 */\n sidebarVariant?: SidebarVariant\n /** 是否启用侧栏搜索 */\n sidebarSearchable?: boolean\n /** 是否启用侧栏折叠 */\n sidebarCollapsible?: boolean\n /** 受控折叠状态 */\n sidebarCollapsed?: boolean\n /** 非受控默认折叠状态 */\n defaultSidebarCollapsed?: boolean\n /** 受控移动端侧栏状态 */\n mobileSidebarOpen?: boolean\n /** main 元素类名 */\n mainClass?: string\n /** 内容容器类名 */\n contentClass?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n sidebarVariant: 'dark',\n sidebarSearchable: false,\n sidebarCollapsible: true,\n sidebarCollapsed: undefined,\n defaultSidebarCollapsed: false,\n mobileSidebarOpen: undefined,\n mainClass: undefined,\n contentClass: undefined,\n class: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:sidebarCollapsed': [collapsed: boolean]\n 'sidebarCollapsedChange': [collapsed: boolean]\n 'update:mobileSidebarOpen': [open: boolean]\n}>()\n\nconst internalMobileOpen = ref(false)\nconst effectiveMobileOpen = computed(() => props.mobileSidebarOpen ?? internalMobileOpen.value)\n\nfunction setMobileOpen(open: boolean) {\n if (props.mobileSidebarOpen === undefined) {\n internalMobileOpen.value = open\n }\n emit('update:mobileSidebarOpen', open)\n}\n\nfunction handleCollapsedChange(collapsed: boolean) {\n emit('update:sidebarCollapsed', collapsed)\n emit('sidebarCollapsedChange', collapsed)\n}\n</script>\n\n<template>\n <div :class=\"cn('min-h-screen bg-surface-0 text-text-primary', props.class)\">\n <div class=\"flex min-h-screen min-w-0\">\n <USidebar\n :items=\"navItems\"\n :variant=\"sidebarVariant\"\n :searchable=\"sidebarSearchable\"\n :collapsible=\"sidebarCollapsible\"\n :collapsed=\"sidebarCollapsed\"\n :default-collapsed=\"defaultSidebarCollapsed\"\n responsive\n :mobile-open=\"effectiveMobileOpen\"\n class=\"shrink-0\"\n @update:collapsed=\"handleCollapsedChange\"\n @collapse-change=\"handleCollapsedChange\"\n @update:mobile-open=\"setMobileOpen\"\n >\n <template v-if=\"$slots.sidebarHeader\" #header>\n <slot name=\"sidebarHeader\" />\n </template>\n <template v-if=\"$slots.sidebarFooter\" #footer>\n <slot name=\"sidebarFooter\" />\n </template>\n </USidebar>\n\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <header class=\"sticky top-0 z-30 flex min-h-14 items-center gap-3 border-b border-border-base bg-surface-0/95 px-4 backdrop-blur sm:px-6 lg:px-8\">\n <UButton type=\"button\" variant=\"ghost\" size=\"icon\" class=\"md:hidden\" aria-label=\"打开侧边栏\" @click=\"setMobileOpen(true)\">\n <Menu :size=\"18\" />\n </UButton>\n\n <div v-if=\"$slots.topbar\" class=\"min-w-0 flex-1\">\n <slot name=\"topbar\" />\n </div>\n <template v-else>\n <div class=\"min-w-0 flex-1\">\n <slot name=\"topbarStart\" />\n </div>\n <div v-if=\"$slots.topbarEnd\" class=\"flex shrink-0 items-center gap-2\">\n <slot name=\"topbarEnd\" />\n </div>\n </template>\n </header>\n\n <main :class=\"cn('min-w-0 flex-1 overflow-x-hidden', mainClass)\">\n <div :class=\"cn('mx-auto w-full max-w-7xl px-4 py-6 sm:px-6 lg:px-8', contentClass)\">\n <slot />\n </div>\n </main>\n </div>\n </div>\n </div>\n</template>\n","/**\n * @description: UPageHeader 页面标题模式 — 用于后台列表、详情页和工具页的统一页头\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UPageHeader',\n})\n\ninterface Props {\n /** 标题上方的短标签,例如模块名或当前范围 */\n eyebrow?: string\n /** 页面主标题 */\n title?: string\n /** 页面说明文案 */\n description?: string\n /** 标题旁的状态、徽标或计数 */\n badge?: string\n /** 标题下方的元信息 */\n meta?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n eyebrow: undefined,\n title: undefined,\n description: undefined,\n badge: undefined,\n meta: undefined,\n class: undefined,\n})\n\nconst classes = computed(() =>\n cn('flex min-w-0 flex-col gap-5 border-b border-border-base pb-6', props.class),\n)\n</script>\n\n<template>\n <header :class=\"classes\">\n <div v-if=\"$slots.breadcrumb\" class=\"min-w-0\">\n <slot name=\"breadcrumb\" />\n </div>\n\n <div class=\"flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start lg:justify-between\">\n <div class=\"min-w-0 space-y-3\">\n <div v-if=\"eyebrow || $slots.eyebrow\" class=\"text-xs font-semibold uppercase text-primary\">\n <slot name=\"eyebrow\">{{ eyebrow }}</slot>\n </div>\n\n <div class=\"flex min-w-0 flex-wrap items-center gap-2.5\">\n <h1 class=\"min-w-0 break-words text-2xl font-bold leading-tight text-text-primary sm:text-3xl\">\n <slot name=\"title\">{{ title }}</slot>\n </h1>\n <div v-if=\"badge || $slots.badge\" class=\"shrink-0\">\n <slot name=\"badge\">{{ badge }}</slot>\n </div>\n </div>\n\n <p v-if=\"description || $slots.description\" class=\"max-w-3xl text-sm leading-6 text-text-secondary\">\n <slot name=\"description\">{{ description }}</slot>\n </p>\n\n <div v-if=\"meta || $slots.meta\" class=\"flex min-w-0 flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-tertiary\">\n <slot name=\"meta\">{{ meta }}</slot>\n </div>\n </div>\n\n <div v-if=\"$slots.actions\" class=\"flex shrink-0 flex-wrap items-center gap-2 lg:justify-end\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <div v-if=\"$slots.default\" class=\"min-w-0\">\n <slot />\n </div>\n </header>\n</template>\n","/**\n * @description: UPageHeader 页面标题模式 — 用于后台列表、详情页和工具页的统一页头\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UPageHeader',\n})\n\ninterface Props {\n /** 标题上方的短标签,例如模块名或当前范围 */\n eyebrow?: string\n /** 页面主标题 */\n title?: string\n /** 页面说明文案 */\n description?: string\n /** 标题旁的状态、徽标或计数 */\n badge?: string\n /** 标题下方的元信息 */\n meta?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n eyebrow: undefined,\n title: undefined,\n description: undefined,\n badge: undefined,\n meta: undefined,\n class: undefined,\n})\n\nconst classes = computed(() =>\n cn('flex min-w-0 flex-col gap-5 border-b border-border-base pb-6', props.class),\n)\n</script>\n\n<template>\n <header :class=\"classes\">\n <div v-if=\"$slots.breadcrumb\" class=\"min-w-0\">\n <slot name=\"breadcrumb\" />\n </div>\n\n <div class=\"flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start lg:justify-between\">\n <div class=\"min-w-0 space-y-3\">\n <div v-if=\"eyebrow || $slots.eyebrow\" class=\"text-xs font-semibold uppercase text-primary\">\n <slot name=\"eyebrow\">{{ eyebrow }}</slot>\n </div>\n\n <div class=\"flex min-w-0 flex-wrap items-center gap-2.5\">\n <h1 class=\"min-w-0 break-words text-2xl font-bold leading-tight text-text-primary sm:text-3xl\">\n <slot name=\"title\">{{ title }}</slot>\n </h1>\n <div v-if=\"badge || $slots.badge\" class=\"shrink-0\">\n <slot name=\"badge\">{{ badge }}</slot>\n </div>\n </div>\n\n <p v-if=\"description || $slots.description\" class=\"max-w-3xl text-sm leading-6 text-text-secondary\">\n <slot name=\"description\">{{ description }}</slot>\n </p>\n\n <div v-if=\"meta || $slots.meta\" class=\"flex min-w-0 flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-tertiary\">\n <slot name=\"meta\">{{ meta }}</slot>\n </div>\n </div>\n\n <div v-if=\"$slots.actions\" class=\"flex shrink-0 flex-wrap items-center gap-2 lg:justify-end\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <div v-if=\"$slots.default\" class=\"min-w-0\">\n <slot />\n </div>\n </header>\n</template>\n","/**\n * @description: UCopyField 可复制字段模式 — 用于 URL、Token、ID 等只读值展示与复制\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref } from 'vue'\nimport { Check, Copy } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UCopyField',\n})\n\ninterface Props {\n /** 实际复制的值 */\n value: string\n /** 字段标签 */\n label?: string\n /** 展示值;不传时展示 value */\n displayValue?: string\n /** 是否使用等宽字体展示 */\n monospace?: boolean\n /** 是否禁用复制 */\n disabled?: boolean\n /** 复制按钮文案 */\n copyLabel?: string\n /** 复制成功后的短暂文案 */\n copiedLabel?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: undefined,\n displayValue: undefined,\n monospace: true,\n disabled: false,\n copyLabel: '复制',\n copiedLabel: '已复制',\n class: undefined,\n})\n\nconst emit = defineEmits<{\n copied: [value: string]\n copyError: [error: unknown]\n}>()\n\nconst copied = ref(false)\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined\n\nconst classes = computed(() => cn('space-y-2', props.class))\nconst valueClasses = computed(() =>\n cn('min-w-0 flex-1 truncate px-3 py-2 text-sm text-text-primary', props.monospace && 'font-mono'),\n)\nconst shownValue = computed(() => props.displayValue ?? props.value)\n\nasync function handleCopy() {\n if (props.disabled) return\n\n try {\n if (!navigator.clipboard?.writeText) {\n throw new Error('Clipboard API is not available')\n }\n\n await navigator.clipboard.writeText(props.value)\n copied.value = true\n emit('copied', props.value)\n\n if (copiedTimer) clearTimeout(copiedTimer)\n copiedTimer = setTimeout(() => {\n copied.value = false\n }, 1400)\n } catch (error) {\n emit('copyError', error)\n }\n}\n\nonBeforeUnmount(() => {\n if (copiedTimer) clearTimeout(copiedTimer)\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <div v-if=\"label || $slots.label\" class=\"text-xs font-medium text-text-secondary\">\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n :class=\"cn('flex min-w-0 items-stretch overflow-hidden rounded-md border border-border-base bg-surface-1', disabled && 'opacity-60')\"\n >\n <div :class=\"valueClasses\" :title=\"shownValue\">\n <slot>{{ shownValue }}</slot>\n </div>\n <div class=\"flex shrink-0 items-center border-l border-border-base bg-surface-2 px-1.5\">\n <UButton type=\"button\" variant=\"ghost\" size=\"sm\" :disabled=\"disabled\" aria-live=\"polite\" @click=\"handleCopy\">\n <Check v-if=\"copied\" :size=\"15\" />\n <Copy v-else :size=\"15\" />\n {{ copied ? copiedLabel : copyLabel }}\n </UButton>\n </div>\n </div>\n </div>\n</template>\n","/**\n * @description: UCopyField 可复制字段模式 — 用于 URL、Token、ID 等只读值展示与复制\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, ref } from 'vue'\nimport { Check, Copy } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UCopyField',\n})\n\ninterface Props {\n /** 实际复制的值 */\n value: string\n /** 字段标签 */\n label?: string\n /** 展示值;不传时展示 value */\n displayValue?: string\n /** 是否使用等宽字体展示 */\n monospace?: boolean\n /** 是否禁用复制 */\n disabled?: boolean\n /** 复制按钮文案 */\n copyLabel?: string\n /** 复制成功后的短暂文案 */\n copiedLabel?: string\n /** 容器额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n label: undefined,\n displayValue: undefined,\n monospace: true,\n disabled: false,\n copyLabel: '复制',\n copiedLabel: '已复制',\n class: undefined,\n})\n\nconst emit = defineEmits<{\n copied: [value: string]\n copyError: [error: unknown]\n}>()\n\nconst copied = ref(false)\nlet copiedTimer: ReturnType<typeof setTimeout> | undefined\n\nconst classes = computed(() => cn('space-y-2', props.class))\nconst valueClasses = computed(() =>\n cn('min-w-0 flex-1 truncate px-3 py-2 text-sm text-text-primary', props.monospace && 'font-mono'),\n)\nconst shownValue = computed(() => props.displayValue ?? props.value)\n\nasync function handleCopy() {\n if (props.disabled) return\n\n try {\n if (!navigator.clipboard?.writeText) {\n throw new Error('Clipboard API is not available')\n }\n\n await navigator.clipboard.writeText(props.value)\n copied.value = true\n emit('copied', props.value)\n\n if (copiedTimer) clearTimeout(copiedTimer)\n copiedTimer = setTimeout(() => {\n copied.value = false\n }, 1400)\n } catch (error) {\n emit('copyError', error)\n }\n}\n\nonBeforeUnmount(() => {\n if (copiedTimer) clearTimeout(copiedTimer)\n})\n</script>\n\n<template>\n <div :class=\"classes\">\n <div v-if=\"label || $slots.label\" class=\"text-xs font-medium text-text-secondary\">\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n :class=\"cn('flex min-w-0 items-stretch overflow-hidden rounded-md border border-border-base bg-surface-1', disabled && 'opacity-60')\"\n >\n <div :class=\"valueClasses\" :title=\"shownValue\">\n <slot>{{ shownValue }}</slot>\n </div>\n <div class=\"flex shrink-0 items-center border-l border-border-base bg-surface-2 px-1.5\">\n <UButton type=\"button\" variant=\"ghost\" size=\"sm\" :disabled=\"disabled\" aria-live=\"polite\" @click=\"handleCopy\">\n <Check v-if=\"copied\" :size=\"15\" />\n <Copy v-else :size=\"15\" />\n {{ copied ? copiedLabel : copyLabel }}\n </UButton>\n </div>\n </div>\n </div>\n</template>\n","/**\n * @description: UConfirmDialog 确认弹窗模式 — 统一危险操作和关键确认流程\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { AlertTriangle, HelpCircle } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport UModal from '../components/modal.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UConfirmDialog',\n})\n\ntype ConfirmDialogVariant = 'default' | 'destructive'\n\ninterface Props {\n /** 是否打开 */\n open?: boolean\n /** 标题 */\n title?: string\n /** 描述 */\n description?: string\n /** 变体,destructive 用于危险操作 */\n variant?: ConfirmDialogVariant\n /** 取消按钮文案 */\n cancelText?: string\n /** 确认按钮文案 */\n confirmText?: string\n /** 是否展示确认按钮 loading */\n loading?: boolean\n /** 是否禁用确认按钮 */\n disabled?: boolean\n /** 确认后是否自动关闭 */\n closeOnConfirm?: boolean\n /** 内容区域额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n open: false,\n title: undefined,\n description: undefined,\n variant: 'destructive',\n cancelText: '取消',\n confirmText: '确认',\n loading: false,\n disabled: false,\n closeOnConfirm: true,\n class: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:open': [open: boolean]\n cancel: []\n confirm: []\n}>()\n\nconst modalOpen = computed({\n get: () => props.open,\n set: (value) => emit('update:open', value),\n})\n\nconst iconClasses = computed(() =>\n cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-md',\n props.variant === 'destructive'\n ? 'bg-danger-soft text-danger-soft-fg'\n : 'bg-primary-soft text-primary-soft-fg',\n ),\n)\n\nfunction handleCancel() {\n emit('cancel')\n emit('update:open', false)\n}\n\nfunction handleConfirm() {\n emit('confirm')\n if (props.closeOnConfirm) {\n emit('update:open', false)\n }\n}\n</script>\n\n<template>\n <UModal v-model:open=\"modalOpen\" :show-close-button=\"false\" max-width=\"max-w-md\" :class=\"props.class\" @close=\"handleCancel\">\n <template #header>\n <div class=\"flex min-w-0 items-start gap-3\">\n <div :class=\"iconClasses\">\n <AlertTriangle v-if=\"variant === 'destructive'\" :size=\"20\" aria-hidden=\"true\" />\n <HelpCircle v-else :size=\"20\" aria-hidden=\"true\" />\n </div>\n <div class=\"min-w-0 flex-1 space-y-1 text-left\">\n <h2 class=\"break-words text-base font-semibold text-text-primary\">\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <p v-if=\"description || $slots.description\" class=\"text-sm leading-6 text-text-secondary\">\n <slot name=\"description\">{{ description }}</slot>\n </p>\n </div>\n </div>\n </template>\n\n <div v-if=\"$slots.default\" class=\"text-sm text-text-secondary\">\n <slot />\n </div>\n\n <template #footer>\n <UButton type=\"button\" variant=\"outline\" :disabled=\"loading\" @click=\"handleCancel\">\n {{ cancelText }}\n </UButton>\n <UButton\n type=\"button\"\n :variant=\"variant === 'destructive' ? 'destructive' : 'default'\"\n :loading=\"loading\"\n :disabled=\"disabled\"\n @click=\"handleConfirm\"\n >\n {{ confirmText }}\n </UButton>\n </template>\n </UModal>\n</template>\n","/**\n * @description: UConfirmDialog 确认弹窗模式 — 统一危险操作和关键确认流程\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-05-30\n */\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { AlertTriangle, HelpCircle } from 'lucide-vue-next'\nimport UButton from '../components/button.vue'\nimport UModal from '../components/modal.vue'\nimport { cn } from '../internal/cn'\n\ndefineOptions({\n name: 'UConfirmDialog',\n})\n\ntype ConfirmDialogVariant = 'default' | 'destructive'\n\ninterface Props {\n /** 是否打开 */\n open?: boolean\n /** 标题 */\n title?: string\n /** 描述 */\n description?: string\n /** 变体,destructive 用于危险操作 */\n variant?: ConfirmDialogVariant\n /** 取消按钮文案 */\n cancelText?: string\n /** 确认按钮文案 */\n confirmText?: string\n /** 是否展示确认按钮 loading */\n loading?: boolean\n /** 是否禁用确认按钮 */\n disabled?: boolean\n /** 确认后是否自动关闭 */\n closeOnConfirm?: boolean\n /** 内容区域额外 CSS 类名 */\n class?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n open: false,\n title: undefined,\n description: undefined,\n variant: 'destructive',\n cancelText: '取消',\n confirmText: '确认',\n loading: false,\n disabled: false,\n closeOnConfirm: true,\n class: undefined,\n})\n\nconst emit = defineEmits<{\n 'update:open': [open: boolean]\n cancel: []\n confirm: []\n}>()\n\nconst modalOpen = computed({\n get: () => props.open,\n set: (value) => emit('update:open', value),\n})\n\nconst iconClasses = computed(() =>\n cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-md',\n props.variant === 'destructive'\n ? 'bg-danger-soft text-danger-soft-fg'\n : 'bg-primary-soft text-primary-soft-fg',\n ),\n)\n\nfunction handleCancel() {\n emit('cancel')\n emit('update:open', false)\n}\n\nfunction handleConfirm() {\n emit('confirm')\n if (props.closeOnConfirm) {\n emit('update:open', false)\n }\n}\n</script>\n\n<template>\n <UModal v-model:open=\"modalOpen\" :show-close-button=\"false\" max-width=\"max-w-md\" :class=\"props.class\" @close=\"handleCancel\">\n <template #header>\n <div class=\"flex min-w-0 items-start gap-3\">\n <div :class=\"iconClasses\">\n <AlertTriangle v-if=\"variant === 'destructive'\" :size=\"20\" aria-hidden=\"true\" />\n <HelpCircle v-else :size=\"20\" aria-hidden=\"true\" />\n </div>\n <div class=\"min-w-0 flex-1 space-y-1 text-left\">\n <h2 class=\"break-words text-base font-semibold text-text-primary\">\n <slot name=\"title\">{{ title }}</slot>\n </h2>\n <p v-if=\"description || $slots.description\" class=\"text-sm leading-6 text-text-secondary\">\n <slot name=\"description\">{{ description }}</slot>\n </p>\n </div>\n </div>\n </template>\n\n <div v-if=\"$slots.default\" class=\"text-sm text-text-secondary\">\n <slot />\n </div>\n\n <template #footer>\n <UButton type=\"button\" variant=\"outline\" :disabled=\"loading\" @click=\"handleCancel\">\n {{ cancelText }}\n </UButton>\n <UButton\n type=\"button\"\n :variant=\"variant === 'destructive' ? 'destructive' : 'default'\"\n :loading=\"loading\"\n :disabled=\"disabled\"\n @click=\"handleConfirm\"\n >\n {{ confirmText }}\n </UButton>\n </template>\n </UModal>\n</template>\n"],"mappings":"2iCAkDA,IAAM,EAAQ,EAYR,EAAO,EAMP,GAAA,EAAA,EAAA,KAAyB,GAAK,CAC9B,GAAA,EAAA,EAAA,cAAqC,EAAM,mBAAqB,EAAmB,MAAK,CAE9F,SAAS,EAAc,EAAe,CAChC,EAAM,oBAAsB,IAAA,KAC9B,EAAmB,MAAQ,GAE7B,EAAK,2BAA4B,EAAI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,QACT,SAAU,EAAA,SACV,QAAO,8BAES,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBAAd,EAAA,YAAW,CAAA,EAAA,CAAA,CAAA,sEAbZ,CAFKA,EAAAA,OAAO,UAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAEZ,MAFN,EAEM,EAAA,EAAA,EAAA,YADI,EAAA,OAAA,UAAA,CAAA,CAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: Vue patterns 子入口 — 后台与工具型通用模式组件
|
|
3
|
+
* @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。
|
|
4
|
+
* @date: 2026-05-30
|
|
5
|
+
*/
|
|
6
|
+
export { default as UAdminShell } from './admin-shell.vue';
|
|
7
|
+
export { default as UPageHeader } from './page-header.vue';
|
|
8
|
+
export { default as UCopyField } from './copy-field.vue';
|
|
9
|
+
export { default as UConfirmDialog } from './confirm-dialog.vue';
|
|
10
|
+
export { default as UGAdminShell } from './admin-shell.vue';
|
|
11
|
+
export { default as UGPageHeader } from './page-header.vue';
|
|
12
|
+
export { default as UGCopyField } from './copy-field.vue';
|
|
13
|
+
export { default as UGConfirmDialog } from './confirm-dialog.vue';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
|