asterui 0.12.26 → 0.12.28
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/Collapse.d.ts +40 -20
- package/dist/components/Descriptions.d.ts +35 -3
- package/dist/components/Empty.d.ts +10 -1
- package/dist/components/Image.d.ts +13 -1
- package/dist/components/List.d.ts +74 -8
- package/dist/components/Table.d.ts +64 -10
- package/dist/components/Timeline.d.ts +62 -7
- package/dist/index.d.ts +4 -6
- package/dist/index.js +148 -150
- package/dist/index.js.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index100.js +5 -32
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +13 -5
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +43 -11
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +11 -44
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +12 -10
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +7 -14
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +12 -7
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +29 -11
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +16 -29
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +31 -16
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +517 -30
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +45 -515
- package/dist/index111.js.map +1 -1
- package/dist/index18.js +105 -64
- package/dist/index18.js.map +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +127 -93
- package/dist/index23.js.map +1 -1
- package/dist/index39.js +162 -115
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +398 -40
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +132 -389
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +252 -91
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +143 -247
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +15 -154
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +17 -15
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +136 -16
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +118 -133
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +35 -13
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +34 -35
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +81 -34
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +166 -71
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +144 -167
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +11 -152
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +55 -10
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +12 -55
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +7 -14
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +333 -6
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +47 -334
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +122 -47
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +108 -120
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +167 -107
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +29 -167
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +120 -30
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +80 -116
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +19 -85
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +73 -19
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +54 -71
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +44 -56
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +49 -42
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +121 -50
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +102 -118
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +72 -105
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +67 -73
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +19 -66
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +55 -18
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +251 -55
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +22 -254
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +31 -22
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +93 -30
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +626 -86
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +73 -322
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +39 -79
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +23 -40
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +207 -23
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +148 -199
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +152 -147
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +143 -156
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +35 -65
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +234 -35
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +31 -231
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +210 -34
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +418 -187
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +686 -376
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +165 -738
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +253 -173
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +64 -256
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +121 -61
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +14 -126
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +31 -12
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Indicator.d.ts +0 -7
- package/dist/index112.js +0 -53
- package/dist/index112.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import { Chat as y } from "./index12.js";
|
|
|
12
12
|
import { ColorPicker as h } from "./index13.js";
|
|
13
13
|
import { Card as w } from "./index14.js";
|
|
14
14
|
import { Cascader as F } from "./index15.js";
|
|
15
|
-
import { Chart as
|
|
16
|
-
import { Carousel as
|
|
15
|
+
import { Chart as L } from "./index16.js";
|
|
16
|
+
import { Carousel as I } from "./index17.js";
|
|
17
17
|
import { Collapse as H } from "./index18.js";
|
|
18
18
|
import { Container as K } from "./index19.js";
|
|
19
19
|
import { ContextMenu as N } from "./index20.js";
|
|
@@ -36,76 +36,75 @@ import { Col as So, Grid as Po, Row as bo } from "./index36.js";
|
|
|
36
36
|
import { Hero as yo } from "./index37.js";
|
|
37
37
|
import { HoverGallery as ho } from "./index38.js";
|
|
38
38
|
import { Image as wo } from "./index39.js";
|
|
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 {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import { useWindowSize as st } from "./index109.js";
|
|
39
|
+
import { Dropdown as Fo } from "./index40.js";
|
|
40
|
+
import { Empty as Lo } from "./index41.js";
|
|
41
|
+
import { Input as Io } from "./index42.js";
|
|
42
|
+
import { InputNumber as Ho } from "./index43.js";
|
|
43
|
+
import { Join as Ko } from "./index44.js";
|
|
44
|
+
import { Kbd as No } 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 Vo } from "./index48.js";
|
|
48
|
+
import { Mask as qo } 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 Pr } from "./index62.js";
|
|
62
|
+
import { Popconfirm as kr } from "./index63.js";
|
|
63
|
+
import { Popover as Dr } from "./index64.js";
|
|
64
|
+
import { Progress as vr } from "./index65.js";
|
|
65
|
+
import { QRCode as Rr } from "./index66.js";
|
|
66
|
+
import { Radio as Br } from "./index67.js";
|
|
67
|
+
import { RadialProgress as Ar } from "./index68.js";
|
|
68
|
+
import { Range as Mr } from "./index69.js";
|
|
69
|
+
import { Rating as Gr } from "./index70.js";
|
|
70
|
+
import { Result as Wr } from "./index71.js";
|
|
71
|
+
import { Select as Or } from "./index72.js";
|
|
72
|
+
import { Segmented as Er } from "./index73.js";
|
|
73
|
+
import { Skeleton as Qr } from "./index74.js";
|
|
74
|
+
import { Space as Vr } from "./index75.js";
|
|
75
|
+
import { Splitter as qr } 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, TagLiveRegion as ue } from "./index84.js";
|
|
84
|
+
import { ThemeController as de } from "./index85.js";
|
|
85
|
+
import { TimePicker as Ce } from "./index86.js";
|
|
86
|
+
import { Timeline as ge } from "./index87.js";
|
|
87
|
+
import { Toggle as Pe } from "./index88.js";
|
|
88
|
+
import { Tour as ke } from "./index89.js";
|
|
89
|
+
import { Tooltip as De } from "./index90.js";
|
|
90
|
+
import { Transfer as ve } from "./index91.js";
|
|
91
|
+
import { Tree as Re } from "./index92.js";
|
|
92
|
+
import { TreeSelect as Be, TreeSelectComponent as Le } from "./index93.js";
|
|
93
|
+
import { Typography as Ie } from "./index94.js";
|
|
94
|
+
import { Upload as He } from "./index95.js";
|
|
95
|
+
import { VirtualList as Ke } from "./index96.js";
|
|
96
|
+
import { Watermark as Ne } from "./index97.js";
|
|
97
|
+
import { Hide as ze, Show as Ee } from "./index98.js";
|
|
98
|
+
import { useBreakpoint as Qe } from "./index99.js";
|
|
99
|
+
import { useDisclosure as Ve } from "./index100.js";
|
|
100
|
+
import { useClipboard as qe } from "./index101.js";
|
|
101
|
+
import { useLocalStorage as Ye } from "./index102.js";
|
|
102
|
+
import { useDebounce as _e } from "./index103.js";
|
|
103
|
+
import { useClickOutside as ot } from "./index104.js";
|
|
104
|
+
import { usePrevious as et } from "./index105.js";
|
|
105
|
+
import { useHover as pt } from "./index106.js";
|
|
106
|
+
import { useKeyPress as ft, useKeyPressCallback as xt } from "./index107.js";
|
|
107
|
+
import { useWindowSize as it } from "./index108.js";
|
|
109
108
|
export {
|
|
110
109
|
e as Affix,
|
|
111
110
|
f as Alert,
|
|
@@ -115,16 +114,16 @@ export {
|
|
|
115
114
|
s as AvatarGroup,
|
|
116
115
|
l as Badge,
|
|
117
116
|
c as Breadcrumb,
|
|
118
|
-
|
|
117
|
+
er as Browser,
|
|
119
118
|
T as Button,
|
|
120
119
|
w as Card,
|
|
121
|
-
|
|
120
|
+
I as Carousel,
|
|
122
121
|
F as Cascader,
|
|
123
|
-
|
|
122
|
+
L as Chart,
|
|
124
123
|
y as Chat,
|
|
125
|
-
|
|
124
|
+
ne as CheckableTag,
|
|
126
125
|
b as Checkbox,
|
|
127
|
-
|
|
126
|
+
pr as Code,
|
|
128
127
|
So as Col,
|
|
129
128
|
H as Collapse,
|
|
130
129
|
h as ColorPicker,
|
|
@@ -138,8 +137,8 @@ export {
|
|
|
138
137
|
Z as Divider,
|
|
139
138
|
X as Dock,
|
|
140
139
|
$ as Drawer,
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
Fo as Dropdown,
|
|
141
|
+
Lo as Empty,
|
|
143
142
|
to as Fieldset,
|
|
144
143
|
mo as FileInput,
|
|
145
144
|
xo as Filter,
|
|
@@ -149,81 +148,80 @@ export {
|
|
|
149
148
|
Co as Form,
|
|
150
149
|
Po as Grid,
|
|
151
150
|
yo as Hero,
|
|
152
|
-
|
|
151
|
+
ze as Hide,
|
|
153
152
|
ho as HoverGallery,
|
|
154
153
|
wo as Image,
|
|
155
|
-
|
|
156
|
-
Ho as
|
|
157
|
-
Ko as
|
|
158
|
-
No as
|
|
159
|
-
zo as
|
|
160
|
-
|
|
161
|
-
Vo as
|
|
162
|
-
qo as
|
|
163
|
-
Yo as
|
|
164
|
-
_o as
|
|
165
|
-
or as
|
|
166
|
-
|
|
167
|
-
ur as
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Dr as
|
|
174
|
-
vr as
|
|
175
|
-
Rr as
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
Gr as
|
|
180
|
-
Wr as
|
|
181
|
-
Or as Result,
|
|
154
|
+
Io as Input,
|
|
155
|
+
Ho as InputNumber,
|
|
156
|
+
Ko as Join,
|
|
157
|
+
No as Kbd,
|
|
158
|
+
zo as Layout,
|
|
159
|
+
Qo as List,
|
|
160
|
+
Vo as Loading,
|
|
161
|
+
qo as Mask,
|
|
162
|
+
Yo as Masonry,
|
|
163
|
+
_o as Mention,
|
|
164
|
+
or as Menu,
|
|
165
|
+
nr as Modal,
|
|
166
|
+
ur as Navbar,
|
|
167
|
+
Cr as OTPInput,
|
|
168
|
+
Pr as PageLayout,
|
|
169
|
+
gr as Pagination,
|
|
170
|
+
fr as Phone,
|
|
171
|
+
kr as Popconfirm,
|
|
172
|
+
Dr as Popover,
|
|
173
|
+
vr as Progress,
|
|
174
|
+
Rr as QRCode,
|
|
175
|
+
Ar as RadialProgress,
|
|
176
|
+
Br as Radio,
|
|
177
|
+
Mr as Range,
|
|
178
|
+
Gr as Rating,
|
|
179
|
+
Wr as Result,
|
|
182
180
|
bo as Row,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
Er as Segmented,
|
|
182
|
+
Or as Select,
|
|
183
|
+
Ee as Show,
|
|
186
184
|
ro as SidebarDrawer,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
185
|
+
Qr as Skeleton,
|
|
186
|
+
Vr as Space,
|
|
187
|
+
qr as Splitter,
|
|
188
|
+
Yr as Stats,
|
|
189
|
+
_r as Status,
|
|
190
|
+
oe as Steps,
|
|
191
|
+
ee as Table,
|
|
192
|
+
pe as Tabs,
|
|
193
|
+
se as Tag,
|
|
194
|
+
ue as TagLiveRegion,
|
|
195
|
+
ae as TextRotate,
|
|
196
|
+
fe as Textarea,
|
|
197
|
+
de as ThemeController,
|
|
198
|
+
Ce as TimePicker,
|
|
199
|
+
ge as Timeline,
|
|
200
|
+
Pe as Toggle,
|
|
201
|
+
De as Tooltip,
|
|
202
|
+
ke as Tour,
|
|
203
|
+
ve as Transfer,
|
|
204
|
+
Re as Tree,
|
|
205
|
+
Be as TreeSelect,
|
|
206
|
+
Le as TreeSelectComponent,
|
|
207
|
+
Ie as Typography,
|
|
208
|
+
He as Upload,
|
|
209
|
+
Ke as VirtualList,
|
|
210
|
+
Ne as Watermark,
|
|
211
|
+
ar as Window,
|
|
212
|
+
dr as notification,
|
|
213
|
+
Qe as useBreakpoint,
|
|
214
|
+
ot as useClickOutside,
|
|
215
|
+
qe as useClipboard,
|
|
216
|
+
_e as useDebounce,
|
|
217
|
+
Ve as useDisclosure,
|
|
220
218
|
To as useFormInstance,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
pt as useHover,
|
|
220
|
+
ft as useKeyPress,
|
|
221
|
+
xt as useKeyPressCallback,
|
|
222
|
+
Ye as useLocalStorage,
|
|
223
|
+
et as usePrevious,
|
|
224
|
+
Eo as useSiderContext,
|
|
225
|
+
it as useWindowSize
|
|
228
226
|
};
|
|
229
227
|
//# 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/index10.js
CHANGED
package/dist/index100.js
CHANGED
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
import { useState as u,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
lg: 1024,
|
|
6
|
-
xl: 1280,
|
|
7
|
-
"2xl": 1536
|
|
8
|
-
}, s = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
9
|
-
function l(e) {
|
|
10
|
-
return e >= t["2xl"] ? "2xl" : e >= t.xl ? "xl" : e >= t.lg ? "lg" : e >= t.md ? "md" : e >= t.sm ? "sm" : "xs";
|
|
11
|
-
}
|
|
12
|
-
function i(e, o) {
|
|
13
|
-
return s.indexOf(e) - s.indexOf(o);
|
|
14
|
-
}
|
|
15
|
-
function m() {
|
|
16
|
-
const [e, o] = u(
|
|
17
|
-
() => typeof window < "u" ? window.innerWidth : 1024
|
|
18
|
-
);
|
|
19
|
-
f(() => {
|
|
20
|
-
const n = () => o(window.innerWidth);
|
|
21
|
-
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
22
|
-
}, []);
|
|
23
|
-
const r = l(e);
|
|
24
|
-
return {
|
|
25
|
-
breakpoint: r,
|
|
26
|
-
width: e,
|
|
27
|
-
isAbove: (n) => i(r, n) >= 0,
|
|
28
|
-
isBelow: (n) => i(r, n) < 0,
|
|
29
|
-
isAt: (n) => r === n,
|
|
30
|
-
isBetween: (n, d) => i(r, n) >= 0 && i(r, d) <= 0
|
|
31
|
-
};
|
|
1
|
+
import { useState as u, useCallback as s } from "react";
|
|
2
|
+
function p(o = !1) {
|
|
3
|
+
const [n, e] = u(o), t = s(() => e(!0), []), c = s(() => e(!1), []), l = s(() => e((r) => !r), []);
|
|
4
|
+
return { isOpen: n, onOpen: t, onClose: c, onToggle: l, setIsOpen: e };
|
|
32
5
|
}
|
|
33
6
|
export {
|
|
34
|
-
|
|
7
|
+
p as useDisclosure
|
|
35
8
|
};
|
|
36
9
|
//# 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/useDisclosure.ts"],"sourcesContent":["import { useState, useCallback } from 'react'\n\nexport interface UseDisclosureReturn {\n isOpen: boolean\n onOpen: () => void\n onClose: () => void\n onToggle: () => void\n setIsOpen: (value: boolean) => void\n}\n\n/**\n * Hook for managing open/close state of modals, drawers, dropdowns, etc.\n *\n * @param defaultIsOpen - Initial open state (default: false)\n * @returns Object with isOpen state and control functions\n *\n * @example\n * const { isOpen, onOpen, onClose } = useDisclosure()\n *\n * <Button onClick={onOpen}>Open Modal</Button>\n * <Modal open={isOpen} onClose={onClose}>Content</Modal>\n */\nexport function useDisclosure(defaultIsOpen = false): UseDisclosureReturn {\n const [isOpen, setIsOpen] = useState(defaultIsOpen)\n\n const onOpen = useCallback(() => setIsOpen(true), [])\n const onClose = useCallback(() => setIsOpen(false), [])\n const onToggle = useCallback(() => setIsOpen(prev => !prev), [])\n\n return { isOpen, onOpen, onClose, onToggle, setIsOpen }\n}\n"],"names":["useDisclosure","defaultIsOpen","isOpen","setIsOpen","useState","onOpen","useCallback","onClose","onToggle","prev"],"mappings":";AAsBO,SAASA,EAAcC,IAAgB,IAA4B;AACxE,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAASH,CAAa,GAE5CI,IAASC,EAAY,MAAMH,EAAU,EAAI,GAAG,CAAA,CAAE,GAC9CI,IAAUD,EAAY,MAAMH,EAAU,EAAK,GAAG,CAAA,CAAE,GAChDK,IAAWF,EAAY,MAAMH,EAAU,OAAQ,CAACM,CAAI,GAAG,EAAE;AAE/D,SAAO,EAAE,QAAAP,GAAQ,QAAAG,GAAQ,SAAAE,GAAS,UAAAC,GAAU,WAAAL,EAAA;AAC9C;"}
|
package/dist/index101.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function p(
|
|
3
|
-
const [n,
|
|
4
|
-
|
|
1
|
+
import { useState as a, useCallback as s } from "react";
|
|
2
|
+
function p(t = 2e3) {
|
|
3
|
+
const [n, r] = a(!1), [l, e] = a(null), c = s(async (i) => {
|
|
4
|
+
try {
|
|
5
|
+
return await navigator.clipboard.writeText(i), r(!0), e(null), setTimeout(() => r(!1), t), !0;
|
|
6
|
+
} catch (o) {
|
|
7
|
+
return e(o instanceof Error ? o : new Error("Failed to copy")), r(!1), !1;
|
|
8
|
+
}
|
|
9
|
+
}, [t]), u = s(() => {
|
|
10
|
+
r(!1), e(null);
|
|
11
|
+
}, []);
|
|
12
|
+
return { copy: c, copied: n, error: l, reset: u };
|
|
5
13
|
}
|
|
6
14
|
export {
|
|
7
|
-
p as
|
|
15
|
+
p as useClipboard
|
|
8
16
|
};
|
|
9
17
|
//# 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/useClipboard.ts"],"sourcesContent":["import { useState, useCallback } from 'react'\n\nexport interface UseClipboardReturn {\n copy: (text: string) => Promise<boolean>\n copied: boolean\n error: Error | null\n reset: () => void\n}\n\n/**\n * Hook for copying text to clipboard with success/error state.\n *\n * @param timeout - Duration in ms to show copied state (default: 2000)\n * @returns Object with copy function and state\n *\n * @example\n * const { copy, copied } = useClipboard()\n *\n * <Button onClick={() => copy('Hello!')}>\n * {copied ? 'Copied!' : 'Copy'}\n * </Button>\n */\nexport function useClipboard(timeout = 2000): UseClipboardReturn {\n const [copied, setCopied] = useState(false)\n const [error, setError] = useState<Error | null>(null)\n\n const copy = useCallback(async (text: string): Promise<boolean> => {\n try {\n await navigator.clipboard.writeText(text)\n setCopied(true)\n setError(null)\n\n setTimeout(() => setCopied(false), timeout)\n return true\n } catch (err) {\n setError(err instanceof Error ? err : new Error('Failed to copy'))\n setCopied(false)\n return false\n }\n }, [timeout])\n\n const reset = useCallback(() => {\n setCopied(false)\n setError(null)\n }, [])\n\n return { copy, copied, error, reset }\n}\n"],"names":["useClipboard","timeout","copied","setCopied","useState","error","setError","copy","useCallback","text","err","reset"],"mappings":";AAsBO,SAASA,EAAaC,IAAU,KAA0B;AAC/D,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAOC,CAAQ,IAAIF,EAAuB,IAAI,GAE/CG,IAAOC,EAAY,OAAOC,MAAmC;AACjE,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCN,EAAU,EAAI,GACdG,EAAS,IAAI,GAEb,WAAW,MAAMH,EAAU,EAAK,GAAGF,CAAO,GACnC;AAAA,IACT,SAASS,GAAK;AACZ,aAAAJ,EAASI,aAAe,QAAQA,IAAM,IAAI,MAAM,gBAAgB,CAAC,GACjEP,EAAU,EAAK,GACR;AAAA,IACT;AAAA,EACF,GAAG,CAACF,CAAO,CAAC,GAENU,IAAQH,EAAY,MAAM;AAC9B,IAAAL,EAAU,EAAK,GACfG,EAAS,IAAI;AAAA,EACf,GAAG,CAAA,CAAE;AAEL,SAAO,EAAE,MAAAC,GAAM,QAAAL,GAAQ,OAAAG,GAAO,OAAAM,EAAA;AAChC;"}
|
package/dist/index102.js
CHANGED
|
@@ -1,17 +1,49 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
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;
|
|
4
6
|
try {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const e = window.localStorage.getItem(o);
|
|
8
|
+
return e ? JSON.parse(e) : t;
|
|
9
|
+
} catch {
|
|
10
|
+
return t;
|
|
8
11
|
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return window.addEventListener("storage", e), () => window.removeEventListener("storage", e);
|
|
44
|
+
}, [o]), [s, d, w];
|
|
13
45
|
}
|
|
14
46
|
export {
|
|
15
|
-
|
|
47
|
+
S as useLocalStorage
|
|
16
48
|
};
|
|
17
49
|
//# 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/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/index103.js
CHANGED
|
@@ -1,49 +1,16 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
}
|
|
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);
|
|
42
10
|
};
|
|
43
|
-
|
|
44
|
-
}, [o]), [s, d, w];
|
|
11
|
+
}, [e, t]), o;
|
|
45
12
|
}
|
|
46
13
|
export {
|
|
47
|
-
|
|
14
|
+
i as useDebounce
|
|
48
15
|
};
|
|
49
16
|
//# 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/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;"}
|