@rogieking/figui3 2.18.2 → 2.19.0

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/components.css CHANGED
@@ -747,6 +747,19 @@ fig-button {
747
747
  background-color: var(--figma-color-bg-secondary);
748
748
  box-shadow: none;
749
749
  color: var(--figma-color-text);
750
+
751
+ &:hover {
752
+ box-shadow: inset 0 0 0 1px var(--figma-color-border);
753
+ background-color: var(--figma-color-bg-transparent);
754
+ }
755
+
756
+ &:active {
757
+ background-color: var(--figma-color-bg-secondary);
758
+ }
759
+
760
+ &:focus-visible {
761
+ background-color: var(--figma-color-bg-secondary);
762
+ }
750
763
  }
751
764
 
752
765
  /* Variant: Overlay (for on top of content) */
package/fig.js CHANGED
@@ -3883,14 +3883,22 @@ class FigInputFill extends HTMLElement {
3883
3883
  );
3884
3884
  }
3885
3885
  break;
3886
- case "gradient":
3886
+ case "gradient": {
3887
3887
  if (this.#opacityInput) {
3888
3888
  this.#opacityInput.setAttribute(
3889
3889
  "value",
3890
3890
  this.#gradient.stops[0]?.opacity ?? 100
3891
3891
  );
3892
3892
  }
3893
+ const label = this.querySelector(".fig-input-fill-label");
3894
+ if (label) {
3895
+ const newLabel =
3896
+ this.#gradient.type.charAt(0).toUpperCase() +
3897
+ this.#gradient.type.slice(1);
3898
+ label.textContent = newLabel;
3899
+ }
3893
3900
  break;
3901
+ }
3894
3902
  case "image":
3895
3903
  if (this.#opacityInput) {
3896
3904
  this.#opacityInput.setAttribute(
@@ -6915,10 +6923,12 @@ class FigFillPicker extends HTMLElement {
6915
6923
  // ============ IMAGE TAB ============
6916
6924
  #initImageTab() {
6917
6925
  const container = this.#dialog.querySelector('[data-tab="image"]');
6926
+ const experimental = this.getAttribute("experimental");
6927
+ const expAttr = experimental ? `experimental="${experimental}"` : "";
6918
6928
 
6919
6929
  container.innerHTML = `
6920
6930
  <div class="fig-fill-picker-media-header">
6921
- <fig-dropdown class="fig-fill-picker-scale-mode" value="${
6931
+ <fig-dropdown class="fig-fill-picker-scale-mode" ${expAttr} value="${
6922
6932
  this.#image.scaleMode
6923
6933
  }">
6924
6934
  <option value="fill" selected>Fill</option>
@@ -7067,10 +7077,12 @@ class FigFillPicker extends HTMLElement {
7067
7077
  // ============ VIDEO TAB ============
7068
7078
  #initVideoTab() {
7069
7079
  const container = this.#dialog.querySelector('[data-tab="video"]');
7080
+ const experimental = this.getAttribute("experimental");
7081
+ const expAttr = experimental ? `experimental="${experimental}"` : "";
7070
7082
 
7071
7083
  container.innerHTML = `
7072
7084
  <div class="fig-fill-picker-media-header">
7073
- <fig-dropdown class="fig-fill-picker-scale-mode" value="${
7085
+ <fig-dropdown class="fig-fill-picker-scale-mode" ${expAttr} value="${
7074
7086
  this.#video.scaleMode
7075
7087
  }">
7076
7088
  <option value="fill" selected>Fill</option>
@@ -7156,6 +7168,8 @@ class FigFillPicker extends HTMLElement {
7156
7168
  // ============ WEBCAM TAB ============
7157
7169
  #initWebcamTab() {
7158
7170
  const container = this.#dialog.querySelector('[data-tab="webcam"]');
7171
+ const experimental = this.getAttribute("experimental");
7172
+ const expAttr = experimental ? `experimental="${experimental}"` : "";
7159
7173
 
7160
7174
  container.innerHTML = `
7161
7175
  <div class="fig-fill-picker-webcam-preview">
@@ -7166,7 +7180,7 @@ class FigFillPicker extends HTMLElement {
7166
7180
  </div>
7167
7181
  </div>
7168
7182
  <div class="fig-fill-picker-webcam-controls">
7169
- <fig-dropdown class="fig-fill-picker-camera-select" style="display: none;">
7183
+ <fig-dropdown class="fig-fill-picker-camera-select" ${expAttr} style="display: none;">
7170
7184
  </fig-dropdown>
7171
7185
  <fig-button class="fig-fill-picker-webcam-capture" variant="primary">
7172
7186
  Capture
package/index.html CHANGED
@@ -288,6 +288,17 @@
288
288
  <label>Link</label>
289
289
  <fig-button variant="link">Link Button</fig-button>
290
290
  </fig-field>
291
+ <fig-field direction="horizontal">
292
+ <label>Input</label>
293
+ <fig-button variant="input">Input Style</fig-button>
294
+ </fig-field>
295
+ <fig-field direction="horizontal">
296
+ <label>Input (with icon)</label>
297
+ <fig-button variant="input">
298
+ Options
299
+ <span class="fig-mask-icon" style="--icon: var(--icon-chevron); --size: 1rem"></span>
300
+ </fig-button>
301
+ </fig-field>
291
302
 
292
303
  <h3>Sizes</h3>
293
304
  <fig-field direction="horizontal">
@@ -323,6 +334,11 @@
323
334
  <fig-button variant="link"
324
335
  disabled>Disabled</fig-button>
325
336
  </fig-field>
337
+ <fig-field direction="horizontal">
338
+ <label>Disabled (input)</label>
339
+ <fig-button variant="input"
340
+ disabled>Disabled</fig-button>
341
+ </fig-field>
326
342
 
327
343
  <h3>Icon Buttons</h3>
328
344
  <fig-field direction="horizontal">
@@ -372,6 +388,13 @@
372
388
  </svg>
373
389
  </fig-button>
374
390
  </fig-field>
391
+ <fig-field direction="horizontal">
392
+ <label>Icon (input)</label>
393
+ <fig-button variant="input"
394
+ icon="true">
395
+ <span class="fig-mask-icon" style="--icon: var(--icon-chevron); --size: 1rem"></span>
396
+ </fig-button>
397
+ </fig-field>
375
398
  <fig-field direction="horizontal">
376
399
  <label>Icon (link)</label>
377
400
  <fig-button variant="link"
@@ -3751,6 +3774,11 @@
3751
3774
  style="--icon: var(--icon-steppers); --size: 1.5rem"></span>
3752
3775
  <code>--icon-steppers</code>
3753
3776
  </vstack>
3777
+ <vstack style="align-items: center; gap: 4px;">
3778
+ <span class="fig-mask-icon"
3779
+ style="--icon: var(--icon-chevron); --size: 1rem"></span>
3780
+ <code>--icon-chevron</code>
3781
+ </vstack>
3754
3782
  </hstack>
3755
3783
 
3756
3784
  <h3>Custom Size</h3>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "2.18.2",
3
+ "version": "2.19.0",
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": "MIT",