@rogieking/figui3 4.9.1 → 4.10.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 CHANGED
@@ -332,6 +332,8 @@
332
332
  --icon-close: 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='M16.2242 7.08154C16.4182 6.95348 16.6823 6.97551 16.8531 7.146C17.024 7.31683 17.0457 7.58084 16.9176 7.7749L16.8531 7.85303L12.7067 11.9995L16.8531 16.146L16.9176 16.2241C17.0457 16.4182 17.024 16.6822 16.8531 16.853C16.6823 17.0239 16.4183 17.0456 16.2242 16.9175L16.1461 16.853L11.9996 12.7065L7.85315 16.853C7.65789 17.0483 7.34138 17.0483 7.14612 16.853C6.95128 16.6577 6.95101 16.3411 7.14612 16.146L11.2926 11.9995L7.14612 7.85303L7.08167 7.7749C6.95389 7.58087 6.97541 7.3167 7.14612 7.146C7.31683 6.97532 7.58101 6.95376 7.77502 7.08154L7.85315 7.146L11.9996 11.2925L16.1461 7.146L16.2242 7.08154Z' fill='currentColor'/%3E%3C/svg%3E");
333
333
  --icon-rotate: 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='M10.2325 6.47442C11.2088 5.49811 12.7917 5.49811 13.768 6.47442L15.2931 7.99955H14.0002C13.7241 7.99955 13.5002 8.2234 13.5002 8.49955C13.5002 8.77569 13.7241 8.99955 14.0002 8.99955H16.5002C16.7764 8.99955 17.0002 8.77569 17.0002 8.49955V5.99955C17.0002 5.7234 16.7764 5.49955 16.5002 5.49955C16.2241 5.49955 16.0002 5.7234 16.0002 5.99955V7.29244L14.4751 5.76731C13.1083 4.40048 10.8922 4.40048 9.52537 5.76731L7.14669 8.14599C6.95143 8.34126 6.95143 8.65784 7.14669 8.8531C7.34195 9.04836 7.65854 9.04836 7.8538 8.8531L10.2325 6.47442ZM13.0609 9.64599C12.4751 9.06021 11.5254 9.06021 10.9396 9.64599L7.64669 12.9389C7.06091 13.5247 7.0609 14.4744 7.64669 15.0602L10.9396 18.3531C11.5254 18.9389 12.4751 18.9389 13.0609 18.3531L16.3538 15.0602C16.9396 14.4744 16.9396 13.5247 16.3538 12.9389L13.0609 9.64599ZM11.6467 10.3531C11.842 10.1578 12.1585 10.1578 12.3538 10.3531L15.6467 13.646C15.842 13.8413 15.842 14.1578 15.6467 14.3531L12.3538 17.646C12.1585 17.8413 11.842 17.8413 11.6467 17.646L8.3538 14.3531C8.15854 14.1578 8.15854 13.8413 8.3538 13.646L11.6467 10.3531Z' fill='currentColor'/%3E%3C/svg%3E");
334
334
  --icon-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");
335
+ --icon-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");
336
+ --icon-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");
335
337
  --tip-pointer: path("M8 6L2 0H14L8 6Z");
336
338
 
337
339
 
@@ -479,17 +481,39 @@ textarea {
479
481
  /* Dropdown */
480
482
  select,
481
483
  input[type="text"][list] {
482
- height: var(--spacer-4);
483
- padding: 0 calc(var(--spacer-2) - 1px);
484
+ padding: var(--spacer-2);
485
+ background-color: var(--figma-color-bg);
486
+
487
+
488
+ &:not([multiple]) {
489
+ height: var(--spacer-4);
490
+ padding: 0 calc(var(--spacer-2) - 1px);
491
+ background: calc(100% - var(--spacer-1)) 50% / 1rem no-repeat
492
+ var(--icon-chevron);
493
+ }
494
+ &[multiple] {
495
+ overflow: auto;
496
+ option{
497
+ padding: var(--spacer-1) var(--spacer-2);
498
+ border-radius: var(--radius-medium);
499
+ &:checked {
500
+ background-color: var(--figma-color-bg-selected-strong) !important;
501
+ }
502
+ &:active{
503
+ background-color: var(--figma-color-bg-active);
504
+ }
505
+ &:hover{
506
+ background-color: var(--figma-color-bg-hover);
507
+ }
508
+ }
509
+ }
484
510
  border-radius: var(--radius-medium);
485
511
  display: flex;
486
512
  appearance: none;
487
513
  align-items: center;
488
514
  border: 0;
489
515
  color: var(--figma-color-text);
490
- background-color: var(--figma-color-bg);
491
- background: calc(100% - var(--spacer-1)) 50% / 1rem no-repeat
492
- var(--icon-chevron);
516
+
493
517
 
494
518
  box-shadow: inset 0 0 0 1px var(--figma-color-border);
495
519
  accent-color: var(--figma-color-bg-brand);
@@ -696,7 +720,7 @@ input[type="text"][list] {
696
720
  }
697
721
 
698
722
  input[type="text"][list],
699
- select {
723
+ select:not([multiple]) {
700
724
  padding-right: var(--spacer-4);
701
725
  padding-left: var(--spacer-2);
702
726
  }
@@ -720,7 +744,7 @@ select,
720
744
  }
721
745
 
722
746
  /* Chevron icon using mask-image for light-dark support */
723
- &::after {
747
+ &:not([multiple])::after {
724
748
  content: "";
725
749
  position: absolute;
726
750
  right: 0.25rem;
@@ -1441,6 +1465,43 @@ fig-video {
1441
1465
  opacity: 1;
1442
1466
  pointer-events: all;
1443
1467
  }
1468
+
1469
+ > fig-media-controls[data-generated] {
1470
+ position: absolute;
1471
+ inset: var(--spacer-2);
1472
+ top: auto;
1473
+ width: auto;
1474
+ z-index: 3;
1475
+ pointer-events: auto;
1476
+ }
1477
+ }
1478
+
1479
+ fig-media-controls {
1480
+ display: flex;
1481
+ align-items: center;
1482
+ gap: var(--spacer-2);
1483
+ width: 100%;
1484
+
1485
+
1486
+ &[overlay]:not([overlay="false"]) {
1487
+ border-radius: var(--radius-medium);
1488
+ background-color: var(--figma-color-bg);
1489
+ color: var(--figma-color-text);
1490
+ color-scheme: light;
1491
+ padding: var(--spacer-1);
1492
+ box-shadow: 0 0 0 1px var(--figma-color-bordertranslucent);
1493
+ }
1494
+
1495
+ > fig-slider {
1496
+ flex: 1 1 auto;
1497
+ min-width: 0;
1498
+ }
1499
+
1500
+ .fig-media-controls-time {
1501
+ font-variant-numeric: tabular-nums;
1502
+ white-space: nowrap;
1503
+ padding-right: var(--spacer-2);
1504
+ }
1444
1505
  }
1445
1506
 
1446
1507
  /* Easing Curve */
@@ -2094,6 +2155,18 @@ input[type="checkbox"]:not(.switch) {
2094
2155
  box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
2095
2156
  }
2096
2157
  }
2158
+ &:disabled{
2159
+ background-color: var(--figma-color-bg-disabled);
2160
+ box-shadow: none;
2161
+ &::after {
2162
+ background-color: transparent;
2163
+ }
2164
+ }
2165
+ &:disabled:checked{
2166
+ &::after {
2167
+ background-color: var(--figma-color-icon-disabled);
2168
+ }
2169
+ }
2097
2170
  }
2098
2171
  /* Light theme checkbox hover (black checkmark preview) */
2099
2172
  /* @media is a no-JS fallback — ignored when setTheme() sets classes */
@@ -4536,6 +4609,7 @@ fig-preview {
4536
4609
  mask-size: contain;
4537
4610
  mask-repeat: no-repeat;
4538
4611
  mask-position: center;
4612
+ flex-shrink: 0;
4539
4613
  -webkit-mask-image: var(--icon);
4540
4614
  -webkit-mask-size: contain;
4541
4615
  -webkit-mask-repeat: no-repeat;