@rogieking/figui3 4.15.10 → 5.1.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 ADDED
@@ -0,0 +1,333 @@
1
+ /* Fill Picker */
2
+ fig-fill-picker {
3
+ display: contents;
4
+
5
+ > [slot^="mode-"] {
6
+ display: none;
7
+ }
8
+ }
9
+
10
+ .fig-fill-picker-dialog {
11
+ contain: layout;
12
+ width: 240px;
13
+ padding: 0;
14
+
15
+ & > fig-header {
16
+ padding: var(--spacer-2);
17
+ display: flex;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ }
21
+
22
+ fig-tab {
23
+ font-size: 0.6875rem;
24
+ padding: var(--spacer-1) var(--spacer-1);
25
+ }
26
+ & > fig-content {
27
+ padding-bottom: var(--spacer-2-5);
28
+ }
29
+ .fig-fill-picker-type-label {
30
+ font-size: var(--font-size-small);
31
+ font-weight: var(--font-weight-medium);
32
+ color: var(--figma-color-text);
33
+ padding: var(--spacer-1) var(--spacer-2);
34
+ }
35
+
36
+ .fig-fill-picker-gamut {
37
+ margin-left: auto;
38
+ }
39
+
40
+ .fig-fill-picker-tab {
41
+ display: none;
42
+
43
+ &:first-child {
44
+ display: block;
45
+ }
46
+ }
47
+ fig-preview{
48
+ overflow: visible;
49
+ }
50
+
51
+ .fig-fill-picker-color-area {
52
+ aspect-ratio: 1;
53
+ width: calc(100% - var(--spacer-3) * 2);
54
+ margin: var(--spacer-2) var(--spacer-3);
55
+
56
+ > *:not(fig-handle) {
57
+ place-self: center;
58
+ width: 100%;
59
+ height: 100%;
60
+ border-radius: inherit;
61
+ }
62
+
63
+ canvas {
64
+ width: 100%;
65
+ height: 100%;
66
+ border-radius: var(--radius-medium);
67
+ }
68
+ }
69
+
70
+ .fig-fill-picker-color-area fig-handle {
71
+ z-index: 1;
72
+ }
73
+
74
+ .fig-fill-picker-sliders {
75
+ display: grid;
76
+ grid-template-columns: calc(3.5rem + var(--spacer-3)) 1fr;
77
+ grid-template-rows: 1fr 1fr;
78
+ align-items: center;
79
+ padding-right: var(--spacer-3);
80
+ gap: var(--spacer-2);
81
+ padding-bottom: var(--spacer-1);
82
+
83
+ .fig-fill-picker-eyedropper {
84
+ grid-column: 1;
85
+ grid-row: 1 / 3;
86
+ place-self: center;
87
+ margin-right: calc(var(--spacer-3) * -1);
88
+ width: 3.5rem;
89
+ aspect-ratio: 1 / 1;
90
+ height: 3.5rem;
91
+ }
92
+
93
+ fig-slider {
94
+ grid-column: 2;
95
+ min-width: 0;
96
+ }
97
+ }
98
+
99
+ .fig-fill-picker-inputs {
100
+ .fig-fill-picker-input-fields {
101
+ flex: 1;
102
+ min-width: 0;
103
+ display: flex;
104
+
105
+ .input-combo {
106
+ flex: 1;
107
+ min-width: 0;
108
+ }
109
+
110
+ fig-input-text {
111
+ flex: 1;
112
+ min-width: 0;
113
+ }
114
+ }
115
+ }
116
+
117
+ /* Gradient Tab */
118
+ .fig-fill-picker-gradient-preview {
119
+ aspect-ratio: auto;
120
+ width: calc(100% - var(--spacer-3) * 2);
121
+ margin: var(--spacer-2) var(--spacer-3);
122
+ margin-top: calc(var(--spacer-4) + var(--spacer-1));
123
+ background: transparent;
124
+ &::after{
125
+ display: none;
126
+ }
127
+ }
128
+
129
+ .fig-fill-picker-gradient-header {
130
+ padding-right: var(--spacer-2);
131
+ display: flex;
132
+ padding-left: var(--spacer-3);
133
+ gap: var(--spacer-2);
134
+ .fig-fill-picker-gradient-type {
135
+ flex: 1;
136
+ min-width: 0;
137
+ }
138
+
139
+ & > *:last-child fig-button {
140
+ margin-left: auto;
141
+ }
142
+
143
+ .fig-fill-picker-gradient-center {
144
+ fig-input-number {
145
+ width: 48px;
146
+ }
147
+ }
148
+ }
149
+
150
+ .fig-fill-picker-gradient-stops {
151
+ .fig-fill-picker-gradient-stops-header {
152
+ > span {
153
+ flex: 1;
154
+ }
155
+ }
156
+ }
157
+
158
+ .fig-fill-picker-gradient-stops-list {
159
+ display: flex;
160
+ flex-direction: column;
161
+ gap: var(--spacer-1);
162
+ }
163
+
164
+ .fig-fill-picker-gradient-stop-row {
165
+ padding-right: var(--spacer-2);
166
+ display: flex;
167
+ padding-left: var(--spacer-3);
168
+ gap: var(--spacer-2);
169
+ & > .fig-fill-picker-stop-position {
170
+ flex: 0;
171
+ flex-basis: 3rem;
172
+ min-width: 0;
173
+ width: 3rem;
174
+ }
175
+
176
+ .fig-fill-picker-stop-color {
177
+ flex: 1;
178
+ min-width: 0;
179
+ fig-input-text {
180
+ min-width: 0;
181
+ }
182
+ }
183
+
184
+ .fig-fill-picker-stop-remove {
185
+ flex-shrink: 0;
186
+ }
187
+ }
188
+
189
+ /* Media Tabs (Image/Video/Webcam) */
190
+ .fig-fill-picker-media-header {
191
+ .fig-fill-picker-scale-mode {
192
+ flex: 0 0 auto;
193
+ }
194
+
195
+ .fig-fill-picker-scale {
196
+ width: 56px;
197
+ }
198
+ }
199
+
200
+ .fig-fill-picker-media-preview {
201
+ position: relative;
202
+ aspect-ratio: 1;
203
+ margin: var(--spacer-2) var(--spacer-3) var(--spacer-1) var(--spacer-3);
204
+ border-radius: var(--radius-medium);
205
+ overflow: hidden;
206
+ display: flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+
210
+ &.dragover {
211
+ outline: 2px dashed var(--figma-color-border-brand);
212
+ outline-offset: -2px;
213
+ }
214
+
215
+ &.has-media {
216
+ fig-button {
217
+ visibility: hidden;
218
+ }
219
+ &:hover {
220
+ fig-button {
221
+ visibility: visible;
222
+ }
223
+ }
224
+ }
225
+ }
226
+
227
+ .fig-fill-picker-checkerboard {
228
+ position: absolute;
229
+ inset: 0;
230
+ background-image:
231
+ linear-gradient(
232
+ 45deg,
233
+ var(--figma-color-bg-tertiary) 25%,
234
+ transparent 25%
235
+ ),
236
+ linear-gradient(
237
+ -45deg,
238
+ var(--figma-color-bg-tertiary) 25%,
239
+ transparent 25%
240
+ ),
241
+ linear-gradient(
242
+ 45deg,
243
+ transparent 75%,
244
+ var(--figma-color-bg-tertiary) 75%
245
+ ),
246
+ linear-gradient(
247
+ -45deg,
248
+ transparent 75%,
249
+ var(--figma-color-bg-tertiary) 75%
250
+ );
251
+ background-size: 16px 16px;
252
+ background-position:
253
+ 0 0,
254
+ 0 8px,
255
+ 8px -8px,
256
+ -8px 0px;
257
+ }
258
+
259
+ div.fig-fill-picker-image-preview {
260
+ position: absolute;
261
+ inset: 0;
262
+ width: 100%;
263
+ height: 100%;
264
+ display: none;
265
+ }
266
+
267
+ fig-image.fig-fill-picker-image-preview {
268
+ max-width: none;
269
+ max-height: none;
270
+ width: auto;
271
+ }
272
+
273
+ video.fig-fill-picker-video-preview {
274
+ position: absolute;
275
+ inset: 0;
276
+ width: 100%;
277
+ height: 100%;
278
+ object-fit: cover;
279
+ display: none;
280
+ }
281
+
282
+ fig-media.fig-fill-picker-video-preview {
283
+ max-width: none;
284
+ max-height: none;
285
+ width: auto;
286
+ }
287
+
288
+ .fig-fill-picker-upload {
289
+ position: relative;
290
+ z-index: 1;
291
+ }
292
+
293
+ /* Webcam Tab */
294
+ .fig-fill-picker-webcam-preview {
295
+ position: relative;
296
+ aspect-ratio: 1;
297
+ display: flex;
298
+ width: calc(100% - var(--spacer-3) * 2);
299
+ max-width: none;
300
+ max-height: none;
301
+ margin: 0 var(--spacer-3);
302
+ border-radius: var(--radius-medium);
303
+ overflow: hidden;
304
+ margin: var(--spacer-2) var(--spacer-3);
305
+ }
306
+
307
+ .fig-fill-picker-webcam-video {
308
+ width: 100%;
309
+ height: 100%;
310
+ object-fit: cover;
311
+ }
312
+
313
+ .fig-fill-picker-webcam-status {
314
+ position: absolute;
315
+ inset: 0;
316
+ display: flex;
317
+ align-items: center;
318
+ justify-content: center;
319
+ background: var(--figma-color-bg-secondary);
320
+ color: var(--figma-color-text-secondary);
321
+ font-size: 0.75rem;
322
+ }
323
+
324
+ .fig-fill-picker-webcam-controls {
325
+ display: flex;
326
+ padding: 0 var(--spacer-3);
327
+ gap: var(--spacer-1);
328
+
329
+ .fig-fill-picker-webcam-capture {
330
+ width: 100%;
331
+ }
332
+ }
333
+ }