@rogieking/figui3 6.37.0 → 6.38.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/dist/fig-editor.css +1 -1
- package/dist/fig-lab.css +1 -1
- package/dist/fig.js +14 -14
- package/fig-lab.css +16 -0
- package/fig.js +11 -12
- package/package.json +1 -1
package/fig-lab.css
CHANGED
|
@@ -1330,6 +1330,22 @@ propskit-slider {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
|
+
:is(
|
|
1334
|
+
propskit-switch,
|
|
1335
|
+
propskit-color,
|
|
1336
|
+
propskit-gradient,
|
|
1337
|
+
propskit-select,
|
|
1338
|
+
propskit-text,
|
|
1339
|
+
propskit-number,
|
|
1340
|
+
propskit-slider
|
|
1341
|
+
) fig-field:not([direction="vertical"]) > label {
|
|
1342
|
+
display: block;
|
|
1343
|
+
max-width: 40%;
|
|
1344
|
+
overflow: hidden;
|
|
1345
|
+
text-overflow: ellipsis;
|
|
1346
|
+
white-space: nowrap;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1333
1349
|
/* Canvas Control */
|
|
1334
1350
|
body {
|
|
1335
1351
|
--fig-lab-cursor: url('data:image/svg+xml,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(%23clip0_20065_231516)"><g filter="url(%23filter0_d_20065_231516)"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.93938 2.93938C3.35531 2.52345 3.97597 2.38901 4.52673 2.59555L15.5267 6.72055C16.1416 6.95111 16.535 7.55477 16.4976 8.21034C16.4603 8.86592 16.0009 9.421 15.3638 9.58026L10.737 10.737L9.58026 15.3638C9.421 16.0009 8.86592 16.4603 8.21034 16.4976C7.55477 16.535 6.95111 16.1416 6.72055 15.5267L2.59555 4.52673C2.38901 3.97597 2.52345 3.35531 2.93938 2.93938Z" fill="white"/></g><path fill-rule="evenodd" clip-rule="evenodd" d="M4.17558 3.53185C3.99199 3.463 3.7851 3.50782 3.64646 3.64646C3.50782 3.7851 3.463 3.99199 3.53185 4.17558L7.65685 15.1756C7.7337 15.3805 7.93492 15.5117 8.15345 15.4992C8.37197 15.4868 8.557 15.3336 8.61009 15.1213L9.91232 9.91232L15.1213 8.61009C15.3336 8.557 15.4868 8.37197 15.4992 8.15345C15.5117 7.93492 15.3805 7.7337 15.1756 7.65685L4.17558 3.53185Z" fill="black"/></g><defs><filter id="filter0_d_20065_231516" x="-0.5" y="0.5" width="20" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="1"/><feGaussianBlur stdDeviation="1.5"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_20065_231516"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_20065_231516" result="shape"/></filter><clipPath id="clip0_20065_231516"><rect width="32" height="32" fill="white"/></clipPath></defs></svg>') 3 3, default;
|
package/fig.js
CHANGED
|
@@ -1164,9 +1164,16 @@ class FigTooltip extends HTMLElement {
|
|
|
1164
1164
|
return false;
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
-
showDelayedPopup() {
|
|
1167
|
+
showDelayedPopup(event) {
|
|
1168
1168
|
if (this.#showPersisted) return;
|
|
1169
1169
|
clearTimeout(this.timeout);
|
|
1170
|
+
if (event?.type === "pointerenter") {
|
|
1171
|
+
const trigger = this.#triggerEl;
|
|
1172
|
+
const openSelect =
|
|
1173
|
+
trigger?.matches?.("fig-select[open]") ||
|
|
1174
|
+
trigger?.querySelector?.("fig-select[open]");
|
|
1175
|
+
if (openSelect) return;
|
|
1176
|
+
}
|
|
1170
1177
|
if (this.#isWarmSession()) {
|
|
1171
1178
|
this.render();
|
|
1172
1179
|
this.showPopup();
|
|
@@ -6652,6 +6659,8 @@ class FigSlider extends HTMLElement {
|
|
|
6652
6659
|
|
|
6653
6660
|
set value(value) {
|
|
6654
6661
|
const rawValue = value === null || value === undefined ? "" : String(value);
|
|
6662
|
+
this.#showEmptyTextValue =
|
|
6663
|
+
this.type !== "range" && rawValue.trim() === "";
|
|
6655
6664
|
const hasParsedBounds = this.min !== undefined || this.max !== undefined;
|
|
6656
6665
|
const normalized = hasParsedBounds
|
|
6657
6666
|
? String(this.#normalizeSliderValue(rawValue))
|
|
@@ -6997,18 +7006,8 @@ class FigSlider extends HTMLElement {
|
|
|
6997
7006
|
break;
|
|
6998
7007
|
case "value":
|
|
6999
7008
|
if (this.#isInteracting) break;
|
|
7000
|
-
this
|
|
7001
|
-
newValue === null ||
|
|
7002
|
-
(typeof newValue === "string" && newValue.trim() === "");
|
|
7003
|
-
this.value = this.#normalizeSliderValue(newValue);
|
|
7004
|
-
this.input.value = String(this.value);
|
|
7009
|
+
this.value = newValue;
|
|
7005
7010
|
this.#syncValue();
|
|
7006
|
-
if (this.figInputNumber) {
|
|
7007
|
-
this.figInputNumber.setAttribute(
|
|
7008
|
-
"value",
|
|
7009
|
-
this.#showEmptyTextValue ? "" : this.value,
|
|
7010
|
-
);
|
|
7011
|
-
}
|
|
7012
7011
|
break;
|
|
7013
7012
|
case "transform":
|
|
7014
7013
|
this.transform = Number(newValue) || 1;
|
package/package.json
CHANGED