@rogieking/figui3 9.2.0 → 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.
- package/.cursor/skills/figui3/components.md +2 -1
- package/.cursor/skills/figui3/reference.md +1 -1
- package/README.md +8 -2
- package/components.css +31 -7
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +1 -1
- package/fig.js +10 -1
- package/package.json +1 -1
|
@@ -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` (
|
|
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`:
|
|
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
|
|
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 |
|
|
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
|
|
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;
|
|
@@ -1169,6 +1172,9 @@ fig-input-combo {
|
|
|
1169
1172
|
flex-wrap: nowrap;
|
|
1170
1173
|
align-items: center;
|
|
1171
1174
|
gap: 0px;
|
|
1175
|
+
&[full]:not([full="false"]) {
|
|
1176
|
+
width: 100%;
|
|
1177
|
+
}
|
|
1172
1178
|
& > * {
|
|
1173
1179
|
&:first-child,
|
|
1174
1180
|
&:first-child > * {
|
|
@@ -1192,6 +1198,30 @@ fig-input-combo {
|
|
|
1192
1198
|
fig-input-combo {
|
|
1193
1199
|
gap: 1px;
|
|
1194
1200
|
}
|
|
1201
|
+
|
|
1202
|
+
:is(.fig-button-combo, fig-button-combo, .fig-input-combo, fig-input-combo):not(
|
|
1203
|
+
:has(> :not([variant="secondary"]))
|
|
1204
|
+
) {
|
|
1205
|
+
gap: 0;
|
|
1206
|
+
border-radius: var(--radius-medium);
|
|
1207
|
+
box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
|
|
1208
|
+
|
|
1209
|
+
> [variant="secondary"] {
|
|
1210
|
+
box-shadow: none;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
> [variant="secondary"] + [variant="secondary"] {
|
|
1214
|
+
box-shadow: none;
|
|
1215
|
+
background-image: linear-gradient(
|
|
1216
|
+
var(--figma-color-bordertranslucent),
|
|
1217
|
+
var(--figma-color-bordertranslucent)
|
|
1218
|
+
);
|
|
1219
|
+
background-position: left 1px;
|
|
1220
|
+
background-repeat: no-repeat;
|
|
1221
|
+
background-size: 1px calc(100% - 2px);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1195
1225
|
.fig-button-combo,
|
|
1196
1226
|
fig-button-combo {
|
|
1197
1227
|
> *:not([variant="secondary"]):not(:first-child) {
|
|
@@ -1200,12 +1230,6 @@ fig-button-combo {
|
|
|
1200
1230
|
box-shadow: inset 1px 0 0 0 var(--figma-color-border-disabled);
|
|
1201
1231
|
}
|
|
1202
1232
|
}
|
|
1203
|
-
> *[variant="secondary"]:not(:first-child) {
|
|
1204
|
-
border-left-width: 0 !important;
|
|
1205
|
-
&[disabled]:not([disabled="false"]) {
|
|
1206
|
-
border-left-width: 0 !important;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
1233
|
}
|
|
1210
1234
|
|
|
1211
1235
|
/* Tabs */
|