@rogieking/figui3 9.4.2 → 9.4.4
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 +7 -7
- 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.4]
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- `fig-group` now uses bottom padding instead of margin for section spacing, keeping spacing inside its own layout box and removing it when collapsed.
|
|
10
|
+
|
|
11
|
+
## [9.4.3]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added `chevron="start|end"` placement to collapsible `fig-group`; end placement uses the larger 24px chevron before header actions.
|
|
16
|
+
|
|
5
17
|
## [9.4.2]
|
|
6
18
|
|
|
7
19
|
### Fixed
|
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
|
@@ -4017,9 +4017,7 @@ fig-header {
|
|
|
4017
4017
|
fig-group {
|
|
4018
4018
|
display: block;
|
|
4019
4019
|
width: 100%;
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4020
|
+
padding-bottom: var(--spacer-2-5);
|
|
4023
4021
|
|
|
4024
4022
|
p{
|
|
4025
4023
|
margin: 0 var(--spacer-3) var(--spacer-2) var(--spacer-3);
|
|
@@ -4063,25 +4061,27 @@ fig-group {
|
|
|
4063
4061
|
cursor: default;
|
|
4064
4062
|
}
|
|
4065
4063
|
& > .fig-group-chevron {
|
|
4066
|
-
--icon: var(--icon-16-chevron);
|
|
4067
|
-
--size: 1rem;
|
|
4068
4064
|
flex: 0 0 auto;
|
|
4069
4065
|
color: var(--figma-color-text-tertiary);
|
|
4070
4066
|
transform: rotate(-90deg);
|
|
4071
4067
|
transition: transform var(--transition-duration)
|
|
4072
4068
|
var(--transition-timing-function);
|
|
4073
|
-
margin-
|
|
4069
|
+
margin-inline-start: calc(var(--spacer-2) * -1);
|
|
4074
4070
|
cursor: default;
|
|
4075
4071
|
}
|
|
4076
4072
|
}
|
|
4077
4073
|
|
|
4074
|
+
&[chevron="end"] > fig-header > .fig-group-chevron {
|
|
4075
|
+
margin-inline-start: 0;
|
|
4076
|
+
}
|
|
4077
|
+
|
|
4078
4078
|
&[collapsible] > fig-header h3 {
|
|
4079
4079
|
user-select: none;
|
|
4080
4080
|
}
|
|
4081
4081
|
|
|
4082
4082
|
&[collapsible]:not([open]):not([open="true"]),
|
|
4083
4083
|
&[collapsible][open="false"] {
|
|
4084
|
-
|
|
4084
|
+
padding-bottom: 0;
|
|
4085
4085
|
fig-header {
|
|
4086
4086
|
color: var(--figma-color-text-secondary);
|
|
4087
4087
|
&:has(> h3:hover, > .fig-group-chevron:hover) {
|