@rogieking/figui3 9.2.1 → 9.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/fig.js CHANGED
@@ -918,7 +918,8 @@ figDefineElement("fig-button", FigButton);
918
918
 
919
919
  /**
920
920
  * A full-width secondary button for opening a property editor or flyout.
921
- * @attr {string} icon - Required fig-icon name shown before the button label.
921
+ * @attr {string} icon - Optional fig-icon name shown before the button label.
922
+ * Author a custom child with slot="prepend" instead when needed.
922
923
  * @attr {boolean} disabled - Whether the trigger is disabled.
923
924
  */
924
925
  class FigPropertyButton extends FigButton {
@@ -973,6 +974,14 @@ class FigPropertyButton extends FigButton {
973
974
  ':scope > fig-icon[slot="prepend"][data-generated="property-button-icon"]',
974
975
  ),
975
976
  );
977
+ const authoredPrepend = this.querySelector(
978
+ ':scope > [slot="prepend"]:not([data-generated="property-button-icon"])',
979
+ );
980
+ if (authoredPrepend) {
981
+ generated.forEach((icon) => icon.remove());
982
+ return;
983
+ }
984
+
976
985
  const iconName = this.icon.trim();
977
986
  if (!iconName) {
978
987
  generated.forEach((icon) => icon.remove());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "9.2.1",
3
+ "version": "9.2.2",
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",