@rogieking/figui3 4.8.3 → 4.9.1
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/components.css +79 -91
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +37 -37
- package/fig.js +23 -50
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -1380,39 +1380,48 @@ fig-input-file {
|
|
|
1380
1380
|
fig-media,
|
|
1381
1381
|
fig-image,
|
|
1382
1382
|
fig-video {
|
|
1383
|
-
--
|
|
1384
|
-
--media-
|
|
1385
|
-
|
|
1386
|
-
--aspect-ratio: 1 / 1;
|
|
1387
|
-
display: inline-grid;
|
|
1388
|
-
place-items: center;
|
|
1383
|
+
--fig-media-fit: contain;
|
|
1384
|
+
--fig-media-aspect-ratio: 4/3;
|
|
1385
|
+
display: inline-flex;
|
|
1389
1386
|
max-width: 100%;
|
|
1390
|
-
|
|
1391
|
-
|
|
1387
|
+
background-color: var(--figma-color-bg-secondary);
|
|
1388
|
+
border-radius: var(--radius-medium);
|
|
1389
|
+
overflow: hidden;
|
|
1390
|
+
aspect-ratio: var(--fig-media-aspect-ratio);
|
|
1391
|
+
align-items: center;
|
|
1392
|
+
min-height: 4rem;
|
|
1393
|
+
justify-content: center;
|
|
1394
|
+
position: relative;
|
|
1395
|
+
|
|
1396
|
+
& > *{
|
|
1397
|
+
position: absolute;
|
|
1398
|
+
z-index: 1;
|
|
1392
1399
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
--height: 100% !important;
|
|
1397
|
-
--padding: 0px;
|
|
1398
|
-
--chit-bg-size: var(--fit);
|
|
1399
|
-
z-index: 0;
|
|
1400
|
-
&[disabled] {
|
|
1401
|
-
opacity: 1;
|
|
1402
|
-
}
|
|
1400
|
+
|
|
1401
|
+
&[checkerboard]:not([checkerboard="false"]) {
|
|
1402
|
+
background: var(--checkerboard);
|
|
1403
1403
|
}
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1404
|
+
&::after{
|
|
1405
|
+
content: "";
|
|
1406
|
+
width: 100%;
|
|
1407
|
+
height: 100%;
|
|
1408
|
+
border-radius: inherit;
|
|
1409
|
+
position: absolute;
|
|
1410
|
+
inset: 0;
|
|
1411
|
+
border: 1px solid var(--figma-color-bordertranslucent);
|
|
1411
1412
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1413
|
+
> video,
|
|
1414
|
+
> img,
|
|
1415
|
+
> .fig-media-element[data-generated] {
|
|
1416
|
+
display: block;
|
|
1417
|
+
width: stretch;
|
|
1418
|
+
height: stretch;
|
|
1419
|
+
position: static;
|
|
1420
|
+
object-fit: var(--fig-media-fit);
|
|
1421
|
+
object-position: center;
|
|
1422
|
+
z-index: 0;
|
|
1415
1423
|
}
|
|
1424
|
+
|
|
1416
1425
|
&:is(:not([src]), [src=""]):is(:not([poster]), [poster=""])
|
|
1417
1426
|
> video.fig-media-element[data-generated] {
|
|
1418
1427
|
opacity: 0;
|
|
@@ -1432,40 +1441,6 @@ fig-video {
|
|
|
1432
1441
|
opacity: 1;
|
|
1433
1442
|
pointer-events: all;
|
|
1434
1443
|
}
|
|
1435
|
-
&[size] {
|
|
1436
|
-
width: var(--media-size);
|
|
1437
|
-
height: var(--media-size);
|
|
1438
|
-
> .fig-media-element[data-generated] {
|
|
1439
|
-
width: 100%;
|
|
1440
|
-
height: 100%;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
&[size="medium"] {
|
|
1444
|
-
--image-size: 4rem;
|
|
1445
|
-
}
|
|
1446
|
-
&[size="large"] {
|
|
1447
|
-
--image-size: 8rem;
|
|
1448
|
-
}
|
|
1449
|
-
&[size="auto"] {
|
|
1450
|
-
--image-size: 6rem;
|
|
1451
|
-
&[full]:not([full="false"]) {
|
|
1452
|
-
width: 100%;
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
&[aspect-ratio] {
|
|
1456
|
-
width: 100%;
|
|
1457
|
-
height: auto;
|
|
1458
|
-
aspect-ratio: var(--aspect-ratio);
|
|
1459
|
-
> .fig-media-element[data-generated] {
|
|
1460
|
-
width: 100%;
|
|
1461
|
-
height: 100%;
|
|
1462
|
-
}
|
|
1463
|
-
fig-chit {
|
|
1464
|
-
--size: 100% !important;
|
|
1465
|
-
height: auto !important;
|
|
1466
|
-
aspect-ratio: var(--aspect-ratio) !important;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
1444
|
}
|
|
1470
1445
|
|
|
1471
1446
|
/* Easing Curve */
|
|
@@ -3301,10 +3276,10 @@ fig-input-fill {
|
|
|
3301
3276
|
}
|
|
3302
3277
|
}
|
|
3303
3278
|
fig-input-gradient {
|
|
3304
|
-
--height: 1.5rem;
|
|
3305
|
-
--
|
|
3279
|
+
--fig-input-gradient-height: 1.5rem;
|
|
3280
|
+
--fig-input-gradient-padding: var(--spacer-1);
|
|
3306
3281
|
position: relative;
|
|
3307
|
-
height: var(--height);
|
|
3282
|
+
height: var(--fig-input-gradient-height);
|
|
3308
3283
|
width: 100%;
|
|
3309
3284
|
min-width: 0;
|
|
3310
3285
|
|
|
@@ -3332,23 +3307,29 @@ fig-input-gradient {
|
|
|
3332
3307
|
}
|
|
3333
3308
|
& > fig-chit,
|
|
3334
3309
|
& > fig-fill-picker > fig-chit {
|
|
3335
|
-
--padding: 0;
|
|
3336
3310
|
--width: 100%;
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
width: 100% !important;
|
|
3340
|
-
min-width: 0 !important;
|
|
3341
|
-
min-height: var(--chit-height) !important;
|
|
3311
|
+
width: var(--width);
|
|
3312
|
+
--border-radius: var(--radius-large);
|
|
3342
3313
|
}
|
|
3343
3314
|
&[size="large"] {
|
|
3344
|
-
--height:
|
|
3315
|
+
--fig-input-gradient-height: 2rem;
|
|
3316
|
+
height: var(--fig-input-gradient-height) !important;
|
|
3317
|
+
& > fig-chit,
|
|
3318
|
+
& > fig-fill-picker > fig-chit {
|
|
3319
|
+
--padding:0px;
|
|
3320
|
+
--height: var(--fig-input-gradient-height);
|
|
3321
|
+
--border-radius: var(--radius-medium);
|
|
3322
|
+
}
|
|
3323
|
+
.fig-input-gradient-track {
|
|
3324
|
+
inset: 0;
|
|
3325
|
+
}
|
|
3345
3326
|
}
|
|
3346
3327
|
|
|
3347
3328
|
.fig-input-gradient-track {
|
|
3348
3329
|
position: absolute;
|
|
3349
3330
|
display: flex;
|
|
3350
3331
|
align-items: center;
|
|
3351
|
-
inset: 0;
|
|
3332
|
+
inset: 0 var(--spacer-2-5);
|
|
3352
3333
|
pointer-events: auto;
|
|
3353
3334
|
z-index: 1;
|
|
3354
3335
|
|
|
@@ -3364,12 +3345,21 @@ fig-input-gradient {
|
|
|
3364
3345
|
}
|
|
3365
3346
|
|
|
3366
3347
|
fig-input-palette {
|
|
3367
|
-
|
|
3368
|
-
|
|
3348
|
+
--fig-input-palette-padding: var(--spacer-1);
|
|
3349
|
+
--fig-input-palette-height: 1.5rem;
|
|
3350
|
+
display: inline-grid !important;
|
|
3351
|
+
grid-template-columns: 1fr 24px;
|
|
3352
|
+
grid-template-areas:
|
|
3353
|
+
"inline button"
|
|
3354
|
+
"expanded expanded";
|
|
3369
3355
|
gap: var(--spacer-2);
|
|
3370
3356
|
min-width: 0;
|
|
3371
3357
|
border-radius: var(--radius-medium);
|
|
3372
3358
|
|
|
3359
|
+
> .palette-colors-inline {
|
|
3360
|
+
grid-area: inline;
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3373
3363
|
.palette-colors {
|
|
3374
3364
|
display: flex;
|
|
3375
3365
|
flex-wrap: nowrap;
|
|
@@ -3385,26 +3375,29 @@ fig-input-palette {
|
|
|
3385
3375
|
grid-area: button;
|
|
3386
3376
|
}
|
|
3387
3377
|
.palette-colors-inline {
|
|
3388
|
-
display:
|
|
3389
|
-
grid-template-columns: 1fr 24px;
|
|
3390
|
-
grid-template-areas: "inputs button";
|
|
3378
|
+
display: flex !important;
|
|
3391
3379
|
border-radius: var(--radius-medium);
|
|
3392
3380
|
width: 100%;
|
|
3393
3381
|
gap: var(--spacer-2);
|
|
3394
3382
|
place-items: center;
|
|
3383
|
+
height: var(--fig-input-palette-height);
|
|
3384
|
+
border-radius: var(--radius-medium);
|
|
3385
|
+
background-color: var(--figma-color-bg-secondary);
|
|
3386
|
+
padding: 0 var(--fig-input-palette-padding);
|
|
3395
3387
|
|
|
3396
3388
|
.palette-colors {
|
|
3397
3389
|
display: flex;
|
|
3398
|
-
|
|
3390
|
+
border-radius: var(--radius-small);
|
|
3391
|
+
--palette-colors-height: calc(var(--fig-input-palette-height) - var(--fig-input-palette-padding)*2);
|
|
3399
3392
|
height: var(--palette-colors-height);
|
|
3400
3393
|
fig-input-color {
|
|
3401
3394
|
width: 100%;
|
|
3402
3395
|
}
|
|
3403
3396
|
|
|
3404
3397
|
fig-chit {
|
|
3405
|
-
--padding: 0px;
|
|
3406
3398
|
--border-radius: 0px;
|
|
3407
3399
|
--width: 100%;
|
|
3400
|
+
--padding: 0px;
|
|
3408
3401
|
--height: var(--palette-colors-height);
|
|
3409
3402
|
--size: var(--palette-colors-height);
|
|
3410
3403
|
flex: 1;
|
|
@@ -3425,14 +3418,12 @@ fig-input-palette {
|
|
|
3425
3418
|
display: grid;
|
|
3426
3419
|
}
|
|
3427
3420
|
}
|
|
3428
|
-
&[add="false"] {
|
|
3429
|
-
|
|
3430
|
-
.palette-colors-inline {
|
|
3431
|
-
grid-template-areas: "inputs inputs";
|
|
3432
|
-
}
|
|
3421
|
+
&[add="false"] > .palette-colors-inline {
|
|
3422
|
+
grid-column: 1 / -1;
|
|
3433
3423
|
}
|
|
3434
3424
|
.palette-colors-expanded {
|
|
3435
3425
|
display: none;
|
|
3426
|
+
grid-area: expanded;
|
|
3436
3427
|
grid-template-columns: [input] 1fr [button] 1.5rem;
|
|
3437
3428
|
overflow: visible;
|
|
3438
3429
|
border-radius: 0;
|
|
@@ -4352,12 +4343,9 @@ fig-preview {
|
|
|
4352
4343
|
}
|
|
4353
4344
|
|
|
4354
4345
|
.fig-fill-picker-gradient-preview {
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
--height: 100%;
|
|
4359
|
-
aspect-ratio: 1/1;
|
|
4360
|
-
}
|
|
4346
|
+
aspect-ratio: auto;
|
|
4347
|
+
padding: var(--spacer-2-5) 0 0 0;
|
|
4348
|
+
|
|
4361
4349
|
}
|
|
4362
4350
|
|
|
4363
4351
|
.fig-fill-picker-gradient-stops {
|