@rogieking/figui3 9.0.8 → 9.0.9

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/fig-editor.css CHANGED
@@ -318,7 +318,7 @@ fig-fill-picker {
318
318
  grid-template-columns: unset;
319
319
  grid-template-areas: unset;
320
320
  padding-right: var(--spacer-2);
321
- padding-left: var(--spacer-3);
321
+ padding-left: var(--spacer-2);
322
322
  gap: var(--spacer-2);
323
323
 
324
324
  > *:not(.fig-field-chevron):not(label) {
package/fig-editor.js CHANGED
@@ -3505,6 +3505,7 @@ class FigFillPicker extends HTMLElement {
3505
3505
  className: "fig-fill-picker-gradient-type",
3506
3506
  label: "Gradient type",
3507
3507
  value: this.#gradient.type,
3508
+ variant: "ghost",
3508
3509
  },
3509
3510
  figEditorCreateElement(
3510
3511
  "fig-select-options",
@@ -3591,7 +3592,7 @@ class FigFillPicker extends HTMLElement {
3591
3592
  className: "fig-fill-picker-gradient-stops-header",
3592
3593
  borderless: true,
3593
3594
  },
3594
- [figEditorCreateElement("span", {}, "Stops"), addButton],
3595
+ [figEditorCreateElement("h3", {}, "Stops"), addButton],
3595
3596
  ),
3596
3597
  figEditorCreateElement(
3597
3598
  "div",
package/fig.js CHANGED
@@ -18978,6 +18978,7 @@ class FigHandle extends HTMLElement {
18978
18978
  this.#syncDrag();
18979
18979
  this.#syncHitArea();
18980
18980
  this.addEventListener("click", this.#handleSelect);
18981
+ this.addEventListener("blur", this.#handleBlur);
18981
18982
  document.addEventListener("pointerdown", this.#handleDeselect);
18982
18983
  document.addEventListener("keydown", this.#handleKeyDown);
18983
18984
  const initial = this.getAttribute("value");
@@ -18995,6 +18996,7 @@ class FigHandle extends HTMLElement {
18995
18996
  this.#hitAreaEl = null;
18996
18997
  }
18997
18998
  this.removeEventListener("click", this.#handleSelect);
18999
+ this.removeEventListener("blur", this.#handleBlur);
18998
19000
  document.removeEventListener("pointerdown", this.#handleDeselect);
18999
19001
  document.removeEventListener("keydown", this.#handleKeyDown);
19000
19002
  }
@@ -19029,7 +19031,12 @@ class FigHandle extends HTMLElement {
19029
19031
  this.deselect();
19030
19032
  };
19031
19033
 
19034
+ #handleBlur = () => {
19035
+ this.removeAttribute("data-fig-pointer-focus");
19036
+ };
19037
+
19032
19038
  #handleKeyDown = (e) => {
19039
+ this.removeAttribute("data-fig-pointer-focus");
19033
19040
  if (e.defaultPrevented) return;
19034
19041
  if (
19035
19042
  e.target === this &&
@@ -19215,6 +19222,7 @@ class FigHandle extends HTMLElement {
19215
19222
  #onPointerDown(e) {
19216
19223
  if (!this.#dragEnabled || figBooleanAttribute(this, "disabled")) return;
19217
19224
  e.preventDefault();
19225
+ this.setAttribute("data-fig-pointer-focus", "");
19218
19226
  this.focus();
19219
19227
  this.select();
19220
19228
  const container = this.#getContainer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "9.0.8",
3
+ "version": "9.0.9",
4
4
  "description": "A lightweight web components library for building Figma plugin and widget UIs with native look and feel",
5
5
  "author": "Rogie King",
6
6
  "license": "SEE LICENSE IN LICENSE",