@rogieking/figui3 1.0.92 → 1.0.93

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.
Files changed (3) hide show
  1. package/example.html +7 -1
  2. package/fig.css +13 -31
  3. package/package.json +1 -1
package/example.html CHANGED
@@ -19,6 +19,11 @@
19
19
  <h2>Heading 2</h2>
20
20
  <h3>Heading 3</h3>
21
21
  <br />
22
+ <fig-button disabled>Button 1</fig-button>
23
+ <br /><br />
24
+ <fig-button variant="secondary"
25
+ disabled>Button 1</fig-button>
26
+ <br /><br />
22
27
  <fig-button-combo>
23
28
  <fig-button disabled>Button 1</fig-button>
24
29
  <fig-button disabled>Button 2</fig-button>
@@ -215,7 +220,8 @@
215
220
  <fig-button-combo>
216
221
  <fig-button>Primary</fig-button>
217
222
  <fig-button icon="true"
218
- type="select">
223
+ type="select"
224
+ size="compact">
219
225
  <svg width="24"
220
226
  height="24"
221
227
  viewBox="0 0 24 24"
package/fig.css CHANGED
@@ -584,7 +584,7 @@ textarea {
584
584
  select,
585
585
  input[type="text"][list] {
586
586
  height: var(--spacer-4);
587
- padding: 0 var(--spacer-2);
587
+ padding: 0 calc(var(--spacer-2) - 1px);
588
588
  appearance: none;
589
589
  border-radius: var(--radius-medium);
590
590
  display: flex;
@@ -641,7 +641,6 @@ fig-dropdown,
641
641
  /* Button */
642
642
  .fig-button,
643
643
  fig-button {
644
- box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
645
644
  color: var(--figma-color-text-onbrand);
646
645
  display: flex;
647
646
  align-items: center;
@@ -656,25 +655,6 @@ fig-button {
656
655
  background-color: var(--figma-color-bg-brand);
657
656
  font-weight: 500;
658
657
 
659
- & > button {
660
- background: transparent;
661
- box-shadow: none;
662
- border: 0;
663
- appearance: none;
664
- outline: 0;
665
- display: flex;
666
- align-items: center;
667
- justify-content: center;
668
- border-radius: var(--radius-medium);
669
- height: var(--spacer-4);
670
- padding: 0 var(--spacer-2);
671
- color: currentColor;
672
- }
673
-
674
- &:has(> button) {
675
- padding: 0;
676
- }
677
-
678
658
  &:active {
679
659
  background-color: var(--figma-color-bg-brand-pressed);
680
660
  }
@@ -706,7 +686,8 @@ fig-button {
706
686
 
707
687
  /* Variant: Secondary */
708
688
  &[variant="secondary"] {
709
- box-shadow: inset 0 0 0 1px var(--figma-color-border);
689
+ border: 1px solid var(--figma-color-border);
690
+ padding: 0 calc(var(--spacer-2) - 1px);
710
691
  background: none;
711
692
  color: var(--figma-color-text);
712
693
 
@@ -722,13 +703,16 @@ fig-button {
722
703
  }
723
704
 
724
705
  /* Icon only */
725
- &[icon],
726
- &[icon] > button {
706
+ &[icon]{
727
707
  width: var(--spacer-4);
728
708
  padding: 0;
729
709
  flex-grow: 0;
730
710
  flex-shrink: 0;
731
711
  flex-basis: var(--spacer-4);
712
+ &[size="compact"]{
713
+ width: var(--spacer-3);
714
+ flex-basis: var(--spacer-3);
715
+ }
732
716
  }
733
717
 
734
718
  /* Disabled */
@@ -839,18 +823,16 @@ fig-input-combo {
839
823
  }
840
824
  .fig-button-combo,
841
825
  fig-button-combo {
842
- > *:not(:first-child) {
843
- border-left: 1px solid var(--figma-color-bg-brand-hover);
844
- margin-left: -1px;
826
+ > *:not([variant="secondary"]):not(:first-child) {
827
+ box-shadow: inset 1px 0 0 0 var(--figma-color-bg-brand-hover);
845
828
  &[disabled]:not([disabled="false"]) {
846
- border-left: 1px solid var(--figma-color-border-disabled);
829
+ box-shadow: inset 1px 0 0 0 var(--figma-color-border-disabled);
847
830
  }
848
831
  }
849
832
  > *[variant="secondary"]:not(:first-child) {
850
- border-left: transparent;
851
- margin-left: -1px;
833
+ border-left-width: 0 !important;
852
834
  &[disabled]:not([disabled="false"]) {
853
- border-left: transparent;
835
+ border-left-width: 0 !important;
854
836
  }
855
837
  }
856
838
  }
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.92"
3
+ "version": "1.0.93"
4
4
  }