@particle-network/ui-react 0.4.0-beta.9 → 0.4.1-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.
Files changed (54) hide show
  1. package/dist/components/UXAutocomplete/index.d.ts +5 -0
  2. package/dist/components/UXAutocomplete/index.js +72 -0
  3. package/dist/components/UXButton/button-theme.js +15 -23
  4. package/dist/components/UXButton/use-button.js +2 -1
  5. package/dist/components/UXCheckbox/checkbox.extend.js +3 -3
  6. package/dist/components/UXDatePicker/index.js +1 -1
  7. package/dist/components/UXDateRangePicker/index.js +1 -1
  8. package/dist/components/UXDivider/divider.extend.d.ts +2 -2
  9. package/dist/components/UXDrawer/index.d.ts +9 -0
  10. package/dist/components/UXDrawer/index.js +89 -0
  11. package/dist/components/UXEmpty/index.d.ts +2 -1
  12. package/dist/components/UXEmpty/index.js +8 -2
  13. package/dist/components/UXHint/index.js +1 -1
  14. package/dist/components/UXInput/index.d.ts +33 -33
  15. package/dist/components/UXInput/input.extend.d.ts +33 -33
  16. package/dist/components/UXModal/index.d.ts +1 -1
  17. package/dist/components/UXModal/index.js +7 -6
  18. package/dist/components/UXSelect/index.js +2 -2
  19. package/dist/components/UXSwitch/index.d.ts +22 -22
  20. package/dist/components/UXSwitch/switch.extend.d.ts +22 -22
  21. package/dist/components/UXTable/index.d.ts +19 -19
  22. package/dist/components/UXTable/table.extend.d.ts +19 -19
  23. package/dist/components/UXThemeSwitch/index.d.ts +0 -1
  24. package/dist/components/UXThemeSwitch/index.js +0 -1
  25. package/dist/components/UXThemeSwitch/theme-item.d.ts +1 -1
  26. package/dist/components/UXThemeSwitch/theme-item.js +4 -5
  27. package/dist/components/UXThemeSwitch/theme-switch.d.ts +3 -3
  28. package/dist/components/UXThemeSwitch/theme-switch.js +133 -100
  29. package/dist/components/UXThemeSwitch/use-color-scheme.d.ts +1 -1
  30. package/dist/components/UXThemeSwitch/use-color-scheme.js +3 -3
  31. package/dist/components/UXThemeSwitch/use-theme-color.js +3 -3
  32. package/dist/components/UXThemeSwitch/use-theme-store.d.ts +5 -20
  33. package/dist/components/UXThemeSwitch/use-theme-store.js +14 -28
  34. package/dist/components/UXThemeSwitch/use-theme.d.ts +7 -12
  35. package/dist/components/UXThemeSwitch/use-theme.js +71 -80
  36. package/dist/components/UXToast/index.d.ts +7 -4
  37. package/dist/components/UXToast/index.js +21 -17
  38. package/dist/components/UXTooltip/index.js +1 -14
  39. package/dist/components/UXTooltip/tooltip.extend.d.ts +21 -21
  40. package/dist/components/UXTooltip/tooltip.extend.js +2 -1
  41. package/dist/components/index.d.ts +2 -0
  42. package/dist/components/index.js +2 -0
  43. package/dist/hooks/useI18n.d.ts +6 -2
  44. package/dist/hooks/useI18n.js +15 -7
  45. package/dist/utils/detect.js +1 -2
  46. package/dist/utils/input-classes.d.ts +3 -0
  47. package/dist/utils/input-classes.js +3 -0
  48. package/dist/utils/variants.js +16 -16
  49. package/package.json +5 -6
  50. package/tailwind-preset.js +231 -135
  51. package/dist/components/UXThemeSwitch/theme-data.d.ts +0 -12
  52. package/dist/components/UXThemeSwitch/theme-data.js +0 -340
  53. package/dist/icons/index.d.ts +0 -14
  54. package/dist/icons/index.js +0 -120
@@ -1,12 +1,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import "react";
3
3
  import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from "@heroui/modal";
4
- import { Center, Circle, Flex, Text, UXButton } from "../index.js";
5
- import { CloseIcon } from "../../icons/index.js";
6
- const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
4
+ import CloseIcon from "@particle-network/icons/web/CloseIcon";
5
+ import { Center, Circle, Flex } from "../layout/index.js";
6
+ import { Text } from "../typography/Text.js";
7
+ import { UXButton } from "../UXButton/index.js";
8
+ const UXModal = (props)=>{
7
9
  const { title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
8
10
  return /*#__PURE__*/ jsx(Modal, {
9
- ref: ref,
10
11
  backdrop: backdrop,
11
12
  scrollBehavior: scrollBehavior,
12
13
  classNames: {
@@ -86,6 +87,6 @@ const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
86
87
  ]
87
88
  })
88
89
  });
89
- });
90
+ };
90
91
  UXModal.displayName = 'UX.Modal';
91
92
  export { UXModal };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { Select, SelectItem, SelectSection } from "@heroui/select";
4
- import { ChevronDownIcon } from "../../icons/index.js";
4
+ import ChevronDownIcon from "@particle-network/icons/web/ChevronDownIcon";
5
5
  const UXSelect = /*#__PURE__*/ forwardRef((props, ref)=>{
6
6
  const { fullWidth = false, classNames = {}, radius = 'sm', ...restProps } = props;
7
7
  const { popoverContent, selectorIcon, trigger, value, ...restClassNames } = classNames;
@@ -18,7 +18,7 @@ const UXSelect = /*#__PURE__*/ forwardRef((props, ref)=>{
18
18
  selectorIcon
19
19
  ],
20
20
  trigger: [
21
- 'h-[30px] min-h-[30px] px-md bg-background-200',
21
+ 'h-[30px] min-h-[30px] px-md bg-background-200 data-[hover=true]:bg-background-200 data-[hover=true]:opacity-hover',
22
22
  trigger
23
23
  ],
24
24
  value: [
@@ -42,7 +42,7 @@ export declare const UXSwitch: React.ForwardRefExoticComponent<Omit<Omit<{
42
42
  vocab?: string | undefined;
43
43
  autoCorrect?: string | undefined;
44
44
  autoSave?: string | undefined;
45
- color?: "default" | "secondary" | "primary" | "success" | "danger" | "warning" | "bullish" | "bearish" | "contrast" | undefined;
45
+ color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | "contrast" | undefined;
46
46
  itemProp?: string | undefined;
47
47
  itemScope?: boolean | undefined;
48
48
  itemType?: string | undefined;
@@ -292,39 +292,39 @@ export declare const UXSwitch: React.ForwardRefExoticComponent<Omit<Omit<{
292
292
  height?: string | number | undefined;
293
293
  multiple?: boolean | undefined;
294
294
  disabled?: boolean | undefined;
295
- max?: string | number | undefined;
296
- min?: string | number | undefined;
297
- name?: string | undefined;
298
- type?: React.HTMLInputTypeAttribute | undefined;
299
- key?: React.Key | null | undefined;
300
- disableAnimation?: boolean | undefined;
295
+ classNames?: import("@heroui/theme").SlotsToClasses<"base" | "label" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
301
296
  isDisabled?: boolean | undefined;
302
- isSelected?: boolean | undefined;
303
- pattern?: string | undefined;
304
- as?: import("@heroui/system-rsc").As<any> | undefined;
297
+ isReadOnly?: boolean | undefined;
305
298
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
306
- formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
307
- formEncType?: string | undefined;
308
- formMethod?: string | undefined;
309
- formNoValidate?: boolean | undefined;
310
- formTarget?: string | undefined;
299
+ placeholder?: string | undefined;
311
300
  excludeFromTabOrder?: boolean | undefined;
312
- startContent?: React.ReactNode;
313
- endContent?: React.ReactNode;
314
301
  autoComplete?: React.HTMLInputAutoCompleteAttribute | undefined;
315
- alt?: string | undefined;
316
302
  maxLength?: number | undefined;
317
303
  minLength?: number | undefined;
304
+ pattern?: string | undefined;
305
+ type?: React.HTMLInputTypeAttribute | undefined;
306
+ name?: string | undefined;
307
+ disableAnimation?: boolean | undefined;
308
+ as?: import("@heroui/system-rsc").As<any> | undefined;
309
+ key?: React.Key | null | undefined;
318
310
  accept?: string | undefined;
311
+ alt?: string | undefined;
319
312
  capture?: boolean | "user" | "environment" | undefined;
320
313
  checked?: boolean | undefined;
321
- src?: string | undefined;
322
- classNames?: import("@heroui/theme").SlotsToClasses<"label" | "base" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
323
- isReadOnly?: boolean | undefined;
324
- placeholder?: string | undefined;
314
+ formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
315
+ formEncType?: string | undefined;
316
+ formMethod?: string | undefined;
317
+ formNoValidate?: boolean | undefined;
318
+ formTarget?: string | undefined;
319
+ max?: string | number | undefined;
320
+ min?: string | number | undefined;
325
321
  readOnly?: boolean | undefined;
326
322
  required?: boolean | undefined;
323
+ src?: string | undefined;
324
+ startContent?: React.ReactNode;
325
+ endContent?: React.ReactNode;
327
326
  onValueChange?: ((isSelected: boolean) => void) | undefined;
327
+ isSelected?: boolean | undefined;
328
328
  defaultSelected?: boolean | undefined;
329
329
  thumbIcon?: React.ReactNode | ((props: import("@heroui/switch").SwitchThumbIconProps) => React.ReactNode);
330
330
  }, "ref"> & React.RefAttributes<React.ReactElement<unknown, string | React.JSXElementConstructor<any>>>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -39,7 +39,7 @@ declare const ExtendedSwitch: import("react").ForwardRefExoticComponent<Omit<{
39
39
  vocab?: string | undefined;
40
40
  autoCorrect?: string | undefined;
41
41
  autoSave?: string | undefined;
42
- color?: "default" | "secondary" | "primary" | "success" | "danger" | "warning" | "bullish" | "bearish" | "contrast" | undefined;
42
+ color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | "contrast" | undefined;
43
43
  itemProp?: string | undefined;
44
44
  itemScope?: boolean | undefined;
45
45
  itemType?: string | undefined;
@@ -289,39 +289,39 @@ declare const ExtendedSwitch: import("react").ForwardRefExoticComponent<Omit<{
289
289
  height?: string | number | undefined;
290
290
  multiple?: boolean | undefined;
291
291
  disabled?: boolean | undefined;
292
- max?: string | number | undefined;
293
- min?: string | number | undefined;
294
- name?: string | undefined;
295
- type?: import("react").HTMLInputTypeAttribute | undefined;
296
- key?: import("react").Key | null | undefined;
297
- disableAnimation?: boolean | undefined;
292
+ classNames?: import("@heroui/theme").SlotsToClasses<"base" | "label" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
298
293
  isDisabled?: boolean | undefined;
299
- isSelected?: boolean | undefined;
300
- pattern?: string | undefined;
301
- as?: import("@heroui/system-rsc").As<any> | undefined;
294
+ isReadOnly?: boolean | undefined;
302
295
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
303
- formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
304
- formEncType?: string | undefined;
305
- formMethod?: string | undefined;
306
- formNoValidate?: boolean | undefined;
307
- formTarget?: string | undefined;
296
+ placeholder?: string | undefined;
308
297
  excludeFromTabOrder?: boolean | undefined;
309
- startContent?: import("react").ReactNode;
310
- endContent?: import("react").ReactNode;
311
298
  autoComplete?: import("react").HTMLInputAutoCompleteAttribute | undefined;
312
- alt?: string | undefined;
313
299
  maxLength?: number | undefined;
314
300
  minLength?: number | undefined;
301
+ pattern?: string | undefined;
302
+ type?: import("react").HTMLInputTypeAttribute | undefined;
303
+ name?: string | undefined;
304
+ disableAnimation?: boolean | undefined;
305
+ as?: import("@heroui/system-rsc").As<any> | undefined;
306
+ key?: import("react").Key | null | undefined;
315
307
  accept?: string | undefined;
308
+ alt?: string | undefined;
316
309
  capture?: boolean | "user" | "environment" | undefined;
317
310
  checked?: boolean | undefined;
318
- src?: string | undefined;
319
- classNames?: import("@heroui/theme").SlotsToClasses<"label" | "base" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
320
- isReadOnly?: boolean | undefined;
321
- placeholder?: string | undefined;
311
+ formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
312
+ formEncType?: string | undefined;
313
+ formMethod?: string | undefined;
314
+ formNoValidate?: boolean | undefined;
315
+ formTarget?: string | undefined;
316
+ max?: string | number | undefined;
317
+ min?: string | number | undefined;
322
318
  readOnly?: boolean | undefined;
323
319
  required?: boolean | undefined;
320
+ src?: string | undefined;
321
+ startContent?: import("react").ReactNode;
322
+ endContent?: import("react").ReactNode;
324
323
  onValueChange?: ((isSelected: boolean) => void) | undefined;
324
+ isSelected?: boolean | undefined;
325
325
  defaultSelected?: boolean | undefined;
326
326
  thumbIcon?: import("react").ReactNode | ((props: import("@heroui/switch").SwitchThumbIconProps) => import("react").ReactNode);
327
327
  }, "ref"> & import("react").RefAttributes<import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>>;
@@ -43,7 +43,7 @@ export declare const UXTable: import("@heroui/system-rsc").InternalForwardRefRen
43
43
  vocab?: string | undefined;
44
44
  autoCorrect?: string | undefined;
45
45
  autoSave?: string | undefined;
46
- color?: "default" | "secondary" | "primary" | "success" | "danger" | "warning" | undefined;
46
+ color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | undefined;
47
47
  itemProp?: string | undefined;
48
48
  itemScope?: boolean | undefined;
49
49
  itemType?: string | undefined;
@@ -286,37 +286,37 @@ export declare const UXTable: import("@heroui/system-rsc").InternalForwardRefRen
286
286
  onTransitionStartCapture?: React.TransitionEventHandler<HTMLTableElement> | undefined;
287
287
  align?: "start" | "end" | "center" | undefined;
288
288
  size?: "md" | "lg" | undefined;
289
+ summary?: string | undefined;
289
290
  width?: string | number | undefined;
290
291
  radius?: "sm" | "md" | "lg" | "none" | undefined;
291
292
  layout?: "auto" | "fixed" | undefined;
292
293
  border?: number | undefined;
293
- key?: React.Key | null | undefined;
294
+ classNames?: import("@heroui/theme").SlotsToClasses<"table" | "base" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "wrapper" | "sortIcon" | "emptyWrapper" | "loadingWrapper"> | undefined;
294
295
  disableAnimation?: boolean | undefined;
295
- shadow?: "sm" | "md" | "lg" | "none" | undefined;
296
- summary?: string | undefined;
297
296
  as?: import("@heroui/system-rsc").As<any> | undefined;
298
- bgcolor?: string | undefined;
299
- cellPadding?: string | number | undefined;
300
- cellSpacing?: string | number | undefined;
301
- frame?: boolean | undefined;
302
- rules?: "none" | "all" | "rows" | "groups" | "columns" | undefined;
303
- classNames?: import("@heroui/theme").SlotsToClasses<"table" | "base" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "wrapper" | "sortIcon" | "emptyWrapper" | "loadingWrapper"> | undefined;
304
- topContent?: React.ReactNode;
305
- bottomContent?: React.ReactNode;
297
+ key?: React.Key | null | undefined;
298
+ baseRef?: import("@heroui/react-utils").ReactRef<HTMLElement | null> | undefined;
299
+ disallowEmptySelection?: boolean | undefined;
300
+ onSelectionChange?: ((keys: import("@react-types/shared").Selection) => void) | undefined;
301
+ disabledKeys?: Iterable<import("@react-types/shared").Key> | undefined;
306
302
  scrollRef?: import("@react-types/shared").RefObject<HTMLElement | null> | undefined;
307
303
  isVirtualized?: boolean | undefined;
304
+ shadow?: "sm" | "md" | "lg" | "none" | undefined;
305
+ topContent?: React.ReactNode;
306
+ bottomContent?: React.ReactNode;
307
+ keyboardDelegate?: import("@react-types/shared").KeyboardDelegate | undefined;
308
+ selectionBehavior?: "replace" | "toggle" | undefined;
309
+ shouldSelectOnPressUp?: boolean | undefined;
308
310
  escapeKeyBehavior?: "none" | "clearSelection" | undefined;
309
- disabledKeys?: Iterable<import("@react-types/shared").Key> | undefined;
310
311
  selectionMode?: import("@react-types/shared").SelectionMode | undefined;
311
- disallowEmptySelection?: boolean | undefined;
312
312
  selectedKeys?: "all" | Iterable<import("@react-types/shared").Key> | undefined;
313
313
  defaultSelectedKeys?: "all" | Iterable<import("@react-types/shared").Key> | undefined;
314
- onSelectionChange?: ((keys: import("@react-types/shared").Selection) => void) | undefined;
315
- baseRef?: import("@heroui/react-utils").ReactRef<HTMLElement | null> | undefined;
314
+ bgcolor?: string | undefined;
315
+ cellPadding?: string | number | undefined;
316
+ cellSpacing?: string | number | undefined;
317
+ frame?: boolean | undefined;
318
+ rules?: "none" | "all" | "rows" | "groups" | "columns" | undefined;
316
319
  isCompact?: boolean | undefined;
317
- keyboardDelegate?: import("@react-types/shared").KeyboardDelegate | undefined;
318
- selectionBehavior?: "replace" | "toggle" | undefined;
319
- shouldSelectOnPressUp?: boolean | undefined;
320
320
  hideHeader?: boolean | undefined;
321
321
  isStriped?: boolean | undefined;
322
322
  isHeaderSticky?: boolean | undefined;
@@ -40,7 +40,7 @@ declare const ExtendedTable: import("react").ForwardRefExoticComponent<Omit<{
40
40
  vocab?: string | undefined;
41
41
  autoCorrect?: string | undefined;
42
42
  autoSave?: string | undefined;
43
- color?: "default" | "secondary" | "primary" | "success" | "danger" | "warning" | undefined;
43
+ color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | undefined;
44
44
  itemProp?: string | undefined;
45
45
  itemScope?: boolean | undefined;
46
46
  itemType?: string | undefined;
@@ -283,37 +283,37 @@ declare const ExtendedTable: import("react").ForwardRefExoticComponent<Omit<{
283
283
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLTableElement> | undefined;
284
284
  align?: "start" | "end" | "center" | undefined;
285
285
  size?: "md" | "lg" | undefined;
286
+ summary?: string | undefined;
286
287
  width?: string | number | undefined;
287
288
  radius?: "sm" | "md" | "lg" | "none" | undefined;
288
289
  layout?: "auto" | "fixed" | undefined;
289
290
  border?: number | undefined;
290
- key?: import("react").Key | null | undefined;
291
+ classNames?: import("@heroui/theme").SlotsToClasses<"table" | "base" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "wrapper" | "sortIcon" | "emptyWrapper" | "loadingWrapper"> | undefined;
291
292
  disableAnimation?: boolean | undefined;
292
- shadow?: "sm" | "md" | "lg" | "none" | undefined;
293
- summary?: string | undefined;
294
293
  as?: import("@heroui/system-rsc").As<any> | undefined;
295
- bgcolor?: string | undefined;
296
- cellPadding?: string | number | undefined;
297
- cellSpacing?: string | number | undefined;
298
- frame?: boolean | undefined;
299
- rules?: "none" | "all" | "rows" | "groups" | "columns" | undefined;
300
- classNames?: import("@heroui/theme").SlotsToClasses<"table" | "base" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "wrapper" | "sortIcon" | "emptyWrapper" | "loadingWrapper"> | undefined;
301
- topContent?: import("react").ReactNode;
302
- bottomContent?: import("react").ReactNode;
294
+ key?: import("react").Key | null | undefined;
295
+ baseRef?: import("@heroui/react-utils").ReactRef<HTMLElement | null> | undefined;
296
+ disallowEmptySelection?: boolean | undefined;
297
+ onSelectionChange?: ((keys: import("@react-types/shared").Selection) => void) | undefined;
298
+ disabledKeys?: Iterable<import("@react-types/shared").Key> | undefined;
303
299
  scrollRef?: import("@react-types/shared").RefObject<HTMLElement | null> | undefined;
304
300
  isVirtualized?: boolean | undefined;
301
+ shadow?: "sm" | "md" | "lg" | "none" | undefined;
302
+ topContent?: import("react").ReactNode;
303
+ bottomContent?: import("react").ReactNode;
304
+ keyboardDelegate?: import("@react-types/shared").KeyboardDelegate | undefined;
305
+ selectionBehavior?: "replace" | "toggle" | undefined;
306
+ shouldSelectOnPressUp?: boolean | undefined;
305
307
  escapeKeyBehavior?: "none" | "clearSelection" | undefined;
306
- disabledKeys?: Iterable<import("@react-types/shared").Key> | undefined;
307
308
  selectionMode?: import("@react-types/shared").SelectionMode | undefined;
308
- disallowEmptySelection?: boolean | undefined;
309
309
  selectedKeys?: "all" | Iterable<import("@react-types/shared").Key> | undefined;
310
310
  defaultSelectedKeys?: "all" | Iterable<import("@react-types/shared").Key> | undefined;
311
- onSelectionChange?: ((keys: import("@react-types/shared").Selection) => void) | undefined;
312
- baseRef?: import("@heroui/react-utils").ReactRef<HTMLElement | null> | undefined;
311
+ bgcolor?: string | undefined;
312
+ cellPadding?: string | number | undefined;
313
+ cellSpacing?: string | number | undefined;
314
+ frame?: boolean | undefined;
315
+ rules?: "none" | "all" | "rows" | "groups" | "columns" | undefined;
313
316
  isCompact?: boolean | undefined;
314
- keyboardDelegate?: import("@react-types/shared").KeyboardDelegate | undefined;
315
- selectionBehavior?: "replace" | "toggle" | undefined;
316
- shouldSelectOnPressUp?: boolean | undefined;
317
317
  hideHeader?: boolean | undefined;
318
318
  isStriped?: boolean | undefined;
319
319
  isHeaderSticky?: boolean | undefined;
@@ -1,4 +1,3 @@
1
- export * from './theme-data';
2
1
  export * from './theme-switch';
3
2
  export * from './use-color-scheme';
4
3
  export * from './use-theme';
@@ -1,4 +1,3 @@
1
- export * from "./theme-data.js";
2
1
  export * from "./theme-switch.js";
3
2
  export * from "./use-color-scheme.js";
4
3
  export * from "./use-theme.js";
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ThemeItemType } from './theme-data';
2
+ import type { ThemeItemType } from '@particle-network/ui-shared';
3
3
  export interface ThemeItemProps extends ThemeItemType {
4
4
  isSelected: boolean;
5
5
  onClick: () => void;
@@ -7,17 +7,15 @@ import { Text } from "../typography/Text.js";
7
7
  const ThemeItem = ({ id, zhName, enName, isSelected, onClick })=>{
8
8
  const lang = useLang();
9
9
  return /*#__PURE__*/ jsxs(VStack, {
10
- center: true,
11
10
  gap: 2,
12
- className: cn('cursor-pointer hover:scale-105 transition-all duration-300', id),
11
+ items: "center",
12
+ className: cn('cursor-pointer', id),
13
13
  onClick: onClick,
14
14
  children: [
15
15
  /*#__PURE__*/ jsx("div", {
16
- className: cn('rounded-medium border-2', isSelected ? 'border-primary' : 'border-transparent'),
16
+ className: cn('rounded-medium border-2 hover:scale-105 transition-all duration-300', 'w-[100px] h-[59px] md:w-[120px] md:h-[71px]', isSelected ? 'border-primary' : 'border-transparent'),
17
17
  children: /*#__PURE__*/ jsxs("svg", {
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- width: "180",
20
- height: "106.5",
21
19
  viewBox: "0 0 120 71",
22
20
  fill: "none",
23
21
  children: [
@@ -138,6 +136,7 @@ const ThemeItem = ({ id, zhName, enName, isSelected, onClick })=>{
138
136
  })
139
137
  }),
140
138
  /*#__PURE__*/ jsx(Text, {
139
+ align: "center",
141
140
  children: 'zh' === lang ? zhName : enName
142
141
  })
143
142
  ]
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { DrawerProps } from '@heroui/drawer';
3
- export type UXThemeSwitchDrawerProps = Omit<DrawerProps, 'children'>;
4
- export declare const UXThemeSwitchDrawer: React.FC<UXThemeSwitchDrawerProps>;
2
+ import { type UXModalProps } from '../UXModal';
3
+ export type UXThemeSwitchModalProps = Omit<UXModalProps, 'children'>;
4
+ export declare const UXThemeSwitchModal: React.FC<UXThemeSwitchModalProps>;
5
5
  export interface UXThemeSwitchProps {
6
6
  children?: (onOpen: () => void) => React.ReactNode;
7
7
  }