@rogieking/figui3 8.0.3 → 8.2.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
@@ -58,6 +58,13 @@ import "@rogieking/figui3/fig-editor.css";
58
58
  import "@rogieking/figui3/fig-editor.js";
59
59
  ```
60
60
 
61
+ Opt into experimental Lab and PropsKit components after the core imports:
62
+
63
+ ```js
64
+ import "@rogieking/figui3/fig-lab.css";
65
+ import "@rogieking/figui3/fig-lab.js";
66
+ ```
67
+
61
68
  Or use a CDN:
62
69
 
63
70
  ```html
@@ -92,6 +99,11 @@ Minimal example:
92
99
  | [Propskit Color](#propskit-color) | `<propskit-color>` | Full-surface labeled color control |
93
100
  | [Propskit Gradient](#propskit-gradient) | `<propskit-gradient>` | Full-surface labeled gradient control |
94
101
  | [Propskit Number](#propskit-number) | `<propskit-number>` | Full-surface labeled number control |
102
+ | [Propskit Position](#propskit-position) | `<propskit-position>` | Compact X/Y control |
103
+ | [Propskit Color Point](#propskit-color-point) | `<propskit-color-point>` | Collapsible color and position group |
104
+ | [Propskit Point Point](#propskit-point-point) | `<propskit-point-point>` | Collapsible start and end position group |
105
+ | [Propskit Point Radius](#propskit-point-radius) | `<propskit-point-radius>` | Collapsible position and radius group |
106
+ | [Propskit Point Radius Angle](#propskit-point-radius-angle) | `<propskit-point-radius-angle>` | Collapsible position, radius, and angle group |
95
107
  | [Propskit Select](#propskit-select) | `<propskit-select>` | Full-surface labeled select control |
96
108
  | [Propskit Switch](#propskit-switch) | `<propskit-switch>` | Full-surface labeled switch control |
97
109
  | [Propskit Text](#propskit-text) | `<propskit-text>` | Full-surface labeled text control |
@@ -322,6 +334,7 @@ each nested input to its own current `default`.
322
334
  | `direction` | string | `"horizontal"` | Field layout direction |
323
335
  | `size` | string | default | Set to `"large"` for the expanded layout |
324
336
  | `default` | number/string | initial `value` | Right-click reset target |
337
+ | `disabled` | boolean | `false` | Disable interaction |
325
338
  | *number attrs* | — | — | All `<fig-input-number>` attributes are forwarded |
326
339
 
327
340
  **Events:** `input`, `change` — forwarded from the inner number input.
@@ -450,6 +463,7 @@ Wraps a `<fig-field>` and `<fig-slider>` into a single labeled control. All slid
450
463
  | `direction` | string | `"column"` | Layout direction |
451
464
  | `size` | string | default | Set to `"large"` for the expanded layout |
452
465
  | `default` | number/string | initial `value` | Double-click and right-click reset target |
466
+ | `disabled` | boolean | `false` | Disable interaction |
453
467
  | *slider attrs* | — | — | All `<fig-slider>` attributes except host-only PropsKit attributes are forwarded |
454
468
 
455
469
  **Events:** `input`, `change` — forwarded from the inner slider.
@@ -464,6 +478,156 @@ Double-click or right-click and choose **Reset** to restore `default`, falling b
464
478
 
465
479
  ---
466
480
 
481
+ #### Propskit Position
482
+
483
+ `<propskit-position>`
484
+
485
+ A compact X/Y field with optional percentage units.
486
+
487
+ | Attribute | Type | Default | Description |
488
+ |---|---|---|---|
489
+ | `x` | number | `50` | Horizontal value |
490
+ | `y` | number | `50` | Vertical value |
491
+ | `default` | JSON string | initial `{ x, y }` | Right-click and group reset target |
492
+ | `label` | string | `"Position"` | Field label; empty values use the semantic default |
493
+ | `units` | string | — | `"percent"` shows `%`; omit for no units |
494
+ | `size` | string | default | Set to `"large"` for the expanded row |
495
+ | `disabled` | boolean | `false` | Disable both number inputs |
496
+
497
+ **Properties and methods:** `x`, `y`, and `value` expose the current coordinates; `defaultValue` returns the normalized reset object; `isDefault` compares both coordinates; `resetToDefault()` restores both values.
498
+
499
+ **Events:** `input` and `change` bubble across shadow boundaries with numeric `{ x, y, units }` in `event.detail`.
500
+
501
+ ```html
502
+ <propskit-position
503
+ label="Position"
504
+ x="50"
505
+ y="50"
506
+ units="percent"
507
+ default='{"x":50,"y":50}'
508
+ ></propskit-position>
509
+ ```
510
+
511
+ ---
512
+
513
+ #### Propskit Color Point
514
+
515
+ `<propskit-color-point>`
516
+
517
+ A compact `<fig-group>` wrapper that combines `<propskit-color>` and `<propskit-position>`. The group is collapsible and open by default.
518
+
519
+ | Attribute | Type | Default | Description |
520
+ |---|---|---|---|
521
+ | `label` | string | — | Passed to the internal `fig-group` as `name` |
522
+ | `value` | JSON string | `{"x":50,"y":50,"color":"#D9D9D9"}` | Current color-point value |
523
+ | `collapsible` | boolean | `true` | Passed to the internal `fig-group` |
524
+ | `open` | boolean | `true` | Passed to the internal `fig-group` |
525
+ | `size` | string | default | Passed to both internal PropsKit controls |
526
+ | `disabled` | boolean | `false` | Disable both internal controls |
527
+
528
+ The internal group always has `compact`. `value` uses the same `{ x, y, color }` shape as `<fig-canvas-control type="color">`.
529
+
530
+ **Events:** `input` and `change` bubble with numeric coordinates and `units` in `event.detail`. `openchange` mirrors the internal group's expanded state.
531
+
532
+ ```html
533
+ <propskit-color-point
534
+ label="Light"
535
+ value='{"x":50,"y":50,"color":"#FF00BF"}'
536
+ ></propskit-color-point>
537
+ ```
538
+
539
+ ---
540
+
541
+ #### Propskit Point Radius
542
+
543
+ `<propskit-point-radius>`
544
+
545
+ A compact `<fig-group>` wrapper that combines `<propskit-position>` and `<propskit-number>` for point-radius values. The group is collapsible and open by default.
546
+
547
+ | Attribute | Type | Default | Description |
548
+ |---|---|---|---|
549
+ | `label` | string | — | Passed to the internal `fig-group` as `name` |
550
+ | `value` | JSON string | `{"x":50,"y":50,"radius":0}` | Current point-radius value |
551
+ | `collapsible` | boolean | `true` | Passed to the internal `fig-group` |
552
+ | `open` | boolean | `true` | Passed to the internal `fig-group` |
553
+ | `units` | string | — | `"percent"` passes percentage units to position and radius; omit for no units |
554
+ | `size` | string | default | Passed to both internal PropsKit controls |
555
+ | `disabled` | boolean | `false` | Disable both internal controls |
556
+
557
+ The internal group always has `compact`. `value` uses the same `{ x, y, radius }` shape as `<fig-canvas-control type="point-radius">`. Numeric radius values use pixels; percentage strings preserve `%`.
558
+
559
+ **Events:** `input` and `change` bubble with numeric `{ x, y, radius, units }` in `event.detail`. `openchange` mirrors the internal group's expanded state.
560
+
561
+ ```html
562
+ <propskit-point-radius
563
+ label="Blur"
564
+ units="percent"
565
+ value='{"x":50,"y":50,"radius":"25%"}'
566
+ ></propskit-point-radius>
567
+ ```
568
+
569
+ ---
570
+
571
+ #### Propskit Point Radius Angle
572
+
573
+ `<propskit-point-radius-angle>`
574
+
575
+ A compact `<fig-group>` wrapper combining `<propskit-position>` with radius and angle `<propskit-number>` controls. The group is collapsible and open by default.
576
+
577
+ | Attribute | Type | Default | Description |
578
+ |---|---|---|---|
579
+ | `label` | string | — | Passed to the internal `fig-group` as `name` |
580
+ | `value` | JSON string | `{"x":50,"y":50,"radius":0,"angle":0}` | Current point-radius-angle value |
581
+ | `collapsible` | boolean | `true` | Passed to the internal `fig-group` |
582
+ | `open` | boolean | `true` | Passed to the internal `fig-group` |
583
+ | `units` | string | — | `"percent"` passes percentage units to position and radius; omit for no units |
584
+ | `size` | string | default | Passed to every internal PropsKit control |
585
+ | `disabled` | boolean | `false` | Disable every internal control |
586
+
587
+ The internal group always has `compact`. `value` uses the same `{ x, y, radius, angle }` shape as `<fig-canvas-control type="point-radius-angle">`. Numeric radius values use pixels; percentage strings preserve `%`. Angles are degrees.
588
+
589
+ **Events:** `input` and `change` bubble with numeric `{ x, y, radius, angle, units }` in `event.detail`. `openchange` mirrors the internal group's expanded state.
590
+
591
+ ```html
592
+ <propskit-point-radius-angle
593
+ label="Gradient"
594
+ units="percent"
595
+ value='{"x":50,"y":50,"radius":"25%","angle":45}'
596
+ ></propskit-point-radius-angle>
597
+ ```
598
+
599
+ ---
600
+
601
+ #### Propskit Point Point
602
+
603
+ `<propskit-point-point>`
604
+
605
+ A compact `<fig-group>` wrapper combining start and end `<propskit-position>` controls. The group is collapsible and open by default.
606
+
607
+ | Attribute | Type | Default | Description |
608
+ |---|---|---|---|
609
+ | `label` | string | — | Passed to the internal `fig-group` as `name` |
610
+ | `value` | JSON string | `{"x":50,"y":50,"x2":75,"y2":75}` | Current point-point value |
611
+ | `collapsible` | boolean | `true` | Passed to the internal `fig-group` |
612
+ | `open` | boolean | `true` | Passed to the internal `fig-group` |
613
+ | `units` | string | — | `"percent"` passes percentage units to both positions; omit for no units |
614
+ | `size` | string | default | Passed to both position controls |
615
+ | `disabled` | boolean | `false` | Disable both position controls |
616
+
617
+ The internal group always has `compact`. `value` uses the same `{ x, y, x2, y2 }` shape as `<fig-canvas-control type="point-point">`.
618
+
619
+ **Events:** `input` and `change` bubble with numeric `{ x, y, x2, y2, units }` in `event.detail`. `openchange` mirrors the internal group's expanded state.
620
+
621
+ ```html
622
+ <propskit-point-point
623
+ label="Gradient"
624
+ units="percent"
625
+ value='{"x":25,"y":25,"x2":75,"y2":75}'
626
+ ></propskit-point-point>
627
+ ```
628
+
629
+ ---
630
+
467
631
  #### Text Input
468
632
 
469
633
  `<fig-input-text>` — [demo](https://rog.ie/figui3/#text-input)
package/components.css CHANGED
@@ -1686,6 +1686,7 @@ fig-video {
1686
1686
 
1687
1687
  > fig-spinner[slot="overlay"][data-loading-indicator][data-generated] {
1688
1688
  place-self: center;
1689
+ max-width: none;
1689
1690
  z-index: 1;
1690
1691
  opacity: 1;
1691
1692
  pointer-events: none;
@@ -4300,6 +4301,7 @@ fig-field {
4300
4301
  fig-spinner {
4301
4302
  width: var(--spacer-4);
4302
4303
  height: var(--spacer-4);
4304
+ flex-shrink: 0;
4303
4305
  display: inline-flex;
4304
4306
  background-color: var(--figma-color-icon-tertiary);
4305
4307
  mask-image: var(--icon-24-spinner);