@rogieking/figui3 11.1.6 → 11.2.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/fig-editor.css CHANGED
@@ -139,6 +139,28 @@ dialog[is="fig-toast"] {
139
139
  }
140
140
  }
141
141
 
142
+ /* Palette Editor */
143
+ .fig-palette-editor-popup {
144
+ width: 15rem;
145
+ padding: 0;
146
+ pointer-events: auto;
147
+ }
148
+
149
+ fig-palette-editor {
150
+ display: flex;
151
+ flex-direction: column;
152
+ width: 100%;
153
+ min-width: 0;
154
+
155
+ > fig-reorder {
156
+ display: contents;
157
+ }
158
+
159
+ .fig-palette-editor-add {
160
+ width: 100%;
161
+ }
162
+ }
163
+
142
164
  /* Fill Picker */
143
165
  fig-fill-picker {
144
166
  display: contents;
@@ -312,19 +334,7 @@ fig-fill-picker {
312
334
  }
313
335
  }
314
336
 
315
- fig-field.fig-fill-picker-gradient-header {
316
- display: flex;
317
- align-items: center;
318
- grid-template-columns: unset;
319
- grid-template-areas: unset;
320
- padding-right: var(--spacer-2);
321
- padding-left: var(--spacer-2);
322
- gap: var(--spacer-2);
323
-
324
- > *:not(.fig-field-chevron):not(label) {
325
- grid-area: unset;
326
- }
327
-
337
+ fig-header.fig-fill-picker-gradient-header {
328
338
  .fig-fill-picker-gradient-type {
329
339
  display: flex;
330
340
  flex: 0 1 auto;
@@ -333,11 +343,7 @@ fig-fill-picker {
333
343
  }
334
344
 
335
345
  .fig-fill-picker-gradient-actions {
336
- display: flex;
337
- align-items: center;
338
- flex-shrink: 0;
339
- gap: var(--spacer-1);
340
- margin-left: auto;
346
+ flex: 0 0 auto;
341
347
  }
342
348
  }
343
349
 
@@ -441,7 +447,6 @@ fig-fill-picker {
441
447
  .fig-fill-picker-gradient-stops-list {
442
448
  display: flex;
443
449
  flex-direction: column;
444
- gap: var(--spacer-1);
445
450
 
446
451
  fig-reorder {
447
452
  display: contents;
@@ -889,3 +894,78 @@ fig-select-option {
889
894
  visibility: visible;
890
895
  }
891
896
  }
897
+
898
+ /* Drag to Reorder */
899
+ fig-reorder {
900
+ display: contents;
901
+
902
+ &:not([handle]):is(:not([disabled]), [disabled="false"])
903
+ > [data-reorder-item] {
904
+ cursor: grab;
905
+
906
+ > fig-header,
907
+ > fig-header *,
908
+ > label {
909
+ cursor: grab;
910
+ }
911
+ }
912
+
913
+ > .dragging {
914
+ background-color: var(--figma-color-bg-secondary);
915
+ }
916
+
917
+ &[disabled]:not([disabled="false"]) [data-reorder-handle] {
918
+ cursor: inherit;
919
+ }
920
+ }
921
+
922
+ [data-reorder-handle] {
923
+ cursor: grab;
924
+ }
925
+
926
+ body.fig-reorder-dragging {
927
+ &,
928
+ & * {
929
+ user-select: none !important;
930
+ -webkit-user-select: none !important;
931
+ cursor: grabbing !important;
932
+ }
933
+ }
934
+
935
+ .fig-reorder-indicator {
936
+ position: fixed;
937
+ pointer-events: none;
938
+ z-index: 1000000;
939
+ border-radius: 1px;
940
+ &::before{
941
+ content: "";
942
+ position: absolute;
943
+ top: 0;
944
+ left: var(--spacer-1);
945
+ width: 100%;
946
+ height: 100%;
947
+ background: var(--figma-color-border-selected);
948
+ }
949
+
950
+ &.fig-reorder-indicator-ring {
951
+ &::after{
952
+ content: "";
953
+ position: absolute;
954
+ top: 1px;
955
+ left: 0;
956
+ transform: translate(-50%, -50%);
957
+ width: var(--spacer-2);
958
+ height: var(--spacer-2);
959
+ border: 2px solid var(--figma-color-border-selected);
960
+ border-radius: 50%;
961
+ }
962
+ }
963
+
964
+ &[data-axis="vertical"] {
965
+ height: 2px;
966
+ }
967
+
968
+ &[data-axis="horizontal"] {
969
+ width: 2px;
970
+ }
971
+ }