@rft-rc/recycle-ui 0.0.1-rc.1 → 0.0.1-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/components/button/index.d.ts +5 -0
  2. package/dist/components/button/index.d.ts.map +1 -0
  3. package/dist/components/button/index.vue.d.ts +40 -0
  4. package/dist/components/button/index.vue.d.ts.map +1 -0
  5. package/dist/components/card/index.d.ts +5 -0
  6. package/dist/components/card/index.d.ts.map +1 -0
  7. package/dist/components/card/index.vue.d.ts +60 -0
  8. package/dist/components/card/index.vue.d.ts.map +1 -0
  9. package/dist/components/descriptions/index.d.ts +118 -0
  10. package/dist/components/descriptions/index.d.ts.map +1 -0
  11. package/dist/components/descriptions/index.vue.d.ts +37 -0
  12. package/dist/components/descriptions/index.vue.d.ts.map +1 -0
  13. package/dist/components/descriptions/item.vue.d.ts +27 -0
  14. package/dist/components/descriptions/item.vue.d.ts.map +1 -0
  15. package/dist/components/icon/index.d.ts +23 -0
  16. package/dist/components/icon/index.d.ts.map +1 -0
  17. package/dist/components/icon/index.vue.d.ts +20 -0
  18. package/dist/components/icon/index.vue.d.ts.map +1 -0
  19. package/dist/components/message/index.d.ts +19 -0
  20. package/dist/components/message/index.d.ts.map +1 -0
  21. package/dist/components/message/index.vue.d.ts +15 -0
  22. package/dist/components/message/index.vue.d.ts.map +1 -0
  23. package/dist/components/toast/index.d.ts +18 -0
  24. package/dist/components/toast/index.d.ts.map +1 -0
  25. package/dist/components/toast/index.vue.d.ts +30 -0
  26. package/dist/components/toast/index.vue.d.ts.map +1 -0
  27. package/dist/index.cjs +2 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.ts +21 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.mjs +515 -0
  32. package/dist/index.mjs.map +1 -0
  33. package/dist/style.css +1 -0
  34. package/dist/types.d.ts +30 -0
  35. package/dist/types.d.ts.map +1 -0
  36. package/package.json +2 -2
@@ -0,0 +1,5 @@
1
+ import type { App } from 'vue';
2
+ import Button from './index.vue';
3
+ export declare function install(app: App): App<any>;
4
+ export default Button;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AAKjC,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAG/B;AAGD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,40 @@
1
+ type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
2
+ type ButtonSize = 'mini' | 'small' | 'medium' | 'large';
3
+ interface Props {
4
+ type?: ButtonType;
5
+ size?: ButtonSize;
6
+ plain?: boolean;
7
+ block?: boolean;
8
+ /** 按钮文本,提供时可不写默认插槽 */
9
+ label?: string;
10
+ /** 圆角;number 代表 px,string 支持百分比等写法(如 '50%')。也兼容 boolean,true 表示大圆角。 */
11
+ round?: number | string | boolean;
12
+ disabled?: boolean;
13
+ loading?: boolean;
14
+ }
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
+ click: (ev: MouseEvent) => any;
21
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
22
+ onClick?: ((ev: MouseEvent) => any) | undefined;
23
+ }>, {
24
+ type: ButtonType;
25
+ size: ButtonSize;
26
+ plain: boolean;
27
+ block: boolean;
28
+ label: string;
29
+ round: number | string | boolean;
30
+ disabled: boolean;
31
+ loading: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
40
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.vue"],"names":[],"mappings":"AAmHA,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC3E,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAExD,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA0ED,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAuB/C,QAAA,MAAM,eAAe;;;;;UA7GZ,UAAU;UACV,UAAU;WACT,OAAO;WACP,OAAO;WAEP,MAAM;WAEN,MAAM,GAAG,MAAM,GAAG,OAAO;cACtB,OAAO;aACR,OAAO;6EA4GjB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { App } from 'vue';
2
+ import Card from './index.vue';
3
+ export declare function install(app: App): App<any>;
4
+ export default Card;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,IAAI,MAAM,aAAa,CAAC;AAM/B,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAI/B;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,60 @@
1
+ interface Props {
2
+ /** 卡片整体背景色,默认白色 */
3
+ color?: string;
4
+ /** 顶部色块背景色 */
5
+ topBgColor?: string;
6
+ /** 标题文本(可用 slot="title" 自定义) */
7
+ title?: string;
8
+ /** 右侧状态文案(可用 slot="status" 自定义) */
9
+ status?: string;
10
+ /** 状态文本颜色 */
11
+ statusColor?: string;
12
+ /** 圆角:数值代表 px,字符串可用百分比 */
13
+ round?: number | string;
14
+ /** 是否描边 */
15
+ bordered?: boolean;
16
+ /** 阴影强度:0/1/2/3... -> 转换为不同阴影强度 */
17
+ elevation?: number;
18
+ /** 内边距(CSS 值,如 '16px 12px') */
19
+ padding?: string;
20
+ /** 主体内容的垂直间距(px 或 CSS 字符串) */
21
+ gap?: number | string;
22
+ /** 宽度(px/百分比) */
23
+ width?: string | number;
24
+ /** 高度(px/百分比) */
25
+ height?: string | number;
26
+ }
27
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
28
+ type __VLS_Slots = {} & {
29
+ title?: (props: typeof __VLS_1) => any;
30
+ } & {
31
+ status?: (props: typeof __VLS_3) => any;
32
+ } & {
33
+ content?: (props: typeof __VLS_5) => any;
34
+ } & {
35
+ default?: (props: typeof __VLS_7) => any;
36
+ } & {
37
+ action?: (props: typeof __VLS_9) => any;
38
+ };
39
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
40
+ round: number | string;
41
+ title: string;
42
+ width: string | number;
43
+ gap: number | string;
44
+ color: string;
45
+ topBgColor: string;
46
+ status: string;
47
+ statusColor: string;
48
+ bordered: boolean;
49
+ elevation: number;
50
+ padding: string;
51
+ height: string | number;
52
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
53
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
54
+ export default _default;
55
+ type __VLS_WithSlots<T, S> = T & {
56
+ new (): {
57
+ $slots: S;
58
+ };
59
+ };
60
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.vue"],"names":[],"mappings":"AAyLA,UAAU,KAAK;IACb,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAwJD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AACpG,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAuB9C,QAAA,MAAM,eAAe;WAlMX,MAAM,GAAG,MAAM;WANf,MAAM;WAgBN,MAAM,GAAG,MAAM;SAFjB,MAAM,GAAG,MAAM;WAlBb,MAAM;gBAED,MAAM;YAIV,MAAM;iBAED,MAAM;cAIT,OAAO;eAEN,MAAM;aAER,MAAM;YAMP,MAAM,GAAG,MAAM;6EA6LxB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,118 @@
1
+ import type { App } from 'vue';
2
+ import Descriptions from './index.vue';
3
+ export declare function install(app: App): App<any>;
4
+ export declare const RcDescriptions: {
5
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
6
+ title?: string;
7
+ column?: number | string;
8
+ gap?: number | string;
9
+ labelWidth?: number | string | "";
10
+ data?: Array<Record<string, any>>;
11
+ keyMap?: {
12
+ key: string;
13
+ value: string;
14
+ };
15
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
16
+ data: Array<Record<string, any>>;
17
+ labelWidth: number | string | "";
18
+ column: number | string;
19
+ gap: number | string;
20
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
21
+ P: {};
22
+ B: {};
23
+ D: {};
24
+ C: {};
25
+ M: {};
26
+ Defaults: {};
27
+ }, Readonly<{
28
+ title?: string;
29
+ column?: number | string;
30
+ gap?: number | string;
31
+ labelWidth?: number | string | "";
32
+ data?: Array<Record<string, any>>;
33
+ keyMap?: {
34
+ key: string;
35
+ value: string;
36
+ };
37
+ }> & Readonly<{}>, {}, {}, {}, {}, {
38
+ data: Array<Record<string, any>>;
39
+ labelWidth: number | string | "";
40
+ column: number | string;
41
+ gap: number | string;
42
+ }>;
43
+ __isFragment?: never;
44
+ __isTeleport?: never;
45
+ __isSuspense?: never;
46
+ } & import("vue").ComponentOptionsBase<Readonly<{
47
+ title?: string;
48
+ column?: number | string;
49
+ gap?: number | string;
50
+ labelWidth?: number | string | "";
51
+ data?: Array<Record<string, any>>;
52
+ keyMap?: {
53
+ key: string;
54
+ value: string;
55
+ };
56
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
57
+ data: Array<Record<string, any>>;
58
+ labelWidth: number | string | "";
59
+ column: number | string;
60
+ gap: number | string;
61
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
62
+ $slots: {
63
+ title?: (props: {}) => any;
64
+ } & {
65
+ default?: (props: {}) => any;
66
+ };
67
+ });
68
+ export declare const RcDescriptionsItem: {
69
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
70
+ label?: string | number;
71
+ value?: any;
72
+ labelWidth?: string | number;
73
+ span?: number | string;
74
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
75
+ label: string | number;
76
+ span: number | string;
77
+ value: any;
78
+ labelWidth: string | number;
79
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
80
+ P: {};
81
+ B: {};
82
+ D: {};
83
+ C: {};
84
+ M: {};
85
+ Defaults: {};
86
+ }, Readonly<{
87
+ label?: string | number;
88
+ value?: any;
89
+ labelWidth?: string | number;
90
+ span?: number | string;
91
+ }> & Readonly<{}>, {}, {}, {}, {}, {
92
+ label: string | number;
93
+ span: number | string;
94
+ value: any;
95
+ labelWidth: string | number;
96
+ }>;
97
+ __isFragment?: never;
98
+ __isTeleport?: never;
99
+ __isSuspense?: never;
100
+ } & import("vue").ComponentOptionsBase<Readonly<{
101
+ label?: string | number;
102
+ value?: any;
103
+ labelWidth?: string | number;
104
+ span?: number | string;
105
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
106
+ label: string | number;
107
+ span: number | string;
108
+ value: any;
109
+ labelWidth: string | number;
110
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
111
+ $slots: {
112
+ label?: (props: {}) => any;
113
+ } & {
114
+ default?: (props: {}) => any;
115
+ };
116
+ });
117
+ export default Descriptions;
118
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/descriptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,YAAY,MAAM,aAAa,CAAC;AAMvC,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAO/B;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAe,CAAC;AAC3C,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmB,CAAC;AAEnD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,37 @@
1
+ type KeyMap = {
2
+ key: string;
3
+ value: string;
4
+ };
5
+ type __VLS_Props = {
6
+ title?: string;
7
+ /** 每行展示的列数,支持数字或字符串数字 */
8
+ column?: number | string;
9
+ /** 列间距,支持数字(px)或字符串值,例如 '12px' */
10
+ gap?: number | string;
11
+ /** label 固定宽度,数字代表 px,也可直接传入 '120px' */
12
+ labelWidth?: number | string | '';
13
+ /** 直接通过数据渲染 */
14
+ data?: Array<Record<string, any>>;
15
+ /** data 的字段映射,如 { key: 'label', value: 'value' } */
16
+ keyMap?: KeyMap;
17
+ };
18
+ declare var __VLS_1: {}, __VLS_6: {};
19
+ type __VLS_Slots = {} & {
20
+ title?: (props: typeof __VLS_1) => any;
21
+ } & {
22
+ default?: (props: typeof __VLS_6) => any;
23
+ };
24
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
+ data: Array<Record<string, any>>;
26
+ labelWidth: number | string | "";
27
+ column: number | string;
28
+ gap: number | string;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
37
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/descriptions/index.vue"],"names":[],"mappings":"AA4HA,KAAK,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC;IAClC,eAAe;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAuHF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB/C,QAAA,MAAM,eAAe;UAtJZ,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAFpB,MAAM,GAAG,MAAM,GAAG,EAAE;YAJxB,MAAM,GAAG,MAAM;SAElB,MAAM,GAAG,MAAM;6EAiKrB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ label?: string | number;
3
+ value?: any;
4
+ labelWidth?: string | number;
5
+ /** 跨越的列数,默认 1,可传字符串数字 */
6
+ span?: number | string;
7
+ };
8
+ declare var __VLS_1: {}, __VLS_3: {};
9
+ type __VLS_Slots = {} & {
10
+ label?: (props: typeof __VLS_1) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_3) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ label: string | number;
16
+ span: number | string;
17
+ value: any;
18
+ labelWidth: string | number;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
27
+ //# sourceMappingURL=item.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item.vue.d.ts","sourceRoot":"","sources":["../../../src/components/descriptions/item.vue"],"names":[],"mappings":"AAkGA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAmFF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB/C,QAAA,MAAM,eAAe;WAjHX,MAAM,GAAG,MAAM;UAIhB,MAAM,GAAG,MAAM;WAHd,GAAG;gBACE,MAAM,GAAG,MAAM;6EAsH5B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { App } from 'vue';
2
+ import Icon from './index.vue';
3
+ export declare function install(app: App): App<any>;
4
+ export declare const RcIcon: import("vue").DefineComponent<{
5
+ name: string;
6
+ size?: number | string;
7
+ color?: string;
8
+ spin?: boolean;
9
+ code?: string | number;
10
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
11
+ name: string;
12
+ size?: number | string;
13
+ color?: string;
14
+ spin?: boolean;
15
+ code?: string | number;
16
+ }> & Readonly<{}>, {
17
+ size: number | string;
18
+ code: string | number;
19
+ color: string;
20
+ spin: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ export default Icon;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,IAAI,MAAM,aAAa,CAAC;AAI/B,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAI/B;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;6EAAO,CAAC;AAC3B,eAAe,IAAI,CAAC"}
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ /** 图标名,例如 'icon_a_in_store',也可直接传完整类名 */
3
+ name: string;
4
+ /** 尺寸,数字按 px 处理,也可传 '1.2em' 等 */
5
+ size?: number | string;
6
+ /** 颜色 */
7
+ color?: string;
8
+ /** 是否旋转(用于 loading 类图标) */
9
+ spin?: boolean;
10
+ /** Unicode 码点(不带 \\u,十六进制,如 'e609' 或 0xe609),用于无类名时渲染 */
11
+ code?: string | number;
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ size: number | string;
15
+ code: string | number;
16
+ color: string;
17
+ spin: boolean;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ export default _default;
20
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.vue"],"names":[],"mappings":"AA0GA,KAAK,WAAW,GAAG;IACjB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,SAAS;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;;UAPO,MAAM,GAAG,MAAM;UAMf,MAAM,GAAG,MAAM;WAJd,MAAM;UAEP,OAAO;;AA+GhB,wBAOG"}
@@ -0,0 +1,19 @@
1
+ import { type App } from 'vue';
2
+ type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';
3
+ export interface MessageOptions {
4
+ content: string;
5
+ duration?: number;
6
+ type?: MessageType;
7
+ }
8
+ export declare const message: {
9
+ open(opts: MessageOptions): any;
10
+ info(content: string, duration?: number): any;
11
+ success(content: string, duration?: number): any;
12
+ warning(content: string, duration?: number): any;
13
+ error(content: string, duration?: number): any;
14
+ loading(content: string, duration?: number): any;
15
+ destroy(): void;
16
+ };
17
+ export default message;
18
+ export declare function install(app: App): App<any>;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAGpD,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAsBD,eAAO,MAAM,OAAO;eACP,cAAc;kBAGX,MAAM,aAAa,MAAM;qBAGtB,MAAM,aAAa,MAAM;qBAGzB,MAAM,aAAa,MAAM;mBAG3B,MAAM,aAAa,MAAM;qBAGvB,MAAM,aAAa,MAAM;;CAW3C,CAAC;AAEF,eAAe,OAAO,CAAC;AAGvB,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAG/B"}
@@ -0,0 +1,15 @@
1
+ export type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';
2
+ export interface MessageItem {
3
+ id: number;
4
+ type: MessageType;
5
+ content: string;
6
+ duration: number;
7
+ }
8
+ declare function remove(id: number): void;
9
+ declare function add(type: MessageType, content: string, duration: number): number;
10
+ declare const _default: import("vue").DefineComponent<{}, {
11
+ add: typeof add;
12
+ remove: typeof remove;
13
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
15
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/message/index.vue"],"names":[],"mappings":"AA4FA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAC/E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAKD,iBAAS,MAAM,CAAC,EAAE,EAAE,MAAM,QAGzB;AAED,iBAAS,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAOhE;;;;;AA8ED,wBAMG"}
@@ -0,0 +1,18 @@
1
+ import { App } from 'vue';
2
+ import Toast, { type ToastProps } from './index.vue';
3
+ export type { ToastProps };
4
+ export interface ShowToastOptions {
5
+ message?: string;
6
+ type?: 'text' | 'success' | 'fail' | 'loading';
7
+ duration?: number;
8
+ mask?: boolean;
9
+ /** 关闭时回调(仅服务方式有效) */
10
+ onClose?: () => void;
11
+ }
12
+ export declare function showToast(options: string | ShowToastOptions): {
13
+ close: typeof hideToast;
14
+ };
15
+ export declare function hideToast(): void;
16
+ export declare function install(app: App): App<any>;
17
+ export default Toast;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAErD,YAAY,EAAE,UAAU,EAAE,CAAC;AAC3B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAgBD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;;EAqB3D;AAED,wBAAgB,SAAS,SAKxB;AAID,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,YAG/B;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,30 @@
1
+ export type ToastType = 'text' | 'success' | 'fail' | 'loading';
2
+ export interface ToastProps {
3
+ message?: string;
4
+ type?: ToastType;
5
+ duration?: number;
6
+ mask?: boolean;
7
+ /** 服务端关闭回调,用于卸载容器 */
8
+ onAfterLeave?: () => void;
9
+ }
10
+ declare function close(): void;
11
+ declare var __VLS_13: {};
12
+ type __VLS_Slots = {} & {
13
+ default?: (props: typeof __VLS_13) => any;
14
+ };
15
+ declare const __VLS_component: import("vue").DefineComponent<ToastProps, {
16
+ close: typeof close;
17
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToastProps> & Readonly<{}>, {
18
+ type: ToastType;
19
+ mask: boolean;
20
+ message: string;
21
+ duration: number;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
30
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.vue"],"names":[],"mappings":"AAgKA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAChE,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qBAAqB;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAoBD,iBAAS,KAAK,SAGb;AA2HD,QAAA,IAAI,QAAQ,IAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAoBhD,QAAA,MAAM,eAAe;;;UA7KZ,SAAS;UAET,OAAO;aAHJ,MAAM;cAEL,MAAM;6EAoLjB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=["disabled"],P={key:0,class:"rc-button__spinner"},F=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},plain:{type:Boolean,default:!1},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,s=n,r=i=>{!o.disabled&&!o.loading&&s("click",i)},d=e.computed(()=>{const i=o.round;return typeof i=="boolean"?i?"999px":"6px":typeof i=="number"?`${i}px`:String(i)});return(i,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,{"is-plain":t.plain,"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:d.value}),disabled:t.disabled||t.loading,onClick:r},[t.loading?(e.openBlock(),e.createElementBlock("span",P)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],14,A))}}),v=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},x=v(F,[["__scopeId","data-v-a70e95bb"]]);x.name="rc-button";function N(t){return t.component(x.name,x),t}const O={class:"rc-desc-item__value"},Y=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const n=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const o=e.inject("rcDescGapPx",0),s=e.inject("rcDescColCount",1),r=e.inject("rcDescLabelWidth",""),d=e.computed(()=>{const c=typeof n.span=="string"?parseInt(n.span,10):n.span,l=typeof(s==null?void 0:s.value)=="number"?s.value:s,u=!Number.isNaN(c)&&c>0?c:1;return Math.min(u,l||1)}),i=e.computed(()=>{const c=typeof(s==null?void 0:s.value)=="number"?s.value:s,l=typeof(o==null?void 0:o.value)=="number"?o.value:o,u=d.value;if(!c||c<=1||u>=c)return"100%";const m=(c-1)*l,f=(u-1)*l;return`calc((100% - ${m}px) * ${u} / ${c} + ${f}px)`}),a=e.computed(()=>{const c=typeof(r==null?void 0:r.value)=="string"?r.value:r,l=n.labelWidth!==""?n.labelWidth:c||"";return l?{width:typeof l=="number"?`${l}px`:String(l),flex:"0 0 auto"}:{}});return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:i.value,flex:`0 0 ${i.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",O,[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),k=v(Y,[["__scopeId","data-v-970d0b99"]]),q={class:"rc-descriptions"},H={key:0,class:"rc-descriptions__title"},K=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const n=t,o=e.ref(null),s=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)),r=e.computed(()=>{const l=typeof n.column=="string"?Number.parseInt(n.column,10):n.column??1;return!Number.isNaN(l)&&l>0?l:1}),d=e.ref("100%"),i=e.ref("100%");e.watchEffect(()=>{const l=r.value;if(l<=1)d.value="100%",i.value="100%";else{const u=typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0,f=`calc((100% - ${(l-1)*u}px) / ${l})`;i.value=f,d.value=f}}),e.provide("rcDescItemWidth",d),e.provide("rcDescSingleWidth",i),e.provide("rcDescColCount",r),e.provide("rcDescGapPx",e.computed(()=>typeof n.gap=="number"?n.gap:parseFloat(String(n.gap))||0));const a=e.computed(()=>n.labelWidth===""||n.labelWidth===void 0?"":typeof n.labelWidth=="number"?`${n.labelWidth}px`:String(n.labelWidth));e.provide("rcDescLabelWidth",a),e.provide("rcDescGap",e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap)));const c=e.computed(()=>{var m,f,W;const l=((m=n.keyMap)==null?void 0:m.key)??"label",u=((f=n.keyMap)==null?void 0:f.value)??"value";return(W=n.data)!=null&&W.length?n.data.map(b=>({label:b==null?void 0:b[l],value:b==null?void 0:b[u]})):[]});return(l,u)=>(e.openBlock(),e.createElementBlock("div",q,[l.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",H,[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:s.value}),ref_key:"wrapEl",ref:o},[c.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(m,f)=>(e.openBlock(),e.createBlock(k,{key:f,label:m.label,value:m.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(l.$slots,"default",{key:1},void 0,!0)],4)]))}}),$=v(K,[["__scopeId","data-v-5fcaa235"]]);$.name="rc-descriptions";k.name="rc-descriptions-item";function D(t){return t.component($.name,$),t.component("RcDescriptions",$),t.component(k.name,k),t.component("RcDescriptionsItem",k),t}const U=$,L=k,J={class:"rc-card__title"},Q={class:"rc-card__title-text"},X={key:0,class:"rc-card__status"},Z={key:1,class:"rc-card__divider"},ee={key:2,class:"rc-card__action"},te=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const n=t,o=e.computed(()=>{const a=typeof n.round=="boolean"?n.round?"12px":"0":typeof n.round=="number"?`${n.round}px`:String(n.round);return{backgroundColor:n.color||"var(--rc-white)",borderRadius:a,boxShadow:i(n.elevation),width:d(n.width),height:d(n.height)}}),s=e.computed(()=>n.padding||"16px"),r=e.computed(()=>typeof n.gap=="number"?`${n.gap}px`:String(n.gap));function d(a){return a==null||a===""?"":typeof a=="number"?`${a}px`:String(a)}function i(a){if(!a||a<=0)return"none";const c=4*a;return`0 ${Math.round(c/2)}px ${c}px rgba(0,0,0,0.06), 0 ${Math.round(c/4)}px ${Math.round(c/2)}px rgba(0,0,0,0.04)`}return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(o.value)},[a.$slots.title||t.title||a.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",J,[e.renderSlot(a.$slots,"title",{},()=>[e.createElementVNode("span",Q,e.toDisplayString(t.title),1)],!0)]),a.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(a.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:s.value,gap:r.value})},[e.renderSlot(a.$slots,"content",{},()=>[e.renderSlot(a.$slots,"default",{},void 0,!0)],!0)],4),a.$slots.action?(e.openBlock(),e.createElementBlock("div",Z)):e.createCommentVNode("",!0),a.$slots.action?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(a.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),C=v(te,[["__scopeId","data-v-a7b95214"]]);C.name="rc-card";const ne="RcCard";function I(t){return t.component(C.name,C),t.component(ne,C),t}const oe={key:0,class:"rc-toast__mask"},ce={class:"rc-toast__content"},ae={key:0,class:"rc-toast__spinner"},le={key:1,class:"rc-toast__icon rc-toast__icon--success"},se={key:2,class:"rc-toast__icon rc-toast__icon--fail"},re={class:"rc-toast__text"},ie=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:n}){const o=t,s=e.ref(!0);let r;function d(){r&&(clearTimeout(r),r=null)}function i(){d(),s.value=!1}return n({close:i}),e.onMounted(()=>{o.duration&&o.duration>0&&(r=setTimeout(()=>{i()},o.duration))}),e.onUnmounted(()=>{d()}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",oe)):e.createCommentVNode("",!0),e.createElementVNode("div",ce,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",ae)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",le)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",se)):e.createCommentVNode("",!0),e.createElementVNode("div",re,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(a.$slots,"default",{},void 0,!0)],64))}}),S=v(ie,[["__scopeId","data-v-d234c9c5"]]);let g=null,_=null;function T(){g&&(g.unmount(),g=null),_&&(document.body.removeChild(_),_=null)}function de(t){const n=typeof t=="string"?{message:t}:t||{};T(),_=document.createElement("div"),document.body.appendChild(_);const o={message:n.message,type:n.type??"text",duration:n.duration??2e3,mask:n.mask??!1,onAfterLeave:()=>{var s;T(),(s=n.onClose)==null||s.call(n)}};return g=e.createApp(S,o),g.mount(_),{close:G}}function G(){var t,n,o;g&&((o=(n=(t=g._instance)==null?void 0:t.exposed)==null?void 0:n.close)==null||o.call(n))}S.name="rc-toast";function M(t){return t.component(S.name,S),t}const ue={class:"rc-message",role:"alert","aria-live":"polite"},me={class:"rc-message__content"},fe=e.defineComponent({__name:"index",setup(t,{expose:n}){const o=e.reactive([]);let s=1;function r(i){const a=o.findIndex(c=>c.id===i);a>=0&&o.splice(a,1)}function d(i,a,c){const l=s++;return o.push({id:l,type:i,content:a,duration:c}),c>0&&window.setTimeout(()=>r(l),c),l}return n({add:d,remove:r}),(i,a)=>(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:e.normalizeClass(["rc-message__item",`rc-message--${c.type}`])},[e.createElementVNode("span",me,e.toDisplayString(c.content),1)],2))),128))]),_:1})]))}}),pe=v(fe,[["__scopeId","data-v-87811df0"]]);let y=null,p=null;function ye(){var n;if(y&&p)return;y=document.createElement("div"),document.body.appendChild(y);const t=e.createVNode(pe,{});e.render(t,y),p=(n=t.component)==null?void 0:n.exposed}function h(t,n,o){var r;ye();const s=typeof o=="number"?o:t==="loading"?0:2e3;return(r=p==null?void 0:p.add)==null?void 0:r.call(p,t,n,s)}const j={open(t){return h(t.type||"info",t.content,t.duration)},info(t,n){return h("info",t,n)},success(t,n){return h("success",t,n)},warning(t,n){return h("warning",t,n)},error(t,n){return h("error",t,n)},loading(t,n){return h("loading",t,n)},destroy(){y&&(e.render(null,y),y.remove(),y=null,p=null)}};function w(t){return t.config.globalProperties.$message=j,t}const ge={key:0,class:"rc-icon__unicode"},ve=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const n=t,o=e.inject(E,{}),s=e.computed(()=>(o==null?void 0:o.iconClass)||"iconfont"),r=e.computed(()=>n.name||""),d=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size||"16px"),i=e.computed(()=>({fontSize:d.value,color:n.color||void 0,lineHeight:1,fontFamily:(o==null?void 0:o.iconClass)||"iconfont"})),a=e.computed(()=>{const c=n.code;if(c==null||c===""||c===0)return"";if(typeof c=="number")return String.fromCharCode(c);const l=String(c).replace(/^0x/i,""),u=parseInt(l,16);return Number.isNaN(u)?"":String.fromCharCode(u)});return e.onMounted(()=>{if(typeof window>"u")return;const c=o&&o.iconCssUrl||z.iconCssUrl;if(!c)return;const l=`link[rel="stylesheet"][data-rcui-icon="true"][href="${c}"]`;if(!document.head.querySelector(l)){const m=document.createElement("link");m.rel="stylesheet",m.href=c,m.setAttribute("data-rcui-icon","true"),document.head.appendChild(m)}}),(c,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[s.value,r.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(i.value),"aria-hidden":"true"},[a.value?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],6))}}),B=v(ve,[["__scopeId","data-v-3857a892"]]);B.name="rc-icon";function V(t){return t.component(B.name,B),t.component("RcIcon",B),t}const E=Symbol("RECYCLE_UI_CONFIG"),z={prefix:"rc",autoRegister:!0,provideKey:E,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_9vcnw0pnmkh.css",iconClass:"iconfont"};function be(t,n){n.autoRegister!==!1&&(typeof N=="function"&&N(t),typeof D=="function"&&D(t),typeof I=="function"&&I(t),typeof M=="function"&&M(t),typeof V=="function"&&V(t),typeof w=="function"&&w(t))}const R=(t,n)=>{const o={...z,...n||{}};if(t.provide(o.provideKey??E,o),t.config.globalProperties.$recycleUI=o,typeof window<"u"&&o.iconCssUrl){const s=`link[rel="stylesheet"][data-rcui-icon="true"][href="${o.iconCssUrl}"]`;if(!document.head.querySelector(s)){const d=document.createElement("link");d.rel="stylesheet",d.href=o.iconCssUrl,d.setAttribute("data-rcui-icon","true"),document.head.appendChild(d)}}return be(t,o),t},he={install:R};function ke(t){return{install(n){R(n,t)}}}exports.RECYCLE_UI_SYMBOL=E;exports.RcButton=x;exports.RcCard=C;exports.RcDescriptions=U;exports.RcDescriptionsItem=L;exports.RcIcon=B;exports.RcToast=S;exports.createRecycleUI=ke;exports.default=he;exports.defaultRecycleUIConfig=z;exports.hideToast=G;exports.install=R;exports.installButton=N;exports.installCard=I;exports.installDescriptions=D;exports.installIcon=V;exports.installMessage=w;exports.message=j;exports.rcDescriptions=U;exports.rcDescriptionsItem=L;exports.showToast=de;
2
+ //# sourceMappingURL=index.cjs.map