@orion-ds/react 4.6.6 → 4.7.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 (442) hide show
  1. package/dist/blocks/index.d 2.ts +9 -0
  2. package/dist/blocks/index.d.ts 2.map +1 -0
  3. package/dist/blocks 2.css +76 -0
  4. package/dist/components/index.d 4.ts +151 -0
  5. package/dist/components/index.d.ts 4.map +1 -0
  6. package/dist/contexts/ThemeContext.d 4.ts +70 -0
  7. package/dist/contexts/ThemeContext.d.ts 4.map +1 -0
  8. package/dist/contexts/index.d 4.ts +8 -0
  9. package/dist/contexts/index.d.ts 4.map +1 -0
  10. package/dist/dnd.d 2.ts +16 -0
  11. package/dist/dnd.d.ts 2.map +1 -0
  12. package/dist/docs/DocComponents.d 3.ts +61 -0
  13. package/dist/docs/DocComponents.d.ts 3.map +1 -0
  14. package/dist/editor.d 2.ts +13 -0
  15. package/dist/editor.d.ts 2.map +1 -0
  16. package/dist/examples/LandingPage.example.d 4.ts +47 -0
  17. package/dist/examples/LandingPage.example.d.ts 4.map +1 -0
  18. package/dist/examples/index.d 4.ts +22 -0
  19. package/dist/examples/index.d.ts 4.map +1 -0
  20. package/dist/hooks/index.d 4.ts +20 -0
  21. package/dist/hooks/index.d.ts 4.map +1 -0
  22. package/dist/hooks/useClickOutside.d 4.ts +19 -0
  23. package/dist/hooks/useClickOutside.d.ts 4.map +1 -0
  24. package/dist/hooks/useCopyToClipboard.d 4.ts +72 -0
  25. package/dist/hooks/useCopyToClipboard.d.ts 4.map +1 -0
  26. package/dist/hooks/useDebounce.d 4.ts +58 -0
  27. package/dist/hooks/useDebounce.d.ts 4.map +1 -0
  28. package/dist/hooks/useDisclosure.d 4.ts +86 -0
  29. package/dist/hooks/useDisclosure.d.ts 4.map +1 -0
  30. package/dist/hooks/useKeyboard.d 4.ts +101 -0
  31. package/dist/hooks/useKeyboard.d.ts 4.map +1 -0
  32. package/dist/hooks/useLocalStorage.d 4.ts +48 -0
  33. package/dist/hooks/useLocalStorage.d.ts 4.map +1 -0
  34. package/dist/hooks/useMediaQuery.d 4.ts +43 -0
  35. package/dist/hooks/useMediaQuery.d.ts 4.map +1 -0
  36. package/dist/hooks/useTheme.d 4.ts +73 -0
  37. package/dist/hooks/useTheme.d.ts 4.map +1 -0
  38. package/dist/index 3.mjs +275 -0
  39. package/dist/index 4.cjs +1 -0
  40. package/dist/index.d 2.ts +171 -0
  41. package/dist/index.d.ts 2.map +1 -0
  42. package/dist/index10 2.mjs +58 -0
  43. package/dist/index10 3.cjs +1 -0
  44. package/dist/index100 3.cjs +1 -0
  45. package/dist/index100 3.mjs +23 -0
  46. package/dist/index101 2.mjs +29 -0
  47. package/dist/index101 3.cjs +1 -0
  48. package/dist/index102 2.mjs +45 -0
  49. package/dist/index102 3.cjs +1 -0
  50. package/dist/index103 3.cjs +1 -0
  51. package/dist/index103 3.mjs +67 -0
  52. package/dist/index104 2.cjs +1 -0
  53. package/dist/index104 2.mjs +65 -0
  54. package/dist/index105 2.cjs +1 -0
  55. package/dist/index105 3.mjs +27 -0
  56. package/dist/index106 2.cjs +1 -0
  57. package/dist/index106 2.mjs +39 -0
  58. package/dist/index107 2.cjs +1 -0
  59. package/dist/index107 3.mjs +21 -0
  60. package/dist/index108 2.mjs +33 -0
  61. package/dist/index108 4.cjs +1 -0
  62. package/dist/index109 2.cjs +1 -0
  63. package/dist/index109 4.mjs +39 -0
  64. package/dist/index11 2.mjs +20 -0
  65. package/dist/index11 4.cjs +1 -0
  66. package/dist/index110 2.cjs +1 -0
  67. package/dist/index110 2.mjs +31 -0
  68. package/dist/index111 2.mjs +49 -0
  69. package/dist/index111 3.cjs +1 -0
  70. package/dist/index112 2.cjs +1 -0
  71. package/dist/index112 2.mjs +36 -0
  72. package/dist/index113 2.cjs +1 -0
  73. package/dist/index113 2.mjs +43 -0
  74. package/dist/index114 2.cjs +1 -0
  75. package/dist/index114 2.mjs +27 -0
  76. package/dist/index115 3.mjs +237 -0
  77. package/dist/index115 4.cjs +1 -0
  78. package/dist/index116 3.cjs +1 -0
  79. package/dist/index116 3.mjs +36 -0
  80. package/dist/index117 2.mjs +46 -0
  81. package/dist/index117 4.cjs +1 -0
  82. package/dist/index118 2.cjs +1 -0
  83. package/dist/index118 2.mjs +173 -0
  84. package/dist/index119 2.cjs +1 -0
  85. package/dist/index119 2.mjs +188 -0
  86. package/dist/index120 2.mjs +31 -0
  87. package/dist/index120 3.cjs +1 -0
  88. package/dist/index121 2.cjs +1 -0
  89. package/dist/index121 2.mjs +93 -0
  90. package/dist/index122 2.mjs +55 -0
  91. package/dist/index122 4.cjs +1 -0
  92. package/dist/index123 2.cjs +1 -0
  93. package/dist/index123 3.mjs +69 -0
  94. package/dist/index124 2.mjs +127 -0
  95. package/dist/index124 4.cjs +1 -0
  96. package/dist/index125 3.mjs +111 -0
  97. package/dist/index125 4.cjs +1 -0
  98. package/dist/index126 4.cjs +1 -0
  99. package/dist/index126 4.mjs +114 -0
  100. package/dist/index127 2.mjs +125 -0
  101. package/dist/index127 4.cjs +1 -0
  102. package/dist/index128 2.cjs +1 -0
  103. package/dist/index128 2.mjs +217 -0
  104. package/dist/index129 2.cjs +1 -0
  105. package/dist/index129 2.mjs +109 -0
  106. package/dist/index13 2.mjs +84 -0
  107. package/dist/index13 4.cjs +1 -0
  108. package/dist/index130 2.cjs +1 -0
  109. package/dist/index130 2.mjs +68 -0
  110. package/dist/index131 2.cjs +1 -0
  111. package/dist/index131 3.mjs +45 -0
  112. package/dist/index132 3.cjs +1 -0
  113. package/dist/index132 4.mjs +31 -0
  114. package/dist/index133 3.mjs +33 -0
  115. package/dist/index133 4.cjs +1 -0
  116. package/dist/index134 2.mjs +49 -0
  117. package/dist/index134 3.cjs +1 -0
  118. package/dist/index135 3.cjs +1 -0
  119. package/dist/index135 4.mjs +15 -0
  120. package/dist/index136 2.mjs +47 -0
  121. package/dist/index136 3.cjs +1 -0
  122. package/dist/index137 2.mjs +58 -0
  123. package/dist/index137 3.cjs +1 -0
  124. package/dist/index138 2.mjs +23 -0
  125. package/dist/index138 4.cjs +1 -0
  126. package/dist/index139 2.mjs +21 -0
  127. package/dist/index139 3.cjs +1 -0
  128. package/dist/index14 2.mjs +71 -0
  129. package/dist/index14 4.cjs +1 -0
  130. package/dist/index140 2.cjs +1 -0
  131. package/dist/index140 4.mjs +27 -0
  132. package/dist/index141 2.cjs +1 -0
  133. package/dist/index141 2.mjs +27 -0
  134. package/dist/index142 3.mjs +56 -0
  135. package/dist/index142 4.cjs +1 -0
  136. package/dist/index143 2.mjs +47 -0
  137. package/dist/index143 3.cjs +1 -0
  138. package/dist/index144 2.mjs +31 -0
  139. package/dist/index144 4.cjs +1 -0
  140. package/dist/index145 2.cjs +1 -0
  141. package/dist/index145 3.mjs +70 -0
  142. package/dist/index146 2.cjs +1 -0
  143. package/dist/index146 3.mjs +36 -0
  144. package/dist/index147 2.mjs +23 -0
  145. package/dist/index147 4.cjs +1 -0
  146. package/dist/index148 2.mjs +25 -0
  147. package/dist/index148 4.cjs +1 -0
  148. package/dist/index149 2.cjs +1 -0
  149. package/dist/index149 3.mjs +55 -0
  150. package/dist/index15 2.cjs +1 -0
  151. package/dist/index15 3.mjs +135 -0
  152. package/dist/index150 2.cjs +1 -0
  153. package/dist/index150 3.mjs +57 -0
  154. package/dist/index151 3.cjs +1 -0
  155. package/dist/index151 3.mjs +49 -0
  156. package/dist/index152 2.cjs +1 -0
  157. package/dist/index152 2.mjs +79 -0
  158. package/dist/index153 2.mjs +17 -0
  159. package/dist/index153 3.cjs +1 -0
  160. package/dist/index154 2.mjs +45 -0
  161. package/dist/index154 3.cjs +1 -0
  162. package/dist/index155 2.cjs +1 -0
  163. package/dist/index155 3.mjs +43 -0
  164. package/dist/index156 2.cjs +1 -0
  165. package/dist/index156 3.mjs +38 -0
  166. package/dist/index157 2.cjs +1 -0
  167. package/dist/index157 3.mjs +31 -0
  168. package/dist/index158 2.cjs +1 -0
  169. package/dist/index158 2.mjs +43 -0
  170. package/dist/index159 2.mjs +23 -0
  171. package/dist/index159 3.cjs +1 -0
  172. package/dist/index16 3.cjs +1 -0
  173. package/dist/index16 3.mjs +106 -0
  174. package/dist/index160 2.cjs +1 -0
  175. package/dist/index160 3.mjs +15 -0
  176. package/dist/index161 2.cjs +1 -0
  177. package/dist/index161 3.mjs +60 -0
  178. package/dist/index162 2.cjs +1 -0
  179. package/dist/index162 3.mjs +35 -0
  180. package/dist/index163 2.cjs +1 -0
  181. package/dist/index163 2.mjs +19 -0
  182. package/dist/index164 2.cjs +1 -0
  183. package/dist/index164 2.mjs +31 -0
  184. package/dist/index165 2.mjs +21 -0
  185. package/dist/index165 3.cjs +1 -0
  186. package/dist/index166 2.cjs +1 -0
  187. package/dist/index166 2.mjs +48 -0
  188. package/dist/index167 3.cjs +1 -0
  189. package/dist/index167 3.mjs +55 -0
  190. package/dist/index168 3.mjs +65 -0
  191. package/dist/index168 4.cjs +1 -0
  192. package/dist/index169 2.cjs +1 -0
  193. package/dist/index169 2.mjs +39 -0
  194. package/dist/index17 2.cjs +1 -0
  195. package/dist/index17 2.mjs +178 -0
  196. package/dist/index170 2.mjs +33 -0
  197. package/dist/index170 3.cjs +1 -0
  198. package/dist/index171 3.cjs +1 -0
  199. package/dist/index171 3.mjs +31 -0
  200. package/dist/index172 2.cjs +1 -0
  201. package/dist/index172 4.mjs +35 -0
  202. package/dist/index173 2.cjs +1 -0
  203. package/dist/index173 2.mjs +31 -0
  204. package/dist/index174 2.cjs +1 -0
  205. package/dist/index174 2.mjs +33 -0
  206. package/dist/index175 2.cjs +1 -0
  207. package/dist/index175 2.mjs +67 -0
  208. package/dist/index176 2.cjs +1 -0
  209. package/dist/index176 2.mjs +30 -0
  210. package/dist/index177 2.mjs +41 -0
  211. package/dist/index177 4.cjs +1 -0
  212. package/dist/index178 2.mjs +33 -0
  213. package/dist/index178 3.cjs +1 -0
  214. package/dist/index179 2.cjs +1 -0
  215. package/dist/index179 2.mjs +33 -0
  216. package/dist/index18 2.mjs +38 -0
  217. package/dist/index18 3.cjs +1 -0
  218. package/dist/index180 2.cjs +1 -0
  219. package/dist/index180 3.mjs +53 -0
  220. package/dist/index181 2.cjs +1 -0
  221. package/dist/index181 2.mjs +59 -0
  222. package/dist/index182 2.mjs +21 -0
  223. package/dist/index182 3.cjs +1 -0
  224. package/dist/index183 2.cjs +1 -0
  225. package/dist/index183 3.mjs +21 -0
  226. package/dist/index184 2.cjs +1 -0
  227. package/dist/index184 2.mjs +12 -0
  228. package/dist/index185 2.cjs +1 -0
  229. package/dist/index185 2.mjs +57 -0
  230. package/dist/index19 2.cjs +1 -0
  231. package/dist/index19 2.mjs +103 -0
  232. package/dist/index20 2.cjs +1 -0
  233. package/dist/index20 2.mjs +56 -0
  234. package/dist/index21 2.cjs +1 -0
  235. package/dist/index21 3.mjs +84 -0
  236. package/dist/index22 2.cjs +1 -0
  237. package/dist/index22 2.mjs +86 -0
  238. package/dist/index23 2.cjs +6 -0
  239. package/dist/index23 4.mjs +255 -0
  240. package/dist/index24 2.mjs +114 -0
  241. package/dist/index24 3.cjs +1 -0
  242. package/dist/index25 2.cjs +1 -0
  243. package/dist/index25 4.mjs +196 -0
  244. package/dist/index26 3.mjs +271 -0
  245. package/dist/index26 4.cjs +1 -0
  246. package/dist/index27 2.cjs +1 -0
  247. package/dist/index27 2.mjs +248 -0
  248. package/dist/index28 2.cjs +1 -0
  249. package/dist/index28 2.mjs +193 -0
  250. package/dist/index29 2.cjs +1 -0
  251. package/dist/index29 2.mjs +26 -0
  252. package/dist/index3 2.cjs +1 -0
  253. package/dist/index3 2.mjs +600 -0
  254. package/dist/index30 2.cjs +1 -0
  255. package/dist/index30 2.mjs +339 -0
  256. package/dist/index31 2.cjs +1 -0
  257. package/dist/index31 4.mjs +104 -0
  258. package/dist/index32 2.mjs +103 -0
  259. package/dist/index32 3.cjs +1 -0
  260. package/dist/index33 2.cjs +1 -0
  261. package/dist/index33 4.mjs +48 -0
  262. package/dist/index34 2.cjs +1 -0
  263. package/dist/index34 3.mjs +132 -0
  264. package/dist/index35 2.cjs +1 -0
  265. package/dist/index35 2.mjs +176 -0
  266. package/dist/index36 2.cjs +1 -0
  267. package/dist/index36 2.mjs +30 -0
  268. package/dist/index37 2.cjs +1 -0
  269. package/dist/index37 2.mjs +43 -0
  270. package/dist/index38 2.cjs +1 -0
  271. package/dist/index38 2.mjs +107 -0
  272. package/dist/index39 2.cjs +1 -0
  273. package/dist/index39 4.mjs +202 -0
  274. package/dist/index4 2.mjs +59 -0
  275. package/dist/index4 3.cjs +3 -0
  276. package/dist/index40 2.mjs +164 -0
  277. package/dist/index40 3.cjs +1 -0
  278. package/dist/index41 3.cjs +1 -0
  279. package/dist/index41 3.mjs +47 -0
  280. package/dist/index42 2.cjs +1 -0
  281. package/dist/index42 2.mjs +84 -0
  282. package/dist/index43 2.cjs +1 -0
  283. package/dist/index43 3.mjs +54 -0
  284. package/dist/index44 2.mjs +205 -0
  285. package/dist/index44 3.cjs +3 -0
  286. package/dist/index45 3.cjs +1 -0
  287. package/dist/index45 3.mjs +104 -0
  288. package/dist/index46 2.cjs +1 -0
  289. package/dist/index46 4.mjs +143 -0
  290. package/dist/index47 2.cjs +1 -0
  291. package/dist/index47 2.mjs +190 -0
  292. package/dist/index48 2.mjs +106 -0
  293. package/dist/index48 3.cjs +1 -0
  294. package/dist/index49 2.cjs +1 -0
  295. package/dist/index49 2.mjs +82 -0
  296. package/dist/index5 2.cjs +1 -0
  297. package/dist/index5 2.mjs +94 -0
  298. package/dist/index50 2.mjs +95 -0
  299. package/dist/index50 3.cjs +1 -0
  300. package/dist/index51 2.cjs +1 -0
  301. package/dist/index51 2.mjs +125 -0
  302. package/dist/index52 2.cjs +1 -0
  303. package/dist/index52 3.mjs +72 -0
  304. package/dist/index53 2.cjs +1 -0
  305. package/dist/index53 3.mjs +273 -0
  306. package/dist/index54 2.cjs +1 -0
  307. package/dist/index54 3.mjs +129 -0
  308. package/dist/index55 2.cjs +1 -0
  309. package/dist/index55 2.mjs +172 -0
  310. package/dist/index56 2.cjs +1 -0
  311. package/dist/index56 3.mjs +105 -0
  312. package/dist/index57 2.cjs +1 -0
  313. package/dist/index57 3.mjs +136 -0
  314. package/dist/index58 2.cjs +1 -0
  315. package/dist/index58 2.mjs +191 -0
  316. package/dist/index59 2.cjs +1 -0
  317. package/dist/index59 3.mjs +54 -0
  318. package/dist/index6 2.cjs +1 -0
  319. package/dist/index6 2.mjs +128 -0
  320. package/dist/index60 2.mjs +148 -0
  321. package/dist/index60 3.cjs +1 -0
  322. package/dist/index61 2.cjs +1 -0
  323. package/dist/index61 2.mjs +76 -0
  324. package/dist/index62 2.cjs +1 -0
  325. package/dist/index62 2.mjs +87 -0
  326. package/dist/index63 2.cjs +1 -0
  327. package/dist/index63 2.mjs +36 -0
  328. package/dist/index64 2.cjs +1 -0
  329. package/dist/index64 3.mjs +78 -0
  330. package/dist/index65 3.mjs +153 -0
  331. package/dist/index65 4.cjs +1 -0
  332. package/dist/index66 2.cjs +1 -0
  333. package/dist/index66 2.mjs +54 -0
  334. package/dist/index67 2.cjs +1 -0
  335. package/dist/index67 2.mjs +109 -0
  336. package/dist/index68 2.cjs +1 -0
  337. package/dist/index68 3.mjs +28 -0
  338. package/dist/index69 2.cjs +1 -0
  339. package/dist/index69 2.mjs +133 -0
  340. package/dist/index7 2.mjs +120 -0
  341. package/dist/index7 3.cjs +1 -0
  342. package/dist/index70 2.cjs +1 -0
  343. package/dist/index70 2.mjs +80 -0
  344. package/dist/index71 2.cjs +1 -0
  345. package/dist/index71 2.mjs +101 -0
  346. package/dist/index72 2.mjs +97 -0
  347. package/dist/index72 3.cjs +1 -0
  348. package/dist/index73 2.cjs +1 -0
  349. package/dist/index73 2.mjs +118 -0
  350. package/dist/index74 2.cjs +1 -0
  351. package/dist/index74 2.mjs +389 -0
  352. package/dist/index75 2.cjs +38 -0
  353. package/dist/index75 2.mjs +98 -0
  354. package/dist/index76 2.mjs +225 -0
  355. package/dist/index76 3.cjs +1 -0
  356. package/dist/index77 2.cjs +1 -0
  357. package/dist/index77 3.mjs +48 -0
  358. package/dist/index78 2.cjs +1 -0
  359. package/dist/index78 2.mjs +101 -0
  360. package/dist/index79 2.cjs +1 -0
  361. package/dist/index79 3.mjs +39 -0
  362. package/dist/index8 2.cjs +1 -0
  363. package/dist/index8 3.mjs +51 -0
  364. package/dist/index80 2.cjs +1 -0
  365. package/dist/index80 2.mjs +161 -0
  366. package/dist/index81 3.cjs +1 -0
  367. package/dist/index81 3.mjs +119 -0
  368. package/dist/index82 2.cjs +1 -0
  369. package/dist/index82 3.mjs +33 -0
  370. package/dist/index83 2.cjs +1 -0
  371. package/dist/index83 3.mjs +249 -0
  372. package/dist/index84 2.mjs +50 -0
  373. package/dist/index84 4.cjs +1 -0
  374. package/dist/index85 2.cjs +1 -0
  375. package/dist/index85 2.mjs +44 -0
  376. package/dist/index86 2.mjs +33 -0
  377. package/dist/index86 3.cjs +1 -0
  378. package/dist/index87 2.cjs +1 -0
  379. package/dist/index87 3.mjs +41 -0
  380. package/dist/index88 2.mjs +39 -0
  381. package/dist/index88 3.cjs +1 -0
  382. package/dist/index89 3.cjs +1 -0
  383. package/dist/index89 3.mjs +26 -0
  384. package/dist/index9 2.cjs +1 -0
  385. package/dist/index9 2.mjs +91 -0
  386. package/dist/index90 2.cjs +1 -0
  387. package/dist/index90 2.mjs +35 -0
  388. package/dist/index91 2.cjs +1 -0
  389. package/dist/index91 2.mjs +99 -0
  390. package/dist/index92 2.mjs +103 -0
  391. package/dist/index92 3.cjs +1 -0
  392. package/dist/index93 2.cjs +1 -0
  393. package/dist/index93 2.mjs +21 -0
  394. package/dist/index94 2.cjs +1 -0
  395. package/dist/index94 2.mjs +55 -0
  396. package/dist/index95 2.cjs +1 -0
  397. package/dist/index95 2.mjs +74 -0
  398. package/dist/index96 2.cjs +97 -0
  399. package/dist/index96 2.mjs +206 -0
  400. package/dist/index97 2.mjs +157 -0
  401. package/dist/index97 3.cjs +1 -0
  402. package/dist/index98 2.cjs +1 -0
  403. package/dist/index98 3.mjs +221 -0
  404. package/dist/index99 2.cjs +1 -0
  405. package/dist/index99 2.mjs +21 -0
  406. package/dist/main.d 2.ts +2 -0
  407. package/dist/main.d.ts 3.map +1 -0
  408. package/dist/rich.d 2.ts +16 -0
  409. package/dist/rich.d.ts 2.map +1 -0
  410. package/dist/sections/index.d 2.ts +29 -0
  411. package/dist/sections/index.d.ts 2.map +1 -0
  412. package/dist/styles/marker 3.css +1 -0
  413. package/dist/styles 2.css +9055 -0
  414. package/dist/templates/index.d 2.ts +1 -0
  415. package/dist/test/a11y.d 3.ts +8 -0
  416. package/dist/test/a11y.d.ts 3.map +1 -0
  417. package/dist/test/performance.bench.d 3.ts +11 -0
  418. package/dist/test/performance.bench.d.ts 3.map +1 -0
  419. package/dist/test/setup.d 3.ts +2 -0
  420. package/dist/test/setup.d.ts 3.map +1 -0
  421. package/dist/theme 2.css +8871 -0
  422. package/dist/tokens/brands.d 3.ts +5 -0
  423. package/dist/tokens/brands.d.ts 3.map +1 -0
  424. package/dist/tokens/index.d 3.ts +11 -0
  425. package/dist/tokens/index.d.ts 3.map +1 -0
  426. package/dist/tokens/primitives.d 3.ts +5 -0
  427. package/dist/tokens/primitives.d.ts 3.map +1 -0
  428. package/dist/tokens/themes.d 3.ts +9 -0
  429. package/dist/tokens/themes.d.ts 3.map +1 -0
  430. package/dist/tokens/types.d 3.ts +365 -0
  431. package/dist/tokens/types.d.ts 3.map +1 -0
  432. package/dist/tokens/utils.d 3.ts +42 -0
  433. package/dist/tokens/utils.d.ts 3.map +1 -0
  434. package/dist/utils/fonts.d 3.ts +46 -0
  435. package/dist/utils/fonts.d.ts 3.map +1 -0
  436. package/dist/utils/icons.d 3.ts +61 -0
  437. package/dist/utils/icons.d.ts 3.map +1 -0
  438. package/dist/utils/index.d 3.ts +9 -0
  439. package/dist/utils/index.d.ts 3.map +1 -0
  440. package/dist/utils/validation.d 3.ts +94 -0
  441. package/dist/utils/validation.d.ts 3.map +1 -0
  442. package/package.json +1 -1
@@ -0,0 +1,132 @@
1
+ import { jsxs as m, jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as s, useCallback as u, useEffect as j } from "react";
3
+ import { createPortal as L } from "react-dom";
4
+ import o from "./index146.mjs";
5
+ const w = s(
6
+ ({ children: e, className: r, ...t }, a) => /* @__PURE__ */ d(
7
+ "div",
8
+ {
9
+ ref: a,
10
+ className: `${o.header} ${r || ""}`,
11
+ ...t,
12
+ children: e
13
+ }
14
+ )
15
+ );
16
+ w.displayName = "Drawer.Header";
17
+ const y = s(
18
+ ({ children: e, className: r, ...t }, a) => /* @__PURE__ */ d("div", { ref: a, className: `${o.body} ${r || ""}`, ...t, children: e })
19
+ );
20
+ y.displayName = "Drawer.Body";
21
+ const f = s(
22
+ ({ children: e, className: r, ...t }, a) => /* @__PURE__ */ d(
23
+ "div",
24
+ {
25
+ ref: a,
26
+ className: `${o.footer} ${r || ""}`,
27
+ ...t,
28
+ children: e
29
+ }
30
+ )
31
+ );
32
+ f.displayName = "Drawer.Footer";
33
+ const v = s(
34
+ ({
35
+ open: e,
36
+ onClose: r,
37
+ placement: t = "right",
38
+ size: a = "md",
39
+ closeOnBackdrop: n = !0,
40
+ closeOnEscape: c = !0,
41
+ showCloseButton: h = !0,
42
+ children: b,
43
+ className: k,
44
+ ...p
45
+ }, N) => {
46
+ const i = u(
47
+ (l) => {
48
+ c && l.key === "Escape" && r();
49
+ },
50
+ [c, r]
51
+ ), D = u(() => {
52
+ n && r();
53
+ }, [n, r]);
54
+ if (j(() => {
55
+ if (e) {
56
+ const l = document.body.style.overflow;
57
+ return document.body.style.overflow = "hidden", document.addEventListener("keydown", i), () => {
58
+ document.body.style.overflow = l, document.removeEventListener("keydown", i);
59
+ };
60
+ }
61
+ }, [e, i]), !e)
62
+ return null;
63
+ const g = [o.overlay, e && o.overlayVisible].filter(Boolean).join(" "), B = [
64
+ o.drawer,
65
+ o[t],
66
+ o[`size-${a}`],
67
+ e && o.drawerVisible,
68
+ k
69
+ ].filter(Boolean).join(" "), $ = /* @__PURE__ */ m("div", { className: g, children: [
70
+ /* @__PURE__ */ d(
71
+ "div",
72
+ {
73
+ className: o.backdrop,
74
+ onClick: D,
75
+ "aria-hidden": "true"
76
+ }
77
+ ),
78
+ /* @__PURE__ */ m(
79
+ "div",
80
+ {
81
+ ref: N,
82
+ className: B,
83
+ role: "dialog",
84
+ "aria-modal": "true",
85
+ ...p,
86
+ children: [
87
+ h && /* @__PURE__ */ d(
88
+ "button",
89
+ {
90
+ type: "button",
91
+ className: o.closeButton,
92
+ onClick: r,
93
+ "aria-label": "Close drawer",
94
+ children: /* @__PURE__ */ d(
95
+ "svg",
96
+ {
97
+ width: "20",
98
+ height: "20",
99
+ viewBox: "0 0 20 20",
100
+ fill: "none",
101
+ xmlns: "http://www.w3.org/2000/svg",
102
+ children: /* @__PURE__ */ d(
103
+ "path",
104
+ {
105
+ d: "M15 5L5 15M5 5L15 15",
106
+ stroke: "currentColor",
107
+ strokeWidth: "1.5",
108
+ strokeLinecap: "round",
109
+ strokeLinejoin: "round"
110
+ }
111
+ )
112
+ }
113
+ )
114
+ }
115
+ ),
116
+ b
117
+ ]
118
+ }
119
+ )
120
+ ] });
121
+ return L($, document.body);
122
+ }
123
+ );
124
+ v.displayName = "Drawer";
125
+ const H = Object.assign(v, {
126
+ Header: w,
127
+ Body: y,
128
+ Footer: f
129
+ });
130
+ export {
131
+ H as Drawer
132
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),U=require("react-dom"),i=require("./index101.cjs"),V=(e,l,m)=>{const r=window.scrollX,c=window.scrollY,u=4;let n=0,h=0;switch(m){case"bottom-start":n=e.bottom+c+u,h=e.left+r;break;case"bottom":n=e.bottom+c+u,h=e.left+r+(e.width-l.width)/2;break;case"bottom-end":n=e.bottom+c+u,h=e.right+r-l.width;break;case"top-start":n=e.top+c-l.height-u,h=e.left+r;break;case"top":n=e.top+c-l.height-u,h=e.left+r+(e.width-l.width)/2;break;case"top-end":n=e.top+c-l.height-u,h=e.right+r-l.width;break}return{top:n,left:h}},_=({item:e,onSelect:l,onNavigate:m})=>{const r=()=>{e.disabled||(e.onClick?.(),l())},c=n=>{n.key==="Enter"||n.key===" "?(n.preventDefault(),r()):n.key==="ArrowDown"?(n.preventDefault(),m?.("down")):n.key==="ArrowUp"&&(n.preventDefault(),m?.("up"))},u=[i.default.item,e.disabled&&i.default.disabled,e.danger&&i.default.danger].filter(Boolean).join(" ");return a.jsxs("div",{className:u,role:"menuitem",tabIndex:e.disabled?-1:0,"aria-disabled":e.disabled,onClick:r,onKeyDown:c,children:[e.icon&&a.jsx("span",{className:i.default.icon,"aria-hidden":"true",children:e.icon}),a.jsx("span",{className:i.default.label,children:e.label}),e.shortcut&&a.jsx("span",{className:i.default.shortcut,"aria-hidden":"true",children:e.shortcut})]})},P=s.forwardRef(({trigger:e,items:l=[],groups:m=[],placement:r="bottom-start",open:c,onOpenChange:u,onSelect:n,minWidth:h=180,closeOnSelect:y=!0,className:F,...S},A)=>{const[B,M]=s.useState(!1),[C,z]=s.useState({top:0,left:0}),[v,E]=s.useState(-1),w=s.useRef(null),k=s.useRef(null),x=s.useRef(new Map);s.useImperativeHandle(A,()=>w.current);const j=c!==void 0,f=j?c:B,I=(m.length>0?m:[{items:l}]).flatMap(t=>t.items).filter(t=>!t.disabled),b=s.useCallback(t=>{j||M(t),u?.(t),t||E(-1)},[j,u]),p=s.useCallback(()=>{if(!w.current||!k.current)return;const t=w.current.getBoundingClientRect(),d=k.current.getBoundingClientRect(),o=V(t,d,r);z(o)},[r]);s.useEffect(()=>{if(f)return requestAnimationFrame(p),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),requestAnimationFrame(()=>{const t=x.current.get(0);t&&(t.focus(),E(0))}),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[f,p]),s.useEffect(()=>{if(!f)return;const t=d=>{const o=d.target;w.current&&!w.current.contains(o)&&k.current&&!k.current.contains(o)&&b(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[f,b]),s.useEffect(()=>{if(!f)return;const t=d=>{d.key==="Escape"&&b(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[f,b]);const K=s.useCallback(()=>{b(!f)},[f,b]),T=s.useCallback(t=>{n?.(t),y&&b(!1)},[y,n,b]),X=s.useCallback(t=>{const d=I.length;if(d===0)return;let o;t==="down"?o=v<d-1?v+1:0:o=v>0?v-1:d-1,E(o),x.current.get(o)?.focus()},[v,I.length]),Y=s.isValidElement(e)?s.cloneElement(e,{onClick:K,"aria-expanded":f,"aria-haspopup":"menu"}):e,D=m.length>0?m:[{items:l}],H=[i.default.menu,f&&i.default.visible,F].filter(Boolean).join(" ");let N=0;const O=a.jsx("div",{ref:k,className:H,style:{top:C.top,left:C.left,minWidth:h},role:"menu","aria-orientation":"vertical",...S,children:D.map((t,d)=>a.jsxs("div",{className:i.default.group,children:[t.label&&a.jsx("div",{className:i.default.groupLabel,children:t.label}),t.items.map(o=>{const L=N;return o.disabled||N++,a.jsx("div",{ref:q=>{q&&!o.disabled&&x.current.set(L,q)},children:a.jsx(_,{item:o,onSelect:()=>T(o),onNavigate:X})},o.id)}),d<D.length-1&&a.jsx("div",{className:i.default.separator,role:"separator"})]},d))});return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,className:i.default.trigger,children:Y}),f&&U.createPortal(O,document.body)]})});P.displayName="Dropdown";exports.Dropdown=P;
@@ -0,0 +1,176 @@
1
+ import { jsx as m, jsxs as L, Fragment as O } from "react/jsx-runtime";
2
+ import { forwardRef as Q, useState as N, useRef as C, useImperativeHandle as W, useCallback as k, useEffect as x, isValidElement as Z, cloneElement as _ } from "react";
3
+ import { createPortal as $ } from "react-dom";
4
+ import r from "./index101.mjs";
5
+ const g = (e, s, u) => {
6
+ const a = window.scrollX, i = window.scrollY, d = 4;
7
+ let n = 0, f = 0;
8
+ switch (u) {
9
+ case "bottom-start":
10
+ n = e.bottom + i + d, f = e.left + a;
11
+ break;
12
+ case "bottom":
13
+ n = e.bottom + i + d, f = e.left + a + (e.width - s.width) / 2;
14
+ break;
15
+ case "bottom-end":
16
+ n = e.bottom + i + d, f = e.right + a - s.width;
17
+ break;
18
+ case "top-start":
19
+ n = e.top + i - s.height - d, f = e.left + a;
20
+ break;
21
+ case "top":
22
+ n = e.top + i - s.height - d, f = e.left + a + (e.width - s.width) / 2;
23
+ break;
24
+ case "top-end":
25
+ n = e.top + i - s.height - d, f = e.right + a - s.width;
26
+ break;
27
+ }
28
+ return { top: n, left: f };
29
+ }, R = ({
30
+ item: e,
31
+ onSelect: s,
32
+ onNavigate: u
33
+ }) => {
34
+ const a = () => {
35
+ e.disabled || (e.onClick?.(), s());
36
+ }, i = (n) => {
37
+ n.key === "Enter" || n.key === " " ? (n.preventDefault(), a()) : n.key === "ArrowDown" ? (n.preventDefault(), u?.("down")) : n.key === "ArrowUp" && (n.preventDefault(), u?.("up"));
38
+ }, d = [
39
+ r.item,
40
+ e.disabled && r.disabled,
41
+ e.danger && r.danger
42
+ ].filter(Boolean).join(" ");
43
+ return /* @__PURE__ */ L(
44
+ "div",
45
+ {
46
+ className: d,
47
+ role: "menuitem",
48
+ tabIndex: e.disabled ? -1 : 0,
49
+ "aria-disabled": e.disabled,
50
+ onClick: a,
51
+ onKeyDown: i,
52
+ children: [
53
+ e.icon && /* @__PURE__ */ m("span", { className: r.icon, "aria-hidden": "true", children: e.icon }),
54
+ /* @__PURE__ */ m("span", { className: r.label, children: e.label }),
55
+ e.shortcut && /* @__PURE__ */ m("span", { className: r.shortcut, "aria-hidden": "true", children: e.shortcut })
56
+ ]
57
+ }
58
+ );
59
+ }, ee = Q(
60
+ ({
61
+ trigger: e,
62
+ items: s = [],
63
+ groups: u = [],
64
+ placement: a = "bottom-start",
65
+ open: i,
66
+ onOpenChange: d,
67
+ onSelect: n,
68
+ minWidth: f = 180,
69
+ closeOnSelect: D = !0,
70
+ className: q,
71
+ ...z
72
+ }, K) => {
73
+ const [X, Y] = N(!1), [F, H] = N({ top: 0, left: 0 }), [b, E] = N(-1), p = C(null), v = C(null), I = C(/* @__PURE__ */ new Map());
74
+ W(K, () => p.current);
75
+ const y = i !== void 0, c = y ? i : X, P = (u.length > 0 ? u : [{ items: s }]).flatMap((t) => t.items).filter((t) => !t.disabled), h = k(
76
+ (t) => {
77
+ y || Y(t), d?.(t), t || E(-1);
78
+ },
79
+ [y, d]
80
+ ), w = k(() => {
81
+ if (!p.current || !v.current) return;
82
+ const t = p.current.getBoundingClientRect(), l = v.current.getBoundingClientRect(), o = g(t, l, a);
83
+ H(o);
84
+ }, [a]);
85
+ x(() => {
86
+ if (c)
87
+ return requestAnimationFrame(w), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0), requestAnimationFrame(() => {
88
+ const t = I.current.get(0);
89
+ t && (t.focus(), E(0));
90
+ }), () => {
91
+ window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0);
92
+ };
93
+ }, [c, w]), x(() => {
94
+ if (!c) return;
95
+ const t = (l) => {
96
+ const o = l.target;
97
+ p.current && !p.current.contains(o) && v.current && !v.current.contains(o) && h(!1);
98
+ };
99
+ return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
100
+ }, [c, h]), x(() => {
101
+ if (!c) return;
102
+ const t = (l) => {
103
+ l.key === "Escape" && h(!1);
104
+ };
105
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
106
+ }, [c, h]);
107
+ const S = k(() => {
108
+ h(!c);
109
+ }, [c, h]), T = k(
110
+ (t) => {
111
+ n?.(t), D && h(!1);
112
+ },
113
+ [D, n, h]
114
+ ), U = k(
115
+ (t) => {
116
+ const l = P.length;
117
+ if (l === 0) return;
118
+ let o;
119
+ t === "down" ? o = b < l - 1 ? b + 1 : 0 : o = b > 0 ? b - 1 : l - 1, E(o), I.current.get(o)?.focus();
120
+ },
121
+ [b, P.length]
122
+ ), V = Z(e) ? _(e, {
123
+ onClick: S,
124
+ "aria-expanded": c,
125
+ "aria-haspopup": "menu"
126
+ }) : e, j = u.length > 0 ? u : [{ items: s }], G = [r.menu, c && r.visible, q].filter(Boolean).join(" ");
127
+ let A = 0;
128
+ const J = /* @__PURE__ */ m(
129
+ "div",
130
+ {
131
+ ref: v,
132
+ className: G,
133
+ style: {
134
+ top: F.top,
135
+ left: F.left,
136
+ minWidth: f
137
+ },
138
+ role: "menu",
139
+ "aria-orientation": "vertical",
140
+ ...z,
141
+ children: j.map((t, l) => /* @__PURE__ */ L("div", { className: r.group, children: [
142
+ t.label && /* @__PURE__ */ m("div", { className: r.groupLabel, children: t.label }),
143
+ t.items.map((o) => {
144
+ const B = A;
145
+ return o.disabled || A++, /* @__PURE__ */ m(
146
+ "div",
147
+ {
148
+ ref: (M) => {
149
+ M && !o.disabled && I.current.set(B, M);
150
+ },
151
+ children: /* @__PURE__ */ m(
152
+ R,
153
+ {
154
+ item: o,
155
+ onSelect: () => T(o),
156
+ onNavigate: U
157
+ }
158
+ )
159
+ },
160
+ o.id
161
+ );
162
+ }),
163
+ l < j.length - 1 && /* @__PURE__ */ m("div", { className: r.separator, role: "separator" })
164
+ ] }, l))
165
+ }
166
+ );
167
+ return /* @__PURE__ */ L(O, { children: [
168
+ /* @__PURE__ */ m("div", { ref: p, className: r.trigger, children: V }),
169
+ c && $(J, document.body)
170
+ ] });
171
+ }
172
+ );
173
+ ee.displayName = "Dropdown";
174
+ export {
175
+ ee as Dropdown
176
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),e=require("./index99.cjs"),r=f.forwardRef(({icon:a,title:i,description:s,action:l,secondaryAction:d,size:c="md",className:m,...u},n)=>{const o=[e.default.emptyState,e.default[c],m].filter(Boolean).join(" ");return t.jsxs("div",{ref:n,className:o,...u,children:[a&&t.jsx("div",{className:e.default.icon,"aria-hidden":"true",children:a}),t.jsx("h3",{className:e.default.title,children:i}),s&&t.jsx("p",{className:e.default.description,children:s}),(l||d)&&t.jsxs("div",{className:e.default.actions,children:[l,d]})]})});r.displayName="EmptyState";exports.EmptyState=r;
@@ -0,0 +1,30 @@
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ import e from "./index99.mjs";
4
+ const N = h(
5
+ ({
6
+ icon: a,
7
+ title: l,
8
+ description: t,
9
+ action: r,
10
+ secondaryAction: m,
11
+ size: d = "md",
12
+ className: c,
13
+ ...o
14
+ }, n) => {
15
+ const p = [e.emptyState, e[d], c].filter(Boolean).join(" ");
16
+ return /* @__PURE__ */ i("div", { ref: n, className: p, ...o, children: [
17
+ a && /* @__PURE__ */ s("div", { className: e.icon, "aria-hidden": "true", children: a }),
18
+ /* @__PURE__ */ s("h3", { className: e.title, children: l }),
19
+ t && /* @__PURE__ */ s("p", { className: e.description, children: t }),
20
+ (r || m) && /* @__PURE__ */ i("div", { className: e.actions, children: [
21
+ r,
22
+ m
23
+ ] })
24
+ ] });
25
+ }
26
+ );
27
+ N.displayName = "EmptyState";
28
+ export {
29
+ N as EmptyState
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),t=require("./index135.cjs");class i extends o.Component{constructor(r){super(r),this.reset=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,s){this.props.onError?.(r,s)}componentDidUpdate(r){this.state.hasError&&this.props.resetKey!==void 0&&r.resetKey!==this.props.resetKey&&this.reset()}render(){if(this.state.hasError&&this.state.error){const{fallback:r}=this.props;return typeof r=="function"?r(this.state.error,this.reset):r||e.jsxs("div",{className:t.default.errorBoundary,role:"alert",children:[e.jsx(a.AlertCircle,{size:32,className:t.default.icon}),e.jsx("p",{className:t.default.title,children:"Something went wrong"}),e.jsx("p",{className:t.default.message,children:this.state.error.message}),e.jsx("button",{className:t.default.resetButton,onClick:this.reset,type:"button",children:"Try again"})]})}return this.props.children}}exports.ErrorBoundary=i;
@@ -0,0 +1,43 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import { AlertCircle as a } from "lucide-react";
4
+ import e from "./index135.mjs";
5
+ class m extends i.Component {
6
+ constructor(r) {
7
+ super(r), this.reset = () => {
8
+ this.setState({ hasError: !1, error: null });
9
+ }, this.state = { hasError: !1, error: null };
10
+ }
11
+ static getDerivedStateFromError(r) {
12
+ return { hasError: !0, error: r };
13
+ }
14
+ componentDidCatch(r, s) {
15
+ this.props.onError?.(r, s);
16
+ }
17
+ componentDidUpdate(r) {
18
+ this.state.hasError && this.props.resetKey !== void 0 && r.resetKey !== this.props.resetKey && this.reset();
19
+ }
20
+ render() {
21
+ if (this.state.hasError && this.state.error) {
22
+ const { fallback: r } = this.props;
23
+ return typeof r == "function" ? r(this.state.error, this.reset) : r || /* @__PURE__ */ o("div", { className: e.errorBoundary, role: "alert", children: [
24
+ /* @__PURE__ */ t(a, { size: 32, className: e.icon }),
25
+ /* @__PURE__ */ t("p", { className: e.title, children: "Something went wrong" }),
26
+ /* @__PURE__ */ t("p", { className: e.message, children: this.state.error.message }),
27
+ /* @__PURE__ */ t(
28
+ "button",
29
+ {
30
+ className: e.resetButton,
31
+ onClick: this.reset,
32
+ type: "button",
33
+ children: "Try again"
34
+ }
35
+ )
36
+ ] });
37
+ }
38
+ return this.props.children;
39
+ }
40
+ }
41
+ export {
42
+ m as ErrorBoundary
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),x=require("react"),b=require("lucide-react"),e=require("./index134.cjs"),v=x.forwardRef(({label:i,error:s,helperText:t,leftIcon:r,rightIcon:d,fullWidth:I=!1,size:c="md",optional:u=!1,className:g,id:$,disabled:f,required:o,"aria-label":h,"aria-describedby":p,...y},F)=>{const C=x.useId(),n=$||`field-${C}`,m=`${n}-error`,j=`${n}-helper`,N=s&&!d,l=[];s&&l.push(m),t&&!s&&l.push(j),p&&l.push(p);const R=l.length>0?l.join(" "):void 0;!(i||h)&&process.env.NODE_ENV==="development"&&console.warn("Field: Missing accessible name. Provide either a `label` prop or `aria-label` for screen reader users.");const q=[e.default.fieldContainer,I&&e.default.fullWidth,s&&e.default.error,f&&e.default.disabled,g].filter(Boolean).join(" "),A=[e.default.input,e.default[c],r&&e.default.hasLeftIcon,(d||N)&&e.default.hasRightIcon].filter(Boolean).join(" "),B=c==="sm"?14:c==="lg"?20:16;return a.jsxs("div",{className:q,children:[i&&a.jsxs("label",{htmlFor:n,className:e.default.label,children:[a.jsx("span",{className:e.default.labelText,children:i}),u&&a.jsx("span",{className:e.default.optional,"aria-hidden":"true",children:"(optional)"}),o&&!u&&a.jsx("span",{className:e.default.required,"aria-hidden":"true",children:"*"})]}),a.jsxs("div",{className:e.default.inputWrapper,children:[r&&a.jsx("span",{className:e.default.leftIcon,"aria-hidden":"true",children:r}),a.jsx("input",{ref:F,id:n,className:A,disabled:f,required:o,"aria-required":o||void 0,"aria-invalid":s?"true":"false","aria-describedby":R,"aria-label":i?void 0:h,...y}),d&&a.jsx("span",{className:`${e.default.rightIcon} ${e.default.rightIconInteractive}`,children:d}),N&&a.jsx("span",{className:`${e.default.rightIcon} ${e.default.errorIconInline}`,"aria-hidden":"true",children:a.jsx(b.AlertCircle,{size:B})})]}),t&&!s&&a.jsx("p",{id:j,className:e.default.helperText,children:t}),s&&a.jsxs("p",{id:m,className:e.default.errorMessage,role:"alert","aria-live":"assertive",children:[a.jsx(b.AlertCircle,{size:14,"aria-hidden":"true",className:e.default.errorIconMessage}),a.jsx("span",{children:s})]})]})});v.displayName="Field";exports.Field=v;
@@ -0,0 +1,107 @@
1
+ import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as E, useId as M } from "react";
3
+ import { AlertCircle as b } from "lucide-react";
4
+ import e from "./index134.mjs";
5
+ const R = E(
6
+ ({
7
+ label: n,
8
+ error: a,
9
+ helperText: d,
10
+ leftIcon: o,
11
+ rightIcon: r,
12
+ fullWidth: g = !1,
13
+ size: t = "md",
14
+ optional: h = !1,
15
+ className: $,
16
+ id: j,
17
+ disabled: m,
18
+ required: p,
19
+ "aria-label": f,
20
+ "aria-describedby": u,
21
+ ...y
22
+ }, B) => {
23
+ const C = M(), l = j || `field-${C}`, N = `${l}-error`, v = `${l}-helper`, I = a && !r, i = [];
24
+ a && i.push(N), d && !a && i.push(v), u && i.push(u);
25
+ const F = i.length > 0 ? i.join(" ") : void 0;
26
+ !(n || f) && process.env.NODE_ENV === "development" && console.warn(
27
+ "Field: Missing accessible name. Provide either a `label` prop or `aria-label` for screen reader users."
28
+ );
29
+ const w = [
30
+ e.fieldContainer,
31
+ g && e.fullWidth,
32
+ a && e.error,
33
+ m && e.disabled,
34
+ $
35
+ ].filter(Boolean).join(" "), x = [
36
+ e.input,
37
+ e[t],
38
+ o && e.hasLeftIcon,
39
+ (r || I) && e.hasRightIcon
40
+ ].filter(Boolean).join(" "), A = t === "sm" ? 14 : t === "lg" ? 20 : 16;
41
+ return /* @__PURE__ */ c("div", { className: w, children: [
42
+ n && /* @__PURE__ */ c("label", { htmlFor: l, className: e.label, children: [
43
+ /* @__PURE__ */ s("span", { className: e.labelText, children: n }),
44
+ h && /* @__PURE__ */ s("span", { className: e.optional, "aria-hidden": "true", children: "(optional)" }),
45
+ p && !h && /* @__PURE__ */ s("span", { className: e.required, "aria-hidden": "true", children: "*" })
46
+ ] }),
47
+ /* @__PURE__ */ c("div", { className: e.inputWrapper, children: [
48
+ o && /* @__PURE__ */ s("span", { className: e.leftIcon, "aria-hidden": "true", children: o }),
49
+ /* @__PURE__ */ s(
50
+ "input",
51
+ {
52
+ ref: B,
53
+ id: l,
54
+ className: x,
55
+ disabled: m,
56
+ required: p,
57
+ "aria-required": p || void 0,
58
+ "aria-invalid": a ? "true" : "false",
59
+ "aria-describedby": F,
60
+ "aria-label": n ? void 0 : f,
61
+ ...y
62
+ }
63
+ ),
64
+ r && /* @__PURE__ */ s(
65
+ "span",
66
+ {
67
+ className: `${e.rightIcon} ${e.rightIconInteractive}`,
68
+ children: r
69
+ }
70
+ ),
71
+ I && /* @__PURE__ */ s(
72
+ "span",
73
+ {
74
+ className: `${e.rightIcon} ${e.errorIconInline}`,
75
+ "aria-hidden": "true",
76
+ children: /* @__PURE__ */ s(b, { size: A })
77
+ }
78
+ )
79
+ ] }),
80
+ d && !a && /* @__PURE__ */ s("p", { id: v, className: e.helperText, children: d }),
81
+ a && /* @__PURE__ */ c(
82
+ "p",
83
+ {
84
+ id: N,
85
+ className: e.errorMessage,
86
+ role: "alert",
87
+ "aria-live": "assertive",
88
+ children: [
89
+ /* @__PURE__ */ s(
90
+ b,
91
+ {
92
+ size: 14,
93
+ "aria-hidden": "true",
94
+ className: e.errorIconMessage
95
+ }
96
+ ),
97
+ /* @__PURE__ */ s("span", { children: a })
98
+ ]
99
+ }
100
+ )
101
+ ] });
102
+ }
103
+ );
104
+ R.displayName = "Field";
105
+ export {
106
+ R as Field
107
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("react"),o=require("lucide-react"),s=require("./index103.cjs"),G=t=>t.startsWith("image/")?o.FileImage:t.startsWith("video/")?o.FileVideo:t.startsWith("audio/")?o.FileAudio:t.includes("pdf")||t.includes("document")?o.FileText:o.File,z=t=>{if(t===0)return"0 B";const i=1024,c=["B","KB","MB","GB"],h=Math.floor(Math.log(t)/Math.log(i));return`${parseFloat((t/Math.pow(i,h)).toFixed(1))} ${c[h]}`},$=n.forwardRef(({accept:t,maxFiles:i,maxSize:c,multiple:h=!0,onFilesAdded:C,onFileRemove:D,files:p=[],disabled:l=!1,dropzoneContent:M,placeholder:B="Drag and drop files here, or click to browse",showFileList:E=!0,compact:v=!1,variant:R="default",error:g,helperText:k,className:S,...W},y)=>{const x=n.useRef(null),[A,N]=n.useState(!1),[m,w]=n.useState(null),F=n.useCallback(e=>{const u=[],r=[],I=Array.from(e);return i&&p.length+I.length>i?(r.push(`Maximum ${i} files allowed`),{valid:u,errors:r}):(I.forEach(d=>{if(c&&d.size>c){r.push(`${d.name} exceeds maximum size of ${z(c)}`);return}if(t&&t.length>0&&!t.some(f=>f.startsWith(".")?d.name.toLowerCase().endsWith(f.toLowerCase()):f.endsWith("/*")?d.type.startsWith(f.replace("/*","/")):d.type===f)){r.push(`${d.name} is not an accepted file type`);return}u.push(d)}),{valid:u,errors:r})},[t,i,c,p.length]),j=n.useCallback(e=>{if(l)return;const{valid:u,errors:r}=F(e);r.length>0&&r[0]&&(w(r[0]),setTimeout(()=>w(null),3e3)),u.length>0&&C?.(u)},[l,F,C]),L=n.useCallback(e=>{e.preventDefault(),l||N(!0)},[l]),U=n.useCallback(e=>{e.preventDefault(),N(!1)},[]),b=n.useCallback(e=>{e.preventDefault(),N(!1),j(e.dataTransfer.files)},[j]),T=n.useCallback(e=>{e.target.files&&j(e.target.files),e.target.value=""},[j]),q=()=>{l||x.current?.click()},H=e=>{(e.key==="Enter"||e.key===" ")&&!l&&(e.preventDefault(),x.current?.click())},P=t?.join(","),K=[s.default.fileUploader,s.default[R],v&&s.default.compact,S].filter(Boolean).join(" "),O=[s.default.dropzone,A&&s.default.dropzoneDragging,l&&s.default.dropzoneDisabled,(g||m)&&s.default.dropzoneError].filter(Boolean).join(" ");return a.jsxs("div",{ref:y,className:K,...W,children:[a.jsxs("div",{className:O,onDragOver:L,onDragLeave:U,onDrop:b,onClick:q,onKeyDown:H,role:"button",tabIndex:l?-1:0,"aria-disabled":l,children:[a.jsx("input",{ref:x,type:"file",className:s.default.input,accept:P,multiple:h,onChange:T,disabled:l,"aria-hidden":"true"}),M||a.jsxs("div",{className:s.default.dropzoneContent,children:[a.jsx("div",{className:s.default.dropzoneIcon,children:a.jsx(o.Upload,{size:v?20:24})}),a.jsx("p",{className:s.default.dropzonePlaceholder,children:B}),!v&&a.jsxs("div",{className:s.default.dropzoneHints,children:[t&&a.jsxs("span",{className:s.default.dropzoneHint,children:["Accepted: ",t.join(", ")]}),c&&a.jsxs("span",{className:s.default.dropzoneHint,children:["Max size: ",z(c)]}),i&&a.jsxs("span",{className:s.default.dropzoneHint,children:["Max files: ",i]})]})]})]}),(g||m||k)&&a.jsx("div",{className:`${s.default.helperText} ${g||m?s.default.helperTextError:""}`,children:g||m||k}),E&&p.length>0&&a.jsx("ul",{className:s.default.fileList,children:p.map(e=>{const u=G(e.type);return a.jsxs("li",{className:s.default.fileItem,children:[a.jsx("div",{className:s.default.fileIcon,children:e.preview?a.jsx("img",{src:e.preview,alt:"",className:s.default.filePreview}):a.jsx(u,{size:20})}),a.jsxs("div",{className:s.default.fileInfo,children:[a.jsx("span",{className:s.default.fileName,children:e.name}),a.jsx("span",{className:s.default.fileSize,children:z(e.size)})]}),a.jsxs("div",{className:s.default.fileStatus,children:[e.status==="uploading"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:s.default.progressBar,children:a.jsx("div",{className:s.default.progressFill,style:{width:`${e.progress||0}%`}})}),a.jsx(o.Loader2,{size:16,className:s.default.fileStatusIcon})]}),e.status==="completed"&&a.jsx(o.CheckCircle,{size:16,className:s.default.fileStatusSuccess}),e.status==="error"&&a.jsx(o.AlertCircle,{size:16,className:s.default.fileStatusError})]}),D&&a.jsx("button",{type:"button",className:s.default.fileRemove,onClick:r=>{r.stopPropagation(),D(e.id)},"aria-label":`Remove ${e.name}`,children:a.jsx(o.X,{size:16})})]},e.id)})})]})});$.displayName="FileUploader";exports.FileUploader=$;