asterui 0.12.13 → 0.12.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button.d.ts +4 -0
- package/dist/components/Drawer.d.ts +47 -6
- package/dist/components/Dropdown.d.ts +65 -9
- package/dist/components/Input.d.ts +15 -1
- package/dist/components/Modal.d.ts +5 -1
- package/dist/components/Navbar.d.ts +15 -1
- package/dist/components/SidebarDrawer.d.ts +21 -0
- package/dist/components/Tabs.d.ts +30 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +169 -167
- package/dist/index.js.map +1 -1
- package/dist/index100.js +44 -11
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +10 -12
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +14 -7
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +7 -12
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +11 -29
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +29 -16
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +21 -0
- package/dist/index106.js.map +1 -0
- package/dist/index21.js +1 -1
- package/dist/index26.js +171 -40
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +41 -17
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +17 -33
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +33 -52
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +50 -61
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +60 -181
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +184 -18
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +15 -217
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +216 -1083
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +1086 -16
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +16 -121
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +119 -37
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +34 -208
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +390 -89
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +93 -158
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +211 -135
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +146 -15
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +15 -17
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +17 -21
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +18 -134
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +134 -10
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +13 -35
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +35 -34
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +34 -81
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +71 -166
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +167 -144
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +152 -11
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +10 -20
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +22 -14
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +14 -7
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +6 -310
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +334 -17
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +47 -122
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +120 -108
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +107 -167
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +167 -29
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +30 -120
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +116 -80
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +85 -19
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +19 -73
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +71 -54
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +56 -44
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +42 -49
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +52 -62
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +56 -101
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +107 -41
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +41 -68
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +66 -19
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +18 -55
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +55 -251
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +254 -22
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +22 -31
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +30 -93
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +89 -324
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +323 -50
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +79 -39
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +40 -23
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +21 -93
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +87 -148
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +147 -152
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +159 -63
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +65 -35
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +35 -234
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +231 -31
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +69 -44
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +34 -210
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +195 -198
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +159 -241
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +283 -166
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +173 -253
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +258 -14
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +12 -31
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +32 -5
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +5 -13
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +11 -43
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Breadcrumb as c } from "./index8.js";
|
|
|
8
8
|
import { Button as T } from "./index9.js";
|
|
9
9
|
import { Checkbox as P } from "./index10.js";
|
|
10
10
|
import { Chat as b } from "./index11.js";
|
|
11
|
-
import { ColorPicker as
|
|
11
|
+
import { ColorPicker as D } from "./index12.js";
|
|
12
12
|
import { Card as w } from "./index13.js";
|
|
13
13
|
import { Cascader as F } from "./index14.js";
|
|
14
14
|
import { Chart as v } from "./index15.js";
|
|
@@ -23,85 +23,86 @@ import { Diff as U } from "./index23.js";
|
|
|
23
23
|
import { Dock as q } from "./index24.js";
|
|
24
24
|
import { Divider as X } from "./index25.js";
|
|
25
25
|
import { Drawer as Z } from "./index26.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
26
|
+
import { SidebarDrawer as $ } from "./index27.js";
|
|
27
|
+
import { Fieldset as ro } from "./index28.js";
|
|
28
|
+
import { FileInput as to } from "./index29.js";
|
|
29
|
+
import { Filter as mo } from "./index30.js";
|
|
30
|
+
import { Flex as xo } from "./index31.js";
|
|
31
|
+
import { FloatButton as io } from "./index32.js";
|
|
32
|
+
import { Footer as so } from "./index33.js";
|
|
33
|
+
import { Form as lo, useFormInstance as co } from "./index34.js";
|
|
34
|
+
import { Col as To, Grid as go, Row as Po } from "./index35.js";
|
|
35
|
+
import { Hero as bo } from "./index36.js";
|
|
36
|
+
import { Image as Do } from "./index37.js";
|
|
37
|
+
import { Indicator as wo } from "./index38.js";
|
|
38
|
+
import { Dropdown as Fo } from "./index39.js";
|
|
39
|
+
import { Empty as vo } from "./index40.js";
|
|
40
|
+
import { Input as Ao } from "./index41.js";
|
|
41
|
+
import { InputNumber as Lo } from "./index42.js";
|
|
42
|
+
import { Join as Ho } from "./index43.js";
|
|
43
|
+
import { Kbd as Go } from "./index44.js";
|
|
44
|
+
import { Label as Oo } from "./index45.js";
|
|
45
|
+
import { Layout as zo, useSiderContext as Eo } from "./index46.js";
|
|
46
|
+
import { List as Qo } from "./index47.js";
|
|
47
|
+
import { Loading as jo } from "./index48.js";
|
|
48
|
+
import { Mask as Vo } from "./index49.js";
|
|
49
|
+
import { Masonry as Yo } from "./index50.js";
|
|
50
|
+
import { Mention as _o } from "./index51.js";
|
|
51
|
+
import { Menu as or } from "./index52.js";
|
|
52
|
+
import { Browser as er } from "./index53.js";
|
|
53
|
+
import { Code as pr } from "./index54.js";
|
|
54
|
+
import { Phone as fr } from "./index55.js";
|
|
55
|
+
import { Window as ar } from "./index56.js";
|
|
56
|
+
import { Modal as nr } from "./index57.js";
|
|
57
|
+
import { Navbar as ur } from "./index58.js";
|
|
58
|
+
import { notification as dr } from "./index59.js";
|
|
59
|
+
import { OTPInput as Cr } from "./index60.js";
|
|
60
|
+
import { Pagination as gr } from "./index61.js";
|
|
61
|
+
import { PageLayout as Sr } from "./index62.js";
|
|
62
|
+
import { Popconfirm as kr } from "./index63.js";
|
|
63
|
+
import { Popover as hr } from "./index64.js";
|
|
64
|
+
import { Progress as yr } from "./index65.js";
|
|
65
|
+
import { QRCode as Rr } from "./index66.js";
|
|
66
|
+
import { Radio as Ir } from "./index67.js";
|
|
67
|
+
import { RadialProgress as Br } from "./index68.js";
|
|
68
|
+
import { Range as Mr } from "./index69.js";
|
|
69
|
+
import { Rating as Kr } from "./index70.js";
|
|
70
|
+
import { Result as Nr } from "./index71.js";
|
|
71
|
+
import { Select as Wr } from "./index72.js";
|
|
72
|
+
import { Segmented as Er } from "./index73.js";
|
|
73
|
+
import { Skeleton as Qr } from "./index74.js";
|
|
74
|
+
import { Space as jr } from "./index75.js";
|
|
75
|
+
import { Splitter 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 De } 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,19 +112,19 @@ export {
|
|
|
111
112
|
s as AvatarGroup,
|
|
112
113
|
l as Badge,
|
|
113
114
|
c as Breadcrumb,
|
|
114
|
-
|
|
115
|
+
er as Browser,
|
|
115
116
|
T as Button,
|
|
116
117
|
w as Card,
|
|
117
118
|
A as Carousel,
|
|
118
119
|
F as Cascader,
|
|
119
120
|
v as Chart,
|
|
120
121
|
b as Chat,
|
|
121
|
-
|
|
122
|
+
ne as CheckableTag,
|
|
122
123
|
P as Checkbox,
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
pr as Code,
|
|
125
|
+
To as Col,
|
|
125
126
|
L as Collapse,
|
|
126
|
-
|
|
127
|
+
D as ColorPicker,
|
|
127
128
|
H as Container,
|
|
128
129
|
G as ContextMenu,
|
|
129
130
|
O as Countdown,
|
|
@@ -133,87 +134,88 @@ export {
|
|
|
133
134
|
X as Divider,
|
|
134
135
|
q as Dock,
|
|
135
136
|
Z as Drawer,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Qr as
|
|
183
|
-
jr as
|
|
184
|
-
Vr as
|
|
185
|
-
Yr as
|
|
186
|
-
_r as
|
|
187
|
-
oe as
|
|
188
|
-
ee as
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
le as
|
|
194
|
-
ce as
|
|
195
|
-
Te as
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
we as
|
|
200
|
-
Fe as
|
|
201
|
-
ve as
|
|
202
|
-
Ae as
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
_e as
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
137
|
+
Fo as Dropdown,
|
|
138
|
+
vo as Empty,
|
|
139
|
+
ro as Fieldset,
|
|
140
|
+
to as FileInput,
|
|
141
|
+
mo as Filter,
|
|
142
|
+
xo as Flex,
|
|
143
|
+
io as FloatButton,
|
|
144
|
+
so as Footer,
|
|
145
|
+
lo as Form,
|
|
146
|
+
go as Grid,
|
|
147
|
+
bo as Hero,
|
|
148
|
+
He as Hide,
|
|
149
|
+
Do as Image,
|
|
150
|
+
wo as Indicator,
|
|
151
|
+
Ao as Input,
|
|
152
|
+
Lo as InputNumber,
|
|
153
|
+
Ho as Join,
|
|
154
|
+
Go as Kbd,
|
|
155
|
+
Oo as Label,
|
|
156
|
+
zo as Layout,
|
|
157
|
+
Qo as List,
|
|
158
|
+
jo as Loading,
|
|
159
|
+
Vo as Mask,
|
|
160
|
+
Yo as Masonry,
|
|
161
|
+
_o as Mention,
|
|
162
|
+
or as Menu,
|
|
163
|
+
nr as Modal,
|
|
164
|
+
ur as Navbar,
|
|
165
|
+
Cr as OTPInput,
|
|
166
|
+
Sr as PageLayout,
|
|
167
|
+
gr as Pagination,
|
|
168
|
+
fr as Phone,
|
|
169
|
+
kr as Popconfirm,
|
|
170
|
+
hr as Popover,
|
|
171
|
+
yr as Progress,
|
|
172
|
+
Rr as QRCode,
|
|
173
|
+
Br as RadialProgress,
|
|
174
|
+
Ir as Radio,
|
|
175
|
+
Mr as Range,
|
|
176
|
+
Kr as Rating,
|
|
177
|
+
Nr as Result,
|
|
178
|
+
Po as Row,
|
|
179
|
+
Er as Segmented,
|
|
180
|
+
Wr as Select,
|
|
181
|
+
Ke as Show,
|
|
182
|
+
$ as SidebarDrawer,
|
|
183
|
+
Qr as Skeleton,
|
|
184
|
+
jr as Space,
|
|
185
|
+
Vr as Splitter,
|
|
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
|
+
De 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
|
+
ar as Window,
|
|
206
|
+
dr as notification,
|
|
207
|
+
Ne as useBreakpoint,
|
|
208
|
+
Ve as useClickOutside,
|
|
209
|
+
Ee as useClipboard,
|
|
210
|
+
je as useDebounce,
|
|
211
|
+
We as useDisclosure,
|
|
212
|
+
co as useFormInstance,
|
|
213
|
+
_e as useHover,
|
|
214
|
+
ot as useKeyPress,
|
|
215
|
+
rt as useKeyPressCallback,
|
|
216
|
+
Qe as useLocalStorage,
|
|
217
|
+
Ye as usePrevious,
|
|
218
|
+
Eo 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
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
43
|
+
return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
|
|
44
|
+
}, [o]), [s, d, w];
|
|
12
45
|
}
|
|
13
46
|
export {
|
|
14
|
-
|
|
47
|
+
S as useLocalStorage
|
|
15
48
|
};
|
|
16
49
|
//# sourceMappingURL=index100.js.map
|
package/dist/index100.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index100.js","sources":["../src/hooks/
|
|
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 {
|
|
2
|
-
function
|
|
3
|
-
const
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const n = setTimeout(() => {
|
|
6
|
+
u(e);
|
|
7
|
+
}, t);
|
|
8
|
+
return () => {
|
|
9
|
+
clearTimeout(n);
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
12
|
-
};
|
|
13
|
-
}, [t, n]), r;
|
|
11
|
+
}, [e, t]), o;
|
|
14
12
|
}
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
i as useDebounce
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=index101.js.map
|
package/dist/index101.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index101.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index101.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;"}
|
package/dist/index102.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useRef as s, useEffect as c } from "react";
|
|
2
|
+
function m(t, n = !0) {
|
|
3
|
+
const r = s(null);
|
|
4
|
+
return c(() => {
|
|
5
|
+
if (!n) return;
|
|
6
|
+
const e = (o) => {
|
|
7
|
+
const u = r.current;
|
|
8
|
+
!u || u.contains(o.target) || t(o);
|
|
9
|
+
};
|
|
10
|
+
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
|
|
11
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
12
|
+
};
|
|
13
|
+
}, [t, n]), r;
|
|
7
14
|
}
|
|
8
15
|
export {
|
|
9
|
-
|
|
16
|
+
m as useClickOutside
|
|
10
17
|
};
|
|
11
18
|
//# sourceMappingURL=index102.js.map
|
package/dist/index102.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index102.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index102.js","sources":["../src/hooks/useClickOutside.ts"],"sourcesContent":["import { useEffect, useRef, type RefObject } from 'react'\n\n/**\n * Hook that detects clicks outside of a referenced element.\n * Useful for closing dropdowns, modals, or menus.\n *\n * @param handler - Callback when click outside is detected\n * @param enabled - Whether the listener is active (default: true)\n * @returns Ref to attach to the element\n *\n * @example\n * const ref = useClickOutside(() => setIsOpen(false))\n *\n * <div ref={ref}>\n * <Dropdown>...</Dropdown>\n * </div>\n */\nexport function useClickOutside<T extends HTMLElement = HTMLElement>(\n handler: (event: MouseEvent | TouchEvent) => void,\n enabled = true\n): RefObject<T | null> {\n const ref = useRef<T>(null)\n\n useEffect(() => {\n if (!enabled) return\n\n const listener = (event: MouseEvent | TouchEvent) => {\n const el = ref.current\n if (!el || el.contains(event.target as Node)) {\n return\n }\n handler(event)\n }\n\n document.addEventListener('mousedown', listener)\n document.addEventListener('touchstart', listener)\n\n return () => {\n document.removeEventListener('mousedown', listener)\n document.removeEventListener('touchstart', listener)\n }\n }, [handler, enabled])\n\n return ref\n}\n"],"names":["useClickOutside","handler","enabled","ref","useRef","useEffect","listener","event","el"],"mappings":";AAiBO,SAASA,EACdC,GACAC,IAAU,IACW;AACrB,QAAMC,IAAMC,EAAU,IAAI;AAE1B,SAAAC,EAAU,MAAM;AACd,QAAI,CAACH,EAAS;AAEd,UAAMI,IAAW,CAACC,MAAmC;AACnD,YAAMC,IAAKL,EAAI;AACf,MAAI,CAACK,KAAMA,EAAG,SAASD,EAAM,MAAc,KAG3CN,EAAQM,CAAK;AAAA,IACf;AAEA,oBAAS,iBAAiB,aAAaD,CAAQ,GAC/C,SAAS,iBAAiB,cAAcA,CAAQ,GAEzC,MAAM;AACX,eAAS,oBAAoB,aAAaA,CAAQ,GAClD,SAAS,oBAAoB,cAAcA,CAAQ;AAAA,IACrD;AAAA,EACF,GAAG,CAACL,GAASC,CAAO,CAAC,GAEdC;AACT;"}
|
package/dist/index103.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function f() {
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const r = () => t(!0), s = () => t(!1);
|
|
8
|
-
return e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", s), () => {
|
|
9
|
-
e.removeEventListener("mouseenter", r), e.removeEventListener("mouseleave", s);
|
|
10
|
-
};
|
|
11
|
-
}, []), { ref: n, isHovered: o };
|
|
1
|
+
import { useRef as t, useEffect as o } from "react";
|
|
2
|
+
function f(r) {
|
|
3
|
+
const e = t(void 0);
|
|
4
|
+
return o(() => {
|
|
5
|
+
e.current = r;
|
|
6
|
+
}, [r]), e.current;
|
|
12
7
|
}
|
|
13
8
|
export {
|
|
14
|
-
f as
|
|
9
|
+
f as usePrevious
|
|
15
10
|
};
|
|
16
11
|
//# sourceMappingURL=index103.js.map
|
package/dist/index103.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index103.js","sources":["../src/hooks/
|
|
1
|
+
{"version":3,"file":"index103.js","sources":["../src/hooks/usePrevious.ts"],"sourcesContent":["import { useRef, useEffect } from 'react'\n\n/**\n * Hook that returns the previous value of a variable.\n * Useful for comparing current and previous values in effects.\n *\n * @param value - Current value\n * @returns Previous value (undefined on first render)\n *\n * @example\n * const [count, setCount] = useState(0)\n * const prevCount = usePrevious(count)\n *\n * // prevCount is the value from previous render\n * console.log(`Changed from ${prevCount} to ${count}`)\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined)\n\n useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n"],"names":["usePrevious","value","ref","useRef","useEffect"],"mappings":";AAgBO,SAASA,EAAeC,GAAyB;AACtD,QAAMC,IAAMC,EAAsB,MAAS;AAE3C,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC,GAEHC,EAAI;AACb;"}
|
package/dist/index104.js
CHANGED
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
e.key === n && d(!1);
|
|
11
|
-
},
|
|
12
|
-
[n]
|
|
13
|
-
);
|
|
14
|
-
return l(() => {
|
|
15
|
-
const e = u ?? window;
|
|
16
|
-
return o === "keydown" ? (e.addEventListener("keydown", t), e.addEventListener("keyup", s)) : e.addEventListener("keyup", t), () => {
|
|
17
|
-
e.removeEventListener("keydown", t), e.removeEventListener("keyup", s);
|
|
1
|
+
import { useState as u, useRef as v, useEffect as a } from "react";
|
|
2
|
+
function f() {
|
|
3
|
+
const [o, t] = u(!1), n = v(null);
|
|
4
|
+
return a(() => {
|
|
5
|
+
const e = n.current;
|
|
6
|
+
if (!e) return;
|
|
7
|
+
const r = () => t(!0), s = () => t(!1);
|
|
8
|
+
return e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", s), () => {
|
|
9
|
+
e.removeEventListener("mouseenter", r), e.removeEventListener("mouseleave", s);
|
|
18
10
|
};
|
|
19
|
-
}, [
|
|
20
|
-
}
|
|
21
|
-
function y(n, f, u = {}) {
|
|
22
|
-
const { target: o, event: r = "keydown", preventDefault: a = !1 } = u;
|
|
23
|
-
l(() => {
|
|
24
|
-
const d = o ?? window, t = (s) => {
|
|
25
|
-
s.key === n && (a && s.preventDefault(), f(s));
|
|
26
|
-
};
|
|
27
|
-
return d.addEventListener(r, t), () => d.removeEventListener(r, t);
|
|
28
|
-
}, [o, n, f, r, a]);
|
|
11
|
+
}, []), { ref: n, isHovered: o };
|
|
29
12
|
}
|
|
30
13
|
export {
|
|
31
|
-
|
|
32
|
-
y as useKeyPressCallback
|
|
14
|
+
f as useHover
|
|
33
15
|
};
|
|
34
16
|
//# sourceMappingURL=index104.js.map
|