@rogieking/figui3 6.8.8 → 6.9.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/base.css CHANGED
@@ -12,6 +12,7 @@ html,
12
12
  font-weight: var(--body-medium-fontWeight);
13
13
  letter-spacing: var(--body-letter-spacing);
14
14
  background-color: var(--figma-color-bg);
15
+ line-height: 1rem;
15
16
  }
16
17
  body,
17
18
  :host {
@@ -36,6 +37,9 @@ strong{
36
37
  section{
37
38
  padding: var(--spacer-1) var(--spacer-3);
38
39
  margin-bottom: var(--spacer-2);
40
+ &:last-child{
41
+ margin-bottom: 0;
42
+ }
39
43
  }
40
44
  fieldset{
41
45
  padding: var(--spacer-1) var(--spacer-3);
@@ -112,14 +116,18 @@ iframe{
112
116
  }
113
117
 
114
118
  /* Defaults */
115
- p {
116
- margin: var(--spacer-2) 0;
117
- line-height: 1rem;
118
- color: var(--figma-color-text-secondary);
119
- &:last-child{
120
- margin-bottom: 0;
119
+
120
+
121
+ p {
122
+ margin-block: 1em;
121
123
  }
122
- }
124
+ p:first-child {
125
+ margin-block-start: 0;
126
+ }
127
+ p:last-child {
128
+ margin-block-end: 0;
129
+ }
130
+
123
131
 
124
132
  label {
125
133
  color: var(--figma-color-text-secondary);
package/components.css CHANGED
@@ -479,6 +479,98 @@ input[type="tel"],
479
479
  }
480
480
  }
481
481
 
482
+ progress {
483
+ --progress-height: 0.375rem;
484
+ --progress-radius: calc(var(--progress-height) / 2);
485
+
486
+ display: block;
487
+ width: 100%;
488
+ min-width: 0;
489
+ height: var(--progress-height);
490
+ margin: 0;
491
+ padding: 0;
492
+ border: 0;
493
+ appearance: none;
494
+ -webkit-appearance: none;
495
+ color: transparent;
496
+ font-size: 0;
497
+ overflow: hidden;
498
+ background: var(--figma-color-bg-secondary);
499
+ border-radius: var(--progress-radius);
500
+
501
+ &::-webkit-progress-bar {
502
+ background: var(--figma-color-bg-secondary);
503
+ border-radius: var(--progress-radius);
504
+ }
505
+
506
+ &::-webkit-progress-value {
507
+ background: var(--figma-color-bg-brand);
508
+ border-radius: var(--progress-radius);
509
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
510
+ min-width: var(--progress-height);
511
+ }
512
+
513
+ &:not([value]) {
514
+ --progress-indeterminate-width: 30%;
515
+
516
+ background-image:
517
+ radial-gradient(
518
+ circle at var(--progress-radius) 50%,
519
+ var(--figma-color-bg-brand) 0 var(--progress-radius),
520
+ transparent calc(var(--progress-radius) + 0.5px)
521
+ ),
522
+ linear-gradient(
523
+ 90deg,
524
+ transparent 0 var(--progress-radius),
525
+ var(--figma-color-bg-brand) var(--progress-radius)
526
+ calc(100% - var(--progress-radius)),
527
+ transparent calc(100% - var(--progress-radius)) 100%
528
+ ),
529
+ radial-gradient(
530
+ circle at calc(100% - var(--progress-radius)) 50%,
531
+ var(--figma-color-bg-brand) 0 var(--progress-radius),
532
+ transparent calc(var(--progress-radius) + 0.5px)
533
+ );
534
+ will-change: background-position;
535
+ background-repeat: no-repeat;
536
+ background-size: var(--progress-indeterminate-width) 100%;
537
+ animation: fig-progress-indeterminate 1s infinite linear;
538
+ }
539
+
540
+ &:not([value])::-webkit-progress-bar {
541
+ background: transparent;
542
+ }
543
+
544
+ &:not([value])::-webkit-progress-value {
545
+ background: transparent;
546
+ box-shadow: none;
547
+ min-width: 0;
548
+ }
549
+
550
+ &::-moz-progress-bar {
551
+ background: var(--figma-color-bg-brand);
552
+ border-radius: var(--progress-radius);
553
+ box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
554
+ min-width: var(--progress-height);
555
+ }
556
+
557
+ &:not([value])::-moz-progress-bar {
558
+ background: transparent;
559
+ box-shadow: none;
560
+ min-width: 0;
561
+ }
562
+ }
563
+
564
+ @keyframes fig-progress-indeterminate {
565
+ from {
566
+ background-position: calc(-1 * var(--progress-indeterminate-width)) 0;
567
+ }
568
+
569
+ to {
570
+ background-position: calc(100% + var(--progress-indeterminate-width)) 0;
571
+ }
572
+ }
573
+
482
574
  fig-input-number .fig-steppers {
483
575
  order: 3;
484
576
  display: flex;
@@ -828,7 +920,6 @@ select,
828
920
  }
829
921
 
830
922
  /* Button */
831
- .fig-button,
832
923
  button,
833
924
  fig-button {
834
925
  color: var(--figma-color-text-onbrand);
@@ -841,6 +932,7 @@ fig-button {
841
932
  border: 0;
842
933
  min-width: 0;
843
934
  outline: 0;
935
+ line-height: 1rem;
844
936
  border-radius: var(--radius-medium);
845
937
  background-color: var(--figma-color-bg-brand);
846
938
  font-weight: 500;
@@ -1101,8 +1193,7 @@ fig-button-combo {
1101
1193
  }
1102
1194
 
1103
1195
  /* Tabs */
1104
- fig-tab,
1105
- .fig-tab {
1196
+ fig-tab {
1106
1197
  display: inline-flex;
1107
1198
  flex-direction: column;
1108
1199
  align-items: center;
@@ -1114,6 +1205,7 @@ fig-tab,
1114
1205
  cursor: default;
1115
1206
  gap: 0 !important;
1116
1207
  user-select: none;
1208
+ line-height: 1rem;
1117
1209
  border-radius: var(--radius-medium);
1118
1210
  color: var(--figma-color-text-secondary);
1119
1211
  position: relative;
@@ -1393,6 +1485,7 @@ fig-chit {
1393
1485
  background-color: var(--figma-color-bg-secondary);
1394
1486
  box-shadow: inset 0 0 0 calc(var(--selected) * 1px)
1395
1487
  var(--figma-color-border-selected);
1488
+ flex-shrink: 0;
1396
1489
 
1397
1490
  &::before,
1398
1491
  &::after,
@@ -1639,9 +1732,10 @@ fig-video {
1639
1732
  > fig-preview > img,
1640
1733
  > fig-preview > .fig-media-element[data-generated] {
1641
1734
  display: block;
1642
- width: stretch;
1643
- height: stretch;
1644
- position: static;
1735
+ position: absolute;
1736
+ inset: 0;
1737
+ width: 100%;
1738
+ height: 100%;
1645
1739
  object-fit: var(--fig-preview-fit);
1646
1740
  object-position: center;
1647
1741
  z-index: 0;
@@ -2981,7 +3075,7 @@ dialog,
2981
3075
  min-width: min(var(--popover-min-width), var(--dialog-max-width));
2982
3076
  box-shadow: var(--figma-elevation-500-modal-window);
2983
3077
  max-height: calc(60vh - var(--spacer-4));
2984
- max-width: var(--dialog-max-width);
3078
+ max-width: min(var(--dialog-max-width), 30rem);
2985
3079
  height: max-content;
2986
3080
  & > fig-content,
2987
3081
  &> main {
@@ -3000,25 +3094,11 @@ dialog,
3000
3094
  display: flex;
3001
3095
  flex-direction: column;
3002
3096
  }
3003
-
3004
- & header {
3005
- height: var(--spacer-6);
3006
- margin: 0;
3007
- padding: var(--spacer-2);
3008
- display: flex;
3009
- align-items: center;
3010
- font-weight: var(--body-medium-strong-fontWeight);
3011
- box-shadow: inset 0 -1px 0 0 var(--figma-color-border);
3012
-
3013
- & h3 {
3014
- font: inherit;
3015
- }
3016
-
3017
- & > :first-child {
3018
- padding-left: var(--spacer-2);
3097
+ >fig-header{
3098
+ fig-button[icon][variant="ghost"]:not(fig-input-text fig-button) {
3099
+ margin: 0;
3019
3100
  }
3020
3101
  }
3021
-
3022
3102
  }
3023
3103
  dialog[is="fig-dialog"] {
3024
3104
  --z-index: 999999;
@@ -3070,7 +3150,6 @@ dialog[is="fig-popup"] {
3070
3150
  display: block;
3071
3151
  }
3072
3152
 
3073
-
3074
3153
 
3075
3154
  &[theme="dark"] {
3076
3155
  color-scheme: dark;
@@ -3232,8 +3311,10 @@ fig-preview {
3232
3311
 
3233
3312
  > :is(img, video, canvas, svg) {
3234
3313
  display: block;
3235
- width: stretch;
3236
- height: stretch;
3314
+ position: absolute;
3315
+ inset: 0;
3316
+ width: 100%;
3317
+ height: 100%;
3237
3318
  object-fit: var(--fig-preview-fit);
3238
3319
  object-position: center;
3239
3320
  }
@@ -3460,6 +3541,7 @@ fig-footer {
3460
3541
  }
3461
3542
  }
3462
3543
 
3544
+ main,
3463
3545
  fig-content {
3464
3546
  padding: var(--spacer-2-5) 0;
3465
3547
  display: block;
@@ -3685,16 +3767,32 @@ fig-input-fill {
3685
3767
  }
3686
3768
  fig-chit ~ fig-input-text > input,
3687
3769
  fig-chit ~ label,
3688
- fig-fill-picker ~ fig-input-text > input,
3689
- fig-fill-picker ~ label {
3770
+ fig-fill-picker ~ fig-input-text > input {
3690
3771
  padding-left: 0 !important;
3691
3772
  }
3692
3773
 
3774
+ & > .input-combo > fig-input-text > input {
3775
+ min-width: 0;
3776
+ overflow: hidden;
3777
+ text-overflow: ellipsis;
3778
+ white-space: nowrap;
3779
+ }
3780
+
3693
3781
  & > .input-combo {
3694
3782
  flex: 1;
3695
3783
  min-width: 0;
3696
3784
  }
3697
3785
 
3786
+ & > .input-combo > fig-tooltip {
3787
+ display: contents;
3788
+ }
3789
+
3790
+ & > .input-combo > fig-tooltip > .fig-input-fill-opacity {
3791
+ flex: 0 0 3rem;
3792
+ width: 3rem;
3793
+ min-width: 3rem;
3794
+ }
3795
+
3698
3796
  fig-input-number {
3699
3797
  flex: 0;
3700
3798
  flex-basis: 3rem;
@@ -3714,6 +3812,43 @@ fig-input-fill {
3714
3812
  min-width: 0;
3715
3813
  }
3716
3814
  }
3815
+
3816
+ fig-input-fill {
3817
+ & > .input-combo > fig-fill-picker {
3818
+ display: contents;
3819
+ }
3820
+
3821
+ & > .input-combo > :is(.fig-input-fill-hex, .fig-input-fill-label) {
3822
+ flex: 1 1 0;
3823
+ min-width: 0;
3824
+ }
3825
+
3826
+ & > .input-combo > .fig-input-fill-label {
3827
+ height: auto;
3828
+ margin-left: 0;
3829
+ overflow: hidden;
3830
+ padding: var(--spacer-1) var(--spacer-2);
3831
+ padding-left: 0 !important;
3832
+ font: inherit;
3833
+ line-height: 1rem !important;
3834
+ text-overflow: ellipsis;
3835
+ white-space: nowrap;
3836
+ }
3837
+ }
3838
+
3839
+ fig-input-color {
3840
+ & > .input-combo > fig-tooltip > fig-input-number {
3841
+ flex: 0 0 3rem;
3842
+ width: 3rem;
3843
+ min-width: 3rem;
3844
+ }
3845
+
3846
+ & > .input-combo > fig-input-text {
3847
+ flex: 1 1 0;
3848
+ min-width: 0;
3849
+ }
3850
+ }
3851
+
3717
3852
  fig-input-gradient {
3718
3853
  --fig-input-gradient-height: 1.5rem;
3719
3854
  --fig-input-gradient-padding: var(--spacer-1);
@@ -3722,7 +3857,7 @@ fig-input-gradient {
3722
3857
  position: relative;
3723
3858
  height: var(--fig-input-gradient-height);
3724
3859
  width: 100%;
3725
- min-width: 0;
3860
+ min-width: var(--spacer-4);
3726
3861
 
3727
3862
  fig-handle[type="color"]{
3728
3863
  --height: var(--fig-input-gradient-handle-size);
@@ -4002,6 +4137,10 @@ fig-field {
4002
4137
  grid-area: input;
4003
4138
  }
4004
4139
 
4140
+ & > progress {
4141
+ align-self: center;
4142
+ }
4143
+
4005
4144
  & > .fig-field-chevron {
4006
4145
  --icon: var(--icon-16-chevron);
4007
4146
  --size: 1rem;
@@ -4120,9 +4259,11 @@ fig-segmented-control {
4120
4259
  --figma-focus-outline-offset: 0;
4121
4260
  flex: 1 1 0;
4122
4261
  min-width: 0;
4123
- display: block;
4262
+ display: flex;
4263
+ align-items: center;
4264
+ justify-content: center;
4124
4265
  text-align: center;
4125
- line-height: calc(1.5rem - 2px);
4266
+ line-height: 1;
4126
4267
  position: relative;
4127
4268
  z-index: 1;
4128
4269
  appearance: none;
@@ -4814,8 +4955,10 @@ fig-choice {
4814
4955
  --fig-choice-text-padding-inline: var(--spacer-2);
4815
4956
  --fig-choice-border-radius: var(--radius-medium);
4816
4957
  --fig-choice-min-height: 1.5rem;
4958
+ --fig-choice-min-width: 1.5rem;
4817
4959
 
4818
4960
  min-height: var(--fig-choice-min-height);
4961
+ min-width: var(--fig-choice-min-width);
4819
4962
  display: flex;
4820
4963
  align-items: center;
4821
4964
  justify-content: center;
package/dist/base.css CHANGED
@@ -1 +1 @@
1
- html,:host{width:100%;height:100%;color:var(--figma-color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-family);font-size:16px;font-weight:var(--body-medium-fontWeight);letter-spacing:var(--body-letter-spacing);background-color:var(--figma-color-bg);margin:0;padding:0}body,:host{font-size:var(--body-medium-fontSize);letter-spacing:var(--body-letter-spacing);line-height:1.4545em}h1,h2{font-weight:var(--body-large-strong-fontWeight);font-size:var(--body-large-fontSize)}h3{font-weight:var(--body-medium-strong-fontWeight);font-size:var(--body-medium-fontSize)}strong{font-weight:var(--body-medium-strong-fontWeight)}section{padding:var(--spacer-1) var(--spacer-3);margin-bottom:var(--spacer-2)}fieldset{padding:var(--spacer-1) var(--spacer-3)}hr{background-color:var(--figma-color-border);width:100%;height:1px;margin:var(--spacer-2) 0;border:none;&[vertical]{width:1px;height:100%;margin:0 var(--spacer-2)}}iframe{background-color:#0000;border:0;flex:auto;width:100%;max-width:100%;height:max-content;min-height:0;max-height:100%;margin:0;display:block}*,:before,:after{box-sizing:border-box}::selection{background-color:var(--figma-color-text-selection)}::selection{background-color:var(--figma-color-text-selection)}::-webkit-scrollbar{width:var(--spacer-1);height:var(--spacer-1)}::-webkit-scrollbar-thumb{background-color:var(--figma-color-bg-tertiary);border-radius:calc(var(--spacer-1) / 2)}::-webkit-scrollbar-thumb:hover{background-color:var(--figma-color-bg-secondary)}*{scrollbar-width:thin;scrollbar-color:var(--figma-color-bg-tertiary) var(--figma-color-bg-secondary)}.subtle{color:var(--figma-color-text-tertiary)}p{margin:var(--spacer-2) 0;color:var(--figma-color-text-secondary);line-height:1rem;&:last-child{margin-bottom:0}}label{color:var(--figma-color-text-secondary)}h2{font-weight:var(--body-medium-strong-fontWeight);margin:var(--spacer-2) 0}a{color:var(--figma-color-text-brand);text-decoration:none;&:hover{text-decoration:underline}}
1
+ html,:host{width:100%;height:100%;color:var(--figma-color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-family);font-size:16px;font-weight:var(--body-medium-fontWeight);letter-spacing:var(--body-letter-spacing);background-color:var(--figma-color-bg);margin:0;padding:0;line-height:1rem}body,:host{font-size:var(--body-medium-fontSize);letter-spacing:var(--body-letter-spacing);line-height:1.4545em}h1,h2{font-weight:var(--body-large-strong-fontWeight);font-size:var(--body-large-fontSize)}h3{font-weight:var(--body-medium-strong-fontWeight);font-size:var(--body-medium-fontSize)}strong{font-weight:var(--body-medium-strong-fontWeight)}section{padding:var(--spacer-1) var(--spacer-3);margin-bottom:var(--spacer-2);&:last-child{margin-bottom:0}}fieldset{padding:var(--spacer-1) var(--spacer-3)}hr{background-color:var(--figma-color-border);width:100%;height:1px;margin:var(--spacer-2) 0;border:none;&[vertical]{width:1px;height:100%;margin:0 var(--spacer-2)}}iframe{background-color:#0000;border:0;flex:auto;width:100%;max-width:100%;height:max-content;min-height:0;max-height:100%;margin:0;display:block}*,:before,:after{box-sizing:border-box}::selection{background-color:var(--figma-color-text-selection)}::selection{background-color:var(--figma-color-text-selection)}::-webkit-scrollbar{width:var(--spacer-1);height:var(--spacer-1)}::-webkit-scrollbar-thumb{background-color:var(--figma-color-bg-tertiary);border-radius:calc(var(--spacer-1) / 2)}::-webkit-scrollbar-thumb:hover{background-color:var(--figma-color-bg-secondary)}*{scrollbar-width:thin;scrollbar-color:var(--figma-color-bg-tertiary) var(--figma-color-bg-secondary)}.subtle{color:var(--figma-color-text-tertiary)}p{margin-block:1em}p:first-child{margin-block-start:0}p:last-child{margin-block-end:0}label{color:var(--figma-color-text-secondary)}h2{font-weight:var(--body-medium-strong-fontWeight);margin:var(--spacer-2) 0}a{color:var(--figma-color-text-brand);text-decoration:none;&:hover{text-decoration:underline}}