@rogieking/figui3 1.0.91 → 1.0.92

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 +16 -1
  2. package/fig.css +61 -48
  3. package/package.json +1 -1
package/example.html CHANGED
@@ -19,13 +19,28 @@
19
19
  <h2>Heading 2</h2>
20
20
  <h3>Heading 3</h3>
21
21
  <br />
22
+ <fig-button-combo>
23
+ <fig-button disabled>Button 1</fig-button>
24
+ <fig-button disabled>Button 2</fig-button>
25
+ <fig-button disabled>Button 3</fig-button>
26
+ </fig-button-combo>
27
+ <br /><br />
28
+ <fig-button-combo>
29
+ <fig-button variant="secondary"
30
+ disabled>Button 1</fig-button>
31
+ <fig-button variant="secondary"
32
+ disabled>Button 2</fig-button>
33
+ <fig-button variant="secondary"
34
+ disabled>Button 3</fig-button>
35
+ </fig-button-combo>
36
+ <br /><br />
22
37
  <fig-dropdown>
23
38
  <option>One</option>
24
39
  <option>Two</option>
25
40
  <option>Three</option>
26
41
  <option selected>Four</option>
27
42
  </fig-dropdown>
28
- <br />
43
+ <br /><br />
29
44
  <fig-slider min="0"
30
45
  max="1"
31
46
  transform="100"
package/fig.css CHANGED
@@ -696,7 +696,7 @@ fig-button {
696
696
  }
697
697
  }
698
698
 
699
- &[variant="ghost"][disabled="true"] {
699
+ &[variant="ghost"][disabled]:not([disabled="false"]) {
700
700
  background-color: transparent;
701
701
  }
702
702
 
@@ -732,11 +732,18 @@ fig-button {
732
732
  }
733
733
 
734
734
  /* Disabled */
735
- &[disabled="true"],
736
- &[disabled="true"] > button {
735
+ &[disabled]:not([disabled="false"]){
737
736
  background-color: var(--figma-color-bg-disabled);
738
- color: var(--figma-color-text-disabled);
737
+
739
738
  pointer-events: none;
739
+ &:not([variant="secondary"]){
740
+ color: var(--figma-color-text-ondisabled);
741
+ box-shadow: none;
742
+ }
743
+ &[variant="secondary"]{
744
+ color: var(--figma-color-text-disabled);
745
+ background-color: transparent;
746
+ }
740
747
  }
741
748
 
742
749
  /* Size */
@@ -795,18 +802,62 @@ fig-button {
795
802
 
796
803
  &:focus,
797
804
  &:focus-within {
798
- outline: 0;
799
- box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
805
+ &:not(:active) {
806
+ outline: 0;
807
+ box-shadow: inset 0 0 0 1px var(--figma-color-border-selected);
808
+ }
800
809
  }
801
810
  }
802
811
 
803
- fig-button > button {
804
- width: 100%;
812
+ /* Combo button */
813
+ .fig-button-combo,
814
+ fig-button-combo,
815
+ .fig-input-combo,
816
+ fig-input-combo {
817
+ display: inline-flex;
818
+ flex-wrap: nowrap;
819
+ align-items: center;
820
+ gap: 0px;
821
+ & > * {
822
+ &:first-child,
823
+ &:first-child > * {
824
+ border-top-right-radius: 0;
825
+ border-bottom-right-radius: 0;
826
+ }
827
+
828
+ &:last-child,
829
+ &:last-child > * {
830
+ border-top-left-radius: 0;
831
+ border-bottom-left-radius: 0;
832
+ }
833
+
834
+ &:not(:last-child):not(:first-child),
835
+ &:not(:last-child):not(:first-child) > * {
836
+ border-radius: 0;
837
+ }
838
+ }
839
+ }
840
+ .fig-button-combo,
841
+ fig-button-combo {
842
+ > *:not(:first-child) {
843
+ border-left: 1px solid var(--figma-color-bg-brand-hover);
844
+ margin-left: -1px;
845
+ &[disabled]:not([disabled="false"]) {
846
+ border-left: 1px solid var(--figma-color-border-disabled);
847
+ }
848
+ }
849
+ > *[variant="secondary"]:not(:first-child) {
850
+ border-left: transparent;
851
+ margin-left: -1px;
852
+ &[disabled]:not([disabled="false"]) {
853
+ border-left: transparent;
854
+ }
855
+ }
805
856
  }
806
857
 
807
858
  /* Tabs */
808
859
  fig-tab,
809
- .tab {
860
+ .fig-tab {
810
861
  display: inline-flex;
811
862
  flex-direction: column;
812
863
  align-items: center;
@@ -838,7 +889,7 @@ fig-tab,
838
889
  }
839
890
 
840
891
  &:has(:checked),
841
- &[selected] {
892
+ &[selected]:not([selected="false"]) {
842
893
  background-color: var(--figma-color-bg-secondary);
843
894
  font-weight: var(--body-medium-strong-fontWeight);
844
895
  color: var(--figma-color-text);
@@ -1116,45 +1167,7 @@ fig-image {
1116
1167
  }
1117
1168
  }
1118
1169
 
1119
- /* Combo button */
1120
- .fig-button-combo,
1121
- fig-button-combo,
1122
- .fig-input-combo,
1123
- fig-input-combo {
1124
- display: inline-flex;
1125
- flex-wrap: nowrap;
1126
- align-items: center;
1127
- gap: 0px;
1128
- & > * {
1129
- &:first-child,
1130
- &:first-child > * {
1131
- border-top-right-radius: 0;
1132
- border-bottom-right-radius: 0;
1133
- }
1134
-
1135
- &:last-child,
1136
- &:last-child > * {
1137
- border-top-left-radius: 0;
1138
- border-bottom-left-radius: 0;
1139
- }
1140
1170
 
1141
- &:not(:last-child):not(:first-child),
1142
- &:not(:last-child):not(:first-child) > * {
1143
- border-radius: 0;
1144
- }
1145
- }
1146
- }
1147
- .fig-button-combo,
1148
- fig-button-combo {
1149
- > *:not(:first-child) {
1150
- border-left: 1px solid var(--figma-color-bg-brand-hover);
1151
- margin-left: -1px;
1152
- }
1153
- > *[variant="secondary"]:not(:first-child) {
1154
- border-left: transparent;
1155
- margin-left: -1px;
1156
- }
1157
- }
1158
1171
 
1159
1172
  /* Combo input */
1160
1173
  .input-combo {
package/package.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.91"
3
+ "version": "1.0.92"
4
4
  }