@rogieking/figui3 2.33.0 → 2.33.2
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 +64 -6
- package/components.css +8 -14
- package/package.json +1 -2
- package/index.html +0 -5040
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ A lightweight, zero-dependency web components library for building Figma plugin
|
|
|
9
9
|
|
|
10
10
|
View the interactive component documentation at **[rogie.github.io/figui3](https://rogie.github.io/figui3/)**
|
|
11
11
|
|
|
12
|
-
The
|
|
12
|
+
The docs page source is kept in this repo as `old.html` for reference and local testing.
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
@@ -64,6 +64,24 @@ cd figui3
|
|
|
64
64
|
bun install
|
|
65
65
|
bun dev # Core component docs at http://localhost:3000
|
|
66
66
|
npm run dev:playground # Interactive playground app (routes: /figui3, /propkit)
|
|
67
|
+
npm run build:playground # Build playground app
|
|
68
|
+
bun build # Build dist/fig.js
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Playground (`/figui3` and `/propkit`)
|
|
72
|
+
|
|
73
|
+
The playground app is the fastest way to author and validate component markup.
|
|
74
|
+
|
|
75
|
+
- **`/figui3`**: component-focused examples and attribute controls for FigUI3 primitives.
|
|
76
|
+
- **`/propkit`**: property-panel patterns composed from FigUI3 controls.
|
|
77
|
+
- Live preview, attributes editing, and code view stay synchronized.
|
|
78
|
+
- Attribute controls write real component markup and preserve internal-only playground metadata where needed.
|
|
79
|
+
|
|
80
|
+
Open locally:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run dev:playground
|
|
84
|
+
# then visit http://localhost:5173/figui3 or http://localhost:5173/propkit
|
|
67
85
|
```
|
|
68
86
|
|
|
69
87
|
## Quick Start
|
|
@@ -216,6 +234,42 @@ A modal dialog component with drag support.
|
|
|
216
234
|
|
|
217
235
|
---
|
|
218
236
|
|
|
237
|
+
### Popup (`<fig-popup>`)
|
|
238
|
+
|
|
239
|
+
An anchored floating surface built on `<dialog>`, with collision-aware positioning and optional popover beak styling.
|
|
240
|
+
|
|
241
|
+
| Attribute | Type | Default | Description |
|
|
242
|
+
|-----------|------|---------|-------------|
|
|
243
|
+
| `anchor` | string | — | CSS selector for the anchor element |
|
|
244
|
+
| `position` | string | `"top center"` | Placement (`"top"`, `"left"`, `"center right"`, etc.) |
|
|
245
|
+
| `offset` | string | `"0 0"` | X/Y offset in px-like tokens (`"8 8"`) |
|
|
246
|
+
| `viewport-margin` | string | `"8"` | Viewport safety margin (CSS shorthand style) |
|
|
247
|
+
| `variant` | string | — | Use `"popover"` to render a beak |
|
|
248
|
+
| `theme` | string | — | `"light"`, `"dark"`, or `"menu"` |
|
|
249
|
+
| `closedby` | string | `"any"` | Dismiss behavior: `"any"`, `"closerequest"`, `"none"` |
|
|
250
|
+
| `open` | boolean/string | `false` | Open when present and not `"false"` |
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<fig-button id="popup-anchor" onclick="const p=document.getElementById('demo-popup'); p.toggleAttribute('open');">
|
|
254
|
+
Toggle popup
|
|
255
|
+
</fig-button>
|
|
256
|
+
|
|
257
|
+
<dialog
|
|
258
|
+
id="demo-popup"
|
|
259
|
+
is="fig-popup"
|
|
260
|
+
anchor="#popup-anchor"
|
|
261
|
+
position="center right"
|
|
262
|
+
offset="8 8"
|
|
263
|
+
viewport-margin="8"
|
|
264
|
+
variant="popover"
|
|
265
|
+
closedby="none"
|
|
266
|
+
>
|
|
267
|
+
<fig-header><h3>Popup</h3></fig-header>
|
|
268
|
+
</dialog>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
219
273
|
### Tabs (`<fig-tabs>` / `<fig-tab>`)
|
|
220
274
|
|
|
221
275
|
Tabbed navigation component.
|
|
@@ -530,6 +584,7 @@ A form field wrapper with flexible layout. Automatically links `<label>` element
|
|
|
530
584
|
| Attribute | Type | Default | Description |
|
|
531
585
|
|-----------|------|---------|-------------|
|
|
532
586
|
| `direction` | string | `"column"` | Layout: `"column"`, `"row"`, `"horizontal"` |
|
|
587
|
+
| `columns` | string | — | Optional horizontal split preset: `"thirds"` or `"half"` |
|
|
533
588
|
| `label` | string | — | Programmatically set the label text |
|
|
534
589
|
|
|
535
590
|
```html
|
|
@@ -544,6 +599,12 @@ A form field wrapper with flexible layout. Automatically links `<label>` element
|
|
|
544
599
|
<label>Volume</label>
|
|
545
600
|
<fig-slider min="0" max="100" value="50"></fig-slider>
|
|
546
601
|
</fig-field>
|
|
602
|
+
|
|
603
|
+
<!-- Horizontal with 1/3 + 2/3 split -->
|
|
604
|
+
<fig-field direction="horizontal" columns="thirds">
|
|
605
|
+
<label>Opacity</label>
|
|
606
|
+
<fig-slider value="50"></fig-slider>
|
|
607
|
+
</fig-field>
|
|
547
608
|
```
|
|
548
609
|
|
|
549
610
|
---
|
|
@@ -675,16 +736,13 @@ A toast notification component.
|
|
|
675
736
|
| `duration` | number | `5000` | Auto-dismiss ms (0 = no dismiss) |
|
|
676
737
|
| `offset` | number | `16` | Distance from bottom |
|
|
677
738
|
| `theme` | string | `"dark"` | Theme: `"dark"`, `"light"`, `"danger"`, `"brand"` |
|
|
678
|
-
| `open` | boolean | `false` | Whether visible |
|
|
679
739
|
|
|
680
740
|
```html
|
|
741
|
+
<fig-button onclick="document.getElementById('myToast').showToast()">Show toast</fig-button>
|
|
742
|
+
|
|
681
743
|
<fig-toast id="myToast" theme="brand" duration="3000">
|
|
682
744
|
Settings saved successfully!
|
|
683
745
|
</fig-toast>
|
|
684
|
-
|
|
685
|
-
<script>
|
|
686
|
-
document.getElementById('myToast').show();
|
|
687
|
-
</script>
|
|
688
746
|
```
|
|
689
747
|
|
|
690
748
|
---
|
package/components.css
CHANGED
|
@@ -484,7 +484,6 @@ input[type="text"][list] {
|
|
|
484
484
|
display: block;
|
|
485
485
|
width: 1rem;
|
|
486
486
|
height: 1rem;
|
|
487
|
-
margin-right: calc(var(--spacer-1) * -1);
|
|
488
487
|
background-color: currentColor;
|
|
489
488
|
-webkit-mask-image: var(--icon-checkmark);
|
|
490
489
|
mask-image: var(--icon-checkmark);
|
|
@@ -3171,6 +3170,7 @@ fig-layer {
|
|
|
3171
3170
|
color: var(--figma-color-text);
|
|
3172
3171
|
position: relative;
|
|
3173
3172
|
user-select: none;
|
|
3173
|
+
width: 100%;
|
|
3174
3174
|
border-radius: var(--radius-medium);
|
|
3175
3175
|
|
|
3176
3176
|
/* When layer has children */
|
|
@@ -3178,24 +3178,17 @@ fig-layer {
|
|
|
3178
3178
|
& > .fig-layer-row {
|
|
3179
3179
|
& > .fig-layer-chevron {
|
|
3180
3180
|
visibility: visible;
|
|
3181
|
-
margin-left: calc(-1 * (var(--spacer-3) + var(--spacer-3) + 6px));
|
|
3182
|
-
margin-right: 0;
|
|
3183
3181
|
}
|
|
3184
3182
|
}
|
|
3185
3183
|
}
|
|
3186
3184
|
|
|
3187
|
-
&:not(:has(.fig-layer-icon)) {
|
|
3188
|
-
& > .fig-layer-row {
|
|
3189
|
-
padding-left: var(--spacer-4);
|
|
3190
|
-
}
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
3185
|
& > .fig-layer-row {
|
|
3194
3186
|
display: flex;
|
|
3195
3187
|
align-items: center;
|
|
3196
3188
|
gap: var(--spacer-1);
|
|
3197
3189
|
padding: var(--spacer-1) var(--spacer-2);
|
|
3198
3190
|
margin-left: 0;
|
|
3191
|
+
height: var(--spacer-4);
|
|
3199
3192
|
border-radius: var(--radius-medium);
|
|
3200
3193
|
position: relative;
|
|
3201
3194
|
|
|
@@ -3207,14 +3200,15 @@ fig-layer {
|
|
|
3207
3200
|
mask-position: center;
|
|
3208
3201
|
display: flex;
|
|
3209
3202
|
visibility: hidden;
|
|
3210
|
-
margin-left: calc(-1 * (var(--spacer-3) + var(--spacer-3)));
|
|
3211
|
-
margin-right: calc(-1 * (var(--spacer-1) + 2px));
|
|
3212
3203
|
background: var(--figma-color-text-tertiary);
|
|
3213
3204
|
width: var(--spacer-3);
|
|
3214
3205
|
height: var(--spacer-3);
|
|
3215
3206
|
flex-shrink: 0;
|
|
3216
|
-
transform: rotate(-90deg);
|
|
3217
3207
|
transition: transform 0.15s;
|
|
3208
|
+
position: absolute;
|
|
3209
|
+
left: calc(var(--spacer-3) * -1);
|
|
3210
|
+
top: var(--spacer-1);
|
|
3211
|
+
rotate: -90deg;
|
|
3218
3212
|
}
|
|
3219
3213
|
|
|
3220
3214
|
&:hover {
|
|
@@ -3231,7 +3225,7 @@ fig-layer {
|
|
|
3231
3225
|
width: var(--spacer-3);
|
|
3232
3226
|
height: var(--spacer-3);
|
|
3233
3227
|
color: var(--figma-color-icon-tertiary);
|
|
3234
|
-
margin-left: var(--spacer-1);
|
|
3228
|
+
margin-left: calc(var(--spacer-1) * -1);
|
|
3235
3229
|
}
|
|
3236
3230
|
|
|
3237
3231
|
> label {
|
|
@@ -3271,7 +3265,7 @@ fig-layer {
|
|
|
3271
3265
|
|
|
3272
3266
|
/* Rotate chevron when open */
|
|
3273
3267
|
&[open]:not([open="false"]) > .fig-layer-row > .fig-layer-chevron {
|
|
3274
|
-
|
|
3268
|
+
rotate: 0deg;
|
|
3275
3269
|
}
|
|
3276
3270
|
|
|
3277
3271
|
/* Dimmed when not visible */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rogieking/figui3",
|
|
3
|
-
"version": "2.33.
|
|
3
|
+
"version": "2.33.2",
|
|
4
4
|
"description": "A lightweight web components library for building Figma plugin and widget UIs with native look and feel",
|
|
5
5
|
"author": "Rogie King",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"fig.css",
|
|
20
20
|
"base.css",
|
|
21
21
|
"components.css",
|
|
22
|
-
"index.html",
|
|
23
22
|
"dist/",
|
|
24
23
|
".cursor/skills/",
|
|
25
24
|
"README.md",
|