@antdv-next1/pro-card 2.0.15 → 2.0.17

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.
@@ -1,7 +1,6 @@
1
- import { ComputedRef } from "vue";
2
- import * as _$_antdv_next1_pro_provider0 from "@antdv-next1/pro-provider";
1
+ import * as _$vue from "vue";
3
2
 
4
3
  //#region src/style/index.d.ts
5
- declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
4
+ declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
6
5
  //#endregion
7
- export { useStyle as default };
6
+ export { _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/style/index.ts
3
4
  const genProCardStyle = (token) => {
4
5
  const { componentCls } = token;
@@ -10,18 +11,18 @@ const genProCardStyle = (token) => {
10
11
  borderColor: token.colorBorderSecondary,
11
12
  backgroundColor: "transparent",
12
13
  [`&: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` } } } }
14
+ [`${token.antCls}-collapse-item`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${unit(token.padding)} !important` } },
15
+ [`${token.antCls}-collapse-item`]: { "&-active": { [`${token.antCls}-collapse-panel`]: { [`${token.antCls}-collapse-body`]: { paddingBlockStart: `${unit(token.paddingLG)} !important` } } } }
15
16
  },
16
- [`&${componentCls}-split`]: { [`${token.antCls}-collapse-item:not(${token.antCls}-collapse-item-active)`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${token.padding}px !important` } } },
17
+ [`&${componentCls}-split:not(${token.antCls}-collapse-small)`]: { [`${token.antCls}-collapse-item:not(${token.antCls}-collapse-item-active)`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${unit(token.padding)} !important` } } },
17
18
  [`&${token.antCls}-collapse-borderless`]: { [`${token.antCls}-collapse-item`]: { [`${token.antCls}-collapse-panel`]: { [`${token.antCls}-collapse-body`]: { paddingBlockStart: token.paddingSM } } } },
18
19
  [`&${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}` }
20
+ [`&:not(${token.antCls}-collapse-small)`]: { [`${token.antCls}-collapse-header`]: { paddingBlockEnd: `${unit(token.padding)} !important` } },
21
+ [`${token.antCls}-collapse-panel`]: { borderBlockStart: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}` }
21
22
  },
22
- [`&${componentCls}-headerBordered`]: { borderBlockStart: `${token.lineWidth}px ${token.lineType} ${token.colorBorderSecondary}` },
23
+ [`&${componentCls}-headerBordered`]: { borderBlockStart: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}` },
23
24
  [`${token.antCls}-collapse-panel`]: {
24
- borderBlockStart: `0px ${token.lineType} ${token.colorBorderSecondary}`,
25
+ borderBlockStart: `${unit(0)} ${token.lineType} ${token.colorBorderSecondary}`,
25
26
  boxSizing: "border-box",
26
27
  borderBottomLeftRadius: token.borderRadius,
27
28
  borderBottomRightRadius: token.borderRadius,
@@ -31,7 +32,7 @@ const genProCardStyle = (token) => {
31
32
  [`${componentCls}-header`]: { borderRadius: 0 },
32
33
  [`${token.antCls}-collapse-content`]: { "&-box": { padding: token.paddingLG } }
33
34
  } },
34
- [`${token.antCls}-collapse-item`]: {
35
+ [`&:not(${token.antCls}-collapse-small) ${token.antCls}-collapse-item`]: {
35
36
  borderBlockEnd: 0,
36
37
  boxSizing: "border-box",
37
38
  "&-active": { [`${token.antCls}-collapse-header`]: {
@@ -71,8 +72,8 @@ const genProCardStyle = (token) => {
71
72
  display: "flex",
72
73
  flexDirection: "column"
73
74
  },
74
- [`${componentCls}-split-vertical`]: { borderInlineEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` },
75
- [`${componentCls}-split-horizontal`]: { borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` },
75
+ [`${componentCls}-split-vertical`]: { borderInlineEnd: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}` },
76
+ [`${componentCls}-split-horizontal`]: { borderBlockEnd: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}` },
76
77
  [`&${token.antCls}-card&-ghost`]: {
77
78
  boxShadow: "none",
78
79
  backgroundColor: "transparent",
@@ -126,31 +127,25 @@ const genGridStyle = (token, sizeCls) => genLoopGridColumnsStyle(token, sizeCls)
126
127
  const genGridMediaStyle = (token, screenSize, sizeCls) => {
127
128
  return { [`@media (min-width: ${screenSize}px)`]: { ...genGridStyle(token, sizeCls) } };
128
129
  };
129
- function useStyle(prefixCls) {
130
- return useStyle$1("ProCard", (token) => {
131
- const proCardToken = {
132
- ...token,
133
- gridColumns: 24,
134
- componentCls: `.${prefixCls.value}`
135
- };
136
- const gridMediaSizesMap = {
137
- "-xs": proCardToken.screenXSMin,
138
- "-sm": proCardToken.screenSMMin,
139
- "-md": proCardToken.screenMDMin,
140
- "-lg": proCardToken.screenLGMin,
141
- "-xl": proCardToken.screenXLMin,
142
- "-xxl": proCardToken.screenXXLMin
143
- };
144
- return [
145
- genProCardStyle(proCardToken),
146
- genGridStyle(proCardToken, ""),
147
- genGridStyle(proCardToken, "-xs"),
148
- Object.keys(gridMediaSizesMap).map((key) => genGridMediaStyle(proCardToken, gridMediaSizesMap[key], key)).reduce((pre, cur) => ({
149
- ...pre,
150
- ...cur
151
- }), {})
152
- ];
153
- });
154
- }
130
+ var style_default = useStyle("ProCard", (token) => {
131
+ const proCardToken = mergeToken(token, { gridColumns: 24 });
132
+ const gridMediaSizesMap = {
133
+ "-xs": proCardToken.screenXSMin,
134
+ "-sm": proCardToken.screenSMMin,
135
+ "-md": proCardToken.screenMDMin,
136
+ "-lg": proCardToken.screenLGMin,
137
+ "-xl": proCardToken.screenXLMin,
138
+ "-xxl": proCardToken.screenXXLMin
139
+ };
140
+ return [
141
+ genProCardStyle(proCardToken),
142
+ genGridStyle(proCardToken, ""),
143
+ genGridStyle(proCardToken, "-xs"),
144
+ Object.keys(gridMediaSizesMap).map((key) => genGridMediaStyle(proCardToken, gridMediaSizesMap[key], key)).reduce((pre, cur) => ({
145
+ ...pre,
146
+ ...cur
147
+ }), {})
148
+ ];
149
+ });
155
150
  //#endregion
156
- export { useStyle as default };
151
+ export { style_default as default };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@antdv-next1/pro-card",
3
3
  "type": "module",
4
- "version": "2.0.15",
4
+ "version": "2.0.17",
5
5
  "description": "@antdv-next1/pro-card",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/archiesong/pro-components.git",
8
+ "url": "git+https://github.com/lucasjeke/pro-components.git",
9
9
  "directory": "packages/card"
10
10
  },
11
11
  "sideEffects": [
@@ -48,8 +48,8 @@
48
48
  "vue": ">=3.5.30"
49
49
  },
50
50
  "dependencies": {
51
- "@antdv-next1/pro-provider": "1.0.9",
52
- "@antdv-next1/pro-utils": "1.0.17"
51
+ "@antdv-next1/pro-utils": "1.0.19",
52
+ "@antdv-next1/pro-provider": "1.0.11"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"