@xingm/xui 1.0.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/README.md ADDED
@@ -0,0 +1,196 @@
1
+ # XUI
2
+
3
+ 基于 Vue 3 + TypeScript + Ant Design Vue 的现代化 UI 组件库
4
+
5
+ ## 特性
6
+
7
+ - 🚀 基于 Vue 3 Composition API
8
+ - 🎨 基于 Ant Design Vue 设计体系
9
+ - 📦 完整的 TypeScript 支持
10
+ - 🎯 企业级组件质量
11
+ - 🌈 可定制的主题系统
12
+ - 📱 响应式设计
13
+
14
+ ## 安装
15
+
16
+ ```bash
17
+ # 使用 npm
18
+ npm install xui
19
+
20
+ # 使用 yarn
21
+ yarn add xui
22
+
23
+ # 使用 pnpm
24
+ pnpm add xui
25
+ ```
26
+
27
+ ## 快速开始
28
+
29
+ ### 全局引入
30
+
31
+ ```javascript
32
+ import { createApp } from 'vue'
33
+ import XUI from 'xui'
34
+ import 'xui/style.css'
35
+
36
+ const app = createApp(App)
37
+ app.use(XUI)
38
+ app.mount('#app')
39
+ ```
40
+
41
+ ### 按需引入
42
+
43
+ ```javascript
44
+ import { XButton, XCard, XModal } from 'xui'
45
+
46
+ export default {
47
+ components: {
48
+ XButton,
49
+ XCard,
50
+ XModal
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## 组件
56
+
57
+ ### XButton 按钮
58
+
59
+ ```vue
60
+ <template>
61
+ <XButton type="primary" @click="handleClick">
62
+ 主要按钮
63
+ </XButton>
64
+
65
+ <XButton size="small">小按钮</XButton>
66
+ <XButton size="large">大按钮</XButton>
67
+
68
+ <XButton :loading="loading">
69
+ {{ loading ? '加载中...' : '加载按钮' }}
70
+ </XButton>
71
+ </template>
72
+ ```
73
+
74
+ ### XCard 卡片
75
+
76
+ ```vue
77
+ <template>
78
+ <XCard title="卡片标题">
79
+ <p>卡片内容</p>
80
+ </XCard>
81
+
82
+ <XCard title="小卡片" size="small">
83
+ <p>紧凑布局</p>
84
+ </XCard>
85
+
86
+ <XCard title="可悬停卡片" hoverable>
87
+ <p>悬停效果</p>
88
+ </XCard>
89
+ </template>
90
+ ```
91
+
92
+ ### XModal 模态框
93
+
94
+ ```vue
95
+ <template>
96
+ <XButton @click="showModal = true">
97
+ 打开模态框
98
+ </XButton>
99
+
100
+ <XModal
101
+ v-model:visible="showModal"
102
+ title="模态框标题"
103
+ @ok="handleOk"
104
+ @cancel="handleCancel"
105
+ >
106
+ <p>模态框内容</p>
107
+
108
+ <template #footer>
109
+ <XButton @click="showModal = false">取消</XButton>
110
+ <XButton type="primary" @click="handleOk">确定</XButton>
111
+ </template>
112
+ </XModal>
113
+ </template>
114
+ ```
115
+
116
+ ## 主题定制
117
+
118
+ XUI 支持完整的主题定制:
119
+
120
+ ```javascript
121
+ import { createApp } from 'vue'
122
+ import XUI from 'xui'
123
+
124
+ const app = createApp(App)
125
+
126
+ app.use(XUI, {
127
+ theme: {
128
+ primaryColor: '#1890ff',
129
+ successColor: '#52c41a',
130
+ token: {
131
+ borderRadius: 8,
132
+ colorPrimary: '#1890ff',
133
+ }
134
+ }
135
+ })
136
+
137
+ app.mount('#app')
138
+ ```
139
+
140
+ ## 开发
141
+
142
+ ```bash
143
+ # 安装依赖
144
+ npm install
145
+
146
+ # 启动开发服务器
147
+ npm run dev
148
+
149
+ # 构建组件库
150
+ npm run build:lib
151
+
152
+ # 类型检查
153
+ npm run type-check
154
+
155
+ # 运行测试
156
+ npm run test
157
+ ```
158
+
159
+ ## 项目结构
160
+
161
+ ```
162
+ src/
163
+ ├── components/ # 组件源码
164
+ │ ├── XButton.vue # 按钮组件
165
+ │ ├── XCard.vue # 卡片组件
166
+ │ ├── XModal.vue # 模态框组件
167
+ │ └── index.ts # 组件导出
168
+ ├── demo/ # 演示页面
169
+ │ ├── App.vue # 演示主组件
170
+ │ ├── main.ts # 演示入口
171
+ │ └── style.css # 演示样式
172
+ ├── types/ # 类型定义
173
+ │ └── index.ts # 类型导出
174
+ ├── utils/ # 工具函数
175
+ │ └── index.ts # 工具函数导出
176
+ ├── theme/ # 主题配置
177
+ │ └── index.ts # 主题配置导出
178
+ ├── install.ts # 安装函数
179
+ └── index.ts # 主入口文件
180
+ ```
181
+
182
+ ## 浏览器支持
183
+
184
+ 现代浏览器和 Internet Explorer 11+(需要相应的 polyfills)
185
+
186
+ | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
187
+ | --------- | --------- | --------- | --------- | --------- |
188
+ | IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
189
+
190
+ ## 贡献
191
+
192
+ 欢迎提交 Issue 和 Pull Request!
193
+
194
+ ## 许可证
195
+
196
+ MIT License
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .x-button[data-v-16b7d9e7]{transition:all .3s cubic-bezier(.645,.045,.355,1)}.x-button--small[data-v-16b7d9e7]{font-size:12px;height:24px;padding:0 8px}.x-button--middle[data-v-16b7d9e7]{font-size:14px;height:32px;padding:0 12px}.x-button--large[data-v-16b7d9e7]{font-size:16px;height:40px;padding:0 16px}.x-card[data-v-9aee894c]{border-radius:8px;transition:all .3s ease}.x-card--small [data-v-9aee894c] .ant-card-body{padding:12px}.x-card--bordered[data-v-9aee894c]{border:1px solid #f0f0f0}.x-card[data-v-9aee894c]:hover{box-shadow:0 4px 12px #0000001a}.x-modal [data-v-dbd29e36] .ant-modal-content{border-radius:8px}.x-modal [data-v-dbd29e36] .ant-modal-header{border-radius:8px 8px 0 0}.x-modal [data-v-dbd29e36] .ant-modal-footer{border-radius:0 0 8px 8px}.x-modal--small [data-v-dbd29e36] .ant-modal-body{padding:16px}.x-modal--large [data-v-dbd29e36] .ant-modal-body{padding:24px}
@@ -0,0 +1,72 @@
1
+ interface Props {
2
+ type?: 'primary' | 'default' | 'dashed' | 'text' | 'link';
3
+ size?: 'small' | 'middle' | 'large';
4
+ disabled?: boolean;
5
+ loading?: boolean;
6
+ danger?: boolean;
7
+ ghost?: boolean;
8
+ block?: boolean;
9
+ shape?: 'default' | 'circle' | 'round';
10
+ htmlType?: 'button' | 'submit' | 'reset';
11
+ }
12
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
13
+ type: string;
14
+ size: string;
15
+ disabled: boolean;
16
+ loading: boolean;
17
+ danger: boolean;
18
+ ghost: boolean;
19
+ block: boolean;
20
+ shape: string;
21
+ htmlType: string;
22
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ click: (event: MouseEvent) => void;
24
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
25
+ type: string;
26
+ size: string;
27
+ disabled: boolean;
28
+ loading: boolean;
29
+ danger: boolean;
30
+ ghost: boolean;
31
+ block: boolean;
32
+ shape: string;
33
+ htmlType: string;
34
+ }>>> & Readonly<{
35
+ onClick?: ((event: MouseEvent) => any) | undefined;
36
+ }>, {
37
+ type: "default" | "primary" | "dashed" | "text" | "link";
38
+ size: "small" | "middle" | "large";
39
+ disabled: boolean;
40
+ loading: boolean;
41
+ danger: boolean;
42
+ ghost: boolean;
43
+ block: boolean;
44
+ shape: "default" | "circle" | "round";
45
+ htmlType: "reset" | "submit" | "button";
46
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
47
+ default?(_: {}): any;
48
+ }>;
49
+ export default _default;
50
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
51
+ type __VLS_TypePropsToRuntimeProps<T> = {
52
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
53
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
54
+ } : {
55
+ type: import('vue').PropType<T[K]>;
56
+ required: true;
57
+ };
58
+ };
59
+ type __VLS_WithDefaults<P, D> = {
60
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
61
+ default: D[K];
62
+ }> : P[K];
63
+ };
64
+ type __VLS_Prettify<T> = {
65
+ [K in keyof T]: T[K];
66
+ } & {};
67
+ type __VLS_WithTemplateSlots<T, S> = T & {
68
+ new (): {
69
+ $slots: S;
70
+ };
71
+ };
72
+ //# sourceMappingURL=XButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/XButton.vue"],"names":[],"mappings":"AAWA;AAMA,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;IACzD,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,CA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?: boolean;
5
+ hoverable?: boolean;
6
+ loading?: boolean;
7
+ }
8
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
9
+ size: string;
10
+ bordered: boolean;
11
+ hoverable: boolean;
12
+ loading: boolean;
13
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
+ size: string;
15
+ bordered: boolean;
16
+ hoverable: boolean;
17
+ loading: boolean;
18
+ }>>> & Readonly<{}>, {
19
+ size: "default" | "small";
20
+ loading: boolean;
21
+ bordered: boolean;
22
+ hoverable: boolean;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
24
+ extra?(_: {}): any;
25
+ title?(_: {}): any;
26
+ default?(_: {}): any;
27
+ }>;
28
+ export default _default;
29
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
+ type __VLS_TypePropsToRuntimeProps<T> = {
31
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
32
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
33
+ } : {
34
+ type: import('vue').PropType<T[K]>;
35
+ required: true;
36
+ };
37
+ };
38
+ type __VLS_WithDefaults<P, D> = {
39
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
40
+ default: D[K];
41
+ }> : P[K];
42
+ };
43
+ type __VLS_Prettify<T> = {
44
+ [K in keyof T]: T[K];
45
+ } & {};
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
51
+ //# sourceMappingURL=XCard.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/XCard.vue"],"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;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,87 @@
1
+ interface Props {
2
+ visible?: boolean;
3
+ title?: string;
4
+ size?: 'small' | 'default' | 'large';
5
+ okText?: string;
6
+ cancelText?: string;
7
+ confirmLoading?: boolean;
8
+ closable?: boolean;
9
+ maskClosable?: boolean;
10
+ keyboard?: boolean;
11
+ centered?: boolean;
12
+ width?: number | string;
13
+ }
14
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
15
+ visible: boolean;
16
+ size: string;
17
+ okText: string;
18
+ cancelText: string;
19
+ confirmLoading: boolean;
20
+ closable: boolean;
21
+ maskClosable: boolean;
22
+ keyboard: boolean;
23
+ centered: boolean;
24
+ width: number;
25
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ "update:visible": (visible: boolean) => void;
27
+ ok: () => void;
28
+ cancel: () => void;
29
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
30
+ visible: boolean;
31
+ size: string;
32
+ okText: string;
33
+ cancelText: string;
34
+ confirmLoading: boolean;
35
+ closable: boolean;
36
+ maskClosable: boolean;
37
+ keyboard: boolean;
38
+ centered: boolean;
39
+ width: number;
40
+ }>>> & Readonly<{
41
+ onCancel?: (() => any) | undefined;
42
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
43
+ onOk?: (() => any) | undefined;
44
+ }>, {
45
+ size: "default" | "small" | "large";
46
+ visible: boolean;
47
+ okText: string;
48
+ cancelText: string;
49
+ confirmLoading: boolean;
50
+ closable: boolean;
51
+ maskClosable: boolean;
52
+ keyboard: boolean;
53
+ centered: boolean;
54
+ width: string | number;
55
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<{
56
+ default?: ((props: Record<string, never>) => any) | undefined;
57
+ title?: ((props: Record<string, never>) => any) | undefined;
58
+ footer?: ((props: Record<string, never>) => any) | undefined;
59
+ }> & {
60
+ default?: ((props: Record<string, never>) => any) | undefined;
61
+ title?: ((props: Record<string, never>) => any) | undefined;
62
+ footer?: ((props: Record<string, never>) => any) | undefined;
63
+ }>;
64
+ export default _default;
65
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
66
+ type __VLS_TypePropsToRuntimeProps<T> = {
67
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
68
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
69
+ } : {
70
+ type: import('vue').PropType<T[K]>;
71
+ required: true;
72
+ };
73
+ };
74
+ type __VLS_WithDefaults<P, D> = {
75
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
76
+ default: D[K];
77
+ }> : P[K];
78
+ };
79
+ type __VLS_Prettify<T> = {
80
+ [K in keyof T]: T[K];
81
+ } & {};
82
+ type __VLS_WithTemplateSlots<T, S> = T & {
83
+ new (): {
84
+ $slots: S;
85
+ };
86
+ };
87
+ //# sourceMappingURL=XModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/XModal.vue"],"names":[],"mappings":"AAqBA;AAMA,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,Q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2
+ export { default as XCard } from './XCard.vue';
3
+ export { default as XModal } from './XModal.vue';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './components';
2
+ export * from './types';
3
+ export * from './theme';
4
+ export { default as install } from './install';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA;AAG5B,cAAc,SAAS,CAAA;AAGvB,cAAc,SAAS,CAAA;AAGvB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { App } from 'vue';
2
+ import { XUIOptions } from './types';
3
+
4
+ /**
5
+ * XUI组件库安装函数
6
+ * @param app Vue应用实例
7
+ * @param options 配置选项
8
+ */
9
+ declare const install: (app: App, options?: XUIOptions) => void;
10
+ export default install;
11
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC;;;;GAIG;AACH,QAAA,MAAM,OAAO,QAAS,GAAG,YAAY,UAAU,SAiB9C,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { XUITheme } from '../types';
2
+
3
+ /**
4
+ * 默认主题配置
5
+ */
6
+ export declare const defaultTheme: XUITheme;
7
+ /**
8
+ * 暗色主题配置
9
+ */
10
+ export declare const darkTheme: XUITheme;
11
+ /**
12
+ * 获取主题配置
13
+ * @param theme 主题名称或自定义配置
14
+ * @returns 主题配置
15
+ */
16
+ export declare const getThemeConfig: (theme?: 'light' | 'dark' | XUITheme) => XUITheme;
17
+ /**
18
+ * 合并主题配置
19
+ * @param baseTheme 基础主题
20
+ * @param customTheme 自定义主题
21
+ * @returns 合并后的主题配置
22
+ */
23
+ export declare const mergeTheme: (baseTheme: XUITheme, customTheme: Partial<XUITheme>) => XUITheme;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,QAgC1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,QAwBvB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,WAAW,OAAO,GAAG,MAAM,GAAG,QAAQ,KAAa,QAK7E,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,cAAe,QAAQ,eAAe,QAAQ,QAAQ,CAAC,KAAG,QAahF,CAAA"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * XUI组件库配置选项
3
+ */
4
+ export interface XUIOptions {
5
+ /**
6
+ * 主题配置
7
+ */
8
+ theme?: XUITheme;
9
+ /**
10
+ * 组件前缀
11
+ * @default 'x'
12
+ */
13
+ prefixCls?: string;
14
+ /**
15
+ * 国际化配置
16
+ */
17
+ locale?: any;
18
+ /**
19
+ * 尺寸配置
20
+ */
21
+ size?: 'small' | 'middle' | 'large';
22
+ }
23
+ /**
24
+ * 组件基础属性
25
+ */
26
+ export interface BaseProps {
27
+ /**
28
+ * 组件类名
29
+ */
30
+ class?: string;
31
+ /**
32
+ * 组件样式
33
+ */
34
+ style?: string | Record<string, any>;
35
+ /**
36
+ * 组件尺寸
37
+ */
38
+ size?: 'small' | 'middle' | 'large';
39
+ }
40
+ /**
41
+ * Ant Design Token 配置
42
+ */
43
+ export interface AntDesignToken {
44
+ colorPrimary?: string;
45
+ colorSuccess?: string;
46
+ colorWarning?: string;
47
+ colorError?: string;
48
+ colorInfo?: string;
49
+ colorBgBase?: string;
50
+ colorTextBase?: string;
51
+ borderRadius?: number;
52
+ wireframe?: boolean;
53
+ [key: string]: any;
54
+ }
55
+ /**
56
+ * 组件主题配置
57
+ */
58
+ export interface ComponentToken {
59
+ [key: string]: any;
60
+ }
61
+ /**
62
+ * 主题配置类型
63
+ */
64
+ export interface XUITheme {
65
+ /**
66
+ * 主色调
67
+ */
68
+ primaryColor?: string;
69
+ /**
70
+ * 成功色
71
+ */
72
+ successColor?: string;
73
+ /**
74
+ * 警告色
75
+ */
76
+ warningColor?: string;
77
+ /**
78
+ * 错误色
79
+ */
80
+ errorColor?: string;
81
+ /**
82
+ * 信息色
83
+ */
84
+ infoColor?: string;
85
+ /**
86
+ * Ant Design Token 配置
87
+ */
88
+ token?: AntDesignToken;
89
+ /**
90
+ * 组件级别主题配置
91
+ */
92
+ components?: Record<string, ComponentToken>;
93
+ }
94
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAA;IAEhB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,CAAA;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACpC;AAED;;GAE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{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":""}
package/dist/xui.es.js ADDED
@@ -0,0 +1,227 @@
1
+ import { defineComponent as f, computed as c, resolveComponent as p, openBlock as m, createBlock as _, mergeProps as y, withCtx as r, renderSlot as n, createSlots as b } from "vue";
2
+ const k = /* @__PURE__ */ f({
3
+ __name: "XButton",
4
+ props: {
5
+ type: { default: "default" },
6
+ size: { default: "middle" },
7
+ disabled: { type: Boolean, default: !1 },
8
+ loading: { type: Boolean, default: !1 },
9
+ danger: { type: Boolean, default: !1 },
10
+ ghost: { type: Boolean, default: !1 },
11
+ block: { type: Boolean, default: !1 },
12
+ shape: { default: "default" },
13
+ htmlType: { default: "button" }
14
+ },
15
+ emits: ["click"],
16
+ setup(e, { emit: t }) {
17
+ const l = e, o = t, s = c(() => l.danger ? "danger" : l.type), d = c(() => l.size), i = (a) => {
18
+ !l.disabled && !l.loading && o("click", a);
19
+ };
20
+ return (a, g) => {
21
+ const u = p("a-button");
22
+ return m(), _(u, y(a.$attrs, {
23
+ class: ["x-button", `x-button--${a.size}`, `x-button--${a.type}`],
24
+ type: s.value,
25
+ size: d.value,
26
+ onClick: i
27
+ }), {
28
+ default: r(() => [
29
+ n(a.$slots, "default", {}, void 0, !0)
30
+ ]),
31
+ _: 3
32
+ }, 16, ["class", "type", "size"]);
33
+ };
34
+ }
35
+ });
36
+ const v = (e, t) => {
37
+ const l = e.__vccOpts || e;
38
+ for (const [o, s] of t)
39
+ l[o] = s;
40
+ return l;
41
+ }, B = /* @__PURE__ */ v(k, [["__scopeId", "data-v-16b7d9e7"]]), C = /* @__PURE__ */ f({
42
+ __name: "XCard",
43
+ props: {
44
+ title: {},
45
+ size: { default: "default" },
46
+ bordered: { type: Boolean, default: !0 },
47
+ hoverable: { type: Boolean, default: !1 },
48
+ loading: { type: Boolean, default: !1 }
49
+ },
50
+ setup(e) {
51
+ const t = e, l = c(() => t.size === "small" ? "small" : void 0);
52
+ return (o, s) => {
53
+ const d = p("a-card");
54
+ return m(), _(d, y(o.$attrs, {
55
+ class: ["x-card", `x-card--${o.size}`, { "x-card--bordered": o.bordered }],
56
+ size: l.value
57
+ }), b({
58
+ default: r(() => [
59
+ n(o.$slots, "default", {}, void 0, !0)
60
+ ]),
61
+ _: 2
62
+ }, [
63
+ o.$slots.extra ? {
64
+ name: "extra",
65
+ fn: r(() => [
66
+ n(o.$slots, "extra", {}, void 0, !0)
67
+ ]),
68
+ key: "0"
69
+ } : void 0,
70
+ o.$slots.title ? {
71
+ name: "title",
72
+ fn: r(() => [
73
+ n(o.$slots, "title", {}, void 0, !0)
74
+ ]),
75
+ key: "1"
76
+ } : void 0
77
+ ]), 1040, ["class", "size"]);
78
+ };
79
+ }
80
+ });
81
+ const $ = /* @__PURE__ */ v(C, [["__scopeId", "data-v-9aee894c"]]), z = /* @__PURE__ */ f({
82
+ __name: "XModal",
83
+ props: {
84
+ visible: { type: Boolean, default: !1 },
85
+ title: {},
86
+ size: { default: "default" },
87
+ okText: { default: "确定" },
88
+ cancelText: { default: "取消" },
89
+ confirmLoading: { type: Boolean, default: !1 },
90
+ closable: { type: Boolean, default: !0 },
91
+ maskClosable: { type: Boolean, default: !0 },
92
+ keyboard: { type: Boolean, default: !0 },
93
+ centered: { type: Boolean, default: !1 },
94
+ width: { default: 520 }
95
+ },
96
+ emits: ["update:visible", "ok", "cancel"],
97
+ setup(e, { emit: t }) {
98
+ const l = e, o = t, s = c(() => {
99
+ switch (l.size) {
100
+ case "small":
101
+ return;
102
+ case "large":
103
+ return;
104
+ default:
105
+ return;
106
+ }
107
+ }), d = () => {
108
+ o("ok"), o("update:visible", !1);
109
+ }, i = () => {
110
+ o("cancel"), o("update:visible", !1);
111
+ };
112
+ return (a, g) => {
113
+ const u = p("a-modal");
114
+ return m(), _(u, y(a.$attrs, {
115
+ class: ["x-modal", `x-modal--${a.size}`],
116
+ size: s.value,
117
+ "ok-text": a.okText,
118
+ "cancel-text": a.cancelText,
119
+ onOk: d,
120
+ onCancel: i
121
+ }), b({
122
+ default: r(() => [
123
+ n(a.$slots, "default", {}, void 0, !0)
124
+ ]),
125
+ _: 2
126
+ }, [
127
+ a.$slots.title ? {
128
+ name: "title",
129
+ fn: r(() => [
130
+ n(a.$slots, "title", {}, void 0, !0)
131
+ ]),
132
+ key: "0"
133
+ } : void 0,
134
+ a.$slots.footer ? {
135
+ name: "footer",
136
+ fn: r(() => [
137
+ n(a.$slots, "footer", {}, void 0, !0)
138
+ ]),
139
+ key: "1"
140
+ } : void 0
141
+ ]), 1040, ["class", "size", "ok-text", "cancel-text"]);
142
+ };
143
+ }
144
+ });
145
+ const h = /* @__PURE__ */ v(z, [["__scopeId", "data-v-dbd29e36"]]), X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
146
+ __proto__: null,
147
+ XButton: B,
148
+ XCard: $,
149
+ XModal: h
150
+ }, Symbol.toStringTag, { value: "Module" })), x = {
151
+ primaryColor: "#1890ff",
152
+ successColor: "#52c41a",
153
+ warningColor: "#faad14",
154
+ errorColor: "#f5222d",
155
+ infoColor: "#1890ff",
156
+ // Ant Design Vue 主题配置
157
+ token: {
158
+ colorPrimary: "#1890ff",
159
+ colorSuccess: "#52c41a",
160
+ colorWarning: "#faad14",
161
+ colorError: "#f5222d",
162
+ colorInfo: "#1890ff",
163
+ borderRadius: 6,
164
+ wireframe: !1
165
+ },
166
+ components: {
167
+ Button: {
168
+ colorPrimary: "#1890ff",
169
+ algorithm: !0
170
+ },
171
+ Card: {
172
+ borderRadius: 8,
173
+ borderRadiusLG: 12
174
+ },
175
+ Modal: {
176
+ borderRadius: 8,
177
+ borderRadiusLG: 12
178
+ }
179
+ }
180
+ }, S = {
181
+ primaryColor: "#177ddc",
182
+ successColor: "#49aa19",
183
+ warningColor: "#d89614",
184
+ errorColor: "#a61d24",
185
+ infoColor: "#177ddc",
186
+ token: {
187
+ colorPrimary: "#177ddc",
188
+ colorSuccess: "#49aa19",
189
+ colorWarning: "#d89614",
190
+ colorError: "#a61d24",
191
+ colorInfo: "#177ddc",
192
+ colorBgBase: "#141414",
193
+ colorTextBase: "#ffffff",
194
+ wireframe: !1
195
+ },
196
+ components: {
197
+ Button: {
198
+ colorPrimary: "#177ddc",
199
+ algorithm: !0
200
+ }
201
+ }
202
+ }, w = (e = "light") => typeof e == "string" ? e === "dark" ? S : x : e, P = (e, t) => ({
203
+ ...e,
204
+ ...t,
205
+ token: {
206
+ ...e.token,
207
+ ...t.token
208
+ },
209
+ components: {
210
+ ...e.components,
211
+ ...t.components
212
+ }
213
+ }), I = (e, t) => {
214
+ Object.entries(X).forEach(([l, o]) => {
215
+ l !== "install" && e.component(l, o);
216
+ }), t && (e.config.globalProperties.$XUI = t), t != null && t.theme && e.provide("xui-theme", t.theme);
217
+ };
218
+ export {
219
+ B as XButton,
220
+ $ as XCard,
221
+ h as XModal,
222
+ S as darkTheme,
223
+ x as defaultTheme,
224
+ w as getThemeConfig,
225
+ I as install,
226
+ P as mergeTheme
227
+ };
@@ -0,0 +1 @@
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.XUI={},n.Vue))})(this,function(n,e){"use strict";const g=e.defineComponent({__name:"XButton",props:{type:{default:"default"},size:{default:"middle"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},block:{type:Boolean,default:!1},shape:{default:"default"},htmlType:{default:"button"}},emits:["click"],setup(o,{emit:a}){const r=o,t=a,d=e.computed(()=>r.danger?"danger":r.type),s=e.computed(()=>r.size),i=l=>{!r.disabled&&!r.loading&&t("click",l)};return(l,z)=>{const f=e.resolveComponent("a-button");return e.openBlock(),e.createBlock(f,e.mergeProps(l.$attrs,{class:["x-button",`x-button--${l.size}`,`x-button--${l.type}`],type:d.value,size:s.value,onClick:i}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["class","type","size"])}}}),S="",c=(o,a)=>{const r=o.__vccOpts||o;for(const[t,d]of a)r[t]=d;return r},u=c(g,[["__scopeId","data-v-16b7d9e7"]]),C=e.defineComponent({__name:"XCard",props:{title:{},size:{default:"default"},bordered:{type:Boolean,default:!0},hoverable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(o){const a=o,r=e.computed(()=>a.size==="small"?"small":void 0);return(t,d)=>{const s=e.resolveComponent("a-card");return e.openBlock(),e.createBlock(s,e.mergeProps(t.$attrs,{class:["x-card",`x-card--${t.size}`,{"x-card--bordered":t.bordered}],size:r.value}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:2},[t.$slots.extra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0,t.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),key:"1"}:void 0]),1040,["class","size"])}}}),T="",p=c(C,[["__scopeId","data-v-9aee894c"]]),b=e.defineComponent({__name:"XModal",props:{visible:{type:Boolean,default:!1},title:{},size:{default:"default"},okText:{default:"确定"},cancelText:{default:"取消"},confirmLoading:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},centered:{type:Boolean,default:!1},width:{default:520}},emits:["update:visible","ok","cancel"],setup(o,{emit:a}){const r=o,t=a,d=e.computed(()=>{switch(r.size){case"small":return;case"large":return;default:return}}),s=()=>{t("ok"),t("update:visible",!1)},i=()=>{t("cancel"),t("update:visible",!1)};return(l,z)=>{const f=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(f,e.mergeProps(l.$attrs,{class:["x-modal",`x-modal--${l.size}`],size:d.value,"ok-text":l.okText,"cancel-text":l.cancelText,onOk:s,onCancel:i}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:2},[l.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"title",{},void 0,!0)]),key:"0"}:void 0,l.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"footer",{},void 0,!0)]),key:"1"}:void 0]),1040,["class","size","ok-text","cancel-text"])}}}),X="",m=c(b,[["__scopeId","data-v-dbd29e36"]]),k=Object.freeze(Object.defineProperty({__proto__:null,XButton:u,XCard:p,XModal:m},Symbol.toStringTag,{value:"Module"})),_={primaryColor:"#1890ff",successColor:"#52c41a",warningColor:"#faad14",errorColor:"#f5222d",infoColor:"#1890ff",token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#f5222d",colorInfo:"#1890ff",borderRadius:6,wireframe:!1},components:{Button:{colorPrimary:"#1890ff",algorithm:!0},Card:{borderRadius:8,borderRadiusLG:12},Modal:{borderRadius:8,borderRadiusLG:12}}},y={primaryColor:"#177ddc",successColor:"#49aa19",warningColor:"#d89614",errorColor:"#a61d24",infoColor:"#177ddc",token:{colorPrimary:"#177ddc",colorSuccess:"#49aa19",colorWarning:"#d89614",colorError:"#a61d24",colorInfo:"#177ddc",colorBgBase:"#141414",colorTextBase:"#ffffff",wireframe:!1},components:{Button:{colorPrimary:"#177ddc",algorithm:!0}}},h=(o="light")=>typeof o=="string"?o==="dark"?y:_:o,B=(o,a)=>({...o,...a,token:{...o.token,...a.token},components:{...o.components,...a.components}}),$=(o,a)=>{Object.entries(k).forEach(([r,t])=>{r!=="install"&&o.component(r,t)}),a&&(o.config.globalProperties.$XUI=a),a!=null&&a.theme&&o.provide("xui-theme",a.theme)};n.XButton=u,n.XCard=p,n.XModal=m,n.darkTheme=y,n.defaultTheme=_,n.getThemeConfig=h,n.install=$,n.mergeTheme=B,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@xingm/xui",
3
+ "version": "1.0.0",
4
+ "description": "A Vue 3 UI component library based on Ant Design Vue",
5
+ "type": "module",
6
+ "main": "./dist/xui.umd.js",
7
+ "module": "./dist/xui.es.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/xui.es.js",
12
+ "require": "./dist/xui.umd.js",
13
+ "types": "./dist/types/index.d.ts"
14
+ },
15
+ "./style": "./dist/style.css"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "scripts": {
26
+ "dev": "vite --config examples/vite.config.ts",
27
+ "build": "npm run build:lib",
28
+ "build:lib": "vue-tsc --noEmit && vite build --config vite.config.lib.ts",
29
+ "build:examples": "vite build --config examples/vite.config.ts",
30
+ "preview": "vite preview --config examples/vite.config.ts",
31
+ "docs:dev": "vitepress dev docs",
32
+ "docs:build": "vitepress build docs",
33
+ "docs:preview": "vitepress preview docs",
34
+ "type-check": "vue-tsc --noEmit",
35
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
36
+ "test": "vitest",
37
+ "test:ui": "vitest --ui",
38
+ "test:run": "vitest run"
39
+ },
40
+ "keywords": [
41
+ "vue3",
42
+ "ui",
43
+ "component-library",
44
+ "ant-design",
45
+ "typescript",
46
+ "vitepress"
47
+ ],
48
+ "author": "XUI Team",
49
+ "license": "MIT",
50
+ "peerDependencies": {
51
+ "vue": "^3.3.0"
52
+ },
53
+ "dependencies": {
54
+ "ant-design-vue": "^4.0.0"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^20.0.0",
58
+ "@vitejs/plugin-vue": "^4.0.0",
59
+ "@vue/eslint-config-typescript": "^11.0.0",
60
+ "@vue/tsconfig": "^0.4.0",
61
+ "eslint": "^8.0.0",
62
+ "eslint-plugin-vue": "^9.0.0",
63
+ "jsdom": "^22.0.0",
64
+ "less": "^4.0.0",
65
+ "typescript": "~5.0.0",
66
+ "vite": "^4.0.0",
67
+ "vite-plugin-dts": "^3.0.0",
68
+ "vitepress": "^1.0.0",
69
+ "vitest": "^0.34.0",
70
+ "vue": "^3.3.0",
71
+ "vue-tsc": "^1.8.0"
72
+ }
73
+ }