@particle-network/ui-react 0.4.0-beta.3 → 0.4.0-beta.31

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 (56) hide show
  1. package/dist/components/ProgressWrapper/index.d.ts +1 -1
  2. package/dist/components/ProgressWrapper/index.js +18 -3
  3. package/dist/components/UXAutocomplete/index.d.ts +5 -0
  4. package/dist/components/UXAutocomplete/index.js +72 -0
  5. package/dist/components/UXButton/button-theme.js +15 -23
  6. package/dist/components/UXButton/use-button.js +2 -1
  7. package/dist/components/UXCheckbox/checkbox.extend.js +3 -3
  8. package/dist/components/UXDatePicker/index.js +1 -1
  9. package/dist/components/UXDateRangePicker/index.js +1 -1
  10. package/dist/components/UXDivider/divider.extend.d.ts +2 -2
  11. package/dist/components/UXDrawer/index.d.ts +9 -0
  12. package/dist/components/UXDrawer/index.js +89 -0
  13. package/dist/components/UXDropdown/dropdown-item.js +1 -1
  14. package/dist/components/UXEmpty/index.d.ts +2 -1
  15. package/dist/components/UXEmpty/index.js +8 -2
  16. package/dist/components/UXHint/index.js +1 -1
  17. package/dist/components/UXInput/index.d.ts +33 -33
  18. package/dist/components/UXInput/input.extend.d.ts +33 -33
  19. package/dist/components/UXModal/index.d.ts +1 -1
  20. package/dist/components/UXModal/index.js +7 -6
  21. package/dist/components/UXSelect/index.js +3 -3
  22. package/dist/components/UXSwitch/index.d.ts +22 -22
  23. package/dist/components/UXSwitch/switch.extend.d.ts +22 -22
  24. package/dist/components/UXTable/index.d.ts +19 -19
  25. package/dist/components/UXTable/table.extend.d.ts +19 -19
  26. package/dist/components/UXTabs/tabs.classes.js +7 -7
  27. package/dist/components/UXThemeSwitch/index.d.ts +0 -1
  28. package/dist/components/UXThemeSwitch/index.js +0 -1
  29. package/dist/components/UXThemeSwitch/theme-item.d.ts +1 -1
  30. package/dist/components/UXThemeSwitch/theme-item.js +4 -5
  31. package/dist/components/UXThemeSwitch/theme-switch.d.ts +3 -3
  32. package/dist/components/UXThemeSwitch/theme-switch.js +134 -101
  33. package/dist/components/UXThemeSwitch/use-color-scheme.d.ts +1 -1
  34. package/dist/components/UXThemeSwitch/use-color-scheme.js +3 -3
  35. package/dist/components/UXThemeSwitch/use-theme-color.d.ts +1 -19
  36. package/dist/components/UXThemeSwitch/use-theme-color.js +3 -3
  37. package/dist/components/UXThemeSwitch/use-theme-store.d.ts +5 -20
  38. package/dist/components/UXThemeSwitch/use-theme-store.js +14 -28
  39. package/dist/components/UXThemeSwitch/use-theme.d.ts +7 -12
  40. package/dist/components/UXThemeSwitch/use-theme.js +73 -80
  41. package/dist/components/UXToast/index.d.ts +7 -4
  42. package/dist/components/UXToast/index.js +21 -17
  43. package/dist/components/UXTooltip/tooltip.extend.d.ts +21 -21
  44. package/dist/components/UXTooltip/tooltip.extend.js +2 -1
  45. package/dist/components/index.d.ts +2 -0
  46. package/dist/components/index.js +2 -0
  47. package/dist/hooks/useI18n.d.ts +6 -2
  48. package/dist/hooks/useI18n.js +15 -7
  49. package/dist/utils/detect.js +1 -2
  50. package/dist/utils/variants.js +16 -16
  51. package/package.json +6 -7
  52. package/tailwind-preset.js +192 -93
  53. package/dist/components/UXThemeSwitch/theme-data.d.ts +0 -29
  54. package/dist/components/UXThemeSwitch/theme-data.js +0 -304
  55. package/dist/icons/index.d.ts +0 -14
  56. package/dist/icons/index.js +0 -120
@@ -24,7 +24,7 @@ export interface ProgressWrapperProps extends React.HTMLAttributes<HTMLDivElemen
24
24
  /**
25
25
  * 进度条颜色
26
26
  */
27
- color?: UXForegroundColor | 'transparent';
27
+ color?: UXForegroundColor | 'transparent' | `#${string}`;
28
28
  /**
29
29
  * 进度条 SVG 样式
30
30
  */
@@ -2,10 +2,12 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useMemo, useRef } from "react";
4
4
  import { cn } from "@heroui/theme";
5
- import { getHexColorFromCSSVariable, radiusMap } from "@particle-network/ui-shared";
5
+ import { radiusMap } from "@particle-network/ui-shared";
6
6
  import { useSize } from "ahooks";
7
7
  import { Center } from "../layout/index.js";
8
+ import { useThemeColor } from "../UXThemeSwitch/use-theme-color.js";
8
9
  const ProgressWrapper = ({ className, value = 0, width, height, radius = 'sm', strokeWidth = 1, color = 'primary', children, svgClassName, ...restProps })=>{
10
+ const uxColors = useThemeColor();
9
11
  const autoLayout = !width && !height;
10
12
  const containerRef = useRef(null);
11
13
  const { width: childWidth, height: childHeight } = useSize(containerRef) ?? {
@@ -34,8 +36,21 @@ const ProgressWrapper = ({ className, value = 0, width, height, radius = 'sm', s
34
36
  const rectXY = strokeWidth / 2;
35
37
  const perimeter = 2 * (rectWidth + rectHeight);
36
38
  const strokeDashoffset = perimeter * (1 - clampedProgress / 100);
37
- const colorValue = 'transparent' === color ? 'transparent' : getHexColorFromCSSVariable(color);
38
- const trackColor = 'transparent' === color ? 'transparent' : `${colorValue}40`;
39
+ const colorValue = useMemo(()=>{
40
+ if ('transparent' === color) return 'transparent';
41
+ if (color.startsWith('#')) return color;
42
+ return uxColors[color];
43
+ }, [
44
+ color,
45
+ uxColors
46
+ ]);
47
+ const trackColor = useMemo(()=>{
48
+ if ('transparent' === color) return 'transparent';
49
+ return `${colorValue}40`;
50
+ }, [
51
+ color,
52
+ colorValue
53
+ ]);
39
54
  const radiusValue = 'number' == typeof radius ? radius : radiusMap[radius];
40
55
  const createPathData = (x, y, w, h, r)=>{
41
56
  if (0 === r) return `
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { type AutocompleteProps } from '@heroui/autocomplete';
3
+ export type UXAutocompleteProps = AutocompleteProps;
4
+ export declare const UXAutocomplete: React.FC<UXAutocompleteProps>;
5
+ export { AutocompleteItem as UXAutocompleteItem, AutocompleteSection as UXAutocompleteSection, } from '@heroui/autocomplete';
@@ -0,0 +1,72 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Autocomplete, AutocompleteItem, AutocompleteSection } from "@heroui/autocomplete";
4
+ import ChevronDownIcon from "@particle-network/icons/web/ChevronDownIcon";
5
+ const UXAutocomplete = (props)=>{
6
+ const { fullWidth = false, classNames = {}, radius = 'sm', labelPlacement = 'outside-top', ...restProps } = props;
7
+ const { base, popoverContent, selectorButton, endContentWrapper, clearButton, listboxWrapper } = classNames;
8
+ return /*#__PURE__*/ jsx(Autocomplete, {
9
+ fullWidth: fullWidth,
10
+ classNames: {
11
+ base: [
12
+ 'ux-base',
13
+ base
14
+ ],
15
+ popoverContent: [
16
+ 'ux-popover-content',
17
+ popoverContent
18
+ ],
19
+ selectorButton: [
20
+ 'ux-selector-button w-[30px] h-[30px] min-w-[30px] min-h-[30px] rounded-small text-secondary',
21
+ selectorButton
22
+ ],
23
+ endContentWrapper: [
24
+ 'ux-end-content-wrapper',
25
+ endContentWrapper
26
+ ],
27
+ clearButton: [
28
+ 'ux-clear-button',
29
+ clearButton
30
+ ],
31
+ listboxWrapper: [
32
+ 'ux-listbox-wrapper p-0',
33
+ listboxWrapper
34
+ ]
35
+ },
36
+ labelPlacement: labelPlacement,
37
+ selectorIcon: /*#__PURE__*/ jsx(ChevronDownIcon, {}),
38
+ inputProps: {
39
+ classNames: {
40
+ label: 'text-tiny text-foreground-300',
41
+ inputWrapper: 'text-tiny h-[30px] min-h-[30px] rounded-small px-2.5',
42
+ input: 'text-tiny !outline-none',
43
+ clearButton: 'text-large'
44
+ }
45
+ },
46
+ popoverProps: {
47
+ isOpen: true,
48
+ classNames: {
49
+ base: 'before:bg-content1 before:shadow-box',
50
+ content: 'bg-content1 text-foreground-300 shadow-box text-tiny antialiased p-0'
51
+ }
52
+ },
53
+ listboxProps: {
54
+ classNames: {
55
+ base: 'p-md',
56
+ list: 'gap-0 [&_[data-slot="heading"]]:text-small [&_[data-slot="heading"]]:font-medium'
57
+ },
58
+ itemClasses: {
59
+ base: '!outline-none min-h-8 px-md rounded-small text-foreground-300 !outline-none data-[hover=true]:bg-background-200 data-[focus-visible=true]:bg-background-200 data-[focus-visible=true]:dark:bg-background-200 data-[hover=true]:text-default-foreground data-[selectable=true]:focus:!bg-background-200 data-[selectable=true]:focus:dark:!bg-background-200 gap-1',
60
+ title: 'text-tiny font-medium antialiased',
61
+ selectedIcon: '[&>svg>polyline]:stroke-[2.5]'
62
+ }
63
+ },
64
+ scrollShadowProps: {
65
+ isEnabled: false
66
+ },
67
+ radius: radius,
68
+ ...restProps
69
+ });
70
+ };
71
+ UXAutocomplete.displayName = 'UX.Autocomplete';
72
+ export { UXAutocomplete, AutocompleteItem as UXAutocompleteItem, AutocompleteSection as UXAutocompleteSection };
@@ -33,10 +33,10 @@ const button_theme_button = tv({
33
33
  text: 'bg-transparent min-w-0 w-auto h-auto px-0'
34
34
  },
35
35
  size: {
36
- xs: 'gap-2 rounded-[6px] !text-body3 min-w-min font-medium [&_[aria-label="Loading"]>div]:size-3',
37
- sm: 'gap-2 rounded-[6px] !text-body3 min-w-min font-medium [&_[aria-label="Loading"]>div]:size-3',
38
- md: 'gap-2 rounded-[6px] text-tiny min-w-min font-medium [&_[aria-label="Loading"]>div]:size-4',
39
- lg: 'gap-2 rounded-[10px] text-medium min-w-min font-medium [&_[aria-label="Loading"]>div]:size-6',
36
+ xs: 'gap-1 rounded-[4px] !text-caption1 min-w-min font-medium [&>svg]:size-[14px]',
37
+ sm: 'gap-1 rounded-[6px] !text-body3 min-w-min font-medium [&>svg]:size-4',
38
+ md: 'gap-1 rounded-[6px] text-tiny min-w-min font-medium [&>svg]:size-[18px]',
39
+ lg: 'gap-1 rounded-[10px] text-medium min-w-min font-medium [&>svg]:size-6',
40
40
  auto: 'min-w-min rounded-[10px]'
41
41
  },
42
42
  color: {
@@ -97,7 +97,7 @@ const button_theme_button = tv({
97
97
  'light',
98
98
  'bordered'
99
99
  ],
100
- class: 'px-sm h-5'
100
+ class: 'px-md h-5'
101
101
  },
102
102
  {
103
103
  size: 'sm',
@@ -107,7 +107,7 @@ const button_theme_button = tv({
107
107
  'light',
108
108
  'bordered'
109
109
  ],
110
- class: 'px-sm h-6'
110
+ class: 'px-lg h-6'
111
111
  },
112
112
  {
113
113
  size: 'md',
@@ -117,7 +117,7 @@ const button_theme_button = tv({
117
117
  'light',
118
118
  'bordered'
119
119
  ],
120
- class: 'px-md h-[30px]'
120
+ class: 'px-lg h-[30px]'
121
121
  },
122
122
  {
123
123
  size: 'lg',
@@ -178,64 +178,56 @@ const button_theme_button = tv({
178
178
  variant: 'light',
179
179
  color: 'default',
180
180
  class: [
181
- colorVariants.light["default"],
182
- 'data-[hover=true]:bg-default/40'
181
+ colorVariants.light["default"]
183
182
  ]
184
183
  },
185
184
  {
186
185
  variant: 'light',
187
186
  color: 'primary',
188
187
  class: [
189
- colorVariants.light.primary,
190
- 'data-[hover=true]:bg-primary/20'
188
+ colorVariants.light.primary
191
189
  ]
192
190
  },
193
191
  {
194
192
  variant: 'light',
195
193
  color: 'secondary',
196
194
  class: [
197
- colorVariants.light.secondary,
198
- 'data-[hover=true]:bg-default/40'
195
+ colorVariants.light.secondary
199
196
  ]
200
197
  },
201
198
  {
202
199
  variant: 'light',
203
200
  color: 'success',
204
201
  class: [
205
- colorVariants.light.success,
206
- 'data-[hover=true]:bg-success/20'
202
+ colorVariants.light.success
207
203
  ]
208
204
  },
209
205
  {
210
206
  variant: 'light',
211
207
  color: 'warning',
212
208
  class: [
213
- colorVariants.light.warning,
214
- 'data-[hover=true]:bg-warning/20'
209
+ colorVariants.light.warning
215
210
  ]
216
211
  },
217
212
  {
218
213
  variant: 'light',
219
214
  color: 'danger',
220
215
  class: [
221
- colorVariants.light.danger,
222
- 'data-[hover=true]:bg-danger/20'
216
+ colorVariants.light.danger
223
217
  ]
224
218
  },
225
219
  {
226
220
  variant: 'light',
227
221
  color: 'bullish',
228
222
  class: [
229
- colorVariants.light.bullish,
230
- 'data-[hover=true]:bg-bullish/20'
223
+ colorVariants.light.bullish
231
224
  ]
232
225
  },
233
226
  {
234
227
  variant: 'light',
235
228
  color: 'bearish',
236
229
  class: [
237
- colorVariants.light.bearish,
238
- 'data-[hover=true]:bg-bearish/20'
230
+ colorVariants.light.bearish
239
231
  ]
240
232
  },
241
233
  {
@@ -101,7 +101,8 @@ function useButton(props) {
101
101
  const endContent = getIconClone(endContentProp);
102
102
  const spinnerSize = useMemo(()=>{
103
103
  const buttonSpinnerSizeMap = {
104
- sm: 14,
104
+ xs: 14,
105
+ sm: 16,
105
106
  md: 18,
106
107
  lg: 24
107
108
  };
@@ -30,7 +30,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
30
30
  wrapper: [
31
31
  'w-3.5 h-3.5 me-0',
32
32
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
33
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
33
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1',
34
34
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
35
35
  ],
36
36
  label: '!text-body3 font-medium',
@@ -40,7 +40,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
40
40
  wrapper: [
41
41
  'w-4 h-4 me-0',
42
42
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
43
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-2',
43
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
44
44
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
45
45
  ],
46
46
  label: '!text-body2 font-medium',
@@ -50,7 +50,7 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
50
50
  wrapper: [
51
51
  'w-[18px] h-[18px] me-0',
52
52
  'rounded-[calc(theme(borderRadius.medium)*0.3)]',
53
- 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-2',
53
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-1.5',
54
54
  'after:rounded-[calc(theme(borderRadius.medium)*0.3)]'
55
55
  ],
56
56
  label: '!text-body1 font-medium',
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { DatePicker } from "@heroui/date-picker";
4
- import { CalendarIcon } from "../../icons/index.js";
4
+ import CalendarIcon from "@particle-network/icons/web/CalendarIcon";
5
5
  import { calendarClassNames } from "../UXCalendar/index.js";
6
6
  const classes = {
7
7
  inputWrapper: 'bg-background-200 h-[30px] min-h-[30px] rounded-small',
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { DateRangePicker } from "@heroui/date-picker";
4
- import { CalendarIcon } from "../../icons/index.js";
4
+ import CalendarIcon from "@particle-network/icons/web/CalendarIcon";
5
5
  import { calendarClassNames } from "../UXCalendar/index.js";
6
6
  const classes = {
7
7
  inputWrapper: 'bg-background-200 h-[30px] min-h-[30px] rounded-small',
@@ -279,8 +279,8 @@ declare const ExtendedDivider: import("react").ForwardRefExoticComponent<Omit<{
279
279
  onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
280
280
  onTransitionStart?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
281
281
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
282
- orientation?: "vertical" | "horizontal" | undefined;
283
- key?: import("react").Key | null | undefined;
284
282
  as?: import("@heroui/system-rsc").As<any> | undefined;
283
+ key?: import("react").Key | null | undefined;
284
+ orientation?: "vertical" | "horizontal" | undefined;
285
285
  }, "ref"> & import("react").RefAttributes<import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>>;
286
286
  export default ExtendedDivider;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { type DrawerProps } from '@heroui/drawer';
3
+ export type UXDrawerProps = Omit<DrawerProps, 'closeButton'> & {
4
+ title?: React.ReactNode;
5
+ footer?: React.ReactNode;
6
+ tip?: React.ReactNode;
7
+ titleAlign?: 'left' | 'center';
8
+ };
9
+ export declare const UXDrawer: React.FC<UXDrawerProps>;
@@ -0,0 +1,89 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Drawer, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader } from "@heroui/drawer";
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 UXDrawer = (props)=>{
9
+ const { title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
10
+ return /*#__PURE__*/ jsx(Drawer, {
11
+ backdrop: backdrop,
12
+ scrollBehavior: scrollBehavior,
13
+ classNames: {
14
+ wrapper: [
15
+ classNames?.wrapper
16
+ ],
17
+ base: [
18
+ 'py-6 gap-5 shadow-box',
19
+ 'max-md:rounded-none',
20
+ classNames?.base
21
+ ],
22
+ backdrop: [
23
+ 'backdrop-blur-[1px] bg-black/50 dark:bg-black/70',
24
+ classNames?.backdrop
25
+ ],
26
+ header: [
27
+ 'px-lg py-0 max-md:text-h3',
28
+ 'md:px-6 md:text-h2',
29
+ 'center' === titleAlign && 'justify-center',
30
+ classNames?.header
31
+ ],
32
+ body: [
33
+ 'px-lg md:px-6 py-0 no-scrollbar',
34
+ classNames?.body
35
+ ],
36
+ footer: [
37
+ 'gap-lg px-lg md:px-6 py-0 flex-col items-stretch',
38
+ classNames?.footer
39
+ ],
40
+ closeButton: [
41
+ 'top-5 end-4 text-foreground',
42
+ classNames?.closeButton
43
+ ]
44
+ },
45
+ closeButton: /*#__PURE__*/ jsx(UXButton, {
46
+ isIconOnly: true,
47
+ variant: "light",
48
+ children: /*#__PURE__*/ jsx(CloseIcon, {
49
+ size: 24
50
+ })
51
+ }),
52
+ ...restProps,
53
+ children: /*#__PURE__*/ jsxs(DrawerContent, {
54
+ children: [
55
+ title ? /*#__PURE__*/ jsx(DrawerHeader, {
56
+ className: "capitalize",
57
+ children: title
58
+ }) : null,
59
+ /*#__PURE__*/ jsx(DrawerBody, {
60
+ children: children
61
+ }),
62
+ footer ? /*#__PURE__*/ jsx(DrawerFooter, {
63
+ children: footer
64
+ }) : null,
65
+ tip ? /*#__PURE__*/ jsx(DrawerFooter, {
66
+ className: "-mt-md",
67
+ children: /*#__PURE__*/ jsxs(Flex, {
68
+ gap: 2,
69
+ children: [
70
+ /*#__PURE__*/ jsx(Center, {
71
+ className: "h-4",
72
+ children: /*#__PURE__*/ jsx(Circle, {
73
+ className: "bg-foreground-300 h-[5px] w-[5px]"
74
+ })
75
+ }),
76
+ /*#__PURE__*/ jsx(Text, {
77
+ body2: true,
78
+ color: "secondary",
79
+ children: tip
80
+ })
81
+ ]
82
+ })
83
+ }) : null
84
+ ]
85
+ })
86
+ });
87
+ };
88
+ UXDrawer.displayName = 'UX.Drawer';
89
+ export { UXDrawer };
@@ -177,7 +177,7 @@ const classes = {
177
177
  variant: 'flat',
178
178
  color: 'default',
179
179
  class: {
180
- base: 'data-[hover=true]:bg-background-200 data-[hover=true]:text-default-foreground'
180
+ base: 'data-[hover=true]:bg-background-200 data-[focus-visible=true]:bg-background-200 data-[focus-visible=true]:dark:bg-background-200 data-[hover=true]:text-default-foreground data-[selectable=true]:focus:!bg-background-200 data-[selectable=true]:focus:dark:!bg-background-200'
181
181
  }
182
182
  },
183
183
  {
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { type IconProps } from '../../icons';
2
+ import type { IconProps } from '@particle-network/icons/web/types';
3
3
  import { type VStackProps } from '../layout';
4
4
  export interface UXEmptyProps extends VStackProps {
5
5
  iconProps?: IconProps;
6
6
  text?: React.ReactNode;
7
+ action?: React.ReactNode;
7
8
  }
8
9
  export declare const UXEmpty: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"div", UXEmptyProps, never>;
@@ -1,17 +1,19 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { forwardRef } from "@heroui/system";
4
+ import { cn } from "@heroui/theme";
5
+ import EmptyIcon from "@particle-network/icons/web/EmptyIcon";
4
6
  import { useI18n } from "../../hooks/useI18n.js";
5
- import { EmptyIcon } from "../../icons/index.js";
6
7
  import { VStack } from "../layout/index.js";
7
8
  import { Text } from "../typography/Text.js";
8
9
  const UXEmpty = forwardRef((props, ref)=>{
9
10
  const i18n = useI18n();
10
- const { text = i18n.table.emptyContent, iconProps, ...restProps } = props;
11
+ const { text = i18n.table.emptyContent, iconProps, className, action, ...restProps } = props;
11
12
  return /*#__PURE__*/ jsxs(VStack, {
12
13
  ref: ref,
13
14
  center: true,
14
15
  gap: 1,
16
+ className: cn('w-full h-full', className),
15
17
  ...restProps,
16
18
  children: [
17
19
  /*#__PURE__*/ jsx(EmptyIcon, {
@@ -24,6 +26,10 @@ const UXEmpty = forwardRef((props, ref)=>{
24
26
  color: "secondary",
25
27
  fontWeight: "normal",
26
28
  children: text
29
+ }),
30
+ action && /*#__PURE__*/ jsx("div", {
31
+ className: "mt-lg",
32
+ children: action
27
33
  })
28
34
  ]
29
35
  });
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn } from "@heroui/theme";
4
+ import CircleQuestionIcon from "@particle-network/icons/web/CircleQuestionIcon";
4
5
  import { Center, UXPopover, UXPopoverContent, UXPopoverTrigger, UXTooltip } from "../index.js";
5
- import { CircleQuestionIcon } from "../../icons/index.js";
6
6
  const UXHint = (props)=>{
7
7
  const { content, children, buttonClassName, iconClassName, triggerType = 'hover', ...restProps } = props;
8
8
  const renderTriggerContent = ()=>/*#__PURE__*/ jsx(Center, {
@@ -43,7 +43,7 @@ export declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
43
43
  vocab?: string | undefined;
44
44
  autoCorrect?: string | undefined;
45
45
  autoSave?: string | undefined;
46
- color?: "default" | "secondary" | "primary" | "success" | "danger" | "warning" | "bullish" | "bearish" | undefined;
46
+ color?: "default" | "success" | "secondary" | "primary" | "danger" | "warning" | "bullish" | "bearish" | undefined;
47
47
  itemProp?: string | undefined;
48
48
  itemScope?: boolean | undefined;
49
49
  itemType?: string | undefined;
@@ -288,6 +288,7 @@ export declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
288
288
  list?: string | undefined;
289
289
  step?: string | number | undefined;
290
290
  size?: "sm" | "md" | "lg" | undefined;
291
+ label?: React.ReactNode;
291
292
  value?: string | (readonly string[] & string) | undefined;
292
293
  width?: string | number | undefined;
293
294
  height?: string | number | undefined;
@@ -295,51 +296,50 @@ export declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
295
296
  multiple?: boolean | undefined;
296
297
  disabled?: boolean | undefined;
297
298
  variant?: "flat" | "bordered" | "faded" | "underlined" | undefined;
298
- max?: string | number | undefined;
299
- min?: string | number | undefined;
300
- name?: string | undefined;
301
- type?: string | undefined;
302
- key?: React.Key | null | undefined;
303
- labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
304
- label?: React.ReactNode;
305
- disableAnimation?: boolean | undefined;
299
+ isClearable?: boolean | undefined;
300
+ classNames?: import("@heroui/theme").SlotsToClasses<"base" | "input" | "label" | "description" | "errorMessage" | "clearButton" | "mainWrapper" | "inputWrapper" | "innerWrapper" | "helperWrapper"> | undefined;
306
301
  isDisabled?: boolean | undefined;
307
- pattern?: string | undefined;
308
- as?: import("@heroui/system-rsc").As<any> | undefined;
302
+ isReadOnly?: boolean | undefined;
303
+ isRequired?: boolean | undefined;
304
+ isInvalid?: boolean | undefined;
305
+ validationState?: import("@react-types/shared").ValidationState | undefined;
306
+ validationBehavior?: "aria" | "native" | undefined;
307
+ validate?: ((value: string) => import("@react-types/shared").ValidationError | true | null | undefined) | undefined;
308
+ description?: React.ReactNode;
309
+ errorMessage?: React.ReactNode | ((v: import("@react-types/shared").ValidationResult) => React.ReactNode);
309
310
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
310
- formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
311
- formEncType?: string | undefined;
312
- formMethod?: string | undefined;
313
- formNoValidate?: boolean | undefined;
314
- formTarget?: string | undefined;
311
+ placeholder?: string | undefined;
315
312
  excludeFromTabOrder?: boolean | undefined;
316
- startContent?: React.ReactNode;
317
- endContent?: React.ReactNode;
318
- onClear?: (() => void) | undefined;
319
313
  autoComplete?: string | undefined;
320
- alt?: string | undefined;
321
314
  maxLength?: number | undefined;
322
315
  minLength?: number | undefined;
316
+ pattern?: string | undefined;
317
+ type?: string | undefined;
318
+ name?: string | undefined;
319
+ labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
320
+ disableAnimation?: boolean | undefined;
321
+ as?: import("@heroui/system-rsc").As<any> | undefined;
322
+ key?: React.Key | null | undefined;
323
323
  accept?: string | undefined;
324
+ alt?: string | undefined;
324
325
  capture?: boolean | "user" | "environment" | undefined;
325
326
  checked?: boolean | undefined;
326
- src?: string | undefined;
327
- classNames?: import("@heroui/theme").SlotsToClasses<"label" | "inputWrapper" | "base" | "input" | "errorMessage" | "helperWrapper" | "description" | "innerWrapper" | "mainWrapper" | "clearButton"> | undefined;
328
- isReadOnly?: boolean | undefined;
329
- validationState?: import("@react-types/shared").ValidationState | undefined;
330
- isInvalid?: boolean | undefined;
331
- errorMessage?: React.ReactNode | ((v: import("@react-types/shared").ValidationResult) => React.ReactNode);
332
- placeholder?: string | undefined;
327
+ formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
328
+ formEncType?: string | undefined;
329
+ formMethod?: string | undefined;
330
+ formNoValidate?: boolean | undefined;
331
+ formTarget?: string | undefined;
332
+ max?: string | number | undefined;
333
+ min?: string | number | undefined;
333
334
  readOnly?: boolean | undefined;
334
335
  required?: boolean | undefined;
335
- onValueChange?: ((value: string) => void) | undefined;
336
- isRequired?: boolean | undefined;
337
- validationBehavior?: "aria" | "native" | undefined;
338
- validate?: ((value: string) => import("@react-types/shared").ValidationError | true | null | undefined) | undefined;
339
- description?: React.ReactNode;
340
- isClearable?: boolean | undefined;
336
+ src?: string | undefined;
341
337
  baseRef?: React.Ref<HTMLDivElement> | undefined;
342
338
  wrapperRef?: React.Ref<HTMLDivElement> | undefined;
343
339
  innerWrapperRef?: React.Ref<HTMLDivElement> | undefined;
340
+ startContent?: React.ReactNode;
341
+ endContent?: React.ReactNode;
342
+ onClear?: (() => void) | undefined;
343
+ onValueChange?: ((value: string) => void) | undefined;
344
344
  textAlign?: "center" | "left" | "right" | undefined;
345
345
  }, "ref"> & React.RefAttributes<React.ReactElement<unknown, string | React.JSXElementConstructor<any>>>, "ref"> & React.RefAttributes<HTMLInputElement>>;