-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodegen.test.ts.snap
More file actions
3984 lines (3725 loc) · 98.1 KB
/
codegen.test.ts.snap
File metadata and controls
3984 lines (3725 loc) · 98.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
exports[`Codegen renders simple component without variants 1`] = `"<Box boxSize="100%" />"`;
exports[`Codegen renders overflow hidden when clipsContent is true 1`] = `"<Box boxSize="100%" overflow="hidden" />"`;
exports[`Codegen renders objectFit contain for image asset 1`] = `"<Image h="80px" objectFit="contain" src="/images/ObjectFitContain.png" w="100px" />"`;
exports[`Codegen renders objectFit cover for image asset 1`] = `"<Image h="90px" objectFit="cover" src="/images/ObjectFitCover.png" w="120px" />"`;
exports[`Codegen omits objectFit when image scale mode is FILL 1`] = `"<Image h="70px" src="/images/ObjectFitFill.png" w="110px" />"`;
exports[`Codegen renders svg asset with vector node 1`] = `"<Image boxSize="24px" src="/icons/VectorIcon.svg" />"`;
exports[`Codegen renders svg asset with star node 1`] = `"<Image boxSize="24px" src="/icons/StarIcon.svg" />"`;
exports[`Codegen renders svg asset with polygon node 1`] = `"<Image boxSize="24px" src="/icons/PolygonIcon.svg" />"`;
exports[`Codegen renders svg asset with ellipse inner radius 1`] = `"<Image boxSize="24px" src="/icons/EllipseIcon.svg" />"`;
exports[`Codegen renders svg asset with non-solid fills 1`] = `"<Image boxSize="24px" src="/icons/GradientAsset.svg" />"`;
exports[`Codegen renders asset with single child and fills 1`] = `
"<Box bg="#F00" boxSize="24px">
<Image boxSize="24px" src="/icons/ChildVector.svg" />
</Box>"
`;
exports[`Codegen renders null for asset with only solid fills 1`] = `"<Box bg="#F00" boxSize="24px" />"`;
exports[`Codegen renders frame with bound variable color 1`] = `"<Box bg="$primaryColor" h="50px" w="100px" />"`;
exports[`Codegen renders svg asset with same color mask 1`] = `
"<Box
bg="#F00"
boxSize="24px"
maskImage="url(/icons/MaskIcon.svg)"
maskPos="center"
maskRepeat="no-repeat"
maskSize="contain"
/>"
`;
exports[`Codegen renders svg asset with children same color 1`] = `
"<Box
bg="#F00"
boxSize="24px"
maskImage="url(/icons/GroupIcon.svg)"
maskPos="center"
maskRepeat="no-repeat"
maskSize="contain"
/>"
`;
exports[`Codegen renders svg asset with different color children 1`] = `"<Image boxSize="24px" src="/icons/MixedIcon.svg" />"`;
exports[`Codegen renders svg asset with non-solid fill 1`] = `"<Image boxSize="24px" src="/icons/GradientIcon.svg" />"`;
exports[`Codegen renders svg asset with invisible fill 1`] = `"<Image boxSize="24px" src="/icons/InvisibleIcon.svg" />"`;
exports[`Codegen renders nested svg asset with 3 solid fill boxes in frame 1`] = `
"<Box
bg="#F00"
boxSize="24px"
maskImage="url(/icons/NestedIcon.svg)"
maskPos="center"
maskRepeat="no-repeat"
maskSize="contain"
/>"
`;
exports[`Codegen renders nested svg asset with different colors as image 1`] = `"<Image boxSize="24px" src="/icons/NestedMultiColorIcon.svg" />"`;
exports[`Codegen renders layout for absolute child same size as parent 1`] = `
"<Box boxSize="100%" pos="relative">
<Box boxSize="100%" left="0px" pos="absolute" top="0px" />
</Box>"
`;
exports[`Codegen renders absolute child with horizontal MAX constraint 1`] = `
"<Flex boxSize="100%" pos="relative">
<Box h="100%" pos="absolute" right="0px" top="50px" />
</Flex>"
`;
exports[`Codegen renders absolute child with horizontal CENTER constraint 1`] = `
"<VStack boxSize="100%" pos="relative">
<Box
h="100%"
left="50%"
pos="absolute"
top="50%"
transform="translate(-50%, -50%)"
/>
</VStack>"
`;
exports[`Codegen renders absolute child with vertical MAX constraint 1`] = `
"<Flex boxSize="100%" pos="relative">
<Box bottom="0px" h="100%" left="50px" pos="absolute" />
</Flex>"
`;
exports[`Codegen renders absolute child with vertical CENTER constraint 1`] = `
"<VStack boxSize="100%" pos="relative">
<Box
h="100%"
left="300px"
pos="absolute"
top="50%"
transform="translateY(-50%)"
/>
</VStack>"
`;
exports[`Codegen renders flex=1 when parent is horizontal auto layout 1`] = `
"<Box boxSize="100%">
<Box flex="1" h="50px" w="100%" />
</Box>"
`;
exports[`Codegen renders aspect ratio when provided 1`] = `"<Box aspectRatio="1.33" boxSize="100%" />"`;
exports[`Codegen renders text with width_and_height auto resize returning no size props 1`] = `
"<Text
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
AutoSize
</Text>"
`;
exports[`Codegen renders text with special characters 1`] = `
"<Text
color="#000"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
h="20px"
letterSpacing="0px"
lineHeight="1.5px"
w="100px"
>
Text with {"{"}braces{"}"} {"&"} {"<"}tags{">"}
</Text>"
`;
exports[`Codegen renders text with leading and trailing spaces 1`] = `
"<Text
color="#000"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
h="20px"
letterSpacing="0px"
lineHeight="1.5px"
w="100px"
>
{" "}spaced{" "}
</Text>"
`;
exports[`Codegen renders single-line max line props 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
whiteSpace="nowrap"
>
OneLine
</Text>"
`;
exports[`Codegen renders multi-line max line props 1`] = `
"<Text
WebkitBoxOrient="vertical"
WebkitLineClamp="3"
boxSize="100%"
color="#F00"
display="-webkit-box"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
Three lines of text
</Text>"
`;
exports[`Codegen renders fixed size frame 1`] = `"<Box h="80px" w="120px" />"`;
exports[`Codegen renders frame with padding 1`] = `"<Box h="50px" px="16px" py="8px" w="100px" />"`;
exports[`Codegen renders padding shorthand when all sides equal 1`] = `"<Box h="40px" p="12px" w="80px" />"`;
exports[`Codegen renders padding with top equals bottom but left right different 1`] = `
"<Box
h="60px"
pl="30px"
pr="20px"
py="10px"
w="100px"
/>"
`;
exports[`Codegen renders padding with left equals right but top bottom different 1`] = `
"<Box
h="50px"
pb="25px"
pt="5px"
px="15px"
w="90px"
/>"
`;
exports[`Codegen renders padding with all sides different 1`] = `
"<Box
h="70px"
pb="3px"
pl="4px"
pr="2px"
pt="1px"
w="110px"
/>"
`;
exports[`Codegen renders padding from inferredAutoLayout 1`] = `"<Box h="50px" px="20px" py="10px" w="100px" />"`;
exports[`Codegen renders frame with border radius 1`] = `"<Box borderRadius="8px" h="80px" w="120px" />"`;
exports[`Codegen renders mixed border radius frame 1`] = `"<Box borderRadius="8px 4px 2px 1px" boxSize="100%" />"`;
exports[`Codegen renders ellipse with 50% border radius 1`] = `"<Box borderRadius="50%" boxSize="100px" />"`;
exports[`Codegen renders frame with stroke outline CENTER alignment 1`] = `"<Box h="50px" outline="solid 2px #00F" outlineOffset="-1px" w="100px" />"`;
exports[`Codegen renders frame with stroke outline OUTSIDE alignment 1`] = `"<Box h="60px" outline="solid 3px #F00" w="120px" />"`;
exports[`Codegen renders frame with stroke border INSIDE alignment 1`] = `"<Box border="solid 1px #0F0" h="40px" w="80px" />"`;
exports[`Codegen renders line with stroke outline 1`] = `"<Box boxSize="100%" maxW="calc(100% - 4px)" outline="solid 2px #F00" transform="translate(2px, -2px)" />"`;
exports[`Codegen renders frame with dashed stroke 1`] = `"<Box h="50px" outline="dashed 2px #00F" outlineOffset="-1px" w="100px" />"`;
exports[`Codegen renders frame with page parent and width 1920 1`] = `"<Box />"`;
exports[`Codegen renders frame with section parent 1`] = `"<Box />"`;
exports[`Codegen renders frame with vertical center align child width shrinker 1`] = `
"<VStack boxSize="100%">
<Box h="50px" w="100%" />
</VStack>"
`;
exports[`Codegen renders frame with horizontal center align child height shrinker 1`] = `
"<Flex boxSize="100%">
<Box h="100%" w="50px" />
</Flex>"
`;
exports[`Codegen renders frame with maxWidth child width shrinker 1`] = `
"<Box boxSize="100%">
<Box h="50px" maxW="200px" w="100%" />
</Box>"
`;
exports[`Codegen renders frame with maxHeight child height shrinker 1`] = `
"<Box boxSize="100%">
<Box h="100%" maxH="200px" w="50px" />
</Box>"
`;
exports[`Codegen renders frame with individual stroke weights 1`] = `
"<Box
borderBottom="solid 3px #F00"
borderLeft="solid 4px #F00"
borderRight="solid 2px #F00"
borderTop="solid 1px #F00"
h="80px"
w="120px"
/>"
`;
exports[`Codegen renders group as Box with full size 1`] = `"<Box boxSize="100%" />"`;
exports[`Codegen renders boxSize when width equals height 1`] = `"<Box boxSize="64px" />"`;
exports[`Codegen renders min/max width/height with px 1`] = `
"<Box
boxSize="100%"
maxH="120px"
maxW="200px"
minH="20px"
minW="50px"
/>"
`;
exports[`Codegen renders flex auto layout props 1`] = `"<Flex alignItems="center" boxSize="100%" justifyContent="space-between" />"`;
exports[`Codegen renders grid auto layout props 1`] = `
"<Grid
boxSize="100%"
columnGap="8px"
gridTemplateColumns="repeat(3, 1fr)"
gridTemplateRows="repeat(2, 1fr)"
rowGap="12px"
/>"
`;
exports[`Codegen renders grid child positioning props when out of order 1`] = `
"<Grid gridTemplateColumns="repeat(2, 1fr)" gridTemplateRows="repeat(1, 1fr)" h="100px" w="200px">
<Box boxSize="100%" />
<Box boxSize="100%" />
</Grid>"
`;
exports[`Codegen renders vstack auto layout props 1`] = `
"<VStack alignItems="center" h="200px" justifyContent="space-between" w="120px">
<Box boxSize="100%" />
<Box boxSize="100%" />
</VStack>"
`;
exports[`Codegen renders center auto layout props 1`] = `"<Center boxSize="120px" />"`;
exports[`Codegen renders drop shadow effect props 1`] = `"<Box boxShadow="2px 4px 6px 1px #FF000080" h="60px" w="100px" />"`;
exports[`Codegen renders inner shadow effect props 1`] = `"<Box boxShadow="inset -2px 3px 5px 0 #0F0" h="70px" w="90px" />"`;
exports[`Codegen renders layer blur effect props 1`] = `"<Box filter="blur(4px)" h="80px" w="120px" />"`;
exports[`Codegen renders background blur effect props 1`] = `"<Box backdropFilter="blur(8px)" h="90px" w="110px" />"`;
exports[`Codegen renders noise effect props 1`] = `"<Box filter="contrast(100%) brightness(100%)" h="70px" w="140px" />"`;
exports[`Codegen renders texture effect props 1`] = `"<Box filter="contrast(100%) brightness(100%)" h="60px" w="150px" />"`;
exports[`Codegen renders glass effect props 1`] = `"<Box backdropFilter="blur(12px)" h="80px" w="160px" />"`;
exports[`Codegen renders text node with content 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
Hello
</Text>"
`;
exports[`Codegen renders another text node with content 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
World
</Text>"
`;
exports[`Codegen renders text node with ellipsis props 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
overflow="hidden"
textOverflow="ellipsis"
>
Ellipsis
</Text>"
`;
exports[`Codegen renders text node with single drop shadow 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
textShadow="2px 4px 6px #00000080"
>
Shadow
</Text>"
`;
exports[`Codegen renders text node with multiple drop shadows 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
textShadow="1px 2px 3px #F00, 4px 5px 6px #0F0C"
>
MultiShadow
</Text>"
`;
exports[`Codegen renders text node with stroke 1`] = `
"<Text
WebkitTextStroke="2px #00F"
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
paintOrder="stroke fill"
>
Stroke
</Text>"
`;
exports[`Codegen renders text node with multiple segments 1`] = `
"<Text
boxSize="100%"
color="#00F"
fontFamily="Arial"
fontSize="20px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
<Text color="#F00" fontSize="16px">
Hello
</Text>
World
</Text>"
`;
exports[`Codegen renders text node with unordered list 1`] = `
"<Text
as="ul"
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
my="0px"
pl="1.5em"
>
<li>
Item 1
</li>
</Text>"
`;
exports[`Codegen renders text node with ordered list 1`] = `
"<Text
as="ol"
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
my="0px"
pl="1.5em"
>
<li>
Item 1
</li>
</Text>"
`;
exports[`Codegen renders text node with list and multiple lines 1`] = `
"<Text
as="ul"
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
my="0px"
pl="1.5em"
>
<li>
Item 1
</li>
<li>
Item 2
</li>
</Text>"
`;
exports[`Codegen renders text node with multiple segments without props 1`] = `
"<Text
boxSize="100%"
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
Hello
World
</Text>"
`;
exports[`Codegen renders frame with rotation transform 1`] = `"<Box h="50px" transform="rotate(-45deg)" w="100px" />"`;
exports[`Codegen renders frame with negative rotation transform 1`] = `"<Box h="40px" transform="rotate(30deg)" w="80px" />"`;
exports[`Codegen renders frame with decimal rotation transform 1`] = `"<Box h="60px" transform="rotate(-15.5deg)" w="120px" />"`;
exports[`Codegen renders frame with opacity less than 1 1`] = `"<Box h="50px" opacity="0.5" w="100px" />"`;
exports[`Codegen renders frame with darken blend mode 1`] = `"<Box h="50px" mixBlendMode="darken" w="100px" />"`;
exports[`Codegen renders frame with multiply blend mode 1`] = `"<Box h="50px" mixBlendMode="multiply" w="100px" />"`;
exports[`Codegen renders frame with screen blend mode 1`] = `"<Box h="50px" mixBlendMode="screen" w="100px" />"`;
exports[`Codegen renders frame with overlay blend mode 1`] = `"<Box h="50px" mixBlendMode="overlay" w="100px" />"`;
exports[`Codegen renders frame with linear burn blend mode 1`] = `"<Box h="50px" mixBlendMode="linearBurn" w="100px" />"`;
exports[`Codegen renders frame with color burn blend mode 1`] = `"<Box h="50px" mixBlendMode="colorBurn" w="100px" />"`;
exports[`Codegen renders frame with lighten blend mode 1`] = `"<Box h="50px" mixBlendMode="lighten" w="100px" />"`;
exports[`Codegen renders frame with linear dodge blend mode 1`] = `"<Box h="50px" mixBlendMode="linear-dodge" w="100px" />"`;
exports[`Codegen renders frame with color dodge blend mode 1`] = `"<Box h="50px" mixBlendMode="color-dodge" w="100px" />"`;
exports[`Codegen renders frame with soft light blend mode 1`] = `"<Box h="50px" mixBlendMode="soft-light" w="100px" />"`;
exports[`Codegen renders frame with hard light blend mode 1`] = `"<Box h="50px" mixBlendMode="hard-light" w="100px" />"`;
exports[`Codegen renders frame with difference blend mode 1`] = `"<Box h="50px" mixBlendMode="difference" w="100px" />"`;
exports[`Codegen renders frame with exclusion blend mode 1`] = `"<Box h="50px" mixBlendMode="exclusion" w="100px" />"`;
exports[`Codegen renders frame with hue blend mode 1`] = `"<Box h="50px" mixBlendMode="hue" w="100px" />"`;
exports[`Codegen renders frame with saturation blend mode 1`] = `"<Box h="50px" mixBlendMode="saturation" w="100px" />"`;
exports[`Codegen renders frame with color blend mode 1`] = `"<Box h="50px" mixBlendMode="color" w="100px" />"`;
exports[`Codegen renders frame with luminosity blend mode 1`] = `"<Box h="50px" mixBlendMode="luminosity" w="100px" />"`;
exports[`Codegen renders frame with pass through blend mode 1`] = `"<Box h="50px" w="100px" />"`;
exports[`Codegen renders frame with opacity and blend mode 1`] = `"<Box h="50px" mixBlendMode="multiply" opacity="0.75" w="100px" />"`;
exports[`Codegen renders frame with solid fill and blend mode 1`] = `"<Box bg="#F00" bgBlendMode="multiply" h="50px" w="100px" />"`;
exports[`Codegen renders text node with gradient fill 1`] = `
"<Text
WebkitTextFillColor="transparent"
bg="linear-gradient(90deg, #F00 0%, #00F 100%)"
bgClip="text"
boxSize="100%"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
>
Gradient
</Text>"
`;
exports[`Codegen renders text node with HEIGHT auto resize and fixed sizing 1`] = `
"<Text
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
letterSpacing="0px"
lineHeight="1.5px"
w="100px"
>
Height
</Text>"
`;
exports[`Codegen renders text node with NONE auto resize and fixed sizing 1`] = `
"<Text
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
h="50px"
letterSpacing="0px"
lineHeight="1.5px"
w="100px"
>
None
</Text>"
`;
exports[`Codegen renders text node with TRUNCATE auto resize and fixed sizing 1`] = `
"<Text
color="#F00"
fontFamily="Arial"
fontSize="16px"
fontWeight="400"
h="50px"
letterSpacing="0px"
lineHeight="1.5px"
w="100px"
>
Truncate
</Text>"
`;
exports[`Codegen renders text node with textStyleId and typography 1`] = `
"<Text boxSize="100%" color="#F00" typography="heading">
Heading
</Text>"
`;
exports[`Codegen renders frame with linear gradient fill 1`] = `"<Box bg="linear-gradient(90deg, #F00 0%, #00F 100%)" h="50px" w="100px" />"`;
exports[`Codegen renders frame with radial gradient fill 1`] = `"<Box bg="radial-gradient(50% 50% at 50% 50%, #F00 0%, #00F 100%)" boxSize="100px" />"`;
exports[`Codegen renders frame with angular gradient fill 1`] = `"<Box bg="conic-gradient(from 90deg at 50% 50%, #F00 0%, #0F0 50%, #00F 100%)" boxSize="100px" />"`;
exports[`Codegen renders frame with diamond gradient fill 1`] = `"<Box bg="linear-gradient(to bottom right, #F00 0%, #00F 50%) bottom right / 50.1% 50.1% no-repeat, linear-gradient(to bottom left, #F00 0%, #00F 50%) bottom left / 50.1% 50.1% no-repeat, linear-gradient(to top left, #F00 0%, #00F 50%) top left / 50.1% 50.1% no-repeat, linear-gradient(to top right, #F00 0%, #00F 50%) top right / 50.1% 50.1% no-repeat" boxSize="100px" />"`;
exports[`Codegen renders frame with image fill TILE scaleMode 1`] = `"<Box bg="url(/icons/image.png) repeat" h="50px" w="100px" />"`;
exports[`Codegen renders frame with pattern fill 1`] = `"<Box bg="url(/icons/PatternIcon.svg) center 10% top 20% repeat" h="50px" w="100px" />"`;
exports[`Codegen renders frame with pattern fill START alignment 1`] = `"<Box bg="url(/icons/PatternIcon.svg) repeat" h="50px" w="100px" />"`;
exports[`Codegen renders frame with pattern fill vertical alignment 1`] = `"<Box bg="url(/icons/PatternIcon.svg) center 10% bottom 20% repeat" h="50px" w="100px" />"`;
exports[`Codegen renders frame with multiple fills including non-last solid 1`] = `"<Box bg="linear-gradient(#F00, #F00), #0F0" h="50px" w="100px" />"`;
exports[`Codegen renders frame with invisible gradient fill 1`] = `"<Box h="50px" w="100px" />"`;
exports[`Codegen renders frame with zero opacity gradient fill 1`] = `"<Box h="50px" w="100px" />"`;
exports[`Codegen renders frame with solid fill opacity 0 1`] = `"<Box h="50px" w="100px" />"`;
exports[`Codegen renders component set with variants 1`] = `
"<Box boxSize="100%">
<Box />
<Box />
</Box>"
`;
exports[`Codegen renders component set with variants: component: Default 1`] = `
{
"name": "Button",
"node": {
"children": [],
"name": "Default",
"parent": {
"children": [
[Circular],
{
"children": [],
"name": "Hover",
"parent": [Circular],
"reactions": [
{
"actions": [],
"trigger": {
"type": "ON_HOVER",
},
},
],
"type": "COMPONENT",
"variantProperties": {
"state": "hover",
},
"visible": true,
},
],
"componentPropertyDefinitions": {
"state": {
"type": "VARIANT",
"variantOptions": [
"default",
"hover",
],
},
},
"defaultVariant": [Circular],
"name": "Button",
"type": "COMPONENT_SET",
"visible": true,
},
"reactions": [],
"type": "COMPONENT",
"variantProperties": {
"state": "default",
},
"visible": true,
},
"tree": {
"children": [],
"component": "Box",
"nodeName": "Default",
"nodeType": "COMPONENT",
"props": {
"aspectRatio": undefined,
"flex": undefined,
"h": undefined,
"maxH": undefined,
"maxW": undefined,
"minH": undefined,
"minW": undefined,
"w": undefined,
},
},
"variantComments": {},
"variants": {
"state": "'default' | 'hover'",
},
}
`;
exports[`Codegen renders component set with effect property 1`] = `
"<Box boxSize="100%">
<Box />
<Box />
</Box>"
`;
exports[`Codegen renders component set with effect property: component: Default 1`] = `
{
"name": "Button",
"node": {
"children": [],
"name": "Default",
"parent": {
"children": [
[Circular],
{
"children": [],
"name": "Hover",
"parent": [Circular],
"reactions": [],
"type": "COMPONENT",
"variantProperties": {
"effect": "hover",
},
"visible": true,
},
],
"componentPropertyDefinitions": {
"effect": {
"type": "VARIANT",
"variantOptions": [
"default",
"hover",
],
},
},
"defaultVariant": [Circular],
"name": "Button",
"type": "COMPONENT_SET",
"visible": true,
},
"reactions": [],
"type": "COMPONENT",
"variantProperties": {
"effect": "default",
},
"visible": true,
},
"tree": {
"children": [],
"component": "Box",
"nodeName": "Default",
"nodeType": "COMPONENT",
"props": {
"aspectRatio": undefined,
"flex": undefined,
"h": undefined,
"maxH": undefined,
"maxW": undefined,
"minH": undefined,
"minW": undefined,
"w": undefined,
},
},
"variantComments": {},
"variants": {},
}
`;
exports[`Codegen renders component set with transition 1`] = `
"<Box boxSize="100%">
<Box />
<Box />
</Box>"
`;
exports[`Codegen renders component set with transition: component: Default 1`] = `
{
"name": "Button",
"node": {
"children": [],
"name": "Default",
"parent": {
"children": [
[Circular],
{
"children": [],
"name": "Hover",
"parent": [Circular],
"reactions": [
{
"actions": [
{
"transition": {
"duration": 0.3,
"easing": {
"type": "EASE_IN_OUT",
},
"type": "SMART_ANIMATE",
},
"type": "NODE",
},
],
"trigger": {
"type": "ON_HOVER",
},
},
],
"type": "COMPONENT",
"variantProperties": {},
"visible": true,
},
],
"componentPropertyDefinitions": {},
"defaultVariant": [Circular],
"name": "Button",
"type": "COMPONENT_SET",
"visible": true,
},
"reactions": [
{
"actions": [
{
"transition": {
"duration": 0.3,
"easing": {
"type": "EASE_IN_OUT",
},
"type": "SMART_ANIMATE",
},
"type": "NODE",
},
],
"trigger": {
"type": "ON_HOVER",
},
},
],
"type": "COMPONENT",
"variantProperties": {},
"visible": true,
},
"tree": {
"children": [],
"component": "Box",
"nodeName": "Default",
"nodeType": "COMPONENT",
"props": {
"aspectRatio": undefined,
"flex": undefined,
"h": undefined,
"maxH": undefined,
"maxW": undefined,
"minH": undefined,
"minW": undefined,
"w": undefined,
},
},
"variantComments": {},
"variants": {},
}
`;
exports[`Codegen renders component set with different props and transition 1`] = `
"<Box boxSize="100%">
<Box />
<Box opacity="0.8" />
</Box>"
`;
exports[`Codegen renders component set with different props and transition: component: Default 1`] = `
{
"name": "Card",
"node": {
"children": [],
"name": "Default",
"parent": {
"children": [
[Circular],
{
"children": [],
"name": "Hover",
"opacity": 0.8,
"parent": [Circular],
"reactions": [
{
"actions": [
{
"transition": {
"duration": 0.3,
"easing": {
"type": "EASE_IN_OUT",
},
"type": "SMART_ANIMATE",
},
"type": "NODE",
},
],
"trigger": {
"type": "ON_HOVER",
},
},
],
"type": "COMPONENT",
"variantProperties": {},
"visible": true,
},
],
"componentPropertyDefinitions": {},
"defaultVariant": [Circular],
"name": "Card",
"type": "COMPONENT_SET",
"visible": true,
},
"reactions": [
{
"actions": [
{
"transition": {
"duration": 0.3,
"easing": {
"type": "EASE_IN_OUT",
},
"type": "SMART_ANIMATE",
},
"type": "NODE",
},
],
"trigger": {
"type": "ON_HOVER",
},
},
],
"type": "COMPONENT",
"variantProperties": {},
"visible": true,
},
"tree": {
"children": [],
"component": "Box",
"nodeName": "Default",
"nodeType": "COMPONENT",
"props": {
"_hover": {
"opacity": "0.8",
},
"aspectRatio": undefined,
"flex": undefined,
"h": undefined,
"maxH": undefined,
"maxW": undefined,
"minH": undefined,