@rescui/card 0.16.3 → 0.16.4-floating-ui-migration-ee8cf10db.9.sha-ee8cf10db
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.p.module.css.js +1 -1
- package/lib/index.css +53 -53
- package/llm/cards.md +22 -22
- package/llm/components/card-cn.md +17 -17
- package/package.json +8 -8
package/lib/card.p.module.css.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"themeLight":"
|
|
1
|
+
var styles = {"themeLight":"_themeLight_x4cnbm_8","themeDark":"_themeDark_x4cnbm_11","padding0":"_padding0_x4cnbm_15","padding16":"_padding16_x4cnbm_18","padding24":"_padding24_x4cnbm_21","padding32":"_padding32_x4cnbm_24","borderRadius0":"_borderRadius0_x4cnbm_28","borderRadius8":"_borderRadius8_x4cnbm_31","borderRadius16":"_borderRadius16_x4cnbm_34","borderRadius24":"_borderRadius24_x4cnbm_37","modeClassic":"_modeClassic_x4cnbm_41","modeRock":"_modeRock_x4cnbm_51","transparentBorderTrue":"_transparentBorderTrue_x4cnbm_60","transparentBorderFalse":"_transparentBorderFalse_x4cnbm_63","clickable":"_clickable_x4cnbm_111","disableBorder":"_disableBorder_x4cnbm_70","hasGlowHover":"_hasGlowHover_x4cnbm_88","legacyBorder":"_legacyBorder_x4cnbm_133","tile":"_tile_x4cnbm_247","fixedImageHeight":"_fixedImageHeight_x4cnbm_323","fullImageWidth":"_fullImageWidth_x4cnbm_332","cardImage":"_cardImage_x4cnbm_336","cardImageImg":"_cardImageImg_x4cnbm_344","cardImageDiv":"_cardImageDiv_x4cnbm_369","innerLink":"_innerLink_x4cnbm_394","innerButton":"_innerButton_x4cnbm_406"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -4,40 +4,40 @@
|
|
|
4
4
|
initial-value:0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
._themeLight_x4cnbm_8{
|
|
8
8
|
--rs-theme-dark:0;
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
._themeDark_x4cnbm_11{
|
|
11
11
|
--rs-theme-dark:1;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
._padding0_x4cnbm_15{
|
|
15
15
|
--_rs-card-padding:0px;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
._padding16_x4cnbm_18{
|
|
18
18
|
--_rs-card-padding:16px;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
._padding24_x4cnbm_21{
|
|
21
21
|
--_rs-card-padding:24px;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
._padding32_x4cnbm_24{
|
|
24
24
|
--_rs-card-padding:32px;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
._borderRadius0_x4cnbm_28{
|
|
28
28
|
--_rs-card-border-radius:0px;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
._borderRadius8_x4cnbm_31{
|
|
31
31
|
--_rs-card-border-radius:8px;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
._borderRadius16_x4cnbm_34{
|
|
34
34
|
--_rs-card-border-radius:16px;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
._borderRadius24_x4cnbm_37{
|
|
37
37
|
--_rs-card-border-radius:24px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
._modeClassic_x4cnbm_41{
|
|
41
41
|
--_rs-card-states-theme-flip:0;
|
|
42
42
|
|
|
43
43
|
--_rs-card-hover-focus-active-border-color:rgb(
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
--_rs-card-hover-focus-background:rgb(calc(255 - 207 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 207 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 204 * var(--_rs-theme-dark-coefficient, 0)));
|
|
48
48
|
--_rs-card-active-background:rgb(calc(255 - 207 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 207 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 204 * var(--_rs-theme-dark-coefficient, 0)));
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
._modeRock_x4cnbm_51{
|
|
51
51
|
--_rs-card-states-theme-flip:1;
|
|
52
52
|
|
|
53
53
|
--_rs-card-hover-focus-active-border-color:transparent;
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
--_rs-card-active-background:rgb(calc(244 - 196 * var(--_rs-theme-dark-coefficient, 0)), calc(244 - 196 * var(--_rs-theme-dark-coefficient, 0)), calc(244 - 193 * var(--_rs-theme-dark-coefficient, 0)));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
._transparentBorderTrue_x4cnbm_60{
|
|
60
60
|
--_rs-card-grey-border-color:rgba(calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(28 + 227 * var(--_rs-theme-dark-coefficient, 0)), 0.2);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
._transparentBorderFalse_x4cnbm_63{
|
|
63
63
|
--_rs-card-grey-border-color:rgb(calc(209 - 115 * var(--_rs-theme-dark-coefficient, 0)), calc(209 - 115 * var(--_rs-theme-dark-coefficient, 0)), calc(210 - 114 * var(--_rs-theme-dark-coefficient, 0)));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
._clickable_x4cnbm_111{
|
|
67
67
|
--_rs-theme-dark:var(
|
|
68
68
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
69
69
|
var(--rs-theme-dark, 0)
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
--_rs-card-native-static-border-color:var(--_rs-card-grey-border-color);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.
|
|
77
|
+
._clickable_x4cnbm_111._disableBorder_x4cnbm_70{
|
|
78
78
|
--_rs-card-native-static-border-color:transparent;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.
|
|
81
|
+
._clickable_x4cnbm_111 {
|
|
82
82
|
--_rs-card-native-hover-border-color:var(
|
|
83
83
|
--_rs-card-hover-focus-active-border-color
|
|
84
84
|
);
|
|
@@ -88,26 +88,26 @@
|
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.
|
|
91
|
+
._clickable_x4cnbm_111:is([data-extra-hover-effect], ._hasGlowHover_x4cnbm_88){
|
|
92
92
|
--_rs-card-native-hover-border-color:var(--_rs-card-grey-border-color);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
._clickable_x4cnbm_111:is([data-extra-hover-effect], ._hasGlowHover_x4cnbm_88)[data-extra-active-effect]{
|
|
96
96
|
--_rs-card-native-active-border-width:1px;
|
|
97
97
|
--_rs-card-native-active-border-color:var(--_rs-card-grey-border-color);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
._clickable_x4cnbm_111:is([data-extra-hover-effect], ._hasGlowHover_x4cnbm_88)._disableBorder_x4cnbm_70{
|
|
101
101
|
--_rs-card-native-hover-border-color:transparent;
|
|
102
102
|
|
|
103
103
|
--_rs-card-native-active-border-width:1px;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
._clickable_x4cnbm_111:is([data-extra-hover-effect], ._hasGlowHover_x4cnbm_88)._disableBorder_x4cnbm_70[data-extra-active-effect]{
|
|
107
107
|
--_rs-card-native-active-border-color:transparent;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
.
|
|
110
|
+
._clickable_x4cnbm_111 {
|
|
111
111
|
|
|
112
112
|
--_rs-card-env-background:var(
|
|
113
113
|
--rs-card-static-background,
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
--_rs-card-css-border:none;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.
|
|
131
|
+
._clickable_x4cnbm_111._legacyBorder_x4cnbm_133{
|
|
132
132
|
--_rs-card-css-padding:calc(var(--_rs-card-padding-final) - var(--_rs-card-env-border-width));
|
|
133
133
|
--_rs-card-css-border:var(--_rs-card-env-border-width) solid var(--_rs-card-env-border-color);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.
|
|
136
|
+
._clickable_x4cnbm_111 {
|
|
137
137
|
--rs-out-card-padding:var(--_rs-card-padding-final);
|
|
138
138
|
--rs-out-card-border-radius:var(--_rs-card-border-radius-final);
|
|
139
139
|
--rs-out-card-border-width:var(--_rs-card-env-border-width);
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
appearance:none;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.
|
|
166
|
+
._clickable_x4cnbm_111:not(._legacyBorder_x4cnbm_133)::after{
|
|
167
167
|
position:absolute;
|
|
168
168
|
top:0;
|
|
169
169
|
right:0;
|
|
@@ -182,13 +182,13 @@
|
|
|
182
182
|
transition:box-shadow 100ms var(--rs-transition-function, ease);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
.
|
|
186
|
-
.
|
|
185
|
+
._clickable_x4cnbm_111,
|
|
186
|
+
._clickable_x4cnbm_111:hover{
|
|
187
187
|
text-decoration:none;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
@media (hover: hover){
|
|
191
|
-
.
|
|
191
|
+
._clickable_x4cnbm_111:hover{
|
|
192
192
|
--rs-theme-flip:var(--_rs-card-states-theme-flip);
|
|
193
193
|
|
|
194
194
|
--_rs-card-env-background:var(
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
.
|
|
206
|
+
._clickable_x4cnbm_111:focus-visible{
|
|
207
207
|
--rs-theme-flip:var(--_rs-card-states-theme-flip);
|
|
208
208
|
|
|
209
209
|
--_rs-card-env-background:var(
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
outline:none;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
.
|
|
221
|
+
._clickable_x4cnbm_111:active{
|
|
222
222
|
--rs-theme-flip:var(--_rs-card-states-theme-flip);
|
|
223
223
|
|
|
224
224
|
--_rs-card-env-background:var(
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.
|
|
238
|
+
._tile_x4cnbm_247{
|
|
239
239
|
--_rs-theme-dark:var(
|
|
240
240
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
241
241
|
var(--rs-theme-dark, 0)
|
|
@@ -246,11 +246,11 @@
|
|
|
246
246
|
--_rs-card-native-static-border-color:var(--_rs-card-grey-border-color);
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
.
|
|
249
|
+
._tile_x4cnbm_247._disableBorder_x4cnbm_70{
|
|
250
250
|
--_rs-card-native-static-border-color:transparent;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
.
|
|
253
|
+
._tile_x4cnbm_247 {
|
|
254
254
|
|
|
255
255
|
--_rs-card-env-background:var(
|
|
256
256
|
--rs-card-static-background,
|
|
@@ -271,12 +271,12 @@
|
|
|
271
271
|
--_rs-card-css-border:none;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
.
|
|
274
|
+
._tile_x4cnbm_247._legacyBorder_x4cnbm_133{
|
|
275
275
|
--_rs-card-css-padding:calc(var(--_rs-card-padding-final) - var(--_rs-card-env-border-width));
|
|
276
276
|
--_rs-card-css-border:var(--_rs-card-env-border-width) solid var(--_rs-card-env-border-color);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
.
|
|
279
|
+
._tile_x4cnbm_247 {
|
|
280
280
|
--rs-out-card-padding:var(--_rs-card-padding-final);
|
|
281
281
|
--rs-out-card-border-radius:var(--_rs-card-border-radius-final);
|
|
282
282
|
--rs-out-card-border-width:var(--_rs-card-env-border-width);
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
appearance:none;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
.
|
|
309
|
+
._tile_x4cnbm_247:not(._legacyBorder_x4cnbm_133)::after{
|
|
310
310
|
position:absolute;
|
|
311
311
|
top:0;
|
|
312
312
|
right:0;
|
|
@@ -323,20 +323,20 @@
|
|
|
323
323
|
box-shadow:inset 0 0 0 var(--_rs-card-env-border-width) var(--_rs-card-env-border-color);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
.
|
|
326
|
+
._fixedImageHeight_x4cnbm_323{
|
|
327
327
|
height:calc(188px + var(--_rs-card-padding-final));
|
|
328
328
|
max-height:calc(188px + var(--_rs-card-padding-final));
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
.
|
|
331
|
+
._fixedImageHeight_x4cnbm_323 img{
|
|
332
332
|
height:100%;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
.
|
|
335
|
+
._fullImageWidth_x4cnbm_332 img{
|
|
336
336
|
width:100%;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
.
|
|
339
|
+
._cardImage_x4cnbm_336{
|
|
340
340
|
position:relative;
|
|
341
341
|
|
|
342
342
|
overflow:hidden;
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
box-sizing:border-box;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
.
|
|
347
|
+
._cardImageImg_x4cnbm_344{
|
|
348
348
|
top:calc(-1 * var(--_rs-card-padding-final));
|
|
349
349
|
left:calc(-1 * var(--_rs-card-padding-final));
|
|
350
350
|
|
|
@@ -355,21 +355,21 @@
|
|
|
355
355
|
width:calc(100% + 2 * var(--_rs-card-padding-final));
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
.
|
|
358
|
+
._cardImageImg_x4cnbm_344 img{
|
|
359
359
|
max-width:100%;
|
|
360
360
|
max-height:100%;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
.
|
|
363
|
+
._clickable_x4cnbm_111 ._cardImageImg_x4cnbm_344 img{
|
|
364
364
|
transition:transform 0.2s var(--rs-transition-function, ease);
|
|
365
365
|
transform:scale(1);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
.
|
|
368
|
+
._clickable_x4cnbm_111:hover ._cardImageImg_x4cnbm_344 img{
|
|
369
369
|
transform:scale(1.1);
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
.
|
|
372
|
+
._cardImageDiv_x4cnbm_369{
|
|
373
373
|
top:calc(-1 * var(--_rs-card-padding-final));
|
|
374
374
|
left:calc(-1 * var(--_rs-card-padding-final));
|
|
375
375
|
|
|
@@ -386,16 +386,16 @@
|
|
|
386
386
|
background-size:100% 100%;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
.
|
|
389
|
+
._clickable_x4cnbm_111 ._cardImageDiv_x4cnbm_369{
|
|
390
390
|
transition:background-size 0.2s var(--rs-transition-function, ease);
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
.
|
|
393
|
+
._clickable_x4cnbm_111:hover ._cardImageDiv_x4cnbm_369{
|
|
394
394
|
background-size:110% 110%;
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
@media (hover: hover){
|
|
398
|
-
.
|
|
398
|
+
._clickable_x4cnbm_111:hover ._innerLink_x4cnbm_394{
|
|
399
399
|
--_rs-typography-link-padding-bottom-from-state-hover:calc(1px - var(--_rs-typography-link-hover-underline-width-difference-wf));
|
|
400
400
|
--_rs-typography-link-border-bottom-width-from-state-hover:calc(var(--_rs-typography-link-border-bottom-width-wf) + var(--_rs-typography-link-hover-underline-width-difference-wf));
|
|
401
401
|
--_rs-typography-link-border-bottom-color-from-state-hover:var(
|
|
@@ -417,14 +417,14 @@
|
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
.
|
|
420
|
+
._clickable_x4cnbm_111:focus-visible ._innerLink_x4cnbm_394{
|
|
421
421
|
--_rs-typography-link-box-shadow-from-state-focus-visible:var(
|
|
422
422
|
--_rs-color-primary
|
|
423
423
|
) 0 0 0 4px;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
@media (hover: hover){
|
|
427
|
-
.
|
|
427
|
+
._clickable_x4cnbm_111:hover ._innerButton_x4cnbm_406{
|
|
428
428
|
--_rs-button-border-inner-color:rgba(
|
|
429
429
|
calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(28 + 227 * var(--_rs-theme-dark-coefficient, 0)),
|
|
430
430
|
calc(.3 + .1 * var(--_rs-theme-dark-coefficient, 0))
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
.
|
|
436
|
+
._clickable_x4cnbm_111:active ._innerButton_x4cnbm_406{
|
|
437
437
|
--_rs-button-border-inner-width:2px;
|
|
438
438
|
--_rs-button-border-inner-color:rgb(calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(28 + 227 * var(--_rs-theme-dark-coefficient, 0)));
|
|
439
439
|
--_rs-button-background-from-state-active:var(
|
|
@@ -441,13 +441,13 @@
|
|
|
441
441
|
);
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
.
|
|
444
|
+
._clickable_x4cnbm_111:focus-visible ._innerButton_x4cnbm_406{
|
|
445
445
|
--_rs-button-box-shadow-from-state-focus-visible:var(
|
|
446
446
|
--_rs-color-primary-t-dim
|
|
447
447
|
) 0 0 0 4px;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
.
|
|
450
|
+
._clickable_x4cnbm_111:active:focus-visible:not(:hover) ._innerButton_x4cnbm_406{
|
|
451
451
|
--_rs-button-background-from-state-active-focus-visible-no-hover:var(
|
|
452
452
|
--_rs-button-active-focus-visible-no-hover-background
|
|
453
453
|
);
|
package/llm/cards.md
CHANGED
|
@@ -55,7 +55,7 @@ A ClassName Helper for creating cards with simple styles and some customizations
|
|
|
55
55
|
- Set border on the pseudo-element to avoid scaling bug when changing `border-width`
|
|
56
56
|
- [cardCn implementation](/components/card-cn/#default-clickable-card)
|
|
57
57
|
|
|
58
|
-
```
|
|
58
|
+
```jsx
|
|
59
59
|
import cn from 'classnames';
|
|
60
60
|
import { textCn } from '@rescui/typography';
|
|
61
61
|
|
|
@@ -141,7 +141,7 @@ render(<Demo />);
|
|
|
141
141
|
- Set border on the pseudo-element to avoid scaling bug when changing `border-width`
|
|
142
142
|
- [cardCn implementation](/components/card-cn/#theme-dark)
|
|
143
143
|
|
|
144
|
-
```
|
|
144
|
+
```jsx
|
|
145
145
|
import cn from 'classnames';
|
|
146
146
|
import { textCn } from '@rescui/typography';
|
|
147
147
|
|
|
@@ -234,7 +234,7 @@ render(<Demo />);
|
|
|
234
234
|
- States change background color
|
|
235
235
|
- [cardCn implementation](/components/card-cn/css/#borderless-card)
|
|
236
236
|
|
|
237
|
-
```
|
|
237
|
+
```jsx
|
|
238
238
|
import cn from 'classnames';
|
|
239
239
|
import { textCn } from '@rescui/typography';
|
|
240
240
|
|
|
@@ -311,7 +311,7 @@ render(<Demo />);
|
|
|
311
311
|
- Hover and active states are covered by `glow-hover`
|
|
312
312
|
- [cardCn implementation](/components/card-cn/#with-glow-hover)
|
|
313
313
|
|
|
314
|
-
```
|
|
314
|
+
```jsx
|
|
315
315
|
import cn from 'classnames';
|
|
316
316
|
import { textCn } from '@rescui/typography';
|
|
317
317
|
import { useGlowHover } from '@rescui/use-glow-hover';
|
|
@@ -388,7 +388,7 @@ render(<Demo />);
|
|
|
388
388
|
- Use only one action element inside
|
|
389
389
|
- [cardCn implementation](/components/card-cn/#with-action-button-inside)
|
|
390
390
|
|
|
391
|
-
```
|
|
391
|
+
```jsx
|
|
392
392
|
import cn from 'classnames';
|
|
393
393
|
import { textCn } from '@rescui/typography';
|
|
394
394
|
import { Button } from '@rescui/button';
|
|
@@ -508,7 +508,7 @@ render(<Demo />);
|
|
|
508
508
|
- Use only one action element inside
|
|
509
509
|
- [cardCn implementation](/components/card-cn/#with-action-link-inside)
|
|
510
510
|
|
|
511
|
-
```
|
|
511
|
+
```jsx
|
|
512
512
|
import cn from 'classnames';
|
|
513
513
|
import { textCn } from '@rescui/typography';
|
|
514
514
|
|
|
@@ -621,7 +621,7 @@ render(<Demo />);
|
|
|
621
621
|
- Change background-color to contrast value on hover/active
|
|
622
622
|
- Use `--rs-theme-flip` css-variable to reverse theme for all RescUI components on hover/active
|
|
623
623
|
|
|
624
|
-
```
|
|
624
|
+
```jsx
|
|
625
625
|
import cn from 'classnames';
|
|
626
626
|
import { textCn } from '@rescui/typography';
|
|
627
627
|
|
|
@@ -708,7 +708,7 @@ render(<Demo />);
|
|
|
708
708
|
- Each card takes up two rows and applies subgrid to its children
|
|
709
709
|
- Cards text content lays on the second row, aligning with the content in the sibling cards
|
|
710
710
|
|
|
711
|
-
```
|
|
711
|
+
```jsx
|
|
712
712
|
import cn from 'classnames';
|
|
713
713
|
import { textCn } from '@rescui/typography';
|
|
714
714
|
|
|
@@ -848,7 +848,7 @@ render(<Demo />);
|
|
|
848
848
|
- Text is center aligned
|
|
849
849
|
- Card's width is constant
|
|
850
850
|
|
|
851
|
-
```
|
|
851
|
+
```jsx
|
|
852
852
|
import cn from 'classnames';
|
|
853
853
|
import { textCn } from '@rescui/typography';
|
|
854
854
|
import apacheDerbyLogoSvg from '@/parts/cards/db-logos/apache-derby-logo.svg';
|
|
@@ -983,7 +983,7 @@ render(<Demo />);
|
|
|
983
983
|
- Use pseudo-element for border to show it above the content
|
|
984
984
|
- [cardCn implementation](/components/card-cn/#with-image-via-img-tag)
|
|
985
985
|
|
|
986
|
-
```
|
|
986
|
+
```jsx
|
|
987
987
|
import { textCn } from '@rescui/typography';
|
|
988
988
|
import { Button } from '@rescui/button';
|
|
989
989
|
import card1Image from '@/parts/cards/newsletter1.webp';
|
|
@@ -1164,7 +1164,7 @@ render(<Demo />);
|
|
|
1164
1164
|
- Has no dynamic states - its a static `div` element
|
|
1165
1165
|
- [cardCn implementation](/components/card-cn/#default-card)
|
|
1166
1166
|
|
|
1167
|
-
```
|
|
1167
|
+
```jsx
|
|
1168
1168
|
import cn from 'classnames';
|
|
1169
1169
|
import { textCn } from '@rescui/typography';
|
|
1170
1170
|
|
|
@@ -1214,7 +1214,7 @@ render(<Demo />);
|
|
|
1214
1214
|
- Text is center aligned
|
|
1215
1215
|
- Tiles width is constant
|
|
1216
1216
|
|
|
1217
|
-
```
|
|
1217
|
+
```jsx
|
|
1218
1218
|
import cn from 'classnames';
|
|
1219
1219
|
import { textCn } from '@rescui/typography';
|
|
1220
1220
|
import apacheDerbyLogoSvg from '@/parts/cards/db-logos/apache-derby-logo.svg';
|
|
@@ -1307,7 +1307,7 @@ render(<Demo />);
|
|
|
1307
1307
|
- With background
|
|
1308
1308
|
- Static element without states
|
|
1309
1309
|
|
|
1310
|
-
```
|
|
1310
|
+
```jsx
|
|
1311
1311
|
import cn from 'classnames';
|
|
1312
1312
|
import { textCn } from '@rescui/typography';
|
|
1313
1313
|
|
|
@@ -1354,7 +1354,7 @@ render(<Demo />);
|
|
|
1354
1354
|
- Content is center aligned
|
|
1355
1355
|
- Large image below
|
|
1356
1356
|
|
|
1357
|
-
```
|
|
1357
|
+
```jsx
|
|
1358
1358
|
import cn from 'classnames';
|
|
1359
1359
|
import { textCn } from '@rescui/typography';
|
|
1360
1360
|
import tileImage from '@/parts/cards/keymaps.webp';
|
|
@@ -1433,7 +1433,7 @@ render(<Demo />);
|
|
|
1433
1433
|
- Subscribe forms are aligned with sibling tiles
|
|
1434
1434
|
- Use pseudo-element for border to show it above the content
|
|
1435
1435
|
|
|
1436
|
-
```
|
|
1436
|
+
```jsx
|
|
1437
1437
|
import cn from 'classnames';
|
|
1438
1438
|
import { textCn } from '@rescui/typography';
|
|
1439
1439
|
import { Input } from '@rescui/input';
|
|
@@ -1580,7 +1580,7 @@ render(<Demo />);
|
|
|
1580
1580
|
- Grid areas are forwarded to CSS using `--tile-id` CSS variable
|
|
1581
1581
|
- Flat tiles layout structure allows for easy adaptive changes compared to the two-column flex layout
|
|
1582
1582
|
|
|
1583
|
-
```
|
|
1583
|
+
```jsx
|
|
1584
1584
|
import cn from 'classnames';
|
|
1585
1585
|
import { textCn } from '@rescui/typography';
|
|
1586
1586
|
|
|
@@ -1733,7 +1733,7 @@ render(<Demo />);
|
|
|
1733
1733
|
- Actions in the footer are nailed to the tile bottom
|
|
1734
1734
|
- Tiles may contain `Collapse` inside
|
|
1735
1735
|
|
|
1736
|
-
```
|
|
1736
|
+
```jsx
|
|
1737
1737
|
import cn from 'classnames';
|
|
1738
1738
|
import { textCn } from '@rescui/typography';
|
|
1739
1739
|
import { StickyTag } from '@rescui/tag';
|
|
@@ -2198,7 +2198,7 @@ render(<Demo />);
|
|
|
2198
2198
|
- Change primary colors using css variables
|
|
2199
2199
|
- Use pseudo-element for border to show it above content
|
|
2200
2200
|
|
|
2201
|
-
```
|
|
2201
|
+
```jsx
|
|
2202
2202
|
import { useState } from 'react';
|
|
2203
2203
|
import cn from 'classnames';
|
|
2204
2204
|
import { textCn } from '@rescui/typography';
|
|
@@ -2628,7 +2628,7 @@ render(<Demo />);
|
|
|
2628
2628
|
- Control autoplay animation duration with `--carousel-vertical-control-autoplay-duration` css variable
|
|
2629
2629
|
- With react state management
|
|
2630
2630
|
|
|
2631
|
-
```
|
|
2631
|
+
```jsx
|
|
2632
2632
|
import { useState } from 'react';
|
|
2633
2633
|
import cn from 'classnames';
|
|
2634
2634
|
import { textCn } from '@rescui/typography';
|
|
@@ -2826,7 +2826,7 @@ render(<Demo />);
|
|
|
2826
2826
|
- Control autoplay animation duration with `--carousel-horizontal-control-autoplay-duration` css variable
|
|
2827
2827
|
- With react state management
|
|
2828
2828
|
|
|
2829
|
-
```
|
|
2829
|
+
```jsx
|
|
2830
2830
|
import { useState } from 'react';
|
|
2831
2831
|
import cn from 'classnames';
|
|
2832
2832
|
import { textCn } from '@rescui/typography';
|
|
@@ -3446,7 +3446,7 @@ This approach aims to stretch the image to cover the edges of the tile. Using CS
|
|
|
3446
3446
|
|
|
3447
3447
|
To display the border above stretched content, use a pseudo-element instead of a simple `box-shadow`. Also, do not use a transparent color for the border — use a solid one instead.
|
|
3448
3448
|
|
|
3449
|
-
```
|
|
3449
|
+
```jsx
|
|
3450
3450
|
import cn from 'classnames';
|
|
3451
3451
|
import { textCn } from '@rescui/typography';
|
|
3452
3452
|
import tileImage from '@/parts/cards/newsletter1.webp';
|
|
@@ -3534,7 +3534,7 @@ One way to achieve this is by using flexbox with `flex-direction: column`. Howev
|
|
|
3534
3534
|
|
|
3535
3535
|
The preferred approach for more complex layouts is to use [CSS Grid’s subgrid feature](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Subgrid). Keep in mind this approach has certain [browser support limitations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Subgrid#browser_compatibility). Although subgrid layouts remain functional in unsupported browsers, you should carefully test their regression and viability in older browsers.
|
|
3536
3536
|
|
|
3537
|
-
```
|
|
3537
|
+
```jsx
|
|
3538
3538
|
import { textCn } from '@rescui/typography';
|
|
3539
3539
|
|
|
3540
3540
|
const AlignedTile = ({ title, children }) => {
|
|
@@ -37,7 +37,7 @@ No additional properties are added to the default card
|
|
|
37
37
|
- Layout styles are not provided with `cardCn`
|
|
38
38
|
- [custom no-cardCn implementation](/cards/tiles/#base-example)
|
|
39
39
|
|
|
40
|
-
```
|
|
40
|
+
```jsx
|
|
41
41
|
import { cardCn } from '@rescui/card';
|
|
42
42
|
import { textCn } from '@rescui/typography';
|
|
43
43
|
import cn from 'classnames';
|
|
@@ -133,7 +133,7 @@ render(<MyCard />);
|
|
|
133
133
|
- Layout styles are not provided with `cardCn`
|
|
134
134
|
- [custom no-cardCn implementation](/cards/clickable/#base-example)
|
|
135
135
|
|
|
136
|
-
```
|
|
136
|
+
```jsx
|
|
137
137
|
import { cardCn } from '@rescui/card';
|
|
138
138
|
import { textCn } from '@rescui/typography';
|
|
139
139
|
import cn from 'classnames';
|
|
@@ -231,7 +231,7 @@ render(<MyCard />);
|
|
|
231
231
|
- `a` tag with `href` attribute is used instead of `div` element
|
|
232
232
|
- [custom no-cardCn implementation](/cards/clickable/#dark-theme)
|
|
233
233
|
|
|
234
|
-
```
|
|
234
|
+
```jsx
|
|
235
235
|
import { cardCn } from '@rescui/card';
|
|
236
236
|
import { textCn } from '@rescui/typography';
|
|
237
237
|
import cn from 'classnames';
|
|
@@ -337,7 +337,7 @@ render(<MyCard />);
|
|
|
337
337
|
|
|
338
338
|
If you use [`ThemeContext`](/utils/ui-contexts/#themecontext) to manage the theme of your application, use `useCardCn` hook.
|
|
339
339
|
|
|
340
|
-
```
|
|
340
|
+
```jsx
|
|
341
341
|
import { useCardCn } from '@rescui/card';
|
|
342
342
|
import { useTextStyles } from '@rescui/typography';
|
|
343
343
|
import { ThemeProvider } from '@rescui/ui-contexts';
|
|
@@ -458,7 +458,7 @@ render(
|
|
|
458
458
|
- **Avoid** using `rock` mode for non-clickable cards
|
|
459
459
|
- [custom no-cardCn implementation](/cards/clickable/#rock-mode)
|
|
460
460
|
|
|
461
|
-
```
|
|
461
|
+
```jsx
|
|
462
462
|
import { cardCn } from '@rescui/card';
|
|
463
463
|
import { textCn } from '@rescui/typography';
|
|
464
464
|
import cn from 'classnames';
|
|
@@ -572,7 +572,7 @@ render(<MyCard />);
|
|
|
572
572
|
- **Avoid** using on cards with more than one action as this is a bad UX pattern. For example, avoid 'glow-hover' in a `Buy` card with a button and link
|
|
573
573
|
- [custom no-cardCn implementation](/cards/clickable/#with-glow-hover)
|
|
574
574
|
|
|
575
|
-
```
|
|
575
|
+
```jsx
|
|
576
576
|
import { cardCn } from '@rescui/card';
|
|
577
577
|
import { textCn } from '@rescui/typography';
|
|
578
578
|
import cn from 'classnames';
|
|
@@ -692,7 +692,7 @@ render(<MyCard />);
|
|
|
692
692
|
- **Avoid** using if you need text on images. Instead, use card image with DIV solution
|
|
693
693
|
- [custom no-cardCn implementation](/cards/clickable/#newsletter-cards)
|
|
694
694
|
|
|
695
|
-
```
|
|
695
|
+
```jsx
|
|
696
696
|
import { cardCn, cardImageCn } from '@rescui/card';
|
|
697
697
|
import { textCn } from '@rescui/typography';
|
|
698
698
|
import cn from 'classnames';
|
|
@@ -745,7 +745,7 @@ render(<MyCard />);
|
|
|
745
745
|
- Can be used only with `classic` mode now. Use it with `rock` mode at your own risk
|
|
746
746
|
- **Avoid** using with GlowHover effect
|
|
747
747
|
|
|
748
|
-
```
|
|
748
|
+
```jsx
|
|
749
749
|
import { cardCn, cardImageCn } from '@rescui/card';
|
|
750
750
|
import { textCn } from '@rescui/typography';
|
|
751
751
|
import cn from 'classnames';
|
|
@@ -797,7 +797,7 @@ render(<MyCard />);
|
|
|
797
797
|
|
|
798
798
|
Use `disableFixedHeight: true` option if an aspect ratio of the image is important
|
|
799
799
|
|
|
800
|
-
```
|
|
800
|
+
```jsx
|
|
801
801
|
import { cardCn, cardImageCn } from '@rescui/card';
|
|
802
802
|
import { textCn } from '@rescui/typography';
|
|
803
803
|
import cn from 'classnames';
|
|
@@ -843,7 +843,7 @@ render(<MyCard />);
|
|
|
843
843
|
- image takes a fixed percentage of the card width
|
|
844
844
|
- transforms into a vertical card on `--sm`
|
|
845
845
|
|
|
846
|
-
```
|
|
846
|
+
```jsx
|
|
847
847
|
import { cardCn } from '@rescui/card';
|
|
848
848
|
import { textCn } from '@rescui/typography';
|
|
849
849
|
import cn from 'classnames';
|
|
@@ -928,7 +928,7 @@ render(<MyCard />);
|
|
|
928
928
|
- Default border radius value is `8`
|
|
929
929
|
- If you wish to substitute border-radius property in your project, use `--rs-card-border-radius` css-var
|
|
930
930
|
|
|
931
|
-
```
|
|
931
|
+
```jsx
|
|
932
932
|
import { cardCn } from '@rescui/card';
|
|
933
933
|
import { textCn } from '@rescui/typography';
|
|
934
934
|
import cn from 'classnames';
|
|
@@ -1007,7 +1007,7 @@ render(<MyCards />);
|
|
|
1007
1007
|
- Card can use the following padding values with props: `0` (set the correct padding manually), `16`, `24`, and `32`
|
|
1008
1008
|
- Default border radius value is `24`
|
|
1009
1009
|
|
|
1010
|
-
```
|
|
1010
|
+
```jsx
|
|
1011
1011
|
import { cardCn } from '@rescui/card';
|
|
1012
1012
|
import { textCn } from '@rescui/typography';
|
|
1013
1013
|
import cn from 'classnames';
|
|
@@ -1076,7 +1076,7 @@ render(<MyCard />);
|
|
|
1076
1076
|
- For plugin card layout **avoid** using plugin names longer than 2 lines
|
|
1077
1077
|
- The layout in this example hides the rest of the name with `line-clamp` css property
|
|
1078
1078
|
|
|
1079
|
-
```
|
|
1079
|
+
```jsx
|
|
1080
1080
|
import { cardCn } from '@rescui/card';
|
|
1081
1081
|
import { textCn } from '@rescui/typography';
|
|
1082
1082
|
import cn from 'classnames';
|
|
@@ -1194,7 +1194,7 @@ When you need to forward card states to the `Button` component inside, you can u
|
|
|
1194
1194
|
- Avoid using more than one dynamic element cards like this
|
|
1195
1195
|
- [Custom no-cardCn implementation](/cards/clickable/#with-action-button-inside)
|
|
1196
1196
|
|
|
1197
|
-
```
|
|
1197
|
+
```jsx
|
|
1198
1198
|
import cn from 'classnames';
|
|
1199
1199
|
import { textCn } from '@rescui/typography';
|
|
1200
1200
|
import { Button } from '@rescui/button';
|
|
@@ -1235,7 +1235,7 @@ When you need to forward card states to the `rs-link` inside, you can use `cardL
|
|
|
1235
1235
|
- Avoid using more than one dynamic element cards like this
|
|
1236
1236
|
- [Custom no-cardCn implementation](/cards/clickable/#with-action-link-inside)
|
|
1237
1237
|
|
|
1238
|
-
```
|
|
1238
|
+
```jsx
|
|
1239
1239
|
import cn from 'classnames';
|
|
1240
1240
|
import { textCn } from '@rescui/typography';
|
|
1241
1241
|
import { cardCn, cardLinkCn } from '@rescui/card';
|
|
@@ -1310,7 +1310,7 @@ Remember to customize variables for all states when customizing clickable card
|
|
|
1310
1310
|
|
|
1311
1311
|
[Custom no-cardCn implementation](/cards/clickable/#borderless-example)
|
|
1312
1312
|
|
|
1313
|
-
```
|
|
1313
|
+
```jsx
|
|
1314
1314
|
import cn from 'classnames';
|
|
1315
1315
|
import { textCn } from '@rescui/typography';
|
|
1316
1316
|
import { cardCn } from '@rescui/card';
|
|
@@ -1351,7 +1351,7 @@ render(<Demo />);
|
|
|
1351
1351
|
|
|
1352
1352
|
#### Colorful border
|
|
1353
1353
|
|
|
1354
|
-
```
|
|
1354
|
+
```jsx
|
|
1355
1355
|
import cn from 'classnames';
|
|
1356
1356
|
import { textCn } from '@rescui/typography';
|
|
1357
1357
|
import { cardCn } from '@rescui/card';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/card",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4-floating-ui-migration-ee8cf10db.9.sha-ee8cf10db",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@jetbrains/logos": "^1.4.16",
|
|
27
|
-
"@rescui/button": "
|
|
28
|
-
"@rescui/colors": "
|
|
29
|
-
"@rescui/postcss-preset-library": "
|
|
30
|
-
"@rescui/scripts": "
|
|
31
|
-
"@rescui/typography": "
|
|
32
|
-
"@rescui/visual-regression": "
|
|
27
|
+
"@rescui/button": "0.27.3-floating-ui-migration-ee8cf10db.9.sha-ee8cf10db",
|
|
28
|
+
"@rescui/colors": "0.3.7-floating-ui-migration-ee8cf10db.12.sha-ee8cf10db",
|
|
29
|
+
"@rescui/postcss-preset-library": "0.2.4",
|
|
30
|
+
"@rescui/scripts": "0.6.0",
|
|
31
|
+
"@rescui/typography": "0.30.3-floating-ui-migration-ee8cf10db.9.sha-ee8cf10db",
|
|
32
|
+
"@rescui/visual-regression": "0.1.5"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rescui-scripts build"
|
|
36
36
|
},
|
|
37
37
|
"nx": {},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ee8cf10dbbe12af812fa565b2325a88196088d92"
|
|
39
39
|
}
|