@lolmath/ui 3.0.1 → 3.1.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/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ __export(src_exports, {
51
51
  Text: () => Text,
52
52
  TextArea: () => TextArea,
53
53
  TextField: () => TextField,
54
+ ToggleButton: () => ToggleButton,
54
55
  Tooltip: () => Tooltip,
55
56
  TooltipTrigger: () => import_react_aria_components15.TooltipTrigger,
56
57
  accordionTrigger: () => accordionTrigger,
@@ -368,7 +369,7 @@ var button = tv({
368
369
  },
369
370
  {
370
371
  shape: ["round", "square"],
371
- class: "aspect-square p-1.5"
372
+ class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
372
373
  },
373
374
  {
374
375
  isHovered: true,
@@ -1718,6 +1719,207 @@ function Label2({
1718
1719
  className: text({ preset, color, className })
1719
1720
  });
1720
1721
  }
1722
+
1723
+ // src/components/toggle-button.tsx
1724
+ var import_react_aria_components17 = require("react-aria-components");
1725
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1726
+ var toggleButtonBorder = tv({
1727
+ base: "bg-gradient-to-t outline-none transition-colors duration-200",
1728
+ variants: {
1729
+ preset: {
1730
+ gold: "",
1731
+ hextech: "",
1732
+ dimmed: dimmedGradient
1733
+ },
1734
+ shape: {
1735
+ round: "aspect-square rounded-full",
1736
+ square: "aspect-square",
1737
+ normal: ""
1738
+ },
1739
+ isHovered: {
1740
+ true: ""
1741
+ },
1742
+ isPressed: {
1743
+ true: ""
1744
+ },
1745
+ isDisabled: {
1746
+ true: ""
1747
+ },
1748
+ isFocused: {
1749
+ true: ""
1750
+ },
1751
+ isFocusVisible: {
1752
+ true: ""
1753
+ },
1754
+ isSelected: {
1755
+ true: ""
1756
+ }
1757
+ },
1758
+ compoundVariants: [
1759
+ {
1760
+ preset: ["dimmed"],
1761
+ isSelected: true,
1762
+ class: [goldGradient]
1763
+ },
1764
+ {
1765
+ preset: ["gold"],
1766
+ class: goldGradient
1767
+ },
1768
+ {
1769
+ preset: ["gold", "dimmed"],
1770
+ isHovered: true,
1771
+ class: goldGradientHover
1772
+ },
1773
+ {
1774
+ preset: ["gold", "dimmed"],
1775
+ isPressed: true,
1776
+ class: goldGradientPressed
1777
+ },
1778
+ {
1779
+ preset: ["gold", "dimmed"],
1780
+ isDisabled: true,
1781
+ class: goldGradientDisabled
1782
+ },
1783
+ {
1784
+ preset: ["gold"],
1785
+ isFocusVisible: true,
1786
+ class: "outline outline-offset-2 outline-yellow-50"
1787
+ },
1788
+ {
1789
+ preset: ["hextech"],
1790
+ class: hextechGradient
1791
+ },
1792
+ {
1793
+ preset: ["hextech"],
1794
+ isHovered: true,
1795
+ class: hextechGradientHover
1796
+ },
1797
+ {
1798
+ preset: ["hextech"],
1799
+ isPressed: true,
1800
+ class: hextechGradientPressed
1801
+ },
1802
+ {
1803
+ preset: ["hextech"],
1804
+ isDisabled: true,
1805
+ class: hextechGradientDisabled
1806
+ }
1807
+ ]
1808
+ });
1809
+ var toggleButton = tv({
1810
+ base: "text-lol-gold-300 font-beaufort block font-bold uppercase tracking-wide transition-colors duration-200",
1811
+ variants: {
1812
+ preset: {
1813
+ gold: "bg-lol-grey-300",
1814
+ hextech: "text-lol-blue-100 bg-lol-grey-300",
1815
+ dimmed: "bg-lol-grey-hextech-black"
1816
+ },
1817
+ isHovered: {
1818
+ true: "text-lol-gold-100"
1819
+ },
1820
+ isPressed: {
1821
+ true: "text-lol-grey-150"
1822
+ },
1823
+ isDisabled: {
1824
+ true: "text-lol-grey-150"
1825
+ },
1826
+ isFocused: {
1827
+ true: ""
1828
+ },
1829
+ isSelected: {
1830
+ true: [
1831
+ hextechGradient,
1832
+ "text-lol-blue-100 shadow-lol-grey-300 bg-gradient-to-t shadow shadow-inner"
1833
+ ]
1834
+ },
1835
+ isFocusVisible: {
1836
+ true: ""
1837
+ },
1838
+ shape: {
1839
+ round: "rounded-full",
1840
+ square: "",
1841
+ normal: ""
1842
+ },
1843
+ thin: {
1844
+ true: ""
1845
+ }
1846
+ },
1847
+ compoundVariants: [
1848
+ {
1849
+ preset: ["gold", "hextech", "dimmed"],
1850
+ class: "px-4 py-2"
1851
+ },
1852
+ {
1853
+ preset: ["gold", "hextech", "dimmed"],
1854
+ thin: true,
1855
+ class: "m-px"
1856
+ },
1857
+ {
1858
+ preset: ["gold", "hextech", "dimmed"],
1859
+ thin: false,
1860
+ class: "m-0.5"
1861
+ },
1862
+ {
1863
+ preset: ["hextech"],
1864
+ isHovered: true,
1865
+ class: "text-lol-blue-100"
1866
+ },
1867
+ {
1868
+ preset: ["hextech"],
1869
+ isPressed: true,
1870
+ class: "text-lol-blue-400"
1871
+ },
1872
+ {
1873
+ preset: ["hextech"],
1874
+ isSelected: true,
1875
+ class: ""
1876
+ },
1877
+ {
1878
+ shape: ["round", "square"],
1879
+ class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
1880
+ }
1881
+ ]
1882
+ });
1883
+ function ToggleButton({
1884
+ children,
1885
+ className,
1886
+ innerProps = {},
1887
+ preset = "gold",
1888
+ shape = "normal",
1889
+ thin = preset === "dimmed" ? true : false,
1890
+ ...props
1891
+ }) {
1892
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1893
+ import_react_aria_components17.ToggleButton,
1894
+ {
1895
+ ...props,
1896
+ className: (values) => toggleButtonBorder({
1897
+ ...values,
1898
+ preset,
1899
+ shape,
1900
+ className: resolveClassName(className, values)
1901
+ }),
1902
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1903
+ "span",
1904
+ {
1905
+ ...innerProps,
1906
+ className: toggleButton({
1907
+ ...values,
1908
+ preset,
1909
+ shape,
1910
+ thin,
1911
+ className: resolveClassName(innerProps.className, values)
1912
+ }),
1913
+ style: {
1914
+ // backgroundImage: hextechMagic,
1915
+ // backgroundPosition: "center",
1916
+ },
1917
+ children: typeof children === "function" ? children(values) : children
1918
+ }
1919
+ )
1920
+ }
1921
+ );
1922
+ }
1721
1923
  // Annotate the CommonJS export names for ESM import in node:
1722
1924
  0 && (module.exports = {
1723
1925
  Accordion,
@@ -1751,6 +1953,7 @@ function Label2({
1751
1953
  Text,
1752
1954
  TextArea,
1753
1955
  TextField,
1956
+ ToggleButton,
1754
1957
  Tooltip,
1755
1958
  TooltipTrigger,
1756
1959
  accordionTrigger,