@rogieking/figui3 1.0.69 → 1.0.71

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.
Files changed (3) hide show
  1. package/fig.css +22 -4
  2. package/fig.js +3 -3
  3. package/package.json +1 -1
package/fig.css CHANGED
@@ -919,6 +919,7 @@ input[type="color"] {
919
919
  box-sizing: content-box;
920
920
  border-radius: var(--radius-medium);
921
921
  background-color: var(--figma-color-bg-secondary);
922
+ display: inline-grid;
922
923
 
923
924
  &:focus {
924
925
  box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
@@ -931,8 +932,7 @@ input[type="color"] {
931
932
  border-radius: 0.125rem;
932
933
  background: var(--checkerboard);
933
934
  overflow: hidden;
934
- outline: 1px solid var(--figma-color-bordertranslucent);
935
- outline-offset: -1px;
935
+ grid-area: 1/1;
936
936
  }
937
937
 
938
938
  &::-moz-color-swatch {
@@ -945,12 +945,14 @@ input[type="color"] {
945
945
  black 50%,
946
946
  rgba(0, 0, 0, var(--alpha)) 50%
947
947
  );
948
+ border-radius: 0.125rem;
948
949
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
949
950
  }
950
951
 
951
952
  &::-webkit-color-swatch {
952
953
  padding: 0;
953
954
  border: 0;
955
+ border-radius: 0.125rem;
954
956
  mask-image: linear-gradient(
955
957
  to right,
956
958
  black 0%,
@@ -958,6 +960,7 @@ input[type="color"] {
958
960
  rgba(0, 0, 0, var(--alpha)) 50%
959
961
  );
960
962
  }
963
+
961
964
  }
962
965
 
963
966
 
@@ -990,6 +993,7 @@ fig-chit {
990
993
 
991
994
  &[type="gradient"]::after,
992
995
  &[type="image"]::after,
996
+ &[type="color"]::after,
993
997
  input[type="color"] {
994
998
  padding: 0;
995
999
  width: var(--size);
@@ -1020,7 +1024,7 @@ fig-chit {
1020
1024
  }
1021
1025
 
1022
1026
  &[type="gradient"],
1023
- &[type="image"] {
1027
+ &[type="image"]{
1024
1028
  &::after {
1025
1029
  content: "";
1026
1030
  width: 0.875rem;
@@ -1042,6 +1046,17 @@ fig-chit {
1042
1046
  opacity: 0;
1043
1047
  }
1044
1048
  }
1049
+ &[type="color"]{
1050
+ &::after {
1051
+ content: "";
1052
+ width: 0.875rem;
1053
+ height: 0.875rem;
1054
+ grid-area: 1/1;
1055
+ place-self: center;
1056
+ border-radius: 0.125rem;
1057
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
1058
+ }
1059
+ }
1045
1060
  &[type="image"] {
1046
1061
  &:not([src])::after {
1047
1062
  background: var(--checkerboard);
@@ -1376,11 +1391,14 @@ details {
1376
1391
  color: var(--figma-color-text-secondary);
1377
1392
 
1378
1393
  &::before {
1379
- content: var(--icon-chevron);
1394
+ content: "";
1395
+ mask-image: var(--icon-chevron);
1380
1396
  display: inline-flex;
1397
+ background: var(--figma-color-text-secondary);
1381
1398
  align-items: start;
1382
1399
  justify-content: center;
1383
1400
  width: 1rem;
1401
+ height: 1rem;
1384
1402
  transform: rotate(-90deg);
1385
1403
  transition: transform var(--transition-duration)
1386
1404
  var(--transition-timing-function);
package/fig.js CHANGED
@@ -217,15 +217,15 @@ class FigTooltip extends HTMLElement {
217
217
 
218
218
  destroy() {
219
219
  if (this.popup) {
220
- //this.popup.remove();
220
+ this.popup.remove();
221
221
  }
222
222
  document.body.addEventListener("click", this.hidePopupOutsideClick);
223
223
  }
224
224
 
225
225
  setupEventListeners() {
226
226
  if (this.action === "hover") {
227
- this.addEventListener("mouseenter", this.showDelayedPopup.bind(this));
228
- this.addEventListener("mouseleave", this.hidePopup.bind(this));
227
+ this.addEventListener("pointerenter", this.showDelayedPopup.bind(this));
228
+ this.addEventListener("pointerleave", this.hidePopup.bind(this));
229
229
  } else if (this.action === "click") {
230
230
  this.addEventListener("click", this.showDelayedPopup.bind(this));
231
231
  document.body.addEventListener(
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.69"
3
+ "version": "1.0.71"
4
4
  }