@bricks-toolkit/toolkit 0.1.0 → 0.1.2

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 (385) hide show
  1. package/README.md +9 -9
  2. package/dist/{components/Button/Button.types.d.ts → Button.types-BsQYqZml.d.ts} +8 -5
  3. package/dist/Button.types-D-srlWFf.d.mts +27 -0
  4. package/dist/{components/TextInput/TextInput.types.d.ts → TextInput.types-DRI8HQza.d.mts} +8 -5
  5. package/dist/TextInput.types-DRI8HQza.d.ts +32 -0
  6. package/dist/{components/Tooltip/Tooltip.types.d.ts → Tooltip.types-PbUasE3C.d.mts} +9 -6
  7. package/dist/Tooltip.types-PbUasE3C.d.ts +36 -0
  8. package/dist/avatar/index.cjs +11 -0
  9. package/dist/{components/Avatar/Avatar.types.d.ts → avatar/index.d.mts} +10 -5
  10. package/dist/avatar/index.d.ts +29 -0
  11. package/dist/avatar/index.mjs +2 -0
  12. package/dist/badge/index.cjs +11 -0
  13. package/dist/{components/Badge/Badge.types.d.ts → badge/index.d.mts} +20 -6
  14. package/dist/badge/index.d.ts +57 -0
  15. package/dist/badge/index.mjs +2 -0
  16. package/dist/breadcrumbs/index.cjs +11 -0
  17. package/dist/{components/Breadcrumbs/Breadcrumbs.types.d.ts → breadcrumbs/index.d.mts} +10 -5
  18. package/dist/breadcrumbs/index.d.ts +32 -0
  19. package/dist/breadcrumbs/index.mjs +2 -0
  20. package/dist/button/index.cjs +13 -0
  21. package/dist/button/index.d.mts +8 -0
  22. package/dist/button/index.d.ts +8 -0
  23. package/dist/button/index.mjs +4 -0
  24. package/dist/card/index.cjs +31 -0
  25. package/dist/card/index.d.mts +42 -0
  26. package/dist/card/index.d.ts +42 -0
  27. package/dist/card/index.mjs +2 -0
  28. package/dist/checkbox/index.cjs +11 -0
  29. package/dist/{components/Checkbox/Checkbox.types.d.ts → checkbox/index.d.mts} +9 -4
  30. package/dist/checkbox/index.d.ts +36 -0
  31. package/dist/checkbox/index.mjs +2 -0
  32. package/dist/chunk-2POU3NX4.mjs +192 -0
  33. package/dist/chunk-32SKYPQW.mjs +156 -0
  34. package/dist/chunk-446OJWC6.mjs +285 -0
  35. package/dist/chunk-4DA7CRNV.mjs +376 -0
  36. package/dist/chunk-4DR57X7U.mjs +182 -0
  37. package/dist/chunk-4QSDPHPI.mjs +285 -0
  38. package/dist/chunk-56ILK7Y4.cjs +315 -0
  39. package/dist/chunk-5J3OMAO4.cjs +222 -0
  40. package/dist/chunk-5RKET2JO.cjs +287 -0
  41. package/dist/chunk-65UZC3FK.mjs +312 -0
  42. package/dist/chunk-6CC5KIA5.cjs +148 -0
  43. package/dist/chunk-6R3OYBQ6.cjs +209 -0
  44. package/dist/chunk-6UO72EJA.cjs +2 -0
  45. package/dist/chunk-6ZCY4O5M.mjs +63 -0
  46. package/dist/chunk-7364SUK6.mjs +359 -0
  47. package/dist/chunk-7DDDQ3RH.cjs +66 -0
  48. package/dist/chunk-7PDGAIC3.cjs +189 -0
  49. package/dist/chunk-7R5JRJ2W.cjs +255 -0
  50. package/dist/chunk-7WNJ7L4Z.mjs +335 -0
  51. package/dist/chunk-AJXVELXK.cjs +218 -0
  52. package/dist/chunk-ARTXRQO6.mjs +1 -0
  53. package/dist/chunk-B4OV5GRT.cjs +510 -0
  54. package/dist/chunk-B5MYGYJY.mjs +122 -0
  55. package/dist/chunk-BBVWG5GH.cjs +75 -0
  56. package/dist/chunk-BVBCAAES.mjs +35 -0
  57. package/dist/chunk-CBA54EY4.mjs +508 -0
  58. package/dist/chunk-CMER5LO3.mjs +330 -0
  59. package/dist/chunk-DHC5LI2P.cjs +338 -0
  60. package/dist/chunk-DMLPA65B.mjs +107 -0
  61. package/dist/chunk-DN2GFJF4.mjs +175 -0
  62. package/dist/chunk-ECLNLPOR.cjs +70 -0
  63. package/dist/chunk-EV463QT5.cjs +53 -0
  64. package/dist/chunk-FOVJHEWH.mjs +51 -0
  65. package/dist/chunk-G4HVY6FM.mjs +203 -0
  66. package/dist/chunk-H77YWN3L.mjs +220 -0
  67. package/dist/chunk-HIWJDLIS.cjs +124 -0
  68. package/dist/chunk-HQGDSOSN.mjs +274 -0
  69. package/dist/chunk-JKPNJ4PZ.mjs +313 -0
  70. package/dist/chunk-JV6AWBN5.mjs +113 -0
  71. package/dist/chunk-KA35BV7V.mjs +207 -0
  72. package/dist/chunk-KLBABQEJ.cjs +378 -0
  73. package/dist/chunk-L5VQZZVR.cjs +3197 -0
  74. package/dist/chunk-LTG6YP5I.cjs +69 -0
  75. package/dist/chunk-MVUNJPGH.cjs +184 -0
  76. package/dist/chunk-NMJ5CVZH.cjs +2 -0
  77. package/dist/chunk-NRCNRHXL.cjs +109 -0
  78. package/dist/chunk-NRZIXK35.cjs +276 -0
  79. package/dist/chunk-OCPFOFJ4.mjs +3195 -0
  80. package/dist/chunk-OEU5VG3D.cjs +362 -0
  81. package/dist/chunk-OPOCCRJG.cjs +193 -0
  82. package/dist/chunk-OQPCL5XX.mjs +187 -0
  83. package/dist/chunk-PCYGJNEQ.cjs +280 -0
  84. package/dist/chunk-PJH2KEWK.mjs +200 -0
  85. package/dist/chunk-PJWELBN2.cjs +115 -0
  86. package/dist/chunk-Q3IFXFFD.cjs +202 -0
  87. package/dist/chunk-R72GDCWE.cjs +314 -0
  88. package/dist/chunk-RAD5VJHR.mjs +146 -0
  89. package/dist/chunk-RYWDZHKG.mjs +274 -0
  90. package/dist/chunk-S7VEND5Z.cjs +162 -0
  91. package/dist/chunk-SBNNV6FE.mjs +1 -0
  92. package/dist/chunk-SFUOCZJY.mjs +187 -0
  93. package/dist/chunk-SHQ2MPBE.mjs +73 -0
  94. package/dist/chunk-TIVSMCXZ.mjs +253 -0
  95. package/dist/chunk-TNGW5YHA.cjs +37 -0
  96. package/dist/chunk-VC7MOPU6.cjs +287 -0
  97. package/dist/chunk-VHVFRWF5.mjs +64 -0
  98. package/dist/chunk-VKQDW7C2.mjs +336 -0
  99. package/dist/chunk-VRZFAKSV.cjs +177 -0
  100. package/dist/chunk-W2ZAPLQH.cjs +337 -0
  101. package/dist/chunk-XFNRKHHF.cjs +332 -0
  102. package/dist/chunk-Y3NTKFUE.mjs +66 -0
  103. package/dist/chunk-Y6AN7AWX.cjs +205 -0
  104. package/dist/chunk-YMMNWJT6.cjs +134 -0
  105. package/dist/chunk-YOTCXSXL.mjs +132 -0
  106. package/dist/combo-box/index.cjs +11 -0
  107. package/dist/{components/ComboBox/ComboBox.types.d.ts → combo-box/index.d.mts} +10 -5
  108. package/dist/combo-box/index.d.ts +62 -0
  109. package/dist/combo-box/index.mjs +2 -0
  110. package/dist/date-picker/index.cjs +11 -0
  111. package/dist/date-picker/index.d.mts +32 -0
  112. package/dist/date-picker/index.d.ts +32 -0
  113. package/dist/date-picker/index.mjs +2 -0
  114. package/dist/dialog/index.cjs +27 -0
  115. package/dist/{components/Dialog/Dialog.types.d.ts → dialog/index.d.mts} +16 -7
  116. package/dist/dialog/index.d.ts +61 -0
  117. package/dist/dialog/index.mjs +2 -0
  118. package/dist/dropdown-menu/index.cjs +27 -0
  119. package/dist/dropdown-menu/index.d.mts +34 -0
  120. package/dist/dropdown-menu/index.d.ts +34 -0
  121. package/dist/dropdown-menu/index.mjs +2 -0
  122. package/dist/email/index.cjs +11 -0
  123. package/dist/{components/Email/Email.types.d.ts → email/index.d.mts} +10 -5
  124. package/dist/email/index.d.ts +38 -0
  125. package/dist/email/index.mjs +2 -0
  126. package/dist/file-upload/index.cjs +11 -0
  127. package/dist/file-upload/index.d.mts +27 -0
  128. package/dist/file-upload/index.d.ts +27 -0
  129. package/dist/file-upload/index.mjs +2 -0
  130. package/dist/header/index.cjs +14 -0
  131. package/dist/{components/Header/Header.types.d.ts → header/index.d.mts} +11 -2
  132. package/dist/header/index.d.ts +28 -0
  133. package/dist/header/index.mjs +5 -0
  134. package/dist/icon-button/index.cjs +13 -0
  135. package/dist/icon-button/index.d.mts +16 -0
  136. package/dist/icon-button/index.d.ts +16 -0
  137. package/dist/icon-button/index.mjs +4 -0
  138. package/dist/image/index.cjs +12 -0
  139. package/dist/{components/Image/Image.types.d.ts → image/index.d.mts} +10 -2
  140. package/dist/image/index.d.ts +48 -0
  141. package/dist/image/index.mjs +3 -0
  142. package/dist/index.cjs +839 -0
  143. package/dist/index.d.mts +141 -0
  144. package/dist/index.d.ts +141 -75
  145. package/dist/index.mjs +601 -0
  146. package/dist/link/index.cjs +11 -0
  147. package/dist/{components/Link/Link.types.d.ts → link/index.d.mts} +10 -5
  148. package/dist/link/index.d.ts +25 -0
  149. package/dist/link/index.mjs +2 -0
  150. package/dist/loader/index.cjs +11 -0
  151. package/dist/{components/Loader/Loader.types.d.ts → loader/index.d.mts} +8 -4
  152. package/dist/loader/index.d.ts +21 -0
  153. package/dist/loader/index.mjs +2 -0
  154. package/dist/modal/index.cjs +27 -0
  155. package/dist/{components/Modal/Modal.types.d.ts → modal/index.d.mts} +25 -9
  156. package/dist/modal/index.d.ts +116 -0
  157. package/dist/modal/index.mjs +2 -0
  158. package/dist/multi-select/index.cjs +11 -0
  159. package/dist/{components/MultiSelect/MultiSelect.types.d.ts → multi-select/index.d.mts} +9 -5
  160. package/dist/multi-select/index.d.ts +59 -0
  161. package/dist/multi-select/index.mjs +2 -0
  162. package/dist/otp-input/index.cjs +11 -0
  163. package/dist/{components/OtpInput/OtpInput.types.d.ts → otp-input/index.d.mts} +8 -4
  164. package/dist/otp-input/index.d.ts +57 -0
  165. package/dist/otp-input/index.mjs +2 -0
  166. package/dist/password-input/index.cjs +11 -0
  167. package/dist/password-input/index.d.mts +32 -0
  168. package/dist/password-input/index.d.ts +32 -0
  169. package/dist/password-input/index.mjs +2 -0
  170. package/dist/phone/index.cjs +11 -0
  171. package/dist/{components/Phone/Phone.types.d.ts → phone/index.d.mts} +11 -6
  172. package/dist/phone/index.d.ts +41 -0
  173. package/dist/phone/index.mjs +2 -0
  174. package/dist/radio-button/index.cjs +11 -0
  175. package/dist/{components/RadioButton/RadioButton.types.d.ts → radio-button/index.d.mts} +9 -4
  176. package/dist/radio-button/index.d.ts +56 -0
  177. package/dist/radio-button/index.mjs +2 -0
  178. package/dist/search-input/index.cjs +12 -0
  179. package/dist/search-input/index.d.mts +22 -0
  180. package/dist/search-input/index.d.ts +22 -0
  181. package/dist/search-input/index.mjs +3 -0
  182. package/dist/select/index.cjs +11 -0
  183. package/dist/{components/Select/Select.types.d.ts → select/index.d.mts} +11 -6
  184. package/dist/select/index.d.ts +36 -0
  185. package/dist/select/index.mjs +2 -0
  186. package/dist/sidebar/index.cjs +11 -0
  187. package/dist/{components/Sidebar/Sidebar.types.d.ts → sidebar/index.d.mts} +15 -6
  188. package/dist/sidebar/index.d.ts +96 -0
  189. package/dist/sidebar/index.mjs +2 -0
  190. package/dist/skeleton/index.cjs +27 -0
  191. package/dist/skeleton/index.d.mts +76 -0
  192. package/dist/skeleton/index.d.ts +76 -0
  193. package/dist/skeleton/index.mjs +2 -0
  194. package/dist/styles.css +5075 -0
  195. package/dist/styles.d.mts +2 -0
  196. package/dist/styles.d.ts +2 -0
  197. package/dist/table/index.cjs +15 -0
  198. package/dist/{components/Table/Table.types.d.ts → table/index.d.mts} +16 -9
  199. package/dist/table/index.d.ts +92 -0
  200. package/dist/table/index.mjs +2 -0
  201. package/dist/tabs/index.cjs +14 -0
  202. package/dist/tabs/index.d.mts +26 -0
  203. package/dist/tabs/index.d.ts +26 -0
  204. package/dist/tabs/index.mjs +5 -0
  205. package/dist/text-input/index.cjs +11 -0
  206. package/dist/text-input/index.d.mts +7 -0
  207. package/dist/text-input/index.d.ts +7 -0
  208. package/dist/text-input/index.mjs +2 -0
  209. package/dist/theme-provider/index.cjs +14 -0
  210. package/dist/{components/ThemeProvider/ThemeProvider.types.d.ts → theme-provider/index.d.mts} +16 -6
  211. package/dist/theme-provider/index.d.ts +122 -0
  212. package/dist/theme-provider/index.mjs +1 -0
  213. package/dist/time-picker/index.cjs +11 -0
  214. package/dist/time-picker/index.d.mts +32 -0
  215. package/dist/time-picker/index.d.ts +32 -0
  216. package/dist/time-picker/index.mjs +2 -0
  217. package/dist/toaster/index.cjs +11 -0
  218. package/dist/{components/Toaster/Toaster.types.d.ts → toaster/index.d.mts} +9 -4
  219. package/dist/toaster/index.d.ts +28 -0
  220. package/dist/toaster/index.mjs +2 -0
  221. package/dist/tooltip/index.cjs +12 -0
  222. package/dist/tooltip/index.d.mts +7 -0
  223. package/dist/tooltip/index.d.ts +7 -0
  224. package/dist/tooltip/index.mjs +3 -0
  225. package/package.json +78 -95
  226. package/dist/components/Accordion/Accordion.d.ts +0 -5
  227. package/dist/components/Accordion/Accordion.types.d.ts +0 -32
  228. package/dist/components/Accordion/index.d.ts +0 -2
  229. package/dist/components/Avatar/Avatar.d.ts +0 -2
  230. package/dist/components/Avatar/Avatar.stories.d.ts +0 -11
  231. package/dist/components/Avatar/Avatar.test.d.ts +0 -1
  232. package/dist/components/Avatar/index.d.ts +0 -2
  233. package/dist/components/Badge/Badge.d.ts +0 -11
  234. package/dist/components/Badge/Badge.stories.d.ts +0 -21
  235. package/dist/components/Badge/Badge.test.d.ts +0 -1
  236. package/dist/components/Badge/index.d.ts +0 -2
  237. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -2
  238. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -13
  239. package/dist/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -1
  240. package/dist/components/Breadcrumbs/index.d.ts +0 -2
  241. package/dist/components/Button/Button.d.ts +0 -2
  242. package/dist/components/Button/Button.stories.d.ts +0 -20
  243. package/dist/components/Button/Button.test.d.ts +0 -1
  244. package/dist/components/Button/index.d.ts +0 -2
  245. package/dist/components/Card/Card.d.ts +0 -25
  246. package/dist/components/Card/Card.stories.d.ts +0 -8
  247. package/dist/components/Card/Card.test.d.ts +0 -1
  248. package/dist/components/Card/Card.types.d.ts +0 -14
  249. package/dist/components/Card/index.d.ts +0 -2
  250. package/dist/components/Checkbox/Checkbox.d.ts +0 -2
  251. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -16
  252. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  253. package/dist/components/Checkbox/index.d.ts +0 -2
  254. package/dist/components/ComboBox/ComboBox.d.ts +0 -2
  255. package/dist/components/ComboBox/ComboBox.stories.d.ts +0 -12
  256. package/dist/components/ComboBox/ComboBox.test.d.ts +0 -1
  257. package/dist/components/ComboBox/index.d.ts +0 -2
  258. package/dist/components/DatePicker/DatePicker.d.ts +0 -2
  259. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -25
  260. package/dist/components/DatePicker/DatePicker.test.d.ts +0 -1
  261. package/dist/components/DatePicker/DatePicker.types.d.ts +0 -27
  262. package/dist/components/DatePicker/index.d.ts +0 -2
  263. package/dist/components/Dialog/Dialog.d.ts +0 -6
  264. package/dist/components/Dialog/Dialog.stories.d.ts +0 -9
  265. package/dist/components/Dialog/Dialog.test.d.ts +0 -1
  266. package/dist/components/Dialog/index.d.ts +0 -2
  267. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -7
  268. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -9
  269. package/dist/components/DropdownMenu/DropdownMenu.test.d.ts +0 -1
  270. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +0 -24
  271. package/dist/components/DropdownMenu/index.d.ts +0 -2
  272. package/dist/components/Email/Email.d.ts +0 -2
  273. package/dist/components/Email/Email.stories.d.ts +0 -11
  274. package/dist/components/Email/Email.test.d.ts +0 -1
  275. package/dist/components/Email/index.d.ts +0 -2
  276. package/dist/components/FileUpload/FileUpload.d.ts +0 -2
  277. package/dist/components/FileUpload/FileUpload.stories.d.ts +0 -10
  278. package/dist/components/FileUpload/FileUpload.test.d.ts +0 -1
  279. package/dist/components/FileUpload/FileUpload.types.d.ts +0 -22
  280. package/dist/components/FileUpload/index.d.ts +0 -2
  281. package/dist/components/Header/Header.d.ts +0 -7
  282. package/dist/components/Header/Header.stories.d.ts +0 -8
  283. package/dist/components/Header/Header.test.d.ts +0 -1
  284. package/dist/components/Header/index.d.ts +0 -2
  285. package/dist/components/IconButton/IconButton.d.ts +0 -2
  286. package/dist/components/IconButton/IconButton.stories.d.ts +0 -17
  287. package/dist/components/IconButton/IconButton.types.d.ts +0 -10
  288. package/dist/components/IconButton/index.d.ts +0 -2
  289. package/dist/components/Image/Image.d.ts +0 -6
  290. package/dist/components/Image/Image.stories.d.ts +0 -13
  291. package/dist/components/Image/Image.test.d.ts +0 -1
  292. package/dist/components/Image/index.d.ts +0 -2
  293. package/dist/components/Link/Link.d.ts +0 -2
  294. package/dist/components/Link/Link.stories.d.ts +0 -15
  295. package/dist/components/Link/Link.test.d.ts +0 -1
  296. package/dist/components/Link/index.d.ts +0 -2
  297. package/dist/components/Loader/Loader.d.ts +0 -2
  298. package/dist/components/Loader/Loader.stories.d.ts +0 -12
  299. package/dist/components/Loader/Loader.test.d.ts +0 -1
  300. package/dist/components/Loader/index.d.ts +0 -2
  301. package/dist/components/Modal/Modal.d.ts +0 -14
  302. package/dist/components/Modal/Modal.stories.d.ts +0 -14
  303. package/dist/components/Modal/Modal.test.d.ts +0 -1
  304. package/dist/components/Modal/index.d.ts +0 -2
  305. package/dist/components/MultiSelect/MultiSelect.d.ts +0 -2
  306. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -15
  307. package/dist/components/MultiSelect/MultiSelect.test.d.ts +0 -1
  308. package/dist/components/MultiSelect/index.d.ts +0 -2
  309. package/dist/components/OtpInput/OtpInput.d.ts +0 -2
  310. package/dist/components/OtpInput/OtpInput.stories.d.ts +0 -10
  311. package/dist/components/OtpInput/OtpInput.test.d.ts +0 -1
  312. package/dist/components/OtpInput/index.d.ts +0 -2
  313. package/dist/components/PasswordInput/PasswordInput.d.ts +0 -2
  314. package/dist/components/PasswordInput/PasswordInput.stories.d.ts +0 -23
  315. package/dist/components/PasswordInput/PasswordInput.test.d.ts +0 -1
  316. package/dist/components/PasswordInput/PasswordInput.types.d.ts +0 -27
  317. package/dist/components/PasswordInput/index.d.ts +0 -2
  318. package/dist/components/Phone/Phone.d.ts +0 -2
  319. package/dist/components/Phone/Phone.stories.d.ts +0 -11
  320. package/dist/components/Phone/Phone.test.d.ts +0 -1
  321. package/dist/components/Phone/countries.d.ts +0 -8
  322. package/dist/components/Phone/index.d.ts +0 -2
  323. package/dist/components/RadioButton/RadioButton.d.ts +0 -2
  324. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -21
  325. package/dist/components/RadioButton/RadioButton.test.d.ts +0 -1
  326. package/dist/components/RadioButton/index.d.ts +0 -2
  327. package/dist/components/SearchInput/SearchInput.d.ts +0 -6
  328. package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -8
  329. package/dist/components/SearchInput/SearchInput.test.d.ts +0 -1
  330. package/dist/components/SearchInput/SearchInput.types.d.ts +0 -12
  331. package/dist/components/SearchInput/index.d.ts +0 -2
  332. package/dist/components/Select/Select.d.ts +0 -2
  333. package/dist/components/Select/Select.stories.d.ts +0 -12
  334. package/dist/components/Select/Select.test.d.ts +0 -1
  335. package/dist/components/Select/index.d.ts +0 -2
  336. package/dist/components/Sidebar/Sidebar.d.ts +0 -7
  337. package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -10
  338. package/dist/components/Sidebar/Sidebar.test.d.ts +0 -1
  339. package/dist/components/Sidebar/index.d.ts +0 -2
  340. package/dist/components/Skeleton/Skeleton.d.ts +0 -26
  341. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -13
  342. package/dist/components/Skeleton/Skeleton.types.d.ts +0 -47
  343. package/dist/components/Skeleton/index.d.ts +0 -2
  344. package/dist/components/Stepper/Stepper.d.ts +0 -2
  345. package/dist/components/Stepper/Stepper.stories.d.ts +0 -23
  346. package/dist/components/Stepper/Stepper.test.d.ts +0 -1
  347. package/dist/components/Stepper/Stepper.types.d.ts +0 -47
  348. package/dist/components/Stepper/index.d.ts +0 -2
  349. package/dist/components/Table/Pagination.d.ts +0 -3
  350. package/dist/components/Table/Table.d.ts +0 -3
  351. package/dist/components/Table/Table.stories.d.ts +0 -13
  352. package/dist/components/Table/Table.test.d.ts +0 -1
  353. package/dist/components/Table/index.d.ts +0 -3
  354. package/dist/components/Tabs/Tabs.d.ts +0 -2
  355. package/dist/components/Tabs/Tabs.stories.d.ts +0 -17
  356. package/dist/components/Tabs/Tabs.test.d.ts +0 -1
  357. package/dist/components/Tabs/Tabs.types.d.ts +0 -21
  358. package/dist/components/Tabs/index.d.ts +0 -2
  359. package/dist/components/TextInput/TextInput.d.ts +0 -2
  360. package/dist/components/TextInput/TextInput.stories.d.ts +0 -25
  361. package/dist/components/TextInput/TextInput.test.d.ts +0 -1
  362. package/dist/components/TextInput/index.d.ts +0 -2
  363. package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -8
  364. package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +0 -16
  365. package/dist/components/ThemeProvider/ThemeProvider.test.d.ts +0 -1
  366. package/dist/components/ThemeProvider/index.d.ts +0 -2
  367. package/dist/components/TimePicker/TimePicker.d.ts +0 -2
  368. package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -23
  369. package/dist/components/TimePicker/TimePicker.test.d.ts +0 -1
  370. package/dist/components/TimePicker/TimePicker.types.d.ts +0 -27
  371. package/dist/components/TimePicker/index.d.ts +0 -2
  372. package/dist/components/Toaster/Toaster.d.ts +0 -2
  373. package/dist/components/Toaster/Toaster.stories.d.ts +0 -13
  374. package/dist/components/Toaster/Toaster.test.d.ts +0 -1
  375. package/dist/components/Toaster/index.d.ts +0 -2
  376. package/dist/components/Toggle/Toggle.d.ts +0 -2
  377. package/dist/components/Toggle/Toggle.stories.d.ts +0 -11
  378. package/dist/components/Toggle/Toggle.types.d.ts +0 -10
  379. package/dist/components/Toggle/index.d.ts +0 -2
  380. package/dist/components/Tooltip/Tooltip.d.ts +0 -2
  381. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -13
  382. package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
  383. package/dist/components/Tooltip/index.d.ts +0 -2
  384. package/dist/utils/cn.d.ts +0 -2
  385. package/dist/utils/index.d.ts +0 -1
@@ -0,0 +1,285 @@
1
+ import { cn } from './chunk-OCPFOFJ4.mjs';
2
+ import { forwardRef, useId, useState } from 'react';
3
+ import { EyeSlashIcon, EyeIcon } from '@heroicons/react/24/outline';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var sizeClasses = {
7
+ xs: "h-6 px-2 text-xs",
8
+ sm: "h-8 px-3 text-sm",
9
+ md: "h-10 px-3 text-sm",
10
+ lg: "h-11 px-4 text-base",
11
+ xl: "h-12 px-4 text-lg"
12
+ };
13
+ var labelSizeClasses = {
14
+ xs: "text-xs",
15
+ sm: "text-xs",
16
+ md: "text-sm",
17
+ lg: "text-sm",
18
+ xl: "text-base"
19
+ };
20
+ var variantClasses = {
21
+ default: "rounded-md border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",
22
+ filled: "rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",
23
+ flushed: "rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",
24
+ unstyled: "border-0 bg-transparent p-0 focus:outline-none focus:ring-0"
25
+ };
26
+ var stateVariantClasses = {
27
+ default: {
28
+ default: "border-border focus:border-primary focus:ring-primary/40",
29
+ filled: "focus:border-primary focus:ring-primary/40",
30
+ flushed: "border-border focus:border-primary",
31
+ unstyled: ""
32
+ },
33
+ error: {
34
+ default: "border-error focus:border-error focus:ring-error/20",
35
+ filled: "bg-error/5 focus:border-error focus:ring-error/20",
36
+ flushed: "border-error focus:border-error",
37
+ unstyled: ""
38
+ },
39
+ success: {
40
+ default: "border-success focus:border-success focus:ring-success/20",
41
+ filled: "bg-success/5 focus:border-success focus:ring-success/20",
42
+ flushed: "border-success focus:border-success",
43
+ unstyled: ""
44
+ },
45
+ warning: {
46
+ default: "border-warning focus:border-warning focus:ring-warning/20",
47
+ filled: "bg-warning/5 focus:border-warning focus:ring-warning/20",
48
+ flushed: "border-warning focus:border-warning",
49
+ unstyled: ""
50
+ }
51
+ };
52
+ var stateMessageClasses = {
53
+ default: "text-text-muted",
54
+ error: "text-error",
55
+ success: "text-success",
56
+ warning: "text-warning"
57
+ };
58
+ function getStateMessage(state, errorMessage, successMessage, warningMessage) {
59
+ if (state === "error" && errorMessage) return errorMessage;
60
+ if (state === "success" && successMessage) return successMessage;
61
+ if (state === "warning" && warningMessage) return warningMessage;
62
+ return void 0;
63
+ }
64
+ function Addon({ children, side }) {
65
+ return /* @__PURE__ */ jsx(
66
+ "span",
67
+ {
68
+ "aria-hidden": "true",
69
+ className: cn(
70
+ "inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",
71
+ side === "left" ? "rounded-l-md border-r-0" : "rounded-r-md border-l-0"
72
+ ),
73
+ children
74
+ }
75
+ );
76
+ }
77
+ var PasswordInput = forwardRef(function PasswordInput2({
78
+ label,
79
+ required = false,
80
+ helperText,
81
+ errorMessage,
82
+ successMessage,
83
+ warningMessage,
84
+ variant = "default",
85
+ size = "md",
86
+ state = "default",
87
+ fullWidth = true,
88
+ leftElement,
89
+ rightElement,
90
+ prefix,
91
+ suffix,
92
+ wrapperClassName,
93
+ inputGroupClassName,
94
+ inputClassName,
95
+ labelClassName,
96
+ helperClassName,
97
+ id: idProp,
98
+ disabled,
99
+ className,
100
+ isLoading,
101
+ showPasswordToggle = true,
102
+ value,
103
+ onChange,
104
+ onKeyUp,
105
+ onKeyDown,
106
+ ...rest
107
+ }, ref) {
108
+ const generatedId = useId();
109
+ const inputId = idProp ?? generatedId;
110
+ const helperId = `${inputId}-helper`;
111
+ const stateMessageId = `${inputId}-state`;
112
+ const capsLockId = `${inputId}-capslock`;
113
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false);
114
+ const [capsLockActive, setCapsLockActive] = useState(false);
115
+ const handleKeyUp = (e) => {
116
+ setCapsLockActive(e.getModifierState("CapsLock"));
117
+ if (onKeyUp) onKeyUp(e);
118
+ };
119
+ const handleKeyDown = (e) => {
120
+ setCapsLockActive(e.getModifierState("CapsLock"));
121
+ if (onKeyDown) onKeyDown(e);
122
+ };
123
+ const hasLeftElement = leftElement !== void 0;
124
+ const hasRightElement = rightElement !== void 0 || Boolean(isLoading) || showPasswordToggle;
125
+ const stateMessage = getStateMessage(state, errorMessage, successMessage, warningMessage);
126
+ const describedBy = [
127
+ helperText ? helperId : null,
128
+ stateMessage ? stateMessageId : null,
129
+ capsLockActive ? capsLockId : null
130
+ ].filter(Boolean).join(" ") || void 0;
131
+ const renderRightIcon = () => {
132
+ if (isLoading) {
133
+ return /* @__PURE__ */ jsxs(
134
+ "svg",
135
+ {
136
+ className: "animate-spin h-5 w-5 text-text-muted",
137
+ xmlns: "http://www.w3.org/2000/svg",
138
+ fill: "none",
139
+ viewBox: "0 0 24 24",
140
+ children: [
141
+ /* @__PURE__ */ jsx(
142
+ "circle",
143
+ {
144
+ className: "opacity-25",
145
+ cx: "12",
146
+ cy: "12",
147
+ r: "10",
148
+ stroke: "currentColor",
149
+ strokeWidth: "4"
150
+ }
151
+ ),
152
+ /* @__PURE__ */ jsx(
153
+ "path",
154
+ {
155
+ className: "opacity-75",
156
+ fill: "currentColor",
157
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
158
+ }
159
+ )
160
+ ]
161
+ }
162
+ );
163
+ }
164
+ if (showPasswordToggle) {
165
+ return /* @__PURE__ */ jsx(
166
+ "button",
167
+ {
168
+ type: "button",
169
+ tabIndex: -1,
170
+ onClick: () => {
171
+ setIsPasswordVisible((prev) => !prev);
172
+ },
173
+ className: "flex items-center justify-center rounded-full text-text-muted hover:text-text transition focus:outline-none w-6 h-6",
174
+ "aria-label": isPasswordVisible ? "Hide password" : "Show password",
175
+ children: isPasswordVisible ? /* @__PURE__ */ jsx(EyeSlashIcon, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(EyeIcon, { className: "w-5 h-5" })
176
+ }
177
+ );
178
+ }
179
+ return rightElement;
180
+ };
181
+ return /* @__PURE__ */ jsxs(
182
+ "div",
183
+ {
184
+ className: cn(
185
+ "flex flex-col gap-1",
186
+ fullWidth ? "w-full" : "w-fit",
187
+ wrapperClassName,
188
+ className
189
+ ),
190
+ children: [
191
+ label !== void 0 && /* @__PURE__ */ jsxs(
192
+ "label",
193
+ {
194
+ htmlFor: inputId,
195
+ className: cn(
196
+ "font-black leading-none mb-2 text-text uppercase tracking-widest",
197
+ labelSizeClasses[size],
198
+ labelClassName
199
+ ),
200
+ children: [
201
+ label,
202
+ required && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "ml-1 text-error", children: "*" })
203
+ ]
204
+ }
205
+ ),
206
+ /* @__PURE__ */ jsxs(
207
+ "div",
208
+ {
209
+ className: cn(
210
+ "flex items-stretch transition-all duration-150 overflow-hidden",
211
+ variantClasses[variant],
212
+ stateVariantClasses[state][variant],
213
+ fullWidth ? "w-full" : "w-fit",
214
+ "focus-within:ring-4 focus-within:ring-primary/20 focus-within:border-primary",
215
+ disabled && "opacity-50 cursor-not-allowed bg-surface-secondary",
216
+ inputGroupClassName
217
+ ),
218
+ children: [
219
+ prefix !== void 0 && /* @__PURE__ */ jsx(Addon, { side: "left", children: prefix }),
220
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center min-w-0", children: [
221
+ hasLeftElement && /* @__PURE__ */ jsx("div", { className: "pl-3 flex-shrink-0 flex items-center justify-center", children: leftElement }),
222
+ /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0 h-full", children: /* @__PURE__ */ jsx(
223
+ "input",
224
+ {
225
+ ref,
226
+ ...rest,
227
+ id: inputId,
228
+ disabled: Boolean(disabled) || Boolean(isLoading),
229
+ type: isPasswordVisible ? "text" : "password",
230
+ value,
231
+ onChange,
232
+ onKeyUp: handleKeyUp,
233
+ onKeyDown: handleKeyDown,
234
+ "aria-invalid": state === "error" ? true : void 0,
235
+ "aria-describedby": describedBy,
236
+ "aria-required": required,
237
+ className: cn(
238
+ "w-full bg-transparent border-0 focus:outline-none focus:ring-0 outline-none h-full",
239
+ sizeClasses[size],
240
+ inputClassName
241
+ ),
242
+ style: {
243
+ paddingLeft: hasLeftElement ? "0.5rem" : void 0,
244
+ paddingRight: hasRightElement ? "0.5rem" : void 0
245
+ }
246
+ }
247
+ ) }),
248
+ hasRightElement && /* @__PURE__ */ jsx(
249
+ "div",
250
+ {
251
+ className: "pr-3 flex-shrink-0 flex items-center justify-center text-text-secondary",
252
+ style: { width: "2.5rem" },
253
+ children: renderRightIcon()
254
+ }
255
+ )
256
+ ] }),
257
+ suffix !== void 0 && /* @__PURE__ */ jsx(Addon, { side: "right", children: suffix })
258
+ ]
259
+ }
260
+ ),
261
+ helperText !== void 0 && /* @__PURE__ */ jsx("p", { id: helperId, className: cn("text-xs leading-tight text-text-muted", helperClassName), children: helperText }),
262
+ capsLockActive && /* @__PURE__ */ jsx(
263
+ "p",
264
+ {
265
+ id: capsLockId,
266
+ className: "text-xs leading-tight text-warning font-black uppercase tracking-widest",
267
+ children: "Caps Lock is on"
268
+ }
269
+ ),
270
+ stateMessage !== void 0 && /* @__PURE__ */ jsx(
271
+ "p",
272
+ {
273
+ id: stateMessageId,
274
+ role: state === "error" ? "alert" : void 0,
275
+ className: cn("text-xs leading-tight mt-1", stateMessageClasses[state], helperClassName),
276
+ children: stateMessage
277
+ }
278
+ )
279
+ ]
280
+ }
281
+ );
282
+ });
283
+ PasswordInput.displayName = "PasswordInput";
284
+
285
+ export { PasswordInput };
@@ -0,0 +1,376 @@
1
+ import { cn } from './chunk-OCPFOFJ4.mjs';
2
+ import { forwardRef, useId, useState, useRef, useMemo, useEffect, useCallback } from 'react';
3
+ import { XMarkIcon, ChevronDownIcon, CheckIcon } from '@heroicons/react/20/solid';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var triggerSizeClasses = {
7
+ xs: "h-6 px-2 text-xs",
8
+ sm: "h-8 px-3 text-sm",
9
+ md: "h-10 px-3 text-sm",
10
+ lg: "h-11 px-4 text-base",
11
+ xl: "h-12 px-4 text-lg"
12
+ };
13
+ var labelSizeClasses = {
14
+ xs: "text-xs",
15
+ sm: "text-xs",
16
+ md: "text-sm",
17
+ lg: "text-sm",
18
+ xl: "text-base"
19
+ };
20
+ var optionSizeClasses = {
21
+ xs: "px-2 py-1 text-xs",
22
+ sm: "px-3 py-1.5 text-xs",
23
+ md: "px-3 py-2 text-sm",
24
+ lg: "px-4 py-2.5 text-base",
25
+ xl: "px-4 py-3 text-lg"
26
+ };
27
+ var stateRingClasses = {
28
+ default: "border-border focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/40",
29
+ error: "border-error focus-within:ring-2 focus-within:ring-error/20",
30
+ success: "border-success focus-within:ring-2 focus-within:ring-success/20",
31
+ warning: "border-warning focus-within:ring-2 focus-within:ring-warning/20"
32
+ };
33
+ var stateMessageClasses = {
34
+ default: "text-text-muted",
35
+ error: "text-error font-medium",
36
+ success: "text-success font-medium",
37
+ warning: "text-warning font-medium"
38
+ };
39
+ function getStateMessage(state, errorMessage, successMessage, warningMessage) {
40
+ if (state === "error" && errorMessage) return errorMessage;
41
+ if (state === "success" && successMessage) return successMessage;
42
+ if (state === "warning" && warningMessage) return warningMessage;
43
+ return void 0;
44
+ }
45
+ var ComboBox = forwardRef(function ComboBox2({
46
+ options,
47
+ value,
48
+ onChange,
49
+ multiple = false,
50
+ searchable = true,
51
+ clearable = false,
52
+ label,
53
+ required = false,
54
+ helperText,
55
+ errorMessage,
56
+ successMessage,
57
+ warningMessage,
58
+ state = "default",
59
+ size = "md",
60
+ fullWidth = true,
61
+ placeholder = "Select\u2026",
62
+ noOptionsMessage = "No options",
63
+ wrapperClassName,
64
+ inputClassName,
65
+ listClassName,
66
+ labelClassName,
67
+ helperClassName,
68
+ disabled,
69
+ id: idProp,
70
+ className,
71
+ ...rest
72
+ }, ref) {
73
+ const generatedId = useId();
74
+ const inputId = idProp ?? generatedId;
75
+ const listboxId = `${inputId}-listbox`;
76
+ const helperId = `${inputId}-helper`;
77
+ const stateMessageId = `${inputId}-state`;
78
+ const [isOpen, setIsOpen] = useState(false);
79
+ const [query, setQuery] = useState("");
80
+ const [activeIndex, setActiveIndex] = useState(-1);
81
+ const containerRef = useRef(null);
82
+ const inputRef = useRef(null);
83
+ const selectedValues = useMemo(
84
+ () => value == null ? [] : Array.isArray(value) ? value : [value],
85
+ [value]
86
+ );
87
+ const displayValue = isOpen && searchable ? query : selectedValues.map((v) => options.find((o) => o.value === v)?.label ?? v).join(", ");
88
+ const filteredOptions = isOpen && searchable && query.length > 0 ? options.filter((o) => o.label.toLowerCase().includes(query.toLowerCase())) : options;
89
+ useEffect(() => {
90
+ const handleClickOutside = (e) => {
91
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
92
+ setIsOpen(false);
93
+ setQuery("");
94
+ }
95
+ };
96
+ document.addEventListener("mousedown", handleClickOutside);
97
+ return () => {
98
+ document.removeEventListener("mousedown", handleClickOutside);
99
+ };
100
+ }, []);
101
+ const open = useCallback(() => {
102
+ if (!disabled) {
103
+ setIsOpen(true);
104
+ setQuery("");
105
+ setActiveIndex(-1);
106
+ }
107
+ }, [disabled]);
108
+ const close = useCallback(() => {
109
+ setIsOpen(false);
110
+ setQuery("");
111
+ setActiveIndex(-1);
112
+ }, []);
113
+ const selectOption = useCallback(
114
+ (option) => {
115
+ if (option.disabled) return;
116
+ if (multiple) {
117
+ const next = selectedValues.includes(option.value) ? selectedValues.filter((v) => v !== option.value) : [...selectedValues, option.value];
118
+ onChange?.(next);
119
+ } else {
120
+ onChange?.(option.value);
121
+ close();
122
+ }
123
+ },
124
+ [multiple, selectedValues, onChange, close]
125
+ );
126
+ const handleClear = useCallback(() => {
127
+ onChange?.(multiple ? [] : "");
128
+ setQuery("");
129
+ inputRef.current?.focus();
130
+ }, [multiple, onChange]);
131
+ const handleInputChange = (e) => {
132
+ setQuery(e.target.value);
133
+ setActiveIndex(-1);
134
+ if (!isOpen) setIsOpen(true);
135
+ };
136
+ const handleKeyDown = (e) => {
137
+ if (disabled) return;
138
+ switch (e.key) {
139
+ case "ArrowDown":
140
+ e.preventDefault();
141
+ if (!isOpen) {
142
+ open();
143
+ } else {
144
+ setActiveIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev);
145
+ }
146
+ break;
147
+ case "ArrowUp":
148
+ e.preventDefault();
149
+ setActiveIndex((prev) => prev > 0 ? prev - 1 : 0);
150
+ break;
151
+ case "Enter":
152
+ e.preventDefault();
153
+ if (!isOpen) {
154
+ open();
155
+ } else if (activeIndex >= 0 && activeIndex < filteredOptions.length) {
156
+ const opt = filteredOptions[activeIndex];
157
+ if (opt != null) selectOption(opt);
158
+ }
159
+ break;
160
+ case "Escape":
161
+ e.preventDefault();
162
+ close();
163
+ break;
164
+ case "Tab":
165
+ close();
166
+ break;
167
+ }
168
+ };
169
+ const stateMsg = getStateMessage(state, errorMessage, successMessage, warningMessage);
170
+ const describedBy = [helperText ? helperId : null, stateMsg ? stateMessageId : null].filter(Boolean).join(" ") || void 0;
171
+ const showClear = clearable && selectedValues.length > 0 && !disabled;
172
+ const isSelected = (val) => selectedValues.includes(val);
173
+ return /* @__PURE__ */ jsxs(
174
+ "div",
175
+ {
176
+ className: cn(
177
+ "flex flex-col gap-1",
178
+ fullWidth ? "w-full" : "w-fit",
179
+ isOpen && "z-[60]",
180
+ // Ensure the whole component stays above siblings when open
181
+ wrapperClassName,
182
+ className
183
+ ),
184
+ children: [
185
+ label != null && /* @__PURE__ */ jsxs(
186
+ "label",
187
+ {
188
+ htmlFor: inputId,
189
+ className: cn(
190
+ "font-black leading-none text-text uppercase tracking-widest",
191
+ labelSizeClasses[size],
192
+ labelClassName
193
+ ),
194
+ children: [
195
+ label,
196
+ required && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "ml-1 text-error", children: "*" })
197
+ ]
198
+ }
199
+ ),
200
+ /* @__PURE__ */ jsxs("div", { ref: containerRef, className: "relative", onKeyDown: handleKeyDown, children: [
201
+ /* @__PURE__ */ jsxs(
202
+ "div",
203
+ {
204
+ className: cn(
205
+ "flex items-center w-full rounded-md border bg-surface shadow-sm transition-all duration-normal",
206
+ triggerSizeClasses[size],
207
+ stateRingClasses[state],
208
+ disabled && "cursor-not-allowed opacity-50 bg-surface-secondary"
209
+ ),
210
+ children: [
211
+ /* @__PURE__ */ jsx(
212
+ "input",
213
+ {
214
+ ...rest,
215
+ ref: (node) => {
216
+ inputRef.current = node;
217
+ if (typeof ref === "function") ref(node);
218
+ else if (ref != null) ref.current = node;
219
+ },
220
+ id: inputId,
221
+ role: "combobox",
222
+ type: "text",
223
+ autoComplete: "off",
224
+ "aria-expanded": isOpen,
225
+ "aria-haspopup": "listbox",
226
+ "aria-controls": listboxId,
227
+ "aria-autocomplete": searchable ? "list" : "none",
228
+ "aria-activedescendant": activeIndex >= 0 ? `${listboxId}-opt-${String(activeIndex)}` : void 0,
229
+ "aria-invalid": state === "error" ? true : void 0,
230
+ "aria-required": required,
231
+ "aria-describedby": describedBy,
232
+ disabled,
233
+ readOnly: !searchable,
234
+ placeholder: selectedValues.length === 0 ? placeholder : void 0,
235
+ value: displayValue,
236
+ onChange: searchable ? handleInputChange : void 0,
237
+ onFocus: open,
238
+ onClick: open,
239
+ className: cn(
240
+ "flex-1 min-w-0 bg-transparent outline-none placeholder:text-text-muted transition-all duration-normal",
241
+ !searchable && "cursor-pointer select-none",
242
+ inputClassName
243
+ )
244
+ }
245
+ ),
246
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 ml-1 shrink-0", children: [
247
+ showClear && /* @__PURE__ */ jsx(
248
+ "button",
249
+ {
250
+ type: "button",
251
+ "aria-label": "Clear selection",
252
+ onMouseDown: (e) => {
253
+ e.preventDefault();
254
+ },
255
+ onClick: handleClear,
256
+ className: "flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast",
257
+ children: /* @__PURE__ */ jsx(XMarkIcon, { className: "w-3.5 h-3.5" })
258
+ }
259
+ ),
260
+ /* @__PURE__ */ jsx(
261
+ "span",
262
+ {
263
+ "aria-hidden": "true",
264
+ className: cn(
265
+ "text-text-muted transition-transform duration-200",
266
+ isOpen && "rotate-180"
267
+ ),
268
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-4 h-4" })
269
+ }
270
+ )
271
+ ] })
272
+ ]
273
+ }
274
+ ),
275
+ isOpen && /* @__PURE__ */ jsx(
276
+ "ul",
277
+ {
278
+ id: listboxId,
279
+ role: "listbox",
280
+ "aria-multiselectable": multiple,
281
+ "aria-label": label ?? "Options",
282
+ className: cn(
283
+ "absolute z-dropdown mt-1 w-full bg-surface border border-border rounded-lg shadow-lg overflow-y-auto max-h-60 py-1.5 animate-in fade-in zoom-in-95 duration-normal",
284
+ listClassName
285
+ ),
286
+ children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx(
287
+ "li",
288
+ {
289
+ className: cn(
290
+ "text-text-muted italic select-none font-medium",
291
+ optionSizeClasses[size]
292
+ ),
293
+ children: noOptionsMessage
294
+ }
295
+ ) : filteredOptions.map((option, idx) => {
296
+ const selected = isSelected(option.value);
297
+ const active = idx === activeIndex;
298
+ return /* @__PURE__ */ jsxs(
299
+ "li",
300
+ {
301
+ id: `${listboxId}-opt-${String(idx)}`,
302
+ role: "option",
303
+ "aria-selected": selected,
304
+ "aria-disabled": option.disabled,
305
+ onMouseDown: (e) => {
306
+ e.preventDefault();
307
+ },
308
+ onClick: () => {
309
+ selectOption(option);
310
+ },
311
+ onKeyDown: (e) => {
312
+ if (e.key === "Enter" || e.key === " ") {
313
+ e.preventDefault();
314
+ selectOption(option);
315
+ }
316
+ },
317
+ onMouseEnter: () => {
318
+ setActiveIndex(idx);
319
+ },
320
+ className: cn(
321
+ "flex items-center gap-2 cursor-pointer select-none transition-all duration-fast font-medium",
322
+ optionSizeClasses[size],
323
+ active && !option.disabled && "bg-hover",
324
+ selected && "text-primary font-bold",
325
+ option.disabled && "cursor-not-allowed opacity-40"
326
+ ),
327
+ children: [
328
+ multiple && /* @__PURE__ */ jsx(
329
+ "span",
330
+ {
331
+ className: cn(
332
+ "shrink-0 w-4 h-4 rounded-sm border flex items-center justify-center transition-all duration-normal",
333
+ selected ? "bg-primary border-primary" : "border-border"
334
+ ),
335
+ "aria-hidden": "true",
336
+ children: selected && /* @__PURE__ */ jsx(CheckIcon, { className: "w-2.5 h-2.5 text-text-inverse" })
337
+ }
338
+ ),
339
+ !multiple && /* @__PURE__ */ jsx("span", { className: "w-4 shrink-0", "aria-hidden": "true", children: selected && /* @__PURE__ */ jsx(CheckIcon, { className: "w-4 h-4 text-primary" }) }),
340
+ option.label
341
+ ]
342
+ },
343
+ option.value
344
+ );
345
+ })
346
+ }
347
+ )
348
+ ] }),
349
+ helperText != null && /* @__PURE__ */ jsx(
350
+ "p",
351
+ {
352
+ id: helperId,
353
+ className: cn("text-xs leading-tight text-text-muted font-medium", helperClassName),
354
+ children: helperText
355
+ }
356
+ ),
357
+ stateMsg != null && /* @__PURE__ */ jsx(
358
+ "p",
359
+ {
360
+ id: stateMessageId,
361
+ role: state === "error" ? "alert" : void 0,
362
+ className: cn(
363
+ "text-xs leading-tight font-medium",
364
+ stateMessageClasses[state],
365
+ helperClassName
366
+ ),
367
+ children: stateMsg
368
+ }
369
+ )
370
+ ]
371
+ }
372
+ );
373
+ });
374
+ ComboBox.displayName = "ComboBox";
375
+
376
+ export { ComboBox };