@rogieking/figui3 6.21.1 → 6.23.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
 
@@ -3230,6 +3047,12 @@ dialog[is="fig-popup"] {
3230
3047
  padding: var(--spacer-2) 0;
3231
3048
  min-width: 6rem;
3232
3049
  box-shadow: var(--figma-elevation-100);
3050
+
3051
+ &.fig-menu-popup {
3052
+ max-height: calc(100vh - 1rem);
3053
+ padding: 0;
3054
+ overflow: hidden;
3055
+ }
3233
3056
  }
3234
3057
 
3235
3058
  &[variant="tooltip"],
@@ -3446,10 +3269,16 @@ fig-header {
3446
3269
  --fig-header-height: var(--spacer-5);
3447
3270
  }
3448
3271
 
3449
- fig-button[icon]:not([icon="false"])[variant="ghost"]:not(fig-input-text fig-button) {
3272
+ & > fig-button:last-child[icon]:not([icon="false"])[variant="ghost"],
3273
+ & > fig-tooltip:last-child > fig-button[icon]:not([icon="false"])[variant="ghost"],
3274
+ & > fig-menu:last-child > fig-button[fig-menu-trigger][icon]:not([icon="false"])[variant="ghost"] {
3450
3275
  margin-right: calc(var(--spacer-2) * -1);
3451
3276
  }
3452
3277
 
3278
+ & > fig-input-text:only-child {
3279
+ width: 100%;
3280
+ }
3281
+
3453
3282
  &>fig-dropdown,
3454
3283
  &>fig-select{
3455
3284
  &:first-child{
@@ -3640,6 +3469,10 @@ fig-content {
3640
3469
  }
3641
3470
  }
3642
3471
 
3472
+ fig-content[padding]:not([padding="false"]) {
3473
+ padding-inline: var(--spacer-3);
3474
+ }
3475
+
3643
3476
  vstack,
3644
3477
  .vstack,
3645
3478
  [vstack] {
@@ -3674,6 +3507,14 @@ hstack,
3674
3507
  &[align="stretch"] {
3675
3508
  --hstack-align: stretch;
3676
3509
  }
3510
+
3511
+ & > fig-field:has(+ fig-field) {
3512
+ --fig-field-right-padding: var(--spacer-1);
3513
+ }
3514
+
3515
+ & > fig-field + fig-field {
3516
+ --fig-field-left-padding: var(--spacer-1);
3517
+ }
3677
3518
  }
3678
3519
 
3679
3520
  fig-input-text,
@@ -4198,6 +4039,43 @@ fig-field {
4198
4039
  gap: 0;
4199
4040
  align-items: start;
4200
4041
 
4042
+ &:not([direction="vertical"]):has(> label):has(
4043
+ > :not(label):not(.fig-field-chevron):not(
4044
+ fig-button[icon]:not([icon="false"])
4045
+ )
4046
+ + fig-button[icon]:not([icon="false"])
4047
+ ) {
4048
+ & > :not(label):not(.fig-field-chevron):not(
4049
+ fig-button[icon]:not([icon="false"])
4050
+ ):has(+ fig-button[icon]:not([icon="false"])) {
4051
+ justify-self: start;
4052
+ width: calc(100% - var(--spacer-4) - var(--spacer-1));
4053
+ }
4054
+
4055
+ & > :not(label):not(.fig-field-chevron):not(
4056
+ fig-button[icon]:not([icon="false"])
4057
+ ):has(+ fig-button[icon]:not([icon="false"])[variant="ghost"]) {
4058
+ width: calc(100% - var(--spacer-4));
4059
+ }
4060
+
4061
+ & > :not(label):not(.fig-field-chevron):not(
4062
+ fig-button[icon]:not([icon="false"])
4063
+ )
4064
+ + fig-button[icon]:not([icon="false"]) {
4065
+ grid-area: input;
4066
+ justify-self: end;
4067
+ z-index: 1;
4068
+ }
4069
+
4070
+ & > :not(label):not(.fig-field-chevron):not(
4071
+ fig-button[icon]:not([icon="false"])
4072
+ )
4073
+ + fig-button[icon]:not([icon="false"])[variant="ghost"] {
4074
+ margin-right: calc(var(--spacer-1) * -1);
4075
+ }
4076
+ }
4077
+
4078
+
4201
4079
  &[columns="half"] {
4202
4080
  --fig-field-label-ratio: 2fr;
4203
4081
  }
@@ -5527,6 +5405,271 @@ fig-menu {
5527
5405
  }
5528
5406
  }
5529
5407
 
5408
+ /* Select — host chrome; trigger/listbox live in shadow (options slotted) */
5409
+ fig-select {
5410
+ display: inline-flex;
5411
+ position: relative;
5412
+ align-items: center;
5413
+ min-width: 0;
5414
+ height: var(--spacer-4);
5415
+ border-radius: var(--radius-medium);
5416
+ background-color: var(--figma-color-bg);
5417
+ color: var(--figma-color-text);
5418
+ box-shadow: inset 0 0 0 1px var(--figma-color-border);
5419
+
5420
+ &[full]:not([full="false"]) {
5421
+ display: flex;
5422
+ width: 100%;
5423
+ }
5424
+
5425
+ &[disabled]:not([disabled="false"]) {
5426
+ pointer-events: none;
5427
+ color: var(--figma-color-text-tertiary);
5428
+
5429
+ &::after {
5430
+ background-color: var(--figma-color-icon-disabled);
5431
+ }
5432
+ }
5433
+
5434
+ &::after {
5435
+ content: "";
5436
+ position: absolute;
5437
+ right: 0.25rem;
5438
+ top: 50%;
5439
+ transform: translateY(-50%);
5440
+ width: 1rem;
5441
+ height: 1rem;
5442
+ mask-image: var(--icon-16-chevron);
5443
+ mask-size: contain;
5444
+ mask-repeat: no-repeat;
5445
+ mask-position: center;
5446
+ background-color: var(--figma-color-icon);
5447
+ pointer-events: none;
5448
+ z-index: 1;
5449
+ }
5450
+ }
5451
+
5452
+ /*
5453
+ * Internal listbox is a fig-popup inside fig-select's shadow, so document
5454
+ * dialog[is="fig-popup"] rules don't apply. Expose part=listbox and mirror
5455
+ * the menu-theme popup chrome (same tokens as components.css).
5456
+ */
5457
+ fig-select::part(listbox) {
5458
+ --z-index: 999999;
5459
+ --fig-popup-radius: var(--radius-large);
5460
+ --fig-popup-bg-color: var(--figma-color-bg-menu);
5461
+
5462
+ z-index: var(--z-index);
5463
+ position: fixed;
5464
+ /* Do not set inset here — ::part inset beats inline left/top and
5465
+ prevents edge clamping from moving the menu back into view. */
5466
+ margin: 0;
5467
+ border: 0;
5468
+ outline: 0;
5469
+ padding: 0;
5470
+ overflow: hidden;
5471
+ border-radius: var(--fig-popup-radius);
5472
+ background-color: var(--fig-popup-bg-color);
5473
+ color: var(--figma-color-text-menu);
5474
+ color-scheme: dark;
5475
+ box-shadow: var(--figma-elevation-400-menu-panel);
5476
+ /* width/min/max set in JS — ::part width rules override element.style. */
5477
+ max-height: calc(100vh - 1rem);
5478
+ height: max-content;
5479
+ }
5480
+
5481
+ /* Vertical option panels own their scroller and shared top/bottom paging buttons. */
5482
+ fig-select-options,
5483
+ .fig-menu-options {
5484
+ --fig-vertical-overflow-size: var(--spacer-4);
5485
+
5486
+ box-sizing: border-box;
5487
+ display: flex;
5488
+ flex-direction: column;
5489
+ gap: 0;
5490
+ width: 100%;
5491
+ max-width: 100%;
5492
+ max-height: calc(100vh - 1rem);
5493
+ /* No block padding — sticky overflow buttons must sit flush to the popup edges. */
5494
+ padding: 0;
5495
+ overflow: hidden auto;
5496
+ scrollbar-width: none;
5497
+
5498
+ &::-webkit-scrollbar {
5499
+ display: none;
5500
+ }
5501
+
5502
+ & > :not(.fig-overflow) {
5503
+ flex-shrink: 0;
5504
+ }
5505
+
5506
+ /* List breathing room (not on the scroller itself). */
5507
+ & > :not(.fig-overflow):first-child,
5508
+ & > .fig-overflow-start + :not(.fig-overflow) {
5509
+ margin-top: var(--spacer-2);
5510
+ }
5511
+
5512
+ & > :not(.fig-overflow):last-child,
5513
+ & > :not(.fig-overflow):has(+ .fig-overflow-end) {
5514
+ margin-bottom: var(--spacer-2);
5515
+ }
5516
+
5517
+ & > .fig-overflow {
5518
+ position: sticky;
5519
+ left: 0;
5520
+ flex: 0 0 var(--fig-vertical-overflow-size);
5521
+ width: 100%;
5522
+ height: var(--fig-vertical-overflow-size);
5523
+ margin: 0;
5524
+ z-index: 3;
5525
+ /* Menu chrome — not option hover (bg-menu-hover is brand blue). */
5526
+ color: var(--figma-color-text-menu);
5527
+ background: var(--figma-color-bg-menu) !important;
5528
+
5529
+ &::before {
5530
+ inset: 0;
5531
+ border-radius: 0;
5532
+ background: var(--figma-color-bg-menu) !important;
5533
+ }
5534
+
5535
+ &:hover::before {
5536
+ background: light-dark(
5537
+ rgba(0, 0, 0, 0.06),
5538
+ rgba(255, 255, 255, 0.08)
5539
+ )
5540
+ !important;
5541
+ }
5542
+
5543
+ &:hover {
5544
+ color: var(--figma-color-text-menu);
5545
+ }
5546
+ }
5547
+
5548
+ & > .fig-overflow-start {
5549
+ order: -1;
5550
+ top: 0;
5551
+ margin-block-end: calc(-1 * var(--fig-vertical-overflow-size));
5552
+
5553
+ &::before {
5554
+ border-radius: var(--radius-large) var(--radius-large) 0 0;
5555
+ }
5556
+
5557
+ .fig-overflow-chevron {
5558
+ rotate: 180deg;
5559
+ }
5560
+ }
5561
+
5562
+ & > .fig-overflow-end {
5563
+ order: 1;
5564
+ bottom: 0;
5565
+ margin-block-start: calc(-1 * var(--fig-vertical-overflow-size));
5566
+
5567
+ &::before {
5568
+ border-radius: 0 0 var(--radius-large) var(--radius-large);
5569
+ }
5570
+ }
5571
+
5572
+ }
5573
+
5574
+ fig-select-options > fig-menu-separator {
5575
+ /* Align labels with select option text after the checkmark column. */
5576
+ &[label]:not([label=""]) {
5577
+ padding-left: var(--spacer-5);
5578
+ padding-right: var(--spacer-2);
5579
+
5580
+ &::before {
5581
+ margin-inline: unset;
5582
+ margin-left: calc(-1 * var(--spacer-5));
5583
+ margin-right: calc(-1 * var(--spacer-2));
5584
+ }
5585
+ }
5586
+ }
5587
+
5588
+ fig-select-option {
5589
+ display: flex;
5590
+ align-items: center;
5591
+ gap: 0;
5592
+ position: relative;
5593
+ min-height: var(--spacer-4);
5594
+ height: auto;
5595
+ padding: var(--spacer-1) var(--spacer-2);
5596
+ padding-right: var(--spacer-3);
5597
+ border-radius: var(--radius-medium);
5598
+ color: var(--figma-color-text-menu);
5599
+ cursor: default;
5600
+ user-select: none;
5601
+ white-space: nowrap;
5602
+
5603
+ &::before {
5604
+ content: "";
5605
+ display: block;
5606
+ position: absolute;
5607
+ inset: 0 var(--spacer-2);
5608
+ border-radius: var(--radius-medium);
5609
+ z-index: -1;
5610
+ background-color: transparent;
5611
+ }
5612
+
5613
+ &::after {
5614
+ content: "";
5615
+ display: block;
5616
+ flex: 0 0 1rem;
5617
+ order: -1;
5618
+ width: 1rem;
5619
+ height: 1rem;
5620
+ margin-left: var(--spacer-1);
5621
+ margin-right: var(--spacer-1);
5622
+ background-color: currentColor;
5623
+ -webkit-mask-image: var(--icon-16-checkmark);
5624
+ mask-image: var(--icon-16-checkmark);
5625
+ -webkit-mask-repeat: no-repeat;
5626
+ mask-repeat: no-repeat;
5627
+ -webkit-mask-position: center;
5628
+ mask-position: center;
5629
+ -webkit-mask-size: contain;
5630
+ mask-size: contain;
5631
+ visibility: hidden;
5632
+ }
5633
+
5634
+ & > [slot="prepend"] {
5635
+ margin-top: calc(var(--spacer-1) * -1);
5636
+ margin-bottom: calc(var(--spacer-1) * -1);
5637
+ margin-right: var(--spacer-1);
5638
+ }
5639
+
5640
+
5641
+ & > :not([slot="prepend"]):not([slot="append"]) {
5642
+ flex: 1 1 auto;
5643
+ min-width: 0;
5644
+ }
5645
+
5646
+ & > [slot="append"] {
5647
+ flex: 0 0 auto;
5648
+ margin-inline-start: auto;
5649
+ color: var(--figma-color-text-tertiary);
5650
+ }
5651
+
5652
+ &:hover,
5653
+ &:focus-visible {
5654
+ outline: none;
5655
+
5656
+ &::before {
5657
+ background-color: var(--figma-color-bg-menu-hover);
5658
+ }
5659
+ }
5660
+
5661
+ &[selected]:not([selected="false"])::after,
5662
+ &[aria-selected="true"]::after {
5663
+ visibility: visible;
5664
+ }
5665
+
5666
+ &[disabled]:not([disabled="false"]),
5667
+ &[aria-disabled="true"] {
5668
+ opacity: 0.4;
5669
+ pointer-events: none;
5670
+ }
5671
+ }
5672
+
5530
5673
  fig-menu-item {
5531
5674
  --fig-menu-item-padding: var(--spacer-4);
5532
5675
  display: flex;