@rogieking/figui3 4.15.9 → 5.1.0

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 CHANGED
@@ -349,6 +349,13 @@
349
349
  --icon-24-swap: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.35355 6.35355C8.54882 6.15829 8.54882 5.84171 8.35355 5.64645C8.15829 5.45118 7.84171 5.45118 7.64645 5.64645L5.14645 8.14645C4.95118 8.34171 4.95118 8.65829 5.14645 8.85355L7.64645 11.3536C7.84171 11.5488 8.15829 11.5488 8.35355 11.3536C8.54882 11.1583 8.54882 10.8417 8.35355 10.6464L6.70711 9H18.5C18.7761 9 19 8.77614 19 8.5C19 8.22386 18.7761 8 18.5 8H6.70711L8.35355 6.35355ZM15.6464 13.3536C15.4512 13.1583 15.4512 12.8417 15.6464 12.6464C15.8417 12.4512 16.1583 12.4512 16.3536 12.6464L18.8536 15.1464C19.0488 15.3417 19.0488 15.6583 18.8536 15.8536L16.3536 18.3536C16.1583 18.5488 15.8417 18.5488 15.6464 18.3536C15.4512 18.1583 15.4512 17.8417 15.6464 17.6464L17.2929 16H5.5C5.22386 16 5 15.7761 5 15.5C5 15.2239 5.22386 15 5.5 15H17.2929L15.6464 13.3536Z' fill='currentColor'/%3E%3C/svg%3E");
350
350
  --icon-24-play: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 7.75274C7 6.4055 8.45837 5.56342 9.625 6.23712L17.2109 10.619C18.277 11.2349 18.2771 12.7745 17.2109 13.3904L9.625 17.7723C8.45843 18.4459 7.00013 17.6038 7 16.2566V7.75274ZM9.125 7.10333C8.625 6.8145 8 7.17532 8 7.75274V16.2566C8.00013 16.834 8.62505 17.1949 9.125 16.9061L16.7109 12.5242C17.1107 12.2933 17.1106 11.7162 16.7109 11.4852L9.125 7.10333Z' fill='currentColor'/%3E%3C/svg%3E");
351
351
  --icon-24-pause: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.65332 6.00781C10.4097 6.08461 11 6.72334 11 7.5V16.5C11 17.2767 10.4097 17.9154 9.65332 17.9922L9.5 18H7.5C6.67157 18 6 17.3284 6 16.5V7.5C6 6.67157 6.67157 6 7.5 6H9.5L9.65332 6.00781ZM16.6533 6.00781C17.4097 6.08461 18 6.72334 18 7.5V16.5C18 17.2767 17.4097 17.9154 16.6533 17.9922L16.5 18H14.5C13.6716 18 13 17.3284 13 16.5V7.5C13 6.67157 13.6716 6 14.5 6H16.5L16.6533 6.00781ZM7.5 7C7.22386 7 7 7.22386 7 7.5V16.5C7 16.7761 7.22386 17 7.5 17H9.5C9.77614 17 10 16.7761 10 16.5V7.5C10 7.22386 9.77614 7 9.5 7H7.5ZM14.5 7C14.2239 7 14 7.22386 14 7.5V16.5C14 16.7761 14.2239 17 14.5 17H16.5C16.7761 17 17 16.7761 17 16.5V7.5C17 7.22386 16.7761 7 16.5 7H14.5Z' fill='currentColor'/%3E%3C/svg%3E");
352
+ --icon-24-search: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.5 6C14.5376 6 17 8.46243 17 11.5C17 12.8387 16.5206 14.0648 15.7256 15.0186L17.8535 17.1465C18.0488 17.3417 18.0488 17.6582 17.8535 17.8535C17.6583 18.0486 17.3417 18.0487 17.1465 17.8535L15.0186 15.7256C14.0648 16.5206 12.8387 17 11.5 17C8.46243 17 6 14.5376 6 11.5C6 8.46243 8.46243 6 11.5 6ZM11.5 7C9.01472 7 7 9.01472 7 11.5C7 13.9853 9.01472 16 11.5 16C13.9853 16 16 13.9853 16 11.5C16 9.01472 13.9853 7 11.5 7Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
353
+ --icon-16-close: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.1464 4.14645C11.3417 3.95118 11.6582 3.95118 11.8534 4.14645C12.0487 4.34171 12.0487 4.65822 11.8534 4.85348L8.70696 7.99996L11.8534 11.1464C12.0487 11.3417 12.0487 11.6582 11.8534 11.8535C11.6582 12.0487 11.3417 12.0487 11.1464 11.8535L7.99993 8.70699L4.85345 11.8535C4.65819 12.0487 4.34168 12.0487 4.14642 11.8535C3.95115 11.6582 3.95115 11.3417 4.14642 11.1464L7.2929 7.99996L4.14642 4.85348C3.95115 4.65822 3.95115 4.34171 4.14642 4.14645C4.34168 3.95118 4.65819 3.95118 4.85345 4.14645L7.99993 7.29293L11.1464 4.14645Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
354
+ --icon-24-visible: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 7C16.6667 7 19 10.75 19 12C19 13.25 16.6667 17 12 17C7.47888 17 5.14784 13.4802 5.00684 12.124L5 12C5 10.75 7.33333 7 12 7ZM12 8C9.95481 8 8.44137 8.81596 7.43359 9.76074C6.92603 10.2366 6.55333 10.7404 6.3125 11.1758C6.05459 11.6422 6 11.9345 6 12C6.00002 12.0656 6.05462 12.3579 6.3125 12.8242C6.55334 13.2597 6.92602 13.7634 7.43359 14.2393C8.44138 15.1841 9.95482 16 12 16C14.0452 16 15.5586 15.1841 16.5664 14.2393C17.074 13.7634 17.4467 13.2597 17.6875 12.8242C17.9454 12.3578 18 12.0655 18 12C18 11.9345 17.9454 11.6422 17.6875 11.1758C17.4467 10.7403 17.074 10.2366 16.5664 9.76074C15.5586 8.81595 14.0452 8 12 8ZM12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10ZM12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
355
+ --icon-16-visible: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4C11.5 4 14 7 14 8C14 9 11.5 12 8 12C4.5 12 2 9 2 8C2 7 4.5 4 8 4ZM8 5C6.60166 5 5.36649 5.57587 4.44238 6.30176C3.98232 6.66314 3.61689 7.04836 3.36328 7.38867C3.13535 7.69455 3.04058 7.90734 3.00977 8C3.04058 8.09266 3.13535 8.30545 3.36328 8.61133C3.61689 8.95164 3.98232 9.33686 4.44238 9.69824C5.36649 10.4241 6.60166 11 8 11C9.39834 11 10.6335 10.4241 11.5576 9.69824C12.0177 9.33686 12.3831 8.95163 12.6367 8.61133C12.8644 8.30577 12.9583 8.09281 12.9893 8C12.9583 7.90719 12.8644 7.69423 12.6367 7.38867C12.3831 7.04836 12.0177 6.66314 11.5576 6.30176C10.6335 5.57587 9.39834 5 8 5ZM8 7C8.55228 7 9 7.44772 9 8C9 8.55228 8.55228 9 8 9C7.44772 9 7 8.55228 7 8C7 7.44772 7.44772 7 8 7Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
356
+ --icon-24-hidden: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.51343 9C5.78194 9 6.03192 9.21752 6.13647 9.46484C6.18062 9.56923 6.2378 9.68955 6.31225 9.82422C6.55304 10.2596 6.92594 10.7635 7.43335 11.2393C8.44103 12.184 9.95488 12.9998 11.9998 13C14.0447 13 15.5584 12.1839 16.5662 11.2393C17.0736 10.7635 17.4464 10.2596 17.6873 9.82422C17.7588 9.69491 17.8147 9.57896 17.8582 9.47754C17.9668 9.22373 18.2237 9.0001 18.4998 9C18.7757 9 18.9947 9.22463 18.9167 9.48926C18.7151 10.1715 18.146 11.1394 17.2107 12.0039L18.3533 13.1465C18.5485 13.3417 18.5485 13.6583 18.3533 13.8535C18.158 14.0486 17.8414 14.0487 17.6462 13.8535L16.4275 12.6348C15.8837 13.0163 15.2541 13.3499 14.5378 13.5918L14.9851 15.3789C15.0519 15.6467 14.8887 15.9184 14.6208 15.9854C14.3532 16.0519 14.0813 15.8888 14.0144 15.6211L13.571 13.8486C13.0805 13.9449 12.5568 14 11.9998 14C11.4423 14 10.9184 13.945 10.4275 13.8486L9.98511 15.6211C9.91811 15.8889 9.64645 16.0522 9.37866 15.9854C9.11111 15.9182 8.94768 15.6466 9.0144 15.3789L9.46069 13.5908C8.74459 13.3488 8.11371 13.0173 7.57007 12.6357L6.35327 13.8535C6.15799 14.0486 5.84143 14.0487 5.64624 13.8535C5.45126 13.6583 5.45126 13.3417 5.64624 13.1465L6.78882 12.0029C5.67043 10.9689 5.07561 9.78781 5.00659 9.12402C5.00289 9.05679 5.05649 9.00021 5.12378 9H5.51343Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
357
+ --icon-16-hidden: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.4138 5.5C13.7373 5.5 13.9807 5.76652 13.8415 6.05859C13.6075 6.54952 13.1215 7.17678 12.4421 7.7627L13.4157 9.22266C13.5689 9.45242 13.5068 9.76284 13.277 9.91602C13.0473 10.069 12.7368 10.007 12.5837 9.77734L11.6413 8.36328C11.1673 8.67367 10.6355 8.9499 10.0524 9.15039L10.4851 10.8789C10.5519 11.1467 10.3886 11.4184 10.1208 11.4854C9.85308 11.5519 9.58128 11.3888 9.51435 11.1211L9.08466 9.40332C8.7357 9.46559 8.37327 9.5 7.9997 9.5C7.62569 9.49998 7.2631 9.46575 6.91376 9.40332L6.48505 11.1211C6.41806 11.3889 6.1464 11.5522 5.87861 11.4854C5.61102 11.4183 5.44761 11.1466 5.51435 10.8789L5.94599 9.15039C5.36302 8.94979 4.83099 8.67372 4.35712 8.36328L3.41572 9.77734C3.2625 10.007 2.95206 10.0692 2.72236 9.91602C2.49286 9.76282 2.43071 9.45232 2.58368 9.22266L3.55634 7.76172C2.8777 7.1762 2.3927 6.54916 2.15888 6.05859C2.01973 5.76657 2.26219 5.50011 2.58564 5.5C3.05129 5.5 3.02196 5.6191 3.27021 5.98145C3.50192 6.31962 3.85806 6.72067 4.32294 7.10352C5.25669 7.87247 6.53958 8.49991 7.9997 8.5C9.45975 8.5 10.7427 7.87238 11.6765 7.10352C12.1413 6.72067 12.4985 6.31962 12.7302 5.98145C12.981 5.61523 12.9588 5.50007 13.4138 5.5Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
358
+
352
359
  --tip-pointer: path("M8 6L2 0H14L8 6Z");
353
360
 
354
361
 
@@ -365,12 +372,20 @@
365
372
  inset 0px 0.5px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.08)),
366
373
  inset 0px 0px 0.5px 0px light-dark(transparent, rgba(255, 255, 255, 0.3));
367
374
 
368
- --elevation-100-canvas:
375
+ --figma-elevation-100-canvas:
369
376
  0 0 0.5px 0 light-dark(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
370
377
  0 0.5px 0 0 light-dark(transparent, rgba(255, 255, 255, 0.1)) inset,
371
378
  0 0 0.5px 0 light-dark(transparent, rgba(255, 255, 255, 0.3)) inset,
372
379
  0 1px 3px 0 light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4));
373
380
 
381
+
382
+ --figma-elevation-200-canvas:
383
+ 0 0 0.5px 0 light-dark(rgba(0, 0, 0, 0.18), transparent),
384
+ 0 0.5px 0 0 light-dark(transparent, rgba(255, 255, 255, 0.08)) inset,
385
+ 0 3px 8px 0 light-dark(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.35)),
386
+ 0 0 0.5px 0 light-dark(transparent, rgba(255, 255, 255, 0.30)) inset,
387
+ 0 1px 3px 0 light-dark(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.50));
388
+
374
389
  --figma-elevation-400-menu-panel:
375
390
  0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.12), transparent),
376
391
  0px 10px 16px 0px light-dark(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.35)),
@@ -473,6 +488,11 @@ fig-input-number .fig-steppers {
473
488
  &:active{
474
489
  background-color: var(--figma-color-text) !important;
475
490
  }
491
+
492
+ &:disabled {
493
+ pointer-events: none;
494
+ background-color: var(--figma-color-text-disabled);
495
+ }
476
496
  }
477
497
 
478
498
  fig-input-number[disabled]:not([disabled="false"]) & button {
@@ -709,6 +729,9 @@ input[type="text"][list] {
709
729
  align-items: center;
710
730
  gap: 0;
711
731
  min-width: 0;
732
+ text-overflow: ellipsis;
733
+ overflow: hidden;
734
+ width: 100%;
712
735
  &:has(> svg) {
713
736
  margin-left: calc(var(--spacer-2) * -1);
714
737
  }
@@ -856,15 +879,19 @@ fig-button {
856
879
  }
857
880
  /* Variant: Secondary */
858
881
  &[variant="secondary"] {
859
- box-shadow: inset 0 0 0 1px var(--figma-color-border);
882
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
860
883
  padding: 0 calc(var(--spacer-2) - 1px);
861
884
  background: none;
862
885
  color: var(--figma-color-text);
863
886
 
864
- &:active {
865
- background-color: var(--figma-color-bg-secondary);
887
+ &:active,
888
+ &:active:hover {
889
+ background-color: var(--figma-color-bg-transparent-pressed);
866
890
  color: var(--figma-color-text);
867
891
  }
892
+ &:hover {
893
+ background-color: var(--figma-color-bg-secondary);
894
+ }
868
895
  }
869
896
 
870
897
  /* Variant: Input */
@@ -874,12 +901,13 @@ fig-button {
874
901
  color: var(--figma-color-text);
875
902
 
876
903
  &:hover {
877
- box-shadow: inset 0 0 0 1px var(--figma-color-border);
904
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
878
905
  background-color: var(--figma-color-bg-transparent);
879
906
  }
880
907
 
881
- &:active {
882
- background-color: var(--figma-color-bg-secondary);
908
+ &:active,
909
+ &:active:hover {
910
+ background-color: var(--figma-color-bg-transparent-pressed);
883
911
  color: var(--figma-color-text);
884
912
  }
885
913
 
@@ -1392,6 +1420,7 @@ fig-input-file {
1392
1420
  align-items: center;
1393
1421
  gap: var(--spacer-2);
1394
1422
  min-width: 0;
1423
+ max-width: 100%;
1395
1424
 
1396
1425
  &[full]:not([full="false"]) {
1397
1426
  flex: 1 1 auto;
@@ -1491,7 +1520,7 @@ fig-video {
1491
1520
  opacity: 0;
1492
1521
  pointer-events: none;
1493
1522
  }
1494
- &:is(:not([src]), [src=""]) > img.fig-media-element[data-generated] {
1523
+ &:not(:has(> img.fig-media-element[data-generated][src]:not([src=""]))) > img.fig-media-element[data-generated] {
1495
1524
  opacity: 0;
1496
1525
  pointer-events: none;
1497
1526
  }
@@ -1499,8 +1528,9 @@ fig-video {
1499
1528
  opacity: 0;
1500
1529
  pointer-events: none;
1501
1530
  z-index: 2;
1531
+ max-width:calc(100% - var(--spacer-4));
1502
1532
  }
1503
- &:is(:not([src]), [src=""]) > fig-input-file[data-generated],
1533
+ &:not(:has(> img.fig-media-element[data-generated][src]:not([src=""]))) > fig-input-file[data-generated],
1504
1534
  &:hover > fig-input-file[data-generated] {
1505
1535
  opacity: 1;
1506
1536
  pointer-events: all;
@@ -1519,7 +1549,7 @@ fig-video {
1519
1549
  fig-media-controls {
1520
1550
  display: flex;
1521
1551
  align-items: center;
1522
- gap: var(--spacer-2);
1552
+ gap: var(--spacer-1);
1523
1553
  width: 100%;
1524
1554
 
1525
1555
 
@@ -1541,6 +1571,7 @@ fig-media-controls {
1541
1571
  font-variant-numeric: tabular-nums;
1542
1572
  white-space: nowrap;
1543
1573
  padding-right: var(--spacer-2);
1574
+ padding-left: var(--spacer-1);
1544
1575
  }
1545
1576
  }
1546
1577
 
@@ -1600,6 +1631,10 @@ fig-easing-curve {
1600
1631
  stroke-width: var(--stroke-width);
1601
1632
  stroke-linejoin: round;
1602
1633
  stroke-linecap: round;
1634
+
1635
+ &.is-active {
1636
+ stroke: var(--figma-color-bg-brand);
1637
+ }
1603
1638
  }
1604
1639
  .fig-easing-curve-path {
1605
1640
  fill: none;
@@ -1658,7 +1693,7 @@ fig-3d-rotate {
1658
1693
  --figma-3d-rotate-handle-size: 6px;
1659
1694
  --front-face-bg: light-dark(var(--figma-color-bg), #555);
1660
1695
 
1661
- fig-field[direction="horizontal"] & {
1696
+ fig-field:not([direction="vertical"]) & {
1662
1697
  flex: 1;
1663
1698
  min-width: 0;
1664
1699
  }
@@ -1722,14 +1757,14 @@ fig-3d-rotate {
1722
1757
  background: var(--figma-color-border-strong) !important;
1723
1758
  inset: -1px;
1724
1759
  border-radius: var(--radius-medium);
1725
- box-shadow: var(--elevation-100-canvas);
1760
+ box-shadow: var(--figma-elevation-100-canvas);
1726
1761
  }
1727
1762
 
1728
1763
  &.front {
1729
1764
  background: var(--front-face-bg);
1730
1765
  border-radius: var(--radius-medium);
1731
1766
  transform-style: preserve-3d;
1732
- box-shadow: var(--elevation-100-canvas);
1767
+ box-shadow: var(--figma-elevation-100-canvas);
1733
1768
  inset: -1px;
1734
1769
 
1735
1770
  &::after {
@@ -1841,7 +1876,7 @@ fig-origin-grid {
1841
1876
  --origin-grid-handle-size: 0.75rem;
1842
1877
  --origin-grid-height: var(--spacer-4);
1843
1878
 
1844
- fig-field[direction="horizontal"] & {
1879
+ fig-field:not([direction="vertical"]) & {
1845
1880
  flex: 1;
1846
1881
  min-width: 0;
1847
1882
  }
@@ -2684,7 +2719,7 @@ fig-slider {
2684
2719
  }
2685
2720
  }
2686
2721
 
2687
- &[variant="neue"] {
2722
+ &:not([variant="classic"]) {
2688
2723
  --slider-height: 0.375rem;
2689
2724
  --slider-thumb-size: 0.75rem;
2690
2725
  --slider-tick-width: calc(var(--slider-height) / 2);
@@ -2702,7 +2737,7 @@ fig-slider {
2702
2737
  border-radius: var(--radius-medium);
2703
2738
  padding-left: var(--spacer-2);
2704
2739
 
2705
- &:not([text="true"]) {
2740
+ &[text="false"] {
2706
2741
  padding-right: var(--spacer-2);
2707
2742
  }
2708
2743
 
@@ -3032,13 +3067,14 @@ fig-tooltip {
3032
3067
  fig-preview {
3033
3068
  --fig-preview-fit: contain;
3034
3069
 
3035
- display: inline-grid;
3070
+ display: block;
3036
3071
  place-items: center;
3037
3072
  min-width: 0;
3038
3073
  max-width: 100%;
3039
3074
  background-color: var(--figma-color-bg-secondary);
3040
3075
  border-radius: var(--radius-medium);
3041
3076
  position: relative;
3077
+ overflow: hidden;
3042
3078
 
3043
3079
  &[full]:not([full="false"]) {
3044
3080
  width: 100%;
@@ -3050,30 +3086,20 @@ fig-preview {
3050
3086
 
3051
3087
  &::after {
3052
3088
  content: "";
3053
- grid-area: 1/1;
3054
- place-self: stretch;
3089
+ position: absolute;
3090
+ inset: 0;
3055
3091
  border-radius: inherit;
3056
3092
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
3057
3093
  pointer-events: none;
3058
3094
  z-index: 2;
3059
3095
  }
3060
3096
 
3061
- > * {
3062
- grid-area: 1/1;
3063
- min-width: 0;
3064
- min-height: 0;
3065
- }
3066
-
3067
3097
  > :is(img, video, canvas, svg) {
3068
3098
  display: block;
3069
- max-width: 100%;
3070
- max-height: 100%;
3099
+ width: stretch;
3100
+ height: stretch;
3071
3101
  object-fit: var(--fig-preview-fit);
3072
3102
  object-position: center;
3073
- border-radius: 0;
3074
- }
3075
- > canvas{
3076
- border-radius: inherit;
3077
3103
  }
3078
3104
  }
3079
3105
 
@@ -3350,6 +3376,12 @@ fig-input-number {
3350
3376
  padding-left: 0;
3351
3377
  margin-left: calc(var(--spacer-2) * -1);
3352
3378
  }
3379
+
3380
+ &[type="search"]:not([data-search-has-value]) [data-generated="search-clear"] {
3381
+ visibility: hidden;
3382
+ pointer-events: none;
3383
+ }
3384
+
3353
3385
  & [slot="prepend"],
3354
3386
  & [slot="append"] {
3355
3387
  svg {
@@ -3372,6 +3404,17 @@ fig-input-number {
3372
3404
  }
3373
3405
  }
3374
3406
 
3407
+ & input[type="search"] {
3408
+ appearance: textfield;
3409
+ &::-webkit-search-cancel-button,
3410
+ &::-webkit-search-decoration,
3411
+ &::-webkit-search-results-button,
3412
+ &::-webkit-search-results-decoration {
3413
+ appearance: none;
3414
+ display: none;
3415
+ }
3416
+ }
3417
+
3375
3418
  &:has(input:focus) {
3376
3419
  box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
3377
3420
  outline: 0;
@@ -3390,6 +3433,10 @@ fig-input-number {
3390
3433
  color: var(--figma-color-text-disabled);
3391
3434
  }
3392
3435
  }
3436
+ &[readonly]{
3437
+ background-color: var(--figma-color-bg);
3438
+ box-shadow: inset 0 0 0 1px var(--figma-color-border-disabled);
3439
+ }
3393
3440
  }
3394
3441
 
3395
3442
  fig-input-number > [slot],
@@ -3450,13 +3497,7 @@ fig-input-fill {
3450
3497
  background-color: transparent !important;
3451
3498
  }
3452
3499
 
3453
- &[disabled]:not([disabled="false"]) {
3454
- .input-combo {
3455
- gap: 0;
3456
- }
3457
- }
3458
-
3459
- fig-field[direction="horizontal"] & {
3500
+ fig-field:not([direction="vertical"]) & {
3460
3501
  flex: 1;
3461
3502
  min-width: 0;
3462
3503
  }
@@ -3476,6 +3517,12 @@ fig-input-gradient {
3476
3517
  outline-offset: -1px !important;
3477
3518
  }
3478
3519
 
3520
+ fig-handle{
3521
+ --height: 14px;
3522
+ --width: 14px;
3523
+
3524
+ }
3525
+
3479
3526
  &[edit="false"] {
3480
3527
  pointer-events: none;
3481
3528
 
@@ -3665,18 +3712,24 @@ fig-field {
3665
3712
  --fig-field-label-ratio: 1fr;
3666
3713
  --fig-field-input-ratio: 2fr;
3667
3714
  display: grid;
3668
- grid-template-columns: var(--fig-field-left-padding) 1fr var(
3669
- --fig-field-right-padding
3670
- );
3671
- grid-template-rows: auto auto;
3672
- grid-template-areas:
3673
- "chevron label pad"
3674
- ". input pad";
3715
+ grid-template-columns:
3716
+ var(--fig-field-left-padding) minmax(0, var(--fig-field-label-ratio))
3717
+ minmax(0, var(--fig-field-input-ratio)) var(--fig-field-right-padding);
3718
+ grid-template-areas: "chevron label input pad";
3675
3719
  margin: 0;
3676
3720
  padding: var(--fig-field-top-padding) 0 var(--fig-field-bottom-padding) 0;
3677
3721
  gap: 0;
3678
3722
  align-items: start;
3679
3723
 
3724
+ &[columns="half"] {
3725
+ --fig-field-label-ratio: 2fr;
3726
+ }
3727
+
3728
+ &[columns="2/5"] {
3729
+ --fig-field-label-ratio: 2fr;
3730
+ --fig-field-input-ratio: 3fr;
3731
+ }
3732
+
3680
3733
  & > [full] {
3681
3734
  flex: 1 1 auto;
3682
3735
  }
@@ -3692,6 +3745,11 @@ fig-field {
3692
3745
  padding: var(--spacer-1) 0;
3693
3746
  line-height: 1rem;
3694
3747
  user-select: none;
3748
+ overflow: hidden;
3749
+ text-overflow: ellipsis;
3750
+ white-space: nowrap;
3751
+ margin-right: var(--fig-field-gap);
3752
+ min-width: 0;
3695
3753
  }
3696
3754
 
3697
3755
  & > *:not(.fig-field-chevron):not(label) {
@@ -3714,45 +3772,42 @@ fig-field {
3714
3772
  transform: rotate(0deg);
3715
3773
  }
3716
3774
 
3717
- &[direction="horizontal"] {
3718
- display: grid;
3775
+ /* labelless fields can have a few inputs */
3776
+ &:not([direction="vertical"]):not(:has(> label)) {
3719
3777
  grid-template-columns:
3720
3778
  var(--fig-field-left-padding) minmax(0, var(--fig-field-label-ratio))
3779
+ var(--spacer-2)
3721
3780
  minmax(0, var(--fig-field-input-ratio)) var(--fig-field-right-padding);
3722
- grid-template-areas: "chevron label input pad";
3723
- gap: 0;
3724
- align-items: start;
3781
+ grid-template-areas: "chevron input1 gap input2 pad";
3725
3782
 
3726
- &[columns="half"] {
3727
- --fig-field-label-ratio: 2fr;
3783
+ & > *:first-child {
3784
+ grid-area: input1;
3728
3785
  }
3729
- &[columns="2/5"] {
3730
- --fig-field-label-ratio: 2fr;
3731
- --fig-field-input-ratio: 3fr;
3786
+
3787
+ & > *:last-child {
3788
+ grid-area: input2;
3732
3789
  }
3733
- & > label {
3734
- overflow: hidden;
3735
- text-overflow: ellipsis;
3736
- white-space: nowrap;
3737
- margin-right: var(--fig-field-gap);
3738
- min-width: 0;
3790
+
3791
+ & > *:only-child {
3792
+ grid-column: input1 / -2;
3739
3793
  }
3740
- /* labelless fields can have a few inputs */
3741
- &:not(:has(> label)) {
3742
- grid-template-columns:
3743
- var(--fig-field-left-padding) minmax(0, var(--fig-field-label-ratio))
3744
- var(--spacer-2)
3745
- minmax(0, var(--fig-field-input-ratio)) var(--fig-field-right-padding);
3746
- grid-template-areas: "chevron input1 gap input2 pad";
3747
- & > *:first-child {
3748
- grid-area: input1;
3749
- }
3750
- & > *:last-child {
3751
- grid-area: input2;
3752
- }
3753
- & > *:only-child {
3754
- grid-column: input1 / -2;
3755
- }
3794
+ }
3795
+
3796
+ &[direction="vertical"] {
3797
+ grid-template-columns: var(--fig-field-left-padding) 1fr var(
3798
+ --fig-field-right-padding
3799
+ );
3800
+ grid-template-rows: auto auto;
3801
+ grid-template-areas:
3802
+ "chevron label pad"
3803
+ ". input pad";
3804
+
3805
+ & > label {
3806
+ overflow: visible;
3807
+ text-overflow: clip;
3808
+ white-space: normal;
3809
+ margin-right: 0;
3810
+ min-width: auto;
3756
3811
  }
3757
3812
  }
3758
3813
  }
@@ -3932,7 +3987,7 @@ fig-joystick {
3932
3987
  width: var(--size);
3933
3988
 
3934
3989
  /* When inside horizontal fig-field, grow to fill and let inputs expand */
3935
- fig-field[direction="horizontal"] & {
3990
+ fig-field:not([direction="vertical"]) & {
3936
3991
  flex: 1;
3937
3992
  min-width: 0;
3938
3993
 
@@ -4392,335 +4447,6 @@ fig-skeleton {
4392
4447
  }
4393
4448
  }
4394
4449
 
4395
- /* Fill Picker */
4396
- fig-fill-picker {
4397
- display: contents;
4398
-
4399
- > [slot^="mode-"] {
4400
- display: none;
4401
- }
4402
- }
4403
-
4404
- .fig-fill-picker-dialog {
4405
- contain: layout;
4406
- width: 240px;
4407
- padding: 0;
4408
-
4409
- & > fig-header {
4410
- padding: var(--spacer-2);
4411
- display: flex;
4412
- justify-content: space-between;
4413
- align-items: center;
4414
- }
4415
-
4416
- fig-tab {
4417
- font-size: 0.6875rem;
4418
- padding: var(--spacer-1) var(--spacer-1);
4419
- }
4420
- & > fig-content {
4421
- padding-bottom: var(--spacer-2-5);
4422
- }
4423
- .fig-fill-picker-type-label {
4424
- font-size: var(--font-size-small);
4425
- font-weight: var(--font-weight-medium);
4426
- color: var(--figma-color-text);
4427
- padding: var(--spacer-1) var(--spacer-2);
4428
- }
4429
-
4430
- .fig-fill-picker-gamut {
4431
- margin-left: auto;
4432
- }
4433
-
4434
- .fig-fill-picker-tab {
4435
- display: none;
4436
-
4437
- &:first-child {
4438
- display: block;
4439
- }
4440
- }
4441
-
4442
- .fig-fill-picker-color-area {
4443
- aspect-ratio: 1;
4444
- width: calc(100% - var(--spacer-3) * 2);
4445
- margin: var(--spacer-2) var(--spacer-3);
4446
-
4447
- > *:not(fig-handle) {
4448
- place-self: center;
4449
- width: 100%;
4450
- height: 100%;
4451
- border-radius: inherit;
4452
- }
4453
-
4454
- canvas {
4455
- width: 100%;
4456
- height: 100%;
4457
- border-radius: var(--radius-medium);
4458
- }
4459
- }
4460
-
4461
- .fig-fill-picker-color-area fig-handle {
4462
- z-index: 1;
4463
- }
4464
-
4465
- .fig-fill-picker-sliders {
4466
- display: grid;
4467
- grid-template-columns: calc(3.5rem + var(--spacer-3)) 1fr;
4468
- grid-template-rows: 1fr 1fr;
4469
- align-items: center;
4470
- padding-right: var(--spacer-3);
4471
- gap: var(--spacer-2);
4472
- padding-bottom: var(--spacer-1);
4473
-
4474
- .fig-fill-picker-eyedropper {
4475
- grid-column: 1;
4476
- grid-row: 1 / 3;
4477
- place-self: center;
4478
- margin-right: calc(var(--spacer-3) * -1);
4479
- width: 3.5rem;
4480
- aspect-ratio: 1 / 1;
4481
- height: 3.5rem;
4482
- }
4483
-
4484
- fig-slider {
4485
- grid-column: 2;
4486
- min-width: 0;
4487
- }
4488
- }
4489
-
4490
- .fig-fill-picker-inputs {
4491
- .fig-fill-picker-input-fields {
4492
- flex: 1;
4493
- min-width: 0;
4494
- display: flex;
4495
-
4496
- .input-combo {
4497
- flex: 1;
4498
- min-width: 0;
4499
- }
4500
-
4501
- fig-input-text {
4502
- flex: 1;
4503
- min-width: 0;
4504
- }
4505
- }
4506
- }
4507
-
4508
- /* Gradient Tab */
4509
- .fig-fill-picker-gradient-preview {
4510
- aspect-ratio: auto;
4511
- width: calc(100% - var(--spacer-3) * 2);
4512
- margin: var(--spacer-2) var(--spacer-3);
4513
- margin-top: var(--spacer-4);
4514
- background: transparent;
4515
- }
4516
-
4517
- .fig-fill-picker-gradient-header {
4518
- padding-right: var(--spacer-2);
4519
- display: flex;
4520
- padding-left: var(--spacer-3);
4521
- gap: var(--spacer-2);
4522
- .fig-fill-picker-gradient-type {
4523
- flex: 1;
4524
- min-width: 0;
4525
- }
4526
-
4527
- & > *:last-child fig-button {
4528
- margin-left: auto;
4529
- }
4530
-
4531
- .fig-fill-picker-gradient-center {
4532
- fig-input-number {
4533
- width: 48px;
4534
- }
4535
- }
4536
- }
4537
-
4538
- .fig-fill-picker-gradient-stops {
4539
- .fig-fill-picker-gradient-stops-header {
4540
- > span {
4541
- flex: 1;
4542
- }
4543
- }
4544
- }
4545
-
4546
- .fig-fill-picker-gradient-stops-list {
4547
- display: flex;
4548
- flex-direction: column;
4549
- gap: var(--spacer-1);
4550
- }
4551
-
4552
- .fig-fill-picker-gradient-stop-row {
4553
- padding-right: var(--spacer-2);
4554
- display: flex;
4555
- padding-left: var(--spacer-3);
4556
- gap: var(--spacer-2);
4557
- & > .fig-fill-picker-stop-position {
4558
- flex: 0;
4559
- flex-basis: 3rem;
4560
- min-width: 0;
4561
- width: 3rem;
4562
- }
4563
-
4564
- .fig-fill-picker-stop-color {
4565
- flex: 1;
4566
- min-width: 0;
4567
- fig-input-text {
4568
- min-width: 0;
4569
- }
4570
- }
4571
-
4572
- .fig-fill-picker-stop-remove {
4573
- flex-shrink: 0;
4574
- }
4575
- }
4576
-
4577
- /* Media Tabs (Image/Video/Webcam) */
4578
- .fig-fill-picker-media-header {
4579
- .fig-fill-picker-scale-mode {
4580
- flex: 1;
4581
- }
4582
-
4583
- .fig-fill-picker-scale {
4584
- width: 56px;
4585
- }
4586
- }
4587
-
4588
- .fig-fill-picker-media-preview {
4589
- position: relative;
4590
- aspect-ratio: 1;
4591
- margin: var(--spacer-1) var(--spacer-3);
4592
- border-radius: var(--radius-medium);
4593
- overflow: hidden;
4594
- display: flex;
4595
- align-items: center;
4596
- justify-content: center;
4597
-
4598
- &.dragover {
4599
- outline: 2px dashed var(--figma-color-border-brand);
4600
- outline-offset: -2px;
4601
- }
4602
-
4603
- &.has-media {
4604
- fig-button {
4605
- visibility: hidden;
4606
- }
4607
- &:hover {
4608
- fig-button {
4609
- visibility: visible;
4610
- }
4611
- }
4612
- }
4613
- }
4614
-
4615
- .fig-fill-picker-checkerboard {
4616
- position: absolute;
4617
- inset: 0;
4618
- background-image:
4619
- linear-gradient(
4620
- 45deg,
4621
- var(--figma-color-bg-tertiary) 25%,
4622
- transparent 25%
4623
- ),
4624
- linear-gradient(
4625
- -45deg,
4626
- var(--figma-color-bg-tertiary) 25%,
4627
- transparent 25%
4628
- ),
4629
- linear-gradient(
4630
- 45deg,
4631
- transparent 75%,
4632
- var(--figma-color-bg-tertiary) 75%
4633
- ),
4634
- linear-gradient(
4635
- -45deg,
4636
- transparent 75%,
4637
- var(--figma-color-bg-tertiary) 75%
4638
- );
4639
- background-size: 16px 16px;
4640
- background-position:
4641
- 0 0,
4642
- 0 8px,
4643
- 8px -8px,
4644
- -8px 0px;
4645
- }
4646
-
4647
- div.fig-fill-picker-image-preview {
4648
- position: absolute;
4649
- inset: 0;
4650
- width: 100%;
4651
- height: 100%;
4652
- display: none;
4653
- }
4654
-
4655
- fig-image.fig-fill-picker-image-preview {
4656
- max-width: none;
4657
- max-height: none;
4658
- width: auto;
4659
- }
4660
-
4661
- video.fig-fill-picker-video-preview {
4662
- position: absolute;
4663
- inset: 0;
4664
- width: 100%;
4665
- height: 100%;
4666
- object-fit: cover;
4667
- display: none;
4668
- }
4669
-
4670
- fig-media.fig-fill-picker-video-preview {
4671
- max-width: none;
4672
- max-height: none;
4673
- width: auto;
4674
- }
4675
-
4676
- .fig-fill-picker-upload {
4677
- position: relative;
4678
- z-index: 1;
4679
- }
4680
-
4681
- /* Webcam Tab */
4682
- .fig-fill-picker-webcam-preview {
4683
- position: relative;
4684
- aspect-ratio: 1;
4685
- margin: 0 var(--spacer-3);
4686
- border-radius: var(--radius-medium);
4687
- overflow: hidden;
4688
- margin-bottom: var(--spacer-2);
4689
- }
4690
-
4691
- .fig-fill-picker-webcam-video {
4692
- position: absolute;
4693
- inset: 0;
4694
- width: 100%;
4695
- height: 100%;
4696
- object-fit: cover;
4697
- }
4698
-
4699
- .fig-fill-picker-webcam-status {
4700
- position: absolute;
4701
- inset: 0;
4702
- display: flex;
4703
- align-items: center;
4704
- justify-content: center;
4705
- background: var(--figma-color-bg-secondary);
4706
- color: var(--figma-color-text-secondary);
4707
- font-size: 0.75rem;
4708
- }
4709
-
4710
- .fig-fill-picker-webcam-controls {
4711
- display: flex;
4712
- gap: var(--spacer-1);
4713
-
4714
- .fig-fill-picker-camera-select {
4715
- flex: 1;
4716
- }
4717
-
4718
- .fig-fill-picker-webcam-capture {
4719
- flex-shrink: 0;
4720
- }
4721
- }
4722
- }
4723
-
4724
4450
  /* Utilities */
4725
4451
 
4726
4452
  .fig-mask-icon,
@@ -5006,61 +4732,58 @@ fig-choice {
5006
4732
  }
5007
4733
 
5008
4734
  fig-handle {
5009
- --width: 0.875rem;
5010
- --height: 0.875rem;
5011
- --fill: var(--figma-color-bg-brand);
4735
+ --width: 1rem;
4736
+ --height: 1rem;
4737
+ --fill: transparent;
5012
4738
  --border-radius: 50%;
5013
- --ring-width: 0.125rem;
5014
- --box-shadow: 0px 0 0 0.5px rgba(0, 0, 0, 0.1), var(--elevation-100-canvas);
5015
- --outline: none;
5016
- --border: none;
5017
4739
  --fig-handle-hit-area-opacity: 0;
5018
4740
  --fig-handle-hit-area-size: 0;
5019
4741
  --fig-handle-checkerboard: var(--checkerboard);
4742
+ --fig-handle-bg: var(--handle-color);
4743
+ --fig-handle-outline-color: transparent;
4744
+ --fig-handle-outline: 1.5px solid var(--fig-handle-outline-color);
4745
+ --fig-handle-outline-offset: 0px;
4746
+ --fig-handle-inner-bg: var(--figma-color-bg-brand);
4747
+ --fig-handle-inner-outline: 1px solid var(--figma-color-bg-brand);
4748
+ --fig-handle-height: var(--width);
4749
+ --fig-handle-width: var(--width);
4750
+ --fig-handle-padding: 0.25rem;
4751
+ --fig-handle-shadow: var(--figma-elevation-200-canvas);
4752
+ --fig-handle-inner-shadow: none;
5020
4753
 
5021
4754
  margin: 0;
5022
- padding: 0;
4755
+ padding: var(--fig-handle-padding);
5023
4756
  place-items: center;
5024
- width: var(--width);
5025
- height: var(--height);
4757
+ width: var(--fig-handle-width);
4758
+ height: var(--fig-handle-height);
5026
4759
  border-radius: var(--border-radius);
5027
4760
  display: grid;
4761
+ background: var(--fig-handle-bg);
4762
+ outline: var(--fig-handle-outline);
4763
+ outline-offset: var(--fig-handle-outline-offset);
4764
+ box-shadow: var(--fig-handle-shadow);
5028
4765
 
5029
- &::before {
5030
- content: "";
5031
- color-scheme: light only;
5032
- width: var(--width);
5033
- height: var(--height);
5034
- background: var(--handle-color);
5035
- border-radius: var(--border-radius);
5036
- box-shadow: var(--box-shadow);
5037
- outline: var(--outline);
5038
- border: var(--border);
5039
- place-self: center;
5040
- grid-area: 1 / 1;
5041
- z-index: 1;
5042
- }
5043
-
4766
+ /* Used for active state/color handles */
5044
4767
  &::after {
5045
4768
  content: "";
5046
4769
  color-scheme: light only;
5047
- width: calc(var(--width) - var(--ring-width) * 2);
5048
- height: calc(var(--height) - var(--ring-width) * 2);
5049
- background:
5050
- linear-gradient(var(--fill), var(--fill)), var(--fig-handle-checkerboard);
4770
+ width: 100%;
4771
+ height: 100%;
4772
+ background: var(--fig-handle-inner-bg);
5051
4773
  background-position: 0 0;
5052
- background-size: 0.625rem 0.625rem;
4774
+ background-size: calc(var(--fig-handle-width) - var(--fig-handle-padding) * 2) calc(var(--fig-handle-height) - var(--fig-handle-padding) * 2);
5053
4775
  border-radius: var(--border-radius);
5054
- box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
4776
+ box-shadow: var(--fig-handle-inner-shadow);
4777
+ outline: var(--fig-handle-inner-outline);
5055
4778
  place-self: center;
5056
4779
  grid-area: 1 / 1;
5057
4780
  z-index: 2;
5058
- display: none;
5059
4781
  }
5060
4782
 
5061
4783
  &[size="small"] {
5062
- --width: 11px;
5063
- --height: 11px;
4784
+ --width: 0.75rem;
4785
+ --height: 0.75rem;
4786
+ --fig-handle-padding: 3px;
5064
4787
  }
5065
4788
 
5066
4789
  &[drag]:not([drag="false"]) {
@@ -5069,32 +4792,30 @@ fig-handle {
5069
4792
  }
5070
4793
  &:hover,
5071
4794
  &[selected]:not([selected="false"]) {
5072
- outline: 1px solid var(--figma-color-border-selected);
5073
- outline-offset: 0;
4795
+ --fig-handle-outline-color: var(--figma-color-border-selected);
5074
4796
  }
5075
4797
 
5076
- &[disabled]:not([disabled="false"]),
5077
- &[aria-disabled="true"] {
5078
- pointer-events: none;
5079
- cursor: default;
4798
+ /* Default handle (no type) hover/selected */
4799
+ &:hover:not([type]),
4800
+ &[selected]:not([selected="false"]):not([type]) {
4801
+ --fig-handle-inner-bg: var(--figma-color-bg-brand);
4802
+ --fig-handle-outline-color: var(--figma-color-border-selected);
5080
4803
  }
5081
- &[type="color"],
5082
- &[type="canvas"] {
5083
- &::after {
5084
- display: block;
4804
+
4805
+ &[type="canvas"]{
4806
+ --fig-handle-inner-bg: transparent;
4807
+ --fig-handle-inner-outline: none;
4808
+ --fig-handle-outline-color: var(--figma-color-border-selected);
4809
+ &:hover,
4810
+ &[selected]:not([selected="false"]){
4811
+ --fig-handle-outline: 3px solid var(--figma-color-border-selected);
5085
4812
  }
5086
4813
  }
5087
- &[type="canvas"] {
5088
- --fill: #FFFFFF;
5089
- --handle-color: var(--figma-color-bg-brand);
5090
- --ring-width: 1.5px;
5091
- &::after{
5092
- box-shadow: none;
5093
- }
5094
- }
5095
-
5096
4814
  &[type="color"],
5097
4815
  &[control] {
4816
+ --fig-handle-inner-bg: linear-gradient(var(--fill), var(--fill)), var(--fig-handle-checkerboard);
4817
+ --fig-handle-padding: 0.125rem;
4818
+ --fig-handle-inner-outline: none;
5098
4819
  position: relative;
5099
4820
  overflow: visible;
5100
4821
 
@@ -5107,6 +4828,16 @@ fig-handle {
5107
4828
  }
5108
4829
  }
5109
4830
 
4831
+ &[disabled]:not([disabled="false"]),
4832
+ &[aria-disabled="true"] {
4833
+ cursor: not-allowed;
4834
+ --fig-handle-outline-color: transparent;
4835
+ background-color: var(--figma-color-bg-disabled);
4836
+ &::after{
4837
+ --fig-handle-inner-bg: var(--figma-color-icon-disabled);
4838
+ }
4839
+ }
4840
+
5110
4841
  .fig-handle-hit-area {
5111
4842
  position: absolute;
5112
4843
  inset: calc(var(--fig-handle-hit-area-size) * -0.5px);