@lolmath/ui 3.2.1 → 3.2.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.
Files changed (210) hide show
  1. package/dist/es/components/accordion.d.ts +22 -0
  2. package/dist/es/components/accordion.js +101 -0
  3. package/dist/es/components/accordion.js.map +1 -0
  4. package/dist/es/components/button.d.ts +11 -0
  5. package/dist/es/components/button.js +221 -0
  6. package/dist/es/components/button.js.map +1 -0
  7. package/dist/es/components/card.d.ts +6 -0
  8. package/dist/es/components/card.js +51 -0
  9. package/dist/es/components/card.js.map +1 -0
  10. package/dist/es/components/checkbox.d.ts +2 -0
  11. package/dist/es/components/checkbox.js +53 -0
  12. package/dist/es/components/checkbox.js.map +1 -0
  13. package/dist/es/components/divider.d.ts +49 -0
  14. package/dist/es/components/divider.js +30 -0
  15. package/dist/es/components/divider.js.map +1 -0
  16. package/dist/es/components/modal.d.ts +13 -0
  17. package/dist/es/components/modal.js +97 -0
  18. package/dist/es/components/modal.js.map +1 -0
  19. package/dist/es/components/number-field.d.ts +10 -0
  20. package/dist/es/components/number-field.js +110 -0
  21. package/dist/es/components/number-field.js.map +1 -0
  22. package/dist/es/components/popover.d.ts +0 -0
  23. package/dist/es/components/popover.js +0 -0
  24. package/dist/es/components/progress-bar.d.ts +6 -0
  25. package/dist/es/components/progress-bar.js +41 -0
  26. package/dist/es/components/progress-bar.js.map +1 -0
  27. package/dist/es/components/radio-group.d.ts +3 -0
  28. package/dist/es/components/radio-group.js +82 -0
  29. package/dist/es/components/radio-group.js.map +1 -0
  30. package/dist/es/components/search-field.d.ts +6 -0
  31. package/dist/es/components/search-field.js +95 -0
  32. package/dist/es/components/search-field.js.map +1 -0
  33. package/dist/es/components/select.d.ts +11 -0
  34. package/dist/es/components/select.js +117 -0
  35. package/dist/es/components/select.js.map +1 -0
  36. package/dist/es/components/slider/images.d.ts +4 -0
  37. package/dist/es/components/slider/images.js +12 -0
  38. package/dist/es/components/slider/images.js.map +1 -0
  39. package/dist/es/components/slider/slider.d.ts +8 -0
  40. package/dist/es/components/slider/slider.js +169 -0
  41. package/dist/es/components/slider/slider.js.map +1 -0
  42. package/dist/es/components/spinner/images.d.ts +1 -0
  43. package/dist/es/components/spinner/images.js +6 -0
  44. package/dist/es/components/spinner/images.js.map +1 -0
  45. package/dist/es/components/spinner/spinner.d.ts +5 -0
  46. package/dist/es/components/spinner/spinner.js +23 -0
  47. package/dist/es/components/spinner/spinner.js.map +1 -0
  48. package/dist/es/components/switch.d.ts +4 -0
  49. package/dist/es/components/switch.js +96 -0
  50. package/dist/es/components/switch.js.map +1 -0
  51. package/dist/es/components/tabs.d.ts +6 -0
  52. package/dist/es/components/tabs.js +107 -0
  53. package/dist/es/components/tabs.js.map +1 -0
  54. package/dist/es/components/text-area.d.ts +6 -0
  55. package/dist/es/components/text-area.js +67 -0
  56. package/dist/es/components/text-area.js.map +1 -0
  57. package/dist/es/components/text-field.d.ts +6 -0
  58. package/dist/es/components/text-field.js +68 -0
  59. package/dist/es/components/text-field.js.map +1 -0
  60. package/dist/es/components/toggle-button.d.ts +12 -0
  61. package/dist/es/components/toggle-button.js +208 -0
  62. package/dist/es/components/toggle-button.js.map +1 -0
  63. package/dist/es/components/tooltip.d.ts +3 -0
  64. package/dist/es/components/tooltip.js +73 -0
  65. package/dist/es/components/tooltip.js.map +1 -0
  66. package/dist/es/components/typography/heading.d.ts +9 -0
  67. package/dist/es/components/typography/heading.js +38 -0
  68. package/dist/es/components/typography/heading.js.map +1 -0
  69. package/dist/es/components/typography/text.d.ts +17 -0
  70. package/dist/es/components/typography/text.js +62 -0
  71. package/dist/es/components/typography/text.js.map +1 -0
  72. package/dist/es/index.d.ts +23 -0
  73. package/dist/es/index.js +25 -0
  74. package/dist/es/index.js.map +1 -0
  75. package/dist/es/plugin.d.ts +4 -0
  76. package/dist/es/plugin.js +13 -0
  77. package/dist/es/plugin.js.map +1 -0
  78. package/dist/es/utilities/css-id.d.ts +1 -0
  79. package/dist/es/utilities/css-id.js +9 -0
  80. package/dist/es/utilities/css-id.js.map +1 -0
  81. package/dist/es/utilities/gradient.d.ts +8 -0
  82. package/dist/es/utilities/gradient.js +20 -0
  83. package/dist/es/utilities/gradient.js.map +1 -0
  84. package/dist/es/utilities/outline.d.ts +1 -0
  85. package/dist/es/utilities/outline.js +6 -0
  86. package/dist/es/utilities/outline.js.map +1 -0
  87. package/dist/es/utilities/resolve-class-name.d.ts +1 -0
  88. package/dist/es/utilities/resolve-class-name.js +8 -0
  89. package/dist/es/utilities/resolve-class-name.js.map +1 -0
  90. package/dist/es/utilities/theme.d.ts +98 -0
  91. package/dist/{chunk-KUMYC3II.js → es/utilities/theme.js} +3 -4
  92. package/dist/es/utilities/theme.js.map +1 -0
  93. package/dist/es/utilities/tv.d.ts +1 -0
  94. package/dist/es/utilities/tv.js +21 -0
  95. package/dist/es/utilities/tv.js.map +1 -0
  96. package/dist/es/utilities/view-transition.d.ts +1 -0
  97. package/dist/es/utilities/view-transition.js +15 -0
  98. package/dist/es/utilities/view-transition.js.map +1 -0
  99. package/dist/lib/components/accordion.cjs +128 -0
  100. package/dist/lib/components/accordion.d.cts +22 -0
  101. package/dist/lib/components/accordion.d.ts +22 -0
  102. package/dist/lib/components/button.cjs +232 -0
  103. package/dist/lib/components/button.d.cts +11 -0
  104. package/dist/lib/components/button.d.ts +11 -0
  105. package/dist/lib/components/card.cjs +74 -0
  106. package/dist/lib/components/card.d.cts +6 -0
  107. package/dist/lib/components/card.d.ts +6 -0
  108. package/dist/lib/components/checkbox.cjs +75 -0
  109. package/dist/lib/components/checkbox.d.cts +2 -0
  110. package/dist/lib/components/checkbox.d.ts +2 -0
  111. package/dist/lib/components/divider.cjs +52 -0
  112. package/dist/lib/components/divider.d.cts +49 -0
  113. package/dist/lib/components/divider.d.ts +49 -0
  114. package/dist/lib/components/modal.cjs +116 -0
  115. package/dist/lib/components/modal.d.cts +13 -0
  116. package/dist/lib/components/modal.d.ts +13 -0
  117. package/dist/lib/components/number-field.cjs +122 -0
  118. package/dist/lib/components/number-field.d.cts +10 -0
  119. package/dist/lib/components/number-field.d.ts +10 -0
  120. package/dist/lib/components/popover.cjs +1 -0
  121. package/dist/lib/components/popover.d.cts +0 -0
  122. package/dist/lib/components/popover.d.ts +0 -0
  123. package/dist/lib/components/progress-bar.cjs +60 -0
  124. package/dist/lib/components/progress-bar.d.cts +6 -0
  125. package/dist/lib/components/progress-bar.d.ts +6 -0
  126. package/dist/lib/components/radio-group.cjs +102 -0
  127. package/dist/lib/components/radio-group.d.cts +3 -0
  128. package/dist/lib/components/radio-group.d.ts +3 -0
  129. package/dist/lib/components/search-field.cjs +113 -0
  130. package/dist/lib/components/search-field.d.cts +6 -0
  131. package/dist/lib/components/search-field.d.ts +6 -0
  132. package/dist/lib/components/select.cjs +127 -0
  133. package/dist/lib/components/select.d.cts +11 -0
  134. package/dist/lib/components/select.d.ts +11 -0
  135. package/dist/lib/components/slider/images.cjs +37 -0
  136. package/dist/lib/components/slider/images.d.cts +4 -0
  137. package/dist/lib/components/slider/images.d.ts +4 -0
  138. package/dist/lib/components/slider/slider.cjs +182 -0
  139. package/dist/lib/components/slider/slider.d.cts +8 -0
  140. package/dist/lib/components/slider/slider.d.ts +8 -0
  141. package/dist/lib/components/spinner/images.cjs +28 -0
  142. package/dist/lib/components/spinner/images.d.cts +1 -0
  143. package/dist/lib/components/spinner/images.d.ts +1 -0
  144. package/dist/lib/components/spinner/spinner.cjs +45 -0
  145. package/dist/lib/components/spinner/spinner.d.cts +5 -0
  146. package/dist/lib/components/spinner/spinner.d.ts +5 -0
  147. package/dist/lib/components/switch.cjs +113 -0
  148. package/dist/lib/components/switch.d.cts +4 -0
  149. package/dist/lib/components/switch.d.ts +4 -0
  150. package/dist/lib/components/tabs.cjs +127 -0
  151. package/dist/lib/components/tabs.d.cts +6 -0
  152. package/dist/lib/components/tabs.d.ts +6 -0
  153. package/dist/lib/components/text-area.cjs +86 -0
  154. package/dist/lib/components/text-area.d.cts +6 -0
  155. package/dist/lib/components/text-area.d.ts +6 -0
  156. package/dist/lib/components/text-field.cjs +87 -0
  157. package/dist/lib/components/text-field.d.cts +6 -0
  158. package/dist/lib/components/text-field.d.ts +6 -0
  159. package/dist/lib/components/toggle-button.cjs +219 -0
  160. package/dist/lib/components/toggle-button.d.cts +12 -0
  161. package/dist/lib/components/toggle-button.d.ts +12 -0
  162. package/dist/lib/components/tooltip.cjs +96 -0
  163. package/dist/lib/components/tooltip.d.cts +3 -0
  164. package/dist/lib/components/tooltip.d.ts +3 -0
  165. package/dist/lib/components/typography/heading.cjs +60 -0
  166. package/dist/lib/components/typography/heading.d.cts +9 -0
  167. package/dist/lib/components/typography/heading.d.ts +9 -0
  168. package/dist/lib/components/typography/text.cjs +83 -0
  169. package/dist/lib/components/typography/text.d.cts +17 -0
  170. package/dist/lib/components/typography/text.d.ts +17 -0
  171. package/dist/lib/index.cjs +66 -0
  172. package/dist/lib/index.d.cts +23 -0
  173. package/dist/lib/index.d.ts +23 -0
  174. package/dist/lib/plugin.cjs +45 -0
  175. package/dist/lib/plugin.d.cts +4 -0
  176. package/dist/lib/plugin.d.ts +4 -0
  177. package/dist/lib/utilities/css-id.cjs +31 -0
  178. package/dist/lib/utilities/css-id.d.cts +1 -0
  179. package/dist/lib/utilities/css-id.d.ts +1 -0
  180. package/dist/lib/utilities/gradient.cjs +49 -0
  181. package/dist/lib/utilities/gradient.d.cts +8 -0
  182. package/dist/lib/utilities/gradient.d.ts +8 -0
  183. package/dist/lib/utilities/outline.cjs +28 -0
  184. package/dist/lib/utilities/outline.d.cts +1 -0
  185. package/dist/lib/utilities/outline.d.ts +1 -0
  186. package/dist/lib/utilities/resolve-class-name.cjs +30 -0
  187. package/dist/lib/utilities/resolve-class-name.d.cts +1 -0
  188. package/dist/lib/utilities/resolve-class-name.d.ts +1 -0
  189. package/dist/{plugin.cjs → lib/utilities/theme.cjs} +6 -30
  190. package/dist/lib/utilities/theme.d.cts +98 -0
  191. package/dist/lib/utilities/theme.d.ts +98 -0
  192. package/dist/lib/utilities/tv.cjs +43 -0
  193. package/dist/lib/utilities/tv.d.cts +1 -0
  194. package/dist/lib/utilities/tv.d.ts +1 -0
  195. package/dist/lib/utilities/view-transition.cjs +37 -0
  196. package/dist/lib/utilities/view-transition.d.cts +1 -0
  197. package/dist/lib/utilities/view-transition.d.ts +1 -0
  198. package/package.json +27 -15
  199. package/dist/chunk-KUMYC3II.js.map +0 -1
  200. package/dist/index.cjs +0 -1987
  201. package/dist/index.cjs.map +0 -1
  202. package/dist/index.d.cts +0 -279
  203. package/dist/index.d.ts +0 -279
  204. package/dist/index.js +0 -1857
  205. package/dist/index.js.map +0 -1
  206. package/dist/plugin.cjs.map +0 -1
  207. package/dist/plugin.d.cts +0 -8
  208. package/dist/plugin.d.ts +0 -8
  209. package/dist/plugin.js +0 -16
  210. package/dist/plugin.js.map +0 -1
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var tabs_exports = {};
20
+ __export(tabs_exports, {
21
+ Tab: () => Tab,
22
+ TabList: () => TabList,
23
+ TabPanel: () => TabPanel,
24
+ Tabs: () => Tabs
25
+ });
26
+ module.exports = __toCommonJS(tabs_exports);
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var import_react_aria_components = require("react-aria-components");
29
+ var import_css_id = require("../utilities/css-id.cjs");
30
+ var import_react = require("react");
31
+ var import_view_transition = require("../utilities/view-transition.cjs");
32
+ var import_resolve_class_name = require("../utilities/resolve-class-name.cjs");
33
+ var import_tv = require("../utilities/tv.cjs");
34
+ function Tabs({ onSelectionChange, ...rest }) {
35
+ const id = (0, import_css_id.useCssId)();
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
+ import_react_aria_components.Tabs,
38
+ {
39
+ ...rest,
40
+ onSelectionChange: (key) => {
41
+ (0, import_view_transition.startViewTransition)(() => {
42
+ onSelectionChange?.(key);
43
+ });
44
+ }
45
+ }
46
+ ) });
47
+ }
48
+ const tabList = (0, import_tv.tv)({
49
+ base: "-ml-4 flex gap-0"
50
+ });
51
+ function TabList({
52
+ className,
53
+ ...rest
54
+ }) {
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
+ import_react_aria_components.TabList,
57
+ {
58
+ ...rest,
59
+ className: (values) => tabList({
60
+ className: (0, import_resolve_class_name.resolveClassName)(className, values)
61
+ })
62
+ }
63
+ );
64
+ }
65
+ const tab = (0, import_tv.tv)({
66
+ base: [
67
+ "font-beaufort text-lol-gold-300 relative cursor-pointer select-none px-4 py-1 text-xs font-medium uppercase tracking-widest",
68
+ "focus-visible:outline-lol-gold-100 focus:outline-none focus-visible:outline-1 focus-visible:outline-offset-4"
69
+ ],
70
+ variants: {
71
+ isSelected: {
72
+ true: "text-lol-gold-100"
73
+ },
74
+ isHovered: {
75
+ true: "text-lol-gold-100"
76
+ },
77
+ isPressed: {
78
+ true: "text-lol-gold-500"
79
+ },
80
+ isDisabled: {
81
+ true: "text-lol-grey-150 cursor-default"
82
+ }
83
+ }
84
+ });
85
+ function Tab({ children, className, ...rest }) {
86
+ const { id } = useTabsContext();
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ import_react_aria_components.Tab,
89
+ {
90
+ ...rest,
91
+ className: (values) => tab({
92
+ ...values,
93
+ className: (0, import_resolve_class_name.resolveClassName)(className, values)
94
+ }),
95
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
96
+ typeof children === "function" ? children(values) : children,
97
+ values.isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ "div",
99
+ {
100
+ style: {
101
+ viewTransitionName: `tab-indicator-${id}`
102
+ },
103
+ className: "via-lol-gold-200 absolute bottom-0 left-0 h-px w-full bg-gradient-to-r from-transparent to-transparent"
104
+ }
105
+ )
106
+ ] })
107
+ }
108
+ );
109
+ }
110
+ function TabPanel({ ...rest }) {
111
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_components.TabPanel, { ...rest });
112
+ }
113
+ const TabsContext = (0, import_react.createContext)(void 0);
114
+ function useTabsContext() {
115
+ const context = (0, import_react.useContext)(TabsContext);
116
+ if (context === void 0) {
117
+ throw new Error("useTabsContext must be used within a Tabs");
118
+ }
119
+ return context;
120
+ }
121
+ // Annotate the CommonJS export names for ESM import in node:
122
+ 0 && (module.exports = {
123
+ Tab,
124
+ TabList,
125
+ TabPanel,
126
+ Tabs
127
+ });
@@ -0,0 +1,6 @@
1
+ import { TabsProps, TabListProps, TabProps, TabPanelProps } from "react-aria-components";
2
+ export type { Key } from "react-aria-components";
3
+ export declare function Tabs({ onSelectionChange, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TabList<T extends object>({ className, ...rest }: TabListProps<T>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Tab({ children, className, ...rest }: TabProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TabPanel({ ...rest }: TabPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { TabsProps, TabListProps, TabProps, TabPanelProps } from "react-aria-components";
2
+ export type { Key } from "react-aria-components";
3
+ export declare function Tabs({ onSelectionChange, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TabList<T extends object>({ className, ...rest }: TabListProps<T>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Tab({ children, className, ...rest }: TabProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TabPanel({ ...rest }: TabPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var text_area_exports = {};
20
+ __export(text_area_exports, {
21
+ TextArea: () => TextArea
22
+ });
23
+ module.exports = __toCommonJS(text_area_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_react_aria_components = require("react-aria-components");
26
+ var import_gradient = require("../utilities/gradient.cjs");
27
+ var import_resolve_class_name = require("../utilities/resolve-class-name.cjs");
28
+ var import_tv = require("../utilities/tv.cjs");
29
+ const textAreaBorder = (0, import_tv.tv)({
30
+ base: [
31
+ "flex bg-gradient-to-t p-px outline-none",
32
+ import_gradient.goldGradient,
33
+ "focus-within:from-lol-gold-400 focus-within:via-lol-gold-200 focus-within:to-lol-gold-100"
34
+ ],
35
+ variants: {
36
+ isDisabled: {
37
+ true: [import_gradient.disabledGradient]
38
+ }
39
+ }
40
+ });
41
+ const textArea = (0, import_tv.tv)({
42
+ base: [
43
+ "bg-lol-grey-hextech-black min-h-full w-full px-3 py-2 outline-none",
44
+ "text-lol-gold-100 font-spiegel text-xs tracking-wide",
45
+ "focus-within:from-lol-grey-200 focus-within:via-lol-grey-300 focus-within:to-lol-grey-300 focus-within:bg-gradient-to-t"
46
+ ],
47
+ variants: {
48
+ isDisabled: {
49
+ true: ["text-lol-grey-150"]
50
+ }
51
+ }
52
+ });
53
+ function TextArea({
54
+ textAreaProps = {},
55
+ borderProps = {},
56
+ children,
57
+ ...props
58
+ }) {
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_components.TextField, { ...props, children: (values) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
60
+ typeof children === "function" ? children(values) : children,
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ "div",
63
+ {
64
+ ...borderProps,
65
+ className: textAreaBorder({
66
+ ...values,
67
+ className: (0, import_resolve_class_name.resolveClassName)(borderProps?.className, values)
68
+ }),
69
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
+ import_react_aria_components.TextArea,
71
+ {
72
+ ...textAreaProps,
73
+ className: (values2) => textArea({
74
+ ...values2,
75
+ className: (0, import_resolve_class_name.resolveClassName)(textAreaProps?.className, values2)
76
+ })
77
+ }
78
+ )
79
+ }
80
+ )
81
+ ] }) });
82
+ }
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ TextArea
86
+ });
@@ -0,0 +1,6 @@
1
+ import type { TextFieldProps as AriaTextFieldProps, TextAreaProps } from "react-aria-components";
2
+ import { ComponentProps } from "react";
3
+ export declare function TextArea({ textAreaProps, borderProps, children, ...props }: AriaTextFieldProps & {
4
+ textAreaProps?: TextAreaProps;
5
+ borderProps?: ComponentProps<"div">;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { TextFieldProps as AriaTextFieldProps, TextAreaProps } from "react-aria-components";
2
+ import { ComponentProps } from "react";
3
+ export declare function TextArea({ textAreaProps, borderProps, children, ...props }: AriaTextFieldProps & {
4
+ textAreaProps?: TextAreaProps;
5
+ borderProps?: ComponentProps<"div">;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var text_field_exports = {};
20
+ __export(text_field_exports, {
21
+ TextField: () => TextField
22
+ });
23
+ module.exports = __toCommonJS(text_field_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_react_aria_components = require("react-aria-components");
26
+ var import_gradient = require("../utilities/gradient.cjs");
27
+ var import_resolve_class_name = require("../utilities/resolve-class-name.cjs");
28
+ var import_tv = require("../utilities/tv.cjs");
29
+ const textFieldBorder = (0, import_tv.tv)({
30
+ base: [
31
+ "flex bg-gradient-to-t p-px outline-none",
32
+ import_gradient.goldGradient,
33
+ "focus-within:from-lol-gold-400 focus-within:via-lol-gold-200 focus-within:to-lol-gold-100"
34
+ ],
35
+ variants: {
36
+ isDisabled: {
37
+ true: [import_gradient.disabledGradient]
38
+ }
39
+ }
40
+ });
41
+ const textField = (0, import_tv.tv)({
42
+ base: [
43
+ "bg-lol-grey-hextech-black min-h-full w-full px-3 py-2 outline-none",
44
+ "text-lol-gold-100 font-spiegel text-xs tracking-wide",
45
+ "focus-within:from-lol-grey-200 focus-within:via-lol-grey-300 focus-within:to-lol-grey-300 focus-within:bg-gradient-to-t"
46
+ ],
47
+ variants: {
48
+ isDisabled: {
49
+ true: ["text-lol-grey-150"]
50
+ }
51
+ }
52
+ });
53
+ function TextField({
54
+ inputProps = {},
55
+ borderProps = {},
56
+ children,
57
+ ...props
58
+ }) {
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_components.TextField, { ...props, children: (values) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
60
+ typeof children === "function" ? children(values) : children,
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ "div",
63
+ {
64
+ ...borderProps,
65
+ className: textFieldBorder({
66
+ ...values,
67
+ className: (0, import_resolve_class_name.resolveClassName)(borderProps?.className, values)
68
+ }),
69
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
+ import_react_aria_components.Input,
71
+ {
72
+ type: "text",
73
+ ...inputProps,
74
+ className: (values2) => textField({
75
+ ...values2,
76
+ className: (0, import_resolve_class_name.resolveClassName)(inputProps?.className, values2)
77
+ })
78
+ }
79
+ )
80
+ }
81
+ )
82
+ ] }) });
83
+ }
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ TextField
87
+ });
@@ -0,0 +1,6 @@
1
+ import type { TextFieldProps as AriaTextFieldProps, InputProps } from "react-aria-components";
2
+ import { ComponentProps } from "react";
3
+ export declare function TextField({ inputProps, borderProps, children, ...props }: AriaTextFieldProps & {
4
+ inputProps?: InputProps;
5
+ borderProps?: ComponentProps<"div">;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { TextFieldProps as AriaTextFieldProps, InputProps } from "react-aria-components";
2
+ import { ComponentProps } from "react";
3
+ export declare function TextField({ inputProps, borderProps, children, ...props }: AriaTextFieldProps & {
4
+ inputProps?: InputProps;
5
+ borderProps?: ComponentProps<"div">;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var toggle_button_exports = {};
20
+ __export(toggle_button_exports, {
21
+ ToggleButton: () => ToggleButton
22
+ });
23
+ module.exports = __toCommonJS(toggle_button_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_react_aria_components = require("react-aria-components");
26
+ var import_tv = require("../utilities/tv.cjs");
27
+ var import_resolve_class_name = require("../utilities/resolve-class-name.cjs");
28
+ var import_gradient = require("../utilities/gradient.cjs");
29
+ const toggleButtonBorder = (0, import_tv.tv)({
30
+ base: "bg-gradient-to-t p-0.5 outline-none transition-colors duration-200",
31
+ variants: {
32
+ preset: {
33
+ gold: "",
34
+ hextech: "",
35
+ dimmed: import_gradient.dimmedGradient
36
+ },
37
+ shape: {
38
+ round: "aspect-square rounded-full",
39
+ square: "aspect-square",
40
+ normal: ""
41
+ },
42
+ isHovered: {
43
+ true: ""
44
+ },
45
+ isPressed: {
46
+ true: ""
47
+ },
48
+ isDisabled: {
49
+ true: ""
50
+ },
51
+ isFocused: {
52
+ true: ""
53
+ },
54
+ isFocusVisible: {
55
+ true: ""
56
+ },
57
+ isSelected: {
58
+ true: ""
59
+ },
60
+ thin: {
61
+ true: "p-px"
62
+ }
63
+ },
64
+ compoundVariants: [
65
+ {
66
+ preset: ["dimmed"],
67
+ isSelected: true,
68
+ class: [import_gradient.goldGradient]
69
+ },
70
+ {
71
+ preset: ["gold"],
72
+ class: import_gradient.goldGradient
73
+ },
74
+ {
75
+ preset: ["gold", "dimmed"],
76
+ isHovered: true,
77
+ class: import_gradient.goldGradientHover
78
+ },
79
+ {
80
+ preset: ["gold", "dimmed"],
81
+ isPressed: true,
82
+ class: import_gradient.goldGradientPressed
83
+ },
84
+ {
85
+ preset: ["gold", "dimmed"],
86
+ isDisabled: true,
87
+ class: import_gradient.disabledGradient
88
+ },
89
+ {
90
+ preset: ["gold"],
91
+ isFocusVisible: true,
92
+ class: "outline outline-offset-2 outline-yellow-50"
93
+ },
94
+ {
95
+ preset: ["hextech"],
96
+ class: import_gradient.hextechGradient
97
+ },
98
+ {
99
+ preset: ["hextech"],
100
+ isHovered: true,
101
+ class: import_gradient.hextechGradientHover
102
+ },
103
+ {
104
+ preset: ["hextech"],
105
+ isPressed: true,
106
+ class: import_gradient.hextechGradientPressed
107
+ },
108
+ {
109
+ preset: ["hextech"],
110
+ isDisabled: true,
111
+ class: import_gradient.disabledGradient
112
+ }
113
+ ]
114
+ });
115
+ const toggleButton = (0, import_tv.tv)({
116
+ base: "text-lol-gold-300 font-beaufort block font-bold uppercase tracking-wide transition-colors duration-200",
117
+ variants: {
118
+ preset: {
119
+ gold: "bg-lol-grey-300",
120
+ hextech: "text-lol-blue-100 bg-lol-grey-300",
121
+ dimmed: "bg-lol-grey-hextech-black"
122
+ },
123
+ isHovered: {
124
+ true: "text-lol-gold-100"
125
+ },
126
+ isPressed: {
127
+ true: "text-lol-grey-150"
128
+ },
129
+ isDisabled: {
130
+ true: "text-lol-grey-150"
131
+ },
132
+ isFocused: {
133
+ true: ""
134
+ },
135
+ isSelected: {
136
+ true: [
137
+ import_gradient.hextechGradient,
138
+ "text-lol-blue-100 shadow-lol-grey-300 bg-gradient-to-t shadow shadow-inner"
139
+ ]
140
+ },
141
+ isFocusVisible: {
142
+ true: ""
143
+ },
144
+ shape: {
145
+ round: "rounded-full",
146
+ square: "",
147
+ normal: ""
148
+ }
149
+ },
150
+ compoundVariants: [
151
+ {
152
+ preset: ["gold", "hextech", "dimmed"],
153
+ class: "px-4 py-2"
154
+ },
155
+ {
156
+ preset: ["hextech"],
157
+ isHovered: true,
158
+ class: "text-lol-blue-100"
159
+ },
160
+ {
161
+ preset: ["hextech"],
162
+ isPressed: true,
163
+ class: "text-lol-blue-400"
164
+ },
165
+ {
166
+ preset: ["hextech"],
167
+ isSelected: true,
168
+ class: ""
169
+ },
170
+ {
171
+ shape: ["round", "square"],
172
+ class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
173
+ }
174
+ ]
175
+ });
176
+ function ToggleButton({
177
+ children,
178
+ className,
179
+ innerProps = {},
180
+ preset = "gold",
181
+ shape = "normal",
182
+ thin = preset === "dimmed" ? true : false,
183
+ ...props
184
+ }) {
185
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
186
+ import_react_aria_components.ToggleButton,
187
+ {
188
+ ...props,
189
+ className: (values) => toggleButtonBorder({
190
+ ...values,
191
+ preset,
192
+ shape,
193
+ thin,
194
+ className: (0, import_resolve_class_name.resolveClassName)(className, values)
195
+ }),
196
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
+ "span",
198
+ {
199
+ ...innerProps,
200
+ className: toggleButton({
201
+ ...values,
202
+ preset,
203
+ shape,
204
+ className: (0, import_resolve_class_name.resolveClassName)(innerProps.className, values)
205
+ }),
206
+ style: {
207
+ // backgroundImage: hextechMagic,
208
+ // backgroundPosition: "center",
209
+ },
210
+ children: typeof children === "function" ? children(values) : children
211
+ }
212
+ )
213
+ }
214
+ );
215
+ }
216
+ // Annotate the CommonJS export names for ESM import in node:
217
+ 0 && (module.exports = {
218
+ ToggleButton
219
+ });
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from "react";
2
+ import { type ToggleButtonProps as AriaToggleButtonProps } from "react-aria-components";
3
+ export type ToggleButtonShape = "round" | "square" | "normal";
4
+ export type ToggleButtonPreset = "gold" | "hextech" | "dimmed";
5
+ interface ToggleButtonProps extends AriaToggleButtonProps {
6
+ innerProps?: ComponentProps<"span">;
7
+ preset?: ToggleButtonPreset;
8
+ thin?: boolean;
9
+ shape?: ToggleButtonShape;
10
+ }
11
+ export declare function ToggleButton({ children, className, innerProps, preset, shape, thin, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from "react";
2
+ import { type ToggleButtonProps as AriaToggleButtonProps } from "react-aria-components";
3
+ export type ToggleButtonShape = "round" | "square" | "normal";
4
+ export type ToggleButtonPreset = "gold" | "hextech" | "dimmed";
5
+ interface ToggleButtonProps extends AriaToggleButtonProps {
6
+ innerProps?: ComponentProps<"span">;
7
+ preset?: ToggleButtonPreset;
8
+ thin?: boolean;
9
+ shape?: ToggleButtonShape;
10
+ }
11
+ export declare function ToggleButton({ children, className, innerProps, preset, shape, thin, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};