@ahrowe/ui 0.35.0 → 0.37.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 (783) hide show
  1. package/README.md +102 -72
  2. package/dist/cjs-types/common/accordion/accordion.d.ts +4 -0
  3. package/dist/cjs-types/common/accordion/accordion.types.d.ts +21 -0
  4. package/dist/cjs-types/common/accordion/index.d.ts +2 -0
  5. package/dist/cjs-types/common/actionButtons/actionButtons.d.ts +2 -0
  6. package/dist/cjs-types/common/actionButtons/actionButtons.types.d.ts +34 -0
  7. package/dist/cjs-types/common/actionButtons/index.d.ts +2 -0
  8. package/dist/cjs-types/common/actionIcon/actionIcon.d.ts +4 -0
  9. package/dist/cjs-types/common/actionIcon/actionIcon.types.d.ts +15 -0
  10. package/dist/cjs-types/common/actionIcon/index.d.ts +2 -0
  11. package/dist/cjs-types/common/alert/alert.d.ts +4 -0
  12. package/dist/cjs-types/common/alert/alert.types.d.ts +30 -0
  13. package/dist/cjs-types/common/alert/index.d.ts +2 -0
  14. package/dist/cjs-types/common/animatedIcon/animatedIcon.d.ts +3 -0
  15. package/dist/cjs-types/common/animatedIcon/animatedIcon.types.d.ts +25 -0
  16. package/dist/cjs-types/common/animatedIcon/index.d.ts +2 -0
  17. package/dist/cjs-types/common/animatedLogo/animatedLogo.d.ts +4 -0
  18. package/dist/cjs-types/common/animatedLogo/animatedLogo.types.d.ts +35 -0
  19. package/dist/cjs-types/common/animatedLogo/index.d.ts +2 -0
  20. package/dist/cjs-types/common/animatedText/animatedText.d.ts +4 -0
  21. package/dist/cjs-types/common/animatedText/animatedText.types.d.ts +65 -0
  22. package/dist/cjs-types/common/animatedText/index.d.ts +2 -0
  23. package/dist/cjs-types/common/avatar/avatar.d.ts +4 -0
  24. package/dist/cjs-types/common/avatar/avatar.types.d.ts +26 -0
  25. package/dist/cjs-types/common/avatar/avatarGroup.d.ts +4 -0
  26. package/dist/cjs-types/common/avatar/index.d.ts +3 -0
  27. package/dist/cjs-types/common/badge/badge.d.ts +4 -0
  28. package/dist/cjs-types/common/badge/badge.types.d.ts +31 -0
  29. package/dist/cjs-types/common/badge/index.d.ts +2 -0
  30. package/dist/cjs-types/common/bodyEnd/bodyEnd.d.ts +4 -0
  31. package/dist/cjs-types/common/bodyEnd/bodyEnd.types.d.ts +4 -0
  32. package/dist/cjs-types/common/bodyEnd/index.d.ts +2 -0
  33. package/dist/cjs-types/common/breadcrumb/breadcrumb.d.ts +4 -0
  34. package/dist/cjs-types/common/breadcrumb/breadcrumb.types.d.ts +33 -0
  35. package/dist/cjs-types/common/breadcrumb/index.d.ts +2 -0
  36. package/dist/cjs-types/common/button/button.d.ts +9 -0
  37. package/dist/cjs-types/common/button/button.types.d.ts +42 -0
  38. package/dist/cjs-types/common/button/index.d.ts +2 -0
  39. package/dist/cjs-types/common/buttonGroup/buttonGroup.d.ts +4 -0
  40. package/dist/cjs-types/common/buttonGroup/buttonGroup.types.d.ts +12 -0
  41. package/dist/cjs-types/common/buttonGroup/index.d.ts +2 -0
  42. package/dist/cjs-types/common/card/Card.d.ts +4 -0
  43. package/dist/cjs-types/common/card/CardActions.d.ts +4 -0
  44. package/dist/cjs-types/common/card/CardContent.d.ts +4 -0
  45. package/dist/cjs-types/common/card/CardHeader.d.ts +4 -0
  46. package/dist/cjs-types/common/card/CardMedia.d.ts +4 -0
  47. package/dist/cjs-types/common/card/card.types.d.ts +55 -0
  48. package/dist/cjs-types/common/card/index.d.ts +6 -0
  49. package/dist/cjs-types/common/carousel/carousel.d.ts +4 -0
  50. package/dist/cjs-types/common/carousel/carousel.types.d.ts +35 -0
  51. package/dist/cjs-types/common/carousel/index.d.ts +2 -0
  52. package/dist/cjs-types/common/checkbox/checkbox.d.ts +4 -0
  53. package/dist/cjs-types/common/checkbox/checkbox.types.d.ts +27 -0
  54. package/dist/cjs-types/common/checkbox/index.d.ts +2 -0
  55. package/dist/cjs-types/common/chip/chip.d.ts +4 -0
  56. package/dist/cjs-types/common/chip/chip.types.d.ts +35 -0
  57. package/dist/cjs-types/common/chip/chipContainer.d.ts +4 -0
  58. package/dist/cjs-types/common/chip/index.d.ts +3 -0
  59. package/dist/cjs-types/common/colorPicker/colorPicker.d.ts +4 -0
  60. package/dist/cjs-types/common/colorPicker/colorPicker.types.d.ts +25 -0
  61. package/dist/cjs-types/common/colorPicker/index.d.ts +2 -0
  62. package/dist/cjs-types/common/colorPicker/toHex.d.ts +11 -0
  63. package/dist/cjs-types/common/configProvider/configProvider.d.ts +13 -0
  64. package/dist/cjs-types/common/configProvider/configProvider.types.d.ts +133 -0
  65. package/dist/cjs-types/common/configProvider/index.d.ts +6 -0
  66. package/dist/cjs-types/common/configProvider/presentation.types.d.ts +14 -0
  67. package/dist/cjs-types/common/configProvider/useComponentDefaults.d.ts +17 -0
  68. package/dist/cjs-types/common/configProvider/useLabels.d.ts +22 -0
  69. package/dist/cjs-types/common/configProvider/usePresentationDefault.d.ts +8 -0
  70. package/dist/cjs-types/common/confirmModal/confirmModal.d.ts +4 -0
  71. package/dist/cjs-types/common/confirmModal/confirmModal.types.d.ts +24 -0
  72. package/dist/cjs-types/common/confirmModal/index.d.ts +2 -0
  73. package/dist/cjs-types/common/datePicker/components/datePickerMonth/datePickerMonth.d.ts +2 -0
  74. package/dist/cjs-types/common/datePicker/components/datePickerMonth/datePickerMonth.types.d.ts +23 -0
  75. package/dist/cjs-types/common/datePicker/components/datePickerMonth/index.d.ts +1 -0
  76. package/dist/cjs-types/common/datePicker/dateFunctions.d.ts +44 -0
  77. package/dist/cjs-types/common/datePicker/datePicker.d.ts +3 -0
  78. package/dist/cjs-types/common/datePicker/datePicker.types.d.ts +60 -0
  79. package/dist/cjs-types/common/datePicker/index.d.ts +2 -0
  80. package/dist/cjs-types/common/divider/divider.d.ts +4 -0
  81. package/dist/cjs-types/common/divider/divider.types.d.ts +21 -0
  82. package/dist/cjs-types/common/divider/index.d.ts +2 -0
  83. package/dist/cjs-types/common/drawer/drawer.d.ts +4 -0
  84. package/dist/cjs-types/common/drawer/drawer.types.d.ts +15 -0
  85. package/dist/cjs-types/common/drawer/index.d.ts +2 -0
  86. package/dist/cjs-types/common/dropZone/dropZone.d.ts +4 -0
  87. package/dist/cjs-types/common/dropZone/dropZone.types.d.ts +90 -0
  88. package/dist/cjs-types/common/dropZone/index.d.ts +2 -0
  89. package/dist/cjs-types/common/dropdown/dropdown.d.ts +4 -0
  90. package/dist/cjs-types/common/dropdown/dropdown.types.d.ts +47 -0
  91. package/dist/cjs-types/common/dropdown/index.d.ts +2 -0
  92. package/dist/cjs-types/common/emptyState/emptyState.d.ts +3 -0
  93. package/dist/cjs-types/common/emptyState/emptyState.types.d.ts +20 -0
  94. package/dist/cjs-types/common/emptyState/index.d.ts +2 -0
  95. package/dist/cjs-types/common/errorBoundary/errorBoundary.d.ts +14 -0
  96. package/dist/cjs-types/common/errorBoundary/errorBoundary.types.d.ts +57 -0
  97. package/dist/cjs-types/common/errorBoundary/index.d.ts +2 -0
  98. package/dist/cjs-types/common/fab/components/fabBase/fabBase.d.ts +3 -0
  99. package/dist/cjs-types/common/fab/components/fabBase/fabBase.types.d.ts +12 -0
  100. package/dist/cjs-types/common/fab/components/fabBase/index.d.ts +1 -0
  101. package/dist/cjs-types/common/fab/fab.d.ts +3 -0
  102. package/dist/cjs-types/common/fab/fab.types.d.ts +22 -0
  103. package/dist/cjs-types/common/fab/index.d.ts +2 -0
  104. package/dist/cjs-types/common/flip/flip.d.ts +3 -0
  105. package/dist/cjs-types/common/flip/flip.types.d.ts +44 -0
  106. package/dist/cjs-types/common/flip/index.d.ts +2 -0
  107. package/dist/cjs-types/common/floorPlan/floorPlan.faces.d.ts +33 -0
  108. package/dist/cjs-types/common/floorPlan/floorPlan.fixtures.d.ts +35 -0
  109. package/dist/cjs-types/common/floorPlan/floorPlan.geometry.d.ts +111 -0
  110. package/dist/cjs-types/common/floorPlan/floorPlan.graph.d.ts +184 -0
  111. package/dist/cjs-types/common/floorPlan/floorPlan.hit.d.ts +26 -0
  112. package/dist/cjs-types/common/floorPlan/floorPlan.json.d.ts +23 -0
  113. package/dist/cjs-types/common/floorPlan/floorPlan.mesh.d.ts +36 -0
  114. package/dist/cjs-types/common/floorPlan/floorPlan.path.d.ts +59 -0
  115. package/dist/cjs-types/common/floorPlan/floorPlan.plan.d.ts +98 -0
  116. package/dist/cjs-types/common/floorPlan/floorPlan.rooms.d.ts +47 -0
  117. package/dist/cjs-types/common/floorPlan/floorPlan.snap.d.ts +101 -0
  118. package/dist/cjs-types/common/floorPlan/floorPlan.triangulate.d.ts +11 -0
  119. package/dist/cjs-types/common/floorPlan/floorPlan.types.d.ts +276 -0
  120. package/dist/cjs-types/common/floorPlan/index.d.ts +30 -0
  121. package/dist/cjs-types/common/floorPlan/legacySvg.d.ts +27 -0
  122. package/dist/cjs-types/common/hooks/index.d.ts +13 -0
  123. package/dist/cjs-types/common/hooks/useAnchorTracking.d.ts +40 -0
  124. package/dist/cjs-types/common/hooks/useCoarsePointer.d.ts +3 -0
  125. package/dist/cjs-types/common/hooks/useFocusBoundary.d.ts +20 -0
  126. package/dist/cjs-types/common/hooks/useHotkeys.d.ts +45 -0
  127. package/dist/cjs-types/common/hooks/useMediaQuery.d.ts +9 -0
  128. package/dist/cjs-types/common/hooks/useOverlay.d.ts +26 -0
  129. package/dist/cjs-types/common/hooks/useScrollEdges.d.ts +18 -0
  130. package/dist/cjs-types/common/hooks/useSheet.d.ts +19 -0
  131. package/dist/cjs-types/common/hooks/useSwipeDismiss.d.ts +37 -0
  132. package/dist/cjs-types/common/hooks/useVisualViewportSize.d.ts +13 -0
  133. package/dist/cjs-types/common/iconPicker/iconPicker.d.ts +3 -0
  134. package/dist/cjs-types/common/iconPicker/iconPicker.types.d.ts +23 -0
  135. package/dist/cjs-types/common/iconPicker/index.d.ts +2 -0
  136. package/dist/cjs-types/common/idleManager/idleManager.d.ts +3 -0
  137. package/dist/cjs-types/common/idleManager/idleManager.types.d.ts +8 -0
  138. package/dist/cjs-types/common/idleManager/index.d.ts +2 -0
  139. package/dist/cjs-types/common/infiniteBlock/useInfiniteScroll.d.ts +5 -0
  140. package/dist/cjs-types/common/input/index.d.ts +2 -0
  141. package/dist/cjs-types/common/input/input.d.ts +4 -0
  142. package/dist/cjs-types/common/input/input.types.d.ts +84 -0
  143. package/dist/cjs-types/common/inputDropdown/index.d.ts +2 -0
  144. package/dist/cjs-types/common/inputDropdown/inputDropdown.d.ts +3 -0
  145. package/dist/cjs-types/common/inputDropdown/inputDropdown.types.d.ts +36 -0
  146. package/dist/cjs-types/common/interactableDiv/index.d.ts +2 -0
  147. package/dist/cjs-types/common/interactableDiv/interactableDiv.d.ts +8 -0
  148. package/dist/cjs-types/common/kanbanBoard/KanbanBoard.d.ts +3 -0
  149. package/dist/cjs-types/common/kanbanBoard/KanbanColumn.d.ts +45 -0
  150. package/dist/cjs-types/common/kanbanBoard/KanbanItem.d.ts +3 -0
  151. package/dist/cjs-types/common/kanbanBoard/index.d.ts +3 -0
  152. package/dist/cjs-types/common/kanbanBoard/kanbanBoard.types.d.ts +129 -0
  153. package/dist/cjs-types/common/kanbanBoard/kanbanBoard.utils.d.ts +60 -0
  154. package/dist/cjs-types/common/klipyPicker/components/gifPreview/gifPreview.d.ts +3 -0
  155. package/dist/cjs-types/common/klipyPicker/components/gifPreview/gifPreview.types.d.ts +7 -0
  156. package/dist/cjs-types/common/klipyPicker/components/gifPreview/index.d.ts +1 -0
  157. package/dist/cjs-types/common/klipyPicker/components/gifView/gifView.d.ts +3 -0
  158. package/dist/cjs-types/common/klipyPicker/components/gifView/gifView.types.d.ts +4 -0
  159. package/dist/cjs-types/common/klipyPicker/components/gifView/index.d.ts +1 -0
  160. package/dist/cjs-types/common/klipyPicker/index.d.ts +2 -0
  161. package/dist/cjs-types/common/klipyPicker/klipyPicker.d.ts +3 -0
  162. package/dist/cjs-types/common/klipyPicker/klipyPicker.types.d.ts +15 -0
  163. package/dist/cjs-types/common/loading/index.d.ts +1 -0
  164. package/dist/cjs-types/common/loading/spinnerLoading/index.d.ts +2 -0
  165. package/dist/cjs-types/common/loading/spinnerLoading/spinnerLoading.d.ts +6 -0
  166. package/dist/cjs-types/common/maskedInput/index.d.ts +2 -0
  167. package/dist/cjs-types/common/maskedInput/mask.d.ts +48 -0
  168. package/dist/cjs-types/common/maskedInput/maskedInput.d.ts +13 -0
  169. package/dist/cjs-types/common/maskedInput/maskedInput.types.d.ts +38 -0
  170. package/dist/cjs-types/common/menu/index.d.ts +3 -0
  171. package/dist/cjs-types/common/menu/menu.d.ts +14 -0
  172. package/dist/cjs-types/common/menu/menu.types.d.ts +61 -0
  173. package/dist/cjs-types/common/menu/menuHotkeys.d.ts +20 -0
  174. package/dist/cjs-types/common/modal/index.d.ts +2 -0
  175. package/dist/cjs-types/common/modal/modal.d.ts +3 -0
  176. package/dist/cjs-types/common/modal/modal.types.d.ts +31 -0
  177. package/dist/cjs-types/common/multiSelect/index.d.ts +2 -0
  178. package/dist/cjs-types/common/multiSelect/multiSelect.d.ts +4 -0
  179. package/dist/cjs-types/common/multiSelect/multiSelect.types.d.ts +69 -0
  180. package/dist/cjs-types/common/numberInput/index.d.ts +3 -0
  181. package/dist/cjs-types/common/numberInput/numberInput.d.ts +5 -0
  182. package/dist/cjs-types/common/numberInput/numberInput.types.d.ts +76 -0
  183. package/dist/cjs-types/common/numberInput/useStepRepeat.d.ts +17 -0
  184. package/dist/cjs-types/common/optionPicker/index.d.ts +2 -0
  185. package/dist/cjs-types/common/optionPicker/optionPicker.d.ts +4 -0
  186. package/dist/cjs-types/common/optionPicker/optionPicker.types.d.ts +16 -0
  187. package/dist/cjs-types/common/otpInput/index.d.ts +2 -0
  188. package/dist/cjs-types/common/otpInput/otpInput.d.ts +4 -0
  189. package/dist/cjs-types/common/otpInput/otpInput.types.d.ts +60 -0
  190. package/dist/cjs-types/common/overscroll/index.d.ts +2 -0
  191. package/dist/cjs-types/common/overscroll/overscroll.d.ts +2 -0
  192. package/dist/cjs-types/common/overscroll/overscroll.types.d.ts +14 -0
  193. package/dist/cjs-types/common/pagination/index.d.ts +2 -0
  194. package/dist/cjs-types/common/pagination/pagination.d.ts +4 -0
  195. package/dist/cjs-types/common/pagination/pagination.types.d.ts +45 -0
  196. package/dist/cjs-types/common/planCanvas/index.d.ts +2 -0
  197. package/dist/cjs-types/common/planCanvas/planCanvas.d.ts +7 -0
  198. package/dist/cjs-types/common/planCanvas/planCanvas.types.d.ts +64 -0
  199. package/dist/cjs-types/common/popover/index.d.ts +2 -0
  200. package/dist/cjs-types/common/popover/popover.d.ts +3 -0
  201. package/dist/cjs-types/common/popover/popover.types.d.ts +94 -0
  202. package/dist/cjs-types/common/popover/usePopoverPosition.d.ts +45 -0
  203. package/dist/cjs-types/common/progressBar/index.d.ts +2 -0
  204. package/dist/cjs-types/common/progressBar/progressBar.d.ts +5 -0
  205. package/dist/cjs-types/common/progressBar/progressBar.types.d.ts +18 -0
  206. package/dist/cjs-types/common/radioGroup/index.d.ts +2 -0
  207. package/dist/cjs-types/common/radioGroup/radioGroup.d.ts +4 -0
  208. package/dist/cjs-types/common/radioGroup/radioGroup.types.d.ts +45 -0
  209. package/dist/cjs-types/common/rating/index.d.ts +2 -0
  210. package/dist/cjs-types/common/rating/rating.d.ts +4 -0
  211. package/dist/cjs-types/common/rating/rating.types.d.ts +19 -0
  212. package/dist/cjs-types/common/revealLens/index.d.ts +2 -0
  213. package/dist/cjs-types/common/revealLens/revealLens.d.ts +4 -0
  214. package/dist/cjs-types/common/revealLens/revealLens.types.d.ts +24 -0
  215. package/dist/cjs-types/common/ripple/index.d.ts +2 -0
  216. package/dist/cjs-types/common/ripple/ripple.d.ts +5 -0
  217. package/dist/cjs-types/common/ripple/ripple.types.d.ts +16 -0
  218. package/dist/cjs-types/common/roomDrawer/index.d.ts +2 -0
  219. package/dist/cjs-types/common/roomDrawer/roomDrawer.d.ts +3 -0
  220. package/dist/cjs-types/common/roomDrawer/roomDrawer.types.d.ts +308 -0
  221. package/dist/cjs-types/common/roomDrawer/usePlanHistory.d.ts +24 -0
  222. package/dist/cjs-types/common/roomViewer/index.d.ts +2 -0
  223. package/dist/cjs-types/common/roomViewer/roomViewer.d.ts +10 -0
  224. package/dist/cjs-types/common/roomViewer/roomViewer.types.d.ts +91 -0
  225. package/dist/cjs-types/common/scrollFade/index.d.ts +2 -0
  226. package/dist/cjs-types/common/scrollFade/scrollFade.d.ts +4 -0
  227. package/dist/cjs-types/common/scrollFade/scrollFade.types.d.ts +20 -0
  228. package/dist/cjs-types/common/scrollbarProvider/index.d.ts +2 -0
  229. package/dist/cjs-types/common/scrollbarProvider/scrollbarProvider.d.ts +7 -0
  230. package/dist/cjs-types/common/searchInput/index.d.ts +2 -0
  231. package/dist/cjs-types/common/searchInput/searchInput.d.ts +3 -0
  232. package/dist/cjs-types/common/searchInput/searchInput.types.d.ts +28 -0
  233. package/dist/cjs-types/common/sectionHeader/index.d.ts +2 -0
  234. package/dist/cjs-types/common/sectionHeader/sectionHeader.d.ts +4 -0
  235. package/dist/cjs-types/common/sectionHeader/sectionHeader.types.d.ts +27 -0
  236. package/dist/cjs-types/common/sheetBackdrop/index.d.ts +2 -0
  237. package/dist/cjs-types/common/sheetBackdrop/sheetBackdrop.d.ts +16 -0
  238. package/dist/cjs-types/common/sheetBackdrop/sheetBackdrop.types.d.ts +7 -0
  239. package/dist/cjs-types/common/skeleton/index.d.ts +2 -0
  240. package/dist/cjs-types/common/skeleton/skeleton.d.ts +4 -0
  241. package/dist/cjs-types/common/skeleton/skeleton.types.d.ts +22 -0
  242. package/dist/cjs-types/common/slider/index.d.ts +2 -0
  243. package/dist/cjs-types/common/slider/slider.d.ts +3 -0
  244. package/dist/cjs-types/common/slider/slider.types.d.ts +68 -0
  245. package/dist/cjs-types/common/splitButton/index.d.ts +2 -0
  246. package/dist/cjs-types/common/splitButton/splitButton.d.ts +3 -0
  247. package/dist/cjs-types/common/splitButton/splitButton.types.d.ts +35 -0
  248. package/dist/cjs-types/common/stepper/index.d.ts +2 -0
  249. package/dist/cjs-types/common/stepper/stepper.d.ts +3 -0
  250. package/dist/cjs-types/common/stepper/stepper.types.d.ts +77 -0
  251. package/dist/cjs-types/common/sticky/index.d.ts +1 -0
  252. package/dist/cjs-types/common/sticky/sticky.d.ts +3 -0
  253. package/dist/cjs-types/common/sticky/sticky.types.d.ts +37 -0
  254. package/dist/cjs-types/common/sticky/stickyStack.d.ts +51 -0
  255. package/dist/cjs-types/common/switch/index.d.ts +2 -0
  256. package/dist/cjs-types/common/switch/switch.d.ts +4 -0
  257. package/dist/cjs-types/common/switch/switch.types.d.ts +21 -0
  258. package/dist/cjs-types/common/tabHeader/index.d.ts +2 -0
  259. package/dist/cjs-types/common/tabHeader/tabHeader.d.ts +4 -0
  260. package/dist/cjs-types/common/tabHeader/tabHeader.types.d.ts +20 -0
  261. package/dist/cjs-types/common/textarea/index.d.ts +2 -0
  262. package/dist/cjs-types/common/textarea/textarea.d.ts +3 -0
  263. package/dist/cjs-types/common/textarea/textarea.types.d.ts +2 -0
  264. package/dist/cjs-types/common/themeProvider/defaultTheme.d.ts +7 -0
  265. package/dist/cjs-types/common/themeProvider/index.d.ts +4 -0
  266. package/dist/cjs-types/common/themeProvider/lightTheme.d.ts +13 -0
  267. package/dist/cjs-types/common/themeProvider/theme.types.d.ts +272 -0
  268. package/dist/cjs-types/common/themeProvider/themeProvider.d.ts +38 -0
  269. package/dist/cjs-types/common/themeProvider/themeVariablesContext.d.ts +11 -0
  270. package/dist/cjs-types/common/themeProvider/useTheme.d.ts +4 -0
  271. package/dist/cjs-types/common/tilt/index.d.ts +4 -0
  272. package/dist/cjs-types/common/tilt/tilt.d.ts +3 -0
  273. package/dist/cjs-types/common/tilt/tilt.types.d.ts +40 -0
  274. package/dist/cjs-types/common/tilt/tiltMath.d.ts +24 -0
  275. package/dist/cjs-types/common/tiltGroup/index.d.ts +3 -0
  276. package/dist/cjs-types/common/tiltGroup/tiltGroup.d.ts +6 -0
  277. package/dist/cjs-types/common/tiltGroup/tiltGroup.types.d.ts +16 -0
  278. package/dist/cjs-types/common/timeInput/components/clockDial/clockDial.d.ts +3 -0
  279. package/dist/cjs-types/common/timeInput/components/clockDial/clockDial.types.d.ts +24 -0
  280. package/dist/cjs-types/common/timeInput/components/clockDial/index.d.ts +1 -0
  281. package/dist/cjs-types/common/timeInput/index.d.ts +1 -0
  282. package/dist/cjs-types/common/timeInput/timeFunctions.d.ts +36 -0
  283. package/dist/cjs-types/common/timeInput/timeInput.d.ts +3 -0
  284. package/dist/cjs-types/common/timeInput/timeInput.types.d.ts +44 -0
  285. package/dist/cjs-types/common/timeline/index.d.ts +2 -0
  286. package/dist/cjs-types/common/timeline/timeline.d.ts +3 -0
  287. package/dist/cjs-types/common/timeline/timeline.types.d.ts +51 -0
  288. package/dist/cjs-types/common/timer/index.d.ts +2 -0
  289. package/dist/cjs-types/common/timer/timer.chime.d.ts +1 -0
  290. package/dist/cjs-types/common/timer/timer.d.ts +3 -0
  291. package/dist/cjs-types/common/timer/timer.types.d.ts +110 -0
  292. package/dist/cjs-types/common/toast/index.d.ts +3 -0
  293. package/dist/cjs-types/common/toast/toast.d.ts +11 -0
  294. package/dist/cjs-types/common/toast/toast.types.d.ts +50 -0
  295. package/dist/cjs-types/common/toast/toastProvider.d.ts +8 -0
  296. package/dist/cjs-types/common/toast/toastService.d.ts +7 -0
  297. package/dist/cjs-types/common/tooltip/index.d.ts +2 -0
  298. package/dist/cjs-types/common/tooltip/tooltip.d.ts +3 -0
  299. package/dist/cjs-types/common/tooltip/tooltip.types.d.ts +17 -0
  300. package/dist/cjs-types/common/tree/flattenTree.d.ts +3 -0
  301. package/dist/cjs-types/common/tree/index.d.ts +3 -0
  302. package/dist/cjs-types/common/tree/tree.d.ts +4 -0
  303. package/dist/cjs-types/common/tree/tree.types.d.ts +67 -0
  304. package/dist/cjs-types/common/types/actions.types.d.ts +7 -0
  305. package/dist/cjs-types/common/types/baseProps.types.d.ts +29 -0
  306. package/dist/cjs-types/common/types/icon.types.d.ts +17 -0
  307. package/dist/cjs-types/common/types/slots.types.d.ts +4 -0
  308. package/dist/cjs-types/common/utils/activationKey.d.ts +9 -0
  309. package/dist/cjs-types/common/utils/interactiveTarget.d.ts +7 -0
  310. package/dist/cjs-types/common/utils/listNavigation.d.ts +49 -0
  311. package/dist/cjs-types/common/utils/mergeRefs.d.ts +12 -0
  312. package/dist/cjs-types/common/utils/renderIcon.d.ts +29 -0
  313. package/dist/cjs-types/common/utils/scrollAncestors.d.ts +12 -0
  314. package/dist/cjs-types/common/utils/visualViewport.d.ts +7 -0
  315. package/dist/cjs-types/common/virtualList/index.d.ts +2 -0
  316. package/dist/cjs-types/common/virtualList/scroller.d.ts +33 -0
  317. package/dist/cjs-types/common/virtualList/useColumnResize.d.ts +59 -0
  318. package/dist/cjs-types/common/virtualList/useColumns.d.ts +52 -0
  319. package/dist/cjs-types/common/virtualList/useHeaderNavigation.d.ts +22 -0
  320. package/dist/cjs-types/common/virtualList/useRowDrag.d.ts +63 -0
  321. package/dist/cjs-types/common/virtualList/useRowNavigation.d.ts +60 -0
  322. package/dist/cjs-types/common/virtualList/useSelection.d.ts +24 -0
  323. package/dist/cjs-types/common/virtualList/useSorting.d.ts +26 -0
  324. package/dist/cjs-types/common/virtualList/useVirtualWindow.d.ts +55 -0
  325. package/dist/cjs-types/common/virtualList/virtualList.d.ts +5 -0
  326. package/dist/cjs-types/common/virtualList/virtualList.types.d.ts +357 -0
  327. package/dist/cjs-types/common/virtualList/virtualList.utils.d.ts +126 -0
  328. package/dist/cjs-types/common/virtualList/virtualListHeader.d.ts +35 -0
  329. package/dist/cjs-types/common/virtualList/virtualRow.d.ts +62 -0
  330. package/dist/cjs-types/common/wizard/index.d.ts +1 -0
  331. package/dist/cjs-types/common/wizard/wizard.d.ts +3 -0
  332. package/dist/cjs-types/common/wizard/wizard.types.d.ts +12 -0
  333. package/dist/cjs-types/hooks/useWindowSize.d.ts +6 -0
  334. package/dist/cjs-types/index.d.ts +155 -0
  335. package/dist/cjs-types/package.json +3 -0
  336. package/dist/cjs-types/services/formValidation/FormValidatorGroupWithForm.d.ts +18 -0
  337. package/dist/cjs-types/services/formValidation/index.d.ts +5 -0
  338. package/dist/cjs-types/services/formValidation/useFormValidatorGroup.d.ts +10 -0
  339. package/dist/cjs-types/services/formValidation/validatableComponent.d.ts +36 -0
  340. package/dist/cjs-types/services/klipy.d.ts +36 -0
  341. package/dist/cjs-types/services/localization.d.ts +3 -0
  342. package/dist/esm/common/carousel/carousel.mjs +1 -1
  343. package/dist/esm/common/carousel/carousel.mjs.map +1 -1
  344. package/dist/esm/common/carousel/carousel.module.mjs.map +1 -1
  345. package/dist/esm/common/confirmModal/confirmModal.mjs +1 -1
  346. package/dist/esm/common/confirmModal/confirmModal.mjs.map +1 -1
  347. package/dist/esm/common/datePicker/datePicker.mjs +1 -1
  348. package/dist/esm/common/datePicker/datePicker.mjs.map +1 -1
  349. package/dist/esm/common/drawer/drawer.module.mjs.map +1 -1
  350. package/dist/esm/common/dropdown/dropdown.mjs +1 -1
  351. package/dist/esm/common/dropdown/dropdown.mjs.map +1 -1
  352. package/dist/esm/common/dropdown/dropdown.module.mjs +1 -1
  353. package/dist/esm/common/dropdown/dropdown.module.mjs.map +1 -1
  354. package/dist/esm/common/hooks/useHotkeys.mjs +2 -0
  355. package/dist/esm/common/hooks/useHotkeys.mjs.map +1 -0
  356. package/dist/esm/common/hooks/useScrollEdges.mjs +2 -0
  357. package/dist/esm/common/hooks/useScrollEdges.mjs.map +1 -0
  358. package/dist/esm/common/hooks/useSwipeDismiss.mjs +1 -1
  359. package/dist/esm/common/hooks/useSwipeDismiss.mjs.map +1 -1
  360. package/dist/esm/common/infiniteBlock/useInfiniteScroll.mjs +2 -0
  361. package/dist/esm/common/infiniteBlock/useInfiniteScroll.mjs.map +1 -0
  362. package/dist/esm/common/input/input.mjs +1 -1
  363. package/dist/esm/common/input/input.mjs.map +1 -1
  364. package/dist/esm/common/input/input.module.mjs +1 -1
  365. package/dist/esm/common/input/input.module.mjs.map +1 -1
  366. package/dist/esm/common/inputDropdown/inputDropdown.mjs +1 -1
  367. package/dist/esm/common/inputDropdown/inputDropdown.mjs.map +1 -1
  368. package/dist/esm/common/interactableDiv/interactableDiv.mjs +1 -1
  369. package/dist/esm/common/interactableDiv/interactableDiv.mjs.map +1 -1
  370. package/dist/esm/common/klipyPicker/components/gifPreview/gifPreview.module.mjs.map +1 -1
  371. package/dist/esm/common/klipyPicker/components/gifView/gifView.module.mjs.map +1 -1
  372. package/dist/esm/common/maskedInput/mask.mjs +2 -0
  373. package/dist/esm/common/maskedInput/mask.mjs.map +1 -0
  374. package/dist/esm/common/maskedInput/maskedInput.mjs +2 -0
  375. package/dist/esm/common/maskedInput/maskedInput.mjs.map +1 -0
  376. package/dist/esm/common/menu/menu.mjs +1 -1
  377. package/dist/esm/common/menu/menu.mjs.map +1 -1
  378. package/dist/esm/common/menu/menu.types.mjs.map +1 -1
  379. package/dist/esm/common/menu/menuHotkeys.mjs +2 -0
  380. package/dist/esm/common/menu/menuHotkeys.mjs.map +1 -0
  381. package/dist/esm/common/modal/modal.mjs +1 -1
  382. package/dist/esm/common/modal/modal.mjs.map +1 -1
  383. package/dist/esm/common/modal/modal.module.mjs +1 -1
  384. package/dist/esm/common/modal/modal.module.mjs.map +1 -1
  385. package/dist/esm/common/multiSelect/multiSelect.mjs +1 -1
  386. package/dist/esm/common/multiSelect/multiSelect.mjs.map +1 -1
  387. package/dist/esm/common/multiSelect/multiSelect.module.mjs +1 -1
  388. package/dist/esm/common/multiSelect/multiSelect.module.mjs.map +1 -1
  389. package/dist/esm/common/otpInput/otpInput.module.mjs.map +1 -1
  390. package/dist/esm/common/popover/usePopoverPosition.mjs +1 -1
  391. package/dist/esm/common/popover/usePopoverPosition.mjs.map +1 -1
  392. package/dist/esm/common/radioGroup/radioGroup.types.mjs.map +1 -1
  393. package/dist/esm/common/rating/rating.module.mjs.map +1 -1
  394. package/dist/esm/common/ripple/ripple.mjs +1 -1
  395. package/dist/esm/common/ripple/ripple.mjs.map +1 -1
  396. package/dist/esm/common/scrollFade/scrollFade.mjs +2 -0
  397. package/dist/esm/common/scrollFade/scrollFade.mjs.map +1 -0
  398. package/dist/esm/common/scrollFade/scrollFade.module.mjs +2 -0
  399. package/dist/esm/common/scrollFade/scrollFade.module.mjs.map +1 -0
  400. package/dist/esm/common/scrollFade/scrollFade.types.mjs +2 -0
  401. package/dist/esm/common/scrollFade/scrollFade.types.mjs.map +1 -0
  402. package/dist/esm/common/sticky/sticky.mjs +1 -1
  403. package/dist/esm/common/sticky/sticky.mjs.map +1 -1
  404. package/dist/esm/common/sticky/stickyStack.mjs +1 -1
  405. package/dist/esm/common/sticky/stickyStack.mjs.map +1 -1
  406. package/dist/esm/common/styles/scrollFade.module.mjs +2 -0
  407. package/dist/esm/common/styles/scrollFade.module.mjs.map +1 -0
  408. package/dist/esm/common/styles/sheet.module.mjs.map +1 -1
  409. package/dist/esm/common/timeInput/timeInput.mjs +1 -1
  410. package/dist/esm/common/timeInput/timeInput.mjs.map +1 -1
  411. package/dist/esm/common/utils/interactiveTarget.mjs +2 -0
  412. package/dist/esm/common/utils/interactiveTarget.mjs.map +1 -0
  413. package/dist/esm/common/utils/listNavigation.mjs +2 -0
  414. package/dist/esm/common/utils/listNavigation.mjs.map +1 -0
  415. package/dist/esm/common/utils/scrollAncestors.mjs +1 -1
  416. package/dist/esm/common/utils/scrollAncestors.mjs.map +1 -1
  417. package/dist/esm/common/virtualList/scroller.mjs +2 -0
  418. package/dist/esm/common/virtualList/scroller.mjs.map +1 -0
  419. package/dist/esm/common/virtualList/useRowDrag.mjs +1 -1
  420. package/dist/esm/common/virtualList/useRowDrag.mjs.map +1 -1
  421. package/dist/esm/common/virtualList/useRowNavigation.mjs +1 -1
  422. package/dist/esm/common/virtualList/useRowNavigation.mjs.map +1 -1
  423. package/dist/esm/common/virtualList/useVirtualWindow.mjs +1 -1
  424. package/dist/esm/common/virtualList/useVirtualWindow.mjs.map +1 -1
  425. package/dist/esm/common/virtualList/virtualList.mjs +1 -1
  426. package/dist/esm/common/virtualList/virtualList.mjs.map +1 -1
  427. package/dist/esm/common/virtualList/virtualList.module.mjs +1 -1
  428. package/dist/esm/common/virtualList/virtualList.module.mjs.map +1 -1
  429. package/dist/esm/common/wizard/wizard.module.mjs.map +1 -1
  430. package/dist/esm/index.mjs +1 -1
  431. package/dist/esm/og.png +0 -0
  432. package/dist/index.cjs +3 -3
  433. package/dist/index.cjs.map +1 -1
  434. package/dist/mcp.js +341 -56
  435. package/dist/og.png +0 -0
  436. package/dist/style.css +1 -1
  437. package/dist/types/common/accordion/accordion.d.ts +1 -1
  438. package/dist/types/common/accordion/accordion.types.d.ts +1 -1
  439. package/dist/types/common/accordion/index.d.ts +2 -2
  440. package/dist/types/common/actionButtons/actionButtons.d.ts +1 -1
  441. package/dist/types/common/actionButtons/actionButtons.types.d.ts +3 -3
  442. package/dist/types/common/actionButtons/index.d.ts +2 -2
  443. package/dist/types/common/actionIcon/actionIcon.d.ts +1 -1
  444. package/dist/types/common/actionIcon/actionIcon.types.d.ts +2 -2
  445. package/dist/types/common/actionIcon/index.d.ts +2 -2
  446. package/dist/types/common/alert/alert.d.ts +1 -1
  447. package/dist/types/common/alert/alert.types.d.ts +2 -2
  448. package/dist/types/common/alert/index.d.ts +2 -2
  449. package/dist/types/common/animatedIcon/animatedIcon.d.ts +1 -1
  450. package/dist/types/common/animatedIcon/animatedIcon.types.d.ts +1 -1
  451. package/dist/types/common/animatedIcon/index.d.ts +2 -2
  452. package/dist/types/common/animatedLogo/animatedLogo.d.ts +1 -1
  453. package/dist/types/common/animatedLogo/animatedLogo.types.d.ts +1 -1
  454. package/dist/types/common/animatedLogo/index.d.ts +2 -2
  455. package/dist/types/common/animatedText/animatedText.d.ts +1 -1
  456. package/dist/types/common/animatedText/animatedText.types.d.ts +1 -1
  457. package/dist/types/common/animatedText/index.d.ts +2 -2
  458. package/dist/types/common/avatar/avatar.d.ts +1 -1
  459. package/dist/types/common/avatar/avatar.types.d.ts +2 -2
  460. package/dist/types/common/avatar/avatarGroup.d.ts +1 -1
  461. package/dist/types/common/avatar/index.d.ts +3 -3
  462. package/dist/types/common/badge/badge.d.ts +1 -1
  463. package/dist/types/common/badge/badge.types.d.ts +1 -1
  464. package/dist/types/common/badge/index.d.ts +2 -2
  465. package/dist/types/common/bodyEnd/bodyEnd.d.ts +1 -1
  466. package/dist/types/common/bodyEnd/index.d.ts +2 -2
  467. package/dist/types/common/breadcrumb/breadcrumb.d.ts +1 -1
  468. package/dist/types/common/breadcrumb/breadcrumb.types.d.ts +2 -2
  469. package/dist/types/common/breadcrumb/index.d.ts +2 -2
  470. package/dist/types/common/button/button.d.ts +1 -1
  471. package/dist/types/common/button/button.types.d.ts +2 -2
  472. package/dist/types/common/button/index.d.ts +2 -2
  473. package/dist/types/common/buttonGroup/buttonGroup.d.ts +1 -1
  474. package/dist/types/common/buttonGroup/buttonGroup.types.d.ts +1 -1
  475. package/dist/types/common/buttonGroup/index.d.ts +2 -2
  476. package/dist/types/common/card/Card.d.ts +1 -1
  477. package/dist/types/common/card/CardActions.d.ts +1 -1
  478. package/dist/types/common/card/CardContent.d.ts +1 -1
  479. package/dist/types/common/card/CardHeader.d.ts +1 -1
  480. package/dist/types/common/card/CardMedia.d.ts +1 -1
  481. package/dist/types/common/card/card.types.d.ts +3 -3
  482. package/dist/types/common/card/index.d.ts +6 -6
  483. package/dist/types/common/carousel/carousel.d.ts +1 -1
  484. package/dist/types/common/carousel/carousel.types.d.ts +1 -1
  485. package/dist/types/common/carousel/index.d.ts +2 -2
  486. package/dist/types/common/checkbox/checkbox.d.ts +1 -1
  487. package/dist/types/common/checkbox/checkbox.types.d.ts +2 -2
  488. package/dist/types/common/checkbox/index.d.ts +2 -2
  489. package/dist/types/common/chip/chip.d.ts +1 -1
  490. package/dist/types/common/chip/chip.types.d.ts +1 -1
  491. package/dist/types/common/chip/chipContainer.d.ts +1 -1
  492. package/dist/types/common/chip/index.d.ts +3 -3
  493. package/dist/types/common/colorPicker/colorPicker.d.ts +1 -1
  494. package/dist/types/common/colorPicker/colorPicker.types.d.ts +1 -1
  495. package/dist/types/common/colorPicker/index.d.ts +2 -2
  496. package/dist/types/common/configProvider/configProvider.d.ts +2 -2
  497. package/dist/types/common/configProvider/configProvider.types.d.ts +44 -44
  498. package/dist/types/common/configProvider/index.d.ts +6 -6
  499. package/dist/types/common/configProvider/useComponentDefaults.d.ts +1 -1
  500. package/dist/types/common/configProvider/useLabels.d.ts +1 -1
  501. package/dist/types/common/configProvider/usePresentationDefault.d.ts +1 -1
  502. package/dist/types/common/confirmModal/confirmModal.d.ts +1 -1
  503. package/dist/types/common/confirmModal/confirmModal.types.d.ts +2 -2
  504. package/dist/types/common/confirmModal/index.d.ts +2 -2
  505. package/dist/types/common/datePicker/components/datePickerMonth/datePickerMonth.d.ts +1 -1
  506. package/dist/types/common/datePicker/components/datePickerMonth/index.d.ts +1 -1
  507. package/dist/types/common/datePicker/datePicker.d.ts +1 -1
  508. package/dist/types/common/datePicker/datePicker.types.d.ts +2 -2
  509. package/dist/types/common/datePicker/index.d.ts +2 -2
  510. package/dist/types/common/divider/divider.d.ts +1 -1
  511. package/dist/types/common/divider/divider.types.d.ts +1 -1
  512. package/dist/types/common/divider/index.d.ts +2 -2
  513. package/dist/types/common/drawer/drawer.d.ts +1 -1
  514. package/dist/types/common/drawer/drawer.types.d.ts +1 -1
  515. package/dist/types/common/drawer/index.d.ts +2 -2
  516. package/dist/types/common/dropZone/dropZone.d.ts +1 -1
  517. package/dist/types/common/dropZone/dropZone.types.d.ts +1 -1
  518. package/dist/types/common/dropZone/index.d.ts +2 -2
  519. package/dist/types/common/dropdown/dropdown.d.ts +1 -1
  520. package/dist/types/common/dropdown/dropdown.types.d.ts +3 -3
  521. package/dist/types/common/dropdown/index.d.ts +2 -2
  522. package/dist/types/common/emptyState/emptyState.d.ts +1 -1
  523. package/dist/types/common/emptyState/emptyState.types.d.ts +2 -2
  524. package/dist/types/common/emptyState/index.d.ts +2 -2
  525. package/dist/types/common/errorBoundary/errorBoundary.d.ts +1 -1
  526. package/dist/types/common/errorBoundary/errorBoundary.types.d.ts +1 -1
  527. package/dist/types/common/errorBoundary/index.d.ts +2 -2
  528. package/dist/types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  529. package/dist/types/common/fab/components/fabBase/fabBase.types.d.ts +1 -1
  530. package/dist/types/common/fab/components/fabBase/index.d.ts +1 -1
  531. package/dist/types/common/fab/fab.d.ts +1 -1
  532. package/dist/types/common/fab/fab.types.d.ts +2 -2
  533. package/dist/types/common/fab/index.d.ts +2 -2
  534. package/dist/types/common/flip/flip.d.ts +1 -1
  535. package/dist/types/common/flip/flip.types.d.ts +1 -1
  536. package/dist/types/common/flip/index.d.ts +2 -2
  537. package/dist/types/common/floorPlan/floorPlan.faces.d.ts +2 -2
  538. package/dist/types/common/floorPlan/floorPlan.fixtures.d.ts +1 -1
  539. package/dist/types/common/floorPlan/floorPlan.geometry.d.ts +1 -1
  540. package/dist/types/common/floorPlan/floorPlan.graph.d.ts +1 -1
  541. package/dist/types/common/floorPlan/floorPlan.hit.d.ts +1 -1
  542. package/dist/types/common/floorPlan/floorPlan.json.d.ts +1 -1
  543. package/dist/types/common/floorPlan/floorPlan.mesh.d.ts +1 -1
  544. package/dist/types/common/floorPlan/floorPlan.path.d.ts +1 -1
  545. package/dist/types/common/floorPlan/floorPlan.plan.d.ts +1 -1
  546. package/dist/types/common/floorPlan/floorPlan.rooms.d.ts +1 -1
  547. package/dist/types/common/floorPlan/floorPlan.snap.d.ts +1 -1
  548. package/dist/types/common/floorPlan/floorPlan.triangulate.d.ts +1 -1
  549. package/dist/types/common/floorPlan/index.d.ts +22 -22
  550. package/dist/types/common/floorPlan/legacySvg.d.ts +2 -2
  551. package/dist/types/common/hooks/index.d.ts +13 -0
  552. package/dist/types/common/hooks/useHotkeys.d.ts +45 -0
  553. package/dist/types/common/hooks/useScrollEdges.d.ts +18 -0
  554. package/dist/types/common/hooks/useSheet.d.ts +1 -1
  555. package/dist/types/common/hooks/useSwipeDismiss.d.ts +6 -2
  556. package/dist/types/common/iconPicker/iconPicker.d.ts +1 -1
  557. package/dist/types/common/iconPicker/iconPicker.types.d.ts +2 -2
  558. package/dist/types/common/iconPicker/index.d.ts +2 -1
  559. package/dist/types/common/idleManager/idleManager.d.ts +1 -1
  560. package/dist/types/common/idleManager/index.d.ts +2 -1
  561. package/dist/types/common/infiniteBlock/useInfiniteScroll.d.ts +5 -0
  562. package/dist/types/common/input/index.d.ts +2 -2
  563. package/dist/types/common/input/input.d.ts +1 -1
  564. package/dist/types/common/input/input.types.d.ts +2 -2
  565. package/dist/types/common/inputDropdown/index.d.ts +2 -1
  566. package/dist/types/common/inputDropdown/inputDropdown.d.ts +1 -1
  567. package/dist/types/common/inputDropdown/inputDropdown.types.d.ts +2 -2
  568. package/dist/types/common/interactableDiv/index.d.ts +1 -1
  569. package/dist/types/common/interactableDiv/interactableDiv.d.ts +1 -1
  570. package/dist/types/common/kanbanBoard/KanbanBoard.d.ts +1 -1
  571. package/dist/types/common/kanbanBoard/KanbanColumn.d.ts +1 -1
  572. package/dist/types/common/kanbanBoard/KanbanItem.d.ts +1 -1
  573. package/dist/types/common/kanbanBoard/index.d.ts +3 -3
  574. package/dist/types/common/kanbanBoard/kanbanBoard.types.d.ts +1 -1
  575. package/dist/types/common/kanbanBoard/kanbanBoard.utils.d.ts +1 -1
  576. package/dist/types/common/klipyPicker/components/gifPreview/gifPreview.d.ts +1 -1
  577. package/dist/types/common/klipyPicker/components/gifPreview/gifPreview.types.d.ts +1 -1
  578. package/dist/types/common/klipyPicker/components/gifPreview/index.d.ts +1 -1
  579. package/dist/types/common/klipyPicker/components/gifView/gifView.d.ts +1 -1
  580. package/dist/types/common/klipyPicker/components/gifView/index.d.ts +1 -1
  581. package/dist/types/common/klipyPicker/index.d.ts +2 -2
  582. package/dist/types/common/klipyPicker/klipyPicker.d.ts +1 -1
  583. package/dist/types/common/klipyPicker/klipyPicker.types.d.ts +1 -1
  584. package/dist/types/common/loading/index.d.ts +1 -2
  585. package/dist/types/common/loading/spinnerLoading/index.d.ts +1 -1
  586. package/dist/types/common/maskedInput/index.d.ts +2 -0
  587. package/dist/types/common/maskedInput/mask.d.ts +48 -0
  588. package/dist/types/common/maskedInput/maskedInput.d.ts +13 -0
  589. package/dist/types/common/maskedInput/maskedInput.types.d.ts +38 -0
  590. package/dist/types/common/menu/index.d.ts +3 -2
  591. package/dist/types/common/menu/menu.d.ts +1 -1
  592. package/dist/types/common/menu/menu.types.d.ts +13 -7
  593. package/dist/types/common/menu/menuHotkeys.d.ts +20 -0
  594. package/dist/types/common/modal/index.d.ts +2 -2
  595. package/dist/types/common/modal/modal.d.ts +1 -1
  596. package/dist/types/common/modal/modal.types.d.ts +6 -3
  597. package/dist/types/common/multiSelect/index.d.ts +2 -2
  598. package/dist/types/common/multiSelect/multiSelect.d.ts +1 -1
  599. package/dist/types/common/multiSelect/multiSelect.types.d.ts +3 -3
  600. package/dist/types/common/numberInput/index.d.ts +2 -2
  601. package/dist/types/common/numberInput/numberInput.d.ts +2 -2
  602. package/dist/types/common/numberInput/numberInput.types.d.ts +2 -2
  603. package/dist/types/common/optionPicker/index.d.ts +2 -2
  604. package/dist/types/common/optionPicker/optionPicker.d.ts +1 -1
  605. package/dist/types/common/optionPicker/optionPicker.types.d.ts +1 -1
  606. package/dist/types/common/otpInput/index.d.ts +2 -2
  607. package/dist/types/common/otpInput/otpInput.d.ts +1 -1
  608. package/dist/types/common/otpInput/otpInput.types.d.ts +2 -2
  609. package/dist/types/common/overscroll/index.d.ts +2 -2
  610. package/dist/types/common/overscroll/overscroll.d.ts +1 -1
  611. package/dist/types/common/pagination/index.d.ts +2 -2
  612. package/dist/types/common/pagination/pagination.d.ts +1 -1
  613. package/dist/types/common/pagination/pagination.types.d.ts +2 -2
  614. package/dist/types/common/planCanvas/index.d.ts +2 -2
  615. package/dist/types/common/planCanvas/planCanvas.d.ts +1 -1
  616. package/dist/types/common/planCanvas/planCanvas.types.d.ts +2 -2
  617. package/dist/types/common/popover/index.d.ts +2 -2
  618. package/dist/types/common/popover/popover.d.ts +1 -1
  619. package/dist/types/common/popover/popover.types.d.ts +2 -2
  620. package/dist/types/common/popover/usePopoverPosition.d.ts +2 -1
  621. package/dist/types/common/progressBar/index.d.ts +2 -2
  622. package/dist/types/common/progressBar/progressBar.d.ts +1 -1
  623. package/dist/types/common/progressBar/progressBar.types.d.ts +1 -1
  624. package/dist/types/common/radioGroup/index.d.ts +2 -2
  625. package/dist/types/common/radioGroup/radioGroup.d.ts +1 -1
  626. package/dist/types/common/radioGroup/radioGroup.types.d.ts +3 -3
  627. package/dist/types/common/rating/index.d.ts +2 -2
  628. package/dist/types/common/rating/rating.d.ts +1 -1
  629. package/dist/types/common/rating/rating.types.d.ts +2 -2
  630. package/dist/types/common/revealLens/index.d.ts +2 -2
  631. package/dist/types/common/revealLens/revealLens.d.ts +1 -1
  632. package/dist/types/common/revealLens/revealLens.types.d.ts +1 -1
  633. package/dist/types/common/ripple/index.d.ts +2 -2
  634. package/dist/types/common/ripple/ripple.d.ts +1 -1
  635. package/dist/types/common/ripple/ripple.types.d.ts +1 -1
  636. package/dist/types/common/roomDrawer/index.d.ts +2 -2
  637. package/dist/types/common/roomDrawer/roomDrawer.d.ts +1 -1
  638. package/dist/types/common/roomDrawer/roomDrawer.types.d.ts +3 -3
  639. package/dist/types/common/roomDrawer/usePlanHistory.d.ts +2 -2
  640. package/dist/types/common/roomViewer/index.d.ts +2 -2
  641. package/dist/types/common/roomViewer/roomViewer.d.ts +1 -1
  642. package/dist/types/common/roomViewer/roomViewer.types.d.ts +3 -3
  643. package/dist/types/common/scrollFade/index.d.ts +2 -0
  644. package/dist/types/common/scrollFade/scrollFade.d.ts +4 -0
  645. package/dist/types/common/scrollFade/scrollFade.types.d.ts +20 -0
  646. package/dist/types/common/scrollbarProvider/index.d.ts +1 -1
  647. package/dist/types/common/searchInput/index.d.ts +2 -2
  648. package/dist/types/common/searchInput/searchInput.d.ts +1 -1
  649. package/dist/types/common/searchInput/searchInput.types.d.ts +1 -1
  650. package/dist/types/common/sectionHeader/index.d.ts +2 -2
  651. package/dist/types/common/sectionHeader/sectionHeader.d.ts +1 -1
  652. package/dist/types/common/sectionHeader/sectionHeader.types.d.ts +3 -3
  653. package/dist/types/common/sheetBackdrop/index.d.ts +2 -2
  654. package/dist/types/common/sheetBackdrop/sheetBackdrop.d.ts +1 -1
  655. package/dist/types/common/skeleton/index.d.ts +2 -2
  656. package/dist/types/common/skeleton/skeleton.d.ts +1 -1
  657. package/dist/types/common/skeleton/skeleton.types.d.ts +1 -1
  658. package/dist/types/common/slider/index.d.ts +2 -2
  659. package/dist/types/common/slider/slider.d.ts +1 -1
  660. package/dist/types/common/slider/slider.types.d.ts +2 -2
  661. package/dist/types/common/splitButton/index.d.ts +2 -2
  662. package/dist/types/common/splitButton/splitButton.d.ts +1 -1
  663. package/dist/types/common/splitButton/splitButton.types.d.ts +4 -4
  664. package/dist/types/common/stepper/index.d.ts +2 -2
  665. package/dist/types/common/stepper/stepper.d.ts +1 -1
  666. package/dist/types/common/stepper/stepper.types.d.ts +2 -2
  667. package/dist/types/common/sticky/index.d.ts +1 -1
  668. package/dist/types/common/sticky/sticky.d.ts +2 -2
  669. package/dist/types/common/sticky/sticky.types.d.ts +16 -1
  670. package/dist/types/common/sticky/stickyStack.d.ts +5 -0
  671. package/dist/types/common/switch/index.d.ts +2 -2
  672. package/dist/types/common/switch/switch.d.ts +1 -1
  673. package/dist/types/common/switch/switch.types.d.ts +2 -2
  674. package/dist/types/common/tabHeader/index.d.ts +2 -2
  675. package/dist/types/common/tabHeader/tabHeader.d.ts +1 -1
  676. package/dist/types/common/tabHeader/tabHeader.types.d.ts +2 -2
  677. package/dist/types/common/textarea/index.d.ts +2 -2
  678. package/dist/types/common/textarea/textarea.d.ts +1 -1
  679. package/dist/types/common/textarea/textarea.types.d.ts +1 -1
  680. package/dist/types/common/themeProvider/defaultTheme.d.ts +1 -1
  681. package/dist/types/common/themeProvider/index.d.ts +4 -4
  682. package/dist/types/common/themeProvider/lightTheme.d.ts +1 -1
  683. package/dist/types/common/themeProvider/theme.types.d.ts +28 -0
  684. package/dist/types/common/themeProvider/themeProvider.d.ts +1 -1
  685. package/dist/types/common/tilt/index.d.ts +4 -4
  686. package/dist/types/common/tilt/tilt.d.ts +1 -1
  687. package/dist/types/common/tilt/tilt.types.d.ts +2 -2
  688. package/dist/types/common/tiltGroup/index.d.ts +3 -3
  689. package/dist/types/common/tiltGroup/tiltGroup.d.ts +1 -1
  690. package/dist/types/common/tiltGroup/tiltGroup.types.d.ts +1 -1
  691. package/dist/types/common/timeInput/components/clockDial/clockDial.d.ts +1 -1
  692. package/dist/types/common/timeInput/components/clockDial/clockDial.types.d.ts +3 -3
  693. package/dist/types/common/timeInput/components/clockDial/index.d.ts +1 -1
  694. package/dist/types/common/timeInput/index.d.ts +1 -1
  695. package/dist/types/common/timeInput/timeInput.d.ts +1 -1
  696. package/dist/types/common/timeInput/timeInput.types.d.ts +2 -2
  697. package/dist/types/common/timeline/index.d.ts +2 -2
  698. package/dist/types/common/timeline/timeline.d.ts +1 -1
  699. package/dist/types/common/timeline/timeline.types.d.ts +2 -2
  700. package/dist/types/common/timer/index.d.ts +2 -2
  701. package/dist/types/common/timer/timer.d.ts +1 -1
  702. package/dist/types/common/timer/timer.types.d.ts +2 -2
  703. package/dist/types/common/toast/index.d.ts +3 -3
  704. package/dist/types/common/toast/toast.d.ts +1 -1
  705. package/dist/types/common/toast/toast.types.d.ts +1 -1
  706. package/dist/types/common/toast/toastProvider.d.ts +1 -1
  707. package/dist/types/common/toast/toastService.d.ts +1 -1
  708. package/dist/types/common/tooltip/index.d.ts +2 -2
  709. package/dist/types/common/tooltip/tooltip.d.ts +1 -1
  710. package/dist/types/common/tree/flattenTree.d.ts +1 -1
  711. package/dist/types/common/tree/index.d.ts +3 -3
  712. package/dist/types/common/tree/tree.d.ts +1 -1
  713. package/dist/types/common/tree/tree.types.d.ts +2 -2
  714. package/dist/types/common/types/actions.types.d.ts +1 -1
  715. package/dist/types/common/types/slots.types.d.ts +1 -1
  716. package/dist/types/common/utils/interactiveTarget.d.ts +7 -0
  717. package/dist/types/common/utils/listNavigation.d.ts +49 -0
  718. package/dist/types/common/utils/renderIcon.d.ts +1 -1
  719. package/dist/types/common/utils/scrollAncestors.d.ts +10 -0
  720. package/dist/types/common/virtualList/index.d.ts +2 -2
  721. package/dist/types/common/virtualList/scroller.d.ts +33 -0
  722. package/dist/types/common/virtualList/useColumnResize.d.ts +1 -1
  723. package/dist/types/common/virtualList/useColumns.d.ts +1 -1
  724. package/dist/types/common/virtualList/useRowDrag.d.ts +7 -2
  725. package/dist/types/common/virtualList/useRowNavigation.d.ts +12 -2
  726. package/dist/types/common/virtualList/useSorting.d.ts +1 -1
  727. package/dist/types/common/virtualList/useVirtualWindow.d.ts +22 -3
  728. package/dist/types/common/virtualList/virtualList.d.ts +3 -3
  729. package/dist/types/common/virtualList/virtualList.types.d.ts +44 -4
  730. package/dist/types/common/virtualList/virtualList.utils.d.ts +1 -1
  731. package/dist/types/common/virtualList/virtualListHeader.d.ts +4 -4
  732. package/dist/types/common/virtualList/virtualRow.d.ts +1 -1
  733. package/dist/types/common/wizard/index.d.ts +1 -1
  734. package/dist/types/common/wizard/wizard.d.ts +1 -1
  735. package/dist/types/common/wizard/wizard.types.d.ts +1 -1
  736. package/dist/types/index.d.ts +154 -153
  737. package/dist/types/services/formValidation/index.d.ts +3 -3
  738. package/dist/types/services/formValidation/useFormValidatorGroup.d.ts +1 -1
  739. package/docs/ActionIcon.md +2 -0
  740. package/docs/CLAUDE.md +124 -230
  741. package/docs/Card.md +1 -1
  742. package/docs/Divider.md +2 -0
  743. package/docs/Dropdown.md +20 -0
  744. package/docs/Hooks.md +232 -0
  745. package/docs/IdleManager.md +38 -8
  746. package/docs/InputDropdown.md +11 -0
  747. package/docs/InteractableDiv.md +7 -1
  748. package/docs/KlipyPicker.md +1 -1
  749. package/docs/Loading.md +57 -14
  750. package/docs/Menu.md +27 -3
  751. package/docs/Modal.md +34 -10
  752. package/docs/MultiSelect.md +2 -2
  753. package/docs/Pagination.md +1 -1
  754. package/docs/Popover.md +4 -0
  755. package/docs/RadioGroup.md +1 -1
  756. package/docs/Rating.md +2 -0
  757. package/docs/Ripple.md +3 -0
  758. package/docs/RoomViewer.md +3 -5
  759. package/docs/ScrollFade.md +77 -0
  760. package/docs/ScrollbarProvider.md +2 -0
  761. package/docs/Slider.md +1 -1
  762. package/docs/Sticky.md +22 -1
  763. package/docs/Timer.md +1 -1
  764. package/docs/VirtualList.md +44 -4
  765. package/docs/Wizard.md +1 -1
  766. package/package.json +33 -11
  767. package/dist/esm/common/infiniteBlock/infiniteBlock.mjs +0 -2
  768. package/dist/esm/common/infiniteBlock/infiniteBlock.mjs.map +0 -1
  769. package/dist/esm/common/infiniteBlock/infiniteBlock.module.mjs +0 -2
  770. package/dist/esm/common/infiniteBlock/infiniteBlock.module.mjs.map +0 -1
  771. package/dist/esm/common/loading/iconLoading/iconLoading.mjs +0 -2
  772. package/dist/esm/common/loading/iconLoading/iconLoading.mjs.map +0 -1
  773. package/dist/esm/common/loading/iconLoading/iconLoading.module.mjs +0 -2
  774. package/dist/esm/common/loading/iconLoading/iconLoading.module.mjs.map +0 -1
  775. package/dist/esm/common/loading/iconLoading/index.mjs +0 -2
  776. package/dist/esm/common/loading/iconLoading/index.mjs.map +0 -1
  777. package/dist/types/common/infiniteBlock/index.d.ts +0 -1
  778. package/dist/types/common/infiniteBlock/infiniteBlock.d.ts +0 -4
  779. package/dist/types/common/infiniteBlock/infiniteBlock.types.d.ts +0 -13
  780. package/dist/types/common/loading/iconLoading/iconLoading.d.ts +0 -5
  781. package/dist/types/common/loading/iconLoading/index.d.ts +0 -2
  782. package/docs/Icon.md +0 -27
  783. package/docs/InfiniteBlock.md +0 -23
@@ -1,2 +1,2 @@
1
- "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{usePresentationDefault as t}from"../configProvider/usePresentationDefault.mjs";import{Presentation as n}from"../configProvider/presentation.types.mjs";import ee from"../styles/sheet.module.mjs";import{PopoverAlign as te,PopoverPlacement as ne}from"../popover/popover.types.mjs";import r from"../hooks/useSheet.mjs";import re from"../popover/popover.mjs";import i from"../tooltip/tooltip.mjs";import ie from"../infiniteBlock/infiniteBlock.mjs";import a from"./dropdown.module.mjs";import{useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import u from"classnames";import{FontAwesomeIcon as ae}from"@fortawesome/react-fontawesome";import{faChevronDown as oe}from"@fortawesome/free-solid-svg-icons";import{jsx as d,jsxs as f}from"react/jsx-runtime";import se from"downshift";function p(p){let{errorMessage:m=``,className:ce=``,style:le,label:h=``,value:ue=``,isValid:de=!0,tabIndex:g=0,isRequired:_=!1,customProps:v={},isRow:fe=!1,disabled:y=!1,readOnly:b=!1,onScroll:pe=()=>Promise.resolve(),onClick:x,onChange:S,onFocus:me=null,onBlur:he=null,onMouseEnter:ge=null,onMouseLeave:_e=null,dropdownLabel:ve,isDropdownListWider:C=!1,formValidator:w=null,classNames:T,styles:E,items:D=[],useMatLabelStyle:O=!0,alwaysFloatLabel:k=!1,placeholder:A=``,plainStyle:j=!1,scrollToSelected:M=!1,presentation:N,reactRef:P,...F}=e(`Dropdown`,p),[I,L]=l(!1),[ye,R]=l(!1),[,be]=l(0),z=c(w),B=c(null),V=c(null),[H,xe]=l(!1),Se=t(),U=N??Se??n.Default,{isSheet:W}=r(U);s(()=>{let e=B.current,t=V.current;H&&!W&&e&&t&&(t.style.fontSize=window.getComputedStyle(e).fontSize)},[H,W]),o(()=>{if(z.current=w,!z.current)return;z.current.label=h??``,z.current.validate();let e=()=>be(e=>e+1);return z.current.registerOnUpdateListener(e),()=>z.current?.removeOnUpdateListener(e)},[w,h]);let Ce=e=>{R(!0),ge?.(e)},we=e=>{R(!1),_e?.(e)},Te=e=>{L(!0),me?.(e)},Ee=e=>{z.current&&(z.current.touched=!0),L(!1),he?.(e)},De=()=>w?w.touched&&w.hasError():!de||!!m,G=()=>!!(_||w?.validators.find(e=>e.validatorId===`required`)),K=e=>{w?(w.set(e),S?.(w.value,v)):S?.(e,v)},q=ve,J=w?w.value:ue,Y=De();D.forEach(e=>{e.key===J&&(q=e.label)});let X=q||J,Z=X==null||typeof X==`string`&&X.trim()===``,Q=G()?d(`span`,{className:a.requiredMark,children:`*`}):null,Oe=h&&G()?`${h} *`:h,$=I&&!b;return f(`div`,{...F,className:u(ce,T?.root,a.dropdownLabel,a.dropdown,{[a.dropdownLabelColumn]:!fe}),style:{...le,...E?.root},onMouseEnter:Ce,onMouseLeave:we,children:[d(se,{...b?{isOpen:!1}:{},onChange:e=>K((e||{key:``}).key),itemToString:e=>e?String(e.key):``,selectedItem:D.find(e=>e.key===J)??null,onStateChange:e=>{typeof e.isOpen==`boolean`&&xe(e.isOpen)},stateReducer:(e,t)=>M&&Object.prototype.hasOwnProperty.call(t,`isOpen`)?{...t,highlightedIndex:t.isOpen?D.indexOf(e.selectedItem):null}:t,children:({getItemProps:e,getMenuProps:t,getToggleButtonProps:n,closeMenu:r,isOpen:i,selectedItem:o,highlightedIndex:s,setHighlightedIndex:c})=>d(`div`,{children:d(re,{isOpen:!y&&!b&&i,onOpenChange:e=>{e||r()},placement:ne.Bottom,align:te.Start,offset:0,withArrow:!1,constrainWidth:!1,width:`trigger`,closeOnTriggerClick:!1,focusOnOpen:!1,presentation:U,classNames:{panel:a.dropdownPanel},content:d(`div`,{...t({ref:e=>{V.current=e},"aria-label":h||A||void 0},{suppressRefError:!0}),className:u(!W&&a.dropdownInputListAnim,{[a.dropdownInputListAnimWider]:C&&!W}),children:d(ie,{onScroll:pe,className:u(a.dropdownInputList,W&&ee.sheetScroll,T?.list),style:E?.list,setHighlightedIndex:c,children:D.map((t,n)=>d(`div`,{...e({index:n,item:t,disabled:!!t.disabled}),style:E?.option,className:u(a.dropdownInputListItem,T?.option,{[a.dropdownInputListItemActive]:s===n,[a.dropdownInputListItemSelected]:o===t,[a.dropdownInputListItemDisabled]:!!t.disabled}),children:t.label},t.key))})}),children:f(`div`,{ref:B,onFocus:Te,onBlur:Ee,className:u(a.dropdownInput,{[a.dropdownInputPlain]:j,[a.dropdownInputReadOnly]:b&&!y},T?.field),style:E?.field,children:[d(`button`,{tabIndex:g,type:`button`,disabled:y,"aria-readonly":b||void 0,className:u(a.dropdownInputButton,{[a.dropdownInputButtonDisabled]:y,[a.dropdownInputButtonReadOnly]:b&&!y},T?.control),style:{...C?{padding:`6px`,border:`none`}:{},...E?.control},...n(),onClick:e=>{n().onClick?.(e),x?.(e)},ref:P,children:Z?`\xA0`:X}),d(`button`,{type:`button`,tabIndex:-1,disabled:y,className:u(a.dropdownInputButtonIcon,T?.icon),style:E?.icon,...n(),onMouseDown:e=>e.preventDefault(),onClick:e=>{n().onClick?.(e),x?.(e)},children:!y&&!b&&d(ae,{icon:oe,className:u(a.dropdownInputButtonIconArrow,{[a.dropdownInputButtonIconArrowOpen]:i})})}),d(`fieldset`,{className:u(a.dropdownFieldset,{[a.dropdownBorderPlain]:j,[a.dropdownBorderFocused]:$,[a.dropdownBorderInvalid]:Y,[a.dropdownBorderError]:Y}),children:d(`legend`,{className:u(a.dropdownFieldsetLegend,{[a.dropdownFieldsetLegendActive]:O&&(k||$||!Z)}),children:d(`span`,{children:Oe})})}),O&&h&&f(`div`,{className:u(a.dropdownMatLabel,{[a.dropdownMatLabelFloating]:k||$||!Z},T?.label),style:E?.label,children:[h,Q]}),O&&A&&d(`div`,{className:u(a.dropdownPlaceholder,$&&!q&&a.dropdownPlaceholderShown),children:A})]})})})}),h&&!O&&f(`div`,{className:u(a.dropdownLabelText,T?.label),style:E?.label,children:[h,Q]}),d(i,{variant:`error`,message:w?w.getCurrentErrorMessage():m||``,isVisible:Y&&(I||ye)})]})}export{p as default};
1
+ "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{usePresentationDefault as t}from"../configProvider/usePresentationDefault.mjs";import{Presentation as n}from"../configProvider/presentation.types.mjs";import r from"../loading/spinnerLoading/index.mjs";import i from"../styles/sheet.module.mjs";import{PopoverAlign as ee,PopoverPlacement as te}from"../popover/popover.types.mjs";import ne from"../hooks/useSheet.mjs";import re from"../popover/popover.mjs";import ie from"../tooltip/tooltip.mjs";import{useInfiniteScroll as ae}from"../infiniteBlock/useInfiniteScroll.mjs";import{edgeIndex as oe,nextIndex as se,scrollOptionIntoView as ce}from"../utils/listNavigation.mjs";import a from"./dropdown.module.mjs";import{useEffect as o,useId as le,useLayoutEffect as ue,useRef as s,useState as c}from"react";import l from"classnames";import{FontAwesomeIcon as de}from"@fortawesome/react-fontawesome";import{faChevronDown as fe}from"@fortawesome/free-solid-svg-icons";import{jsx as u,jsxs as d}from"react/jsx-runtime";var pe=500;function f(f){let{errorMessage:p=``,className:me=``,style:he,label:m=``,value:ge=``,isValid:_e=!0,tabIndex:ve=0,isRequired:ye=!1,customProps:h={},isRow:be=!1,disabled:g=!1,readOnly:_=!1,onScroll:xe=()=>Promise.resolve(),onClick:v,onChange:y,onFocus:Se=null,onBlur:Ce=null,onMouseEnter:we=null,onMouseLeave:Te=null,dropdownLabel:Ee,isDropdownListWider:b=!1,formValidator:x=null,classNames:S,styles:C,items:w=[],useMatLabelStyle:T=!0,alwaysFloatLabel:E=!1,placeholder:D=``,plainStyle:O=!1,scrollToSelected:De=!1,presentation:Oe,reactRef:ke,...Ae}=e(`Dropdown`,f),[je,Me]=c(!1),[Ne,Pe]=c(!1),[,Fe]=c(0),k=s(x),A=s(null),j=s(null),M=s(null),[Ie,Le]=c(!1),[N,P]=c(null),F=s({buffer:``,at:0}),I=le(),L=`${I}-listbox`,R=`${I}-label`,z=e=>`${I}-option-${e}`,B=!g&&!_,V=Ie&&B,{isLoading:Re,sentinelRef:ze}=ae(M,xe,!1),Be=t(),H=Oe??Be??n.Default,{isSheet:U}=ne(H);ue(()=>{let e=A.current,t=j.current;V&&!U&&e&&t&&(t.style.fontSize=window.getComputedStyle(e).fontSize)},[V,U]),o(()=>{if(k.current=x,!k.current)return;k.current.label=m??``,k.current.validate();let e=()=>Fe(e=>e+1);return k.current.registerOnUpdateListener(e),()=>k.current?.removeOnUpdateListener(e)},[x,m]);let W=x?x.value:ge,G=w.findIndex(e=>e.key===W);o(()=>{V&&N!==null&&ce(M.current,document.getElementById(z(N)))},[V,N]);let Ve=e=>{Pe(!0),we?.(e)},He=e=>{Pe(!1),Te?.(e)},Ue=e=>{Me(!0),Se?.(e)},We=e=>{k.current&&(k.current.touched=!0),Me(!1),Ce?.(e)},Ge=()=>x?x.touched&&x.hasError():!_e||!!p,K=()=>!!(ye||x?.validators.find(e=>e.validatorId===`required`)),Ke=e=>{x?(x.set(e),y?.(x.value,h)):y?.(e,h)};function q(e){(!e||B)&&(Le(e),e?P(De&&G>=0?G:null):F.current={buffer:``,at:0})}function J(e){e.disabled||(Ke(e.key),q(!1))}let qe={isDisabled:e=>!!w[e].disabled};function Je(e){let t=Date.now(),n=t-F.current.at>pe?e:F.current.buffer+e;F.current={buffer:n,at:t};let r=n.toLowerCase(),i=w.findIndex(e=>!e.disabled&&typeof e.label==`string`&&e.label.toLowerCase().startsWith(r));i!==-1&&(V?P(i):J(w[i]))}function Ye(e){if(B){if(!V){e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `?(e.preventDefault(),q(!0)):e.key.length===1&&Je(e.key);return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),P(se(N,e.key===`ArrowDown`?1:-1,w.length,qe));else if(e.key===`Home`||e.key===`End`)e.preventDefault(),P(oe(e.key===`Home`?`first`:`last`,w.length,qe));else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=N===null?void 0:w[N];t?J(t):q(!1)}else e.key===`Escape`||e.key===`Tab`?q(!1):e.key.length===1&&Je(e.key)}}let Y=Ee,X=Ge();w.forEach(e=>{e.key===W&&(Y=e.label)});let Z=Y||W,Q=Z==null||typeof Z==`string`&&Z.trim()===``,Xe=K()?u(`span`,{className:a.requiredMark,children:`*`}):null,Ze=m&&K()?`${m} *`:m,$=je&&!_;return d(`div`,{...Ae,className:l(me,S?.root,a.dropdownLabel,a.dropdown,{[a.dropdownLabelColumn]:!be}),style:{...he,...C?.root},onMouseEnter:Ve,onMouseLeave:He,children:[u(`div`,{children:u(re,{isOpen:V,onOpenChange:q,disabled:!B,placement:te.Bottom,align:ee.Start,offset:0,withArrow:!1,constrainWidth:!1,width:`trigger`,focusOnOpen:!1,presentation:H,classNames:{panel:a.dropdownPanel},content:u(`div`,{ref:j,className:l(!U&&a.dropdownInputListAnim,{[a.dropdownInputListAnimWider]:b&&!U}),children:d(`div`,{ref:M,id:L,role:`listbox`,"aria-label":m||D||void 0,className:l(a.dropdownInputList,U&&i.sheetScroll,S?.list),style:C?.list,children:[w.map((e,t)=>u(`div`,{id:z(t),role:`option`,"aria-selected":e.key===W,"aria-disabled":e.disabled||void 0,style:C?.option,className:l(a.dropdownInputListItem,S?.option,{[a.dropdownInputListItemActive]:N===t,[a.dropdownInputListItemSelected]:e.key===W,[a.dropdownInputListItemDisabled]:!!e.disabled}),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>P(t),onClick:()=>J(e),children:e.label},e.key)),u(`div`,{ref:ze,className:a.dropdownSentinel,"aria-hidden":`true`}),Re&&u(`div`,{className:a.dropdownLoadMore,"aria-hidden":`true`,children:u(r,{className:a.dropdownLoadMoreSpinner})})]})}),children:d(`div`,{ref:A,onFocus:Ue,onBlur:We,className:l(a.dropdownInput,{[a.dropdownInputPlain]:O,[a.dropdownInputReadOnly]:_&&!g},S?.field),style:C?.field,children:[u(`button`,{tabIndex:ve,type:`button`,disabled:g,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":V,"aria-controls":L,"aria-activedescendant":V&&N!==null?z(N):void 0,"aria-labelledby":m?R:void 0,"aria-label":m?void 0:D||void 0,"aria-readonly":_||void 0,className:l(a.dropdownInputButton,{[a.dropdownInputButtonDisabled]:g,[a.dropdownInputButtonReadOnly]:_&&!g},S?.control),style:{...b?{padding:`6px`,border:`none`}:{},...C?.control},onKeyDown:Ye,onClick:v,ref:ke,children:Q?`\xA0`:Z}),u(`button`,{type:`button`,tabIndex:-1,disabled:g,"aria-hidden":`true`,className:l(a.dropdownInputButtonIcon,S?.icon),style:C?.icon,onMouseDown:e=>e.preventDefault(),onClick:v,children:!g&&!_&&u(de,{icon:fe,className:l(a.dropdownInputButtonIconArrow,{[a.dropdownInputButtonIconArrowOpen]:V})})}),u(`fieldset`,{className:l(a.dropdownFieldset,{[a.dropdownBorderPlain]:O,[a.dropdownBorderFocused]:$,[a.dropdownBorderInvalid]:X,[a.dropdownBorderError]:X}),children:u(`legend`,{className:l(a.dropdownFieldsetLegend,{[a.dropdownFieldsetLegendActive]:T&&(E||$||!Q)}),children:u(`span`,{children:Ze})})}),T&&m&&d(`div`,{id:R,className:l(a.dropdownMatLabel,{[a.dropdownMatLabelFloating]:E||$||!Q},S?.label),style:C?.label,children:[m,Xe]}),T&&D&&u(`div`,{className:l(a.dropdownPlaceholder,$&&!Y&&a.dropdownPlaceholderShown),children:D})]})})}),m&&!T&&d(`div`,{id:R,className:l(a.dropdownLabelText,S?.label),style:C?.label,children:[m,Xe]}),u(ie,{variant:`error`,message:x?x.getCurrentErrorMessage():p||``,isVisible:X&&(je||Ne)})]})}export{f as default};
2
2
  //# sourceMappingURL=dropdown.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.tsx"],"sourcesContent":["import React, { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport cx from 'classnames';\nimport InfiniteBlock from 'components/common/infiniteBlock';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as dropdownIcon } from '@fortawesome/free-solid-svg-icons';\nimport Downshift, { StateChangeOptions, DownshiftState } from 'downshift';\nimport Tooltip from 'components/common/tooltip';\n\nimport Popover from '../popover';\nimport { PopoverAlign, PopoverPlacement } from '../popover/popover.types';\nimport { useComponentDefaults, usePresentationDefault } from '../configProvider';\nimport { useSheet } from '../hooks/useSheet';\nimport { Presentation } from '../configProvider/presentation.types';\nimport styles from './dropdown.module.pcss';\nimport sheetStyles from '../styles/sheet.module.pcss';\nimport type { DropdownProps, DropdownItem } from './dropdown.types';\n\nfunction Dropdown(props: DropdownProps) {\n const {\n errorMessage = '',\n className = '',\n style,\n label = '',\n value = '',\n isValid = true,\n tabIndex = 0,\n isRequired = false,\n customProps = {},\n isRow = false,\n disabled = false,\n readOnly = false,\n onScroll = () => Promise.resolve(),\n onClick,\n onChange,\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n dropdownLabel: dropdownLabelProp,\n isDropdownListWider = false,\n formValidator = null,\n classNames,\n styles: slotStyles,\n items = [],\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n placeholder = '',\n plainStyle = false,\n scrollToSelected = false,\n presentation: presentationProp,\n reactRef,\n ...rest\n } = useComponentDefaults('Dropdown', props);\n const [isFocused, setIsFocused] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [, forceUpdate] = useState(0);\n const fvRef = useRef(formValidator);\n const triggerRef = useRef<HTMLDivElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const [menuIsOpen, setMenuIsOpen] = useState(false);\n\n // Explicit prop → this component's global default → the app-wide one → anchored.\n // Resolved here rather than left to Popover so that this component and the panel\n // it opens can never disagree about whether they are presenting as a sheet.\n const appPresentation = usePresentationDefault();\n const presentation = presentationProp ?? appPresentation ?? Presentation.Default;\n const { isSheet } = useSheet(presentation);\n\n // The list reads at the field's size, which is not always the page's: a Dropdown\n // inside something with a smaller font should not open a list at the default one.\n // Width is Popover's job, through `width='trigger'`.\n useLayoutEffect(() => {\n const trigger = triggerRef.current;\n const menu = anchorRef.current;\n if (!menuIsOpen || isSheet || !trigger || !menu) return;\n menu.style.fontSize = window.getComputedStyle(trigger).fontSize;\n }, [menuIsOpen, isSheet]);\n\n useEffect(() => {\n fvRef.current = formValidator;\n if (!fvRef.current) return;\n fvRef.current.label = label ?? '';\n fvRef.current.validate();\n const listener = () => forceUpdate((n) => n + 1);\n fvRef.current.registerOnUpdateListener(listener);\n return () => fvRef.current?.removeOnUpdateListener(listener);\n }, [formValidator, label]);\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n onMouseEnterProp?.(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n onMouseLeaveProp?.(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n onFocusProp?.(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n onBlurProp?.(event);\n };\n\n const hasError = (): boolean => {\n return formValidator ? formValidator.touched && formValidator.hasError() : !isValid || !!errorMessage;\n };\n\n const computedIsRequired = (): boolean => {\n return !!(\n isRequired || formValidator?.validators.find((v) => (v as { validatorId?: string }).validatorId === 'required')\n );\n };\n\n const onChangeHandler = (val: string | number): void => {\n if (formValidator) {\n formValidator.set(val);\n onChange?.(formValidator.value, customProps);\n } else {\n onChange?.(val, customProps);\n }\n };\n\n let dropdownLabel = dropdownLabelProp;\n const currentValue = formValidator ? (formValidator.value as string | number) : value;\n const hasErr = hasError();\n\n items.forEach((item: DropdownItem) => {\n if (item.key === currentValue) {\n dropdownLabel = item.label as string;\n }\n });\n\n const displayValue = dropdownLabel || currentValue;\n const isDisplayBlank = displayValue == null || (typeof displayValue === 'string' && displayValue.trim() === '');\n\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n const editedLabel = label && computedIsRequired() ? `${label} *` : label;\n\n const showFocus = isFocused && !readOnly;\n\n return (\n <div\n {...rest}\n className={cx(className, classNames?.root, styles.dropdownLabel, styles.dropdown, {\n [styles.dropdownLabelColumn]: !isRow,\n })}\n style={{ ...style, ...slotStyles?.root }}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n <Downshift\n {...(readOnly ? { isOpen: false } : {})}\n onChange={(selection: DropdownItem | null) => onChangeHandler((selection || { key: '' }).key)}\n itemToString={(item: DropdownItem | null) => (item ? String(item.key) : '')}\n selectedItem={items.find((el) => el.key === currentValue) ?? null}\n onStateChange={(changes: StateChangeOptions<DropdownItem>) => {\n if (typeof changes.isOpen === 'boolean') setMenuIsOpen(changes.isOpen);\n }}\n stateReducer={(state: DownshiftState<DropdownItem>, changes: StateChangeOptions<DropdownItem>) => {\n if (scrollToSelected && Object.prototype.hasOwnProperty.call(changes, 'isOpen')) {\n return {\n ...changes,\n highlightedIndex: changes.isOpen ? items.indexOf(state.selectedItem as DropdownItem) : null,\n };\n }\n return changes;\n }}\n >\n {({\n getItemProps,\n getMenuProps,\n getToggleButtonProps,\n closeMenu,\n isOpen,\n selectedItem,\n highlightedIndex,\n setHighlightedIndex,\n }) => (\n <div>\n <Popover\n // Downshift owns the open state, the highlight and the keys; Popover\n // owns where the list goes. So the open half of `onOpenChange` is\n // Downshift's business already, and only a close is acted on: the\n // outside click and the Escape Popover sees before it does.\n isOpen={!disabled && !readOnly && isOpen}\n onOpenChange={(next) => {\n if (!next) closeMenu();\n }}\n placement={PopoverPlacement.Bottom}\n align={PopoverAlign.Start}\n offset={0}\n withArrow={false}\n constrainWidth={false}\n width='trigger'\n // The toggle button answers a click on the field, and the focus\n // belongs to it while the list is open.\n closeOnTriggerClick={false}\n focusOnOpen={false}\n presentation={presentation}\n classNames={{ panel: styles.dropdownPanel }}\n content={\n <div\n {...getMenuProps(\n {\n ref: (node: HTMLDivElement | null) => {\n anchorRef.current = node;\n },\n 'aria-label': label || placeholder || undefined,\n },\n { suppressRefError: true },\n )}\n // A sheet's own panel does the clipping and the scrolling, and\n // spans the screen rather than sizing itself to the field.\n className={cx(!isSheet && styles.dropdownInputListAnim, {\n [styles.dropdownInputListAnimWider]: isDropdownListWider && !isSheet,\n })}\n >\n <InfiniteBlock\n onScroll={onScroll}\n className={cx(styles.dropdownInputList, isSheet && sheetStyles.sheetScroll, classNames?.list)}\n style={slotStyles?.list}\n setHighlightedIndex={setHighlightedIndex}\n >\n {items.map((item: DropdownItem, index: number) => (\n <div\n key={item.key}\n {...getItemProps({ index, item, disabled: !!item.disabled })}\n style={slotStyles?.option}\n className={cx(styles.dropdownInputListItem, classNames?.option, {\n [styles.dropdownInputListItemActive]: highlightedIndex === index,\n [styles.dropdownInputListItemSelected]: selectedItem === item,\n [styles.dropdownInputListItemDisabled]: !!item.disabled,\n })}\n >\n {item.label}\n </div>\n ))}\n </InfiniteBlock>\n </div>\n }\n >\n <div\n ref={triggerRef}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n className={cx(\n styles.dropdownInput,\n {\n [styles.dropdownInputPlain]: plainStyle,\n [styles.dropdownInputReadOnly]: readOnly && !disabled,\n },\n classNames?.field,\n )}\n style={slotStyles?.field}\n >\n <button\n tabIndex={tabIndex}\n type='button'\n disabled={disabled}\n aria-readonly={readOnly || undefined}\n className={cx(\n styles.dropdownInputButton,\n {\n [styles.dropdownInputButtonDisabled]: disabled,\n [styles.dropdownInputButtonReadOnly]: readOnly && !disabled,\n },\n classNames?.control,\n )}\n style={{ ...(isDropdownListWider ? { padding: '6px', border: 'none' } : {}), ...slotStyles?.control }}\n {...getToggleButtonProps()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n ref={reactRef}\n >\n {/* Non-breaking space when blank (same text-node layout as a\n real value) so the button keeps a full line of height. */}\n {isDisplayBlank ? '\\u00A0' : displayValue}\n </button>\n <button\n type='button'\n tabIndex={-1}\n disabled={disabled}\n className={cx(styles.dropdownInputButtonIcon, classNames?.icon)}\n style={slotStyles?.icon}\n {...getToggleButtonProps()}\n // Keeping the focus where it is, rather than letting mousedown move\n // it here: both buttons carry the same downshift toggle props, and\n // the blur of the other one cancels the toggle this click performs,\n // so the chevron did nothing while the dropdown had focus.\n onMouseDown={(e: React.MouseEvent<HTMLButtonElement>) => e.preventDefault()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n >\n {!disabled && !readOnly && (\n <FontAwesomeIcon\n icon={dropdownIcon}\n className={cx(styles.dropdownInputButtonIconArrow, {\n [styles.dropdownInputButtonIconArrowOpen]: isOpen,\n })}\n />\n )}\n </button>\n <fieldset\n className={cx(styles.dropdownFieldset, {\n [styles.dropdownBorderPlain]: plainStyle,\n [styles.dropdownBorderFocused]: showFocus,\n [styles.dropdownBorderInvalid]: hasErr,\n [styles.dropdownBorderError]: hasErr,\n })}\n >\n <legend\n className={cx(styles.dropdownFieldsetLegend, {\n [styles.dropdownFieldsetLegendActive]:\n useMatLabelStyle && (alwaysFloatLabel || showFocus || !isDisplayBlank),\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n className={cx(\n styles.dropdownMatLabel,\n {\n [styles.dropdownMatLabelFloating]: alwaysFloatLabel || showFocus || !isDisplayBlank,\n },\n // The floating and the stacked label are two renderings of\n // the same thing, so one slot reaches whichever is in use.\n classNames?.label,\n )}\n style={slotStyles?.label}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.dropdownPlaceholder,\n showFocus && !dropdownLabel && styles.dropdownPlaceholderShown,\n )}\n >\n {placeholder}\n </div>\n )}\n </div>\n </Popover>\n </div>\n )}\n </Downshift>\n {label && !useMatLabelStyle && (\n <div className={cx(styles.dropdownLabelText, classNames?.label)} style={slotStyles?.label}>\n {label}\n {requiredMark}\n </div>\n )}\n <Tooltip\n variant='error'\n message={formValidator ? formValidator.getCurrentErrorMessage() : errorMessage || ''}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </div>\n );\n}\n\nexport default Dropdown;\n"],"mappings":"k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CACE,UAAW,EAAG,EAAO,iBAAkB,EACpC,EAAO,qBAAsB,GAC7B,EAAO,uBAAwB,GAC/B,EAAO,uBAAwB,GAC/B,EAAO,qBAAsB,CAChC,CAAC,EAED,SAAA,EAAC,SAAD,CACE,UAAW,EAAG,EAAO,uBAAwB,EAC1C,EAAO,8BACN,IAAqB,GAAoB,GAAa,CAAC,EAC3D,CAAC,EAED,SAAA,EAAC,OAAD,CAAA,SAAO,EAAkB,CAAA,CACnB,CAAA,CACA,CAAA,EACT,GAAoB,GACnB,EAAC,MAAD,CACE,UAAW,EACT,EAAO,iBACP,EACG,EAAO,0BAA2B,GAAoB,GAAa,CAAC,CACvE,EAGA,GAAY,KACd,EACA,MAAO,GAAY,MAVrB,SAAA,CAYG,EACA,CACE,IAEN,GAAoB,GACnB,EAAC,MAAD,CACE,UAAW,EACT,EAAO,oBACP,GAAa,CAAC,GAAiB,EAAO,wBACxC,EAEC,SAAA,CACE,CAAA,CAEJ,GACE,CAAA,CACN,CAAA,CAEE,CAAA,EACV,GAAS,CAAC,GACT,EAAC,MAAD,CAAK,UAAW,EAAG,EAAO,kBAAmB,GAAY,KAAK,EAAG,MAAO,GAAY,MAApF,SAAA,CACG,EACA,CACE,IAEP,EAAC,EAAD,CACE,QAAQ,QACR,QAAS,EAAgB,EAAc,uBAAuB,EAAI,GAAgB,GAClF,UAAW,IAAW,GAAa,GACpC,CAAA,CACE,GAET"}
1
+ {"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.tsx"],"sourcesContent":["import React, { useEffect, useId, useLayoutEffect, useRef, useState } from 'react';\nimport cx from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as dropdownIcon } from '@fortawesome/free-solid-svg-icons';\nimport Tooltip from 'components/common/tooltip';\n\nimport Popover from '../popover';\nimport SpinnerLoading from '../loading/spinnerLoading';\nimport { useInfiniteScroll } from '../infiniteBlock/useInfiniteScroll';\nimport { edgeIndex, nextIndex, scrollOptionIntoView, type ActiveIndex } from '../utils/listNavigation';\nimport { PopoverAlign, PopoverPlacement } from '../popover/popover.types';\nimport { useComponentDefaults, usePresentationDefault } from '../configProvider';\nimport { useSheet } from '../hooks/useSheet';\nimport { Presentation } from '../configProvider/presentation.types';\nimport styles from './dropdown.module.pcss';\nimport sheetStyles from '../styles/sheet.module.pcss';\nimport type { DropdownProps, DropdownItem } from './dropdown.types';\n\n/** How long a pause resets the type-ahead buffer, matching a native `<select>`. */\nconst TYPEAHEAD_RESET_MS = 500;\n\nfunction Dropdown(props: DropdownProps) {\n const {\n errorMessage = '',\n className = '',\n style,\n label = '',\n value = '',\n isValid = true,\n tabIndex = 0,\n isRequired = false,\n customProps = {},\n isRow = false,\n disabled = false,\n readOnly = false,\n onScroll = () => Promise.resolve(),\n onClick,\n onChange,\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n dropdownLabel: dropdownLabelProp,\n isDropdownListWider = false,\n formValidator = null,\n classNames,\n styles: slotStyles,\n items = [],\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n placeholder = '',\n plainStyle = false,\n scrollToSelected = false,\n presentation: presentationProp,\n reactRef,\n ...rest\n } = useComponentDefaults('Dropdown', props);\n const [isFocused, setIsFocused] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [, forceUpdate] = useState(0);\n const fvRef = useRef(formValidator);\n const triggerRef = useRef<HTMLDivElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const listRef = useRef<HTMLDivElement>(null);\n const [menuIsOpen, setMenuIsOpen] = useState(false);\n // `null` is \"nothing highlighted\", the state a list opens in unless `scrollToSelected`\n // asks for the current value. Arrowing from there enters the list at either end.\n const [activeIndex, setActiveIndex] = useState<ActiveIndex>(null);\n const typeahead = useRef({ buffer: '', at: 0 });\n\n const baseId = useId();\n const listboxId = `${baseId}-listbox`;\n const labelId = `${baseId}-label`;\n const optionId = (index: number) => `${baseId}-option-${index}`;\n\n const isInteractive = !disabled && !readOnly;\n const isOpen = menuIsOpen && isInteractive;\n\n // The list is its own scroll container. It used to render through an `InfiniteBlock`, which\n // also brought a tabbable container and a second key handler: inside a listbox that put a\n // focusable element with no role in the tab order and gave the arrows two owners.\n const { isLoading: showScrollSpinner, sentinelRef } = useInfiniteScroll(listRef, onScroll, false);\n\n // Explicit prop → this component's global default → the app-wide one → anchored.\n // Resolved here rather than left to Popover so that this component and the panel\n // it opens can never disagree about whether they are presenting as a sheet.\n const appPresentation = usePresentationDefault();\n const presentation = presentationProp ?? appPresentation ?? Presentation.Default;\n const { isSheet } = useSheet(presentation);\n\n // The list reads at the field's size, which is not always the page's: a Dropdown\n // inside something with a smaller font should not open a list at the default one.\n // Width is Popover's job, through `width='trigger'`.\n useLayoutEffect(() => {\n const trigger = triggerRef.current;\n const menu = anchorRef.current;\n if (!isOpen || isSheet || !trigger || !menu) return;\n menu.style.fontSize = window.getComputedStyle(trigger).fontSize;\n }, [isOpen, isSheet]);\n\n useEffect(() => {\n fvRef.current = formValidator;\n if (!fvRef.current) return;\n fvRef.current.label = label ?? '';\n fvRef.current.validate();\n const listener = () => forceUpdate((n) => n + 1);\n fvRef.current.registerOnUpdateListener(listener);\n return () => fvRef.current?.removeOnUpdateListener(listener);\n }, [formValidator, label]);\n\n const currentValue = formValidator ? (formValidator.value as string | number) : value;\n const selectedIndex = items.findIndex((item) => item.key === currentValue);\n\n useEffect(() => {\n if (!isOpen || activeIndex === null) return;\n scrollOptionIntoView(listRef.current, document.getElementById(optionId(activeIndex)));\n // optionId is derived from a stable useId, so it cannot go stale between renders.\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, activeIndex]);\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n onMouseEnterProp?.(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n onMouseLeaveProp?.(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n onFocusProp?.(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n onBlurProp?.(event);\n };\n\n const hasError = (): boolean => {\n return formValidator ? formValidator.touched && formValidator.hasError() : !isValid || !!errorMessage;\n };\n\n const computedIsRequired = (): boolean => {\n return !!(\n isRequired || formValidator?.validators.find((v) => (v as { validatorId?: string }).validatorId === 'required')\n );\n };\n\n const onChangeHandler = (val: string | number): void => {\n if (formValidator) {\n formValidator.set(val);\n onChange?.(formValidator.value, customProps);\n } else {\n onChange?.(val, customProps);\n }\n };\n\n function handleOpenChange(next: boolean) {\n if (next && !isInteractive) return;\n setMenuIsOpen(next);\n if (next) setActiveIndex(scrollToSelected && selectedIndex >= 0 ? selectedIndex : null);\n else typeahead.current = { buffer: '', at: 0 };\n }\n\n function select(item: DropdownItem) {\n if (item.disabled) return;\n onChangeHandler(item.key);\n handleOpenChange(false);\n }\n\n const navigation = { isDisabled: (index: number) => !!items[index].disabled };\n\n /** Jumps to the option whose label starts with what was typed, as a native `<select>` does. */\n function handleTypeahead(key: string) {\n const now = Date.now();\n const buffer = now - typeahead.current.at > TYPEAHEAD_RESET_MS ? key : typeahead.current.buffer + key;\n typeahead.current = { buffer, at: now };\n\n const needle = buffer.toLowerCase();\n const match = items.findIndex(\n (item) => !item.disabled && typeof item.label === 'string' && item.label.toLowerCase().startsWith(needle),\n );\n if (match === -1) return;\n if (isOpen) setActiveIndex(match);\n else select(items[match]);\n }\n\n function handleKeyDown(event: React.KeyboardEvent) {\n if (!isInteractive) return;\n\n if (!isOpen) {\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n // Without this the browser turns the key into a click on the trigger, which\n // Popover would read as a second toggle and close the list again.\n event.preventDefault();\n handleOpenChange(true);\n } else if (event.key.length === 1) {\n handleTypeahead(event.key);\n }\n return;\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n setActiveIndex(nextIndex(activeIndex, event.key === 'ArrowDown' ? 1 : -1, items.length, navigation));\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault();\n setActiveIndex(edgeIndex(event.key === 'Home' ? 'first' : 'last', items.length, navigation));\n } else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n const item = activeIndex === null ? undefined : items[activeIndex];\n if (item) select(item);\n else handleOpenChange(false);\n } else if (event.key === 'Escape' || event.key === 'Tab') {\n handleOpenChange(false);\n } else if (event.key.length === 1) {\n handleTypeahead(event.key);\n }\n }\n\n let dropdownLabel = dropdownLabelProp;\n const hasErr = hasError();\n\n items.forEach((item: DropdownItem) => {\n if (item.key === currentValue) {\n dropdownLabel = item.label as string;\n }\n });\n\n const displayValue = dropdownLabel || currentValue;\n const isDisplayBlank = displayValue == null || (typeof displayValue === 'string' && displayValue.trim() === '');\n\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n const editedLabel = label && computedIsRequired() ? `${label} *` : label;\n\n const showFocus = isFocused && !readOnly;\n\n return (\n <div\n {...rest}\n className={cx(className, classNames?.root, styles.dropdownLabel, styles.dropdown, {\n [styles.dropdownLabelColumn]: !isRow,\n })}\n style={{ ...style, ...slotStyles?.root }}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n <div>\n <Popover\n // Popover owns opening and closing, including the outside click, Escape and the\n // click on the field itself. The trigger only has to say what it wants.\n isOpen={isOpen}\n onOpenChange={handleOpenChange}\n disabled={!isInteractive}\n placement={PopoverPlacement.Bottom}\n align={PopoverAlign.Start}\n offset={0}\n withArrow={false}\n constrainWidth={false}\n width='trigger'\n // The focus stays on the trigger while the list is open, because that is what\n // `aria-activedescendant` points from.\n focusOnOpen={false}\n presentation={presentation}\n classNames={{ panel: styles.dropdownPanel }}\n content={\n <div\n ref={anchorRef}\n // A sheet's own panel does the clipping and the scrolling, and\n // spans the screen rather than sizing itself to the field.\n className={cx(!isSheet && styles.dropdownInputListAnim, {\n [styles.dropdownInputListAnimWider]: isDropdownListWider && !isSheet,\n })}\n >\n <div\n ref={listRef}\n id={listboxId}\n role='listbox'\n aria-label={label || placeholder || undefined}\n className={cx(styles.dropdownInputList, isSheet && sheetStyles.sheetScroll, classNames?.list)}\n style={slotStyles?.list}\n >\n {items.map((item: DropdownItem, index: number) => (\n <div\n key={item.key}\n id={optionId(index)}\n role='option'\n aria-selected={item.key === currentValue}\n aria-disabled={item.disabled || undefined}\n style={slotStyles?.option}\n className={cx(styles.dropdownInputListItem, classNames?.option, {\n [styles.dropdownInputListItemActive]: activeIndex === index,\n [styles.dropdownInputListItemSelected]: item.key === currentValue,\n [styles.dropdownInputListItemDisabled]: !!item.disabled,\n })}\n // Selecting must not move the focus off the trigger, which is what\n // `aria-activedescendant` is anchored to.\n onMouseDown={(event) => event.preventDefault()}\n onMouseEnter={() => setActiveIndex(index)}\n onClick={() => select(item)}\n >\n {item.label}\n </div>\n ))}\n <div ref={sentinelRef} className={styles.dropdownSentinel} aria-hidden='true' />\n {showScrollSpinner && (\n <div className={styles.dropdownLoadMore} aria-hidden='true'>\n <SpinnerLoading className={styles.dropdownLoadMoreSpinner} />\n </div>\n )}\n </div>\n </div>\n }\n >\n <div\n ref={triggerRef}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n className={cx(\n styles.dropdownInput,\n {\n [styles.dropdownInputPlain]: plainStyle,\n [styles.dropdownInputReadOnly]: readOnly && !disabled,\n },\n classNames?.field,\n )}\n style={slotStyles?.field}\n >\n <button\n tabIndex={tabIndex}\n type='button'\n disabled={disabled}\n // A select-only combobox: the accessible name comes from the field's label,\n // and the element's own content is read as its value. A plain `button` role\n // would announce the value as the name and never mention the label.\n role='combobox'\n aria-haspopup='listbox'\n aria-expanded={isOpen}\n aria-controls={listboxId}\n aria-activedescendant={isOpen && activeIndex !== null ? optionId(activeIndex) : undefined}\n aria-labelledby={label ? labelId : undefined}\n aria-label={label ? undefined : placeholder || undefined}\n aria-readonly={readOnly || undefined}\n className={cx(\n styles.dropdownInputButton,\n {\n [styles.dropdownInputButtonDisabled]: disabled,\n [styles.dropdownInputButtonReadOnly]: readOnly && !disabled,\n },\n classNames?.control,\n )}\n style={{ ...(isDropdownListWider ? { padding: '6px', border: 'none' } : {}), ...slotStyles?.control }}\n onKeyDown={handleKeyDown}\n onClick={onClick}\n ref={reactRef}\n >\n {/* Non-breaking space when blank (same text-node layout as a\n real value) so the button keeps a full line of height. */}\n {isDisplayBlank ? ' ' : displayValue}\n </button>\n <button\n type='button'\n tabIndex={-1}\n disabled={disabled}\n // The chevron repeats what the combobox beside it already does, so it is a\n // pointer affordance only. Announcing it would offer the same control twice.\n aria-hidden='true'\n className={cx(styles.dropdownInputButtonIcon, classNames?.icon)}\n style={slotStyles?.icon}\n // Keeping the focus where it is, rather than letting mousedown move it here:\n // the trigger is what `aria-activedescendant` points from, and the click\n // still reaches Popover by bubbling.\n onMouseDown={(event: React.MouseEvent<HTMLButtonElement>) => event.preventDefault()}\n onClick={onClick}\n >\n {!disabled && !readOnly && (\n <FontAwesomeIcon\n icon={dropdownIcon}\n className={cx(styles.dropdownInputButtonIconArrow, {\n [styles.dropdownInputButtonIconArrowOpen]: isOpen,\n })}\n />\n )}\n </button>\n <fieldset\n className={cx(styles.dropdownFieldset, {\n [styles.dropdownBorderPlain]: plainStyle,\n [styles.dropdownBorderFocused]: showFocus,\n [styles.dropdownBorderInvalid]: hasErr,\n [styles.dropdownBorderError]: hasErr,\n })}\n >\n <legend\n className={cx(styles.dropdownFieldsetLegend, {\n [styles.dropdownFieldsetLegendActive]:\n useMatLabelStyle && (alwaysFloatLabel || showFocus || !isDisplayBlank),\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n id={labelId}\n className={cx(\n styles.dropdownMatLabel,\n {\n [styles.dropdownMatLabelFloating]: alwaysFloatLabel || showFocus || !isDisplayBlank,\n },\n // The floating and the stacked label are two renderings of\n // the same thing, so one slot reaches whichever is in use.\n classNames?.label,\n )}\n style={slotStyles?.label}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.dropdownPlaceholder,\n showFocus && !dropdownLabel && styles.dropdownPlaceholderShown,\n )}\n >\n {placeholder}\n </div>\n )}\n </div>\n </Popover>\n </div>\n {label && !useMatLabelStyle && (\n <div id={labelId} className={cx(styles.dropdownLabelText, classNames?.label)} style={slotStyles?.label}>\n {label}\n {requiredMark}\n </div>\n )}\n <Tooltip\n variant='error'\n message={formValidator ? formValidator.getCurrentErrorMessage() : errorMessage || ''}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </div>\n );\n}\n\nexport default Dropdown;\n"],"mappings":"siCAmBA,IAAM,GAAqB,IAE3B,SAAS,EAAS,EAAsB,CACtC,GAAM,CACJ,eAAe,GACf,aAAY,GACZ,SACA,QAAQ,GACR,SAAQ,GACR,WAAU,GACV,YAAW,EACX,cAAa,GACb,cAAc,CAAC,EACf,SAAQ,GACR,WAAW,GACX,WAAW,GACX,gBAAiB,QAAQ,QAAQ,EACjC,UACA,WACA,QAAS,GAAc,KACvB,OAAQ,GAAa,KACrB,aAAc,GAAmB,KACjC,aAAc,GAAmB,KACjC,cAAe,GACf,sBAAsB,GACtB,gBAAgB,KAChB,aACA,OAAQ,EACR,QAAQ,CAAC,EACT,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,oBAAmB,GACnB,aAAc,GACd,YACA,GAAG,IACD,EAAqB,WAAY,CAAK,EACpC,CAAC,GAAW,IAAgB,EAAS,EAAK,EAC1C,CAAC,GAAW,IAAgB,EAAS,EAAK,EAC1C,EAAG,IAAe,EAAS,CAAC,EAC5B,EAAQ,EAAO,CAAa,EAC5B,EAAa,EAAuB,IAAI,EACxC,EAAY,EAAuB,IAAI,EACvC,EAAU,EAAuB,IAAI,EACrC,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AO,8BACN,IAAqB,GAAoB,GAAa,CAAC,EAC3D,CAAC,EAED,SAAA,EAAC,OAAD,CAAA,SAAO,EAAkB,CAAA,CACnB,CAAA,CACA,CAAA,EACT,GAAoB,GACnB,EAAC,MAAD,CACE,GAAI,EACJ,UAAW,EACT,EAAO,iBACP,EACG,EAAO,0BAA2B,GAAoB,GAAa,CAAC,CACvE,EAGA,GAAY,KACd,EACA,MAAO,GAAY,MAXrB,SAAA,CAaG,EACA,EACE,IAEN,GAAoB,GACnB,EAAC,MAAD,CACE,UAAW,EACT,EAAO,oBACP,GAAa,CAAC,GAAiB,EAAO,wBACxC,EAEC,SAAA,CACE,CAAA,CAEJ,GACE,CAAA,CACN,CAAA,EACJ,GAAS,CAAC,GACT,EAAC,MAAD,CAAK,GAAI,EAAS,UAAW,EAAG,EAAO,kBAAmB,GAAY,KAAK,EAAG,MAAO,GAAY,MAAjG,SAAA,CACG,EACA,EACE,IAEP,EAAC,GAAD,CACE,QAAQ,QACR,QAAS,EAAgB,EAAc,uBAAuB,EAAI,GAAgB,GAClF,UAAW,IAAW,IAAa,GACpC,CAAA,CACE,GAET"}
@@ -1,2 +1,2 @@
1
- "use client";var e=`required-mark_fy7Fm`,t=`dropdown_XTshY`,n=`dropdown-label_TIpeK`,r=`dropdown-label-column_cMCBc`,i=`dropdown-label-text_u-UKq`,a=`dropdown-input_WiPcb`,o=`dropdown-input-plain_Ap12N`,s=`dropdown-input-readOnly_3GWSO`,c=`dropdown-input-button_ziKKi`,l=`dropdown-input-button-disabled_JEaO-`,u=`dropdown-input-button-readOnly_QhBYY`,d=`dropdown-input-button-icon_jl7EY`,f=`dropdown-input-button-icon-arrow_SFJbx`,p=`dropdown-input-button-icon-arrow-open_8yQbZ`,m=`dropdown-input-list-anim_knSMT`,h=`dropdown-input-list-anim-wider_-YyLJ`,g=`dropdown-input-list_JnMbA`,_=`dropdown-input-list-item_EAy5L`,v=`dropdown-input-list-item-active_0dhia`,y=`dropdown-input-list-item-selected_hShJf`,b=`dropdown-input-list-item-disabled_3r-Yn`,x=`dropdown-fieldset_wQwTf`,S=`dropdown-fieldset-legend_a1M4L`,C=`dropdown-fieldset-legend-active_bnR5F`,w=`dropdown-placeholder_QYMPZ`,T=`dropdown-placeholder-shown_-IkNH`,E=`fadeIn_oMJZj`,D=`dropdown-matLabel_iHQnt`,O=`dropdown-matLabel-floating_zY51S`,k=`dropdown-border-focused_Te-ER`,A=`dropdown-border-plain_Bbh-3`,j=`dropdown-border-invalid_ySVaS`,M=`dropdown-border-error_-JB33`,N=`dropdownPanel_RYxpN`,P={"required-mark":`required-mark_fy7Fm`,requiredMark:e,dropdown:t,"dropdown-label":`dropdown-label_TIpeK`,dropdownLabel:n,"dropdown-label-column":`dropdown-label-column_cMCBc`,dropdownLabelColumn:r,"dropdown-label-text":`dropdown-label-text_u-UKq`,dropdownLabelText:i,"dropdown-input":`dropdown-input_WiPcb`,dropdownInput:a,"dropdown-input-plain":`dropdown-input-plain_Ap12N`,dropdownInputPlain:o,"dropdown-input-readOnly":`dropdown-input-readOnly_3GWSO`,dropdownInputReadOnly:s,"dropdown-input-button":`dropdown-input-button_ziKKi`,dropdownInputButton:c,"dropdown-input-button-disabled":`dropdown-input-button-disabled_JEaO-`,dropdownInputButtonDisabled:l,"dropdown-input-button-readOnly":`dropdown-input-button-readOnly_QhBYY`,dropdownInputButtonReadOnly:u,"dropdown-input-button-icon":`dropdown-input-button-icon_jl7EY`,dropdownInputButtonIcon:d,"dropdown-input-button-icon-arrow":`dropdown-input-button-icon-arrow_SFJbx`,dropdownInputButtonIconArrow:f,"dropdown-input-button-icon-arrow-open":`dropdown-input-button-icon-arrow-open_8yQbZ`,dropdownInputButtonIconArrowOpen:p,"dropdown-input-list-anim":`dropdown-input-list-anim_knSMT`,dropdownInputListAnim:m,"dropdown-input-list-anim-wider":`dropdown-input-list-anim-wider_-YyLJ`,dropdownInputListAnimWider:h,"dropdown-input-list":`dropdown-input-list_JnMbA`,dropdownInputList:g,"dropdown-input-list-item":`dropdown-input-list-item_EAy5L`,dropdownInputListItem:_,"dropdown-input-list-item-active":`dropdown-input-list-item-active_0dhia`,dropdownInputListItemActive:v,"dropdown-input-list-item-selected":`dropdown-input-list-item-selected_hShJf`,dropdownInputListItemSelected:y,"dropdown-input-list-item-disabled":`dropdown-input-list-item-disabled_3r-Yn`,dropdownInputListItemDisabled:b,"dropdown-fieldset":`dropdown-fieldset_wQwTf`,dropdownFieldset:x,"dropdown-fieldset-legend":`dropdown-fieldset-legend_a1M4L`,dropdownFieldsetLegend:S,"dropdown-fieldset-legend-active":`dropdown-fieldset-legend-active_bnR5F`,dropdownFieldsetLegendActive:C,"dropdown-placeholder":`dropdown-placeholder_QYMPZ`,dropdownPlaceholder:w,"dropdown-placeholder-shown":`dropdown-placeholder-shown_-IkNH`,dropdownPlaceholderShown:T,fadeIn:E,"dropdown-matLabel":`dropdown-matLabel_iHQnt`,dropdownMatLabel:D,"dropdown-matLabel-floating":`dropdown-matLabel-floating_zY51S`,dropdownMatLabelFloating:O,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:k,"dropdown-border-plain":`dropdown-border-plain_Bbh-3`,dropdownBorderPlain:A,"dropdown-border-invalid":`dropdown-border-invalid_ySVaS`,dropdownBorderInvalid:j,"dropdown-border-error":`dropdown-border-error_-JB33`,dropdownBorderError:M,dropdownPanel:N};export{P as default,t as dropdown,M as dropdownBorderError,k as dropdownBorderFocused,j as dropdownBorderInvalid,A as dropdownBorderPlain,x as dropdownFieldset,S as dropdownFieldsetLegend,C as dropdownFieldsetLegendActive,a as dropdownInput,c as dropdownInputButton,l as dropdownInputButtonDisabled,d as dropdownInputButtonIcon,f as dropdownInputButtonIconArrow,p as dropdownInputButtonIconArrowOpen,u as dropdownInputButtonReadOnly,g as dropdownInputList,m as dropdownInputListAnim,h as dropdownInputListAnimWider,_ as dropdownInputListItem,v as dropdownInputListItemActive,b as dropdownInputListItemDisabled,y as dropdownInputListItemSelected,o as dropdownInputPlain,s as dropdownInputReadOnly,n as dropdownLabel,r as dropdownLabelColumn,i as dropdownLabelText,D as dropdownMatLabel,O as dropdownMatLabelFloating,N as dropdownPanel,w as dropdownPlaceholder,T as dropdownPlaceholderShown,E as fadeIn,e as requiredMark};
1
+ "use client";var e=`required-mark_fy7Fm`,t=`dropdown_XTshY`,n=`dropdown-label_TIpeK`,r=`dropdown-label-column_cMCBc`,i=`dropdown-label-text_u-UKq`,a=`dropdown-input_WiPcb`,o=`dropdown-input-plain_Ap12N`,s=`dropdown-input-readOnly_3GWSO`,c=`dropdown-input-button_ziKKi`,l=`dropdown-input-button-disabled_JEaO-`,u=`dropdown-input-button-readOnly_QhBYY`,d=`dropdown-input-button-icon_jl7EY`,f=`dropdown-input-button-icon-arrow_SFJbx`,p=`dropdown-input-button-icon-arrow-open_8yQbZ`,m=`dropdown-input-list-anim_knSMT`,h=`dropdown-input-list-anim-wider_-YyLJ`,g=`dropdown-input-list_JnMbA`,_=`dropdown-input-list-item_EAy5L`,v=`dropdown-input-list-item-active_0dhia`,y=`dropdown-input-list-item-selected_hShJf`,b=`dropdown-input-list-item-disabled_3r-Yn`,x=`dropdown-fieldset_wQwTf`,S=`dropdown-fieldset-legend_a1M4L`,C=`dropdown-fieldset-legend-active_bnR5F`,w=`dropdown-placeholder_QYMPZ`,T=`dropdown-placeholder-shown_-IkNH`,E=`fadeIn_oMJZj`,D=`dropdown-matLabel_iHQnt`,O=`dropdown-matLabel-floating_zY51S`,k=`dropdown-border-focused_Te-ER`,A=`dropdown-border-plain_Bbh-3`,j=`dropdown-border-invalid_ySVaS`,M=`dropdown-border-error_-JB33`,N=`dropdownPanel_RYxpN`,P=`dropdown-sentinel_TVDF9`,F=`dropdown-load-more_UQvzV`,I=`dropdown-load-more-spinner_SOMz7`,L={"required-mark":`required-mark_fy7Fm`,requiredMark:e,dropdown:t,"dropdown-label":`dropdown-label_TIpeK`,dropdownLabel:n,"dropdown-label-column":`dropdown-label-column_cMCBc`,dropdownLabelColumn:r,"dropdown-label-text":`dropdown-label-text_u-UKq`,dropdownLabelText:i,"dropdown-input":`dropdown-input_WiPcb`,dropdownInput:a,"dropdown-input-plain":`dropdown-input-plain_Ap12N`,dropdownInputPlain:o,"dropdown-input-readOnly":`dropdown-input-readOnly_3GWSO`,dropdownInputReadOnly:s,"dropdown-input-button":`dropdown-input-button_ziKKi`,dropdownInputButton:c,"dropdown-input-button-disabled":`dropdown-input-button-disabled_JEaO-`,dropdownInputButtonDisabled:l,"dropdown-input-button-readOnly":`dropdown-input-button-readOnly_QhBYY`,dropdownInputButtonReadOnly:u,"dropdown-input-button-icon":`dropdown-input-button-icon_jl7EY`,dropdownInputButtonIcon:d,"dropdown-input-button-icon-arrow":`dropdown-input-button-icon-arrow_SFJbx`,dropdownInputButtonIconArrow:f,"dropdown-input-button-icon-arrow-open":`dropdown-input-button-icon-arrow-open_8yQbZ`,dropdownInputButtonIconArrowOpen:p,"dropdown-input-list-anim":`dropdown-input-list-anim_knSMT`,dropdownInputListAnim:m,"dropdown-input-list-anim-wider":`dropdown-input-list-anim-wider_-YyLJ`,dropdownInputListAnimWider:h,"dropdown-input-list":`dropdown-input-list_JnMbA`,dropdownInputList:g,"dropdown-input-list-item":`dropdown-input-list-item_EAy5L`,dropdownInputListItem:_,"dropdown-input-list-item-active":`dropdown-input-list-item-active_0dhia`,dropdownInputListItemActive:v,"dropdown-input-list-item-selected":`dropdown-input-list-item-selected_hShJf`,dropdownInputListItemSelected:y,"dropdown-input-list-item-disabled":`dropdown-input-list-item-disabled_3r-Yn`,dropdownInputListItemDisabled:b,"dropdown-fieldset":`dropdown-fieldset_wQwTf`,dropdownFieldset:x,"dropdown-fieldset-legend":`dropdown-fieldset-legend_a1M4L`,dropdownFieldsetLegend:S,"dropdown-fieldset-legend-active":`dropdown-fieldset-legend-active_bnR5F`,dropdownFieldsetLegendActive:C,"dropdown-placeholder":`dropdown-placeholder_QYMPZ`,dropdownPlaceholder:w,"dropdown-placeholder-shown":`dropdown-placeholder-shown_-IkNH`,dropdownPlaceholderShown:T,fadeIn:E,"dropdown-matLabel":`dropdown-matLabel_iHQnt`,dropdownMatLabel:D,"dropdown-matLabel-floating":`dropdown-matLabel-floating_zY51S`,dropdownMatLabelFloating:O,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:k,"dropdown-border-plain":`dropdown-border-plain_Bbh-3`,dropdownBorderPlain:A,"dropdown-border-invalid":`dropdown-border-invalid_ySVaS`,dropdownBorderInvalid:j,"dropdown-border-error":`dropdown-border-error_-JB33`,dropdownBorderError:M,dropdownPanel:N,"dropdown-sentinel":`dropdown-sentinel_TVDF9`,dropdownSentinel:P,"dropdown-load-more":`dropdown-load-more_UQvzV`,dropdownLoadMore:F,"dropdown-load-more-spinner":`dropdown-load-more-spinner_SOMz7`,dropdownLoadMoreSpinner:I};export{L as default,t as dropdown,M as dropdownBorderError,k as dropdownBorderFocused,j as dropdownBorderInvalid,A as dropdownBorderPlain,x as dropdownFieldset,S as dropdownFieldsetLegend,C as dropdownFieldsetLegendActive,a as dropdownInput,c as dropdownInputButton,l as dropdownInputButtonDisabled,d as dropdownInputButtonIcon,f as dropdownInputButtonIconArrow,p as dropdownInputButtonIconArrowOpen,u as dropdownInputButtonReadOnly,g as dropdownInputList,m as dropdownInputListAnim,h as dropdownInputListAnimWider,_ as dropdownInputListItem,v as dropdownInputListItemActive,b as dropdownInputListItemDisabled,y as dropdownInputListItemSelected,o as dropdownInputPlain,s as dropdownInputReadOnly,n as dropdownLabel,r as dropdownLabelColumn,i as dropdownLabelText,F as dropdownLoadMore,I as dropdownLoadMoreSpinner,D as dropdownMatLabel,O as dropdownMatLabelFloating,N as dropdownPanel,w as dropdownPlaceholder,T as dropdownPlaceholderShown,P as dropdownSentinel,E as fadeIn,e as requiredMark};
2
2
  //# sourceMappingURL=dropdown.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.module.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.module.pcss"],"sourcesContent":[".required-mark {\n padding: 0 0 0 4px;\n color: var(--required-mark-color, var(--error-color));\n}\n\n.dropdown {\n position: relative;\n\n --dropdown-notch-height: 1.75em;\n\n /* See input.module.pcss for why this exists: the visible border lives on `-input`/`-fieldset`\n below, not this root, so a wrapping ButtonGroup's --group-radius-* custom properties (which\n inherit through any nesting depth, unlike border-radius itself) are what let this component\n flatten correctly when it sits inside a ButtonGroup. */\n --dropdown-radius: var(--group-radius-tl, var(--default-border-radius))\n var(--group-radius-tr, var(--default-border-radius)) var(--group-radius-br, var(--default-border-radius))\n var(--group-radius-bl, var(--default-border-radius));\n\n &-label {\n display: flex;\n\n &-column {\n flex-direction: column;\n }\n\n &-text {\n white-space: nowrap;\n margin-right: 5px;\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n color: var(--text-color);\n font-size: 12px;\n position: absolute;\n top: -15px;\n }\n }\n\n &-input {\n position: relative;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: var(--input-background);\n border-radius: var(--dropdown-radius);\n\n &-plain {\n background: transparent;\n }\n\n &-readOnly {\n cursor: default;\n }\n\n &:focus-within {\n outline: none;\n }\n\n &-button {\n padding: 7px 20% 7px 7.5px !important;\n background-color: transparent;\n border: none;\n font-family: inherit;\n font-size: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n text-align: left;\n width: 100%;\n line-height: 1.25;\n color: var(--text-color);\n\n &-disabled {\n background-color: var(--disabled-input-color);\n color: var(--disabled-font-color);\n border-radius: var(--dropdown-radius);\n }\n\n &-readOnly {\n cursor: default;\n }\n\n &:focus {\n outline: none;\n }\n\n &-icon {\n float: right;\n background-color: transparent;\n border: none;\n position: absolute;\n outline: none;\n right: var(--spacing-s);\n top: 50%;\n transform: translateY(-50%);\n color: var(--text-color);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n &-arrow {\n transition: transform 0.25s;\n pointer-events: none;\n\n &-open {\n transform: rotate(180deg);\n }\n }\n }\n }\n\n /* Chrome, placement and the portal come from the Popover this renders inside.\n What is left is the clipping that keeps the first and last row inside the\n panel's rounded corners. */\n &-list-anim {\n overflow: hidden;\n border-radius: inherit;\n\n &-wider {\n width: max-content !important;\n }\n }\n\n &-list {\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 10em;\n list-style-type: none;\n\n &-item {\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: var(--background-modal);\n padding: 0.5em;\n text-align: left;\n border-radius: 0;\n transition: background-color 0.3s;\n\n &-active {\n background-color: var(--background-accent);\n }\n\n &-selected {\n font-weight: 500;\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n background-color: var(--background-accent);\n }\n\n &-disabled {\n background-color: var(--disabled-input-color);\n color: var(--disabled-font-color);\n cursor: not-allowed;\n\n &:hover {\n background-color: var(--disabled-input-color);\n }\n }\n }\n }\n }\n\n &-fieldset {\n position: absolute;\n width: 100%;\n margin: 0;\n box-sizing: border-box;\n border-radius: var(--dropdown-radius);\n font-size: 0.8em;\n inset: calc(var(--dropdown-notch-height) / -2) 0 0;\n padding-left: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--border-color);\n pointer-events: none;\n user-select: none;\n\n &-legend {\n display: block;\n max-width: 0;\n transition: max-width 0.2s;\n white-space: nowrap;\n padding: 0;\n\n &-active {\n max-width: 300px;\n }\n\n span {\n line-height: var(--dropdown-notch-height);\n padding: 0 5px;\n opacity: 0;\n }\n\n /* With an empty label the span would still reserve its padding, leaving a gap in\n the fieldset's top border. Collapse it so the notch closes when there's no label. */\n span:empty {\n padding: 0.000001px;\n }\n }\n }\n\n &-placeholder {\n position: absolute;\n top: 50%;\n left: 7px;\n transform: translateY(-50%);\n transition: all 0.2s;\n opacity: 0;\n\n &-shown {\n animation: 0.2s fadeIn 0.3s forwards;\n }\n }\n\n &-matLabel {\n position: absolute;\n transition: all 0.3s;\n left: 7px;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n font-size: 1em;\n color: var(--input-label-resting-color, var(--text-light));\n pointer-events: none;\n user-select: none;\n\n &-floating {\n inset: 0 0 auto 14px;\n font-size: 0.8em;\n color: var(--input-label-floating-color, var(--text-color));\n transform: translateY(-50%);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 0.5;\n }\n }\n\n &-border {\n &-focused {\n outline-color: var(--focus-border-color, var(--primary-color));\n border-color: var(--focus-border-color, var(--primary-color));\n }\n\n &-plain:not(&-focused) {\n border-color: transparent;\n outline-color: transparent;\n }\n\n &-invalid {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n\n &-invalid:hover {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n\n &-error {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n }\n}\n\n/* The list brings its own padding and its rows reach the panel edge. */\n.dropdownPanel {\n padding: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dropdown-matLabel,\n .dropdown-placeholder,\n .dropdown-input-button-icon-arrow {\n transition: none;\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"dropdown.module.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.module.pcss"],"sourcesContent":[".required-mark {\n padding: 0 0 0 4px;\n color: var(--required-mark-color, var(--error-color));\n}\n\n.dropdown {\n position: relative;\n\n /* Nothing inside gives the root a width, so as a flex or grid item it collapsed to the chevron\n and drew its border through the label. `input` and `multiSelect` say the same. */\n width: 100%;\n\n --dropdown-notch-height: 1.75em;\n\n /* See input.module.pcss for why this exists: the visible border lives on `-input`/`-fieldset`\n below, not this root, so a wrapping ButtonGroup's --group-radius-* custom properties (which\n inherit through any nesting depth, unlike border-radius itself) are what let this component\n flatten correctly when it sits inside a ButtonGroup. */\n --dropdown-radius: var(--group-radius-tl, var(--default-border-radius))\n var(--group-radius-tr, var(--default-border-radius)) var(--group-radius-br, var(--default-border-radius))\n var(--group-radius-bl, var(--default-border-radius));\n\n &-label {\n display: flex;\n\n &-column {\n flex-direction: column;\n }\n\n &-text {\n white-space: nowrap;\n margin-right: 5px;\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n color: var(--text-color);\n font-size: 12px;\n position: absolute;\n top: -15px;\n }\n }\n\n &-input {\n position: relative;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: var(--input-background);\n border-radius: var(--dropdown-radius);\n\n &-plain {\n background: transparent;\n }\n\n &-readOnly {\n cursor: default;\n }\n\n &:focus-within {\n outline: none;\n }\n\n &-button {\n padding: 7px 20% 7px 7.5px !important;\n background-color: transparent;\n border: none;\n font-family: inherit;\n font-size: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n text-align: left;\n width: 100%;\n line-height: 1.25;\n color: var(--text-color);\n\n &-disabled {\n background-color: var(--disabled-input-color);\n color: var(--disabled-font-color);\n border-radius: var(--dropdown-radius);\n }\n\n &-readOnly {\n cursor: default;\n }\n\n &:focus {\n outline: none;\n }\n\n &-icon {\n float: right;\n background-color: transparent;\n border: none;\n position: absolute;\n outline: none;\n right: var(--spacing-s);\n top: 50%;\n transform: translateY(-50%);\n color: var(--text-color);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n &-arrow {\n transition: transform 0.25s;\n pointer-events: none;\n\n &-open {\n transform: rotate(180deg);\n }\n }\n }\n }\n\n /* Chrome, placement and the portal come from the Popover this renders inside.\n What is left is the clipping that keeps the first and last row inside the\n panel's rounded corners. */\n &-list-anim {\n overflow: hidden;\n border-radius: inherit;\n\n &-wider {\n width: max-content !important;\n }\n }\n\n &-list {\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 10em;\n list-style-type: none;\n\n &-item {\n border: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: var(--background-modal);\n padding: 0.5em;\n text-align: left;\n border-radius: 0;\n transition: background-color 0.3s;\n\n &-active {\n background-color: var(--background-accent);\n }\n\n &-selected {\n font-weight: 500;\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n background-color: var(--background-accent);\n }\n\n &-disabled {\n background-color: var(--disabled-input-color);\n color: var(--disabled-font-color);\n cursor: not-allowed;\n\n &:hover {\n background-color: var(--disabled-input-color);\n }\n }\n }\n }\n }\n\n &-fieldset {\n position: absolute;\n width: 100%;\n margin: 0;\n box-sizing: border-box;\n border-radius: var(--dropdown-radius);\n font-size: 0.8em;\n inset: calc(var(--dropdown-notch-height) / -2) 0 0;\n padding-left: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--border-color);\n pointer-events: none;\n user-select: none;\n\n &-legend {\n display: block;\n\n /* Not taken from the text: an empty span gets no line box, which raised a label-less\n field's border half a notch. */\n height: var(--dropdown-notch-height);\n max-width: 0;\n transition: max-width 0.2s;\n white-space: nowrap;\n padding: 0;\n\n &-active {\n max-width: 300px;\n }\n\n span {\n line-height: var(--dropdown-notch-height);\n padding: 0 5px;\n opacity: 0;\n }\n\n /* With an empty label the span would still reserve its padding, leaving a gap in\n the fieldset's top border. Collapse it so the notch closes when there's no label. */\n span:empty {\n padding: 0;\n }\n }\n }\n\n &-placeholder {\n position: absolute;\n top: 50%;\n left: 7px;\n transform: translateY(-50%);\n transition: all 0.2s;\n opacity: 0;\n\n &-shown {\n animation: 0.2s fadeIn 0.3s forwards;\n }\n }\n\n &-matLabel {\n position: absolute;\n transition: all 0.3s;\n left: 7px;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n font-size: 1em;\n color: var(--input-label-resting-color, var(--text-light));\n pointer-events: none;\n user-select: none;\n\n &-floating {\n inset: 0 0 auto 14px;\n font-size: 0.8em;\n color: var(--input-label-floating-color, var(--text-color));\n transform: translateY(-50%);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 0.5;\n }\n }\n\n &-border {\n &-focused {\n outline-color: var(--focus-border-color, var(--primary-color));\n border-color: var(--focus-border-color, var(--primary-color));\n }\n\n &-plain:not(&-focused) {\n border-color: transparent;\n outline-color: transparent;\n }\n\n &-invalid {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n\n &-invalid:hover {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n\n &-error {\n outline-color: var(--error-border-color);\n border-color: var(--error-border-color);\n }\n }\n}\n\n/* The list brings its own padding and its rows reach the panel edge. */\n.dropdownPanel {\n padding: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .dropdown-matLabel,\n .dropdown-placeholder,\n .dropdown-input-button-icon-arrow {\n transition: none;\n }\n}\n\n/* The sentinel the infinite-scroll hook watches, and the spinner shown while a page loads.\n These came with `InfiniteBlock` when the list rendered through it; the list is its own scroll\n container now, so they live here. */\n.dropdown-sentinel {\n height: 1px;\n}\n\n.dropdown-load-more {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 4px 0;\n\n &-spinner {\n width: 32px;\n height: 32px;\n }\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use client";import{useEffect as e,useRef as t}from"react";var n=`input, textarea, select, [contenteditable=""], [contenteditable="true"]`,r={esc:`escape`,space:` `,spacebar:` `,plus:`+`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function i(){return typeof navigator<`u`&&/Mac|iPhone|iPad|iPod/i.test(navigator.userAgent)}function a(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return null;let n={key:``,ctrl:!1,meta:!1,alt:!1,shift:!1,shiftNamed:!1},a=i();for(let e of t)switch(e){case`mod`:a?n.meta=!0:n.ctrl=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`meta`:case`cmd`:case`command`:n.meta=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0,n.shiftNamed=!0;break;default:n.key=r[e]??e}return n.key?n:null}function o(e){let t=[e.key.toLowerCase()],n=/^(?:Key|Digit)(.)$/.exec(e.code);return n&&t.push(n[1].toLowerCase()),t}function s(e,t){return e.ctrl!==t.ctrlKey||e.meta!==t.metaKey||e.alt!==t.altKey||e.shiftNamed&&e.shift!==t.shiftKey?!1:o(t).includes(e.key)}function c(e){return e instanceof Element&&!!e.closest(n)}var l=new Set([`arrowup`,`arrowdown`,`arrowleft`,`arrowright`,`home`,`end`,`pageup`,`pagedown`,`backspace`,`delete`,`enter`,`tab`]);function u(e){return e.ctrl||e.meta||e.alt?!1:e.key.length===1||l.has(e.key)}var d={" ":`Space`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`,escape:`Esc`,enter:`↵`,backspace:`⌫`,delete:`Del`,pageup:`PgUp`,pagedown:`PgDn`};function f(e){let t=a(e);if(!t)return e;let n=d[t.key]??(t.key.length===1?t.key.toUpperCase():p(t.key));return i()?[t.ctrl&&`⌃`,t.alt&&`⌥`,t.shift&&`⇧`,t.meta&&`⌘`].filter(Boolean).join(``)+n:[...[t.ctrl&&`Ctrl`,t.meta&&`Win`,t.alt&&`Alt`,t.shift&&`Shift`].filter(Boolean),n].join(`+`)}function p(e){return e[0].toUpperCase()+e.slice(1)}function m(n,r={}){let{enabled:i=!0,target:o,enableInFields:l=!1,preventDefault:d=!0}=r,f=t(n);e(()=>{f.current=n}),e(()=>{if(!i)return;let e=o?o.current:window;if(!e)return;function t(e){let t=e;if(!t.isComposing)for(let[e,n]of Object.entries(f.current)){let r=a(e);if(r&&s(r,t)&&!(u(r)&&!l&&c(t.target))){d&&t.preventDefault(),n(t);return}}}return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[i,o,l,d])}export{m as default,m as useHotkeys,f as formatHotkey};
2
+ //# sourceMappingURL=useHotkeys.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHotkeys.mjs","names":[],"sources":["../../../../package/common/hooks/useHotkeys.ts"],"sourcesContent":["import { useEffect, useRef, type RefObject } from 'react';\n\nexport type HotkeyHandler = (event: KeyboardEvent) => void;\n\n/** Combo → handler, e.g. `{ 'mod+k': open, Escape: close }`. */\nexport type HotkeyMap = Record<string, HotkeyHandler>;\n\nexport interface UseHotkeysOptions {\n /** Attach the listener at all. Default `true`; pass `false` to suspend every combo at once. */\n enabled?: boolean;\n /** Scope the shortcuts to one element instead of the whole window. */\n target?: RefObject<HTMLElement | null>;\n /**\n * Let plain-key combos fire while a text field or `contenteditable` has focus. Default `false`,\n * so `'n'` does not fire for every `n` typed into an input. Combos carrying Ctrl, Cmd or Alt\n * are never suppressed — they cannot be confused with typing.\n */\n enableInFields?: boolean;\n /**\n * Call `preventDefault()` on a match, so `mod+s` does not also open the browser's save dialog.\n * Default `true`.\n */\n preventDefault?: boolean;\n}\n\ninterface Combo {\n key: string;\n ctrl: boolean;\n meta: boolean;\n alt: boolean;\n shift: boolean;\n /** Set when the combo named Shift itself — see `matches`. */\n shiftNamed: boolean;\n}\n\nconst FIELD_SELECTOR = 'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]';\n\n/** Spellings accepted for keys whose `event.key` is awkward to write inside a `+`-separated combo. */\nconst KEY_ALIASES: Record<string, string> = {\n esc: 'escape',\n space: ' ',\n spacebar: ' ',\n plus: '+',\n up: 'arrowup',\n down: 'arrowdown',\n left: 'arrowleft',\n right: 'arrowright',\n};\n\n/** `mod` is Cmd where Cmd is the command modifier, and Ctrl everywhere else. */\nfunction isApplePlatform(): boolean {\n return typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);\n}\n\nfunction parseCombo(combo: string): Combo | null {\n const parts = combo\n .split('+')\n .map((part) => part.trim().toLowerCase())\n .filter(Boolean);\n // A trailing separator (`'mod+'`) loses its key to the filter above, so the whole combo is\n // dropped rather than matching on the modifier alone. `'mod+plus'` is how to mean `+` itself.\n if (parts.length === 0) return null;\n\n const parsed: Combo = { key: '', ctrl: false, meta: false, alt: false, shift: false, shiftNamed: false };\n const apple = isApplePlatform();\n\n for (const part of parts) {\n switch (part) {\n case 'mod':\n if (apple) parsed.meta = true;\n else parsed.ctrl = true;\n break;\n case 'ctrl':\n case 'control':\n parsed.ctrl = true;\n break;\n case 'meta':\n case 'cmd':\n case 'command':\n parsed.meta = true;\n break;\n case 'alt':\n case 'option':\n parsed.alt = true;\n break;\n case 'shift':\n parsed.shift = true;\n parsed.shiftNamed = true;\n break;\n default:\n parsed.key = KEY_ALIASES[part] ?? part;\n }\n }\n\n return parsed.key ? parsed : null;\n}\n\n/**\n * The key the event carries, plus the one its physical position would produce unshifted.\n *\n * Both are needed: Alt+K on a Mac arrives as `key: '˚'` and Shift+1 as `key: '!'`, so a combo\n * written against the letter or digit on the keycap only matches through `code`.\n */\nfunction pressedKeys(event: KeyboardEvent): string[] {\n const keys = [event.key.toLowerCase()];\n const physical = /^(?:Key|Digit)(.)$/.exec(event.code);\n if (physical) keys.push(physical[1].toLowerCase());\n return keys;\n}\n\nfunction matches(combo: Combo, event: KeyboardEvent): boolean {\n if (combo.ctrl !== event.ctrlKey || combo.meta !== event.metaKey || combo.alt !== event.altKey) return false;\n // Shift is only compared when the combo named it. A symbol is typed *with* Shift on most\n // layouts, so requiring `shiftKey === false` would make `'?'` and `'mod+/'` unreachable.\n if (combo.shiftNamed && combo.shift !== event.shiftKey) return false;\n return pressedKeys(event).includes(combo.key);\n}\n\nfunction isInField(target: EventTarget | null): boolean {\n return target instanceof Element && !!target.closest(FIELD_SELECTOR);\n}\n\n/** Keys a text field uses for itself, beyond the characters it inserts. */\nconst FIELD_KEYS = new Set([\n 'arrowup',\n 'arrowdown',\n 'arrowleft',\n 'arrowright',\n 'home',\n 'end',\n 'pageup',\n 'pagedown',\n 'backspace',\n 'delete',\n 'enter',\n 'tab',\n]);\n\n/**\n * Whether a combo would be taken out of a focused field's mouth.\n *\n * Ctrl, Cmd and Alt take a key out of the field's hands whatever it is. Without one, a single\n * character is typing and the listed keys are editing, but `F2` and `Escape` are neither, and\n * suppressing those made a menu's `F2` do nothing the moment the page had a focused input.\n */\nfunction isFieldKey(combo: Combo): boolean {\n if (combo.ctrl || combo.meta || combo.alt) return false;\n return combo.key.length === 1 || FIELD_KEYS.has(combo.key);\n}\n\n/** Keys whose name is not what a keycap says. Anything else is capitalised, so `f2` reads `F2`. */\nconst KEY_LABELS: Record<string, string> = {\n ' ': 'Space',\n arrowup: '↑',\n arrowdown: '↓',\n arrowleft: '←',\n arrowright: '→',\n escape: 'Esc',\n enter: '↵',\n backspace: '⌫',\n delete: 'Del',\n pageup: 'PgUp',\n pagedown: 'PgDn',\n};\n\n/**\n * A combo written for the reader: `'mod+shift+k'` reads `⇧⌘K` on an Apple platform and\n * `Ctrl+Shift+K` everywhere else.\n *\n * So a shortcut is written once, in one spelling, and the hint beside it cannot contradict what\n * the binding actually listens for. Hand-written `'⌘K'` hints are wrong on every other platform,\n * silently, because nothing compares the label to the binding.\n *\n * Resolved from the platform at call time, so a server-rendered page renders the non-Apple form.\n */\nexport function formatHotkey(combo: string): string {\n const parsed = parseCombo(combo);\n if (!parsed) return combo;\n\n const key = KEY_LABELS[parsed.key] ?? (parsed.key.length === 1 ? parsed.key.toUpperCase() : capitalise(parsed.key));\n\n // Apple orders modifier symbols ⌃⌥⇧⌘ and runs them into the key; everywhere else they are\n // words joined by `+`.\n if (isApplePlatform()) {\n const symbols = [parsed.ctrl && '⌃', parsed.alt && '⌥', parsed.shift && '⇧', parsed.meta && '⌘'];\n return symbols.filter(Boolean).join('') + key;\n }\n const words = [parsed.ctrl && 'Ctrl', parsed.meta && 'Win', parsed.alt && 'Alt', parsed.shift && 'Shift'];\n return [...words.filter(Boolean), key].join('+');\n}\n\nfunction capitalise(value: string): string {\n return value[0].toUpperCase() + value.slice(1);\n}\n\n/**\n * Keyboard shortcuts, for a whole app or for one element.\n *\n * ```tsx\n * useHotkeys({ 'mod+k': () => setPaletteOpen(true), '?': () => setHelpOpen(true) });\n * ```\n *\n * The map is read through a ref at event time, so an inline object literal is fine and no handler\n * needs memoising. Shortcuts keep firing while a Modal or Drawer is open — pass `enabled` for the\n * ones that should not.\n */\nexport function useHotkeys(hotkeys: HotkeyMap, options: UseHotkeysOptions = {}): void {\n const { enabled = true, target, enableInFields = false, preventDefault = true } = options;\n\n const hotkeysRef = useRef(hotkeys);\n useEffect(() => {\n hotkeysRef.current = hotkeys;\n });\n\n useEffect(() => {\n if (!enabled) return;\n const node: HTMLElement | Window | null = target ? target.current : window;\n if (!node) return;\n\n function onKeyDown(event: Event) {\n const keyboardEvent = event as KeyboardEvent;\n // A key pressed to compose a character in an IME is not a shortcut.\n if (keyboardEvent.isComposing) return;\n\n for (const [spelling, handler] of Object.entries(hotkeysRef.current)) {\n const combo = parseCombo(spelling);\n if (!combo || !matches(combo, keyboardEvent)) continue;\n if (isFieldKey(combo) && !enableInFields && isInField(keyboardEvent.target)) continue;\n if (preventDefault) keyboardEvent.preventDefault();\n handler(keyboardEvent);\n return;\n }\n }\n\n node.addEventListener('keydown', onKeyDown);\n return () => node.removeEventListener('keydown', onKeyDown);\n }, [enabled, target, enableInFields, preventDefault]);\n}\n\nexport default useHotkeys;\n"],"mappings":"2DAmCA,IAAM,EAAiB,0EAGjB,EAAsC,CAC1C,IAAK,SACL,MAAO,IACP,SAAU,IACV,KAAM,IACN,GAAI,UACJ,KAAM,YACN,KAAM,YACN,MAAO,YACT,EAGA,SAAS,GAA2B,CAClC,OAAO,OAAO,UAAc,KAAe,wBAAwB,KAAK,UAAU,SAAS,CAC7F,CAEA,SAAS,EAAW,EAA6B,CAC/C,IAAM,EAAQ,EACX,MAAM,GAAG,CAAC,CACV,IAAK,GAAS,EAAK,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CACxC,OAAO,OAAO,EAGjB,GAAI,EAAM,SAAW,EAAG,OAAO,KAE/B,IAAM,EAAgB,CAAE,IAAK,GAAI,KAAM,GAAO,KAAM,GAAO,IAAK,GAAO,MAAO,GAAO,WAAY,EAAM,EACjG,EAAQ,EAAgB,EAE9B,IAAK,IAAM,K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,CAAS,MAC7B,EAAK,oBAAoB,UAAW,CAAS,CAC5D,EAAG,CAAC,EAAS,EAAQ,EAAgB,CAAc,CAAC,CACtD"}
@@ -0,0 +1,2 @@
1
+ "use client";import{useEffect as e,useState as t}from"react";var n={hasStart:!1,hasEnd:!1};function r(r,i={}){let{axis:a=`vertical`,isEnabled:o=!0}=i,[s,c]=t(n);return e(()=>{let e=r.current;if(!o||!e){c(e=>e===n?e:n);return}let t=a===`vertical`,i=getComputedStyle(e),s=t?i.overflowY:i.overflowX,l=s===`hidden`||s===`clip`,u=()=>{let n=t?e.scrollTop:e.scrollLeft,r=t?e.scrollHeight:e.scrollWidth,i=t?e.clientHeight:e.clientWidth,a=!l&&n>1,o=!l&&r-i-n>1;c(e=>e.hasStart===a&&e.hasEnd===o?e:{hasStart:a,hasEnd:o})},d=new ResizeObserver(u),f=()=>{d.disconnect(),d.observe(e);for(let t of Array.from(e.children))d.observe(t)},p=new MutationObserver(()=>{f(),u()});return u(),f(),p.observe(e,{childList:!0,subtree:!0,characterData:!0}),e.addEventListener(`scroll`,u,{passive:!0}),()=>{e.removeEventListener(`scroll`,u),p.disconnect(),d.disconnect()}},[r,a,o]),s}export{r as useScrollEdges};
2
+ //# sourceMappingURL=useScrollEdges.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollEdges.mjs","names":[],"sources":["../../../../package/common/hooks/useScrollEdges.ts"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\nexport interface ScrollEdges {\n /** Content is scrolled out of view past the element's top (or left) edge. */\n hasStart: boolean;\n /** Content continues past the element's bottom (or right) edge. */\n hasEnd: boolean;\n}\n\nexport interface ScrollEdgesOptions {\n /** Which axis to measure. Default `'vertical'`. */\n axis?: 'vertical' | 'horizontal';\n /** Measure at all. Default `true`; pass `false` while the element is hidden. */\n isEnabled?: boolean;\n}\n\nconst NONE: ScrollEdges = { hasStart: false, hasEnd: false };\n\n/**\n * Reports which edges of a scroll container currently hide content, so a caller can mark the\n * boundary, most often by fading it: see `styles/scrollFade.module.pcss`.\n */\nexport function useScrollEdges(ref: RefObject<HTMLElement | null>, options: ScrollEdgesOptions = {}): ScrollEdges {\n const { axis = 'vertical', isEnabled = true } = options;\n const [edges, setEdges] = useState<ScrollEdges>(NONE);\n\n useEffect(() => {\n const element = ref.current;\n if (!isEnabled || !element) {\n setEdges((previous) => (previous === NONE ? previous : NONE));\n return;\n }\n\n const isVertical = axis === 'vertical';\n // Read once rather than per measurement: `getComputedStyle` in the scroll handler forces a\n // style flush on every frame of a scroll, and the overflow mode can only change with the\n // element's class or inline style, which re-runs this effect anyway.\n const style = getComputedStyle(element);\n // `hidden` and `clip` cut the overflow off with no way for anyone to reach the rest, so\n // marking an edge there would promise a scroll that cannot happen. The metrics alone never\n // say so: `scrollHeight` reports the full content height under both.\n const overflow = isVertical ? style.overflowY : style.overflowX;\n const isClipped = overflow === 'hidden' || overflow === 'clip';\n\n const measure = () => {\n const offset = isVertical ? element.scrollTop : element.scrollLeft;\n const total = isVertical ? element.scrollHeight : element.scrollWidth;\n const visible = isVertical ? element.clientHeight : element.clientWidth;\n // A pixel of slack: fractional layout at non-integer zoom leaves the offset a hair short of\n // the maximum, which would otherwise read as \"there is still more past this edge\" forever.\n const hasStart = !isClipped && offset > 1;\n const hasEnd = !isClipped && total - visible - offset > 1;\n setEdges((previous) =>\n previous.hasStart === hasStart && previous.hasEnd === hasEnd ? previous : { hasStart, hasEnd },\n );\n };\n\n const resizes = new ResizeObserver(measure);\n // The port's own box stops changing once it is capped, so content that grows without one of\n // its ancestors resizing, an image decoding or a web font swapping in, only shows on a child.\n const observeContent = () => {\n resizes.disconnect();\n resizes.observe(element);\n for (const child of Array.from(element.children)) resizes.observe(child);\n };\n\n // Content arriving through React changes `scrollHeight` without resizing anything already\n // observed, and the new children have to be picked up for the next time they grow.\n const mutations = new MutationObserver(() => {\n observeContent();\n measure();\n });\n\n measure();\n observeContent();\n mutations.observe(element, { childList: true, subtree: true, characterData: true });\n element.addEventListener('scroll', measure, { passive: true });\n return () => {\n element.removeEventListener('scroll', measure);\n mutations.disconnect();\n resizes.disconnect();\n };\n }, [ref, axis, isEnabled]);\n\n return edges;\n}\n"],"mappings":"6DAgBA,IAAM,EAAoB,CAAE,SAAU,GAAO,OAAQ,EAAM,EAM3D,SAAgB,EAAe,EAAoC,EAA8B,CAAC,EAAgB,CAChH,GAAM,CAAE,OAAO,WAAY,YAAY,IAAS,EAC1C,CAAC,EAAO,GAAY,EAAsB,CAAI,EA4DpD,OA1DA,MAAgB,CACd,IAAM,EAAU,EAAI,QACpB,GAAI,CAAC,GAAa,CAAC,EAAS,CAC1B,EAAU,GAAc,IAAa,EAAO,EAAW,CAAK,EAC5D,MACF,CAEA,IAAM,EAAa,IAAS,WAItB,EAAQ,iBAAiB,CAAO,EAIhC,EAAW,EAAa,EAAM,UAAY,EAAM,UAChD,EAAY,IAAa,UAAY,IAAa,OAElD,MAAgB,CACpB,IAAM,EAAS,EAAa,EAAQ,UAAY,EAAQ,WAClD,EAAQ,EAAa,EAAQ,aAAe,EAAQ,YACpD,EAAU,EAAa,EAAQ,aAAe,EAAQ,YAGtD,EAAW,CAAC,GAAa,EAAS,EAClC,EAAS,CAAC,GAAa,EAAQ,EAAU,EAAS,EACxD,EAAU,GACR,EAAS,WAAa,GAAY,EAAS,SAAW,EAAS,EAAW,CAAE,WAAU,QAAO,CAC/F,CACF,EAEM,EAAU,IAAI,eAAe,CAAO,EAGpC,MAAuB,CAC3B,EAAQ,WAAW,EACnB,EAAQ,QAAQ,CAAO,EACvB,IAAK,IAAM,KAAS,MAAM,KAAK,EAAQ,QAAQ,EAAG,EAAQ,QAAQ,CAAK,CACzE,EAIM,EAAY,IAAI,qBAAuB,CAC3C,EAAe,EACf,EAAQ,CACV,CAAC,EAMD,OAJA,EAAQ,EACR,EAAe,EACf,EAAU,QAAQ,EAAS,CAAE,UAAW,GAAM,QAAS,GAAM,cAAe,EAAK,CAAC,EAClF,EAAQ,iBAAiB,SAAU,EAAS,CAAE,QAAS,EAAK,CAAC,MAChD,CACX,EAAQ,oBAAoB,SAAU,CAAO,EAC7C,EAAU,WAAW,EACrB,EAAQ,WAAW,CACrB,CACF,EAAG,CAAC,EAAK,EAAM,CAAS,CAAC,EAElB,CACT"}
@@ -1,2 +1,2 @@
1
- "use client";import e from"./useCoarsePointer.mjs";import{useEffect as t,useRef as n,useState as r}from"react";var i=180,a=10;function o({onDismiss:o,axis:s=`x`,distanceThreshold:c=80,velocityThreshold:l=.5,disabled:u=!1,mobileOnly:d=!0}){let f=n(null),[p,m]=r(!1),h=e(),g=u||d&&!h,_=n(null),v=n(o);return t(()=>{v.current=o}),t(()=>{let e=f.current;if(!e||g)return;function t(t,n){if(!e)return;n!==`none`&&e.offsetHeight;let r=s===`x`?`translateX(${t}px)`:`translateY(${t}px)`;e.style.transition=n,e.style.transform=r;let i=Math.max(0,1-Math.abs(t)/(c*2.5));e.style.opacity=String(i)}function n(e){let n=_.current;if(!n||e.pointerId!==n.pointerId)return;let r=e.clientX-n.startX,i=e.clientY-n.startY;if(!n.axisLocked){let e=s===`x`?r:i,t=s===`x`?i:r;if(Math.abs(e)<a&&Math.abs(t)<a)return;if(Math.abs(t)>Math.abs(e)){n.active=!1;return}n.axisLocked=!0,m(!0)}n.active&&(e.preventDefault(),n.offset=s===`x`?r:i,t(n.offset,`none`))}function r(){let a=_.current;if(_.current=null,window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r),!a||!a.active||!a.axisLocked){m(!1);return}let o=Math.max(1,Date.now()-a.startTime),s=a.offset/o;if(Math.abs(a.offset)>=c||Math.abs(s)>=l){let n=e?.getBoundingClientRect().width??0;t(Math.sign(a.offset||1)*(n+40),`transform ${i}ms ease-out, opacity ${i}ms ease-out`),setTimeout(()=>v.current(),i)}else t(0,`transform ${i}ms ease-out, opacity ${i}ms ease-out`);m(!1)}function o(t){!_.current&&e&&(e.style.animation=`none`,_.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startTime:Date.now(),offset:0,axisLocked:!1,active:!0},window.addEventListener(`pointermove`,n,{passive:!1}),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,r))}return e.addEventListener(`pointerdown`,o),()=>{e.removeEventListener(`pointerdown`,o),window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r)}},[s,c,l,g]),{ref:f,isDragging:p}}export{o as useSwipeDismiss};
1
+ "use client";import e from"./useCoarsePointer.mjs";import{useCallback as t,useEffect as n,useRef as r,useState as i}from"react";var a=180,o=10;function s({onDismiss:s,axis:c=`x`,distanceThreshold:l=80,velocityThreshold:u=.5,disabled:d=!1,mobileOnly:f=!0}){let[p,m]=i(null),h=t(e=>m(e),[]),[g,_]=i(!1),v=e(),y=d||f&&!v,b=r(null),x=r(s);return n(()=>{x.current=s}),n(()=>{let e=p;if(!e||y)return;function t(t,n){if(!e)return;n!==`none`&&e.offsetHeight;let r=c===`x`?`translateX(${t}px)`:`translateY(${t}px)`;e.style.transition=n,e.style.transform=r;let i=Math.max(0,1-Math.abs(t)/(l*2.5));e.style.opacity=String(i)}function n(e){let n=b.current;if(!n||e.pointerId!==n.pointerId)return;let r=e.clientX-n.startX,i=e.clientY-n.startY;if(!n.axisLocked){let e=c===`x`?r:i,t=c===`x`?i:r;if(Math.abs(e)<o&&Math.abs(t)<o)return;if(Math.abs(t)>Math.abs(e)){n.active=!1;return}n.axisLocked=!0,_(!0)}n.active&&(e.preventDefault(),n.offset=c===`x`?r:i,t(n.offset,`none`))}function r(){let i=b.current;if(b.current=null,window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r),!i||!i.active||!i.axisLocked){_(!1);return}let o=Math.max(1,Date.now()-i.startTime),s=i.offset/o;if(Math.abs(i.offset)>=l||Math.abs(s)>=u){let n=e?.getBoundingClientRect().width??0;t(Math.sign(i.offset||1)*(n+40),`transform ${a}ms ease-out, opacity ${a}ms ease-out`),setTimeout(()=>x.current(),a)}else t(0,`transform ${a}ms ease-out, opacity ${a}ms ease-out`);_(!1)}function i(t){!b.current&&e&&(e.style.animation=`none`,b.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startTime:Date.now(),offset:0,axisLocked:!1,active:!0},window.addEventListener(`pointermove`,n,{passive:!1}),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,r))}return e.addEventListener(`pointerdown`,i),()=>{e.removeEventListener(`pointerdown`,i),window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r)}},[p,c,l,u,y]),{ref:h,isDragging:g}}export{s as useSwipeDismiss};
2
2
  //# sourceMappingURL=useSwipeDismiss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeDismiss.mjs","names":[],"sources":["../../../../package/common/hooks/useSwipeDismiss.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { useCoarsePointer } from './useCoarsePointer';\n\nexport interface UseSwipeDismissOptions {\n /** Called once the swipe commits (past the threshold) — after the exit transition finishes,\n * not the instant the pointer is released. */\n onDismiss: () => void;\n /** Which axis the drag tracks (default `'x'`, the natural direction for a toast/notification). */\n axis?: 'x' | 'y';\n /** Distance in px past which releasing counts as a commit, regardless of speed (default `80`). */\n distanceThreshold?: number;\n /** Speed in px/ms past which releasing counts as a commit, regardless of distance (default `0.5`) —\n * lets a fast flick dismiss even if the pointer didn't travel very far. */\n velocityThreshold?: number;\n /** Disables the gesture entirely — no listeners are attached. */\n disabled?: boolean;\n /** Restricts the gesture to coarse (touch) pointers, auto-detected via `matchMedia`. On a\n * mouse/trackpad device a drag is more likely to be a text selection than an intentional\n * dismiss, and other affordances (a close button, auto-dismiss) typically already cover that\n * case. Default `true`; set `false` to allow the gesture on any pointer type. */\n mobileOnly?: boolean;\n}\n\nexport interface UseSwipeDismissResult<T extends HTMLElement> {\n /** Attach to the element that should become draggable. The hook wires up its own pointer\n * listeners on this node directly (no handlers to spread), so this is the only thing to attach. */\n ref: React.RefObject<T | null>;\n /** True for the duration of an active drag — e.g. use it to pause an auto-dismiss timer. */\n isDragging: boolean;\n}\n\nconst EXIT_TRANSITION_MS = 180;\n// Below this many px of movement, direction intent isn't decided yet — lets a vertical scroll\n// gesture that merely starts on the element pass through instead of being hijacked as a swipe.\nconst AXIS_LOCK_THRESHOLD = 10;\n\n/**\n * Drag-to-dismiss on any pointer type (touch, mouse, pen) via the Pointer Events API. Applies the\n * drag offset and a fading opacity directly to the DOM node (bypassing React state) so the visual\n * tracks the pointer at native speed, then either springs back or animates fully off-screen and\n * calls `onDismiss` once that exit transition completes.\n */\nexport function useSwipeDismiss<T extends HTMLElement>({\n onDismiss,\n axis = 'x',\n distanceThreshold = 80,\n velocityThreshold = 0.5,\n disabled = false,\n mobileOnly = true,\n}: UseSwipeDismissOptions): UseSwipeDismissResult<T> {\n const ref = useRef<T>(null);\n const [isDragging, setIsDragging] = useState(false);\n\n const isCoarsePointer = useCoarsePointer();\n\n const effectiveDisabled = disabled || (mobileOnly && !isCoarsePointer);\n\n // Mutable across the life of one drag; doesn't need to trigger re-renders.\n const dragRef = useRef<{\n pointerId: number;\n startX: number;\n startY: number;\n startTime: number;\n offset: number;\n axisLocked: boolean;\n active: boolean;\n } | null>(null);\n\n const onDismissRef = useRef(onDismiss);\n useEffect(() => {\n onDismissRef.current = onDismiss;\n });\n\n useEffect(() => {\n const el = ref.current;\n if (!el || effectiveDisabled) return;\n\n function applyTransform(offset: number, transition: string) {\n if (!el) return;\n if (transition !== 'none') {\n // Switching straight from the live drag's `transition: none` to an animated one, in the\n // same tick as the transform change, can get coalesced into a single frame with no\n // animation in between — the element just jumps to its end state instead of sliding\n // there. Forcing a layout read first commits the current (pre-transition) position as\n // its own frame, so the transition below actually has something to animate from.\n void el.offsetHeight;\n }\n const translate = axis === 'x' ? `translateX(${offset}px)` : `translateY(${offset}px)`;\n el.style.transition = transition;\n el.style.transform = translate;\n const fade = Math.max(0, 1 - Math.abs(offset) / (distanceThreshold * 2.5));\n el.style.opacity = String(fade);\n }\n\n function onPointerMove(event: PointerEvent) {\n const drag = dragRef.current;\n if (!drag || event.pointerId !== drag.pointerId) return;\n\n const deltaX = event.clientX - drag.startX;\n const deltaY = event.clientY - drag.startY;\n\n if (!drag.axisLocked) {\n const primary = axis === 'x' ? deltaX : deltaY;\n const cross = axis === 'x' ? deltaY : deltaX;\n if (Math.abs(primary) < AXIS_LOCK_THRESHOLD && Math.abs(cross) < AXIS_LOCK_THRESHOLD) return;\n if (Math.abs(cross) > Math.abs(primary)) {\n // The gesture is mostly along the other axis (e.g. a page scroll) — hand it back.\n drag.active = false;\n return;\n }\n drag.axisLocked = true;\n setIsDragging(true);\n }\n\n if (!drag.active) return;\n event.preventDefault();\n drag.offset = axis === 'x' ? deltaX : deltaY;\n applyTransform(drag.offset, 'none');\n }\n\n function finishDrag() {\n const drag = dragRef.current;\n dragRef.current = null;\n window.removeEventListener('pointermove', onPointerMove);\n window.removeEventListener('pointerup', finishDrag);\n window.removeEventListener('pointercancel', finishDrag);\n if (!drag || !drag.active || !drag.axisLocked) {\n setIsDragging(false);\n return;\n }\n\n const elapsed = Math.max(1, Date.now() - drag.startTime);\n const velocity = drag.offset / elapsed;\n const committed = Math.abs(drag.offset) >= distanceThreshold || Math.abs(velocity) >= velocityThreshold;\n\n if (committed) {\n const width = el?.getBoundingClientRect().width ?? 0;\n const exitOffset = Math.sign(drag.offset || 1) * (width + 40);\n applyTransform(\n exitOffset,\n `transform ${EXIT_TRANSITION_MS}ms ease-out, opacity ${EXIT_TRANSITION_MS}ms ease-out`,\n );\n setTimeout(() => onDismissRef.current(), EXIT_TRANSITION_MS);\n } else {\n applyTransform(0, `transform ${EXIT_TRANSITION_MS}ms ease-out, opacity ${EXIT_TRANSITION_MS}ms ease-out`);\n }\n setIsDragging(false);\n }\n\n function onPointerDown(event: PointerEvent) {\n if (dragRef.current || !el) return;\n // A still-\"forwards\"-filling CSS animation (e.g. the toast's entrance slide) wins the\n // cascade over an inline style.transform, so the drag offset below would silently never\n // show up on screen unless the animation is cleared first.\n el.style.animation = 'none';\n dragRef.current = {\n pointerId: event.pointerId,\n startX: event.clientX,\n startY: event.clientY,\n startTime: Date.now(),\n offset: 0,\n axisLocked: false,\n active: true,\n };\n window.addEventListener('pointermove', onPointerMove, { passive: false });\n window.addEventListener('pointerup', finishDrag);\n window.addEventListener('pointercancel', finishDrag);\n }\n\n el.addEventListener('pointerdown', onPointerDown);\n return () => {\n el.removeEventListener('pointerdown', onPointerDown);\n window.removeEventListener('pointermove', onPointerMove);\n window.removeEventListener('pointerup', finishDrag);\n window.removeEventListener('pointercancel', finishDrag);\n };\n }, [axis, distanceThreshold, velocityThreshold, effectiveDisabled]);\n\n return { ref, isDragging };\n}\n"],"mappings":"+GAgCA,IAAM,EAAqB,IAGrB,EAAsB,GAQ5B,SAAgB,EAAuC,CACrD,YACA,OAAO,IACP,oBAAoB,GACpB,oBAAoB,GACpB,WAAW,GACX,aAAa,IACsC,CACnD,IAAM,EAAM,EAAU,IAAI,EACpB,CAAC,EAAY,GAAiB,EAAS,EAAK,EAE5C,EAAkB,EAAiB,EAEnC,EAAoB,GAAa,GAAc,CAAC,EAGhD,EAAU,EAQN,IAAI,EAER,EAAe,EAAO,CAAS,EA8GrC,OA7GA,MAAgB,CACd,EAAa,QAAU,CACzB,CAAC,EAED,MAAgB,CACd,IAAM,EAAK,EAAI,QACf,GAAI,CAAC,GAAM,EAAmB,OAE9B,SAAS,EAAe,EAAgB,EAAoB,CAC1D,GAAI,CAAC,EAAI,OACL,IAAe,QAMjB,EAAQ,aAEV,IAAM,EAAY,IAAS,IAAM,cAAc,EAAO,KAAO,cAAc,EAAO,KAClF,EAAG,MAAM,WAAa,EACtB,EAAG,MAAM,UAAY,EACrB,IAAM,EAAO,KAAK,IAAI,EAAG,EAAI,KAAK,IAAI,CAAM,GAAK,EAAoB,IAAI,EACzE,EAAG,MAAM,QAAU,OAAO,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Aa,EAAmB,uBAAuB,EAAmB,YAAY,EAE1G,EAAc,EAAK,CACrB,CAEA,SAAS,EAAc,EAAqB,CACtC,GAAQ,SAAY,IAIxB,EAAG,MAAM,UAAY,OACrB,EAAQ,QAAU,CAChB,UAAW,EAAM,UACjB,OAAQ,EAAM,QACd,OAAQ,EAAM,QACd,UAAW,KAAK,IAAI,EACpB,OAAQ,EACR,WAAY,GACZ,OAAQ,EACV,EACA,OAAO,iBAAiB,cAAe,EAAe,CAAE,QAAS,EAAM,CAAC,EACxE,OAAO,iBAAiB,YAAa,CAAU,EAC/C,OAAO,iBAAiB,gBAAiB,CAAU,EACrD,CAGA,OADA,EAAG,iBAAiB,cAAe,CAAa,MACnC,CACX,EAAG,oBAAoB,cAAe,CAAa,EACnD,OAAO,oBAAoB,cAAe,CAAa,EACvD,OAAO,oBAAoB,YAAa,CAAU,EAClD,OAAO,oBAAoB,gBAAiB,CAAU,CACxD,CACF,EAAG,CAAC,EAAM,EAAmB,EAAmB,CAAiB,CAAC,EAE3D,CAAE,MAAK,YAAW,CAC3B"}
1
+ {"version":3,"file":"useSwipeDismiss.mjs","names":[],"sources":["../../../../package/common/hooks/useSwipeDismiss.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { useCoarsePointer } from './useCoarsePointer';\n\nexport interface UseSwipeDismissOptions {\n /** Called once the swipe commits (past the threshold) — after the exit transition finishes,\n * not the instant the pointer is released. */\n onDismiss: () => void;\n /** Which axis the drag tracks (default `'x'`, the natural direction for a toast/notification). */\n axis?: 'x' | 'y';\n /** Distance in px past which releasing counts as a commit, regardless of speed (default `80`). */\n distanceThreshold?: number;\n /** Speed in px/ms past which releasing counts as a commit, regardless of distance (default `0.5`) —\n * lets a fast flick dismiss even if the pointer didn't travel very far. */\n velocityThreshold?: number;\n /** Disables the gesture entirely — no listeners are attached. */\n disabled?: boolean;\n /** Restricts the gesture to coarse (touch) pointers, auto-detected via `matchMedia`. On a\n * mouse/trackpad device a drag is more likely to be a text selection than an intentional\n * dismiss, and other affordances (a close button, auto-dismiss) typically already cover that\n * case. Default `true`; set `false` to allow the gesture on any pointer type. */\n mobileOnly?: boolean;\n}\n\nexport interface UseSwipeDismissResult<T extends HTMLElement> {\n /** Attach to the element that should become draggable. The hook wires up its own pointer\n * listeners on this node directly (no handlers to spread), so this is the only thing to attach.\n *\n * A callback ref rather than an object one, because the hook has to know when the node changes:\n * an element that is unmounted and rendered again is a *different* node, and a ref object cannot\n * say so. To keep a ref of your own on the element, call both from one callback. */\n ref: React.RefCallback<T>;\n /** True for the duration of an active drag — e.g. use it to pause an auto-dismiss timer. */\n isDragging: boolean;\n}\n\nconst EXIT_TRANSITION_MS = 180;\n// Below this many px of movement, direction intent isn't decided yet — lets a vertical scroll\n// gesture that merely starts on the element pass through instead of being hijacked as a swipe.\nconst AXIS_LOCK_THRESHOLD = 10;\n\n/**\n * Drag-to-dismiss on any pointer type (touch, mouse, pen) via the Pointer Events API. Applies the\n * drag offset and a fading opacity directly to the DOM node (bypassing React state) so the visual\n * tracks the pointer at native speed, then either springs back or animates fully off-screen and\n * calls `onDismiss` once that exit transition completes.\n */\nexport function useSwipeDismiss<T extends HTMLElement>({\n onDismiss,\n axis = 'x',\n distanceThreshold = 80,\n velocityThreshold = 0.5,\n disabled = false,\n mobileOnly = true,\n}: UseSwipeDismissOptions): UseSwipeDismissResult<T> {\n // The node lives in state, not in a ref: the listeners have to be re-attached when the element\n // is replaced, and a ref object's `current` changing never re-runs the effect below. Rendering\n // the element again after it was unmounted otherwise left the gesture wired to the old node.\n const [node, setNode] = useState<T | null>(null);\n const ref = useCallback((element: T | null) => setNode(element), []);\n const [isDragging, setIsDragging] = useState(false);\n\n const isCoarsePointer = useCoarsePointer();\n\n const effectiveDisabled = disabled || (mobileOnly && !isCoarsePointer);\n\n // Mutable across the life of one drag; doesn't need to trigger re-renders.\n const dragRef = useRef<{\n pointerId: number;\n startX: number;\n startY: number;\n startTime: number;\n offset: number;\n axisLocked: boolean;\n active: boolean;\n } | null>(null);\n\n const onDismissRef = useRef(onDismiss);\n useEffect(() => {\n onDismissRef.current = onDismiss;\n });\n\n useEffect(() => {\n const el = node;\n if (!el || effectiveDisabled) return;\n\n function applyTransform(offset: number, transition: string) {\n if (!el) return;\n if (transition !== 'none') {\n // Switching straight from the live drag's `transition: none` to an animated one, in the\n // same tick as the transform change, can get coalesced into a single frame with no\n // animation in between — the element just jumps to its end state instead of sliding\n // there. Forcing a layout read first commits the current (pre-transition) position as\n // its own frame, so the transition below actually has something to animate from.\n void el.offsetHeight;\n }\n const translate = axis === 'x' ? `translateX(${offset}px)` : `translateY(${offset}px)`;\n el.style.transition = transition;\n el.style.transform = translate;\n const fade = Math.max(0, 1 - Math.abs(offset) / (distanceThreshold * 2.5));\n el.style.opacity = String(fade);\n }\n\n function onPointerMove(event: PointerEvent) {\n const drag = dragRef.current;\n if (!drag || event.pointerId !== drag.pointerId) return;\n\n const deltaX = event.clientX - drag.startX;\n const deltaY = event.clientY - drag.startY;\n\n if (!drag.axisLocked) {\n const primary = axis === 'x' ? deltaX : deltaY;\n const cross = axis === 'x' ? deltaY : deltaX;\n if (Math.abs(primary) < AXIS_LOCK_THRESHOLD && Math.abs(cross) < AXIS_LOCK_THRESHOLD) return;\n if (Math.abs(cross) > Math.abs(primary)) {\n // The gesture is mostly along the other axis (e.g. a page scroll) — hand it back.\n drag.active = false;\n return;\n }\n drag.axisLocked = true;\n setIsDragging(true);\n }\n\n if (!drag.active) return;\n event.preventDefault();\n drag.offset = axis === 'x' ? deltaX : deltaY;\n applyTransform(drag.offset, 'none');\n }\n\n function finishDrag() {\n const drag = dragRef.current;\n dragRef.current = null;\n window.removeEventListener('pointermove', onPointerMove);\n window.removeEventListener('pointerup', finishDrag);\n window.removeEventListener('pointercancel', finishDrag);\n if (!drag || !drag.active || !drag.axisLocked) {\n setIsDragging(false);\n return;\n }\n\n const elapsed = Math.max(1, Date.now() - drag.startTime);\n const velocity = drag.offset / elapsed;\n const committed = Math.abs(drag.offset) >= distanceThreshold || Math.abs(velocity) >= velocityThreshold;\n\n if (committed) {\n const width = el?.getBoundingClientRect().width ?? 0;\n const exitOffset = Math.sign(drag.offset || 1) * (width + 40);\n applyTransform(\n exitOffset,\n `transform ${EXIT_TRANSITION_MS}ms ease-out, opacity ${EXIT_TRANSITION_MS}ms ease-out`,\n );\n setTimeout(() => onDismissRef.current(), EXIT_TRANSITION_MS);\n } else {\n applyTransform(0, `transform ${EXIT_TRANSITION_MS}ms ease-out, opacity ${EXIT_TRANSITION_MS}ms ease-out`);\n }\n setIsDragging(false);\n }\n\n function onPointerDown(event: PointerEvent) {\n if (dragRef.current || !el) return;\n // A still-\"forwards\"-filling CSS animation (e.g. the toast's entrance slide) wins the\n // cascade over an inline style.transform, so the drag offset below would silently never\n // show up on screen unless the animation is cleared first.\n el.style.animation = 'none';\n dragRef.current = {\n pointerId: event.pointerId,\n startX: event.clientX,\n startY: event.clientY,\n startTime: Date.now(),\n offset: 0,\n axisLocked: false,\n active: true,\n };\n window.addEventListener('pointermove', onPointerMove, { passive: false });\n window.addEventListener('pointerup', finishDrag);\n window.addEventListener('pointercancel', finishDrag);\n }\n\n el.addEventListener('pointerdown', onPointerDown);\n return () => {\n el.removeEventListener('pointerdown', onPointerDown);\n window.removeEventListener('pointermove', onPointerMove);\n window.removeEventListener('pointerup', finishDrag);\n window.removeEventListener('pointercancel', finishDrag);\n };\n }, [node, axis, distanceThreshold, velocityThreshold, effectiveDisabled]);\n\n return { ref, isDragging };\n}\n"],"mappings":"gIAoCA,IAAM,EAAqB,IAGrB,EAAsB,GAQ5B,SAAgB,EAAuC,CACrD,YACA,OAAO,IACP,oBAAoB,GACpB,oBAAoB,GACpB,WAAW,GACX,aAAa,IACsC,CAInD,GAAM,CAAC,EAAM,GAAW,EAAmB,IAAI,EACzC,EAAM,EAAa,GAAsB,EAAQ,CAAO,EAAG,CAAC,CAAC,EAC7D,CAAC,EAAY,GAAiB,EAAS,EAAK,EAE5C,EAAkB,E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i,a){let[o,s]=n(!1),c=t(!1),l=t(null),u=t(i);return e(()=>{u.current=i}),e(()=>{let e=r.current,t=l.current;if(a||!e||!t)return;let n=!1,i=()=>{c.current||(c.current=!0,s(!0),u.current().catch(()=>null).finally(()=>{n||(c.current=!1,s(!1),o.unobserve(t),o.observe(t))}))},o=new IntersectionObserver(([e])=>{e.isIntersecting&&i()},{root:e});return o.observe(t),()=>{n=!0,o.disconnect()}},[r,a]),{isLoading:o,sentinelRef:l}}export{r as useInfiniteScroll};
2
+ //# sourceMappingURL=useInfiniteScroll.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInfiniteScroll.mjs","names":[],"sources":["../../../../package/common/infiniteBlock/useInfiniteScroll.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport type React from 'react';\n\n// Loads more items once a sentinel element at the end of the list scrolls into view.\n// IntersectionObserver only fires on a change of intersection state, so if a page of\n// freshly-loaded items still doesn't fill the container, the sentinel stays visible and\n// we have to re-arm the observer ourselves to pick up the next page.\nexport function useInfiniteScroll(\n containerRef: React.RefObject<HTMLDivElement | null>,\n onScroll: () => Promise<void>,\n disabled: boolean,\n) {\n const [isLoading, setIsLoading] = useState(false);\n const isLoadingRef = useRef(false);\n const sentinelRef = useRef<HTMLDivElement>(null);\n\n // Kept in a ref so a caller passing a fresh onScroll function each render doesn't\n // tear down and recreate the observer every time.\n const onScrollRef = useRef(onScroll);\n useEffect(() => {\n onScrollRef.current = onScroll;\n });\n\n useEffect(() => {\n const root = containerRef.current;\n const sentinel = sentinelRef.current;\n if (disabled || !root || !sentinel) return undefined;\n\n let cancelled = false;\n\n const loadMore = () => {\n if (isLoadingRef.current) return;\n isLoadingRef.current = true;\n setIsLoading(true);\n\n onScrollRef\n .current()\n .catch(() => null)\n .finally(() => {\n if (cancelled) return;\n isLoadingRef.current = false;\n setIsLoading(false);\n observer.unobserve(sentinel);\n observer.observe(sentinel);\n });\n };\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) loadMore();\n },\n { root },\n );\n\n observer.observe(sentinel);\n\n return () => {\n cancelled = true;\n observer.disconnect();\n };\n }, [containerRef, disabled]);\n\n return { isLoading, sentinelRef };\n}\n"],"mappings":"yEAOA,SAAgB,EACd,EACA,EACA,EACA,CACA,GAAM,CAAC,EAAW,GAAgB,EAAS,EAAK,EAC1C,EAAe,EAAO,EAAK,EAC3B,EAAc,EAAuB,IAAI,EAIzC,EAAc,EAAO,CAAQ,EA4CnC,OA3CA,MAAgB,CACd,EAAY,QAAU,CACxB,CAAC,EAED,MAAgB,CACd,IAAM,EAAO,EAAa,QACpB,EAAW,EAAY,QAC7B,GAAI,GAAY,CAAC,GAAQ,CAAC,EAAU,OAEpC,IAAI,EAAY,GAEV,MAAiB,CACjB,EAAa,UACjB,EAAa,QAAU,GACvB,EAAa,EAAI,EAEjB,EACG,QAAQ,CAAC,CACT,UAAY,IAAI,CAAC,CACjB,YAAc,CACT,IACJ,EAAa,QAAU,GACvB,EAAa,EAAK,EAClB,EAAS,UAAU,CAAQ,EAC3B,EAAS,QAAQ,CAAQ,EAC3B,CAAC,EACL,EAEM,EAAW,IAAI,sBAClB,CAAC,KAAW,CACP,EAAM,gBAAgB,EAAS,CACrC,EACA,CAAE,MAAK,CACT,EAIA,OAFA,EAAS,QAAQ,CAAQ,MAEZ,CACX,EAAY,GACZ,EAAS,WAAW,CACtB,CACF,EAAG,CAAC,EAAc,CAAQ,CAAC,EAEpB,CAAE,YAAW,aAAY,CAClC"}
@@ -1,2 +1,2 @@
1
- "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{useLabels as t}from"../configProvider/useLabels.mjs";import n from"../tooltip/tooltip.mjs";import ee from"../animatedIcon/animatedIcon.mjs";import r from"./input.module.mjs";import{mergeRefs as te}from"../utils/mergeRefs.mjs";import{InputIconPosition as i,InputType as a}from"./input.types.mjs";import ne,{useCallback as re,useEffect as o,useId as ie,useRef as s,useState as c}from"react";import l from"classnames";import{FontAwesomeIcon as u}from"@fortawesome/react-fontawesome";import{faEnvelope as ae,faEye as oe,faEyeSlash as se,faPen as ce,faPhone as le,faSearch as ue,faXmark as de}from"@fortawesome/free-solid-svg-icons";import{jsx as d,jsxs as f}from"react/jsx-runtime";var fe={clear:`Clear`,showPassword:`Show password`,hidePassword:`Hide password`,clearSearch:`Clear search`};function p(e){if(e)return{role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(t))}}}function pe(pe){let{name:me=``,id:he,label:m=``,errorMessage:h=``,isValid:ge=!0,className:_e=``,style:ve,value:ye=``,icon:g=null,iconPosition:be,onChange:_=()=>{},onFocus:xe=null,onBlur:Se=null,onMouseEnter:Ce=null,onMouseLeave:we=null,isUppercase:Te=!1,isRequired:Ee=!1,tabIndex:De=0,type:v=void 0,isRow:Oe=!1,onIconClick:y=null,parse:ke=null,formValidator:b=null,autoFocus:Ae=!1,suffix:je=null,upperRightLabel:x=null,labelInBorder:Me=!1,showCancel:Ne=!1,onClearClicked:Pe,min:Fe=null,max:Ie=null,placeholder:S=``,useMatLabelStyle:C=!0,alwaysFloatLabel:Le=!1,autoComplete:Re=null,onClick:ze=()=>null,readOnly:w=!1,customInput:T,alwaysShowCancel:Be=!1,multiline:E=!1,rows:Ve,autoResize:D=!1,classNames:O,styles:k,disabled:He=!1,labels:Ue,ref:We,...A}=e(`Input`,pe),j=t(`Input`,Ue,fe),[M,Ge]=c(!1),[Ke,N]=c(!1),[P,F]=c(!1),[I,L]=c(!1),[,qe]=c(0),R=s(null),z=s(b),Je=ie(),Ye=he||me||Je,B=b?b.value:ye,Xe=s(!1),V=re(()=>{let e=R.current;if(e){if(!D){Xe.current&&=(e.style.height=``,!1);return}e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`,Xe.current=!0}},[D]);o(()=>{V()},[V,B]),o(()=>{Ae&&R.current&&setTimeout(()=>{R.current?.focus()},1)},[Ae]),o(()=>{z.current=b;let e=z.current;if(!e)return;e.label=m??``,e.validate();let t=()=>qe(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,m]);let Ze=()=>b?b.touched&&b.hasError():!ge||!!h,Qe=()=>!!(Ee||b&&b.validators.find(e=>e.validatorId===`required`)),$e=e=>{F(!0),Ce&&Ce(e)},et=e=>{F(!1),we&&we(e)},tt=e=>{Ge(!0),xe&&xe(e)},nt=e=>{z.current&&(z.current.touched=!0),Ge(!1),Se&&Se(e)},rt=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),ke&&(n=ke(n)),b&&b.set(n),_&&_(n,t),V()},it=()=>{if(v!==a.Email)return v===a.Phone?`tel`:v===a.Search?`search`:v===`password`&&I?`text`:v},at=()=>{if(v===a.Email)return`email`;if(v===a.Phone)return`tel`;if(v===a.Search)return`search`},ot=v&&v!==a.Date&&v!==a.Iban&&v!==a.HasNoIcon,st=v===a.Search||v===a.Password,H=!!g,ct=H&&!st,lt=v===a.Email||v===a.Phone||v===a.Search,U=(be??(!C&&lt?i.Left:i.Right))===i.Left,W={className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!y,[r.inputFieldIconLeft]:U}),onClick:y??void 0,...p(y)},G=g,K=y??G?.props.onClick,ut=ct&&G?ne.cloneElement(G,{className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!K,[r.inputFieldIconLeft]:U},G.props.className),onClick:K,...p(K)}):null,dt=(ot||H)&&U,ft={className:l(r.inputFieldIcon,r.inputFieldIconPassword,{[r.inputFieldIconLeft]:U}),onClick:()=>L(!I),...p(()=>L(!I)),"aria-label":I?j.hidePassword:j.showPassword},q=Ze(),J=m;J&&Qe()&&(J=`${J} *`);let pt=Qe()?d(`span`,{className:r.requiredMark,children:`*`}):null,Y=M&&!w,X=C&&(Le||Y||B||Ke||v===a.Date),mt=e=>{let{animationName:t}=e;if(t===r.inputAutofillStart){N(!0);let t=e.currentTarget.value;t&&t!==String(B??``)&&rt(t);return}if(t===r.inputAutofillEnd){N(!1);return}A.onAnimationStart?.(e)},Z=v===a.Search&&!!B,Q=T?.props;function $(){b&&b.set(``),_?.(``),Pe?.()}return f(`div`,{className:l(r.input,{[r.inputIconLeft]:dt},_e),style:ve,children:[f(`label`,{htmlFor:Ye,className:l(r.inputLabel,O?.label,{[r.inputLabelColumn]:!Oe,[r.inputLabelInBorder]:Me}),style:k?.label,children:[m&&!C?f(`span`,{className:r.inputLabelText,children:[m,pt]}):null,x&&d(`div`,{className:l(r.inputUpperRightLabel,O?.upperRightLabel),style:k?.upperRightLabel,children:x}),f(`div`,{className:l(r.inputContainer,{[r.inputContainerMultiline]:E},O?.container),style:k?.container,onMouseEnter:$e,onMouseLeave:et,children:[ut,ne.cloneElement(T||d(E?`textarea`:`input`,{}),{...A,className:l(r.inputField,{[r.inputFieldUppercase]:Te,[r.inputFieldDate]:v===a.Date,[r.inputFieldDefault]:v!==a.Date,[r.inputFieldWithIcon]:ot||H,[r.inputFieldWithIconLeft]:dt,[r.inputFieldMultiline]:E,[r.inputFieldMultilineAutoResize]:E&&D,[r.inputFieldReadOnly]:w&&!He},O?.input,Q?.className),style:Q?.style||k?.input?{...Q?.style,...k?.input}:void 0,name:me,id:Ye,value:B,tabIndex:De,ref:T?void 0:te(R,We),onChange:rt,onAnimationStart:mt,onFocus:tt,onBlur:nt,placeholder:C?``:S,autoComplete:Re,onClick:ze,readOnly:w,disabled:He,...!E&&{type:it(),inputMode:A.inputMode??at(),min:Fe,max:Ie},...E&&Ve!==void 0&&{rows:Ve}}),je&&d(`div`,{className:l(r.inputFieldSuffix,O?.suffix),style:k?.suffix,children:je})]}),d(`fieldset`,{className:l(r.inputFieldset,O?.fieldset,{[r.inputFieldsetNoNotch]:!m,[r.inputContainerBorderFocused]:Y,[r.inputContainerBorderSearchFocused]:v===a.Search&&(Y||!!B),[r.inputContainerBorderInvalid]:q,[r.inputContainerBorderError]:q}),style:k?.fieldset,children:d(`legend`,{className:l(r.inputFieldsetLegend,{[r.inputFieldsetLegendActive]:X}),children:d(`span`,{children:J})})}),C&&m&&f(`div`,{className:l(r.inputMatLabel,{[r.inputMatLabelFloating]:X,[r.inputMatLabelMultiline]:E&&!X}),children:[m,pt]}),C&&S&&d(`div`,{className:l(r.inputPlaceholder,Y&&!B&&!Ke&&r.inputPlaceholderShown,E&&r.inputPlaceholderMultiline),children:S}),d(n,{variant:`error`,message:b?b.getCurrentErrorMessage():h||``,isVisible:q&&(M||P)})]}),v===a.Phone&&!H&&d(u,{icon:le,...W}),v===a.Email&&!H&&d(u,{icon:ae,...W}),v===a.Edit&&!H&&d(u,{icon:ce,...W}),v===a.Search&&d(ee,{icon:Z?de:ue,className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!Z,[r.inputFieldIconLeft]:U}),onClick:Z?$:void 0,...p(Z?$:void 0),"aria-label":Z?j.clearSearch:void 0}),v===a.Password&&d(u,{icon:I?se:oe,...ft}),(Ne&&B&&(M||P)||Be)&&v!==a.Search&&d(u,{icon:de,className:r.inputFieldIcon,onClick:$,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),...p($),"aria-label":j.clear})]})}export{pe as default};
1
+ "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{useLabels as t}from"../configProvider/useLabels.mjs";import n from"../tooltip/tooltip.mjs";import ee from"../animatedIcon/animatedIcon.mjs";import r from"./input.module.mjs";import{mergeRefs as te}from"../utils/mergeRefs.mjs";import{InputIconPosition as i,InputType as a}from"./input.types.mjs";import ne,{useCallback as re,useEffect as o,useId as ie,useRef as s,useState as c}from"react";import l from"classnames";import{FontAwesomeIcon as u}from"@fortawesome/react-fontawesome";import{faEnvelope as ae,faEye as oe,faEyeSlash as se,faPen as ce,faPhone as le,faSearch as ue,faXmark as de}from"@fortawesome/free-solid-svg-icons";import{jsx as d,jsxs as f}from"react/jsx-runtime";var fe={clear:`Clear`,showPassword:`Show password`,hidePassword:`Hide password`,clearSearch:`Clear search`};function p(e){if(e)return{role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(t))}}}function pe(pe){let{name:me=``,id:he,label:m=``,errorMessage:h=``,isValid:ge=!0,className:_e=``,style:ve,value:ye=``,icon:g=null,iconPosition:be,onChange:_=()=>{},onFocus:xe=null,onBlur:Se=null,onMouseEnter:Ce=null,onMouseLeave:we=null,isUppercase:Te=!1,isRequired:Ee=!1,tabIndex:De=0,type:v=void 0,isRow:Oe=!1,onIconClick:y=null,parse:ke=null,formValidator:b=null,autoFocus:Ae=!1,suffix:je=null,upperRightLabel:x=null,labelInBorder:Me=!1,showCancel:Ne=!1,onClearClicked:Pe,min:Fe=null,max:Ie=null,placeholder:S=``,useMatLabelStyle:C=!0,alwaysFloatLabel:Le=!1,autoComplete:Re=null,onClick:ze=()=>null,readOnly:w=!1,customInput:T,alwaysShowCancel:Be=!1,multiline:E=!1,rows:Ve,autoResize:D=!1,classNames:O,styles:k,disabled:He=!1,labels:Ue,ref:We,...A}=e(`Input`,pe),j=t(`Input`,Ue,fe),[M,Ge]=c(!1),[Ke,N]=c(!1),[P,F]=c(!1),[I,L]=c(!1),[,qe]=c(0),R=s(null),z=s(b),Je=ie(),Ye=he||me||Je,B=b?b.value:ye,Xe=s(!1),V=re(()=>{let e=R.current;if(e){if(!D){Xe.current&&=(e.style.height=``,!1);return}e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`,Xe.current=!0}},[D]);o(()=>{V()},[V,B]),o(()=>{Ae&&R.current&&setTimeout(()=>{R.current?.focus()},1)},[Ae]),o(()=>{z.current=b;let e=z.current;if(!e)return;e.label=m??``,e.validate();let t=()=>qe(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,m]);let Ze=()=>b?b.touched&&b.hasError():!ge||!!h,Qe=()=>!!(Ee||b&&b.validators.find(e=>e.validatorId===`required`)),$e=e=>{F(!0),Ce&&Ce(e)},et=e=>{F(!1),we&&we(e)},tt=e=>{Ge(!0),xe&&xe(e)},nt=e=>{z.current&&(z.current.touched=!0),Ge(!1),Se&&Se(e)},rt=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),ke&&(n=ke(n)),b&&b.set(n),_&&_(n,t),V()},it=()=>{if(v!==a.Email)return v===a.Phone?`tel`:v===a.Search?`search`:v===`password`&&I?`text`:v},at=()=>{if(v===a.Email)return`email`;if(v===a.Phone)return`tel`;if(v===a.Search)return`search`},ot=v&&v!==a.Date&&v!==a.Iban&&v!==a.HasNoIcon,st=v===a.Search||v===a.Password,H=!!g,ct=H&&!st,lt=v===a.Email||v===a.Phone||v===a.Search,U=(be??(!C&&lt?i.Left:i.Right))===i.Left,W={className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!y,[r.inputFieldIconLeft]:U}),onClick:y??void 0,...p(y)},G=g,K=y??G?.props.onClick,ut=ct&&G?ne.cloneElement(G,{className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!K,[r.inputFieldIconLeft]:U},G.props.className),onClick:K,...p(K)}):null,dt=(ot||H)&&U,ft={className:l(r.inputFieldIcon,r.inputFieldIconPassword,{[r.inputFieldIconLeft]:U}),onClick:()=>L(!I),...p(()=>L(!I)),"aria-label":I?j.hidePassword:j.showPassword},q=Ze(),J=m;J&&Qe()&&(J=`${J} *`);let pt=Qe()?d(`span`,{className:r.requiredMark,children:`*`}):null,Y=M&&!w,X=C&&(Le||Y||B||Ke||v===a.Date),mt=e=>{let{animationName:t}=e;if(t===r.inputAutofillStart){N(!0);let t=e.currentTarget.value;t&&t!==String(B??``)&&rt(t);return}if(t===r.inputAutofillEnd){N(!1);return}A.onAnimationStart?.(e)},Z=v===a.Search&&!!B,Q=T?.props;function $(){b&&b.set(``),_?.(``),Pe?.()}return f(`div`,{className:l(r.input,{[r.inputIconLeft]:dt},_e),style:ve,children:[f(`label`,{htmlFor:Ye,className:l(r.inputLabel,O?.label,{[r.inputLabelColumn]:!Oe,[r.inputLabelInBorder]:Me}),style:k?.label,children:[m&&!C?f(`span`,{className:r.inputLabelText,children:[m,pt]}):null,x&&d(`div`,{className:l(r.inputUpperRightLabel,O?.upperRightLabel),style:k?.upperRightLabel,children:x}),f(`div`,{className:l(r.inputContainer,{[r.inputContainerMultiline]:E},O?.container),style:k?.container,onMouseEnter:$e,onMouseLeave:et,children:[ut,ne.cloneElement(T||d(E?`textarea`:`input`,{}),{...A,className:l(r.inputField,{[r.inputFieldUppercase]:Te,[r.inputFieldDate]:v===a.Date,[r.inputFieldDefault]:v!==a.Date,[r.inputFieldWithIcon]:ot||H,[r.inputFieldWithIconLeft]:dt,[r.inputFieldMultiline]:E,[r.inputFieldMultilineAutoResize]:E&&D,[r.inputFieldReadOnly]:w&&!He},O?.input,Q?.className),style:Q?.style||k?.input?{...Q?.style,...k?.input}:void 0,name:me,id:Ye,value:B,tabIndex:De,ref:T?void 0:te(R,We),onChange:rt,onAnimationStart:mt,onFocus:tt,onBlur:nt,placeholder:C?``:S,autoComplete:Re,onClick:ze,readOnly:w,disabled:He,...!E&&{type:it(),inputMode:A.inputMode??at(),min:Fe,max:Ie},...E&&Ve!==void 0&&{rows:Ve}}),je&&d(`div`,{className:l(r.inputFieldSuffix,O?.suffix),style:k?.suffix,children:je})]}),d(`fieldset`,{className:l(r.inputFieldset,O?.fieldset,{[r.inputContainerBorderFocused]:Y,[r.inputContainerBorderSearchFocused]:v===a.Search&&(Y||!!B),[r.inputContainerBorderInvalid]:q,[r.inputContainerBorderError]:q}),style:k?.fieldset,children:d(`legend`,{className:l(r.inputFieldsetLegend,{[r.inputFieldsetLegendActive]:X}),children:d(`span`,{children:J})})}),C&&m&&f(`div`,{className:l(r.inputMatLabel,{[r.inputMatLabelFloating]:X,[r.inputMatLabelMultiline]:E&&!X}),children:[m,pt]}),C&&S&&d(`div`,{className:l(r.inputPlaceholder,Y&&!B&&!Ke&&r.inputPlaceholderShown,E&&r.inputPlaceholderMultiline),children:S}),d(n,{variant:`error`,message:b?b.getCurrentErrorMessage():h||``,isVisible:q&&(M||P)})]}),v===a.Phone&&!H&&d(u,{icon:le,...W}),v===a.Email&&!H&&d(u,{icon:ae,...W}),v===a.Edit&&!H&&d(u,{icon:ce,...W}),v===a.Search&&d(ee,{icon:Z?de:ue,className:l(r.inputFieldIcon,{[r.inputFieldIconNotClickable]:!Z,[r.inputFieldIconLeft]:U}),onClick:Z?$:void 0,...p(Z?$:void 0),"aria-label":Z?j.clearSearch:void 0}),v===a.Password&&d(u,{icon:I?se:oe,...ft}),(Ne&&B&&(M||P)||Be)&&v!==a.Search&&d(u,{icon:de,className:r.inputFieldIcon,onClick:$,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),...p($),"aria-label":j.clear})]})}export{pe as default};
2
2
  //# sourceMappingURL=input.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","names":[],"sources":["../../../../package/common/input/input.tsx"],"sourcesContent":["import React, { useState, useEffect, useRef, useCallback, useId } from 'react';\nimport cx from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faPhone,\n faPen,\n faEnvelope,\n faSearch,\n faXmark,\n faEye as passwordHiddenIcon,\n faEyeSlash as passwordShownIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport Tooltip from 'components/common/tooltip';\nimport AnimatedIcon from 'components/common/animatedIcon';\nimport { useComponentDefaults, useLabels } from 'components/common/configProvider';\nimport styles from './input.module.pcss';\nimport { mergeRefs } from '../utils/mergeRefs';\nimport type { InputLabels, InputProps } from './input.types';\nimport { InputType, InputIconPosition } from './input.types';\n\nconst DEFAULT_LABELS: Required<InputLabels> = {\n clear: 'Clear',\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n clearSearch: 'Clear search',\n};\n\nfunction keyboardActivationProps(onActivate?: ((event: React.SyntheticEvent) => void) | null) {\n if (!onActivate) return undefined;\n return {\n role: 'button' as const,\n tabIndex: 0,\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault();\n onActivate(event);\n },\n };\n}\n\nfunction Input(props: InputProps) {\n const {\n name = '',\n id,\n label = '',\n errorMessage = '',\n isValid = true,\n className = '',\n style,\n value = '',\n icon = null,\n iconPosition,\n onChange = () => {},\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n isUppercase = false,\n isRequired = false,\n tabIndex = 0,\n type = undefined,\n isRow = false,\n onIconClick = null,\n parse = null,\n formValidator = null,\n autoFocus = false,\n suffix = null,\n upperRightLabel = null,\n labelInBorder = false,\n showCancel = false,\n onClearClicked,\n min = null,\n max = null,\n placeholder = '',\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n autoComplete = null,\n onClick = () => null,\n readOnly = false,\n customInput,\n alwaysShowCancel = false,\n multiline = false,\n rows,\n autoResize = false,\n classNames,\n styles: slotStyles,\n disabled = false,\n labels,\n ref,\n ...rest\n } = useComponentDefaults('Input', props);\n const text = useLabels('Input', labels, DEFAULT_LABELS);\n const [isFocused, setIsFocused] = useState(false);\n // Chrome fills a field on page load without firing anything React sees. The animation the\n // stylesheet binds to :-webkit-autofill is the only notification it gives.\n const [isAutofilled, setIsAutofilled] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [isPasswordShown, setIsPasswordShown] = useState(false);\n const [, forceUpdate] = useState(0);\n\n const inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n const fvRef = useRef(formValidator);\n\n const generatedId = useId();\n const inputId = id || name || generatedId;\n\n const currVal = formValidator ? formValidator.value : value;\n const didSetAutoHeightRef = useRef(false);\n\n const resizeTextarea = useCallback(() => {\n const el = inputRef.current;\n if (!el) return;\n if (!autoResize) {\n // Only undo a height this set, so an explicit one from `styles.input` survives.\n if (didSetAutoHeightRef.current) {\n el.style.height = '';\n didSetAutoHeightRef.current = false;\n }\n return;\n }\n el.style.height = 'auto';\n el.style.height = `${el.scrollHeight}px`;\n didSetAutoHeightRef.current = true;\n }, [autoResize]);\n\n // `currVal` is a dependency because the value can change without passing through\n // `onChangeHandler`: the clear button, a parent resetting it, or `formValidator.set` elsewhere.\n useEffect(() => {\n resizeTextarea();\n }, [resizeTextarea, currVal]);\n\n useEffect(() => {\n if (autoFocus && inputRef.current) {\n setTimeout(() => {\n inputRef.current?.focus();\n }, 1);\n }\n }, [autoFocus]);\n\n useEffect(() => {\n fvRef.current = formValidator;\n const fv = fvRef.current;\n if (!fv) return;\n fv.label = label ?? '';\n fv.validate();\n const listener = () => forceUpdate((n) => n + 1);\n fv.registerOnUpdateListener(listener);\n return () => {\n fv.removeOnUpdateListener(listener);\n };\n }, [formValidator, label]);\n\n const hasError = (): boolean => {\n return formValidator ? formValidator.touched && formValidator.hasError() : !isValid || !!errorMessage;\n };\n\n const computedIsRequired = (): boolean => {\n return !!(\n isRequired ||\n (formValidator &&\n formValidator.validators.find((v) => (v as { validatorId?: string }).validatorId === 'required'))\n );\n };\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n if (onMouseEnterProp) onMouseEnterProp(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n if (onMouseLeaveProp) onMouseLeaveProp(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n if (onFocusProp) onFocusProp(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n if (onBlurProp) onBlurProp(event);\n };\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | string): void => {\n let parsedEvent: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | undefined;\n let val: string;\n\n if (typeof event !== 'string') {\n parsedEvent = event;\n val = event.target.value;\n } else {\n val = event;\n }\n\n if (parse) val = parse(val);\n if (formValidator) formValidator.set(val);\n if (onChange) onChange(val, parsedEvent);\n resizeTextarea();\n };\n\n const getInputType = (): string | undefined => {\n if (type === InputType.Email) return undefined;\n if (type === InputType.Phone) return 'tel';\n if (type === InputType.Search) return 'search';\n if (type === 'password' && isPasswordShown) return 'text';\n return type;\n };\n\n const getInputMode = (): React.HTMLAttributes<HTMLInputElement>['inputMode'] => {\n if (type === InputType.Email) return 'email';\n if (type === InputType.Phone) return 'tel';\n if (type === InputType.Search) return 'search';\n return undefined;\n };\n\n const hasIcon = type && type !== InputType.Date && type !== InputType.Iban && type !== InputType.HasNoIcon;\n\n const isFunctionalIconType = type === InputType.Search || type === InputType.Password;\n const hasCustomIcon = !!icon;\n const customIconApplies = hasCustomIcon && !isFunctionalIconType;\n\n const defaultsLeftWithoutMatLabel = type === InputType.Email || type === InputType.Phone || type === InputType.Search;\n const resolvedIconPosition =\n iconPosition ??\n (!useMatLabelStyle && defaultsLeftWithoutMatLabel ? InputIconPosition.Left : InputIconPosition.Right);\n const iconIsLeft = resolvedIconPosition === InputIconPosition.Left;\n\n const iconProps = {\n className: cx(styles.inputFieldIcon, {\n [styles.inputFieldIconNotClickable]: !onIconClick,\n [styles.inputFieldIconLeft]: iconIsLeft,\n }),\n onClick: onIconClick ?? undefined,\n ...keyboardActivationProps(onIconClick),\n };\n\n const customIcon = icon as React.ReactElement<{ className?: string; onClick?: React.MouseEventHandler }> | null;\n const resolvedCustomIconClick = onIconClick ?? customIcon?.props.onClick;\n const renderedIcon =\n customIconApplies && customIcon\n ? React.cloneElement(customIcon, {\n className: cx(\n styles.inputFieldIcon,\n {\n [styles.inputFieldIconNotClickable]: !resolvedCustomIconClick,\n [styles.inputFieldIconLeft]: iconIsLeft,\n },\n customIcon.props.className,\n ),\n onClick: resolvedCustomIconClick,\n ...keyboardActivationProps(resolvedCustomIconClick as ((event: React.SyntheticEvent) => void) | undefined),\n })\n : null;\n\n const hasLeftIcon = (hasIcon || hasCustomIcon) && iconIsLeft;\n\n const passwordIconProps = {\n className: cx(styles.inputFieldIcon, styles.inputFieldIconPassword, { [styles.inputFieldIconLeft]: iconIsLeft }),\n onClick: () => setIsPasswordShown(!isPasswordShown),\n ...keyboardActivationProps(() => setIsPasswordShown(!isPasswordShown)),\n 'aria-label': isPasswordShown ? text.hidePassword : text.showPassword,\n };\n\n const hasErr = hasError();\n\n let editedLabel = label;\n if (editedLabel && computedIsRequired()) editedLabel = `${editedLabel} *`;\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n\n const showFocus = isFocused && !readOnly;\n const shouldFloatLabel =\n useMatLabelStyle && (alwaysFloatLabel || showFocus || currVal || isAutofilled || type === InputType.Date);\n\n const handleAutofillAnimation = (event: React.AnimationEvent) => {\n const { animationName } = event;\n if (animationName === styles.inputAutofillStart) {\n setIsAutofilled(true);\n // The field is controlled, so the commit this triggers would write `value` back over\n // what the browser just put there and blank it. Replay it as an ordinary change first.\n const filled = (event.currentTarget as HTMLInputElement).value;\n if (filled && filled !== String(currVal ?? '')) onChangeHandler(filled);\n return;\n }\n if (animationName === styles.inputAutofillEnd) {\n setIsAutofilled(false);\n return;\n }\n // Not ours. `onAnimationStart` arrives through `rest`, and the consumer must not receive\n // the two above: the `:not()` rule fires one of them on every mount.\n rest.onAnimationStart?.(event as React.AnimationEvent<HTMLInputElement>);\n };\n\n const isSearchCleared = type === InputType.Search && !!currVal;\n\n const customInputProps = customInput?.props as { className?: string; style?: React.CSSProperties } | undefined;\n\n function handleClear() {\n if (formValidator) formValidator.set('');\n onChange?.('');\n onClearClicked?.();\n }\n\n return (\n <div className={cx(styles.input, { [styles.inputIconLeft]: hasLeftIcon }, className)} style={style}>\n <label\n htmlFor={inputId}\n className={cx(styles.inputLabel, classNames?.label, {\n [styles.inputLabelColumn]: !isRow,\n [styles.inputLabelInBorder]: labelInBorder,\n })}\n style={slotStyles?.label}\n >\n {label && !useMatLabelStyle ? (\n <span className={styles.inputLabelText}>\n {label}\n {requiredMark}\n </span>\n ) : null}\n {upperRightLabel && (\n <div\n className={cx(styles.inputUpperRightLabel, classNames?.upperRightLabel)}\n style={slotStyles?.upperRightLabel}\n >\n {upperRightLabel}\n </div>\n )}\n <div\n className={cx(styles.inputContainer, { [styles.inputContainerMultiline]: multiline }, classNames?.container)}\n style={slotStyles?.container}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n {renderedIcon}\n {React.cloneElement(customInput || (multiline ? <textarea /> : <input />), {\n ...rest,\n className: cx(\n styles.inputField,\n {\n [styles.inputFieldUppercase]: isUppercase,\n [styles.inputFieldDate]: type === InputType.Date,\n [styles.inputFieldDefault]: type !== InputType.Date,\n [styles.inputFieldWithIcon]: hasIcon || hasCustomIcon,\n [styles.inputFieldWithIconLeft]: hasLeftIcon,\n [styles.inputFieldMultiline]: multiline,\n [styles.inputFieldMultilineAutoResize]: multiline && autoResize,\n [styles.inputFieldReadOnly]: readOnly && !disabled,\n },\n classNames?.input,\n customInputProps?.className,\n ),\n style:\n customInputProps?.style || slotStyles?.input\n ? { ...customInputProps?.style, ...slotStyles?.input }\n : undefined,\n name,\n id: inputId,\n value: currVal,\n tabIndex,\n ref: customInput ? undefined : mergeRefs(inputRef, ref),\n onChange: onChangeHandler,\n onAnimationStart: handleAutofillAnimation,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n placeholder: !useMatLabelStyle ? placeholder : '',\n autoComplete,\n onClick,\n readOnly,\n disabled,\n ...(!multiline && { type: getInputType(), inputMode: rest.inputMode ?? getInputMode(), min, max }),\n ...(multiline && rows !== undefined && { rows }),\n })}\n {suffix && (\n <div className={cx(styles.inputFieldSuffix, classNames?.suffix)} style={slotStyles?.suffix}>\n {suffix}\n </div>\n )}\n </div>\n <fieldset\n className={cx(styles.inputFieldset, classNames?.fieldset, {\n [styles.inputFieldsetNoNotch]: !label,\n [styles.inputContainerBorderFocused]: showFocus,\n [styles.inputContainerBorderSearchFocused]: type === InputType.Search && (showFocus || !!currVal),\n [styles.inputContainerBorderInvalid]: hasErr,\n [styles.inputContainerBorderError]: hasErr,\n })}\n style={slotStyles?.fieldset}\n >\n <legend\n className={cx(styles.inputFieldsetLegend, {\n [styles.inputFieldsetLegendActive]: shouldFloatLabel,\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n className={cx(styles.inputMatLabel, {\n [styles.inputMatLabelFloating]: shouldFloatLabel,\n [styles.inputMatLabelMultiline]: multiline && !shouldFloatLabel,\n })}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.inputPlaceholder,\n showFocus && !currVal && !isAutofilled && styles.inputPlaceholderShown,\n multiline && styles.inputPlaceholderMultiline,\n )}\n >\n {placeholder}\n </div>\n )}\n <Tooltip\n variant='error'\n message={formValidator ? formValidator.getCurrentErrorMessage() : errorMessage || ''}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </label>\n\n {type === InputType.Phone && !hasCustomIcon && <FontAwesomeIcon icon={faPhone} {...iconProps} />}\n {type === InputType.Email && !hasCustomIcon && <FontAwesomeIcon icon={faEnvelope} {...iconProps} />}\n {type === InputType.Edit && !hasCustomIcon && <FontAwesomeIcon icon={faPen} {...iconProps} />}\n {type === InputType.Search && (\n <AnimatedIcon\n icon={isSearchCleared ? faXmark : faSearch}\n className={cx(styles.inputFieldIcon, {\n [styles.inputFieldIconNotClickable]: !isSearchCleared,\n [styles.inputFieldIconLeft]: iconIsLeft,\n })}\n onClick={isSearchCleared ? handleClear : undefined}\n {...keyboardActivationProps(isSearchCleared ? handleClear : undefined)}\n aria-label={isSearchCleared ? text.clearSearch : undefined}\n />\n )}\n {type === InputType.Password && (\n <FontAwesomeIcon icon={isPasswordShown ? passwordShownIcon : passwordHiddenIcon} {...passwordIconProps} />\n )}\n\n {((showCancel && currVal && (isFocused || isHovered)) || alwaysShowCancel) && type !== InputType.Search && (\n <FontAwesomeIcon\n icon={faXmark}\n className={styles.inputFieldIcon}\n onClick={handleClear}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...keyboardActivationProps(handleClear)}\n aria-label={text.clear}\n />\n )}\n </div>\n );\n}\n\nexport default Input;\n"],"mappings":"4wBAoBA,IAAM,GAAwC,CAC5C,MAAO,QACP,aAAc,gBACd,aAAc,gBACd,YAAa,cACf,EAEA,SAAS,EAAwB,EAA6D,CACvF,KACL,MAAO,CACL,KAAM,SACN,SAAU,EACV,UAAY,GAA+B,EACrC,EAAM,MAAQ,SAAW,EAAM,MAAQ,OAC3C,EAAM,eAAe,EACrB,EAAW,CAAK,EAClB,CACF,CACF,CAEA,SAAS,GAAM,GAAmB,CAChC,GAAM,CACJ,QAAO,GACP,MACA,QAAQ,GACR,eAAe,GACf,WAAU,GACV,aAAY,GACZ,SACA,SAAQ,GACR,OAAO,KACP,gBACA,eAAiB,CAAC,EAClB,QAAS,GAAc,KACvB,OAAQ,GAAa,KACrB,aAAc,GAAmB,KACjC,aAAc,GAAmB,KACjC,eAAc,GACd,cAAa,GACb,YAAW,EACX,OAAO,IAAA,GACP,SAAQ,GACR,cAAc,KACd,SAAQ,KACR,gBAAgB,KAChB,aAAY,GACZ,UAAS,KACT,kBAAkB,KAClB,iBAAgB,GAChB,cAAa,GACb,kBACA,OAAM,KACN,OAAM,KACN,cAAc,GACd,mBAAmB,GACnB,oBAAmB,GACnB,gBAAe,KACf,eAAgB,KAChB,WAAW,GACX,cACA,oBAAmB,GACnB,YAAY,GACZ,QACA,aAAa,GACb,aACA,OAAQ,EACR,YAAW,GACX,UACA,OACA,GAAG,GACD,EAAqB,QAAS,EAAK,EACjC,EAAO,EAAU,QAAS,GAAQ,EAAc,EAChD,CAAC,EAAW,IAAgB,EAAS,EAAK,EAG1C,CAAC,GAAc,GAAmB,EAAS,EAAK,EAChD,CAAC,EAAW,GAAgB,EAAS,EAAK,EAC1C,CAAC,EAAiB,GAAsB,EAAS,EAAK,EACtD,EAAG,IAAe,EAAS,CAAC,EAE5B,EAAW,EAA+C,IAAI,EAC9D,EAAQ,EAAO,CAAa,EAE5B,GAAc,GA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EAAkB,EAAc,IAAA,EAAS,EACrE,aAAY,EAAkB,EAAK,YAAc,IAAA,EAClD,CAAA,EAEF,IAAS,EAAU,UAClB,EAAC,EAAD,CAAiB,KAAM,EAAkB,GAAoB,GAAoB,GAAI,EAAoB,CAAA,GAGxG,IAAc,IAAY,GAAa,IAAe,KAAqB,IAAS,EAAU,QAC/F,EAAC,EAAD,CACE,KAAM,GACN,UAAW,EAAO,eAClB,QAAS,EACT,iBAAoB,EAAa,EAAI,EACrC,iBAAoB,EAAa,EAAK,EACtC,GAAI,EAAwB,CAAW,EACvC,aAAY,EAAK,KAClB,CAAA,CAEA,GAET"}
1
+ {"version":3,"file":"input.mjs","names":[],"sources":["../../../../package/common/input/input.tsx"],"sourcesContent":["import React, { useState, useEffect, useRef, useCallback, useId } from 'react';\nimport cx from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n faPhone,\n faPen,\n faEnvelope,\n faSearch,\n faXmark,\n faEye as passwordHiddenIcon,\n faEyeSlash as passwordShownIcon,\n} from '@fortawesome/free-solid-svg-icons';\nimport Tooltip from 'components/common/tooltip';\nimport AnimatedIcon from 'components/common/animatedIcon';\nimport { useComponentDefaults, useLabels } from 'components/common/configProvider';\nimport styles from './input.module.pcss';\nimport { mergeRefs } from '../utils/mergeRefs';\nimport type { InputLabels, InputProps } from './input.types';\nimport { InputType, InputIconPosition } from './input.types';\n\nconst DEFAULT_LABELS: Required<InputLabels> = {\n clear: 'Clear',\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n clearSearch: 'Clear search',\n};\n\nfunction keyboardActivationProps(onActivate?: ((event: React.SyntheticEvent) => void) | null) {\n if (!onActivate) return undefined;\n return {\n role: 'button' as const,\n tabIndex: 0,\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault();\n onActivate(event);\n },\n };\n}\n\nfunction Input(props: InputProps) {\n const {\n name = '',\n id,\n label = '',\n errorMessage = '',\n isValid = true,\n className = '',\n style,\n value = '',\n icon = null,\n iconPosition,\n onChange = () => {},\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n isUppercase = false,\n isRequired = false,\n tabIndex = 0,\n type = undefined,\n isRow = false,\n onIconClick = null,\n parse = null,\n formValidator = null,\n autoFocus = false,\n suffix = null,\n upperRightLabel = null,\n labelInBorder = false,\n showCancel = false,\n onClearClicked,\n min = null,\n max = null,\n placeholder = '',\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n autoComplete = null,\n onClick = () => null,\n readOnly = false,\n customInput,\n alwaysShowCancel = false,\n multiline = false,\n rows,\n autoResize = false,\n classNames,\n styles: slotStyles,\n disabled = false,\n labels,\n ref,\n ...rest\n } = useComponentDefaults('Input', props);\n const text = useLabels('Input', labels, DEFAULT_LABELS);\n const [isFocused, setIsFocused] = useState(false);\n // Chrome fills a field on page load without firing anything React sees. The animation the\n // stylesheet binds to :-webkit-autofill is the only notification it gives.\n const [isAutofilled, setIsAutofilled] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [isPasswordShown, setIsPasswordShown] = useState(false);\n const [, forceUpdate] = useState(0);\n\n const inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n const fvRef = useRef(formValidator);\n\n const generatedId = useId();\n const inputId = id || name || generatedId;\n\n const currVal = formValidator ? formValidator.value : value;\n const didSetAutoHeightRef = useRef(false);\n\n const resizeTextarea = useCallback(() => {\n const el = inputRef.current;\n if (!el) return;\n if (!autoResize) {\n // Only undo a height this set, so an explicit one from `styles.input` survives.\n if (didSetAutoHeightRef.current) {\n el.style.height = '';\n didSetAutoHeightRef.current = false;\n }\n return;\n }\n el.style.height = 'auto';\n el.style.height = `${el.scrollHeight}px`;\n didSetAutoHeightRef.current = true;\n }, [autoResize]);\n\n // `currVal` is a dependency because the value can change without passing through\n // `onChangeHandler`: the clear button, a parent resetting it, or `formValidator.set` elsewhere.\n useEffect(() => {\n resizeTextarea();\n }, [resizeTextarea, currVal]);\n\n useEffect(() => {\n if (autoFocus && inputRef.current) {\n setTimeout(() => {\n inputRef.current?.focus();\n }, 1);\n }\n }, [autoFocus]);\n\n useEffect(() => {\n fvRef.current = formValidator;\n const fv = fvRef.current;\n if (!fv) return;\n fv.label = label ?? '';\n fv.validate();\n const listener = () => forceUpdate((n) => n + 1);\n fv.registerOnUpdateListener(listener);\n return () => {\n fv.removeOnUpdateListener(listener);\n };\n }, [formValidator, label]);\n\n const hasError = (): boolean => {\n return formValidator ? formValidator.touched && formValidator.hasError() : !isValid || !!errorMessage;\n };\n\n const computedIsRequired = (): boolean => {\n return !!(\n isRequired ||\n (formValidator &&\n formValidator.validators.find((v) => (v as { validatorId?: string }).validatorId === 'required'))\n );\n };\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n if (onMouseEnterProp) onMouseEnterProp(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n if (onMouseLeaveProp) onMouseLeaveProp(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n if (onFocusProp) onFocusProp(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n if (onBlurProp) onBlurProp(event);\n };\n\n const onChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | string): void => {\n let parsedEvent: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | undefined;\n let val: string;\n\n if (typeof event !== 'string') {\n parsedEvent = event;\n val = event.target.value;\n } else {\n val = event;\n }\n\n if (parse) val = parse(val);\n if (formValidator) formValidator.set(val);\n if (onChange) onChange(val, parsedEvent);\n resizeTextarea();\n };\n\n const getInputType = (): string | undefined => {\n if (type === InputType.Email) return undefined;\n if (type === InputType.Phone) return 'tel';\n if (type === InputType.Search) return 'search';\n if (type === 'password' && isPasswordShown) return 'text';\n return type;\n };\n\n const getInputMode = (): React.HTMLAttributes<HTMLInputElement>['inputMode'] => {\n if (type === InputType.Email) return 'email';\n if (type === InputType.Phone) return 'tel';\n if (type === InputType.Search) return 'search';\n return undefined;\n };\n\n const hasIcon = type && type !== InputType.Date && type !== InputType.Iban && type !== InputType.HasNoIcon;\n\n const isFunctionalIconType = type === InputType.Search || type === InputType.Password;\n const hasCustomIcon = !!icon;\n const customIconApplies = hasCustomIcon && !isFunctionalIconType;\n\n const defaultsLeftWithoutMatLabel = type === InputType.Email || type === InputType.Phone || type === InputType.Search;\n const resolvedIconPosition =\n iconPosition ??\n (!useMatLabelStyle && defaultsLeftWithoutMatLabel ? InputIconPosition.Left : InputIconPosition.Right);\n const iconIsLeft = resolvedIconPosition === InputIconPosition.Left;\n\n const iconProps = {\n className: cx(styles.inputFieldIcon, {\n [styles.inputFieldIconNotClickable]: !onIconClick,\n [styles.inputFieldIconLeft]: iconIsLeft,\n }),\n onClick: onIconClick ?? undefined,\n ...keyboardActivationProps(onIconClick),\n };\n\n const customIcon = icon as React.ReactElement<{ className?: string; onClick?: React.MouseEventHandler }> | null;\n const resolvedCustomIconClick = onIconClick ?? customIcon?.props.onClick;\n const renderedIcon =\n customIconApplies && customIcon\n ? React.cloneElement(customIcon, {\n className: cx(\n styles.inputFieldIcon,\n {\n [styles.inputFieldIconNotClickable]: !resolvedCustomIconClick,\n [styles.inputFieldIconLeft]: iconIsLeft,\n },\n customIcon.props.className,\n ),\n onClick: resolvedCustomIconClick,\n ...keyboardActivationProps(resolvedCustomIconClick as ((event: React.SyntheticEvent) => void) | undefined),\n })\n : null;\n\n const hasLeftIcon = (hasIcon || hasCustomIcon) && iconIsLeft;\n\n const passwordIconProps = {\n className: cx(styles.inputFieldIcon, styles.inputFieldIconPassword, { [styles.inputFieldIconLeft]: iconIsLeft }),\n onClick: () => setIsPasswordShown(!isPasswordShown),\n ...keyboardActivationProps(() => setIsPasswordShown(!isPasswordShown)),\n 'aria-label': isPasswordShown ? text.hidePassword : text.showPassword,\n };\n\n const hasErr = hasError();\n\n let editedLabel = label;\n if (editedLabel && computedIsRequired()) editedLabel = `${editedLabel} *`;\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n\n const showFocus = isFocused && !readOnly;\n const shouldFloatLabel =\n useMatLabelStyle && (alwaysFloatLabel || showFocus || currVal || isAutofilled || type === InputType.Date);\n\n const handleAutofillAnimation = (event: React.AnimationEvent) => {\n const { animationName } = event;\n if (animationName === styles.inputAutofillStart) {\n setIsAutofilled(true);\n // The field is controlled, so the commit this triggers would write `value` back over\n // what the browser just put there and blank it. Replay it as an ordinary change first.\n const filled = (event.currentTarget as HTMLInputElement).value;\n if (filled && filled !== String(currVal ?? '')) onChangeHandler(filled);\n return;\n }\n if (animationName === styles.inputAutofillEnd) {\n setIsAutofilled(false);\n return;\n }\n // Not ours. `onAnimationStart` arrives through `rest`, and the consumer must not receive\n // the two above: the `:not()` rule fires one of them on every mount.\n rest.onAnimationStart?.(event as React.AnimationEvent<HTMLInputElement>);\n };\n\n const isSearchCleared = type === InputType.Search && !!currVal;\n\n const customInputProps = customInput?.props as { className?: string; style?: React.CSSProperties } | undefined;\n\n function handleClear() {\n if (formValidator) formValidator.set('');\n onChange?.('');\n onClearClicked?.();\n }\n\n return (\n <div className={cx(styles.input, { [styles.inputIconLeft]: hasLeftIcon }, className)} style={style}>\n <label\n htmlFor={inputId}\n className={cx(styles.inputLabel, classNames?.label, {\n [styles.inputLabelColumn]: !isRow,\n [styles.inputLabelInBorder]: labelInBorder,\n })}\n style={slotStyles?.label}\n >\n {label && !useMatLabelStyle ? (\n <span className={styles.inputLabelText}>\n {label}\n {requiredMark}\n </span>\n ) : null}\n {upperRightLabel && (\n <div\n className={cx(styles.inputUpperRightLabel, classNames?.upperRightLabel)}\n style={slotStyles?.upperRightLabel}\n >\n {upperRightLabel}\n </div>\n )}\n <div\n className={cx(styles.inputContainer, { [styles.inputContainerMultiline]: multiline }, classNames?.container)}\n style={slotStyles?.container}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n {renderedIcon}\n {React.cloneElement(customInput || (multiline ? <textarea /> : <input />), {\n ...rest,\n className: cx(\n styles.inputField,\n {\n [styles.inputFieldUppercase]: isUppercase,\n [styles.inputFieldDate]: type === InputType.Date,\n [styles.inputFieldDefault]: type !== InputType.Date,\n [styles.inputFieldWithIcon]: hasIcon || hasCustomIcon,\n [styles.inputFieldWithIconLeft]: hasLeftIcon,\n [styles.inputFieldMultiline]: multiline,\n [styles.inputFieldMultilineAutoResize]: multiline && autoResize,\n [styles.inputFieldReadOnly]: readOnly && !disabled,\n },\n classNames?.input,\n customInputProps?.className,\n ),\n style:\n customInputProps?.style || slotStyles?.input\n ? { ...customInputProps?.style, ...slotStyles?.input }\n : undefined,\n name,\n id: inputId,\n value: currVal,\n tabIndex,\n ref: customInput ? undefined : mergeRefs(inputRef, ref),\n onChange: onChangeHandler,\n onAnimationStart: handleAutofillAnimation,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n placeholder: !useMatLabelStyle ? placeholder : '',\n autoComplete,\n onClick,\n readOnly,\n disabled,\n ...(!multiline && { type: getInputType(), inputMode: rest.inputMode ?? getInputMode(), min, max }),\n ...(multiline && rows !== undefined && { rows }),\n })}\n {suffix && (\n <div className={cx(styles.inputFieldSuffix, classNames?.suffix)} style={slotStyles?.suffix}>\n {suffix}\n </div>\n )}\n </div>\n <fieldset\n className={cx(styles.inputFieldset, classNames?.fieldset, {\n [styles.inputContainerBorderFocused]: showFocus,\n [styles.inputContainerBorderSearchFocused]: type === InputType.Search && (showFocus || !!currVal),\n [styles.inputContainerBorderInvalid]: hasErr,\n [styles.inputContainerBorderError]: hasErr,\n })}\n style={slotStyles?.fieldset}\n >\n <legend\n className={cx(styles.inputFieldsetLegend, {\n [styles.inputFieldsetLegendActive]: shouldFloatLabel,\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n className={cx(styles.inputMatLabel, {\n [styles.inputMatLabelFloating]: shouldFloatLabel,\n [styles.inputMatLabelMultiline]: multiline && !shouldFloatLabel,\n })}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.inputPlaceholder,\n showFocus && !currVal && !isAutofilled && styles.inputPlaceholderShown,\n multiline && styles.inputPlaceholderMultiline,\n )}\n >\n {placeholder}\n </div>\n )}\n <Tooltip\n variant='error'\n message={formValidator ? formValidator.getCurrentErrorMessage() : errorMessage || ''}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </label>\n\n {type === InputType.Phone && !hasCustomIcon && <FontAwesomeIcon icon={faPhone} {...iconProps} />}\n {type === InputType.Email && !hasCustomIcon && <FontAwesomeIcon icon={faEnvelope} {...iconProps} />}\n {type === InputType.Edit && !hasCustomIcon && <FontAwesomeIcon icon={faPen} {...iconProps} />}\n {type === InputType.Search && (\n <AnimatedIcon\n icon={isSearchCleared ? faXmark : faSearch}\n className={cx(styles.inputFieldIcon, {\n [styles.inputFieldIconNotClickable]: !isSearchCleared,\n [styles.inputFieldIconLeft]: iconIsLeft,\n })}\n onClick={isSearchCleared ? handleClear : undefined}\n {...keyboardActivationProps(isSearchCleared ? handleClear : undefined)}\n aria-label={isSearchCleared ? text.clearSearch : undefined}\n />\n )}\n {type === InputType.Password && (\n <FontAwesomeIcon icon={isPasswordShown ? passwordShownIcon : passwordHiddenIcon} {...passwordIconProps} />\n )}\n\n {((showCancel && currVal && (isFocused || isHovered)) || alwaysShowCancel) && type !== InputType.Search && (\n <FontAwesomeIcon\n icon={faXmark}\n className={styles.inputFieldIcon}\n onClick={handleClear}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...keyboardActivationProps(handleClear)}\n aria-label={text.clear}\n />\n )}\n </div>\n );\n}\n\nexport default Input;\n"],"mappings":"4wBAoBA,IAAM,GAAwC,CAC5C,M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AAoB,GAAI,EAAoB,CAAA,GAGxG,IAAc,IAAY,GAAa,IAAe,KAAqB,IAAS,EAAU,QAC/F,EAAC,EAAD,CACE,KAAM,GACN,UAAW,EAAO,eAClB,QAAS,EACT,iBAAoB,EAAa,EAAI,EACrC,iBAAoB,EAAa,EAAK,EACtC,GAAI,EAAwB,CAAW,EACvC,aAAY,EAAK,KAClB,CAAA,CAEA,GAET"}
@@ -1,2 +1,2 @@
1
- "use client";var e=`required-mark_xGJdX`,t=`input_VKNCE`,n=`input-placeholder_IZH-l`,r=`input-placeholder-shown_mm35e`,i=`fadeIn_kmX3i`,a=`input-placeholder-multiline_tLHAl`,o=`input-matLabel_-05ey`,s=`input-matLabel-floating_1P2YE`,c=`input-matLabel-multiline_miIZJ`,l=`input-fieldset_XCibg`,u=`input-fieldset-no-notch_re-Fw`,d=`input-fieldset-legend_X23zp`,f=`input-fieldset-legend-active_t-9hu`,p=`input-iconLeft_itIuo`,m=`input-container_M1RoG`,h=`input-container-multiline_eLw7h`,g=`input-container-border_l131I`,_=`input-container-border-focused_ct6oY`,v=`input-container-border-searchFocused_lq088`,y=`input-container-border-invalid_Wdbq2`,b=`input-container-border-error_gzfPG`,x=`input-label_w1hMR`,S=`input-label-column_qBFPC`,C=`input-label-text_-J5qQ`,w=`input-upper-right-label_I-WG3`,T=`input-field_pmDvZ`,E=`inputAutofillStart_tOifY`,D=`inputAutofillEnd_KLDQQ`,O=`input-field-withIcon_VpfmK`,k=`input-field-withIcon-left_Io7lU`,A=`input-field-suffix_NZpXp`,j=`input-field-date_UHJEZ`,M=`input-field-default_TKipA`,N=`input-field-readOnly_Eut34`,P=`input-field-uppercase_UV6f1`,F=`input-field-multiline_al3V1`,I=`input-field-multiline-autoResize_nK33P`,L=`input-field-icon_YyJIr`,R=`input-field-icon-left_m2XB1`,z=`input-field-icon-notClickable_7j24I`,B=`input-error_LIG23`,V={"required-mark":`required-mark_xGJdX`,requiredMark:e,input:t,"input-placeholder":`input-placeholder_IZH-l`,inputPlaceholder:n,"input-placeholder-shown":`input-placeholder-shown_mm35e`,inputPlaceholderShown:r,fadeIn:i,"input-placeholder-multiline":`input-placeholder-multiline_tLHAl`,inputPlaceholderMultiline:a,"input-matLabel":`input-matLabel_-05ey`,inputMatLabel:o,"input-matLabel-floating":`input-matLabel-floating_1P2YE`,inputMatLabelFloating:s,"input-matLabel-multiline":`input-matLabel-multiline_miIZJ`,inputMatLabelMultiline:c,"input-fieldset":`input-fieldset_XCibg`,inputFieldset:l,"input-fieldset-no-notch":`input-fieldset-no-notch_re-Fw`,inputFieldsetNoNotch:u,"input-fieldset-legend":`input-fieldset-legend_X23zp`,inputFieldsetLegend:d,"input-fieldset-legend-active":`input-fieldset-legend-active_t-9hu`,inputFieldsetLegendActive:f,"input-iconLeft":`input-iconLeft_itIuo`,inputIconLeft:p,"input-container":`input-container_M1RoG`,inputContainer:m,"input-container-multiline":`input-container-multiline_eLw7h`,inputContainerMultiline:h,"input-container-border":`input-container-border_l131I`,inputContainerBorder:g,"input-container-border-focused":`input-container-border-focused_ct6oY`,inputContainerBorderFocused:_,"input-container-border-searchFocused":`input-container-border-searchFocused_lq088`,inputContainerBorderSearchFocused:v,"input-container-border-invalid":`input-container-border-invalid_Wdbq2`,inputContainerBorderInvalid:y,"input-container-border-error":`input-container-border-error_gzfPG`,inputContainerBorderError:b,"input-label":`input-label_w1hMR`,inputLabel:x,"input-label-column":`input-label-column_qBFPC`,inputLabelColumn:S,"input-label-text":`input-label-text_-J5qQ`,inputLabelText:C,"input-upper-right-label":`input-upper-right-label_I-WG3`,inputUpperRightLabel:w,"input-field":`input-field_pmDvZ`,inputField:T,inputAutofillStart:E,inputAutofillEnd:D,"input-field-withIcon":`input-field-withIcon_VpfmK`,inputFieldWithIcon:O,"input-field-withIcon-left":`input-field-withIcon-left_Io7lU`,inputFieldWithIconLeft:k,"input-field-suffix":`input-field-suffix_NZpXp`,inputFieldSuffix:A,"input-field-date":`input-field-date_UHJEZ`,inputFieldDate:j,"input-field-default":`input-field-default_TKipA`,inputFieldDefault:M,"input-field-readOnly":`input-field-readOnly_Eut34`,inputFieldReadOnly:N,"input-field-uppercase":`input-field-uppercase_UV6f1`,inputFieldUppercase:P,"input-field-multiline":`input-field-multiline_al3V1`,inputFieldMultiline:F,"input-field-multiline-autoResize":`input-field-multiline-autoResize_nK33P`,inputFieldMultilineAutoResize:I,"input-field-icon":`input-field-icon_YyJIr`,inputFieldIcon:L,"input-field-icon-left":`input-field-icon-left_m2XB1`,inputFieldIconLeft:R,"input-field-icon-notClickable":`input-field-icon-notClickable_7j24I`,inputFieldIconNotClickable:z,"input-error":`input-error_LIG23`,inputError:B};export{V as default,i as fadeIn,t as input,D as inputAutofillEnd,E as inputAutofillStart,m as inputContainer,g as inputContainerBorder,b as inputContainerBorderError,_ as inputContainerBorderFocused,y as inputContainerBorderInvalid,v as inputContainerBorderSearchFocused,h as inputContainerMultiline,B as inputError,T as inputField,j as inputFieldDate,M as inputFieldDefault,L as inputFieldIcon,R as inputFieldIconLeft,z as inputFieldIconNotClickable,F as inputFieldMultiline,I as inputFieldMultilineAutoResize,N as inputFieldReadOnly,A as inputFieldSuffix,P as inputFieldUppercase,O as inputFieldWithIcon,k as inputFieldWithIconLeft,l as inputFieldset,d as inputFieldsetLegend,f as inputFieldsetLegendActive,u as inputFieldsetNoNotch,p as inputIconLeft,x as inputLabel,S as inputLabelColumn,C as inputLabelText,o as inputMatLabel,s as inputMatLabelFloating,c as inputMatLabelMultiline,n as inputPlaceholder,a as inputPlaceholderMultiline,r as inputPlaceholderShown,w as inputUpperRightLabel,e as requiredMark};
1
+ "use client";var e=`required-mark_xGJdX`,t=`input_VKNCE`,n=`input-placeholder_IZH-l`,r=`input-placeholder-shown_mm35e`,i=`fadeIn_kmX3i`,a=`input-placeholder-multiline_tLHAl`,o=`input-matLabel_-05ey`,s=`input-matLabel-floating_1P2YE`,c=`input-matLabel-multiline_miIZJ`,l=`input-fieldset_XCibg`,u=`input-fieldset-legend_X23zp`,d=`input-fieldset-legend-active_t-9hu`,f=`input-iconLeft_itIuo`,p=`input-container_M1RoG`,m=`input-container-multiline_eLw7h`,h=`input-container-border_l131I`,g=`input-container-border-focused_ct6oY`,_=`input-container-border-searchFocused_lq088`,v=`input-container-border-invalid_Wdbq2`,y=`input-container-border-error_gzfPG`,b=`input-label_w1hMR`,x=`input-label-column_qBFPC`,S=`input-label-text_-J5qQ`,C=`input-upper-right-label_I-WG3`,w=`input-field_pmDvZ`,T=`inputAutofillStart_tOifY`,E=`inputAutofillEnd_KLDQQ`,D=`input-field-withIcon_VpfmK`,O=`input-field-withIcon-left_Io7lU`,k=`input-field-suffix_NZpXp`,A=`input-field-date_UHJEZ`,j=`input-field-default_TKipA`,M=`input-field-readOnly_Eut34`,N=`input-field-uppercase_UV6f1`,P=`input-field-multiline_al3V1`,F=`input-field-multiline-autoResize_nK33P`,I=`input-field-icon_YyJIr`,L=`input-field-icon-left_m2XB1`,R=`input-field-icon-notClickable_7j24I`,z=`input-error_LIG23`,B={"required-mark":`required-mark_xGJdX`,requiredMark:e,input:t,"input-placeholder":`input-placeholder_IZH-l`,inputPlaceholder:n,"input-placeholder-shown":`input-placeholder-shown_mm35e`,inputPlaceholderShown:r,fadeIn:i,"input-placeholder-multiline":`input-placeholder-multiline_tLHAl`,inputPlaceholderMultiline:a,"input-matLabel":`input-matLabel_-05ey`,inputMatLabel:o,"input-matLabel-floating":`input-matLabel-floating_1P2YE`,inputMatLabelFloating:s,"input-matLabel-multiline":`input-matLabel-multiline_miIZJ`,inputMatLabelMultiline:c,"input-fieldset":`input-fieldset_XCibg`,inputFieldset:l,"input-fieldset-legend":`input-fieldset-legend_X23zp`,inputFieldsetLegend:u,"input-fieldset-legend-active":`input-fieldset-legend-active_t-9hu`,inputFieldsetLegendActive:d,"input-iconLeft":`input-iconLeft_itIuo`,inputIconLeft:f,"input-container":`input-container_M1RoG`,inputContainer:p,"input-container-multiline":`input-container-multiline_eLw7h`,inputContainerMultiline:m,"input-container-border":`input-container-border_l131I`,inputContainerBorder:h,"input-container-border-focused":`input-container-border-focused_ct6oY`,inputContainerBorderFocused:g,"input-container-border-searchFocused":`input-container-border-searchFocused_lq088`,inputContainerBorderSearchFocused:_,"input-container-border-invalid":`input-container-border-invalid_Wdbq2`,inputContainerBorderInvalid:v,"input-container-border-error":`input-container-border-error_gzfPG`,inputContainerBorderError:y,"input-label":`input-label_w1hMR`,inputLabel:b,"input-label-column":`input-label-column_qBFPC`,inputLabelColumn:x,"input-label-text":`input-label-text_-J5qQ`,inputLabelText:S,"input-upper-right-label":`input-upper-right-label_I-WG3`,inputUpperRightLabel:C,"input-field":`input-field_pmDvZ`,inputField:w,inputAutofillStart:T,inputAutofillEnd:E,"input-field-withIcon":`input-field-withIcon_VpfmK`,inputFieldWithIcon:D,"input-field-withIcon-left":`input-field-withIcon-left_Io7lU`,inputFieldWithIconLeft:O,"input-field-suffix":`input-field-suffix_NZpXp`,inputFieldSuffix:k,"input-field-date":`input-field-date_UHJEZ`,inputFieldDate:A,"input-field-default":`input-field-default_TKipA`,inputFieldDefault:j,"input-field-readOnly":`input-field-readOnly_Eut34`,inputFieldReadOnly:M,"input-field-uppercase":`input-field-uppercase_UV6f1`,inputFieldUppercase:N,"input-field-multiline":`input-field-multiline_al3V1`,inputFieldMultiline:P,"input-field-multiline-autoResize":`input-field-multiline-autoResize_nK33P`,inputFieldMultilineAutoResize:F,"input-field-icon":`input-field-icon_YyJIr`,inputFieldIcon:I,"input-field-icon-left":`input-field-icon-left_m2XB1`,inputFieldIconLeft:L,"input-field-icon-notClickable":`input-field-icon-notClickable_7j24I`,inputFieldIconNotClickable:R,"input-error":`input-error_LIG23`,inputError:z};export{B as default,i as fadeIn,t as input,E as inputAutofillEnd,T as inputAutofillStart,p as inputContainer,h as inputContainerBorder,y as inputContainerBorderError,g as inputContainerBorderFocused,v as inputContainerBorderInvalid,_ as inputContainerBorderSearchFocused,m as inputContainerMultiline,z as inputError,w as inputField,A as inputFieldDate,j as inputFieldDefault,I as inputFieldIcon,L as inputFieldIconLeft,R as inputFieldIconNotClickable,P as inputFieldMultiline,F as inputFieldMultilineAutoResize,M as inputFieldReadOnly,k as inputFieldSuffix,N as inputFieldUppercase,D as inputFieldWithIcon,O as inputFieldWithIconLeft,l as inputFieldset,u as inputFieldsetLegend,d as inputFieldsetLegendActive,f as inputIconLeft,b as inputLabel,x as inputLabelColumn,S as inputLabelText,o as inputMatLabel,s as inputMatLabelFloating,c as inputMatLabelMultiline,n as inputPlaceholder,a as inputPlaceholderMultiline,r as inputPlaceholderShown,C as inputUpperRightLabel,e as requiredMark};
2
2
  //# sourceMappingURL=input.module.mjs.map