@rescui/card 0.7.7 → 0.8.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/lib/card.d.ts +1 -0
- package/lib/card.js +23 -1
- package/lib/card.p.module.css.js +21 -21
- package/lib/index.css +84 -84
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -2
- package/package.json +5 -6
- package/lib/hooks.d.ts +0 -2
- package/lib/hooks.js +0 -26
package/lib/card.d.ts
CHANGED
|
@@ -51,3 +51,4 @@ export declare type CardImgType = {
|
|
|
51
51
|
};
|
|
52
52
|
export declare const cardCn: ({ isClickable, theme, mode, paddings, borderRadius, hasGlowHover, disableBorder }?: CardProps) => string;
|
|
53
53
|
export declare const cardImageCn: ({ cardImageType, disableFixedHeight, disableFullWidth }: CardImgType) => string;
|
|
54
|
+
export declare const useCardCn: () => (cardCnOptions?: CardProps) => string;
|
package/lib/card.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import "core-js/modules/es.object.to-string.js";
|
|
2
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
4
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
6
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
7
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
1
8
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
|
|
2
14
|
import cn from 'classnames';
|
|
15
|
+
import { useTheme } from '@rescui/ui-contexts';
|
|
3
16
|
import styles from './card.p.module.css.js';
|
|
4
17
|
var THEME_STYLES = {
|
|
5
18
|
light: styles.themeLight,
|
|
@@ -55,4 +68,13 @@ var cardImageCn = function cardImageCn(_ref2) {
|
|
|
55
68
|
return cn(styles.cardImage, cardImgExtraStyles, !disableFixedHeight && styles.fixedImageHeight, !disableFullWidth && styles.fullImageWidth);
|
|
56
69
|
};
|
|
57
70
|
|
|
58
|
-
|
|
71
|
+
var useCardCn = function useCardCn() {
|
|
72
|
+
var theme = useTheme();
|
|
73
|
+
return function (cardCnOptions) {
|
|
74
|
+
return cardCn(_objectSpread({
|
|
75
|
+
theme: theme
|
|
76
|
+
}, cardCnOptions));
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { cardCn, cardImageCn, useCardCn };
|
package/lib/card.p.module.css.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"card": "
|
|
3
|
-
"themeLight": "
|
|
4
|
-
"withStaticBorder": "
|
|
5
|
-
"themeDark": "
|
|
6
|
-
"cardPlain": "
|
|
7
|
-
"modeClassic": "
|
|
8
|
-
"modeRock": "
|
|
9
|
-
"paddings16": "
|
|
10
|
-
"paddings24": "
|
|
11
|
-
"paddings32": "
|
|
12
|
-
"withStatesBorder": "
|
|
13
|
-
"glowHover": "
|
|
14
|
-
"bordersRadius0": "
|
|
15
|
-
"bordersRadius8": "
|
|
16
|
-
"bordersRadius16": "
|
|
17
|
-
"bordersRadius24": "
|
|
18
|
-
"cardImage": "
|
|
19
|
-
"cardImageImg": "
|
|
20
|
-
"cardImageDiv": "
|
|
21
|
-
"fixedImageHeight": "
|
|
22
|
-
"fullImageWidth": "
|
|
2
|
+
"card": "_card_14oel9q_6",
|
|
3
|
+
"themeLight": "_themeLight_14oel9q_40",
|
|
4
|
+
"withStaticBorder": "_withStaticBorder_14oel9q_43",
|
|
5
|
+
"themeDark": "_themeDark_14oel9q_49",
|
|
6
|
+
"cardPlain": "_cardPlain_14oel9q_59",
|
|
7
|
+
"modeClassic": "_modeClassic_14oel9q_59",
|
|
8
|
+
"modeRock": "_modeRock_14oel9q_60",
|
|
9
|
+
"paddings16": "_paddings16_14oel9q_197",
|
|
10
|
+
"paddings24": "_paddings24_14oel9q_201",
|
|
11
|
+
"paddings32": "_paddings32_14oel9q_205",
|
|
12
|
+
"withStatesBorder": "_withStatesBorder_14oel9q_81",
|
|
13
|
+
"glowHover": "_glowHover_14oel9q_120",
|
|
14
|
+
"bordersRadius0": "_bordersRadius0_14oel9q_209",
|
|
15
|
+
"bordersRadius8": "_bordersRadius8_14oel9q_213",
|
|
16
|
+
"bordersRadius16": "_bordersRadius16_14oel9q_217",
|
|
17
|
+
"bordersRadius24": "_bordersRadius24_14oel9q_221",
|
|
18
|
+
"cardImage": "_cardImage_14oel9q_225",
|
|
19
|
+
"cardImageImg": "_cardImageImg_14oel9q_233",
|
|
20
|
+
"cardImageDiv": "_cardImageDiv_14oel9q_266",
|
|
21
|
+
"fixedImageHeight": "_fixedImageHeight_14oel9q_301",
|
|
22
|
+
"fullImageWidth": "_fullImageWidth_14oel9q_318"
|
|
23
23
|
};
|
|
24
24
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._card_14oel9q_6{
|
|
2
2
|
overflow:hidden;
|
|
3
3
|
-webkit-appearance:none;
|
|
4
4
|
-moz-appearance:none;
|
|
@@ -22,28 +22,28 @@
|
|
|
22
22
|
transition:color 100ms, background-color 100ms, border-color 100ms;
|
|
23
23
|
-webkit-mask-image:-webkit-radial-gradient(white, black);
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
._card_14oel9q_6:focus-visible{
|
|
26
26
|
outline:none;
|
|
27
27
|
}
|
|
28
|
-
a.
|
|
28
|
+
a._card_14oel9q_6{
|
|
29
29
|
display:block;
|
|
30
30
|
|
|
31
31
|
text-decoration:none;
|
|
32
32
|
}
|
|
33
|
-
a.
|
|
33
|
+
a._card_14oel9q_6:hover{
|
|
34
34
|
text-decoration:none;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
._themeLight_14oel9q_40{
|
|
37
37
|
border-color:transparent;
|
|
38
38
|
border-color:var(--rs-card-border-color, transparent);
|
|
39
39
|
background-color:#FFFFFF;
|
|
40
40
|
background-color:var(--rs-card-background-color, #FFFFFF);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
._themeLight_14oel9q_40._withStaticBorder_14oel9q_43{
|
|
43
43
|
border-color:rgba(25,25,28,0.2);
|
|
44
44
|
border-color:var(--rs-card-border-color, rgba(25,25,28,0.2));
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
._themeDark_14oel9q_49{
|
|
47
47
|
border-color:transparent;
|
|
48
48
|
border-color:var(--rs-card-border-color, transparent);
|
|
49
49
|
|
|
@@ -51,45 +51,45 @@ a._card_hs8wlr_6:hover{
|
|
|
51
51
|
|
|
52
52
|
background-color:var(--rs-card-background-color, #303033);
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
._themeDark_14oel9q_49._withStaticBorder_14oel9q_43{
|
|
55
55
|
border-color:rgba(255,255,255,0.2);
|
|
56
56
|
border-color:var(--rs-card-border-color, rgba(255,255,255,0.2));
|
|
57
57
|
}
|
|
58
|
-
.
|
|
59
|
-
.
|
|
58
|
+
._cardPlain_14oel9q_59._modeClassic_14oel9q_59,
|
|
59
|
+
._cardPlain_14oel9q_59._modeRock_14oel9q_60{
|
|
60
60
|
cursor:auto;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeLight_14oel9q_40:active, ._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeDark_14oel9q_49:active, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeLight_14oel9q_40:active, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeDark_14oel9q_49:active{
|
|
63
63
|
border-width:1px;
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeLight_14oel9q_40:active._paddings16_14oel9q_197, ._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeDark_14oel9q_49:active._paddings16_14oel9q_197, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeLight_14oel9q_40:active._paddings16_14oel9q_197, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeDark_14oel9q_49:active._paddings16_14oel9q_197{
|
|
66
66
|
padding:16px;
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeLight_14oel9q_40:active._paddings24_14oel9q_201, ._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeDark_14oel9q_49:active._paddings24_14oel9q_201, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeLight_14oel9q_40:active._paddings24_14oel9q_201, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeDark_14oel9q_49:active._paddings24_14oel9q_201{
|
|
69
69
|
padding:24px;
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeLight_14oel9q_40:active._paddings32_14oel9q_205, ._cardPlain_14oel9q_59._modeClassic_14oel9q_59._themeDark_14oel9q_49:active._paddings32_14oel9q_205, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeLight_14oel9q_40:active._paddings32_14oel9q_205, ._cardPlain_14oel9q_59._modeRock_14oel9q_60._themeDark_14oel9q_49:active._paddings32_14oel9q_205{
|
|
72
72
|
padding:32px;
|
|
73
73
|
}
|
|
74
|
-
.
|
|
74
|
+
._cardPlain_14oel9q_59._withStaticBorder_14oel9q_43._themeLight_14oel9q_40{
|
|
75
75
|
--rs-card-border-color:rgba(25,25,28,0.2);
|
|
76
76
|
}
|
|
77
|
-
.
|
|
77
|
+
._cardPlain_14oel9q_59._withStaticBorder_14oel9q_43._themeDark_14oel9q_49{
|
|
78
78
|
--rs-card-border-color:rgba(255,255,255,0.2);
|
|
79
79
|
}
|
|
80
|
-
.
|
|
81
|
-
.
|
|
82
|
-
.
|
|
83
|
-
.
|
|
80
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:hover,
|
|
81
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:focus[data-focus-method='key'],
|
|
82
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:focus-visible,
|
|
83
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:active{
|
|
84
84
|
--rs-card-border-color:rgba(25,25,28,0.2);
|
|
85
85
|
}
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
.
|
|
86
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:hover,
|
|
87
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:focus[data-focus-method='key'],
|
|
88
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:focus-visible,
|
|
89
|
+
._cardPlain_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:active{
|
|
90
90
|
--rs-card-border-color:rgba(255,255,255,0.2);
|
|
91
91
|
}
|
|
92
|
-
.
|
|
92
|
+
._modeClassic_14oel9q_59._themeDark_14oel9q_49{
|
|
93
93
|
--rs-typography-color-hard:#FFFFFF;
|
|
94
94
|
--rs-typography-color-average:rgba(255,255,255,0.7);
|
|
95
95
|
--rs-typography-color-pale:rgba(255,255,255,0.5);
|
|
@@ -103,45 +103,45 @@ a._card_hs8wlr_6:hover{
|
|
|
103
103
|
--rs-rock-button-disabled-text-color:rgba(255,255,255,0.5);
|
|
104
104
|
--rs-rock-button-disabled-bg-color:rgba(255,255,255,0.2);
|
|
105
105
|
}
|
|
106
|
-
.
|
|
107
|
-
.
|
|
108
|
-
.
|
|
109
|
-
.
|
|
106
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:hover,
|
|
107
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:focus[data-focus-method='key'],
|
|
108
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:focus-visible,
|
|
109
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40:active{
|
|
110
110
|
--rs-card-border-color:#19191C;
|
|
111
111
|
}
|
|
112
|
-
.
|
|
113
|
-
.
|
|
114
|
-
.
|
|
115
|
-
.
|
|
112
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40._glowHover_14oel9q_120:hover,
|
|
113
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40._glowHover_14oel9q_120:focus[data-focus-method='key'],
|
|
114
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40._glowHover_14oel9q_120:focus-visible,
|
|
115
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeLight_14oel9q_40._glowHover_14oel9q_120:active{
|
|
116
116
|
--rs-card-border-color:rgba(25,25,28,0.2);
|
|
117
117
|
}
|
|
118
|
-
.
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.
|
|
118
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:hover,
|
|
119
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:focus[data-focus-method='key'],
|
|
120
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:focus-visible,
|
|
121
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49:active{
|
|
122
122
|
--rs-card-border-color:#FFFFFF;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
125
|
-
.
|
|
126
|
-
.
|
|
127
|
-
.
|
|
124
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49._glowHover_14oel9q_120:hover,
|
|
125
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49._glowHover_14oel9q_120:focus[data-focus-method='key'],
|
|
126
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49._glowHover_14oel9q_120:focus-visible,
|
|
127
|
+
._modeClassic_14oel9q_59._withStatesBorder_14oel9q_81._themeDark_14oel9q_49._glowHover_14oel9q_120:active{
|
|
128
128
|
--rs-card-border-color:rgba(255,255,255,0.2);
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
._modeClassic_14oel9q_59:active{
|
|
131
131
|
border-width:2px;
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
._modeClassic_14oel9q_59:active._paddings16_14oel9q_197{
|
|
134
134
|
padding:15px;
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
._modeClassic_14oel9q_59:active._paddings24_14oel9q_201{
|
|
137
137
|
padding:23px;
|
|
138
138
|
}
|
|
139
|
-
.
|
|
139
|
+
._modeClassic_14oel9q_59:active._paddings32_14oel9q_205{
|
|
140
140
|
padding:31px;
|
|
141
141
|
}
|
|
142
|
-
.
|
|
143
|
-
.
|
|
144
|
-
.
|
|
142
|
+
._modeRock_14oel9q_60._themeLight_14oel9q_40:hover,
|
|
143
|
+
._modeRock_14oel9q_60._themeLight_14oel9q_40:focus[data-focus-method='key'],
|
|
144
|
+
._modeRock_14oel9q_60._themeLight_14oel9q_40:focus-visible{
|
|
145
145
|
--rs-card-background-color:#19191C;
|
|
146
146
|
--rs-typography-color-hard:#FFFFFF;
|
|
147
147
|
--rs-typography-color-average:rgba(255,255,255,0.7);
|
|
@@ -156,10 +156,10 @@ a._card_hs8wlr_6:hover{
|
|
|
156
156
|
--rs-rock-button-disabled-text-color:rgba(255,255,255,0.5);
|
|
157
157
|
--rs-rock-button-disabled-bg-color:rgba(255,255,255,0.2);
|
|
158
158
|
}
|
|
159
|
-
.
|
|
159
|
+
._modeRock_14oel9q_60._themeLight_14oel9q_40:hover._withStatesBorder_14oel9q_81, ._modeRock_14oel9q_60._themeLight_14oel9q_40:focus[data-focus-method='key']._withStatesBorder_14oel9q_81, ._modeRock_14oel9q_60._themeLight_14oel9q_40:focus-visible._withStatesBorder_14oel9q_81{
|
|
160
160
|
--rs-card-border-color:rgba(25,25,28,0.2);
|
|
161
161
|
}
|
|
162
|
-
.
|
|
162
|
+
._modeRock_14oel9q_60._themeLight_14oel9q_40:active{
|
|
163
163
|
background-color:#303033;
|
|
164
164
|
--rs-typography-color-hard:#FFFFFF;
|
|
165
165
|
--rs-typography-color-average:rgba(255,255,255,0.7);
|
|
@@ -174,7 +174,7 @@ a._card_hs8wlr_6:hover{
|
|
|
174
174
|
--rs-rock-button-disabled-text-color:rgba(255,255,255,0.5);
|
|
175
175
|
--rs-rock-button-disabled-bg-color:rgba(255,255,255,0.2);
|
|
176
176
|
}
|
|
177
|
-
.
|
|
177
|
+
._modeRock_14oel9q_60._themeDark_14oel9q_49{
|
|
178
178
|
--rs-typography-color-hard:#FFFFFF;
|
|
179
179
|
--rs-typography-color-average:rgba(255,255,255,0.7);
|
|
180
180
|
--rs-typography-color-pale:rgba(255,255,255,0.5);
|
|
@@ -188,9 +188,9 @@ a._card_hs8wlr_6:hover{
|
|
|
188
188
|
--rs-rock-button-disabled-text-color:rgba(255,255,255,0.5);
|
|
189
189
|
--rs-rock-button-disabled-bg-color:rgba(255,255,255,0.2);
|
|
190
190
|
}
|
|
191
|
-
.
|
|
192
|
-
.
|
|
193
|
-
.
|
|
191
|
+
._modeRock_14oel9q_60._themeDark_14oel9q_49:hover,
|
|
192
|
+
._modeRock_14oel9q_60._themeDark_14oel9q_49:focus[data-focus-method='key'],
|
|
193
|
+
._modeRock_14oel9q_60._themeDark_14oel9q_49:focus-visible{
|
|
194
194
|
--rs-card-background-color:#FFFFFF;
|
|
195
195
|
--rs-typography-color-hard:#19191C;
|
|
196
196
|
--rs-typography-color-average:rgba(25,25,28,0.7);
|
|
@@ -205,7 +205,7 @@ a._card_hs8wlr_6:hover{
|
|
|
205
205
|
--rs-rock-button-disabled-text-color:rgba(25,25,28,0.5);
|
|
206
206
|
--rs-rock-button-disabled-bg-color:rgba(25,25,28,0.2);
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
._modeRock_14oel9q_60._themeDark_14oel9q_49:active{
|
|
209
209
|
--rs-card-background-color:#F4F4F4;
|
|
210
210
|
--rs-typography-color-hard:#19191C;
|
|
211
211
|
--rs-typography-color-average:rgba(25,25,28,0.7);
|
|
@@ -220,28 +220,28 @@ a._card_hs8wlr_6:hover{
|
|
|
220
220
|
--rs-rock-button-disabled-text-color:rgba(25,25,28,0.5);
|
|
221
221
|
--rs-rock-button-disabled-bg-color:rgba(25,25,28,0.2);
|
|
222
222
|
}
|
|
223
|
-
.
|
|
223
|
+
._paddings16_14oel9q_197{
|
|
224
224
|
padding:16px;
|
|
225
225
|
}
|
|
226
|
-
.
|
|
226
|
+
._paddings24_14oel9q_201{
|
|
227
227
|
padding:24px;
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
._paddings32_14oel9q_205{
|
|
230
230
|
padding:32px;
|
|
231
231
|
}
|
|
232
|
-
.
|
|
232
|
+
._bordersRadius0_14oel9q_209{
|
|
233
233
|
--rs-card-border-radius:0;
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
._bordersRadius8_14oel9q_213{
|
|
236
236
|
--rs-card-border-radius:8px;
|
|
237
237
|
}
|
|
238
|
-
.
|
|
238
|
+
._bordersRadius16_14oel9q_217{
|
|
239
239
|
--rs-card-border-radius:16px;
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
._bordersRadius24_14oel9q_221{
|
|
242
242
|
--rs-card-border-radius:24px;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
._cardImage_14oel9q_225{
|
|
245
245
|
position:relative;
|
|
246
246
|
|
|
247
247
|
overflow:hidden;
|
|
@@ -250,7 +250,7 @@ a._card_hs8wlr_6:hover{
|
|
|
250
250
|
|
|
251
251
|
box-sizing:border-box;
|
|
252
252
|
}
|
|
253
|
-
.
|
|
253
|
+
._cardImageImg_14oel9q_233{
|
|
254
254
|
display:-webkit-box;
|
|
255
255
|
display:-ms-flexbox;
|
|
256
256
|
display:flex;
|
|
@@ -261,22 +261,22 @@ a._card_hs8wlr_6:hover{
|
|
|
261
261
|
-ms-flex-align:center;
|
|
262
262
|
align-items:center;
|
|
263
263
|
}
|
|
264
|
-
.
|
|
264
|
+
._paddings16_14oel9q_197 ._cardImageImg_14oel9q_233{
|
|
265
265
|
top:-16px;
|
|
266
266
|
left:-16px;
|
|
267
267
|
width:calc(100% + 32px);
|
|
268
268
|
}
|
|
269
|
-
.
|
|
269
|
+
._paddings24_14oel9q_201 ._cardImageImg_14oel9q_233{
|
|
270
270
|
top:-24px;
|
|
271
271
|
left:-24px;
|
|
272
272
|
width:calc(100% + 48px);
|
|
273
273
|
}
|
|
274
|
-
.
|
|
274
|
+
._paddings32_14oel9q_205 ._cardImageImg_14oel9q_233{
|
|
275
275
|
top:-32px;
|
|
276
276
|
left:-32px;
|
|
277
277
|
width:calc(100% + 64px);
|
|
278
278
|
}
|
|
279
|
-
.
|
|
279
|
+
._cardImageImg_14oel9q_233 img{
|
|
280
280
|
max-height:100%;
|
|
281
281
|
max-width:100%;
|
|
282
282
|
-webkit-transition:-webkit-transform .2s;
|
|
@@ -286,15 +286,15 @@ a._card_hs8wlr_6:hover{
|
|
|
286
286
|
-webkit-transform:scale(1);
|
|
287
287
|
transform:scale(1);
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
._card_14oel9q_6:hover ._cardImageImg_14oel9q_233 img{
|
|
290
290
|
-webkit-transform:scale(1.1);
|
|
291
291
|
transform:scale(1.1);
|
|
292
292
|
}
|
|
293
|
-
.
|
|
293
|
+
._card_14oel9q_6._cardPlain_14oel9q_59:hover ._cardImageImg_14oel9q_233 img{
|
|
294
294
|
-webkit-transform:none;
|
|
295
295
|
transform:none;
|
|
296
296
|
}
|
|
297
|
-
.
|
|
297
|
+
._cardImageDiv_14oel9q_266{
|
|
298
298
|
display:-webkit-box;
|
|
299
299
|
display:-ms-flexbox;
|
|
300
300
|
display:flex;
|
|
@@ -316,55 +316,55 @@ a._card_hs8wlr_6:hover{
|
|
|
316
316
|
|
|
317
317
|
transition:background-size .2s;
|
|
318
318
|
}
|
|
319
|
-
.
|
|
319
|
+
._paddings16_14oel9q_197 ._cardImageDiv_14oel9q_266{
|
|
320
320
|
top:-16px;
|
|
321
321
|
left:-16px;
|
|
322
322
|
padding:16px;
|
|
323
323
|
width:calc(100% + 32px);
|
|
324
324
|
}
|
|
325
|
-
.
|
|
325
|
+
._card_14oel9q_6:active ._paddings16_14oel9q_197 ._cardImageDiv_14oel9q_266{
|
|
326
326
|
padding:calc(16px - 1);
|
|
327
327
|
}
|
|
328
|
-
.
|
|
328
|
+
._paddings24_14oel9q_201 ._cardImageDiv_14oel9q_266{
|
|
329
329
|
top:-24px;
|
|
330
330
|
left:-24px;
|
|
331
331
|
padding:24px;
|
|
332
332
|
width:calc(100% + 48px);
|
|
333
333
|
}
|
|
334
|
-
.
|
|
334
|
+
._card_14oel9q_6:active ._paddings24_14oel9q_201 ._cardImageDiv_14oel9q_266{
|
|
335
335
|
padding:calc(24px - 1);
|
|
336
336
|
}
|
|
337
|
-
.
|
|
337
|
+
._paddings32_14oel9q_205 ._cardImageDiv_14oel9q_266{
|
|
338
338
|
top:-32px;
|
|
339
339
|
left:-32px;
|
|
340
340
|
padding:32px;
|
|
341
341
|
width:calc(100% + 64px);
|
|
342
342
|
}
|
|
343
|
-
.
|
|
343
|
+
._card_14oel9q_6:active ._paddings32_14oel9q_205 ._cardImageDiv_14oel9q_266{
|
|
344
344
|
padding:calc(32px - 1);
|
|
345
345
|
}
|
|
346
|
-
.
|
|
346
|
+
._card_14oel9q_6:hover ._cardImageDiv_14oel9q_266{
|
|
347
347
|
background-size:110% 110%;
|
|
348
348
|
}
|
|
349
|
-
.
|
|
349
|
+
._card_14oel9q_6._cardPlain_14oel9q_59:hover ._cardImageDiv_14oel9q_266{
|
|
350
350
|
background-size:100% 100%;
|
|
351
351
|
}
|
|
352
|
-
.
|
|
352
|
+
._fixedImageHeight_14oel9q_301 img{
|
|
353
353
|
height:100%;
|
|
354
354
|
}
|
|
355
|
-
.
|
|
355
|
+
._paddings16_14oel9q_197 ._fixedImageHeight_14oel9q_301{
|
|
356
356
|
height:204px;
|
|
357
357
|
max-height:204px;
|
|
358
358
|
}
|
|
359
|
-
.
|
|
359
|
+
._paddings24_14oel9q_201 ._fixedImageHeight_14oel9q_301{
|
|
360
360
|
height:212px;
|
|
361
361
|
max-height:212px;
|
|
362
362
|
}
|
|
363
|
-
.
|
|
363
|
+
._paddings32_14oel9q_205 ._fixedImageHeight_14oel9q_301{
|
|
364
364
|
height:220px;
|
|
365
365
|
max-height:220px;
|
|
366
366
|
}
|
|
367
|
-
.
|
|
367
|
+
._fullImageWidth_14oel9q_318 img{
|
|
368
368
|
width:100%;
|
|
369
369
|
}
|
|
370
370
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { cardCn, cardImageCn } from './card';
|
|
2
|
-
export {
|
|
1
|
+
export { cardCn, cardImageCn, useCardCn } from './card';
|
|
2
|
+
export type { CardProps, CardImgType } from './card';
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/card",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.ts",
|
|
@@ -24,15 +24,14 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@jetbrains/logos": "^1.4.16",
|
|
27
|
-
"@rescui/
|
|
28
|
-
"@rescui/colors": "^0.1.5",
|
|
27
|
+
"@rescui/colors": "^0.1.6",
|
|
29
28
|
"@rescui/postcss-preset-library": "^0.1.0",
|
|
30
|
-
"@rescui/scripts": "^0.
|
|
31
|
-
"@rescui/typography": "^0.
|
|
29
|
+
"@rescui/scripts": "^0.2.0",
|
|
30
|
+
"@rescui/typography": "^0.10.0",
|
|
32
31
|
"@rescui/visual-regression": "^0.0.4"
|
|
33
32
|
},
|
|
34
33
|
"scripts": {
|
|
35
34
|
"build": "rescui-scripts build"
|
|
36
35
|
},
|
|
37
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c87adfdebe07392a0aa67ce434ce465762d8fa95"
|
|
38
37
|
}
|
package/lib/hooks.d.ts
DELETED
package/lib/hooks.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
|
2
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
4
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
6
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
7
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
8
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
|
-
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
|
-
import { useTheme } from '@rescui/ui-contexts';
|
|
15
|
-
import { cardCn } from './card.js';
|
|
16
|
-
|
|
17
|
-
var useCardCn = function useCardCn() {
|
|
18
|
-
var theme = useTheme();
|
|
19
|
-
return function (cardCnOptions) {
|
|
20
|
-
return cardCn(_objectSpread({
|
|
21
|
-
theme: theme
|
|
22
|
-
}, cardCnOptions));
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { useCardCn };
|