@rogieking/figui3 1.0.51 → 1.0.53

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/example.html CHANGED
@@ -44,6 +44,14 @@
44
44
  <fig-button>Primary</fig-button>
45
45
  <fig-button variant="secondary">Secondary</fig-button>
46
46
  <fig-button variant="ghost">Ghost</fig-button>
47
+ <fig-button type="select">
48
+ Select
49
+ <fig-dropdown>
50
+ <option>One</option>
51
+ <option>Two</option>
52
+ </fig-dropdown>
53
+ </fig-button>
54
+
47
55
  <fig-button variant="ghost"
48
56
  type="upload">
49
57
  Upload
package/fig.css CHANGED
@@ -756,8 +756,9 @@ fig-button {
756
756
  &[type="select"],
757
757
  &[type="upload"] {
758
758
  position: relative;
759
- select,
760
- input {
759
+ > select,
760
+ > input,
761
+ > fig-dropdown {
761
762
  position: absolute;
762
763
  inset: 0;
763
764
  opacity: 0;
package/fig.js CHANGED
@@ -121,7 +121,7 @@ class FigDropdown extends HTMLElement {
121
121
  this.select.appendChild(hiddenOption);
122
122
  }
123
123
  this.optionsSlot.assignedNodes().forEach((option) => {
124
- if (option.nodeName === "OPTION") {
124
+ if (option.nodeName === "OPTION" || option.nodeName === "OPTGROUP") {
125
125
  if (option.hasAttribute("value") && option.hasAttribute("selected")) {
126
126
  this.value = option.getAttribute("value");
127
127
  }
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.51"
3
+ "version": "1.0.53"
4
4
  }