@antdv-next1/pro-card 2.0.10 → 2.0.12

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.
@@ -2,51 +2,100 @@ import { useStyle as useStyle$1 } from "@antdv-next1/pro-provider";
2
2
  //#region src/style/index.ts
3
3
  const genProCardStyle = (token) => {
4
4
  const { componentCls } = token;
5
- return { [componentCls]: {
6
- [`&${token.antCls}-collapse`]: {
7
- "&&-ghost": { [`${token.antCls}-collapse-item`]: {
8
- [`${componentCls}-header`]: { borderRadius: 0 },
9
- [`${token.antCls}-collapse-content`]: { "&-box": { padding: token.paddingLG } }
10
- } },
11
- [`${token.antCls}-collapse-item`]: {
12
- "&-active": { [`${componentCls}-header`]: {
13
- transition: "none",
14
- "&-border": { borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` }
5
+ return {
6
+ [componentCls]: {
7
+ [`${token.antCls}-card-body`]: { height: "100%" },
8
+ [`&${token.antCls}-collapse`]: {
9
+ position: "relative",
10
+ borderColor: token.colorBorderSecondary,
11
+ backgroundColor: "transparent",
12
+ [`&:not(${componentCls}-split)`]: {
13
+ [`${token.antCls}-collapse-item`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${token.padding}px !important` } },
14
+ [`${token.antCls}-collapse-item`]: { "&-active": { [`${token.antCls}-collapse-panel`]: { [`${token.antCls}-collapse-body`]: { paddingBlockStart: `${token.paddingLG}px !important` } } } }
15
+ },
16
+ [`&${componentCls}-split`]: { [`${token.antCls}-collapse-item:not(${token.antCls}-collapse-item-active)`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${token.padding}px !important` } } },
17
+ [`&${token.antCls}-collapse-borderless`]: { [`${token.antCls}-collapse-item`]: { [`${token.antCls}-collapse-panel`]: { [`${token.antCls}-collapse-body`]: { paddingBlockStart: token.paddingSM } } } },
18
+ [`&${token.componentCls}-type-inner`]: {
19
+ [`&:not(${token.antCls}-collapse-small)`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${token.padding}px !important` } },
20
+ [`${token.antCls}-collapse-panel`]: { borderBlockStart: `${token.lineWidth}px ${token.lineType} ${token.colorBorderSecondary}` }
21
+ },
22
+ [`&${componentCls}-headerBordered`]: { borderBlockStart: `${token.lineWidth}px ${token.lineType} ${token.colorBorderSecondary}` },
23
+ [`${token.antCls}-collapse-panel`]: {
24
+ borderBlockStart: `0px ${token.lineType} ${token.colorBorderSecondary}`,
25
+ boxSizing: "border-box",
26
+ borderBottomLeftRadius: token.borderRadius,
27
+ borderBottomRightRadius: token.borderRadius,
28
+ [`${token.antCls}-collapse-body`]: { height: "100%" }
29
+ },
30
+ "&&-ghost": { [`${token.antCls}-collapse-item`]: {
31
+ [`${componentCls}-header`]: { borderRadius: 0 },
32
+ [`${token.antCls}-collapse-content`]: { "&-box": { padding: token.paddingLG } }
15
33
  } },
16
- [`${componentCls}-header`]: { [`&${token.antCls}-collapse-header`]: {
17
- paddingBlock: 16,
18
- paddingInline: 24,
19
- [`${token.antCls}-collapse-header-text`]: { fontSize: token.fontSizeLG }
20
- } }
21
- }
22
- },
23
- [`&${token.antCls}-card:not(${token.antCls}-card-bordered):not(&-box-shadow)`]: { boxShadow: "none" },
24
- "&&-direction-column": {
25
- display: "flex",
26
- flexDirection: "column",
27
- [`& > ${token.antCls}-card-body`]: { [`${componentCls}-column`]: {
34
+ [`${token.antCls}-collapse-item`]: {
35
+ borderBlockEnd: 0,
36
+ boxSizing: "border-box",
37
+ "&-active": { [`${token.antCls}-collapse-header`]: {
38
+ transition: "none",
39
+ paddingBlockEnd: 0
40
+ } },
41
+ [`${token.antCls}-collapse-header`]: {
42
+ lineHeight: "inherit",
43
+ [`${token.antCls}-collapse-title`]: { fontWeight: token.fontWeightStrong },
44
+ [`${token.antCls}-collapse-extra`]: {
45
+ fontSize: token.fontSize,
46
+ marginInlineStart: 0,
47
+ lineHeight: "24px",
48
+ fontWeight: "normal"
49
+ }
50
+ }
51
+ }
52
+ },
53
+ [`&${token.antCls}-card:not(${token.antCls}-card-bordered):not(&-box-shadow)`]: { boxShadow: "none" },
54
+ "&&-contain-card": {
55
+ [`&:not(${token.antCls}-card-small)> ${token.antCls}-card-head`]: {
56
+ minHeight: 0,
57
+ paddingBlock: token.padding
58
+ },
59
+ [`${token.antCls}-collapse-body`]: {
60
+ display: "flex",
61
+ flexWrap: "wrap",
62
+ flexDirection: "column",
63
+ [`&${componentCls}-body-layout-center`]: { justifyContent: "center" }
64
+ }
65
+ },
66
+ [`${componentCls}-body-direction-column`]: {
28
67
  display: "flex",
29
- boxSizing: "border-box",
30
- height: "100%",
31
68
  flexDirection: "column"
32
- } }
33
- },
34
- [`&${token.antCls}-card&-ghost`]: {
35
- boxShadow: "none",
36
- backgroundColor: "transparent",
37
- [`& > ${token.antCls}-card-body`]: {
38
- paddingBlock: 0,
39
- paddingInline: 0,
40
- borderRadius: 0
69
+ },
70
+ [`${componentCls}-row`]: {
71
+ display: "flex",
72
+ flexDirection: "column"
73
+ },
74
+ [`${componentCls}-split-vertical`]: { borderInlineEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` },
75
+ [`${componentCls}-split-horizontal`]: { borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` },
76
+ [`&${token.antCls}-card&-ghost`]: {
77
+ boxShadow: "none",
78
+ backgroundColor: "transparent",
79
+ [`& > ${token.antCls}-card-body`]: {
80
+ paddingBlock: 0,
81
+ paddingInline: 0,
82
+ borderRadius: 0
83
+ }
84
+ },
85
+ "&-disabled": {
86
+ backgroundColor: token.colorBgContainerDisabled,
87
+ borderColor: token.colorBorder,
88
+ color: token.colorTextDisabled,
89
+ cursor: "not-allowed"
41
90
  }
42
91
  },
43
- "&-disabled": {
44
- backgroundColor: token.colorBgContainerDisabled,
45
- borderColor: token.colorBorder,
46
- color: token.colorTextDisabled,
47
- cursor: "not-allowed"
92
+ [`${componentCls}-col`]: {
93
+ position: "relative",
94
+ boxSizing: "border-box",
95
+ width: "100%",
96
+ minHeight: 1
48
97
  }
49
- } };
98
+ };
50
99
  };
51
100
  function genLoopGridColumnsStyle(token, sizeCls) {
52
101
  const { componentCls, gridColumns } = token;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antdv-next1/pro-card",
3
3
  "type": "module",
4
- "version": "2.0.10",
4
+ "version": "2.0.12",
5
5
  "description": "@antdv-next1/pro-card",
6
6
  "repository": {
7
7
  "type": "git",
@@ -48,8 +48,8 @@
48
48
  "vue": ">=3.5.30"
49
49
  },
50
50
  "dependencies": {
51
- "@antdv-next1/pro-provider": "1.0.7",
52
- "@antdv-next1/pro-utils": "1.0.13"
51
+ "@antdv-next1/pro-provider": "1.0.8",
52
+ "@antdv-next1/pro-utils": "1.0.14"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"