@mantine/core 9.5.2 → 9.6.1

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 (901) hide show
  1. package/cjs/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/cjs/components/Accordion/Accordion.cjs.map +1 -1
  3. package/cjs/components/Accordion/Accordion.module.cjs.map +1 -1
  4. package/cjs/components/Accordion/AccordionChevron.cjs.map +1 -1
  5. package/cjs/components/Accordion/AccordionControl/AccordionControl.cjs.map +1 -1
  6. package/cjs/components/Accordion/AccordionItem/AccordionItem.cjs.map +1 -1
  7. package/cjs/components/Accordion/AccordionPanel/AccordionPanel.cjs.map +1 -1
  8. package/cjs/components/ActionBar/ActionBar.cjs +94 -0
  9. package/cjs/components/ActionBar/ActionBar.cjs.map +1 -0
  10. package/cjs/components/ActionBar/ActionBar.context.cjs +8 -0
  11. package/cjs/components/ActionBar/ActionBar.context.cjs.map +1 -0
  12. package/cjs/components/ActionBar/ActionBar.module.cjs +10 -0
  13. package/cjs/components/ActionBar/ActionBar.module.cjs.map +1 -0
  14. package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs +33 -0
  15. package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs.map +1 -0
  16. package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs +30 -0
  17. package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs.map +1 -0
  18. package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
  19. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs +16 -15
  20. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs.map +1 -1
  21. package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs +15 -14
  22. package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs.map +1 -1
  23. package/cjs/components/Affix/Affix.cjs.map +1 -1
  24. package/cjs/components/Alert/Alert.cjs.map +1 -1
  25. package/cjs/components/Anchor/Anchor.cjs.map +1 -1
  26. package/cjs/components/AngleSlider/AngleSlider.cjs +5 -4
  27. package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
  28. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  29. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
  30. package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs.map +1 -1
  31. package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs.map +1 -1
  32. package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs +2 -1
  33. package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs.map +1 -1
  34. package/cjs/components/AppShell/use-resizing/use-resizing.cjs.map +1 -1
  35. package/cjs/components/AspectRatio/AspectRatio.cjs +14 -13
  36. package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
  37. package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  38. package/cjs/components/Avatar/Avatar.cjs.map +1 -1
  39. package/cjs/components/Avatar/AvatarGroup/AvatarGroup.cjs.map +1 -1
  40. package/cjs/components/Avatar/AvatarPlaceholderIcon.cjs.map +1 -1
  41. package/cjs/components/BackgroundImage/BackgroundImage.cjs +14 -13
  42. package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
  43. package/cjs/components/Badge/Badge.cjs.map +1 -1
  44. package/cjs/components/Blockquote/Blockquote.cjs +6 -5
  45. package/cjs/components/Blockquote/Blockquote.cjs.map +1 -1
  46. package/cjs/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  47. package/cjs/components/Burger/Burger.cjs.map +1 -1
  48. package/cjs/components/Button/Button.cjs.map +1 -1
  49. package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs +16 -15
  50. package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs.map +1 -1
  51. package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs +15 -14
  52. package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs.map +1 -1
  53. package/cjs/components/Card/Card.cjs.map +1 -1
  54. package/cjs/components/Cascader/Cascader.cjs +5 -4
  55. package/cjs/components/Cascader/Cascader.cjs.map +1 -1
  56. package/cjs/components/Cascader/CascaderColumns.cjs +2 -1
  57. package/cjs/components/Cascader/CascaderColumns.cjs.map +1 -1
  58. package/cjs/components/Cascader/get-cascader-columns.cjs.map +1 -1
  59. package/cjs/components/Cascader/use-cascader-safe-area.cjs.map +1 -1
  60. package/cjs/components/Cascader/use-cascader.cjs.map +1 -1
  61. package/cjs/components/Checkbox/CheckIcon.cjs +6 -5
  62. package/cjs/components/Checkbox/CheckIcon.cjs.map +1 -1
  63. package/cjs/components/Checkbox/Checkbox.cjs +1 -1
  64. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  65. package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs +2 -1
  66. package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs.map +1 -1
  67. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  68. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs.map +1 -1
  69. package/cjs/components/Chip/Chip.cjs.map +1 -1
  70. package/cjs/components/Chip/ChipGroup/ChipGroup.cjs.map +1 -1
  71. package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
  72. package/cjs/components/CloseButton/CloseIcon.cjs.map +1 -1
  73. package/cjs/components/Collapse/Collapse.cjs.map +1 -1
  74. package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
  75. package/cjs/components/ColorInput/EyeDropperIcon.cjs.map +1 -1
  76. package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  77. package/cjs/components/ColorPicker/ColorPicker.context.cjs.map +1 -1
  78. package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs +4 -6
  79. package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs.map +1 -1
  80. package/cjs/components/ColorPicker/Saturation/Saturation.cjs +4 -6
  81. package/cjs/components/ColorPicker/Saturation/Saturation.cjs.map +1 -1
  82. package/cjs/components/ColorPicker/Swatches/Swatches.cjs.map +1 -1
  83. package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
  84. package/cjs/components/Combobox/Combobox.cjs.map +1 -1
  85. package/cjs/components/Combobox/ComboboxChevron/ComboboxChevron.cjs.map +1 -1
  86. package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs +2 -1
  87. package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs.map +1 -1
  88. package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs +10 -9
  89. package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs.map +1 -1
  90. package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs +2 -1
  91. package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs.map +1 -1
  92. package/cjs/components/Combobox/ComboboxGroup/ComboboxGroup.cjs.map +1 -1
  93. package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs +2 -1
  94. package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs.map +1 -1
  95. package/cjs/components/Combobox/ComboboxOption/ComboboxOption.cjs.map +1 -1
  96. package/cjs/components/Combobox/ComboboxOptions/ComboboxOptions.cjs.map +1 -1
  97. package/cjs/components/Combobox/ComboboxSearch/ComboboxSearch.cjs.map +1 -1
  98. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs +10 -9
  99. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
  100. package/cjs/components/Combobox/OptionsDropdown/OptionsDropdown.cjs.map +1 -1
  101. package/cjs/components/Combobox/OptionsDropdown/default-options-filter.cjs.map +1 -1
  102. package/cjs/components/Combobox/use-combobox/get-index/get-index.cjs.map +1 -1
  103. package/cjs/components/Combobox/use-combobox/get-index/get-virtualized-index.cjs.map +1 -1
  104. package/cjs/components/Combobox/use-combobox/use-combobox.cjs.map +1 -1
  105. package/cjs/components/Combobox/use-combobox/use-virtualized-combobox.cjs.map +1 -1
  106. package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
  107. package/cjs/components/Combobox/use-pills-reorder/use-pills-reorder.cjs.map +1 -1
  108. package/cjs/components/ComboboxPopover/ComboboxPopover.cjs.map +1 -1
  109. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs +13 -12
  110. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs.map +1 -1
  111. package/cjs/components/CopyButton/CopyButton.cjs.map +1 -1
  112. package/cjs/components/DataList/DataList.cjs.map +1 -1
  113. package/cjs/components/Dialog/Dialog.cjs.map +1 -1
  114. package/cjs/components/Divider/Divider.cjs.map +1 -1
  115. package/cjs/components/Drawer/Drawer.cjs +2 -1
  116. package/cjs/components/Drawer/Drawer.cjs.map +1 -1
  117. package/cjs/components/Drawer/DrawerBody.cjs +2 -1
  118. package/cjs/components/Drawer/DrawerBody.cjs.map +1 -1
  119. package/cjs/components/Drawer/DrawerCloseButton.cjs +2 -1
  120. package/cjs/components/Drawer/DrawerCloseButton.cjs.map +1 -1
  121. package/cjs/components/Drawer/DrawerContent.cjs.map +1 -1
  122. package/cjs/components/Drawer/DrawerHeader.cjs +2 -1
  123. package/cjs/components/Drawer/DrawerHeader.cjs.map +1 -1
  124. package/cjs/components/Drawer/DrawerOverlay.cjs +2 -1
  125. package/cjs/components/Drawer/DrawerOverlay.cjs.map +1 -1
  126. package/cjs/components/Drawer/DrawerRoot.cjs.map +1 -1
  127. package/cjs/components/Drawer/DrawerStack.cjs +3 -1
  128. package/cjs/components/Drawer/DrawerStack.cjs.map +1 -1
  129. package/cjs/components/Drawer/DrawerTitle.cjs +2 -1
  130. package/cjs/components/Drawer/DrawerTitle.cjs.map +1 -1
  131. package/cjs/components/EmptyState/EmptyState.cjs.map +1 -1
  132. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs +2 -1
  133. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs.map +1 -1
  134. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs +2 -1
  135. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs.map +1 -1
  136. package/cjs/components/Fieldset/Fieldset.cjs.map +1 -1
  137. package/cjs/components/FileButton/FileButton.cjs.map +1 -1
  138. package/cjs/components/FileInput/FileInput.cjs.map +1 -1
  139. package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
  140. package/cjs/components/FloatingIndicator/use-floating-indicator.cjs.map +1 -1
  141. package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
  142. package/cjs/components/FloatingWindow/FloatingWindowResizeHandle.cjs.map +1 -1
  143. package/cjs/components/FocusTrap/FocusTrap.cjs +2 -1
  144. package/cjs/components/FocusTrap/FocusTrap.cjs.map +1 -1
  145. package/cjs/components/Grid/Grid.cjs.map +1 -1
  146. package/cjs/components/Grid/GridCol/GridCol.cjs.map +1 -1
  147. package/cjs/components/Group/Group.cjs +16 -14
  148. package/cjs/components/Group/Group.cjs.map +1 -1
  149. package/cjs/components/Highlight/Highlight.cjs.map +1 -1
  150. package/cjs/components/HoverCard/HoverCard.cjs.map +1 -1
  151. package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs.map +1 -1
  152. package/cjs/components/HoverCard/HoverCardGroup/HoverCardGroup.cjs.map +1 -1
  153. package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs.map +1 -1
  154. package/cjs/components/HoverCard/use-hover-card.cjs.map +1 -1
  155. package/cjs/components/Image/Image.cjs.map +1 -1
  156. package/cjs/components/Indicator/Indicator.cjs.map +1 -1
  157. package/cjs/components/Input/Input.cjs +3 -3
  158. package/cjs/components/Input/Input.cjs.map +1 -1
  159. package/cjs/components/Input/Input.context.cjs.map +1 -1
  160. package/cjs/components/Input/InputClearButton/InputClearButton.cjs.map +1 -1
  161. package/cjs/components/Input/InputClearSection/InputClearSection.cjs.map +1 -1
  162. package/cjs/components/Input/InputDescription/InputDescription.cjs +2 -1
  163. package/cjs/components/Input/InputDescription/InputDescription.cjs.map +1 -1
  164. package/cjs/components/Input/InputError/InputError.cjs +2 -1
  165. package/cjs/components/Input/InputError/InputError.cjs.map +1 -1
  166. package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
  167. package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs +13 -12
  168. package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs.map +1 -1
  169. package/cjs/components/Input/InputSuccess/InputSuccess.cjs +2 -1
  170. package/cjs/components/Input/InputSuccess/InputSuccess.cjs.map +1 -1
  171. package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
  172. package/cjs/components/Input/InputWrapper.context.cjs.map +1 -1
  173. package/cjs/components/InputBase/InputBase.cjs.map +1 -1
  174. package/cjs/components/JsonInput/JsonInput.cjs.map +1 -1
  175. package/cjs/components/Kbd/Kbd.cjs +14 -13
  176. package/cjs/components/Kbd/Kbd.cjs.map +1 -1
  177. package/cjs/components/List/List.cjs.map +1 -1
  178. package/cjs/components/List/ListItem/ListItem.cjs.map +1 -1
  179. package/cjs/components/Loader/loaders/Bars.cjs.map +1 -1
  180. package/cjs/components/Loader/loaders/Dots.cjs.map +1 -1
  181. package/cjs/components/Loader/loaders/Oval.cjs.map +1 -1
  182. package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
  183. package/cjs/components/Mark/Mark.cjs +14 -13
  184. package/cjs/components/Mark/Mark.cjs.map +1 -1
  185. package/cjs/components/Marquee/Marquee.cjs.map +1 -1
  186. package/cjs/components/MaskInput/MaskInput.cjs +3 -2
  187. package/cjs/components/MaskInput/MaskInput.cjs.map +1 -1
  188. package/cjs/components/MaskInput/use-mask-input-props.cjs.map +1 -1
  189. package/cjs/components/Menu/Menu.cjs.map +1 -1
  190. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs +4 -3
  191. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs.map +1 -1
  192. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.context.cjs.map +1 -1
  193. package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs +2 -1
  194. package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs.map +1 -1
  195. package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs +3 -2
  196. package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs.map +1 -1
  197. package/cjs/components/Menu/MenuDivider/MenuDivider.cjs +2 -1
  198. package/cjs/components/Menu/MenuDivider/MenuDivider.cjs.map +1 -1
  199. package/cjs/components/Menu/MenuDropdown/MenuDropdown.cjs.map +1 -1
  200. package/cjs/components/Menu/MenuItem/MenuItem.cjs.map +1 -1
  201. package/cjs/components/Menu/MenuLabel/MenuLabel.cjs +2 -1
  202. package/cjs/components/Menu/MenuLabel/MenuLabel.cjs.map +1 -1
  203. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.cjs.map +1 -1
  204. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.context.cjs.map +1 -1
  205. package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs +2 -1
  206. package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs.map +1 -1
  207. package/cjs/components/Menu/MenuSearch/MenuSearch.cjs.map +1 -1
  208. package/cjs/components/Menu/MenuSelectableItem/MenuSelectableItem.cjs.map +1 -1
  209. package/cjs/components/Menu/MenuSub/MenuSub.cjs +1 -1
  210. package/cjs/components/Menu/MenuSub/MenuSub.cjs.map +1 -1
  211. package/cjs/components/Menu/MenuSub/MenuSub.context.cjs.map +1 -1
  212. package/cjs/components/Menu/MenuSubDropdown/MenuSubDropdown.cjs.map +1 -1
  213. package/cjs/components/Menu/MenuSubItem/MenuSubItem.cjs.map +1 -1
  214. package/cjs/components/Menu/MenuTarget/MenuTarget.cjs.map +1 -1
  215. package/cjs/components/Menu/use-menu-type-ahead.cjs.map +1 -1
  216. package/cjs/components/Menubar/Menubar.cjs.map +1 -1
  217. package/cjs/components/Menubar/MenubarMenu/MenubarMenu.cjs.map +1 -1
  218. package/cjs/components/Menubar/MenubarTarget/MenubarTarget.cjs.map +1 -1
  219. package/cjs/components/Modal/Modal.cjs +2 -1
  220. package/cjs/components/Modal/Modal.cjs.map +1 -1
  221. package/cjs/components/Modal/ModalBody.cjs +2 -1
  222. package/cjs/components/Modal/ModalBody.cjs.map +1 -1
  223. package/cjs/components/Modal/ModalCloseButton.cjs +2 -1
  224. package/cjs/components/Modal/ModalCloseButton.cjs.map +1 -1
  225. package/cjs/components/Modal/ModalContent.cjs.map +1 -1
  226. package/cjs/components/Modal/ModalHeader.cjs +2 -1
  227. package/cjs/components/Modal/ModalHeader.cjs.map +1 -1
  228. package/cjs/components/Modal/ModalOverlay.cjs +2 -1
  229. package/cjs/components/Modal/ModalOverlay.cjs.map +1 -1
  230. package/cjs/components/Modal/ModalRoot.cjs.map +1 -1
  231. package/cjs/components/Modal/ModalStack.cjs +3 -1
  232. package/cjs/components/Modal/ModalStack.cjs.map +1 -1
  233. package/cjs/components/Modal/ModalTitle.cjs +2 -1
  234. package/cjs/components/Modal/ModalTitle.cjs.map +1 -1
  235. package/cjs/components/Modal/use-modals-stack.cjs.map +1 -1
  236. package/cjs/components/ModalBase/ModalBase.cjs +3 -2
  237. package/cjs/components/ModalBase/ModalBase.cjs.map +1 -1
  238. package/cjs/components/ModalBase/ModalBaseBody.cjs.map +1 -1
  239. package/cjs/components/ModalBase/ModalBaseCloseButton.cjs.map +1 -1
  240. package/cjs/components/ModalBase/ModalBaseContent.cjs.map +1 -1
  241. package/cjs/components/ModalBase/ModalBaseHeader.cjs.map +1 -1
  242. package/cjs/components/ModalBase/ModalBaseOverlay.cjs.map +1 -1
  243. package/cjs/components/ModalBase/ModalBaseTitle.cjs.map +1 -1
  244. package/cjs/components/ModalBase/use-lock-scroll.cjs.map +1 -1
  245. package/cjs/components/ModalBase/use-modal.cjs +9 -3
  246. package/cjs/components/ModalBase/use-modal.cjs.map +1 -1
  247. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  248. package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
  249. package/cjs/components/NativeSelect/NativeSelectOption.cjs.map +1 -1
  250. package/cjs/components/NavLink/NavLink.cjs.map +1 -1
  251. package/cjs/components/Notification/Notification.cjs +3 -3
  252. package/cjs/components/Notification/Notification.cjs.map +1 -1
  253. package/cjs/components/NumberInput/NumberInput.cjs +5 -3
  254. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  255. package/cjs/components/NumberInput/NumberInputChevron.cjs.map +1 -1
  256. package/cjs/components/OverflowList/OverflowList.cjs +4 -2
  257. package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
  258. package/cjs/components/OverflowList/use-dimensions.cjs +9 -9
  259. package/cjs/components/OverflowList/use-dimensions.cjs.map +1 -1
  260. package/cjs/components/Overlay/Overlay.cjs +14 -13
  261. package/cjs/components/Overlay/Overlay.cjs.map +1 -1
  262. package/cjs/components/Pagination/Pagination.cjs +2 -1
  263. package/cjs/components/Pagination/Pagination.cjs.map +1 -1
  264. package/cjs/components/Pagination/Pagination.icons.cjs.map +1 -1
  265. package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs +2 -1
  266. package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs.map +1 -1
  267. package/cjs/components/Pagination/PaginationEdges/PaginationEdges.cjs.map +1 -1
  268. package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs +3 -2
  269. package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs.map +1 -1
  270. package/cjs/components/Pagination/PaginationLabel/PaginationLabel.cjs.map +1 -1
  271. package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs.map +1 -1
  272. package/cjs/components/Paper/Paper.cjs +1 -1
  273. package/cjs/components/Paper/Paper.cjs.map +1 -1
  274. package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
  275. package/cjs/components/PasswordInput/PasswordToggleIcon.cjs.map +1 -1
  276. package/cjs/components/Pill/Pill.cjs.map +1 -1
  277. package/cjs/components/Pill/PillGroup/PillGroup.cjs.map +1 -1
  278. package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
  279. package/cjs/components/PillsInput/PillsInput.context.cjs.map +1 -1
  280. package/cjs/components/PillsInput/PillsInputField/PillsInputField.cjs.map +1 -1
  281. package/cjs/components/PinInput/PinInput.cjs +6 -5
  282. package/cjs/components/PinInput/PinInput.cjs.map +1 -1
  283. package/cjs/components/Popover/Popover.cjs.map +1 -1
  284. package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs +3 -2
  285. package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs.map +1 -1
  286. package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
  287. package/cjs/components/Popover/PopoverTarget/PopoverTarget.cjs.map +1 -1
  288. package/cjs/components/Popover/use-popover.cjs +23 -13
  289. package/cjs/components/Popover/use-popover.cjs.map +1 -1
  290. package/cjs/components/Portal/Portal.cjs.map +1 -1
  291. package/cjs/components/Progress/Progress.cjs.map +1 -1
  292. package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs +2 -1
  293. package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs.map +1 -1
  294. package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs.map +1 -1
  295. package/cjs/components/Radio/Radio.cjs.map +1 -1
  296. package/cjs/components/Radio/RadioCard/RadioCard.cjs.map +1 -1
  297. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
  298. package/cjs/components/Radio/RadioIcon.cjs.map +1 -1
  299. package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs.map +1 -1
  300. package/cjs/components/Rating/Rating.cjs +6 -3
  301. package/cjs/components/Rating/Rating.cjs.map +1 -1
  302. package/cjs/components/Rating/RatingItem/RatingItem.cjs.map +1 -1
  303. package/cjs/components/Rating/StarSymbol/StarIcon.cjs.map +1 -1
  304. package/cjs/components/Rating/StarSymbol/StarSymbol.cjs +2 -1
  305. package/cjs/components/Rating/StarSymbol/StarSymbol.cjs.map +1 -1
  306. package/cjs/components/RingProgress/Curve/Curve.cjs.map +1 -1
  307. package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
  308. package/cjs/components/RollingNumber/DigitColumn.cjs.map +1 -1
  309. package/cjs/components/RollingNumber/RollingNumber.cjs +12 -10
  310. package/cjs/components/RollingNumber/RollingNumber.cjs.map +1 -1
  311. package/cjs/components/ScrollArea/ScrollArea.cjs +8 -6
  312. package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
  313. package/cjs/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.cjs.map +1 -1
  314. package/cjs/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.cjs.map +1 -1
  315. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.cjs.map +1 -1
  316. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.cjs.map +1 -1
  317. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.cjs.map +1 -1
  318. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.cjs.map +1 -1
  319. package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.cjs.map +1 -1
  320. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.cjs.map +1 -1
  321. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.cjs.map +1 -1
  322. package/cjs/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.cjs.map +1 -1
  323. package/cjs/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.cjs.map +1 -1
  324. package/cjs/components/ScrollArea/use-resize-observer.cjs.map +1 -1
  325. package/cjs/components/Scroller/Scroller.cjs.map +1 -1
  326. package/cjs/components/SegmentedControl/SegmentedControl.cjs +12 -1
  327. package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  328. package/cjs/components/Select/Select.cjs.map +1 -1
  329. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
  330. package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
  331. package/cjs/components/SimpleGrid/SimpleGridVariables.cjs +10 -8
  332. package/cjs/components/SimpleGrid/SimpleGridVariables.cjs.map +1 -1
  333. package/cjs/components/Skeleton/Skeleton.cjs +14 -13
  334. package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
  335. package/cjs/components/Slider/Marks/Marks.cjs +3 -2
  336. package/cjs/components/Slider/Marks/Marks.cjs.map +1 -1
  337. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs +20 -11
  338. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
  339. package/cjs/components/Slider/Slider/Slider.cjs +6 -6
  340. package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
  341. package/cjs/components/Slider/Thumb/Thumb.cjs.map +1 -1
  342. package/cjs/components/Slider/Track/Track.cjs.map +1 -1
  343. package/cjs/components/Splitter/GripIcon.cjs.map +1 -1
  344. package/cjs/components/Splitter/Splitter.cjs +8 -7
  345. package/cjs/components/Splitter/Splitter.cjs.map +1 -1
  346. package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
  347. package/cjs/components/Stack/Stack.cjs +14 -13
  348. package/cjs/components/Stack/Stack.cjs.map +1 -1
  349. package/cjs/components/Stepper/Stepper.cjs +6 -3
  350. package/cjs/components/Stepper/Stepper.cjs.map +1 -1
  351. package/cjs/components/Stepper/Stepper.context.cjs.map +1 -1
  352. package/cjs/components/Stepper/Stepper.module.cjs.map +1 -1
  353. package/cjs/components/Stepper/StepperStep/StepperStep.cjs +3 -2
  354. package/cjs/components/Stepper/StepperStep/StepperStep.cjs.map +1 -1
  355. package/cjs/components/Switch/Switch.cjs.map +1 -1
  356. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
  357. package/cjs/components/Table/Table.cjs +2 -2
  358. package/cjs/components/Table/Table.cjs.map +1 -1
  359. package/cjs/components/Table/TableScrollContainer.cjs.map +1 -1
  360. package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
  361. package/cjs/components/Tabs/Tabs.cjs.map +1 -1
  362. package/cjs/components/Tabs/TabsPanel/TabsPanel.cjs.map +1 -1
  363. package/cjs/components/Tabs/TabsTab/TabsTab.cjs.map +1 -1
  364. package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
  365. package/cjs/components/Text/Text.cjs +18 -17
  366. package/cjs/components/Text/Text.cjs.map +1 -1
  367. package/cjs/components/TextInput/TextInput.cjs +6 -5
  368. package/cjs/components/TextInput/TextInput.cjs.map +1 -1
  369. package/cjs/components/Textarea/Autosize.cjs +8 -2
  370. package/cjs/components/Textarea/Autosize.cjs.map +1 -1
  371. package/cjs/components/ThemeIcon/ThemeIcon.cjs +14 -13
  372. package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
  373. package/cjs/components/Timeline/Timeline.cjs.map +1 -1
  374. package/cjs/components/Timeline/TimelineItem/TimelineItem.cjs.map +1 -1
  375. package/cjs/components/Title/Title.cjs +1 -1
  376. package/cjs/components/Title/Title.cjs.map +1 -1
  377. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  378. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs.map +1 -1
  379. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs.map +1 -1
  380. package/cjs/components/Tooltip/TooltipGroup/TooltipGroup.cjs.map +1 -1
  381. package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
  382. package/cjs/components/Transition/Transition.cjs.map +1 -1
  383. package/cjs/components/Transition/use-transition.cjs.map +1 -1
  384. package/cjs/components/Tree/FlatTreeNode.cjs.map +1 -1
  385. package/cjs/components/Tree/Tree.cjs +2 -1
  386. package/cjs/components/Tree/Tree.cjs.map +1 -1
  387. package/cjs/components/Tree/TreeNode.cjs.map +1 -1
  388. package/cjs/components/Tree/use-tree-node-drag-drop.cjs.map +1 -1
  389. package/cjs/components/Tree/use-tree.cjs.map +1 -1
  390. package/cjs/components/TreeSelect/TreeSelect.cjs +11 -9
  391. package/cjs/components/TreeSelect/TreeSelect.cjs.map +1 -1
  392. package/cjs/components/TreeSelect/TreeSelectOption.cjs.map +1 -1
  393. package/cjs/components/Typography/Typography.cjs +12 -11
  394. package/cjs/components/Typography/Typography.cjs.map +1 -1
  395. package/cjs/components/Typography/Typography.module.cjs.map +1 -1
  396. package/cjs/components/UnstyledButton/UnstyledButton.cjs +12 -11
  397. package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
  398. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs +12 -11
  399. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  400. package/cjs/core/Box/Box.cjs.map +1 -1
  401. package/cjs/core/Box/use-random-classname/use-random-classname.cjs.map +1 -1
  402. package/cjs/core/DirectionProvider/DirectionProvider.cjs +3 -2
  403. package/cjs/core/DirectionProvider/DirectionProvider.cjs.map +1 -1
  404. package/cjs/core/InlineStyles/InlineStyles.cjs.map +1 -1
  405. package/cjs/core/MantineProvider/Mantine.context.cjs.map +1 -1
  406. package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs +4 -2
  407. package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs.map +1 -1
  408. package/cjs/core/MantineProvider/MantineProvider.cjs +3 -3
  409. package/cjs/core/MantineProvider/MantineProvider.cjs.map +1 -1
  410. package/cjs/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs.map +1 -1
  411. package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs.map +1 -1
  412. package/cjs/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs.map +1 -1
  413. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-computed-color-scheme.cjs.map +1 -1
  414. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs +2 -1
  415. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs.map +1 -1
  416. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-provider-color-scheme.cjs.map +1 -1
  417. package/cjs/core/MantineProvider/use-matches/use-matches.cjs.map +1 -1
  418. package/cjs/core/styles-api/use-styles/get-class-name/get-class-name.cjs.map +1 -1
  419. package/cjs/core/styles-api/use-styles/get-class-name/get-global-class-names/get-global-class-names.cjs.map +1 -1
  420. package/cjs/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.cjs.map +1 -1
  421. package/cjs/core/utils/create-safe-context/create-safe-context.cjs.map +1 -1
  422. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs +0 -1
  423. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs.map +1 -1
  424. package/cjs/core/utils/deep-merge/deep-merge.cjs +4 -3
  425. package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -1
  426. package/cjs/core/utils/use-hovered/use-hovered.cjs.map +1 -1
  427. package/cjs/index.cjs +6 -0
  428. package/cjs/utils/Floating/use-context-menu-handlers.cjs.map +1 -1
  429. package/cjs/utils/Floating/use-delayed-hover.cjs.map +1 -1
  430. package/cjs/utils/InlineInput/InlineInput.cjs.map +1 -1
  431. package/cjs/utils/InputsGroupFieldset/InputsGroupFieldset.cjs.map +1 -1
  432. package/esm/components/Accordion/Accordion.mjs.map +1 -1
  433. package/esm/components/Accordion/Accordion.module.mjs.map +1 -1
  434. package/esm/components/Accordion/AccordionChevron.mjs.map +1 -1
  435. package/esm/components/Accordion/AccordionControl/AccordionControl.mjs.map +1 -1
  436. package/esm/components/Accordion/AccordionItem/AccordionItem.mjs.map +1 -1
  437. package/esm/components/Accordion/AccordionPanel/AccordionPanel.mjs.map +1 -1
  438. package/esm/components/ActionBar/ActionBar.context.mjs +8 -0
  439. package/esm/components/ActionBar/ActionBar.context.mjs.map +1 -0
  440. package/esm/components/ActionBar/ActionBar.mjs +94 -0
  441. package/esm/components/ActionBar/ActionBar.mjs.map +1 -0
  442. package/esm/components/ActionBar/ActionBar.module.mjs +10 -0
  443. package/esm/components/ActionBar/ActionBar.module.mjs.map +1 -0
  444. package/esm/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.mjs +33 -0
  445. package/esm/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.mjs.map +1 -0
  446. package/esm/components/ActionBar/ActionBarDivider/ActionBarDivider.mjs +30 -0
  447. package/esm/components/ActionBar/ActionBarDivider/ActionBarDivider.mjs.map +1 -0
  448. package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
  449. package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs +16 -15
  450. package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
  451. package/esm/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.mjs +15 -14
  452. package/esm/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.mjs.map +1 -1
  453. package/esm/components/Affix/Affix.mjs.map +1 -1
  454. package/esm/components/Alert/Alert.mjs.map +1 -1
  455. package/esm/components/AngleSlider/AngleSlider.mjs +5 -4
  456. package/esm/components/AngleSlider/AngleSlider.mjs.map +1 -1
  457. package/esm/components/AppShell/AppShell.mjs.map +1 -1
  458. package/esm/components/AppShell/AppShellMain/AppShellMain.mjs +2 -1
  459. package/esm/components/AppShell/AppShellMain/AppShellMain.mjs.map +1 -1
  460. package/esm/components/AspectRatio/AspectRatio.mjs +14 -13
  461. package/esm/components/AspectRatio/AspectRatio.mjs.map +1 -1
  462. package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
  463. package/esm/components/Avatar/Avatar.mjs.map +1 -1
  464. package/esm/components/Avatar/AvatarGroup/AvatarGroup.mjs.map +1 -1
  465. package/esm/components/Avatar/AvatarPlaceholderIcon.mjs.map +1 -1
  466. package/esm/components/BackgroundImage/BackgroundImage.mjs +14 -13
  467. package/esm/components/BackgroundImage/BackgroundImage.mjs.map +1 -1
  468. package/esm/components/Badge/Badge.mjs.map +1 -1
  469. package/esm/components/Blockquote/Blockquote.mjs +6 -5
  470. package/esm/components/Blockquote/Blockquote.mjs.map +1 -1
  471. package/esm/components/Breadcrumbs/Breadcrumbs.mjs.map +1 -1
  472. package/esm/components/Burger/Burger.mjs.map +1 -1
  473. package/esm/components/Button/Button.mjs.map +1 -1
  474. package/esm/components/Button/ButtonGroup/ButtonGroup.mjs +16 -15
  475. package/esm/components/Button/ButtonGroup/ButtonGroup.mjs.map +1 -1
  476. package/esm/components/Button/ButtonGroupSection/ButtonGroupSection.mjs +15 -14
  477. package/esm/components/Button/ButtonGroupSection/ButtonGroupSection.mjs.map +1 -1
  478. package/esm/components/Card/Card.mjs.map +1 -1
  479. package/esm/components/Cascader/Cascader.mjs +5 -4
  480. package/esm/components/Cascader/Cascader.mjs.map +1 -1
  481. package/esm/components/Cascader/CascaderColumns.mjs +2 -1
  482. package/esm/components/Cascader/CascaderColumns.mjs.map +1 -1
  483. package/esm/components/Cascader/get-cascader-columns.mjs.map +1 -1
  484. package/esm/components/Checkbox/CheckIcon.mjs +6 -5
  485. package/esm/components/Checkbox/CheckIcon.mjs.map +1 -1
  486. package/esm/components/Checkbox/Checkbox.mjs +1 -1
  487. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  488. package/esm/components/Checkbox/CheckboxCard/CheckboxCard.mjs +2 -1
  489. package/esm/components/Checkbox/CheckboxCard/CheckboxCard.mjs.map +1 -1
  490. package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  491. package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.mjs.map +1 -1
  492. package/esm/components/Chip/Chip.mjs.map +1 -1
  493. package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
  494. package/esm/components/CloseButton/CloseIcon.mjs.map +1 -1
  495. package/esm/components/Collapse/Collapse.mjs.map +1 -1
  496. package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
  497. package/esm/components/ColorInput/EyeDropperIcon.mjs.map +1 -1
  498. package/esm/components/ColorPicker/ColorPicker.mjs.map +1 -1
  499. package/esm/components/ColorPicker/ColorSlider/ColorSlider.mjs +4 -6
  500. package/esm/components/ColorPicker/ColorSlider/ColorSlider.mjs.map +1 -1
  501. package/esm/components/ColorPicker/Saturation/Saturation.mjs +4 -6
  502. package/esm/components/ColorPicker/Saturation/Saturation.mjs.map +1 -1
  503. package/esm/components/ColorPicker/Swatches/Swatches.mjs.map +1 -1
  504. package/esm/components/ColorSwatch/ColorSwatch.mjs.map +1 -1
  505. package/esm/components/Combobox/Combobox.mjs.map +1 -1
  506. package/esm/components/Combobox/ComboboxChevron/ComboboxChevron.mjs.map +1 -1
  507. package/esm/components/Combobox/ComboboxEmpty/ComboboxEmpty.mjs +2 -1
  508. package/esm/components/Combobox/ComboboxEmpty/ComboboxEmpty.mjs.map +1 -1
  509. package/esm/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.mjs +10 -9
  510. package/esm/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.mjs.map +1 -1
  511. package/esm/components/Combobox/ComboboxFooter/ComboboxFooter.mjs +2 -1
  512. package/esm/components/Combobox/ComboboxFooter/ComboboxFooter.mjs.map +1 -1
  513. package/esm/components/Combobox/ComboboxGroup/ComboboxGroup.mjs.map +1 -1
  514. package/esm/components/Combobox/ComboboxHeader/ComboboxHeader.mjs +2 -1
  515. package/esm/components/Combobox/ComboboxHeader/ComboboxHeader.mjs.map +1 -1
  516. package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs +10 -9
  517. package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs.map +1 -1
  518. package/esm/components/Combobox/OptionsDropdown/OptionsDropdown.mjs.map +1 -1
  519. package/esm/components/Combobox/OptionsDropdown/default-options-filter.mjs.map +1 -1
  520. package/esm/components/Combobox/use-combobox/get-index/get-index.mjs.map +1 -1
  521. package/esm/components/Combobox/use-combobox/get-index/get-virtualized-index.mjs.map +1 -1
  522. package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
  523. package/esm/components/ComboboxPopover/ComboboxPopover.mjs.map +1 -1
  524. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs +13 -12
  525. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs.map +1 -1
  526. package/esm/components/DataList/DataList.mjs.map +1 -1
  527. package/esm/components/Dialog/Dialog.mjs.map +1 -1
  528. package/esm/components/Divider/Divider.mjs.map +1 -1
  529. package/esm/components/Drawer/Drawer.mjs +2 -1
  530. package/esm/components/Drawer/Drawer.mjs.map +1 -1
  531. package/esm/components/Drawer/DrawerBody.mjs +2 -1
  532. package/esm/components/Drawer/DrawerBody.mjs.map +1 -1
  533. package/esm/components/Drawer/DrawerCloseButton.mjs +2 -1
  534. package/esm/components/Drawer/DrawerCloseButton.mjs.map +1 -1
  535. package/esm/components/Drawer/DrawerContent.mjs.map +1 -1
  536. package/esm/components/Drawer/DrawerHeader.mjs +2 -1
  537. package/esm/components/Drawer/DrawerHeader.mjs.map +1 -1
  538. package/esm/components/Drawer/DrawerOverlay.mjs +2 -1
  539. package/esm/components/Drawer/DrawerOverlay.mjs.map +1 -1
  540. package/esm/components/Drawer/DrawerRoot.mjs.map +1 -1
  541. package/esm/components/Drawer/DrawerStack.mjs +3 -1
  542. package/esm/components/Drawer/DrawerStack.mjs.map +1 -1
  543. package/esm/components/Drawer/DrawerTitle.mjs +2 -1
  544. package/esm/components/Drawer/DrawerTitle.mjs.map +1 -1
  545. package/esm/components/EmptyState/EmptyState.mjs.map +1 -1
  546. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs +2 -1
  547. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs.map +1 -1
  548. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs +2 -1
  549. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs.map +1 -1
  550. package/esm/components/Fieldset/Fieldset.mjs.map +1 -1
  551. package/esm/components/FileInput/FileInput.mjs.map +1 -1
  552. package/esm/components/FloatingWindow/FloatingWindow.mjs.map +1 -1
  553. package/esm/components/FocusTrap/FocusTrap.mjs +2 -1
  554. package/esm/components/FocusTrap/FocusTrap.mjs.map +1 -1
  555. package/esm/components/Grid/Grid.mjs.map +1 -1
  556. package/esm/components/Group/Group.mjs +16 -14
  557. package/esm/components/Group/Group.mjs.map +1 -1
  558. package/esm/components/Highlight/Highlight.mjs.map +1 -1
  559. package/esm/components/HoverCard/HoverCard.mjs.map +1 -1
  560. package/esm/components/HoverCard/HoverCardGroup/HoverCardGroup.mjs.map +1 -1
  561. package/esm/components/HoverCard/HoverCardTarget/HoverCardTarget.mjs.map +1 -1
  562. package/esm/components/Indicator/Indicator.mjs.map +1 -1
  563. package/esm/components/Input/Input.mjs +3 -3
  564. package/esm/components/Input/Input.mjs.map +1 -1
  565. package/esm/components/Input/InputClearSection/InputClearSection.mjs.map +1 -1
  566. package/esm/components/Input/InputDescription/InputDescription.mjs +2 -1
  567. package/esm/components/Input/InputDescription/InputDescription.mjs.map +1 -1
  568. package/esm/components/Input/InputError/InputError.mjs +2 -1
  569. package/esm/components/Input/InputError/InputError.mjs.map +1 -1
  570. package/esm/components/Input/InputLabel/InputLabel.mjs.map +1 -1
  571. package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs +13 -12
  572. package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs.map +1 -1
  573. package/esm/components/Input/InputSuccess/InputSuccess.mjs +2 -1
  574. package/esm/components/Input/InputSuccess/InputSuccess.mjs.map +1 -1
  575. package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
  576. package/esm/components/InputBase/InputBase.mjs.map +1 -1
  577. package/esm/components/Kbd/Kbd.mjs +14 -13
  578. package/esm/components/Kbd/Kbd.mjs.map +1 -1
  579. package/esm/components/List/List.mjs.map +1 -1
  580. package/esm/components/List/ListItem/ListItem.mjs.map +1 -1
  581. package/esm/components/Loader/loaders/Bars.mjs.map +1 -1
  582. package/esm/components/Loader/loaders/Dots.mjs.map +1 -1
  583. package/esm/components/LoadingOverlay/LoadingOverlay.mjs.map +1 -1
  584. package/esm/components/Mark/Mark.mjs +14 -13
  585. package/esm/components/Mark/Mark.mjs.map +1 -1
  586. package/esm/components/Marquee/Marquee.mjs.map +1 -1
  587. package/esm/components/MaskInput/MaskInput.mjs +3 -2
  588. package/esm/components/MaskInput/MaskInput.mjs.map +1 -1
  589. package/esm/components/Menu/Menu.mjs.map +1 -1
  590. package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs +4 -3
  591. package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs.map +1 -1
  592. package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs +2 -1
  593. package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs.map +1 -1
  594. package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs +3 -2
  595. package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs.map +1 -1
  596. package/esm/components/Menu/MenuDivider/MenuDivider.mjs +2 -1
  597. package/esm/components/Menu/MenuDivider/MenuDivider.mjs.map +1 -1
  598. package/esm/components/Menu/MenuDropdown/MenuDropdown.mjs.map +1 -1
  599. package/esm/components/Menu/MenuItem/MenuItem.mjs.map +1 -1
  600. package/esm/components/Menu/MenuLabel/MenuLabel.mjs +2 -1
  601. package/esm/components/Menu/MenuLabel/MenuLabel.mjs.map +1 -1
  602. package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs +2 -1
  603. package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs.map +1 -1
  604. package/esm/components/Menu/MenuSelectableItem/MenuSelectableItem.mjs.map +1 -1
  605. package/esm/components/Menu/MenuSub/MenuSub.mjs +1 -1
  606. package/esm/components/Menu/MenuSub/MenuSub.mjs.map +1 -1
  607. package/esm/components/Menu/MenuSubItem/MenuSubItem.mjs.map +1 -1
  608. package/esm/components/Menu/MenuTarget/MenuTarget.mjs.map +1 -1
  609. package/esm/components/Menubar/Menubar.mjs.map +1 -1
  610. package/esm/components/Menubar/MenubarMenu/MenubarMenu.mjs.map +1 -1
  611. package/esm/components/Menubar/MenubarTarget/MenubarTarget.mjs.map +1 -1
  612. package/esm/components/Modal/Modal.mjs +2 -1
  613. package/esm/components/Modal/Modal.mjs.map +1 -1
  614. package/esm/components/Modal/ModalBody.mjs +2 -1
  615. package/esm/components/Modal/ModalBody.mjs.map +1 -1
  616. package/esm/components/Modal/ModalCloseButton.mjs +2 -1
  617. package/esm/components/Modal/ModalCloseButton.mjs.map +1 -1
  618. package/esm/components/Modal/ModalContent.mjs.map +1 -1
  619. package/esm/components/Modal/ModalHeader.mjs +2 -1
  620. package/esm/components/Modal/ModalHeader.mjs.map +1 -1
  621. package/esm/components/Modal/ModalOverlay.mjs +2 -1
  622. package/esm/components/Modal/ModalOverlay.mjs.map +1 -1
  623. package/esm/components/Modal/ModalRoot.mjs.map +1 -1
  624. package/esm/components/Modal/ModalStack.mjs +3 -1
  625. package/esm/components/Modal/ModalStack.mjs.map +1 -1
  626. package/esm/components/Modal/ModalTitle.mjs +2 -1
  627. package/esm/components/Modal/ModalTitle.mjs.map +1 -1
  628. package/esm/components/ModalBase/ModalBase.mjs +3 -2
  629. package/esm/components/ModalBase/ModalBase.mjs.map +1 -1
  630. package/esm/components/ModalBase/ModalBaseContent.mjs.map +1 -1
  631. package/esm/components/ModalBase/ModalBaseOverlay.mjs.map +1 -1
  632. package/esm/components/ModalBase/use-modal.mjs +9 -3
  633. package/esm/components/ModalBase/use-modal.mjs.map +1 -1
  634. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  635. package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
  636. package/esm/components/NativeSelect/NativeSelectOption.mjs.map +1 -1
  637. package/esm/components/NavLink/NavLink.mjs.map +1 -1
  638. package/esm/components/Notification/Notification.mjs +3 -3
  639. package/esm/components/Notification/Notification.mjs.map +1 -1
  640. package/esm/components/NumberInput/NumberInput.mjs +5 -3
  641. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  642. package/esm/components/NumberInput/NumberInputChevron.mjs.map +1 -1
  643. package/esm/components/OverflowList/OverflowList.mjs +4 -2
  644. package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
  645. package/esm/components/OverflowList/use-dimensions.mjs +9 -9
  646. package/esm/components/OverflowList/use-dimensions.mjs.map +1 -1
  647. package/esm/components/Overlay/Overlay.mjs +14 -13
  648. package/esm/components/Overlay/Overlay.mjs.map +1 -1
  649. package/esm/components/Pagination/Pagination.icons.mjs.map +1 -1
  650. package/esm/components/Pagination/Pagination.mjs +2 -1
  651. package/esm/components/Pagination/Pagination.mjs.map +1 -1
  652. package/esm/components/Pagination/PaginationDots/PaginationDots.mjs +2 -1
  653. package/esm/components/Pagination/PaginationDots/PaginationDots.mjs.map +1 -1
  654. package/esm/components/Pagination/PaginationEdges/PaginationEdges.mjs.map +1 -1
  655. package/esm/components/Pagination/PaginationItems/PaginationItems.mjs +3 -2
  656. package/esm/components/Pagination/PaginationItems/PaginationItems.mjs.map +1 -1
  657. package/esm/components/Pagination/PaginationLabel/PaginationLabel.mjs.map +1 -1
  658. package/esm/components/Pagination/PaginationRoot/PaginationRoot.mjs.map +1 -1
  659. package/esm/components/Paper/Paper.mjs +1 -1
  660. package/esm/components/Paper/Paper.mjs.map +1 -1
  661. package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
  662. package/esm/components/PasswordInput/PasswordToggleIcon.mjs.map +1 -1
  663. package/esm/components/Pill/Pill.mjs.map +1 -1
  664. package/esm/components/Pill/PillGroup/PillGroup.mjs.map +1 -1
  665. package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
  666. package/esm/components/PinInput/PinInput.mjs +6 -5
  667. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  668. package/esm/components/Popover/Popover.mjs.map +1 -1
  669. package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs +3 -2
  670. package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs.map +1 -1
  671. package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs.map +1 -1
  672. package/esm/components/Popover/use-popover.mjs +23 -13
  673. package/esm/components/Popover/use-popover.mjs.map +1 -1
  674. package/esm/components/Progress/Progress.mjs.map +1 -1
  675. package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs +2 -1
  676. package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs.map +1 -1
  677. package/esm/components/Progress/ProgressRoot/ProgressRoot.mjs.map +1 -1
  678. package/esm/components/Radio/Radio.mjs.map +1 -1
  679. package/esm/components/Radio/RadioCard/RadioCard.mjs.map +1 -1
  680. package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
  681. package/esm/components/Radio/RadioIcon.mjs.map +1 -1
  682. package/esm/components/Radio/RadioIndicator/RadioIndicator.mjs.map +1 -1
  683. package/esm/components/Rating/Rating.mjs +6 -3
  684. package/esm/components/Rating/Rating.mjs.map +1 -1
  685. package/esm/components/Rating/RatingItem/RatingItem.mjs.map +1 -1
  686. package/esm/components/Rating/StarSymbol/StarIcon.mjs.map +1 -1
  687. package/esm/components/Rating/StarSymbol/StarSymbol.mjs +2 -1
  688. package/esm/components/Rating/StarSymbol/StarSymbol.mjs.map +1 -1
  689. package/esm/components/RingProgress/Curve/Curve.mjs.map +1 -1
  690. package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
  691. package/esm/components/RollingNumber/DigitColumn.mjs.map +1 -1
  692. package/esm/components/RollingNumber/RollingNumber.mjs +12 -10
  693. package/esm/components/RollingNumber/RollingNumber.mjs.map +1 -1
  694. package/esm/components/ScrollArea/ScrollArea.mjs +8 -6
  695. package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
  696. package/esm/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.mjs.map +1 -1
  697. package/esm/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.mjs.map +1 -1
  698. package/esm/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.mjs.map +1 -1
  699. package/esm/components/Scroller/Scroller.mjs.map +1 -1
  700. package/esm/components/SegmentedControl/SegmentedControl.mjs +12 -1
  701. package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  702. package/esm/components/Select/Select.mjs.map +1 -1
  703. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
  704. package/esm/components/SimpleGrid/SimpleGrid.mjs.map +1 -1
  705. package/esm/components/SimpleGrid/SimpleGridVariables.mjs +10 -8
  706. package/esm/components/SimpleGrid/SimpleGridVariables.mjs.map +1 -1
  707. package/esm/components/Skeleton/Skeleton.mjs +14 -13
  708. package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
  709. package/esm/components/Slider/Marks/Marks.mjs +3 -2
  710. package/esm/components/Slider/Marks/Marks.mjs.map +1 -1
  711. package/esm/components/Slider/RangeSlider/RangeSlider.mjs +20 -11
  712. package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
  713. package/esm/components/Slider/Slider/Slider.mjs +6 -6
  714. package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
  715. package/esm/components/Slider/Thumb/Thumb.mjs.map +1 -1
  716. package/esm/components/Slider/Track/Track.mjs.map +1 -1
  717. package/esm/components/Splitter/GripIcon.mjs.map +1 -1
  718. package/esm/components/Splitter/Splitter.mjs +8 -7
  719. package/esm/components/Splitter/Splitter.mjs.map +1 -1
  720. package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
  721. package/esm/components/Stack/Stack.mjs +14 -13
  722. package/esm/components/Stack/Stack.mjs.map +1 -1
  723. package/esm/components/Stepper/Stepper.context.mjs.map +1 -1
  724. package/esm/components/Stepper/Stepper.mjs +6 -3
  725. package/esm/components/Stepper/Stepper.mjs.map +1 -1
  726. package/esm/components/Stepper/Stepper.module.mjs.map +1 -1
  727. package/esm/components/Stepper/StepperStep/StepperStep.mjs +3 -2
  728. package/esm/components/Stepper/StepperStep/StepperStep.mjs.map +1 -1
  729. package/esm/components/Switch/Switch.mjs.map +1 -1
  730. package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs.map +1 -1
  731. package/esm/components/Table/Table.mjs +2 -2
  732. package/esm/components/Table/Table.mjs.map +1 -1
  733. package/esm/components/Table/TableScrollContainer.mjs.map +1 -1
  734. package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
  735. package/esm/components/Tabs/Tabs.mjs.map +1 -1
  736. package/esm/components/Tabs/TabsPanel/TabsPanel.mjs.map +1 -1
  737. package/esm/components/Tabs/TabsTab/TabsTab.mjs.map +1 -1
  738. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  739. package/esm/components/Text/Text.mjs +18 -17
  740. package/esm/components/Text/Text.mjs.map +1 -1
  741. package/esm/components/TextInput/TextInput.mjs +6 -5
  742. package/esm/components/TextInput/TextInput.mjs.map +1 -1
  743. package/esm/components/Textarea/Autosize.mjs +9 -3
  744. package/esm/components/Textarea/Autosize.mjs.map +1 -1
  745. package/esm/components/ThemeIcon/ThemeIcon.mjs +14 -13
  746. package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
  747. package/esm/components/Timeline/Timeline.mjs.map +1 -1
  748. package/esm/components/Timeline/TimelineItem/TimelineItem.mjs.map +1 -1
  749. package/esm/components/Title/Title.mjs +1 -1
  750. package/esm/components/Title/Title.mjs.map +1 -1
  751. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  752. package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs.map +1 -1
  753. package/esm/components/Tooltip/TooltipGroup/TooltipGroup.mjs.map +1 -1
  754. package/esm/components/Transition/Transition.mjs.map +1 -1
  755. package/esm/components/Tree/FlatTreeNode.mjs.map +1 -1
  756. package/esm/components/Tree/Tree.mjs +2 -1
  757. package/esm/components/Tree/Tree.mjs.map +1 -1
  758. package/esm/components/Tree/TreeNode.mjs.map +1 -1
  759. package/esm/components/Tree/use-tree.mjs.map +1 -1
  760. package/esm/components/TreeSelect/TreeSelect.mjs +11 -9
  761. package/esm/components/TreeSelect/TreeSelect.mjs.map +1 -1
  762. package/esm/components/TreeSelect/TreeSelectOption.mjs.map +1 -1
  763. package/esm/components/Typography/Typography.mjs +12 -11
  764. package/esm/components/Typography/Typography.mjs.map +1 -1
  765. package/esm/components/Typography/Typography.module.mjs.map +1 -1
  766. package/esm/components/UnstyledButton/UnstyledButton.mjs +12 -11
  767. package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
  768. package/esm/components/VisuallyHidden/VisuallyHidden.mjs +12 -11
  769. package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
  770. package/esm/core/DirectionProvider/DirectionProvider.mjs +3 -2
  771. package/esm/core/DirectionProvider/DirectionProvider.mjs.map +1 -1
  772. package/esm/core/InlineStyles/InlineStyles.mjs.map +1 -1
  773. package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs +4 -2
  774. package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs.map +1 -1
  775. package/esm/core/MantineProvider/MantineProvider.mjs +3 -3
  776. package/esm/core/MantineProvider/MantineProvider.mjs.map +1 -1
  777. package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs.map +1 -1
  778. package/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.mjs.map +1 -1
  779. package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs +2 -1
  780. package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs.map +1 -1
  781. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs +0 -1
  782. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs.map +1 -1
  783. package/esm/core/utils/deep-merge/deep-merge.mjs +4 -3
  784. package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -1
  785. package/esm/index.mjs +4 -1
  786. package/esm/utils/InlineInput/InlineInput.mjs.map +1 -1
  787. package/lib/components/Accordion/Accordion.d.ts +1 -1
  788. package/lib/components/Accordion/AccordionChevron.d.ts +1 -1
  789. package/lib/components/ActionBar/ActionBar.context.d.ts +8 -0
  790. package/lib/components/ActionBar/ActionBar.d.ts +44 -0
  791. package/lib/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.d.ts +22 -0
  792. package/lib/components/ActionBar/ActionBarDivider/ActionBarDivider.d.ts +16 -0
  793. package/lib/components/ActionBar/index.d.ts +17 -0
  794. package/lib/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.d.ts +1 -1
  795. package/lib/components/Avatar/AvatarPlaceholderIcon.d.ts +1 -1
  796. package/lib/components/Cascader/CascaderColumns.d.ts +1 -1
  797. package/lib/components/Checkbox/CheckIcon.d.ts +2 -2
  798. package/lib/components/CloseButton/CloseIcon.d.ts +1 -1
  799. package/lib/components/ColorInput/EyeDropperIcon.d.ts +1 -1
  800. package/lib/components/ColorPicker/Saturation/Saturation.d.ts +1 -1
  801. package/lib/components/ColorPicker/Swatches/Swatches.d.ts +1 -1
  802. package/lib/components/ColorPicker/Thumb/Thumb.d.ts +1 -1
  803. package/lib/components/Combobox/Combobox.d.ts +1 -1
  804. package/lib/components/Combobox/ComboboxClearButton/ComboboxClearButton.d.ts +1 -1
  805. package/lib/components/Combobox/ComboboxHiddenInput/ComboboxHiddenInput.d.ts +1 -1
  806. package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -1
  807. package/lib/components/CopyButton/CopyButton.d.ts +1 -1
  808. package/lib/components/Drawer/DrawerStack.d.ts +2 -1
  809. package/lib/components/FocusTrap/FocusTrap.d.ts +1 -1
  810. package/lib/components/Grid/GridCol/GridColVariables.d.ts +1 -1
  811. package/lib/components/Grid/GridVariables.d.ts +1 -1
  812. package/lib/components/HoverCard/HoverCard.d.ts +1 -1
  813. package/lib/components/HoverCard/HoverCardDropdown/HoverCardDropdown.d.ts +1 -1
  814. package/lib/components/HoverCard/HoverCardGroup/HoverCardGroup.d.ts +1 -1
  815. package/lib/components/HoverCard/HoverCardTarget/HoverCardTarget.d.ts +1 -1
  816. package/lib/components/Input/InputClearSection/InputClearSection.d.ts +1 -1
  817. package/lib/components/Input/index.d.ts +1 -1
  818. package/lib/components/Menu/Menu.d.ts +1 -1
  819. package/lib/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.d.ts +1 -1
  820. package/lib/components/Menu/MenuRadioGroup/MenuRadioGroup.d.ts +1 -1
  821. package/lib/components/Menu/MenuSelectableItem/MenuSelectableItem.d.ts +1 -1
  822. package/lib/components/Menu/MenuSub/MenuSub.d.ts +4 -2
  823. package/lib/components/Menu/MenuSubTarget/MenuSubTarget.d.ts +1 -1
  824. package/lib/components/Menu/MenuTarget/MenuTarget.d.ts +1 -1
  825. package/lib/components/Menubar/MenubarDropdown/MenubarDropdown.d.ts +1 -1
  826. package/lib/components/Menubar/MenubarMenu/MenubarMenu.d.ts +1 -1
  827. package/lib/components/Menubar/MenubarTarget/MenubarTarget.d.ts +1 -1
  828. package/lib/components/Modal/ModalStack.d.ts +2 -1
  829. package/lib/components/ModalBase/ModalBase.d.ts +2 -1
  830. package/lib/components/ModalBase/ModalBaseBody.d.ts +1 -1
  831. package/lib/components/ModalBase/ModalBaseCloseButton.d.ts +1 -1
  832. package/lib/components/ModalBase/ModalBaseContent.d.ts +1 -1
  833. package/lib/components/ModalBase/ModalBaseHeader.d.ts +1 -1
  834. package/lib/components/ModalBase/ModalBaseOverlay.d.ts +1 -1
  835. package/lib/components/ModalBase/ModalBaseTitle.d.ts +1 -1
  836. package/lib/components/ModalBase/NativeScrollArea.d.ts +1 -1
  837. package/lib/components/ModalBase/use-modal.d.ts +2 -1
  838. package/lib/components/NativeSelect/NativeSelectOption.d.ts +1 -1
  839. package/lib/components/NumberFormatter/NumberFormatter.d.ts +1 -1
  840. package/lib/components/NumberInput/NumberInputChevron.d.ts +1 -1
  841. package/lib/components/Pagination/Pagination.icons.d.ts +5 -5
  842. package/lib/components/Pagination/PaginationItems/PaginationItems.d.ts +1 -1
  843. package/lib/components/PasswordInput/PasswordToggleIcon.d.ts +1 -1
  844. package/lib/components/Popover/Popover.d.ts +2 -2
  845. package/lib/components/Progress/Progress.d.ts +1 -1
  846. package/lib/components/Radio/RadioIcon.d.ts +1 -1
  847. package/lib/components/Rating/RatingItem/RatingItem.d.ts +1 -1
  848. package/lib/components/Rating/StarSymbol/StarIcon.d.ts +1 -1
  849. package/lib/components/Rating/StarSymbol/StarSymbol.d.ts +1 -1
  850. package/lib/components/RingProgress/Curve/Curve.d.ts +1 -1
  851. package/lib/components/RollingNumber/DigitColumn.d.ts +1 -1
  852. package/lib/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.d.ts +2 -2
  853. package/lib/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.d.ts +1 -1
  854. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.d.ts +1 -1
  855. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.d.ts +1 -1
  856. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.d.ts +1 -1
  857. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.d.ts +1 -1
  858. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.d.ts +1 -1
  859. package/lib/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.d.ts +1 -1
  860. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.d.ts +1 -1
  861. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.d.ts +1 -1
  862. package/lib/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.d.ts +2 -2
  863. package/lib/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.d.ts +1 -1
  864. package/lib/components/SimpleGrid/SimpleGridVariables.d.ts +2 -2
  865. package/lib/components/Slider/Marks/Marks.d.ts +1 -1
  866. package/lib/components/Slider/SliderRoot/SliderRoot.d.ts +1 -1
  867. package/lib/components/Slider/Thumb/Thumb.d.ts +1 -1
  868. package/lib/components/Slider/Track/Track.d.ts +1 -1
  869. package/lib/components/Splitter/GripIcon.d.ts +2 -2
  870. package/lib/components/Stepper/Stepper.context.d.ts +1 -0
  871. package/lib/components/Stepper/Stepper.d.ts +3 -1
  872. package/lib/components/Table/TableDataRenderer.d.ts +1 -1
  873. package/lib/components/Textarea/Autosize.d.ts +1 -1
  874. package/lib/components/Tooltip/TooltipGroup/TooltipGroup.d.ts +1 -1
  875. package/lib/components/Transition/Transition.d.ts +1 -1
  876. package/lib/components/Tree/FlatTreeNode.d.ts +1 -1
  877. package/lib/components/Tree/Tree.d.ts +1 -1
  878. package/lib/components/Tree/TreeNode.d.ts +1 -1
  879. package/lib/components/TreeSelect/TreeSelectOption.d.ts +1 -1
  880. package/lib/components/index.d.ts +1 -0
  881. package/lib/core/DirectionProvider/DirectionProvider.d.ts +1 -1
  882. package/lib/core/InlineStyles/InlineStyles.d.ts +1 -1
  883. package/lib/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.d.ts +1 -1
  884. package/lib/core/MantineProvider/MantineClasses/MantineClasses.d.ts +1 -1
  885. package/lib/core/MantineProvider/MantineCssVariables/MantineCssVariables.d.ts +1 -1
  886. package/lib/core/MantineProvider/MantineProvider.d.ts +5 -5
  887. package/lib/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.d.ts +1 -1
  888. package/lib/utils/Floating/FloatingArrow/FloatingArrow.d.ts +1 -1
  889. package/lib/utils/InlineInput/InlineInput.d.ts +1 -1
  890. package/lib/utils/InputsGroupFieldset/InputsGroupFieldset.d.ts +1 -1
  891. package/package.json +5 -5
  892. package/styles/Accordion.css +4 -2
  893. package/styles/Accordion.layer.css +4 -2
  894. package/styles/ActionBar.css +13 -0
  895. package/styles/ActionBar.layer.css +14 -0
  896. package/styles/Stepper.css +30 -0
  897. package/styles/Stepper.layer.css +30 -0
  898. package/styles/Typography.css +59 -0
  899. package/styles/Typography.layer.css +59 -0
  900. package/styles.css +148 -43
  901. package/styles.layer.css +148 -43
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingWindowResizeHandle.cjs","names":["factory","useProps","useFloatingWindowContext","Box"],"sources":["../../../src/components/FloatingWindow/FloatingWindowResizeHandle.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nimport { useEffect, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { Box, BoxProps, ElementProps, factory, Factory, useProps } from '../../core';\nimport { useFloatingWindowContext } from './FloatingWindow.context';\n\nexport interface FloatingWindowResizeHandleProps extends BoxProps, ElementProps<'div', 'role'> {}\n\nexport type FloatingWindowResizeHandleFactory = Factory<{\n props: FloatingWindowResizeHandleProps;\n ref: HTMLDivElement;\n}>;\n\nconst defaultProps = {} satisfies Partial<FloatingWindowResizeHandleProps>;\n\nconst KEYBOARD_STEP = 10;\n\nfunction clampDimension(\n value: number,\n min: number | undefined,\n max: number | undefined,\n viewportMax: number | undefined\n) {\n let v = value;\n if (min != null) {\n v = Math.max(v, min);\n }\n if (max != null) {\n v = Math.min(v, max);\n }\n if (viewportMax != null) {\n v = Math.min(v, viewportMax);\n }\n return v;\n}\n\nfunction getViewportLimits(\n rect: DOMRect,\n constrainToViewport: boolean | undefined,\n constrainOffset: number | undefined\n) {\n if (!constrainToViewport) {\n return { maxWidth: undefined, maxHeight: undefined };\n }\n const offset = constrainOffset ?? 0;\n return {\n maxWidth: window.innerWidth - rect.left - offset,\n maxHeight: window.innerHeight - rect.top - offset,\n };\n}\n\nexport const FloatingWindowResizeHandle = factory<FloatingWindowResizeHandleFactory>((_props) => {\n const props = useProps('FloatingWindowResizeHandle', defaultProps, _props);\n const { children, ref, style, ...others } = props;\n const ctx = useFloatingWindowContext();\n const handleRef = useRef<HTMLDivElement>(null);\n const ctxRef = useRef(ctx);\n ctxRef.current = ctx;\n const valueNowRef = useRef<number | null>(null);\n\n const hasWidth =\n ctx.dimensions?.initialWidth != null ||\n ctx.dimensions?.minWidth != null ||\n ctx.dimensions?.maxWidth != null;\n const hasHeight =\n ctx.dimensions?.initialHeight != null ||\n ctx.dimensions?.minHeight != null ||\n ctx.dimensions?.maxHeight != null;\n\n useEffect(() => {\n const handle = handleRef.current;\n if (!handle) {\n return;\n }\n\n const controller = new AbortController();\n const { signal } = controller;\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n\n const applySize = (width: number | null, height: number | null) => {\n if (width === null && height === null) {\n return;\n }\n\n const { dimensions, constrainToViewport, constrainOffset, onSizeChange } = ctxRef.current;\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const rect = root.getBoundingClientRect();\n const viewportLimits = getViewportLimits(rect, constrainToViewport, constrainOffset);\n\n if (width !== null) {\n const nextWidth = clampDimension(\n width,\n dimensions?.minWidth,\n dimensions?.maxWidth,\n viewportLimits.maxWidth\n );\n root.style.width = `${nextWidth}px`;\n }\n\n if (height !== null) {\n const nextHeight = clampDimension(\n height,\n dimensions?.minHeight,\n dimensions?.maxHeight,\n viewportLimits.maxHeight\n );\n root.style.height = `${nextHeight}px`;\n }\n\n const resizedRect = root.getBoundingClientRect();\n\n if (width !== null) {\n valueNowRef.current = resizedRect.width;\n handle.setAttribute('aria-valuenow', String(Math.round(resizedRect.width)));\n }\n\n onSizeChange?.({ width: resizedRect.width, height: resizedRect.height });\n };\n\n const onStart = (e: MouseEvent | TouchEvent) => {\n if ('button' in e && e.button !== 0) {\n return;\n }\n\n e.stopPropagation();\n e.preventDefault();\n\n if (!hasWidth && !hasHeight) {\n return;\n }\n\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const point = 'touches' in e ? e.touches[0] : e;\n startX = point.clientX;\n startY = point.clientY;\n const rect = root.getBoundingClientRect();\n startWidth = rect.width;\n startHeight = rect.height;\n isResizing = true;\n\n document.body.style.userSelect = 'none';\n document.body.style.webkitUserSelect = 'none';\n\n ctxRef.current.onResizeStart?.();\n\n document.addEventListener('mousemove', onMove, { signal });\n document.addEventListener('mouseup', onEnd, { signal });\n document.addEventListener('touchmove', onMove, { signal, passive: false });\n document.addEventListener('touchend', onEnd, { signal });\n document.addEventListener('touchcancel', onEnd, { signal });\n };\n\n const onMove = (e: MouseEvent | TouchEvent) => {\n if (!isResizing) {\n return;\n }\n\n e.preventDefault();\n const point = 'touches' in e ? e.touches[0] : e;\n const deltaX = point.clientX - startX;\n const deltaY = point.clientY - startY;\n applySize(hasWidth ? startWidth + deltaX : null, hasHeight ? startHeight + deltaY : null);\n };\n\n const onEnd = () => {\n if (!isResizing) {\n return;\n }\n\n isResizing = false;\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n ctxRef.current.onResizeEnd?.();\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const { dimensions } = ctxRef.current;\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const rect = root.getBoundingClientRect();\n let newWidth: number | null = null;\n let newHeight: number | null = null;\n\n if (e.key === 'ArrowRight' && hasWidth) {\n newWidth = rect.width + KEYBOARD_STEP;\n } else if (e.key === 'ArrowLeft' && hasWidth) {\n newWidth = rect.width - KEYBOARD_STEP;\n } else if (e.key === 'ArrowDown' && hasHeight) {\n newHeight = rect.height + KEYBOARD_STEP;\n } else if (e.key === 'ArrowUp' && hasHeight) {\n newHeight = rect.height - KEYBOARD_STEP;\n } else if (e.key === 'Home') {\n if (hasWidth) {\n newWidth = dimensions?.minWidth ?? rect.width;\n }\n if (hasHeight) {\n newHeight = dimensions?.minHeight ?? rect.height;\n }\n } else if (e.key === 'End') {\n if (hasWidth) {\n newWidth = dimensions?.maxWidth ?? rect.width;\n }\n if (hasHeight) {\n newHeight = dimensions?.maxHeight ?? rect.height;\n }\n }\n\n if (newWidth !== null || newHeight !== null) {\n e.preventDefault();\n applySize(newWidth, newHeight);\n }\n };\n\n handle.addEventListener('mousedown', onStart, { signal });\n handle.addEventListener('touchstart', onStart, { signal, passive: false });\n handle.addEventListener('keydown', onKeyDown, { signal });\n\n return () => {\n onEnd();\n controller.abort();\n };\n }, [hasWidth, hasHeight]);\n\n useEffect(() => {\n const handle = handleRef.current;\n if (!handle) {\n return;\n }\n\n if (!hasWidth) {\n valueNowRef.current = null;\n handle.removeAttribute('aria-valuenow');\n return;\n }\n\n if (valueNowRef.current !== null) {\n return;\n }\n\n const initialWidth = ctx.dimensions?.initialWidth;\n\n if (initialWidth == null) {\n handle.removeAttribute('aria-valuenow');\n return;\n }\n\n const width = clampDimension(\n initialWidth,\n ctx.dimensions?.minWidth,\n ctx.dimensions?.maxWidth,\n undefined\n );\n\n handle.setAttribute('aria-valuenow', String(Math.round(width)));\n }, [hasWidth, ctx.dimensions?.initialWidth, ctx.dimensions?.minWidth, ctx.dimensions?.maxWidth]);\n\n return (\n <Box\n ref={useMergedRef(ref, handleRef)}\n role=\"separator\"\n aria-label=\"Resize window\"\n aria-valuemin={ctx.dimensions?.minWidth}\n aria-valuemax={ctx.dimensions?.maxWidth}\n tabIndex={0}\n {...others}\n style={[{ touchAction: 'none' }, style]}\n >\n {children}\n </Box>\n );\n});\n\nFloatingWindowResizeHandle.displayName = '@mantine/core/FloatingWindowResizeHandle';\n"],"mappings":";;;;;;;;;AAaA,MAAM,eAAe,CAAC;AAEtB,MAAM,gBAAgB;AAEtB,SAAS,eACP,OACA,KACA,KACA,aACA;CACA,IAAI,IAAI;CACR,IAAI,OAAO,MACT,IAAI,KAAK,IAAI,GAAG,GAAG;CAErB,IAAI,OAAO,MACT,IAAI,KAAK,IAAI,GAAG,GAAG;CAErB,IAAI,eAAe,MACjB,IAAI,KAAK,IAAI,GAAG,WAAW;CAE7B,OA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AAQ,SAAS;EAAM,CAAC;EACzE,OAAO,iBAAiB,WAAW,WAAW,EAAE,OAAO,CAAC;EAExD,aAAa;GACX,MAAM;GACN,WAAW,MAAM;EACnB;CACF,GAAG,CAAC,UAAU,SAAS,CAAC;CAExB,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,MAAM,SAAS,UAAU;EACzB,IAAI,CAAC,QACH;EAGF,IAAI,CAAC,UAAU;GACb,YAAY,UAAU;GACtB,OAAO,gBAAgB,eAAe;GACtC;EACF;EAEA,IAAI,YAAY,YAAY,MAC1B;EAGF,MAAM,eAAe,IAAI,YAAY;EAErC,IAAI,gBAAgB,MAAM;GACxB,OAAO,gBAAgB,eAAe;GACtC;EACF;EAEA,MAAM,QAAQ,eACZ,cACA,IAAI,YAAY,UAChB,IAAI,YAAY,UAChB,KAAA,CACF;EAEA,OAAO,aAAa,iBAAiB,OAAO,KAAK,MAAM,KAAK,CAAC,CAAC;CAChE,GAAG;EAAC;EAAU,IAAI,YAAY;EAAc,IAAI,YAAY;EAAU,IAAI,YAAY;CAAQ,CAAC;CAE/F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,MAAA,GAAA,eAAA,aAAA,CAAkB,KAAK,SAAS;EAChC,MAAK;EACL,cAAW;EACX,iBAAe,IAAI,YAAY;EAC/B,iBAAe,IAAI,YAAY;EAC/B,UAAU;EACV,GAAI;EACJ,OAAO,CAAC,EAAE,aAAa,OAAO,GAAG,KAAK;EAErC;CACE,CAAA;AAET,CAAC;AAED,2BAA2B,cAAc"}
1
+ {"version":3,"file":"FloatingWindowResizeHandle.cjs","names":["factory","useProps","useFloatingWindowContext","useRef","Box","useMergedRef"],"sources":["../../../src/components/FloatingWindow/FloatingWindowResizeHandle.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nimport { useEffect, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { Box, BoxProps, ElementProps, factory, Factory, useProps } from '../../core';\nimport { useFloatingWindowContext } from './FloatingWindow.context';\n\nexport interface FloatingWindowResizeHandleProps extends BoxProps, ElementProps<'div', 'role'> {}\n\nexport type FloatingWindowResizeHandleFactory = Factory<{\n props: FloatingWindowResizeHandleProps;\n ref: HTMLDivElement;\n}>;\n\nconst defaultProps = {} satisfies Partial<FloatingWindowResizeHandleProps>;\n\nconst KEYBOARD_STEP = 10;\n\nfunction clampDimension(\n value: number,\n min: number | undefined,\n max: number | undefined,\n viewportMax: number | undefined\n) {\n let v = value;\n if (min != null) {\n v = Math.max(v, min);\n }\n if (max != null) {\n v = Math.min(v, max);\n }\n if (viewportMax != null) {\n v = Math.min(v, viewportMax);\n }\n return v;\n}\n\nfunction getViewportLimits(\n rect: DOMRect,\n constrainToViewport: boolean | undefined,\n constrainOffset: number | undefined\n) {\n if (!constrainToViewport) {\n return { maxWidth: undefined, maxHeight: undefined };\n }\n const offset = constrainOffset ?? 0;\n return {\n maxWidth: window.innerWidth - rect.left - offset,\n maxHeight: window.innerHeight - rect.top - offset,\n };\n}\n\nexport const FloatingWindowResizeHandle = factory<FloatingWindowResizeHandleFactory>((_props) => {\n const props = useProps('FloatingWindowResizeHandle', defaultProps, _props);\n const { children, ref, style, ...others } = props;\n const ctx = useFloatingWindowContext();\n const handleRef = useRef<HTMLDivElement>(null);\n const ctxRef = useRef(ctx);\n ctxRef.current = ctx;\n const valueNowRef = useRef<number | null>(null);\n\n const hasWidth =\n ctx.dimensions?.initialWidth != null ||\n ctx.dimensions?.minWidth != null ||\n ctx.dimensions?.maxWidth != null;\n const hasHeight =\n ctx.dimensions?.initialHeight != null ||\n ctx.dimensions?.minHeight != null ||\n ctx.dimensions?.maxHeight != null;\n\n useEffect(() => {\n const handle = handleRef.current;\n if (!handle) {\n return;\n }\n\n const controller = new AbortController();\n const { signal } = controller;\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n\n const applySize = (width: number | null, height: number | null) => {\n if (width === null && height === null) {\n return;\n }\n\n const { dimensions, constrainToViewport, constrainOffset, onSizeChange } = ctxRef.current;\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const rect = root.getBoundingClientRect();\n const viewportLimits = getViewportLimits(rect, constrainToViewport, constrainOffset);\n\n if (width !== null) {\n const nextWidth = clampDimension(\n width,\n dimensions?.minWidth,\n dimensions?.maxWidth,\n viewportLimits.maxWidth\n );\n root.style.width = `${nextWidth}px`;\n }\n\n if (height !== null) {\n const nextHeight = clampDimension(\n height,\n dimensions?.minHeight,\n dimensions?.maxHeight,\n viewportLimits.maxHeight\n );\n root.style.height = `${nextHeight}px`;\n }\n\n const resizedRect = root.getBoundingClientRect();\n\n if (width !== null) {\n valueNowRef.current = resizedRect.width;\n handle.setAttribute('aria-valuenow', String(Math.round(resizedRect.width)));\n }\n\n onSizeChange?.({ width: resizedRect.width, height: resizedRect.height });\n };\n\n const onStart = (e: MouseEvent | TouchEvent) => {\n if ('button' in e && e.button !== 0) {\n return;\n }\n\n e.stopPropagation();\n e.preventDefault();\n\n if (!hasWidth && !hasHeight) {\n return;\n }\n\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const point = 'touches' in e ? e.touches[0] : e;\n startX = point.clientX;\n startY = point.clientY;\n const rect = root.getBoundingClientRect();\n startWidth = rect.width;\n startHeight = rect.height;\n isResizing = true;\n\n document.body.style.userSelect = 'none';\n document.body.style.webkitUserSelect = 'none';\n\n ctxRef.current.onResizeStart?.();\n\n document.addEventListener('mousemove', onMove, { signal });\n document.addEventListener('mouseup', onEnd, { signal });\n document.addEventListener('touchmove', onMove, { signal, passive: false });\n document.addEventListener('touchend', onEnd, { signal });\n document.addEventListener('touchcancel', onEnd, { signal });\n };\n\n const onMove = (e: MouseEvent | TouchEvent) => {\n if (!isResizing) {\n return;\n }\n\n e.preventDefault();\n const point = 'touches' in e ? e.touches[0] : e;\n const deltaX = point.clientX - startX;\n const deltaY = point.clientY - startY;\n applySize(hasWidth ? startWidth + deltaX : null, hasHeight ? startHeight + deltaY : null);\n };\n\n const onEnd = () => {\n if (!isResizing) {\n return;\n }\n\n isResizing = false;\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n ctxRef.current.onResizeEnd?.();\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const { dimensions } = ctxRef.current;\n const root = ctxRef.current.rootRef.current;\n if (!root) {\n return;\n }\n\n const rect = root.getBoundingClientRect();\n let newWidth: number | null = null;\n let newHeight: number | null = null;\n\n if (e.key === 'ArrowRight' && hasWidth) {\n newWidth = rect.width + KEYBOARD_STEP;\n } else if (e.key === 'ArrowLeft' && hasWidth) {\n newWidth = rect.width - KEYBOARD_STEP;\n } else if (e.key === 'ArrowDown' && hasHeight) {\n newHeight = rect.height + KEYBOARD_STEP;\n } else if (e.key === 'ArrowUp' && hasHeight) {\n newHeight = rect.height - KEYBOARD_STEP;\n } else if (e.key === 'Home') {\n if (hasWidth) {\n newWidth = dimensions?.minWidth ?? rect.width;\n }\n if (hasHeight) {\n newHeight = dimensions?.minHeight ?? rect.height;\n }\n } else if (e.key === 'End') {\n if (hasWidth) {\n newWidth = dimensions?.maxWidth ?? rect.width;\n }\n if (hasHeight) {\n newHeight = dimensions?.maxHeight ?? rect.height;\n }\n }\n\n if (newWidth !== null || newHeight !== null) {\n e.preventDefault();\n applySize(newWidth, newHeight);\n }\n };\n\n handle.addEventListener('mousedown', onStart, { signal });\n handle.addEventListener('touchstart', onStart, { signal, passive: false });\n handle.addEventListener('keydown', onKeyDown, { signal });\n\n return () => {\n onEnd();\n controller.abort();\n };\n }, [hasWidth, hasHeight]);\n\n useEffect(() => {\n const handle = handleRef.current;\n if (!handle) {\n return;\n }\n\n if (!hasWidth) {\n valueNowRef.current = null;\n handle.removeAttribute('aria-valuenow');\n return;\n }\n\n if (valueNowRef.current !== null) {\n return;\n }\n\n const initialWidth = ctx.dimensions?.initialWidth;\n\n if (initialWidth == null) {\n handle.removeAttribute('aria-valuenow');\n return;\n }\n\n const width = clampDimension(\n initialWidth,\n ctx.dimensions?.minWidth,\n ctx.dimensions?.maxWidth,\n undefined\n );\n\n handle.setAttribute('aria-valuenow', String(Math.round(width)));\n }, [hasWidth, ctx.dimensions?.initialWidth, ctx.dimensions?.minWidth, ctx.dimensions?.maxWidth]);\n\n return (\n <Box\n ref={useMergedRef(ref, handleRef)}\n role=\"separator\"\n aria-label=\"Resize window\"\n aria-valuemin={ctx.dimensions?.minWidth}\n aria-valuemax={ctx.dimensions?.maxWidth}\n tabIndex={0}\n {...others}\n style={[{ touchAction: 'none' }, style]}\n >\n {children}\n </Box>\n );\n});\n\nFloatingWindowResizeHandle.displayName = '@mantine/core/FloatingWindowResizeHandle';\n"],"mappings":";;;;;;;;;AAaA,MAAM,eAAe,CAAC;AAEtB,MAAM,gBAAgB;AAEtB,SAAS,eACP,OACA,KACA,KACA,aACA;CACA,IAAI,IAAI;CACR,IAAI,OAAO,MACT,IAAI,KAAK,IAAI,GAAG,GAAG;CAErB,IAAI,OAAO,MACT,IAAI,KAAK,IAAI,GAAG,GAAG;CAErB,IAAI,eAAe,MACjB,IAAI,KAAK,IAAI,GAAG,WAAW;CAE7B,OAAO;AACT;AAEA,SAAS,kBACP,MACA,qBACA,iBACA;CACA,IAAI,CAAC,qBACH,OAAO;EAAE,UAAU,KAAA;EAAW,WAAW,KAAA;CAAU;CAErD,MAAM,SAAS,mBAAmB;CAClC,OAAO;EACL,UAAU,OAAO,aAAa,KAAK,OAAO;EAC1C,WAAW,OAAO,cAAc,KAAK,MAAM;CAC7C;AACF;AAEA,MAAa,6BAA6BA,gBAAAA,SAA4C,WAAW;CAE/F,MAAM,EAAE,UAAU,KAAK,OAAO,GAAG,WADnBC,kBAAAA,SAAS,8BAA8B,cAAc,MACnB;CAChD,MAAM,MAAMC,+BAAAA,yBAAyB;CACrC,MAAM,aAAA,GAAYC,MAAAA,OAAAA,CAAuB,IAAI;CAC7C,MAAM,UAAA,GAASA,MAAAA,OAAAA,CAAO,GAAG;C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Y,UAChB,KAAA,CACF;EAEA,OAAO,aAAa,iBAAiB,OAAO,KAAK,MAAM,KAAK,CAAC,CAAC;CAChE,GAAG;EAAC;EAAU,IAAI,YAAY;EAAc,IAAI,YAAY;EAAU,IAAI,YAAY;CAAQ,CAAC;CAE/F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,MAAA,GAAKC,eAAAA,aAAAA,CAAa,KAAK,SAAS;EAChC,MAAK;EACL,cAAW;EACX,iBAAe,IAAI,YAAY;EAC/B,iBAAe,IAAI,YAAY;EAC/B,UAAU;EACV,GAAI;EACJ,OAAO,CAAC,EAAE,aAAa,OAAO,GAAG,KAAK;EAErC;CACE,CAAA;AAET,CAAC;AAED,2BAA2B,cAAc"}
@@ -6,7 +6,8 @@ let _mantine_hooks = require("@mantine/hooks");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  //#region packages/@mantine/core/src/components/FocusTrap/FocusTrap.tsx
8
8
  function FocusTrap({ children, active = true, refProp = "ref", innerRef }) {
9
- const ref = (0, _mantine_hooks.useMergedRef)((0, _mantine_hooks.useFocusTrap)(active), innerRef);
9
+ const focusTrapRef = (0, _mantine_hooks.useFocusTrap)(active);
10
+ const ref = (0, _mantine_hooks.useMergedRef)(focusTrapRef, innerRef);
10
11
  const child = require_get_single_element_child.getSingleElementChild(children);
11
12
  if (!child) return children;
12
13
  return (0, react.cloneElement)(child, { [refProp]: ref });
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrap.cjs","names":["getSingleElementChild","VisuallyHidden"],"sources":["../../../src/components/FocusTrap/FocusTrap.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useFocusTrap, useMergedRef } from '@mantine/hooks';\nimport { getSingleElementChild } from '../../core';\nimport { VisuallyHidden } from '../VisuallyHidden';\n\nexport interface FocusTrapProps {\n /** Element to trap focus at, must support ref prop */\n children: any;\n\n /** If set to `false`, disables focus trap */\n active?: boolean;\n\n /** Prop that is used to access element ref @default 'ref' */\n refProp?: string;\n\n /** Ref to combine with the focus trap ref */\n innerRef?: React.Ref<any>;\n}\n\nexport function FocusTrap({\n children,\n active = true,\n refProp = 'ref',\n innerRef,\n}: FocusTrapProps): React.ReactElement {\n const focusTrapRef = useFocusTrap(active);\n const ref = useMergedRef(focusTrapRef, innerRef);\n\n const child = getSingleElementChild(children);\n if (!child) {\n return children;\n }\n\n return cloneElement(child, { [refProp]: ref });\n}\n\nexport function FocusTrapInitialFocus(props: React.ComponentProps<'span'>) {\n return <VisuallyHidden tabIndex={-1} data-autofocus {...props} />;\n}\n\nFocusTrap.displayName = '@mantine/core/FocusTrap';\nFocusTrapInitialFocus.displayName = '@mantine/core/FocusTrapInitialFocus';\nFocusTrap.InitialFocus = FocusTrapInitialFocus;\n\nexport namespace FocusTrap {\n export type Props = FocusTrapProps;\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,UAAU,EACxB,UACA,SAAS,MACT,UAAU,OACV,YACqC;CAErC,MAAM,OAAA,GAAA,eAAA,aAAA,EAAA,GAAA,eAAA,aAAA,CAD4B,MACE,GAAG,QAAQ;CAE/C,MAAM,QAAQA,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,OAAO;CAGT,QAAA,GAAA,MAAA,aAAA,CAAoB,OAAO,GAAG,UAAU,IAAI,CAAC;AAC/C;AAEA,SAAgB,sBAAsB,OAAqC;CACzE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EAAgB,UAAU;EAAI,kBAAA;EAAe,GAAI;CAAQ,CAAA;AAClE;AAEA,UAAU,cAAc;AACxB,sBAAsB,cAAc;AACpC,UAAU,eAAe"}
1
+ {"version":3,"file":"FocusTrap.cjs","names":["useFocusTrap","useMergedRef","getSingleElementChild","cloneElement","VisuallyHidden"],"sources":["../../../src/components/FocusTrap/FocusTrap.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useFocusTrap, useMergedRef } from '@mantine/hooks';\nimport { getSingleElementChild } from '../../core';\nimport { VisuallyHidden } from '../VisuallyHidden';\n\nexport interface FocusTrapProps {\n /** Element to trap focus at, must support ref prop */\n children: any;\n\n /** If set to `false`, disables focus trap */\n active?: boolean;\n\n /** Prop that is used to access element ref @default 'ref' */\n refProp?: string;\n\n /** Ref to combine with the focus trap ref */\n innerRef?: React.Ref<any>;\n}\n\nexport function FocusTrap({\n children,\n active = true,\n refProp = 'ref',\n innerRef,\n}: FocusTrapProps): React.ReactElement {\n const focusTrapRef = useFocusTrap(active);\n const ref = useMergedRef(focusTrapRef, innerRef);\n\n const child = getSingleElementChild(children);\n if (!child) {\n return children;\n }\n\n return cloneElement(child, { [refProp]: ref });\n}\n\nexport function FocusTrapInitialFocus(props: React.ComponentProps<'span'>) {\n return <VisuallyHidden tabIndex={-1} data-autofocus {...props} />;\n}\n\nFocusTrap.displayName = '@mantine/core/FocusTrap';\nFocusTrapInitialFocus.displayName = '@mantine/core/FocusTrapInitialFocus';\nFocusTrap.InitialFocus = FocusTrapInitialFocus;\n\nexport namespace FocusTrap {\n export type Props = FocusTrapProps;\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,UAAU,EACxB,UACA,SAAS,MACT,UAAU,OACV,YACqC;CACrC,MAAM,gBAAA,GAAeA,eAAAA,aAAAA,CAAa,MAAM;CACxC,MAAM,OAAA,GAAMC,eAAAA,aAAAA,CAAa,cAAc,QAAQ;CAE/C,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,OAAO;CAGT,QAAA,GAAOC,MAAAA,aAAAA,CAAa,OAAO,GAAG,UAAU,IAAI,CAAC;AAC/C;AAEA,SAAgB,sBAAsB,OAAqC;CACzE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EAAgB,UAAU;EAAI,kBAAA;EAAe,GAAI;CAAQ,CAAA;AAClE;AAEA,UAAU,cAAc;AACxB,sBAAsB,cAAc;AACpC,UAAU,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.cjs","names":["createVarsResolver","factory","useProps","useStyles","useRandomClassName","GridProvider","GridVariables","Box","classes","GridCol"],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineSpacing,\n StyleProp,\n StylesApiProps,\n useProps,\n useRandomClassName,\n useStyles,\n} from '../../core';\nimport { GridBreakpoints, GridProvider, type GridContextValue } from './Grid.context';\nimport { GridCol, type GridColProps } from './GridCol/GridCol';\nimport { GridVariables } from './GridVariables';\nimport classes from './Grid.module.css';\nexport type GridStylesNames = 'root' | 'col' | 'inner' | 'container';\nexport type GridCssVariables = {\n root: '--grid-justify' | '--grid-align' | '--grid-overflow';\n};\n\nexport interface GridProps extends BoxProps, StylesApiProps<GridFactory>, ElementProps<'div'> {\n /** Gap between columns and rows, key of `theme.spacing` or any valid CSS value @default 'md' */\n gap?: StyleProp<MantineSpacing>;\n\n /** Row gap, overrides `gap` for vertical spacing */\n rowGap?: StyleProp<MantineSpacing>;\n\n /** Column gap, overrides `gap` for horizontal spacing */\n columnGap?: StyleProp<MantineSpacing>;\n\n /** If set, columns in the last row expand to fill all available space @default false */\n grow?: boolean;\n\n /** Sets `justify-content` @default flex-start */\n justify?: React.CSSProperties['justifyContent'];\n\n /** Sets `align-items` @default stretch */\n align?: React.CSSProperties['alignItems'];\n\n /** Number of columns in each row @default 12 */\n columns?: number;\n\n /** Sets `overflow` CSS property on the root element @default 'visible' */\n overflow?: React.CSSProperties['overflow'];\n\n /** Type of queries used for responsive styles @default 'media' */\n type?: 'media' | 'container';\n\n /** Breakpoints values, only used with `type=\"container\"` */\n breakpoints?: GridBreakpoints;\n}\n\nexport type GridFactory = Factory<{\n props: GridProps;\n ref: HTMLDivElement;\n stylesNames: GridStylesNames;\n vars: GridCssVariables;\n staticComponents: {\n Col: typeof GridCol;\n };\n}>;\n\nconst defaultProps = {\n gap: 'md',\n columns: 12,\n} satisfies Partial<GridProps>;\n\nconst varsResolver = createVarsResolver<GridFactory>((_, { justify, align, overflow }) => ({\n root: {\n '--grid-justify': justify,\n '--grid-align': align,\n '--grid-overflow': overflow,\n },\n}));\n\nexport const Grid = factory<GridFactory>((_props) => {\n const props = useProps('Grid', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n grow,\n gap,\n rowGap,\n columnGap,\n columns,\n align,\n justify,\n children,\n breakpoints,\n type,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const responsiveClassName = useRandomClassName();\n\n if (type === 'container' && breakpoints) {\n return (\n <GridProvider value={{ getStyles, grow, columns, breakpoints, type }}>\n <GridVariables selector={`.${responsiveClassName}`} {...props} />\n <div {...getStyles('container')}>\n <Box {...getStyles('root', { className: responsiveClassName })} {...others}>\n <div {...getStyles('inner')}>{children}</div>\n </Box>\n </div>\n </GridProvider>\n );\n }\n\n return (\n <GridProvider value={{ getStyles, grow, columns, breakpoints, type }}>\n <GridVariables selector={`.${responsiveClassName}`} {...props} />\n <Box {...getStyles('root', { className: responsiveClassName })} {...others}>\n <div {...getStyles('inner')}>{children}</div>\n </Box>\n </GridProvider>\n );\n});\n\nGrid.classes = classes;\nGrid.varsResolver = varsResolver;\nGrid.displayName = '@mantine/core/Grid';\nGrid.Col = GridCol;\n\nexport namespace Grid {\n export type Props = GridProps;\n export type Factory = GridFactory;\n export type StylesNames = GridStylesNames;\n export type CssVariables = GridCssVariables;\n export type ColProps = GridColProps;\n export type ContextValue = GridContextValue;\n\n export namespace Col {\n export type Props = GridColProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAiEA,MAAM,eAAe;CACnB,KAAK;CACL,SAAS;AACX;AAEA,MAAM,eAAeA,6BAAAA,oBAAiC,GAAG,EAAE,SAAS,OAAO,gBAAgB,EACzF,MAAM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I,UAAU,QAAQ,EAAE,WAAW,oBAAoB,CAAC;GAAG,GAAI;aAClE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,GAAI,UAAU,OAAO;IAAI;GAAc,CAAA;EACzC,CAAA,CACO;;AAElB,CAAC;AAED,KAAK,UAAUC,oBAAAA;AACf,KAAK,eAAe;AACpB,KAAK,cAAc;AACnB,KAAK,MAAMC,gBAAAA"}
1
+ {"version":3,"file":"Grid.cjs","names":["createVarsResolver","factory","useProps","useStyles","useRandomClassName","GridProvider","GridVariables","Box","classes","GridCol"],"sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineSpacing,\n StyleProp,\n StylesApiProps,\n useProps,\n useRandomClassName,\n useStyles,\n} from '../../core';\nimport { GridBreakpoints, GridProvider, type GridContextValue } from './Grid.context';\nimport { GridCol, type GridColProps } from './GridCol/GridCol';\nimport { GridVariables } from './GridVariables';\nimport classes from './Grid.module.css';\nexport type GridStylesNames = 'root' | 'col' | 'inner' | 'container';\nexport type GridCssVariables = {\n root: '--grid-justify' | '--grid-align' | '--grid-overflow';\n};\n\nexport interface GridProps extends BoxProps, StylesApiProps<GridFactory>, ElementProps<'div'> {\n /** Gap between columns and rows, key of `theme.spacing` or any valid CSS value @default 'md' */\n gap?: StyleProp<MantineSpacing>;\n\n /** Row gap, overrides `gap` for vertical spacing */\n rowGap?: StyleProp<MantineSpacing>;\n\n /** Column gap, overrides `gap` for horizontal spacing */\n columnGap?: StyleProp<MantineSpacing>;\n\n /** If set, columns in the last row expand to fill all available space @default false */\n grow?: boolean;\n\n /** Sets `justify-content` @default flex-start */\n justify?: React.CSSProperties['justifyContent'];\n\n /** Sets `align-items` @default stretch */\n align?: React.CSSProperties['alignItems'];\n\n /** Number of columns in each row @default 12 */\n columns?: number;\n\n /** Sets `overflow` CSS property on the root element @default 'visible' */\n overflow?: React.CSSProperties['overflow'];\n\n /** Type of queries used for responsive styles @default 'media' */\n type?: 'media' | 'container';\n\n /** Breakpoints values, only used with `type=\"container\"` */\n breakpoints?: GridBreakpoints;\n}\n\nexport type GridFactory = Factory<{\n props: GridProps;\n ref: HTMLDivElement;\n stylesNames: GridStylesNames;\n vars: GridCssVariables;\n staticComponents: {\n Col: typeof GridCol;\n };\n}>;\n\nconst defaultProps = {\n gap: 'md',\n columns: 12,\n} satisfies Partial<GridProps>;\n\nconst varsResolver = createVarsResolver<GridFactory>((_, { justify, align, overflow }) => ({\n root: {\n '--grid-justify': justify,\n '--grid-align': align,\n '--grid-overflow': overflow,\n },\n}));\n\nexport const Grid = factory<GridFactory>((_props) => {\n const props = useProps('Grid', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n grow,\n gap,\n rowGap,\n columnGap,\n columns,\n align,\n justify,\n children,\n breakpoints,\n type,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<GridFactory>({\n name: 'Grid',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const responsiveClassName = useRandomClassName();\n\n if (type === 'container' && breakpoints) {\n return (\n <GridProvider value={{ getStyles, grow, columns, breakpoints, type }}>\n <GridVariables selector={`.${responsiveClassName}`} {...props} />\n <div {...getStyles('container')}>\n <Box {...getStyles('root', { className: responsiveClassName })} {...others}>\n <div {...getStyles('inner')}>{children}</div>\n </Box>\n </div>\n </GridProvider>\n );\n }\n\n return (\n <GridProvider value={{ getStyles, grow, columns, breakpoints, type }}>\n <GridVariables selector={`.${responsiveClassName}`} {...props} />\n <Box {...getStyles('root', { className: responsiveClassName })} {...others}>\n <div {...getStyles('inner')}>{children}</div>\n </Box>\n </GridProvider>\n );\n});\n\nGrid.classes = classes;\nGrid.varsResolver = varsResolver;\nGrid.displayName = '@mantine/core/Grid';\nGrid.Col = GridCol;\n\nexport namespace Grid {\n export type Props = GridProps;\n export type Factory = GridFactory;\n export type StylesNames = GridStylesNames;\n export type CssVariables = GridCssVariables;\n export type ColProps = GridColProps;\n export type ContextValue = GridContextValue;\n\n export namespace Col {\n export type Props = GridColProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAiEA,MAAM,eAAe;CACnB,KAAK;CACL,SAAS;AACX;AAEA,MAAM,eAAeA,6BAAAA,oBAAiC,GAAG,EAAE,SAAS,OAAO,gBAAgB,EACzF,MAAM;CACJ,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;AACrB,EACF,EAAE;AAEF,MAAa,OAAOC,gBAAAA,SAAsB,WAAW;CACnD,MAAM,QAAQC,kBAAAA,SAAS,QAAQ,cAAc,MAAM;CACnD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,KACA,QACA,WACA,SACA,OACA,SACA,UACA,aACA,MACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAAuB;EACvC,MAAM;EACN,SAAA,oBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,sBAAsBC,6BAAAA,mBAAmB;CAE/C,IAAI,SAAS,eAAe,aAC1B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,qBAAAA,cAAD;EAAc,OAAO;GAAE;GAAW;GAAM;GAAS;GAAa;EAAK;EAAnE,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;GAAe,UAAU,IAAI;GAAuB,GAAI;EAAQ,CAAA,GAChE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,GAAI,UAAU,WAAW;GAC5B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;IAAK,GAAI,UAAU,QAAQ,EAAE,WAAW,oBAAoB,CAAC;IAAG,GAAI;IAClE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,GAAI,UAAU,OAAO;KAAI;IAAc,CAAA;GACzC,CAAA;EACF,CAAA,CACO;;CAIlB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACF,qBAAAA,cAAD;EAAc,OAAO;GAAE;GAAW;GAAM;GAAS;GAAa;EAAK;EAAnE,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;GAAe,UAAU,IAAI;GAAuB,GAAI;EAAQ,CAAA,GAChE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;GAAK,GAAI,UAAU,QAAQ,EAAE,WAAW,oBAAoB,CAAC;GAAG,GAAI;GAClE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,GAAI,UAAU,OAAO;IAAI;GAAc,CAAA;EACzC,CAAA,CACO;;AAElB,CAAC;AAED,KAAK,UAAUC,oBAAAA;AACf,KAAK,eAAe;AACpB,KAAK,cAAc;AACnB,KAAK,MAAMC,gBAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"GridCol.cjs","names":["factory","useProps","useGridContext","useRandomClassName","GridColVariables","Box","classes"],"sources":["../../../../src/components/Grid/GridCol/GridCol.tsx"],"sourcesContent":["import cx from 'clsx';\nimport {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n StyleProp,\n useProps,\n useRandomClassName,\n} from '../../../core';\nimport { useGridContext } from '../Grid.context';\nimport { GridColVariables } from './GridColVariables';\nimport classes from '../Grid.module.css';\n\nexport type GridColStylesNames = 'col';\nexport type ColSpan = number | 'auto' | 'content';\n\nexport interface GridColProps\n extends BoxProps, CompoundStylesApiProps<GridColFactory>, ElementProps<'div'> {\n /** Column span @default 12 */\n span?: StyleProp<ColSpan>;\n\n /** Column order, use to reorder columns at different viewport sizes */\n order?: StyleProp<number>;\n\n /** Column start offset – number of empty columns before this column */\n offset?: StyleProp<number>;\n\n /** Vertical alignment of the column, controls `align-self` CSS property */\n align?: StyleProp<React.CSSProperties['alignSelf']>;\n}\n\nexport type GridColFactory = Factory<{\n props: GridColProps;\n ref: HTMLDivElement;\n stylesNames: GridColStylesNames;\n compound: true;\n}>;\n\nconst defaultProps = {\n span: 12,\n} satisfies Partial<GridColProps>;\n\nexport const GridCol = factory<GridColFactory>((_props) => {\n const props = useProps('GridCol', defaultProps, _props);\n const { classNames, className, style, styles, vars, span, order, offset, align, ...others } =\n props;\n const ctx = useGridContext();\n const responsiveClassName = useRandomClassName();\n return (\n <>\n <GridColVariables\n selector={`.${responsiveClassName}`}\n span={span}\n order={order}\n offset={offset}\n align={align}\n />\n\n <Box\n {...ctx.getStyles('col', {\n className: cx(className, responsiveClassName),\n style,\n classNames,\n styles,\n })}\n {...others}\n />\n </>\n );\n});\n\nGridCol.classes = classes;\nGridCol.displayName = '@mantine/core/GridCol';\n"],"mappings":";;;;;;;;;;;;;AAyCA,MAAM,eAAe,EACnB,MAAM,GACR;AAEA,MAAa,UAAUA,gBAAAA,SAAyB,WAAW;CAEzD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,MAAM,OAAO,QAAQ,OAAO,GAAG,WADrEC,kBAAAA,SAAS,WAAW,cAAc,MAE1C;CACN,MAAM,MAAMC,qBAAAA,eAAe;CAC3B,MAAM,sBAAsBC,6BAAAA,mBAAmB;CAC/C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,UAAU,IAAI;EACR;EACC;EACC;EACD;CACR,CAAA,GAED,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,GAAI,IAAI,UAAU,OAAO;GACvB,YAAA,GAAA,KAAA,QAAA,CAAc,WAAW,mBAAmB;GAC5C;GACA;GACA;EACF,CAAC;EACD,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,QAAQ,UAAUC,oBAAAA;AAClB,QAAQ,cAAc"}
1
+ {"version":3,"file":"GridCol.cjs","names":["factory","useProps","useGridContext","useRandomClassName","GridColVariables","Box","cx","classes"],"sources":["../../../../src/components/Grid/GridCol/GridCol.tsx"],"sourcesContent":["import cx from 'clsx';\nimport {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n StyleProp,\n useProps,\n useRandomClassName,\n} from '../../../core';\nimport { useGridContext } from '../Grid.context';\nimport { GridColVariables } from './GridColVariables';\nimport classes from '../Grid.module.css';\n\nexport type GridColStylesNames = 'col';\nexport type ColSpan = number | 'auto' | 'content';\n\nexport interface GridColProps\n extends BoxProps, CompoundStylesApiProps<GridColFactory>, ElementProps<'div'> {\n /** Column span @default 12 */\n span?: StyleProp<ColSpan>;\n\n /** Column order, use to reorder columns at different viewport sizes */\n order?: StyleProp<number>;\n\n /** Column start offset – number of empty columns before this column */\n offset?: StyleProp<number>;\n\n /** Vertical alignment of the column, controls `align-self` CSS property */\n align?: StyleProp<React.CSSProperties['alignSelf']>;\n}\n\nexport type GridColFactory = Factory<{\n props: GridColProps;\n ref: HTMLDivElement;\n stylesNames: GridColStylesNames;\n compound: true;\n}>;\n\nconst defaultProps = {\n span: 12,\n} satisfies Partial<GridColProps>;\n\nexport const GridCol = factory<GridColFactory>((_props) => {\n const props = useProps('GridCol', defaultProps, _props);\n const { classNames, className, style, styles, vars, span, order, offset, align, ...others } =\n props;\n const ctx = useGridContext();\n const responsiveClassName = useRandomClassName();\n return (\n <>\n <GridColVariables\n selector={`.${responsiveClassName}`}\n span={span}\n order={order}\n offset={offset}\n align={align}\n />\n\n <Box\n {...ctx.getStyles('col', {\n className: cx(className, responsiveClassName),\n style,\n classNames,\n styles,\n })}\n {...others}\n />\n </>\n );\n});\n\nGridCol.classes = classes;\nGridCol.displayName = '@mantine/core/GridCol';\n"],"mappings":";;;;;;;;;;;;;AAyCA,MAAM,eAAe,EACnB,MAAM,GACR;AAEA,MAAa,UAAUA,gBAAAA,SAAyB,WAAW;CAEzD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,MAAM,OAAO,QAAQ,OAAO,GAAG,WADrEC,kBAAAA,SAAS,WAAW,cAAc,MAE1C;CACN,MAAM,MAAMC,qBAAAA,eAAe;CAC3B,MAAM,sBAAsBC,6BAAAA,mBAAmB;CAC/C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,UAAU,IAAI;EACR;EACC;EACC;EACD;CACR,CAAA,GAED,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,GAAI,IAAI,UAAU,OAAO;GACvB,YAAA,GAAWC,KAAAA,QAAAA,CAAG,WAAW,mBAAmB;GAC5C;GACA;GACA;EACF,CAAC;EACD,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,QAAQ,UAAUC,oBAAAA;AAClB,QAAQ,cAAc"}
@@ -29,21 +29,23 @@ const Group = require_factory.factory((_props) => {
29
29
  const filteredChildren = require_filter_falsy_children.filterFalsyChildren(children);
30
30
  const childrenCount = filteredChildren.length;
31
31
  const resolvedGap = require_get_size.getSpacing(gap ?? "md");
32
+ const stylesCtx = { childWidth: `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))` };
33
+ const getStyles = require_use_styles.useStyles({
34
+ name: "Group",
35
+ props,
36
+ stylesCtx,
37
+ className,
38
+ style,
39
+ classes: require_Group_module.default,
40
+ classNames,
41
+ styles,
42
+ unstyled,
43
+ attributes,
44
+ vars,
45
+ varsResolver
46
+ });
32
47
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
33
- ...require_use_styles.useStyles({
34
- name: "Group",
35
- props,
36
- stylesCtx: { childWidth: `calc(${100 / childrenCount}% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))` },
37
- className,
38
- style,
39
- classes: require_Group_module.default,
40
- classNames,
41
- styles,
42
- unstyled,
43
- attributes,
44
- vars,
45
- varsResolver
46
- })("root"),
48
+ ...getStyles("root"),
47
49
  variant,
48
50
  mod: [{ grow }, mod],
49
51
  size: __size,
@@ -1 +1 @@
1
- {"version":3,"file":"Group.cjs","names":["createVarsResolver","getSpacing","factory","useProps","filterFalsyChildren","Box","useStyles","classes"],"sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children';\nimport classes from './Group.module.css';\n\nexport type GroupStylesNames = 'root';\nexport type GroupCssVariables = {\n root:\n | '--group-gap'\n | '--group-align'\n | '--group-justify'\n | '--group-wrap'\n | '--group-child-width';\n};\n\nexport interface GroupStylesCtx {\n childWidth: string;\n}\n\nexport interface GroupProps extends BoxProps, StylesApiProps<GroupFactory>, ElementProps<'div'> {\n __size?: any;\n\n /** Controls `justify-content` CSS property @default 'flex-start' */\n justify?: React.CSSProperties['justifyContent'];\n\n /** Controls `align-items` CSS property @default 'center' */\n align?: React.CSSProperties['alignItems'];\n\n /** Controls `flex-wrap` CSS property @default 'wrap' */\n wrap?: React.CSSProperties['flexWrap'];\n\n /** Key of `theme.spacing` or any valid CSS value for `gap`, numbers are converted to rem @default 'md' */\n gap?: MantineSpacing;\n\n /** Determines whether each child element should have `flex-grow: 1` style @default false */\n grow?: boolean;\n\n /** Determines whether children should take only dedicated amount of space (`max-width` style is set based on the number of children) @default true */\n preventGrowOverflow?: boolean;\n}\n\nexport type GroupFactory = Factory<{\n props: GroupProps;\n ref: HTMLDivElement;\n stylesNames: GroupStylesNames;\n vars: GroupCssVariables;\n ctx: GroupStylesCtx;\n}>;\n\nconst defaultProps = {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n} satisfies Partial<GroupProps>;\n\nconst varsResolver = createVarsResolver<GroupFactory>(\n (_, { grow, preventGrowOverflow, gap, align, justify, wrap }, { childWidth }) => ({\n root: {\n '--group-child-width': grow && preventGrowOverflow ? childWidth : undefined,\n '--group-gap': getSpacing(gap),\n '--group-align': align,\n '--group-justify': justify,\n '--group-wrap': wrap,\n },\n })\n);\n\nexport const Group = factory<GroupFactory>((_props) => {\n const props = useProps('Group', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n children,\n gap,\n align,\n justify,\n wrap,\n grow,\n preventGrowOverflow,\n vars,\n variant,\n __size,\n mod,\n attributes,\n ...others\n } = props;\n\n const filteredChildren = filterFalsyChildren(children);\n const childrenCount = filteredChildren.length;\n const resolvedGap = getSpacing(gap ?? 'md');\n const childWidth = `calc(${\n 100 / childrenCount\n }% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`;\n\n const stylesCtx: GroupStylesCtx = { childWidth };\n\n const getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props,\n stylesCtx,\n className,\n style,\n classes,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box {...getStyles('root')} variant={variant} mod={[{ grow }, mod]} size={__size} {...others}>\n {filteredChildren}\n </Box>\n );\n});\n\nGroup.classes = classes;\nGroup.varsResolver = varsResolver;\nGroup.displayName = '@mantine/core/Group';\n\nexport namespace Group {\n export type Props = GroupProps;\n export type StylesNames = GroupStylesNames;\n export type CssVariables = GroupCssVariables;\n export type StylesCtx = GroupStylesCtx;\n export type Factory = GroupFactory;\n}\n"],"mappings":";;;;;;;;;;;AA4DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,KAAK;CACL,OAAO;CACP,SAAS;CACT,MAAM;AACR;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,GAAG,EAAE,MAAM,qBAAqB,KAAK,OAAO,SAAS,QAAQ,EAAE,kBAAkB,EAChF,MAAM;CACJ,uBAAuB,QAAQ,sBAAsB,aAAa,KAAA;CAClE,eAAeC,iBAAAA,WAAW,GAAG;CAC7B,iBAAiB;CACjB,mBAAmB;CACnB,gBAAgB;AAClB,EACF,EACF;AAEA,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,UACA,KACA,OACA,SACA,MACA,MACA,qBACA,MACA,SACA,QACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,mBAAmBC,8BAAAA,oBAAoB,QAAQ;CACrD,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,cAAcH,iBAAAA,WAAW,OAAO,IAAI;CAsB1C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACI,YAAAA,KAAD;EAAK,GAhBWC,mBAAAA,UAAwB;GACxC,MAAM;GACN;GACA,WAAA,EALkC,YAAA,QAHlC,MAAM,cACP,OAAO,YAAY,KAAK,YAAY,KAAK,cAAc,IAO9C;GACR;GACA;GACA,SAAA,qBAAA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAGmB,CAAC,CAAC,MAAM;EAAY;EAAS,KAAK,CAAC,EAAE,KAAK,GAAG,GAAG;EAAG,MAAM;EAAQ,GAAI;YACnF;CACE,CAAA;AAET,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
1
+ {"version":3,"file":"Group.cjs","names":["createVarsResolver","getSpacing","factory","useProps","filterFalsyChildren","useStyles","Box","classes"],"sources":["../../../src/components/Group/Group.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { filterFalsyChildren } from './filter-falsy-children/filter-falsy-children';\nimport classes from './Group.module.css';\n\nexport type GroupStylesNames = 'root';\nexport type GroupCssVariables = {\n root:\n | '--group-gap'\n | '--group-align'\n | '--group-justify'\n | '--group-wrap'\n | '--group-child-width';\n};\n\nexport interface GroupStylesCtx {\n childWidth: string;\n}\n\nexport interface GroupProps extends BoxProps, StylesApiProps<GroupFactory>, ElementProps<'div'> {\n __size?: any;\n\n /** Controls `justify-content` CSS property @default 'flex-start' */\n justify?: React.CSSProperties['justifyContent'];\n\n /** Controls `align-items` CSS property @default 'center' */\n align?: React.CSSProperties['alignItems'];\n\n /** Controls `flex-wrap` CSS property @default 'wrap' */\n wrap?: React.CSSProperties['flexWrap'];\n\n /** Key of `theme.spacing` or any valid CSS value for `gap`, numbers are converted to rem @default 'md' */\n gap?: MantineSpacing;\n\n /** Determines whether each child element should have `flex-grow: 1` style @default false */\n grow?: boolean;\n\n /** Determines whether children should take only dedicated amount of space (`max-width` style is set based on the number of children) @default true */\n preventGrowOverflow?: boolean;\n}\n\nexport type GroupFactory = Factory<{\n props: GroupProps;\n ref: HTMLDivElement;\n stylesNames: GroupStylesNames;\n vars: GroupCssVariables;\n ctx: GroupStylesCtx;\n}>;\n\nconst defaultProps = {\n preventGrowOverflow: true,\n gap: 'md',\n align: 'center',\n justify: 'flex-start',\n wrap: 'wrap',\n} satisfies Partial<GroupProps>;\n\nconst varsResolver = createVarsResolver<GroupFactory>(\n (_, { grow, preventGrowOverflow, gap, align, justify, wrap }, { childWidth }) => ({\n root: {\n '--group-child-width': grow && preventGrowOverflow ? childWidth : undefined,\n '--group-gap': getSpacing(gap),\n '--group-align': align,\n '--group-justify': justify,\n '--group-wrap': wrap,\n },\n })\n);\n\nexport const Group = factory<GroupFactory>((_props) => {\n const props = useProps('Group', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n children,\n gap,\n align,\n justify,\n wrap,\n grow,\n preventGrowOverflow,\n vars,\n variant,\n __size,\n mod,\n attributes,\n ...others\n } = props;\n\n const filteredChildren = filterFalsyChildren(children);\n const childrenCount = filteredChildren.length;\n const resolvedGap = getSpacing(gap ?? 'md');\n const childWidth = `calc(${\n 100 / childrenCount\n }% - (${resolvedGap} - ${resolvedGap} / ${childrenCount}))`;\n\n const stylesCtx: GroupStylesCtx = { childWidth };\n\n const getStyles = useStyles<GroupFactory>({\n name: 'Group',\n props,\n stylesCtx,\n className,\n style,\n classes,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box {...getStyles('root')} variant={variant} mod={[{ grow }, mod]} size={__size} {...others}>\n {filteredChildren}\n </Box>\n );\n});\n\nGroup.classes = classes;\nGroup.varsResolver = varsResolver;\nGroup.displayName = '@mantine/core/Group';\n\nexport namespace Group {\n export type Props = GroupProps;\n export type StylesNames = GroupStylesNames;\n export type CssVariables = GroupCssVariables;\n export type StylesCtx = GroupStylesCtx;\n export type Factory = GroupFactory;\n}\n"],"mappings":";;;;;;;;;;;AA4DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,KAAK;CACL,OAAO;CACP,SAAS;CACT,MAAM;AACR;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,GAAG,EAAE,MAAM,qBAAqB,KAAK,OAAO,SAAS,QAAQ,EAAE,kBAAkB,EAChF,MAAM;CACJ,uBAAuB,QAAQ,sBAAsB,aAAa,KAAA;CAClE,eAAeC,iBAAAA,WAAW,GAAG;CAC7B,iBAAiB;CACjB,mBAAmB;CACnB,gBAAgB;AAClB,EACF,EACF;AAEA,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,UACA,KACA,OACA,SACA,MACA,MACA,qBACA,MACA,SACA,QACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,mBAAmBC,8BAAAA,oBAAoB,QAAQ;CACrD,MAAM,gBAAgB,iBAAiB;CACvC,MAAM,cAAcH,iBAAAA,WAAW,OAAO,IAAI;CAK1C,MAAM,YAA4B,EAAE,YAAA,QAHlC,MAAM,cACP,OAAO,YAAY,KAAK,YAAY,KAAK,cAAc,IAET;CAE/C,MAAM,YAAYI,mBAAAA,UAAwB;EACxC,MAAM;EACN;EACA;EACA;EACA;EACA,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EAAK,GAAI,UAAU,MAAM;EAAY;EAAS,KAAK,CAAC,EAAE,KAAK,GAAG,GAAG;EAAG,MAAM;EAAQ,GAAI;EACnF,UAAA;CACE,CAAA;AAET,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Highlight.cjs","names":["polymorphicFactory","useProps","foldAccents","highlighter","Text","Mark"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["import {\n MantineColor,\n MantineTheme,\n polymorphicFactory,\n PolymorphicFactory,\n useProps,\n} from '../../core';\nimport { Mark } from '../Mark';\nimport { Text, TextProps, TextStylesNames, TextVariant } from '../Text';\nimport { foldAccents, highlighter } from './highlighter/highlighter';\n\nexport interface HighlightTerm {\n /** Text to highlight */\n text: string;\n\n /** Background color for this specific term. Key of `theme.colors` or any valid CSS color */\n color?: MantineColor | string;\n}\n\nexport interface HighlightProps extends Omit<TextProps, 'color'> {\n /**\n * Substring(s) to highlight in `children`. Can be:\n * - string: single term\n * - string[]: multiple terms with same color\n * - HighlightTerm[]: multiple terms with custom colors per term\n *\n * - Matching is case-insensitive and accent-insensitive by default, use `caseInsensitive` and `accentInsensitive` props to control this behavior\n * - Regex special characters are automatically escaped\n * - When multiple substrings are provided, longer matches take precedence\n * - Empty strings and whitespace-only strings are ignored\n */\n highlight: string | string[] | HighlightTerm[];\n\n /**\n * Default background color for all highlighted text.\n * Key of `theme.colors` or any valid CSS color, passed to `Mark` component.\n * Can be overridden per term when using HighlightTerm objects.\n * @default 'yellow'\n */\n color?: MantineColor | string;\n\n /** Styles applied to `mark` elements */\n highlightStyles?: React.CSSProperties | ((theme: MantineTheme) => React.CSSProperties);\n\n /** String in which to highlight substrings */\n children: string;\n\n /**\n * Only match whole words (adds word boundaries to regex).\n * When enabled, 'the' will not match 'there'.\n * @default false\n */\n wholeWord?: boolean;\n\n /**\n * Perform case-insensitive matching.\n * @default true\n */\n caseInsensitive?: boolean;\n\n /**\n * Perform accent-insensitive matching.\n * When enabled cafe will match cafe, café, cafè, etc.\n * @default true\n */\n accentInsensitive?: boolean;\n}\n\nexport type HighlightFactory = PolymorphicFactory<{\n props: HighlightProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: TextStylesNames;\n variant: TextVariant;\n}>;\n\nconst defaultProps = {\n color: 'yellow',\n wholeWord: false,\n caseInsensitive: true,\n accentInsensitive: true,\n} satisfies Partial<HighlightProps>;\n\nexport const Highlight = polymorphicFactory<HighlightFactory>((_props) => {\n const {\n unstyled,\n children,\n highlight,\n highlightStyles,\n color,\n wholeWord,\n caseInsensitive,\n accentInsensitive,\n ...others\n } = useProps('Highlight', defaultProps, _props);\n\n const isTermArray = Array.isArray(highlight) && typeof highlight[0] === 'object';\n const colorMap = new Map<string, string>();\n\n const normalizeKey = (s: string) => {\n let key = s;\n if (caseInsensitive) {\n key = key.toLowerCase();\n }\n if (accentInsensitive) {\n key = foldAccents(key);\n }\n return key;\n };\n\n let highlightStrings: string[];\n if (isTermArray) {\n highlightStrings = (highlight as HighlightTerm[]).map((term) => {\n if (term.color) {\n colorMap.set(normalizeKey(term.text), term.color);\n }\n return term.text;\n });\n } else if (Array.isArray(highlight)) {\n highlightStrings = highlight as string[];\n } else {\n highlightStrings = [highlight as string];\n }\n\n const highlightChunks = highlighter(children, highlightStrings, {\n wholeWord,\n caseInsensitive,\n accentInsensitive,\n });\n\n return (\n <Text unstyled={unstyled} {...others} __staticSelector=\"Highlight\">\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n <Mark\n unstyled={unstyled}\n key={i}\n color={colorMap.get(normalizeKey(chunk)) || color}\n style={highlightStyles}\n data-highlight={chunk}\n >\n {chunk}\n </Mark>\n ) : (\n <span key={i}>{chunk}</span>\n )\n )}\n </Text>\n );\n});\n\nHighlight.classes = Text.classes;\nHighlight.displayName = '@mantine/core/Highlight';\n\nexport namespace Highlight {\n export type Props = HighlightProps;\n export type Factory = HighlightFactory;\n export type Term = HighlightTerm;\n}\n"],"mappings":";;;;;;;;AA4EA,MAAM,eAAe;CACnB,OAAO;CACP,WAAW;CACX,iBAAiB;CACjB,mBAAmB;AACrB;AAEA,MAAa,YAAYA,4BAAAA,oBAAsC,WAAW;CACxE,MAAM,EACJ,UACA,UACA,WACA,iBACA,OACA,WACA,iBACA,mBACA,GAAG,WACDC,kBAAAA,SAAS,aAAa,cAAc,MAAM;CAE9C,MAAM,cAAc,MAAM,QAAQ,SAAS,KAAK,OAAO,UAAU,OAAO;CACxE,MAAM,2BAAW,IAAI,IAAoB;CAEzC,MAAM,gBAAgB,MAAc;EAClC,IAAI,MAAM;EACV,IAAI,iBACF,MAAM,IAAI,YAAY;EAExB,IAAI,mBACF,MAAMC,oBAAAA,YAAY,GAAG;EAEvB,OAAO;CACT;CAEA,IAAI;CACJ,IAAI,aACF,mBAAoB,UAA8B,KAAK,SAAS;EAC9D,IAAI,KAAK,OACP,SAAS,IAAI,aAAa,KAAK,IAAI,GAAG,KAAK,KAAK;EAElD,OAAO,KAAK;CACd,CAAC;MACI,IAAI,MAAM,QAAQ,SAAS,GAChC,mBAAmB;MAEnB,mBAAmB,CAAC,SAAmB;CAGzC,MAAM,kBAAkBC,oBAAAA,YAAY,UAAU,kBAAkB;EAC9D;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD;EAAgB;EAAU,GAAI;EAAQ,kBAAiB;YACpD,gBAAgB,KAAK,EAAE,OAAO,eAAe,MAC5C,cACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD;GACY;GAEV,OAAO,SAAS,IAAI,aAAa,KAAK,CAAC,KAAK;GAC5C,OAAO;GACP,kBAAgB;aAEf;EACG,GANC,CAMD,IAEN,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAe,MAAY,GAAhB,CAAgB,CAE/B;CACI,CAAA;AAEV,CAAC;AAED,UAAU,UAAUD,aAAAA,KAAK;AACzB,UAAU,cAAc"}
1
+ {"version":3,"file":"Highlight.cjs","names":["polymorphicFactory","useProps","foldAccents","highlighter","Text","Mark"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["import {\n MantineColor,\n MantineTheme,\n polymorphicFactory,\n PolymorphicFactory,\n useProps,\n} from '../../core';\nimport { Mark } from '../Mark';\nimport { Text, TextProps, TextStylesNames, TextVariant } from '../Text';\nimport { foldAccents, highlighter } from './highlighter/highlighter';\n\nexport interface HighlightTerm {\n /** Text to highlight */\n text: string;\n\n /** Background color for this specific term. Key of `theme.colors` or any valid CSS color */\n color?: MantineColor | string;\n}\n\nexport interface HighlightProps extends Omit<TextProps, 'color'> {\n /**\n * Substring(s) to highlight in `children`. Can be:\n * - string: single term\n * - string[]: multiple terms with same color\n * - HighlightTerm[]: multiple terms with custom colors per term\n *\n * - Matching is case-insensitive and accent-insensitive by default, use `caseInsensitive` and `accentInsensitive` props to control this behavior\n * - Regex special characters are automatically escaped\n * - When multiple substrings are provided, longer matches take precedence\n * - Empty strings and whitespace-only strings are ignored\n */\n highlight: string | string[] | HighlightTerm[];\n\n /**\n * Default background color for all highlighted text.\n * Key of `theme.colors` or any valid CSS color, passed to `Mark` component.\n * Can be overridden per term when using HighlightTerm objects.\n * @default 'yellow'\n */\n color?: MantineColor | string;\n\n /** Styles applied to `mark` elements */\n highlightStyles?: React.CSSProperties | ((theme: MantineTheme) => React.CSSProperties);\n\n /** String in which to highlight substrings */\n children: string;\n\n /**\n * Only match whole words (adds word boundaries to regex).\n * When enabled, 'the' will not match 'there'.\n * @default false\n */\n wholeWord?: boolean;\n\n /**\n * Perform case-insensitive matching.\n * @default true\n */\n caseInsensitive?: boolean;\n\n /**\n * Perform accent-insensitive matching.\n * When enabled cafe will match cafe, café, cafè, etc.\n * @default true\n */\n accentInsensitive?: boolean;\n}\n\nexport type HighlightFactory = PolymorphicFactory<{\n props: HighlightProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: TextStylesNames;\n variant: TextVariant;\n}>;\n\nconst defaultProps = {\n color: 'yellow',\n wholeWord: false,\n caseInsensitive: true,\n accentInsensitive: true,\n} satisfies Partial<HighlightProps>;\n\nexport const Highlight = polymorphicFactory<HighlightFactory>((_props) => {\n const {\n unstyled,\n children,\n highlight,\n highlightStyles,\n color,\n wholeWord,\n caseInsensitive,\n accentInsensitive,\n ...others\n } = useProps('Highlight', defaultProps, _props);\n\n const isTermArray = Array.isArray(highlight) && typeof highlight[0] === 'object';\n const colorMap = new Map<string, string>();\n\n const normalizeKey = (s: string) => {\n let key = s;\n if (caseInsensitive) {\n key = key.toLowerCase();\n }\n if (accentInsensitive) {\n key = foldAccents(key);\n }\n return key;\n };\n\n let highlightStrings: string[];\n if (isTermArray) {\n highlightStrings = (highlight as HighlightTerm[]).map((term) => {\n if (term.color) {\n colorMap.set(normalizeKey(term.text), term.color);\n }\n return term.text;\n });\n } else if (Array.isArray(highlight)) {\n highlightStrings = highlight as string[];\n } else {\n highlightStrings = [highlight as string];\n }\n\n const highlightChunks = highlighter(children, highlightStrings, {\n wholeWord,\n caseInsensitive,\n accentInsensitive,\n });\n\n return (\n <Text unstyled={unstyled} {...others} __staticSelector=\"Highlight\">\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n <Mark\n unstyled={unstyled}\n key={i}\n color={colorMap.get(normalizeKey(chunk)) || color}\n style={highlightStyles}\n data-highlight={chunk}\n >\n {chunk}\n </Mark>\n ) : (\n <span key={i}>{chunk}</span>\n )\n )}\n </Text>\n );\n});\n\nHighlight.classes = Text.classes;\nHighlight.displayName = '@mantine/core/Highlight';\n\nexport namespace Highlight {\n export type Props = HighlightProps;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V,CAAC;AAED,UAAU,UAAUD,aAAAA,KAAK;AACzB,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCard.cjs","names":["useProps","useHoverCard","HoverCardContext","Popover","HoverCardTarget","HoverCardDropdown","HoverCardGroup"],"sources":["../../../src/components/HoverCard/HoverCard.tsx"],"sourcesContent":["import { ExtendComponent, Factory, useProps } from '../../core';\nimport { Popover, PopoverProps, PopoverStylesNames } from '../Popover';\nimport { PopoverCssVariables } from '../Popover/Popover';\nimport { HoverCardContext, HoverCardContextValue } from './HoverCard.context';\nimport { HoverCardDropdown, HoverCardDropdownProps } from './HoverCardDropdown/HoverCardDropdown';\nimport {\n HoverCardGroup,\n HoverCardGroupContextValue,\n HoverCardGroupProps,\n} from './HoverCardGroup/HoverCardGroup';\nimport { HoverCardTarget, HoverCardTargetProps } from './HoverCardTarget/HoverCardTarget';\nimport { useHoverCard } from './use-hover-card';\n\nexport interface HoverCardProps extends Omit<PopoverProps, 'opened' | 'onChange'> {\n /** Initial opened state */\n initiallyOpened?: boolean;\n\n /** Called when the dropdown is opened */\n onOpen?: () => void;\n\n /** Called when the dropdown is closed */\n onClose?: () => void;\n\n /**\n * Delay in ms before the dropdown opens after mouse enters the target.\n * Overridden by HoverCard.Group delay if used within a group.\n * @default 0\n */\n openDelay?: number;\n\n /**\n * Delay in ms before the dropdown closes after mouse leaves the target or dropdown.\n * Overridden by HoverCard.Group delay if used within a group.\n * @default 150\n */\n closeDelay?: number;\n}\n\nexport type HoverCardFactory = Factory<{\n props: HoverCardProps;\n stylesNames: PopoverStylesNames;\n vars: PopoverCssVariables;\n}>;\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 150,\n initiallyOpened: false,\n} satisfies Partial<HoverCardProps>;\n\nexport function HoverCard(props: HoverCardProps) {\n const { children, onOpen, onClose, openDelay, closeDelay, initiallyOpened, ...others } = useProps(\n 'HoverCard',\n defaultProps,\n props\n );\n\n const hoverCard = useHoverCard({\n openDelay,\n closeDelay,\n defaultOpened: initiallyOpened,\n onOpen,\n onClose,\n });\n\n return (\n <HoverCardContext\n value={{\n openDropdown: hoverCard.openDropdown,\n closeDropdown: hoverCard.closeDropdown,\n assignTarget: hoverCard.assignTarget,\n getReferenceProps: hoverCard.getReferenceProps,\n getFloatingProps: hoverCard.getFloatingProps,\n reference: hoverCard.reference,\n floating: hoverCard.floating,\n }}\n >\n <Popover {...others} opened={hoverCard.opened} __staticSelector=\"HoverCard\">\n {children}\n </Popover>\n </HoverCardContext>\n );\n}\n\nHoverCard.displayName = '@mantine/core/HoverCard';\nHoverCard.Target = HoverCardTarget;\nHoverCard.Dropdown = HoverCardDropdown;\nHoverCard.Group = HoverCardGroup;\nHoverCard.extend = (input: ExtendComponent<HoverCardFactory>) => input;\n\nexport namespace HoverCard {\n export type Props = HoverCardProps;\n export type DropdownProps = HoverCardDropdownProps;\n export type TargetProps = HoverCardTargetProps;\n export type GroupProps = HoverCardGroupProps;\n export type ContextValue = HoverCardContextValue;\n\n export namespace Group {\n export type Props = HoverCardGroupProps;\n export type ContextValue = HoverCardGroupContextValue;\n }\n}\n"],"mappings":";;;;;;;;;;AA4CA,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;CACZ,iBAAiB;AACnB;AAEA,SAAgB,UAAU,OAAuB;CAC/C,MAAM,EAAE,UAAU,QAAQ,SAAS,WAAW,YAAY,iBAAiB,GAAG,WAAWA,kBAAAA,SACvF,aACA,cACA,KACF;CAEA,MAAM,YAAYC,uBAAAA,aAAa;EAC7B;EACA;EACA,eAAe;EACf;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,kBAAD;EACE,OAAO;GACL,cAAc,UAAU;GACxB,eAAe,UAAU;GACzB,cAAc,UAAU;GACxB,mBAAmB,UAAU;GAC7B,kBAAkB,UAAU;GAC5B,WAAW,UAAU;GACrB,UAAU,UAAU;EACtB;YAEA,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD;GAAS,GAAI;GAAQ,QAAQ,UAAU;GAAQ,kBAAiB;GAC7D;EACM,CAAA;CACO,CAAA;AAEtB;AAEA,UAAU,cAAc;AACxB,UAAU,SAASC,wBAAAA;AACnB,UAAU,WAAWC,0BAAAA;AACrB,UAAU,QAAQC,uBAAAA;AAClB,UAAU,UAAU,UAA6C"}
1
+ {"version":3,"file":"HoverCard.cjs","names":["useProps","useHoverCard","HoverCardContext","Popover","HoverCardTarget","HoverCardDropdown","HoverCardGroup"],"sources":["../../../src/components/HoverCard/HoverCard.tsx"],"sourcesContent":["import { ExtendComponent, Factory, useProps } from '../../core';\nimport { Popover, PopoverProps, PopoverStylesNames } from '../Popover';\nimport { PopoverCssVariables } from '../Popover/Popover';\nimport { HoverCardContext, HoverCardContextValue } from './HoverCard.context';\nimport { HoverCardDropdown, HoverCardDropdownProps } from './HoverCardDropdown/HoverCardDropdown';\nimport {\n HoverCardGroup,\n HoverCardGroupContextValue,\n HoverCardGroupProps,\n} from './HoverCardGroup/HoverCardGroup';\nimport { HoverCardTarget, HoverCardTargetProps } from './HoverCardTarget/HoverCardTarget';\nimport { useHoverCard } from './use-hover-card';\n\nexport interface HoverCardProps extends Omit<PopoverProps, 'opened' | 'onChange'> {\n /** Initial opened state */\n initiallyOpened?: boolean;\n\n /** Called when the dropdown is opened */\n onOpen?: () => void;\n\n /** Called when the dropdown is closed */\n onClose?: () => void;\n\n /**\n * Delay in ms before the dropdown opens after mouse enters the target.\n * Overridden by HoverCard.Group delay if used within a group.\n * @default 0\n */\n openDelay?: number;\n\n /**\n * Delay in ms before the dropdown closes after mouse leaves the target or dropdown.\n * Overridden by HoverCard.Group delay if used within a group.\n * @default 150\n */\n closeDelay?: number;\n}\n\nexport type HoverCardFactory = Factory<{\n props: HoverCardProps;\n stylesNames: PopoverStylesNames;\n vars: PopoverCssVariables;\n}>;\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 150,\n initiallyOpened: false,\n} satisfies Partial<HoverCardProps>;\n\nexport function HoverCard(props: HoverCardProps) {\n const { children, onOpen, onClose, openDelay, closeDelay, initiallyOpened, ...others } = useProps(\n 'HoverCard',\n defaultProps,\n props\n );\n\n const hoverCard = useHoverCard({\n openDelay,\n closeDelay,\n defaultOpened: initiallyOpened,\n onOpen,\n onClose,\n });\n\n return (\n <HoverCardContext\n value={{\n openDropdown: hoverCard.openDropdown,\n closeDropdown: hoverCard.closeDropdown,\n assignTarget: hoverCard.assignTarget,\n getReferenceProps: hoverCard.getReferenceProps,\n getFloatingProps: hoverCard.getFloatingProps,\n reference: hoverCard.reference,\n floating: hoverCard.floating,\n }}\n >\n <Popover {...others} opened={hoverCard.opened} __staticSelector=\"HoverCard\">\n {children}\n </Popover>\n </HoverCardContext>\n );\n}\n\nHoverCard.displayName = '@mantine/core/HoverCard';\nHoverCard.Target = HoverCardTarget;\nHoverCard.Dropdown = HoverCardDropdown;\nHoverCard.Group = HoverCardGroup;\nHoverCard.extend = (input: ExtendComponent<HoverCardFactory>) => input;\n\nexport namespace HoverCard {\n export type Props = HoverCardProps;\n export type DropdownProps = HoverCardDropdownProps;\n export type TargetProps = HoverCardTargetProps;\n export type GroupProps = HoverCardGroupProps;\n export type ContextValue = HoverCardContextValue;\n\n export namespace Group {\n export type Props = HoverCardGroupProps;\n export type ContextValue = HoverCardGroupContextValue;\n }\n}\n"],"mappings":";;;;;;;;;;AA4CA,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;CACZ,iBAAiB;AACnB;AAEA,SAAgB,UAAU,OAAuB;CAC/C,MAAM,EAAE,UAAU,QAAQ,SAAS,WAAW,YAAY,iBAAiB,GAAG,WAAWA,kBAAAA,SACvF,aACA,cACA,KACF;CAEA,MAAM,YAAYC,uBAAAA,aAAa;EAC7B;EACA;EACA,eAAe;EACf;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,kBAAD;EACE,OAAO;GACL,cAAc,UAAU;GACxB,eAAe,UAAU;GACzB,cAAc,UAAU;GACxB,mBAAmB,UAAU;GAC7B,kBAAkB,UAAU;GAC5B,WAAW,UAAU;GACrB,UAAU,UAAU;EACtB;EAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD;GAAS,GAAI;GAAQ,QAAQ,UAAU;GAAQ,kBAAiB;GAC7D;EACM,CAAA;CACO,CAAA;AAEtB;AAEA,UAAU,cAAc;AACxB,UAAU,SAASC,wBAAAA;AACnB,UAAU,WAAWC,0BAAAA;AACrB,UAAU,QAAQC,uBAAAA;AAClB,UAAU,UAAU,UAA6C"}
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardDropdown.cjs","names":["useProps","useHoverCardContext","HoverCardGroupContext","Popover","createEventHandler"],"sources":["../../../../src/components/HoverCard/HoverCardDropdown/HoverCardDropdown.tsx"],"sourcesContent":["import { use } from 'react';\nimport { createEventHandler, useProps } from '../../../core';\nimport { Popover, PopoverDropdownProps } from '../../Popover';\nimport { useHoverCardContext } from '../HoverCard.context';\nimport { HoverCardGroupContext } from '../HoverCardGroup/HoverCardGroup';\n\nexport interface HoverCardDropdownProps extends PopoverDropdownProps {\n /** Dropdown content */\n children?: React.ReactNode;\n}\n\nexport function HoverCardDropdown(props: HoverCardDropdownProps) {\n const { children, onMouseEnter, onMouseLeave, ...others } = useProps(\n 'HoverCardDropdown',\n null,\n props\n );\n\n const ctx = useHoverCardContext();\n const groupCtx = use(HoverCardGroupContext);\n\n if (groupCtx.withinGroup && ctx.getFloatingProps && ctx.floating) {\n const floatingProps = ctx.getFloatingProps();\n\n return (\n <Popover.Dropdown\n ref={ctx.floating}\n {...floatingProps}\n onMouseEnter={createEventHandler<any>(onMouseEnter, floatingProps.onMouseEnter)}\n onMouseLeave={createEventHandler<any>(onMouseLeave, floatingProps.onMouseLeave)}\n {...others}\n >\n {children}\n </Popover.Dropdown>\n );\n }\n\n const handleMouseEnter = createEventHandler<any>(onMouseEnter, ctx.openDropdown);\n const handleMouseLeave = createEventHandler<any>(onMouseLeave!, ctx.closeDropdown);\n\n return (\n <Popover.Dropdown onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} {...others}>\n {children}\n </Popover.Dropdown>\n );\n}\n\nHoverCardDropdown.displayName = '@mantine/core/HoverCardDropdown';\n"],"mappings":";;;;;;;;;AAWA,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,EAAE,UAAU,cAAc,cAAc,GAAG,WAAWA,kBAAAA,SAC1D,qBACA,MACA,KACF;CAEA,MAAM,MAAMC,0BAAAA,oBAAoB;CAGhC,KAAA,GAAA,MAAA,IAAA,CAFqBC,uBAAAA,qBAEV,CAAC,CAAC,eAAe,IAAI,oBAAoB,IAAI,UAAU;EAChE,MAAM,gBAAgB,IAAI,iBAAiB;EAE3C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,UAAT;GACE,KAAK,IAAI;GACT,GAAI;GACJ,cAAcC,6BAAAA,mBAAwB,cAAc,cAAc,YAAY;GAC9E,cAAcA,6BAAAA,mBAAwB,cAAc,cAAc,YAAY;GAC9E,GAAI;GAEH;EACe,CAAA;CAEtB;CAEA,MAAM,mBAAmBA,6BAAAA,mBAAwB,cAAc,IAAI,YAAY;CAC/E,MAAM,mBAAmBA,6BAAAA,mBAAwB,cAAe,IAAI,aAAa;CAEjF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,gBAAAA,QAAQ,UAAT;EAAkB,cAAc;EAAkB,cAAc;EAAkB,GAAI;EACnF;CACe,CAAA;AAEtB;AAEA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"HoverCardDropdown.cjs","names":["useProps","useHoverCardContext","use","HoverCardGroupContext","Popover","createEventHandler"],"sources":["../../../../src/components/HoverCard/HoverCardDropdown/HoverCardDropdown.tsx"],"sourcesContent":["import { use } from 'react';\nimport { createEventHandler, useProps } from '../../../core';\nimport { Popover, PopoverDropdownProps } from '../../Popover';\nimport { useHoverCardContext } from '../HoverCard.context';\nimport { HoverCardGroupContext } from '../HoverCardGroup/HoverCardGroup';\n\nexport interface HoverCardDropdownProps extends PopoverDropdownProps {\n /** Dropdown content */\n children?: React.ReactNode;\n}\n\nexport function HoverCardDropdown(props: HoverCardDropdownProps) {\n const { children, onMouseEnter, onMouseLeave, ...others } = useProps(\n 'HoverCardDropdown',\n null,\n props\n );\n\n const ctx = useHoverCardContext();\n const groupCtx = use(HoverCardGroupContext);\n\n if (groupCtx.withinGroup && ctx.getFloatingProps && ctx.floating) {\n const floatingProps = ctx.getFloatingProps();\n\n return (\n <Popover.Dropdown\n ref={ctx.floating}\n {...floatingProps}\n onMouseEnter={createEventHandler<any>(onMouseEnter, floatingProps.onMouseEnter)}\n onMouseLeave={createEventHandler<any>(onMouseLeave, floatingProps.onMouseLeave)}\n {...others}\n >\n {children}\n </Popover.Dropdown>\n );\n }\n\n const handleMouseEnter = createEventHandler<any>(onMouseEnter, ctx.openDropdown);\n const handleMouseLeave = createEventHandler<any>(onMouseLeave!, ctx.closeDropdown);\n\n return (\n <Popover.Dropdown onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} {...others}>\n {children}\n </Popover.Dropdown>\n );\n}\n\nHoverCardDropdown.displayName = '@mantine/core/HoverCardDropdown';\n"],"mappings":";;;;;;;;;AAWA,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,EAAE,UAAU,cAAc,cAAc,GAAG,WAAWA,kBAAAA,SAC1D,qBACA,MACA,KACF;CAEA,MAAM,MAAMC,0BAAAA,oBAAoB;CAGhC,KAAA,GAFiBC,MAAAA,IAAAA,CAAIC,uBAAAA,qBAEV,CAAC,CAAC,eAAe,IAAI,oBAAoB,IAAI,UAAU;EAChE,MAAM,gBAAgB,IAAI,iBAAiB;EAE3C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,UAAT;GACE,KAAK,IAAI;GACT,GAAI;GACJ,cAAcC,6BAAAA,mBAAwB,cAAc,cAAc,YAAY;GAC9E,cAAcA,6BAAAA,mBAAwB,cAAc,cAAc,YAAY;GAC9E,GAAI;GAEH;EACe,CAAA;CAEtB;CAEA,MAAM,mBAAmBA,6BAAAA,mBAAwB,cAAc,IAAI,YAAY;CAC/E,MAAM,mBAAmBA,6BAAAA,mBAAwB,cAAe,IAAI,aAAa;CAEjF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,gBAAAA,QAAQ,UAAT;EAAkB,cAAc;EAAkB,cAAc;EAAkB,GAAI;EACnF;CACe,CAAA;AAEtB;AAEA,kBAAkB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardGroup.cjs","names":["useProps","FloatingDelayGroup"],"sources":["../../../../src/components/HoverCard/HoverCardGroup/HoverCardGroup.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { FloatingDelayGroup } from '@floating-ui/react';\nimport { ExtendComponent, Factory, MantineThemeComponent, useProps } from '../../../core';\n\nexport interface HoverCardGroupContextValue {\n withinGroup: boolean;\n}\n\nexport const HoverCardGroupContext = createContext<HoverCardGroupContextValue>({\n withinGroup: false,\n});\n\nexport interface HoverCardGroupProps {\n /** `HoverCard` components */\n children: React.ReactNode;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms */\n closeDelay?: number;\n}\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 0,\n} satisfies Partial<HoverCardGroupProps>;\n\nexport function HoverCardGroup(props: HoverCardGroupProps) {\n const { openDelay, closeDelay, children } = useProps('HoverCardGroup', defaultProps, props);\n\n return (\n <HoverCardGroupContext value={{ withinGroup: true }}>\n <FloatingDelayGroup delay={{ open: openDelay, close: closeDelay }}>\n {children}\n </FloatingDelayGroup>\n </HoverCardGroupContext>\n );\n}\n\nexport type HoverCardGroupFactory = Factory<{\n props: HoverCardGroupProps;\n}>;\n\nHoverCardGroup.displayName = '@mantine/core/HoverCardGroup';\nHoverCardGroup.extend = (c: ExtendComponent<HoverCardGroupFactory>): MantineThemeComponent => c;\n"],"mappings":";;;;;;AAQA,MAAa,yBAAA,GAAA,MAAA,cAAA,CAAkE,EAC7E,aAAa,MACf,CAAC;AAaD,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;AACd;AAEA,SAAgB,eAAe,OAA4B;CACzD,MAAM,EAAE,WAAW,YAAY,aAAaA,kBAAAA,SAAS,kBAAkB,cAAc,KAAK;CAE1F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAD;EAAuB,OAAO,EAAE,aAAa,KAAK;YAChD,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,oBAAD;GAAoB,OAAO;IAAE,MAAM;IAAW,OAAO;GAAW;GAC7D;EACiB,CAAA;CACC,CAAA;AAE3B;AAMA,eAAe,cAAc;AAC7B,eAAe,UAAU,MAAqE"}
1
+ {"version":3,"file":"HoverCardGroup.cjs","names":["createContext","useProps","FloatingDelayGroup"],"sources":["../../../../src/components/HoverCard/HoverCardGroup/HoverCardGroup.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { FloatingDelayGroup } from '@floating-ui/react';\nimport { ExtendComponent, Factory, MantineThemeComponent, useProps } from '../../../core';\n\nexport interface HoverCardGroupContextValue {\n withinGroup: boolean;\n}\n\nexport const HoverCardGroupContext = createContext<HoverCardGroupContextValue>({\n withinGroup: false,\n});\n\nexport interface HoverCardGroupProps {\n /** `HoverCard` components */\n children: React.ReactNode;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms */\n closeDelay?: number;\n}\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 0,\n} satisfies Partial<HoverCardGroupProps>;\n\nexport function HoverCardGroup(props: HoverCardGroupProps) {\n const { openDelay, closeDelay, children } = useProps('HoverCardGroup', defaultProps, props);\n\n return (\n <HoverCardGroupContext value={{ withinGroup: true }}>\n <FloatingDelayGroup delay={{ open: openDelay, close: closeDelay }}>\n {children}\n </FloatingDelayGroup>\n </HoverCardGroupContext>\n );\n}\n\nexport type HoverCardGroupFactory = Factory<{\n props: HoverCardGroupProps;\n}>;\n\nHoverCardGroup.displayName = '@mantine/core/HoverCardGroup';\nHoverCardGroup.extend = (c: ExtendComponent<HoverCardGroupFactory>): MantineThemeComponent => c;\n"],"mappings":";;;;;;AAQA,MAAa,yBAAA,GAAwBA,MAAAA,cAAAA,CAA0C,EAC7E,aAAa,MACf,CAAC;AAaD,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;AACd;AAEA,SAAgB,eAAe,OAA4B;CACzD,MAAM,EAAE,WAAW,YAAY,aAAaC,kBAAAA,SAAS,kBAAkB,cAAc,KAAK;CAE1F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAD;EAAuB,OAAO,EAAE,aAAa,KAAK;EAChD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,oBAAD;GAAoB,OAAO;IAAE,MAAM;IAAW,OAAO;GAAW;GAC7D;EACiB,CAAA;CACC,CAAA;AAE3B;AAMA,eAAe,cAAc;AAC7B,eAAe,UAAU,MAAqE"}
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCardTarget.cjs","names":["useProps","getSingleElementChild","useHoverCardContext","HoverCardGroupContext","getRefProp","Popover","createEventHandler"],"sources":["../../../../src/components/HoverCard/HoverCardTarget/HoverCardTarget.tsx"],"sourcesContent":["import { cloneElement, use } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { createEventHandler, getRefProp, getSingleElementChild, useProps } from '../../../core';\nimport { Popover, PopoverTargetProps } from '../../Popover';\nimport { useHoverCardContext } from '../HoverCard.context';\nimport { HoverCardGroupContext } from '../HoverCardGroup/HoverCardGroup';\n\nexport interface HoverCardTargetProps extends PopoverTargetProps {\n /**\n * Name of the prop to wrap event listeners in.\n * Use when the target component expects event listeners in a nested object.\n * For example, some components expect `componentProps={{ onMouseEnter, onMouseLeave }}`.\n * @default undefined (event listeners passed directly to component)\n */\n eventPropsWrapperName?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<HoverCardTargetProps>;\n\nexport function HoverCardTarget(props: HoverCardTargetProps) {\n const { children, refProp, eventPropsWrapperName, ...others } = useProps(\n 'HoverCardTarget',\n defaultProps,\n props\n );\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useHoverCardContext();\n const groupContext = use(HoverCardGroupContext);\n const targetRef = useMergedRef(getRefProp(child), ctx.assignTarget);\n\n if (groupContext.withinGroup && ctx.getReferenceProps && ctx.reference) {\n const referenceProps = ctx.getReferenceProps();\n\n return (\n <Popover.Target refProp={refProp} {...others}>\n {cloneElement(\n child,\n eventPropsWrapperName\n ? { [eventPropsWrapperName]: { ...referenceProps, ref: ctx.reference } }\n : { ...referenceProps, ref: ctx.reference }\n )}\n </Popover.Target>\n );\n }\n\n const onMouseEnter = createEventHandler((child.props as any).onMouseEnter, ctx.openDropdown);\n const onMouseLeave = createEventHandler((child.props as any).onMouseLeave, ctx.closeDropdown);\n\n const eventListeners = { onMouseEnter, onMouseLeave };\n\n const clonedProps: any = {\n ...(eventPropsWrapperName ? { [eventPropsWrapperName]: eventListeners } : eventListeners),\n ref: targetRef,\n };\n\n return (\n <Popover.Target refProp={refProp} {...others}>\n {cloneElement(child, clonedProps)}\n </Popover.Target>\n );\n}\n\nHoverCardTarget.displayName = '@mantine/core/HoverCardTarget';\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,EAAE,UAAU,SAAS,uBAAuB,GAAG,WAAWA,kBAAAA,SAC9D,mBACA,cACA,KACF;CAEA,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,oKACF;CAGF,MAAM,MAAMC,0BAAAA,oBAAoB;CAChC,MAAM,gBAAA,GAAA,MAAA,IAAA,CAAmBC,uBAAAA,qBAAqB;CAC9C,MAAM,aAAA,GAAA,eAAA,aAAA,CAAyBC,qBAAAA,WAAW,KAAK,GAAG,IAAI,YAAY;CAElE,IAAI,aAAa,eAAe,IAAI,qBAAqB,IAAI,WAAW;EACtE,MAAM,iBAAiB,IAAI,kBAAkB;EAE7C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,QAAT;GAAyB;GAAS,GAAI;qCAElC,OACA,wBACI,GAAG,wBAAwB;IAAE,GAAG;IAAgB,KAAK,IAAI;GAAU,EAAE,IACrE;IAAE,GAAG;IAAgB,KAAK,IAAI;GAAU,CAC9C;EACc,CAAA;CAEpB;CAKA,MAAM,iBAAiB;EAAE,cAHJC,6BAAAA,mBAAoB,MAAM,MAAc,cAAc,IAAI,YAG3C;EAAG,cAFlBA,6BAAAA,mBAAoB,MAAM,MAAc,cAAc,IAAI,aAE7B;CAAE;CAEpD,MAAM,cAAmB;EACvB,GAAI,wBAAwB,GAAG,wBAAwB,eAAe,IAAI;EAC1E,KAAK;CACP;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,gBAAAA,QAAQ,QAAT;EAAyB;EAAS,GAAI;oCACtB,OAAO,WAAW;CAClB,CAAA;AAEpB;AAEA,gBAAgB,cAAc"}
1
+ {"version":3,"file":"HoverCardTarget.cjs","names":["useProps","getSingleElementChild","useHoverCardContext","use","HoverCardGroupContext","useMergedRef","getRefProp","Popover","cloneElement","createEventHandler"],"sources":["../../../../src/components/HoverCard/HoverCardTarget/HoverCardTarget.tsx"],"sourcesContent":["import { cloneElement, use } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { createEventHandler, getRefProp, getSingleElementChild, useProps } from '../../../core';\nimport { Popover, PopoverTargetProps } from '../../Popover';\nimport { useHoverCardContext } from '../HoverCard.context';\nimport { HoverCardGroupContext } from '../HoverCardGroup/HoverCardGroup';\n\nexport interface HoverCardTargetProps extends PopoverTargetProps {\n /**\n * Name of the prop to wrap event listeners in.\n * Use when the target component expects event listeners in a nested object.\n * For example, some components expect `componentProps={{ onMouseEnter, onMouseLeave }}`.\n * @default undefined (event listeners passed directly to component)\n */\n eventPropsWrapperName?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<HoverCardTargetProps>;\n\nexport function HoverCardTarget(props: HoverCardTargetProps) {\n const { children, refProp, eventPropsWrapperName, ...others } = useProps(\n 'HoverCardTarget',\n defaultProps,\n props\n );\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useHoverCardContext();\n const groupContext = use(HoverCardGroupContext);\n const targetRef = useMergedRef(getRefProp(child), ctx.assignTarget);\n\n if (groupContext.withinGroup && ctx.getReferenceProps && ctx.reference) {\n const referenceProps = ctx.getReferenceProps();\n\n return (\n <Popover.Target refProp={refProp} {...others}>\n {cloneElement(\n child,\n eventPropsWrapperName\n ? { [eventPropsWrapperName]: { ...referenceProps, ref: ctx.reference } }\n : { ...referenceProps, ref: ctx.reference }\n )}\n </Popover.Target>\n );\n }\n\n const onMouseEnter = createEventHandler((child.props as any).onMouseEnter, ctx.openDropdown);\n const onMouseLeave = createEventHandler((child.props as any).onMouseLeave, ctx.closeDropdown);\n\n const eventListeners = { onMouseEnter, onMouseLeave };\n\n const clonedProps: any = {\n ...(eventPropsWrapperName ? { [eventPropsWrapperName]: eventListeners } : eventListeners),\n ref: targetRef,\n };\n\n return (\n <Popover.Target refProp={refProp} {...others}>\n {cloneElement(child, clonedProps)}\n </Popover.Target>\n );\n}\n\nHoverCardTarget.displayName = '@mantine/core/HoverCardTarget';\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,EAAE,UAAU,SAAS,uBAAuB,GAAG,WAAWA,kBAAAA,SAC9D,mBACA,cACA,KACF;CAEA,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,oKACF;CAGF,MAAM,MAAMC,0BAAAA,oBAAoB;CAChC,MAAM,gBAAA,GAAeC,MAAAA,IAAAA,CAAIC,uBAAAA,qBAAqB;CAC9C,MAAM,aAAA,GAAYC,eAAAA,aAAAA,CAAaC,qBAAAA,WAAW,KAAK,GAAG,IAAI,YAAY;CAElE,IAAI,aAAa,eAAe,IAAI,qBAAqB,IAAI,WAAW;EACtE,MAAM,iBAAiB,IAAI,kBAAkB;EAE7C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,QAAT;GAAyB;GAAS,GAAI;GACnCC,WAAAA,GAAAA,MAAAA,aAAAA,CACC,OACA,wBACI,GAAG,wBAAwB;IAAE,GAAG;IAAgB,KAAK,IAAI;GAAU,EAAE,IACrE;IAAE,GAAG;IAAgB,KAAK,IAAI;GAAU,CAC9C;EACc,CAAA;CAEpB;CAKA,MAAM,iBAAiB;EAAE,cAHJC,6BAAAA,mBAAoB,MAAM,MAAc,cAAc,IAAI,YAG3C;EAAG,cAFlBA,6BAAAA,mBAAoB,MAAM,MAAc,cAAc,IAAI,aAE7B;CAAE;CAEpD,MAAM,cAAmB;EACvB,GAAI,wBAAwB,GAAG,wBAAwB,eAAe,IAAI;EAC1E,KAAK;CACP;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACF,gBAAAA,QAAQ,QAAT;EAAyB;EAAS,GAAI;EACnCC,WAAAA,GAAAA,MAAAA,aAAAA,CAAa,OAAO,WAAW;CAClB,CAAA;AAEpB;AAEA,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-hover-card.cjs","names":["HoverCardGroupContext"],"sources":["../../../src/components/HoverCard/use-hover-card.ts"],"sourcesContent":["import { use, useCallback, useEffect, useRef, useState } from 'react';\nimport {\n useDelayGroup,\n useDismiss,\n useFloating,\n useHover,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { useId } from '@mantine/hooks';\nimport { HoverCardGroupContext } from './HoverCardGroup/HoverCardGroup';\n\ninterface UseHoverCard {\n openDelay?: number;\n closeDelay?: number;\n opened?: boolean;\n defaultOpened?: boolean;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\nexport function useHoverCard(settings: UseHoverCard) {\n const [uncontrolledOpened, setUncontrolledOpened] = useState(settings.defaultOpened);\n const controlled = typeof settings.opened === 'boolean';\n const opened = controlled ? settings.opened : uncontrolledOpened;\n const withinGroup = use(HoverCardGroupContext).withinGroup;\n const uid = useId();\n\n const openTimeout = useRef(-1);\n const closeTimeout = useRef(-1);\n const targetRef = useRef<HTMLElement | null>(null);\n\n const assignTarget = useCallback((node: HTMLElement | null) => {\n targetRef.current = node;\n }, []);\n\n const clearTimeouts = useCallback(() => {\n window.clearTimeout(openTimeout.current);\n window.clearTimeout(closeTimeout.current);\n }, []);\n\n const onChange = useCallback(\n (_opened: boolean) => {\n setUncontrolledOpened(_opened);\n\n if (_opened) {\n setCurrentId(uid);\n settings.onOpen?.();\n } else {\n settings.onClose?.();\n }\n },\n [uid, settings.onOpen, settings.onClose]\n );\n\n const { context, refs } = useFloating({\n open: opened,\n onOpenChange: onChange,\n });\n\n const { delay: groupDelay, setCurrentId } = useDelayGroup(context, { id: uid });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useHover(context, {\n enabled: true,\n delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },\n }),\n useRole(context, { role: 'dialog' }),\n useDismiss(context, { enabled: withinGroup }),\n ]);\n\n const openDropdown = useCallback(() => {\n if (withinGroup) {\n return; // Group mode handles this automatically\n }\n\n clearTimeouts();\n if (settings.openDelay === 0 || settings.openDelay === undefined) {\n onChange(true);\n } else {\n openTimeout.current = window.setTimeout(() => onChange(true), settings.openDelay);\n }\n }, [withinGroup, clearTimeouts, settings.openDelay, onChange]);\n\n const closeDropdown = useCallback(() => {\n if (withinGroup) {\n return; // Group mode handles this automatically\n }\n\n clearTimeouts();\n if (settings.closeDelay === 0 || settings.closeDelay === undefined) {\n onChange(false);\n } else {\n closeTimeout.current = window.setTimeout(() => onChange(false), settings.closeDelay);\n }\n }, [withinGroup, clearTimeouts, settings.closeDelay, onChange]);\n\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n useEffect(() => () => clearTimeouts(), [clearTimeouts]);\n\n useEffect(() => {\n if (!opened || withinGroup || typeof IntersectionObserver === 'undefined') {\n return undefined;\n }\n\n const node = targetRef.current;\n if (!node) {\n return undefined;\n }\n\n const observer = new IntersectionObserver(() => {\n if (!node.isConnected || node.getClientRects().length === 0) {\n clearTimeouts();\n onChangeRef.current(false);\n }\n });\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [opened, withinGroup, clearTimeouts]);\n\n return {\n opened,\n reference: refs.setReference,\n floating: refs.setFloating,\n assignTarget,\n getReferenceProps,\n getFloatingProps,\n openDropdown,\n closeDropdown,\n };\n}\n"],"mappings":";;;;;;AAqBA,SAAgB,aAAa,UAAwB;CACnD,MAAM,CAAC,oBAAoB,0BAAA,GAAA,MAAA,SAAA,CAAkC,SAAS,aAAa;CAEnF,MAAM,SADa,OAAO,SAAS,WAAW,YAClB,SAAS,SAAS;CAC9C,MAAM,eAAA,GAAA,MAAA,IAAA,CAAkBA,uBAAAA,qBAAqB,CAAC,CAAC;CAC/C,MAAM,OAAA,GAAA,eAAA,MAAA,CAAY;CAElB,MAAM,eAAA,GAAA,MAAA,OAAA,CAAqB,EAAE;CAC7B,MAAM,gBAAA,GAAA,MAAA,OAAA,CAAsB,EAAE;CAC9B,MAAM,aAAA,GAAA,MAAA,OAAA,CAAuC,IAAI;CAEjD,MAAM,gBAAA,GAAA,MAAA,YAAA,EAA4B,SAA6B;EAC7D,UAAU,UAAU;CACtB,GAAG,CAAC,CAAC;CAEL,MAAM,iBAAA,GAAA,MAAA,YAAA,OAAkC;EACtC,OAAO,aAAa,YAAY,OAAO;EACvC,OAAO,aAAa,aAAa,OAAO;CAC1C,GAAG,CAAC,CAA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CAAA,GAAA,MAAA,UAAA,aAAsB,cAAc,GAAG,CAAC,aAAa,CAAC;CAEtD,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,CAAC,UAAU,eAAe,OAAO,yBAAyB,aAC5D;EAGF,MAAM,OAAO,UAAU;EACvB,IAAI,CAAC,MACH;EAGF,MAAM,WAAW,IAAI,2BAA2B;GAC9C,IAAI,CAAC,KAAK,eAAe,KAAK,eAAe,CAAC,CAAC,WAAW,GAAG;IAC3D,cAAc;IACd,YAAY,QAAQ,KAAK;GAC3B;EACF,CAAC;EAED,SAAS,QAAQ,IAAI;EACrB,aAAa,SAAS,WAAW;CACnC,GAAG;EAAC;EAAQ;EAAa;CAAa,CAAC;CAEvC,OAAO;EACL;EACA,WAAW,KAAK;EAChB,UAAU,KAAK;EACf;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-hover-card.cjs","names":["useState","use","HoverCardGroupContext","useId","useRef","useCallback","useFloating","useDelayGroup","useInteractions","useHover","useRole","useDismiss"],"sources":["../../../src/components/HoverCard/use-hover-card.ts"],"sourcesContent":["import { use, useCallback, useEffect, useRef, useState } from 'react';\nimport {\n useDelayGroup,\n useDismiss,\n useFloating,\n useHover,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { useId } from '@mantine/hooks';\nimport { HoverCardGroupContext } from './HoverCardGroup/HoverCardGroup';\n\ninterface UseHoverCard {\n openDelay?: number;\n closeDelay?: number;\n opened?: boolean;\n defaultOpened?: boolean;\n onOpen?: () => void;\n onClose?: () => void;\n}\n\nexport function useHoverCard(settings: UseHoverCard) {\n const [uncontrolledOpened, setUncontrolledOpened] = useState(settings.defaultOpened);\n const controlled = typeof settings.opened === 'boolean';\n const opened = controlled ? settings.opened : uncontrolledOpened;\n const withinGroup = use(HoverCardGroupContext).withinGroup;\n const uid = useId();\n\n const openTimeout = useRef(-1);\n const closeTimeout = useRef(-1);\n const targetRef = useRef<HTMLElement | null>(null);\n\n const assignTarget = useCallback((node: HTMLElement | null) => {\n targetRef.current = node;\n }, []);\n\n const clearTimeouts = useCallback(() => {\n window.clearTimeout(openTimeout.current);\n window.clearTimeout(closeTimeout.current);\n }, []);\n\n const onChange = useCallback(\n (_opened: boolean) => {\n setUncontrolledOpened(_opened);\n\n if (_opened) {\n setCurrentId(uid);\n settings.onOpen?.();\n } else {\n settings.onClose?.();\n }\n },\n [uid, settings.onOpen, settings.onClose]\n );\n\n const { context, refs } = useFloating({\n open: opened,\n onOpenChange: onChange,\n });\n\n const { delay: groupDelay, setCurrentId } = useDelayGroup(context, { id: uid });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useHover(context, {\n enabled: true,\n delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },\n }),\n useRole(context, { role: 'dialog' }),\n useDismiss(context, { enabled: withinGroup }),\n ]);\n\n const openDropdown = useCallback(() => {\n if (withinGroup) {\n return; // Group mode handles this automatically\n }\n\n clearTimeouts();\n if (settings.openDelay === 0 || settings.openDelay === undefined) {\n onChange(true);\n } else {\n openTimeout.current = window.setTimeout(() => onChange(true), settings.openDelay);\n }\n }, [withinGroup, clearTimeouts, settings.openDelay, onChange]);\n\n const closeDropdown = useCallback(() => {\n if (withinGroup) {\n return; // Group mode handles this automatically\n }\n\n clearTimeouts();\n if (settings.closeDelay === 0 || settings.closeDelay === undefined) {\n onChange(false);\n } else {\n closeTimeout.current = window.setTimeout(() => onChange(false), settings.closeDelay);\n }\n }, [withinGroup, clearTimeouts, settings.closeDelay, onChange]);\n\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n useEffect(() => () => clearTimeouts(), [clearTimeouts]);\n\n useEffect(() => {\n if (!opened || withinGroup || typeof IntersectionObserver === 'undefined') {\n return undefined;\n }\n\n const node = targetRef.current;\n if (!node) {\n return undefined;\n }\n\n const observer = new IntersectionObserver(() => {\n if (!node.isConnected || node.getClientRects().length === 0) {\n clearTimeouts();\n onChangeRef.current(false);\n }\n });\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [opened, withinGroup, clearTimeouts]);\n\n return {\n opened,\n reference: refs.setReference,\n floating: refs.setFloating,\n assignTarget,\n getReferenceProps,\n getFloatingProps,\n openDropdown,\n closeDropdown,\n };\n}\n"],"mappings":";;;;;;AAqBA,SAAgB,aAAa,UAAwB;CACnD,MAAM,CAAC,oBAAoB,0BAAA,GAAyBA,MAAAA,SAAAA,CAAS,SAAS,aAAa;CAEnF,MAAM,SADa,OAAO,SAAS,WAAW,YAClB,SAAS,SAAS;CAC9C,MAAM,eAAA,GAAcC,MAAAA,IAAAA,CAAIC,uBAAAA,qBAAqB,CAAC,CAAC;CAC/C,MAAM,OAAA,GAAMC,eAAAA,MAAAA,CAAM;CAElB,MAAM,eAAA,GAAcC,MAAAA,OAAAA,CAAO,EAAE;CAC7B,MAAM,gBAAA,GAAeA,MAAAA,OAAAA,CAAO,EAAE;CAC9B,MAAM,aAAA,GAAYA,MAAAA,OAAAA,CAA2B,IAAI;CAEjD,MAAM,gBAAA,GAAeC,MAAAA,YAAAA,EAAa,SAA6B;EAC7D,UAAU,UAAU;CACtB,GAAG,CAAC,CAAC;CAEL,MAAM,iBAAA,GAAgBA,MAAAA,YAAAA,OAAkB;EACtC,OAAO,aAAa,YAAY,OAAO;EACvC,OAAO,aAAa,aAAa,OAAO;CAC1C,GAAG,CAAC,CAAC;CAEL,MAAM,YAAA,GAAWA,MAAAA,YAAAA,EACd,YAAqB;EACpB,sBAAsB,OAAO;EAE7B,IAAI,SAAS;GACX,aAAa,GAAG;GAChB,SAAS,SAAS;EACpB,OACE,SAAS,UAAU;CAEvB,GACA;EAAC;EAAK,SAAS;EAAQ,SAAS;CAAO,CACzC;CAEA,MAAM,EAAE,SAAS,UAAA,GAASC,mBAAAA,YAAAA,CAAY;EACpC,MAAM;EACN,cAAc;CAChB,CAAC;CAED,MAAM,EAAE,OAAO,YAAY,kBAAA,GAAiBC,mBAAAA,cAAAA,CAAc,SAAS,EAAE,IAAI,IAA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AAC,CAAC,WAAW,GAAG;IAC3D,cAAc;IACd,YAAY,QAAQ,KAAK;GAC3B;EACF,CAAC;EAED,SAAS,QAAQ,IAAI;EACrB,aAAa,SAAS,WAAW;CACnC,GAAG;EAAC;EAAQ;EAAa;CAAa,CAAC;CAEvC,OAAO;EACL;EACA,WAAW,KAAK;EAChB,UAAU,KAAK;EACf;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.cjs","names":["createVarsResolver","getRadius","polymorphicFactory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Image/Image.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n getRadius,\n MantineRadius,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Image.module.css';\n\nexport type ImageStylesNames = 'root';\nexport type ImageCssVariables = {\n root: '--image-radius' | '--image-object-fit';\n};\n\nexport interface ImageProps extends BoxProps, StylesApiProps<ImageFactory> {\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default 0 */\n radius?: MantineRadius;\n\n /** Controls `object-fit` style @default 'cover' */\n fit?: React.CSSProperties['objectFit'];\n\n /** Image url used as a fallback if the image cannot be loaded */\n fallbackSrc?: string;\n\n /** Image url */\n src?: any;\n\n /** Called when image fails to load */\n onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;\n}\n\nexport type ImageFactory = PolymorphicFactory<{\n props: ImageProps;\n defaultRef: HTMLImageElement;\n defaultComponent: 'img';\n stylesNames: ImageStylesNames;\n vars: ImageCssVariables;\n}>;\n\nconst varsResolver = createVarsResolver<ImageFactory>((_, { radius, fit }) => ({\n root: {\n '--image-radius': radius === undefined ? undefined : getRadius(radius),\n '--image-object-fit': fit,\n },\n}));\n\nexport const Image = polymorphicFactory<ImageFactory>((_props) => {\n const props = useProps('Image', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n onError,\n src,\n radius,\n fit,\n fallbackSrc,\n mod,\n attributes,\n ...others\n } = props;\n\n const [error, setError] = useState(!src);\n\n useEffect(() => setError(!src), [src]);\n\n const getStyles = useStyles<ImageFactory>({\n name: 'Image',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (error && fallbackSrc) {\n return (\n <Box\n component=\"img\"\n src={fallbackSrc}\n {...getStyles('root')}\n onError={onError}\n mod={['fallback', mod]}\n {...others}\n />\n );\n }\n\n return (\n <Box\n component=\"img\"\n {...getStyles('root')}\n src={src}\n onError={(event) => {\n onError?.(event);\n setError(true);\n }}\n mod={mod}\n {...others}\n />\n );\n});\n\nImage.classes = classes;\nImage.varsResolver = varsResolver;\nImage.displayName = '@mantine/core/Image';\n\nexport namespace Image {\n export type Props = ImageProps;\n export type StylesNames = ImageStylesNames;\n export type CssVariables = ImageCssVariables;\n export type Factory = ImageFactory;\n}\n"],"mappings":";;;;;;;;;;;AA6CA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,QAAQ,WAAW,EAC7E,MAAM;CACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACrE,sBAAsB;AACxB,EACF,EAAE;AAEF,MAAa,QAAQC,4BAAAA,oBAAkC,WAAW;CAChE,MAAM,QAAQC,kBAAAA,SAAS,SAAS,MAAM,MAAM;CAC5C,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,SACA,KACA,QACA,KACA,aACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,CAAqB,CAAC,GAAG;CAEvC,CAAA,GAAA,MAAA,UAAA,OAAgB,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;CAErC,MAAM,YAAYC,mBAAAA,UAAwB;EACxC,MAAM;EACN,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,IAAI,SAAS,aACX,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,WAAU;EACV,KAAK;EACL,GAAI,UAAU,MAAM;EACX;EACT,KAAK,CAAC,YAAY,GAAG;EACrB,GAAI;CACL,CAAA;CAIL,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,KAAD;EACE,WAAU;EACV,GAAI,UAAU,MAAM;EACf;EACL,UAAU,UAAU;GAClB,UAAU,KAAK;GACf,SAAS,IAAI;EACf;EACK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
1
+ {"version":3,"file":"Image.cjs","names":["createVarsResolver","getRadius","polymorphicFactory","useProps","useState","useStyles","Box","classes"],"sources":["../../../src/components/Image/Image.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n getRadius,\n MantineRadius,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Image.module.css';\n\nexport type ImageStylesNames = 'root';\nexport type ImageCssVariables = {\n root: '--image-radius' | '--image-object-fit';\n};\n\nexport interface ImageProps extends BoxProps, StylesApiProps<ImageFactory> {\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default 0 */\n radius?: MantineRadius;\n\n /** Controls `object-fit` style @default 'cover' */\n fit?: React.CSSProperties['objectFit'];\n\n /** Image url used as a fallback if the image cannot be loaded */\n fallbackSrc?: string;\n\n /** Image url */\n src?: any;\n\n /** Called when image fails to load */\n onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;\n}\n\nexport type ImageFactory = PolymorphicFactory<{\n props: ImageProps;\n defaultRef: HTMLImageElement;\n defaultComponent: 'img';\n stylesNames: ImageStylesNames;\n vars: ImageCssVariables;\n}>;\n\nconst varsResolver = createVarsResolver<ImageFactory>((_, { radius, fit }) => ({\n root: {\n '--image-radius': radius === undefined ? undefined : getRadius(radius),\n '--image-object-fit': fit,\n },\n}));\n\nexport const Image = polymorphicFactory<ImageFactory>((_props) => {\n const props = useProps('Image', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n onError,\n src,\n radius,\n fit,\n fallbackSrc,\n mod,\n attributes,\n ...others\n } = props;\n\n const [error, setError] = useState(!src);\n\n useEffect(() => setError(!src), [src]);\n\n const getStyles = useStyles<ImageFactory>({\n name: 'Image',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (error && fallbackSrc) {\n return (\n <Box\n component=\"img\"\n src={fallbackSrc}\n {...getStyles('root')}\n onError={onError}\n mod={['fallback', mod]}\n {...others}\n />\n );\n }\n\n return (\n <Box\n component=\"img\"\n {...getStyles('root')}\n src={src}\n onError={(event) => {\n onError?.(event);\n setError(true);\n }}\n mod={mod}\n {...others}\n />\n );\n});\n\nImage.classes = classes;\nImage.varsResolver = varsResolver;\nImage.displayName = '@mantine/core/Image';\n\nexport namespace Image {\n export type Props = ImageProps;\n export type StylesNames = ImageStylesNames;\n export type CssVariables = ImageCssVariables;\n export type Factory = ImageFactory;\n}\n"],"mappings":";;;;;;;;;;;AA6CA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,QAAQ,WAAW,EAC7E,MAAM;CACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACrE,sBAAsB;AACxB,EACF,EAAE;AAEF,MAAa,QAAQC,4BAAAA,oBAAkC,WAAW;CAChE,MAAM,QAAQC,kBAAAA,SAAS,SAAS,MAAM,MAAM;CAC5C,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,SACA,KACA,QACA,KACA,aACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,CAAC,OAAO,aAAA,GAAYC,MAAAA,SAAAA,CAAS,CAAC,GAAG;CAEvC,CAAA,GAAA,MAAA,UAAA,OAAgB,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;CAErC,MAAM,YAAYC,mBAAAA,UAAwB;EACxC,MAAM;EACN,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,IAAI,SAAS,aACX,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,WAAU;EACV,KAAK;EACL,GAAI,UAAU,MAAM;EACX;EACT,KAAK,CAAC,YAAY,GAAG;EACrB,GAAI;CACL,CAAA;CAIL,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,KAAD;EACE,WAAU;EACV,GAAI,UAAU,MAAM;EACf;EACL,UAAU,UAAU;GAClB,UAAU,KAAK;GACf,SAAS,IAAI;EACf;EACK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.cjs","names":["createVarsResolver","getThemeColor","getAutoContrastValue","getContrastColor","rem","getRadius","getPositionVariables","factory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getAutoContrastValue,\n getContrastColor,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getPositionVariables } from './get-position-variables/get-position-variables';\nimport { IndicatorPosition } from './Indicator.types';\nimport classes from './Indicator.module.css';\n\nexport type IndicatorPositionVariables =\n | '--indicator-top'\n | '--indicator-bottom'\n | '--indicator-left'\n | '--indicator-right'\n | '--indicator-translate-x'\n | '--indicator-translate-y';\n\nexport type IndicatorStylesNames = 'root' | 'indicator';\nexport type IndicatorCssVariables = {\n root:\n | '--indicator-color'\n | '--indicator-text-color'\n | '--indicator-size'\n | '--indicator-radius'\n | '--indicator-z-index'\n | IndicatorPositionVariables;\n};\n\nexport interface IndicatorProps\n extends BoxProps, StylesApiProps<IndicatorFactory>, ElementProps<'div'> {\n /** Indicator position relative to the target element @default 'top-end' */\n position?: IndicatorPosition;\n\n /** Distance in pixels to offset the indicator from its default position, useful for elements with border-radius. Can be a number for uniform offset or an object with `x` and `y` properties for separate horizontal and vertical offsets @default 0 */\n offset?: number | { x: number; y: number };\n\n /** Changes container display from block to inline-block, use when wrapping elements with fixed width @default false */\n inline?: boolean;\n\n /** Indicator width and height @default 10 */\n size?: number | string;\n\n /** Label displayed inside the indicator, for example, notification count */\n label?: React.ReactNode;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default 100 */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color value @default theme.primaryColor */\n color?: MantineColor;\n\n /** Adds border to the root element */\n withBorder?: boolean;\n\n /** Hides the indicator when set */\n disabled?: boolean;\n\n /** If set, the indicator has processing animation @default false */\n processing?: boolean;\n\n /** Indicator z-index @default 200 */\n zIndex?: string | number;\n\n /** If set, adjusts text color based on background color */\n autoContrast?: boolean;\n\n /** Maximum value to display. If label is a number greater than this value, it will be displayed as `{maxValue}+` */\n maxValue?: number;\n\n /** Determines whether indicator with label `0` should be displayed @default true */\n showZero?: boolean;\n}\n\nexport type IndicatorFactory = Factory<{\n props: IndicatorProps;\n ref: HTMLDivElement;\n stylesNames: IndicatorStylesNames;\n vars: IndicatorCssVariables;\n}>;\n\nconst defaultProps = {\n position: 'top-end',\n offset: 0,\n showZero: true,\n} satisfies Partial<IndicatorProps>;\n\nconst varsResolver = createVarsResolver<IndicatorFactory>(\n (theme, { color, position, offset, size, radius, zIndex, autoContrast }) => ({\n root: {\n '--indicator-color': color ? getThemeColor(color, theme) : undefined,\n '--indicator-text-color': getAutoContrastValue(autoContrast, theme)\n ? getContrastColor({ color, theme, autoContrast })\n : undefined,\n '--indicator-size': rem(size),\n '--indicator-radius': radius === undefined ? undefined : getRadius(radius),\n '--indicator-z-index': zIndex?.toString(),\n ...getPositionVariables(position, offset),\n },\n })\n);\n\nexport const Indicator = factory<IndicatorFactory>((_props) => {\n const props = useProps('Indicator', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n position,\n offset,\n inline,\n label,\n radius,\n color,\n withBorder,\n disabled,\n processing,\n zIndex,\n autoContrast,\n maxValue,\n showZero,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<IndicatorFactory>({\n name: 'Indicator',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const shouldHideZero = !showZero && (label === 0 || label === '0');\n const formattedLabel =\n maxValue !== undefined && typeof label === 'number' && label > maxValue\n ? `${maxValue}+`\n : label;\n\n return (\n <Box {...getStyles('root')} mod={[{ inline }, mod]} {...others}>\n {!disabled && !shouldHideZero && (\n <Box\n mod={{ 'with-label': !!label, 'with-border': withBorder, processing }}\n {...getStyles('indicator')}\n >\n {formattedLabel}\n </Box>\n )}\n {children}\n </Box>\n );\n});\n\nIndicator.classes = classes;\nIndicator.varsResolver = varsResolver;\nIndicator.displayName = '@mantine/core/Indicator';\n\nexport namespace Indicator {\n export type Props = IndicatorProps;\n export type StylesNames = IndicatorStylesNames;\n export type CssVariables = IndicatorCssVariables;\n export type Factory = IndicatorFactory;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6FA,MAAM,eAAe;CACnB,UAAU;CACV,QAAQ;CACR,UAAU;AACZ;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,OAAO,UAAU,QAAQ,MAAM,QAAQ,QAAQ,oBAAoB,EAC3E,MAAM;CACJ,qBAAqB,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CAC3D,0BAA0BC,gCAAAA,qBAAqB,cAAc,KAAK,IAC9DC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;CAAa,CAAC,IAC/C,KAAA;CACJ,oBAAoBC,YAAAA,IAAI,IAAI;CAC5B,sBAAsB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACzE,uBAAuB,QAAQ,SAAS;CACxC,GAAGC,+BAAAA,qBAAqB,UAAU,MAAM;AAC1C,EACF,EACF;AAEA,MAAa,YAAYC,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS,aAAa,cAAc,MAAM;CACxD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,UACA,QACA,QACA,OACA,QACA,OACA,YACA,UACA,YACA,QACA,cACA,UACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA4B;EAC5C,MAAM;EACN,SAAA,yBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,iBAAiB,CAAC,aAAa,UAAU,KAAK,UAAU;CAC9D,MAAM,iBACJ,aAAa,KAAA,KAAa,OAAO,UAAU,YAAY,QAAQ,WAC3D,GAAG,SAAS,KACZ;CAEN,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,YAAAA,KAAD;EAAK,GAAI,UAAU,MAAM;EAAG,KAAK,CAAC,EAAE,OAAO,GAAG,GAAG;EAAG,GAAI;YAAxD,CACG,CAAC,YAAY,CAAC,kBACb,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,KAAD;GACE,KAAK;IAAE,cAAc,CAAC,CAAC;IAAO,eAAe;IAAY;GAAW;GACpE,GAAI,UAAU,WAAW;aAExB;EACE,CAAA,GAEN,QACE;;AAET,CAAC;AAED,UAAU,UAAUC,yBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
1
+ {"version":3,"file":"Indicator.cjs","names":["createVarsResolver","getThemeColor","getAutoContrastValue","getContrastColor","rem","getRadius","getPositionVariables","factory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getAutoContrastValue,\n getContrastColor,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getPositionVariables } from './get-position-variables/get-position-variables';\nimport { IndicatorPosition } from './Indicator.types';\nimport classes from './Indicator.module.css';\n\nexport type IndicatorPositionVariables =\n | '--indicator-top'\n | '--indicator-bottom'\n | '--indicator-left'\n | '--indicator-right'\n | '--indicator-translate-x'\n | '--indicator-translate-y';\n\nexport type IndicatorStylesNames = 'root' | 'indicator';\nexport type IndicatorCssVariables = {\n root:\n | '--indicator-color'\n | '--indicator-text-color'\n | '--indicator-size'\n | '--indicator-radius'\n | '--indicator-z-index'\n | IndicatorPositionVariables;\n};\n\nexport interface IndicatorProps\n extends BoxProps, StylesApiProps<IndicatorFactory>, ElementProps<'div'> {\n /** Indicator position relative to the target element @default 'top-end' */\n position?: IndicatorPosition;\n\n /** Distance in pixels to offset the indicator from its default position, useful for elements with border-radius. Can be a number for uniform offset or an object with `x` and `y` properties for separate horizontal and vertical offsets @default 0 */\n offset?: number | { x: number; y: number };\n\n /** Changes container display from block to inline-block, use when wrapping elements with fixed width @default false */\n inline?: boolean;\n\n /** Indicator width and height @default 10 */\n size?: number | string;\n\n /** Label displayed inside the indicator, for example, notification count */\n label?: React.ReactNode;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default 100 */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color value @default theme.primaryColor */\n color?: MantineColor;\n\n /** Adds border to the root element */\n withBorder?: boolean;\n\n /** Hides the indicator when set */\n disabled?: boolean;\n\n /** If set, the indicator has processing animation @default false */\n processing?: boolean;\n\n /** Indicator z-index @default 200 */\n zIndex?: string | number;\n\n /** If set, adjusts text color based on background color */\n autoContrast?: boolean;\n\n /** Maximum value to display. If label is a number greater than this value, it will be displayed as `{maxValue}+` */\n maxValue?: number;\n\n /** Determines whether indicator with label `0` should be displayed @default true */\n showZero?: boolean;\n}\n\nexport type IndicatorFactory = Factory<{\n props: IndicatorProps;\n ref: HTMLDivElement;\n stylesNames: IndicatorStylesNames;\n vars: IndicatorCssVariables;\n}>;\n\nconst defaultProps = {\n position: 'top-end',\n offset: 0,\n showZero: true,\n} satisfies Partial<IndicatorProps>;\n\nconst varsResolver = createVarsResolver<IndicatorFactory>(\n (theme, { color, position, offset, size, radius, zIndex, autoContrast }) => ({\n root: {\n '--indicator-color': color ? getThemeColor(color, theme) : undefined,\n '--indicator-text-color': getAutoContrastValue(autoContrast, theme)\n ? getContrastColor({ color, theme, autoContrast })\n : undefined,\n '--indicator-size': rem(size),\n '--indicator-radius': radius === undefined ? undefined : getRadius(radius),\n '--indicator-z-index': zIndex?.toString(),\n ...getPositionVariables(position, offset),\n },\n })\n);\n\nexport const Indicator = factory<IndicatorFactory>((_props) => {\n const props = useProps('Indicator', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n position,\n offset,\n inline,\n label,\n radius,\n color,\n withBorder,\n disabled,\n processing,\n zIndex,\n autoContrast,\n maxValue,\n showZero,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<IndicatorFactory>({\n name: 'Indicator',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const shouldHideZero = !showZero && (label === 0 || label === '0');\n const formattedLabel =\n maxValue !== undefined && typeof label === 'number' && label > maxValue\n ? `${maxValue}+`\n : label;\n\n return (\n <Box {...getStyles('root')} mod={[{ inline }, mod]} {...others}>\n {!disabled && !shouldHideZero && (\n <Box\n mod={{ 'with-label': !!label, 'with-border': withBorder, processing }}\n {...getStyles('indicator')}\n >\n {formattedLabel}\n </Box>\n )}\n {children}\n </Box>\n );\n});\n\nIndicator.classes = classes;\nIndicator.varsResolver = varsResolver;\nIndicator.displayName = '@mantine/core/Indicator';\n\nexport namespace Indicator {\n export type Props = IndicatorProps;\n export type StylesNames = IndicatorStylesNames;\n export type CssVariables = IndicatorCssVariables;\n export type Factory = IndicatorFactory;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6FA,MAAM,eAAe;CACnB,UAAU;CACV,QAAQ;CACR,UAAU;AACZ;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,OAAO,UAAU,QAAQ,MAAM,QAAQ,QAAQ,oBAAoB,EAC3E,MAAM;CACJ,qBAAqB,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CAC3D,0BAA0BC,gCAAAA,qBAAqB,cAAc,KAAK,IAC9DC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;CAAa,CAAC,IAC/C,KAAA;CACJ,oBAAoBC,YAAAA,IAAI,IAAI;CAC5B,sBAAsB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACzE,uBAAuB,QAAQ,SAAS;CACxC,GAAGC,+BAAAA,qBAAqB,UAAU,MAAM;AAC1C,EACF,EACF;AAEA,MAAa,YAAYC,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS,aAAa,cAAc,MAAM;CACxD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,UACA,QACA,QACA,OACA,QACA,OACA,YACA,UACA,YACA,QACA,cACA,UACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA4B;EAC5C,MAAM;EACN,SAAA,yBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,iBAAiB,CAAC,aAAa,UAAU,KAAK,UAAU;CAC9D,MAAM,iBACJ,aAAa,KAAA,KAAa,OAAO,UAAU,YAAY,QAAQ,WAC3D,GAAG,SAAS,KACZ;CAEN,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,YAAAA,KAAD;EAAK,GAAI,UAAU,MAAM;EAAG,KAAK,CAAC,EAAE,OAAO,GAAG,GAAG;EAAG,GAAI;EAAxD,UAAA,CACG,CAAC,YAAY,CAAC,kBACb,iBAAA,GAAA,kBAAA,IAAA,CAACA,YAAAA,KAAD;GACE,KAAK;IAAE,cAAc,CAAC,CAAC;IAAO,eAAe;IAAY;GAAW;GACpE,GAAI,UAAU,WAAW;GAExB,UAAA;EACE,CAAA,GAEN,QACE;;AAET,CAAC;AAED,UAAU,UAAUC,yBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
@@ -100,9 +100,9 @@ const Input = require_polymorphic_factory.polymorphicFactory((_props) => {
100
100
  pointer,
101
101
  disabled,
102
102
  multiline,
103
- "data-with-right-section": !!_rightSection,
104
- "data-with-left-section": !!_leftSection,
105
- "data-with-bottom-section": !!__bottomSection
103
+ withRightSection: !!_rightSection,
104
+ withLeftSection: !!_leftSection,
105
+ withBottomSection: !!__bottomSection
106
106
  }, mod],
107
107
  variant,
108
108
  size,
@@ -1 +1 @@
1
- {"version":3,"file":"Input.cjs","names":["createVarsResolver","getSize","getFontSize","getRadius","rem","polymorphicFactory","useProps","extractStyleProps","InputWrapperContext","useStyles","Loader","InputClearSection","InputContext","Box","classes","InputWrapper","InputLabel","InputError","InputSuccess","InputDescription","InputPlaceholder","InputClearButton"],"sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { use } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n extractStyleProps,\n getFontSize,\n getRadius,\n getSize,\n MantineRadius,\n MantineSize,\n polymorphicFactory,\n PolymorphicFactory,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Loader } from '../Loader/Loader';\nimport { InputContext } from './Input.context';\nimport {\n InputClearButton,\n type InputClearButtonProps,\n type InputClearButtonFactory,\n} from './InputClearButton/InputClearButton';\nimport {\n ClearSectionMode,\n InputClearSection,\n type InputClearSectionProps,\n} from './InputClearSection/InputClearSection';\nimport {\n InputDescription,\n type InputDescriptionProps,\n type InputDescriptionStylesNames,\n type InputDescriptionCssVariables,\n type InputDescriptionFactory,\n} from './InputDescription/InputDescription';\nimport {\n InputError,\n type InputErrorProps,\n type InputErrorStylesNames,\n type InputErrorCssVariables,\n type InputErrorFactory,\n} from './InputError/InputError';\nimport {\n InputLabel,\n type InputLabelProps,\n type InputLabelStylesNames,\n type InputLabelCssVariables,\n type InputLabelFactory,\n} from './InputLabel/InputLabel';\nimport {\n InputPlaceholder,\n type InputPlaceholderProps,\n type InputPlaceholderStylesNames,\n type InputPlaceholderFactory,\n} from './InputPlaceholder/InputPlaceholder';\nimport { InputSuccess } from './InputSuccess/InputSuccess';\nimport { InputWrapperContext } from './InputWrapper.context';\nimport {\n __InputWrapperProps,\n InputWrapper,\n InputWrapperStylesNames,\n type InputWrapperProps,\n type InputWrapperFactory,\n} from './InputWrapper/InputWrapper';\nimport classes from './Input.module.css';\n// Required to be a separate type for docgen script\ntype WrapperProps = React.ComponentProps<'div'> & DataAttributes;\n\nexport interface __BaseInputProps extends __InputWrapperProps, __InputProps {\n /** Props passed down to the root element */\n wrapperProps?: WrapperProps;\n}\n\nexport type __InputStylesNames = InputStylesNames | InputWrapperStylesNames;\n\nexport type InputStylesNames = 'input' | 'wrapper' | 'section' | 'bottomSection';\nexport type InputVariant = 'default' | 'filled' | 'unstyled';\nexport type InputCssVariables = {\n wrapper:\n | '--input-height'\n | '--input-fz'\n | '--input-radius'\n | '--input-left-section-width'\n | '--input-right-section-width'\n | '--input-left-section-pointer-events'\n | '--input-right-section-pointer-events'\n | '--input-padding-y'\n | '--input-margin-top'\n | '--input-margin-bottom';\n};\n\nexport interface InputStylesCtx {\n offsetTop: boolean | undefined;\n offsetBottom: boolean | undefined;\n}\n\nexport interface __InputProps {\n /** Content section displayed on the left side of the input */\n leftSection?: React.ReactNode;\n\n /** Left section width, used to set `width` of the section and input `padding-left`, by default equals to the input height */\n leftSectionWidth?: React.CSSProperties['width'];\n\n /** Props passed down to the `leftSection` element */\n leftSectionProps?: React.ComponentProps<'div'>;\n\n /** Sets `pointer-events` styles on the `leftSection` element. Use `'all'` when section contains interactive elements (buttons, links). @default 'none' */\n leftSectionPointerEvents?: React.CSSProperties['pointerEvents'];\n\n /** Content section displayed on the right side of the input */\n rightSection?: React.ReactNode;\n\n /** Right section width, used to set `width` of the section and input `padding-right`, by default equals to the input height */\n rightSectionWidth?: React.CSSProperties['width'];\n\n /** Props passed down to the `rightSection` element */\n rightSectionProps?: React.ComponentProps<'div'>;\n\n /** Sets `pointer-events` styles on the `rightSection` element. Use `'all'` when section contains interactive elements (buttons, links). @default 'none' */\n rightSectionPointerEvents?: React.CSSProperties['pointerEvents'];\n\n /** Sets `required` attribute on the `input` element */\n required?: boolean;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Sets `disabled` attribute on the `input` element */\n disabled?: boolean;\n\n /** Controls input `height`, horizontal `padding`, and `font-size` @default 'sm' */\n size?: MantineSize | (string & {});\n\n /** Determines whether the input should have `cursor: pointer` style. Use when input acts as a button-like trigger (e.g., `component=\"button\"` for Select/DatePicker). @default false */\n pointer?: boolean;\n\n /** Determines whether the input should have red border and red text color when the `error` prop is set @default true */\n withErrorStyles?: boolean;\n\n /** Determines whether the input should have green border when the `success` prop is set @default true */\n withSuccessStyles?: boolean;\n\n /** HTML `size` attribute for the input element (number of visible characters) */\n inputSize?: string;\n\n /** Section to be displayed when the input is `__clearable` and `rightSection` is not defined */\n __clearSection?: React.ReactNode;\n\n /** Determines whether the `__clearSection` should be displayed if it is passed to the component, has no effect if `rightSection` is defined */\n __clearable?: boolean;\n\n /** Determines how the clear button and rightSection are rendered @default 'both' */\n __clearSectionMode?: ClearSectionMode;\n\n /** Right section displayed when both `__clearSection` and `rightSection` are not defined */\n __defaultRightSection?: React.ReactNode;\n\n /** Displays loading indicator in the left or right section @default false */\n loading?: boolean;\n\n /** Position of the loading indicator @default 'right' */\n loadingPosition?: 'left' | 'right';\n\n /** Content section displayed at the bottom of the input, inside the border */\n __bottomSection?: React.ReactNode;\n\n /** Props passed down to the `__bottomSection` element */\n __bottomSectionProps?: React.ComponentProps<'div'>;\n}\n\nexport interface InputProps extends BoxProps, __InputProps, StylesApiProps<InputFactory> {\n __staticSelector?: string;\n\n /** Props passed to Styles API context, replaces `Input.Wrapper` props */\n __stylesApiProps?: Record<string, any>;\n\n /** Determines whether the input should have error styles and `aria-invalid` attribute */\n error?: React.ReactNode;\n\n /** Determines whether the input should have success styles */\n success?: React.ReactNode;\n\n /** Adjusts padding and sizing calculations for multiline inputs (use with `component=\"textarea\"`). Does not make the input multiline by itself. @default false */\n multiline?: boolean;\n\n /** Input element id */\n id?: string;\n\n /** Determines whether `aria-` and other accessibility attributes should be added to the input. Only disable when implementing custom accessibility handling. @default true */\n withAria?: boolean;\n\n /** Props passed down to the root element of the `Input` component */\n wrapperProps?: WrapperProps;\n\n /** Root element ref */\n rootRef?: React.Ref<HTMLDivElement>;\n}\n\nexport type InputFactory = PolymorphicFactory<{\n props: InputProps;\n defaultRef: HTMLInputElement;\n defaultComponent: 'input';\n stylesNames: InputStylesNames;\n variant: InputVariant;\n vars: InputCssVariables;\n ctx: InputStylesCtx;\n staticComponents: {\n Label: typeof InputLabel;\n Error: typeof InputError;\n Success: typeof InputSuccess;\n Description: typeof InputDescription;\n Placeholder: typeof InputPlaceholder;\n Wrapper: typeof InputWrapper;\n ClearButton: typeof InputClearButton;\n };\n}>;\n\nconst defaultProps = {\n variant: 'default',\n leftSectionPointerEvents: 'none',\n rightSectionPointerEvents: 'none',\n withAria: true,\n withErrorStyles: true,\n withSuccessStyles: true,\n size: 'sm',\n loading: false,\n loadingPosition: 'right',\n} satisfies Partial<InputProps>;\n\nconst varsResolver = createVarsResolver<InputFactory>((_, props, ctx) => ({\n wrapper: {\n '--input-margin-top': ctx.offsetTop ? 'calc(var(--mantine-spacing-xs) / 2)' : undefined,\n '--input-margin-bottom': ctx.offsetBottom ? 'calc(var(--mantine-spacing-xs) / 2)' : undefined,\n '--input-height': getSize(props.size, 'input-height'),\n '--input-fz': getFontSize(props.size),\n '--input-radius': props.radius === undefined ? undefined : getRadius(props.radius),\n '--input-left-section-width':\n props.leftSectionWidth !== undefined ? rem(props.leftSectionWidth) : undefined,\n '--input-right-section-width':\n props.rightSectionWidth !== undefined ? rem(props.rightSectionWidth) : undefined,\n '--input-padding-y': props.multiline ? getSize(props.size, 'input-padding-y') : undefined,\n '--input-left-section-pointer-events': props.leftSectionPointerEvents,\n '--input-right-section-pointer-events': props.rightSectionPointerEvents,\n },\n}));\n\nexport const Input = polymorphicFactory<InputFactory>((_props) => {\n const props = useProps('Input', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n required,\n __staticSelector,\n __stylesApiProps,\n size,\n wrapperProps,\n error,\n success,\n disabled,\n leftSection,\n leftSectionProps,\n leftSectionWidth,\n rightSection,\n rightSectionProps,\n rightSectionWidth,\n rightSectionPointerEvents,\n leftSectionPointerEvents,\n variant,\n vars,\n pointer,\n multiline,\n radius,\n id,\n withAria,\n withErrorStyles,\n withSuccessStyles,\n mod,\n inputSize,\n attributes,\n __clearSection,\n __clearable,\n __clearSectionMode,\n __defaultRightSection,\n loading,\n loadingPosition,\n __bottomSection,\n __bottomSectionProps,\n rootRef,\n dir,\n ...others\n } = props as typeof props & Pick<React.HTMLAttributes<HTMLDivElement>, 'dir'>;\n\n const { styleProps, rest } = extractStyleProps(others);\n const ctx = use(InputWrapperContext);\n const stylesCtx: InputStylesCtx = { offsetBottom: ctx?.offsetBottom, offsetTop: ctx?.offsetTop };\n\n const getStyles = useStyles<InputFactory>({\n name: ['Input', __staticSelector],\n props: __stylesApiProps || props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n stylesCtx,\n rootSelector: 'wrapper',\n vars,\n varsResolver,\n });\n\n const ariaAttributes = withAria\n ? {\n required,\n disabled,\n 'aria-invalid': error ? true : undefined,\n 'aria-describedby': ctx?.describedBy,\n id: ctx?.inputId || id,\n }\n : {};\n\n const loadingIndicator = loading ? (\n <Loader\n size={\n loadingPosition === 'left'\n ? 'calc(var(--input-left-section-size) / 2)'\n : 'calc(var(--input-right-section-size) / 2)'\n }\n />\n ) : null;\n\n const _leftSection = loading && loadingPosition === 'left' ? loadingIndicator : leftSection;\n const _rightSection: React.ReactNode = InputClearSection({\n __clearable,\n __clearSection,\n rightSection: loading && loadingPosition === 'right' ? loadingIndicator : rightSection,\n __defaultRightSection,\n size,\n __clearSectionMode,\n });\n\n return (\n <InputContext value={{ size: size || 'sm' }}>\n <Box\n ref={rootRef}\n dir={dir}\n {...getStyles('wrapper')}\n {...styleProps}\n {...wrapperProps}\n mod={[\n {\n error: !!error && withErrorStyles,\n success: !!success && !error && withSuccessStyles,\n pointer,\n disabled,\n multiline,\n 'data-with-right-section': !!_rightSection,\n 'data-with-left-section': !!_leftSection,\n 'data-with-bottom-section': !!__bottomSection,\n },\n mod,\n ]}\n variant={variant}\n size={size}\n >\n {_leftSection && (\n <div\n {...leftSectionProps}\n data-position=\"left\"\n {...getStyles('section', {\n className: leftSectionProps?.className,\n style: leftSectionProps?.style,\n })}\n >\n {_leftSection}\n </div>\n )}\n\n <Box\n component=\"input\"\n {...rest}\n {...ariaAttributes}\n required={required}\n mod={{\n disabled,\n error: !!error && withErrorStyles,\n success: !!success && !error && withSuccessStyles,\n }}\n variant={variant}\n __size={inputSize}\n {...getStyles('input')}\n />\n\n {__bottomSection && (\n <div\n {...__bottomSectionProps}\n {...getStyles('bottomSection', {\n className: __bottomSectionProps?.className,\n style: __bottomSectionProps?.style,\n })}\n >\n {__bottomSection}\n </div>\n )}\n\n {_rightSection && (\n <div\n {...rightSectionProps}\n data-position=\"right\"\n {...getStyles('section', {\n className: rightSectionProps?.className,\n style: rightSectionProps?.style,\n })}\n >\n {_rightSection}\n </div>\n )}\n </Box>\n </InputContext>\n );\n});\n\nInput.classes = classes;\nInput.varsResolver = varsResolver;\nInput.Wrapper = InputWrapper;\nInput.Label = InputLabel;\nInput.Error = InputError;\nInput.Success = InputSuccess;\nInput.Description = InputDescription;\nInput.Placeholder = InputPlaceholder;\nInput.ClearButton = InputClearButton;\nInput.displayName = '@mantine/core/Input';\n\nexport namespace Input {\n export type Props = InputProps;\n export type StylesNames = InputStylesNames;\n export type CssVariables = InputCssVariables;\n export type Factory = InputFactory;\n\n export namespace Wrapper {\n export type Props = InputWrapperProps;\n export type StylesNames = InputWrapperStylesNames;\n export type Factory = InputWrapperFactory;\n }\n\n export namespace Description {\n export type Props = InputDescriptionProps;\n export type StylesNames = InputDescriptionStylesNames;\n export type CssVariables = InputDescriptionCssVariables;\n export type Factory = InputDescriptionFactory;\n }\n\n export namespace Error {\n export type Props = InputErrorProps;\n export type StylesNames = InputErrorStylesNames;\n export type CssVariables = InputErrorCssVariables;\n export type Factory = InputErrorFactory;\n }\n\n export namespace Label {\n export type Props = InputLabelProps;\n export type StylesNames = InputLabelStylesNames;\n export type CssVariables = InputLabelCssVariables;\n export type Factory = InputLabelFactory;\n }\n\n export namespace Placeholder {\n export type Props = InputPlaceholderProps;\n export type StylesNames = InputPlaceholderStylesNames;\n export type Factory = InputPlaceholderFactory;\n }\n\n export namespace ClearButton {\n export type Props = InputClearButtonProps;\n export type Factory = InputClearButtonFactory;\n }\n\n export namespace ClearSection {\n export type Props = InputClearSectionProps;\n export type Mode = ClearSectionMode;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4NA,MAAM,eAAe;CACnB,SAAS;CACT,0BAA0B;CAC1B,2BAA2B;CAC3B,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,MAAM;CACN,SAAS;CACT,iBAAiB;AACnB;AAEA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,OAAO,SAAS,EACxE,SAAS;CACP,sBAAsB,IAAI,YAAY,wCAAwC,KAAA;C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GAAA,kBAAA,IAAA,CAAC,OAAD;KACE,GAAI;KACJ,GAAI,UAAU,iBAAiB;MAC7B,WAAW,sBAAsB;MACjC,OAAO,sBAAsB;KAC/B,CAAC;eAEA;IACE,CAAA;IAGN,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KACE,GAAI;KACJ,iBAAc;KACd,GAAI,UAAU,WAAW;MACvB,WAAW,mBAAmB;MAC9B,OAAO,mBAAmB;KAC5B,CAAC;eAEA;IACE,CAAA;GAEJ;;CACO,CAAA;AAElB,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,UAAUC,qBAAAA;AAChB,MAAM,QAAQC,mBAAAA;AACd,MAAM,QAAQC,mBAAAA;AACd,MAAM,UAAUC,qBAAAA;AAChB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAc"}
1
+ {"version":3,"file":"Input.cjs","names":["createVarsResolver","getSize","getFontSize","getRadius","rem","polymorphicFactory","useProps","extractStyleProps","use","InputWrapperContext","useStyles","Loader","InputClearSection","InputContext","Box","classes","InputWrapper","InputLabel","InputError","InputSuccess","InputDescription","InputPlaceholder","InputClearButton"],"sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { use } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n DataAttributes,\n extractStyleProps,\n getFontSize,\n getRadius,\n getSize,\n MantineRadius,\n MantineSize,\n polymorphicFactory,\n PolymorphicFactory,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Loader } from '../Loader/Loader';\nimport { InputContext } from './Input.context';\nimport {\n InputClearButton,\n type InputClearButtonProps,\n type InputClearButtonFactory,\n} from './InputClearButton/InputClearButton';\nimport {\n ClearSectionMode,\n InputClearSection,\n type InputClearSectionProps,\n} from './InputClearSection/InputClearSection';\nimport {\n InputDescription,\n type InputDescriptionProps,\n type InputDescriptionStylesNames,\n type InputDescriptionCssVariables,\n type InputDescriptionFactory,\n} from './InputDescription/InputDescription';\nimport {\n InputError,\n type InputErrorProps,\n type InputErrorStylesNames,\n type InputErrorCssVariables,\n type InputErrorFactory,\n} from './InputError/InputError';\nimport {\n InputLabel,\n type InputLabelProps,\n type InputLabelStylesNames,\n type InputLabelCssVariables,\n type InputLabelFactory,\n} from './InputLabel/InputLabel';\nimport {\n InputPlaceholder,\n type InputPlaceholderProps,\n type InputPlaceholderStylesNames,\n type InputPlaceholderFactory,\n} from './InputPlaceholder/InputPlaceholder';\nimport { InputSuccess } from './InputSuccess/InputSuccess';\nimport { InputWrapperContext } from './InputWrapper.context';\nimport {\n __InputWrapperProps,\n InputWrapper,\n InputWrapperStylesNames,\n type InputWrapperProps,\n type InputWrapperFactory,\n} from './InputWrapper/InputWrapper';\nimport classes from './Input.module.css';\n// Required to be a separate type for docgen script\ntype WrapperProps = React.ComponentProps<'div'> & DataAttributes;\n\nexport interface __BaseInputProps extends __InputWrapperProps, __InputProps {\n /** Props passed down to the root element */\n wrapperProps?: WrapperProps;\n}\n\nexport type __InputStylesNames = InputStylesNames | InputWrapperStylesNames;\n\nexport type InputStylesNames = 'input' | 'wrapper' | 'section' | 'bottomSection';\nexport type InputVariant = 'default' | 'filled' | 'unstyled';\nexport type InputCssVariables = {\n wrapper:\n | '--input-height'\n | '--input-fz'\n | '--input-radius'\n | '--input-left-section-width'\n | '--input-right-section-width'\n | '--input-left-section-pointer-events'\n | '--input-right-section-pointer-events'\n | '--input-padding-y'\n | '--input-margin-top'\n | '--input-margin-bottom';\n};\n\nexport interface InputStylesCtx {\n offsetTop: boolean | undefined;\n offsetBottom: boolean | undefined;\n}\n\nexport interface __InputProps {\n /** Content section displayed on the left side of the input */\n leftSection?: React.ReactNode;\n\n /** Left section width, used to set `width` of the section and input `padding-left`, by default equals to the input height */\n leftSectionWidth?: React.CSSProperties['width'];\n\n /** Props passed down to the `leftSection` element */\n leftSectionProps?: React.ComponentProps<'div'>;\n\n /** Sets `pointer-events` styles on the `leftSection` element. Use `'all'` when section contains interactive elements (buttons, links). @default 'none' */\n leftSectionPointerEvents?: React.CSSProperties['pointerEvents'];\n\n /** Content section displayed on the right side of the input */\n rightSection?: React.ReactNode;\n\n /** Right section width, used to set `width` of the section and input `padding-right`, by default equals to the input height */\n rightSectionWidth?: React.CSSProperties['width'];\n\n /** Props passed down to the `rightSection` element */\n rightSectionProps?: React.ComponentProps<'div'>;\n\n /** Sets `pointer-events` styles on the `rightSection` element. Use `'all'` when section contains interactive elements (buttons, links). @default 'none' */\n rightSectionPointerEvents?: React.CSSProperties['pointerEvents'];\n\n /** Sets `required` attribute on the `input` element */\n required?: boolean;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Sets `disabled` attribute on the `input` element */\n disabled?: boolean;\n\n /** Controls input `height`, horizontal `padding`, and `font-size` @default 'sm' */\n size?: MantineSize | (string & {});\n\n /** Determines whether the input should have `cursor: pointer` style. Use when input acts as a button-like trigger (e.g., `component=\"button\"` for Select/DatePicker). @default false */\n pointer?: boolean;\n\n /** Determines whether the input should have red border and red text color when the `error` prop is set @default true */\n withErrorStyles?: boolean;\n\n /** Determines whether the input should have green border when the `success` prop is set @default true */\n withSuccessStyles?: boolean;\n\n /** HTML `size` attribute for the input element (number of visible characters) */\n inputSize?: string;\n\n /** Section to be displayed when the input is `__clearable` and `rightSection` is not defined */\n __clearSection?: React.ReactNode;\n\n /** Determines whether the `__clearSection` should be displayed if it is passed to the component, has no effect if `rightSection` is defined */\n __clearable?: boolean;\n\n /** Determines how the clear button and rightSection are rendered @default 'both' */\n __clearSectionMode?: ClearSectionMode;\n\n /** Right section displayed when both `__clearSection` and `rightSection` are not defined */\n __defaultRightSection?: React.ReactNode;\n\n /** Displays loading indicator in the left or right section @default false */\n loading?: boolean;\n\n /** Position of the loading indicator @default 'right' */\n loadingPosition?: 'left' | 'right';\n\n /** Content section displayed at the bottom of the input, inside the border */\n __bottomSection?: React.ReactNode;\n\n /** Props passed down to the `__bottomSection` element */\n __bottomSectionProps?: React.ComponentProps<'div'>;\n}\n\nexport interface InputProps extends BoxProps, __InputProps, StylesApiProps<InputFactory> {\n __staticSelector?: string;\n\n /** Props passed to Styles API context, replaces `Input.Wrapper` props */\n __stylesApiProps?: Record<string, any>;\n\n /** Determines whether the input should have error styles and `aria-invalid` attribute */\n error?: React.ReactNode;\n\n /** Determines whether the input should have success styles */\n success?: React.ReactNode;\n\n /** Adjusts padding and sizing calculations for multiline inputs (use with `component=\"textarea\"`). Does not make the input multiline by itself. @default false */\n multiline?: boolean;\n\n /** Input element id */\n id?: string;\n\n /** Determines whether `aria-` and other accessibility attributes should be added to the input. Only disable when implementing custom accessibility handling. @default true */\n withAria?: boolean;\n\n /** Props passed down to the root element of the `Input` component */\n wrapperProps?: WrapperProps;\n\n /** Root element ref */\n rootRef?: React.Ref<HTMLDivElement>;\n}\n\nexport type InputFactory = PolymorphicFactory<{\n props: InputProps;\n defaultRef: HTMLInputElement;\n defaultComponent: 'input';\n stylesNames: InputStylesNames;\n variant: InputVariant;\n vars: InputCssVariables;\n ctx: InputStylesCtx;\n staticComponents: {\n Label: typeof InputLabel;\n Error: typeof InputError;\n Success: typeof InputSuccess;\n Description: typeof InputDescription;\n Placeholder: typeof InputPlaceholder;\n Wrapper: typeof InputWrapper;\n ClearButton: typeof InputClearButton;\n };\n}>;\n\nconst defaultProps = {\n variant: 'default',\n leftSectionPointerEvents: 'none',\n rightSectionPointerEvents: 'none',\n withAria: true,\n withErrorStyles: true,\n withSuccessStyles: true,\n size: 'sm',\n loading: false,\n loadingPosition: 'right',\n} satisfies Partial<InputProps>;\n\nconst varsResolver = createVarsResolver<InputFactory>((_, props, ctx) => ({\n wrapper: {\n '--input-margin-top': ctx.offsetTop ? 'calc(var(--mantine-spacing-xs) / 2)' : undefined,\n '--input-margin-bottom': ctx.offsetBottom ? 'calc(var(--mantine-spacing-xs) / 2)' : undefined,\n '--input-height': getSize(props.size, 'input-height'),\n '--input-fz': getFontSize(props.size),\n '--input-radius': props.radius === undefined ? undefined : getRadius(props.radius),\n '--input-left-section-width':\n props.leftSectionWidth !== undefined ? rem(props.leftSectionWidth) : undefined,\n '--input-right-section-width':\n props.rightSectionWidth !== undefined ? rem(props.rightSectionWidth) : undefined,\n '--input-padding-y': props.multiline ? getSize(props.size, 'input-padding-y') : undefined,\n '--input-left-section-pointer-events': props.leftSectionPointerEvents,\n '--input-right-section-pointer-events': props.rightSectionPointerEvents,\n },\n}));\n\nexport const Input = polymorphicFactory<InputFactory>((_props) => {\n const props = useProps('Input', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n required,\n __staticSelector,\n __stylesApiProps,\n size,\n wrapperProps,\n error,\n success,\n disabled,\n leftSection,\n leftSectionProps,\n leftSectionWidth,\n rightSection,\n rightSectionProps,\n rightSectionWidth,\n rightSectionPointerEvents,\n leftSectionPointerEvents,\n variant,\n vars,\n pointer,\n multiline,\n radius,\n id,\n withAria,\n withErrorStyles,\n withSuccessStyles,\n mod,\n inputSize,\n attributes,\n __clearSection,\n __clearable,\n __clearSectionMode,\n __defaultRightSection,\n loading,\n loadingPosition,\n __bottomSection,\n __bottomSectionProps,\n rootRef,\n dir,\n ...others\n } = props as typeof props & Pick<React.HTMLAttributes<HTMLDivElement>, 'dir'>;\n\n const { styleProps, rest } = extractStyleProps(others);\n const ctx = use(InputWrapperContext);\n const stylesCtx: InputStylesCtx = { offsetBottom: ctx?.offsetBottom, offsetTop: ctx?.offsetTop };\n\n const getStyles = useStyles<InputFactory>({\n name: ['Input', __staticSelector],\n props: __stylesApiProps || props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n stylesCtx,\n rootSelector: 'wrapper',\n vars,\n varsResolver,\n });\n\n const ariaAttributes = withAria\n ? {\n required,\n disabled,\n 'aria-invalid': error ? true : undefined,\n 'aria-describedby': ctx?.describedBy,\n id: ctx?.inputId || id,\n }\n : {};\n\n const loadingIndicator = loading ? (\n <Loader\n size={\n loadingPosition === 'left'\n ? 'calc(var(--input-left-section-size) / 2)'\n : 'calc(var(--input-right-section-size) / 2)'\n }\n />\n ) : null;\n\n const _leftSection = loading && loadingPosition === 'left' ? loadingIndicator : leftSection;\n const _rightSection: React.ReactNode = InputClearSection({\n __clearable,\n __clearSection,\n rightSection: loading && loadingPosition === 'right' ? loadingIndicator : rightSection,\n __defaultRightSection,\n size,\n __clearSectionMode,\n });\n\n return (\n <InputContext value={{ size: size || 'sm' }}>\n <Box\n ref={rootRef}\n dir={dir}\n {...getStyles('wrapper')}\n {...styleProps}\n {...wrapperProps}\n mod={[\n {\n error: !!error && withErrorStyles,\n success: !!success && !error && withSuccessStyles,\n pointer,\n disabled,\n multiline,\n withRightSection: !!_rightSection,\n withLeftSection: !!_leftSection,\n withBottomSection: !!__bottomSection,\n },\n mod,\n ]}\n variant={variant}\n size={size}\n >\n {_leftSection && (\n <div\n {...leftSectionProps}\n data-position=\"left\"\n {...getStyles('section', {\n className: leftSectionProps?.className,\n style: leftSectionProps?.style,\n })}\n >\n {_leftSection}\n </div>\n )}\n\n <Box\n component=\"input\"\n {...rest}\n {...ariaAttributes}\n required={required}\n mod={{\n disabled,\n error: !!error && withErrorStyles,\n success: !!success && !error && withSuccessStyles,\n }}\n variant={variant}\n __size={inputSize}\n {...getStyles('input')}\n />\n\n {__bottomSection && (\n <div\n {...__bottomSectionProps}\n {...getStyles('bottomSection', {\n className: __bottomSectionProps?.className,\n style: __bottomSectionProps?.style,\n })}\n >\n {__bottomSection}\n </div>\n )}\n\n {_rightSection && (\n <div\n {...rightSectionProps}\n data-position=\"right\"\n {...getStyles('section', {\n className: rightSectionProps?.className,\n style: rightSectionProps?.style,\n })}\n >\n {_rightSection}\n </div>\n )}\n </Box>\n </InputContext>\n );\n});\n\nInput.classes = classes;\nInput.varsResolver = varsResolver;\nInput.Wrapper = InputWrapper;\nInput.Label = InputLabel;\nInput.Error = InputError;\nInput.Success = InputSuccess;\nInput.Description = InputDescription;\nInput.Placeholder = InputPlaceholder;\nInput.ClearButton = InputClearButton;\nInput.displayName = '@mantine/core/Input';\n\nexport namespace Input {\n export type Props = InputProps;\n export type StylesNames = InputStylesNames;\n export type CssVariables = InputCssVariables;\n export type Factory = InputFactory;\n\n export namespace Wrapper {\n export type Props = InputWrapperProps;\n export type StylesNames = InputWrapperStylesNames;\n export type Factory = InputWrapperFactory;\n }\n\n export namespace Description {\n export type Props = InputDescriptionProps;\n export type StylesNames = InputDescriptionStylesNames;\n export type CssVariables = InputDescriptionCssVariables;\n export type Factory = InputDescriptionFactory;\n }\n\n export namespace Error {\n export type Props = InputErrorProps;\n export type StylesNames = InputErrorStylesNames;\n export type CssVariables = InputErrorCssVariables;\n export type Factory = InputErrorFactory;\n }\n\n export namespace Label {\n export type Props = InputLabelProps;\n export type StylesNames = InputLabelStylesNames;\n export type CssVariables = InputLabelCssVariables;\n export type Factory = InputLabelFactory;\n }\n\n export namespace Placeholder {\n export type Props = InputPlaceholderProps;\n export type StylesNames = InputPlaceholderStylesNames;\n export type Factory = InputPlaceholderFactory;\n }\n\n export namespace ClearButton {\n export type Props = InputClearButtonProps;\n export type Factory = InputClearButtonFactory;\n }\n\n export namespace ClearSection {\n export type Props = InputClearSectionProps;\n export type Mode = ClearSectionMode;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4NA,MAAM,eAAe;CACnB,SAAS;CACT,0BAA0B;CAC1B,2BAA2B;CAC3B,UAAU;CACV,iBAAiB;CACjB,mBAAmB;CACnB,MAAM;CACN,SAAS;CACT,iBAAiB;AACnB;AAEA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,OAAO,SAAS,EACxE,SAAS;CACP,sBAAsB,IAAI,YAAY,wCAAwC,KAAA;CAC9E,yBAAyB,IAAI,eAAe,wCAAwC,KAAA;CACpF,kBAAkBC,iBAAAA,QAAQ,MAAM,MAAM,cAAc;C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7B,WAAW,sBAAsB;MACjC,OAAO,sBAAsB;KAC/B,CAAC;KAEA,UAAA;IACE,CAAA;IAGN,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KACE,GAAI;KACJ,iBAAc;KACd,GAAI,UAAU,WAAW;MACvB,WAAW,mBAAmB;MAC9B,OAAO,mBAAmB;KAC5B,CAAC;KAEA,UAAA;IACE,CAAA;GAEJ;;CACO,CAAA;AAElB,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,UAAUC,qBAAAA;AAChB,MAAM,QAAQC,mBAAAA;AACd,MAAM,QAAQC,mBAAAA;AACd,MAAM,UAAUC,qBAAAA;AAChB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAcC,yBAAAA;AACpB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.context.cjs","names":[],"sources":["../../../src/components/Input/Input.context.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { MantineSize } from '../../core';\n\ninterface InputContextValue {\n size: MantineSize | (string & {});\n}\n\nexport const InputContext = createContext<InputContextValue>({ size: 'sm' });\n"],"mappings":";;AAOA,MAAa,gBAAA,kBAAA,CAAA,CAAA,cAAA,CAAgD,EAAE,MAAM,KAAK,CAAC"}
1
+ {"version":3,"file":"Input.context.cjs","names":["createContext"],"sources":["../../../src/components/Input/Input.context.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { MantineSize } from '../../core';\n\ninterface InputContextValue {\n size: MantineSize | (string & {});\n}\n\nexport const InputContext = createContext<InputContextValue>({ size: 'sm' });\n"],"mappings":";;AAOA,MAAa,gBAAA,kBAAeA,CAAAA,CAAAA,cAAAA,CAAiC,EAAE,MAAM,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputClearButton.cjs","names":["factory","useProps","InputContext","useResolvedStylesApi","CloseButton"],"sources":["../../../../src/components/Input/InputClearButton/InputClearButton.tsx"],"sourcesContent":["import { use } from 'react';\nimport {\n BoxProps,\n ElementProps,\n factory,\n Factory,\n MantineSize,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n} from '../../../core';\nimport { CloseButton, CloseButtonStylesNames } from '../../CloseButton';\nimport { InputContext } from '../Input.context';\n\nexport interface InputClearButtonProps\n extends BoxProps, StylesApiProps<InputClearButtonFactory>, ElementProps<'button'> {\n /** Size of the button, by default value is based on input context */\n size?: MantineSize | (string & {});\n}\n\nexport type InputClearButtonFactory = Factory<{\n props: InputClearButtonProps;\n ref: HTMLButtonElement;\n stylesNames: CloseButtonStylesNames;\n}>;\n\nexport const InputClearButton = factory<InputClearButtonFactory>((_props) => {\n const props = useProps('InputClearButton', null, _props);\n const { size, variant, vars, classNames, styles, ...others } = props;\n const ctx = use(InputContext);\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<InputClearButtonFactory>({\n classNames,\n styles,\n props,\n });\n\n return (\n <CloseButton\n variant={variant || 'transparent'}\n size={size || ctx?.size || 'sm'}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n __staticSelector=\"InputClearButton\"\n style={{ pointerEvents: 'all', background: 'var(--input-bg)', ...others.style }}\n {...others}\n />\n );\n});\n\nInputClearButton.displayName = '@mantine/core/InputClearButton';\n"],"mappings":";;;;;;;;;AA0BA,MAAa,mBAAmBA,gBAAAA,SAAkC,WAAW;CAC3E,MAAM,QAAQC,kBAAAA,SAAS,oBAAoB,MAAM,MAAM;CACvD,MAAM,EAAE,MAAM,SAAS,MAAM,YAAY,QAAQ,GAAG,WAAW;CAC/D,MAAM,OAAA,GAAA,MAAA,IAAA,CAAUC,sBAAAA,YAAY;CAE5B,MAAM,EAAE,oBAAoB,mBAAmBC,gCAAAA,qBAA8C;EAC3F;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;EACE,SAAS,WAAW;EACpB,MAAM,QAAQ,KAAK,QAAQ;EAC3B,YAAY;EACZ,QAAQ;EACR,kBAAiB;EACjB,OAAO;GAAE,eAAe;GAAO,YAAY;GAAmB,GAAG,OAAO;EAAM;EAC9E,GAAI;CACL,CAAA;AAEL,CAAC;AAED,iBAAiB,cAAc"}
1
+ {"version":3,"file":"InputClearButton.cjs","names":["factory","useProps","use","InputContext","useResolvedStylesApi","CloseButton"],"sources":["../../../../src/components/Input/InputClearButton/InputClearButton.tsx"],"sourcesContent":["import { use } from 'react';\nimport {\n BoxProps,\n ElementProps,\n factory,\n Factory,\n MantineSize,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n} from '../../../core';\nimport { CloseButton, CloseButtonStylesNames } from '../../CloseButton';\nimport { InputContext } from '../Input.context';\n\nexport interface InputClearButtonProps\n extends BoxProps, StylesApiProps<InputClearButtonFactory>, ElementProps<'button'> {\n /** Size of the button, by default value is based on input context */\n size?: MantineSize | (string & {});\n}\n\nexport type InputClearButtonFactory = Factory<{\n props: InputClearButtonProps;\n ref: HTMLButtonElement;\n stylesNames: CloseButtonStylesNames;\n}>;\n\nexport const InputClearButton = factory<InputClearButtonFactory>((_props) => {\n const props = useProps('InputClearButton', null, _props);\n const { size, variant, vars, classNames, styles, ...others } = props;\n const ctx = use(InputContext);\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<InputClearButtonFactory>({\n classNames,\n styles,\n props,\n });\n\n return (\n <CloseButton\n variant={variant || 'transparent'}\n size={size || ctx?.size || 'sm'}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n __staticSelector=\"InputClearButton\"\n style={{ pointerEvents: 'all', background: 'var(--input-bg)', ...others.style }}\n {...others}\n />\n );\n});\n\nInputClearButton.displayName = '@mantine/core/InputClearButton';\n"],"mappings":";;;;;;;;;AA0BA,MAAa,mBAAmBA,gBAAAA,SAAkC,WAAW;CAC3E,MAAM,QAAQC,kBAAAA,SAAS,oBAAoB,MAAM,MAAM;CACvD,MAAM,EAAE,MAAM,SAAS,MAAM,YAAY,QAAQ,GAAG,WAAW;CAC/D,MAAM,OAAA,GAAMC,MAAAA,IAAAA,CAAIC,sBAAAA,YAAY;CAE5B,MAAM,EAAE,oBAAoB,mBAAmBC,gCAAAA,qBAA8C;EAC3F;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;EACE,SAAS,WAAW;EACpB,MAAM,QAAQ,KAAK,QAAQ;EAC3B,YAAY;EACZ,QAAQ;EACR,kBAAiB;EACjB,OAAO;GAAE,eAAe;GAAO,YAAY;GAAmB,GAAG,OAAO;EAAM;EAC9E,GAAI;CACL,CAAA;AAEL,CAAC;AAED,iBAAiB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"InputClearSection.cjs","names":[],"sources":["../../../../src/components/Input/InputClearSection/InputClearSection.tsx"],"sourcesContent":["import { MantineSize } from '../../../core';\n\nexport type ClearSectionMode =\n | 'both' // render rightSection + clear button – default\n | 'rightSection' // render only user-supplied rightSection\n | 'clear'; // render only clear button\n\nexport interface InputClearSectionProps {\n __clearable: boolean | undefined;\n __clearSection: React.ReactNode;\n rightSection: React.ReactNode;\n __defaultRightSection: React.ReactNode;\n size: MantineSize | string | undefined;\n __clearSectionMode: ClearSectionMode | undefined;\n}\n\nconst clearSectionOffset: Record<string, number> = {\n xs: 7,\n sm: 8,\n md: 10,\n lg: 12,\n xl: 15,\n};\n\nexport function InputClearSection({\n __clearable,\n __clearSection,\n rightSection,\n __defaultRightSection,\n size = 'sm',\n __clearSectionMode = 'both',\n}: InputClearSectionProps) {\n const clearSection = __clearable && __clearSection;\n\n // Handle 'rightSection' mode - only show rightSection, ignore clear button\n if (__clearSectionMode === 'rightSection') {\n return rightSection === null ? null : rightSection || __defaultRightSection;\n }\n\n // Handle 'clear' mode - only show clear button, ignore rightSection\n if (__clearSectionMode === 'clear') {\n return rightSection === null ? null : clearSection || __defaultRightSection;\n }\n\n // Handle 'both' mode (default) - show both clear button and rightSection\n if (clearSection && (rightSection || __defaultRightSection)) {\n return (\n <div\n data-combined-clear-section\n style={{\n display: 'flex',\n gap: 2,\n alignItems: 'center',\n paddingInlineEnd: clearSectionOffset[size],\n }}\n >\n {clearSection}\n {rightSection || __defaultRightSection}\n </div>\n );\n }\n\n return rightSection === null ? null : rightSection || clearSection || __defaultRightSection;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAA6C;CACjD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,SAAgB,kBAAkB,EAChC,aACA,gBACA,cACA,uBACA,OAAO,MACP,qBAAqB,UACI;CACzB,MAAM,eAAe,eAAe;CAGpC,IAAI,uBAAuB,gBACzB,OAAO,iBAAiB,OAAO,OAAO,gBAAgB;CAIxD,IAAI,uBAAuB,SACzB,OAAO,iBAAiB,OAAO,OAAO,gBAAgB;CAIxD,IAAI,iBAAiB,gBAAgB,wBACnC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EACE,+BAAA;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,kBAAkB,mBAAmB;EACvC;YAPF,CASG,cACA,gBAAgB,qBACd;;CAIT,OAAO,iBAAiB,OAAO,OAAO,gBAAgB,gBAAgB;AACxE"}
1
+ {"version":3,"file":"InputClearSection.cjs","names":[],"sources":["../../../../src/components/Input/InputClearSection/InputClearSection.tsx"],"sourcesContent":["import { MantineSize } from '../../../core';\n\nexport type ClearSectionMode =\n | 'both' // render rightSection + clear button – default\n | 'rightSection' // render only user-supplied rightSection\n | 'clear'; // render only clear button\n\nexport interface InputClearSectionProps {\n __clearable: boolean | undefined;\n __clearSection: React.ReactNode;\n rightSection: React.ReactNode;\n __defaultRightSection: React.ReactNode;\n size: MantineSize | string | undefined;\n __clearSectionMode: ClearSectionMode | undefined;\n}\n\nconst clearSectionOffset: Record<string, number> = {\n xs: 7,\n sm: 8,\n md: 10,\n lg: 12,\n xl: 15,\n};\n\nexport function InputClearSection({\n __clearable,\n __clearSection,\n rightSection,\n __defaultRightSection,\n size = 'sm',\n __clearSectionMode = 'both',\n}: InputClearSectionProps) {\n const clearSection = __clearable && __clearSection;\n\n // Handle 'rightSection' mode - only show rightSection, ignore clear button\n if (__clearSectionMode === 'rightSection') {\n return rightSection === null ? null : rightSection || __defaultRightSection;\n }\n\n // Handle 'clear' mode - only show clear button, ignore rightSection\n if (__clearSectionMode === 'clear') {\n return rightSection === null ? null : clearSection || __defaultRightSection;\n }\n\n // Handle 'both' mode (default) - show both clear button and rightSection\n if (clearSection && (rightSection || __defaultRightSection)) {\n return (\n <div\n data-combined-clear-section\n style={{\n display: 'flex',\n gap: 2,\n alignItems: 'center',\n paddingInlineEnd: clearSectionOffset[size],\n }}\n >\n {clearSection}\n {rightSection || __defaultRightSection}\n </div>\n );\n }\n\n return rightSection === null ? null : rightSection || clearSection || __defaultRightSection;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAA6C;CACjD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,SAAgB,kBAAkB,EAChC,aACA,gBACA,cACA,uBACA,OAAO,MACP,qBAAqB,UACI;CACzB,MAAM,eAAe,eAAe;CAGpC,IAAI,uBAAuB,gBACzB,OAAO,iBAAiB,OAAO,OAAO,gBAAgB;CAIxD,IAAI,uBAAuB,SACzB,OAAO,iBAAiB,OAAO,OAAO,gBAAgB;CAIxD,IAAI,iBAAiB,gBAAgB,wBACnC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EACE,+BAAA;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,kBAAkB,mBAAmB;EACvC;EAPF,UAAA,CASG,cACA,gBAAgB,qBACd;;CAIT,OAAO,iBAAiB,OAAO,OAAO,gBAAgB,gBAAgB;AACxE"}