@rogieking/figui3 8.9.14 → 8.9.16
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/fig-lab/SKILL.md +2 -2
- package/.cursor/skills/figui3/SKILL.md +1 -1
- package/.cursor/skills/propkit/SKILL.md +1 -1
- package/README.md +6 -6
- package/components.css +3 -1
- package/dist/components.css +1 -1
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +2 -2
- package/dist/fig.css +1 -1
- package/dist/fig.js +4 -4
- package/fig-lab.css +27 -50
- package/fig-lab.js +115 -39
- package/fig.js +27 -9
- package/package.json +1 -1
|
@@ -49,8 +49,8 @@ Shared:
|
|
|
49
49
|
| Tag | Playground | Inner control | Notes |
|
|
50
50
|
|---|---|---|---|
|
|
51
51
|
| `propskit-switch` | `#propskit-switch` | `fig-switch` | `checked`, `default` boolean |
|
|
52
|
-
| `propskit-color` | `#propskit-color` | `fig-
|
|
53
|
-
| `propskit-gradient` | `#propskit-gradient` | `fig-input-gradient` | `edit
|
|
52
|
+
| `propskit-color` | `#propskit-color` | `fig-fill-picker` + `fig-swatch` | Solid swatch, same size as gradient. Opens the fill picker. `alpha` default true |
|
|
53
|
+
| `propskit-gradient` | `#propskit-gradient` | `fig-input-gradient` | Default `edit="picker"`. `mode="handle\|tip"` for inline edit |
|
|
54
54
|
| `propskit-select` | `#propskit-select` | `fig-select` | `options` or slotted `fig-select-options` |
|
|
55
55
|
| `propskit-text` | `#propskit-text` | `fig-input-text` | `type`, `readonly` |
|
|
56
56
|
| `propskit-number` | `#propskit-number` | `fig-input-number` | `min`, `max`, `step`, `precision`, `units`, `steppers` |
|
|
@@ -154,7 +154,7 @@ Playground hashes: `/figui3#{id}`. Full attrs: [reference.md](reference.md).
|
|
|
154
154
|
| `fig-header` / `fig-footer` / `fig-content` | (containers) | Header: `borderless`, `compact`. Footer: `sticky` |
|
|
155
155
|
| `fig-tabs` / `fig-tab` | `#tabs` | Roving tabs. `content="#id"` for panels |
|
|
156
156
|
| `fig-segmented-control` / `fig-segment` | `#segmented-control` | Radio-group pattern |
|
|
157
|
-
| `fig-chooser` / `fig-choice` |
|
|
157
|
+
| `fig-chooser` / `fig-choice` | `#chooser` | Listbox. Omit `value` to select first; `value=""` means none. |
|
|
158
158
|
| `fig-separator` / `fig-menu-separator` | `#separator` | Optional `label`, `sticky`, `borderless` |
|
|
159
159
|
| `fig-menu` / `fig-menu-item` | `#menu` | `fig-menu-trigger`, `trigger="contextmenu"`, `position`, `offset`. Item also works in `fig-popup` (sticky separators, nested row menus). |
|
|
160
160
|
| `fig-icon` | `#icon` | Token mask (`name`, `size="small"`, `color`) |
|
|
@@ -68,7 +68,7 @@ On `fig-*` and `<dialog is="fig-...">`, use `class` not `className`.
|
|
|
68
68
|
| Small discrete set (2–5) | `fig-segmented-control` | — |
|
|
69
69
|
| Larger / rich list | `fig-select` (editor) | `propskit-select` |
|
|
70
70
|
| Native select only | `fig-dropdown` | — |
|
|
71
|
-
| Color | `fig-input-color` `text="true"` | `propskit-color` |
|
|
71
|
+
| Color | `fig-input-color` `text="true"` | `propskit-color` (fill-picker swatch) |
|
|
72
72
|
| Fill | `fig-input-fill` | — |
|
|
73
73
|
| Gradient | `fig-input-gradient` | `propskit-gradient` |
|
|
74
74
|
| Image | `fig-image` `upload` | — |
|
package/README.md
CHANGED
|
@@ -392,11 +392,11 @@ Right-click and choose **Reset**, or call `resetToDefault()`, to restore `defaul
|
|
|
392
392
|
|
|
393
393
|
`<propskit-color>`
|
|
394
394
|
|
|
395
|
-
Composes a `<fig-field>` and
|
|
395
|
+
Composes a `<fig-field>` and a solid `fig-fill-picker` swatch into a full-surface property control. Clicking the swatch opens the color picker. There is no hex/opacity text field.
|
|
396
396
|
|
|
397
397
|
**Attributes:** `label`, `value`, `default`, `alpha`, `disabled`, `size`
|
|
398
398
|
|
|
399
|
-
**Events:** `input`, `change` —
|
|
399
|
+
**Events:** `input`, `change` — `{ color, alpha, opacity }` from the fill picker.
|
|
400
400
|
|
|
401
401
|
Right-click and choose **Reset**, or call `resetToDefault()`, to restore `default` or the initial color.
|
|
402
402
|
|
|
@@ -410,14 +410,14 @@ Right-click and choose **Reset**, or call `resetToDefault()`, to restore `defaul
|
|
|
410
410
|
|
|
411
411
|
`<propskit-gradient>`
|
|
412
412
|
|
|
413
|
-
Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property control.
|
|
413
|
+
Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property control. Defaults to `edit="picker"` — click the swatch to open the fill picker.
|
|
414
414
|
|
|
415
415
|
| Attribute | Type | Default | Description |
|
|
416
416
|
|---|---|---|---|
|
|
417
417
|
| `label` | string | `"Label"` | Field label text; use an empty value to hide it |
|
|
418
418
|
| `value` | JSON string | default gradient | Canonical `{ "type": "gradient", "gradient": { ... } }` data |
|
|
419
419
|
| `default` | JSON string | initial `value` | Right-click and group reset target |
|
|
420
|
-
| `edit` | boolean/string | `
|
|
420
|
+
| `edit` | boolean/string | `"picker"` | `true` (inline stops), `false`, or `"picker"` |
|
|
421
421
|
| `mode` | string | `"handle"` | `"handle"` or `"tip"` stop presentation |
|
|
422
422
|
| `disabled` | boolean | `false` | Disabled state |
|
|
423
423
|
| `size` | string | default | Set to `"large"` for the expanded layout |
|
|
@@ -426,7 +426,7 @@ Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property
|
|
|
426
426
|
|
|
427
427
|
**Methods and state:** `defaultValue`, `isDefault`, and `resetToDefault()`. JSON defaults use structural equality, so object key order does not affect dirty state.
|
|
428
428
|
|
|
429
|
-
|
|
429
|
+
Click the swatch to open the fill picker. With `edit="true"`, the first stop receives focus; Arrow keys move the selected stop, Shift+Arrow moves by 5%, Tab cycles stops, and Delete/Backspace removes a stop while preserving the two-stop minimum.
|
|
430
430
|
|
|
431
431
|
```html
|
|
432
432
|
<propskit-gradient
|
|
@@ -1053,7 +1053,7 @@ When app code rebuilds a chooser by setting `fig-chooser.innerHTML`, the chooser
|
|
|
1053
1053
|
|
|
1054
1054
|
| Attribute | Type | Default | Description |
|
|
1055
1055
|
|---|---|---|---|
|
|
1056
|
-
| `value` | string | — | Selected choice value |
|
|
1056
|
+
| `value` | string | — | Selected choice value. Omit to select the first choice; `value=""` means none. |
|
|
1057
1057
|
| `choice-element` | string | `"fig-choice"` | CSS selector for child choices |
|
|
1058
1058
|
| `layout` | string | `"vertical"` | `"vertical"`, `"horizontal"`, `"grid"` |
|
|
1059
1059
|
| `columns` | number | `2` | Grid column count when `layout="grid"` |
|
package/components.css
CHANGED
|
@@ -5312,7 +5312,9 @@ fig-choice {
|
|
|
5312
5312
|
content: "";
|
|
5313
5313
|
position: absolute;
|
|
5314
5314
|
inset: 0;
|
|
5315
|
-
border-radius:
|
|
5315
|
+
border-radius: calc(
|
|
5316
|
+
var(--fig-choice-border-radius) + var(--fig-choice-selection-ring-width)
|
|
5317
|
+
);
|
|
5316
5318
|
pointer-events: none;
|
|
5317
5319
|
z-index: 1;
|
|
5318
5320
|
box-shadow: inset 0 0 0 calc(var(--fig-choice-selection-ring-width)*2) var(--figma-color-bg);
|