@rogieking/figui3 6.28.1 → 6.29.0

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/README.md CHANGED
@@ -90,6 +90,7 @@ Minimal example:
90
90
  | [Slider](#slider) | `<fig-slider>` | Range, hue, opacity, delta, stepper |
91
91
  | [Propskit Slider](#propskit-slider) | `<propskit-slider>` | Labeled field + slider combo |
92
92
  | [Propskit Color](#propskit-color) | `<propskit-color>` | Full-surface labeled color control |
93
+ | [Propskit Gradient](#propskit-gradient) | `<propskit-gradient>` | Full-surface labeled gradient control |
93
94
  | [Propskit Number](#propskit-number) | `<propskit-number>` | Full-surface labeled number control |
94
95
  | [Propskit Select](#propskit-select) | `<propskit-select>` | Full-surface labeled select control |
95
96
  | [Propskit Switch](#propskit-switch) | `<propskit-switch>` | Full-surface labeled switch control |
@@ -346,6 +347,38 @@ Right-click and choose **Reset**, or call `resetToDefault()`, to restore `defaul
346
347
 
347
348
  ---
348
349
 
350
+ #### Propskit Gradient
351
+
352
+ `<propskit-gradient>`
353
+
354
+ Composes a `<fig-field>` and `<fig-input-gradient>` into a full-surface property control. The gradient is inline-editable by default.
355
+
356
+ | Attribute | Type | Default | Description |
357
+ |---|---|---|---|
358
+ | `label` | string | `"Label"` | Field label text; use an empty value to hide it |
359
+ | `value` | JSON string | default gradient | Canonical `{ "type": "gradient", "gradient": { ... } }` data |
360
+ | `default` | JSON string | initial `value` | Right-click and group reset target |
361
+ | `edit` | boolean/string | `true` | `true`, `false`, or `"picker"` |
362
+ | `mode` | string | `"handle"` | `"handle"` or `"tip"` stop presentation |
363
+ | `disabled` | boolean | `false` | Disabled state |
364
+ | `size` | string | `"large"` | Control layout size |
365
+
366
+ **Events:** `input`, `change` — bubbling, composed events with `{ type: "gradient", gradient }` in `event.detail`.
367
+
368
+ **Methods and state:** `defaultValue`, `isDefault`, and `resetToDefault()`. JSON defaults use structural equality, so object key order does not affect dirty state.
369
+
370
+ The first stop receives focus when the field is focused. 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.
371
+
372
+ ```html
373
+ <propskit-gradient
374
+ label="Fill"
375
+ value='{"type":"gradient","gradient":{"type":"linear","angle":90,"interpolationSpace":"srgb","hueInterpolation":"shorter","stops":[{"position":0,"color":"#0D99FF","opacity":100},{"position":100,"color":"#9747FF","opacity":100}]}}'
376
+ default='{"type":"gradient","gradient":{"type":"linear","angle":90,"interpolationSpace":"srgb","hueInterpolation":"shorter","stops":[{"position":0,"color":"#0D99FF","opacity":100},{"position":100,"color":"#9747FF","opacity":100}]}}'
377
+ ></propskit-gradient>
378
+ ```
379
+
380
+ ---
381
+
349
382
  #### Propskit Switch
350
383
 
351
384
  `<propskit-switch>`
@@ -671,8 +704,8 @@ Supported interpolation spaces: `srgb`, `srgb-linear`, `display-p3`, `oklab`, `o
671
704
 
672
705
  | Event | Detail |
673
706
  |---|---|
674
- | `input` | `{ type, gradient, css }` |
675
- | `change` | `{ type, gradient, css }` |
707
+ | `input` | `{ type, gradient }` |
708
+ | `change` | `{ type, gradient }` |
676
709
 
677
710
  ```html
678
711
  <fig-input-gradient
package/components.css CHANGED
@@ -3869,6 +3869,9 @@ fig-input-gradient {
3869
3869
  .fig-input-gradient-track {
3870
3870
  inset: 0;
3871
3871
  }
3872
+ > fig-swatch{
3873
+ --size: var(--fig-input-gradient-height);
3874
+ }
3872
3875
  }
3873
3876
 
3874
3877
  .fig-input-gradient-track {