@rogieking/figui3 9.4.0 → 9.4.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 -0
- package/CHANGELOG.md +21 -0
- package/README.md +28 -0
- package/components.css +6 -14
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +5 -5
- package/fig.js +106 -23
- package/package.json +1 -1
|
@@ -341,6 +341,8 @@ Handlers below assume `onInput` / `onChange` / `onClick` from [react.md](react.m
|
|
|
341
341
|
```
|
|
342
342
|
|
|
343
343
|
- Attrs: `name`, `collapsible`, `open`, `compact`
|
|
344
|
+
- Group `compact` is propagated to the direct `fig-header`.
|
|
345
|
+
- In a collapsible group, the `h3` is the keyboard-accessible toggle and the chevron is clickable. For custom headers, place independent actions beside the `h3`, not inside it.
|
|
344
346
|
|
|
345
347
|
### `fig-header`
|
|
346
348
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [9.4.2]
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Prevented adjacent `fig-group` elements with authored headers from receiving the extra spacing reserved for headerless groups.
|
|
10
|
+
|
|
11
|
+
## [9.4.1]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added a playground example for authored `fig-group` headers with independent actions.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Collapsible `fig-group` titles and chevrons now own toggle behavior, leaving header actions independent and keeping focus and hover feedback scoped to the toggle.
|
|
20
|
+
- `fig-group compact` now propagates to its direct `fig-header`; playground Compact controls update every group in an example.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `fig-truncate` now re-renders when its text changes and keeps tooltip behavior synchronized with content, overflow, and the `tooltip` attribute.
|
|
25
|
+
|
|
5
26
|
## [9.4.0]
|
|
6
27
|
|
|
7
28
|
### Added
|
package/README.md
CHANGED
|
@@ -121,6 +121,7 @@ Minimal example:
|
|
|
121
121
|
| [Segmented Control](#segmented-control) | `<fig-segmented-control>` / `<fig-segment>` | Segmented button group |
|
|
122
122
|
| [Chooser](#chooser) | `<fig-chooser>` / `<fig-choice>` | Selection list with drag scroll |
|
|
123
123
|
| [Field](#field) | `<fig-field>` | Form field wrapper with layout |
|
|
124
|
+
| [Group](#group) | `<fig-group>` | Named or collapsible section group |
|
|
124
125
|
| [Joystick](#joystick) | `<fig-joystick>` | 2D position input |
|
|
125
126
|
| [Origin Grid](#origin-grid) | `<fig-origin-grid>` | Transform-origin grid |
|
|
126
127
|
| [Easing Curve](#easing-curve) | `<fig-easing-curve>` | Bezier/spring curve editor |
|
|
@@ -1240,6 +1241,33 @@ A form field wrapper with flexible layout. Automatically links `<label>` to the
|
|
|
1240
1241
|
|
|
1241
1242
|
---
|
|
1242
1243
|
|
|
1244
|
+
#### Group
|
|
1245
|
+
|
|
1246
|
+
`<fig-group>` — [demo](https://rog.ie/figui3/#group)
|
|
1247
|
+
|
|
1248
|
+
A section group with an optional generated or authored header. In collapsible groups, the `h3` is the keyboard-accessible toggle and the chevron is clickable; controls placed beside the `h3` in an authored `fig-header` remain independent.
|
|
1249
|
+
|
|
1250
|
+
| Attribute | Type | Default | Description |
|
|
1251
|
+
|---|---|---|---|
|
|
1252
|
+
| `name` | string | — | Generated header text |
|
|
1253
|
+
| `collapsible` | boolean | `false` | Enables collapse behavior |
|
|
1254
|
+
| `open` | boolean | `false` | Expanded state |
|
|
1255
|
+
| `compact` | boolean | `false` | Adds `compact` to the direct `fig-header` |
|
|
1256
|
+
|
|
1257
|
+
```html
|
|
1258
|
+
<fig-group collapsible open>
|
|
1259
|
+
<fig-header borderless>
|
|
1260
|
+
<h3>Export</h3>
|
|
1261
|
+
<fig-button variant="ghost" icon aria-label="Add export">
|
|
1262
|
+
<fig-icon name="add"></fig-icon>
|
|
1263
|
+
</fig-button>
|
|
1264
|
+
</fig-header>
|
|
1265
|
+
<fig-field>...</fig-field>
|
|
1266
|
+
</fig-group>
|
|
1267
|
+
```
|
|
1268
|
+
|
|
1269
|
+
---
|
|
1270
|
+
|
|
1243
1271
|
#### Dialog
|
|
1244
1272
|
|
|
1245
1273
|
`<fig-dialog>` — [demo](https://rog.ie/figui3/#dialog)
|
package/components.css
CHANGED
|
@@ -4028,7 +4028,7 @@ fig-group {
|
|
|
4028
4028
|
/* Sibling groups */
|
|
4029
4029
|
& + fig-group {
|
|
4030
4030
|
box-shadow: inset 0 1px 0 0 var(--figma-color-border);
|
|
4031
|
-
&:not(
|
|
4031
|
+
&:not(:has(fig-header)) {
|
|
4032
4032
|
padding-top: var(--spacer-2-5);
|
|
4033
4033
|
}
|
|
4034
4034
|
}
|
|
@@ -4039,18 +4039,11 @@ fig-group {
|
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
4041
|
|
|
4042
|
-
&[compact]:not([compact="false"]) {
|
|
4043
|
-
& > fig-header{
|
|
4044
|
-
--fig-header-height: var(--spacer-5);
|
|
4045
|
-
}
|
|
4046
|
-
}
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
4042
|
& > fig-header {
|
|
4050
4043
|
cursor: default;
|
|
4051
4044
|
gap: 0;
|
|
4052
4045
|
|
|
4053
|
-
&:focus-visible {
|
|
4046
|
+
&:has(> h3:focus-visible) {
|
|
4054
4047
|
--figma-focus-outline-radius: var(--radius-medium);
|
|
4055
4048
|
outline: var(--figma-focus-outline);
|
|
4056
4049
|
outline-offset: var(--figma-focus-outline-offset);
|
|
@@ -4062,10 +4055,12 @@ fig-group {
|
|
|
4062
4055
|
display: block;
|
|
4063
4056
|
margin:0;
|
|
4064
4057
|
padding-left: 0;
|
|
4058
|
+
outline: none;
|
|
4065
4059
|
text-overflow: ellipsis;
|
|
4066
4060
|
overflow: hidden;
|
|
4067
4061
|
white-space: nowrap;
|
|
4068
4062
|
max-width: 100%;
|
|
4063
|
+
cursor: default;
|
|
4069
4064
|
}
|
|
4070
4065
|
& > .fig-group-chevron {
|
|
4071
4066
|
--icon: var(--icon-16-chevron);
|
|
@@ -4076,6 +4071,7 @@ fig-group {
|
|
|
4076
4071
|
transition: transform var(--transition-duration)
|
|
4077
4072
|
var(--transition-timing-function);
|
|
4078
4073
|
margin-left: calc(var(--spacer-2) * -1);
|
|
4074
|
+
cursor: default;
|
|
4079
4075
|
}
|
|
4080
4076
|
}
|
|
4081
4077
|
|
|
@@ -4088,7 +4084,7 @@ fig-group {
|
|
|
4088
4084
|
margin-bottom: 0;
|
|
4089
4085
|
fig-header {
|
|
4090
4086
|
color: var(--figma-color-text-secondary);
|
|
4091
|
-
&:hover {
|
|
4087
|
+
&:has(> h3:hover, > .fig-group-chevron:hover) {
|
|
4092
4088
|
color: var(--figma-color-text);
|
|
4093
4089
|
.fig-group-chevron {
|
|
4094
4090
|
color: inherit;
|
|
@@ -4106,10 +4102,6 @@ fig-group {
|
|
|
4106
4102
|
display: none;
|
|
4107
4103
|
}
|
|
4108
4104
|
|
|
4109
|
-
&[compact]:not([compact="false"]) > fig-header {
|
|
4110
|
-
--fig-header-height: var(--spacer-5);
|
|
4111
|
-
height: var(--fig-header-height);
|
|
4112
|
-
}
|
|
4113
4105
|
}
|
|
4114
4106
|
|
|
4115
4107
|
fig-footer {
|