@rogieking/figui3 1.0.2 → 1.0.4
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.css +2 -1
- package/fig.js +6 -0
- package/package.json +1 -1
package/fig.css
CHANGED
|
@@ -557,7 +557,7 @@ textarea {
|
|
|
557
557
|
|
|
558
558
|
/* Dropdown */
|
|
559
559
|
select,
|
|
560
|
-
input[list] {
|
|
560
|
+
input[type=text][list] {
|
|
561
561
|
height: var(--spacer-4);
|
|
562
562
|
padding: 0 var(--spacer-2);
|
|
563
563
|
appearance: none;
|
|
@@ -1774,6 +1774,7 @@ fig-field,
|
|
|
1774
1774
|
&[direction=horizontal] {
|
|
1775
1775
|
gap: var(--spacer-2);
|
|
1776
1776
|
align-items: flex-start;
|
|
1777
|
+
flex-direction: row;
|
|
1777
1778
|
}
|
|
1778
1779
|
}
|
|
1779
1780
|
|
package/fig.js
CHANGED
|
@@ -24,6 +24,7 @@ class FigButton extends HTMLElement {
|
|
|
24
24
|
display: block;
|
|
25
25
|
border: 0;
|
|
26
26
|
font: inherit;
|
|
27
|
+
color: inherit;
|
|
27
28
|
background: transparent;
|
|
28
29
|
}
|
|
29
30
|
</style>
|
|
@@ -108,6 +109,7 @@ class FigTooltip extends HTMLElement {
|
|
|
108
109
|
this.popup = document.createElement('span');
|
|
109
110
|
this.popup.setAttribute("class", "fig-tooltip")
|
|
110
111
|
this.popup.style.position = "fixed"
|
|
112
|
+
this.popup.style.visibility = "hidden"
|
|
111
113
|
this.popup.style.pointerEvents = "none"
|
|
112
114
|
this.popup.innerText = this.getAttribute("text")
|
|
113
115
|
document.body.append(this.popup)
|
|
@@ -175,6 +177,7 @@ class FigTooltip extends HTMLElement {
|
|
|
175
177
|
this.popup.style.top = `${top}px`;
|
|
176
178
|
this.popup.style.left = `${left}px`;
|
|
177
179
|
this.popup.style.opacity = "1";
|
|
180
|
+
this.popup.style.visibility = "visible"
|
|
178
181
|
this.popup.style.display = "block"
|
|
179
182
|
this.popup.style.pointerEvents = "all"
|
|
180
183
|
this.popup.style.zIndex = parseInt((new Date()).getTime() / 1000)
|
|
@@ -653,6 +656,9 @@ class FigField extends HTMLElement {
|
|
|
653
656
|
}
|
|
654
657
|
}
|
|
655
658
|
focus() {
|
|
659
|
+
if (!this.input) {
|
|
660
|
+
this.input = Array.from(this.childNodes).find(node => node.nodeName.toLowerCase().startsWith("fig-"))
|
|
661
|
+
}
|
|
656
662
|
console.log('input:', this.input)
|
|
657
663
|
this.input.focus()
|
|
658
664
|
}
|
package/package.json
CHANGED