@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.
- package/dist/es/components/accordion.d.ts +22 -0
- package/dist/es/components/accordion.js +101 -0
- package/dist/es/components/accordion.js.map +1 -0
- package/dist/es/components/button.d.ts +11 -0
- package/dist/es/components/button.js +221 -0
- package/dist/es/components/button.js.map +1 -0
- package/dist/es/components/card.d.ts +6 -0
- package/dist/es/components/card.js +51 -0
- package/dist/es/components/card.js.map +1 -0
- package/dist/es/components/checkbox.d.ts +2 -0
- package/dist/es/components/checkbox.js +53 -0
- package/dist/es/components/checkbox.js.map +1 -0
- package/dist/es/components/divider.d.ts +49 -0
- package/dist/es/components/divider.js +30 -0
- package/dist/es/components/divider.js.map +1 -0
- package/dist/es/components/modal.d.ts +13 -0
- package/dist/es/components/modal.js +97 -0
- package/dist/es/components/modal.js.map +1 -0
- package/dist/es/components/number-field.d.ts +10 -0
- package/dist/es/components/number-field.js +110 -0
- package/dist/es/components/number-field.js.map +1 -0
- package/dist/es/components/popover.d.ts +0 -0
- package/dist/es/components/popover.js +0 -0
- package/dist/es/components/progress-bar.d.ts +6 -0
- package/dist/es/components/progress-bar.js +41 -0
- package/dist/es/components/progress-bar.js.map +1 -0
- package/dist/es/components/radio-group.d.ts +3 -0
- package/dist/es/components/radio-group.js +82 -0
- package/dist/es/components/radio-group.js.map +1 -0
- package/dist/es/components/search-field.d.ts +6 -0
- package/dist/es/components/search-field.js +95 -0
- package/dist/es/components/search-field.js.map +1 -0
- package/dist/es/components/select.d.ts +11 -0
- package/dist/es/components/select.js +117 -0
- package/dist/es/components/select.js.map +1 -0
- package/dist/es/components/slider/images.d.ts +4 -0
- package/dist/es/components/slider/images.js +12 -0
- package/dist/es/components/slider/images.js.map +1 -0
- package/dist/es/components/slider/slider.d.ts +8 -0
- package/dist/es/components/slider/slider.js +169 -0
- package/dist/es/components/slider/slider.js.map +1 -0
- package/dist/es/components/spinner/images.d.ts +1 -0
- package/dist/es/components/spinner/images.js +6 -0
- package/dist/es/components/spinner/images.js.map +1 -0
- package/dist/es/components/spinner/spinner.d.ts +5 -0
- package/dist/es/components/spinner/spinner.js +23 -0
- package/dist/es/components/spinner/spinner.js.map +1 -0
- package/dist/es/components/switch.d.ts +4 -0
- package/dist/es/components/switch.js +96 -0
- package/dist/es/components/switch.js.map +1 -0
- package/dist/es/components/tabs.d.ts +6 -0
- package/dist/es/components/tabs.js +107 -0
- package/dist/es/components/tabs.js.map +1 -0
- package/dist/es/components/text-area.d.ts +6 -0
- package/dist/es/components/text-area.js +67 -0
- package/dist/es/components/text-area.js.map +1 -0
- package/dist/es/components/text-field.d.ts +6 -0
- package/dist/es/components/text-field.js +68 -0
- package/dist/es/components/text-field.js.map +1 -0
- package/dist/es/components/toggle-button.d.ts +12 -0
- package/dist/es/components/toggle-button.js +208 -0
- package/dist/es/components/toggle-button.js.map +1 -0
- package/dist/es/components/tooltip.d.ts +3 -0
- package/dist/es/components/tooltip.js +73 -0
- package/dist/es/components/tooltip.js.map +1 -0
- package/dist/es/components/typography/heading.d.ts +9 -0
- package/dist/es/components/typography/heading.js +38 -0
- package/dist/es/components/typography/heading.js.map +1 -0
- package/dist/es/components/typography/text.d.ts +17 -0
- package/dist/es/components/typography/text.js +62 -0
- package/dist/es/components/typography/text.js.map +1 -0
- package/dist/es/index.d.ts +23 -0
- package/dist/es/index.js +25 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/plugin.d.ts +4 -0
- package/dist/es/plugin.js +13 -0
- package/dist/es/plugin.js.map +1 -0
- package/dist/es/utilities/css-id.d.ts +1 -0
- package/dist/es/utilities/css-id.js +9 -0
- package/dist/es/utilities/css-id.js.map +1 -0
- package/dist/es/utilities/gradient.d.ts +8 -0
- package/dist/es/utilities/gradient.js +20 -0
- package/dist/es/utilities/gradient.js.map +1 -0
- package/dist/es/utilities/outline.d.ts +1 -0
- package/dist/es/utilities/outline.js +6 -0
- package/dist/es/utilities/outline.js.map +1 -0
- package/dist/es/utilities/resolve-class-name.d.ts +1 -0
- package/dist/es/utilities/resolve-class-name.js +8 -0
- package/dist/es/utilities/resolve-class-name.js.map +1 -0
- package/dist/es/utilities/theme.d.ts +98 -0
- package/dist/{chunk-KUMYC3II.js → es/utilities/theme.js} +3 -4
- package/dist/es/utilities/theme.js.map +1 -0
- package/dist/es/utilities/tv.d.ts +1 -0
- package/dist/es/utilities/tv.js +21 -0
- package/dist/es/utilities/tv.js.map +1 -0
- package/dist/es/utilities/view-transition.d.ts +1 -0
- package/dist/es/utilities/view-transition.js +15 -0
- package/dist/es/utilities/view-transition.js.map +1 -0
- package/dist/lib/components/accordion.cjs +128 -0
- package/dist/lib/components/accordion.d.cts +22 -0
- package/dist/lib/components/accordion.d.ts +22 -0
- package/dist/lib/components/button.cjs +232 -0
- package/dist/lib/components/button.d.cts +11 -0
- package/dist/lib/components/button.d.ts +11 -0
- package/dist/lib/components/card.cjs +74 -0
- package/dist/lib/components/card.d.cts +6 -0
- package/dist/lib/components/card.d.ts +6 -0
- package/dist/lib/components/checkbox.cjs +75 -0
- package/dist/lib/components/checkbox.d.cts +2 -0
- package/dist/lib/components/checkbox.d.ts +2 -0
- package/dist/lib/components/divider.cjs +52 -0
- package/dist/lib/components/divider.d.cts +49 -0
- package/dist/lib/components/divider.d.ts +49 -0
- package/dist/lib/components/modal.cjs +116 -0
- package/dist/lib/components/modal.d.cts +13 -0
- package/dist/lib/components/modal.d.ts +13 -0
- package/dist/lib/components/number-field.cjs +122 -0
- package/dist/lib/components/number-field.d.cts +10 -0
- package/dist/lib/components/number-field.d.ts +10 -0
- package/dist/lib/components/popover.cjs +1 -0
- package/dist/lib/components/popover.d.cts +0 -0
- package/dist/lib/components/popover.d.ts +0 -0
- package/dist/lib/components/progress-bar.cjs +60 -0
- package/dist/lib/components/progress-bar.d.cts +6 -0
- package/dist/lib/components/progress-bar.d.ts +6 -0
- package/dist/lib/components/radio-group.cjs +102 -0
- package/dist/lib/components/radio-group.d.cts +3 -0
- package/dist/lib/components/radio-group.d.ts +3 -0
- package/dist/lib/components/search-field.cjs +113 -0
- package/dist/lib/components/search-field.d.cts +6 -0
- package/dist/lib/components/search-field.d.ts +6 -0
- package/dist/lib/components/select.cjs +127 -0
- package/dist/lib/components/select.d.cts +11 -0
- package/dist/lib/components/select.d.ts +11 -0
- package/dist/lib/components/slider/images.cjs +37 -0
- package/dist/lib/components/slider/images.d.cts +4 -0
- package/dist/lib/components/slider/images.d.ts +4 -0
- package/dist/lib/components/slider/slider.cjs +182 -0
- package/dist/lib/components/slider/slider.d.cts +8 -0
- package/dist/lib/components/slider/slider.d.ts +8 -0
- package/dist/lib/components/spinner/images.cjs +28 -0
- package/dist/lib/components/spinner/images.d.cts +1 -0
- package/dist/lib/components/spinner/images.d.ts +1 -0
- package/dist/lib/components/spinner/spinner.cjs +45 -0
- package/dist/lib/components/spinner/spinner.d.cts +5 -0
- package/dist/lib/components/spinner/spinner.d.ts +5 -0
- package/dist/lib/components/switch.cjs +113 -0
- package/dist/lib/components/switch.d.cts +4 -0
- package/dist/lib/components/switch.d.ts +4 -0
- package/dist/lib/components/tabs.cjs +127 -0
- package/dist/lib/components/tabs.d.cts +6 -0
- package/dist/lib/components/tabs.d.ts +6 -0
- package/dist/lib/components/text-area.cjs +86 -0
- package/dist/lib/components/text-area.d.cts +6 -0
- package/dist/lib/components/text-area.d.ts +6 -0
- package/dist/lib/components/text-field.cjs +87 -0
- package/dist/lib/components/text-field.d.cts +6 -0
- package/dist/lib/components/text-field.d.ts +6 -0
- package/dist/lib/components/toggle-button.cjs +219 -0
- package/dist/lib/components/toggle-button.d.cts +12 -0
- package/dist/lib/components/toggle-button.d.ts +12 -0
- package/dist/lib/components/tooltip.cjs +96 -0
- package/dist/lib/components/tooltip.d.cts +3 -0
- package/dist/lib/components/tooltip.d.ts +3 -0
- package/dist/lib/components/typography/heading.cjs +60 -0
- package/dist/lib/components/typography/heading.d.cts +9 -0
- package/dist/lib/components/typography/heading.d.ts +9 -0
- package/dist/lib/components/typography/text.cjs +83 -0
- package/dist/lib/components/typography/text.d.cts +17 -0
- package/dist/lib/components/typography/text.d.ts +17 -0
- package/dist/lib/index.cjs +66 -0
- package/dist/lib/index.d.cts +23 -0
- package/dist/lib/index.d.ts +23 -0
- package/dist/lib/plugin.cjs +45 -0
- package/dist/lib/plugin.d.cts +4 -0
- package/dist/lib/plugin.d.ts +4 -0
- package/dist/lib/utilities/css-id.cjs +31 -0
- package/dist/lib/utilities/css-id.d.cts +1 -0
- package/dist/lib/utilities/css-id.d.ts +1 -0
- package/dist/lib/utilities/gradient.cjs +49 -0
- package/dist/lib/utilities/gradient.d.cts +8 -0
- package/dist/lib/utilities/gradient.d.ts +8 -0
- package/dist/lib/utilities/outline.cjs +28 -0
- package/dist/lib/utilities/outline.d.cts +1 -0
- package/dist/lib/utilities/outline.d.ts +1 -0
- package/dist/lib/utilities/resolve-class-name.cjs +30 -0
- package/dist/lib/utilities/resolve-class-name.d.cts +1 -0
- package/dist/lib/utilities/resolve-class-name.d.ts +1 -0
- package/dist/{plugin.cjs → lib/utilities/theme.cjs} +6 -30
- package/dist/lib/utilities/theme.d.cts +98 -0
- package/dist/lib/utilities/theme.d.ts +98 -0
- package/dist/lib/utilities/tv.cjs +43 -0
- package/dist/lib/utilities/tv.d.cts +1 -0
- package/dist/lib/utilities/tv.d.ts +1 -0
- package/dist/lib/utilities/view-transition.cjs +37 -0
- package/dist/lib/utilities/view-transition.d.cts +1 -0
- package/dist/lib/utilities/view-transition.d.ts +1 -0
- package/package.json +27 -15
- package/dist/chunk-KUMYC3II.js.map +0 -1
- package/dist/index.cjs +0 -1987
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -279
- package/dist/index.d.ts +0 -279
- package/dist/index.js +0 -1857
- package/dist/index.js.map +0 -1
- package/dist/plugin.cjs.map +0 -1
- package/dist/plugin.d.cts +0 -8
- package/dist/plugin.d.ts +0 -8
- package/dist/plugin.js +0 -16
- 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 {};
|