@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 CHANGED
@@ -2159,7 +2159,8 @@ fig-input-color,
2159
2159
  fig-checkbox,
2160
2160
  fig-radio,
2161
2161
  fig-tab,
2162
- fig-tabs {
2162
+ fig-tabs,
2163
+ fig-segmented-control {
2163
2164
  display: inline-flex;
2164
2165
  gap: var(--spacer-2);
2165
2166
  user-select: none;
package/example.html CHANGED
@@ -346,7 +346,10 @@
346
346
  </fig-field>
347
347
  <fig-field>
348
348
  <label>Submit Button</label>
349
- <fig-button type="submit">Submit</fig-button>
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").dispatchEvent(new Event("submit"));
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.style.opacity = "0";
409
- this.popup.style.display = "block";
410
- this.popup.style.pointerEvents = "none";
411
- this.destroy();
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.1",
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": {