@rogieking/figui3 1.9.1 → 1.9.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/components.css +2 -1
- package/example.html +4 -1
- package/fig.js +11 -5
- package/package.json +2 -2
package/components.css
CHANGED
package/example.html
CHANGED
|
@@ -346,7 +346,10 @@
|
|
|
346
346
|
</fig-field>
|
|
347
347
|
<fig-field>
|
|
348
348
|
<label>Submit Button</label>
|
|
349
|
-
<
|
|
349
|
+
<form action="https://www.google.com/search?q=rogie"
|
|
350
|
+
method="get">
|
|
351
|
+
<fig-button type="submit">Submit</fig-button>
|
|
352
|
+
</form>
|
|
350
353
|
</fig-field>
|
|
351
354
|
<fig-field>
|
|
352
355
|
<label>Disabled Button</label>
|
package/fig.js
CHANGED
|
@@ -73,7 +73,10 @@ class FigButton extends HTMLElement {
|
|
|
73
73
|
this.toggleAttribute("selected", !this.hasAttribute("selected"));
|
|
74
74
|
}
|
|
75
75
|
if (this.type === "submit") {
|
|
76
|
-
this.closest("form")
|
|
76
|
+
let form = this.closest("form");
|
|
77
|
+
if (form) {
|
|
78
|
+
form.submit();
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
if (this.type === "link") {
|
|
79
82
|
const href = this.getAttribute("href");
|
|
@@ -405,10 +408,13 @@ class FigTooltip extends HTMLElement {
|
|
|
405
408
|
hidePopup() {
|
|
406
409
|
clearTimeout(this.timeout);
|
|
407
410
|
clearTimeout(this.#touchTimeout);
|
|
408
|
-
this.popup
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
411
|
+
if (this.popup) {
|
|
412
|
+
this.popup.style.opacity = "0";
|
|
413
|
+
this.popup.style.display = "block";
|
|
414
|
+
this.popup.style.pointerEvents = "none";
|
|
415
|
+
this.destroy();
|
|
416
|
+
}
|
|
417
|
+
|
|
412
418
|
this.isOpen = false;
|
|
413
419
|
}
|
|
414
420
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rogieking/figui3",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/rogie/figui3.git"
|
|
17
|
+
"url": "git+https://github.com/rogie/figui3.git"
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/rogie/figui3#readme",
|
|
20
20
|
"bugs": {
|