figma-kit 1.0.0-beta.27 → 1.0.0-beta.28
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/dist/styles.css +25 -8
- package/dist/tailwind.css +29 -9
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -1248,6 +1248,16 @@
|
|
|
1248
1248
|
background-color: var(--figma-color-bg-selected-strong);
|
|
1249
1249
|
--color-icon: var(--figma-color-icon-onbrand);
|
|
1250
1250
|
}
|
|
1251
|
+
:root,
|
|
1252
|
+
.light,
|
|
1253
|
+
.light-theme {
|
|
1254
|
+
--switch-border-color: #00000033;
|
|
1255
|
+
--switch-thumb-outline-color-unchecked: #00000033;
|
|
1256
|
+
--switch-thumb-outline-color-checked: #0000001a;
|
|
1257
|
+
}
|
|
1258
|
+
.figma-dark {
|
|
1259
|
+
--switch-border-color: #ffffff33;
|
|
1260
|
+
}
|
|
1251
1261
|
.fp-switchRoot {
|
|
1252
1262
|
appearance: none;
|
|
1253
1263
|
box-sizing: border-box;
|
|
@@ -1266,18 +1276,26 @@
|
|
|
1266
1276
|
outline and the background in the focused mode as it is in Figma. */
|
|
1267
1277
|
}
|
|
1268
1278
|
.fp-switchRoot::before {
|
|
1279
|
+
box-sizing: border-box;
|
|
1269
1280
|
position: absolute;
|
|
1270
1281
|
inset: 0;
|
|
1282
|
+
border: 1px solid var(--switch-border-color);
|
|
1271
1283
|
border-radius: var(--radius-full);
|
|
1272
1284
|
background: none;
|
|
1273
1285
|
content: '';
|
|
1274
1286
|
}
|
|
1275
1287
|
.fp-switchRoot[data-unchecked]::before {
|
|
1288
|
+
background: var(--figma-color-bg-secondary);
|
|
1289
|
+
}
|
|
1290
|
+
.fp-switchRoot[data-unchecked]:active::before {
|
|
1276
1291
|
background: var(--figma-color-bg-tertiary);
|
|
1277
1292
|
}
|
|
1278
1293
|
.fp-switchRoot[data-checked]::before {
|
|
1279
1294
|
background: var(--figma-color-bg-brand);
|
|
1280
1295
|
}
|
|
1296
|
+
.fp-switchRoot[data-checked]:active::before {
|
|
1297
|
+
background: var(--figma-color-bg-brand-pressed);
|
|
1298
|
+
}
|
|
1281
1299
|
.fp-switchRoot:focus-visible {
|
|
1282
1300
|
outline-offset: -1px;
|
|
1283
1301
|
outline: 1px solid var(--figma-color-border-selected-strong);
|
|
@@ -1296,22 +1314,21 @@
|
|
|
1296
1314
|
.fp-switchThumb {
|
|
1297
1315
|
box-sizing: border-box;
|
|
1298
1316
|
position: absolute;
|
|
1299
|
-
top:
|
|
1300
|
-
left:
|
|
1301
|
-
height: var(--space-
|
|
1302
|
-
width: var(--space-
|
|
1317
|
+
top: var(--space-1);
|
|
1318
|
+
left: var(--space-1);
|
|
1319
|
+
height: var(--space-2);
|
|
1320
|
+
width: var(--space-3);
|
|
1303
1321
|
border-radius: var(--radius-full);
|
|
1322
|
+
outline: 1px solid var(--switch-thumb-outline-color-unchecked);
|
|
1304
1323
|
background: var(--figma-color-icon-onbrand);
|
|
1305
1324
|
transition: all 0.08s ease-out;
|
|
1306
1325
|
}
|
|
1307
1326
|
.fp-switchThumb[data-disabled] {
|
|
1308
1327
|
background-color: var(--figma-color-icon-ondisabled);
|
|
1309
1328
|
}
|
|
1310
|
-
.fp-switchThumb[data-unchecked] {
|
|
1311
|
-
left: 1px;
|
|
1312
|
-
}
|
|
1313
1329
|
.fp-switchThumb[data-checked] {
|
|
1314
|
-
left: calc(100% - var(--space-
|
|
1330
|
+
left: calc(100% - var(--space-3) - var(--space-1));
|
|
1331
|
+
outline-color: var(--switch-thumb-outline-color-checked);
|
|
1315
1332
|
}
|
|
1316
1333
|
:root,
|
|
1317
1334
|
.light,
|
package/dist/tailwind.css
CHANGED
|
@@ -1466,6 +1466,18 @@
|
|
|
1466
1466
|
}
|
|
1467
1467
|
@layer components {
|
|
1468
1468
|
|
|
1469
|
+
:root,
|
|
1470
|
+
.light,
|
|
1471
|
+
.light-theme {
|
|
1472
|
+
--switch-border-color: #00000033;
|
|
1473
|
+
--switch-thumb-outline-color-unchecked: #00000033;
|
|
1474
|
+
--switch-thumb-outline-color-checked: #0000001a;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
.figma-dark {
|
|
1478
|
+
--switch-border-color: #ffffff33;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1469
1481
|
.fp-switchRoot {
|
|
1470
1482
|
appearance: none;
|
|
1471
1483
|
box-sizing: border-box;
|
|
@@ -1484,14 +1496,20 @@
|
|
|
1484
1496
|
outline and the background in the focused mode as it is in Figma. */
|
|
1485
1497
|
}
|
|
1486
1498
|
.fp-switchRoot::before {
|
|
1499
|
+
box-sizing: border-box;
|
|
1487
1500
|
position: absolute;
|
|
1488
1501
|
inset: 0;
|
|
1502
|
+
border: 1px solid var(--switch-border-color);
|
|
1489
1503
|
border-radius: var(--radius-full);
|
|
1490
1504
|
background: none;
|
|
1491
1505
|
content: '';
|
|
1492
1506
|
}
|
|
1493
1507
|
|
|
1494
1508
|
.fp-switchRoot[data-unchecked]::before {
|
|
1509
|
+
background: var(--figma-color-bg-secondary);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
.fp-switchRoot[data-unchecked]:active::before {
|
|
1495
1513
|
background: var(--figma-color-bg-tertiary);
|
|
1496
1514
|
}
|
|
1497
1515
|
|
|
@@ -1499,6 +1517,10 @@
|
|
|
1499
1517
|
background: var(--figma-color-bg-brand);
|
|
1500
1518
|
}
|
|
1501
1519
|
|
|
1520
|
+
.fp-switchRoot[data-checked]:active::before {
|
|
1521
|
+
background: var(--figma-color-bg-brand-pressed);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1502
1524
|
.fp-switchRoot:focus-visible {
|
|
1503
1525
|
outline-offset: -1px;
|
|
1504
1526
|
outline: 1px solid var(--figma-color-border-selected-strong);
|
|
@@ -1520,11 +1542,12 @@
|
|
|
1520
1542
|
.fp-switchThumb {
|
|
1521
1543
|
box-sizing: border-box;
|
|
1522
1544
|
position: absolute;
|
|
1523
|
-
top:
|
|
1524
|
-
left:
|
|
1525
|
-
height: var(--space-
|
|
1526
|
-
width: var(--space-
|
|
1545
|
+
top: var(--space-1);
|
|
1546
|
+
left: var(--space-1);
|
|
1547
|
+
height: var(--space-2);
|
|
1548
|
+
width: var(--space-3);
|
|
1527
1549
|
border-radius: var(--radius-full);
|
|
1550
|
+
outline: 1px solid var(--switch-thumb-outline-color-unchecked);
|
|
1528
1551
|
background: var(--figma-color-icon-onbrand);
|
|
1529
1552
|
transition: all 0.08s ease-out;
|
|
1530
1553
|
}
|
|
@@ -1533,12 +1556,9 @@
|
|
|
1533
1556
|
background-color: var(--figma-color-icon-ondisabled);
|
|
1534
1557
|
}
|
|
1535
1558
|
|
|
1536
|
-
.fp-switchThumb[data-unchecked] {
|
|
1537
|
-
left: 1px;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
1559
|
.fp-switchThumb[data-checked] {
|
|
1541
|
-
left: calc(100% - var(--space-
|
|
1560
|
+
left: calc(100% - var(--space-3) - var(--space-1));
|
|
1561
|
+
outline-color: var(--switch-thumb-outline-color-checked);
|
|
1542
1562
|
}
|
|
1543
1563
|
}
|
|
1544
1564
|
@layer components {
|
package/package.json
CHANGED