figma-kit 1.0.0-beta.27 → 1.0.0-beta.29

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 CHANGED
@@ -928,6 +928,11 @@
928
928
  letter-spacing: var(--letter-spacing-default);
929
929
  color: var(--figma-color-text);
930
930
  }
931
+ .fp-SelectTrigger[data-disabled] {
932
+ color: var(--figma-color-text-disabled);
933
+ border-color: var(--figma-color-border-disabled);
934
+ --color-icon: var(--figma-color-icon-disabled);
935
+ }
931
936
  .fp-SelectTriggerIcon {
932
937
  margin-left: auto;
933
938
  }
@@ -1248,6 +1253,16 @@
1248
1253
  background-color: var(--figma-color-bg-selected-strong);
1249
1254
  --color-icon: var(--figma-color-icon-onbrand);
1250
1255
  }
1256
+ :root,
1257
+ .light,
1258
+ .light-theme {
1259
+ --switch-border-color: #00000033;
1260
+ --switch-thumb-outline-color-unchecked: #00000033;
1261
+ --switch-thumb-outline-color-checked: #0000001a;
1262
+ }
1263
+ .figma-dark {
1264
+ --switch-border-color: #ffffff33;
1265
+ }
1251
1266
  .fp-switchRoot {
1252
1267
  appearance: none;
1253
1268
  box-sizing: border-box;
@@ -1266,18 +1281,26 @@
1266
1281
  outline and the background in the focused mode as it is in Figma. */
1267
1282
  }
1268
1283
  .fp-switchRoot::before {
1284
+ box-sizing: border-box;
1269
1285
  position: absolute;
1270
1286
  inset: 0;
1287
+ border: 1px solid var(--switch-border-color);
1271
1288
  border-radius: var(--radius-full);
1272
1289
  background: none;
1273
1290
  content: '';
1274
1291
  }
1275
1292
  .fp-switchRoot[data-unchecked]::before {
1293
+ background: var(--figma-color-bg-secondary);
1294
+ }
1295
+ .fp-switchRoot[data-unchecked]:active::before {
1276
1296
  background: var(--figma-color-bg-tertiary);
1277
1297
  }
1278
1298
  .fp-switchRoot[data-checked]::before {
1279
1299
  background: var(--figma-color-bg-brand);
1280
1300
  }
1301
+ .fp-switchRoot[data-checked]:active::before {
1302
+ background: var(--figma-color-bg-brand-pressed);
1303
+ }
1281
1304
  .fp-switchRoot:focus-visible {
1282
1305
  outline-offset: -1px;
1283
1306
  outline: 1px solid var(--figma-color-border-selected-strong);
@@ -1296,22 +1319,21 @@
1296
1319
  .fp-switchThumb {
1297
1320
  box-sizing: border-box;
1298
1321
  position: absolute;
1299
- top: 1px;
1300
- left: 1px;
1301
- height: var(--space-3_5);
1302
- width: var(--space-3_5);
1322
+ top: var(--space-1);
1323
+ left: var(--space-1);
1324
+ height: var(--space-2);
1325
+ width: var(--space-3);
1303
1326
  border-radius: var(--radius-full);
1327
+ outline: 1px solid var(--switch-thumb-outline-color-unchecked);
1304
1328
  background: var(--figma-color-icon-onbrand);
1305
1329
  transition: all 0.08s ease-out;
1306
1330
  }
1307
1331
  .fp-switchThumb[data-disabled] {
1308
1332
  background-color: var(--figma-color-icon-ondisabled);
1309
1333
  }
1310
- .fp-switchThumb[data-unchecked] {
1311
- left: 1px;
1312
- }
1313
1334
  .fp-switchThumb[data-checked] {
1314
- left: calc(100% - var(--space-3_5) - 1px);
1335
+ left: calc(100% - var(--space-3) - var(--space-1));
1336
+ outline-color: var(--switch-thumb-outline-color-checked);
1315
1337
  }
1316
1338
  :root,
1317
1339
  .light,
package/dist/tailwind.css CHANGED
@@ -1074,6 +1074,12 @@
1074
1074
  color: var(--figma-color-text);
1075
1075
  }
1076
1076
 
1077
+ .fp-SelectTrigger[data-disabled] {
1078
+ color: var(--figma-color-text-disabled);
1079
+ border-color: var(--figma-color-border-disabled);
1080
+ --color-icon: var(--figma-color-icon-disabled);
1081
+ }
1082
+
1077
1083
  .fp-SelectTriggerIcon {
1078
1084
  margin-left: auto;
1079
1085
  }
@@ -1466,6 +1472,18 @@
1466
1472
  }
1467
1473
  @layer components {
1468
1474
 
1475
+ :root,
1476
+ .light,
1477
+ .light-theme {
1478
+ --switch-border-color: #00000033;
1479
+ --switch-thumb-outline-color-unchecked: #00000033;
1480
+ --switch-thumb-outline-color-checked: #0000001a;
1481
+ }
1482
+
1483
+ .figma-dark {
1484
+ --switch-border-color: #ffffff33;
1485
+ }
1486
+
1469
1487
  .fp-switchRoot {
1470
1488
  appearance: none;
1471
1489
  box-sizing: border-box;
@@ -1484,14 +1502,20 @@
1484
1502
  outline and the background in the focused mode as it is in Figma. */
1485
1503
  }
1486
1504
  .fp-switchRoot::before {
1505
+ box-sizing: border-box;
1487
1506
  position: absolute;
1488
1507
  inset: 0;
1508
+ border: 1px solid var(--switch-border-color);
1489
1509
  border-radius: var(--radius-full);
1490
1510
  background: none;
1491
1511
  content: '';
1492
1512
  }
1493
1513
 
1494
1514
  .fp-switchRoot[data-unchecked]::before {
1515
+ background: var(--figma-color-bg-secondary);
1516
+ }
1517
+
1518
+ .fp-switchRoot[data-unchecked]:active::before {
1495
1519
  background: var(--figma-color-bg-tertiary);
1496
1520
  }
1497
1521
 
@@ -1499,6 +1523,10 @@
1499
1523
  background: var(--figma-color-bg-brand);
1500
1524
  }
1501
1525
 
1526
+ .fp-switchRoot[data-checked]:active::before {
1527
+ background: var(--figma-color-bg-brand-pressed);
1528
+ }
1529
+
1502
1530
  .fp-switchRoot:focus-visible {
1503
1531
  outline-offset: -1px;
1504
1532
  outline: 1px solid var(--figma-color-border-selected-strong);
@@ -1520,11 +1548,12 @@
1520
1548
  .fp-switchThumb {
1521
1549
  box-sizing: border-box;
1522
1550
  position: absolute;
1523
- top: 1px;
1524
- left: 1px;
1525
- height: var(--space-3_5);
1526
- width: var(--space-3_5);
1551
+ top: var(--space-1);
1552
+ left: var(--space-1);
1553
+ height: var(--space-2);
1554
+ width: var(--space-3);
1527
1555
  border-radius: var(--radius-full);
1556
+ outline: 1px solid var(--switch-thumb-outline-color-unchecked);
1528
1557
  background: var(--figma-color-icon-onbrand);
1529
1558
  transition: all 0.08s ease-out;
1530
1559
  }
@@ -1533,12 +1562,9 @@
1533
1562
  background-color: var(--figma-color-icon-ondisabled);
1534
1563
  }
1535
1564
 
1536
- .fp-switchThumb[data-unchecked] {
1537
- left: 1px;
1538
- }
1539
-
1540
1565
  .fp-switchThumb[data-checked] {
1541
- left: calc(100% - var(--space-3_5) - 1px);
1566
+ left: calc(100% - var(--space-3) - var(--space-1));
1567
+ outline-color: var(--switch-thumb-outline-color-checked);
1542
1568
  }
1543
1569
  }
1544
1570
  @layer components {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "figma-kit",
3
3
  "description": "A set of React components for building Figma plugins.",
4
4
  "homepage": "https://figma-kit.dev",
5
- "version": "1.0.0-beta.27",
5
+ "version": "1.0.0-beta.29",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",