@rogieking/figui3 4.15.1 → 4.15.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/README.md CHANGED
@@ -764,7 +764,8 @@ A draggable handle element. Positioned on a `drag-surface` container with axis c
764
764
  | `drag-surface` | string | — | CSS selector for drag container (defaults to parent) |
765
765
  | `drag-axes` | string | `"xy"` | Constrain axes: `"x"`, `"y"`, `"xy"` |
766
766
  | `drag-snapping` | string | — | Snapping behavior |
767
- | `type` | string | — | `"color"` for color handle with `fig-color-tip` |
767
+ | `type` | string | — | `"color"` for color handle with direct solid color picker |
768
+ | `color-tip` | boolean | `false` | For `type="color"`, use the compact `fig-color-tip` interaction instead of opening the picker directly |
768
769
  | `control` | string | — | `"add"` or `"remove"` delegated to color tip |
769
770
  | `hit-area` | string | — | Expanded interaction zone (unitless px). `"8"`, `"8 12"` (v h), or `"8 circle"` |
770
771
  | `hit-area-mode` | string | `"handle"` | `"handle"` proxies to handle drag/select; `"delegate"` emits `hitareadown` event |
@@ -775,6 +776,8 @@ A draggable handle element. Positioned on a `drag-surface` container with axis c
775
776
  |---|---|
776
777
  | `input` | `{ x, y, px, py, shiftKey }` — while dragging |
777
778
  | `change` | `{ x, y, px, py }` — on release |
779
+ | `input` | `{ color, opacity }` — while editing a `type="color"` handle |
780
+ | `change` | `{ color, opacity }` — when committing a `type="color"` handle |
778
781
  | `add` | — (when control="add") |
779
782
  | `remove` | — (when control="remove") |
780
783
  | `hitareadown` | `{ originalEvent }` — when `hit-area-mode="delegate"` and the hit area is clicked |
package/components.css CHANGED
@@ -282,11 +282,21 @@
282
282
  rgba(255, 255, 255, 0.2) 0% 50%
283
283
  )
284
284
  0 0 / 0.5rem 0.5rem;
285
- --checkerboard-chit: repeating-conic-gradient(
285
+ --checkerboard-chit: repeating-conic-gradient(
286
286
  rgba(0, 0, 0, 0.2) 0% 25%,
287
287
  rgba(255, 255, 255, 0.2) 0% 50%
288
288
  )
289
- 0 0 / 14px 14px;
289
+ 0 0 / 0.875rem 0.875rem;
290
+ --checkerboard-slider: repeating-conic-gradient(
291
+ rgba(0, 0, 0, 0.2) 0% 25%,
292
+ rgba(255, 255, 255, 0.2) 0% 50%
293
+ )
294
+ 0 0 / 0.375rem 0.375rem;
295
+ --checkerboard-handle: repeating-conic-gradient(
296
+ rgba(0, 0, 0, 0.2) 0% 25%,
297
+ rgba(255, 255, 255, 0.2) 0% 50%
298
+ )
299
+ 0 0 / 0.625rem 0.625rem;
290
300
  --bg-hue: linear-gradient(
291
301
  90deg,
292
302
  rgba(255, 0, 0, 1),
@@ -1910,6 +1920,7 @@ fig-origin-grid {
1910
1920
  --width: var(--origin-grid-handle-size);
1911
1921
  --height: var(--origin-grid-handle-size);
1912
1922
  --border-radius: var(--radius-small);
1923
+
1913
1924
  position: absolute;
1914
1925
  left: 50%;
1915
1926
  top: 50%;
@@ -2404,6 +2415,7 @@ fig-slider {
2404
2415
  0 0 0 1px var(--figma-color-border-selected);
2405
2416
  --slider-transition: none;
2406
2417
  --handle-transition: var(--slider-transition);
2418
+ --slider-checkerboard: var(--checkerboard);
2407
2419
 
2408
2420
  display: flex;
2409
2421
  align-items: center;
@@ -2575,7 +2587,7 @@ fig-slider {
2575
2587
  &.opacity::-webkit-slider-runnable-track {
2576
2588
  background:
2577
2589
  linear-gradient(to right, transparent, var(--color)),
2578
- var(--checkerboard);
2590
+ var(--slider-checkerboard);
2579
2591
  }
2580
2592
 
2581
2593
  /* Firefox thumb */
@@ -2630,7 +2642,7 @@ fig-slider {
2630
2642
  &.opacity::-moz-range-track {
2631
2643
  background:
2632
2644
  linear-gradient(to right, transparent, var(--color)),
2633
- var(--checkerboard);
2645
+ var( --slider-checkerboard);
2634
2646
  }
2635
2647
  }
2636
2648
 
@@ -2684,6 +2696,7 @@ fig-slider {
2684
2696
  var(--slider-thumb-color),
2685
2697
  0 0 0 0.75px rgba(0, 0, 0, 0.075), inset 0 0 0 5px rgba(0, 0, 0, 0.1),
2686
2698
  var(--figma-elevation-100);
2699
+ --slider-checkerboard: var(--checkerboard-slider);
2687
2700
 
2688
2701
  background-color: var(--figma-color-bg-secondary);
2689
2702
  border-radius: var(--radius-medium);
@@ -2716,6 +2729,7 @@ fig-slider {
2716
2729
  height: auto;
2717
2730
  }
2718
2731
  }
2732
+
2719
2733
  }
2720
2734
  }
2721
2735
 
@@ -3459,7 +3473,6 @@ fig-input-palette {
3459
3473
  "inline button";
3460
3474
  gap: var(--spacer-2);
3461
3475
  min-width: 0;
3462
- border-radius: var(--radius-medium);
3463
3476
 
3464
3477
  > .palette-colors-inline {
3465
3478
  grid-area: inline;
@@ -3550,12 +3563,14 @@ fig-input-palette {
3550
3563
  min-width: 0;
3551
3564
  grid-column: input / -1;
3552
3565
 
3553
- &:has(+ fig-button) {
3566
+ &:has(+ fig-button),
3567
+ &:has(+ fig-tooltip) {
3554
3568
  grid-column: input;
3555
3569
  }
3556
3570
  }
3557
3571
 
3558
3572
  > fig-button,
3573
+ > fig-tooltip,
3559
3574
  > button {
3560
3575
  grid-column: button;
3561
3576
  }
@@ -3567,6 +3582,12 @@ fig-input-palette {
3567
3582
  border-radius: var(--radius-medium) !important;
3568
3583
  }
3569
3584
  }
3585
+ fig-field &{
3586
+ grid-template-columns: 1fr calc(var(--spacer-3) + var(--spacer-1));
3587
+ .palette-colors-expanded {
3588
+ grid-template-columns: [input] 1fr [button] calc(var(--spacer-3) + var(--spacer-1));
3589
+ }
3590
+ }
3570
3591
  }
3571
3592
 
3572
3593
  fig-field {
@@ -3639,6 +3660,10 @@ fig-field {
3639
3660
  &[columns="half"] {
3640
3661
  --fig-field-label-ratio: 2fr;
3641
3662
  }
3663
+ &[columns="2/5"] {
3664
+ --fig-field-label-ratio: 2fr;
3665
+ --fig-field-input-ratio: 3fr;
3666
+ }
3642
3667
  & > label {
3643
3668
  overflow: hidden;
3644
3669
  text-overflow: ellipsis;
@@ -4932,6 +4957,7 @@ fig-handle {
4932
4957
  --border: none;
4933
4958
  --fig-handle-hit-area-opacity: 0;
4934
4959
  --fig-handle-hit-area-size: 0;
4960
+ --fig-handle-checkerboard: var(--checkerboard);
4935
4961
 
4936
4962
  margin: 0;
4937
4963
  padding: 0;
@@ -4962,7 +4988,9 @@ fig-handle {
4962
4988
  width: calc(var(--width) - var(--ring-width) * 2);
4963
4989
  height: calc(var(--height) - var(--ring-width) * 2);
4964
4990
  background:
4965
- linear-gradient(var(--fill), var(--fill)), var(--checkerboard-chit);
4991
+ linear-gradient(var(--fill), var(--fill)), var(--fig-handle-checkerboard);
4992
+ background-position: 0 0;
4993
+ background-size: 0.625rem 0.625rem;
4966
4994
  border-radius: var(--border-radius);
4967
4995
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
4968
4996
  place-self: center;
@@ -5008,6 +5036,7 @@ fig-handle {
5008
5036
 
5009
5037
  &[type="color"],
5010
5038
  &[control] {
5039
+ position: relative;
5011
5040
  overflow: visible;
5012
5041
 
5013
5042
  fig-color-tip {