@rogieking/figui3 9.4.1 → 9.4.3

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.js CHANGED
@@ -18735,7 +18735,13 @@ figDefineElement("fig-skeleton", FigSkeleton);
18735
18735
 
18736
18736
  // FigGroup
18737
18737
  class FigGroup extends HTMLElement {
18738
- static observedAttributes = ["name", "collapsible", "open", "compact"];
18738
+ static observedAttributes = [
18739
+ "name",
18740
+ "collapsible",
18741
+ "open",
18742
+ "compact",
18743
+ "chevron",
18744
+ ];
18739
18745
 
18740
18746
  #header = null;
18741
18747
  #chevron = null;
@@ -18899,7 +18905,15 @@ class FigGroup extends HTMLElement {
18899
18905
  className: "fig-group-chevron",
18900
18906
  });
18901
18907
  }
18902
- this.#header.insertBefore(chevron, h3);
18908
+ const chevronAtEnd = this.getAttribute("chevron") === "end";
18909
+ chevron.setAttribute("size", chevronAtEnd ? "medium" : "small");
18910
+ if (chevronAtEnd) {
18911
+ if (h3.nextSibling !== chevron) {
18912
+ this.#header.insertBefore(chevron, h3.nextSibling);
18913
+ }
18914
+ } else if (h3.previousSibling !== chevron) {
18915
+ this.#header.insertBefore(chevron, h3);
18916
+ }
18903
18917
  this.#chevron = chevron;
18904
18918
  this.#header.removeAttribute("role");
18905
18919
  this.#header.removeAttribute("tabindex");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "9.4.1",
3
+ "version": "9.4.3",
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",