@rogieking/figui3 9.2.1 → 9.2.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.
@@ -30,7 +30,8 @@ Handlers below assume `onInput` / `onChange` / `onClick` from [react.md](react.m
30
30
  </fig-property-button>
31
31
  ```
32
32
 
33
- - Attrs: `icon` (required fig-icon name), `selected`, `disabled`, `aria-haspopup`, `aria-expanded`, `aria-controls`
33
+ - Attrs: `icon` (generated fig-icon name), `selected`, `disabled`, `aria-haspopup`, `aria-expanded`, `aria-controls`
34
+ - Custom icon: author an element with `slot="prepend"` instead of `icon`; authored prepend content takes precedence
34
35
  - Fixed presentation: secondary, full width, start aligned, leading icon
35
36
  - Trigger only: the consumer owns and positions the corresponding popup/dialog
36
37
  - Events: `click`
@@ -18,7 +18,7 @@ Public API: `README.md`. React recipes: [components.md](components.md).
18
18
 
19
19
  ## `fig-property-button`
20
20
 
21
- - `icon`: required `fig-icon` name
21
+ - `icon`: generated `fig-icon` name; optional when authoring custom `slot="prepend"` content
22
22
  - `selected`, `disabled`
23
23
  - `aria-haspopup`, `aria-expanded`, `aria-controls`
24
24
  - Fixed secondary, full-width, start-aligned presentation
package/README.md CHANGED
@@ -185,11 +185,12 @@ Minimal example:
185
185
 
186
186
  `<fig-property-button>` — [demo](https://rog.ie/figui3/#property-button)
187
187
 
188
- A full-width secondary trigger for opening an effect editor, binding editor, preset picker, or other property-specific flyout. The component supplies the surface and generated leading icon but does not create or position a popup.
188
+ A full-width secondary trigger for opening an effect editor, binding editor, preset picker, or other property-specific flyout. The component supplies the surface and can generate a leading icon from `icon`, or accept custom prepend content, but does not create or position a popup.
189
189
 
190
190
  | Attribute | Type | Default | Description |
191
191
  |---|---|---|---|
192
- | `icon` | string | required | `fig-icon` name rendered in the prepend slot |
192
+ | `icon` | string | — | `fig-icon` name rendered in the prepend slot |
193
+ | `slot="prepend"` | element | — | Custom leading icon/content; takes precedence over `icon` |
193
194
  | `selected` | boolean | `false` | Selected styling, typically while the editor is open |
194
195
  | `disabled` | boolean | `false` | Disabled state |
195
196
  | `aria-haspopup` | string | — | Popup type exposed to assistive technology |
@@ -206,6 +207,11 @@ A full-width secondary trigger for opening an effect editor, binding editor, pre
206
207
  Effects
207
208
  </fig-property-button>
208
209
 
210
+ <fig-property-button>
211
+ <fig-icon name="sun" slot="prepend"></fig-icon>
212
+ Lighting effect
213
+ </fig-property-button>
214
+
209
215
  <dialog
210
216
  is="fig-popup"
211
217
  id="effects-editor"
package/components.css CHANGED
@@ -1150,7 +1150,10 @@ fig-property-button {
1150
1150
  }
1151
1151
  }
1152
1152
 
1153
- fig-property-button[icon]:not([icon="false"]) {
1153
+ fig-property-button:is(
1154
+ [icon]:not([icon="false"]),
1155
+ :has(> [slot="prepend"])
1156
+ ) {
1154
1157
  width: 100%;
1155
1158
  flex: 1 1 auto;
1156
1159
  padding: 0 calc(var(--spacer-2) - 1px) 0 0;