eidos-ui 3.8.1 → 4.0.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 (244) hide show
  1. package/README.md +2 -2
  2. package/dist/alert/index.cjs +5 -5
  3. package/dist/alert/index.js +4 -4
  4. package/dist/button/index.cjs +4 -4
  5. package/dist/button/index.js +3 -3
  6. package/dist/chip/index.cjs +4 -4
  7. package/dist/chip/index.js +3 -3
  8. package/dist/{chunk-V5CM5TH3.js → chunk-2OBOD3GO.js} +3 -3
  9. package/dist/{chunk-CFVUUMQA.cjs → chunk-2URFSWJT.cjs} +6 -8
  10. package/dist/chunk-2URFSWJT.cjs.map +1 -0
  11. package/dist/{chunk-4S57PE43.js → chunk-2WDL2ZVP.js} +6 -7
  12. package/dist/chunk-2WDL2ZVP.js.map +1 -0
  13. package/dist/{chunk-V64DICJK.js → chunk-363IKX3C.js} +3 -3
  14. package/dist/{chunk-LWCFT5SP.cjs → chunk-3QBMSZSE.cjs} +3 -3
  15. package/dist/{chunk-LWCFT5SP.cjs.map → chunk-3QBMSZSE.cjs.map} +1 -1
  16. package/dist/{chunk-IC2PIK3E.js → chunk-43DJ3GGR.js} +4 -4
  17. package/dist/{chunk-L6ERHCQ2.js → chunk-57BVERWD.js} +3 -3
  18. package/dist/{chunk-AUNDBUHM.cjs → chunk-5HRVHEHE.cjs} +3 -3
  19. package/dist/{chunk-AUNDBUHM.cjs.map → chunk-5HRVHEHE.cjs.map} +1 -1
  20. package/dist/{chunk-6IB27I5K.cjs → chunk-6JYXGRJ3.cjs} +8 -8
  21. package/dist/{chunk-6IB27I5K.cjs.map → chunk-6JYXGRJ3.cjs.map} +1 -1
  22. package/dist/{chunk-NERASTO2.cjs → chunk-6ZFXIYH7.cjs} +3 -3
  23. package/dist/{chunk-NERASTO2.cjs.map → chunk-6ZFXIYH7.cjs.map} +1 -1
  24. package/dist/{chunk-IKXXXVUO.js → chunk-7TQUJ6BJ.js} +3 -3
  25. package/dist/{chunk-544RAXWO.cjs → chunk-7VMF6LIC.cjs} +19 -19
  26. package/dist/{chunk-544RAXWO.cjs.map → chunk-7VMF6LIC.cjs.map} +1 -1
  27. package/dist/{chunk-WTFEMOV5.cjs → chunk-ADB7QRX5.cjs} +16 -16
  28. package/dist/{chunk-WTFEMOV5.cjs.map → chunk-ADB7QRX5.cjs.map} +1 -1
  29. package/dist/{chunk-6CW5QSYV.cjs → chunk-AFGC62AL.cjs} +7 -7
  30. package/dist/{chunk-6CW5QSYV.cjs.map → chunk-AFGC62AL.cjs.map} +1 -1
  31. package/dist/{chunk-U4SVBE2M.js → chunk-AWPJH3UB.js} +4 -4
  32. package/dist/{chunk-B2OHBIAL.cjs → chunk-BKUZF7CW.cjs} +10 -11
  33. package/dist/chunk-BKUZF7CW.cjs.map +1 -0
  34. package/dist/{chunk-WR77IZUU.cjs → chunk-BPVOQLCA.cjs} +7 -7
  35. package/dist/{chunk-WR77IZUU.cjs.map → chunk-BPVOQLCA.cjs.map} +1 -1
  36. package/dist/{chunk-MCPGI6EI.js → chunk-BUSMGQJ4.js} +2 -2
  37. package/dist/{chunk-H3C6YECZ.js → chunk-D2PXPX56.js} +6 -6
  38. package/dist/{chunk-L6YJ6QTZ.js → chunk-DCUIT7SI.js} +2 -2
  39. package/dist/{chunk-HYRLK462.js → chunk-EDPCI2JC.js} +2 -2
  40. package/dist/{chunk-DPTTDHZ5.js → chunk-FAGQGGT3.js} +3 -3
  41. package/dist/{chunk-CNTG7OOO.js → chunk-FAXDWZQH.js} +12 -12
  42. package/dist/{chunk-7NUVLVSL.cjs → chunk-FJSK2RT7.cjs} +5 -5
  43. package/dist/{chunk-7NUVLVSL.cjs.map → chunk-FJSK2RT7.cjs.map} +1 -1
  44. package/dist/{chunk-P6OJQ2RN.js → chunk-FSX7DDLO.js} +8 -9
  45. package/dist/chunk-FSX7DDLO.js.map +1 -0
  46. package/dist/{chunk-XIUZT4TO.js → chunk-GE3QCXT7.js} +6 -7
  47. package/dist/chunk-GE3QCXT7.js.map +1 -0
  48. package/dist/{chunk-JY77VJAZ.js → chunk-GHUEVNNU.js} +3 -3
  49. package/dist/{chunk-4V2XYUQL.js → chunk-GLEPKX2R.js} +2 -2
  50. package/dist/{chunk-GZDT2AHJ.cjs → chunk-GRKC4PIX.cjs} +7 -7
  51. package/dist/{chunk-GZDT2AHJ.cjs.map → chunk-GRKC4PIX.cjs.map} +1 -1
  52. package/dist/{chunk-SLHIVEFW.cjs → chunk-HKLLKNRQ.cjs} +6 -9
  53. package/dist/chunk-HKLLKNRQ.cjs.map +1 -0
  54. package/dist/{chunk-2TIMJD4K.js → chunk-IBT535UH.js} +3 -3
  55. package/dist/{chunk-HR5MWA3B.cjs → chunk-IJW6YCJB.cjs} +5 -5
  56. package/dist/{chunk-HR5MWA3B.cjs.map → chunk-IJW6YCJB.cjs.map} +1 -1
  57. package/dist/{chunk-NNAEQR3Y.cjs → chunk-K6VEUJLY.cjs} +30 -30
  58. package/dist/{chunk-NNAEQR3Y.cjs.map → chunk-K6VEUJLY.cjs.map} +1 -1
  59. package/dist/{chunk-F5IRMMZ2.cjs → chunk-K73JO4FK.cjs} +7 -7
  60. package/dist/{chunk-F5IRMMZ2.cjs.map → chunk-K73JO4FK.cjs.map} +1 -1
  61. package/dist/{chunk-4HZIXRAJ.cjs → chunk-KF2OGUAD.cjs} +11 -12
  62. package/dist/chunk-KF2OGUAD.cjs.map +1 -0
  63. package/dist/{chunk-TJQNGJHP.js → chunk-KLHC5BHS.js} +4 -4
  64. package/dist/{chunk-XWMXEJVZ.js → chunk-KZKBZ2AV.js} +5 -7
  65. package/dist/chunk-KZKBZ2AV.js.map +1 -0
  66. package/dist/{chunk-DG3O5NV4.cjs → chunk-LLHR6QW3.cjs} +3 -3
  67. package/dist/{chunk-DG3O5NV4.cjs.map → chunk-LLHR6QW3.cjs.map} +1 -1
  68. package/dist/{chunk-GDRLVX2A.js → chunk-LXRNFQEI.js} +4 -4
  69. package/dist/{chunk-VXC7Z7XB.cjs → chunk-MKQVDEHI.cjs} +5 -6
  70. package/dist/chunk-MKQVDEHI.cjs.map +1 -0
  71. package/dist/{chunk-TNQ2ZZ7W.cjs → chunk-MUMTPMWD.cjs} +7 -7
  72. package/dist/{chunk-TNQ2ZZ7W.cjs.map → chunk-MUMTPMWD.cjs.map} +1 -1
  73. package/dist/{chunk-RHWZX7PB.js → chunk-NONYIHXD.js} +4 -4
  74. package/dist/{chunk-XPG56DLQ.cjs → chunk-NSA7ASZ7.cjs} +8 -8
  75. package/dist/{chunk-XPG56DLQ.cjs.map → chunk-NSA7ASZ7.cjs.map} +1 -1
  76. package/dist/{chunk-6NAOAKII.js → chunk-NWFGXLQP.js} +2 -2
  77. package/dist/{chunk-HLI4SOH3.cjs → chunk-NYGRVB2J.cjs} +45 -45
  78. package/dist/{chunk-HLI4SOH3.cjs.map → chunk-NYGRVB2J.cjs.map} +1 -1
  79. package/dist/{chunk-UUT2VEN5.cjs → chunk-OC2OBBGM.cjs} +7 -8
  80. package/dist/chunk-OC2OBBGM.cjs.map +1 -0
  81. package/dist/{chunk-3X6QVHTD.js → chunk-OERK3T7E.js} +3 -4
  82. package/dist/chunk-OERK3T7E.js.map +1 -0
  83. package/dist/{chunk-ZJWQPZ7E.js → chunk-OQWG7NLI.js} +3 -11
  84. package/dist/chunk-OQWG7NLI.js.map +1 -0
  85. package/dist/{chunk-U34INRFO.js → chunk-PP6HS4GR.js} +5 -16
  86. package/dist/chunk-PP6HS4GR.js.map +1 -0
  87. package/dist/{chunk-OGGZIFTI.cjs → chunk-PVNBH7XN.cjs} +36 -36
  88. package/dist/{chunk-OGGZIFTI.cjs.map → chunk-PVNBH7XN.cjs.map} +1 -1
  89. package/dist/{chunk-H46ZLPNJ.cjs → chunk-QDZVZY53.cjs} +7 -7
  90. package/dist/{chunk-H46ZLPNJ.cjs.map → chunk-QDZVZY53.cjs.map} +1 -1
  91. package/dist/{chunk-ENMDOQQO.cjs → chunk-R5WI5IGR.cjs} +6 -17
  92. package/dist/{chunk-ENMDOQQO.cjs.map → chunk-R5WI5IGR.cjs.map} +1 -1
  93. package/dist/{chunk-UTYY35QX.cjs → chunk-RZMQCVAS.cjs} +3 -3
  94. package/dist/{chunk-UTYY35QX.cjs.map → chunk-RZMQCVAS.cjs.map} +1 -1
  95. package/dist/{chunk-7FV2X62W.cjs → chunk-SJKD3WCV.cjs} +7 -7
  96. package/dist/{chunk-7FV2X62W.cjs.map → chunk-SJKD3WCV.cjs.map} +1 -1
  97. package/dist/{chunk-LUDK44NZ.cjs → chunk-SJPCBRKR.cjs} +3 -3
  98. package/dist/{chunk-LUDK44NZ.cjs.map → chunk-SJPCBRKR.cjs.map} +1 -1
  99. package/dist/{chunk-3TF2GZSG.js → chunk-SONL2RCW.js} +7 -7
  100. package/dist/{chunk-2IXCEKLI.js → chunk-SOS4K7VC.js} +2 -2
  101. package/dist/{chunk-WHQGJHMD.js → chunk-TOLNPD7S.js} +4 -4
  102. package/dist/{chunk-FE7S4RSK.js → chunk-U5KD4BWL.js} +7 -7
  103. package/dist/{chunk-FHOD3FUN.js → chunk-UTOTOWPS.js} +4 -4
  104. package/dist/{chunk-YIOHKQ6Y.cjs → chunk-VCG647BY.cjs} +5 -13
  105. package/dist/chunk-VCG647BY.cjs.map +1 -0
  106. package/dist/{chunk-N5NXKVFJ.cjs → chunk-VPN7AR7T.cjs} +10 -10
  107. package/dist/{chunk-N5NXKVFJ.cjs.map → chunk-VPN7AR7T.cjs.map} +1 -1
  108. package/dist/{chunk-6FXFKMJ5.js → chunk-XBIMNWE6.js} +3 -3
  109. package/dist/{chunk-Z3IJWYUD.js → chunk-XOUNVK45.js} +2 -2
  110. package/dist/{chunk-3VXUOAIJ.cjs → chunk-XR72A66Q.cjs} +3 -7
  111. package/dist/chunk-XR72A66Q.cjs.map +1 -0
  112. package/dist/{chunk-ULKWUKD2.cjs → chunk-YHSCUPP6.cjs} +22 -23
  113. package/dist/chunk-YHSCUPP6.cjs.map +1 -0
  114. package/dist/{chunk-S5CMZFX6.js → chunk-YPEJH57Z.js} +6 -7
  115. package/dist/chunk-YPEJH57Z.js.map +1 -0
  116. package/dist/{chunk-BO3KK3ZQ.js → chunk-YPPG7NLW.js} +2 -6
  117. package/dist/chunk-YPPG7NLW.js.map +1 -0
  118. package/dist/{chunk-PE2SLXUS.cjs → chunk-YWXS4IPH.cjs} +5 -5
  119. package/dist/{chunk-PE2SLXUS.cjs.map → chunk-YWXS4IPH.cjs.map} +1 -1
  120. package/dist/{chunk-UC4NYF6T.js → chunk-YYA5SWXD.js} +2 -2
  121. package/dist/{chunk-JFV56ISS.cjs → chunk-YZEALKC4.cjs} +6 -6
  122. package/dist/{chunk-JFV56ISS.cjs.map → chunk-YZEALKC4.cjs.map} +1 -1
  123. package/dist/{chunk-IHPSRTVW.js → chunk-Z3OEYDNI.js} +4 -7
  124. package/dist/chunk-Z3OEYDNI.js.map +1 -0
  125. package/dist/{chunk-MKC6V3SY.cjs → chunk-Z6FZ7GI5.cjs} +6 -6
  126. package/dist/{chunk-MKC6V3SY.cjs.map → chunk-Z6FZ7GI5.cjs.map} +1 -1
  127. package/dist/{chunk-NFD7MPX4.cjs → chunk-ZVA5KJAJ.cjs} +11 -11
  128. package/dist/{chunk-NFD7MPX4.cjs.map → chunk-ZVA5KJAJ.cjs.map} +1 -1
  129. package/dist/color-picker/index.cjs +4 -4
  130. package/dist/color-picker/index.js +3 -3
  131. package/dist/combobox/index.cjs +6 -6
  132. package/dist/combobox/index.js +5 -5
  133. package/dist/command-palette/index.cjs +3 -3
  134. package/dist/command-palette/index.js +2 -2
  135. package/dist/context-menu/index.cjs +6 -6
  136. package/dist/context-menu/index.js +5 -5
  137. package/dist/conversation/index.cjs +8 -8
  138. package/dist/conversation/index.js +7 -7
  139. package/dist/data-grid/index.cjs +15 -15
  140. package/dist/data-grid/index.js +14 -14
  141. package/dist/date-picker/index.cjs +8 -8
  142. package/dist/date-picker/index.js +7 -7
  143. package/dist/drawer/index.cjs +5 -5
  144. package/dist/drawer/index.js +4 -4
  145. package/dist/dropdown/index.cjs +3 -3
  146. package/dist/dropdown/index.js +2 -2
  147. package/dist/header/index.cjs +6 -6
  148. package/dist/header/index.js +5 -5
  149. package/dist/index.cjs +38 -38
  150. package/dist/index.js +37 -37
  151. package/dist/inline-edit/index.cjs +5 -5
  152. package/dist/inline-edit/index.js +4 -4
  153. package/dist/input/index.cjs +4 -4
  154. package/dist/input/index.js +3 -3
  155. package/dist/menu/index.cjs +5 -5
  156. package/dist/menu/index.js +4 -4
  157. package/dist/modal/index.cjs +5 -5
  158. package/dist/modal/index.js +4 -4
  159. package/dist/navigation/index.cjs +5 -5
  160. package/dist/navigation/index.js +4 -4
  161. package/dist/number-input/index.cjs +2 -4
  162. package/dist/number-input/index.cjs.map +1 -1
  163. package/dist/number-input/index.js +1 -3
  164. package/dist/page-layout/index.cjs +12 -12
  165. package/dist/page-layout/index.js +11 -11
  166. package/dist/pagination/index.cjs +8 -8
  167. package/dist/pagination/index.js +7 -7
  168. package/dist/popover/index.cjs +3 -3
  169. package/dist/popover/index.d.cts +1 -3
  170. package/dist/popover/index.d.ts +1 -3
  171. package/dist/popover/index.js +2 -2
  172. package/dist/segmented-control/index.cjs +4 -4
  173. package/dist/segmented-control/index.js +3 -3
  174. package/dist/select/index.cjs +6 -6
  175. package/dist/select/index.js +5 -5
  176. package/dist/snackbar/index.cjs +5 -5
  177. package/dist/snackbar/index.js +4 -4
  178. package/dist/split-button/index.cjs +6 -6
  179. package/dist/split-button/index.js +5 -5
  180. package/dist/split-chip/index.cjs +5 -5
  181. package/dist/split-chip/index.js +4 -4
  182. package/dist/table/index.cjs +13 -13
  183. package/dist/table/index.js +12 -12
  184. package/dist/tabs/index.cjs +3 -3
  185. package/dist/tabs/index.js +2 -2
  186. package/dist/tag-input/index.cjs +6 -6
  187. package/dist/tag-input/index.js +5 -5
  188. package/dist/textarea/index.cjs +4 -4
  189. package/dist/textarea/index.js +3 -3
  190. package/dist/theme-editor/index.cjs +11 -11
  191. package/dist/theme-editor/index.js +10 -10
  192. package/dist/theme-provider/index.cjs +3 -3
  193. package/dist/theme-provider/index.js +2 -2
  194. package/dist/toolbar/index.cjs +8 -8
  195. package/dist/toolbar/index.js +7 -7
  196. package/dist/tooltip/index.cjs +3 -3
  197. package/dist/tooltip/index.js +2 -2
  198. package/package.json +4 -2
  199. package/dist/chunk-3VXUOAIJ.cjs.map +0 -1
  200. package/dist/chunk-3X6QVHTD.js.map +0 -1
  201. package/dist/chunk-4HZIXRAJ.cjs.map +0 -1
  202. package/dist/chunk-4S57PE43.js.map +0 -1
  203. package/dist/chunk-B2OHBIAL.cjs.map +0 -1
  204. package/dist/chunk-BO3KK3ZQ.js.map +0 -1
  205. package/dist/chunk-CFVUUMQA.cjs.map +0 -1
  206. package/dist/chunk-IHPSRTVW.js.map +0 -1
  207. package/dist/chunk-P6OJQ2RN.js.map +0 -1
  208. package/dist/chunk-S5CMZFX6.js.map +0 -1
  209. package/dist/chunk-SLHIVEFW.cjs.map +0 -1
  210. package/dist/chunk-U34INRFO.js.map +0 -1
  211. package/dist/chunk-ULKWUKD2.cjs.map +0 -1
  212. package/dist/chunk-UUT2VEN5.cjs.map +0 -1
  213. package/dist/chunk-VXC7Z7XB.cjs.map +0 -1
  214. package/dist/chunk-XIUZT4TO.js.map +0 -1
  215. package/dist/chunk-XWMXEJVZ.js.map +0 -1
  216. package/dist/chunk-YIOHKQ6Y.cjs.map +0 -1
  217. package/dist/chunk-ZJWQPZ7E.js.map +0 -1
  218. /package/dist/{chunk-V5CM5TH3.js.map → chunk-2OBOD3GO.js.map} +0 -0
  219. /package/dist/{chunk-V64DICJK.js.map → chunk-363IKX3C.js.map} +0 -0
  220. /package/dist/{chunk-IC2PIK3E.js.map → chunk-43DJ3GGR.js.map} +0 -0
  221. /package/dist/{chunk-L6ERHCQ2.js.map → chunk-57BVERWD.js.map} +0 -0
  222. /package/dist/{chunk-IKXXXVUO.js.map → chunk-7TQUJ6BJ.js.map} +0 -0
  223. /package/dist/{chunk-U4SVBE2M.js.map → chunk-AWPJH3UB.js.map} +0 -0
  224. /package/dist/{chunk-MCPGI6EI.js.map → chunk-BUSMGQJ4.js.map} +0 -0
  225. /package/dist/{chunk-H3C6YECZ.js.map → chunk-D2PXPX56.js.map} +0 -0
  226. /package/dist/{chunk-L6YJ6QTZ.js.map → chunk-DCUIT7SI.js.map} +0 -0
  227. /package/dist/{chunk-HYRLK462.js.map → chunk-EDPCI2JC.js.map} +0 -0
  228. /package/dist/{chunk-DPTTDHZ5.js.map → chunk-FAGQGGT3.js.map} +0 -0
  229. /package/dist/{chunk-CNTG7OOO.js.map → chunk-FAXDWZQH.js.map} +0 -0
  230. /package/dist/{chunk-JY77VJAZ.js.map → chunk-GHUEVNNU.js.map} +0 -0
  231. /package/dist/{chunk-4V2XYUQL.js.map → chunk-GLEPKX2R.js.map} +0 -0
  232. /package/dist/{chunk-2TIMJD4K.js.map → chunk-IBT535UH.js.map} +0 -0
  233. /package/dist/{chunk-TJQNGJHP.js.map → chunk-KLHC5BHS.js.map} +0 -0
  234. /package/dist/{chunk-GDRLVX2A.js.map → chunk-LXRNFQEI.js.map} +0 -0
  235. /package/dist/{chunk-RHWZX7PB.js.map → chunk-NONYIHXD.js.map} +0 -0
  236. /package/dist/{chunk-6NAOAKII.js.map → chunk-NWFGXLQP.js.map} +0 -0
  237. /package/dist/{chunk-3TF2GZSG.js.map → chunk-SONL2RCW.js.map} +0 -0
  238. /package/dist/{chunk-2IXCEKLI.js.map → chunk-SOS4K7VC.js.map} +0 -0
  239. /package/dist/{chunk-WHQGJHMD.js.map → chunk-TOLNPD7S.js.map} +0 -0
  240. /package/dist/{chunk-FE7S4RSK.js.map → chunk-U5KD4BWL.js.map} +0 -0
  241. /package/dist/{chunk-FHOD3FUN.js.map → chunk-UTOTOWPS.js.map} +0 -0
  242. /package/dist/{chunk-6FXFKMJ5.js.map → chunk-XBIMNWE6.js.map} +0 -0
  243. /package/dist/{chunk-Z3IJWYUD.js.map → chunk-XOUNVK45.js.map} +0 -0
  244. /package/dist/{chunk-UC4NYF6T.js.map → chunk-YYA5SWXD.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Dropdown/Dropdown.context.types.ts","../src/components/Dropdown/Dropdown.context.tsx","../src/components/Dropdown/Dropdown.hooks.ts","../src/components/Dropdown/Dropdown.component.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport interface DropdownContextValue {\n level: number;\n}\n\nexport const DropdownContext = createContext<DropdownContextValue>({ level: 0 });\n","import React from 'react';\nimport { DropdownContext } from './Dropdown.context.types';\n\nexport const DropdownProvider: React.FC<{ children: React.ReactNode; level?: number }> = ({\n children,\n level = 0,\n}) => {\n return <DropdownContext.Provider value={{ level }}>{children}</DropdownContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { DropdownContext } from './Dropdown.context.types';\n\nexport const useDropdownContext = () => {\n return useContext(DropdownContext);\n};\n","import React, { useState, useRef, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { devWarn, fullWidthModifier, useIsClient } from '../../utils';\nimport type { DropdownProps, DropdownState } from './Dropdown.types';\nimport { DropdownProvider } from './Dropdown.context';\nimport { useDropdownContext } from './Dropdown.hooks';\n\nconst DropdownInternal: React.FC<DropdownProps> = ({\n trigger,\n content,\n placement: preferredPlacement = 'bottom',\n align = 'start',\n delay = 0,\n disabled = false,\n defaultOpen = false,\n open,\n onOpenChange,\n triggerClassName = '',\n contentClassName = '',\n role,\n closeOnClickOutside = true,\n closeOnEscape = true,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n autoWidth = true,\n fullWidth = false,\n triggerRef: externalTriggerRef,\n isNested = false,\n dropdownLevel,\n dropdownGroup,\n}) => {\n const context = useDropdownContext();\n const actualLevel = dropdownLevel !== undefined ? dropdownLevel : context.level;\n // `defaultOpen` makes the portal reachable on the first render, which cannot\n // happen on a server - see `useIsClient`.\n const isClient = useIsClient();\n const [dropdownState, setDropdownState] = useState<DropdownState>({\n isVisible: defaultOpen,\n isPositioned: false,\n position: { top: 0, left: 0, placement: preferredPlacement },\n });\n\n // ── Controlled / uncontrolled open state ──────────────────────────────────\n //\n // `dropdownState.isVisible` stays the *uncontrolled* value and is kept in\n // step even while controlled, so removing `open` later leaves coherent state.\n // Everything downstream reads `isVisible` below, never the field directly.\n //\n // `DropdownState` is exported from the package root, so it keeps its shape:\n // splitting `isVisible` out of it would be a breaking type change for a\n // consumer who imports it, in exchange for nothing a reader of this file\n // needs.\n const isControlled = open !== undefined;\n const isVisible = isControlled ? open : dropdownState.isVisible;\n\n const wasControlled = useRef(isControlled);\n if (wasControlled.current !== isControlled) {\n devWarn(\n 'dropdown-controlled-switch',\n 'Dropdown: `open` switched between controlled and uncontrolled. Pick one for the lifetime of the component - the dropdown keeps its own state as a fallback, so switching makes it jump to whatever that happens to be.',\n );\n wasControlled.current = isControlled;\n }\n\n /**\n * The single place the open state changes. Every route - trigger click,\n * click-outside, Escape, a group sibling, the `delay` timer - goes through\n * here, so a controlled consumer sees all of them and cannot desync.\n */\n const setOpen = useCallback(\n (next: boolean) => {\n setDropdownState((prev) => ({ ...prev, isVisible: next, isPositioned: false }));\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n // A controlled caller can flip `open` without going through `setOpen`, which\n // would leave `isPositioned` true from the previous open and paint the panel\n // at its old coordinates for a frame. Re-arm the positioning pass from the\n // transition itself.\n useEffect(() => {\n if (!isVisible) {\n setDropdownState((prev) => (prev.isPositioned ? { ...prev, isPositioned: false } : prev));\n }\n }, [isVisible]);\n\n // A pending `delay` timer outlives a controlled close otherwise, and reopens\n // the panel a moment after the consumer closed it.\n useEffect(() => {\n if (!isVisible && timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = undefined;\n }\n }, [isVisible]);\n const triggerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const animationFrameRef = useRef<number | undefined>(undefined);\n const isScrollingRef = useRef(false);\n\n // The element to actually measure/anchor against. When a consumer passes\n // `triggerRef`, that's an explicit statement of \"this is what I want the\n // dropdown positioned relative to\" - it must win over the internal wrapper\n // div, not just inform sizing. Consumers occasionally need `trigger` to be\n // a small anchor node (e.g. a 0-height span) sitting inside a larger,\n // variable-content field (chips, wrapped text); anchoring position to the\n // wrapper instead of that field silently drifts as soon as the field's\n // internal layout changes, since the wrapper only ever contains `trigger`\n // itself, never the field around it.\n const getTriggerElement = useCallback(\n (): HTMLElement | null => externalTriggerRef?.current ?? triggerRef.current,\n [externalTriggerRef],\n );\n\n const calculateDynamicSizing = useCallback(\n // Only the width is read, so the parameter is the narrowest shape that\n // satisfies it rather than a `DOMRect`. The caller used to fall back to\n // `new DOMRect()`, which is a browser-only global evaluated *during\n // render* - it was the first thing to throw when an open dropdown was\n // server-rendered, before `document.body` ever got a chance to.\n (triggerRect: { width: number } | null) => {\n // Shrink the panel to its content by default. This prevents the\n // position:fixed element from expanding to viewport width when children\n // use `width:100%` or `flex:1`. `minWidth` (set below) still wins when\n // the trigger is wider than the content, as CSS min-width overrides width.\n const styles: Record<string, string | number> = { width: 'max-content' };\n\n if (autoWidth && triggerRect && (externalTriggerRef?.current || triggerRef.current)) {\n const triggerWidth = triggerRect.width;\n styles.minWidth = triggerWidth;\n }\n\n if (minWidth !== undefined) {\n styles.minWidth = typeof minWidth === 'number' ? `${minWidth}px` : minWidth;\n }\n if (maxWidth !== undefined) {\n if (maxWidth === 'auto') {\n styles.maxWidth = 'none';\n } else {\n styles.maxWidth = typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth;\n }\n }\n if (minHeight !== undefined) {\n styles.minHeight = typeof minHeight === 'number' ? `${minHeight}px` : minHeight;\n }\n if (maxHeight !== undefined) {\n if (maxHeight === 'auto') {\n styles.maxHeight = 'none';\n } else {\n styles.maxHeight = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n }\n }\n\n const hasHeightConstraint = minHeight !== undefined || maxHeight !== undefined;\n if (hasHeightConstraint) {\n styles.overflowY = 'auto';\n } else {\n styles.overflowY = 'visible';\n }\n\n return styles;\n },\n [autoWidth, externalTriggerRef, minWidth, maxWidth, minHeight, maxHeight],\n );\n\n const calculateOptimalPosition = useCallback(\n (triggerRect: DOMRect, contentRect: DOMRect) => {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n const gap = 8;\n\n let placement: 'top' | 'bottom' | 'left' | 'right' = preferredPlacement;\n let top = 0;\n let left = 0;\n\n // Helpers for cross-axis alignment\n const alignedLeft = (() => {\n switch (align) {\n case 'end':\n return triggerRect.right - contentRect.width;\n case 'center':\n return triggerRect.left + (triggerRect.width - contentRect.width) / 2;\n default:\n return triggerRect.left; // \"start\"\n }\n })();\n const alignedTop = (() => {\n switch (align) {\n case 'end':\n return triggerRect.bottom - contentRect.height;\n case 'center':\n return triggerRect.top + (triggerRect.height - contentRect.height) / 2;\n default:\n return triggerRect.top; // \"start\"\n }\n })();\n\n switch (preferredPlacement) {\n case 'top':\n top = triggerRect.top - contentRect.height - gap;\n left = alignedLeft;\n break;\n case 'bottom':\n top = triggerRect.bottom + gap;\n left = alignedLeft;\n break;\n case 'left':\n top = alignedTop;\n left = triggerRect.left - contentRect.width - gap;\n break;\n case 'right':\n top = alignedTop;\n left = triggerRect.right + gap;\n break;\n }\n\n if (placement === 'top' && top < gap) {\n placement = 'bottom';\n top = triggerRect.bottom + gap;\n } else if (placement === 'bottom' && top + contentRect.height > viewportHeight - gap) {\n placement = 'top';\n top = triggerRect.top - contentRect.height - gap;\n } else if (placement === 'left' && left < gap) {\n placement = 'right';\n left = triggerRect.right + gap;\n } else if (placement === 'right' && left + contentRect.width > viewportWidth - gap) {\n placement = 'left';\n left = triggerRect.left - contentRect.width - gap;\n }\n\n // Always clamp to both viewport edges - not just the near one - regardless\n // of whether an explicit min/max size was passed. `autoWidth` consumers\n // (Combobox, Select, TagInput suggestions, Menu, ...) never set\n // minWidth/maxWidth, so gating this on those props left the far edge\n // (right/bottom) completely unclamped and let content overflow the\n // viewport whenever it rendered wider/taller than its trigger.\n top = Math.max(gap, Math.min(top, viewportHeight - contentRect.height - gap));\n\n left = Math.max(gap, Math.min(left, viewportWidth - contentRect.width - gap));\n\n return { top, left, placement };\n },\n [preferredPlacement, align],\n );\n\n const handleScroll = useCallback(() => {\n if (!isVisible || !dropdownState.isPositioned || isScrollingRef.current) return;\n\n isScrollingRef.current = true;\n\n animationFrameRef.current = requestAnimationFrame(() => {\n const triggerElement = getTriggerElement();\n if (triggerElement && contentRef.current) {\n const triggerRect = triggerElement.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n\n const { top, left, placement } = calculateOptimalPosition(triggerRect, contentRect);\n\n setDropdownState((prev) => ({\n ...prev,\n position: { top, left, placement },\n }));\n }\n\n isScrollingRef.current = false;\n });\n }, [isVisible, dropdownState.isPositioned, calculateOptimalPosition, getTriggerElement]);\n\n const handleTriggerClick = useCallback(() => {\n if (disabled) return;\n\n if (isVisible) {\n setOpen(false);\n } else {\n if (dropdownGroup) {\n const siblingDropdowns = document.querySelectorAll(\n `[data-dropdown-group=\"${dropdownGroup}\"][data-dropdown-content]`,\n );\n siblingDropdowns.forEach((dropdown) => {\n const dropdownElement = dropdown as HTMLElement;\n\n dropdownElement.dispatchEvent(new CustomEvent('closeSibling'));\n });\n }\n\n if (delay > 0) {\n timeoutRef.current = setTimeout(() => setOpen(true), delay);\n } else {\n setOpen(true);\n }\n }\n }, [disabled, isVisible, delay, dropdownGroup, setOpen]);\n\n useEffect(() => {\n const handleCloseSibling = () => {\n if (isVisible) setOpen(false);\n };\n\n const currentContentRef = contentRef.current;\n if (currentContentRef) {\n currentContentRef.addEventListener('closeSibling', handleCloseSibling);\n }\n\n return () => {\n if (currentContentRef) {\n currentContentRef.removeEventListener('closeSibling', handleCloseSibling);\n }\n };\n }, [isVisible, setOpen]);\n\n const handleClickOutside = useCallback(\n (event: MouseEvent) => {\n if (!closeOnClickOutside || !isVisible) return;\n\n const target = event.target as Node;\n\n if (contentRef.current?.contains(target)) {\n return;\n }\n\n if (getTriggerElement()?.contains(target)) {\n return;\n }\n\n const allDropdowns = document.querySelectorAll('[data-dropdown-content]');\n for (const dropdown of allDropdowns) {\n if (dropdown === contentRef.current) continue;\n\n if (dropdown.contains(target)) {\n const clickedDropdownLevel = parseInt(\n dropdown.getAttribute('data-dropdown-level') || '0',\n );\n\n if (clickedDropdownLevel > actualLevel) {\n return;\n }\n }\n }\n\n setOpen(false);\n },\n [closeOnClickOutside, isVisible, actualLevel, getTriggerElement, setOpen],\n );\n\n const handleEscapeKey = useCallback(\n (event: KeyboardEvent) => {\n if (closeOnEscape && event.key === 'Escape' && isVisible) {\n setOpen(false);\n }\n },\n [closeOnEscape, isVisible, setOpen],\n );\n\n useEffect(() => {\n const triggerElement = getTriggerElement();\n if (isVisible && !dropdownState.isPositioned && contentRef.current && triggerElement) {\n const triggerRect = triggerElement.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n\n const { top, left, placement } = calculateOptimalPosition(triggerRect, contentRect);\n\n setDropdownState((prev) => ({\n ...prev,\n position: { top, left, placement },\n isPositioned: true,\n }));\n }\n }, [\n isVisible,\n dropdownState.isPositioned,\n calculateOptimalPosition,\n getTriggerElement,\n // Load-bearing, not incidental. With `defaultOpen` the panel is \"visible\"\n // from the first render, but the portal is deferred one render for SSR\n // safety - so this effect's first run finds `contentRef.current` still\n // null, measures nothing, and without `isClient` in the deps it would never\n // run again. The panel then stays `visibility: hidden` forever: mounted,\n // unpositioned, invisible. Caught by `OpensOnMountWithDefaultOpen`.\n isClient,\n ]);\n\n useEffect(() => {\n const handleResize = () => {\n const triggerElement = getTriggerElement();\n if (isVisible && dropdownState.isPositioned && contentRef.current && triggerElement) {\n const triggerRect = triggerElement.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n\n const { top, left, placement } = calculateOptimalPosition(triggerRect, contentRect);\n\n setDropdownState((prev) => ({\n ...prev,\n position: { top, left, placement },\n }));\n }\n };\n\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [isVisible, dropdownState.isPositioned, calculateOptimalPosition, getTriggerElement]);\n\n useEffect(() => {\n if (isVisible) {\n // Capture phase on `document`, which is the only way to see scrolling in\n // an arbitrary ancestor: `scroll` does not bubble from an element, so the\n // previous listeners on `window` and `document.body` only ever fired for\n // the page itself. Any other scroll container - `PageLayout`'s\n // `&__content` is the layout's scrollport, so this is every dropdown\n // inside it - moved the trigger while the portaled, `position: fixed`\n // content stayed at its original viewport coordinates.\n document.addEventListener('scroll', handleScroll, { capture: true, passive: true });\n }\n\n return () => {\n document.removeEventListener('scroll', handleScroll, { capture: true });\n };\n }, [isVisible, handleScroll]);\n\n useEffect(() => {\n if (isVisible) {\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('keydown', handleEscapeKey);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('keydown', handleEscapeKey);\n };\n }, [isVisible, handleClickOutside, handleEscapeKey]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (animationFrameRef.current) {\n cancelAnimationFrame(animationFrameRef.current);\n }\n };\n }, []);\n\n return (\n <>\n {/*\n A positioning and click-capturing wrapper, and nothing more - it\n deliberately carries no `role` and no `tabIndex`.\n\n It used to be `role=\"button\" tabIndex={-1}`, which was wrong in both\n directions at once. `tabIndex={-1}` with no key handler meant the\n wrapper was never keyboard-operable, so the button role it advertised\n could not be activated by anyone using a keyboard - it promised a\n control that did not exist. Meanwhile, because `trigger` is virtually\n always a real control (Select and Combobox pass an `<input>`, Menu and\n SplitButton a `<button>`, ...), the role wrapped an interactive element\n in another interactive element: invalid ARIA, flagged by axe as\n `nested-interactive`, and announced by screen readers as a button\n inside a button. One attribute did this across every component built\n on Dropdown - Select, Combobox, Menu, Popover, ContextMenu,\n ColorPicker and TagInput - 212 violations in a single axe run.\n\n Semantics belong to whatever is passed as `trigger`, which is the only\n element that can actually own them. A consumer passing a\n non-interactive node should pass a `<button>` instead; it was never\n keyboard-accessible under the old markup either.\n */}\n <div\n ref={triggerRef}\n onClick={handleTriggerClick}\n className={`eidos-dropdown-trigger ${fullWidth ? fullWidthModifier('eidos-dropdown-trigger') : ''} ${triggerClassName}`}\n >\n {trigger}\n </div>\n {isClient &&\n isVisible &&\n createPortal(\n <div\n ref={contentRef}\n data-dropdown-content\n data-dropdown-level={actualLevel}\n data-dropdown-group={dropdownGroup || ''}\n className={`eidos-dropdown-content eidos-dropdown-content--${dropdownState.position.placement} ${isNested ? 'eidos-dropdown-content--nested' : ''} ${dropdownState.isPositioned ? 'eidos-dropdown-content--positioned' : ''} ${contentClassName || ''}`}\n style={{\n top: dropdownState.position.top,\n left: dropdownState.position.left,\n ...calculateDynamicSizing(getTriggerElement()?.getBoundingClientRect() ?? null),\n }}\n // No default role: see the `role` prop's note in `Dropdown.types`.\n // This was `role=\"menu\"` unconditionally, which made a menu out of\n // every `Select` listbox, date picker and toolbar panel in the\n // library.\n role={role}\n >\n {content}\n </div>,\n document.body,\n )}\n </>\n );\n};\n\nexport const Dropdown: React.FC<DropdownProps> = (props) => {\n const context = useDropdownContext();\n const nextLevel = props.dropdownLevel !== undefined ? props.dropdownLevel : context.level + 1;\n\n return (\n <DropdownProvider level={nextLevel}>\n <DropdownInternal {...props} />\n </DropdownProvider>\n );\n};\n\nDropdown.displayName = 'Dropdown';\n"],"mappings":";;;;;;;AAAA,SAAS,qBAAqB;AAMvB,IAAM,kBAAkB,cAAoC,EAAE,OAAO,EAAE,CAAC;;;ACCtE;AAJF,IAAM,mBAA4E,CAAC;AAAA,EACxF;AAAA,EACA,QAAQ;AACV,MAAM;AACJ,SAAO,oBAAC,gBAAgB,UAAhB,EAAyB,OAAO,EAAE,MAAM,GAAI,UAAS;AAC/D;;;ACRA,SAAS,kBAAkB;AAGpB,IAAM,qBAAqB,MAAM;AACtC,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,uCAAuC,EAAE,IAAI,oBAAoB,EAAE;AAAA,UACrP,OAAO;AAAA,YACL,KAAK,cAAc,SAAS;AAAA,YAC5B,MAAM,cAAc,SAAS;AAAA,YAC7B,GAAG,uBAAuB,kBAAkB,GAAG,sBAAsB,KAAK,IAAI;AAAA,UAChF;AAAA,UAKA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA,MACA,SAAS;AAAA,IACX;AAAA,KACJ;AAEJ;AAEO,IAAM,WAAoC,CAAC,UAAU;AAC1D,QAAM,UAAU,mBAAmB;AACnC,QAAM,YAAY,MAAM,kBAAkB,SAAY,MAAM,gBAAgB,QAAQ,QAAQ;AAE5F,SACE,gBAAAA,KAAC,oBAAiB,OAAO,WACvB,0BAAAA,KAAC,oBAAkB,GAAG,OAAO,GAC/B;AAEJ;AAEA,SAAS,cAAc;","names":["jsx"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-4HZIXRAJ.cjs","../src/components/Input/Input.component.tsx"],"names":["currentValue"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACTA,8BAAmD;AACnD,2CAAyD;AA4O/C,+CAAA;AAvOH,IAAM,MAAA,EAAQ,+BAAA;AAAA,EACnB,CACE;AAAA,IACE,QAAA,EAAU,QAAA;AAAA,IACV,MAAA,EAAQ,SAAA;AAAA,IACR,KAAA,EAAO,IAAA;AAAA,IACP,SAAA,EAAW,KAAA;AAAA,IACX,QAAA,EAAU,KAAA;AAAA,IACV,UAAA,EAAY,EAAA;AAAA,IACZ,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,cAAA;AAAA,IACA,iBAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,cAAA,EAAgB,KAAA;AAAA,IAChB,cAAA;AAAA,IACA,YAAA;AAAA,IACA,KAAA,EAAO,MAAA;AAAA,IACP,EAAA;AAA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D,cAAA;AAExD,YAAA;AAKmB,YAAA;AAIhB,cAAA;AAAA,cAAA;AACM,gBAAA;AACM,gBAAA;AACF,gBAAA;AACa,gBAAA;AACO,gBAAA;AAE5B,gBAAA;AAA8C,cAAA;AACjD,YAAA;AAIF,YAAA;AAK2B,YAAA;AAC1B,cAAA;AAAA,cAAA;AACM,gBAAA;AACM,gBAAA;AACF,gBAAA;AACa,gBAAA;AACM,gBAAA;AAEP,gBAAA;AAA0B,cAAA;AACjD,YAAA;AAKC,YAAA;AAIL,UAAA;AAGG,UAAA;AACc,4BAAA;AACN,4BAAA;AACT,UAAA;AAAA,QAAA;AAAA,MAAA;AAEJ,IAAA;AAEJ,EAAA;AACF;AAEoB;ADtH2B;AACA;AACA;AACA","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-4HZIXRAJ.cjs","sourcesContent":[null,"import React, { forwardRef, useState, useId } from 'react';\nimport { Eye, EyeOff, CircleAlert, X, ChevronDown } from 'lucide-react';\nimport { renderIcon, fullWidthModifier, devWarn } from '../../utils';\nimport type { InputProps } from './Input.types';\nimport { Tooltip } from '../Tooltip/Tooltip.component';\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n variant = 'filled',\n color = 'primary',\n size = 'md',\n disabled = false,\n loading = false,\n className = '',\n width,\n label,\n error,\n disclaimerIcon,\n disclaimerContent,\n preIcon,\n posIcon,\n posIconButton = false,\n onPosIconClick,\n posIconLabel,\n type = 'text',\n id,\n name,\n required,\n isSelect = false,\n clearable = true,\n fullWidth = false,\n ...inputProps\n },\n ref,\n ) => {\n // Extract defaultValue so it never reaches the native <input> alongside `value`.\n // Passing both causes React's \"controlled/uncontrolled\" warning because we always\n // set value={currentValue} below - defaultValue is only needed to seed local state.\n const { defaultValue, ...restInputProps } = inputProps;\n\n const [showPassword, setShowPassword] = useState(false);\n const [localValue, setLocalValue] = useState(defaultValue || '');\n const [isFocused, setIsFocused] = useState(false);\n\n // Auto-generate id and name if not provided\n const generatedId = useId();\n const inputId = id || `input-${generatedId}`;\n const inputName = name || inputId;\n\n // Determine if using controlled or uncontrolled mode\n const isControlled = restInputProps.value !== undefined;\n const currentValue = isControlled ? restInputProps.value : localValue;\n\n // For select inputs, don't manage localValue - let the select component handle it\n // This prevents the Input's clear button from showing\n\n // Determine if label should float (only when there's content - static behavior)\n // For select inputs, keep label completely static (never float)\n const shouldFloatLabel = isSelect ? false : currentValue || defaultValue;\n\n // Check if field is required (from props or enhanced register function)\n const isRequired = required || Boolean('required' in restInputProps && restInputProps.required);\n\n // ── Error identification (SC 3.3.1) ───────────────────────────────\n //\n // The error was rendered as a red message next to the field and nothing\n // more: no `aria-invalid`, and no association between the two. Visually\n // obvious, entirely absent from the accessibility tree.\n //\n // `aria-describedby` is merged rather than assigned, because callers\n // pass their own - `TagInput` and `Combobox` both describe their fields\n // with hint text - and overwriting it would trade one missing\n // description for another.\n const errorId = `${inputId}-error`;\n const describedBy =\n [restInputProps['aria-describedby'], error ? errorId : null].filter(Boolean).join(' ') ||\n undefined;\n\n // An icon-only button with no name is announced as just \"button\", and\n // only the caller knows what the icon means. Warned rather than enforced\n // at the type level, which would be a breaking change - see the note on\n // `posIconLabel` in Input.types.ts.\n if (posIcon && posIconButton && onPosIconClick && !posIconLabel) {\n devWarn(\n 'input-pos-icon-label',\n 'Input: `posIconButton` renders an icon-only button, so it needs `posIconLabel` to have an accessible name. Falling back to \"Input action\".',\n );\n }\n\n // Handle number input to allow decimals and negative numbers\n const handleNumberInput = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (type === 'number') {\n const allowedKeys = [\n 'Backspace',\n 'Delete',\n 'Tab',\n 'Escape',\n 'Enter',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n ];\n const isNumber = /[0-9]/.test(e.key);\n const isDecimal = /[.,]/.test(e.key);\n const isMinus = e.key === '-';\n const isAllowedKey = allowedKeys.includes(e.key);\n const isControlKey = e.ctrlKey || e.metaKey;\n\n // Allow minus only at the beginning or when no text is selected\n if (isMinus) {\n const selectionStart = e.currentTarget.selectionStart || 0;\n const selectionEnd = e.currentTarget.selectionEnd || 0;\n const hasSelection = selectionStart !== selectionEnd;\n\n // Allow if at beginning or if replacing selected text\n if (selectionStart !== 0 && !hasSelection) {\n e.preventDefault();\n return;\n }\n }\n\n // Allow decimal only once\n if (isDecimal) {\n const currentValue = e.currentTarget.value;\n const hasDecimal = /[.,]/.test(currentValue);\n if (hasDecimal) {\n e.preventDefault();\n return;\n }\n }\n\n if (!isNumber && !isDecimal && !isMinus && !isAllowedKey && !isControlKey) {\n e.preventDefault();\n }\n }\n };\n\n // Handle input change for number inputs\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n // Only update localValue if uncontrolled and not a select input\n if (!isControlled && !isSelect) {\n setLocalValue(value);\n }\n restInputProps.onChange?.(e);\n };\n\n // Handle clear button\n const handleClear = () => {\n // Update localValue if uncontrolled\n if (!isControlled) {\n setLocalValue('');\n }\n\n // Create a proper synthetic event for React Hook Form\n const syntheticEvent = {\n target: {\n value: '',\n name: inputName,\n id: inputId,\n type: actualType,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n\n // Call the form's onChange handler\n restInputProps.onChange?.(syntheticEvent);\n\n // Also try to update the input element directly\n if (ref && typeof ref === 'object' && ref.current) {\n ref.current.value = '';\n }\n };\n\n // Handle focus and blur\n const handleFocus = () => {\n setIsFocused(true);\n };\n\n const handleBlur = () => {\n setIsFocused(false);\n };\n\n // Determine actual input type (handle password visibility)\n const actualType = type === 'password' ? (showPassword ? 'text' : 'password') : type;\n\n // Generate CSS classes\n const inputClasses = [\n 'eidos-input',\n `eidos-input--${variant}`,\n `eidos-input--${color}`,\n `eidos-input--${size}`,\n fullWidth && fullWidthModifier('eidos-input'),\n loading && `eidos-input--loading`,\n error && `eidos-input--error`,\n ]\n .filter(Boolean)\n .join(' ');\n\n const wrapperClasses = [\n 'eidos-input-wrapper',\n `eidos-input-wrapper--${variant}`,\n `eidos-input-wrapper--${color}`,\n `eidos-input-wrapper--${size}`,\n fullWidth && fullWidthModifier('eidos-input-wrapper'),\n loading && `eidos-input-wrapper--loading`,\n isFocused && `eidos-input-wrapper--focused`,\n error && `eidos-input-wrapper--error`,\n ]\n .filter(Boolean)\n .join(' ');\n\n const labelClasses = [\n 'eidos-input-label',\n shouldFloatLabel && `eidos-input-label--floating`,\n disclaimerIcon && `eidos-input-label--with-icon`,\n error && `eidos-input-label--error`,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n className={`eidos-input-container ${fullWidth ? fullWidthModifier('eidos-input-container') : ''} ${className}`}\n // `width` sizes the whole field, so it belongs on the container rather\n // than on the inner <input> (which is a `flex: 1 1 0` child of the\n // wrapper and only ever fills whatever the wrapper gives it). Applying\n // it here also keeps it a *preferred* width: `max-width: 100%` lets the\n // field shrink inside a narrower parent instead of overflowing it.\n style={\n width\n ? { width: typeof width === 'number' ? `${width}px` : width, maxWidth: '100%' }\n : undefined\n }\n >\n {label && (\n <label htmlFor={inputId} className={labelClasses}>\n <span className={`eidos-input-label-text`}>{label}</span>\n {isRequired && <span className={`eidos-input-required-asterisk`}>*</span>}\n {disclaimerIcon &&\n (disclaimerContent ? (\n <Tooltip message={disclaimerContent}>\n <span className={`eidos-input-disclaimer-icon`}>\n {renderIcon(disclaimerIcon, `eidos-input-disclaimer-icon-svg`)}\n </span>\n </Tooltip>\n ) : (\n <span className={`eidos-input-disclaimer-icon`}>\n {renderIcon(disclaimerIcon, `eidos-input-disclaimer-icon-svg`)}\n </span>\n ))}\n </label>\n )}\n\n <div className={wrapperClasses}>\n {preIcon && (\n <span className={`eidos-input-pre-icon`}>\n {renderIcon(preIcon, `eidos-input-pre-icon-svg`)}\n </span>\n )}\n\n <input\n ref={ref}\n id={inputId}\n name={inputName}\n type={actualType}\n className={inputClasses}\n disabled={disabled || loading}\n onKeyDown={handleNumberInput}\n {...restInputProps}\n aria-invalid={error ? true : restInputProps['aria-invalid']}\n aria-describedby={describedBy}\n value={currentValue}\n onFocus={(e) => {\n handleFocus();\n restInputProps.onFocus?.(e);\n }}\n onBlur={(e) => {\n handleBlur();\n restInputProps.onBlur?.(e);\n }}\n onChange={handleInputChange}\n />\n\n {type === 'password' && (\n <button\n type=\"button\"\n className={`eidos-input-password-toggle`}\n onClick={() => setShowPassword(!showPassword)}\n disabled={disabled || loading}\n // The name changes with state so a screen reader announces what\n // pressing it will do, not what it just did.\n aria-label={showPassword ? 'Hide password' : 'Show password'}\n aria-pressed={showPassword}\n >\n {showPassword ? (\n <EyeOff className={`eidos-input-password-toggle-icon`} />\n ) : (\n <Eye className={`eidos-input-password-toggle-icon`} />\n )}\n </button>\n )}\n\n {/* Clear button - show when there's content and clearable is enabled (default: true) */}\n {currentValue &&\n String(currentValue).trim().length > 0 &&\n type !== 'password' &&\n !isSelect &&\n clearable !== false && (\n <button\n type=\"button\"\n className={`eidos-input-clear-button`}\n onClick={handleClear}\n disabled={disabled || loading}\n aria-label={label ? `Clear ${label}` : 'Clear'}\n >\n <X className={`eidos-input-clear-button-icon`} />\n </button>\n )}\n\n {posIcon && !posIconButton && (\n <span className={`eidos-input-pos-icon`}>\n {renderIcon(posIcon, `eidos-input-pos-icon-svg`)}\n </span>\n )}\n\n {posIcon && posIconButton && onPosIconClick && (\n <button\n type=\"button\"\n className={`eidos-input-pos-icon-button`}\n onClick={onPosIconClick}\n disabled={disabled || loading}\n aria-label={posIconLabel ?? 'Input action'}\n >\n {renderIcon(posIcon, `eidos-input-pos-icon-svg`)}\n </button>\n )}\n\n {/* Chevron for select inputs */}\n {isSelect && (\n <span className={`eidos-input-select-chevron`}>\n <ChevronDown className={`eidos-input-pos-icon-svg`} />\n </span>\n )}\n </div>\n\n {error && (\n <div id={errorId} className={`eidos-input-error-message`}>\n <CircleAlert className={`eidos-input-error-icon`} />\n <span>{error}</span>\n </div>\n )}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Select/Select.component.tsx"],"sourcesContent":["import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react';\nimport { X, Check } from 'lucide-react';\nimport { Input } from '../Input/Input.component';\nimport { Dropdown } from '../Dropdown/Dropdown.component';\nimport type { SelectProps, SelectOption } from './Select.types';\nimport { renderIcon, fullWidthModifier, devWarn } from '../../utils';\n\nexport const Select = React.forwardRef<HTMLDivElement, SelectProps>(\n (\n {\n options = [],\n value,\n defaultValue,\n onChange,\n className = '',\n multiple = false,\n label,\n placeholder = 'Select an option...',\n disabled = false,\n inputProps = {},\n name,\n id,\n required = false,\n fullWidth = false,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight = '300px',\n autoWidth = true,\n clearable = true,\n autoOpen = false,\n dropdownProps = {},\n },\n ref,\n ) => {\n const isControlled = value !== undefined;\n\n // Lazy initializer: seed from defaultValue in uncontrolled mode.\n const [selectedValues, setSelectedValues] = useState<Set<string>>(() => {\n if (defaultValue !== undefined) {\n const vals = Array.isArray(defaultValue) ? defaultValue : [defaultValue];\n return new Set(vals.filter((v) => v !== ''));\n }\n return new Set();\n });\n\n const [focusedIndex, setFocusedIndex] = useState(-1);\n // `Select` owns the open state and hands it to `Dropdown` as a controlled\n // value. It used to keep this flag *and* force the dropdown closed by\n // remounting it through a changing `key`, because `Dropdown`'s own state was\n // private - which meant this flag drove the ARIA attributes while reaching\n // nothing that renders, so the keyboard could not open the listbox at all.\n const [isOpen, setIsOpen] = useState(autoOpen);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const optionRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n // Kept in sync every render so the mount-only callback ref below can\n // read the latest values without needing them in its dependency array\n // (see `handleOptionsMount`).\n const optionsRef = useRef(options);\n optionsRef.current = options;\n const selectedValuesRef = useRef(selectedValues);\n selectedValuesRef.current = selectedValues;\n\n useEffect(() => {\n if (value !== undefined) {\n const values = Array.isArray(value) ? value : [value];\n\n const validValues = values.filter((v) => v !== '');\n setSelectedValues(new Set(validValues));\n }\n }, [value]);\n\n useEffect(() => {\n setFocusedIndex(-1);\n }, [options]);\n\n useEffect(() => {\n optionRefs.current = optionRefs.current.slice(0, options.length);\n }, [options.length]);\n\n const handleOptionSelect = useCallback(\n (option: SelectOption) => {\n if (option.disabled) return;\n\n const newSelectedValues = new Set(selectedValues);\n\n if (multiple) {\n if (newSelectedValues.has(option.value)) {\n newSelectedValues.delete(option.value);\n } else {\n newSelectedValues.add(option.value);\n }\n } else {\n if (newSelectedValues.has(option.value)) {\n newSelectedValues.clear();\n } else {\n newSelectedValues.clear();\n newSelectedValues.add(option.value);\n }\n }\n\n // In uncontrolled mode, own the state directly.\n // In controlled mode, let the parent drive via value prop + useEffect sync.\n if (!isControlled) {\n setSelectedValues(newSelectedValues);\n }\n\n if (onChange) {\n const newValue = multiple\n ? Array.from(newSelectedValues)\n : Array.from(newSelectedValues)[0] || '';\n onChange(newValue);\n }\n\n if (!multiple) {\n setIsOpen(false);\n // Focus is returned explicitly because a click lands on an option\n // `div`, which is not focusable - without this, choosing with the\n // mouse would leave focus on `<body>` and the field would be\n // unreachable by keyboard until tabbed to again.\n inputRef.current?.focus();\n }\n },\n [multiple, onChange, selectedValues, isControlled],\n );\n\n const handleClear = useCallback(\n (e?: React.MouseEvent) => {\n if (e) {\n e.stopPropagation();\n }\n if (!isControlled) {\n setSelectedValues(new Set());\n }\n\n setIsOpen(false);\n inputRef.current?.focus();\n if (onChange) {\n onChange(multiple ? [] : '');\n }\n },\n [multiple, onChange, isControlled],\n );\n\n // A form control with no accessible name is announced as just \"combobox\".\n // `Select` was the only field in the library that could not be labelled\n // without knowing about `inputProps`, and three call sites duly shipped\n // without one - so the gap is closed from both ends: a first-class `label`\n // prop, and this warning.\n //\n // Measured from the DOM rather than from props, because a caller may name\n // the field with an external `<label for>` - `Pagination`'s page-size\n // picker does exactly that, and a props-only check would cry wolf at it.\n // `HTMLInputElement.labels` covers both wrapping and `for` labels.\n useEffect(() => {\n const element = inputRef.current;\n if (!element) return;\n const named =\n (element.labels?.length ?? 0) > 0 ||\n element.hasAttribute('aria-label') ||\n element.hasAttribute('aria-labelledby');\n if (!named) {\n devWarn(\n 'select-missing-label',\n 'Select: no accessible name. Pass `label` for a visible one, or `inputProps={{ \"aria-label\": \"...\" }}` where it must stay visually unlabelled - otherwise the field is announced as just \"combobox\". A placeholder is not a label, and disappears as soon as something is chosen.',\n );\n }\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(0);\n } else {\n setFocusedIndex((prev) => {\n const nextIndex = prev < options.length - 1 ? prev + 1 : 0;\n\n setTimeout(() => {\n optionRefs.current[nextIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }, 0);\n return nextIndex;\n });\n }\n break;\n\n case 'ArrowUp':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(options.length - 1);\n } else {\n setFocusedIndex((prev) => {\n const nextIndex = prev > 0 ? prev - 1 : options.length - 1;\n\n setTimeout(() => {\n optionRefs.current[nextIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }, 0);\n return nextIndex;\n });\n }\n break;\n\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(0);\n } else if (focusedIndex >= 0 && focusedIndex < options.length) {\n const focusedOption = options[focusedIndex];\n handleOptionSelect(focusedOption);\n }\n break;\n\n case 'Escape':\n e.preventDefault();\n if (isOpen) {\n setIsOpen(false);\n setFocusedIndex(-1);\n }\n break;\n\n case 'Home':\n e.preventDefault();\n if (isOpen) {\n setFocusedIndex(0);\n optionRefs.current[0]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n break;\n\n case 'End':\n e.preventDefault();\n if (isOpen) {\n const lastIndex = options.length - 1;\n setFocusedIndex(lastIndex);\n optionRefs.current[lastIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n break;\n\n default:\n if (isOpen && e.key.length === 1 && /[a-zA-Z0-9]/.test(e.key)) {\n const searchChar = e.key.toLowerCase();\n const foundIndex = options.findIndex(\n (option, index) =>\n index > focusedIndex && option.label.toLowerCase().startsWith(searchChar),\n );\n\n if (foundIndex !== -1) {\n setFocusedIndex(foundIndex);\n optionRefs.current[foundIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n } else {\n const foundFromStart = options.findIndex((option) =>\n option.label.toLowerCase().startsWith(searchChar),\n );\n if (foundFromStart !== -1) {\n setFocusedIndex(foundFromStart);\n optionRefs.current[foundFromStart]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }\n break;\n }\n },\n [disabled, isOpen, options, focusedIndex, handleOptionSelect],\n );\n\n // Scrolls the first selected option into view. Attached as the options\n // list's own ref below with an empty dependency array, so its identity\n // never changes and React only invokes it on genuine DOM mount/unmount -\n // i.e. exactly when the dropdown opens/closes (Dropdown unmounts its\n // `content` entirely while closed), not on every re-render while open.\n const handleOptionsMount = useCallback((el: HTMLDivElement | null) => {\n if (!el) return;\n const idx = optionsRef.current.findIndex((option) =>\n selectedValuesRef.current.has(option.value),\n );\n if (idx === -1) return;\n optionRefs.current[idx]?.scrollIntoView({ block: 'nearest' });\n }, []);\n\n // Past this many selections the full comma-joined label list becomes\n // unreadable in the trigger, so we switch to a compact \"N selected\" label.\n const COMPACT_LABEL_THRESHOLD = 2;\n\n const displayValue = useMemo(() => {\n if (selectedValues.size === 0) return '';\n\n if (multiple && selectedValues.size > COMPACT_LABEL_THRESHOLD) {\n return `${selectedValues.size} selected`;\n }\n\n const selectedOptions = options.filter((option) => selectedValues.has(option.value));\n const text = selectedOptions.map((option) => option.label).join(', ');\n return text;\n }, [options, selectedValues, multiple]);\n\n const selectContent = useMemo(\n () => (\n <div className={'eidos-select-options'} ref={handleOptionsMount}>\n {options.map((option, index) => {\n const isSelected = selectedValues.has(option.value);\n const isFocused = index === focusedIndex;\n return (\n <div\n key={option.id}\n // The trigger points `aria-activedescendant` at\n // `${id}-option-${focusedIndex}`, and nothing carried that id -\n // so the moment an option was hovered or arrowed to, the\n // attribute referenced an element that did not exist\n // (`aria-valid-attr-value`, critical). Invisible to axe until a\n // story left the listbox open, because the attribute is only\n // set once something is focused.\n id={`${id || 'select'}-option-${index}`}\n ref={(el) => {\n optionRefs.current[index] = el;\n }}\n className={`\n\t\t\t\t\t\t\t\t\t\t${'eidos-select-option'}\n\t\t\t\t\t\t\t\t\t\t${isSelected ? 'eidos-select-option--selected' : ''}\n\t\t\t\t\t\t\t\t\t\t${option.disabled ? 'eidos-select-option--disabled' : ''}\n\t\t\t\t\t\t\t\t\t\t${isFocused ? 'eidos-select-option--focused' : ''}\n\t\t\t\t\t\t\t\t\t`.trim()}\n onClick={() => handleOptionSelect(option)}\n onMouseEnter={() => setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n >\n {option.icon && renderIcon(option.icon, 'eidos-select-option-icon')}\n <span className={'eidos-select-option-label'}>{option.label}</span>\n {isSelected && <Check className={'eidos-select-option-check-icon'} />}\n </div>\n );\n })}\n </div>\n ),\n [options, selectedValues, focusedIndex, handleOptionSelect, handleOptionsMount, id],\n );\n\n const triggerElement = (\n <div\n ref={triggerRef}\n className={`eidos-select-trigger ${fullWidth ? fullWidthModifier('eidos-select-trigger') : ''}`}\n onKeyDown={handleKeyDown}\n tabIndex={disabled ? -1 : undefined}\n role=\"combobox\"\n aria-expanded={isOpen}\n aria-haspopup=\"listbox\"\n // Only while the listbox exists. An `aria-controls` pointing at an id\n // that is not in the document is invalid, and the listbox only renders\n // while open - `Combobox`, `TagInput` and `CommandPalette` already gate\n // theirs this way. It could not be gated here before, because `isOpen`\n // did not track whether the panel had actually rendered.\n aria-controls={isOpen ? `${id || 'select'}-options` : undefined}\n aria-activedescendant={\n focusedIndex >= 0 ? `${id || 'select'}-option-${focusedIndex}` : undefined\n }\n >\n <Input\n ref={inputRef}\n value={selectedValues.size > 0 ? displayValue : ''}\n placeholder={selectedValues.size === 0 ? placeholder : ''}\n posIcon={selectedValues.size > 0 && clearable ? X : undefined}\n posIconButton={selectedValues.size > 0 && clearable}\n onPosIconClick={selectedValues.size > 0 && clearable ? handleClear : undefined}\n posIconLabel=\"Clear selection\"\n disabled={disabled}\n readOnly={true}\n isSelect={true}\n label={label}\n name={name}\n id={id}\n required={required}\n fullWidth={fullWidth}\n {...inputProps}\n />\n </div>\n );\n\n return (\n <div\n ref={ref}\n className={`${'eidos-select-container'} ${\n fullWidth ? fullWidthModifier('eidos-select-container') : ''\n } ${className}`}\n >\n <Dropdown\n open={isOpen}\n onOpenChange={setIsOpen}\n trigger={triggerElement}\n content={\n <div id={`${id || 'select'}-options`} role=\"listbox\" aria-multiselectable={multiple}>\n {selectContent}\n </div>\n }\n minWidth={minWidth}\n maxWidth={maxWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n autoWidth={autoWidth}\n fullWidth={fullWidth}\n triggerRef={triggerRef as React.RefObject<HTMLElement | null>}\n {...dropdownProps}\n />\n </div>\n );\n },\n);\n\nSelect.displayName = 'Select';\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,SAAS,UAAU,aAAa,QAAQ,WAAW,eAAe;AACzE,SAAS,GAAG,aAAa;AAyUX,SA0BE,KA1BF;AAnUP,IAAM,SAAS,MAAM;AAAA,EAC1B,CACE;AAAA,IACE,UAAU,CAAC;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,WAAW;AAAA,IACX;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,IACX,aAAa,CAAC;AAAA,IACd;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA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wBAAwB,IAAI,EAC5D,IAAI,SAAS;AAAA,QAEb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAc;AAAA,YACd,SAAS;AAAA,YACT,SACE,oBAAC,SAAI,IAAI,GAAG,MAAM,QAAQ,YAAY,MAAK,WAAU,wBAAsB,UACxE,yBACH;AAAA,YAEF;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACC,GAAG;AAAA;AAAA,QACN;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/eidos-ui/eidos-ui/dist/chunk-B2OHBIAL.cjs","../src/components/Select/Select.component.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACZA,4EAAyE;AACzE,2CAAyB;AAyUX,+CAAA;AAnUP,IAAM,OAAA,EAAS,eAAA,CAAM,UAAA;AAAA,EAC1B,CACE;AAAA,IACE,QAAA,EAAU,CAAC,CAAA;AAAA,IACX,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA,EAAY,EAAA;AAAA,IACZ,SAAA,EAAW,KAAA;AAAA,IACX,KAAA;AAAA,IACA,YAAA,EAAc,qBAAA;AAAA,IACd,SAAA,EAAW,KAAA;AAAA,IACX,WAAA,EAAa,CAAC,CAAA;AAAA,IACd,IAAA;AAAA,IACA,EAAA;AAAA,IACA,SAAA,EAAW,KAAA;AAAA,IACX,UAAA,EAAY,KAAA;AAAA,IACZ,QAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA,EAAY,OAAA;AAAA,IACZ,UAAA,EAAY,IAAA;AAAA,IACZ,UAAA,EAAY,IAAA;AAAA,IACZ,SAAA,EAAW,KAAA;AAAA,IACX,cAAA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ACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACI,YAAA;AAAA,UAAA;AACN,QAAA;AAAA,MAAA;AACF,IAAA;AAIA,IAAA;AAAC,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AAIA,QAAA;AAAC,UAAA;AAAA,UAAA;AACC,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AAKA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACI,YAAA;AAAA,UAAA;AACN,QAAA;AAAA,MAAA;AACF,IAAA;AAEJ,EAAA;AACF;AAEO;ADpFS;AACA;AACA;AACA","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-B2OHBIAL.cjs","sourcesContent":[null,"import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react';\nimport { X, Check } from 'lucide-react';\nimport { Input } from '../Input/Input.component';\nimport { Dropdown } from '../Dropdown/Dropdown.component';\nimport type { SelectProps, SelectOption } from './Select.types';\nimport { renderIcon, fullWidthModifier, devWarn } from '../../utils';\n\nexport const Select = React.forwardRef<HTMLDivElement, SelectProps>(\n (\n {\n options = [],\n value,\n defaultValue,\n onChange,\n className = '',\n multiple = false,\n label,\n placeholder = 'Select an option...',\n disabled = false,\n inputProps = {},\n name,\n id,\n required = false,\n fullWidth = false,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight = '300px',\n autoWidth = true,\n clearable = true,\n autoOpen = false,\n dropdownProps = {},\n },\n ref,\n ) => {\n const isControlled = value !== undefined;\n\n // Lazy initializer: seed from defaultValue in uncontrolled mode.\n const [selectedValues, setSelectedValues] = useState<Set<string>>(() => {\n if (defaultValue !== undefined) {\n const vals = Array.isArray(defaultValue) ? defaultValue : [defaultValue];\n return new Set(vals.filter((v) => v !== ''));\n }\n return new Set();\n });\n\n const [focusedIndex, setFocusedIndex] = useState(-1);\n // `Select` owns the open state and hands it to `Dropdown` as a controlled\n // value. It used to keep this flag *and* force the dropdown closed by\n // remounting it through a changing `key`, because `Dropdown`'s own state was\n // private - which meant this flag drove the ARIA attributes while reaching\n // nothing that renders, so the keyboard could not open the listbox at all.\n const [isOpen, setIsOpen] = useState(autoOpen);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const optionRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n // Kept in sync every render so the mount-only callback ref below can\n // read the latest values without needing them in its dependency array\n // (see `handleOptionsMount`).\n const optionsRef = useRef(options);\n optionsRef.current = options;\n const selectedValuesRef = useRef(selectedValues);\n selectedValuesRef.current = selectedValues;\n\n useEffect(() => {\n if (value !== undefined) {\n const values = Array.isArray(value) ? value : [value];\n\n const validValues = values.filter((v) => v !== '');\n setSelectedValues(new Set(validValues));\n }\n }, [value]);\n\n useEffect(() => {\n setFocusedIndex(-1);\n }, [options]);\n\n useEffect(() => {\n optionRefs.current = optionRefs.current.slice(0, options.length);\n }, [options.length]);\n\n const handleOptionSelect = useCallback(\n (option: SelectOption) => {\n if (option.disabled) return;\n\n const newSelectedValues = new Set(selectedValues);\n\n if (multiple) {\n if (newSelectedValues.has(option.value)) {\n newSelectedValues.delete(option.value);\n } else {\n newSelectedValues.add(option.value);\n }\n } else {\n if (newSelectedValues.has(option.value)) {\n newSelectedValues.clear();\n } else {\n newSelectedValues.clear();\n newSelectedValues.add(option.value);\n }\n }\n\n // In uncontrolled mode, own the state directly.\n // In controlled mode, let the parent drive via value prop + useEffect sync.\n if (!isControlled) {\n setSelectedValues(newSelectedValues);\n }\n\n if (onChange) {\n const newValue = multiple\n ? Array.from(newSelectedValues)\n : Array.from(newSelectedValues)[0] || '';\n onChange(newValue);\n }\n\n if (!multiple) {\n setIsOpen(false);\n // Focus is returned explicitly because a click lands on an option\n // `div`, which is not focusable - without this, choosing with the\n // mouse would leave focus on `<body>` and the field would be\n // unreachable by keyboard until tabbed to again.\n inputRef.current?.focus();\n }\n },\n [multiple, onChange, selectedValues, isControlled],\n );\n\n const handleClear = useCallback(\n (e?: React.MouseEvent) => {\n if (e) {\n e.stopPropagation();\n }\n if (!isControlled) {\n setSelectedValues(new Set());\n }\n\n setIsOpen(false);\n inputRef.current?.focus();\n if (onChange) {\n onChange(multiple ? [] : '');\n }\n },\n [multiple, onChange, isControlled],\n );\n\n // A form control with no accessible name is announced as just \"combobox\".\n // `Select` was the only field in the library that could not be labelled\n // without knowing about `inputProps`, and three call sites duly shipped\n // without one - so the gap is closed from both ends: a first-class `label`\n // prop, and this warning.\n //\n // Measured from the DOM rather than from props, because a caller may name\n // the field with an external `<label for>` - `Pagination`'s page-size\n // picker does exactly that, and a props-only check would cry wolf at it.\n // `HTMLInputElement.labels` covers both wrapping and `for` labels.\n useEffect(() => {\n const element = inputRef.current;\n if (!element) return;\n const named =\n (element.labels?.length ?? 0) > 0 ||\n element.hasAttribute('aria-label') ||\n element.hasAttribute('aria-labelledby');\n if (!named) {\n devWarn(\n 'select-missing-label',\n 'Select: no accessible name. Pass `label` for a visible one, or `inputProps={{ \"aria-label\": \"...\" }}` where it must stay visually unlabelled - otherwise the field is announced as just \"combobox\". A placeholder is not a label, and disappears as soon as something is chosen.',\n );\n }\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(0);\n } else {\n setFocusedIndex((prev) => {\n const nextIndex = prev < options.length - 1 ? prev + 1 : 0;\n\n setTimeout(() => {\n optionRefs.current[nextIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }, 0);\n return nextIndex;\n });\n }\n break;\n\n case 'ArrowUp':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(options.length - 1);\n } else {\n setFocusedIndex((prev) => {\n const nextIndex = prev > 0 ? prev - 1 : options.length - 1;\n\n setTimeout(() => {\n optionRefs.current[nextIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }, 0);\n return nextIndex;\n });\n }\n break;\n\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n setFocusedIndex(0);\n } else if (focusedIndex >= 0 && focusedIndex < options.length) {\n const focusedOption = options[focusedIndex];\n handleOptionSelect(focusedOption);\n }\n break;\n\n case 'Escape':\n e.preventDefault();\n if (isOpen) {\n setIsOpen(false);\n setFocusedIndex(-1);\n }\n break;\n\n case 'Home':\n e.preventDefault();\n if (isOpen) {\n setFocusedIndex(0);\n optionRefs.current[0]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n break;\n\n case 'End':\n e.preventDefault();\n if (isOpen) {\n const lastIndex = options.length - 1;\n setFocusedIndex(lastIndex);\n optionRefs.current[lastIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n break;\n\n default:\n if (isOpen && e.key.length === 1 && /[a-zA-Z0-9]/.test(e.key)) {\n const searchChar = e.key.toLowerCase();\n const foundIndex = options.findIndex(\n (option, index) =>\n index > focusedIndex && option.label.toLowerCase().startsWith(searchChar),\n );\n\n if (foundIndex !== -1) {\n setFocusedIndex(foundIndex);\n optionRefs.current[foundIndex]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n } else {\n const foundFromStart = options.findIndex((option) =>\n option.label.toLowerCase().startsWith(searchChar),\n );\n if (foundFromStart !== -1) {\n setFocusedIndex(foundFromStart);\n optionRefs.current[foundFromStart]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }\n break;\n }\n },\n [disabled, isOpen, options, focusedIndex, handleOptionSelect],\n );\n\n // Scrolls the first selected option into view. Attached as the options\n // list's own ref below with an empty dependency array, so its identity\n // never changes and React only invokes it on genuine DOM mount/unmount -\n // i.e. exactly when the dropdown opens/closes (Dropdown unmounts its\n // `content` entirely while closed), not on every re-render while open.\n const handleOptionsMount = useCallback((el: HTMLDivElement | null) => {\n if (!el) return;\n const idx = optionsRef.current.findIndex((option) =>\n selectedValuesRef.current.has(option.value),\n );\n if (idx === -1) return;\n optionRefs.current[idx]?.scrollIntoView({ block: 'nearest' });\n }, []);\n\n // Past this many selections the full comma-joined label list becomes\n // unreadable in the trigger, so we switch to a compact \"N selected\" label.\n const COMPACT_LABEL_THRESHOLD = 2;\n\n const displayValue = useMemo(() => {\n if (selectedValues.size === 0) return '';\n\n if (multiple && selectedValues.size > COMPACT_LABEL_THRESHOLD) {\n return `${selectedValues.size} selected`;\n }\n\n const selectedOptions = options.filter((option) => selectedValues.has(option.value));\n const text = selectedOptions.map((option) => option.label).join(', ');\n return text;\n }, [options, selectedValues, multiple]);\n\n const selectContent = useMemo(\n () => (\n <div className={'eidos-select-options'} ref={handleOptionsMount}>\n {options.map((option, index) => {\n const isSelected = selectedValues.has(option.value);\n const isFocused = index === focusedIndex;\n return (\n <div\n key={option.id}\n // The trigger points `aria-activedescendant` at\n // `${id}-option-${focusedIndex}`, and nothing carried that id -\n // so the moment an option was hovered or arrowed to, the\n // attribute referenced an element that did not exist\n // (`aria-valid-attr-value`, critical). Invisible to axe until a\n // story left the listbox open, because the attribute is only\n // set once something is focused.\n id={`${id || 'select'}-option-${index}`}\n ref={(el) => {\n optionRefs.current[index] = el;\n }}\n className={`\n\t\t\t\t\t\t\t\t\t\t${'eidos-select-option'}\n\t\t\t\t\t\t\t\t\t\t${isSelected ? 'eidos-select-option--selected' : ''}\n\t\t\t\t\t\t\t\t\t\t${option.disabled ? 'eidos-select-option--disabled' : ''}\n\t\t\t\t\t\t\t\t\t\t${isFocused ? 'eidos-select-option--focused' : ''}\n\t\t\t\t\t\t\t\t\t`.trim()}\n onClick={() => handleOptionSelect(option)}\n onMouseEnter={() => setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n >\n {option.icon && renderIcon(option.icon, 'eidos-select-option-icon')}\n <span className={'eidos-select-option-label'}>{option.label}</span>\n {isSelected && <Check className={'eidos-select-option-check-icon'} />}\n </div>\n );\n })}\n </div>\n ),\n [options, selectedValues, focusedIndex, handleOptionSelect, handleOptionsMount, id],\n );\n\n const triggerElement = (\n <div\n ref={triggerRef}\n className={`eidos-select-trigger ${fullWidth ? fullWidthModifier('eidos-select-trigger') : ''}`}\n onKeyDown={handleKeyDown}\n tabIndex={disabled ? -1 : undefined}\n role=\"combobox\"\n aria-expanded={isOpen}\n aria-haspopup=\"listbox\"\n // Only while the listbox exists. An `aria-controls` pointing at an id\n // that is not in the document is invalid, and the listbox only renders\n // while open - `Combobox`, `TagInput` and `CommandPalette` already gate\n // theirs this way. It could not be gated here before, because `isOpen`\n // did not track whether the panel had actually rendered.\n aria-controls={isOpen ? `${id || 'select'}-options` : undefined}\n aria-activedescendant={\n focusedIndex >= 0 ? `${id || 'select'}-option-${focusedIndex}` : undefined\n }\n >\n <Input\n ref={inputRef}\n value={selectedValues.size > 0 ? displayValue : ''}\n placeholder={selectedValues.size === 0 ? placeholder : ''}\n posIcon={selectedValues.size > 0 && clearable ? X : undefined}\n posIconButton={selectedValues.size > 0 && clearable}\n onPosIconClick={selectedValues.size > 0 && clearable ? handleClear : undefined}\n posIconLabel=\"Clear selection\"\n disabled={disabled}\n readOnly={true}\n isSelect={true}\n label={label}\n name={name}\n id={id}\n required={required}\n fullWidth={fullWidth}\n {...inputProps}\n />\n </div>\n );\n\n return (\n <div\n ref={ref}\n className={`${'eidos-select-container'} ${\n fullWidth ? fullWidthModifier('eidos-select-container') : ''\n } ${className}`}\n >\n <Dropdown\n open={isOpen}\n onOpenChange={setIsOpen}\n trigger={triggerElement}\n content={\n <div id={`${id || 'select'}-options`} role=\"listbox\" aria-multiselectable={multiple}>\n {selectContent}\n </div>\n }\n minWidth={minWidth}\n maxWidth={maxWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n autoWidth={autoWidth}\n fullWidth={fullWidth}\n triggerRef={triggerRef as React.RefObject<HTMLElement | null>}\n {...dropdownProps}\n />\n </div>\n );\n },\n);\n\nSelect.displayName = 'Select';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/NumberInput/NumberInput.component.tsx"],"sourcesContent":["import React, { forwardRef, useState, useEffect, useId } from 'react';\nimport { Minus, Plus } from 'lucide-react';\nimport { fullWidthModifier } from '../../utils';\nimport type { NumberInputProps } from './NumberInput.types';\n\nexport const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n value,\n defaultValue = 0,\n onChange,\n min,\n max,\n step = 1,\n precision = 0,\n placeholder,\n disabled = false,\n readOnly = false,\n label,\n helperText,\n error = false,\n errorMessage,\n size = 'md',\n fullWidth = false,\n allowTyping = true,\n className = '',\n id,\n name,\n },\n ref,\n ) => {\n const generatedId = useId();\n const inputId = id || `number-input-${generatedId}`;\n // Associates the visible error with the control. Without it the message\n // is just a red line of text sitting near the field - obvious to look\n // at, absent from the accessibility tree (SC 3.3.1). See the fuller\n // note in `Input`.\n const errorId = `${inputId}-error`;\n\n // Controlled / uncontrolled bridge\n const isControlled = value !== undefined;\n const [localValue, setLocalValue] = useState<number>(defaultValue);\n\n // Intermediate text while the user is actively typing\n const [inputText, setInputText] = useState<string>(defaultValue.toFixed(precision));\n const [isFocused, setIsFocused] = useState(false);\n\n const currentValue = isControlled ? value! : localValue;\n\n // When min/max props change (e.g. via Storybook controls), clamp the\n // uncontrolled localValue so the display never shows an out-of-range value.\n useEffect(() => {\n if (isControlled) return;\n setLocalValue((prev) => {\n let result = prev;\n if (min !== undefined) result = Math.max(min, result);\n if (max !== undefined) result = Math.min(max, result);\n return parseFloat(result.toFixed(precision));\n });\n }, [min, max, precision, isControlled]);\n\n // Clamp to [min, max] and apply precision rounding\n const clampValue = (raw: number): number => {\n let result = raw;\n if (min !== undefined) result = Math.max(min, result);\n if (max !== undefined) result = Math.min(max, result);\n return parseFloat(result.toFixed(precision));\n };\n\n const commitValue = (newVal: number) => {\n const clamped = clampValue(newVal);\n if (!isControlled) setLocalValue(clamped);\n onChange?.(clamped);\n };\n\n // ── Stepper buttons ────────────────────────────────────────────────────\n const handleDecrement = () => {\n if (disabled || readOnly) return;\n commitValue(currentValue - step);\n };\n\n const handleIncrement = () => {\n if (disabled || readOnly) return;\n commitValue(currentValue + step);\n };\n\n // ── Typing mode handlers ───────────────────────────────────────────────\n const handleTextFocus = () => {\n setInputText(currentValue.toFixed(precision));\n setIsFocused(true);\n };\n\n const handleTextChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputText(e.target.value);\n };\n\n const handleTextBlur = () => {\n setIsFocused(false);\n const parsed = parseFloat(inputText);\n if (!isNaN(parsed)) {\n const clamped = clampValue(parsed);\n if (!isControlled) setLocalValue(clamped);\n onChange?.(clamped);\n setInputText(clamped.toFixed(precision));\n } else {\n // Revert to the last known-good value\n setInputText(currentValue.toFixed(precision));\n }\n };\n\n // ArrowUp / ArrowDown keyboard support for both display modes\n const handleDisplayKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n handleIncrement();\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n handleDecrement();\n }\n };\n\n // ── Display value ──────────────────────────────────────────────────────\n // Show intermediate inputText while focused in typing mode;\n // otherwise always derive from the real (controlled/uncontrolled) value.\n const formattedValue = currentValue.toFixed(precision);\n const displayedText = allowTyping && isFocused ? inputText : formattedValue;\n\n // ── Disabled states for buttons ────────────────────────────────────────\n const isDecrementDisabled = disabled || readOnly || (min !== undefined && currentValue <= min);\n const isIncrementDisabled = disabled || readOnly || (max !== undefined && currentValue >= max);\n\n // ── CSS classes ────────────────────────────────────────────────────────\n const rootClasses = [\n 'eidos-number-input',\n `eidos-number-input--${size}`,\n fullWidth && fullWidthModifier('eidos-number-input'),\n error && 'eidos-number-input--error',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const controlClasses = [\n 'eidos-number-input-control',\n disabled && 'eidos-number-input-control--disabled',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClasses}>\n {label && (\n <label htmlFor={allowTyping ? inputId : undefined} className=\"eidos-number-input-label\">\n {label}\n </label>\n )}\n\n <div\n className={controlClasses}\n role={allowTyping ? undefined : 'spinbutton'}\n aria-valuemin={allowTyping ? undefined : min}\n aria-valuemax={allowTyping ? undefined : max}\n aria-valuenow={allowTyping ? undefined : currentValue}\n aria-label={allowTyping ? undefined : (label ?? 'Number input')}\n aria-disabled={disabled || undefined}\n tabIndex={!allowTyping && !disabled ? 0 : undefined}\n onKeyDown={!allowTyping ? handleDisplayKeyDown : undefined}\n >\n <button\n type=\"button\"\n className=\"eidos-number-input-btn\"\n onClick={handleDecrement}\n disabled={isDecrementDisabled}\n aria-label=\"Decrease\"\n >\n <Minus />\n </button>\n\n <div className=\"eidos-number-input-divider\" aria-hidden=\"true\" />\n\n {allowTyping ? (\n <input\n id={inputId}\n type=\"text\"\n className=\"eidos-number-input-display\"\n value={displayedText}\n onChange={handleTextChange}\n onFocus={handleTextFocus}\n onBlur={handleTextBlur}\n onKeyDown={handleDisplayKeyDown}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n inputMode=\"decimal\"\n role=\"spinbutton\"\n aria-invalid={error ? true : undefined}\n aria-describedby={error && errorMessage ? errorId : undefined}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={currentValue}\n aria-label={label ?? 'Number input'}\n />\n ) : (\n <span className=\"eidos-number-input-display\" aria-hidden=\"true\">\n {placeholder && formattedValue === (0).toFixed(precision) && !isFocused\n ? placeholder\n : formattedValue}\n </span>\n )}\n\n <div className=\"eidos-number-input-divider\" aria-hidden=\"true\" />\n\n <button\n type=\"button\"\n className=\"eidos-number-input-btn\"\n onClick={handleIncrement}\n disabled={isIncrementDisabled}\n aria-label=\"Increase\"\n >\n <Plus />\n </button>\n </div>\n\n {/* Hidden native <input type=\"number\"> for form integration */}\n <input\n ref={ref}\n type=\"number\"\n name={name}\n value={currentValue}\n onChange={() => {}}\n className=\"eidos-number-input-hidden\"\n tabIndex={-1}\n aria-hidden=\"true\"\n disabled={disabled}\n readOnly={readOnly}\n min={min}\n max={max}\n step={step}\n />\n\n {helperText && !error && <span className=\"eidos-number-input-helper\">{helperText}</span>}\n\n {error && errorMessage && (\n <span id={errorId} className=\"eidos-number-input-error\" role=\"alert\">\n {errorMessage}\n </span>\n )}\n </div>\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\n"],"mappings":";;;;;AAAA,SAAgB,YAAY,UAAU,WAAW,aAAa;AAC9D,SAAS,OAAO,YAAY;AAuJlB,cAKF,YALE;AAnJH,IAAM,cAAc;AAAA,EACzB,CACE;AAAA,IACE;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,YAAY;AAAA,IACZ;AAAA,IACA,WAAW;AAAA,IACX,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,EACF,GACA,QACG;AACH,UAAM,cAAc,MAAM;AAC1B,UAAM,UAAU,MAAM,gBAAgB,WAAW;AAKjD,UAAM,UAAU,GAAG,OAAO;AAG1B,UAAM,eAAe,UAAU;AAC/B,UAAM,CAAC,YAAY,aAAa,IAAI,SAAiB,YAAY;AAGjE,UAAM,CAAC,WAAW,YAAY,IAAI,SAAiB,aAAa,QAAQ,SAAS,CAAC;AAClF,UAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,UAAM,eAAe,eAAe,QAAS;AAI7C,cAAU,MAAM;AACd,UAAI,aAAc;AAClB,oBAAc,CAAC,SAAS;AACtB,YAAI,SAAS;AACb,YAAI,QAAQ,OAAW,UAAS,KAAK,IAAI,KAAK,MAAM;AACpD,YAAI,QAAQ,OAAW,UAAS,KAAK,IAAI,KAAK,MAAM;AACpD,e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AA;AACA,IAAA;AACA,IAAA;AACQ,EAAA;AAE2B,EAAA;AACrC,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACF,EAAA;AAGE,EAAA;AAOI,oBAAA;AACG,MAAA;AACE,QAAA;AAAA,QAAA;AACM,UAAA;AACM,UAAA;AACF,UAAA;AAQI,UAAA;AACH,UAAA;AACV,UAAA;AAEA,UAAA;AAAuD,QAAA;AACzD,MAAA;AAGF,sBAAA;AACG,QAAA;AACY,QAAA;AAGf,MAAA;AAEC,MAAA;AACE,QAAA;AAAA,QAAA;AACM,UAAA;AACM,UAAA;AACF,UAAA;AACI,UAAA;AACH,UAAA;AACV,UAAA;AAEA,UAAA;AAAwD,QAAA;AAC1D,MAAA;AAEJ,IAAA;AAEA,oBAAA;AAEJ,EAAA;AAEJ;AAEmB;ADhHI;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/eidos-ui/eidos-ui/dist/chunk-CFVUUMQA.cjs","sourcesContent":[null,"import React, { useState, useRef, useContext, useEffect, useLayoutEffect } from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { renderIcon, dualModifier, fullWidthModifier } from '../../utils';\nimport type { TabsProps, TabProps, TabPanelProps, TabsContextValue } from './Tabs.types';\n\n// ============================================================================\n// CONTEXT\n// ============================================================================\n\nconst TabsContext = React.createContext<TabsContextValue | null>(null);\n\nconst useTabsContext = (): TabsContextValue => {\n const ctx = useContext(TabsContext);\n if (!ctx) throw new Error('Tab/TabPanel must be used inside <Tabs>');\n return ctx;\n};\n\n// ============================================================================\n// TAB - individual tab trigger button\n// Defined before Tabs so Tabs can use `child.type === Tab` for child separation.\n// ============================================================================\n\nexport const Tab: React.FC<TabProps> = ({\n value,\n children,\n disabled = false,\n icon,\n className = '',\n}) => {\n const { activeValue, onSelect, size, fullWidth, listRef } = useTabsContext();\n const isActive = activeValue === value;\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n const list = listRef.current;\n if (!list) return;\n\n const allTabs = Array.from(\n list.querySelectorAll('[role=\"tab\"]:not([disabled])'),\n ) as HTMLElement[];\n const currentIndex = allTabs.indexOf(e.currentTarget);\n if (currentIndex === -1) return;\n\n let targetIndex = -1;\n if (e.key === 'ArrowRight') targetIndex = (currentIndex + 1) % allTabs.length;\n else if (e.key === 'ArrowLeft')\n targetIndex = (currentIndex - 1 + allTabs.length) % allTabs.length;\n else if (e.key === 'Home') targetIndex = 0;\n else if (e.key === 'End') targetIndex = allTabs.length - 1;\n\n if (targetIndex !== -1) {\n e.preventDefault();\n allTabs[targetIndex].focus();\n }\n };\n\n const tabClasses = [\n 'eidos-tab',\n `eidos-tab--${size}`,\n isActive && 'eidos-tab--active',\n disabled && 'eidos-tab--disabled',\n fullWidth && fullWidthModifier('eidos-tab'),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n id={`eidos-tab-${value}`}\n role=\"tab\"\n aria-selected={isActive}\n aria-controls={`eidos-tabpanel-${value}`}\n tabIndex={isActive ? 0 : -1}\n disabled={disabled}\n className={tabClasses}\n onClick={() => !disabled && onSelect(value)}\n onKeyDown={handleKeyDown}\n type=\"button\"\n >\n {icon && <span className=\"eidos-tab-icon\">{renderIcon(icon, 'eidos-tab-icon-svg')}</span>}\n <span className=\"eidos-tab-label\">{children}</span>\n </button>\n );\n};\n\nTab.displayName = 'Tab';\n\n// ============================================================================\n// TAB PANEL - content region shown when its value matches the active tab\n// Defined before Tabs for the same `child.type === TabPanel` check.\n// ============================================================================\n\nexport const TabPanel: React.FC<TabPanelProps> = ({ value, children, className = '' }) => {\n const { activeValue } = useTabsContext();\n const isActive = activeValue === value;\n\n if (!isActive) return null;\n\n return (\n <div\n id={`eidos-tabpanel-${value}`}\n role=\"tabpanel\"\n aria-labelledby={`eidos-tab-${value}`}\n tabIndex={0}\n className={['eidos-tab-panel', className].filter(Boolean).join(' ')}\n >\n {children}\n </div>\n );\n};\n\nTabPanel.displayName = 'TabPanel';\n\n// ============================================================================\n// TABS - root container; provides context, separates tab/panel children\n// ============================================================================\n\nexport const Tabs: React.FC<TabsProps> = ({\n value,\n defaultValue,\n onChange,\n variant = 'line',\n size = 'md',\n color = 'primary',\n fullWidth = false,\n scrollButtons = 'auto',\n className = '',\n children,\n}) => {\n const isControlled = value !== undefined;\n const [localValue, setLocalValue] = useState(defaultValue ?? '');\n const activeValue = isControlled ? value! : localValue;\n\n // Separate Tab and TabPanel children so the list and panels render in\n // distinct DOM regions, regardless of how the consumer orders them.\n const tabChildren: React.ReactElement[] = [];\n const panelChildren: React.ReactElement[] = [];\n\n React.Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) return;\n if (child.type === Tab) {\n tabChildren.push(child);\n } else if (child.type === TabPanel) {\n panelChildren.push(child);\n }\n });\n\n const listRef = useRef<HTMLDivElement>(null);\n const indicatorRef = useRef<HTMLSpanElement>(null);\n // Tracks whether the indicator has been positioned at least once so we can\n // skip the CSS transition on the very first render and avoid it animating\n // from the top-left corner to the initial tab.\n const hasPositioned = useRef(false);\n\n useLayoutEffect(() => {\n if (variant !== 'line') return;\n const list = listRef.current;\n const indicator = indicatorRef.current;\n if (!list || !indicator) return;\n\n const activeTab = list.querySelector('[aria-selected=\"true\"]') as HTMLElement | null;\n if (!activeTab) return;\n\n // Suppress the CSS transition on the initial paint so the indicator snaps\n // into place rather than sliding from 0.\n if (!hasPositioned.current) {\n indicator.style.transition = 'none';\n }\n\n indicator.style.left = `${activeTab.offsetLeft}px`;\n indicator.style.width = `${activeTab.offsetWidth}px`;\n\n if (!hasPositioned.current) {\n // Force a synchronous reflow so the browser commits the no-transition\n // position before we re-enable the transition for future clicks.\n void indicator.offsetWidth;\n indicator.style.transition = '';\n hasPositioned.current = true;\n }\n }, [activeValue, variant, fullWidth]);\n\n // The list scrolls horizontally when the strip is wider than its container,\n // so an activated tab can sit outside the scrollport - reachable by keyboard\n // (`End`) or by a controlled `value` change, but invisible. `scrollLeft` is\n // adjusted directly rather than via `scrollIntoView`, which walks the whole\n // ancestor chain and would scroll the page vertically when the strip is below\n // the fold.\n useLayoutEffect(() => {\n const list = listRef.current;\n if (!list) return;\n\n const activeTab = list.querySelector('[aria-selected=\"true\"]') as HTMLElement | null;\n if (!activeTab) return;\n\n const left = activeTab.offsetLeft;\n const right = left + activeTab.offsetWidth;\n\n if (left < list.scrollLeft) {\n list.scrollLeft = left;\n } else if (right > list.scrollLeft + list.clientWidth) {\n list.scrollLeft = right - list.clientWidth;\n }\n }, [activeValue]);\n\n // Whether either end of the strip has content hidden past it. Drives both\n // the presence of the scroll buttons (neither end scrollable = the strip\n // fits, so no buttons) and their disabled state at the extremes.\n const [scrollState, setScrollState] = useState({ canScrollPrev: false, canScrollNext: false });\n const hasScrollButtons = scrollButtons !== 'none';\n\n useEffect(() => {\n if (!hasScrollButtons) return;\n const list = listRef.current;\n if (!list) return;\n\n const update = () => {\n const maxScroll = list.scrollWidth - list.clientWidth;\n // 1px of tolerance: fractional layout widths leave a sub-pixel remainder\n // at either end that would otherwise keep a button enabled for a scroll\n // that can no longer move anything.\n const canScrollPrev = list.scrollLeft > 1;\n const canScrollNext = list.scrollLeft < maxScroll - 1;\n setScrollState((previous) =>\n previous.canScrollPrev === canScrollPrev && previous.canScrollNext === canScrollNext\n ? previous\n : { canScrollPrev, canScrollNext },\n );\n };\n\n update();\n list.addEventListener('scroll', update, { passive: true });\n\n // The list's own box stays the same width when a tab's label reflows or a\n // font finishes loading, so the tabs have to be observed as well as the\n // container - only their sizes tell us the strip started overflowing.\n const observer = new ResizeObserver(update);\n observer.observe(list);\n Array.from(list.children).forEach((child) => observer.observe(child));\n\n return () => {\n list.removeEventListener('scroll', update);\n observer.disconnect();\n };\n }, [hasScrollButtons, tabChildren.length, size, variant, fullWidth]);\n\n const scrollByStep = (direction: -1 | 1) => {\n const list = listRef.current;\n if (!list) return;\n\n // A step just short of a full page keeps a tab of context on screen, the\n // same way a paged scrollbar click does.\n const step = list.clientWidth * 0.8;\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n list.scrollBy({ left: direction * step, behavior: reducedMotion ? 'auto' : 'smooth' });\n };\n\n const onSelect = (newValue: string) => {\n if (!isControlled) {\n setLocalValue(newValue);\n }\n onChange?.(newValue);\n };\n\n const rootClasses = ['eidos-tabs', `eidos-tabs--${variant}`, `eidos-tabs--${color}`, className]\n .filter(Boolean)\n .join(' ');\n\n const listClasses = [\n 'eidos-tabs-list',\n `eidos-tabs-list--${size}`,\n fullWidth && fullWidthModifier('eidos-tabs-list'),\n // With buttons, they are the affordance - a native scrollbar underneath\n // them is redundant, and on a space-taking one it would also sit over the\n // `line` variant's rule.\n hasScrollButtons && dualModifier('eidos-tabs-list', 'hide-scrollbar', 'hideScrollbar'),\n ]\n .filter(Boolean)\n .join(' ');\n\n // Each button exists only while its own direction has somewhere to go: none\n // at all when the strip fits, and none at the end you have reached. A\n // disabled button would be pointing at nothing. They are positioned\n // absolutely, so appearing and disappearing never moves the tabs.\n const showPrevButton = hasScrollButtons && scrollState.canScrollPrev;\n const showNextButton = hasScrollButtons && scrollState.canScrollNext;\n\n const scrollButtonClasses = (direction: 'prev' | 'next') =>\n [\n 'eidos-tabs-scroll-button',\n `eidos-tabs-scroll-button--${direction}`,\n `eidos-tabs-scroll-button--${size}`,\n ].join(' ');\n\n const contextValue: TabsContextValue = {\n activeValue,\n onSelect,\n variant,\n size,\n color,\n fullWidth,\n listRef,\n };\n\n return (\n <TabsContext.Provider value={contextValue}>\n <div className={rootClasses}>\n {/* The buttons are siblings of the tab list, never children of it:\n `role=\"tablist\"` only accepts tabs. They are also hidden from\n assistive tech and skipped by Tab, because they are a pointer\n affordance for something the keyboard already does - arrow keys\n move between tabs and scroll the active one into view. */}\n <div className=\"eidos-tabs-bar\">\n {showPrevButton && (\n <button\n type=\"button\"\n className={scrollButtonClasses('prev')}\n onClick={() => scrollByStep(-1)}\n // `tabIndex={-1}` keeps these out of the tab order but does not\n // stop a click from focusing them, and focus inside an\n // `aria-hidden` subtree is an error the browser reports\n // (\"Blocked aria-hidden on an element because its descendant\n // retained focus\"). Suppressing the default mousedown keeps\n // them unfocusable by pointer too; the click still fires.\n // `inert` would prevent the click as well, so it is no help.\n onMouseDown={(event) => event.preventDefault()}\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <ChevronLeft className=\"eidos-tabs-scroll-button-icon\" />\n </button>\n )}\n\n <div ref={listRef} className={listClasses} role=\"tablist\">\n {tabChildren}\n {variant === 'line' && (\n <span ref={indicatorRef} className=\"eidos-tabs-indicator\" aria-hidden=\"true\" />\n )}\n </div>\n\n {showNextButton && (\n <button\n type=\"button\"\n className={scrollButtonClasses('next')}\n onClick={() => scrollByStep(1)}\n onMouseDown={(event) => event.preventDefault()} // see the prev button\n tabIndex={-1}\n aria-hidden=\"true\"\n >\n <ChevronRight className=\"eidos-tabs-scroll-button-icon\" />\n </button>\n )}\n </div>\n\n <div className=\"eidos-tabs-panels\">{panelChildren}</div>\n </div>\n </TabsContext.Provider>\n );\n};\n\nTabs.displayName = 'Tabs';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Combobox/Combobox.component.tsx"],"sourcesContent":["import React, { useState, useCallback, useRef, useEffect, useMemo, useId } from 'react';\nimport { Check, ChevronDown, X, Loader2, CircleAlert } from 'lucide-react';\nimport { Input } from '../Input/Input.component';\nimport { Dropdown } from '../Dropdown/Dropdown.component';\nimport { fullWidthModifier } from '../../utils';\nimport type { ComboboxProps, ComboboxOption } from './Combobox.types';\nimport './Combobox.scss';\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\ntype OptionEntry =\n | { type: 'group'; group: string; key: string }\n | { type: 'option'; option: ComboboxOption; index: number; key: string };\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Combobox: React.FC<ComboboxProps> = ({\n options = [],\n value,\n defaultValue,\n onChange,\n onSearch,\n placeholder = 'Search or select…',\n loading = false,\n loadingText = 'Searching…',\n emptyText = 'No results found',\n allowFreeText = false,\n clearable = true,\n disabled = false,\n size = 'md',\n label,\n error,\n hint,\n fullWidth = false,\n className = '',\n maxHeight = '300px',\n renderOption,\n}) => {\n const uid = useId();\n\n // ─── Refs ─────────────────────────────────────────────────────────────────\n\n /** Entire combobox wrapper - used for click-outside detection */\n const containerRef = useRef<HTMLDivElement>(null);\n\n /** The trigger wrapper div - passed to Dropdown as externalTriggerRef for width */\n const comboboxTriggerRef = useRef<HTMLDivElement>(null);\n\n /** The 0-height span that IS the Dropdown trigger element - programmatically clicked to open */\n\n /** Native input element */\n const inputRef = useRef<HTMLInputElement>(null);\n\n /** Focusable option divs for scroll-into-view */\n const optionRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n /**\n * Synchronous open-state flag.\n * React state updates are async; reading this ref inside event handlers\n * gives us the true current value without waiting for a re-render.\n */\n const isOpenRef = useRef(false);\n\n // ─── State ────────────────────────────────────────────────────────────────\n\n const isControlled = value !== undefined;\n\n const getInitialInputValue = (): string => {\n const seed = isControlled ? value : defaultValue;\n if (!seed) return '';\n const match = options.find((o) => o.value === seed);\n return match ? match.label : allowFreeText ? seed : '';\n };\n\n const getInitialCommittedValue = (): string => {\n return isControlled ? (value ?? '') : (defaultValue ?? '');\n };\n\n const [inputValue, _setInputValue] = useState<string>(getInitialInputValue);\n const inputValueRef = useRef<string>(inputValue);\n const setInputValue = useCallback((v: string) => {\n inputValueRef.current = v;\n _setInputValue(v);\n }, []);\n\n const [committedValue, _setCommittedValue] = useState<string>(getInitialCommittedValue);\n const committedValueRef = useRef<string>(committedValue);\n const setCommittedValue = useCallback((v: string) => {\n committedValueRef.current = v;\n _setCommittedValue(v);\n }, []);\n\n const [isOpen, setIsOpen] = useState(false);\n const [focusedIndex, setFocusedIndex] = useState(-1);\n\n // ─── Sync controlled value ────────────────────────────────────────────────\n\n useEffect(() => {\n if (!isControlled) return;\n const v = value ?? '';\n const match = options.find((o) => o.value === v);\n const label = match ? match.label : allowFreeText ? v : '';\n setInputValue(label);\n setCommittedValue(v);\n }, [value, isControlled, options, allowFreeText, setInputValue, setCommittedValue]);\n\n // ─── Derived: filtered options ────────────────────────────────────────────\n\n const filteredOptions = useMemo<ComboboxOption[]>(() => {\n const q = inputValue.toLowerCase();\n if (!q) return options;\n return options.filter((o) => o.label.toLowerCase().includes(q));\n }, [options, inputValue]);\n\n // Reset focused index when the filtered set changes\n useEffect(() => {\n setFocusedIndex(-1);\n }, [filteredOptions]);\n\n // Keep optionRefs array in sync with filteredOptions length\n useEffect(() => {\n optionRefs.current = optionRefs.current.slice(0, filteredOptions.length);\n }, [filteredOptions.length]);\n\n // ─── Derived: option entries (with group headers) ─────────────────────────\n\n const optionEntries = useMemo<OptionEntry[]>(() => {\n const entries: OptionEntry[] = [];\n const hasGroups = filteredOptions.some((o) => o.group);\n\n if (!hasGroups) {\n filteredOptions.forEach((option, index) => {\n entries.push({ type: 'option', option, index, key: option.id });\n });\n return entries;\n }\n\n // Build ordered group map while preserving insertion order\n const groupMap = new Map<string | null, ComboboxOption[]>();\n for (const option of filteredOptions) {\n const g = option.group ?? null;\n if (!groupMap.has(g)) groupMap.set(g, []);\n groupMap.get(g)!.push(option);\n }\n\n let optionIndex = 0;\n for (const [group, opts] of groupMap.entries()) {\n if (group !== null) {\n entries.push({ type: 'group', group, key: `group-${group}` });\n }\n for (const option of opts) {\n entries.push({ type: 'option', option, index: optionIndex++, key: option.id });\n }\n }\n\n return entries;\n }, [filteredOptions]);\n\n // ─── Open / Close helpers ─────────────────────────────────────────────────\n\n /**\n * Open the dropdown by programmatically clicking the 0-height span trigger.\n * The click bubbles to div.eidos-dropdown-trigger → Dropdown.handleTriggerClick → opens.\n *\n * We set isOpenRef AFTER the synthetic click so that the Dropdown's toggle\n * handler fires while isOpenRef is still false (allowing it to open).\n */\n const openDropdown = useCallback(() => {\n if (isOpenRef.current || disabled) return;\n // This used to synthesise a click on a hidden zero-height `span` so it would\n // bubble to the dropdown's trigger wrapper, because the overlay kept its\n // open state private and a click was the only way to change it.\n isOpenRef.current = true;\n setIsOpen(true);\n }, [disabled]);\n\n /**\n * Close the dropdown, optionally reverting `inputValue` to the last committed\n * value. This used to close it by remounting the whole subtree through a\n * changing `key`.\n */\n const closeDropdown = useCallback(\n (revertInput = false) => {\n isOpenRef.current = false;\n setIsOpen(false);\n setFocusedIndex(-1);\n\n if (revertInput) {\n const match = options.find((o) => o.value === committedValueRef.current);\n setInputValue(match ? match.label : allowFreeText ? committedValueRef.current : '');\n }\n },\n [options, allowFreeText, setInputValue],\n );\n\n // ─── Click-outside detection ──────────────────────────────────────────────\n\n useEffect(() => {\n const handleMouseDown = (e: MouseEvent) => {\n if (!isOpenRef.current) return;\n // defaultPrevented is set by the listbox's onMouseDown - means the user\n // clicked an option in the portal, not truly outside the combobox.\n if (e.defaultPrevented) return;\n if (containerRef.current?.contains(e.target as Node)) return;\n\n // Focus leaving to a non-focusable target: validate and close\n isOpenRef.current = false;\n setIsOpen(false);\n setFocusedIndex(-1);\n\n const current = inputValueRef.current;\n const committed = committedValueRef.current;\n\n if (!allowFreeText) {\n const match = options.find((o) => o.label.toLowerCase() === current.toLowerCase());\n if (match) {\n if (match.value !== committed) {\n setCommittedValue(match.value);\n onChange?.(match.value);\n setInputValue(match.label);\n }\n } else {\n const revertMatch = options.find((o) => o.value === committed);\n setInputValue(revertMatch ? revertMatch.label : '');\n }\n } else {\n if (current !== committed) {\n setCommittedValue(current);\n onChange?.(current);\n }\n }\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n return () => document.removeEventListener('mousedown', handleMouseDown);\n }, [allowFreeText, options, onChange, setCommittedValue, setInputValue]);\n\n // ─── Input handlers ───────────────────────────────────────────────────────\n\n const handleFocus = useCallback(() => {\n openDropdown();\n }, [openDropdown]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const query = e.target.value;\n setInputValue(query);\n onSearch?.(query);\n if (!isOpenRef.current) openDropdown();\n },\n [setInputValue, onSearch, openDropdown],\n );\n\n /**\n * On blur, validate the typed value against options.\n * A 0ms defer ensures a click on a posIcon button (X / chevron) inside the\n * Input completes its onClick before we run close logic, so we can check\n * document.activeElement reliably.\n */\n const handleBlur = useCallback(() => {\n setTimeout(() => {\n // If focus came back inside the container (e.g., posIcon button clicked),\n // don't close or validate yet.\n if (containerRef.current?.contains(document.activeElement)) return;\n\n // Read both refs *inside* the deferred callback, never captured at blur\n // time - that's the whole reason they're kept in sync by the setters.\n // Anything can run in the gap this 0ms defer opens, including the click\n // that caused the blur: a controlled consumer clearing `value` from\n // another control (e.g. DataGrid's \"Clear filters\", which resets every\n // quick filter at once) updates the refs via the sync effect, and stale\n // captured values would then resurrect the label that was just cleared.\n const current = inputValueRef.current;\n const committed = committedValueRef.current;\n\n // Close\n isOpenRef.current = false;\n setIsOpen(false);\n setFocusedIndex(-1);\n\n // Validate\n if (!allowFreeText) {\n const match = options.find((o) => o.label.toLowerCase() === current.toLowerCase());\n if (match) {\n if (match.value !== committed) {\n setCommittedValue(match.value);\n onChange?.(match.value);\n setInputValue(match.label);\n } else {\n // Normalize the display label (fix casing)\n setInputValue(match.label);\n }\n } else {\n // No match - revert to last committed value\n const revertMatch = options.find((o) => o.value === committed);\n setInputValue(revertMatch ? revertMatch.label : '');\n }\n } else {\n // allowFreeText: commit whatever the user typed\n if (current !== committed) {\n setCommittedValue(current);\n onChange?.(current);\n }\n }\n }, 0);\n }, [allowFreeText, options, onChange, setCommittedValue, setInputValue]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!isOpenRef.current) {\n openDropdown();\n setFocusedIndex(0);\n } else {\n setFocusedIndex((prev) => {\n const next = prev < filteredOptions.length - 1 ? prev + 1 : 0;\n setTimeout(\n () =>\n optionRefs.current[next]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n }),\n 0,\n );\n return next;\n });\n }\n break;\n\n case 'ArrowUp':\n e.preventDefault();\n if (!isOpenRef.current) {\n openDropdown();\n setFocusedIndex(filteredOptions.length - 1);\n } else {\n setFocusedIndex((prev) => {\n const next = prev > 0 ? prev - 1 : filteredOptions.length - 1;\n setTimeout(\n () =>\n optionRefs.current[next]?.scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n }),\n 0,\n );\n return next;\n });\n }\n break;\n\n case 'Enter':\n e.preventDefault();\n if (isOpenRef.current && focusedIndex >= 0 && focusedIndex < filteredOptions.length) {\n handleOptionSelect(filteredOptions[focusedIndex]);\n } else if (allowFreeText && inputValue.trim()) {\n const trimmed = inputValue.trim();\n setCommittedValue(trimmed);\n onChange?.(trimmed);\n closeDropdown();\n }\n break;\n\n case 'Escape':\n e.preventDefault();\n if (isOpenRef.current) {\n closeDropdown(true /* revert */);\n }\n break;\n\n default:\n break;\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n disabled,\n filteredOptions,\n focusedIndex,\n allowFreeText,\n inputValue,\n onChange,\n openDropdown,\n closeDropdown,\n setCommittedValue,\n ],\n );\n\n // ─── Option selection ─────────────────────────────────────────────────────\n\n const handleOptionSelect = useCallback(\n (option: ComboboxOption) => {\n if (option.disabled) return;\n setInputValue(option.label);\n setCommittedValue(option.value);\n onChange?.(option.value);\n closeDropdown();\n // Return focus to the input so the user can continue interacting\n inputRef.current?.focus();\n },\n [onChange, closeDropdown, setInputValue, setCommittedValue],\n );\n\n // ─── Clear ────────────────────────────────────────────────────────────────\n\n const handleClearClick = useCallback(() => {\n setInputValue('');\n setCommittedValue('');\n onChange?.('');\n // Re-focus input so the user can immediately start typing again\n inputRef.current?.focus();\n }, [onChange, setInputValue, setCommittedValue]);\n\n // ─── Chevron toggle ───────────────────────────────────────────────────────\n\n const handleChevronClick = useCallback(() => {\n if (isOpenRef.current) {\n closeDropdown();\n } else {\n openDropdown();\n }\n }, [closeDropdown, openDropdown]);\n\n // ─── Render: individual option ────────────────────────────────────────────\n\n const renderOptionItem = useCallback(\n (option: ComboboxOption, index: number): React.ReactNode => {\n const isSelected = option.value === committedValue;\n const isFocused = index === focusedIndex;\n\n const classes = [\n 'eidos-combobox-option',\n isSelected && 'eidos-combobox-option--selected',\n isFocused && 'eidos-combobox-option--focused',\n option.disabled && 'eidos-combobox-option--disabled',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n key={option.id}\n ref={(el) => {\n optionRefs.current[index] = el;\n }}\n className={classes}\n onClick={() => handleOptionSelect(option)}\n onMouseEnter={() => !option.disabled && setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n id={`${uid}-option-${index}`}\n >\n {renderOption ? (\n renderOption(option)\n ) : (\n <>\n <Check\n className={`eidos-combobox-option-icon${\n !isSelected ? ' eidos-combobox-option-icon--hidden' : ''\n }`}\n />\n <span className=\"eidos-combobox-option-label\">{option.label}</span>\n {option.description && (\n <span className=\"eidos-combobox-option-description\">{option.description}</span>\n )}\n </>\n )}\n </div>\n );\n },\n [committedValue, focusedIndex, handleOptionSelect, renderOption, uid],\n );\n\n // ─── Render: dropdown content ─────────────────────────────────────────────\n\n const dropdownContent = useMemo(() => {\n if (loading) {\n return (\n <div className=\"eidos-combobox-loading\">\n <Loader2 className=\"eidos-combobox-loading-icon\" />\n <span>{loadingText}</span>\n </div>\n );\n }\n\n if (filteredOptions.length === 0) {\n return <div className=\"eidos-combobox-empty\">{emptyText}</div>;\n }\n\n return optionEntries.map((entry) => {\n if (entry.type === 'group') {\n return (\n <div key={entry.key} className=\"eidos-combobox-option-group-label\">\n {entry.group}\n </div>\n );\n }\n return renderOptionItem(entry.option, entry.index);\n });\n }, [loading, loadingText, filteredOptions.length, emptyText, optionEntries, renderOptionItem]);\n\n // ─── posIcon / posIconButton wiring ───────────────────────────────────────\n\n const hasClearableValue = clearable && !!inputValue;\n const posIcon = hasClearableValue ? X : ChevronDown;\n const posIconClick = hasClearableValue ? handleClearClick : handleChevronClick;\n\n // ─── CSS classes ──────────────────────────────────────────────────────────\n\n const containerClasses = [\n 'eidos-combobox',\n fullWidth && fullWidthModifier('eidos-combobox'),\n error && 'eidos-combobox--error',\n disabled && 'eidos-combobox--disabled',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const maxHeightValue = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n\n // ─── Render ───────────────────────────────────────────────────────────────\n\n return (\n // No ARIA on this wrapper.\n //\n // It carried `aria-expanded` and `aria-haspopup` while having no role at\n // all, which is invalid - both are only meaningful on an element whose\n // role supports them. They belong on the input, which is the combobox.\n <div ref={containerRef} className={containerClasses}>\n <div ref={comboboxTriggerRef} className=\"eidos-combobox-trigger\">\n {/*\n The Input is a direct child of eidos-combobox-trigger.\n It is NOT inside the Dropdown trigger div, so clicking it\n never bubbles to Dropdown.handleTriggerClick and never\n accidentally toggles the dropdown closed mid-edit.\n */}\n <Input\n ref={inputRef}\n value={inputValue}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n disabled={disabled}\n size={size}\n fullWidth\n label={label}\n clearable={false} // we render our own clear via posIcon\n isSelect={false}\n posIcon={posIcon}\n posIconButton\n onPosIconClick={posIconClick}\n // The same button does two jobs depending on state, so the name\n // has to follow the icon - \"Clear\" on a chevron would be a lie.\n posIconLabel={hasClearableValue ? 'Clear selection' : 'Show options'}\n // The ARIA 1.2 combobox pattern: the input *is* the combobox.\n role=\"combobox\"\n aria-expanded={isOpen}\n // `Combobox` renders its own error message rather than passing\n // `error` down, so it does not inherit `Input`'s wiring and has to\n // associate the message itself (SC 3.3.1).\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? `${uid}-error` : undefined}\n aria-autocomplete=\"list\"\n // Only while the listbox exists. `aria-controls` pointing at an id\n // that is not in the document is invalid, and that is what shipped\n // - the listbox only renders once the dropdown opens.\n aria-controls={isOpen ? `${uid}-listbox` : undefined}\n aria-activedescendant={focusedIndex >= 0 ? `${uid}-option-${focusedIndex}` : undefined}\n />\n\n {/*\n The Dropdown trigger is a 0-height span placed AFTER the Input\n in the normal document flow. Its getBoundingClientRect sits at\n exactly the bottom edge of the Input, giving the Dropdown correct\n placement without any click-toggle collision with the Input above.\n closeOnClickOutside and closeOnEscape are disabled because we own\n those interactions in our mousedown listener and onKeyDown handler.\n */}\n <Dropdown\n open={isOpen}\n onOpenChange={setIsOpen}\n // Positioning comes from `triggerRef` below; this span is only here\n // because a trigger is required. It used to carry a ref so that\n // `openDropdown` could click it.\n trigger={<span className=\"eidos-combobox-dropdown-anchor\" aria-hidden=\"true\" />}\n content={\n <div\n id={`${uid}-listbox`}\n className=\"eidos-combobox-options\"\n role=\"listbox\"\n aria-label={label ?? 'Options'}\n // Prevent the input from blurring when the user clicks an option,\n // and mark this event so the click-outside handler ignores it.\n onMouseDown={(e) => e.preventDefault()}\n >\n {dropdownContent}\n </div>\n }\n triggerRef={comboboxTriggerRef as React.RefObject<HTMLElement | null>}\n maxHeight={maxHeightValue}\n autoWidth\n closeOnClickOutside={false}\n closeOnEscape={false}\n />\n </div>\n\n {hint && !error && <span className=\"eidos-combobox-hint\">{hint}</span>}\n {error && (\n <span id={`${uid}-error`} className=\"eidos-combobox-error-message\">\n <CircleAlert className=\"eidos-combobox-error-icon\" />\n {error}\n </span>\n )}\n </div>\n );\n};\n\nCombobox.displayName = 'Combobox';\n"],"mappings":";;;;;;;;;;;AAAA,SAAgB,UAAU,aAAa,QAAQ,WAAW,SAAS,aAAa;AAChF,SAAS,OAAO,aAAa,GAAG,SAAS,mBAAmB;AA0chD,mBACE,KADF;AA3bL,IAAM,WAAoC,CAAC;AAAA,EAChD,UAAU,CAAC;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AAAA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