@particle-network/ui-react 0.3.2-beta.2 → 0.4.0-beta.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.
@@ -11,16 +11,16 @@ const UXEmpty = forwardRef((props, ref)=>{
11
11
  return /*#__PURE__*/ jsxs(VStack, {
12
12
  ref: ref,
13
13
  center: true,
14
- gap: 4,
14
+ gap: 1,
15
15
  ...restProps,
16
16
  children: [
17
17
  /*#__PURE__*/ jsx(EmptyIcon, {
18
18
  color: "secondary",
19
- size: 64,
19
+ size: 48,
20
20
  ...iconProps
21
21
  }),
22
22
  /*#__PURE__*/ jsx(Text, {
23
- h2: true,
23
+ body1: true,
24
24
  color: "secondary",
25
25
  fontWeight: "normal",
26
26
  children: text
@@ -302,7 +302,6 @@ export declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
302
302
  key?: React.Key | null | undefined;
303
303
  labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
304
304
  label?: React.ReactNode;
305
- isInvalid?: boolean | undefined;
306
305
  disableAnimation?: boolean | undefined;
307
306
  isDisabled?: boolean | undefined;
308
307
  pattern?: string | undefined;
@@ -328,6 +327,7 @@ export declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
328
327
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "inputWrapper" | "base" | "input" | "errorMessage" | "helperWrapper" | "description" | "innerWrapper" | "mainWrapper" | "clearButton"> | undefined;
329
328
  isReadOnly?: boolean | undefined;
330
329
  validationState?: import("@react-types/shared").ValidationState | undefined;
330
+ isInvalid?: boolean | undefined;
331
331
  errorMessage?: React.ReactNode | ((v: import("@react-types/shared").ValidationResult) => React.ReactNode);
332
332
  placeholder?: string | undefined;
333
333
  readOnly?: boolean | undefined;
@@ -299,7 +299,6 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<Omit<{
299
299
  key?: import("react").Key | null | undefined;
300
300
  labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
301
301
  label?: import("react").ReactNode;
302
- isInvalid?: boolean | undefined;
303
302
  disableAnimation?: boolean | undefined;
304
303
  isDisabled?: boolean | undefined;
305
304
  pattern?: string | undefined;
@@ -325,6 +324,7 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<Omit<{
325
324
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "inputWrapper" | "base" | "input" | "errorMessage" | "helperWrapper" | "description" | "innerWrapper" | "mainWrapper" | "clearButton"> | undefined;
326
325
  isReadOnly?: boolean | undefined;
327
326
  validationState?: import("@react-types/shared").ValidationState | undefined;
327
+ isInvalid?: boolean | undefined;
328
328
  errorMessage?: import("react").ReactNode | ((v: import("@react-types/shared").ValidationResult) => import("react").ReactNode);
329
329
  placeholder?: string | undefined;
330
330
  readOnly?: boolean | undefined;
@@ -0,0 +1,3 @@
1
+ export * from './theme-data';
2
+ export * from './theme-switch';
3
+ export * from './use-theme';
@@ -0,0 +1,3 @@
1
+ export * from "./theme-data.js";
2
+ export * from "./theme-switch.js";
3
+ export * from "./use-theme.js";
@@ -0,0 +1,28 @@
1
+ export type ThemeKey = 'ux-purple-gold-dark' | 'ux-purple-gold-light' | 'ux-green-red-dark' | 'ux-green-red-light' | 'ux-green-red-soft-dark' | 'ux-green-red-soft-light' | 'gmgn-dark' | 'axiom-dark' | 'hyperliquid-dark' | 'phantom-dark' | 'binance-dark' | 'bullx-dark';
2
+ export interface ThemeItemType {
3
+ key: ThemeKey;
4
+ zhName: string;
5
+ enName: string;
6
+ colorScheme: 'dark' | 'light';
7
+ colorVariables: {
8
+ foreground: string;
9
+ secondary: string;
10
+ tertiary: string;
11
+ primary: string;
12
+ success: string;
13
+ danger: string;
14
+ alert: string;
15
+ warning: string;
16
+ gold: string;
17
+ background: string;
18
+ 'background-200': string;
19
+ 'background-300': string;
20
+ 'background-400': string;
21
+ overlay: string;
22
+ divider: string;
23
+ bullish: string;
24
+ bearish: string;
25
+ };
26
+ }
27
+ export declare const themeData: ThemeItemType[];
28
+ export declare const themeKeys: ThemeKey[];
@@ -0,0 +1,304 @@
1
+ const themeData = [
2
+ {
3
+ key: 'ux-purple-gold-dark',
4
+ zhName: 'UX 紫金 Dark',
5
+ enName: 'UX Purple/Gold Dark',
6
+ colorScheme: 'dark',
7
+ colorVariables: {
8
+ foreground: '#FFFFFF',
9
+ secondary: '#A1A1AA',
10
+ tertiary: '#4E4E56',
11
+ primary: '#D745FF',
12
+ success: '#45B167',
13
+ danger: '#E84A5A',
14
+ alert: '#F57733',
15
+ warning: '#FF9821',
16
+ gold: '#FFB800',
17
+ background: '#000000',
18
+ 'background-200': '#1F1F23',
19
+ 'background-300': '#17171C',
20
+ 'background-400': '#0F0F0F',
21
+ overlay: '#17171C',
22
+ divider: '#282828',
23
+ bullish: '#D745FF',
24
+ bearish: '#FFAC34'
25
+ }
26
+ },
27
+ {
28
+ key: 'ux-purple-gold-light',
29
+ zhName: 'UX 紫金 Light',
30
+ enName: 'UX Purple/Gold Light',
31
+ colorScheme: 'light',
32
+ colorVariables: {
33
+ foreground: '#000000',
34
+ secondary: '#767A80',
35
+ tertiary: '#D8D8DE',
36
+ primary: '#D745FF',
37
+ success: '#2E9F4A',
38
+ danger: '#DE4A40',
39
+ alert: '#E65E16',
40
+ warning: '#FF9821',
41
+ gold: '#F38300',
42
+ background: '#F8F8FA',
43
+ 'background-200': '#F0F0F2',
44
+ 'background-300': '#F8F8FA',
45
+ 'background-400': '#FFFFFF',
46
+ overlay: '#FFFFFF',
47
+ divider: '#E8E8ED',
48
+ bullish: '#D745FF',
49
+ bearish: '#F9A01E'
50
+ }
51
+ },
52
+ {
53
+ key: 'ux-green-red-dark',
54
+ zhName: 'UX 绿红 Dark',
55
+ enName: 'UX Green/Red Dark',
56
+ colorScheme: 'dark',
57
+ colorVariables: {
58
+ foreground: '#FFFFFF',
59
+ secondary: '#A1A1AA',
60
+ tertiary: '#4E4E56',
61
+ primary: '#D745FF',
62
+ success: '#45B167',
63
+ danger: '#E84A5A',
64
+ alert: '#F57733',
65
+ warning: '#FF9821',
66
+ gold: '#FFB800',
67
+ background: '#000000',
68
+ 'background-200': '#1F1F23',
69
+ 'background-300': '#17171C',
70
+ 'background-400': '#0F0F0F',
71
+ overlay: '#17171C',
72
+ divider: '#282828',
73
+ bullish: '#45B167',
74
+ bearish: '#E84A5A'
75
+ }
76
+ },
77
+ {
78
+ key: 'ux-green-red-light',
79
+ zhName: 'UX 绿红 Light',
80
+ enName: 'UX Green/Red Light',
81
+ colorScheme: 'light',
82
+ colorVariables: {
83
+ foreground: '#000000',
84
+ secondary: '#767A80',
85
+ tertiary: '#D8D8DE',
86
+ primary: '#D745FF',
87
+ success: '#2E9F4A',
88
+ danger: '#DE4A40',
89
+ alert: '#E65E16',
90
+ warning: '#FF9821',
91
+ gold: '#F38300',
92
+ background: '#F8F8FA',
93
+ 'background-200': '#F0F0F2',
94
+ 'background-300': '#F8F8FA',
95
+ 'background-400': '#FFFFFF',
96
+ overlay: '#FFFFFF',
97
+ divider: '#E8E8ED',
98
+ bullish: '#45B167',
99
+ bearish: '#E84A5A'
100
+ }
101
+ },
102
+ {
103
+ key: 'ux-green-red-soft-dark',
104
+ zhName: 'UX 柔和 Dark',
105
+ enName: 'UX Soft Dark',
106
+ colorScheme: 'dark',
107
+ colorVariables: {
108
+ foreground: '#FDFDFE',
109
+ secondary: '#BBBBC4',
110
+ tertiary: '#70707C',
111
+ primary: '#D745FF',
112
+ success: '#73D090',
113
+ danger: '#F46271',
114
+ alert: '#F37A39',
115
+ warning: '#F8BF63',
116
+ gold: '#FFB800',
117
+ background: '#100E11',
118
+ 'background-200': '#2A2A30',
119
+ 'background-300': '#17171C',
120
+ 'background-400': '#19161B',
121
+ overlay: '#17171C',
122
+ divider: '#282828',
123
+ bullish: '#73D090',
124
+ bearish: '#F46271'
125
+ }
126
+ },
127
+ {
128
+ key: 'ux-green-red-soft-light',
129
+ zhName: 'UX 柔和 Light',
130
+ enName: 'UX Soft Light',
131
+ colorScheme: 'light',
132
+ colorVariables: {
133
+ foreground: '#0C0C0F',
134
+ secondary: '#363538',
135
+ tertiary: '#7B7B85',
136
+ primary: '#D745FF',
137
+ success: '#19AB5E',
138
+ danger: '#FF5868',
139
+ alert: '#F07939',
140
+ warning: '#F6932B',
141
+ gold: '#FFB800',
142
+ background: '#F6F6F6',
143
+ 'background-200': '#E9E7EE',
144
+ 'background-300': '#F6F6F6',
145
+ 'background-400': '#FFFFFF',
146
+ overlay: '#FFFFFF',
147
+ divider: '#DAD7E0',
148
+ bullish: '#19AB5E',
149
+ bearish: '#FF5868'
150
+ }
151
+ },
152
+ {
153
+ key: 'gmgn-dark',
154
+ zhName: 'GMGN',
155
+ enName: 'GMGN',
156
+ colorScheme: 'dark',
157
+ colorVariables: {
158
+ foreground: '#F0F5F5',
159
+ secondary: '#C4CCCC',
160
+ tertiary: '#757E80',
161
+ primary: '#86D99F',
162
+ success: '#86D99F',
163
+ danger: '#F26682',
164
+ alert: '#F55832',
165
+ warning: '#EDB951',
166
+ gold: '#F5DA54',
167
+ background: '#0C0C0F',
168
+ 'background-200': '#282A2E',
169
+ 'background-300': '#1A1B1F',
170
+ 'background-400': '#111214',
171
+ overlay: '#1A1B1F',
172
+ divider: '#282828',
173
+ bullish: '#1DB069',
174
+ bearish: '#DE4E52'
175
+ }
176
+ },
177
+ {
178
+ key: 'axiom-dark',
179
+ zhName: 'AXIOM',
180
+ enName: 'AXIOM',
181
+ colorScheme: 'dark',
182
+ colorVariables: {
183
+ foreground: '#FCFCFC',
184
+ secondary: '#C8C9D1',
185
+ tertiary: '#777A8C',
186
+ primary: '#526FFF',
187
+ success: '#2FE3AC',
188
+ danger: '#EC397A',
189
+ alert: '#F57733',
190
+ warning: '#F7931A',
191
+ gold: '#F7931A',
192
+ background: '#0C0C0F',
193
+ 'background-200': '#333542',
194
+ 'background-300': '#18181A',
195
+ 'background-400': '#101114',
196
+ overlay: '#18181A',
197
+ divider: '#333542',
198
+ bullish: '#0B9981',
199
+ bearish: '#F23646'
200
+ }
201
+ },
202
+ {
203
+ key: 'hyperliquid-dark',
204
+ zhName: 'Hyperliquid',
205
+ enName: 'Hyperliquid',
206
+ colorScheme: 'dark',
207
+ colorVariables: {
208
+ foreground: '#F6FEFD',
209
+ secondary: '#D1D4DC',
210
+ tertiary: '#949E9C',
211
+ primary: '#50D2C1',
212
+ success: '#1FA67D',
213
+ danger: '#ED7088',
214
+ alert: '#EF8F50',
215
+ warning: '#FFB648',
216
+ gold: '#FFB648',
217
+ background: '#0F1A1F',
218
+ 'background-200': '#273035',
219
+ 'background-300': '#1B2429',
220
+ 'background-400': '#0F1A1F',
221
+ overlay: '#1B2429',
222
+ divider: '#444651',
223
+ bullish: '#51D2C1',
224
+ bearish: '#D45B71'
225
+ }
226
+ },
227
+ {
228
+ key: 'phantom-dark',
229
+ zhName: 'Phantom',
230
+ enName: 'Phantom',
231
+ colorScheme: 'dark',
232
+ colorVariables: {
233
+ foreground: '#FFFFFF',
234
+ secondary: '#999999',
235
+ tertiary: '#757E80',
236
+ primary: '#AB9FF2',
237
+ success: '#2EC08B',
238
+ danger: '#F7525F',
239
+ alert: '#FF9C3F',
240
+ warning: '#FFD13F',
241
+ gold: '#FFD13F',
242
+ background: '#13121A',
243
+ 'background-200': '#222222',
244
+ 'background-300': '#272735',
245
+ 'background-400': '#22212A',
246
+ overlay: '#272735',
247
+ divider: '#323232',
248
+ bullish: '#2EC08B',
249
+ bearish: '#FF7243'
250
+ }
251
+ },
252
+ {
253
+ key: 'binance-dark',
254
+ zhName: 'Binance',
255
+ enName: 'Binance',
256
+ colorScheme: 'dark',
257
+ colorVariables: {
258
+ foreground: '#EAECEF',
259
+ secondary: '#929AA5',
260
+ tertiary: '#707A8A',
261
+ primary: '#FCD535',
262
+ success: '#2EBD85',
263
+ danger: '#F6465D',
264
+ alert: '#FF693D',
265
+ warning: '#F0B90B',
266
+ gold: '#2DBD85',
267
+ background: '#0B0E11',
268
+ 'background-200': '#29313D',
269
+ 'background-300': '#202630',
270
+ 'background-400': '#181A20',
271
+ overlay: '#202630',
272
+ divider: '#343B47',
273
+ bullish: '#2EBD85',
274
+ bearish: '#F6465D'
275
+ }
276
+ },
277
+ {
278
+ key: 'bullx-dark',
279
+ zhName: "Bullx's",
280
+ enName: "Bullx's",
281
+ colorScheme: 'dark',
282
+ colorVariables: {
283
+ foreground: '#E9E9E9',
284
+ secondary: '#98989B',
285
+ tertiary: '#686a6d',
286
+ primary: '#61DC9B',
287
+ success: '#459C6E',
288
+ danger: '#A13C45',
289
+ alert: '#E9BF52',
290
+ warning: '#DCC161',
291
+ gold: '#E9BF52',
292
+ background: '#09090B',
293
+ 'background-200': '#1B1D22',
294
+ 'background-300': '#0D0D10',
295
+ 'background-400': '#0F0F0F',
296
+ overlay: '#0D0D10',
297
+ divider: '#1E2025',
298
+ bullish: '#459C6E',
299
+ bearish: '#A13C45'
300
+ }
301
+ }
302
+ ];
303
+ const themeKeys = themeData.map((theme)=>theme.key);
304
+ export { themeData, themeKeys };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { ThemeItemType } from './theme-data';
3
+ export interface ThemeItemProps extends Pick<ThemeItemType, 'zhName' | 'enName' | 'colorVariables'> {
4
+ isSelected: boolean;
5
+ onClick: () => void;
6
+ }
7
+ export declare const ThemeItem: React.FC<ThemeItemProps>;
@@ -0,0 +1,136 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { useLang } from "../../hooks/index.js";
4
+ import { VStack } from "../layout/index.js";
5
+ import { Text } from "../typography/Text.js";
6
+ const ThemeItem = ({ zhName, enName, colorVariables, isSelected, onClick })=>{
7
+ const lang = useLang();
8
+ return /*#__PURE__*/ jsxs(VStack, {
9
+ center: true,
10
+ className: "cursor-pointer hover:scale-105 transition-all duration-300",
11
+ onClick: onClick,
12
+ children: [
13
+ /*#__PURE__*/ jsx("div", {
14
+ className: "rounded-small border-1.5",
15
+ style: {
16
+ borderColor: isSelected ? colorVariables.primary : 'transparent'
17
+ },
18
+ children: /*#__PURE__*/ jsxs("svg", {
19
+ xmlns: "http://www.w3.org/2000/svg",
20
+ width: "180",
21
+ height: "106.5",
22
+ viewBox: "0 0 120 71",
23
+ fill: "none",
24
+ children: [
25
+ /*#__PURE__*/ jsx("rect", {
26
+ opacity: "0.5",
27
+ x: "1.9043",
28
+ y: "2",
29
+ width: "116.19",
30
+ height: "67",
31
+ rx: "5",
32
+ fill: colorVariables.primary
33
+ }),
34
+ /*#__PURE__*/ jsx("mask", {
35
+ id: "mask0_40928_218196",
36
+ style: {
37
+ maskType: 'alpha'
38
+ },
39
+ maskUnits: "userSpaceOnUse",
40
+ x: "1",
41
+ y: "2",
42
+ width: "118",
43
+ height: "67",
44
+ children: /*#__PURE__*/ jsx("rect", {
45
+ x: "1.9043",
46
+ y: "2",
47
+ width: "116.19",
48
+ height: "67",
49
+ rx: "5",
50
+ fill: colorVariables.background
51
+ })
52
+ }),
53
+ /*#__PURE__*/ jsx("g", {
54
+ mask: "url(#mask0_40928_218196)",
55
+ children: /*#__PURE__*/ jsx("rect", {
56
+ x: "17.1426",
57
+ y: "18",
58
+ width: "116.19",
59
+ height: "67",
60
+ rx: "6",
61
+ fill: colorVariables.background
62
+ })
63
+ }),
64
+ /*#__PURE__*/ jsx("rect", {
65
+ x: "18.0957",
66
+ y: "31",
67
+ width: "100",
68
+ height: "1",
69
+ fill: colorVariables.divider
70
+ }),
71
+ /*#__PURE__*/ jsx("rect", {
72
+ x: "54.082",
73
+ y: "41.2568",
74
+ width: "30.0917",
75
+ height: "6.01835",
76
+ rx: "3.00917",
77
+ fill: colorVariables.foreground
78
+ }),
79
+ /*#__PURE__*/ jsx("rect", {
80
+ x: "54.082",
81
+ y: "53.2939",
82
+ width: "19.5596",
83
+ height: "6.01835",
84
+ rx: "3.00917",
85
+ fill: colorVariables.bullish
86
+ }),
87
+ /*#__PURE__*/ jsx("rect", {
88
+ x: "75.8994",
89
+ y: "53.2939",
90
+ width: "19.5596",
91
+ height: "6.01835",
92
+ rx: "3.00917",
93
+ fill: colorVariables.bearish
94
+ }),
95
+ /*#__PURE__*/ jsx("rect", {
96
+ x: "86.4316",
97
+ y: "41.2568",
98
+ width: "6.01835",
99
+ height: "6.01835",
100
+ rx: "3.00917",
101
+ fill: colorVariables.secondary
102
+ }),
103
+ /*#__PURE__*/ jsx("rect", {
104
+ x: "94.707",
105
+ y: "41.2568",
106
+ width: "6.01835",
107
+ height: "6.01835",
108
+ rx: "3.00917",
109
+ fill: colorVariables.secondary
110
+ }),
111
+ /*#__PURE__*/ jsx("rect", {
112
+ x: "102.981",
113
+ y: "41.2568",
114
+ width: "6.01835",
115
+ height: "6.01835",
116
+ rx: "3.00917",
117
+ fill: colorVariables.secondary
118
+ }),
119
+ /*#__PURE__*/ jsx("rect", {
120
+ x: "27",
121
+ y: "39",
122
+ width: "22.5688",
123
+ height: "22.5688",
124
+ rx: "11.2844",
125
+ fill: colorVariables.primary
126
+ })
127
+ ]
128
+ })
129
+ }),
130
+ /*#__PURE__*/ jsx(Text, {
131
+ children: 'zh' === lang ? zhName : enName
132
+ })
133
+ ]
134
+ });
135
+ };
136
+ export { ThemeItem };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface UXThemeSwitchProps {
3
+ children?: (onOpen: () => void) => React.ReactNode;
4
+ }
5
+ export declare const UXThemeSwitch: React.FC<UXThemeSwitchProps>;
@@ -0,0 +1,121 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Drawer, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader } from "@heroui/drawer";
4
+ import { useDisclosure } from "@heroui/use-disclosure";
5
+ import ThemeSwitchIcon from "@particle-network/icons/web/ThemeSwitchIcon";
6
+ import { useI18n } from "../../hooks/index.js";
7
+ import { Flex, HStack, VStack } from "../layout/index.js";
8
+ import { Text } from "../typography/Text.js";
9
+ import { UXButton } from "../UXButton/index.js";
10
+ import { UXDivider } from "../UXDivider/index.js";
11
+ import { UXInput } from "../UXInput/index.js";
12
+ import { themeData } from "./theme-data.js";
13
+ import { ThemeItem } from "./theme-item.js";
14
+ import { useTheme } from "./use-theme.js";
15
+ const UXThemeSwitch = ({ children })=>{
16
+ const i18n = useI18n();
17
+ const { isOpen, onOpen, onClose, onOpenChange } = useDisclosure();
18
+ const { selectedTheme, setSelectedTheme, savedTheme, setSavedTheme, selectedFontLink, setSelectedFontLink, savedFontLink, setSavedFontLink } = useTheme();
19
+ const handleOpenChange = (_isOpen)=>{
20
+ onOpenChange();
21
+ if (!_isOpen) {
22
+ setSelectedTheme(savedTheme);
23
+ setSelectedFontLink(savedFontLink);
24
+ }
25
+ };
26
+ const handleApplyTheme = ()=>{
27
+ setSavedTheme(selectedTheme);
28
+ setSavedFontLink(selectedFontLink);
29
+ onClose();
30
+ };
31
+ const handleReset = ()=>{
32
+ setSelectedTheme(savedTheme);
33
+ setSelectedFontLink(savedFontLink);
34
+ };
35
+ const renderChildren = ()=>{
36
+ if (children) return children(onOpen);
37
+ return /*#__PURE__*/ jsx(UXButton, {
38
+ isIconOnly: true,
39
+ variant: "light",
40
+ onPress: onOpen,
41
+ children: /*#__PURE__*/ jsx(ThemeSwitchIcon, {})
42
+ });
43
+ };
44
+ return /*#__PURE__*/ jsxs(Fragment, {
45
+ children: [
46
+ renderChildren(),
47
+ /*#__PURE__*/ jsx(Drawer, {
48
+ isOpen: isOpen,
49
+ backdrop: "transparent",
50
+ onOpenChange: handleOpenChange,
51
+ children: /*#__PURE__*/ jsxs(DrawerContent, {
52
+ children: [
53
+ /*#__PURE__*/ jsx(DrawerHeader, {
54
+ className: "flex flex-col gap-1",
55
+ children: i18n.theme.title
56
+ }),
57
+ /*#__PURE__*/ jsxs(DrawerBody, {
58
+ children: [
59
+ /*#__PURE__*/ jsx(Flex, {
60
+ wrap: true,
61
+ justify: "between",
62
+ className: "gap-y-5",
63
+ children: themeData.map((theme)=>/*#__PURE__*/ jsx(ThemeItem, {
64
+ isSelected: selectedTheme.key === theme.key,
65
+ zhName: theme.zhName,
66
+ enName: theme.enName,
67
+ colorVariables: theme.colorVariables,
68
+ onClick: ()=>setSelectedTheme(theme)
69
+ }, theme.key))
70
+ }),
71
+ /*#__PURE__*/ jsx(UXDivider, {
72
+ className: "my-lg"
73
+ }),
74
+ /*#__PURE__*/ jsxs(VStack, {
75
+ gap: "md",
76
+ className: "w-full",
77
+ children: [
78
+ /*#__PURE__*/ jsx(Text, {
79
+ className: "text-sm font-medium",
80
+ children: i18n.theme.font.title
81
+ }),
82
+ /*#__PURE__*/ jsx(UXInput, {
83
+ isClearable: true,
84
+ className: "w-full",
85
+ placeholder: i18n.theme.font.placeholder,
86
+ value: selectedFontLink,
87
+ onValueChange: setSelectedFontLink
88
+ })
89
+ ]
90
+ })
91
+ ]
92
+ }),
93
+ /*#__PURE__*/ jsx(DrawerFooter, {
94
+ className: "mb-8",
95
+ children: /*#__PURE__*/ jsxs(HStack, {
96
+ fullWidth: true,
97
+ gap: "lg",
98
+ children: [
99
+ /*#__PURE__*/ jsx(UXButton, {
100
+ fullWidth: true,
101
+ size: "lg",
102
+ onPress: handleReset,
103
+ children: i18n.theme.reset
104
+ }),
105
+ /*#__PURE__*/ jsx(UXButton, {
106
+ fullWidth: true,
107
+ size: "lg",
108
+ color: "primary",
109
+ onPress: handleApplyTheme,
110
+ children: i18n.theme.apply
111
+ })
112
+ ]
113
+ })
114
+ })
115
+ ]
116
+ })
117
+ })
118
+ ]
119
+ });
120
+ };
121
+ export { UXThemeSwitch };