asterui 0.12.7 → 0.12.8

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 (175) hide show
  1. package/dist/components/Container.d.ts +7 -1
  2. package/dist/components/Fieldset.d.ts +6 -0
  3. package/dist/components/Filter.d.ts +27 -0
  4. package/dist/components/Grid.d.ts +1 -1
  5. package/dist/components/Modal.d.ts +7 -2
  6. package/dist/components/ThemeController.d.ts +12 -4
  7. package/dist/index.d.ts +4 -2
  8. package/dist/index.js +167 -165
  9. package/dist/index.js.map +1 -1
  10. package/dist/index100.js +44 -11
  11. package/dist/index100.js.map +1 -1
  12. package/dist/index101.js +10 -12
  13. package/dist/index101.js.map +1 -1
  14. package/dist/index102.js +14 -7
  15. package/dist/index102.js.map +1 -1
  16. package/dist/index103.js +7 -12
  17. package/dist/index103.js.map +1 -1
  18. package/dist/index104.js +11 -29
  19. package/dist/index104.js.map +1 -1
  20. package/dist/index105.js +29 -16
  21. package/dist/index105.js.map +1 -1
  22. package/dist/index106.js +21 -0
  23. package/dist/index106.js.map +1 -0
  24. package/dist/index18.js +23 -15
  25. package/dist/index18.js.map +1 -1
  26. package/dist/index2.js +41 -34
  27. package/dist/index2.js.map +1 -1
  28. package/dist/index21.js +1 -1
  29. package/dist/index25.js +8 -8
  30. package/dist/index25.js.map +1 -1
  31. package/dist/index27.js +13 -8
  32. package/dist/index27.js.map +1 -1
  33. package/dist/index29.js +50 -61
  34. package/dist/index29.js.map +1 -1
  35. package/dist/index30.js +60 -181
  36. package/dist/index30.js.map +1 -1
  37. package/dist/index31.js +184 -18
  38. package/dist/index31.js.map +1 -1
  39. package/dist/index32.js +15 -217
  40. package/dist/index32.js.map +1 -1
  41. package/dist/index33.js +216 -1078
  42. package/dist/index33.js.map +1 -1
  43. package/dist/index34.js +1086 -17
  44. package/dist/index34.js.map +1 -1
  45. package/dist/index35.js +17 -121
  46. package/dist/index35.js.map +1 -1
  47. package/dist/index36.js +119 -37
  48. package/dist/index36.js.map +1 -1
  49. package/dist/index37.js +34 -208
  50. package/dist/index37.js.map +1 -1
  51. package/dist/index38.js +214 -97
  52. package/dist/index38.js.map +1 -1
  53. package/dist/index39.js +93 -158
  54. package/dist/index39.js.map +1 -1
  55. package/dist/index40.js +155 -139
  56. package/dist/index40.js.map +1 -1
  57. package/dist/index41.js +146 -15
  58. package/dist/index41.js.map +1 -1
  59. package/dist/index42.js +15 -17
  60. package/dist/index42.js.map +1 -1
  61. package/dist/index43.js +17 -21
  62. package/dist/index43.js.map +1 -1
  63. package/dist/index44.js +18 -116
  64. package/dist/index44.js.map +1 -1
  65. package/dist/index45.js +116 -10
  66. package/dist/index45.js.map +1 -1
  67. package/dist/index46.js +13 -35
  68. package/dist/index46.js.map +1 -1
  69. package/dist/index47.js +35 -34
  70. package/dist/index47.js.map +1 -1
  71. package/dist/index48.js +34 -116
  72. package/dist/index48.js.map +1 -1
  73. package/dist/index49.js +114 -174
  74. package/dist/index49.js.map +1 -1
  75. package/dist/index50.js +165 -136
  76. package/dist/index50.js.map +1 -1
  77. package/dist/index51.js +146 -11
  78. package/dist/index51.js.map +1 -1
  79. package/dist/index52.js +10 -20
  80. package/dist/index52.js.map +1 -1
  81. package/dist/index53.js +22 -14
  82. package/dist/index53.js.map +1 -1
  83. package/dist/index54.js +14 -7
  84. package/dist/index54.js.map +1 -1
  85. package/dist/index55.js +6 -268
  86. package/dist/index55.js.map +1 -1
  87. package/dist/index56.js +311 -17
  88. package/dist/index56.js.map +1 -1
  89. package/dist/index57.js +17 -122
  90. package/dist/index57.js.map +1 -1
  91. package/dist/index58.js +120 -108
  92. package/dist/index58.js.map +1 -1
  93. package/dist/index59.js +107 -167
  94. package/dist/index59.js.map +1 -1
  95. package/dist/index60.js +167 -29
  96. package/dist/index60.js.map +1 -1
  97. package/dist/index61.js +30 -120
  98. package/dist/index61.js.map +1 -1
  99. package/dist/index62.js +116 -80
  100. package/dist/index62.js.map +1 -1
  101. package/dist/index63.js +85 -19
  102. package/dist/index63.js.map +1 -1
  103. package/dist/index64.js +19 -73
  104. package/dist/index64.js.map +1 -1
  105. package/dist/index65.js +71 -54
  106. package/dist/index65.js.map +1 -1
  107. package/dist/index66.js +56 -44
  108. package/dist/index66.js.map +1 -1
  109. package/dist/index67.js +42 -49
  110. package/dist/index67.js.map +1 -1
  111. package/dist/index68.js +52 -62
  112. package/dist/index68.js.map +1 -1
  113. package/dist/index69.js +56 -101
  114. package/dist/index69.js.map +1 -1
  115. package/dist/index70.js +107 -41
  116. package/dist/index70.js.map +1 -1
  117. package/dist/index71.js +41 -68
  118. package/dist/index71.js.map +1 -1
  119. package/dist/index72.js +66 -19
  120. package/dist/index72.js.map +1 -1
  121. package/dist/index73.js +18 -43
  122. package/dist/index73.js.map +1 -1
  123. package/dist/index74.js +44 -132
  124. package/dist/index74.js.map +1 -1
  125. package/dist/index75.js +132 -50
  126. package/dist/index75.js.map +1 -1
  127. package/dist/index76.js +51 -21
  128. package/dist/index76.js.map +1 -1
  129. package/dist/index77.js +22 -31
  130. package/dist/index77.js.map +1 -1
  131. package/dist/index78.js +31 -22
  132. package/dist/index78.js.map +1 -1
  133. package/dist/index79.js +20 -327
  134. package/dist/index79.js.map +1 -1
  135. package/dist/index80.js +323 -50
  136. package/dist/index80.js.map +1 -1
  137. package/dist/index81.js +56 -40
  138. package/dist/index81.js.map +1 -1
  139. package/dist/index82.js +40 -23
  140. package/dist/index82.js.map +1 -1
  141. package/dist/index83.js +21 -93
  142. package/dist/index83.js.map +1 -1
  143. package/dist/index84.js +88 -123
  144. package/dist/index84.js.map +1 -1
  145. package/dist/index85.js +147 -152
  146. package/dist/index85.js.map +1 -1
  147. package/dist/index86.js +159 -63
  148. package/dist/index86.js.map +1 -1
  149. package/dist/index87.js +65 -35
  150. package/dist/index87.js.map +1 -1
  151. package/dist/index88.js +35 -234
  152. package/dist/index88.js.map +1 -1
  153. package/dist/index89.js +231 -31
  154. package/dist/index89.js.map +1 -1
  155. package/dist/index90.js +34 -210
  156. package/dist/index90.js.map +1 -1
  157. package/dist/index91.js +195 -198
  158. package/dist/index91.js.map +1 -1
  159. package/dist/index92.js +159 -241
  160. package/dist/index92.js.map +1 -1
  161. package/dist/index93.js +283 -166
  162. package/dist/index93.js.map +1 -1
  163. package/dist/index94.js +173 -253
  164. package/dist/index94.js.map +1 -1
  165. package/dist/index95.js +258 -14
  166. package/dist/index95.js.map +1 -1
  167. package/dist/index96.js +12 -31
  168. package/dist/index96.js.map +1 -1
  169. package/dist/index97.js +32 -5
  170. package/dist/index97.js.map +1 -1
  171. package/dist/index98.js +5 -13
  172. package/dist/index98.js.map +1 -1
  173. package/dist/index99.js +11 -43
  174. package/dist/index99.js.map +1 -1
  175. package/package.json +1 -1
@@ -1,6 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Container content */
3
4
  children: React.ReactNode;
4
- size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
5
+ /** Max width size */
6
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
7
+ /** Center container horizontally */
8
+ centered?: boolean;
9
+ /** Add horizontal padding */
10
+ padding?: boolean;
5
11
  }
6
12
  export declare const Container: React.FC<ContainerProps>;
@@ -7,9 +7,15 @@ export interface FieldsetLegendProps {
7
7
  children: React.ReactNode;
8
8
  className?: string;
9
9
  }
10
+ export interface FieldsetLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
11
+ children: React.ReactNode;
12
+ className?: string;
13
+ }
10
14
  declare function FieldsetRoot({ children, className, ...props }: FieldsetProps): import("react/jsx-runtime").JSX.Element;
11
15
  declare function FieldsetLegend({ children, className }: FieldsetLegendProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function FieldsetLabel({ children, className, ...props }: FieldsetLabelProps): import("react/jsx-runtime").JSX.Element;
12
17
  export declare const Fieldset: typeof FieldsetRoot & {
13
18
  Legend: typeof FieldsetLegend;
19
+ Label: typeof FieldsetLabel;
14
20
  };
15
21
  export {};
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ export interface FilterOption {
3
+ label: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface FilterProps {
8
+ /** Filter options */
9
+ options: (string | FilterOption)[];
10
+ /** Controlled value */
11
+ value?: string;
12
+ /** Default value for uncontrolled mode */
13
+ defaultValue?: string;
14
+ /** Change handler */
15
+ onChange?: (value: string | undefined) => void;
16
+ /** Radio group name (auto-generated if not provided) */
17
+ name?: string;
18
+ /** Button size */
19
+ size?: 'xs' | 'sm' | 'md' | 'lg';
20
+ /** Show reset button */
21
+ showReset?: boolean;
22
+ /** Reset button label */
23
+ resetLabel?: React.ReactNode;
24
+ /** Additional CSS classes for container */
25
+ className?: string;
26
+ }
27
+ export declare const Filter: React.FC<FilterProps>;
@@ -19,7 +19,7 @@ export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
19
19
  xxl?: number;
20
20
  }
21
21
  export declare function Row({ children, cols, gutter, justify, align, className, style: userStyle, ...rest }: RowProps): import("react/jsx-runtime").JSX.Element;
22
- export declare function Col({ children, span, offset, order, xs, sm, md, lg, xl, xxl, className, ...rest }: ColProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Col({ children, span, offset, order, xs, sm, md, lg, xl, xxl, className, style: userStyle, ...rest }: ColProps): import("react/jsx-runtime").JSX.Element;
23
23
  export declare const Grid: {
24
24
  Row: typeof Row;
25
25
  Col: typeof Col;
@@ -1,4 +1,8 @@
1
1
  import { default as React } from 'react';
2
+ export type ModalPosition = 'top' | 'middle' | 'bottom';
3
+ export type ModalAlign = 'start' | 'end';
4
+ export type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5
+ export type ResponsivePosition = Partial<Record<Breakpoint, ModalPosition>>;
2
6
  export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDialogElement>, 'title'> {
3
7
  children: React.ReactNode;
4
8
  title?: React.ReactNode;
@@ -10,8 +14,9 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDialogElement>
10
14
  cancelText?: string;
11
15
  maskClosable?: boolean;
12
16
  closable?: boolean;
13
- position?: 'top' | 'middle' | 'bottom';
14
- align?: 'start' | 'end';
17
+ /** Modal position - can be a single value or responsive object */
18
+ position?: ModalPosition | ResponsivePosition;
19
+ align?: ModalAlign;
15
20
  /** Width of the modal box */
16
21
  width?: number | string;
17
22
  /** Center the modal vertically */
@@ -1,20 +1,28 @@
1
1
  export interface ThemeControllerSwapProps {
2
2
  lightTheme?: string;
3
3
  darkTheme?: string;
4
- initialTheme?: string;
5
4
  onChange?: (theme: string) => void;
6
5
  className?: string;
7
6
  }
8
7
  export interface ThemeControllerDropdownProps {
9
8
  themes: string[];
10
- initialTheme?: string;
9
+ defaultTheme?: string;
11
10
  onChange?: (theme: string) => void;
12
11
  className?: string;
13
12
  }
14
- declare function ThemeControllerSwap({ lightTheme, darkTheme, initialTheme, onChange, className, }: ThemeControllerSwapProps): import("react/jsx-runtime").JSX.Element;
15
- declare function ThemeControllerDropdown({ themes, initialTheme, onChange, className, }: ThemeControllerDropdownProps): import("react/jsx-runtime").JSX.Element;
13
+ export interface ThemeControllerToggleProps {
14
+ lightTheme?: string;
15
+ darkTheme?: string;
16
+ onChange?: (theme: string) => void;
17
+ size?: 'xs' | 'sm' | 'md' | 'lg';
18
+ className?: string;
19
+ }
20
+ declare function ThemeControllerSwap({ lightTheme, darkTheme, onChange, className, }: ThemeControllerSwapProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function ThemeControllerDropdown({ themes, defaultTheme, onChange, className, }: ThemeControllerDropdownProps): import("react/jsx-runtime").JSX.Element;
22
+ declare function ThemeControllerToggle({ lightTheme, darkTheme, onChange, size, className, }: ThemeControllerToggleProps): import("react/jsx-runtime").JSX.Element;
16
23
  export declare const ThemeController: {
17
24
  Swap: typeof ThemeControllerSwap;
18
25
  Dropdown: typeof ThemeControllerDropdown;
26
+ Toggle: typeof ThemeControllerToggle;
19
27
  };
20
28
  export {};
package/dist/index.d.ts CHANGED
@@ -52,6 +52,8 @@ export { Fieldset } from './components/Fieldset';
52
52
  export type { FieldsetProps, FieldsetLegendProps } from './components/Fieldset';
53
53
  export { FileInput } from './components/FileInput';
54
54
  export type { FileInputProps } from './components/FileInput';
55
+ export { Filter } from './components/Filter';
56
+ export type { FilterProps, FilterOption } from './components/Filter';
55
57
  export { Flex } from './components/Flex';
56
58
  export type { FlexProps } from './components/Flex';
57
59
  export { FloatButton } from './components/FloatButton';
@@ -105,7 +107,7 @@ export type { PhoneProps } from './components/Phone';
105
107
  export { Window } from './components/Window';
106
108
  export type { WindowProps } from './components/Window';
107
109
  export { Modal } from './components/Modal';
108
- export type { ModalProps, ModalFuncProps } from './components/Modal';
110
+ export type { ModalProps, ModalFuncProps, ModalPosition, ModalAlign, ResponsivePosition } from './components/Modal';
109
111
  export { Navbar } from './components/Navbar';
110
112
  export type { NavbarProps } from './components/Navbar';
111
113
  export { notification } from './components/Notification';
@@ -163,7 +165,7 @@ export type { TextRotateProps, TextRotateDuration } from './components/TextRotat
163
165
  export { Tag, CheckableTag } from './components/Tag';
164
166
  export type { TagProps, CheckableTagProps } from './components/Tag';
165
167
  export { ThemeController } from './components/ThemeController';
166
- export type { ThemeControllerSwapProps, ThemeControllerDropdownProps } from './components/ThemeController';
168
+ export type { ThemeControllerSwapProps, ThemeControllerDropdownProps, ThemeControllerToggleProps } from './components/ThemeController';
167
169
  export { TimePicker } from './components/TimePicker';
168
170
  export type { TimePickerProps } from './components/TimePicker';
169
171
  export { Timeline } from './components/Timeline';
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ import { Checkbox as P } from "./index10.js";
10
10
  import { Chat as b } from "./index11.js";
11
11
  import { ColorPicker as h } from "./index12.js";
12
12
  import { Card as w } from "./index13.js";
13
- import { Cascader as R } from "./index14.js";
14
- import { Chart as F } from "./index15.js";
13
+ import { Cascader as F } from "./index14.js";
14
+ import { Chart as v } from "./index15.js";
15
15
  import { Carousel as A } from "./index16.js";
16
16
  import { Collapse as L } from "./index17.js";
17
17
  import { Container as H } from "./index18.js";
@@ -25,83 +25,84 @@ import { Divider as X } from "./index25.js";
25
25
  import { Drawer as Z } from "./index26.js";
26
26
  import { Fieldset as $ } from "./index27.js";
27
27
  import { FileInput as ro } from "./index28.js";
28
- import { Flex as to } from "./index29.js";
29
- import { FloatButton as mo } from "./index30.js";
30
- import { Footer as xo } from "./index31.js";
31
- import { Form as io, useFormInstance as no } from "./index32.js";
32
- import { Col as uo, Grid as lo, Row as co } from "./index33.js";
33
- import { Hero as To } from "./index34.js";
34
- import { Image as Po } from "./index35.js";
35
- import { Indicator as bo } from "./index36.js";
36
- import { Dropdown as ho } from "./index37.js";
37
- import { Empty as wo } from "./index38.js";
38
- import { Input as Ro } from "./index39.js";
39
- import { InputNumber as Fo } from "./index40.js";
40
- import { Join as Ao } from "./index41.js";
41
- import { Kbd as Lo } from "./index42.js";
42
- import { Label as Ho } from "./index43.js";
43
- import { Layout as Go, useSiderContext as No } from "./index44.js";
44
- import { List as Wo } from "./index45.js";
45
- import { Loading as Eo } from "./index46.js";
46
- import { Mask as Qo } from "./index47.js";
47
- import { Masonry as jo } from "./index48.js";
48
- import { Mention as Vo } from "./index49.js";
49
- import { Menu as Yo } from "./index50.js";
50
- import { Browser as _o } from "./index51.js";
51
- import { Code as or } from "./index52.js";
52
- import { Phone as er } from "./index53.js";
53
- import { Window as pr } from "./index54.js";
54
- import { Modal as fr } from "./index55.js";
55
- import { Navbar as ar } from "./index56.js";
56
- import { notification as nr } from "./index57.js";
57
- import { OTPInput as ur } from "./index58.js";
58
- import { Pagination as dr } from "./index59.js";
59
- import { PageLayout as Cr } from "./index60.js";
60
- import { Popconfirm as gr } from "./index61.js";
61
- import { Popover as Sr } from "./index62.js";
62
- import { Progress as kr } from "./index63.js";
63
- import { QRCode as Dr } from "./index64.js";
64
- import { Radio as yr } from "./index65.js";
65
- import { RadialProgress as vr } from "./index66.js";
66
- import { Range as Ir } from "./index67.js";
67
- import { Rating as Br } from "./index68.js";
68
- import { Result as Mr } from "./index69.js";
69
- import { Select as Kr } from "./index70.js";
70
- import { Segmented as Nr } from "./index71.js";
71
- import { Skeleton as Wr } from "./index72.js";
72
- import { Space as Er } from "./index73.js";
73
- import { Splitter as Qr } from "./index74.js";
74
- import { Stack as jr } from "./index75.js";
75
- import { Stats as Vr } from "./index76.js";
76
- import { Status as Yr } from "./index77.js";
77
- import { Steps as _r } from "./index78.js";
78
- import { Table as oe } from "./index79.js";
79
- import { Tabs as ee } from "./index80.js";
80
- import { Textarea as pe } from "./index81.js";
81
- import { TextRotate as fe } from "./index82.js";
82
- import { CheckableTag as ae, Tag as ie } from "./index83.js";
83
- import { ThemeController as se } from "./index84.js";
84
- import { TimePicker as le } from "./index85.js";
85
- import { Timeline as ce } from "./index86.js";
86
- import { Toggle as Te } from "./index87.js";
87
- import { Tour as Pe } from "./index88.js";
88
- import { Tooltip as be } from "./index89.js";
89
- import { Transfer as he } from "./index90.js";
90
- import { Tree as we } from "./index91.js";
91
- import { TreeSelect as Re } from "./index92.js";
92
- import { Typography as Fe } from "./index93.js";
93
- import { Upload as Ae } from "./index94.js";
94
- import { Hide as Le, Show as Me } from "./index95.js";
95
- import { useBreakpoint as Ke } from "./index96.js";
96
- import { useDisclosure as Ne } from "./index97.js";
97
- import { useClipboard as We } from "./index98.js";
98
- import { useLocalStorage as Ee } from "./index99.js";
99
- import { useDebounce as Qe } from "./index100.js";
100
- import { useClickOutside as je } from "./index101.js";
101
- import { usePrevious as Ve } from "./index102.js";
102
- import { useHover as Ye } from "./index103.js";
103
- import { useKeyPress as _e, useKeyPressCallback as $e } from "./index104.js";
104
- import { useWindowSize as rt } from "./index105.js";
28
+ import { Filter as to } from "./index29.js";
29
+ import { Flex as mo } from "./index30.js";
30
+ import { FloatButton as xo } from "./index31.js";
31
+ import { Footer as io } from "./index32.js";
32
+ import { Form as so, useFormInstance as uo } from "./index33.js";
33
+ import { Col as co, Grid as Co, Row as To } from "./index34.js";
34
+ import { Hero as Po } from "./index35.js";
35
+ import { Image as bo } from "./index36.js";
36
+ import { Indicator as ho } from "./index37.js";
37
+ import { Dropdown as wo } from "./index38.js";
38
+ import { Empty as Fo } from "./index39.js";
39
+ import { Input as vo } from "./index40.js";
40
+ import { InputNumber as Ao } from "./index41.js";
41
+ import { Join as Lo } from "./index42.js";
42
+ import { Kbd as Ho } from "./index43.js";
43
+ import { Label as Go } from "./index44.js";
44
+ import { Layout as Oo, useSiderContext as Wo } from "./index45.js";
45
+ import { List as Eo } from "./index46.js";
46
+ import { Loading as Qo } from "./index47.js";
47
+ import { Mask as jo } from "./index48.js";
48
+ import { Masonry as Vo } from "./index49.js";
49
+ import { Mention as Yo } from "./index50.js";
50
+ import { Menu as _o } from "./index51.js";
51
+ import { Browser as or } from "./index52.js";
52
+ import { Code as er } from "./index53.js";
53
+ import { Phone as pr } from "./index54.js";
54
+ import { Window as fr } from "./index55.js";
55
+ import { Modal as ar } from "./index56.js";
56
+ import { Navbar as nr } from "./index57.js";
57
+ import { notification as ur } from "./index58.js";
58
+ import { OTPInput as dr } from "./index59.js";
59
+ import { Pagination as Cr } from "./index60.js";
60
+ import { PageLayout as gr } from "./index61.js";
61
+ import { Popconfirm as Sr } from "./index62.js";
62
+ import { Popover as kr } from "./index63.js";
63
+ import { Progress as Dr } from "./index64.js";
64
+ import { QRCode as yr } from "./index65.js";
65
+ import { Radio as Rr } from "./index66.js";
66
+ import { RadialProgress as Ir } from "./index67.js";
67
+ import { Range as Br } from "./index68.js";
68
+ import { Rating as Mr } from "./index69.js";
69
+ import { Result as Kr } from "./index70.js";
70
+ import { Select as Nr } from "./index71.js";
71
+ import { Segmented as Wr } from "./index72.js";
72
+ import { Skeleton as Er } from "./index73.js";
73
+ import { Space as Qr } from "./index74.js";
74
+ import { Splitter as jr } from "./index75.js";
75
+ import { Stack as Vr } from "./index76.js";
76
+ import { Stats as Yr } from "./index77.js";
77
+ import { Status as _r } from "./index78.js";
78
+ import { Steps as oe } from "./index79.js";
79
+ import { Table as ee } from "./index80.js";
80
+ import { Tabs as pe } from "./index81.js";
81
+ import { Textarea as fe } from "./index82.js";
82
+ import { TextRotate as ae } from "./index83.js";
83
+ import { CheckableTag as ne, Tag as se } from "./index84.js";
84
+ import { ThemeController as le } from "./index85.js";
85
+ import { TimePicker as ce } from "./index86.js";
86
+ import { Timeline as Te } from "./index87.js";
87
+ import { Toggle as Pe } from "./index88.js";
88
+ import { Tour as be } from "./index89.js";
89
+ import { Tooltip as he } from "./index90.js";
90
+ import { Transfer as we } from "./index91.js";
91
+ import { Tree as Fe } from "./index92.js";
92
+ import { TreeSelect as ve } from "./index93.js";
93
+ import { Typography as Ae } from "./index94.js";
94
+ import { Upload as Le } from "./index95.js";
95
+ import { Hide as He, Show as Ke } from "./index96.js";
96
+ import { useBreakpoint as Ne } from "./index97.js";
97
+ import { useDisclosure as We } from "./index98.js";
98
+ import { useClipboard as Ee } from "./index99.js";
99
+ import { useLocalStorage as Qe } from "./index100.js";
100
+ import { useDebounce as je } from "./index101.js";
101
+ import { useClickOutside as Ve } from "./index102.js";
102
+ import { usePrevious as Ye } from "./index103.js";
103
+ import { useHover as _e } from "./index104.js";
104
+ import { useKeyPress as ot, useKeyPressCallback as rt } from "./index105.js";
105
+ import { useWindowSize as tt } from "./index106.js";
105
106
  export {
106
107
  e as Affix,
107
108
  f as Alert,
@@ -111,17 +112,17 @@ export {
111
112
  s as AvatarGroup,
112
113
  l as Badge,
113
114
  c as Breadcrumb,
114
- _o as Browser,
115
+ or as Browser,
115
116
  T as Button,
116
117
  w as Card,
117
118
  A as Carousel,
118
- R as Cascader,
119
- F as Chart,
119
+ F as Cascader,
120
+ v as Chart,
120
121
  b as Chat,
121
- ae as CheckableTag,
122
+ ne as CheckableTag,
122
123
  P as Checkbox,
123
- or as Code,
124
- uo as Col,
124
+ er as Code,
125
+ co as Col,
125
126
  L as Collapse,
126
127
  h as ColorPicker,
127
128
  H as Container,
@@ -133,87 +134,88 @@ export {
133
134
  X as Divider,
134
135
  q as Dock,
135
136
  Z as Drawer,
136
- ho as Dropdown,
137
- wo as Empty,
137
+ wo as Dropdown,
138
+ Fo as Empty,
138
139
  $ as Fieldset,
139
140
  ro as FileInput,
140
- to as Flex,
141
- mo as FloatButton,
142
- xo as Footer,
143
- io as Form,
144
- lo as Grid,
145
- To as Hero,
146
- Le as Hide,
147
- Po as Image,
148
- bo as Indicator,
149
- Ro as Input,
150
- Fo as InputNumber,
151
- Ao as Join,
152
- Lo as Kbd,
153
- Ho as Label,
154
- Go as Layout,
155
- Wo as List,
156
- Eo as Loading,
157
- Qo as Mask,
158
- jo as Masonry,
159
- Vo as Mention,
160
- Yo as Menu,
161
- fr as Modal,
162
- ar as Navbar,
163
- ur as OTPInput,
164
- Cr as PageLayout,
165
- dr as Pagination,
166
- er as Phone,
167
- gr as Popconfirm,
168
- Sr as Popover,
169
- kr as Progress,
170
- Dr as QRCode,
171
- vr as RadialProgress,
172
- yr as Radio,
173
- Ir as Range,
174
- Br as Rating,
175
- Mr as Result,
176
- co as Row,
177
- Nr as Segmented,
178
- Kr as Select,
179
- Me as Show,
180
- Wr as Skeleton,
181
- Er as Space,
182
- Qr as Splitter,
183
- jr as Stack,
184
- Vr as Stats,
185
- Yr as Status,
186
- _r as Steps,
187
- oe as Table,
188
- ee as Tabs,
189
- ie as Tag,
190
- fe as TextRotate,
191
- pe as Textarea,
192
- se as ThemeController,
193
- le as TimePicker,
194
- ce as Timeline,
195
- Te as Toggle,
196
- be as Tooltip,
197
- Pe as Tour,
198
- he as Transfer,
199
- we as Tree,
200
- Re as TreeSelect,
201
- Fe as Typography,
202
- Ae as Upload,
203
- pr as Window,
204
- nr as notification,
205
- Ke as useBreakpoint,
206
- je as useClickOutside,
207
- We as useClipboard,
208
- Qe as useDebounce,
209
- Ne as useDisclosure,
210
- no as useFormInstance,
211
- Ye as useHover,
212
- _e as useKeyPress,
213
- $e as useKeyPressCallback,
214
- Ee as useLocalStorage,
215
- Ve as usePrevious,
216
- No as useSiderContext,
217
- rt as useWindowSize
141
+ to as Filter,
142
+ mo as Flex,
143
+ xo as FloatButton,
144
+ io as Footer,
145
+ so as Form,
146
+ Co as Grid,
147
+ Po as Hero,
148
+ He as Hide,
149
+ bo as Image,
150
+ ho as Indicator,
151
+ vo as Input,
152
+ Ao as InputNumber,
153
+ Lo as Join,
154
+ Ho as Kbd,
155
+ Go as Label,
156
+ Oo as Layout,
157
+ Eo as List,
158
+ Qo as Loading,
159
+ jo as Mask,
160
+ Vo as Masonry,
161
+ Yo as Mention,
162
+ _o as Menu,
163
+ ar as Modal,
164
+ nr as Navbar,
165
+ dr as OTPInput,
166
+ gr as PageLayout,
167
+ Cr as Pagination,
168
+ pr as Phone,
169
+ Sr as Popconfirm,
170
+ kr as Popover,
171
+ Dr as Progress,
172
+ yr as QRCode,
173
+ Ir as RadialProgress,
174
+ Rr as Radio,
175
+ Br as Range,
176
+ Mr as Rating,
177
+ Kr as Result,
178
+ To as Row,
179
+ Wr as Segmented,
180
+ Nr as Select,
181
+ Ke as Show,
182
+ Er as Skeleton,
183
+ Qr as Space,
184
+ jr as Splitter,
185
+ Vr as Stack,
186
+ Yr as Stats,
187
+ _r as Status,
188
+ oe as Steps,
189
+ ee as Table,
190
+ pe as Tabs,
191
+ se as Tag,
192
+ ae as TextRotate,
193
+ fe as Textarea,
194
+ le as ThemeController,
195
+ ce as TimePicker,
196
+ Te as Timeline,
197
+ Pe as Toggle,
198
+ he as Tooltip,
199
+ be as Tour,
200
+ we as Transfer,
201
+ Fe as Tree,
202
+ ve as TreeSelect,
203
+ Ae as Typography,
204
+ Le as Upload,
205
+ fr as Window,
206
+ ur as notification,
207
+ Ne as useBreakpoint,
208
+ Ve as useClickOutside,
209
+ Ee as useClipboard,
210
+ je as useDebounce,
211
+ We as useDisclosure,
212
+ uo as useFormInstance,
213
+ _e as useHover,
214
+ ot as useKeyPress,
215
+ rt as useKeyPressCallback,
216
+ Qe as useLocalStorage,
217
+ Ye as usePrevious,
218
+ Wo as useSiderContext,
219
+ tt as useWindowSize
218
220
  };
219
221
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index100.js CHANGED
@@ -1,16 +1,49 @@
1
- import { useState as r, useEffect as c } from "react";
2
- function i(e, t = 300) {
3
- const [o, u] = r(e);
4
- return c(() => {
5
- const n = setTimeout(() => {
6
- u(e);
7
- }, t);
8
- return () => {
9
- clearTimeout(n);
1
+ import { useState as u, useCallback as c, useEffect as f } from "react";
2
+ function S(o, t) {
3
+ const [s, n] = u(() => {
4
+ if (typeof window > "u")
5
+ return t;
6
+ try {
7
+ const e = window.localStorage.getItem(o);
8
+ return e ? JSON.parse(e) : t;
9
+ } catch {
10
+ return t;
11
+ }
12
+ }), d = c(
13
+ (e) => {
14
+ n((r) => {
15
+ const a = e instanceof Function ? e(r) : e;
16
+ if (typeof window < "u")
17
+ try {
18
+ window.localStorage.setItem(o, JSON.stringify(a));
19
+ } catch (l) {
20
+ console.warn(`Failed to save to localStorage key "${o}":`, l);
21
+ }
22
+ return a;
23
+ });
24
+ },
25
+ [o]
26
+ ), w = c(() => {
27
+ if (typeof window < "u")
28
+ try {
29
+ window.localStorage.removeItem(o);
30
+ } catch (e) {
31
+ console.warn(`Failed to remove localStorage key "${o}":`, e);
32
+ }
33
+ n(t);
34
+ }, [o, t]);
35
+ return f(() => {
36
+ const e = (r) => {
37
+ if (r.key === o && r.newValue !== null)
38
+ try {
39
+ n(JSON.parse(r.newValue));
40
+ } catch {
41
+ }
10
42
  };
11
- }, [e, t]), o;
43
+ return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
44
+ }, [o]), [s, d, w];
12
45
  }
13
46
  export {
14
- i as useDebounce
47
+ S as useLocalStorage
15
48
  };
16
49
  //# sourceMappingURL=index100.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index100.js","sources":["../src/hooks/useDebounce.ts"],"sourcesContent":["import { useState, useEffect } from 'react'\n\n/**\n * Hook that delays updating a value until after a specified delay.\n * Useful for search inputs to avoid excessive API calls.\n *\n * @param value - Value to debounce\n * @param delay - Delay in milliseconds (default: 300)\n * @returns Debounced value\n *\n * @example\n * const [search, setSearch] = useState('')\n * const debouncedSearch = useDebounce(search, 500)\n *\n * useEffect(() => {\n * // This runs 500ms after user stops typing\n * fetchResults(debouncedSearch)\n * }, [debouncedSearch])\n */\nexport function useDebounce<T>(value: T, delay = 300): T {\n const [debouncedValue, setDebouncedValue] = useState<T>(value)\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value)\n }, delay)\n\n return () => {\n clearTimeout(timer)\n }\n }, [value, delay])\n\n return debouncedValue\n}\n"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","timer"],"mappings":";AAmBO,SAASA,EAAeC,GAAUC,IAAQ,KAAQ;AACvD,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAYJ,CAAK;AAE7D,SAAAK,EAAU,MAAM;AACd,UAAMC,IAAQ,WAAW,MAAM;AAC7B,MAAAH,EAAkBH,CAAK;AAAA,IACzB,GAAGC,CAAK;AAER,WAAO,MAAM;AACX,mBAAaK,CAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAACN,GAAOC,CAAK,CAAC,GAEVC;AACT;"}
1
+ {"version":3,"file":"index100.js","sources":["../src/hooks/useLocalStorage.ts"],"sourcesContent":["import { useState, useCallback, useEffect } from 'react'\n\n/**\n * Hook for persisting state to localStorage.\n *\n * @param key - localStorage key\n * @param initialValue - Initial value if key doesn't exist\n * @returns [value, setValue, removeValue] tuple\n *\n * @example\n * const [theme, setTheme] = useLocalStorage('theme', 'light')\n * const [user, setUser, removeUser] = useLocalStorage('user', null)\n */\nexport function useLocalStorage<T>(\n key: string,\n initialValue: T\n): [T, (value: T | ((prev: T) => T)) => void, () => void] {\n // Get initial value from localStorage or use default\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === 'undefined') {\n return initialValue\n }\n\n try {\n const item = window.localStorage.getItem(key)\n return item ? (JSON.parse(item) as T) : initialValue\n } catch {\n return initialValue\n }\n })\n\n // Update localStorage when value changes\n const setValue = useCallback(\n (value: T | ((prev: T) => T)) => {\n setStoredValue(prev => {\n const valueToStore = value instanceof Function ? value(prev) : value\n\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.setItem(key, JSON.stringify(valueToStore))\n } catch (error) {\n console.warn(`Failed to save to localStorage key \"${key}\":`, error)\n }\n }\n\n return valueToStore\n })\n },\n [key]\n )\n\n // Remove from localStorage\n const removeValue = useCallback(() => {\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.removeItem(key)\n } catch (error) {\n console.warn(`Failed to remove localStorage key \"${key}\":`, error)\n }\n }\n setStoredValue(initialValue)\n }, [key, initialValue])\n\n // Sync with other tabs/windows\n useEffect(() => {\n const handleStorageChange = (e: StorageEvent) => {\n if (e.key === key && e.newValue !== null) {\n try {\n setStoredValue(JSON.parse(e.newValue) as T)\n } catch {\n // Ignore parse errors\n }\n }\n }\n\n window.addEventListener('storage', handleStorageChange)\n return () => window.removeEventListener('storage', handleStorageChange)\n }, [key])\n\n return [storedValue, setValue, removeValue]\n}\n"],"names":["useLocalStorage","key","initialValue","storedValue","setStoredValue","useState","item","setValue","useCallback","value","prev","valueToStore","error","removeValue","useEffect","handleStorageChange","e"],"mappings":";AAaO,SAASA,EACdC,GACAC,GACwD;AAExD,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAY,MAAM;AACtD,QAAI,OAAO,SAAW;AACpB,aAAOH;AAGT,QAAI;AACF,YAAMI,IAAO,OAAO,aAAa,QAAQL,CAAG;AAC5C,aAAOK,IAAQ,KAAK,MAAMA,CAAI,IAAUJ;AAAA,IAC1C,QAAQ;AACN,aAAOA;AAAA,IACT;AAAA,EACF,CAAC,GAGKK,IAAWC;AAAA,IACf,CAACC,MAAgC;AAC/B,MAAAL,EAAe,CAAAM,MAAQ;AACrB,cAAMC,IAAeF,aAAiB,WAAWA,EAAMC,CAAI,IAAID;AAE/D,YAAI,OAAO,SAAW;AACpB,cAAI;AACF,mBAAO,aAAa,QAAQR,GAAK,KAAK,UAAUU,CAAY,CAAC;AAAA,UAC/D,SAASC,GAAO;AACd,oBAAQ,KAAK,uCAAuCX,CAAG,MAAMW,CAAK;AAAA,UACpE;AAGF,eAAOD;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAACV,CAAG;AAAA,EAAA,GAIAY,IAAcL,EAAY,MAAM;AACpC,QAAI,OAAO,SAAW;AACpB,UAAI;AACF,eAAO,aAAa,WAAWP,CAAG;AAAA,MACpC,SAASW,GAAO;AACd,gBAAQ,KAAK,sCAAsCX,CAAG,MAAMW,CAAK;AAAA,MACnE;AAEF,IAAAR,EAAeF,CAAY;AAAA,EAC7B,GAAG,CAACD,GAAKC,CAAY,CAAC;AAGtB,SAAAY,EAAU,MAAM;AACd,UAAMC,IAAsB,CAACC,MAAoB;AAC/C,UAAIA,EAAE,QAAQf,KAAOe,EAAE,aAAa;AAClC,YAAI;AACF,UAAAZ,EAAe,KAAK,MAAMY,EAAE,QAAQ,CAAM;AAAA,QAC5C,QAAQ;AAAA,QAER;AAAA,IAEJ;AAEA,kBAAO,iBAAiB,WAAWD,CAAmB,GAC/C,MAAM,OAAO,oBAAoB,WAAWA,CAAmB;AAAA,EACxE,GAAG,CAACd,CAAG,CAAC,GAED,CAACE,GAAaI,GAAUM,CAAW;AAC5C;"}
package/dist/index101.js CHANGED
@@ -1,18 +1,16 @@
1
- import { useRef as s, useEffect as c } from "react";
2
- function m(t, n = !0) {
3
- const r = s(null);
1
+ import { useState as r, useEffect as c } from "react";
2
+ function i(e, t = 300) {
3
+ const [o, u] = r(e);
4
4
  return c(() => {
5
- if (!n) return;
6
- const e = (o) => {
7
- const u = r.current;
8
- !u || u.contains(o.target) || t(o);
5
+ const n = setTimeout(() => {
6
+ u(e);
7
+ }, t);
8
+ return () => {
9
+ clearTimeout(n);
9
10
  };
10
- return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
11
- document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
12
- };
13
- }, [t, n]), r;
11
+ }, [e, t]), o;
14
12
  }
15
13
  export {
16
- m as useClickOutside
14
+ i as useDebounce
17
15
  };
18
16
  //# sourceMappingURL=index101.js.map