@rogieking/figui3 6.4.6 → 6.4.8

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/components.css CHANGED
@@ -1,3 +1,4 @@
1
+ @layer figui.defaults {
1
2
  :root,
2
3
  :host {
3
4
  color-scheme: light dark;
@@ -48,6 +49,10 @@
48
49
  --figma-color-bg-warning-secondary: light-dark(#fab815, #e4a711);
49
50
  --figma-color-bg-warning-tertiary: light-dark(#fff1c2, #5c4100);
50
51
  --figma-color-bg-switch: light-dark(#e6e6e6, #444444);
52
+ --figma-color-bg-slot: light-dark(
53
+ rgba(255, 36, 189, 0.25),
54
+ rgba(243, 22, 176, 0.25)
55
+ );
51
56
 
52
57
  /* Border Colors */
53
58
  --figma-color-border: light-dark(#e6e6e6, #444444);
@@ -80,6 +85,12 @@
80
85
  --figma-color-border-success-strong: light-dark(#009951, #79d297);
81
86
  --figma-color-border-warning: light-dark(#ffe8a3, #925711);
82
87
  --figma-color-border-warning-strong: light-dark(#b86200, #f7d15f);
88
+ --figma-color-border-slot: light-dark(#ff24bd, #f316b0);
89
+
90
+ /* Focus */
91
+ --figma-focus-outline: 1px solid var(--figma-color-border-selected);
92
+ --figma-focus-outline-offset: -1px;
93
+ --figma-focus-outline-radius: inherit;
83
94
 
84
95
  /* Icon Colors */
85
96
  --figma-color-icon: light-dark(#000000e5, #ffffff);
@@ -89,8 +100,8 @@
89
100
  --figma-color-icon-brand-tertiary: light-dark(#bde3ff, #394360);
90
101
  --figma-color-icon-component: light-dark(#8638e5, #d1a8ff);
91
102
  --figma-color-icon-component-pressed: light-dark(#7c2bda, #d6b6fb);
92
- --figma-color-icon-component-secondary: light-dark(#c5b2dc, #7f699b);
93
- --figma-color-icon-component-tertiary: light-dark(#c5b2dc, #7f699b);
103
+ --figma-color-icon-component-secondary: light-dark(#6f3bb2, #d1a8ff);
104
+ --figma-color-icon-component-tertiary: light-dark(#6f3bb2, #d1a8ff);
94
105
  --figma-color-icon-danger: light-dark(#f24822, #e03e1a);
95
106
  --figma-color-icon-danger-hover: light-dark(#bd2915, #fbbcb6);
96
107
  --figma-color-icon-danger-pressed: light-dark(#bd2915, #fbbcb6);
@@ -121,7 +132,7 @@
121
132
  --figma-color-icon-onwarning-secondary: #00000080;
122
133
  --figma-color-icon-onwarning-tertiary: #0000004d;
123
134
  --figma-color-icon-pressed: light-dark(#007be5, #0a6dc2);
124
- --figma-color-icon-secondary: light-dark(#00000080, #ffffffb2);
135
+ --figma-color-icon-secondary: light-dark(#00000099, #ffffffcc);
125
136
  --figma-color-icon-secondary-hover: light-dark(#000000e5, #ffffff);
126
137
  --figma-color-icon-selected: light-dark(#007be5, #7cc4f8);
127
138
  --figma-color-icon-selected-secondary: light-dark(#007be5, #7cc4f8);
@@ -130,7 +141,7 @@
130
141
  --figma-color-icon-success-pressed: light-dark(#008043, #a1e8b9);
131
142
  --figma-color-icon-success-secondary: light-dark(#14ae5c, #198f51);
132
143
  --figma-color-icon-success-tertiary: light-dark(#14ae5c, #198f51);
133
- --figma-color-icon-tertiary: light-dark(#0000004d, #ffffff66);
144
+ --figma-color-icon-tertiary: light-dark(#00000099, #ffffff99);
134
145
  --figma-color-icon-tertiary-hover: light-dark(#000000e5, #ffffff);
135
146
  --figma-color-icon-warning: light-dark(#ffcd29, #f3c11b);
136
147
  --figma-color-icon-warning-pressed: light-dark(#b86200, #f7d15f);
@@ -144,8 +155,8 @@
144
155
  --figma-color-text-brand-tertiary: light-dark(#007be5, #7cc4f8);
145
156
  --figma-color-text-component: light-dark(#8638e5, #d1a8ff);
146
157
  --figma-color-text-component-pressed: light-dark(#7c2bda, #d6b6fb);
147
- --figma-color-text-component-secondary: light-dark(#c5b2dc, #7f699b);
148
- --figma-color-text-component-tertiary: light-dark(#c5b2dc, #7f699b);
158
+ --figma-color-text-component-secondary: light-dark(#6f3bb2, #d1a8ff);
159
+ --figma-color-text-component-tertiary: light-dark(#6f3bb2, #d1a8ff);
149
160
  --figma-color-text-danger: light-dark(#dc3412, #fca397);
150
161
  --figma-color-text-danger-secondary: light-dark(#dc3412, #fca397);
151
162
  --figma-color-text-danger-tertiary: light-dark(#dc3412, #fca397);
@@ -172,7 +183,7 @@
172
183
  --figma-color-text-onwarning: #000000e5;
173
184
  --figma-color-text-onwarning-secondary: #00000080;
174
185
  --figma-color-text-onwarning-tertiary: #0000004d;
175
- --figma-color-text-secondary: light-dark(#00000080, #ffffffb2);
186
+ --figma-color-text-secondary: light-dark(#00000099, #ffffffcc);
176
187
  --figma-color-text-secondary-hover: light-dark(#000000e5, #ffffff);
177
188
  --figma-color-text-selection: rgba(13, 153, 255, 0.4);
178
189
  --figma-color-text-selected: light-dark(#007be5, #7cc4f8);
@@ -181,14 +192,15 @@
181
192
  --figma-color-text-success: light-dark(#009951, #79d297);
182
193
  --figma-color-text-success-secondary: light-dark(#009951, #79d297);
183
194
  --figma-color-text-success-tertiary: light-dark(#009951, #79d297);
184
- --figma-color-text-tertiary: light-dark(#0000004d, #ffffff66);
195
+ --figma-color-text-tertiary: light-dark(#00000099, #ffffff99);
185
196
  --figma-color-text-tertiary-hover: light-dark(#000000e5, #ffffff);
186
197
  --figma-color-text-warning: light-dark(#b86200, #f7d15f);
187
198
  --figma-color-text-warning-secondary: light-dark(#b86200, #f7d15f);
188
199
  --figma-color-text-warning-tertiary: light-dark(#b86200, #f7d15f);
189
200
  --figma-color-text-menu: #ffffff;
190
201
  --figma-color-text-menu-secondary: rgba(255, 255, 255, 0.7);
191
- --figma-color-text-menu-tertiary: rgba(255, 255, 255, 0.4);
202
+ --figma-color-text-menu-tertiary: rgba(255, 255, 255, 0.7);
203
+ }
192
204
  }
193
205
 
194
206
  :root,
@@ -196,9 +208,8 @@
196
208
  /* Typography & Sizing */
197
209
  --font-size: 16px;
198
210
  --font-family:
199
- "Inter", AppleSystemUIFont, BlinkMacSystemFont, avenir next, avenir,
200
- segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial,
201
- sans-serif;
211
+ AppleSystemUIFont, BlinkMacSystemFont, avenir next, avenir, segoe ui,
212
+ helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
202
213
  --body-medium-fontSize: 0.6875rem;
203
214
  --body-large-fontSize: 0.8125rem;
204
215
  --body-letter-spacing: 0.055px;
@@ -286,7 +297,7 @@
286
297
  rgba(0, 0, 0, 0.2) 0% 25%,
287
298
  rgba(255, 255, 255, 0.2) 0% 50%
288
299
  )
289
- 0 0 / 0.875rem 0.875rem;
300
+ 0 0 / 0.4375rem 0.4375rem;
290
301
  --checkerboard-slider: repeating-conic-gradient(
291
302
  rgba(0, 0, 0, 0.2) 0% 25%,
292
303
  rgba(255, 255, 255, 0.2) 0% 50%
@@ -296,7 +307,7 @@
296
307
  rgba(0, 0, 0, 0.2) 0% 25%,
297
308
  rgba(255, 255, 255, 0.2) 0% 50%
298
309
  )
299
- 0 0 / 0.625rem 0.625rem;
310
+ 0 0 / 0.375rem 0.375rem;
300
311
  --bg-hue: linear-gradient(
301
312
  90deg,
302
313
  rgba(255, 0, 0, 1),
@@ -452,8 +463,8 @@ input[type="tel"],
452
463
  -moz-appearance: textfield;
453
464
 
454
465
  &:focus {
455
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
456
- outline: 0;
466
+ outline: var(--figma-focus-outline);
467
+ outline-offset: var(--figma-focus-outline-offset);
457
468
  }
458
469
  &::-webkit-outer-spin-button,
459
470
  &::-webkit-inner-spin-button {
@@ -567,8 +578,8 @@ input[type="text"][list] {
567
578
  text-overflow: ellipsis;
568
579
 
569
580
  &:focus {
570
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
571
- outline: 0;
581
+ outline: var(--figma-focus-outline);
582
+ outline-offset: var(--figma-focus-outline-offset);
572
583
  }
573
584
 
574
585
  &::-webkit-calendar-picker-indicator {
@@ -1017,9 +1028,11 @@ fig-button {
1017
1028
  }
1018
1029
 
1019
1030
  &:focus-visible,
1020
- &[data-focus-visible] {
1021
- outline: 0;
1022
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
1031
+ &[data-focus-visible],
1032
+ &[type="select"]:focus-within,
1033
+ &[type="upload"]:focus-within {
1034
+ outline: var(--figma-focus-outline);
1035
+ outline-offset: var(--figma-focus-outline-offset);
1023
1036
  }
1024
1037
  svg {
1025
1038
  *[fill]:not([fill="none"]) {
@@ -1124,6 +1137,12 @@ fig-tab,
1124
1137
  background-color: var(--figma-color-bg-secondary);
1125
1138
  }
1126
1139
 
1140
+ &:focus-visible,
1141
+ &[data-focus-visible] {
1142
+ outline: var(--figma-focus-outline);
1143
+ outline-offset: var(--figma-focus-outline-offset);
1144
+ }
1145
+
1127
1146
  &[disabled]:not([disabled="false"]) {
1128
1147
  opacity: 0.4;
1129
1148
  pointer-events: none;
@@ -1203,8 +1222,8 @@ input[type="color"] {
1203
1222
  display: inline-grid;
1204
1223
 
1205
1224
  &:focus {
1206
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
1207
- outline: 0;
1225
+ outline: var(--figma-focus-outline);
1226
+ outline-offset: var(--figma-focus-outline-offset);
1208
1227
  }
1209
1228
 
1210
1229
  &::-webkit-color-swatch-wrapper {
@@ -1446,6 +1465,11 @@ fig-input-file {
1446
1465
  flex-shrink: 0;
1447
1466
  }
1448
1467
 
1468
+ fig-button:has(> input[type="file"]:focus-visible) {
1469
+ outline: var(--figma-focus-outline);
1470
+ outline-offset: var(--figma-focus-outline-offset);
1471
+ }
1472
+
1449
1473
  &[dragover] fig-button {
1450
1474
  outline: 1px dashed var(--figma-color-border-brand);
1451
1475
  outline-offset: -1px;
@@ -1457,91 +1481,114 @@ fig-image,
1457
1481
  fig-video {
1458
1482
  --fig-media-fit: contain;
1459
1483
  --fig-media-aspect-ratio: 4/3;
1460
- --fig-media-size: 100%;
1484
+ --fig-media-size: 100%;
1461
1485
  display: inline-flex;
1462
- max-width:var(--fig-media-size);
1463
- max-height:var(--fig-media-size);
1464
- background-color: var(--figma-color-bg-secondary);
1465
- border-radius: var(--radius-medium);
1466
- overflow: hidden;
1467
- aspect-ratio: var(--fig-media-aspect-ratio);
1468
- align-items: center;
1469
- min-height: 4rem;
1470
- justify-content: center;
1486
+ flex-direction: column;
1487
+ gap: var(--spacer-2);
1488
+ max-width: var(--fig-media-size);
1489
+ align-items: stretch;
1471
1490
  position: relative;
1472
1491
 
1492
+ &:has(> :is([slot="overlay"], fig-input-file[variant="overlay"])) {
1493
+ display: inline-grid;
1494
+ grid-template-areas: "media-preview";
1495
+ }
1496
+
1473
1497
  &[size="small"] {
1474
1498
  --fig-media-size: 2rem;
1475
- min-height: auto;
1476
1499
  width: var(--fig-media-size);
1477
1500
  }
1478
1501
  &[size="medium"] {
1479
1502
  --fig-media-size: 4rem;
1480
- min-height: auto;
1481
1503
  width: var(--fig-media-size);
1482
1504
  }
1483
1505
  &[size="large"] {
1484
1506
  --fig-media-size: 6rem;
1485
- min-height: auto;
1486
1507
  width: var(--fig-media-size);
1487
1508
  }
1488
1509
 
1489
- & > *{
1490
- position: absolute;
1491
- z-index: 1;
1510
+ > fig-preview {
1511
+ --fig-preview-fit: var(--fig-media-fit);
1512
+ width: 100%;
1513
+ max-width: var(--fig-media-size);
1514
+ aspect-ratio: var(--fig-media-aspect-ratio);
1515
+ min-height: 4rem;
1492
1516
  }
1493
1517
 
1494
- &[checkerboard]:not([checkerboard="false"]) {
1518
+ &[size="small"] > fig-preview,
1519
+ &[size="medium"] > fig-preview,
1520
+ &[size="large"] > fig-preview {
1521
+ min-height: auto;
1522
+ }
1523
+
1524
+ &[checkerboard]:not([checkerboard="false"]) > fig-preview {
1495
1525
  background: var(--checkerboard);
1496
1526
  }
1497
- &::after{
1498
- content: "";
1499
- width: 100%;
1500
- height: 100%;
1501
- border-radius: inherit;
1502
- position: absolute;
1503
- inset: 0;
1504
- border: 1px solid var(--figma-color-bordertranslucent);
1527
+
1528
+ > :is(fig-preview, [slot="overlay"], fig-input-file[variant="overlay"]) {
1529
+ grid-area: media-preview;
1505
1530
  }
1506
- > video,
1507
- > img,
1508
- > .fig-media-element[data-generated] {
1531
+
1532
+ > fig-preview > video,
1533
+ > fig-preview > img,
1534
+ > fig-preview > .fig-media-element[data-generated] {
1509
1535
  display: block;
1510
1536
  width: stretch;
1511
1537
  height: stretch;
1512
1538
  position: static;
1513
- object-fit: var(--fig-media-fit);
1539
+ object-fit: var(--fig-preview-fit);
1514
1540
  object-position: center;
1515
1541
  z-index: 0;
1516
1542
  }
1517
1543
 
1518
1544
  &:is(:not([src]), [src=""]):is(:not([poster]), [poster=""])
1519
- > video.fig-media-element[data-generated] {
1545
+ > fig-preview > video.fig-media-element[data-generated] {
1520
1546
  opacity: 0;
1521
1547
  pointer-events: none;
1522
1548
  }
1523
- &:not(:has(> img.fig-media-element[data-generated][src]:not([src=""]))) > img.fig-media-element[data-generated] {
1549
+ &:not(:has(> fig-preview > img.fig-media-element[data-generated][src]:not([src=""]))) > fig-preview > img.fig-media-element[data-generated] {
1524
1550
  opacity: 0;
1525
1551
  pointer-events: none;
1526
1552
  }
1527
- > fig-input-file[data-generated] {
1553
+ > fig-preview > fig-input-file:is([data-generated], [variant="overlay"]) {
1528
1554
  opacity: 0;
1529
1555
  pointer-events: none;
1556
+ position: absolute;
1557
+ top: 50%;
1558
+ left: 50%;
1559
+ transform: translate(-50%, -50%);
1560
+ z-index: 2;
1561
+ max-width: calc(100% - var(--spacer-4));
1562
+ }
1563
+ &:not(:has(> fig-preview > img.fig-media-element[data-generated][src]:not([src=""]))) > fig-preview > fig-input-file:is([data-generated], [variant="overlay"]),
1564
+ > fig-preview:hover > fig-input-file:is([data-generated], [variant="overlay"]),
1565
+ > fig-preview:focus-within > fig-input-file:is([data-generated], [variant="overlay"]) {
1566
+ opacity: 1;
1567
+ pointer-events: all;
1568
+ }
1569
+
1570
+ > :is([slot="overlay"], fig-input-file[variant="overlay"]) {
1571
+ place-self: center;
1530
1572
  z-index: 2;
1531
- max-width:calc(100% - var(--spacer-4));
1573
+ opacity: 0;
1574
+ pointer-events: none;
1575
+ max-width: calc(100% - var(--spacer-4));
1532
1576
  }
1533
- &:not(:has(> img.fig-media-element[data-generated][src]:not([src=""]))) > fig-input-file[data-generated],
1534
- &:hover > fig-input-file[data-generated] {
1577
+
1578
+ &:not(:has(> fig-preview > img.fig-media-element[data-generated][src]:not([src=""]))) > :is([slot="overlay"], fig-input-file[variant="overlay"]),
1579
+ &:has(> fig-preview:hover) > :is([slot="overlay"], fig-input-file[variant="overlay"]),
1580
+ &:has(> fig-preview:focus-within) > :is([slot="overlay"], fig-input-file[variant="overlay"]),
1581
+ &:has(> [slot="overlay"]:is(:focus, :focus-within, :active)) > [slot="overlay"],
1582
+ &:has(> fig-input-file[variant="overlay"]:is(:focus, :focus-within, :active)) > fig-input-file[variant="overlay"],
1583
+ > [slot="overlay"]:focus-within,
1584
+ > fig-input-file[variant="overlay"]:focus-within {
1535
1585
  opacity: 1;
1536
1586
  pointer-events: all;
1537
1587
  }
1538
1588
 
1539
1589
  > fig-media-controls[data-generated] {
1540
- position: absolute;
1541
- inset: var(--spacer-2);
1542
- top: auto;
1543
- width: auto;
1544
- z-index: 3;
1590
+ position: static;
1591
+ width: 100%;
1545
1592
  pointer-events: auto;
1546
1593
  }
1547
1594
  }
@@ -1969,6 +2016,12 @@ fig-origin-grid {
1969
2016
  cursor: default;
1970
2017
  touch-action: none;
1971
2018
 
2019
+ &:focus-visible {
2020
+ --figma-focus-outline-offset: 1px;
2021
+ outline: var(--figma-focus-outline);
2022
+ outline-offset: var(--figma-focus-outline-offset);
2023
+ }
2024
+
1972
2025
  &.beyond-bounds-x,
1973
2026
  &.beyond-bounds-y {
1974
2027
  -webkit-mask-image: var(--icon-24-arrow-left);
@@ -2053,6 +2106,27 @@ fig-combo-input {
2053
2106
  display: inline-flex;
2054
2107
  flex: 1;
2055
2108
  min-width: 0;
2109
+
2110
+ > .input-combo {
2111
+ flex: 1 1 auto;
2112
+ width: 100%;
2113
+ min-width: 0;
2114
+ }
2115
+
2116
+ fig-input-text {
2117
+ flex: 1 1 auto;
2118
+ min-width: 0;
2119
+ }
2120
+ }
2121
+
2122
+ fig-combo-input fig-button[type="select"] {
2123
+ > fig-dropdown,
2124
+ > fig-dropdown > select {
2125
+ width: 100%;
2126
+ height: 100%;
2127
+ min-width: 100%;
2128
+ padding: 0;
2129
+ }
2056
2130
  }
2057
2131
 
2058
2132
  .input-combo {
@@ -2107,6 +2181,7 @@ input[type="checkbox"].switch {
2107
2181
  --knob-height: 0.5rem;
2108
2182
  --width: 2rem;
2109
2183
  --height: 1rem;
2184
+ --figma-focus-outline-offset: 1px;
2110
2185
  contain: strict;
2111
2186
  display: inline-flex;
2112
2187
  margin: 0;
@@ -2126,7 +2201,6 @@ input[type="checkbox"].switch {
2126
2201
  justify-content: center;
2127
2202
  border-radius: 0.5rem;
2128
2203
  background-color: var(--figma-color-bg-switch);
2129
- transition: var(--input-transition);
2130
2204
  box-sizing: border-box;
2131
2205
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
2132
2206
  &:after {
@@ -2184,12 +2258,9 @@ input[type="checkbox"].switch {
2184
2258
  }
2185
2259
  }
2186
2260
 
2187
- &:focus {
2188
- outline: 0;
2189
- }
2190
-
2191
- &:checked:focus {
2192
- outline: 0;
2261
+ &:focus, &:focus-within {
2262
+ outline: var(--figma-focus-outline);
2263
+ outline-offset: var(--figma-focus-outline-offset);
2193
2264
  }
2194
2265
  }
2195
2266
 
@@ -2198,6 +2269,7 @@ input[type="checkbox"]:not(.switch) {
2198
2269
  contain: strict;
2199
2270
  vertical-align: middle;
2200
2271
  --size: 1rem;
2272
+ --figma-focus-outline-offset: 1px;
2201
2273
  appearance: none;
2202
2274
  border-radius: var(--radius-medium);
2203
2275
  width: var(--size);
@@ -2230,10 +2302,11 @@ input[type="checkbox"]:not(.switch) {
2230
2302
  }
2231
2303
 
2232
2304
  &:focus {
2233
- outline: 0;
2305
+ outline: var(--figma-focus-outline);
2306
+ outline-offset: var(--figma-focus-outline-offset);
2234
2307
 
2235
2308
  &:not(:checked) {
2236
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
2309
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
2237
2310
  }
2238
2311
  }
2239
2312
  &:disabled{
@@ -2274,6 +2347,7 @@ label.checkbox:has([type="checkbox"]) {
2274
2347
  /* Radio */
2275
2348
  input[type="radio"] {
2276
2349
  contain: strict;
2350
+ --figma-focus-outline-offset: 1px;
2277
2351
  appearance: none;
2278
2352
  border-radius: 0.5rem;
2279
2353
  width: 1rem;
@@ -2295,11 +2369,8 @@ input[type="radio"] {
2295
2369
  }
2296
2370
 
2297
2371
  &:focus {
2298
- outline: 0;
2299
-
2300
- &:not(:checked) {
2301
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
2302
- }
2372
+ outline: var(--figma-focus-outline);
2373
+ outline-offset: var(--figma-focus-outline-offset);
2303
2374
  }
2304
2375
 
2305
2376
  &:hover:not(:checked):not(:disabled) {
@@ -2567,6 +2638,19 @@ fig-slider {
2567
2638
  outline: none;
2568
2639
  }
2569
2640
 
2641
+ &:focus-visible {
2642
+ &::-webkit-slider-thumb {
2643
+ --figma-focus-outline-offset: 1px;
2644
+ outline: var(--figma-focus-outline);
2645
+ outline-offset: var(--figma-focus-outline-offset);
2646
+ }
2647
+ &::-moz-range-thumb {
2648
+ --figma-focus-outline-offset: 1px;
2649
+ outline: var(--figma-focus-outline);
2650
+ outline-offset: var(--figma-focus-outline-offset);
2651
+ }
2652
+ }
2653
+
2570
2654
  &:disabled {
2571
2655
  cursor: not-allowed;
2572
2656
  }
@@ -2727,8 +2811,8 @@ fig-slider {
2727
2811
  &:not([variant="classic"]) {
2728
2812
  --slider-height: 0.375rem;
2729
2813
  --slider-thumb-size: 0.75rem;
2730
- --slider-tick-width: calc(var(--slider-height) / 3);
2731
- --slider-tick-height: calc(var(--slider-height) / 3);
2814
+ --slider-tick-width: calc(var(--slider-height) / 2);
2815
+ --slider-tick-height: calc(var(--slider-height) / 2);
2732
2816
  --handle-transition: none;
2733
2817
  --slider-transition: none;
2734
2818
  --slider-handle-shadow:
@@ -3000,70 +3084,6 @@ dialog[is="fig-popup"] {
3000
3084
 
3001
3085
  }
3002
3086
 
3003
- dialog[is="fig-toast"] {
3004
- contain: layout paint;
3005
- --z-index: 999999;
3006
- z-index: var(--z-index);
3007
- box-shadow: var(--figma-elevation-100);
3008
- border-radius: var(--radius-large);
3009
- padding: var(--spacer-2) var(--spacer-3);
3010
- align-items: center;
3011
- gap: var(--spacer-2);
3012
- height: 2.5rem;
3013
- justify-content: center;
3014
- min-width: 0;
3015
- color: var(--figma-color-text);
3016
- background-color: var(--figma-color-bg);
3017
-
3018
- &[open] {
3019
- display: flex;
3020
- }
3021
-
3022
- & p {
3023
- margin: 0;
3024
- padding: 0;
3025
- color: inherit;
3026
- font-weight: var(--body-medium-strong-fontWeight);
3027
- }
3028
-
3029
- hr[vertical] {
3030
- margin: 0;
3031
- }
3032
-
3033
- & fig-button:last-child {
3034
- margin-right: calc(var(--spacer-2) * -1);
3035
- }
3036
-
3037
- /* Theme: Dark (default) - hardcoded to ensure consistency regardless of global theme */
3038
- &[theme="dark"] {
3039
- color-scheme: dark;
3040
- }
3041
-
3042
- /* Theme: Light - hardcoded to ensure consistency regardless of global theme */
3043
- &[theme="light"] {
3044
- color-scheme: light;
3045
- }
3046
-
3047
- /* Theme: Danger - hardcoded to ensure consistency regardless of global theme */
3048
- &[theme="danger"] {
3049
- background-color: var(--figma-color-bg-danger);
3050
- color-scheme: dark;
3051
- }
3052
-
3053
- /* Theme: Brand - hardcoded to ensure consistency regardless of global theme */
3054
- &[theme="brand"] {
3055
- background-color: var(--figma-color-bg-brand);
3056
- color-scheme: dark;
3057
- }
3058
-
3059
- &[theme="success"] {
3060
- background-color: var(--figma-color-bg-success);
3061
- color-scheme: dark;
3062
- }
3063
- }
3064
-
3065
-
3066
-
3067
3087
  /* Tooltip */
3068
3088
  fig-tooltip {
3069
3089
  display: contents;
@@ -3140,6 +3160,7 @@ fig-dropdown {
3140
3160
 
3141
3161
  fig-checkbox,
3142
3162
  fig-radio {
3163
+
3143
3164
  align-items: center;
3144
3165
  padding-top: 0.25rem;
3145
3166
  padding-bottom: 0.25rem;
@@ -3196,6 +3217,13 @@ fig-group {
3196
3217
  & > fig-header {
3197
3218
  cursor: default;
3198
3219
  padding-left: var(--spacer-3);
3220
+
3221
+ &:focus-visible {
3222
+ --figma-focus-outline-radius: var(--radius-medium);
3223
+ outline: var(--figma-focus-outline);
3224
+ outline-offset: var(--figma-focus-outline-offset);
3225
+ border-radius: var(--figma-focus-outline-radius);
3226
+ }
3199
3227
  h3 {
3200
3228
  .fig-group-chevron {
3201
3229
  --icon: var(--icon-16-chevron);
@@ -3399,16 +3427,24 @@ fig-input-number {
3399
3427
  }
3400
3428
  }
3401
3429
 
3402
- & input {
3430
+ & input,
3431
+ & textarea {
3403
3432
  background-color: transparent !important;
3404
3433
  flex: 1;
3405
3434
 
3406
3435
  &:focus,
3407
3436
  &:active {
3437
+ outline: 0 !important;
3408
3438
  box-shadow: none !important;
3409
3439
  }
3410
3440
  }
3411
3441
 
3442
+ & input[type="text"]:focus,
3443
+ & input[type="text"]:active {
3444
+ outline: 0 !important;
3445
+ box-shadow: none !important;
3446
+ }
3447
+
3412
3448
  & input[type="search"] {
3413
3449
  appearance: textfield;
3414
3450
  &::-webkit-search-cancel-button,
@@ -3420,9 +3456,9 @@ fig-input-number {
3420
3456
  }
3421
3457
  }
3422
3458
 
3423
- &:has(input:focus) {
3424
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
3425
- outline: 0;
3459
+ &:has(:is(input, textarea):focus) {
3460
+ outline: var(--figma-focus-outline);
3461
+ outline-offset: var(--figma-focus-outline-offset);
3426
3462
  }
3427
3463
  &:hover {
3428
3464
  box-shadow: inset 0 0 0 1px var(--figma-color-border);
@@ -3458,8 +3494,8 @@ fig-input-fill {
3458
3494
  &:focus,
3459
3495
  &:focus-within,
3460
3496
  &.has-popup-open {
3461
- outline: 1px solid var(--figma-color-border-selected) !important;
3462
- outline-offset: -1px !important;
3497
+ outline: var(--figma-focus-outline) !important;
3498
+ outline-offset: var(--figma-focus-outline-offset) !important;
3463
3499
  }
3464
3500
  &:hover {
3465
3501
  outline: 1px solid var(--figma-color-border);
@@ -3479,6 +3515,7 @@ fig-input-fill {
3479
3515
  &:hover {
3480
3516
  background-color: transparent !important;
3481
3517
  box-shadow: none !important;
3518
+ outline: 0 !important;
3482
3519
  border: 0 !important;
3483
3520
  --selected: 0;
3484
3521
  }
@@ -3500,6 +3537,13 @@ fig-input-fill {
3500
3537
  flex-basis: 3rem;
3501
3538
  box-shadow: inset 1px 0 0 0 var(--figma-color-bg) !important;
3502
3539
  background-color: transparent !important;
3540
+ outline: 0 !important;
3541
+
3542
+ &:focus,
3543
+ &:focus-within,
3544
+ &:hover {
3545
+ outline: 0 !important;
3546
+ }
3503
3547
  }
3504
3548
 
3505
3549
  fig-field:not([direction="vertical"]) & {
@@ -3520,13 +3564,17 @@ fig-input-gradient {
3520
3564
  fig-handle[type="color"]{
3521
3565
  --height: var(--fig-input-gradient-handle-size);
3522
3566
  --width: var(--fig-input-gradient-handle-size);
3567
+ --fig-handle-padding: 0.125rem;
3568
+
3523
3569
  }
3524
3570
 
3525
3571
  &:focus,
3526
- &:active,
3527
- &:focus-within {
3528
- outline: 1px solid var(--figma-color-border-selected) !important;
3529
- outline-offset: -1px !important;
3572
+ &:active {
3573
+ outline: var(--figma-focus-outline) !important;
3574
+ outline-offset: var(--figma-focus-outline-offset) !important;
3575
+ }
3576
+ &:focus-within:not(:focus) {
3577
+ outline: 0 !important;
3530
3578
  }
3531
3579
  &[mode="tip"]{
3532
3580
  fig-handle[type="color"]{
@@ -3536,6 +3584,7 @@ fig-input-gradient {
3536
3584
  --fig-handle-outline-color: transparent;
3537
3585
  --fig-handle-shadow: none;
3538
3586
  --fig-handle-inner-outline: none;
3587
+
3539
3588
  fig-color-tip{
3540
3589
  bottom: calc(100%);
3541
3590
  }
@@ -3546,16 +3595,11 @@ fig-input-gradient {
3546
3595
  --fig-input-gradient-chit-border-radius: var(--radius-medium);
3547
3596
  }
3548
3597
 
3549
- &[edit="false"] {
3598
+ &[edit="false"],
3599
+ &[edit="picker"] {
3550
3600
  pointer-events: none;
3551
3601
  --fig-input-gradient-chit-border-radius: var(--radius-medium);
3552
3602
 
3553
- &:focus,
3554
- &:active,
3555
- &:focus-within {
3556
- outline: none !important;
3557
- }
3558
-
3559
3603
  }
3560
3604
 
3561
3605
  &[edit="picker"] {
@@ -3648,6 +3692,10 @@ fig-input-palette {
3648
3692
  height: var(--palette-colors-height);
3649
3693
  fig-input-color {
3650
3694
  width: 100%;
3695
+ &:focus,
3696
+ &:focus-within {
3697
+ outline: 0 !important;
3698
+ }
3651
3699
  fig-chit {
3652
3700
  --border-radius: 0px;
3653
3701
  --width: 100%;
@@ -3677,6 +3725,15 @@ fig-input-palette {
3677
3725
 
3678
3726
  }
3679
3727
  }
3728
+ &:focus-visible {
3729
+ outline: 0;
3730
+ }
3731
+ &:focus-visible > .palette-colors-inline,
3732
+ > .palette-colors-inline:focus-visible,
3733
+ &:has(> .palette-colors-inline :focus-visible) > .palette-colors-inline {
3734
+ outline: var(--figma-focus-outline);
3735
+ outline-offset: var(--figma-focus-outline-offset);
3736
+ }
3680
3737
  &[open]:not([open="false"]):not([edit="false"]) {
3681
3738
  grid-template-areas:
3682
3739
  "inline button"
@@ -3889,6 +3946,7 @@ fig-segmented-control {
3889
3946
  }
3890
3947
 
3891
3948
  & fig-segment {
3949
+ --figma-focus-outline-offset: 0;
3892
3950
  flex: 1 1 0;
3893
3951
  min-width: 0;
3894
3952
  display: block;
@@ -3913,6 +3971,11 @@ fig-segmented-control {
3913
3971
  box-shadow: 0 0 0 1px var(--figma-color-border);
3914
3972
  }
3915
3973
 
3974
+ &:focus-visible {
3975
+ outline: var(--figma-focus-outline);
3976
+ outline-offset: var(--figma-focus-outline-offset);
3977
+ }
3978
+
3916
3979
  svg {
3917
3980
  *[fill] {
3918
3981
  fill: currentColor;
@@ -4082,6 +4145,7 @@ fig-joystick {
4082
4145
  line-height: 1;
4083
4146
  letter-spacing: 0.01em;
4084
4147
  font-weight: 700;
4148
+ text-transform: uppercase;
4085
4149
  text-shadow:
4086
4150
  1px 0 0 var(--figma-color-bg-secondary),
4087
4151
  -1px 0 0 var(--figma-color-bg-secondary),
@@ -4176,147 +4240,12 @@ fig-joystick {
4176
4240
  var(--figma-color-bg-secondary);
4177
4241
  box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
4178
4242
  }
4179
- .fig-input-joystick-plane-container:focus .fig-input-joystick-guides {
4180
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
4181
- }
4182
-
4183
4243
  fig-handle {
4184
4244
  position: absolute;
4185
4245
  z-index: 4;
4186
4246
  }
4187
4247
  }
4188
4248
 
4189
- /* Layer */
4190
- fig-layer {
4191
- --indent: var(--spacer-3);
4192
- display: block;
4193
- color: var(--figma-color-text);
4194
- position: relative;
4195
- user-select: none;
4196
- width: 100%;
4197
- padding: 0 var(--spacer-3);
4198
- border-radius: var(--radius-medium);
4199
-
4200
- /* When layer has children */
4201
- &:has(fig-layer) {
4202
- & > .fig-layer-row {
4203
- & > .fig-layer-chevron {
4204
- visibility: visible;
4205
- }
4206
- }
4207
- }
4208
-
4209
- & > .fig-layer-row {
4210
- display: flex;
4211
- align-items: center;
4212
- gap: var(--spacer-1);
4213
- padding: var(--spacer-1) var(--spacer-2);
4214
- height: var(--spacer-4);
4215
- border-radius: var(--radius-medium);
4216
- position: relative;
4217
-
4218
- /* Chevron element - injected by JS when layer has children */
4219
- .fig-layer-chevron {
4220
- mask-image: var(--icon-16-chevron);
4221
- mask-size: contain;
4222
- mask-repeat: no-repeat;
4223
- mask-position: center;
4224
- display: flex;
4225
- visibility: hidden;
4226
- background: var(--figma-color-text-tertiary);
4227
- width: var(--spacer-3);
4228
- height: var(--spacer-3);
4229
- flex-shrink: 0;
4230
- transition: transform 0.15s;
4231
- position: absolute;
4232
- left: calc(var(--spacer-3) * -1);
4233
- top: var(--spacer-1);
4234
- rotate: -90deg;
4235
- }
4236
-
4237
- &:hover {
4238
- background: var(--figma-color-bg-secondary);
4239
-
4240
- .fig-layer-actions {
4241
- opacity: 1;
4242
- }
4243
- }
4244
-
4245
- /* Layer icon */
4246
- .fig-layer-icon {
4247
- flex-shrink: 0;
4248
- width: var(--spacer-3);
4249
- height: var(--spacer-3);
4250
- color: var(--figma-color-icon-tertiary);
4251
- margin-left: calc(var(--spacer-1) * -1);
4252
- }
4253
-
4254
- > label {
4255
- flex: 1;
4256
- min-width: 0;
4257
- overflow: hidden;
4258
- text-overflow: ellipsis;
4259
- white-space: nowrap;
4260
- color: var(--figma-color-text);
4261
- }
4262
- }
4263
-
4264
- .fig-layer-actions {
4265
- display: flex;
4266
- margin-right: calc(-1 * var(--spacer-1));
4267
- gap: 0;
4268
- opacity: 0;
4269
- transition: opacity 0.15s;
4270
- flex-shrink: 0;
4271
-
4272
- > * {
4273
- flex-shrink: 0;
4274
- }
4275
- }
4276
-
4277
- /* Nested layers indentation */
4278
- > fig-layer {
4279
- padding: 0;
4280
- margin-top: 1px;
4281
- .fig-layer-row {
4282
- padding-left: var(--indent);
4283
- }
4284
- }
4285
-
4286
- /* Collapsed state - hide children */
4287
- &:not([open]) > fig-layer,
4288
- &[open="false"] > fig-layer {
4289
- display: none;
4290
- }
4291
-
4292
- &[open]:not([open="false"]) {
4293
- /* Rotate chevron when open */
4294
- & > .fig-layer-row > .fig-layer-chevron {
4295
- rotate: 0deg;
4296
- }
4297
- }
4298
-
4299
- /* Dimmed when not visible */
4300
- &[visible="false"] > .fig-layer-row {
4301
- & > label {
4302
- color: var(--figma-color-text-tertiary);
4303
- }
4304
- }
4305
-
4306
- /* Selected state */
4307
- &[selected]:not([selected="false"]) {
4308
- /* Open with children */
4309
- /*&:has(fig-layer) {
4310
- background: var(--figma-color-bg-selected-secondary);
4311
- }*/
4312
- & > .fig-layer-row {
4313
- background: var(--figma-color-bg-selected);
4314
- & > .fig-layer-icon {
4315
- color: var(--figma-color-icon);
4316
- }
4317
- }
4318
- }
4319
- }
4320
4249
  @keyframes fig-shimmer-text {
4321
4250
  from {
4322
4251
  background-position: var(--fig-shimmer-text-from, 100% 0%);
@@ -4740,6 +4669,11 @@ fig-choice {
4740
4669
  background-color: var(--figma-color-bg-secondary);
4741
4670
  }
4742
4671
 
4672
+ &:focus-visible {
4673
+ outline: var(--figma-focus-outline);
4674
+ outline-offset: var(--figma-focus-outline-offset);
4675
+ }
4676
+
4743
4677
  &[padding]:not([padding="false"]) {
4744
4678
  --fig-choice-padding: var(--spacer-2);
4745
4679
  }
@@ -4775,7 +4709,7 @@ fig-handle {
4775
4709
  --fill: transparent;
4776
4710
  --border-radius: 50%;
4777
4711
  --fig-handle-bg: var(--handle-color);
4778
- --fig-handle-checkerboard: var(--checkerboard);
4712
+ --fig-handle-checkerboard: var(--checkerboard-handle);
4779
4713
  --fig-handle-height: var(--width);
4780
4714
  --fig-handle-hit-area-opacity: 0;
4781
4715
  --fig-handle-hit-area-size: 0;
@@ -4810,8 +4744,6 @@ fig-handle {
4810
4744
  width: 100%;
4811
4745
  height: 100%;
4812
4746
  background: var(--fig-handle-inner-bg);
4813
- background-position: 0 0;
4814
- background-size: calc(var(--fig-handle-width) - var(--fig-handle-padding) * 2) calc(var(--fig-handle-height) - var(--fig-handle-padding) * 2);
4815
4747
  border-radius: var(--fig-handle-inner-radius);
4816
4748
  box-shadow: var(--fig-handle-inner-shadow);
4817
4749
  outline: var(--fig-handle-inner-outline);
@@ -4836,6 +4768,13 @@ fig-handle {
4836
4768
  &:hover,
4837
4769
  &[selected]:not([selected="false"]) {
4838
4770
  --fig-handle-outline-color: var(--figma-color-border-selected);
4771
+ --fig-handle-outline: 2px solid var(--fig-handle-outline-color);
4772
+ }
4773
+
4774
+ &:focus-visible {
4775
+ --figma-focus-outline-offset: 1px;
4776
+ outline: var(--figma-focus-outline);
4777
+ outline-offset: var(--figma-focus-outline-offset);
4839
4778
  }
4840
4779
 
4841
4780
  /* Default handle (no type) hover/selected */
@@ -4843,6 +4782,7 @@ fig-handle {
4843
4782
  &[selected]:not([selected="false"]):not([type]) {
4844
4783
  --fig-handle-inner-bg: var(--figma-color-bg-brand);
4845
4784
  --fig-handle-outline-color: var(--figma-color-border-selected);
4785
+ --fig-handle-outline: 2px solid var(--fig-handle-outline-color);
4846
4786
  }
4847
4787
 
4848
4788
  &[type="canvas"]{
@@ -4878,8 +4818,7 @@ fig-handle {
4878
4818
  &[tip="add"],
4879
4819
  &[tip="remove"] {
4880
4820
  --fig-handle-inner-bg: linear-gradient(var(--fill), var(--fill)), var(--fig-handle-checkerboard);
4881
- --fig-handle-padding: 1px;
4882
- --fig-handle-shadow: none;
4821
+ --fig-handle-padding: 0.25rem;
4883
4822
  --fig-handle-inner-outline: none;
4884
4823
  position: relative;
4885
4824
  overflow: visible;
@@ -4892,25 +4831,6 @@ fig-handle {
4892
4831
  z-index: 10;
4893
4832
  }
4894
4833
  }
4895
- &[type="color"]{
4896
- --width: 0.75rem;
4897
- --height: 0.75rem;
4898
- &:hover,
4899
- &:focus-within,
4900
- &[selected]:not([selected="false"]){
4901
- --width: 1rem;
4902
- --height: 1rem;
4903
- --fig-handle-outline-color: transparent;
4904
- }
4905
- &.dragging,
4906
- &:active{
4907
- --fig-handle-padding: 2px !important;
4908
- }
4909
- &[selected]:not([selected="false"]){
4910
- --fig-handle-padding: 1px;
4911
- }
4912
- }
4913
-
4914
4834
  &[disabled]:not([disabled="false"]),
4915
4835
  &[aria-disabled="true"] {
4916
4836
  --fig-handle-outline-color: transparent;
@@ -5039,7 +4959,8 @@ fig-menu-item {
5039
4959
  }
5040
4960
  }
5041
4961
 
5042
- &[disabled]:not([disabled="false"]) {
4962
+ &[disabled]:not([disabled="false"]),
4963
+ &[aria-disabled="true"] {
5043
4964
  opacity: 0.4;
5044
4965
  pointer-events: none;
5045
4966
  }