@rogieking/figui3 4.10.2 → 4.12.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/README.md +0 -1
- package/components.css +45 -66
- package/dist/components.css +1 -1
- package/dist/fig.css +1 -1
- package/dist/fig.js +21 -21
- package/fig.js +56 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -609,7 +609,6 @@ A selection list controller. `<fig-choice>` elements are selectable options with
|
|
|
609
609
|
| `drag` | boolean | `false` | Enable drag-to-scroll |
|
|
610
610
|
| `overflow` | string | — | Overflow behavior |
|
|
611
611
|
| `loop` | boolean | `false` | Loop keyboard navigation |
|
|
612
|
-
| `padding` | boolean | `true` | Internal padding (`padding="false"` removes it) |
|
|
613
612
|
|
|
614
613
|
**fig-choice attributes:**
|
|
615
614
|
|
package/components.css
CHANGED
|
@@ -487,7 +487,7 @@ input[type="text"][list] {
|
|
|
487
487
|
|
|
488
488
|
&:not([multiple]) {
|
|
489
489
|
height: var(--spacer-4);
|
|
490
|
-
padding: 0
|
|
490
|
+
padding: 0 var(--spacer-4) 0 var(--spacer-2);
|
|
491
491
|
background: calc(100% - var(--spacer-1)) 50% / 1rem no-repeat
|
|
492
492
|
var(--icon-chevron);
|
|
493
493
|
}
|
|
@@ -669,7 +669,7 @@ input[type="text"][list] {
|
|
|
669
669
|
& > button {
|
|
670
670
|
display: inline-block;
|
|
671
671
|
align-items: center;
|
|
672
|
-
gap: var(--spacer-1);
|
|
672
|
+
gap: var(--spacer-1, 0.25rem);
|
|
673
673
|
width: 100%;
|
|
674
674
|
border: 0;
|
|
675
675
|
background: transparent;
|
|
@@ -687,8 +687,8 @@ input[type="text"][list] {
|
|
|
687
687
|
align-items: center;
|
|
688
688
|
gap: 0;
|
|
689
689
|
min-width: 0;
|
|
690
|
-
&:
|
|
691
|
-
|
|
690
|
+
&:has(> svg) {
|
|
691
|
+
margin-left: calc(var(--spacer-2) * -1);
|
|
692
692
|
}
|
|
693
693
|
|
|
694
694
|
& svg {
|
|
@@ -1406,8 +1406,10 @@ fig-image,
|
|
|
1406
1406
|
fig-video {
|
|
1407
1407
|
--fig-media-fit: contain;
|
|
1408
1408
|
--fig-media-aspect-ratio: 4/3;
|
|
1409
|
+
--fig-media-size: 100%;
|
|
1409
1410
|
display: inline-flex;
|
|
1410
|
-
max-width:
|
|
1411
|
+
max-width:var(--fig-media-size);
|
|
1412
|
+
max-height:var(--fig-media-size);
|
|
1411
1413
|
background-color: var(--figma-color-bg-secondary);
|
|
1412
1414
|
border-radius: var(--radius-medium);
|
|
1413
1415
|
overflow: hidden;
|
|
@@ -1417,6 +1419,22 @@ fig-video {
|
|
|
1417
1419
|
justify-content: center;
|
|
1418
1420
|
position: relative;
|
|
1419
1421
|
|
|
1422
|
+
&[size="small"] {
|
|
1423
|
+
--fig-media-size: 2rem;
|
|
1424
|
+
min-height: auto;
|
|
1425
|
+
width: var(--fig-media-size);
|
|
1426
|
+
}
|
|
1427
|
+
&[size="medium"] {
|
|
1428
|
+
--fig-media-size: 4rem;
|
|
1429
|
+
min-height: auto;
|
|
1430
|
+
width: var(--fig-media-size);
|
|
1431
|
+
}
|
|
1432
|
+
&[size="large"] {
|
|
1433
|
+
--fig-media-size: 6rem;
|
|
1434
|
+
min-height: auto;
|
|
1435
|
+
width: var(--fig-media-size);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1420
1438
|
& > *{
|
|
1421
1439
|
position: absolute;
|
|
1422
1440
|
z-index: 1;
|
|
@@ -4647,13 +4665,6 @@ fig-chooser {
|
|
|
4647
4665
|
}
|
|
4648
4666
|
}
|
|
4649
4667
|
|
|
4650
|
-
&[padding="false"] {
|
|
4651
|
-
gap: var(--fig-chooser-gap);
|
|
4652
|
-
fig-choice {
|
|
4653
|
-
--fig-choice-padding: 0px;
|
|
4654
|
-
}
|
|
4655
|
-
}
|
|
4656
|
-
|
|
4657
4668
|
&[overflow="scrollbar"] {
|
|
4658
4669
|
scrollbar-width: thin;
|
|
4659
4670
|
scrollbar-color: var(--figma-color-border) transparent;
|
|
@@ -4673,11 +4684,7 @@ fig-chooser {
|
|
|
4673
4684
|
> :not(.fig-chooser-nav-start):not(.fig-chooser-nav-end) {
|
|
4674
4685
|
flex: 1 1 0%;
|
|
4675
4686
|
}
|
|
4676
|
-
|
|
4677
|
-
fig-image[full],
|
|
4678
|
-
fig-video[full] {
|
|
4679
|
-
min-width: 3rem;
|
|
4680
|
-
}
|
|
4687
|
+
|
|
4681
4688
|
> * {
|
|
4682
4689
|
&:not(.fig-chooser-nav-start):not(.fig-chooser-nav-end) {
|
|
4683
4690
|
margin-inline-end: var(--fig-chooser-gap);
|
|
@@ -4719,59 +4726,39 @@ fig-chooser {
|
|
|
4719
4726
|
display: flex;
|
|
4720
4727
|
align-items: center;
|
|
4721
4728
|
justify-content: center;
|
|
4729
|
+
left: 0;
|
|
4730
|
+
right: 0;
|
|
4731
|
+
width: 100%;
|
|
4732
|
+
height: var(--chooser-fade-size);
|
|
4722
4733
|
cursor: pointer;
|
|
4723
4734
|
opacity: 0;
|
|
4724
4735
|
pointer-events: none;
|
|
4725
4736
|
color: var(--figma-color-icon);
|
|
4726
|
-
|
|
4737
|
+
background: var(--figma-color-bg) !important;
|
|
4727
4738
|
|
|
4728
|
-
|
|
4729
|
-
|
|
4739
|
+
.fig-chooser-nav-chevron{
|
|
4740
|
+
position: relative;
|
|
4730
4741
|
}
|
|
4731
4742
|
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
display: block;
|
|
4735
|
-
width: 1rem;
|
|
4736
|
-
height: 1rem;
|
|
4737
|
-
mask-image: var(--icon-chevron);
|
|
4738
|
-
mask-size: contain;
|
|
4739
|
-
mask-repeat: no-repeat;
|
|
4740
|
-
mask-position: center;
|
|
4741
|
-
background: currentColor;
|
|
4743
|
+
&:active .fig-chooser-nav-chevron {
|
|
4744
|
+
transform: translateY(1px);
|
|
4742
4745
|
}
|
|
4743
4746
|
}
|
|
4744
4747
|
|
|
4745
4748
|
.fig-chooser-nav-start {
|
|
4746
4749
|
top: 0;
|
|
4747
|
-
left: 0;
|
|
4748
|
-
right: 0;
|
|
4749
|
-
width: 100%;
|
|
4750
|
-
height: var(--chooser-fade-size);
|
|
4751
4750
|
margin-bottom: calc(var(--chooser-fade-size) * -1);
|
|
4752
|
-
|
|
4751
|
+
box-shadow: 0 1px 0 0 var(--figma-color-bordertranslucent);
|
|
4753
4752
|
|
|
4754
|
-
|
|
4755
|
-
box-shadow: 0 1px 0 0 var(--figma-color-border) !important;
|
|
4756
|
-
}
|
|
4757
|
-
|
|
4758
|
-
&::after {
|
|
4753
|
+
.fig-chooser-nav-chevron {
|
|
4759
4754
|
rotate: 180deg;
|
|
4760
4755
|
}
|
|
4761
4756
|
}
|
|
4762
4757
|
|
|
4763
4758
|
.fig-chooser-nav-end {
|
|
4764
4759
|
bottom: 0;
|
|
4765
|
-
left: 0;
|
|
4766
|
-
right: 0;
|
|
4767
|
-
width: 100%;
|
|
4768
|
-
height: var(--chooser-fade-size);
|
|
4769
4760
|
margin-top: calc(var(--chooser-fade-size) * -1);
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
&:hover {
|
|
4773
|
-
box-shadow: 0 -1px 0 0 var(--figma-color-border) !important;
|
|
4774
|
-
}
|
|
4761
|
+
box-shadow: 0 -1px 0 0 var(--figma-color-bordertranslucent);
|
|
4775
4762
|
}
|
|
4776
4763
|
|
|
4777
4764
|
&[layout="horizontal"] {
|
|
@@ -4789,13 +4776,9 @@ fig-chooser {
|
|
|
4789
4776
|
left: 0;
|
|
4790
4777
|
right: auto;
|
|
4791
4778
|
margin-right: calc(var(--chooser-fade-size) * -1);
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
&:hover {
|
|
4795
|
-
box-shadow: 1px 0 0 0 var(--figma-color-border) !important;
|
|
4796
|
-
}
|
|
4779
|
+
box-shadow: 1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
4797
4780
|
|
|
4798
|
-
|
|
4781
|
+
.fig-chooser-nav-chevron {
|
|
4799
4782
|
rotate: 90deg;
|
|
4800
4783
|
}
|
|
4801
4784
|
}
|
|
@@ -4804,13 +4787,9 @@ fig-chooser {
|
|
|
4804
4787
|
right: 0;
|
|
4805
4788
|
left: auto;
|
|
4806
4789
|
margin-left: calc(var(--chooser-fade-size) * -1);
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
&:hover {
|
|
4810
|
-
box-shadow: -1px 0 0 0 var(--figma-color-border) !important;
|
|
4811
|
-
}
|
|
4790
|
+
box-shadow: -1px 0 0 0 var(--figma-color-bordertranslucent);
|
|
4812
4791
|
|
|
4813
|
-
|
|
4792
|
+
.fig-chooser-nav-chevron {
|
|
4814
4793
|
rotate: -90deg;
|
|
4815
4794
|
}
|
|
4816
4795
|
}
|
|
@@ -4840,15 +4819,14 @@ fig-choice {
|
|
|
4840
4819
|
gap: var(--spacer-2);
|
|
4841
4820
|
outline: none;
|
|
4842
4821
|
cursor: default;
|
|
4843
|
-
|
|
4844
4822
|
padding: var(--fig-choice-padding);
|
|
4845
4823
|
|
|
4846
4824
|
&:hover:not([selected]):not([disabled]):not([aria-disabled="true"]) {
|
|
4847
4825
|
background-color: var(--figma-color-bg-secondary);
|
|
4848
4826
|
}
|
|
4849
4827
|
|
|
4850
|
-
&[padding="false"] {
|
|
4851
|
-
--fig-choice-padding:
|
|
4828
|
+
&[padding]:not([padding="false"]) {
|
|
4829
|
+
--fig-choice-padding: var(--spacer-2);
|
|
4852
4830
|
}
|
|
4853
4831
|
|
|
4854
4832
|
&[selected] {
|
|
@@ -4860,7 +4838,7 @@ fig-choice {
|
|
|
4860
4838
|
border-radius: var(--fig-choice-border-radius);
|
|
4861
4839
|
pointer-events: none;
|
|
4862
4840
|
z-index: 1;
|
|
4863
|
-
box-shadow: inset 0 0 0
|
|
4841
|
+
box-shadow: inset 0 0 0 calc(var(--fig-choice-selection-ring-width)*2) var(--figma-color-bg);
|
|
4864
4842
|
outline: var(--fig-choice-selection-ring-width) solid
|
|
4865
4843
|
var(--figma-color-border-selected);
|
|
4866
4844
|
outline-offset: calc(var(--fig-choice-selection-ring-width) * -1);
|
|
@@ -4946,7 +4924,8 @@ fig-handle {
|
|
|
4946
4924
|
pointer-events: none;
|
|
4947
4925
|
cursor: default;
|
|
4948
4926
|
}
|
|
4949
|
-
&[type="color"]
|
|
4927
|
+
&[type="color"],
|
|
4928
|
+
&[type="canvas"] {
|
|
4950
4929
|
&::after {
|
|
4951
4930
|
display: block;
|
|
4952
4931
|
}
|