@rogieking/figui3 9.4.1 → 9.4.3
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 -2
- package/CHANGELOG.md +12 -0
- package/README.md +3 -2
- package/components.css +6 -4
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +1 -1
- package/fig.js +16 -2
- package/package.json +1 -1
|
@@ -335,12 +335,12 @@ Handlers below assume `onInput` / `onChange` / `onClick` from [react.md](react.m
|
|
|
335
335
|
### `fig-group`
|
|
336
336
|
|
|
337
337
|
```tsx
|
|
338
|
-
<fig-group name="Appearance" collapsible open compact>
|
|
338
|
+
<fig-group name="Appearance" collapsible open compact chevron="end">
|
|
339
339
|
{children}
|
|
340
340
|
</fig-group>
|
|
341
341
|
```
|
|
342
342
|
|
|
343
|
-
- Attrs: `name`, `collapsible`, `open`, `compact`
|
|
343
|
+
- Attrs: `name`, `collapsible`, `open`, `compact`, `chevron` (`start` default, 16px | `end`, 24px)
|
|
344
344
|
- Group `compact` is propagated to the direct `fig-header`.
|
|
345
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.
|
|
346
346
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [9.4.3]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `chevron="start|end"` placement to collapsible `fig-group`; end placement uses the larger 24px chevron before header actions.
|
|
10
|
+
|
|
11
|
+
## [9.4.2]
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Prevented adjacent `fig-group` elements with authored headers from receiving the extra spacing reserved for headerless groups.
|
|
16
|
+
|
|
5
17
|
## [9.4.1]
|
|
6
18
|
|
|
7
19
|
### Added
|
package/README.md
CHANGED
|
@@ -1245,17 +1245,18 @@ A form field wrapper with flexible layout. Automatically links `<label>` to the
|
|
|
1245
1245
|
|
|
1246
1246
|
`<fig-group>` — [demo](https://rog.ie/figui3/#group)
|
|
1247
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.
|
|
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. Start chevrons use the compact 16px icon; end chevrons use the larger 24px icon.
|
|
1249
1249
|
|
|
1250
1250
|
| Attribute | Type | Default | Description |
|
|
1251
1251
|
|---|---|---|---|
|
|
1252
1252
|
| `name` | string | — | Generated header text |
|
|
1253
1253
|
| `collapsible` | boolean | `false` | Enables collapse behavior |
|
|
1254
1254
|
| `open` | boolean | `false` | Expanded state |
|
|
1255
|
+
| `chevron` | string | `"start"` | Chevron placement: `"start"` or `"end"` |
|
|
1255
1256
|
| `compact` | boolean | `false` | Adds `compact` to the direct `fig-header` |
|
|
1256
1257
|
|
|
1257
1258
|
```html
|
|
1258
|
-
<fig-group collapsible open>
|
|
1259
|
+
<fig-group collapsible open chevron="end">
|
|
1259
1260
|
<fig-header borderless>
|
|
1260
1261
|
<h3>Export</h3>
|
|
1261
1262
|
<fig-button variant="ghost" icon aria-label="Add export">
|
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
|
}
|
|
@@ -4063,18 +4063,20 @@ fig-group {
|
|
|
4063
4063
|
cursor: default;
|
|
4064
4064
|
}
|
|
4065
4065
|
& > .fig-group-chevron {
|
|
4066
|
-
--icon: var(--icon-16-chevron);
|
|
4067
|
-
--size: 1rem;
|
|
4068
4066
|
flex: 0 0 auto;
|
|
4069
4067
|
color: var(--figma-color-text-tertiary);
|
|
4070
4068
|
transform: rotate(-90deg);
|
|
4071
4069
|
transition: transform var(--transition-duration)
|
|
4072
4070
|
var(--transition-timing-function);
|
|
4073
|
-
margin-
|
|
4071
|
+
margin-inline-start: calc(var(--spacer-2) * -1);
|
|
4074
4072
|
cursor: default;
|
|
4075
4073
|
}
|
|
4076
4074
|
}
|
|
4077
4075
|
|
|
4076
|
+
&[chevron="end"] > fig-header > .fig-group-chevron {
|
|
4077
|
+
margin-inline-start: 0;
|
|
4078
|
+
}
|
|
4079
|
+
|
|
4078
4080
|
&[collapsible] > fig-header h3 {
|
|
4079
4081
|
user-select: none;
|
|
4080
4082
|
}
|