@rogieking/figui3 3.21.0 → 3.21.2

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 CHANGED
@@ -277,6 +277,11 @@
277
277
  rgba(255, 255, 255, 0.1) 0% 50%
278
278
  )
279
279
  0 0 / 0.66666rem 0.66666rem;
280
+ --checkerboard-small: repeating-conic-gradient(
281
+ rgba(0, 0, 0, 0.2) 0% 25%,
282
+ rgba(255, 255, 255, 0.2) 0% 50%
283
+ )
284
+ 0 0 / 0.5rem 0.5rem;
280
285
  --bg-hue: linear-gradient(
281
286
  90deg,
282
287
  rgba(255, 0, 0, 1),
@@ -363,7 +368,7 @@
363
368
  inset 0px 0.75px 0px 0px light-dark(transparent, rgba(255, 255, 255, 0.1));
364
369
 
365
370
  --handle-shadow:
366
- 0px 0px 0px 0.5px rgba(0, 0, 0, 0.1),
371
+ 0px 0px 0px 1px rgba(0, 0, 0, 0.2),
367
372
  0px 0px 0.5px 0px light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.1)),
368
373
  0px 1px 3px 0px light-dark(rgba(0, 0, 0, 0.15), transparent);
369
374
  }
@@ -1237,10 +1242,12 @@ fig-chit {
1237
1242
  }
1238
1243
  &::before {
1239
1244
  content: "";
1240
- background: var(--chit-background);
1241
- background-size: var(--chit-bg-size);
1245
+ background: var(--chit-background), var(--checkerboard-small);
1246
+ background-size:
1247
+ var(--chit-bg-size),
1248
+ 0.5rem 0.5rem;
1242
1249
  background-position: var(--chit-bg-position);
1243
- background-repeat: no-repeat;
1250
+ background-repeat: no-repeat, repeat;
1244
1251
  border-radius: calc(var(--border-radius) - (var(--padding) / 2));
1245
1252
  mask-image: linear-gradient(
1246
1253
  to right,
@@ -1866,13 +1873,17 @@ fig-origin-grid {
1866
1873
 
1867
1874
  /* Switch */
1868
1875
  input[type="checkbox"].switch {
1876
+ --knob-width: 0.75rem;
1877
+ --knob-height: 0.5rem;
1878
+ --width: 2rem;
1879
+ --height: 1rem;
1869
1880
  contain: strict;
1870
1881
  display: inline-flex;
1871
1882
  margin: 0;
1872
1883
  vertical-align: middle;
1873
1884
  padding: 0;
1874
- width: 2rem;
1875
- height: 1rem;
1885
+ width: var(--width);
1886
+ height: var(--height);
1876
1887
  left: 0;
1877
1888
  top: 0;
1878
1889
  background: transparent;
@@ -1888,22 +1899,26 @@ input[type="checkbox"].switch {
1888
1899
  transition: var(--input-transition);
1889
1900
  box-sizing: border-box;
1890
1901
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
1891
- }
1892
-
1893
- input[type="checkbox"].switch:after {
1894
- content: "";
1895
- background-color: var(--handle-color);
1896
- width: calc(1rem - 2px);
1897
- height: calc(1rem - 2px);
1898
- border-radius: 0.5rem;
1899
- margin: 1px;
1900
- transform: translate(calc(-0.5rem));
1901
- transition: var(--input-transition);
1902
- box-shadow: var(--handle-shadow);
1902
+ &:after {
1903
+ content: "";
1904
+ background-color: var(--handle-color);
1905
+ width: var(--knob-width);
1906
+ height: var(--knob-height);
1907
+ border-radius: 0.5rem;
1908
+ margin: 0.25rem;
1909
+ transform: translate(
1910
+ calc(
1911
+ (var(--width) - var(--knob-width)) * -0.5 +
1912
+ (var(--height) - var(--knob-height)) * 0.5
1913
+ )
1914
+ );
1915
+ transition: var(--input-transition);
1916
+ box-shadow: var(--handle-shadow);
1917
+ }
1903
1918
  }
1904
1919
 
1905
1920
  input[type="checkbox"].switch[indeterminate="true"]:after {
1906
- width: 0.5rem;
1921
+ width: 0.625rem;
1907
1922
  height: 0.125rem;
1908
1923
  transform: none;
1909
1924
  }
@@ -1914,14 +1929,29 @@ input[type="checkbox"].switch:checked {
1914
1929
  }
1915
1930
 
1916
1931
  input[type="checkbox"].switch:checked:after {
1917
- transform: translate(0.5rem);
1932
+ transform: translate(
1933
+ calc(
1934
+ (var(--width) - var(--knob-width)) * 0.5 +
1935
+ (var(--height) - var(--knob-height)) * -0.5
1936
+ )
1937
+ );
1918
1938
  }
1919
1939
 
1920
1940
  input[type="checkbox"].switch:disabled {
1921
- background-color: var(--figma-color-bg-secondary);
1941
+ background-color: transparent;
1922
1942
  cursor: not-allowed;
1923
1943
  &:after {
1924
- background-color: var(--figma-color-bg);
1944
+ background-color: var(--figma-color-icon-disabled);
1945
+ box-shadow: none;
1946
+ }
1947
+
1948
+ &:checked,
1949
+ &[indeterminate="true"] {
1950
+ background-color: var(--figma-color-bg-disabled);
1951
+ box-shadow: none;
1952
+ &:after {
1953
+ background-color: var(--figma-color-bg);
1954
+ }
1925
1955
  }
1926
1956
  }
1927
1957
 
@@ -2790,6 +2820,7 @@ fig-tooltip {
2790
2820
  filter: drop-shadow(0px 1px 1.5px rgba(0, 0, 0, 0.1))
2791
2821
  drop-shadow(0px 2.5px 6px rgba(0, 0, 0, 0.13))
2792
2822
  drop-shadow(0px 0px 0.5px rgba(0, 0, 0, 0.15));
2823
+ pointer-events: none;
2793
2824
 
2794
2825
  & > span {
2795
2826
  text-wrap: balance;
@@ -4897,12 +4928,14 @@ fig-handle {
4897
4928
  color-scheme: light only;
4898
4929
  width: calc(var(--width) - var(--ring-width) * 2);
4899
4930
  height: calc(var(--height) - var(--ring-width) * 2);
4900
- background: var(--fill);
4931
+ background:
4932
+ linear-gradient(var(--fill), var(--fill)), var(--checkerboard-small);
4901
4933
  border-radius: var(--border-radius);
4902
4934
  box-shadow: inset 0 0 0 1px var(--figma-color-bordertranslucent);
4903
4935
  place-self: center;
4904
4936
  grid-area: 1 / 1;
4905
4937
  z-index: 2;
4938
+ display: none;
4906
4939
  }
4907
4940
 
4908
4941
  &[size="small"] {
@@ -4925,6 +4958,11 @@ fig-handle {
4925
4958
  pointer-events: none;
4926
4959
  cursor: default;
4927
4960
  }
4961
+ &[type="color"] {
4962
+ &::after {
4963
+ display: block;
4964
+ }
4965
+ }
4928
4966
 
4929
4967
  &[type="color"],
4930
4968
  &[control] {