@rogieking/figui3 6.22.0 → 6.23.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.
package/README.md CHANGED
@@ -75,51 +75,6 @@ Minimal example:
75
75
  <fig-button variant="primary">Save</fig-button>
76
76
  ```
77
77
 
78
- ### PropsKit embed (one CSS + one JS)
79
-
80
- For property panels inside a host app, use the compiled PropsKit pair (bundles fig + fig-lab + fig-editor, styles scoped to `.figui-root`):
81
-
82
- ```js
83
- import "@rogieking/figui3/propskit.css";
84
- import { createPropsKit } from "@rogieking/figui3/propskit.js";
85
-
86
- const layerConfig = {
87
- name: { type: "text", default: "Layer 1", placeholder: "Enter a name" },
88
- opacity: [75, 0, 100, 1], // slider: [value, min, max, step?]
89
- visible: true, // switch
90
- fill: "#0D99FF", // color (hex)
91
- blend: {
92
- type: "select",
93
- options: ["Normal", "Multiply", "Screen", "Overlay"],
94
- default: "Normal",
95
- },
96
- rotation: [0, -180, 180, 1],
97
- cornerRadius: [8, 0, 64, 1],
98
- easing: { type: "easing", value: [0.4, 0, 0.2, 1] },
99
- shadow: {
100
- _collapsed: true, // folder
101
- offsetY: [8, 0, 24, 1],
102
- blur: [16, 0, 48, 1],
103
- color: "#000000",
104
- },
105
- reset: { type: "action" },
106
- };
107
-
108
- createPropsKit(mountEl, "Layer", layerConfig, {
109
- theme: "system", // or "light" | "dark"
110
- onChange: (path, value, values) => {},
111
- onAction: (name) => {},
112
- });
113
- ```
114
-
115
- ```html
116
- <aside class="figui-root" theme="system">…</aside>
117
- <!-- or -->
118
- <fig-panel theme="dark">…</fig-panel>
119
- ```
120
-
121
- One import for every host (`@rogieking/figui3/propskit.js`). Framework examples that call the same vanilla API live at `/propskit/quickstart`.
122
-
123
78
  ---
124
79
 
125
80
  ## Components
package/components.css CHANGED
@@ -3047,6 +3047,12 @@ dialog[is="fig-popup"] {
3047
3047
  padding: var(--spacer-2) 0;
3048
3048
  min-width: 6rem;
3049
3049
  box-shadow: var(--figma-elevation-100);
3050
+
3051
+ &.fig-menu-popup {
3052
+ max-height: calc(100vh - 1rem);
3053
+ padding: 0;
3054
+ overflow: hidden;
3055
+ }
3050
3056
  }
3051
3057
 
3052
3058
  &[variant="tooltip"],
@@ -3263,7 +3269,9 @@ fig-header {
3263
3269
  --fig-header-height: var(--spacer-5);
3264
3270
  }
3265
3271
 
3266
- fig-button[icon]:not([icon="false"])[variant="ghost"]:not(fig-input-text fig-button) {
3272
+ & > fig-button:last-child[icon]:not([icon="false"])[variant="ghost"],
3273
+ & > fig-tooltip:last-child > fig-button[icon]:not([icon="false"])[variant="ghost"],
3274
+ & > fig-menu:last-child > fig-button[fig-menu-trigger][icon]:not([icon="false"])[variant="ghost"] {
3267
3275
  margin-right: calc(var(--spacer-2) * -1);
3268
3276
  }
3269
3277
 
@@ -5470,9 +5478,10 @@ fig-select::part(listbox) {
5470
5478
  height: max-content;
5471
5479
  }
5472
5480
 
5473
- /* Panel is the scroller; overflow uses top/bottom buttons (fig-chooser pattern). */
5474
- fig-select-options {
5475
- --fig-select-overflow-size: var(--spacer-4);
5481
+ /* Vertical option panels own their scroller and shared top/bottom paging buttons. */
5482
+ fig-select-options,
5483
+ .fig-menu-options {
5484
+ --fig-vertical-overflow-size: var(--spacer-4);
5476
5485
 
5477
5486
  box-sizing: border-box;
5478
5487
  display: flex;
@@ -5508,9 +5517,9 @@ fig-select-options {
5508
5517
  & > .fig-overflow {
5509
5518
  position: sticky;
5510
5519
  left: 0;
5511
- flex: 0 0 var(--fig-select-overflow-size);
5520
+ flex: 0 0 var(--fig-vertical-overflow-size);
5512
5521
  width: 100%;
5513
- height: var(--fig-select-overflow-size);
5522
+ height: var(--fig-vertical-overflow-size);
5514
5523
  margin: 0;
5515
5524
  z-index: 3;
5516
5525
  /* Menu chrome — not option hover (bg-menu-hover is brand blue). */
@@ -5539,7 +5548,7 @@ fig-select-options {
5539
5548
  & > .fig-overflow-start {
5540
5549
  order: -1;
5541
5550
  top: 0;
5542
- margin-block-end: calc(-1 * var(--fig-select-overflow-size));
5551
+ margin-block-end: calc(-1 * var(--fig-vertical-overflow-size));
5543
5552
 
5544
5553
  &::before {
5545
5554
  border-radius: var(--radius-large) var(--radius-large) 0 0;
@@ -5553,29 +5562,25 @@ fig-select-options {
5553
5562
  & > .fig-overflow-end {
5554
5563
  order: 1;
5555
5564
  bottom: 0;
5556
- margin-block-start: calc(-1 * var(--fig-select-overflow-size));
5565
+ margin-block-start: calc(-1 * var(--fig-vertical-overflow-size));
5557
5566
 
5558
5567
  &::before {
5559
5568
  border-radius: 0 0 var(--radius-large) var(--radius-large);
5560
5569
  }
5561
5570
  }
5562
5571
 
5563
- & > fig-menu-separator {
5564
- --fig-menu-separator-color: var(--figma-color-border-menu);
5565
- --fig-menu-separator-label-color: var(--figma-color-text-menu-secondary);
5566
-
5567
- /* Align label with option text (padding + checkmark column).
5568
- Negative margins on ::before must match this padding exactly so the
5569
- rule bleeds to the listbox edges (base rule uses --fig-menu-item-padding). */
5570
- &[label]:not([label=""]) {
5571
- padding-left: var(--spacer-5);
5572
- padding-right: var(--spacer-2);
5572
+ }
5573
5573
 
5574
- &::before {
5575
- margin-inline: unset;
5576
- margin-left: calc(-1 * var(--spacer-5));
5577
- margin-right: calc(-1 * var(--spacer-2));
5578
- }
5574
+ fig-select-options > fig-menu-separator {
5575
+ /* Align labels with select option text after the checkmark column. */
5576
+ &[label]:not([label=""]) {
5577
+ padding-left: var(--spacer-5);
5578
+ padding-right: var(--spacer-2);
5579
+
5580
+ &::before {
5581
+ margin-inline: unset;
5582
+ margin-left: calc(-1 * var(--spacer-5));
5583
+ margin-right: calc(-1 * var(--spacer-2));
5579
5584
  }
5580
5585
  }
5581
5586
  }