@rogieking/figui3 6.21.0 → 6.22.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
@@ -253,7 +253,7 @@
253
253
  --bg-selected-active: #e5f4ff;
254
254
  --bg-tooltip: var(--figma-color-bg-menu);
255
255
  --color-tooltip: var(--figma-color-text);
256
- --input-opacity-width: calc(3.5rem - 2px);
256
+ --input-opacity-width: calc(3.25rem - 2px);
257
257
 
258
258
  /* Transparent Backgrounds - use light-dark() */
259
259
  --figma-color-bordertranslucent: light-dark(
@@ -354,7 +354,7 @@
354
354
 
355
355
  /* Icons - colorless shapes for use with mask-image */
356
356
  --icon-16-chevron: 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='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='grey' stroke-linecap='round'/%3E%3C/svg%3E%0A");
357
- --icon-16-checkmark: 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.084 4.22266C11.2372 3.99292 11.5476 3.93084 11.7773 4.08398C12.0071 4.23716 12.0692 4.54758 11.916 4.77734L7.91602 10.7773C7.83292 10.902 7.6979 10.9833 7.54883 10.998C7.39993 11.0126 7.25229 10.9593 7.14648 10.8535L4.14648 7.85352C3.95126 7.65825 3.95123 7.34173 4.14648 7.14648C4.34174 6.95124 4.65825 6.95126 4.85352 7.14648L7.42188 9.71484L11.084 4.22266Z' fill='white'/%3E%3C/svg%3E%0A");
357
+ --icon-16-checkmark: 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.5839 3.72266C11.7371 3.49298 12.0476 3.43085 12.2773 3.58399C12.5069 3.73716 12.569 4.04762 12.416 4.27735L7.41596 11.7773C7.33289 11.9019 7.19778 11.9833 7.04877 11.998C6.8999 12.0126 6.75223 11.9593 6.64642 11.8535L3.64642 8.85352C3.4512 8.65826 3.45119 8.34174 3.64642 8.14649C3.84169 7.95133 4.15822 7.95128 4.35346 8.14649L6.92182 10.7148L11.5839 3.72266Z' fill='white'/%3E%3C/svg%3E");
358
358
  --icon-16-reset: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' fill-rule='evenodd' d='M6.354 2.146a.5.5 0 0 1 0 .708L5.207 4H8.5a5 5 0 1 1-5 5 .5.5 0 0 1 1 0 4 4 0 1 0 4-4H5.207l1.147 1.146a.5.5 0 1 1-.708.708l-2-2a.5.5 0 0 1 0-.708l2-2a.5.5 0 0 1 .708 0' clip-rule='evenodd'/%3E%3C/svg%3E");
359
359
  --icon-24-reset: 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='M8.22473 5.08203C8.41872 4.9541 8.68285 4.97586 8.85364 5.14648C9.0244 5.31725 9.046 5.58134 8.91809 5.77539L8.85364 5.85352L7.70715 7H12.0001C15.3136 7.00005 17.9999 9.68652 18.0001 13C18.0001 16.3137 15.3138 19 12.0001 19C8.68641 19 6.00012 16.3137 6.00012 13C6.00036 12.7241 6.22413 12.5 6.50012 12.5C6.77608 12.5 6.99989 12.7241 7.00012 13C7.00012 15.7614 9.2387 18 12.0001 18C14.7615 18 17.0001 15.7614 17.0001 13C16.9999 10.2388 14.7614 8.00005 12.0001 8H7.70715L8.85364 9.14648L8.91809 9.22461C9.04619 9.41859 9.02426 9.68264 8.85364 9.85352C8.68277 10.0244 8.41881 10.0461 8.22473 9.91797L8.14661 9.85352L6.14661 7.85352C5.95152 7.65824 5.9514 7.34169 6.14661 7.14648L8.14661 5.14648L8.22473 5.08203Z' fill='black' fill-opacity='0.9'/%3E%3C/svg%3E");
360
360
  --icon-24-steppers: 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.7245 6.08191C11.9186 5.95386 12.1826 5.97562 12.3534 6.14637L14.3534 8.14637L14.4179 8.22449C14.546 8.41852 14.5242 8.68253 14.3534 8.8534C14.1826 9.02426 13.9186 9.04601 13.7245 8.91785L13.6464 8.8534L11.9999 7.20691L10.3534 8.8534C10.1582 9.04866 9.84166 9.04866 9.6464 8.8534C9.45123 8.65813 9.45117 8.3416 9.6464 8.14637L11.6464 6.14637L11.7245 6.08191Z' fill='black'/%3E%3Cpath d='M13.7248 15.0822C13.9189 14.9541 14.1829 14.9758 14.3537 15.1467C14.5246 15.3176 14.5463 15.5815 14.4182 15.7756L14.3537 15.8537L12.3537 17.8537C12.1829 18.0246 11.9189 18.0463 11.7248 17.9182L11.6467 17.8537L9.64669 15.8537L9.58224 15.7756C9.45407 15.5815 9.47583 15.3176 9.64669 15.1467C9.81756 14.9758 10.0815 14.9541 10.2756 15.0822L10.3537 15.1467L12.0002 16.7932L13.6467 15.1467L13.7248 15.0822Z' fill='black' /%3E%3C/svg%3E%0A");
@@ -707,192 +707,6 @@ input[type="text"][list] {
707
707
  }
708
708
  }
709
709
 
710
- @supports (appearance: base-select) {
711
- fig-dropdown[experimental~="modern"] {
712
- &[type="dropdown"] {
713
- select:before {
714
- content: attr(aria-label);
715
- }
716
- option::checkmark {
717
- display: none;
718
- }
719
- option {
720
- padding-left: var(--spacer-3);
721
- }
722
- }
723
- select {
724
- --option-height: 1.5rem;
725
- --max-width: 20rem;
726
- @media (hover) and (pointer: fine) {
727
- &,
728
- &::picker(select) {
729
- appearance: base-select;
730
- }
731
- }
732
-
733
- padding-block: 0;
734
- will-change: scale;
735
-
736
- @supports (-webkit-touch-callout: none) {
737
- font-size: 16px;
738
- }
739
-
740
- option::checkmark {
741
- content: "";
742
- display: block;
743
- width: 1rem;
744
- height: 1rem;
745
- background-color: currentColor;
746
- -webkit-mask-image: var(--icon-16-checkmark);
747
- mask-image: var(--icon-16-checkmark);
748
- -webkit-mask-repeat: no-repeat;
749
- mask-repeat: no-repeat;
750
- -webkit-mask-position: center;
751
- mask-position: center;
752
- -webkit-mask-size: contain;
753
- mask-size: contain;
754
- }
755
-
756
- option {
757
- display: flex;
758
- gap: var(--spacer-1);
759
- padding: 0 var(--spacer-4) 0 calc(var(--spacer-1) * 2 + var(--spacer-1));
760
- font-weight: var(--body-medium-fontWeight);
761
- color: var(--figma-color-text-menu);
762
- position: relative;
763
- & * {
764
- color: inherit;
765
- }
766
- &[hidden] {
767
- display: none;
768
- }
769
- &:before {
770
- content: "";
771
- display: block;
772
- position: absolute;
773
- inset: 0 var(--spacer-2);
774
- border-radius: var(--radius-medium);
775
- z-index: -1;
776
- }
777
- &:checked:before {
778
- background-color: transparent;
779
- }
780
- &:not(:checked):before {
781
- background-color: transparent;
782
- }
783
- &:not(:disabled) {
784
- &:hover,
785
- &:active,
786
- &:focus-visible {
787
- background-color: transparent;
788
- outline: 0;
789
- &:before {
790
- background-color: var(--figma-color-bg-menu-hover);
791
- }
792
- }
793
- }
794
- }
795
-
796
- optgroup {
797
- color: var(--figma-color-text-menu-secondary);
798
- text-align: left;
799
- position: relative;
800
- padding: 0 var(--spacer-1) 0 calc(var(--spacer-1) * 2 + var(--spacer-1));
801
- font-weight: var(--body-medium-fontWeight);
802
- &[label]:not([label=""]) {
803
- padding-top: var(--spacer-2);
804
- option:first-child {
805
- margin-top: var(--spacer-2);
806
- }
807
- }
808
- legend {
809
- padding: var(--spacer-1, 0.3rem) var(--spacer-1, 1rem);
810
- }
811
- option {
812
- margin: 0 calc(var(--spacer-1) * -1);
813
- margin-left: calc((var(--spacer-1) * 2 + var(--spacer-1)) * -1);
814
- }
815
- &:not(:first-child):not(:first-of-type) {
816
- margin-top: var(--spacer-2);
817
- padding-top: var(--spacer-3);
818
-
819
- &:before {
820
- content: "";
821
- display: block;
822
- position: absolute;
823
- left: 0;
824
- right: 0;
825
- top: 1px;
826
- height: 1px;
827
- background-color: var(--figma-color-border-menu);
828
- margin-bottom: var(--spacer-2);
829
- }
830
- }
831
- }
832
- option[hidden="true"]:first-child + optgroup {
833
- margin-top: 0;
834
- padding-top: var(--spacer-2);
835
- &:before {
836
- display: none;
837
- }
838
- }
839
-
840
- & > button {
841
- display: inline-flex;
842
- align-items: center;
843
- justify-content: flex-start;
844
- gap: var(--spacer-1, 0.25rem);
845
- width: 100%;
846
- border: 0;
847
- background: transparent;
848
- padding: 0;
849
- margin: 0;
850
- color: inherit;
851
- font: inherit;
852
- height: 100%;
853
- white-space: nowrap;
854
- text-overflow: ellipsis;
855
- overflow: hidden;
856
-
857
- & > selectedcontent {
858
- display: flex;
859
- align-items: center;
860
- gap: 0;
861
- min-width: 0;
862
- text-overflow: ellipsis;
863
- overflow: hidden;
864
- width: 100%;
865
- &:has(> svg) {
866
- margin-left: calc(var(--spacer-2) * -1);
867
- }
868
-
869
- & svg {
870
- flex-shrink: 0;
871
- }
872
- }
873
- }
874
- }
875
- ::picker-icon {
876
- display: none;
877
- }
878
-
879
- ::picker(select) {
880
- appearance: base-select;
881
- color-scheme: dark;
882
-
883
- /* Appearance/style */
884
- scrollbar-width: thin;
885
- outline: 0;
886
- scrollbar-color: var(--figma-color-text-menu-tertiary)
887
- var(--figma-color-bg-menu);
888
- border-radius: var(--radius-large);
889
- border: 0;
890
- background-color: var(--figma-color-bg-menu);
891
- padding: var(--spacer-2) 0;
892
- box-shadow: var(--figma-elevation-400-menu-panel);
893
- }
894
- }
895
- }
896
710
 
897
711
  input[type="text"][list],
898
712
  select:not([multiple]) {
@@ -910,7 +724,7 @@ fig-dropdown {
910
724
  /* Native select popups in Chromium webviews do not reliably inherit themed
911
725
  option colors. Style only the popup rows so the closed control continues
912
726
  to resolve FigUI's light-dark tokens from the application color scheme. */
913
- fig-dropdown:not([experimental~="modern"]) > select {
727
+ fig-dropdown > select {
914
728
  color: inherit;
915
729
 
916
730
  option,
@@ -1884,7 +1698,7 @@ fig-easing-curve {
1884
1698
  display: flex;
1885
1699
  flex-direction: column;
1886
1700
  gap: var(--spacer-2);
1887
- --stroke-width: 1;
1701
+ --stroke-width: 2;
1888
1702
  --easing-bezier-handle-radius: 5;
1889
1703
  --easing-spring-handle-radius: 5;
1890
1704
  --easing-handle-fill: var(--figma-color-border-strong);
@@ -1923,14 +1737,14 @@ fig-easing-curve {
1923
1737
  cursor: ns-resize;
1924
1738
  }
1925
1739
  }
1926
- .fig-easing-curve-diagonal,
1740
+ .fig-easing-curve-boundary,
1927
1741
  .fig-easing-curve-bounds,
1928
1742
  .fig-easing-curve-arm,
1929
1743
  .fig-easing-curve-path,
1930
1744
  .fig-easing-curve-target {
1931
1745
  pointer-events: none;
1932
1746
  }
1933
- .fig-easing-curve-diagonal {
1747
+ .fig-easing-curve-boundary {
1934
1748
  stroke: var(--figma-color-bordertranslucent);
1935
1749
  stroke-width: var(--stroke-width);
1936
1750
  stroke-linejoin: round;
@@ -1972,11 +1786,8 @@ fig-easing-curve {
1972
1786
  &.spring-mode .fig-easing-curve-handle[data-handle="bounce"] .fig-handle-hit-area {
1973
1787
  cursor: ns-resize;
1974
1788
  }
1975
- .fig-easing-curve-endpoint {
1976
- fill: var(--easing-handle-fill);
1977
- }
1978
- .fig-easing-curve-dropdown {
1979
- option svg {
1789
+ .fig-easing-curve-select {
1790
+ [slot="prepend"] svg {
1980
1791
  vertical-align: middle;
1981
1792
  }
1982
1793
  }
@@ -2012,7 +1823,8 @@ fig-3d-rotate {
2012
1823
  }
2013
1824
 
2014
1825
  > fig-input-number {
2015
- flex: 1 0 3rem;
1826
+ flex: 0 0 auto;
1827
+ width: 100%;
2016
1828
  }
2017
1829
 
2018
1830
  .fig-3d-rotate-container {
@@ -2361,9 +2173,14 @@ fig-origin-grid {
2361
2173
  }
2362
2174
 
2363
2175
  .origin-values {
2364
- display: grid;
2365
- grid-template-columns: 1fr 1fr;
2176
+ display: flex;
2366
2177
  gap: var(--spacer-2);
2178
+
2179
+ > fig-input-number {
2180
+ flex: 1 1 0;
2181
+ min-width: 0;
2182
+ width: 0;
2183
+ }
2367
2184
  }
2368
2185
  }
2369
2186
 
@@ -3450,6 +3267,10 @@ fig-header {
3450
3267
  margin-right: calc(var(--spacer-2) * -1);
3451
3268
  }
3452
3269
 
3270
+ & > fig-input-text:only-child {
3271
+ width: 100%;
3272
+ }
3273
+
3453
3274
  &>fig-dropdown,
3454
3275
  &>fig-select{
3455
3276
  &:first-child{
@@ -3640,6 +3461,10 @@ fig-content {
3640
3461
  }
3641
3462
  }
3642
3463
 
3464
+ fig-content[padding]:not([padding="false"]) {
3465
+ padding-inline: var(--spacer-3);
3466
+ }
3467
+
3643
3468
  vstack,
3644
3469
  .vstack,
3645
3470
  [vstack] {
@@ -3674,6 +3499,14 @@ hstack,
3674
3499
  &[align="stretch"] {
3675
3500
  --hstack-align: stretch;
3676
3501
  }
3502
+
3503
+ & > fig-field:has(+ fig-field) {
3504
+ --fig-field-right-padding: var(--spacer-1);
3505
+ }
3506
+
3507
+ & > fig-field + fig-field {
3508
+ --fig-field-left-padding: var(--spacer-1);
3509
+ }
3677
3510
  }
3678
3511
 
3679
3512
  fig-input-text,
@@ -4198,6 +4031,43 @@ fig-field {
4198
4031
  gap: 0;
4199
4032
  align-items: start;
4200
4033
 
4034
+ &:not([direction="vertical"]):has(> label):has(
4035
+ > :not(label):not(.fig-field-chevron):not(
4036
+ fig-button[icon]:not([icon="false"])
4037
+ )
4038
+ + fig-button[icon]:not([icon="false"])
4039
+ ) {
4040
+ & > :not(label):not(.fig-field-chevron):not(
4041
+ fig-button[icon]:not([icon="false"])
4042
+ ):has(+ fig-button[icon]:not([icon="false"])) {
4043
+ justify-self: start;
4044
+ width: calc(100% - var(--spacer-4) - var(--spacer-1));
4045
+ }
4046
+
4047
+ & > :not(label):not(.fig-field-chevron):not(
4048
+ fig-button[icon]:not([icon="false"])
4049
+ ):has(+ fig-button[icon]:not([icon="false"])[variant="ghost"]) {
4050
+ width: calc(100% - var(--spacer-4));
4051
+ }
4052
+
4053
+ & > :not(label):not(.fig-field-chevron):not(
4054
+ fig-button[icon]:not([icon="false"])
4055
+ )
4056
+ + fig-button[icon]:not([icon="false"]) {
4057
+ grid-area: input;
4058
+ justify-self: end;
4059
+ z-index: 1;
4060
+ }
4061
+
4062
+ & > :not(label):not(.fig-field-chevron):not(
4063
+ fig-button[icon]:not([icon="false"])
4064
+ )
4065
+ + fig-button[icon]:not([icon="false"])[variant="ghost"] {
4066
+ margin-right: calc(var(--spacer-1) * -1);
4067
+ }
4068
+ }
4069
+
4070
+
4201
4071
  &[columns="half"] {
4202
4072
  --fig-field-label-ratio: 2fr;
4203
4073
  }
@@ -5527,6 +5397,274 @@ fig-menu {
5527
5397
  }
5528
5398
  }
5529
5399
 
5400
+ /* Select — host chrome; trigger/listbox live in shadow (options slotted) */
5401
+ fig-select {
5402
+ display: inline-flex;
5403
+ position: relative;
5404
+ align-items: center;
5405
+ min-width: 0;
5406
+ height: var(--spacer-4);
5407
+ border-radius: var(--radius-medium);
5408
+ background-color: var(--figma-color-bg);
5409
+ color: var(--figma-color-text);
5410
+ box-shadow: inset 0 0 0 1px var(--figma-color-border);
5411
+
5412
+ &[full]:not([full="false"]) {
5413
+ display: flex;
5414
+ width: 100%;
5415
+ }
5416
+
5417
+ &[disabled]:not([disabled="false"]) {
5418
+ pointer-events: none;
5419
+ color: var(--figma-color-text-tertiary);
5420
+
5421
+ &::after {
5422
+ background-color: var(--figma-color-icon-disabled);
5423
+ }
5424
+ }
5425
+
5426
+ &::after {
5427
+ content: "";
5428
+ position: absolute;
5429
+ right: 0.25rem;
5430
+ top: 50%;
5431
+ transform: translateY(-50%);
5432
+ width: 1rem;
5433
+ height: 1rem;
5434
+ mask-image: var(--icon-16-chevron);
5435
+ mask-size: contain;
5436
+ mask-repeat: no-repeat;
5437
+ mask-position: center;
5438
+ background-color: var(--figma-color-icon);
5439
+ pointer-events: none;
5440
+ z-index: 1;
5441
+ }
5442
+ }
5443
+
5444
+ /*
5445
+ * Internal listbox is a fig-popup inside fig-select's shadow, so document
5446
+ * dialog[is="fig-popup"] rules don't apply. Expose part=listbox and mirror
5447
+ * the menu-theme popup chrome (same tokens as components.css).
5448
+ */
5449
+ fig-select::part(listbox) {
5450
+ --z-index: 999999;
5451
+ --fig-popup-radius: var(--radius-large);
5452
+ --fig-popup-bg-color: var(--figma-color-bg-menu);
5453
+
5454
+ z-index: var(--z-index);
5455
+ position: fixed;
5456
+ /* Do not set inset here — ::part inset beats inline left/top and
5457
+ prevents edge clamping from moving the menu back into view. */
5458
+ margin: 0;
5459
+ border: 0;
5460
+ outline: 0;
5461
+ padding: 0;
5462
+ overflow: hidden;
5463
+ border-radius: var(--fig-popup-radius);
5464
+ background-color: var(--fig-popup-bg-color);
5465
+ color: var(--figma-color-text-menu);
5466
+ color-scheme: dark;
5467
+ box-shadow: var(--figma-elevation-400-menu-panel);
5468
+ /* width/min/max set in JS — ::part width rules override element.style. */
5469
+ max-height: calc(100vh - 1rem);
5470
+ height: max-content;
5471
+ }
5472
+
5473
+ /* Panel is the scroller; overflow uses top/bottom buttons (fig-chooser pattern). */
5474
+ fig-select-options {
5475
+ --fig-select-overflow-size: var(--spacer-4);
5476
+
5477
+ box-sizing: border-box;
5478
+ display: flex;
5479
+ flex-direction: column;
5480
+ gap: 0;
5481
+ width: 100%;
5482
+ max-width: 100%;
5483
+ max-height: calc(100vh - 1rem);
5484
+ /* No block padding — sticky overflow buttons must sit flush to the popup edges. */
5485
+ padding: 0;
5486
+ overflow: hidden auto;
5487
+ scrollbar-width: none;
5488
+
5489
+ &::-webkit-scrollbar {
5490
+ display: none;
5491
+ }
5492
+
5493
+ & > :not(.fig-overflow) {
5494
+ flex-shrink: 0;
5495
+ }
5496
+
5497
+ /* List breathing room (not on the scroller itself). */
5498
+ & > :not(.fig-overflow):first-child,
5499
+ & > .fig-overflow-start + :not(.fig-overflow) {
5500
+ margin-top: var(--spacer-2);
5501
+ }
5502
+
5503
+ & > :not(.fig-overflow):last-child,
5504
+ & > :not(.fig-overflow):has(+ .fig-overflow-end) {
5505
+ margin-bottom: var(--spacer-2);
5506
+ }
5507
+
5508
+ & > .fig-overflow {
5509
+ position: sticky;
5510
+ left: 0;
5511
+ flex: 0 0 var(--fig-select-overflow-size);
5512
+ width: 100%;
5513
+ height: var(--fig-select-overflow-size);
5514
+ margin: 0;
5515
+ z-index: 3;
5516
+ /* Menu chrome — not option hover (bg-menu-hover is brand blue). */
5517
+ color: var(--figma-color-text-menu);
5518
+ background: var(--figma-color-bg-menu) !important;
5519
+
5520
+ &::before {
5521
+ inset: 0;
5522
+ border-radius: 0;
5523
+ background: var(--figma-color-bg-menu) !important;
5524
+ }
5525
+
5526
+ &:hover::before {
5527
+ background: light-dark(
5528
+ rgba(0, 0, 0, 0.06),
5529
+ rgba(255, 255, 255, 0.08)
5530
+ )
5531
+ !important;
5532
+ }
5533
+
5534
+ &:hover {
5535
+ color: var(--figma-color-text-menu);
5536
+ }
5537
+ }
5538
+
5539
+ & > .fig-overflow-start {
5540
+ order: -1;
5541
+ top: 0;
5542
+ margin-block-end: calc(-1 * var(--fig-select-overflow-size));
5543
+
5544
+ &::before {
5545
+ border-radius: var(--radius-large) var(--radius-large) 0 0;
5546
+ }
5547
+
5548
+ .fig-overflow-chevron {
5549
+ rotate: 180deg;
5550
+ }
5551
+ }
5552
+
5553
+ & > .fig-overflow-end {
5554
+ order: 1;
5555
+ bottom: 0;
5556
+ margin-block-start: calc(-1 * var(--fig-select-overflow-size));
5557
+
5558
+ &::before {
5559
+ border-radius: 0 0 var(--radius-large) var(--radius-large);
5560
+ }
5561
+ }
5562
+
5563
+ & > fig-menu-separator {
5564
+ --fig-menu-separator-color: var(--figma-color-border-menu);
5565
+ --fig-menu-separator-label-color: var(--figma-color-text-menu-secondary);
5566
+
5567
+ /* Align label with option text (padding + checkmark column).
5568
+ Negative margins on ::before must match this padding exactly so the
5569
+ rule bleeds to the listbox edges (base rule uses --fig-menu-item-padding). */
5570
+ &[label]:not([label=""]) {
5571
+ padding-left: var(--spacer-5);
5572
+ padding-right: var(--spacer-2);
5573
+
5574
+ &::before {
5575
+ margin-inline: unset;
5576
+ margin-left: calc(-1 * var(--spacer-5));
5577
+ margin-right: calc(-1 * var(--spacer-2));
5578
+ }
5579
+ }
5580
+ }
5581
+ }
5582
+
5583
+ fig-select-option {
5584
+ display: flex;
5585
+ align-items: center;
5586
+ gap: 0;
5587
+ position: relative;
5588
+ min-height: var(--spacer-4);
5589
+ height: auto;
5590
+ padding: var(--spacer-1) var(--spacer-2);
5591
+ padding-right: var(--spacer-3);
5592
+ border-radius: var(--radius-medium);
5593
+ color: var(--figma-color-text-menu);
5594
+ cursor: default;
5595
+ user-select: none;
5596
+ white-space: nowrap;
5597
+
5598
+ &::before {
5599
+ content: "";
5600
+ display: block;
5601
+ position: absolute;
5602
+ inset: 0 var(--spacer-2);
5603
+ border-radius: var(--radius-medium);
5604
+ z-index: -1;
5605
+ background-color: transparent;
5606
+ }
5607
+
5608
+ &::after {
5609
+ content: "";
5610
+ display: block;
5611
+ flex: 0 0 1rem;
5612
+ order: -1;
5613
+ width: 1rem;
5614
+ height: 1rem;
5615
+ margin-left: var(--spacer-1);
5616
+ margin-right: var(--spacer-1);
5617
+ background-color: currentColor;
5618
+ -webkit-mask-image: var(--icon-16-checkmark);
5619
+ mask-image: var(--icon-16-checkmark);
5620
+ -webkit-mask-repeat: no-repeat;
5621
+ mask-repeat: no-repeat;
5622
+ -webkit-mask-position: center;
5623
+ mask-position: center;
5624
+ -webkit-mask-size: contain;
5625
+ mask-size: contain;
5626
+ visibility: hidden;
5627
+ }
5628
+
5629
+ & > [slot="prepend"] {
5630
+ margin-top: calc(var(--spacer-1) * -1);
5631
+ margin-bottom: calc(var(--spacer-1) * -1);
5632
+ margin-right: var(--spacer-1);
5633
+ }
5634
+
5635
+
5636
+ & > :not([slot="prepend"]):not([slot="append"]) {
5637
+ flex: 1 1 auto;
5638
+ min-width: 0;
5639
+ }
5640
+
5641
+ & > [slot="append"] {
5642
+ flex: 0 0 auto;
5643
+ margin-inline-start: auto;
5644
+ color: var(--figma-color-text-tertiary);
5645
+ }
5646
+
5647
+ &:hover,
5648
+ &:focus-visible {
5649
+ outline: none;
5650
+
5651
+ &::before {
5652
+ background-color: var(--figma-color-bg-menu-hover);
5653
+ }
5654
+ }
5655
+
5656
+ &[selected]:not([selected="false"])::after,
5657
+ &[aria-selected="true"]::after {
5658
+ visibility: visible;
5659
+ }
5660
+
5661
+ &[disabled]:not([disabled="false"]),
5662
+ &[aria-disabled="true"] {
5663
+ opacity: 0.4;
5664
+ pointer-events: none;
5665
+ }
5666
+ }
5667
+
5530
5668
  fig-menu-item {
5531
5669
  --fig-menu-item-padding: var(--spacer-4);
5532
5670
  display: flex;