@rogieking/figui3 9.4.0 → 9.4.1

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.
@@ -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,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [9.4.1]
6
+
7
+ ### Added
8
+
9
+ - Added a playground example for authored `fig-group` headers with independent actions.
10
+
11
+ ### Changed
12
+
13
+ - Collapsible `fig-group` titles and chevrons now own toggle behavior, leaving header actions independent and keeping focus and hover feedback scoped to the toggle.
14
+ - `fig-group compact` now propagates to its direct `fig-header`; playground Compact controls update every group in an example.
15
+
16
+ ### Fixed
17
+
18
+ - `fig-truncate` now re-renders when its text changes and keeps tooltip behavior synchronized with content, overflow, and the `tooltip` attribute.
19
+
5
20
  ## [9.4.0]
6
21
 
7
22
  ### 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
@@ -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 {