@antdv-next1/pro-card 2.0.15 → 2.0.16

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 asuradaSong
3
+ Copyright (c) 2023 lucasjeke
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/Card.js CHANGED
@@ -1,4 +1,4 @@
1
- import useStyle from "./style/index.js";
1
+ import style_default from "./style/index.js";
2
2
  import { Fragment, cloneVNode, computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef } from "vue";
3
3
  import { LabelIconTip, childrenToArray, isSpecialNode } from "@antdv-next1/pro-utils";
4
4
  import { classNames } from "@v-c/util";
@@ -27,7 +27,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
27
27
  const config = useConfig();
28
28
  const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
29
29
  const baseClassName = computed(() => `${prefixCls.value}-card`);
30
- const { wrapSSR, hashId } = useStyle(baseClassName);
30
+ const [hashId, cssVarCls] = style_default(baseClassName);
31
31
  const screens = useBreakpoint();
32
32
  const collapsed = shallowRef(props.defaultCollapsed || false);
33
33
  /**
@@ -89,7 +89,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
89
89
  ...colStyle
90
90
  },
91
91
  "key": index,
92
- "class": classNames([`${baseClassName.value}-col`], colPropsClass, hashId.value, {
92
+ "class": classNames([`${baseClassName.value}-col`], colPropsClass, hashId.value, cssVarCls.value, {
93
93
  [`${baseClassName.value}-split-horizontal`]: split === "horizontal" && index !== childrenArray.length - 1,
94
94
  [`${baseClassName.value}-split-vertical`]: split === "vertical" && index !== childrenArray.length - 1
95
95
  })
@@ -108,7 +108,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
108
108
  }, {});
109
109
  return createVNode(Col, mergeProps(Object.keys(colProps).length ? colProps : wrap ? {} : { flex: 1 }, {
110
110
  "style": { ...colStyle },
111
- "class": classNames({ [`${baseClassName.value}-split-vertical`]: split === "vertical" && index !== childrenArray.length - 1 }, hashId.value),
111
+ "class": classNames({ [`${baseClassName.value}-split-vertical`]: split === "vertical" && index !== childrenArray.length - 1 }, hashId.value, cssVarCls.value),
112
112
  "key": index
113
113
  }), _isSlot(_slot = cloneVNode(element, {
114
114
  size: rest.size,
@@ -126,7 +126,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
126
126
  }, collapsibleIconRender ? { expandIcon: (panelProps) => collapsibleIconRender({ collapsed: panelProps.isActive || false }) } : {}, {
127
127
  "collapsible": typeof collapsible !== "boolean" && collapsible !== "header" ? collapsible : void 0,
128
128
  "defaultActiveKey": defaultCollapsed ? void 0 : ["collapseCard"],
129
- "class": classNames(baseClassName.value, attrs.class, hashId.value, {
129
+ "class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value, {
130
130
  [`${baseClassName.value}-headerBordered`]: headerBordered,
131
131
  [`${baseClassName.value}-type-inner`]: type === "inner",
132
132
  [`${baseClassName.value}-ghost`]: ghost,
@@ -141,7 +141,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
141
141
  body: classNames({
142
142
  [`${baseClassName.value}-body-direction-column`]: direction === "column",
143
143
  [`${baseClassName.value}-body-layout-center`]: layout === "center"
144
- }, hashId.value),
144
+ }, hashId.value, cssVarCls.value),
145
145
  ...rest.classes
146
146
  },
147
147
  "styles": {
@@ -157,7 +157,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
157
157
  "tooltip": props.tooltip
158
158
  }, null),
159
159
  content: containProCard ? direction !== "column" && split !== "horizontal" ? createVNode(Row, { "gutter": gutter }, _isSlot(childrenDom) ? childrenDom : { default: () => [childrenDom] }) : createVNode("div", {
160
- "class": classNames(`${baseClassName.value}-col`, hashId.value, {}),
160
+ "class": classNames(`${baseClassName.value}-col`, hashId.value, cssVarCls.value, {}),
161
161
  "style": {
162
162
  ...getStyle(horizontalGutter > 0, {
163
163
  marginInlineEnd: `-${horizontalGutter / 2}px`,
@@ -174,7 +174,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
174
174
  }), null);
175
175
  const cardDom = createVNode(Card, mergeProps(attrs, rest, {
176
176
  "type": containProCard ? void 0 : type,
177
- "class": classNames(baseClassName.value, attrs.class, hashId.value, {
177
+ "class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value, {
178
178
  [`${baseClassName.value}-ghost`]: ghost,
179
179
  [`${baseClassName.value}-split`]: split,
180
180
  [`${baseClassName.value}-disabled`]: disabled,
@@ -187,7 +187,7 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
187
187
  body: classNames(`${baseClassName.value}-body`, {
188
188
  [`${baseClassName.value}-body-direction-column`]: direction === "column",
189
189
  [`${baseClassName.value}-body-layout-center`]: layout === "center"
190
- }, hashId.value),
190
+ }, hashId.value, cssVarCls.value),
191
191
  ...rest.classes
192
192
  }
193
193
  }, title && !tooltip && !slotTitle ? { title } : {}, { "styles": {
@@ -205,14 +205,14 @@ const InternalProCard = /* @__PURE__ */ defineComponent((props, { slots, expose,
205
205
  },
206
206
  ...rest.styles
207
207
  } }), {
208
- default: () => [containProCard ? direction !== "column" && split !== "horizontal" ? createVNode(Row, { "gutter": gutter }, _isSlot(childrenDom) ? childrenDom : { default: () => [childrenDom] }) : createVNode("div", { "class": classNames(`${baseClassName.value}-row`, hashId.value) }, [childrenDom]) : childrenDom],
208
+ default: () => [containProCard ? direction !== "column" && split !== "horizontal" ? createVNode(Row, { "gutter": gutter }, _isSlot(childrenDom) ? childrenDom : { default: () => [childrenDom] }) : createVNode("div", { "class": classNames(`${baseClassName.value}-row`, hashId.value, cssVarCls.value) }, [childrenDom]) : childrenDom],
209
209
  ...restSlots,
210
210
  ...slotTitle || tooltip ? { title: () => createVNode(LabelIconTip, {
211
211
  "label": slotTitle?.() || props.title,
212
212
  "tooltip": props.tooltip
213
213
  }, null) } : {}
214
214
  });
215
- return wrapSSR(createVNode(Fragment, null, [typeof collapsible !== "boolean" ? hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(collapseCardDom) ? collapseCardDom : { default: () => [collapseCardDom] }) : collapseCardDom : hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(cardDom) ? cardDom : { default: () => [cardDom] }) : cardDom]));
215
+ return createVNode(Fragment, null, [typeof collapsible !== "boolean" ? hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(collapseCardDom) ? collapseCardDom : { default: () => [collapseCardDom] }) : collapseCardDom : hasBorderBeamDom ? createVNode(BorderBeam, typeof borderBeam === "boolean" ? {} : borderBeam, _isSlot(cardDom) ? cardDom : { default: () => [cardDom] }) : cardDom]);
216
216
  };
217
217
  }, {
218
218
  props: {
@@ -27,7 +27,7 @@ declare const _ProCheckCard: _$vue.DefineSetupFnComponent<ProCheckCardProps, {},
27
27
  extra?: () => VueNode[];
28
28
  cover?: () => VueNode[];
29
29
  description?: () => VNode[];
30
- }>, CardMetaProps & Omit<CardProps, "size" | "title" | "type" | "headStyle" | "bodyStyle" | "tabList" | "tabBarExtraContent" | "activeTabKey" | "defaultActiveTabKey" | "onTabChange"> & {
30
+ }>, CardMetaProps & Omit<CardProps, "title" | "onTabChange" | "activeTabKey" | "defaultActiveTabKey" | "headStyle" | "bodyStyle" | "tabBarExtraContent" | "tabList" | "type" | "size"> & {
31
31
  /** 边框流光 */borderBeam?: BorderBeamProps | boolean;
32
32
  size?: CardProps["size"] | "large";
33
33
  checked?: boolean;
@@ -1,6 +1,6 @@
1
1
  import ProCard from "../../ProCard.js";
2
2
  import ProCheckCardGroup, { useCheckCardGroupContextInject } from "./Group.js";
3
- import { useStyle } from "./style/index.js";
3
+ import style_default from "./style/index.js";
4
4
  import { Fragment, computed, createVNode, defineComponent, mergeProps, reactive, ref, toRef } from "vue";
5
5
  import { isImg, isNil, isUrl, transformVueNodeType, useEffect, useMountMergeState } from "@antdv-next1/pro-utils";
6
6
  import { classNames } from "@v-c/util";
@@ -18,7 +18,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
18
18
  const baseClassName = computed(() => `${prefixCls.value}-checkcard`);
19
19
  const multiple = ref(false);
20
20
  const checkCardGroupProvide = useCheckCardGroupContextInject();
21
- const { wrapSSR, hashId } = useStyle(baseClassName);
21
+ const [hashId, cssVarCls] = style_default(baseClassName);
22
22
  const checkCardProps = reactive({});
23
23
  const [stateChecked, setStateChecked] = useMountMergeState(props.defaultChecked || false, {
24
24
  value: toRef(() => props.checked),
@@ -67,10 +67,10 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
67
67
  "shape": "square",
68
68
  "src": avatar
69
69
  }, null) : transformVueNodeType(avatar);
70
- const headerDom = isNil(titleDom ?? extraDom) ? null : createVNode(Fragment, null, [titleDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-header`, hashId.value) }, [createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title`, `${baseClassName.value}-meta-title-with-ellipsis`, hashId.value) }, [titleDom])]), extraDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title-extra`, hashId.value) }, [extraDom])]);
71
- return wrapSSR(createVNode(ProCard, mergeProps({
70
+ const headerDom = isNil(titleDom ?? extraDom) ? null : createVNode(Fragment, null, [titleDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-header`, hashId.value, cssVarCls.value) }, [createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title`, `${baseClassName.value}-meta-title-with-ellipsis`, hashId.value, cssVarCls.value) }, [titleDom])]), extraDom && createVNode("div", { "class": classNames(`${baseClassName.value}-meta-title-extra`, hashId.value, cssVarCls.value) }, [extraDom])]);
71
+ return createVNode(ProCard, mergeProps({
72
72
  "style": attrs.style,
73
- "class": classNames(baseClassName.value, attrs.class, hashId.value, {
73
+ "class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value, {
74
74
  [`${baseClassName.value}-checked`]: propsChecked,
75
75
  [`${baseClassName.value}-multiple`]: checkCardProps.multiple,
76
76
  [`${baseClassName.value}-disabled`]: disabled,
@@ -92,13 +92,13 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
92
92
  default: () => createVNode(Fragment, null, [(headerDom || avatarDom || descriptionDom || cardLoading) && createVNode(CardMeta, {
93
93
  "title": headerDom,
94
94
  "description": descriptionDom,
95
- "class": classNames(`${baseClassName.value}-meta`, hashId.value, {
95
+ "class": classNames(`${baseClassName.value}-meta`, hashId.value, cssVarCls.value, {
96
96
  [`${baseClassName.value}-meta-avatar-header`]: avatarDom && headerDom && !descriptionDom,
97
97
  [`${baseClassName.value}-meta-extra-header`]: !isNil(extraDom)
98
98
  }),
99
99
  "avatar": avatarDom
100
- }, null), slots.default?.() && createVNode("div", { "class": classNames(`${baseClassName.value}-body`, hashId.value) }, [slots.default?.()])])
101
- }));
100
+ }, null), slots.default?.() && createVNode("div", { "class": classNames(`${baseClassName.value}-body`, hashId.value, cssVarCls.value) }, [slots.default?.()])])
101
+ });
102
102
  };
103
103
  }, {
104
104
  props: {
@@ -218,10 +218,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
218
218
  required: false,
219
219
  default: void 0
220
220
  },
221
- size: {
222
- type: String,
223
- required: false
224
- },
221
+ size: { required: false },
225
222
  checked: {
226
223
  type: Boolean,
227
224
  required: false,
@@ -262,11 +259,7 @@ const ProCheckCard = /* @__PURE__ */ defineComponent((props, { slots, attrs }) =
262
259
  type: Function,
263
260
  required: false
264
261
  },
265
- collapsible: {
266
- type: [String, Boolean],
267
- required: false,
268
- default: void 0
269
- }
262
+ collapsible: { required: false }
270
263
  },
271
264
  name: "ProCheckCard",
272
265
  inheritAttrs: false
@@ -1,5 +1,5 @@
1
1
  import ProCard from "../../ProCard.js";
2
- import { useStyle as useStyle$1 } from "./style/group.js";
2
+ import group_default from "./style/group.js";
3
3
  import ProCheckCard from "./CheckCard.js";
4
4
  import { computed, createVNode, defineComponent, inject, provide, shallowRef, toRef } from "vue";
5
5
  import { childrenToArray, isSpecialNode, useMountMergeState } from "@antdv-next1/pro-utils";
@@ -29,7 +29,7 @@ const InternalCheckCardGroup = /* @__PURE__ */ defineComponent((props, { slots,
29
29
  const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
30
30
  const baseClassName = computed(() => `${prefixCls.value}-checkcard-group`);
31
31
  const registerValueMap = shallowRef(/* @__PURE__ */ new Map());
32
- const { wrapSSR, hashId } = useStyle$1(baseClassName);
32
+ const [hashId, cssVarCls] = group_default(baseClassName);
33
33
  const [stateValue, setStateValue] = useMountMergeState(props.defaultValue, {
34
34
  value: toRef(() => props.value),
35
35
  onChange: (value) => {
@@ -111,10 +111,10 @@ const InternalCheckCardGroup = /* @__PURE__ */ defineComponent((props, { slots,
111
111
  registerValue,
112
112
  cancelValue
113
113
  })));
114
- return () => wrapSSR(createVNode("div", {
115
- "class": classNames(baseClassName.value, hashId.value),
114
+ return () => createVNode("div", {
115
+ "class": classNames(baseClassName.value, hashId.value, cssVarCls.value),
116
116
  "style": attrs.style
117
- }, [children.value]));
117
+ }, [children.value]);
118
118
  }, {
119
119
  props: {
120
120
  prefixCls: {
@@ -1,13 +1,10 @@
1
- import { ComputedRef } from "vue";
2
- import * as _$_antdv_next1_pro_provider0 from "@antdv-next1/pro-provider";
3
- import { ProAliasToken } from "@antdv-next1/pro-provider";
1
+ import * as _$vue from "vue";
2
+ import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
4
3
  import { Keyframes } from "@antdv-next/cssinjs";
5
4
 
6
5
  //#region src/components/CheckCard/style/group.d.ts
7
- interface ProCheckCardGroupToken extends ProAliasToken {
8
- componentCls: string;
9
- }
6
+ interface ProCheckCardGroupToken extends ProAliasCssVarToken {}
10
7
  declare const cardLoading: Keyframes;
11
- declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
8
+ declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
12
9
  //#endregion
13
- export { ProCheckCardGroupToken, cardLoading, useStyle };
10
+ export { ProCheckCardGroupToken, cardLoading, _default as default };
@@ -1,5 +1,5 @@
1
- import { useStyle as useStyle$1 } from "@antdv-next1/pro-provider";
2
- import { Keyframes } from "@antdv-next/cssinjs";
1
+ import { useStyle } from "@antdv-next1/pro-provider";
2
+ import { Keyframes, mergeToken } from "@antdv-next/cssinjs";
3
3
  //#region src/components/CheckCard/style/group.ts
4
4
  const cardLoading = new Keyframes("card-loading", {
5
5
  "0%": { backgroundPosition: "0 50%" },
@@ -20,13 +20,8 @@ const genProCheckCardGroupStyle = (token) => {
20
20
  }
21
21
  } };
22
22
  };
23
- function useStyle(prefixCls) {
24
- return useStyle$1("ProCheckCardGroup", (token) => {
25
- return [genProCheckCardGroupStyle({
26
- ...token,
27
- componentCls: `.${prefixCls.value}`
28
- })];
29
- });
30
- }
23
+ var group_default = useStyle("ProCheckCardGroup", (token) => {
24
+ return [genProCheckCardGroupStyle(mergeToken(token, {}))];
25
+ });
31
26
  //#endregion
32
- export { cardLoading, useStyle };
27
+ export { cardLoading, group_default as default };
@@ -1,13 +1,10 @@
1
- import { ComputedRef } from "vue";
2
- import * as _$_antdv_next1_pro_provider0 from "@antdv-next1/pro-provider";
3
- import { ProAliasToken } from "@antdv-next1/pro-provider";
1
+ import * as _$vue from "vue";
2
+ import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
4
3
  import { Keyframes } from "@antdv-next/cssinjs";
5
4
 
6
5
  //#region src/components/CheckCard/style/index.d.ts
7
- interface ProCheckCardToken extends ProAliasToken {
8
- componentCls: string;
9
- }
6
+ interface ProCheckCardToken extends ProAliasCssVarToken {}
10
7
  declare const cardLoading: Keyframes;
11
- declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
8
+ declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
12
9
  //#endregion
13
- export { ProCheckCardToken, cardLoading, useStyle };
10
+ export { ProCheckCardToken, cardLoading, _default as default };
@@ -1,5 +1,5 @@
1
- import { useStyle as useStyle$1 } from "@antdv-next1/pro-provider";
2
- import { Keyframes } from "@antdv-next/cssinjs";
1
+ import { useStyle } from "@antdv-next1/pro-provider";
2
+ import { Keyframes, mergeToken } from "@antdv-next/cssinjs";
3
3
  //#region src/components/CheckCard/style/index.ts
4
4
  function proCheckCardActive(token) {
5
5
  return {
@@ -46,17 +46,17 @@ const genProCheckCardStyle = (token) => {
46
46
  ...proCheckCardActive(token),
47
47
  [`${token.antCls}-card-cover`]: { "&:after": {
48
48
  opacity: 1,
49
- border: `${token.borderRadius + 4}px solid ${token.colorPrimary}`,
50
- borderBlockEnd: `${token.borderRadius + 4}px solid transparent`,
51
- borderInlineStart: `${token.borderRadius + 4}px solid transparent`,
52
- borderStartEndRadius: `${token.borderRadius}px`
49
+ border: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} ${token.colorPrimary}`,
50
+ borderBlockEnd: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
51
+ borderInlineStart: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
52
+ borderStartEndRadius: token.borderRadius
53
53
  } },
54
54
  [`${token.antCls}-card-body`]: { "&:after": {
55
55
  opacity: 1,
56
- border: `${token.borderRadius + 4}px solid ${token.colorPrimary}`,
57
- borderBlockEnd: `${token.borderRadius + 4}px solid transparent`,
58
- borderInlineStart: `${token.borderRadius + 4}px solid transparent`,
59
- borderStartEndRadius: `${token.borderRadius}px`
56
+ border: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} ${token.colorPrimary}`,
57
+ borderBlockEnd: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
58
+ borderInlineStart: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
59
+ borderStartEndRadius: token.borderRadius
60
60
  } }
61
61
  } },
62
62
  [`&${token.antCls}-card`]: {
@@ -80,9 +80,9 @@ const genProCheckCardStyle = (token) => {
80
80
  height: 0,
81
81
  opacity: 0,
82
82
  transition: `all 0.3s ${token.motionEaseInOut}`,
83
- borderBlockEnd: `${token.borderRadius + 4}px solid transparent`,
84
- borderInlineStart: `${token.borderRadius + 4}px solid transparent`,
85
- borderStartEndRadius: `${token.borderRadius}px`
83
+ borderBlockEnd: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
84
+ borderInlineStart: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
85
+ borderStartEndRadius: token.borderRadius
86
86
  }
87
87
  },
88
88
  [`${token.antCls}-card-body`]: {
@@ -143,9 +143,9 @@ const genProCheckCardStyle = (token) => {
143
143
  height: 0,
144
144
  opacity: 0,
145
145
  transition: `all 0.3s ${token.motionEaseInOut}`,
146
- borderBlockEnd: `${token.borderRadius + 4}px solid transparent`,
147
- borderInlineStart: `${token.borderRadius + 4}px solid transparent`,
148
- borderStartEndRadius: `${token.borderRadius}px`
146
+ borderBlockEnd: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
147
+ borderInlineStart: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
148
+ borderStartEndRadius: token.borderRadius
149
149
  }
150
150
  }
151
151
  },
@@ -158,21 +158,16 @@ const genProCheckCardStyle = (token) => {
158
158
  insetInlineEnd: 2,
159
159
  width: 0,
160
160
  height: 0,
161
- border: `${token.borderRadius + 4}px solid ${token.colorTextDisabled}`,
162
- borderBlockEnd: `${token.borderRadius + 4}px solid transparent`,
163
- borderInlineStart: `${token.borderRadius + 4}px solid transparent`,
164
- borderStartEndRadius: `${token.borderRadius}px`
161
+ border: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} ${token.colorTextDisabled}`,
162
+ borderBlockEnd: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
163
+ borderInlineStart: `${token.calc(token.borderRadius).add(4).equal()} ${token.lineType} transparent`,
164
+ borderStartEndRadius: token.borderRadius
165
165
  } } },
166
166
  [`&&:not(${token.componentCls}-disabled)`]: { "&:hover": { borderColor: token.colorPrimary } }
167
167
  } };
168
168
  };
169
- function useStyle(prefixCls) {
170
- return useStyle$1("ProCheckCard", (token) => {
171
- return [genProCheckCardStyle({
172
- ...token,
173
- componentCls: `.${prefixCls.value}`
174
- })];
175
- });
176
- }
169
+ var style_default = useStyle("ProCheckCard", (token) => {
170
+ return [genProCheckCardStyle(mergeToken(token, {}))];
171
+ });
177
172
  //#endregion
178
- export { cardLoading, useStyle };
173
+ export { cardLoading, style_default as default };
@@ -1,4 +1,4 @@
1
- import { useStyle } from "./style/index.js";
1
+ import style_default from "./style/index.js";
2
2
  import { Fragment, computed, createVNode, defineComponent, mergeProps } from "vue";
3
3
  import { classNames } from "@v-c/util";
4
4
  import { Badge, Statistic as Statistic$1, Tooltip } from "antdv-next";
@@ -9,25 +9,25 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { attrs }) => {
9
9
  const config = useConfig();
10
10
  const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
11
11
  const baseClassName = computed(() => `${prefixCls.value}-card-statistic`);
12
- const { wrapSSR, hashId } = useStyle(baseClassName);
12
+ const [hashId, cssVarCls] = style_default(baseClassName);
13
13
  return () => {
14
14
  const { layout = "inline", description, title, tooltip, status, trend, prefix, icon, ...rest } = props;
15
- const tooltipDom = tooltip && createVNode(Tooltip, { "title": tooltip }, { default: () => [createVNode(QuestionCircleOutlined, { "class": classNames(`${baseClassName.value}-tip`, hashId.value) }, null)] });
16
- const trendDom = trend && createVNode("div", { "class": classNames(`${baseClassName.value}-trend-icon`, hashId.value, { [`${baseClassName.value}-trend-icon-${trend}`]: trend }) }, null);
17
- return wrapSSR(createVNode("div", {
18
- "class": classNames(baseClassName.value, attrs.class, hashId.value),
15
+ const tooltipDom = tooltip && createVNode(Tooltip, { "title": tooltip }, { default: () => [createVNode(QuestionCircleOutlined, { "class": classNames(`${baseClassName.value}-tip`, hashId.value, cssVarCls.value) }, null)] });
16
+ const trendDom = trend && createVNode("div", { "class": classNames(`${baseClassName.value}-trend-icon`, hashId.value, cssVarCls.value, { [`${baseClassName.value}-trend-icon-${trend}`]: trend }) }, null);
17
+ return createVNode("div", {
18
+ "class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value),
19
19
  "style": attrs.style
20
- }, [icon && createVNode("div", { "class": classNames(`${baseClassName.value}-icon`, hashId.value) }, [icon]), createVNode("div", { "class": classNames(`${baseClassName.value}-wrapper`, hashId.value) }, [status && createVNode("div", { "class": classNames(`${baseClassName.value}-status`, hashId.value) }, [createVNode(Badge, {
20
+ }, [icon && createVNode("div", { "class": classNames(`${baseClassName.value}-icon`, hashId.value, cssVarCls.value) }, [icon]), createVNode("div", { "class": classNames(`${baseClassName.value}-wrapper`, hashId.value, cssVarCls.value) }, [status && createVNode("div", { "class": classNames(`${baseClassName.value}-status`, hashId.value, cssVarCls.value) }, [createVNode(Badge, {
21
21
  "status": status,
22
22
  "text": null
23
- }, null)]), createVNode("div", { "class": classNames(`${baseClassName.value}-content`, hashId.value) }, [createVNode(Statistic$1, mergeProps({
23
+ }, null)]), createVNode("div", { "class": classNames(`${baseClassName.value}-content`, hashId.value, cssVarCls.value) }, [createVNode(Statistic$1, mergeProps({
24
24
  "title": (title || tooltipDom) && createVNode(Fragment, null, [title, tooltipDom]),
25
25
  "prefix": (trendDom || prefix) && createVNode(Fragment, null, [trendDom, prefix]),
26
- "class": classNames(hashId.value, {
26
+ "class": classNames(hashId.value, cssVarCls.value, {
27
27
  [`${baseClassName.value}-layout-${layout}`]: layout,
28
28
  [`${baseClassName.value}-trend-${trend}`]: trend
29
29
  })
30
- }, rest), null), description && createVNode("div", { "class": classNames(`${baseClassName.value}-description`, hashId.value) }, [description])])])]));
30
+ }, rest), null), description && createVNode("div", { "class": classNames(`${baseClassName.value}-description`, hashId.value, cssVarCls.value) }, [description])])])]);
31
31
  };
32
32
  }, {
33
33
  props: {
@@ -1,11 +1,8 @@
1
- import { ComputedRef } from "vue";
2
- import * as _$_antdv_next1_pro_provider0 from "@antdv-next1/pro-provider";
3
- import { ProAliasToken } from "@antdv-next1/pro-provider";
1
+ import * as _$vue from "vue";
2
+ import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
4
3
 
5
4
  //#region src/components/Statistic/style/index.d.ts
6
- interface ProListToken extends ProAliasToken {
7
- componentCls: string;
8
- }
9
- declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
5
+ interface ProStatisticToken extends ProAliasCssVarToken {}
6
+ declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
10
7
  //#endregion
11
- export { ProListToken, useStyle };
8
+ export { ProStatisticToken, _default as default };
@@ -1,6 +1,7 @@
1
- import { useStyle as useStyle$1 } from "@antdv-next1/pro-provider";
1
+ import { useStyle } from "@antdv-next1/pro-provider";
2
+ import { mergeToken } from "@antdv-next/cssinjs";
2
3
  //#region src/components/Statistic/style/index.ts
3
- const genProStyle = (token) => {
4
+ const genProStatisticStyle = (token) => {
4
5
  return { [token.componentCls]: {
5
6
  boxSizing: "border-box",
6
7
  display: "flex",
@@ -52,13 +53,8 @@ const genProStyle = (token) => {
52
53
  }
53
54
  } };
54
55
  };
55
- function useStyle(prefixCls) {
56
- return useStyle$1("Statistic", (token) => {
57
- return [genProStyle({
58
- ...token,
59
- componentCls: `.${prefixCls.value}`
60
- })];
61
- });
62
- }
56
+ var style_default = useStyle("Statistic", (token) => {
57
+ return [genProStatisticStyle(mergeToken(token, {}))];
58
+ });
63
59
  //#endregion
64
- export { useStyle };
60
+ export { style_default as default };
@@ -1,6 +1,6 @@
1
1
  import ProCard from "../../ProCard.js";
2
2
  import Statistic from "../Statistic/index.js";
3
- import { useStyle } from "./style/index.js";
3
+ import style_default from "./style/index.js";
4
4
  import { Fragment, computed, createVNode, defineComponent, mergeProps } from "vue";
5
5
  import { classNames } from "@v-c/util";
6
6
  import { useConfig } from "antdv-next/dist/config-provider/context";
@@ -9,24 +9,24 @@ const StatisticCard = /* @__PURE__ */ defineComponent((props, { attrs, slots })
9
9
  const config = useConfig();
10
10
  const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
11
11
  const baseClassName = computed(() => `${prefixCls.value}-statistic-card`);
12
- const { wrapSSR, hashId } = useStyle(baseClassName);
12
+ const [hashId, cssVarCls] = style_default(baseClassName);
13
13
  return () => {
14
14
  const { statistic, chart, chartPlacement, footer, ...restProps } = props;
15
15
  const statisticDom = statistic && createVNode(Statistic, mergeProps({ "layout": "vertical" }, statistic), null);
16
- const chartDom = chart && createVNode("div", { "class": classNames(`${baseClassName.value}-chart`, hashId.value, {
16
+ const chartDom = chart && createVNode("div", { "class": classNames(`${baseClassName.value}-chart`, hashId.value, cssVarCls.value, {
17
17
  [`${baseClassName.value}-chart-left`]: chartPlacement === "left" && chart && statistic,
18
18
  [`${baseClassName.value}-chart-right`]: chartPlacement === "right" && chart && statistic
19
19
  }) }, [chart]);
20
- const contentCls = classNames(`${baseClassName.value}-content `, hashId.value, { [`${baseClassName.value}-content-horizontal`]: chartPlacement === "left" || chartPlacement === "right" });
20
+ const contentCls = classNames(`${baseClassName.value}-content `, hashId.value, cssVarCls.value, { [`${baseClassName.value}-content-horizontal`]: chartPlacement === "left" || chartPlacement === "right" });
21
21
  const contentDom = (chartDom || statisticDom) && (chartPlacement === "left" ? createVNode("div", { "class": contentCls }, [chartDom, statisticDom]) : createVNode("div", { "class": contentCls }, [statisticDom, chartDom]));
22
- return wrapSSR(createVNode(Fragment, null, [createVNode(ProCard, mergeProps({
22
+ return createVNode(Fragment, null, [createVNode(ProCard, mergeProps({
23
23
  "style": attrs.style,
24
- "class": classNames(baseClassName.value, attrs.class, hashId.value)
24
+ "class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value)
25
25
  }, restProps), { default: () => [
26
26
  contentDom,
27
27
  slots.default?.(),
28
- footer && createVNode("div", { "class": classNames(`${baseClassName.value}-footer`, hashId.value) }, [footer])
29
- ] })]));
28
+ footer && createVNode("div", { "class": classNames(`${baseClassName.value}-footer`, hashId.value, cssVarCls.value) }, [footer])
29
+ ] })]);
30
30
  };
31
31
  }, {
32
32
  props: {
@@ -1,11 +1,8 @@
1
- import { ComputedRef } from "vue";
2
- import * as _$_antdv_next1_pro_provider0 from "@antdv-next1/pro-provider";
3
- import { ProAliasToken } from "@antdv-next1/pro-provider";
1
+ import * as _$vue from "vue";
2
+ import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
4
3
 
5
4
  //#region src/components/StatisticCard/style/index.d.ts
6
- interface ProListToken extends ProAliasToken {
7
- componentCls: string;
8
- }
9
- declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
5
+ interface ProStatisticCardToken extends ProAliasCssVarToken {}
6
+ declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
10
7
  //#endregion
11
- export { ProListToken, useStyle };
8
+ export { ProStatisticCardToken, _default as default };
@@ -1,4 +1,5 @@
1
- import { useStyle as useStyle$1 } from "@antdv-next1/pro-provider";
1
+ import { useStyle } from "@antdv-next1/pro-provider";
2
+ import { mergeToken, unit } from "@antdv-next/cssinjs";
2
3
  //#region src/components/StatisticCard/style/index.ts
3
4
  const genProStyle = (token) => {
4
5
  return { [token.componentCls]: {
@@ -31,17 +32,12 @@ const genProStyle = (token) => {
31
32
  "&-footer": {
32
33
  marginBlockStart: 8,
33
34
  paddingBlockStart: 8,
34
- borderBlockStart: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`
35
+ borderBlockStart: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
35
36
  }
36
37
  } };
37
38
  };
38
- function useStyle(prefixCls) {
39
- return useStyle$1("StatisticCard", (token) => {
40
- return [genProStyle({
41
- ...token,
42
- componentCls: `.${prefixCls.value}`
43
- })];
44
- });
45
- }
39
+ var style_default = useStyle("StatisticCard", (token) => {
40
+ return [genProStyle(mergeToken(token, {}))];
41
+ });
46
42
  //#endregion
47
- export { useStyle };
43
+ export { style_default as default };