@rogieking/figui3 11.2.1 → 11.2.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [11.2.2]
6
+
7
+ ### Changed
8
+
9
+ - Moved color-tip selection styling from the nested swatch to the full tip surface and beak.
10
+
11
+ ### Fixed
12
+
13
+ - Restored a consistent tokenized selection outline for `fig-color-tip` and removed conflicting nested swatch and gradient tip-handle focus rings.
14
+
5
15
  ## [11.2.1]
6
16
 
7
17
  ### Changed
package/components.css CHANGED
@@ -1559,7 +1559,6 @@ input[type="color"] {
1559
1559
  --swatch-background: linear-gradient(#d9d9d9, #d9d9d9);
1560
1560
  --swatch-bg-size: cover;
1561
1561
  --swatch-bg-position: center;
1562
- --selected: 0;
1563
1562
  --alpha: 1;
1564
1563
 
1565
1564
  display: inline-grid;
@@ -1567,8 +1566,6 @@ input[type="color"] {
1567
1566
  height: var(--size);
1568
1567
  border-radius: var(--border-radius);
1569
1568
  background-color: var(--figma-color-bg-secondary);
1570
- box-shadow: inset 0 0 0 calc(var(--selected) * 1px)
1571
- var(--figma-color-border-selected);
1572
1569
  flex-shrink: 0;
1573
1570
 
1574
1571
  &::before,
@@ -1582,12 +1579,6 @@ input[type="color"] {
1582
1579
  border-radius: var(--border-radius);
1583
1580
  }
1584
1581
 
1585
- /* Selection ring */
1586
- &[selected]:not([selected="false"]) {
1587
- --selected: 1;
1588
- background-color: transparent;
1589
- }
1590
-
1591
1582
  &[size="medium"],
1592
1583
  &[size="large"] {
1593
1584
  --padding: 0px;
@@ -2574,7 +2565,6 @@ fig-origin-grid {
2574
2565
  touch-action: none;
2575
2566
 
2576
2567
  &:focus-visible {
2577
- --figma-focus-outline-offset: 1px;
2578
2568
  outline: var(--figma-focus-outline);
2579
2569
  outline-offset: var(--figma-focus-outline-offset);
2580
2570
  }
@@ -4525,6 +4515,11 @@ fig-input-gradient {
4525
4515
  }
4526
4516
  .fig-input-gradient-track {
4527
4517
  inset: 0 calc(var(--fig-input-gradient-padding) + 2px);
4518
+
4519
+ fig-handle:focus-visible {
4520
+ outline: none !important;
4521
+ border: none !important;
4522
+ }
4528
4523
  }
4529
4524
  --fig-input-gradient-swatch-border-radius: var(--radius-medium);
4530
4525
  }
@@ -7026,7 +7021,7 @@ fig-handle {
7026
7021
 
7027
7022
  fig-color-tip {
7028
7023
  --size: 1.5rem;
7029
- --tip-selection-width: 1px;
7024
+ --tip-selection-width: var(--figma-focus-outline-width);
7030
7025
  --tip-selection-scale: 1;
7031
7026
  --beak-offset: 50%;
7032
7027
 
@@ -7042,7 +7037,6 @@ fig-color-tip {
7042
7037
  flex-shrink: 0;
7043
7038
  background-color: var(--figma-color-bg);
7044
7039
  border-radius: var(--radius-medium, 0.3125rem);
7045
- box-shadow: inset 0 0.5px 0 0 rgba(255, 255, 255, 0.1);
7046
7040
  filter: var(--fig-popover-shadow);
7047
7041
 
7048
7042
  &[control="add"],
@@ -7050,25 +7044,36 @@ fig-color-tip {
7050
7044
  cursor: pointer;
7051
7045
  }
7052
7046
 
7053
- :is(fig-swatch, fig-chit) {
7054
- input[type="color"] {
7055
- background: transparent;
7047
+ fig-swatch{
7048
+ &, & > input{
7049
+ background-color: transparent;
7050
+ outline: none !important;
7056
7051
  }
7057
7052
  }
7058
7053
 
7059
- &[selected]:not([selected="false"]):before {
7060
- content: "";
7061
- background: var(--figma-color-border-selected);
7062
- clip-path: var(--tip-pointer);
7063
- width: 1rem;
7064
- height: 6px;
7065
- position: absolute;
7066
- top: 100%;
7067
- left: var(--beak-offset, 50%);
7068
- z-index: 1;
7069
- pointer-events: none;
7070
- transform: translate(-50%, 0) scale(var(--tip-selection-scale));
7071
- transform-origin: 50% 0;
7054
+ &[selected]:not([selected="false"]){
7055
+ outline: var(--tip-selection-width) solid
7056
+ var(--figma-focus-outline-color);
7057
+ outline-offset: 0px;
7058
+ &:after {
7059
+ top: calc(
7060
+ 100% + var(--figma-focus-outline-offset) - var(--tip-selection-width) * 1.5
7061
+ );
7062
+ }
7063
+ &:before {
7064
+ content: "";
7065
+ background: var(--figma-focus-outline-color);
7066
+ clip-path: var(--tip-pointer);
7067
+ width: 1rem;
7068
+ height: 6px;
7069
+ position: absolute;
7070
+ top: calc(100% + var(--tip-selection-width) * 1);
7071
+ left: var(--beak-offset, 50%);
7072
+ z-index: 1;
7073
+ pointer-events: none;
7074
+ transform: translate(-50%, 0) scale(var(--tip-selection-scale));
7075
+ transform-origin: 50% 0;
7076
+ }
7072
7077
  }
7073
7078
 
7074
7079
  &:after {
@@ -7078,13 +7083,11 @@ fig-color-tip {
7078
7083
  width: 1rem;
7079
7084
  height: 6px;
7080
7085
  position: absolute;
7081
- top: calc(100% - 1px);
7086
+ top: calc(100% - var(--tip-selection-width) * 1.5);
7082
7087
  left: var(--beak-offset, 50%);
7083
7088
  z-index: 3;
7084
7089
  transform: translate(-50%);
7085
7090
  }
7086
-
7087
-
7088
7091
  }
7089
7092
 
7090
7093
  /* Menu */