@rogieking/figui3 2.19.1 → 2.20.0
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 +25 -61
- package/fig.js +2 -1
- package/index.html +188 -4
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -305,73 +305,37 @@
|
|
|
305
305
|
--icon-rotate: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.2325 6.47442C11.2088 5.49811 12.7917 5.49811 13.768 6.47442L15.2931 7.99955H14.0002C13.7241 7.99955 13.5002 8.2234 13.5002 8.49955C13.5002 8.77569 13.7241 8.99955 14.0002 8.99955H16.5002C16.7764 8.99955 17.0002 8.77569 17.0002 8.49955V5.99955C17.0002 5.7234 16.7764 5.49955 16.5002 5.49955C16.2241 5.49955 16.0002 5.7234 16.0002 5.99955V7.29244L14.4751 5.76731C13.1083 4.40048 10.8922 4.40048 9.52537 5.76731L7.14669 8.14599C6.95143 8.34126 6.95143 8.65784 7.14669 8.8531C7.34195 9.04836 7.65854 9.04836 7.8538 8.8531L10.2325 6.47442ZM13.0609 9.64599C12.4751 9.06021 11.5254 9.06021 10.9396 9.64599L7.64669 12.9389C7.06091 13.5247 7.0609 14.4744 7.64669 15.0602L10.9396 18.3531C11.5254 18.9389 12.4751 18.9389 13.0609 18.3531L16.3538 15.0602C16.9396 14.4744 16.9396 13.5247 16.3538 12.9389L13.0609 9.64599ZM11.6467 10.3531C11.842 10.1578 12.1585 10.1578 12.3538 10.3531L15.6467 13.646C15.842 13.8413 15.842 14.1578 15.6467 14.3531L12.3538 17.646C12.1585 17.8413 11.842 17.8413 11.6467 17.646L8.3538 14.3531C8.15854 14.1578 8.15854 13.8413 8.3538 13.646L11.6467 10.3531Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
306
306
|
--icon-swap: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.35355 6.35355C8.54882 6.15829 8.54882 5.84171 8.35355 5.64645C8.15829 5.45118 7.84171 5.45118 7.64645 5.64645L5.14645 8.14645C4.95118 8.34171 4.95118 8.65829 5.14645 8.85355L7.64645 11.3536C7.84171 11.5488 8.15829 11.5488 8.35355 11.3536C8.54882 11.1583 8.54882 10.8417 8.35355 10.6464L6.70711 9H18.5C18.7761 9 19 8.77614 19 8.5C19 8.22386 18.7761 8 18.5 8H6.70711L8.35355 6.35355ZM15.6464 13.3536C15.4512 13.1583 15.4512 12.8417 15.6464 12.6464C15.8417 12.4512 16.1583 12.4512 16.3536 12.6464L18.8536 15.1464C19.0488 15.3417 19.0488 15.6583 18.8536 15.8536L16.3536 18.3536C16.1583 18.5488 15.8417 18.5488 15.6464 18.3536C15.4512 18.1583 15.4512 17.8417 15.6464 17.6464L17.2929 16H5.5C5.22386 16 5 15.7761 5 15.5C5 15.2239 5.22386 15 5.5 15H17.2929L15.6464 13.3536Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
307
307
|
|
|
308
|
-
/* Elevations
|
|
309
|
-
--figma-elevation-500-modal-window:
|
|
310
|
-
0 0 0.5px 0 rgba(0, 0, 0, 0.08), 0 10px 24px 0 rgba(0, 0, 0, 0.18),
|
|
311
|
-
0 2px 5px 0 rgba(0, 0, 0, 0.15);
|
|
312
|
-
|
|
308
|
+
/* Elevations — light-dark() handles theme switching inline */
|
|
313
309
|
--figma-elevation-100:
|
|
314
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.3),
|
|
310
|
+
0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
|
|
311
|
+
inset 0px 0.75px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.1)),
|
|
312
|
+
0px 1px 3px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.4));
|
|
313
|
+
|
|
315
314
|
--figma-elevation-200:
|
|
316
|
-
|
|
317
|
-
0
|
|
315
|
+
0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.18), transparent),
|
|
316
|
+
0px 3px 8px 0px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35)),
|
|
317
|
+
0px 1px 3px 0px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)),
|
|
318
|
+
inset 0px 0.5px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.08)),
|
|
319
|
+
inset 0px 0px 0.5px 0px light-dark(transparent, rgba(255, 255, 255, 0.3));
|
|
320
|
+
|
|
318
321
|
--figma-elevation-400-menu-panel:
|
|
319
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.12),
|
|
320
|
-
0px 10px 16px 0px rgba(0, 0, 0, 0.12),
|
|
322
|
+
0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.12), transparent),
|
|
323
|
+
0px 10px 16px 0px light-dark(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.35)),
|
|
324
|
+
0px 2px 5px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35)),
|
|
325
|
+
inset 0px 0.5px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.08)),
|
|
326
|
+
inset 0px 0.75px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.075));
|
|
327
|
+
|
|
321
328
|
--figma-elevation-500-modal-window:
|
|
322
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.08),
|
|
323
|
-
0px 10px 24px 0px rgba(0, 0, 0, 0.18),
|
|
324
|
-
|
|
325
|
-
|
|
329
|
+
0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.08), transparent),
|
|
330
|
+
0px 10px 24px 0px light-dark(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.45)),
|
|
331
|
+
0px 2px 5px 0px light-dark(rgba(0, 0, 0, 0.15), transparent),
|
|
332
|
+
0px 3px 5px 0px light-dark(transparent, rgba(0, 0, 0, 0.35)),
|
|
333
|
+
inset 0px 0.75px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.1));
|
|
326
334
|
|
|
327
|
-
/* Dark theme overrides for non-color values (shadows, elevations) */
|
|
328
|
-
/* light-dark() only works for colors, so these use class-based switching */
|
|
329
|
-
/* The @media block is a no-JS fallback — ignored when setTheme() sets classes */
|
|
330
|
-
@media (prefers-color-scheme: dark) {
|
|
331
|
-
:root:not(.figma-dark):not(.figma-light) {
|
|
332
|
-
--handle-shadow:
|
|
333
|
-
0px 0 0 0.75px rgba(0, 0, 0, 0.1),
|
|
334
|
-
0px 0px 0.5px 0px rgba(255, 255, 255, 0.1);
|
|
335
|
-
--figma-elevation-100:
|
|
336
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.5),
|
|
337
|
-
0px 0.75px 0px 0px rgba(255, 255, 255, 0.1) inset,
|
|
338
|
-
0px 1px 3px 0px rgba(0, 0, 0, 0.4);
|
|
339
|
-
--figma-elevation-200:
|
|
340
|
-
0px 3px 8px rgba(0, 0, 0, 0.35), 0px 1px 3px rgba(0, 0, 0, 0.5),
|
|
341
|
-
inset 0px 0.5px 0px rgba(255, 255, 255, 0.08),
|
|
342
|
-
inset 0px 0px 0.5px rgba(255, 255, 255, 0.3);
|
|
343
|
-
--figma-elevation-400-menu-panel:
|
|
344
|
-
0px 0.5px 0px 0px rgba(255, 255, 255, 0.08) inset,
|
|
345
|
-
0px 10px 16px 0px rgba(0, 0, 0, 0.35),
|
|
346
|
-
inset 0px 0.75px 0px rgba(255, 255, 255, 0.075),
|
|
347
|
-
0px 2px 5px 0px rgba(0, 0, 0, 0.35);
|
|
348
|
-
--figma-elevation-500-modal-window:
|
|
349
|
-
0px 10px 24px rgba(0, 0, 0, 0.45), 0px 3px 5px rgba(0, 0, 0, 0.35),
|
|
350
|
-
inset 0px 0.75px 0px rgba(255, 255, 255, 0.1);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/* Class-based dark theme override (primary mechanism via setTheme()) */
|
|
355
|
-
:root.figma-dark {
|
|
356
335
|
--handle-shadow:
|
|
357
|
-
0px
|
|
358
|
-
0px 0px 0.5px 0px rgba(255, 255, 255, 0.1)
|
|
359
|
-
|
|
360
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.5),
|
|
361
|
-
0px 0.75px 0px 0px rgba(255, 255, 255, 0.1) inset,
|
|
362
|
-
0px 1px 3px 0px rgba(0, 0, 0, 0.4);
|
|
363
|
-
--figma-elevation-200:
|
|
364
|
-
0px 3px 8px rgba(0, 0, 0, 0.35), 0px 1px 3px rgba(0, 0, 0, 0.5),
|
|
365
|
-
inset 0px 0.5px 0px rgba(255, 255, 255, 0.08),
|
|
366
|
-
inset 0px 0px 0.5px rgba(255, 255, 255, 0.3);
|
|
367
|
-
--figma-elevation-400-menu-panel:
|
|
368
|
-
0px 0.5px 0px 0px rgba(255, 255, 255, 0.08) inset,
|
|
369
|
-
0px 10px 16px 0px rgba(0, 0, 0, 0.35),
|
|
370
|
-
inset 0px 0.75px 0px rgba(255, 255, 255, 0.075),
|
|
371
|
-
0px 2px 5px 0px rgba(0, 0, 0, 0.35);
|
|
372
|
-
--figma-elevation-500-modal-window:
|
|
373
|
-
0px 10px 24px rgba(0, 0, 0, 0.45), 0px 3px 5px rgba(0, 0, 0, 0.35),
|
|
374
|
-
inset 0px 0.75px 0px rgba(255, 255, 255, 0.1);
|
|
336
|
+
0px 0px 0px 0.5px rgba(0, 0, 0, 0.1),
|
|
337
|
+
0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.1)),
|
|
338
|
+
0px 1px 3px 0px light-dark(rgba(0, 0, 0, 0.15), transparent);
|
|
375
339
|
}
|
|
376
340
|
|
|
377
341
|
button,
|
package/fig.js
CHANGED
|
@@ -1240,11 +1240,12 @@ class FigPopup extends HTMLDialogElement {
|
|
|
1240
1240
|
|
|
1241
1241
|
#handleOutsidePointerDown(event) {
|
|
1242
1242
|
if (!this.open || !super.open) return;
|
|
1243
|
+
const closedby = this.getAttribute("closedby");
|
|
1244
|
+
if (closedby === "none" || closedby === "closerequest") return;
|
|
1243
1245
|
const target = event.target;
|
|
1244
1246
|
if (!(target instanceof Node)) return;
|
|
1245
1247
|
if (this.contains(target)) return;
|
|
1246
1248
|
|
|
1247
|
-
// Fallback for browsers that do not honor dialog closedby consistently.
|
|
1248
1249
|
this.open = false;
|
|
1249
1250
|
}
|
|
1250
1251
|
|
package/index.html
CHANGED
|
@@ -158,6 +158,36 @@
|
|
|
158
158
|
border-radius: 4px;
|
|
159
159
|
color: var(--figma-color-text);
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
.toolbelt {
|
|
163
|
+
position: fixed;
|
|
164
|
+
bottom: 0.75rem;
|
|
165
|
+
left: 0;
|
|
166
|
+
right: 0;
|
|
167
|
+
width: fit-content;
|
|
168
|
+
margin: 0 auto;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: var(--spacer-2);
|
|
172
|
+
padding: var(--spacer-2);
|
|
173
|
+
background-color: var(--figma-color-bg);
|
|
174
|
+
border-radius: var(--radius-large);
|
|
175
|
+
box-shadow: var(--figma-elevation-200);
|
|
176
|
+
z-index: 100;
|
|
177
|
+
|
|
178
|
+
&>section {
|
|
179
|
+
display: flex;
|
|
180
|
+
padding: 0;
|
|
181
|
+
align-items: center;
|
|
182
|
+
margin: 0;
|
|
183
|
+
gap: var(--spacer-2);
|
|
184
|
+
|
|
185
|
+
&:not(:first-child):not(:only-child) {
|
|
186
|
+
border-left: 1px solid var(--figma-color-border);
|
|
187
|
+
padding-left: var(--spacer-2);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
161
191
|
</style>
|
|
162
192
|
</head>
|
|
163
193
|
|
|
@@ -296,7 +326,8 @@
|
|
|
296
326
|
<label>Input (with icon)</label>
|
|
297
327
|
<fig-button variant="input">
|
|
298
328
|
Options
|
|
299
|
-
<span class="fig-mask-icon"
|
|
329
|
+
<span class="fig-mask-icon"
|
|
330
|
+
style="--icon: var(--icon-chevron); --size: 1rem"></span>
|
|
300
331
|
</fig-button>
|
|
301
332
|
</fig-field>
|
|
302
333
|
|
|
@@ -392,7 +423,8 @@
|
|
|
392
423
|
<label>Icon (input)</label>
|
|
393
424
|
<fig-button variant="input"
|
|
394
425
|
icon="true">
|
|
395
|
-
<span class="fig-mask-icon"
|
|
426
|
+
<span class="fig-mask-icon"
|
|
427
|
+
style="--icon: var(--icon-chevron); --size: 1rem"></span>
|
|
396
428
|
</fig-button>
|
|
397
429
|
</fig-field>
|
|
398
430
|
<fig-field direction="horizontal">
|
|
@@ -863,6 +895,115 @@
|
|
|
863
895
|
<fig-button close-dialog>Close</fig-button>
|
|
864
896
|
</footer>
|
|
865
897
|
</dialog>
|
|
898
|
+
|
|
899
|
+
<h3>Non-Modal Dialog</h3>
|
|
900
|
+
<p style="font-size: 12px; color: var(--figma-color-text-secondary); margin-bottom: 12px;">
|
|
901
|
+
Use <code>.show()</code> instead of <code>.showModal()</code> to open a non-modal dialog.
|
|
902
|
+
It won't create a backdrop or trap focus, and the rest of the page remains interactive.
|
|
903
|
+
</p>
|
|
904
|
+
<pre><code><dialog id="my-dialog" is="fig-dialog" drag="true">
|
|
905
|
+
...
|
|
906
|
+
</dialog>
|
|
907
|
+
|
|
908
|
+
<script>
|
|
909
|
+
// Non-modal — no backdrop, page stays interactive
|
|
910
|
+
document.getElementById('my-dialog').show();
|
|
911
|
+
|
|
912
|
+
// Modal — backdrop + focus trap
|
|
913
|
+
document.getElementById('my-dialog').showModal();
|
|
914
|
+
</script></code></pre>
|
|
915
|
+
<fig-button onclick="document.getElementById('non-modal-dialog').show()">Open Non-Modal Dialog</fig-button>
|
|
916
|
+
|
|
917
|
+
<dialog id="non-modal-dialog"
|
|
918
|
+
is="fig-dialog"
|
|
919
|
+
drag="true"
|
|
920
|
+
position="center center">
|
|
921
|
+
<fig-header>
|
|
922
|
+
<h3>Non-Modal Dialog</h3>
|
|
923
|
+
<fig-tooltip text="Close">
|
|
924
|
+
<fig-button variant="ghost"
|
|
925
|
+
icon="true"
|
|
926
|
+
close-dialog>
|
|
927
|
+
<span class="fig-mask-icon"
|
|
928
|
+
style="--icon: var(--icon-close)"></span>
|
|
929
|
+
</fig-button>
|
|
930
|
+
</fig-tooltip>
|
|
931
|
+
</fig-header>
|
|
932
|
+
<fig-content>
|
|
933
|
+
<p>This dialog is non-modal — you can still interact with the page behind it.</p>
|
|
934
|
+
<fig-field direction="horizontal">
|
|
935
|
+
<label>Opacity</label>
|
|
936
|
+
<fig-slider value="75"
|
|
937
|
+
min="0"
|
|
938
|
+
max="100"></fig-slider>
|
|
939
|
+
</fig-field>
|
|
940
|
+
</fig-content>
|
|
941
|
+
<footer>
|
|
942
|
+
<fig-button close-dialog>Done</fig-button>
|
|
943
|
+
</footer>
|
|
944
|
+
</dialog>
|
|
945
|
+
|
|
946
|
+
<h3>closedby Attribute</h3>
|
|
947
|
+
<p style="font-size: 12px; color: var(--figma-color-text-secondary); margin-bottom: 12px;">
|
|
948
|
+
The <code>closedby</code> attribute controls how the dialog can be dismissed.
|
|
949
|
+
<code>fig-dialog</code> defaults to <code>closedby="any"</code> (light dismiss).
|
|
950
|
+
</p>
|
|
951
|
+
<pre><code><!-- Click outside, Esc key, or close button all dismiss -->
|
|
952
|
+
<dialog is="fig-dialog" closedby="any">...</dialog>
|
|
953
|
+
|
|
954
|
+
<!-- Only Esc key or close button dismiss (no click-outside) -->
|
|
955
|
+
<dialog is="fig-dialog" closedby="closerequest">...</dialog>
|
|
956
|
+
|
|
957
|
+
<!-- Only explicit close button dismisses -->
|
|
958
|
+
<dialog is="fig-dialog" closedby="none">...</dialog></code></pre>
|
|
959
|
+
<hstack>
|
|
960
|
+
<fig-button variant="secondary"
|
|
961
|
+
onclick="document.getElementById('closedby-any-dialog').show()">closedby="any"</fig-button>
|
|
962
|
+
<fig-button variant="secondary"
|
|
963
|
+
onclick="document.getElementById('closedby-none-dialog').show()">closedby="none"</fig-button>
|
|
964
|
+
</hstack>
|
|
965
|
+
|
|
966
|
+
<dialog id="closedby-any-dialog"
|
|
967
|
+
is="fig-dialog"
|
|
968
|
+
drag="true"
|
|
969
|
+
closedby="any"
|
|
970
|
+
position="center center">
|
|
971
|
+
<fig-header>
|
|
972
|
+
<h3>Light Dismiss</h3>
|
|
973
|
+
<fig-tooltip text="Close">
|
|
974
|
+
<fig-button variant="ghost"
|
|
975
|
+
icon="true"
|
|
976
|
+
close-dialog>
|
|
977
|
+
<span class="fig-mask-icon"
|
|
978
|
+
style="--icon: var(--icon-close)"></span>
|
|
979
|
+
</fig-button>
|
|
980
|
+
</fig-tooltip>
|
|
981
|
+
</fig-header>
|
|
982
|
+
<fig-content>
|
|
983
|
+
<p>Click anywhere outside this dialog to close it.</p>
|
|
984
|
+
</fig-content>
|
|
985
|
+
</dialog>
|
|
986
|
+
|
|
987
|
+
<dialog id="closedby-none-dialog"
|
|
988
|
+
is="fig-dialog"
|
|
989
|
+
drag="true"
|
|
990
|
+
closedby="none"
|
|
991
|
+
position="center center">
|
|
992
|
+
<fig-header>
|
|
993
|
+
<h3>No Light Dismiss</h3>
|
|
994
|
+
<fig-tooltip text="Close">
|
|
995
|
+
<fig-button variant="ghost"
|
|
996
|
+
icon="true"
|
|
997
|
+
close-dialog>
|
|
998
|
+
<span class="fig-mask-icon"
|
|
999
|
+
style="--icon: var(--icon-close)"></span>
|
|
1000
|
+
</fig-button>
|
|
1001
|
+
</fig-tooltip>
|
|
1002
|
+
</fig-header>
|
|
1003
|
+
<fig-content>
|
|
1004
|
+
<p>This dialog can only be closed with the close button.</p>
|
|
1005
|
+
</fig-content>
|
|
1006
|
+
</dialog>
|
|
866
1007
|
</section>
|
|
867
1008
|
<hr>
|
|
868
1009
|
|
|
@@ -4113,6 +4254,50 @@ button.addEventListener('click', () => {
|
|
|
4113
4254
|
</fig-footer>
|
|
4114
4255
|
</main>
|
|
4115
4256
|
|
|
4257
|
+
<div class="toolbelt">
|
|
4258
|
+
<section>
|
|
4259
|
+
<fig-button variant="ghost"
|
|
4260
|
+
icon="true">
|
|
4261
|
+
<span class="fig-mask-icon"
|
|
4262
|
+
style="--icon: var(--icon-back)"></span>
|
|
4263
|
+
</fig-button>
|
|
4264
|
+
<fig-button variant="ghost"
|
|
4265
|
+
icon="true">
|
|
4266
|
+
<span class="fig-mask-icon"
|
|
4267
|
+
style="--icon: var(--icon-forward)"></span>
|
|
4268
|
+
</fig-button>
|
|
4269
|
+
</section>
|
|
4270
|
+
<section>
|
|
4271
|
+
<fig-button variant="ghost"
|
|
4272
|
+
icon="true">
|
|
4273
|
+
<span class="fig-mask-icon"
|
|
4274
|
+
style="--icon: var(--icon-add)"></span>
|
|
4275
|
+
</fig-button>
|
|
4276
|
+
<fig-button variant="ghost"
|
|
4277
|
+
icon="true">
|
|
4278
|
+
<span class="fig-mask-icon"
|
|
4279
|
+
style="--icon: var(--icon-minus)"></span>
|
|
4280
|
+
</fig-button>
|
|
4281
|
+
</section>
|
|
4282
|
+
<section>
|
|
4283
|
+
<fig-button variant="ghost"
|
|
4284
|
+
icon="true">
|
|
4285
|
+
<span class="fig-mask-icon"
|
|
4286
|
+
style="--icon: var(--icon-swap)"></span>
|
|
4287
|
+
</fig-button>
|
|
4288
|
+
<fig-button variant="ghost"
|
|
4289
|
+
icon="true">
|
|
4290
|
+
<span class="fig-mask-icon"
|
|
4291
|
+
style="--icon: var(--icon-rotate)"></span>
|
|
4292
|
+
</fig-button>
|
|
4293
|
+
<fig-button variant="ghost"
|
|
4294
|
+
icon="true">
|
|
4295
|
+
<span class="fig-mask-icon"
|
|
4296
|
+
style="--icon: var(--icon-eyedropper)"></span>
|
|
4297
|
+
</fig-button>
|
|
4298
|
+
</section>
|
|
4299
|
+
</div>
|
|
4300
|
+
|
|
4116
4301
|
<script>
|
|
4117
4302
|
// Highlight nav item based on hash
|
|
4118
4303
|
function updateActiveNav() {
|
|
@@ -4180,8 +4365,7 @@ button.addEventListener('click', () => {
|
|
|
4180
4365
|
|
|
4181
4366
|
function setTheme(isDark) {
|
|
4182
4367
|
document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';
|
|
4183
|
-
|
|
4184
|
-
document.documentElement.classList.toggle('figma-light', !isDark);
|
|
4368
|
+
|
|
4185
4369
|
localStorage.setItem('theme', isDark ? 'dark' : 'light');
|
|
4186
4370
|
// Sync switch state
|
|
4187
4371
|
if (isDark) {
|
package/package.json
CHANGED