@rescui/card 0.11.6 → 0.11.7-RUI-247-Make-packets-react-19-ready-c06b3c96.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.
- package/lib/card.d.ts +0 -1
- package/lib/card.js +1 -10
- package/lib/card.p.module.css.js +21 -21
- package/lib/index.css +50 -50
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/use-card-cn.d.ts +2 -0
- package/lib/use-card-cn.js +13 -0
- package/package.json +9 -9
package/lib/card.d.ts
CHANGED
|
@@ -51,4 +51,3 @@ 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,4 @@
|
|
|
1
1
|
import cn from 'classnames';
|
|
2
|
-
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
3
2
|
import styles from './card.p.module.css.js';
|
|
4
3
|
const THEME_STYLES = {
|
|
5
4
|
light: styles.themeLight,
|
|
@@ -58,12 +57,4 @@ const cardImageCn = _ref => {
|
|
|
58
57
|
return cn(styles.cardImage, cardImgExtraStyles, !disableFixedHeight && styles.fixedImageHeight, !disableFullWidth && styles.fullImageWidth);
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
const theme = useThemeWithUndefined();
|
|
63
|
-
return cardCnOptions => cardCn({
|
|
64
|
-
theme,
|
|
65
|
-
...cardCnOptions
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export { cardCn, cardImageCn, useCardCn };
|
|
60
|
+
export { cardCn, cardImageCn };
|
package/lib/card.p.module.css.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"card": "
|
|
3
|
-
"themeLight": "
|
|
4
|
-
"themeDark": "
|
|
5
|
-
"withStaticBorder": "
|
|
6
|
-
"cardPlain": "
|
|
7
|
-
"modeClassic": "
|
|
8
|
-
"modeRock": "
|
|
9
|
-
"withStatesBorder": "
|
|
10
|
-
"paddings16": "
|
|
11
|
-
"paddings24": "
|
|
12
|
-
"paddings32": "
|
|
13
|
-
"glowHover": "
|
|
14
|
-
"bordersRadius0": "
|
|
15
|
-
"bordersRadius8": "
|
|
16
|
-
"bordersRadius16": "
|
|
17
|
-
"bordersRadius24": "
|
|
18
|
-
"cardImage": "
|
|
19
|
-
"cardImageImg": "
|
|
20
|
-
"cardImageDiv": "
|
|
21
|
-
"fixedImageHeight": "
|
|
22
|
-
"fullImageWidth": "
|
|
2
|
+
"card": "_card_3qmsjw_6",
|
|
3
|
+
"themeLight": "_themeLight_3qmsjw_50",
|
|
4
|
+
"themeDark": "_themeDark_3qmsjw_54",
|
|
5
|
+
"withStaticBorder": "_withStaticBorder_3qmsjw_58",
|
|
6
|
+
"cardPlain": "_cardPlain_3qmsjw_62",
|
|
7
|
+
"modeClassic": "_modeClassic_3qmsjw_62",
|
|
8
|
+
"modeRock": "_modeRock_3qmsjw_63",
|
|
9
|
+
"withStatesBorder": "_withStatesBorder_3qmsjw_67",
|
|
10
|
+
"paddings16": "_paddings16_3qmsjw_96",
|
|
11
|
+
"paddings24": "_paddings24_3qmsjw_100",
|
|
12
|
+
"paddings32": "_paddings32_3qmsjw_104",
|
|
13
|
+
"glowHover": "_glowHover_3qmsjw_72",
|
|
14
|
+
"bordersRadius0": "_bordersRadius0_3qmsjw_108",
|
|
15
|
+
"bordersRadius8": "_bordersRadius8_3qmsjw_112",
|
|
16
|
+
"bordersRadius16": "_bordersRadius16_3qmsjw_116",
|
|
17
|
+
"bordersRadius24": "_bordersRadius24_3qmsjw_120",
|
|
18
|
+
"cardImage": "_cardImage_3qmsjw_124",
|
|
19
|
+
"cardImageImg": "_cardImageImg_3qmsjw_132",
|
|
20
|
+
"cardImageDiv": "_cardImageDiv_3qmsjw_166",
|
|
21
|
+
"fixedImageHeight": "_fixedImageHeight_3qmsjw_199",
|
|
22
|
+
"fullImageWidth": "_fullImageWidth_3qmsjw_217"
|
|
23
23
|
};
|
|
24
24
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._card_3qmsjw_6{
|
|
2
2
|
--_rs-theme-dark:var(
|
|
3
3
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
4
4
|
var(--rs-theme-dark, 0)
|
|
@@ -32,120 +32,120 @@
|
|
|
32
32
|
appearance:none;
|
|
33
33
|
-webkit-mask-image:-webkit-radial-gradient(white, black);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
._card_3qmsjw_6:focus-visible{
|
|
36
36
|
outline:none;
|
|
37
37
|
}
|
|
38
|
-
a.
|
|
38
|
+
a._card_3qmsjw_6{
|
|
39
39
|
display:block;
|
|
40
40
|
|
|
41
41
|
text-decoration:none;
|
|
42
42
|
}
|
|
43
|
-
a.
|
|
43
|
+
a._card_3qmsjw_6:hover{
|
|
44
44
|
text-decoration:none;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
._themeLight_3qmsjw_50{
|
|
47
47
|
--rs-theme-dark:0;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
._themeDark_3qmsjw_54{
|
|
50
50
|
--rs-theme-dark:1;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
._withStaticBorder_3qmsjw_58{
|
|
53
53
|
border-color:var(--rs-card-border-color, rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), .2));
|
|
54
54
|
}
|
|
55
|
-
.
|
|
56
|
-
.
|
|
55
|
+
._cardPlain_3qmsjw_62._modeClassic_3qmsjw_62,
|
|
56
|
+
._cardPlain_3qmsjw_62._modeRock_3qmsjw_63{
|
|
57
57
|
cursor:auto;
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:active{
|
|
60
60
|
border-width:2px;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:active._paddings16_3qmsjw_96{
|
|
63
63
|
padding:calc(var(--rs-card-padding, 16px) - 1px);
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:active._paddings24_3qmsjw_100{
|
|
66
66
|
padding:calc(var(--rs-card-padding, 24px) - 1px);
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:active._paddings32_3qmsjw_104{
|
|
69
69
|
padding:calc(var(--rs-card-padding, 32px) - 1px);
|
|
70
70
|
}
|
|
71
|
-
.
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
.
|
|
71
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:not(._glowHover_3qmsjw_72):hover,
|
|
72
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:not(._glowHover_3qmsjw_72):focus[data-focus-method='key'],
|
|
73
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:not(._glowHover_3qmsjw_72):focus-visible,
|
|
74
|
+
._modeClassic_3qmsjw_62._withStatesBorder_3qmsjw_67:not(._glowHover_3qmsjw_72):active{
|
|
75
75
|
--rs-card-border-color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
76
76
|
}
|
|
77
|
-
.
|
|
78
|
-
.
|
|
79
|
-
.
|
|
77
|
+
._modeRock_3qmsjw_63:hover,
|
|
78
|
+
._modeRock_3qmsjw_63:focus[data-focus-method='key'],
|
|
79
|
+
._modeRock_3qmsjw_63:focus-visible{
|
|
80
80
|
--rs-theme-flip:1;
|
|
81
81
|
background-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
|
|
82
82
|
}
|
|
83
|
-
.
|
|
83
|
+
._modeRock_3qmsjw_63:active{
|
|
84
84
|
--rs-theme-flip:1;
|
|
85
85
|
background-color:rgb(calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*193));
|
|
86
86
|
}
|
|
87
|
-
.
|
|
87
|
+
._paddings16_3qmsjw_96{
|
|
88
88
|
padding:var(--rs-card-padding, 16px);
|
|
89
89
|
}
|
|
90
|
-
.
|
|
90
|
+
._paddings24_3qmsjw_100{
|
|
91
91
|
padding:var(--rs-card-padding, 24px);
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
._paddings32_3qmsjw_104{
|
|
94
94
|
padding:var(--rs-card-padding, 32px);
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
._bordersRadius0_3qmsjw_108{
|
|
97
97
|
--_rs-card-border-radius:0;
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
._bordersRadius8_3qmsjw_112{
|
|
100
100
|
--_rs-card-border-radius:8px;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
._bordersRadius16_3qmsjw_116{
|
|
103
103
|
--_rs-card-border-radius:16px;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
._bordersRadius24_3qmsjw_120{
|
|
106
106
|
--_rs-card-border-radius:24px;
|
|
107
107
|
}
|
|
108
|
-
.
|
|
108
|
+
._cardImage_3qmsjw_124{
|
|
109
109
|
position:relative;
|
|
110
110
|
|
|
111
111
|
overflow:hidden;
|
|
112
112
|
|
|
113
113
|
box-sizing:border-box;
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
._cardImageImg_3qmsjw_132{
|
|
116
116
|
display:flex;
|
|
117
117
|
justify-content:center;
|
|
118
118
|
align-items:center;
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
._paddings16_3qmsjw_96 ._cardImageImg_3qmsjw_132{
|
|
121
121
|
top:calc(var(--rs-card-padding, 16px)*-1);
|
|
122
122
|
left:calc(var(--rs-card-padding, 16px)*-1);
|
|
123
123
|
width:calc(100% + var(--rs-card-padding, 16px)*2);
|
|
124
124
|
}
|
|
125
|
-
.
|
|
125
|
+
._paddings24_3qmsjw_100 ._cardImageImg_3qmsjw_132{
|
|
126
126
|
top:calc(var(--rs-card-padding, 24px)*-1);
|
|
127
127
|
left:calc(var(--rs-card-padding, 24px)*-1);
|
|
128
128
|
width:calc(100% + var(--rs-card-padding, 24px)*2);
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
._paddings32_3qmsjw_104 ._cardImageImg_3qmsjw_132{
|
|
131
131
|
top:calc(var(--rs-card-padding, 32px)*-1);
|
|
132
132
|
left:calc(var(--rs-card-padding, 32px)*-1);
|
|
133
133
|
width:calc(100% + var(--rs-card-padding, 32px)*2);
|
|
134
134
|
}
|
|
135
|
-
.
|
|
135
|
+
._cardImageImg_3qmsjw_132 img{
|
|
136
136
|
max-width:100%;
|
|
137
137
|
max-height:100%;
|
|
138
138
|
|
|
139
139
|
transition:transform .2s;
|
|
140
140
|
transform:scale(1);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
._card_3qmsjw_6:hover ._cardImageImg_3qmsjw_132 img{
|
|
143
143
|
transform:scale(1.1);
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
._card_3qmsjw_6._cardPlain_3qmsjw_62:hover ._cardImageImg_3qmsjw_132 img{
|
|
146
146
|
transform:none;
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
._cardImageDiv_3qmsjw_166{
|
|
149
149
|
display:flex;
|
|
150
150
|
flex-direction:column;
|
|
151
151
|
justify-content:flex-end;
|
|
@@ -157,54 +157,54 @@ a._card_1ni77u1_6:hover{
|
|
|
157
157
|
|
|
158
158
|
transition:background-size .2s;
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
._paddings16_3qmsjw_96 ._cardImageDiv_3qmsjw_166{
|
|
161
161
|
top:calc(var(--rs-card-padding, 16px)*-1);
|
|
162
162
|
left:calc(var(--rs-card-padding, 16px)*-1);
|
|
163
163
|
padding:var(--rs-card-padding, 16px);
|
|
164
164
|
width:calc(100% + var(--rs-card-padding, 16px)*2);
|
|
165
165
|
}
|
|
166
|
-
.
|
|
166
|
+
._card_3qmsjw_6:active ._paddings16_3qmsjw_96 ._cardImageDiv_3qmsjw_166{
|
|
167
167
|
padding:calc(var(--rs-card-padding, 16px) - 1);
|
|
168
168
|
}
|
|
169
|
-
.
|
|
169
|
+
._paddings24_3qmsjw_100 ._cardImageDiv_3qmsjw_166{
|
|
170
170
|
top:calc(var(--rs-card-padding, 24px)*-1);
|
|
171
171
|
left:calc(var(--rs-card-padding, 24px)*-1);
|
|
172
172
|
padding:var(--rs-card-padding, 24px);
|
|
173
173
|
width:calc(100% + var(--rs-card-padding, 24px)*2);
|
|
174
174
|
}
|
|
175
|
-
.
|
|
175
|
+
._card_3qmsjw_6:active ._paddings24_3qmsjw_100 ._cardImageDiv_3qmsjw_166{
|
|
176
176
|
padding:calc(var(--rs-card-padding, 24px) - 1);
|
|
177
177
|
}
|
|
178
|
-
.
|
|
178
|
+
._paddings32_3qmsjw_104 ._cardImageDiv_3qmsjw_166{
|
|
179
179
|
top:calc(var(--rs-card-padding, 32px)*-1);
|
|
180
180
|
left:calc(var(--rs-card-padding, 32px)*-1);
|
|
181
181
|
padding:var(--rs-card-padding, 32px);
|
|
182
182
|
width:calc(100% + var(--rs-card-padding, 32px)*2);
|
|
183
183
|
}
|
|
184
|
-
.
|
|
184
|
+
._card_3qmsjw_6:active ._paddings32_3qmsjw_104 ._cardImageDiv_3qmsjw_166{
|
|
185
185
|
padding:calc(var(--rs-card-padding, 32px) - 1);
|
|
186
186
|
}
|
|
187
|
-
.
|
|
187
|
+
._card_3qmsjw_6:hover ._cardImageDiv_3qmsjw_166{
|
|
188
188
|
background-size:110% 110%;
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
._card_3qmsjw_6._cardPlain_3qmsjw_62:hover ._cardImageDiv_3qmsjw_166{
|
|
191
191
|
background-size:100% 100%;
|
|
192
192
|
}
|
|
193
|
-
.
|
|
193
|
+
._fixedImageHeight_3qmsjw_199 img{
|
|
194
194
|
height:100%;
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
._paddings16_3qmsjw_96 ._fixedImageHeight_3qmsjw_199{
|
|
197
197
|
height:calc(188px + var(--rs-card-padding, 16px));
|
|
198
198
|
max-height:calc(188px + var(--rs-card-padding, 16px));
|
|
199
199
|
}
|
|
200
|
-
.
|
|
200
|
+
._paddings24_3qmsjw_100 ._fixedImageHeight_3qmsjw_199{
|
|
201
201
|
height:calc(188px + var(--rs-card-padding, 24px));
|
|
202
202
|
max-height:calc(188px + var(--rs-card-padding, 24px));
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
._paddings32_3qmsjw_104 ._fixedImageHeight_3qmsjw_199{
|
|
205
205
|
height:calc(188px + var(--rs-card-padding, 32px));
|
|
206
206
|
max-height:calc(188px + var(--rs-card-padding, 32px));
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
._fullImageWidth_3qmsjw_217 img{
|
|
209
209
|
width:100%;
|
|
210
210
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
3
|
+
import { cardCn } from './card.js';
|
|
4
|
+
|
|
5
|
+
const useCardCn = () => {
|
|
6
|
+
const theme = useThemeWithUndefined();
|
|
7
|
+
return cardCnOptions => cardCn({
|
|
8
|
+
theme,
|
|
9
|
+
...cardCnOptions
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { useCardCn };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/card",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7-RUI-247-Make-packets-react-19-ready-c06b3c96.4+c06b3c96",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@rescui/ui-contexts": "^0.5.0",
|
|
21
|
-
"prop-types": "^15
|
|
22
|
-
"react": ">=16.8.0 <
|
|
21
|
+
"prop-types": "^15",
|
|
22
|
+
"react": ">=16.8.0 <20"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@jetbrains/logos": "^1.4.16",
|
|
26
|
-
"@rescui/colors": "
|
|
27
|
-
"@rescui/postcss-preset-library": "
|
|
28
|
-
"@rescui/scripts": "
|
|
29
|
-
"@rescui/typography": "
|
|
30
|
-
"@rescui/visual-regression": "
|
|
26
|
+
"@rescui/colors": "0.2.10-RUI-247-Make-packets-react-19-ready-c06b3c96.4+c06b3c96",
|
|
27
|
+
"@rescui/postcss-preset-library": "0.2.2",
|
|
28
|
+
"@rescui/scripts": "0.5.0",
|
|
29
|
+
"@rescui/typography": "0.23.3-RUI-247-Make-packets-react-19-ready-c06b3c96.4+c06b3c96",
|
|
30
|
+
"@rescui/visual-regression": "0.1.2"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "rescui-scripts build"
|
|
34
34
|
},
|
|
35
35
|
"nx": {},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c06b3c969a1e66ca4bb7a6b7f3f2e77746682f13"
|
|
37
37
|
}
|