@rogieking/figui3 4.7.1 → 4.8.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 +82 -130
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +32 -32
- package/fig.js +227 -183
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/* Background Colors */
|
|
6
6
|
--figma-color-bg: light-dark(#ffffff, #2c2c2c);
|
|
7
7
|
--figma-color-bg-brand: light-dark(#0d99ff, #0c8ce9);
|
|
8
|
-
--figma-color-bg-menu: #1e1e1e;
|
|
8
|
+
--figma-color-bg-menu: light-dark(#ffffff, #1e1e1e);
|
|
9
9
|
--figma-color-bg-menu-hover: #0c8ce9;
|
|
10
10
|
--figma-color-bg-brand-hover: light-dark(#007be5, #0a6dc2);
|
|
11
11
|
--figma-color-bg-brand-pressed: light-dark(#0768cf, #105cad);
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
--handle-color: #fff;
|
|
234
234
|
--bg-selected: #f5f5f5;
|
|
235
235
|
--bg-selected-active: #e5f4ff;
|
|
236
|
-
--bg-tooltip:
|
|
236
|
+
--bg-tooltip: var(--figma-color-bg-menu);
|
|
237
237
|
--color-tooltip: var(--figma-color-text);
|
|
238
238
|
|
|
239
239
|
/* Transparent Backgrounds - use light-dark() */
|
|
@@ -332,7 +332,8 @@
|
|
|
332
332
|
--icon-close: 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 d='M16.2242 7.08154C16.4182 6.95348 16.6823 6.97551 16.8531 7.146C17.024 7.31683 17.0457 7.58084 16.9176 7.7749L16.8531 7.85303L12.7067 11.9995L16.8531 16.146L16.9176 16.2241C17.0457 16.4182 17.024 16.6822 16.8531 16.853C16.6823 17.0239 16.4183 17.0456 16.2242 16.9175L16.1461 16.853L11.9996 12.7065L7.85315 16.853C7.65789 17.0483 7.34138 17.0483 7.14612 16.853C6.95128 16.6577 6.95101 16.3411 7.14612 16.146L11.2926 11.9995L7.14612 7.85303L7.08167 7.7749C6.95389 7.58087 6.97541 7.3167 7.14612 7.146C7.31683 6.97532 7.58101 6.95376 7.77502 7.08154L7.85315 7.146L11.9996 11.2925L16.1461 7.146L16.2242 7.08154Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
333
333
|
--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");
|
|
334
334
|
--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");
|
|
335
|
-
--tip-pointer: path("
|
|
335
|
+
--tip-pointer: path("M8 6L2 0H14L8 6Z");
|
|
336
|
+
|
|
336
337
|
|
|
337
338
|
/* Elevations — light-dark() handles theme switching inline */
|
|
338
339
|
--figma-elevation-100:
|
|
@@ -2645,17 +2646,28 @@ fig-slider {
|
|
|
2645
2646
|
dialog,
|
|
2646
2647
|
.popover,
|
|
2647
2648
|
[popover] {
|
|
2648
|
-
contain: layout;
|
|
2649
2649
|
padding: 0;
|
|
2650
2650
|
outline: 0;
|
|
2651
2651
|
border: 0;
|
|
2652
2652
|
inset: auto;
|
|
2653
|
+
|
|
2653
2654
|
color: var(--figma-color-text);
|
|
2654
2655
|
border-radius: var(--radius-large, 0.8125rem);
|
|
2655
2656
|
background: var(--figma-color-bg);
|
|
2656
2657
|
min-width: var(--popover-min-width);
|
|
2657
2658
|
box-shadow: var(--figma-elevation-500-modal-window);
|
|
2658
2659
|
max-height: calc(60vh - var(--spacer-4));
|
|
2660
|
+
max-width: 50vw;
|
|
2661
|
+
height: max-content;
|
|
2662
|
+
|
|
2663
|
+
& > fig-content,
|
|
2664
|
+
&> .fig-content,
|
|
2665
|
+
&> main {
|
|
2666
|
+
flex: 1 1 auto;
|
|
2667
|
+
min-height: 0;
|
|
2668
|
+
overflow: auto;
|
|
2669
|
+
overscroll-behavior: contain;
|
|
2670
|
+
}
|
|
2659
2671
|
|
|
2660
2672
|
footer,
|
|
2661
2673
|
fig-footer {
|
|
@@ -2697,50 +2709,15 @@ dialog,
|
|
|
2697
2709
|
}
|
|
2698
2710
|
}
|
|
2699
2711
|
|
|
2700
|
-
&[tooltip] {
|
|
2701
|
-
color: var(--color-tooltip);
|
|
2702
|
-
background-color: var(--bg-tooltip);
|
|
2703
|
-
padding: var(--spacer-1) var(--spacer-2);
|
|
2704
|
-
line-height: 1rem !important;
|
|
2705
|
-
box-sizing: content-box;
|
|
2706
|
-
min-width: var(--popover-min-width);
|
|
2707
|
-
max-width: var(--popover-min-width);
|
|
2708
|
-
/*top: calc(anchor(top) - 1ch - (var(--spacer-1) * 2 + 1rem));*/
|
|
2709
|
-
top: anchor(top);
|
|
2710
|
-
left: anchor(center);
|
|
2711
|
-
/*transform: translate(-50%,-100%);*/
|
|
2712
|
-
|
|
2713
|
-
white-space: nowrap;
|
|
2714
|
-
overflow: hidden;
|
|
2715
|
-
text-overflow: ellipsis;
|
|
2716
|
-
|
|
2717
|
-
border-radius: var(--radius-medium, 0.3125rem);
|
|
2718
|
-
box-shadow:
|
|
2719
|
-
0px 0px 0.5px 0px rgba(0, 0, 0, 0.15),
|
|
2720
|
-
0px 5px 12px 0px rgba(0, 0, 0, 0.13),
|
|
2721
|
-
0px 1px 3px 0px rgba(0, 0, 0, 0.1);
|
|
2722
|
-
|
|
2723
|
-
@supports (-webkit-line-clamp: 2) {
|
|
2724
|
-
white-space: initial;
|
|
2725
|
-
-webkit-line-clamp: 2;
|
|
2726
|
-
-webkit-box-orient: vertical;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
&:popover-open {
|
|
2730
|
-
display: inline-block;
|
|
2731
|
-
|
|
2732
|
-
@supports (-webkit-line-clamp: 2) {
|
|
2733
|
-
display: -webkit-box;
|
|
2734
|
-
}
|
|
2735
|
-
|
|
2736
|
-
min-width: 0;
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
2712
|
}
|
|
2740
2713
|
dialog[is="fig-dialog"] {
|
|
2741
2714
|
--z-index: 999999;
|
|
2742
2715
|
z-index: var(--z-index);
|
|
2743
2716
|
|
|
2717
|
+
&[autoresize]:not([autoresize="false"]) {
|
|
2718
|
+
height: max-content;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2744
2721
|
&[resizable]:not([resizable="false"]) {
|
|
2745
2722
|
resize: both;
|
|
2746
2723
|
overflow: auto;
|
|
@@ -2750,15 +2727,24 @@ dialog[is="fig-dialog"] {
|
|
|
2750
2727
|
}
|
|
2751
2728
|
|
|
2752
2729
|
dialog[is="fig-popup"] {
|
|
2753
|
-
contain: layout;
|
|
2754
2730
|
--z-index: 999999;
|
|
2755
|
-
--beak-offset:
|
|
2731
|
+
--fig-popup-beak-offset: 50%;
|
|
2732
|
+
--fig-popup-beak-width: 1rem;
|
|
2733
|
+
--fig-popup-beak-height: 6px;
|
|
2734
|
+
--fig-popup-radius: var(--radius-large);
|
|
2735
|
+
--fig-popup-bg-color: var(--figma-color-bg);
|
|
2736
|
+
--fig-popup-tip-clip-path: path(
|
|
2737
|
+
"M16 0H0L0 1H0.757359C1.55301 1 2.31607 1.31607 2.87868 1.87868L6.29587 5.29587C7.23704 6.23704 8.76296 6.23704 9.70413 5.29587L13.1213 1.87868C13.6839 1.31607 14.447 1 15.2426 1H16V0Z"
|
|
2738
|
+
);
|
|
2739
|
+
|
|
2756
2740
|
z-index: var(--z-index);
|
|
2757
2741
|
position: fixed;
|
|
2758
2742
|
margin: 0;
|
|
2759
2743
|
min-width: 0;
|
|
2760
2744
|
padding: 0;
|
|
2761
2745
|
overflow: auto;
|
|
2746
|
+
border-radius: var(--fig-popup-radius);
|
|
2747
|
+
background-color: var(--fig-popup-bg-color);
|
|
2762
2748
|
|
|
2763
2749
|
&[autoresize]:not([autoresize="false"]) {
|
|
2764
2750
|
width: max-content;
|
|
@@ -2772,14 +2758,20 @@ dialog[is="fig-popup"] {
|
|
|
2772
2758
|
|
|
2773
2759
|
&[theme="dark"] {
|
|
2774
2760
|
color-scheme: dark;
|
|
2761
|
+
--fig-popup-bg-color: var(--figma-color-bg);
|
|
2775
2762
|
}
|
|
2776
2763
|
|
|
2777
2764
|
&[theme="light"] {
|
|
2778
2765
|
color-scheme: light;
|
|
2779
2766
|
}
|
|
2780
2767
|
|
|
2768
|
+
&[theme="brand"] {
|
|
2769
|
+
--fig-popup-bg-color: var(--figma-color-bg-brand);
|
|
2770
|
+
color-scheme: dark;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2781
2773
|
&[theme="menu"] {
|
|
2782
|
-
|
|
2774
|
+
--fig-popup-bg-color: var(--figma-color-bg-menu);
|
|
2783
2775
|
color: var(--figma-color-text-menu);
|
|
2784
2776
|
color-scheme: dark;
|
|
2785
2777
|
padding: var(--spacer-2) 0;
|
|
@@ -2787,6 +2779,7 @@ dialog[is="fig-popup"] {
|
|
|
2787
2779
|
box-shadow: var(--figma-elevation-100);
|
|
2788
2780
|
}
|
|
2789
2781
|
|
|
2782
|
+
&[variant="tooltip"],
|
|
2790
2783
|
&[variant="popover"] {
|
|
2791
2784
|
overflow: visible;
|
|
2792
2785
|
box-shadow: inset 0 0.5px 0 0 rgba(255, 255, 255, 0.1);
|
|
@@ -2797,40 +2790,72 @@ dialog[is="fig-popup"] {
|
|
|
2797
2790
|
&:after {
|
|
2798
2791
|
content: "";
|
|
2799
2792
|
background-color: inherit;
|
|
2800
|
-
clip-path: path
|
|
2801
|
-
"M16 0H0L0 1H0.757359C1.55301 1 2.31607 1.31607 2.87868 1.87868L6.29587 5.29587C7.23704 6.23704 8.76296 6.23704 9.70413 5.29587L13.1213 1.87868C13.6839 1.31607 14.447 1 15.2426 1H16V0Z"
|
|
2802
|
-
);
|
|
2793
|
+
clip-path: var(--fig-popup-tip-clip-path);
|
|
2803
2794
|
position: absolute;
|
|
2804
|
-
width:
|
|
2805
|
-
height:
|
|
2795
|
+
width: var(--fig-popup-beak-width);
|
|
2796
|
+
height: var(--fig-popup-beak-height);
|
|
2806
2797
|
z-index: 2;
|
|
2807
2798
|
pointer-events: none;
|
|
2808
2799
|
}
|
|
2809
2800
|
|
|
2810
2801
|
&[data-beak-side="bottom"]:after {
|
|
2811
2802
|
top: calc(100% - 1px);
|
|
2812
|
-
left: var(--beak-offset, 50%);
|
|
2803
|
+
left: var(--fig-popup-beak-offset, 50%);
|
|
2813
2804
|
transform: translateX(-50%);
|
|
2814
2805
|
}
|
|
2815
2806
|
|
|
2816
2807
|
&[data-beak-side="top"]:after {
|
|
2817
2808
|
top: 1px;
|
|
2818
|
-
left: var(--beak-offset, 50%);
|
|
2809
|
+
left: var(--fig-popup-beak-offset, 50%);
|
|
2819
2810
|
transform: translate(-50%, -100%) scaleY(-1);
|
|
2820
2811
|
}
|
|
2821
2812
|
|
|
2822
2813
|
&[data-beak-side="left"]:after {
|
|
2823
|
-
left:
|
|
2824
|
-
top: var(--beak-offset, 50%);
|
|
2814
|
+
left: var(--fig-popup-beak-height);
|
|
2815
|
+
top: var(--fig-popup-beak-offset, 50%);
|
|
2825
2816
|
transform: translate(-100%, -50%) rotate(90deg);
|
|
2826
2817
|
}
|
|
2827
2818
|
|
|
2828
2819
|
&[data-beak-side="right"]:after {
|
|
2829
|
-
left: calc(100% -
|
|
2830
|
-
top: var(--beak-offset, 50%);
|
|
2820
|
+
left: calc(100% - var(--fig-popup-beak-height));
|
|
2821
|
+
top: var(--fig-popup-beak-offset, 50%);
|
|
2831
2822
|
transform: translate(0, -50%) rotate(-90deg);
|
|
2832
2823
|
}
|
|
2833
2824
|
}
|
|
2825
|
+
&[variant="tooltip"] {
|
|
2826
|
+
--fig-popup-radius: var(--radius-medium, 0.3125rem);
|
|
2827
|
+
--fig-popup-tip-clip-path: var(--tip-pointer);
|
|
2828
|
+
|
|
2829
|
+
color: var(--figma-color-text);
|
|
2830
|
+
line-height: 1rem !important;
|
|
2831
|
+
max-width: 180px;
|
|
2832
|
+
width: max-content;
|
|
2833
|
+
padding: 0;
|
|
2834
|
+
min-width: 0;
|
|
2835
|
+
box-shadow: inset 0 0.5px 0 0
|
|
2836
|
+
light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.1));
|
|
2837
|
+
filter: drop-shadow(0px 1px 1.5px rgba(0, 0, 0, 0.1))
|
|
2838
|
+
drop-shadow(0px 2.5px 6px rgba(0, 0, 0, 0.13))
|
|
2839
|
+
drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.15));
|
|
2840
|
+
pointer-events: none;
|
|
2841
|
+
|
|
2842
|
+
& > span {
|
|
2843
|
+
text-wrap: balance;
|
|
2844
|
+
max-height: 2.5rem;
|
|
2845
|
+
overflow-y: hidden;
|
|
2846
|
+
display: -webkit-box;
|
|
2847
|
+
-webkit-line-clamp: 2;
|
|
2848
|
+
-webkit-box-orient: vertical;
|
|
2849
|
+
line-clamp: 2;
|
|
2850
|
+
text-overflow: ellipsis;
|
|
2851
|
+
width: auto;
|
|
2852
|
+
padding: var(--spacer-1) var(--spacer-2);
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
&[pointer="false"]::after {
|
|
2856
|
+
display: none !important;
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2834
2859
|
}
|
|
2835
2860
|
|
|
2836
2861
|
dialog[is="fig-toast"] {
|
|
@@ -2905,79 +2930,6 @@ dialog[is="fig-toast"] {
|
|
|
2905
2930
|
fig-tooltip {
|
|
2906
2931
|
display: contents;
|
|
2907
2932
|
}
|
|
2908
|
-
.fig-tooltip {
|
|
2909
|
-
contain: layout;
|
|
2910
|
-
inset: unset;
|
|
2911
|
-
display: inline-block;
|
|
2912
|
-
overflow: visible;
|
|
2913
|
-
color-scheme: dark;
|
|
2914
|
-
color: var(--figma-color-text);
|
|
2915
|
-
background-color: var(--bg-tooltip);
|
|
2916
|
-
padding: var(--spacer-1) var(--spacer-2);
|
|
2917
|
-
line-height: 1rem !important;
|
|
2918
|
-
font-weight: inherit;
|
|
2919
|
-
border-radius: var(--radius-medium, 0.3125rem);
|
|
2920
|
-
max-width: 180px;
|
|
2921
|
-
width: max-content;
|
|
2922
|
-
box-shadow: inset 0 0.5px 0 0
|
|
2923
|
-
light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.1));
|
|
2924
|
-
filter: drop-shadow(0px 1px 1.5px rgba(0, 0, 0, 0.1))
|
|
2925
|
-
drop-shadow(0px 2.5px 6px rgba(0, 0, 0, 0.13))
|
|
2926
|
-
drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.15));
|
|
2927
|
-
pointer-events: none;
|
|
2928
|
-
|
|
2929
|
-
& > span {
|
|
2930
|
-
text-wrap: balance;
|
|
2931
|
-
max-height: 2.5rem;
|
|
2932
|
-
overflow-y: hidden;
|
|
2933
|
-
display: -webkit-box;
|
|
2934
|
-
-webkit-line-clamp: 2;
|
|
2935
|
-
-webkit-box-orient: vertical;
|
|
2936
|
-
line-clamp: 2;
|
|
2937
|
-
text-overflow: ellipsis;
|
|
2938
|
-
width: auto;
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
&:after {
|
|
2942
|
-
content: "";
|
|
2943
|
-
background-color: inherit;
|
|
2944
|
-
clip-path: var(--tip-pointer);
|
|
2945
|
-
width: 6px;
|
|
2946
|
-
height: 3px;
|
|
2947
|
-
position: absolute;
|
|
2948
|
-
top: 100%;
|
|
2949
|
-
left: var(--beak-offset, 50%);
|
|
2950
|
-
z-index: 2;
|
|
2951
|
-
transform: translate(-50%);
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
&[pointer="false"] {
|
|
2955
|
-
&:after {
|
|
2956
|
-
display: none !important;
|
|
2957
|
-
}
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
&[position="bottom"] {
|
|
2961
|
-
&:after {
|
|
2962
|
-
top: 0px;
|
|
2963
|
-
left: var(--beak-offset, 50%);
|
|
2964
|
-
transform: translate(-50%, -100%) scaleY(-1);
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
&[theme="dark"] {
|
|
2968
|
-
color-scheme: dark;
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
&[theme="light"] {
|
|
2972
|
-
color-scheme: light;
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
&[theme="brand"] {
|
|
2976
|
-
background-color: var(--figma-color-bg-brand);
|
|
2977
|
-
color-scheme: dark;
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
2933
|
/* UI Icons */
|
|
2982
2934
|
fig-icon {
|
|
2983
2935
|
display: block;
|