@rogieking/figui3 8.3.0 → 8.4.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
@@ -982,6 +982,8 @@ fig-button {
982
982
  [variant="destructiveGhost"]
983
983
  ):not(
984
984
  [variant="destructiveLink"]
985
+ ):not(
986
+ [variant="ghost"]
985
987
  ) {
986
988
  color: var(--figma-color-text-ondisabled);
987
989
  box-shadow: none;
@@ -1648,6 +1650,12 @@ fig-video {
1648
1650
  width: 100%;
1649
1651
  }
1650
1652
 
1653
+ /* An explicit size wins over full/aspect-ratio stretching, which would
1654
+ otherwise collapse to 0 inside a shrink-to-fit parent (e.g. fig-choice). */
1655
+ &[size]:not([size=""]):not([size="auto"]) {
1656
+ width: var(--fig-media-size);
1657
+ }
1658
+
1651
1659
  > fig-preview {
1652
1660
  --fig-preview-fit: var(--fig-media-fit);
1653
1661
  width: 100%;
@@ -1692,7 +1700,7 @@ fig-video {
1692
1700
  pointer-events: none;
1693
1701
  }
1694
1702
 
1695
- &:is(:not([src]), [src=""]):is(:not([poster]), [poster=""])
1703
+ &:not(:has(> fig-preview > video.fig-media-element[data-generated][src]:not([src=""]))):is(:not([poster]), [poster=""])
1696
1704
  > fig-preview > video.fig-media-element[data-generated] {
1697
1705
  opacity: 0;
1698
1706
  pointer-events: none;
@@ -1732,7 +1740,11 @@ fig-video {
1732
1740
  &:has(> [slot="overlay"]:is(:focus, :focus-within, :active)) > [slot="overlay"],
1733
1741
  &:has(> fig-input-file[variant="overlay"]:is(:focus, :focus-within, :active)) > fig-input-file[variant="overlay"],
1734
1742
  > [slot="overlay"]:focus-within,
1735
- > fig-input-file[variant="overlay"]:focus-within {
1743
+ > fig-input-file[variant="overlay"]:focus-within,
1744
+ /* The overlay is a sibling of fig-preview, so hovering it drops the
1745
+ preview's :hover. Keep it shown to avoid a show/hide flicker loop. */
1746
+ > [slot="overlay"]:hover,
1747
+ > fig-input-file[variant="overlay"]:hover {
1736
1748
  opacity: 1;
1737
1749
  pointer-events: all;
1738
1750
  }
@@ -2697,6 +2709,7 @@ fig-slider {
2697
2709
  --slider-stepper-padding: calc(
2698
2710
  (var(--slider-height) / 2) - var(--slider-tick-width) / 2
2699
2711
  );
2712
+ --slider-track-color: var(--figma-color-bg-secondary);
2700
2713
  --slider-percent: calc(var(--slider-complete) * 100%);
2701
2714
  --start-percent: calc(var(--default, 0) * 100%);
2702
2715
  --slider-tick-width: calc(var(--slider-height) / 4);
@@ -2741,7 +2754,7 @@ fig-slider {
2741
2754
  flex: 1 1 0;
2742
2755
  min-width: 0;
2743
2756
  transition: var(--slider-transition);
2744
- background: var(--figma-color-bg-secondary);
2757
+ background: var(--slider-track-color);
2745
2758
  border-radius: var(--slider-border-radius);
2746
2759
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
2747
2760
 
@@ -2764,6 +2777,13 @@ fig-slider {
2764
2777
  max-width: 100%;
2765
2778
  }
2766
2779
  }
2780
+
2781
+ /* Disabled: progress fill blends into the track so the bar stays legible */
2782
+ &:has(input[type="range"]:disabled) .fig-slider-input-container::before {
2783
+ background: var(--slider-track-color);
2784
+ box-shadow: none;
2785
+ }
2786
+
2767
2787
  &[type="stepper"] {
2768
2788
  .fig-slider-input-container {
2769
2789
  &::before {
@@ -2877,12 +2897,7 @@ fig-slider {
2877
2897
  }
2878
2898
 
2879
2899
  &:disabled::-webkit-slider-runnable-track {
2880
- background: linear-gradient(
2881
- to right,
2882
- var(--figma-color-bg-secondary) 0%,
2883
- var(--figma-color-bg-secondary) var(--slider-percent),
2884
- var(--figma-color-bg) var(--slider-percent)
2885
- );
2900
+ background-color: transparent;
2886
2901
  }
2887
2902
 
2888
2903
  &.hue::-webkit-slider-runnable-track {
@@ -2932,12 +2947,7 @@ fig-slider {
2932
2947
  }
2933
2948
 
2934
2949
  &:disabled::-moz-range-track {
2935
- background: linear-gradient(
2936
- to right,
2937
- var(--figma-color-bg-secondary) 0%,
2938
- var(--figma-color-bg-secondary) var(--slider-percent),
2939
- var(--figma-color-bg) var(--slider-percent)
2940
- );
2950
+ background-color: transparent;
2941
2951
  }
2942
2952
 
2943
2953
  &.hue::-moz-range-track {
@@ -3003,6 +3013,7 @@ fig-slider {
3003
3013
  0 0 0 0.75px rgba(0, 0, 0, 0.075), inset 0 0 0 5px rgba(0, 0, 0, 0.1),
3004
3014
  var(--figma-elevation-100);
3005
3015
  --slider-checkerboard: var(--checkerboard-slider);
3016
+ --slider-track-color: var(--figma-color-bg-tertiary);
3006
3017
 
3007
3018
  background-color: var(--figma-color-bg-secondary);
3008
3019
  border-radius: var(--radius-medium);
@@ -3018,7 +3029,7 @@ fig-slider {
3018
3029
  display: block;
3019
3030
  width: 100%;
3020
3031
  box-shadow: none;
3021
- background-color: var(--figma-color-bg-tertiary);
3032
+ background-color: var(--slider-track-color);
3022
3033
  }
3023
3034
  fig-input-text,
3024
3035
  fig-input-number {
@@ -3563,6 +3574,7 @@ fig-footer {
3563
3574
  z-index: 10;
3564
3575
  margin-top: auto;
3565
3576
  background: var(--figma-color-bg);
3577
+ border-radius: 0 0 var(--radius-large) var(--radius-large)
3566
3578
  }
3567
3579
  }
3568
3580
 
@@ -3578,6 +3590,9 @@ fig-content {
3578
3590
  &:has(>fig-group[name]:last-child){
3579
3591
  padding-bottom: 0;
3580
3592
  }
3593
+ &>p{
3594
+ padding-inline: var(--spacer-3);
3595
+ }
3581
3596
  }
3582
3597
 
3583
3598
  fig-content[padding]:not([padding="false"]):not(:empty) {
@@ -4318,52 +4333,6 @@ fig-spinner {
4318
4333
  }
4319
4334
  }
4320
4335
 
4321
- fig-interpolation-swatch {
4322
- position: relative;
4323
- display: inline-flex;
4324
- align-items: center;
4325
- justify-content: center;
4326
- width: 1.5rem;
4327
- height: 1.5rem;
4328
- flex: 0 0 auto;
4329
- color: var(--figma-color-bordertranslucent);
4330
- overflow: visible;
4331
-
4332
- &[size="large"] {
4333
- width: 2rem;
4334
- height: 2rem;
4335
-
4336
- .fig-interpolation-swatch-svg,
4337
- .fig-interpolation-swatch-fill {
4338
- width: 1.25rem;
4339
- height: 1.25rem;
4340
- }
4341
- }
4342
-
4343
- .fig-interpolation-swatch-svg {
4344
- display: block;
4345
- width: 1rem;
4346
- height: 1rem;
4347
- overflow: visible;
4348
- }
4349
-
4350
- .fig-interpolation-swatch-fill {
4351
- position: absolute;
4352
- top: 50%;
4353
- left: 50%;
4354
- transform: translate(-50%, -50%);
4355
- width: 1rem;
4356
- height: 1rem;
4357
- background: linear-gradient(90deg, #ff0000, #4f9eff);
4358
- -webkit-mask-size: 100% 100%;
4359
- mask-size: 100% 100%;
4360
- -webkit-mask-repeat: no-repeat;
4361
- mask-repeat: no-repeat;
4362
- -webkit-mask-position: center;
4363
- mask-position: center;
4364
- }
4365
- }
4366
-
4367
4336
  /* Segmented control */
4368
4337
  .segmented-control,
4369
4338
  fig-segmented-control {