@rogieking/figui3 11.1.1 → 11.1.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/.cursor/skills/fig-lab/components.md +1 -1
- package/.cursor/skills/fig-lab/reference.md +3 -1
- package/CHANGELOG.md +17 -0
- package/components.css +52 -24
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +2 -2
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +1 -1
- package/dist/fig.css +1 -1
- package/fig-editor.css +1 -1
- package/fig-editor.js +16 -0
- package/fig-lab.css +65 -39
- package/fig-lab.js +31 -2
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ useEffect(() => {
|
|
|
82
82
|
}, [onReorder]);
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
- `display: contents`. Reorders **direct children**. `axis` `vertical` | `horizontal`. `items` selector limits which children reorder (e.g. `items=".row"` to skip headers); `refresh()` re-syncs. Omit `handle` to drag whole rows; set it when rows contain sliders/handles.
|
|
85
|
+
- `display: contents`. Reorders **direct children**. `axis` `vertical` | `horizontal`. `items` selector limits which children reorder (e.g. `items=".row"` to skip headers); `indicator="default|ring"` controls the drop indicator style; `refresh()` re-syncs. Omit `handle` to drag whole rows; set it when rows contain sliders/handles.
|
|
86
86
|
- With fewer than two matching items, children keep `role="listitem"` but drag cursors, handles, focus, and move labels stay inactive until another item is added.
|
|
87
87
|
- Event `reorder`: `{ oldIndex, newIndex, item }` (indices among matching items). Nested drag is ignored for sliders, handles, and canvas controls.
|
|
88
88
|
|
|
@@ -55,10 +55,12 @@ Types: `point`, `color`, `point-radius`, `point-radius-angle`, `point-point`.
|
|
|
55
55
|
|
|
56
56
|
## `fig-reorder`
|
|
57
57
|
|
|
58
|
-
Observed: `axis`, `handle`, `items`, `disabled`.
|
|
58
|
+
Observed: `axis`, `handle`, `items`, `indicator`, `disabled`.
|
|
59
59
|
|
|
60
60
|
`items`: CSS selector for which direct children are reorderable (default: all). Non-matching children stay in place and get `role="none"` unless they have a role. Class/attribute changes on children re-sync automatically; call `refresh()` to force it.
|
|
61
61
|
|
|
62
|
+
`indicator`: Drop indicator style, either `default` or `ring`.
|
|
63
|
+
|
|
62
64
|
With fewer than two matching items, matching children retain `role="listitem"` but remain non-draggable and receive no generated focus or move label.
|
|
63
65
|
|
|
64
66
|
Event `reorder`: `{ oldIndex, newIndex, item }`. Indices count matching items, not DOM positions.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [11.1.2]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `indicator="default|ring"` to `fig-reorder`, including a playground control.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Standardized input focus rings around one tokenized ring on each visible control.
|
|
14
|
+
- Updated and nested `fig-reorder` drag-indicator styles.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Removed duplicate native focus outlines from wrapped inputs.
|
|
19
|
+
- Restored keyboard focus rings for `fig-input-fill` and `fig-3d-rotate`.
|
|
20
|
+
- Reflected keyboard focus state through `fig-select`.
|
|
21
|
+
|
|
5
22
|
## [11.1.1]
|
|
6
23
|
|
|
7
24
|
### Changed
|
package/components.css
CHANGED
|
@@ -528,7 +528,7 @@ input[type="tel"],
|
|
|
528
528
|
appearance: textfield;
|
|
529
529
|
-moz-appearance: textfield;
|
|
530
530
|
|
|
531
|
-
&:focus {
|
|
531
|
+
&:focus-visible {
|
|
532
532
|
outline: var(--figma-focus-outline);
|
|
533
533
|
outline-offset: var(--figma-focus-outline-offset);
|
|
534
534
|
}
|
|
@@ -736,7 +736,7 @@ input[type="text"][list] {
|
|
|
736
736
|
white-space: nowrap;
|
|
737
737
|
text-overflow: ellipsis;
|
|
738
738
|
|
|
739
|
-
&:focus {
|
|
739
|
+
&:focus-visible {
|
|
740
740
|
outline: var(--figma-focus-outline);
|
|
741
741
|
outline-offset: var(--figma-focus-outline-offset);
|
|
742
742
|
}
|
|
@@ -1495,12 +1495,12 @@ input[type="color"] {
|
|
|
1495
1495
|
background-color: var(--figma-color-bg-secondary);
|
|
1496
1496
|
display: inline-grid;
|
|
1497
1497
|
|
|
1498
|
-
&:focus {
|
|
1498
|
+
&:focus-visible {
|
|
1499
1499
|
outline: var(--figma-focus-outline);
|
|
1500
1500
|
outline-offset: var(--figma-focus-outline-offset);
|
|
1501
1501
|
}
|
|
1502
1502
|
|
|
1503
|
-
:is(fig-swatch, fig-chit):focus-within
|
|
1503
|
+
:is(fig-swatch, fig-chit):focus-within & {
|
|
1504
1504
|
outline: 0;
|
|
1505
1505
|
}
|
|
1506
1506
|
|
|
@@ -1658,16 +1658,12 @@ input[type="color"] {
|
|
|
1658
1658
|
calc(var(--border-radius) - var(--padding))
|
|
1659
1659
|
);
|
|
1660
1660
|
}
|
|
1661
|
-
&:focus,
|
|
1662
|
-
&:
|
|
1661
|
+
&:focus-visible,
|
|
1662
|
+
&:has(> input[type="color"]:focus-visible) {
|
|
1663
1663
|
outline: var(--figma-focus-outline);
|
|
1664
1664
|
outline-offset: var(--figma-focus-outline-offset);
|
|
1665
1665
|
}
|
|
1666
1666
|
|
|
1667
|
-
&:focus-within:not(:focus) {
|
|
1668
|
-
outline: 0;
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
1667
|
input[type="color"] {
|
|
1672
1668
|
background: none;
|
|
1673
1669
|
width: var(--width);
|
|
@@ -1774,6 +1770,14 @@ fig-input-file {
|
|
|
1774
1770
|
outline-offset: var(--figma-focus-outline-offset);
|
|
1775
1771
|
}
|
|
1776
1772
|
|
|
1773
|
+
fig-button > input[type="file"] {
|
|
1774
|
+
&:focus,
|
|
1775
|
+
&:focus-visible {
|
|
1776
|
+
outline: 0;
|
|
1777
|
+
box-shadow: none;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1777
1781
|
&[dragover] fig-button {
|
|
1778
1782
|
outline: 1px dashed var(--figma-color-border-brand);
|
|
1779
1783
|
outline-offset: -1px;
|
|
@@ -2100,7 +2104,10 @@ fig-angle {
|
|
|
2100
2104
|
background: var(--figma-color-bg-secondary);
|
|
2101
2105
|
overflow: hidden;
|
|
2102
2106
|
|
|
2103
|
-
&:has(
|
|
2107
|
+
&:has(
|
|
2108
|
+
.fig-angle-svg:focus-visible,
|
|
2109
|
+
.fig-angle-input :focus-visible
|
|
2110
|
+
),
|
|
2104
2111
|
&.dragging {
|
|
2105
2112
|
outline: var(--figma-focus-outline);
|
|
2106
2113
|
outline-offset: var(--figma-focus-outline-offset);
|
|
@@ -2177,7 +2184,7 @@ fig-angle {
|
|
|
2177
2184
|
left: 50%;
|
|
2178
2185
|
width: fit-content;
|
|
2179
2186
|
transform: translate(-50%, -50%);
|
|
2180
|
-
outline: 0;
|
|
2187
|
+
outline: 0 !important;
|
|
2181
2188
|
|
|
2182
2189
|
input {
|
|
2183
2190
|
field-sizing: content;
|
|
@@ -2315,6 +2322,11 @@ fig-3d-rotate {
|
|
|
2315
2322
|
&:focus {
|
|
2316
2323
|
outline: 0;
|
|
2317
2324
|
}
|
|
2325
|
+
|
|
2326
|
+
&:focus-visible {
|
|
2327
|
+
outline: var(--figma-focus-outline);
|
|
2328
|
+
outline-offset: var(--figma-focus-outline-offset);
|
|
2329
|
+
}
|
|
2318
2330
|
}
|
|
2319
2331
|
|
|
2320
2332
|
.fig-3d-rotate-scene {
|
|
@@ -2824,7 +2836,7 @@ input[type="checkbox"].switch {
|
|
|
2824
2836
|
}
|
|
2825
2837
|
}
|
|
2826
2838
|
|
|
2827
|
-
&:focus
|
|
2839
|
+
&:focus-visible {
|
|
2828
2840
|
outline: var(--figma-focus-outline);
|
|
2829
2841
|
outline-offset: var(--figma-focus-outline-offset);
|
|
2830
2842
|
}
|
|
@@ -2866,7 +2878,7 @@ input[type="checkbox"]:not(.switch) {
|
|
|
2866
2878
|
}
|
|
2867
2879
|
}
|
|
2868
2880
|
|
|
2869
|
-
&:focus {
|
|
2881
|
+
&:focus-visible {
|
|
2870
2882
|
outline: var(--figma-focus-outline);
|
|
2871
2883
|
outline-offset: var(--figma-focus-outline-offset);
|
|
2872
2884
|
|
|
@@ -2932,7 +2944,7 @@ input[type="radio"] {
|
|
|
2932
2944
|
}
|
|
2933
2945
|
}
|
|
2934
2946
|
|
|
2935
|
-
&:focus {
|
|
2947
|
+
&:focus-visible {
|
|
2936
2948
|
outline: var(--figma-focus-outline);
|
|
2937
2949
|
outline-offset: var(--figma-focus-outline-offset);
|
|
2938
2950
|
}
|
|
@@ -4244,6 +4256,7 @@ fig-input-number {
|
|
|
4244
4256
|
flex: 1;
|
|
4245
4257
|
|
|
4246
4258
|
&:focus,
|
|
4259
|
+
&:focus-visible,
|
|
4247
4260
|
&:active {
|
|
4248
4261
|
outline: 0 !important;
|
|
4249
4262
|
box-shadow: none !important;
|
|
@@ -4251,6 +4264,7 @@ fig-input-number {
|
|
|
4251
4264
|
}
|
|
4252
4265
|
|
|
4253
4266
|
& input[type="text"]:focus,
|
|
4267
|
+
& input[type="text"]:focus-visible,
|
|
4254
4268
|
& input[type="text"]:active {
|
|
4255
4269
|
outline: 0 !important;
|
|
4256
4270
|
box-shadow: none !important;
|
|
@@ -4267,7 +4281,9 @@ fig-input-number {
|
|
|
4267
4281
|
}
|
|
4268
4282
|
}
|
|
4269
4283
|
|
|
4270
|
-
&:
|
|
4284
|
+
&:focus,
|
|
4285
|
+
&:focus-visible,
|
|
4286
|
+
&:has(:is(input, textarea):focus-visible) {
|
|
4271
4287
|
outline: var(--figma-focus-outline);
|
|
4272
4288
|
outline-offset: var(--figma-focus-outline-offset);
|
|
4273
4289
|
}
|
|
@@ -4388,14 +4404,25 @@ fig-input-fill {
|
|
|
4388
4404
|
}
|
|
4389
4405
|
}
|
|
4390
4406
|
|
|
4391
|
-
fig-input-color
|
|
4407
|
+
fig-input-color {
|
|
4408
|
+
&:focus-visible,
|
|
4409
|
+
&:has(:focus-visible),
|
|
4410
|
+
&.has-popup-open {
|
|
4411
|
+
outline: var(--figma-focus-outline) !important;
|
|
4412
|
+
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4392
4416
|
fig-input-gradient {
|
|
4393
|
-
&:focus,
|
|
4394
|
-
&:focus-within,
|
|
4417
|
+
&:focus-visible,
|
|
4395
4418
|
&.has-popup-open {
|
|
4396
4419
|
outline: var(--figma-focus-outline) !important;
|
|
4397
4420
|
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
4398
4421
|
}
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4424
|
+
fig-input-color,
|
|
4425
|
+
fig-input-gradient {
|
|
4399
4426
|
&:hover {
|
|
4400
4427
|
outline: 1px solid var(--figma-color-border);
|
|
4401
4428
|
outline-offset: -1px !important;
|
|
@@ -4417,6 +4444,11 @@ fig-input-fill {
|
|
|
4417
4444
|
outline: none !important;
|
|
4418
4445
|
}
|
|
4419
4446
|
|
|
4447
|
+
&:has(:focus-visible) {
|
|
4448
|
+
outline: var(--figma-focus-outline) !important;
|
|
4449
|
+
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
4450
|
+
}
|
|
4451
|
+
|
|
4420
4452
|
& > [slot^="mode-"] {
|
|
4421
4453
|
display: none;
|
|
4422
4454
|
}
|
|
@@ -4473,14 +4505,10 @@ fig-input-gradient {
|
|
|
4473
4505
|
|
|
4474
4506
|
}
|
|
4475
4507
|
|
|
4476
|
-
&:focus
|
|
4477
|
-
&:active {
|
|
4508
|
+
&:focus-visible {
|
|
4478
4509
|
outline: var(--figma-focus-outline) !important;
|
|
4479
4510
|
outline-offset: var(--figma-focus-outline-offset) !important;
|
|
4480
4511
|
}
|
|
4481
|
-
&:focus-within:not(:focus) {
|
|
4482
|
-
outline: 0 !important;
|
|
4483
|
-
}
|
|
4484
4512
|
&[mode="tip"]{
|
|
4485
4513
|
fig-handle[type="color"]{
|
|
4486
4514
|
--fig-handle-bg: transparent;
|