@rogieking/figui3 2.23.0 → 2.24.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 +3 -3
- package/fig.js +8 -20
- package/index.html +2 -1
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -466,7 +466,6 @@ input[type="text"][list] {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
max-inline-size: var(--max-width);
|
|
470
469
|
padding-block: 0;
|
|
471
470
|
will-change: scale;
|
|
472
471
|
|
|
@@ -599,8 +598,9 @@ fig-dropdown,
|
|
|
599
598
|
display: none !important;
|
|
600
599
|
}
|
|
601
600
|
> select {
|
|
602
|
-
display:
|
|
603
|
-
|
|
601
|
+
display: flex;
|
|
602
|
+
align-items: center;
|
|
603
|
+
flex: 1;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
/* Chevron icon using mask-image for light-dark support */
|
package/fig.js
CHANGED
|
@@ -5076,6 +5076,8 @@ customElements.define("fig-chit", FigChit);
|
|
|
5076
5076
|
*/
|
|
5077
5077
|
class FigImage extends HTMLElement {
|
|
5078
5078
|
#src = null;
|
|
5079
|
+
#boundHandleFileInput = this.#handleFileInput.bind(this);
|
|
5080
|
+
#boundHandleDownload = this.#handleDownload.bind(this);
|
|
5079
5081
|
constructor() {
|
|
5080
5082
|
super();
|
|
5081
5083
|
}
|
|
@@ -5108,10 +5110,8 @@ class FigImage extends HTMLElement {
|
|
|
5108
5110
|
this.#updateRefs();
|
|
5109
5111
|
}
|
|
5110
5112
|
disconnectedCallback() {
|
|
5111
|
-
this.fileInput
|
|
5112
|
-
|
|
5113
|
-
this.#handleFileInput.bind(this)
|
|
5114
|
-
);
|
|
5113
|
+
this.fileInput?.removeEventListener("change", this.#boundHandleFileInput);
|
|
5114
|
+
this.downloadButton?.removeEventListener("click", this.#boundHandleDownload);
|
|
5115
5115
|
}
|
|
5116
5116
|
|
|
5117
5117
|
#updateRefs() {
|
|
@@ -5120,25 +5120,13 @@ class FigImage extends HTMLElement {
|
|
|
5120
5120
|
if (this.upload) {
|
|
5121
5121
|
this.uploadButton = this.querySelector("fig-button[type='upload']");
|
|
5122
5122
|
this.fileInput = this.uploadButton?.querySelector("input");
|
|
5123
|
-
this.fileInput
|
|
5124
|
-
|
|
5125
|
-
this.#handleFileInput.bind(this)
|
|
5126
|
-
);
|
|
5127
|
-
this.fileInput.addEventListener(
|
|
5128
|
-
"change",
|
|
5129
|
-
this.#handleFileInput.bind(this)
|
|
5130
|
-
);
|
|
5123
|
+
this.fileInput?.removeEventListener("change", this.#boundHandleFileInput);
|
|
5124
|
+
this.fileInput?.addEventListener("change", this.#boundHandleFileInput);
|
|
5131
5125
|
}
|
|
5132
5126
|
if (this.download) {
|
|
5133
5127
|
this.downloadButton = this.querySelector("fig-button[type='download']");
|
|
5134
|
-
this.downloadButton
|
|
5135
|
-
|
|
5136
|
-
this.#handleDownload.bind(this)
|
|
5137
|
-
);
|
|
5138
|
-
this.downloadButton.addEventListener(
|
|
5139
|
-
"click",
|
|
5140
|
-
this.#handleDownload.bind(this)
|
|
5141
|
-
);
|
|
5128
|
+
this.downloadButton?.removeEventListener("click", this.#boundHandleDownload);
|
|
5129
|
+
this.downloadButton?.addEventListener("click", this.#boundHandleDownload);
|
|
5142
5130
|
}
|
|
5143
5131
|
});
|
|
5144
5132
|
}
|
package/index.html
CHANGED
|
@@ -1577,7 +1577,8 @@
|
|
|
1577
1577
|
</fig-field>
|
|
1578
1578
|
<fig-field direction="horizontal">
|
|
1579
1579
|
<label>Dropdown</label>
|
|
1580
|
-
<fig-dropdown full
|
|
1580
|
+
<fig-dropdown full
|
|
1581
|
+
experimental="modern">
|
|
1581
1582
|
<option>Option One</option>
|
|
1582
1583
|
<option>Option Two</option>
|
|
1583
1584
|
<option>Option Three</option>
|
package/package.json
CHANGED