@rogieking/figui3 4.0.0 → 4.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/components.css +9 -310
- package/fig.js +182 -1831
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -1364,10 +1364,9 @@ fig-input-file {
|
|
|
1364
1364
|
flex-shrink: 0;
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
|
-
&[dragover] {
|
|
1368
|
-
outline:
|
|
1369
|
-
outline-offset: -
|
|
1370
|
-
border-radius: var(--radius-small);
|
|
1367
|
+
&[dragover] fig-button {
|
|
1368
|
+
outline: 1px dashed var(--figma-color-border-brand);
|
|
1369
|
+
outline-offset: -1px;
|
|
1371
1370
|
}
|
|
1372
1371
|
}
|
|
1373
1372
|
|
|
@@ -1890,6 +1889,12 @@ fig-origin-grid {
|
|
|
1890
1889
|
}
|
|
1891
1890
|
|
|
1892
1891
|
/* Combo input */
|
|
1892
|
+
fig-combo-input {
|
|
1893
|
+
display: inline-flex;
|
|
1894
|
+
flex: 1;
|
|
1895
|
+
min-width: 0;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1893
1898
|
.input-combo {
|
|
1894
1899
|
display: inline-flex;
|
|
1895
1900
|
flex-wrap: nowrap;
|
|
@@ -3550,171 +3555,6 @@ fig-field,
|
|
|
3550
3555
|
}
|
|
3551
3556
|
}
|
|
3552
3557
|
|
|
3553
|
-
fig-field-slider {
|
|
3554
|
-
display: block;
|
|
3555
|
-
position: relative;
|
|
3556
|
-
width: 100%;
|
|
3557
|
-
--field-text-shadow: 0 1px 1.5px
|
|
3558
|
-
light-dark(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
|
3559
|
-
|
|
3560
|
-
label {
|
|
3561
|
-
pointer-events: none;
|
|
3562
|
-
z-index: 1;
|
|
3563
|
-
}
|
|
3564
|
-
|
|
3565
|
-
&[disabled]:not([disabled="false"]) {
|
|
3566
|
-
pointer-events: none;
|
|
3567
|
-
|
|
3568
|
-
label,
|
|
3569
|
-
input {
|
|
3570
|
-
color: var(--figma-color-text-disabled);
|
|
3571
|
-
}
|
|
3572
|
-
fig-slider {
|
|
3573
|
-
filter: grayscale(100%) opacity(0.5);
|
|
3574
|
-
}
|
|
3575
|
-
}
|
|
3576
|
-
&[type="hue"] {
|
|
3577
|
-
label,
|
|
3578
|
-
input {
|
|
3579
|
-
text-shadow: var(--field-text-shadow);
|
|
3580
|
-
color: white;
|
|
3581
|
-
}
|
|
3582
|
-
}
|
|
3583
|
-
|
|
3584
|
-
fig-field {
|
|
3585
|
-
position: relative;
|
|
3586
|
-
padding-left: var(--spacer-2-5);
|
|
3587
|
-
|
|
3588
|
-
&[direction="horizontal"] > label {
|
|
3589
|
-
min-width: 0;
|
|
3590
|
-
max-width: none;
|
|
3591
|
-
width: 100%;
|
|
3592
|
-
flex: 1 1 auto;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
fig-slider {
|
|
3596
|
-
position: absolute;
|
|
3597
|
-
inset: 0;
|
|
3598
|
-
--slider-height: 2rem;
|
|
3599
|
-
--slider-field-height: 2rem;
|
|
3600
|
-
--slider-thumb-width: var(--spacer-1);
|
|
3601
|
-
--slider-thumb-color: light-dark(
|
|
3602
|
-
var(--figma-color-text-secondary),
|
|
3603
|
-
var(--figma-color-text)
|
|
3604
|
-
);
|
|
3605
|
-
--slider-thumb-height: calc(
|
|
3606
|
-
var(--spacer-2) + (var(--spacer-3) - var(--spacer-2)) *
|
|
3607
|
-
min(var(--slider-complete), calc(1 - var(--slider-complete))) * 2
|
|
3608
|
-
);
|
|
3609
|
-
--slider-border-radius: var(--radius-medium);
|
|
3610
|
-
--slider-tick-width: 0.125rem;
|
|
3611
|
-
--slider-tick-height: var(--spacer-2);
|
|
3612
|
-
--slider-tick-radius: var(--radius-medium);
|
|
3613
|
-
--slider-stepper-padding: 0;
|
|
3614
|
-
--slider-handle-shadow: inset 0 0 0 var(--slider-thumb-height)
|
|
3615
|
-
var(--slider-thumb-color) !important;
|
|
3616
|
-
--slider-thumb-opacity: calc(
|
|
3617
|
-
min(var(--slider-complete), calc(1 - var(--slider-complete))) * 2
|
|
3618
|
-
);
|
|
3619
|
-
--slider-tick-opacity: 1;
|
|
3620
|
-
|
|
3621
|
-
&:has(input[type="range"]:focus-within) {
|
|
3622
|
-
--slider-thumb-outline: 1.5px solid var(--figma-color-border-selected) !important;
|
|
3623
|
-
--slider-thumb-outline-offset: 2px !important;
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
.fig-slider-input-container {
|
|
3627
|
-
box-shadow: none !important;
|
|
3628
|
-
&:hover,
|
|
3629
|
-
&:focus-within {
|
|
3630
|
-
&::after {
|
|
3631
|
-
content: "";
|
|
3632
|
-
position: absolute;
|
|
3633
|
-
inset: 0;
|
|
3634
|
-
pointer-events: none;
|
|
3635
|
-
border-radius: var(--slider-border-radius);
|
|
3636
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-border) !important;
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
&::before {
|
|
3640
|
-
background: var(--figma-color-bg-tertiary) !important;
|
|
3641
|
-
min-width: 0 !important;
|
|
3642
|
-
box-shadow: none !important;
|
|
3643
|
-
}
|
|
3644
|
-
input[type="range"] {
|
|
3645
|
-
border-radius: 0 !important;
|
|
3646
|
-
}
|
|
3647
|
-
}
|
|
3648
|
-
|
|
3649
|
-
&:not([type="delta"]) .fig-slider-input-container::before {
|
|
3650
|
-
width: var(--slider-percent) !important;
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
&[type="delta"] .fig-slider-input-container::before {
|
|
3654
|
-
--left-start: calc(
|
|
3655
|
-
var(--start-percent) - var(--slider-thumb-width) / 2
|
|
3656
|
-
) !important;
|
|
3657
|
-
left: min(
|
|
3658
|
-
var(--left-start),
|
|
3659
|
-
calc(
|
|
3660
|
-
var(--slider-percent) - var(--slider-complete) *
|
|
3661
|
-
var(--slider-thumb-width)
|
|
3662
|
-
)
|
|
3663
|
-
) !important;
|
|
3664
|
-
--width: calc(var(--slider-percent) - var(--start-percent)) !important;
|
|
3665
|
-
--abs-width: max(
|
|
3666
|
-
calc(
|
|
3667
|
-
var(--width) + var(--slider-thumb-width) / 2 +
|
|
3668
|
-
(1 - var(--slider-complete)) * var(--slider-thumb-width)
|
|
3669
|
-
),
|
|
3670
|
-
calc(
|
|
3671
|
-
-1 * var(--width) + var(--slider-thumb-width) / 2 +
|
|
3672
|
-
var(--slider-complete) * var(--slider-thumb-width)
|
|
3673
|
-
)
|
|
3674
|
-
) !important;
|
|
3675
|
-
width: var(--abs-width) !important;
|
|
3676
|
-
}
|
|
3677
|
-
}
|
|
3678
|
-
datalist {
|
|
3679
|
-
mask-image: linear-gradient(
|
|
3680
|
-
to right,
|
|
3681
|
-
transparent 0,
|
|
3682
|
-
transparent var(--spacer-4),
|
|
3683
|
-
white,
|
|
3684
|
-
transparent calc(100% - var(--spacer-4)),
|
|
3685
|
-
transparent 100%
|
|
3686
|
-
);
|
|
3687
|
-
}
|
|
3688
|
-
fig-input-number {
|
|
3689
|
-
background-color: transparent;
|
|
3690
|
-
box-shadow: none !important;
|
|
3691
|
-
position: absolute;
|
|
3692
|
-
right: var(--spacer-1);
|
|
3693
|
-
width: fit-content;
|
|
3694
|
-
min-width: fit-content;
|
|
3695
|
-
max-width: max-content;
|
|
3696
|
-
flex: 0 0 auto;
|
|
3697
|
-
border-radius: var(--radius-small);
|
|
3698
|
-
|
|
3699
|
-
&:hover,
|
|
3700
|
-
&:has(input:focus) {
|
|
3701
|
-
box-shadow: none !important;
|
|
3702
|
-
}
|
|
3703
|
-
&:has(input:focus) {
|
|
3704
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-border-selected) !important;
|
|
3705
|
-
}
|
|
3706
|
-
input {
|
|
3707
|
-
field-sizing: content;
|
|
3708
|
-
border-radius: var(--radius-small);
|
|
3709
|
-
width: auto;
|
|
3710
|
-
flex: 0 0 auto;
|
|
3711
|
-
text-align: right;
|
|
3712
|
-
color: var(--field-text-color);
|
|
3713
|
-
}
|
|
3714
|
-
}
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
|
-
|
|
3718
3558
|
fig-spinner {
|
|
3719
3559
|
width: 1rem;
|
|
3720
3560
|
height: 1rem;
|
|
@@ -4045,74 +3885,6 @@ fig-joystick {
|
|
|
4045
3885
|
}
|
|
4046
3886
|
}
|
|
4047
3887
|
|
|
4048
|
-
fig-input-angle {
|
|
4049
|
-
--size: 1.5rem;
|
|
4050
|
-
display: inline-flex;
|
|
4051
|
-
align-items: center;
|
|
4052
|
-
gap: var(--spacer-2);
|
|
4053
|
-
user-select: none;
|
|
4054
|
-
|
|
4055
|
-
> fig-input-number {
|
|
4056
|
-
flex: 0 0 auto;
|
|
4057
|
-
width: auto;
|
|
4058
|
-
}
|
|
4059
|
-
|
|
4060
|
-
&[full]:not([full="false"]) {
|
|
4061
|
-
display: flex;
|
|
4062
|
-
width: 100%;
|
|
4063
|
-
|
|
4064
|
-
> fig-input-number {
|
|
4065
|
-
flex: 1 1 auto;
|
|
4066
|
-
min-width: 0;
|
|
4067
|
-
width: auto;
|
|
4068
|
-
}
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
/* When inside horizontal fig-field, grow to fill and let inputs expand */
|
|
4072
|
-
fig-field[direction="horizontal"] & {
|
|
4073
|
-
flex: 1;
|
|
4074
|
-
min-width: 0;
|
|
4075
|
-
|
|
4076
|
-
fig-input-number {
|
|
4077
|
-
flex: 0 0 auto;
|
|
4078
|
-
width: auto;
|
|
4079
|
-
}
|
|
4080
|
-
}
|
|
4081
|
-
|
|
4082
|
-
.fig-input-angle-plane {
|
|
4083
|
-
display: inline-grid;
|
|
4084
|
-
place-items: center;
|
|
4085
|
-
width: var(--size);
|
|
4086
|
-
height: var(--size);
|
|
4087
|
-
aspect-ratio: 1/1;
|
|
4088
|
-
flex-shrink: 0;
|
|
4089
|
-
background-color: var(--figma-color-bg-secondary);
|
|
4090
|
-
border-radius: 100%;
|
|
4091
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-border);
|
|
4092
|
-
&:focus,
|
|
4093
|
-
&.dragging {
|
|
4094
|
-
outline: 0;
|
|
4095
|
-
box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
|
|
4096
|
-
}
|
|
4097
|
-
}
|
|
4098
|
-
.fig-input-angle-handle {
|
|
4099
|
-
display: inline-grid;
|
|
4100
|
-
place-items: center;
|
|
4101
|
-
grid-area: 1/1;
|
|
4102
|
-
width: calc(0.5rem + 2px);
|
|
4103
|
-
height: calc(0.5rem + 2px);
|
|
4104
|
-
&::before {
|
|
4105
|
-
content: "";
|
|
4106
|
-
display: block;
|
|
4107
|
-
width: 0.5rem;
|
|
4108
|
-
height: 0.5rem;
|
|
4109
|
-
background: var(--handle-color);
|
|
4110
|
-
box-shadow: var(--handle-shadow);
|
|
4111
|
-
border-radius: 50%;
|
|
4112
|
-
}
|
|
4113
|
-
}
|
|
4114
|
-
}
|
|
4115
|
-
|
|
4116
3888
|
/* Layer */
|
|
4117
3889
|
fig-layer {
|
|
4118
3890
|
--indent: var(--spacer-2);
|
|
@@ -5172,76 +4944,3 @@ fig-color-tip {
|
|
|
5172
4944
|
}
|
|
5173
4945
|
}
|
|
5174
4946
|
|
|
5175
|
-
/* Canvas Control */
|
|
5176
|
-
fig-canvas-control {
|
|
5177
|
-
display: contents;
|
|
5178
|
-
--fig-canvas-control-line-stroke: light-dark(
|
|
5179
|
-
rgba(255, 255, 255, 1),
|
|
5180
|
-
rgba(255, 255, 255, 0.5)
|
|
5181
|
-
);
|
|
5182
|
-
--fig-canvas-control-line-stroke-hover: var(--figma-color-bg-brand);
|
|
5183
|
-
--fig-canvas-control-line-stroke-active: var(--figma-color-bg-brand);
|
|
5184
|
-
--fig-canvas-control-line-stroke-width: 1.25px;
|
|
5185
|
-
|
|
5186
|
-
& > fig-handle,
|
|
5187
|
-
& > fig-tooltip:has(fig-handle:not([size="small"])) {
|
|
5188
|
-
z-index: 1;
|
|
5189
|
-
}
|
|
5190
|
-
|
|
5191
|
-
.fig-canvas-control-radius {
|
|
5192
|
-
position: absolute;
|
|
5193
|
-
pointer-events: none;
|
|
5194
|
-
overflow: visible;
|
|
5195
|
-
|
|
5196
|
-
circle {
|
|
5197
|
-
fill: none;
|
|
5198
|
-
stroke: var(--fig-canvas-control-line-stroke);
|
|
5199
|
-
stroke-width: var(--fig-canvas-control-line-stroke-width);
|
|
5200
|
-
paint-order: stroke fill;
|
|
5201
|
-
filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.3))
|
|
5202
|
-
drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.12));
|
|
5203
|
-
}
|
|
5204
|
-
|
|
5205
|
-
.fig-canvas-control-radius-hit {
|
|
5206
|
-
stroke: transparent;
|
|
5207
|
-
stroke-width: 12px;
|
|
5208
|
-
pointer-events: stroke;
|
|
5209
|
-
filter: none;
|
|
5210
|
-
|
|
5211
|
-
&:hover ~ circle {
|
|
5212
|
-
stroke: var(--fig-canvas-control-line-stroke-hover);
|
|
5213
|
-
}
|
|
5214
|
-
}
|
|
5215
|
-
}
|
|
5216
|
-
|
|
5217
|
-
&:has(.fig-canvas-control-radius-hit:hover) .fig-canvas-control-angle-line,
|
|
5218
|
-
&.fig-canvas-control-ring-active .fig-canvas-control-angle-line {
|
|
5219
|
-
stroke: var(--fig-canvas-control-line-stroke-active);
|
|
5220
|
-
}
|
|
5221
|
-
|
|
5222
|
-
&.fig-canvas-control-ring-active
|
|
5223
|
-
.fig-canvas-control-radius
|
|
5224
|
-
circle:not(.fig-canvas-control-radius-hit) {
|
|
5225
|
-
stroke: var(--fig-canvas-control-line-stroke-active);
|
|
5226
|
-
}
|
|
5227
|
-
|
|
5228
|
-
.fig-canvas-control-angle-svg {
|
|
5229
|
-
pointer-events: none;
|
|
5230
|
-
}
|
|
5231
|
-
|
|
5232
|
-
.fig-canvas-control-angle-line {
|
|
5233
|
-
stroke: var(--fig-canvas-control-line-stroke);
|
|
5234
|
-
stroke-width: var(--fig-canvas-control-line-stroke-width);
|
|
5235
|
-
paint-order: stroke fill;
|
|
5236
|
-
filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.3))
|
|
5237
|
-
drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.12));
|
|
5238
|
-
}
|
|
5239
|
-
|
|
5240
|
-
fig-handle[size="small"] {
|
|
5241
|
-
z-index: 2;
|
|
5242
|
-
|
|
5243
|
-
.fig-handle-hit-area {
|
|
5244
|
-
cursor: grab;
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
}
|