asterui 0.10.3 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/README.md +1 -100
  2. package/dist/components/Anchor.d.ts +45 -0
  3. package/dist/components/Diff.d.ts +12 -0
  4. package/dist/components/Kbd.d.ts +8 -0
  5. package/dist/components/Segmented.d.ts +37 -0
  6. package/dist/components/TextRotate.d.ts +13 -0
  7. package/dist/components/Tour.d.ts +61 -0
  8. package/dist/hooks/useClickOutside.d.ts +17 -0
  9. package/dist/hooks/useClipboard.d.ts +20 -0
  10. package/dist/hooks/useDebounce.d.ts +18 -0
  11. package/dist/hooks/useDisclosure.d.ts +20 -0
  12. package/dist/hooks/useHover.d.ts +18 -0
  13. package/dist/hooks/useKeyPress.d.ts +40 -0
  14. package/dist/hooks/useLocalStorage.d.ts +12 -0
  15. package/dist/hooks/usePrevious.d.ts +15 -0
  16. package/dist/hooks/useWindowSize.d.ts +21 -0
  17. package/dist/index.d.ts +26 -0
  18. package/dist/index.js +205 -174
  19. package/dist/index.js.map +1 -1
  20. package/dist/index10.js +92 -30
  21. package/dist/index10.js.map +1 -1
  22. package/dist/index100.js +12 -20
  23. package/dist/index100.js.map +1 -1
  24. package/dist/index101.js +29 -22
  25. package/dist/index101.js.map +1 -1
  26. package/dist/index102.js +17 -19
  27. package/dist/index102.js.map +1 -1
  28. package/dist/index103.js +10788 -95
  29. package/dist/index103.js.map +1 -1
  30. package/dist/index104.js +5 -360
  31. package/dist/index104.js.map +1 -1
  32. package/dist/index105.js +40 -23
  33. package/dist/index105.js.map +1 -1
  34. package/dist/index106.js +2 -73
  35. package/dist/index106.js.map +1 -1
  36. package/dist/index107.js +6 -15
  37. package/dist/index107.js.map +1 -1
  38. package/dist/index108.js +147 -61
  39. package/dist/index108.js.map +1 -1
  40. package/dist/index109.js +26 -140
  41. package/dist/index109.js.map +1 -1
  42. package/dist/index11.js +28 -263
  43. package/dist/index11.js.map +1 -1
  44. package/dist/index110.js +30 -2
  45. package/dist/index110.js.map +1 -1
  46. package/dist/index111.js +2 -56
  47. package/dist/index111.js.map +1 -1
  48. package/dist/index112.js +72 -2
  49. package/dist/index112.js.map +1 -1
  50. package/dist/index113.js +39 -2
  51. package/dist/index113.js.map +1 -1
  52. package/dist/index114.js +26 -2
  53. package/dist/index114.js.map +1 -1
  54. package/dist/index115.js +21 -2
  55. package/dist/index115.js.map +1 -1
  56. package/dist/index116.js +24 -2
  57. package/dist/index116.js.map +1 -1
  58. package/dist/index117.js +20 -2
  59. package/dist/index117.js.map +1 -1
  60. package/dist/index118.js +100 -2
  61. package/dist/index118.js.map +1 -1
  62. package/dist/index119.js +359 -31
  63. package/dist/index119.js.map +1 -1
  64. package/dist/index12.js +259 -89
  65. package/dist/index12.js.map +1 -1
  66. package/dist/index120.js +25 -2
  67. package/dist/index120.js.map +1 -1
  68. package/dist/index121.js +72 -7
  69. package/dist/index121.js.map +1 -1
  70. package/dist/index122.js +16 -2
  71. package/dist/index122.js.map +1 -1
  72. package/dist/index123.js +66 -2
  73. package/dist/index123.js.map +1 -1
  74. package/dist/index124.js +143 -20
  75. package/dist/index124.js.map +1 -1
  76. package/dist/index125.js +2 -2
  77. package/dist/index126.js +55 -23
  78. package/dist/index126.js.map +1 -1
  79. package/dist/index127.js +2 -71
  80. package/dist/index127.js.map +1 -1
  81. package/dist/index128.js +2 -21
  82. package/dist/index128.js.map +1 -1
  83. package/dist/index129.js +2 -34
  84. package/dist/index129.js.map +1 -1
  85. package/dist/index13.js +90 -153
  86. package/dist/index13.js.map +1 -1
  87. package/dist/index130.js +2 -70
  88. package/dist/index130.js.map +1 -1
  89. package/dist/index131.js +2 -2
  90. package/dist/index132.js +2 -2
  91. package/dist/index133.js +2 -22
  92. package/dist/index133.js.map +1 -1
  93. package/dist/index134.js +2 -2
  94. package/dist/index135.js +32 -2
  95. package/dist/index135.js.map +1 -1
  96. package/dist/index136.js +2 -2
  97. package/dist/index137.js +8 -2
  98. package/dist/index137.js.map +1 -1
  99. package/dist/index138.js +2 -4
  100. package/dist/index138.js.map +1 -1
  101. package/dist/index139.js +5 -0
  102. package/dist/index139.js.map +1 -0
  103. package/dist/index14.js +154 -146
  104. package/dist/index14.js.map +1 -1
  105. package/dist/index140.js +24 -0
  106. package/dist/index140.js.map +1 -0
  107. package/dist/index141.js +5 -0
  108. package/dist/index141.js.map +1 -0
  109. package/dist/index142.js +27 -0
  110. package/dist/index142.js.map +1 -0
  111. package/dist/index143.js +74 -0
  112. package/dist/index143.js.map +1 -0
  113. package/dist/index144.js +24 -0
  114. package/dist/index144.js.map +1 -0
  115. package/dist/index145.js +37 -0
  116. package/dist/index145.js.map +1 -0
  117. package/dist/index146.js +73 -0
  118. package/dist/index146.js.map +1 -0
  119. package/dist/index147.js +5 -0
  120. package/dist/index147.js.map +1 -0
  121. package/dist/index148.js +25 -0
  122. package/dist/index148.js.map +1 -0
  123. package/dist/index149.js +5 -0
  124. package/dist/index149.js.map +1 -0
  125. package/dist/index15.js +150 -5
  126. package/dist/index15.js.map +1 -1
  127. package/dist/index150.js +5 -0
  128. package/dist/index150.js.map +1 -0
  129. package/dist/index151.js +5 -0
  130. package/dist/index151.js.map +1 -0
  131. package/dist/index152.js +5 -0
  132. package/dist/index152.js.map +1 -0
  133. package/dist/index153.js +7 -0
  134. package/dist/index153.js.map +1 -0
  135. package/dist/index16.js +5 -71
  136. package/dist/index16.js.map +1 -1
  137. package/dist/index17.js +71 -17
  138. package/dist/index17.js.map +1 -1
  139. package/dist/index18.js +15 -96
  140. package/dist/index18.js.map +1 -1
  141. package/dist/index19.js +89 -105
  142. package/dist/index19.js.map +1 -1
  143. package/dist/index20.js +107 -177
  144. package/dist/index20.js.map +1 -1
  145. package/dist/index21.js +181 -107
  146. package/dist/index21.js.map +1 -1
  147. package/dist/index22.js +107 -29
  148. package/dist/index22.js.map +1 -1
  149. package/dist/index23.js +19 -41
  150. package/dist/index23.js.map +1 -1
  151. package/dist/index24.js +31 -11
  152. package/dist/index24.js.map +1 -1
  153. package/dist/index25.js +41 -33
  154. package/dist/index25.js.map +1 -1
  155. package/dist/index26.js +12 -63
  156. package/dist/index26.js.map +1 -1
  157. package/dist/index27.js +33 -80
  158. package/dist/index27.js.map +1 -1
  159. package/dist/index28.js +63 -18
  160. package/dist/index28.js.map +1 -1
  161. package/dist/index29.js +78 -159
  162. package/dist/index29.js.map +1 -1
  163. package/dist/index3.js +96 -27
  164. package/dist/index3.js.map +1 -1
  165. package/dist/index30.js +16 -1080
  166. package/dist/index30.js.map +1 -1
  167. package/dist/index31.js +159 -16
  168. package/dist/index31.js.map +1 -1
  169. package/dist/index32.js +1081 -121
  170. package/dist/index32.js.map +1 -1
  171. package/dist/index33.js +17 -39
  172. package/dist/index33.js.map +1 -1
  173. package/dist/index34.js +121 -190
  174. package/dist/index34.js.map +1 -1
  175. package/dist/index35.js +37 -94
  176. package/dist/index35.js.map +1 -1
  177. package/dist/index36.js +186 -157
  178. package/dist/index36.js.map +1 -1
  179. package/dist/index37.js +89 -138
  180. package/dist/index37.js.map +1 -1
  181. package/dist/index38.js +161 -14
  182. package/dist/index38.js.map +1 -1
  183. package/dist/index39.js +146 -21
  184. package/dist/index39.js.map +1 -1
  185. package/dist/index4.js +26 -99
  186. package/dist/index4.js.map +1 -1
  187. package/dist/index40.js +12 -116
  188. package/dist/index40.js.map +1 -1
  189. package/dist/index41.js +18 -13
  190. package/dist/index41.js.map +1 -1
  191. package/dist/index42.js +21 -35
  192. package/dist/index42.js.map +1 -1
  193. package/dist/index43.js +117 -114
  194. package/dist/index43.js.map +1 -1
  195. package/dist/index44.js +13 -176
  196. package/dist/index44.js.map +1 -1
  197. package/dist/index45.js +34 -146
  198. package/dist/index45.js.map +1 -1
  199. package/dist/index46.js +116 -12
  200. package/dist/index46.js.map +1 -1
  201. package/dist/index47.js +176 -22
  202. package/dist/index47.js.map +1 -1
  203. package/dist/index48.js +147 -14
  204. package/dist/index48.js.map +1 -1
  205. package/dist/index49.js +10 -5
  206. package/dist/index49.js.map +1 -1
  207. package/dist/index5.js +100 -60
  208. package/dist/index5.js.map +1 -1
  209. package/dist/index50.js +21 -265
  210. package/dist/index50.js.map +1 -1
  211. package/dist/index51.js +10 -13
  212. package/dist/index51.js.map +1 -1
  213. package/dist/index52.js +7 -122
  214. package/dist/index52.js.map +1 -1
  215. package/dist/index53.js +262 -106
  216. package/dist/index53.js.map +1 -1
  217. package/dist/index54.js +14 -167
  218. package/dist/index54.js.map +1 -1
  219. package/dist/index55.js +121 -31
  220. package/dist/index55.js.map +1 -1
  221. package/dist/index56.js +107 -119
  222. package/dist/index56.js.map +1 -1
  223. package/dist/index57.js +161 -77
  224. package/dist/index57.js.map +1 -1
  225. package/dist/index58.js +31 -19
  226. package/dist/index58.js.map +1 -1
  227. package/dist/index59.js +117 -69
  228. package/dist/index59.js.map +1 -1
  229. package/dist/index6.js +61 -130
  230. package/dist/index6.js.map +1 -1
  231. package/dist/index60.js +82 -53
  232. package/dist/index60.js.map +1 -1
  233. package/dist/index61.js +19 -44
  234. package/dist/index61.js.map +1 -1
  235. package/dist/index62.js +70 -48
  236. package/dist/index62.js.map +1 -1
  237. package/dist/index63.js +55 -60
  238. package/dist/index63.js.map +1 -1
  239. package/dist/index64.js +39 -101
  240. package/dist/index64.js.map +1 -1
  241. package/dist/index65.js +52 -41
  242. package/dist/index65.js.map +1 -1
  243. package/dist/index66.js +62 -21
  244. package/dist/index66.js.map +1 -1
  245. package/dist/index67.js +104 -43
  246. package/dist/index67.js.map +1 -1
  247. package/dist/index68.js +41 -134
  248. package/dist/index68.js.map +1 -1
  249. package/dist/index69.js +65 -49
  250. package/dist/index69.js.map +1 -1
  251. package/dist/index7.js +130 -11
  252. package/dist/index7.js.map +1 -1
  253. package/dist/index70.js +21 -22
  254. package/dist/index70.js.map +1 -1
  255. package/dist/index71.js +46 -22
  256. package/dist/index71.js.map +1 -1
  257. package/dist/index72.js +126 -321
  258. package/dist/index72.js.map +1 -1
  259. package/dist/index73.js +52 -56
  260. package/dist/index73.js.map +1 -1
  261. package/dist/index74.js +22 -40
  262. package/dist/index74.js.map +1 -1
  263. package/dist/index75.js +22 -95
  264. package/dist/index75.js.map +1 -1
  265. package/dist/index76.js +311 -112
  266. package/dist/index76.js.map +1 -1
  267. package/dist/index77.js +52 -157
  268. package/dist/index77.js.map +1 -1
  269. package/dist/index78.js +40 -65
  270. package/dist/index78.js.map +1 -1
  271. package/dist/index79.js +23 -35
  272. package/dist/index79.js.map +1 -1
  273. package/dist/index8.js +11 -70
  274. package/dist/index8.js.map +1 -1
  275. package/dist/index80.js +92 -31
  276. package/dist/index80.js.map +1 -1
  277. package/dist/index81.js +116 -196
  278. package/dist/index81.js.map +1 -1
  279. package/dist/index82.js +155 -207
  280. package/dist/index82.js.map +1 -1
  281. package/dist/index83.js +60 -290
  282. package/dist/index83.js.map +1 -1
  283. package/dist/index84.js +34 -177
  284. package/dist/index84.js.map +1 -1
  285. package/dist/index85.js +227 -251
  286. package/dist/index85.js.map +1 -1
  287. package/dist/index86.js +34 -14
  288. package/dist/index86.js.map +1 -1
  289. package/dist/index87.js +208 -31
  290. package/dist/index87.js.map +1 -1
  291. package/dist/index88.js +206 -10786
  292. package/dist/index88.js.map +1 -1
  293. package/dist/index89.js +295 -5
  294. package/dist/index89.js.map +1 -1
  295. package/dist/index9.js +69 -91
  296. package/dist/index9.js.map +1 -1
  297. package/dist/index90.js +172 -36
  298. package/dist/index90.js.map +1 -1
  299. package/dist/index91.js +258 -2
  300. package/dist/index91.js.map +1 -1
  301. package/dist/index92.js +13 -6
  302. package/dist/index92.js.map +1 -1
  303. package/dist/index93.js +32 -151
  304. package/dist/index93.js.map +1 -1
  305. package/dist/index94.js +5 -29
  306. package/dist/index94.js.map +1 -1
  307. package/dist/index95.js +12 -28
  308. package/dist/index95.js.map +1 -1
  309. package/dist/index96.js +46 -2
  310. package/dist/index96.js.map +1 -1
  311. package/dist/index97.js +12 -71
  312. package/dist/index97.js.map +1 -1
  313. package/dist/index98.js +13 -37
  314. package/dist/index98.js.map +1 -1
  315. package/dist/index99.js +7 -25
  316. package/dist/index99.js.map +1 -1
  317. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,182 +1,213 @@
1
1
  import { Affix as e } from "./index2.js";
2
- import { Alert as p } from "./index3.js";
3
- import { Autocomplete as x } from "./index4.js";
4
- import { Avatar as a, AvatarGroup as n } from "./index5.js";
5
- import { Badge as l } from "./index6.js";
6
- import { Breadcrumb as d } from "./index7.js";
7
- import { Button as c } from "./index8.js";
8
- import { Checkbox as T } from "./index9.js";
9
- import { Chat as P } from "./index10.js";
10
- import { ColorPicker as b } from "./index11.js";
11
- import { Card as k } from "./index12.js";
12
- import { Cascader as F } from "./index13.js";
13
- import { Chart as R } from "./index14.js";
14
- import { Carousel as B } from "./index15.js";
15
- import { Collapse as A } from "./index16.js";
16
- import { Container as L } from "./index17.js";
17
- import { ContextMenu as G } from "./index18.js";
18
- import { Countdown as N } from "./index19.js";
19
- import { DatePicker as J } from "./index20.js";
20
- import { Descriptions as Q } from "./index21.js";
21
- import { Divider as W } from "./index22.js";
22
- import { Drawer as q } from "./index23.js";
23
- import { Fieldset as K } from "./index24.js";
24
- import { FileInput as X } from "./index25.js";
25
- import { Flex as Z } from "./index26.js";
26
- import { FloatButton as $ } from "./index27.js";
27
- import { Footer as ro } from "./index28.js";
28
- import { Form as to, useFormInstance as po } from "./index29.js";
29
- import { Col as xo, Grid as fo, Row as ao } from "./index30.js";
30
- import { Hero as io } from "./index31.js";
31
- import { Image as so } from "./index32.js";
32
- import { Indicator as co } from "./index33.js";
33
- import { Dropdown as To } from "./index34.js";
34
- import { Empty as Po } from "./index35.js";
35
- import { Input as bo } from "./index36.js";
36
- import { InputNumber as ko } from "./index37.js";
37
- import { Join as Fo } from "./index38.js";
38
- import { Label as Ro } from "./index39.js";
39
- import { Layout as Bo, useSiderContext as vo } from "./index40.js";
40
- import { List as Do } from "./index41.js";
41
- import { Loading as Mo } from "./index42.js";
42
- import { Masonry as Ho } from "./index43.js";
43
- import { Mention as Eo } from "./index44.js";
44
- import { Menu as Oo } from "./index45.js";
45
- import { Browser as Uo } from "./index46.js";
46
- import { Code as jo } from "./index47.js";
47
- import { Phone as zo } from "./index48.js";
48
- import { Window as Vo } from "./index49.js";
49
- import { Modal as Yo } from "./index50.js";
50
- import { Navbar as _o } from "./index51.js";
51
- import { notification as or } from "./index52.js";
52
- import { OTPInput as er } from "./index53.js";
53
- import { Pagination as pr } from "./index54.js";
54
- import { PageLayout as xr } from "./index55.js";
55
- import { Popconfirm as ar } from "./index56.js";
56
- import { Popover as ir } from "./index57.js";
57
- import { Progress as sr } from "./index58.js";
58
- import { QRCode as ur } from "./index59.js";
59
- import { Radio as Cr } from "./index60.js";
60
- import { RadialProgress as gr } from "./index61.js";
61
- import { Range as Sr } from "./index62.js";
62
- import { Rating as hr } from "./index63.js";
63
- import { Result as wr } from "./index64.js";
64
- import { Select as Ir } from "./index65.js";
65
- import { Skeleton as yr } from "./index66.js";
66
- import { Space as vr } from "./index67.js";
67
- import { Splitter as Dr } from "./index68.js";
68
- import { Stack as Mr } from "./index69.js";
69
- import { Stats as Hr } from "./index70.js";
70
- import { Steps as Er } from "./index71.js";
71
- import { Table as Or } from "./index72.js";
72
- import { Tabs as Ur } from "./index73.js";
73
- import { Textarea as jr } from "./index74.js";
74
- import { CheckableTag as zr, Tag as Kr } from "./index75.js";
75
- import { ThemeController as Xr } from "./index76.js";
76
- import { TimePicker as Zr } from "./index77.js";
77
- import { Timeline as $r } from "./index78.js";
78
- import { Toggle as re } from "./index79.js";
79
- import { Tooltip as te } from "./index80.js";
80
- import { Transfer as me } from "./index81.js";
81
- import { Tree as fe } from "./index82.js";
82
- import { TreeSelect as ne } from "./index83.js";
83
- import { Typography as le } from "./index84.js";
84
- import { Upload as de } from "./index85.js";
85
- import { Hide as ce, Show as Ce } from "./index86.js";
86
- import { useBreakpoint as ge } from "./index87.js";
2
+ import { Anchor as p } from "./index3.js";
3
+ import { Alert as f } from "./index4.js";
4
+ import { Autocomplete as a } from "./index5.js";
5
+ import { Avatar as n, AvatarGroup as s } from "./index6.js";
6
+ import { Badge as l } from "./index7.js";
7
+ import { Breadcrumb as c } from "./index8.js";
8
+ import { Button as T } from "./index9.js";
9
+ import { Checkbox as P } from "./index10.js";
10
+ import { Chat as b } from "./index11.js";
11
+ import { ColorPicker as h } from "./index12.js";
12
+ import { Card as y } from "./index13.js";
13
+ import { Cascader as R } from "./index14.js";
14
+ import { Chart as F } from "./index15.js";
15
+ import { Carousel as A } from "./index16.js";
16
+ import { Collapse as L } from "./index17.js";
17
+ import { Container as H } from "./index18.js";
18
+ import { ContextMenu as G } from "./index19.js";
19
+ import { Countdown as O } from "./index20.js";
20
+ import { DatePicker as z } from "./index21.js";
21
+ import { Descriptions as J } from "./index22.js";
22
+ import { Diff as U } from "./index23.js";
23
+ import { Divider as q } from "./index24.js";
24
+ import { Drawer as X } from "./index25.js";
25
+ import { Fieldset as Z } from "./index26.js";
26
+ import { FileInput as $ } from "./index27.js";
27
+ import { Flex as ro } from "./index28.js";
28
+ import { FloatButton as to } from "./index29.js";
29
+ import { Footer as mo } from "./index30.js";
30
+ import { Form as xo, useFormInstance as ao } from "./index31.js";
31
+ import { Col as no, Grid as so, Row as uo } from "./index32.js";
32
+ import { Hero as co } from "./index33.js";
33
+ import { Image as To } from "./index34.js";
34
+ import { Indicator as Po } from "./index35.js";
35
+ import { Dropdown as bo } from "./index36.js";
36
+ import { Empty as ho } from "./index37.js";
37
+ import { Input as yo } from "./index38.js";
38
+ import { InputNumber as Ro } from "./index39.js";
39
+ import { Join as Fo } from "./index40.js";
40
+ import { Kbd as Ao } from "./index41.js";
41
+ import { Label as Lo } from "./index42.js";
42
+ import { Layout as Ho, useSiderContext as Ko } from "./index43.js";
43
+ import { List as No } from "./index44.js";
44
+ import { Loading as Wo } from "./index45.js";
45
+ import { Masonry as Eo } from "./index46.js";
46
+ import { Mention as Qo } from "./index47.js";
47
+ import { Menu as jo } from "./index48.js";
48
+ import { Browser as Vo } from "./index49.js";
49
+ import { Code as Yo } from "./index50.js";
50
+ import { Phone as _o } from "./index51.js";
51
+ import { Window as or } from "./index52.js";
52
+ import { Modal as er } from "./index53.js";
53
+ import { Navbar as pr } from "./index54.js";
54
+ import { notification as fr } from "./index55.js";
55
+ import { OTPInput as ar } from "./index56.js";
56
+ import { Pagination as nr } from "./index57.js";
57
+ import { PageLayout as ur } from "./index58.js";
58
+ import { Popconfirm as dr } from "./index59.js";
59
+ import { Popover as Cr } from "./index60.js";
60
+ import { Progress as gr } from "./index61.js";
61
+ import { QRCode as Sr } from "./index62.js";
62
+ import { Radio as kr } from "./index63.js";
63
+ import { RadialProgress as wr } from "./index64.js";
64
+ import { Range as Dr } from "./index65.js";
65
+ import { Rating as vr } from "./index66.js";
66
+ import { Result as Ir } from "./index67.js";
67
+ import { Select as Br } from "./index68.js";
68
+ import { Segmented as Mr } from "./index69.js";
69
+ import { Skeleton as Kr } from "./index70.js";
70
+ import { Space as Nr } from "./index71.js";
71
+ import { Splitter as Wr } from "./index72.js";
72
+ import { Stack as Er } from "./index73.js";
73
+ import { Stats as Qr } from "./index74.js";
74
+ import { Steps as jr } from "./index75.js";
75
+ import { Table as Vr } from "./index76.js";
76
+ import { Tabs as Yr } from "./index77.js";
77
+ import { Textarea as _r } from "./index78.js";
78
+ import { TextRotate as oe } from "./index79.js";
79
+ import { CheckableTag as ee, Tag as te } from "./index80.js";
80
+ import { ThemeController as me } from "./index81.js";
81
+ import { TimePicker as xe } from "./index82.js";
82
+ import { Timeline as ie } from "./index83.js";
83
+ import { Toggle as se } from "./index84.js";
84
+ import { Tour as le } from "./index85.js";
85
+ import { Tooltip as ce } from "./index86.js";
86
+ import { Transfer as Te } from "./index87.js";
87
+ import { Tree as Pe } from "./index88.js";
88
+ import { TreeSelect as be } from "./index89.js";
89
+ import { Typography as he } from "./index90.js";
90
+ import { Upload as ye } from "./index91.js";
91
+ import { Hide as Re, Show as ve } from "./index92.js";
92
+ import { useBreakpoint as Ie } from "./index93.js";
93
+ import { useDisclosure as Be } from "./index94.js";
94
+ import { useClipboard as Me } from "./index95.js";
95
+ import { useLocalStorage as Ke } from "./index96.js";
96
+ import { useDebounce as Ne } from "./index97.js";
97
+ import { useClickOutside as We } from "./index98.js";
98
+ import { usePrevious as Ee } from "./index99.js";
99
+ import { useHover as Qe } from "./index100.js";
100
+ import { useKeyPress as je, useKeyPressCallback as qe } from "./index101.js";
101
+ import { useWindowSize as Xe } from "./index102.js";
87
102
  export {
88
103
  e as Affix,
89
- p as Alert,
90
- x as Autocomplete,
91
- a as Avatar,
92
- n as AvatarGroup,
104
+ f as Alert,
105
+ p as Anchor,
106
+ a as Autocomplete,
107
+ n as Avatar,
108
+ s as AvatarGroup,
93
109
  l as Badge,
94
- d as Breadcrumb,
95
- Uo as Browser,
96
- c as Button,
97
- k as Card,
98
- B as Carousel,
99
- F as Cascader,
100
- R as Chart,
101
- P as Chat,
102
- zr as CheckableTag,
103
- T as Checkbox,
104
- jo as Code,
105
- xo as Col,
106
- A as Collapse,
107
- b as ColorPicker,
108
- L as Container,
110
+ c as Breadcrumb,
111
+ Vo as Browser,
112
+ T as Button,
113
+ y as Card,
114
+ A as Carousel,
115
+ R as Cascader,
116
+ F as Chart,
117
+ b as Chat,
118
+ ee as CheckableTag,
119
+ P as Checkbox,
120
+ Yo as Code,
121
+ no as Col,
122
+ L as Collapse,
123
+ h as ColorPicker,
124
+ H as Container,
109
125
  G as ContextMenu,
110
- N as Countdown,
111
- J as DatePicker,
112
- Q as Descriptions,
113
- W as Divider,
114
- q as Drawer,
115
- To as Dropdown,
116
- Po as Empty,
117
- K as Fieldset,
118
- X as FileInput,
119
- Z as Flex,
120
- $ as FloatButton,
121
- ro as Footer,
122
- to as Form,
123
- fo as Grid,
124
- io as Hero,
125
- ce as Hide,
126
- so as Image,
127
- co as Indicator,
128
- bo as Input,
129
- ko as InputNumber,
126
+ O as Countdown,
127
+ z as DatePicker,
128
+ J as Descriptions,
129
+ U as Diff,
130
+ q as Divider,
131
+ X as Drawer,
132
+ bo as Dropdown,
133
+ ho as Empty,
134
+ Z as Fieldset,
135
+ $ as FileInput,
136
+ ro as Flex,
137
+ to as FloatButton,
138
+ mo as Footer,
139
+ xo as Form,
140
+ so as Grid,
141
+ co as Hero,
142
+ Re as Hide,
143
+ To as Image,
144
+ Po as Indicator,
145
+ yo as Input,
146
+ Ro as InputNumber,
130
147
  Fo as Join,
131
- Ro as Label,
132
- Bo as Layout,
133
- Do as List,
134
- Mo as Loading,
135
- Ho as Masonry,
136
- Eo as Mention,
137
- Oo as Menu,
138
- Yo as Modal,
139
- _o as Navbar,
140
- er as OTPInput,
141
- xr as PageLayout,
142
- pr as Pagination,
143
- zo as Phone,
144
- ar as Popconfirm,
145
- ir as Popover,
146
- sr as Progress,
147
- ur as QRCode,
148
- gr as RadialProgress,
149
- Cr as Radio,
150
- Sr as Range,
151
- hr as Rating,
152
- wr as Result,
153
- ao as Row,
154
- Ir as Select,
155
- Ce as Show,
156
- yr as Skeleton,
157
- vr as Space,
158
- Dr as Splitter,
159
- Mr as Stack,
160
- Hr as Stats,
161
- Er as Steps,
162
- Or as Table,
163
- Ur as Tabs,
164
- Kr as Tag,
165
- jr as Textarea,
166
- Xr as ThemeController,
167
- Zr as TimePicker,
168
- $r as Timeline,
169
- re as Toggle,
170
- te as Tooltip,
171
- me as Transfer,
172
- fe as Tree,
173
- ne as TreeSelect,
174
- le as Typography,
175
- de as Upload,
176
- Vo as Window,
177
- or as notification,
178
- ge as useBreakpoint,
179
- po as useFormInstance,
180
- vo as useSiderContext
148
+ Ao as Kbd,
149
+ Lo as Label,
150
+ Ho as Layout,
151
+ No as List,
152
+ Wo as Loading,
153
+ Eo as Masonry,
154
+ Qo as Mention,
155
+ jo as Menu,
156
+ er as Modal,
157
+ pr as Navbar,
158
+ ar as OTPInput,
159
+ ur as PageLayout,
160
+ nr as Pagination,
161
+ _o as Phone,
162
+ dr as Popconfirm,
163
+ Cr as Popover,
164
+ gr as Progress,
165
+ Sr as QRCode,
166
+ wr as RadialProgress,
167
+ kr as Radio,
168
+ Dr as Range,
169
+ vr as Rating,
170
+ Ir as Result,
171
+ uo as Row,
172
+ Mr as Segmented,
173
+ Br as Select,
174
+ ve as Show,
175
+ Kr as Skeleton,
176
+ Nr as Space,
177
+ Wr as Splitter,
178
+ Er as Stack,
179
+ Qr as Stats,
180
+ jr as Steps,
181
+ Vr as Table,
182
+ Yr as Tabs,
183
+ te as Tag,
184
+ oe as TextRotate,
185
+ _r as Textarea,
186
+ me as ThemeController,
187
+ xe as TimePicker,
188
+ ie as Timeline,
189
+ se as Toggle,
190
+ ce as Tooltip,
191
+ le as Tour,
192
+ Te as Transfer,
193
+ Pe as Tree,
194
+ be as TreeSelect,
195
+ he as Typography,
196
+ ye as Upload,
197
+ or as Window,
198
+ fr as notification,
199
+ Ie as useBreakpoint,
200
+ We as useClickOutside,
201
+ Me as useClipboard,
202
+ Ne as useDebounce,
203
+ Be as useDisclosure,
204
+ ao as useFormInstance,
205
+ Qe as useHover,
206
+ je as useKeyPress,
207
+ qe as useKeyPressCallback,
208
+ Ke as useLocalStorage,
209
+ Ee as usePrevious,
210
+ Ko as useSiderContext,
211
+ Xe as useWindowSize
181
212
  };
182
213
  //# 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
@@ -1,33 +1,95 @@
1
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
- const p = ({
3
- message: l,
4
- position: n = "start",
5
- avatar: s,
6
- avatarAlt: i = "",
7
- header: e,
8
- footer: t,
9
- color: c,
10
- className: h = "",
11
- ...u
12
- }) => {
13
- const d = n === "start" ? "chat-start" : "chat-end", r = {
14
- primary: "chat-bubble-primary",
15
- secondary: "chat-bubble-secondary",
16
- accent: "chat-bubble-accent",
17
- neutral: "chat-bubble-neutral",
18
- info: "chat-bubble-info",
19
- success: "chat-bubble-success",
20
- warning: "chat-bubble-warning",
21
- error: "chat-bubble-error"
22
- }, b = ["chat-bubble"];
23
- return c && r[c] && b.push(r[c]), /* @__PURE__ */ o("div", { className: `chat ${d} ${h}`, ...u, children: [
24
- s && /* @__PURE__ */ a("div", { className: "chat-image avatar", children: /* @__PURE__ */ a("div", { className: "w-10 rounded-full", children: /* @__PURE__ */ a("img", { alt: i, src: s }) }) }),
25
- e && /* @__PURE__ */ a("div", { className: "chat-header", children: e }),
26
- /* @__PURE__ */ a("div", { className: b.join(" "), children: l }),
27
- t && /* @__PURE__ */ a("div", { className: "chat-footer", children: t })
28
- ] });
29
- };
1
+ import { jsx as s, jsxs as C } from "react/jsx-runtime";
2
+ import j, { forwardRef as R, useContext as V, createContext as G } from "react";
3
+ const g = G(null);
4
+ function S({
5
+ children: i,
6
+ value: n,
7
+ defaultValue: b,
8
+ onChange: o,
9
+ disabled: f = !1,
10
+ options: c,
11
+ className: h = ""
12
+ }) {
13
+ const [k, m] = j.useState(b || []), l = n !== void 0 ? n : k, t = {
14
+ value: l,
15
+ onChange: (e, p) => {
16
+ const d = p ? [...l, e] : l.filter((x) => x !== e);
17
+ n === void 0 && m(d), o?.(d);
18
+ },
19
+ disabled: f
20
+ };
21
+ return c ? /* @__PURE__ */ s(g.Provider, { value: t, children: /* @__PURE__ */ s("div", { className: h, children: c.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ C("label", { className: "label cursor-pointer justify-start gap-2", children: [
22
+ /* @__PURE__ */ s(u, { value: e }),
23
+ /* @__PURE__ */ s("span", { className: "label-text", children: e })
24
+ ] }, e) : /* @__PURE__ */ C("label", { className: "label cursor-pointer justify-start gap-2", children: [
25
+ /* @__PURE__ */ s(u, { value: e.value, disabled: e.disabled }),
26
+ /* @__PURE__ */ s("span", { className: "label-text", children: e.label })
27
+ ] }, e.value)) }) }) : /* @__PURE__ */ s(g.Provider, { value: t, children: /* @__PURE__ */ s("div", { className: h, children: i }) });
28
+ }
29
+ const u = R(
30
+ ({
31
+ children: i,
32
+ size: n,
33
+ color: b,
34
+ indeterminate: o = !1,
35
+ className: f = "",
36
+ value: c,
37
+ checked: h,
38
+ onChange: k,
39
+ disabled: m,
40
+ ...l
41
+ }, r) => {
42
+ const t = V(g), e = {
43
+ xs: "checkbox-xs",
44
+ sm: "checkbox-sm",
45
+ md: "checkbox-md",
46
+ lg: "checkbox-lg",
47
+ xl: "checkbox-xl"
48
+ }, p = {
49
+ primary: "checkbox-primary",
50
+ secondary: "checkbox-secondary",
51
+ accent: "checkbox-accent",
52
+ neutral: "checkbox-neutral",
53
+ success: "checkbox-success",
54
+ warning: "checkbox-warning",
55
+ info: "checkbox-info",
56
+ error: "checkbox-error"
57
+ }, d = [
58
+ "checkbox",
59
+ n && e[n],
60
+ b && p[b]
61
+ ].filter(Boolean).join(" "), x = t && c !== void 0 && (typeof c == "string" || typeof c == "number") ? t.value?.includes(c) ?? !1 : h, N = t?.disabled || m, v = (a) => {
62
+ t && c !== void 0 && (typeof c == "string" || typeof c == "number") && t.onChange?.(c, a.target.checked), k?.(a);
63
+ }, w = j.useCallback(
64
+ (a) => {
65
+ a && (a.indeterminate = o), typeof r == "function" ? r(a) : r && (r.current = a);
66
+ },
67
+ [o, r]
68
+ ), y = /* @__PURE__ */ s(
69
+ "input",
70
+ {
71
+ ref: w,
72
+ type: "checkbox",
73
+ className: d,
74
+ value: c,
75
+ checked: x,
76
+ onChange: v,
77
+ disabled: N,
78
+ "data-state": o ? "indeterminate" : x ? "checked" : "unchecked",
79
+ ...l
80
+ }
81
+ );
82
+ return i ? /* @__PURE__ */ C("label", { className: `label cursor-pointer justify-start gap-2 ${f}`, children: [
83
+ y,
84
+ /* @__PURE__ */ s("span", { className: "label-text", children: i })
85
+ ] }) : y;
86
+ }
87
+ );
88
+ u.displayName = "Checkbox";
89
+ const D = Object.assign(u, {
90
+ Group: S
91
+ });
30
92
  export {
31
- p as Chat
93
+ D as Checkbox
32
94
  };
33
95
  //# sourceMappingURL=index10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/Chat.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface ChatProps extends React.HTMLAttributes<HTMLDivElement> {\n message: React.ReactNode\n position?: 'start' | 'end'\n avatar?: string\n avatarAlt?: string\n header?: React.ReactNode\n footer?: React.ReactNode\n color?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error'\n}\n\nexport const Chat: React.FC<ChatProps> = ({\n message,\n position = 'start',\n avatar,\n avatarAlt = '',\n header,\n footer,\n color,\n className = '',\n ...rest\n}) => {\n const positionClass = position === 'start' ? 'chat-start' : 'chat-end'\n\n const colorClasses: Record<string, string> = {\n primary: 'chat-bubble-primary',\n secondary: 'chat-bubble-secondary',\n accent: 'chat-bubble-accent',\n neutral: 'chat-bubble-neutral',\n info: 'chat-bubble-info',\n success: 'chat-bubble-success',\n warning: 'chat-bubble-warning',\n error: 'chat-bubble-error',\n }\n\n const bubbleClasses = ['chat-bubble']\n if (color && colorClasses[color]) {\n bubbleClasses.push(colorClasses[color])\n }\n\n return (\n <div className={`chat ${positionClass} ${className}`} {...rest}>\n {avatar && (\n <div className=\"chat-image avatar\">\n <div className=\"w-10 rounded-full\">\n <img alt={avatarAlt} src={avatar} />\n </div>\n </div>\n )}\n {header && <div className=\"chat-header\">{header}</div>}\n <div className={bubbleClasses.join(' ')}>{message}</div>\n {footer && <div className=\"chat-footer\">{footer}</div>}\n </div>\n )\n}\n"],"names":["Chat","message","position","avatar","avatarAlt","header","footer","color","className","rest","positionClass","colorClasses","bubbleClasses","jsxs","jsx"],"mappings":";AAYO,MAAMA,IAA4B,CAAC;AAAA,EACxC,SAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,QAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAgBR,MAAa,UAAU,eAAe,YAEtDS,IAAuC;AAAA,IAC3C,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,GAGHC,IAAgB,CAAC,aAAa;AACpC,SAAIL,KAASI,EAAaJ,CAAK,KAC7BK,EAAc,KAAKD,EAAaJ,CAAK,CAAC,GAItC,gBAAAM,EAAC,SAAI,WAAW,QAAQH,CAAa,IAAIF,CAAS,IAAK,GAAGC,GACvD,UAAA;AAAA,IAAAN,KACC,gBAAAW,EAAC,OAAA,EAAI,WAAU,qBACb,4BAAC,OAAA,EAAI,WAAU,qBACb,UAAA,gBAAAA,EAAC,SAAI,KAAKV,GAAW,KAAKD,EAAA,CAAQ,GACpC,GACF;AAAA,IAEDE,KAAU,gBAAAS,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAT,GAAO;AAAA,sBAC/C,OAAA,EAAI,WAAWO,EAAc,KAAK,GAAG,GAAI,UAAAX,GAAQ;AAAA,IACjDK,KAAU,gBAAAQ,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAR,EAAA,CAAO;AAAA,EAAA,GAClD;AAEJ;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/components/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, createContext, useContext } from 'react'\n\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {\n children?: React.ReactNode\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'success' | 'warning' | 'info' | 'error'\n indeterminate?: boolean\n className?: string\n}\n\nexport interface CheckboxOptionType {\n label: React.ReactNode\n value: string | number\n disabled?: boolean\n}\n\nexport interface CheckboxGroupProps {\n children?: React.ReactNode\n value?: (string | number)[]\n defaultValue?: (string | number)[]\n onChange?: (values: (string | number)[]) => void\n disabled?: boolean\n options?: (string | number | CheckboxOptionType)[]\n className?: string\n}\n\ninterface CheckboxGroupContextValue {\n value?: (string | number)[]\n onChange?: (checkedValue: string | number, checked: boolean) => void\n disabled?: boolean\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue | null>(null)\n\nfunction CheckboxGroup({\n children,\n value,\n defaultValue,\n onChange,\n disabled = false,\n options,\n className = ''\n}: CheckboxGroupProps) {\n const [internalValue, setInternalValue] = React.useState<(string | number)[]>(defaultValue || [])\n const currentValue = value !== undefined ? value : internalValue\n\n const handleChange = (checkedValue: string | number, checked: boolean) => {\n const newValue = checked\n ? [...currentValue, checkedValue]\n : currentValue.filter((v) => v !== checkedValue)\n\n if (value === undefined) {\n setInternalValue(newValue)\n }\n onChange?.(newValue)\n }\n\n const contextValue: CheckboxGroupContextValue = {\n value: currentValue,\n onChange: handleChange,\n disabled,\n }\n\n // If options are provided, render checkboxes automatically\n if (options) {\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>\n {options.map((option) => {\n if (typeof option === 'string' || typeof option === 'number') {\n return (\n <label key={option} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option} />\n <span className=\"label-text\">{option}</span>\n </label>\n )\n } else {\n return (\n <label key={option.value} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option.value} disabled={option.disabled} />\n <span className=\"label-text\">{option.label}</span>\n </label>\n )\n }\n })}\n </div>\n </CheckboxGroupContext.Provider>\n )\n }\n\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>{children}</div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nconst CheckboxRoot = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n children,\n size,\n color,\n indeterminate = false,\n className = '',\n value,\n checked,\n onChange,\n disabled: disabledProp,\n ...props\n },\n ref\n ) => {\n const groupContext = useContext(CheckboxGroupContext)\n\n const sizeClasses = {\n xs: 'checkbox-xs',\n sm: 'checkbox-sm',\n md: 'checkbox-md',\n lg: 'checkbox-lg',\n xl: 'checkbox-xl',\n }\n\n const colorClasses = {\n primary: 'checkbox-primary',\n secondary: 'checkbox-secondary',\n accent: 'checkbox-accent',\n neutral: 'checkbox-neutral',\n success: 'checkbox-success',\n warning: 'checkbox-warning',\n info: 'checkbox-info',\n error: 'checkbox-error',\n }\n\n const checkboxClasses = [\n 'checkbox',\n size && sizeClasses[size],\n color && colorClasses[color],\n ]\n .filter(Boolean)\n .join(' ')\n\n // If in a group, use group's value to determine checked state\n const isChecked = groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')\n ? groupContext.value?.includes(value) ?? false\n : checked\n\n const isDisabled = groupContext?.disabled || disabledProp\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')) {\n groupContext.onChange?.(value, e.target.checked)\n }\n onChange?.(e)\n }\n\n // Handle indeterminate state\n const checkboxRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n if (node) {\n node.indeterminate = indeterminate\n }\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref) {\n ref.current = node\n }\n },\n [indeterminate, ref]\n )\n\n const dataState = indeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked'\n\n const checkboxInput = (\n <input\n ref={checkboxRef}\n type=\"checkbox\"\n className={checkboxClasses}\n value={value}\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n )\n\n // If children provided, wrap in label\n if (children) {\n return (\n <label className={`label cursor-pointer justify-start gap-2 ${className}`}>\n {checkboxInput}\n <span className=\"label-text\">{children}</span>\n </label>\n )\n }\n\n return checkboxInput\n }\n)\n\nCheckboxRoot.displayName = 'Checkbox'\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Group: CheckboxGroup,\n})\n"],"names":["CheckboxGroupContext","createContext","CheckboxGroup","children","value","defaultValue","onChange","disabled","options","className","internalValue","setInternalValue","React","currentValue","contextValue","checkedValue","checked","newValue","v","jsx","option","jsxs","CheckboxRoot","forwardRef","size","color","indeterminate","disabledProp","props","ref","groupContext","useContext","sizeClasses","colorClasses","checkboxClasses","isChecked","isDisabled","handleChange","e","checkboxRef","node","checkboxInput","Checkbox"],"mappings":"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"}
package/dist/index100.js CHANGED
@@ -1,24 +1,16 @@
1
- var n, s;
2
- function h() {
3
- if (s) return n;
4
- s = 1;
5
- function i(t) {
6
- if (!t || t < 1)
7
- throw new Error("BitMatrix size must be defined and greater than 0");
8
- this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
9
- }
10
- return i.prototype.set = function(t, r, e, o) {
11
- const a = t * this.size + r;
12
- this.data[a] = e, o && (this.reservedBit[a] = !0);
13
- }, i.prototype.get = function(t, r) {
14
- return this.data[t * this.size + r];
15
- }, i.prototype.xor = function(t, r, e) {
16
- this.data[t * this.size + r] ^= e;
17
- }, i.prototype.isReserved = function(t, r) {
18
- return this.reservedBit[t * this.size + r];
19
- }, n = i, n;
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);
10
+ };
11
+ }, []), { ref: n, isHovered: o };
20
12
  }
21
13
  export {
22
- h as __require
14
+ f as useHover
23
15
  };
24
16
  //# sourceMappingURL=index100.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index100.js","sources":["../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"],"sourcesContent":["/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n"],"names":["BitMatrix","size","row","col","value","reserved","index","bitMatrix"],"mappings":";;;;AAKA,WAASA,EAAWC,GAAM;AACxB,QAAI,CAACA,KAAQA,IAAO;AAClB,YAAM,IAAI,MAAM,mDAAmD;AAGrE,SAAK,OAAOA,GACZ,KAAK,OAAO,IAAI,WAAWA,IAAOA,CAAI,GACtC,KAAK,cAAc,IAAI,WAAWA,IAAOA,CAAI;AAAA,EAC/C;AAWA,SAAAD,EAAU,UAAU,MAAM,SAAUE,GAAKC,GAAKC,GAAOC,GAAU;AAC7D,UAAMC,IAAQJ,IAAM,KAAK,OAAOC;AAChC,SAAK,KAAKG,CAAK,IAAIF,GACfC,MAAU,KAAK,YAAYC,CAAK,IAAI;AAAA,EAC1C,GASAN,EAAU,UAAU,MAAM,SAAUE,GAAKC,GAAK;AAC5C,WAAO,KAAK,KAAKD,IAAM,KAAK,OAAOC,CAAG;AAAA,EACxC,GAUAH,EAAU,UAAU,MAAM,SAAUE,GAAKC,GAAKC,GAAO;AACnD,SAAK,KAAKF,IAAM,KAAK,OAAOC,CAAG,KAAKC;AAAA,EACtC,GASAJ,EAAU,UAAU,aAAa,SAAUE,GAAKC,GAAK;AACnD,WAAO,KAAK,YAAYD,IAAM,KAAK,OAAOC,CAAG;AAAA,EAC/C,GAEAI,IAAiBP;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index100.js","sources":["../src/hooks/useHover.ts"],"sourcesContent":["import { useState, useRef, useEffect, type RefObject } from 'react'\n\nexport interface UseHoverReturn<T extends HTMLElement> {\n ref: RefObject<T | null>\n isHovered: boolean\n}\n\n/**\n * Hook that tracks hover state of an element.\n *\n * @returns Object with ref and isHovered state\n *\n * @example\n * const { ref, isHovered } = useHover<HTMLDivElement>()\n *\n * <div ref={ref} className={isHovered ? 'bg-blue-500' : 'bg-gray-500'}>\n * Hover me!\n * </div>\n */\nexport function useHover<T extends HTMLElement = HTMLElement>(): UseHoverReturn<T> {\n const [isHovered, setIsHovered] = useState(false)\n const ref = useRef<T>(null)\n\n useEffect(() => {\n const node = ref.current\n if (!node) return\n\n const handleMouseEnter = () => setIsHovered(true)\n const handleMouseLeave = () => setIsHovered(false)\n\n node.addEventListener('mouseenter', handleMouseEnter)\n node.addEventListener('mouseleave', handleMouseLeave)\n\n return () => {\n node.removeEventListener('mouseenter', handleMouseEnter)\n node.removeEventListener('mouseleave', handleMouseLeave)\n }\n }, [])\n\n return { ref, isHovered }\n}\n"],"names":["useHover","isHovered","setIsHovered","useState","ref","useRef","useEffect","node","handleMouseEnter","handleMouseLeave"],"mappings":";AAmBO,SAASA,IAAmE;AACjF,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAMC,EAAU,IAAI;AAE1B,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAOH,EAAI;AACjB,QAAI,CAACG,EAAM;AAEX,UAAMC,IAAmB,MAAMN,EAAa,EAAI,GAC1CO,IAAmB,MAAMP,EAAa,EAAK;AAEjD,WAAAK,EAAK,iBAAiB,cAAcC,CAAgB,GACpDD,EAAK,iBAAiB,cAAcE,CAAgB,GAE7C,MAAM;AACX,MAAAF,EAAK,oBAAoB,cAAcC,CAAgB,GACvDD,EAAK,oBAAoB,cAAcE,CAAgB;AAAA,IACzD;AAAA,EACF,GAAG,CAAA,CAAE,GAEE,EAAE,KAAAL,GAAK,WAAAH,EAAA;AAChB;"}