@lolmath/ui 3.0.1 → 3.1.1

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,
@@ -212,7 +213,7 @@ var tv = (0, import_tailwind_variants.createTV)({
212
213
  // src/components/button.tsx
213
214
  var import_jsx_runtime = require("react/jsx-runtime");
214
215
  var buttonBorder = tv({
215
- base: "bg-gradient-to-t outline-none transition-colors duration-200",
216
+ base: "bg-gradient-to-t p-0.5 outline-none transition-colors duration-200",
216
217
  variants: {
217
218
  preset: {
218
219
  primary: "",
@@ -240,6 +241,9 @@ var buttonBorder = tv({
240
241
  },
241
242
  isFocusVisible: {
242
243
  true: ""
244
+ },
245
+ thin: {
246
+ true: "p-px"
243
247
  }
244
248
  },
245
249
  compoundVariants: [
@@ -289,7 +293,7 @@ var buttonBorder = tv({
289
293
  ]
290
294
  });
291
295
  var button = tv({
292
- base: "text-lol-gold-300 font-beaufort block font-bold uppercase tracking-wide transition-colors duration-200",
296
+ base: "text-lol-gold-300 font-beaufort block h-full w-full font-bold uppercase tracking-wide transition-colors duration-200",
293
297
  variants: {
294
298
  preset: {
295
299
  primary: "from-lol-gold-600 via-lol-gold-600 to-lol-gold-700 bg-gradient-to-b",
@@ -317,9 +321,6 @@ var button = tv({
317
321
  round: "rounded-full",
318
322
  square: "",
319
323
  normal: ""
320
- },
321
- thin: {
322
- true: ""
323
324
  }
324
325
  },
325
326
  compoundVariants: [
@@ -331,16 +332,6 @@ var button = tv({
331
332
  preset: ["primary", "secondary", "hextech"],
332
333
  class: "bg-lol-grey-300"
333
334
  },
334
- {
335
- preset: ["primary", "secondary", "hextech", "dimmed"],
336
- thin: true,
337
- class: "m-px"
338
- },
339
- {
340
- preset: ["primary", "secondary", "hextech", "dimmed"],
341
- thin: false,
342
- class: "m-0.5"
343
- },
344
335
  {
345
336
  preset: ["hextech"],
346
337
  isHovered: true,
@@ -368,7 +359,7 @@ var button = tv({
368
359
  },
369
360
  {
370
361
  shape: ["round", "square"],
371
- class: "aspect-square p-1.5"
362
+ class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
372
363
  },
373
364
  {
374
365
  isHovered: true,
@@ -397,6 +388,7 @@ function _Button({
397
388
  className: resolveClassName(className, values),
398
389
  preset,
399
390
  shape,
391
+ thin,
400
392
  ...values
401
393
  });
402
394
  },
@@ -408,7 +400,6 @@ function _Button({
408
400
  className: resolveClassName(innerClassName, values),
409
401
  preset,
410
402
  shape,
411
- thin,
412
403
  ...values
413
404
  }),
414
405
  children: typeof children === "function" ? children(values) : children
@@ -1718,6 +1709,197 @@ function Label2({
1718
1709
  className: text({ preset, color, className })
1719
1710
  });
1720
1711
  }
1712
+
1713
+ // src/components/toggle-button.tsx
1714
+ var import_react_aria_components17 = require("react-aria-components");
1715
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1716
+ var toggleButtonBorder = tv({
1717
+ base: "bg-gradient-to-t p-0.5 outline-none transition-colors duration-200",
1718
+ variants: {
1719
+ preset: {
1720
+ gold: "",
1721
+ hextech: "",
1722
+ dimmed: dimmedGradient
1723
+ },
1724
+ shape: {
1725
+ round: "aspect-square rounded-full",
1726
+ square: "aspect-square",
1727
+ normal: ""
1728
+ },
1729
+ isHovered: {
1730
+ true: ""
1731
+ },
1732
+ isPressed: {
1733
+ true: ""
1734
+ },
1735
+ isDisabled: {
1736
+ true: ""
1737
+ },
1738
+ isFocused: {
1739
+ true: ""
1740
+ },
1741
+ isFocusVisible: {
1742
+ true: ""
1743
+ },
1744
+ isSelected: {
1745
+ true: ""
1746
+ },
1747
+ thin: {
1748
+ true: "p-px"
1749
+ }
1750
+ },
1751
+ compoundVariants: [
1752
+ {
1753
+ preset: ["dimmed"],
1754
+ isSelected: true,
1755
+ class: [goldGradient]
1756
+ },
1757
+ {
1758
+ preset: ["gold"],
1759
+ class: goldGradient
1760
+ },
1761
+ {
1762
+ preset: ["gold", "dimmed"],
1763
+ isHovered: true,
1764
+ class: goldGradientHover
1765
+ },
1766
+ {
1767
+ preset: ["gold", "dimmed"],
1768
+ isPressed: true,
1769
+ class: goldGradientPressed
1770
+ },
1771
+ {
1772
+ preset: ["gold", "dimmed"],
1773
+ isDisabled: true,
1774
+ class: goldGradientDisabled
1775
+ },
1776
+ {
1777
+ preset: ["gold"],
1778
+ isFocusVisible: true,
1779
+ class: "outline outline-offset-2 outline-yellow-50"
1780
+ },
1781
+ {
1782
+ preset: ["hextech"],
1783
+ class: hextechGradient
1784
+ },
1785
+ {
1786
+ preset: ["hextech"],
1787
+ isHovered: true,
1788
+ class: hextechGradientHover
1789
+ },
1790
+ {
1791
+ preset: ["hextech"],
1792
+ isPressed: true,
1793
+ class: hextechGradientPressed
1794
+ },
1795
+ {
1796
+ preset: ["hextech"],
1797
+ isDisabled: true,
1798
+ class: hextechGradientDisabled
1799
+ }
1800
+ ]
1801
+ });
1802
+ var toggleButton = tv({
1803
+ base: "text-lol-gold-300 font-beaufort block font-bold uppercase tracking-wide transition-colors duration-200",
1804
+ variants: {
1805
+ preset: {
1806
+ gold: "bg-lol-grey-300",
1807
+ hextech: "text-lol-blue-100 bg-lol-grey-300",
1808
+ dimmed: "bg-lol-grey-hextech-black"
1809
+ },
1810
+ isHovered: {
1811
+ true: "text-lol-gold-100"
1812
+ },
1813
+ isPressed: {
1814
+ true: "text-lol-grey-150"
1815
+ },
1816
+ isDisabled: {
1817
+ true: "text-lol-grey-150"
1818
+ },
1819
+ isFocused: {
1820
+ true: ""
1821
+ },
1822
+ isSelected: {
1823
+ true: [
1824
+ hextechGradient,
1825
+ "text-lol-blue-100 shadow-lol-grey-300 bg-gradient-to-t shadow shadow-inner"
1826
+ ]
1827
+ },
1828
+ isFocusVisible: {
1829
+ true: ""
1830
+ },
1831
+ shape: {
1832
+ round: "rounded-full",
1833
+ square: "",
1834
+ normal: ""
1835
+ }
1836
+ },
1837
+ compoundVariants: [
1838
+ {
1839
+ preset: ["gold", "hextech", "dimmed"],
1840
+ class: "px-4 py-2"
1841
+ },
1842
+ {
1843
+ preset: ["hextech"],
1844
+ isHovered: true,
1845
+ class: "text-lol-blue-100"
1846
+ },
1847
+ {
1848
+ preset: ["hextech"],
1849
+ isPressed: true,
1850
+ class: "text-lol-blue-400"
1851
+ },
1852
+ {
1853
+ preset: ["hextech"],
1854
+ isSelected: true,
1855
+ class: ""
1856
+ },
1857
+ {
1858
+ shape: ["round", "square"],
1859
+ class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
1860
+ }
1861
+ ]
1862
+ });
1863
+ function ToggleButton({
1864
+ children,
1865
+ className,
1866
+ innerProps = {},
1867
+ preset = "gold",
1868
+ shape = "normal",
1869
+ thin = preset === "dimmed" ? true : false,
1870
+ ...props
1871
+ }) {
1872
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1873
+ import_react_aria_components17.ToggleButton,
1874
+ {
1875
+ ...props,
1876
+ className: (values) => toggleButtonBorder({
1877
+ ...values,
1878
+ preset,
1879
+ shape,
1880
+ thin,
1881
+ className: resolveClassName(className, values)
1882
+ }),
1883
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1884
+ "span",
1885
+ {
1886
+ ...innerProps,
1887
+ className: toggleButton({
1888
+ ...values,
1889
+ preset,
1890
+ shape,
1891
+ className: resolveClassName(innerProps.className, values)
1892
+ }),
1893
+ style: {
1894
+ // backgroundImage: hextechMagic,
1895
+ // backgroundPosition: "center",
1896
+ },
1897
+ children: typeof children === "function" ? children(values) : children
1898
+ }
1899
+ )
1900
+ }
1901
+ );
1902
+ }
1721
1903
  // Annotate the CommonJS export names for ESM import in node:
1722
1904
  0 && (module.exports = {
1723
1905
  Accordion,
@@ -1751,6 +1933,7 @@ function Label2({
1751
1933
  Text,
1752
1934
  TextArea,
1753
1935
  TextField,
1936
+ ToggleButton,
1754
1937
  Tooltip,
1755
1938
  TooltipTrigger,
1756
1939
  accordionTrigger,