@mantine/core 9.5.1 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (904) 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/AccordionChevron.cjs.map +1 -1
  4. package/cjs/components/Accordion/AccordionControl/AccordionControl.cjs.map +1 -1
  5. package/cjs/components/Accordion/AccordionItem/AccordionItem.cjs.map +1 -1
  6. package/cjs/components/Accordion/AccordionPanel/AccordionPanel.cjs.map +1 -1
  7. package/cjs/components/ActionBar/ActionBar.cjs +94 -0
  8. package/cjs/components/ActionBar/ActionBar.cjs.map +1 -0
  9. package/cjs/components/ActionBar/ActionBar.context.cjs +8 -0
  10. package/cjs/components/ActionBar/ActionBar.context.cjs.map +1 -0
  11. package/cjs/components/ActionBar/ActionBar.module.cjs +10 -0
  12. package/cjs/components/ActionBar/ActionBar.module.cjs.map +1 -0
  13. package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs +33 -0
  14. package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs.map +1 -0
  15. package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs +30 -0
  16. package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs.map +1 -0
  17. package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
  18. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs +16 -15
  19. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs.map +1 -1
  20. package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs +15 -14
  21. package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs.map +1 -1
  22. package/cjs/components/Affix/Affix.cjs.map +1 -1
  23. package/cjs/components/Alert/Alert.cjs.map +1 -1
  24. package/cjs/components/Anchor/Anchor.cjs.map +1 -1
  25. package/cjs/components/AngleSlider/AngleSlider.cjs +5 -4
  26. package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
  27. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  28. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
  29. package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs.map +1 -1
  30. package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs.map +1 -1
  31. package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs +2 -1
  32. package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs.map +1 -1
  33. package/cjs/components/AppShell/use-resizing/use-resizing.cjs.map +1 -1
  34. package/cjs/components/AspectRatio/AspectRatio.cjs +14 -13
  35. package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
  36. package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  37. package/cjs/components/Avatar/Avatar.cjs.map +1 -1
  38. package/cjs/components/Avatar/AvatarGroup/AvatarGroup.cjs.map +1 -1
  39. package/cjs/components/Avatar/AvatarPlaceholderIcon.cjs.map +1 -1
  40. package/cjs/components/BackgroundImage/BackgroundImage.cjs +14 -13
  41. package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
  42. package/cjs/components/Badge/Badge.cjs.map +1 -1
  43. package/cjs/components/Blockquote/Blockquote.cjs +6 -5
  44. package/cjs/components/Blockquote/Blockquote.cjs.map +1 -1
  45. package/cjs/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  46. package/cjs/components/Burger/Burger.cjs.map +1 -1
  47. package/cjs/components/Button/Button.cjs.map +1 -1
  48. package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs +16 -15
  49. package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs.map +1 -1
  50. package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs +15 -14
  51. package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs.map +1 -1
  52. package/cjs/components/Card/Card.cjs.map +1 -1
  53. package/cjs/components/Cascader/Cascader.cjs +10 -5
  54. package/cjs/components/Cascader/Cascader.cjs.map +1 -1
  55. package/cjs/components/Cascader/CascaderColumns.cjs +2 -1
  56. package/cjs/components/Cascader/CascaderColumns.cjs.map +1 -1
  57. package/cjs/components/Cascader/get-cascader-columns.cjs.map +1 -1
  58. package/cjs/components/Cascader/use-cascader-safe-area.cjs.map +1 -1
  59. package/cjs/components/Cascader/use-cascader.cjs.map +1 -1
  60. package/cjs/components/Checkbox/CheckIcon.cjs +6 -5
  61. package/cjs/components/Checkbox/CheckIcon.cjs.map +1 -1
  62. package/cjs/components/Checkbox/Checkbox.cjs +1 -1
  63. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  64. package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs +2 -1
  65. package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs.map +1 -1
  66. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  67. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs.map +1 -1
  68. package/cjs/components/Chip/Chip.cjs.map +1 -1
  69. package/cjs/components/Chip/ChipGroup/ChipGroup.cjs.map +1 -1
  70. package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
  71. package/cjs/components/CloseButton/CloseIcon.cjs.map +1 -1
  72. package/cjs/components/Collapse/Collapse.cjs.map +1 -1
  73. package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
  74. package/cjs/components/ColorInput/EyeDropperIcon.cjs.map +1 -1
  75. package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  76. package/cjs/components/ColorPicker/ColorPicker.context.cjs.map +1 -1
  77. package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs +4 -6
  78. package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs.map +1 -1
  79. package/cjs/components/ColorPicker/Saturation/Saturation.cjs +4 -6
  80. package/cjs/components/ColorPicker/Saturation/Saturation.cjs.map +1 -1
  81. package/cjs/components/ColorPicker/Swatches/Swatches.cjs.map +1 -1
  82. package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
  83. package/cjs/components/Combobox/Combobox.cjs.map +1 -1
  84. package/cjs/components/Combobox/ComboboxChevron/ComboboxChevron.cjs.map +1 -1
  85. package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs +2 -1
  86. package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs.map +1 -1
  87. package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs +10 -9
  88. package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs.map +1 -1
  89. package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs +2 -1
  90. package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs.map +1 -1
  91. package/cjs/components/Combobox/ComboboxGroup/ComboboxGroup.cjs.map +1 -1
  92. package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs +2 -1
  93. package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs.map +1 -1
  94. package/cjs/components/Combobox/ComboboxOption/ComboboxOption.cjs.map +1 -1
  95. package/cjs/components/Combobox/ComboboxOptions/ComboboxOptions.cjs.map +1 -1
  96. package/cjs/components/Combobox/ComboboxSearch/ComboboxSearch.cjs.map +1 -1
  97. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs +10 -9
  98. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
  99. package/cjs/components/Combobox/OptionsDropdown/OptionsDropdown.cjs.map +1 -1
  100. package/cjs/components/Combobox/OptionsDropdown/default-options-filter.cjs.map +1 -1
  101. package/cjs/components/Combobox/get-options-lockup/get-option-by-label.cjs +17 -0
  102. package/cjs/components/Combobox/get-options-lockup/get-option-by-label.cjs.map +1 -0
  103. package/cjs/components/Combobox/is-external-input-change/is-external-input-change.cjs +17 -0
  104. package/cjs/components/Combobox/is-external-input-change/is-external-input-change.cjs.map +1 -0
  105. package/cjs/components/Combobox/use-combobox/get-index/get-index.cjs.map +1 -1
  106. package/cjs/components/Combobox/use-combobox/get-index/get-virtualized-index.cjs.map +1 -1
  107. package/cjs/components/Combobox/use-combobox/use-combobox.cjs.map +1 -1
  108. package/cjs/components/Combobox/use-combobox/use-virtualized-combobox.cjs.map +1 -1
  109. package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
  110. package/cjs/components/Combobox/use-pills-reorder/use-pills-reorder.cjs.map +1 -1
  111. package/cjs/components/ComboboxPopover/ComboboxPopover.cjs.map +1 -1
  112. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs +13 -12
  113. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs.map +1 -1
  114. package/cjs/components/CopyButton/CopyButton.cjs.map +1 -1
  115. package/cjs/components/DataList/DataList.cjs.map +1 -1
  116. package/cjs/components/Dialog/Dialog.cjs.map +1 -1
  117. package/cjs/components/Divider/Divider.cjs.map +1 -1
  118. package/cjs/components/Drawer/Drawer.cjs.map +1 -1
  119. package/cjs/components/Drawer/DrawerBody.cjs +2 -1
  120. package/cjs/components/Drawer/DrawerBody.cjs.map +1 -1
  121. package/cjs/components/Drawer/DrawerCloseButton.cjs +2 -1
  122. package/cjs/components/Drawer/DrawerCloseButton.cjs.map +1 -1
  123. package/cjs/components/Drawer/DrawerContent.cjs.map +1 -1
  124. package/cjs/components/Drawer/DrawerHeader.cjs +2 -1
  125. package/cjs/components/Drawer/DrawerHeader.cjs.map +1 -1
  126. package/cjs/components/Drawer/DrawerOverlay.cjs +2 -1
  127. package/cjs/components/Drawer/DrawerOverlay.cjs.map +1 -1
  128. package/cjs/components/Drawer/DrawerRoot.cjs.map +1 -1
  129. package/cjs/components/Drawer/DrawerStack.cjs.map +1 -1
  130. package/cjs/components/Drawer/DrawerTitle.cjs +2 -1
  131. package/cjs/components/Drawer/DrawerTitle.cjs.map +1 -1
  132. package/cjs/components/EmptyState/EmptyState.cjs.map +1 -1
  133. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs +2 -1
  134. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs.map +1 -1
  135. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs +2 -1
  136. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs.map +1 -1
  137. package/cjs/components/Fieldset/Fieldset.cjs.map +1 -1
  138. package/cjs/components/FileButton/FileButton.cjs.map +1 -1
  139. package/cjs/components/FileInput/FileInput.cjs.map +1 -1
  140. package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
  141. package/cjs/components/FloatingIndicator/use-floating-indicator.cjs.map +1 -1
  142. package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
  143. package/cjs/components/FloatingWindow/FloatingWindowResizeHandle.cjs.map +1 -1
  144. package/cjs/components/FocusTrap/FocusTrap.cjs +2 -1
  145. package/cjs/components/FocusTrap/FocusTrap.cjs.map +1 -1
  146. package/cjs/components/Grid/Grid.cjs.map +1 -1
  147. package/cjs/components/Grid/GridCol/GridCol.cjs.map +1 -1
  148. package/cjs/components/Group/Group.cjs +16 -14
  149. package/cjs/components/Group/Group.cjs.map +1 -1
  150. package/cjs/components/Highlight/Highlight.cjs.map +1 -1
  151. package/cjs/components/HoverCard/HoverCard.cjs.map +1 -1
  152. package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs.map +1 -1
  153. package/cjs/components/HoverCard/HoverCardGroup/HoverCardGroup.cjs.map +1 -1
  154. package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs.map +1 -1
  155. package/cjs/components/HoverCard/use-hover-card.cjs.map +1 -1
  156. package/cjs/components/Image/Image.cjs.map +1 -1
  157. package/cjs/components/Indicator/Indicator.cjs.map +1 -1
  158. package/cjs/components/Input/Input.cjs +3 -3
  159. package/cjs/components/Input/Input.cjs.map +1 -1
  160. package/cjs/components/Input/Input.context.cjs.map +1 -1
  161. package/cjs/components/Input/InputClearButton/InputClearButton.cjs.map +1 -1
  162. package/cjs/components/Input/InputClearSection/InputClearSection.cjs.map +1 -1
  163. package/cjs/components/Input/InputDescription/InputDescription.cjs +2 -1
  164. package/cjs/components/Input/InputDescription/InputDescription.cjs.map +1 -1
  165. package/cjs/components/Input/InputError/InputError.cjs +2 -1
  166. package/cjs/components/Input/InputError/InputError.cjs.map +1 -1
  167. package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
  168. package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs +13 -12
  169. package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs.map +1 -1
  170. package/cjs/components/Input/InputSuccess/InputSuccess.cjs +2 -1
  171. package/cjs/components/Input/InputSuccess/InputSuccess.cjs.map +1 -1
  172. package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
  173. package/cjs/components/Input/InputWrapper.context.cjs.map +1 -1
  174. package/cjs/components/InputBase/InputBase.cjs.map +1 -1
  175. package/cjs/components/JsonInput/JsonInput.cjs.map +1 -1
  176. package/cjs/components/Kbd/Kbd.cjs +14 -13
  177. package/cjs/components/Kbd/Kbd.cjs.map +1 -1
  178. package/cjs/components/List/List.cjs.map +1 -1
  179. package/cjs/components/List/ListItem/ListItem.cjs.map +1 -1
  180. package/cjs/components/Loader/loaders/Bars.cjs.map +1 -1
  181. package/cjs/components/Loader/loaders/Dots.cjs.map +1 -1
  182. package/cjs/components/Loader/loaders/Oval.cjs.map +1 -1
  183. package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
  184. package/cjs/components/Mark/Mark.cjs +14 -13
  185. package/cjs/components/Mark/Mark.cjs.map +1 -1
  186. package/cjs/components/Marquee/Marquee.cjs.map +1 -1
  187. package/cjs/components/MaskInput/MaskInput.cjs +3 -2
  188. package/cjs/components/MaskInput/MaskInput.cjs.map +1 -1
  189. package/cjs/components/MaskInput/use-mask-input-props.cjs.map +1 -1
  190. package/cjs/components/Menu/Menu.cjs.map +1 -1
  191. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs +4 -3
  192. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs.map +1 -1
  193. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.context.cjs.map +1 -1
  194. package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs +2 -1
  195. package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs.map +1 -1
  196. package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs +3 -2
  197. package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs.map +1 -1
  198. package/cjs/components/Menu/MenuDivider/MenuDivider.cjs +2 -1
  199. package/cjs/components/Menu/MenuDivider/MenuDivider.cjs.map +1 -1
  200. package/cjs/components/Menu/MenuDropdown/MenuDropdown.cjs.map +1 -1
  201. package/cjs/components/Menu/MenuItem/MenuItem.cjs.map +1 -1
  202. package/cjs/components/Menu/MenuLabel/MenuLabel.cjs +2 -1
  203. package/cjs/components/Menu/MenuLabel/MenuLabel.cjs.map +1 -1
  204. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.cjs.map +1 -1
  205. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.context.cjs.map +1 -1
  206. package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs +2 -1
  207. package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs.map +1 -1
  208. package/cjs/components/Menu/MenuSearch/MenuSearch.cjs.map +1 -1
  209. package/cjs/components/Menu/MenuSelectableItem/MenuSelectableItem.cjs.map +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.map +1 -1
  220. package/cjs/components/Modal/ModalBody.cjs +2 -1
  221. package/cjs/components/Modal/ModalBody.cjs.map +1 -1
  222. package/cjs/components/Modal/ModalCloseButton.cjs +2 -1
  223. package/cjs/components/Modal/ModalCloseButton.cjs.map +1 -1
  224. package/cjs/components/Modal/ModalContent.cjs.map +1 -1
  225. package/cjs/components/Modal/ModalHeader.cjs +2 -1
  226. package/cjs/components/Modal/ModalHeader.cjs.map +1 -1
  227. package/cjs/components/Modal/ModalOverlay.cjs +2 -1
  228. package/cjs/components/Modal/ModalOverlay.cjs.map +1 -1
  229. package/cjs/components/Modal/ModalRoot.cjs.map +1 -1
  230. package/cjs/components/Modal/ModalStack.cjs.map +1 -1
  231. package/cjs/components/Modal/ModalTitle.cjs +2 -1
  232. package/cjs/components/Modal/ModalTitle.cjs.map +1 -1
  233. package/cjs/components/Modal/use-modals-stack.cjs.map +1 -1
  234. package/cjs/components/ModalBase/ModalBase.cjs.map +1 -1
  235. package/cjs/components/ModalBase/ModalBaseBody.cjs.map +1 -1
  236. package/cjs/components/ModalBase/ModalBaseCloseButton.cjs.map +1 -1
  237. package/cjs/components/ModalBase/ModalBaseContent.cjs.map +1 -1
  238. package/cjs/components/ModalBase/ModalBaseHeader.cjs.map +1 -1
  239. package/cjs/components/ModalBase/ModalBaseOverlay.cjs.map +1 -1
  240. package/cjs/components/ModalBase/ModalBaseTitle.cjs.map +1 -1
  241. package/cjs/components/ModalBase/use-lock-scroll.cjs.map +1 -1
  242. package/cjs/components/ModalBase/use-modal.cjs +2 -1
  243. package/cjs/components/ModalBase/use-modal.cjs.map +1 -1
  244. package/cjs/components/MultiSelect/MultiSelect.cjs +9 -0
  245. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  246. package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
  247. package/cjs/components/NativeSelect/NativeSelectOption.cjs.map +1 -1
  248. package/cjs/components/NavLink/NavLink.cjs.map +1 -1
  249. package/cjs/components/Notification/Notification.cjs +3 -3
  250. package/cjs/components/Notification/Notification.cjs.map +1 -1
  251. package/cjs/components/NumberInput/NumberInput.cjs +5 -3
  252. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  253. package/cjs/components/NumberInput/NumberInputChevron.cjs.map +1 -1
  254. package/cjs/components/OverflowList/OverflowList.cjs +4 -2
  255. package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
  256. package/cjs/components/OverflowList/use-dimensions.cjs.map +1 -1
  257. package/cjs/components/Overlay/Overlay.cjs +14 -13
  258. package/cjs/components/Overlay/Overlay.cjs.map +1 -1
  259. package/cjs/components/Pagination/Pagination.cjs +2 -1
  260. package/cjs/components/Pagination/Pagination.cjs.map +1 -1
  261. package/cjs/components/Pagination/Pagination.icons.cjs.map +1 -1
  262. package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs +2 -1
  263. package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs.map +1 -1
  264. package/cjs/components/Pagination/PaginationEdges/PaginationEdges.cjs.map +1 -1
  265. package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs +3 -2
  266. package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs.map +1 -1
  267. package/cjs/components/Pagination/PaginationLabel/PaginationLabel.cjs.map +1 -1
  268. package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs.map +1 -1
  269. package/cjs/components/Paper/Paper.cjs +1 -1
  270. package/cjs/components/Paper/Paper.cjs.map +1 -1
  271. package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
  272. package/cjs/components/PasswordInput/PasswordToggleIcon.cjs.map +1 -1
  273. package/cjs/components/Pill/Pill.cjs.map +1 -1
  274. package/cjs/components/Pill/PillGroup/PillGroup.cjs.map +1 -1
  275. package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
  276. package/cjs/components/PillsInput/PillsInput.context.cjs.map +1 -1
  277. package/cjs/components/PillsInput/PillsInputField/PillsInputField.cjs.map +1 -1
  278. package/cjs/components/PinInput/PinInput.cjs +6 -5
  279. package/cjs/components/PinInput/PinInput.cjs.map +1 -1
  280. package/cjs/components/Popover/Popover.cjs.map +1 -1
  281. package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs +3 -2
  282. package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs.map +1 -1
  283. package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
  284. package/cjs/components/Popover/PopoverTarget/PopoverTarget.cjs.map +1 -1
  285. package/cjs/components/Popover/use-popover.cjs +16 -12
  286. package/cjs/components/Popover/use-popover.cjs.map +1 -1
  287. package/cjs/components/Portal/Portal.cjs.map +1 -1
  288. package/cjs/components/Progress/Progress.cjs.map +1 -1
  289. package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs +2 -1
  290. package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs.map +1 -1
  291. package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs.map +1 -1
  292. package/cjs/components/Radio/Radio.cjs.map +1 -1
  293. package/cjs/components/Radio/RadioCard/RadioCard.cjs.map +1 -1
  294. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
  295. package/cjs/components/Radio/RadioIcon.cjs.map +1 -1
  296. package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs.map +1 -1
  297. package/cjs/components/Rating/Rating.cjs +6 -3
  298. package/cjs/components/Rating/Rating.cjs.map +1 -1
  299. package/cjs/components/Rating/RatingItem/RatingItem.cjs.map +1 -1
  300. package/cjs/components/Rating/StarSymbol/StarIcon.cjs.map +1 -1
  301. package/cjs/components/Rating/StarSymbol/StarSymbol.cjs +2 -1
  302. package/cjs/components/Rating/StarSymbol/StarSymbol.cjs.map +1 -1
  303. package/cjs/components/RingProgress/Curve/Curve.cjs.map +1 -1
  304. package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
  305. package/cjs/components/RollingNumber/DigitColumn.cjs.map +1 -1
  306. package/cjs/components/RollingNumber/RollingNumber.cjs +19 -13
  307. package/cjs/components/RollingNumber/RollingNumber.cjs.map +1 -1
  308. package/cjs/components/RollingNumber/RollingNumber.module.cjs +1 -0
  309. package/cjs/components/RollingNumber/RollingNumber.module.cjs.map +1 -1
  310. package/cjs/components/ScrollArea/ScrollArea.cjs +8 -6
  311. package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
  312. package/cjs/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.cjs.map +1 -1
  313. package/cjs/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.cjs.map +1 -1
  314. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.cjs.map +1 -1
  315. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.cjs.map +1 -1
  316. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.cjs.map +1 -1
  317. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.cjs.map +1 -1
  318. package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.cjs.map +1 -1
  319. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.cjs.map +1 -1
  320. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.cjs.map +1 -1
  321. package/cjs/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.cjs.map +1 -1
  322. package/cjs/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.cjs.map +1 -1
  323. package/cjs/components/ScrollArea/use-resize-observer.cjs.map +1 -1
  324. package/cjs/components/Scroller/Scroller.cjs.map +1 -1
  325. package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  326. package/cjs/components/Select/Select.cjs +12 -0
  327. package/cjs/components/Select/Select.cjs.map +1 -1
  328. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
  329. package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
  330. package/cjs/components/SimpleGrid/SimpleGridVariables.cjs +10 -8
  331. package/cjs/components/SimpleGrid/SimpleGridVariables.cjs.map +1 -1
  332. package/cjs/components/Skeleton/Skeleton.cjs +14 -13
  333. package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
  334. package/cjs/components/Slider/Marks/Marks.cjs +3 -2
  335. package/cjs/components/Slider/Marks/Marks.cjs.map +1 -1
  336. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs +20 -11
  337. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
  338. package/cjs/components/Slider/Slider/Slider.cjs +6 -6
  339. package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
  340. package/cjs/components/Slider/Thumb/Thumb.cjs.map +1 -1
  341. package/cjs/components/Slider/Track/Track.cjs.map +1 -1
  342. package/cjs/components/Splitter/GripIcon.cjs.map +1 -1
  343. package/cjs/components/Splitter/Splitter.cjs +8 -7
  344. package/cjs/components/Splitter/Splitter.cjs.map +1 -1
  345. package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
  346. package/cjs/components/Stack/Stack.cjs +14 -13
  347. package/cjs/components/Stack/Stack.cjs.map +1 -1
  348. package/cjs/components/Stepper/Stepper.cjs +6 -3
  349. package/cjs/components/Stepper/Stepper.cjs.map +1 -1
  350. package/cjs/components/Stepper/Stepper.context.cjs.map +1 -1
  351. package/cjs/components/Stepper/Stepper.module.cjs.map +1 -1
  352. package/cjs/components/Stepper/StepperStep/StepperStep.cjs +3 -2
  353. package/cjs/components/Stepper/StepperStep/StepperStep.cjs.map +1 -1
  354. package/cjs/components/Switch/Switch.cjs.map +1 -1
  355. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
  356. package/cjs/components/Table/Table.cjs +2 -2
  357. package/cjs/components/Table/Table.cjs.map +1 -1
  358. package/cjs/components/Table/TableScrollContainer.cjs.map +1 -1
  359. package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
  360. package/cjs/components/Tabs/Tabs.cjs.map +1 -1
  361. package/cjs/components/Tabs/TabsPanel/TabsPanel.cjs.map +1 -1
  362. package/cjs/components/Tabs/TabsTab/TabsTab.cjs.map +1 -1
  363. package/cjs/components/TagsInput/TagsInput.cjs +5 -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.map +1 -1
  370. package/cjs/components/ThemeIcon/ThemeIcon.cjs +14 -13
  371. package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
  372. package/cjs/components/Timeline/Timeline.cjs.map +1 -1
  373. package/cjs/components/Timeline/TimelineItem/TimelineItem.cjs.map +1 -1
  374. package/cjs/components/Title/Title.cjs +1 -1
  375. package/cjs/components/Title/Title.cjs.map +1 -1
  376. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  377. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs +2 -2
  378. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs.map +1 -1
  379. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs +1 -0
  380. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs.map +1 -1
  381. package/cjs/components/Tooltip/TooltipGroup/TooltipGroup.cjs.map +1 -1
  382. package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
  383. package/cjs/components/Transition/Transition.cjs.map +1 -1
  384. package/cjs/components/Transition/use-transition.cjs.map +1 -1
  385. package/cjs/components/Tree/FlatTreeNode.cjs.map +1 -1
  386. package/cjs/components/Tree/Tree.cjs +2 -1
  387. package/cjs/components/Tree/Tree.cjs.map +1 -1
  388. package/cjs/components/Tree/TreeNode.cjs.map +1 -1
  389. package/cjs/components/Tree/use-tree-node-drag-drop.cjs.map +1 -1
  390. package/cjs/components/Tree/use-tree.cjs.map +1 -1
  391. package/cjs/components/TreeSelect/TreeSelect.cjs +14 -9
  392. package/cjs/components/TreeSelect/TreeSelect.cjs.map +1 -1
  393. package/cjs/components/TreeSelect/TreeSelectOption.cjs.map +1 -1
  394. package/cjs/components/Typography/Typography.cjs +12 -11
  395. package/cjs/components/Typography/Typography.cjs.map +1 -1
  396. package/cjs/components/Typography/Typography.module.cjs.map +1 -1
  397. package/cjs/components/UnstyledButton/UnstyledButton.cjs +12 -11
  398. package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
  399. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs +12 -11
  400. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  401. package/cjs/core/Box/Box.cjs.map +1 -1
  402. package/cjs/core/Box/use-random-classname/use-random-classname.cjs.map +1 -1
  403. package/cjs/core/DirectionProvider/DirectionProvider.cjs +3 -2
  404. package/cjs/core/DirectionProvider/DirectionProvider.cjs.map +1 -1
  405. package/cjs/core/InlineStyles/InlineStyles.cjs.map +1 -1
  406. package/cjs/core/MantineProvider/Mantine.context.cjs.map +1 -1
  407. package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs +4 -2
  408. package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs.map +1 -1
  409. package/cjs/core/MantineProvider/MantineProvider.cjs +3 -3
  410. package/cjs/core/MantineProvider/MantineProvider.cjs.map +1 -1
  411. package/cjs/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs.map +1 -1
  412. package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs.map +1 -1
  413. package/cjs/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs.map +1 -1
  414. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-computed-color-scheme.cjs.map +1 -1
  415. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs +2 -1
  416. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs.map +1 -1
  417. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-provider-color-scheme.cjs.map +1 -1
  418. package/cjs/core/MantineProvider/use-matches/use-matches.cjs.map +1 -1
  419. package/cjs/core/styles-api/use-styles/get-class-name/get-class-name.cjs.map +1 -1
  420. package/cjs/core/styles-api/use-styles/get-class-name/get-global-class-names/get-global-class-names.cjs.map +1 -1
  421. package/cjs/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.cjs.map +1 -1
  422. package/cjs/core/utils/create-safe-context/create-safe-context.cjs.map +1 -1
  423. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs +0 -1
  424. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs.map +1 -1
  425. package/cjs/core/utils/deep-merge/deep-merge.cjs +4 -3
  426. package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -1
  427. package/cjs/core/utils/use-hovered/use-hovered.cjs.map +1 -1
  428. package/cjs/index.cjs +6 -0
  429. package/cjs/utils/Floating/use-context-menu-handlers.cjs.map +1 -1
  430. package/cjs/utils/Floating/use-delayed-hover.cjs.map +1 -1
  431. package/cjs/utils/InlineInput/InlineInput.cjs.map +1 -1
  432. package/cjs/utils/InputsGroupFieldset/InputsGroupFieldset.cjs.map +1 -1
  433. package/esm/components/Accordion/Accordion.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 +10 -5
  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/get-options-lockup/get-option-by-label.mjs +17 -0
  521. package/esm/components/Combobox/get-options-lockup/get-option-by-label.mjs.map +1 -0
  522. package/esm/components/Combobox/is-external-input-change/is-external-input-change.mjs +17 -0
  523. package/esm/components/Combobox/is-external-input-change/is-external-input-change.mjs.map +1 -0
  524. package/esm/components/Combobox/use-combobox/get-index/get-index.mjs.map +1 -1
  525. package/esm/components/Combobox/use-combobox/get-index/get-virtualized-index.mjs.map +1 -1
  526. package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
  527. package/esm/components/ComboboxPopover/ComboboxPopover.mjs.map +1 -1
  528. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs +13 -12
  529. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs.map +1 -1
  530. package/esm/components/DataList/DataList.mjs.map +1 -1
  531. package/esm/components/Dialog/Dialog.mjs.map +1 -1
  532. package/esm/components/Divider/Divider.mjs.map +1 -1
  533. package/esm/components/Drawer/Drawer.mjs.map +1 -1
  534. package/esm/components/Drawer/DrawerBody.mjs +2 -1
  535. package/esm/components/Drawer/DrawerBody.mjs.map +1 -1
  536. package/esm/components/Drawer/DrawerCloseButton.mjs +2 -1
  537. package/esm/components/Drawer/DrawerCloseButton.mjs.map +1 -1
  538. package/esm/components/Drawer/DrawerContent.mjs.map +1 -1
  539. package/esm/components/Drawer/DrawerHeader.mjs +2 -1
  540. package/esm/components/Drawer/DrawerHeader.mjs.map +1 -1
  541. package/esm/components/Drawer/DrawerOverlay.mjs +2 -1
  542. package/esm/components/Drawer/DrawerOverlay.mjs.map +1 -1
  543. package/esm/components/Drawer/DrawerRoot.mjs.map +1 -1
  544. package/esm/components/Drawer/DrawerTitle.mjs +2 -1
  545. package/esm/components/Drawer/DrawerTitle.mjs.map +1 -1
  546. package/esm/components/EmptyState/EmptyState.mjs.map +1 -1
  547. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs +2 -1
  548. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs.map +1 -1
  549. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs +2 -1
  550. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs.map +1 -1
  551. package/esm/components/Fieldset/Fieldset.mjs.map +1 -1
  552. package/esm/components/FileInput/FileInput.mjs.map +1 -1
  553. package/esm/components/FloatingWindow/FloatingWindow.mjs.map +1 -1
  554. package/esm/components/FocusTrap/FocusTrap.mjs +2 -1
  555. package/esm/components/FocusTrap/FocusTrap.mjs.map +1 -1
  556. package/esm/components/Grid/Grid.mjs.map +1 -1
  557. package/esm/components/Group/Group.mjs +16 -14
  558. package/esm/components/Group/Group.mjs.map +1 -1
  559. package/esm/components/Highlight/Highlight.mjs.map +1 -1
  560. package/esm/components/HoverCard/HoverCard.mjs.map +1 -1
  561. package/esm/components/HoverCard/HoverCardGroup/HoverCardGroup.mjs.map +1 -1
  562. package/esm/components/HoverCard/HoverCardTarget/HoverCardTarget.mjs.map +1 -1
  563. package/esm/components/Indicator/Indicator.mjs.map +1 -1
  564. package/esm/components/Input/Input.mjs +3 -3
  565. package/esm/components/Input/Input.mjs.map +1 -1
  566. package/esm/components/Input/InputClearSection/InputClearSection.mjs.map +1 -1
  567. package/esm/components/Input/InputDescription/InputDescription.mjs +2 -1
  568. package/esm/components/Input/InputDescription/InputDescription.mjs.map +1 -1
  569. package/esm/components/Input/InputError/InputError.mjs +2 -1
  570. package/esm/components/Input/InputError/InputError.mjs.map +1 -1
  571. package/esm/components/Input/InputLabel/InputLabel.mjs.map +1 -1
  572. package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs +13 -12
  573. package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs.map +1 -1
  574. package/esm/components/Input/InputSuccess/InputSuccess.mjs +2 -1
  575. package/esm/components/Input/InputSuccess/InputSuccess.mjs.map +1 -1
  576. package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
  577. package/esm/components/InputBase/InputBase.mjs.map +1 -1
  578. package/esm/components/Kbd/Kbd.mjs +14 -13
  579. package/esm/components/Kbd/Kbd.mjs.map +1 -1
  580. package/esm/components/List/List.mjs.map +1 -1
  581. package/esm/components/List/ListItem/ListItem.mjs.map +1 -1
  582. package/esm/components/Loader/loaders/Bars.mjs.map +1 -1
  583. package/esm/components/Loader/loaders/Dots.mjs.map +1 -1
  584. package/esm/components/LoadingOverlay/LoadingOverlay.mjs.map +1 -1
  585. package/esm/components/Mark/Mark.mjs +14 -13
  586. package/esm/components/Mark/Mark.mjs.map +1 -1
  587. package/esm/components/Marquee/Marquee.mjs.map +1 -1
  588. package/esm/components/MaskInput/MaskInput.mjs +3 -2
  589. package/esm/components/MaskInput/MaskInput.mjs.map +1 -1
  590. package/esm/components/Menu/Menu.mjs.map +1 -1
  591. package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs +4 -3
  592. package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs.map +1 -1
  593. package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs +2 -1
  594. package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs.map +1 -1
  595. package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs +3 -2
  596. package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs.map +1 -1
  597. package/esm/components/Menu/MenuDivider/MenuDivider.mjs +2 -1
  598. package/esm/components/Menu/MenuDivider/MenuDivider.mjs.map +1 -1
  599. package/esm/components/Menu/MenuDropdown/MenuDropdown.mjs.map +1 -1
  600. package/esm/components/Menu/MenuItem/MenuItem.mjs.map +1 -1
  601. package/esm/components/Menu/MenuLabel/MenuLabel.mjs +2 -1
  602. package/esm/components/Menu/MenuLabel/MenuLabel.mjs.map +1 -1
  603. package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs +2 -1
  604. package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs.map +1 -1
  605. package/esm/components/Menu/MenuSelectableItem/MenuSelectableItem.mjs.map +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.map +1 -1
  613. package/esm/components/Modal/ModalBody.mjs +2 -1
  614. package/esm/components/Modal/ModalBody.mjs.map +1 -1
  615. package/esm/components/Modal/ModalCloseButton.mjs +2 -1
  616. package/esm/components/Modal/ModalCloseButton.mjs.map +1 -1
  617. package/esm/components/Modal/ModalContent.mjs.map +1 -1
  618. package/esm/components/Modal/ModalHeader.mjs +2 -1
  619. package/esm/components/Modal/ModalHeader.mjs.map +1 -1
  620. package/esm/components/Modal/ModalOverlay.mjs +2 -1
  621. package/esm/components/Modal/ModalOverlay.mjs.map +1 -1
  622. package/esm/components/Modal/ModalRoot.mjs.map +1 -1
  623. package/esm/components/Modal/ModalTitle.mjs +2 -1
  624. package/esm/components/Modal/ModalTitle.mjs.map +1 -1
  625. package/esm/components/ModalBase/ModalBase.mjs.map +1 -1
  626. package/esm/components/ModalBase/ModalBaseContent.mjs.map +1 -1
  627. package/esm/components/ModalBase/ModalBaseOverlay.mjs.map +1 -1
  628. package/esm/components/ModalBase/use-modal.mjs +2 -1
  629. package/esm/components/ModalBase/use-modal.mjs.map +1 -1
  630. package/esm/components/MultiSelect/MultiSelect.mjs +9 -0
  631. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  632. package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
  633. package/esm/components/NativeSelect/NativeSelectOption.mjs.map +1 -1
  634. package/esm/components/NavLink/NavLink.mjs.map +1 -1
  635. package/esm/components/Notification/Notification.mjs +3 -3
  636. package/esm/components/Notification/Notification.mjs.map +1 -1
  637. package/esm/components/NumberInput/NumberInput.mjs +5 -3
  638. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  639. package/esm/components/NumberInput/NumberInputChevron.mjs.map +1 -1
  640. package/esm/components/OverflowList/OverflowList.mjs +4 -2
  641. package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
  642. package/esm/components/Overlay/Overlay.mjs +14 -13
  643. package/esm/components/Overlay/Overlay.mjs.map +1 -1
  644. package/esm/components/Pagination/Pagination.icons.mjs.map +1 -1
  645. package/esm/components/Pagination/Pagination.mjs +2 -1
  646. package/esm/components/Pagination/Pagination.mjs.map +1 -1
  647. package/esm/components/Pagination/PaginationDots/PaginationDots.mjs +2 -1
  648. package/esm/components/Pagination/PaginationDots/PaginationDots.mjs.map +1 -1
  649. package/esm/components/Pagination/PaginationEdges/PaginationEdges.mjs.map +1 -1
  650. package/esm/components/Pagination/PaginationItems/PaginationItems.mjs +3 -2
  651. package/esm/components/Pagination/PaginationItems/PaginationItems.mjs.map +1 -1
  652. package/esm/components/Pagination/PaginationLabel/PaginationLabel.mjs.map +1 -1
  653. package/esm/components/Pagination/PaginationRoot/PaginationRoot.mjs.map +1 -1
  654. package/esm/components/Paper/Paper.mjs +1 -1
  655. package/esm/components/Paper/Paper.mjs.map +1 -1
  656. package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
  657. package/esm/components/PasswordInput/PasswordToggleIcon.mjs.map +1 -1
  658. package/esm/components/Pill/Pill.mjs.map +1 -1
  659. package/esm/components/Pill/PillGroup/PillGroup.mjs.map +1 -1
  660. package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
  661. package/esm/components/PinInput/PinInput.mjs +6 -5
  662. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  663. package/esm/components/Popover/Popover.mjs.map +1 -1
  664. package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs +3 -2
  665. package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs.map +1 -1
  666. package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs.map +1 -1
  667. package/esm/components/Popover/use-popover.mjs +16 -12
  668. package/esm/components/Popover/use-popover.mjs.map +1 -1
  669. package/esm/components/Progress/Progress.mjs.map +1 -1
  670. package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs +2 -1
  671. package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs.map +1 -1
  672. package/esm/components/Progress/ProgressRoot/ProgressRoot.mjs.map +1 -1
  673. package/esm/components/Radio/Radio.mjs.map +1 -1
  674. package/esm/components/Radio/RadioCard/RadioCard.mjs.map +1 -1
  675. package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
  676. package/esm/components/Radio/RadioIcon.mjs.map +1 -1
  677. package/esm/components/Radio/RadioIndicator/RadioIndicator.mjs.map +1 -1
  678. package/esm/components/Rating/Rating.mjs +6 -3
  679. package/esm/components/Rating/Rating.mjs.map +1 -1
  680. package/esm/components/Rating/RatingItem/RatingItem.mjs.map +1 -1
  681. package/esm/components/Rating/StarSymbol/StarIcon.mjs.map +1 -1
  682. package/esm/components/Rating/StarSymbol/StarSymbol.mjs +2 -1
  683. package/esm/components/Rating/StarSymbol/StarSymbol.mjs.map +1 -1
  684. package/esm/components/RingProgress/Curve/Curve.mjs.map +1 -1
  685. package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
  686. package/esm/components/RollingNumber/DigitColumn.mjs.map +1 -1
  687. package/esm/components/RollingNumber/RollingNumber.mjs +20 -14
  688. package/esm/components/RollingNumber/RollingNumber.mjs.map +1 -1
  689. package/esm/components/RollingNumber/RollingNumber.module.mjs +1 -0
  690. package/esm/components/RollingNumber/RollingNumber.module.mjs.map +1 -1
  691. package/esm/components/ScrollArea/ScrollArea.mjs +8 -6
  692. package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
  693. package/esm/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.mjs.map +1 -1
  694. package/esm/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.mjs.map +1 -1
  695. package/esm/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.mjs.map +1 -1
  696. package/esm/components/Scroller/Scroller.mjs.map +1 -1
  697. package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  698. package/esm/components/Select/Select.mjs +12 -0
  699. package/esm/components/Select/Select.mjs.map +1 -1
  700. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
  701. package/esm/components/SimpleGrid/SimpleGrid.mjs.map +1 -1
  702. package/esm/components/SimpleGrid/SimpleGridVariables.mjs +10 -8
  703. package/esm/components/SimpleGrid/SimpleGridVariables.mjs.map +1 -1
  704. package/esm/components/Skeleton/Skeleton.mjs +14 -13
  705. package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
  706. package/esm/components/Slider/Marks/Marks.mjs +3 -2
  707. package/esm/components/Slider/Marks/Marks.mjs.map +1 -1
  708. package/esm/components/Slider/RangeSlider/RangeSlider.mjs +20 -11
  709. package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
  710. package/esm/components/Slider/Slider/Slider.mjs +6 -6
  711. package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
  712. package/esm/components/Slider/Thumb/Thumb.mjs.map +1 -1
  713. package/esm/components/Slider/Track/Track.mjs.map +1 -1
  714. package/esm/components/Splitter/GripIcon.mjs.map +1 -1
  715. package/esm/components/Splitter/Splitter.mjs +8 -7
  716. package/esm/components/Splitter/Splitter.mjs.map +1 -1
  717. package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
  718. package/esm/components/Stack/Stack.mjs +14 -13
  719. package/esm/components/Stack/Stack.mjs.map +1 -1
  720. package/esm/components/Stepper/Stepper.context.mjs.map +1 -1
  721. package/esm/components/Stepper/Stepper.mjs +6 -3
  722. package/esm/components/Stepper/Stepper.mjs.map +1 -1
  723. package/esm/components/Stepper/Stepper.module.mjs.map +1 -1
  724. package/esm/components/Stepper/StepperStep/StepperStep.mjs +3 -2
  725. package/esm/components/Stepper/StepperStep/StepperStep.mjs.map +1 -1
  726. package/esm/components/Switch/Switch.mjs.map +1 -1
  727. package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs.map +1 -1
  728. package/esm/components/Table/Table.mjs +2 -2
  729. package/esm/components/Table/Table.mjs.map +1 -1
  730. package/esm/components/Table/TableScrollContainer.mjs.map +1 -1
  731. package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
  732. package/esm/components/Tabs/Tabs.mjs.map +1 -1
  733. package/esm/components/Tabs/TabsPanel/TabsPanel.mjs.map +1 -1
  734. package/esm/components/Tabs/TabsTab/TabsTab.mjs.map +1 -1
  735. package/esm/components/TagsInput/TagsInput.mjs +5 -1
  736. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  737. package/esm/components/Text/Text.mjs +18 -17
  738. package/esm/components/Text/Text.mjs.map +1 -1
  739. package/esm/components/TextInput/TextInput.mjs +6 -5
  740. package/esm/components/TextInput/TextInput.mjs.map +1 -1
  741. package/esm/components/ThemeIcon/ThemeIcon.mjs +14 -13
  742. package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
  743. package/esm/components/Timeline/Timeline.mjs.map +1 -1
  744. package/esm/components/Timeline/TimelineItem/TimelineItem.mjs.map +1 -1
  745. package/esm/components/Title/Title.mjs +1 -1
  746. package/esm/components/Title/Title.mjs.map +1 -1
  747. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  748. package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs +2 -2
  749. package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs.map +1 -1
  750. package/esm/components/Tooltip/TooltipFloating/use-floating-tooltip.mjs +1 -0
  751. package/esm/components/Tooltip/TooltipFloating/use-floating-tooltip.mjs.map +1 -1
  752. package/esm/components/Tooltip/TooltipGroup/TooltipGroup.mjs.map +1 -1
  753. package/esm/components/Transition/Transition.mjs.map +1 -1
  754. package/esm/components/Tree/FlatTreeNode.mjs.map +1 -1
  755. package/esm/components/Tree/Tree.mjs +2 -1
  756. package/esm/components/Tree/Tree.mjs.map +1 -1
  757. package/esm/components/Tree/TreeNode.mjs.map +1 -1
  758. package/esm/components/Tree/use-tree.mjs.map +1 -1
  759. package/esm/components/TreeSelect/TreeSelect.mjs +14 -9
  760. package/esm/components/TreeSelect/TreeSelect.mjs.map +1 -1
  761. package/esm/components/TreeSelect/TreeSelectOption.mjs.map +1 -1
  762. package/esm/components/Typography/Typography.mjs +12 -11
  763. package/esm/components/Typography/Typography.mjs.map +1 -1
  764. package/esm/components/Typography/Typography.module.mjs.map +1 -1
  765. package/esm/components/UnstyledButton/UnstyledButton.mjs +12 -11
  766. package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
  767. package/esm/components/VisuallyHidden/VisuallyHidden.mjs +12 -11
  768. package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
  769. package/esm/core/DirectionProvider/DirectionProvider.mjs +3 -2
  770. package/esm/core/DirectionProvider/DirectionProvider.mjs.map +1 -1
  771. package/esm/core/InlineStyles/InlineStyles.mjs.map +1 -1
  772. package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs +4 -2
  773. package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs.map +1 -1
  774. package/esm/core/MantineProvider/MantineProvider.mjs +3 -3
  775. package/esm/core/MantineProvider/MantineProvider.mjs.map +1 -1
  776. package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs.map +1 -1
  777. package/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.mjs.map +1 -1
  778. package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs +2 -1
  779. package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs.map +1 -1
  780. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs +0 -1
  781. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs.map +1 -1
  782. package/esm/core/utils/deep-merge/deep-merge.mjs +4 -3
  783. package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -1
  784. package/esm/index.mjs +4 -1
  785. package/esm/utils/InlineInput/InlineInput.mjs.map +1 -1
  786. package/lib/components/Accordion/Accordion.d.ts +1 -1
  787. package/lib/components/Accordion/AccordionChevron.d.ts +1 -1
  788. package/lib/components/ActionBar/ActionBar.context.d.ts +8 -0
  789. package/lib/components/ActionBar/ActionBar.d.ts +44 -0
  790. package/lib/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.d.ts +22 -0
  791. package/lib/components/ActionBar/ActionBarDivider/ActionBarDivider.d.ts +16 -0
  792. package/lib/components/ActionBar/index.d.ts +17 -0
  793. package/lib/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.d.ts +1 -1
  794. package/lib/components/Avatar/AvatarPlaceholderIcon.d.ts +1 -1
  795. package/lib/components/Cascader/CascaderColumns.d.ts +1 -1
  796. package/lib/components/Checkbox/CheckIcon.d.ts +2 -2
  797. package/lib/components/CloseButton/CloseIcon.d.ts +1 -1
  798. package/lib/components/ColorInput/EyeDropperIcon.d.ts +1 -1
  799. package/lib/components/ColorPicker/Saturation/Saturation.d.ts +1 -1
  800. package/lib/components/ColorPicker/Swatches/Swatches.d.ts +1 -1
  801. package/lib/components/ColorPicker/Thumb/Thumb.d.ts +1 -1
  802. package/lib/components/Combobox/Combobox.d.ts +1 -1
  803. package/lib/components/Combobox/ComboboxClearButton/ComboboxClearButton.d.ts +1 -1
  804. package/lib/components/Combobox/ComboboxHiddenInput/ComboboxHiddenInput.d.ts +1 -1
  805. package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -1
  806. package/lib/components/Combobox/get-options-lockup/get-option-by-label.d.ts +8 -0
  807. package/lib/components/Combobox/is-external-input-change/is-external-input-change.d.ts +7 -0
  808. package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +1 -1
  809. package/lib/components/CopyButton/CopyButton.d.ts +1 -1
  810. package/lib/components/Drawer/DrawerStack.d.ts +1 -1
  811. package/lib/components/FocusTrap/FocusTrap.d.ts +1 -1
  812. package/lib/components/Grid/GridCol/GridColVariables.d.ts +1 -1
  813. package/lib/components/Grid/GridVariables.d.ts +1 -1
  814. package/lib/components/HoverCard/HoverCard.d.ts +1 -1
  815. package/lib/components/HoverCard/HoverCardDropdown/HoverCardDropdown.d.ts +1 -1
  816. package/lib/components/HoverCard/HoverCardGroup/HoverCardGroup.d.ts +1 -1
  817. package/lib/components/HoverCard/HoverCardTarget/HoverCardTarget.d.ts +1 -1
  818. package/lib/components/Input/InputClearSection/InputClearSection.d.ts +1 -1
  819. package/lib/components/Input/index.d.ts +1 -1
  820. package/lib/components/Menu/Menu.d.ts +1 -1
  821. package/lib/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.d.ts +1 -1
  822. package/lib/components/Menu/MenuRadioGroup/MenuRadioGroup.d.ts +1 -1
  823. package/lib/components/Menu/MenuSelectableItem/MenuSelectableItem.d.ts +1 -1
  824. package/lib/components/Menu/MenuSub/MenuSub.d.ts +1 -1
  825. package/lib/components/Menu/MenuSubTarget/MenuSubTarget.d.ts +1 -1
  826. package/lib/components/Menu/MenuTarget/MenuTarget.d.ts +1 -1
  827. package/lib/components/Menubar/MenubarDropdown/MenubarDropdown.d.ts +1 -1
  828. package/lib/components/Menubar/MenubarMenu/MenubarMenu.d.ts +1 -1
  829. package/lib/components/Menubar/MenubarTarget/MenubarTarget.d.ts +1 -1
  830. package/lib/components/Modal/ModalStack.d.ts +1 -1
  831. package/lib/components/ModalBase/ModalBase.d.ts +1 -1
  832. package/lib/components/ModalBase/ModalBaseBody.d.ts +1 -1
  833. package/lib/components/ModalBase/ModalBaseCloseButton.d.ts +1 -1
  834. package/lib/components/ModalBase/ModalBaseContent.d.ts +1 -1
  835. package/lib/components/ModalBase/ModalBaseHeader.d.ts +1 -1
  836. package/lib/components/ModalBase/ModalBaseOverlay.d.ts +1 -1
  837. package/lib/components/ModalBase/ModalBaseTitle.d.ts +1 -1
  838. package/lib/components/ModalBase/NativeScrollArea.d.ts +1 -1
  839. package/lib/components/NativeSelect/NativeSelectOption.d.ts +1 -1
  840. package/lib/components/Notification/Notification.d.ts +2 -1
  841. package/lib/components/NumberFormatter/NumberFormatter.d.ts +1 -1
  842. package/lib/components/NumberInput/NumberInputChevron.d.ts +1 -1
  843. package/lib/components/Pagination/Pagination.icons.d.ts +5 -5
  844. package/lib/components/Pagination/PaginationItems/PaginationItems.d.ts +1 -1
  845. package/lib/components/PasswordInput/PasswordToggleIcon.d.ts +1 -1
  846. package/lib/components/Popover/Popover.d.ts +2 -2
  847. package/lib/components/Progress/Progress.d.ts +1 -1
  848. package/lib/components/Radio/RadioIcon.d.ts +1 -1
  849. package/lib/components/Rating/RatingItem/RatingItem.d.ts +1 -1
  850. package/lib/components/Rating/StarSymbol/StarIcon.d.ts +1 -1
  851. package/lib/components/Rating/StarSymbol/StarSymbol.d.ts +1 -1
  852. package/lib/components/RingProgress/Curve/Curve.d.ts +1 -1
  853. package/lib/components/RollingNumber/DigitColumn.d.ts +1 -1
  854. package/lib/components/RollingNumber/RollingNumber.d.ts +1 -1
  855. package/lib/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.d.ts +2 -2
  856. package/lib/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.d.ts +1 -1
  857. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.d.ts +1 -1
  858. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.d.ts +1 -1
  859. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.d.ts +1 -1
  860. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.d.ts +1 -1
  861. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.d.ts +1 -1
  862. package/lib/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.d.ts +1 -1
  863. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.d.ts +1 -1
  864. package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.d.ts +1 -1
  865. package/lib/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.d.ts +2 -2
  866. package/lib/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.d.ts +1 -1
  867. package/lib/components/SimpleGrid/SimpleGridVariables.d.ts +2 -2
  868. package/lib/components/Slider/Marks/Marks.d.ts +1 -1
  869. package/lib/components/Slider/SliderRoot/SliderRoot.d.ts +1 -1
  870. package/lib/components/Slider/Thumb/Thumb.d.ts +1 -1
  871. package/lib/components/Slider/Track/Track.d.ts +1 -1
  872. package/lib/components/Splitter/GripIcon.d.ts +2 -2
  873. package/lib/components/Stepper/Stepper.context.d.ts +1 -0
  874. package/lib/components/Stepper/Stepper.d.ts +3 -1
  875. package/lib/components/Table/TableDataRenderer.d.ts +1 -1
  876. package/lib/components/Textarea/Autosize.d.ts +1 -1
  877. package/lib/components/Tooltip/TooltipGroup/TooltipGroup.d.ts +1 -1
  878. package/lib/components/Transition/Transition.d.ts +1 -1
  879. package/lib/components/Tree/FlatTreeNode.d.ts +1 -1
  880. package/lib/components/Tree/Tree.d.ts +1 -1
  881. package/lib/components/Tree/TreeNode.d.ts +1 -1
  882. package/lib/components/TreeSelect/TreeSelectOption.d.ts +1 -1
  883. package/lib/components/index.d.ts +1 -0
  884. package/lib/core/DirectionProvider/DirectionProvider.d.ts +1 -1
  885. package/lib/core/InlineStyles/InlineStyles.d.ts +1 -1
  886. package/lib/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.d.ts +1 -1
  887. package/lib/core/MantineProvider/MantineClasses/MantineClasses.d.ts +1 -1
  888. package/lib/core/MantineProvider/MantineCssVariables/MantineCssVariables.d.ts +1 -1
  889. package/lib/core/MantineProvider/MantineProvider.d.ts +5 -5
  890. package/lib/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.d.ts +1 -1
  891. package/lib/utils/Floating/FloatingArrow/FloatingArrow.d.ts +1 -1
  892. package/lib/utils/InlineInput/InlineInput.d.ts +1 -1
  893. package/lib/utils/InputsGroupFieldset/InputsGroupFieldset.d.ts +1 -1
  894. package/package.json +5 -5
  895. package/styles/ActionBar.css +13 -0
  896. package/styles/ActionBar.layer.css +14 -0
  897. package/styles/RollingNumber.css +21 -0
  898. package/styles/RollingNumber.layer.css +21 -0
  899. package/styles/Stepper.css +30 -0
  900. package/styles/Stepper.layer.css +30 -0
  901. package/styles/Typography.css +59 -0
  902. package/styles/Typography.layer.css +59 -0
  903. package/styles.css +165 -41
  904. package/styles.layer.css +165 -41
@@ -1 +1 @@
1
- {"version":3,"file":"MenuSubItem.cjs","names":["polymorphicFactory","useProps","useMenuContext","SubMenuContext","useMantineTheme","useDirection","parseThemeColor","createEventHandler","UnstyledButton","createScopedKeydownHandler","AccordionChevron","classes"],"sources":["../../../../src/components/Menu/MenuSubItem/MenuSubItem.tsx"],"sourcesContent":["import { use, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n BoxProps,\n CompoundStylesApiProps,\n createEventHandler,\n createScopedKeydownHandler,\n MantineColor,\n parseThemeColor,\n polymorphicFactory,\n PolymorphicFactory,\n useDirection,\n useMantineTheme,\n useProps,\n} from '../../../core';\nimport { AccordionChevron } from '../../Accordion';\nimport { UnstyledButton } from '../../UnstyledButton';\nimport { useMenuContext } from '../Menu.context';\nimport { SubMenuContext } from '../MenuSub/MenuSub.context';\nimport classes from '../Menu.module.css';\n\nexport type MenuSubItemStylesNames = 'item' | 'itemLabel' | 'itemSection' | 'itemIndicator';\n\nexport interface MenuSubItemProps extends BoxProps, CompoundStylesApiProps<MenuSubItemFactory> {\n 'data-disabled'?: boolean;\n\n /** Item label */\n children?: React.ReactNode;\n\n /** Key of `theme.colors` or any valid CSS color */\n color?: MantineColor;\n\n /** Section displayed at the start of the label */\n leftSection?: React.ReactNode;\n\n /** Section displayed at the end of the label */\n rightSection?: React.ReactNode;\n\n /** Sets disabled attribute, applies disabled styles */\n disabled?: boolean;\n\n /** If set, the menu is closed when the item is clicked. Overrides `closeOnItemClick` prop on the `Menu` component. */\n closeMenuOnClick?: boolean;\n}\n\nexport type MenuSubItemFactory = PolymorphicFactory<{\n props: MenuSubItemProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: MenuSubItemStylesNames;\n compound: true;\n}>;\n\nexport const MenuSubItem = polymorphicFactory<MenuSubItemFactory>((props) => {\n const {\n classNames,\n className,\n style,\n styles,\n vars,\n color,\n leftSection,\n rightSection,\n children,\n disabled,\n 'data-disabled': dataDisabled,\n closeMenuOnClick,\n ref,\n ...others\n } = useProps('MenuSubItem', null, props);\n\n const ctx = useMenuContext();\n const subCtx = use(SubMenuContext);\n const theme = useMantineTheme();\n const { dir } = useDirection();\n const itemRef = useRef<HTMLButtonElement>(null);\n const _others: any = others;\n\n const colors = color ? theme.variantColorResolver({ color, theme, variant: 'light' }) : undefined;\n const parsedThemeColor = color ? parseThemeColor({ color, theme }) : null;\n\n const handleKeydown = createEventHandler<any>(_others.onKeyDown, (event) => {\n if (event.key === 'ArrowRight') {\n subCtx?.open();\n subCtx?.focusFirstItem();\n }\n\n if (event.key === 'ArrowLeft' && subCtx?.parentContext) {\n subCtx.parentContext.close();\n subCtx.parentContext.focusParentItem();\n }\n });\n\n const handleClick = createEventHandler(_others.onClick, () => {\n if (!dataDisabled && closeMenuOnClick) {\n ctx.closeDropdownImmediately();\n }\n });\n\n const handleMouseMove = createEventHandler<any>(_others.onMouseMove, () => {\n if (!ctx.hasSearch) {\n return;\n }\n const dropdown = itemRef.current?.closest('[data-menu-dropdown]');\n if (!dropdown) {\n return;\n }\n dropdown.querySelectorAll<HTMLElement>('[data-menu-active]').forEach((node) => {\n if (node !== itemRef.current && node.closest('[data-menu-dropdown]') === dropdown) {\n node.removeAttribute('data-menu-active');\n }\n });\n });\n\n const referenceProps = subCtx?.getReferenceProps({\n onMouseEnter: _others.onMouseEnter,\n onMouseLeave: _others.onMouseLeave,\n onPointerEnter: _others.onPointerEnter,\n onPointerLeave: _others.onPointerLeave,\n });\n\n return (\n <UnstyledButton\n onMouseDown={(event) => event.preventDefault()}\n {...others}\n {...referenceProps}\n unstyled={ctx.unstyled}\n tabIndex={ctx.menuItemTabIndex}\n {...ctx.getStyles('item', { className, style, styles, classNames })}\n ref={useMergedRef(itemRef, ref, subCtx?.setReference)}\n role=\"menuitem\"\n disabled={disabled}\n data-menu-item\n data-sub-menu-item\n data-disabled={disabled || dataDisabled || undefined}\n data-mantine-stop-propagation\n onClick={handleClick}\n onMouseMove={handleMouseMove}\n onKeyDown={createScopedKeydownHandler({\n siblingSelector: '[data-menu-item]:not([data-disabled])',\n parentSelector: '[data-menu-dropdown]',\n activateOnFocus: false,\n loop: ctx.loop,\n dir,\n orientation: 'vertical',\n onKeyDown: handleKeydown,\n })}\n __vars={{\n '--menu-item-color':\n parsedThemeColor?.isThemeColor && parsedThemeColor?.shade === undefined\n ? `var(--mantine-color-${parsedThemeColor.color}-6)`\n : colors?.color,\n '--menu-item-hover': colors?.hover,\n }}\n >\n {ctx.alignItemsLabels === 'all' && (\n <div {...ctx.getStyles('itemIndicator', { styles, classNames })} data-placeholder />\n )}\n {leftSection && (\n <div {...ctx.getStyles('itemSection', { styles, classNames })} data-position=\"left\">\n {leftSection}\n </div>\n )}\n\n {children && (\n <div {...ctx.getStyles('itemLabel', { styles, classNames })} data-menu-item-label>\n {children}\n </div>\n )}\n\n <div {...ctx.getStyles('itemSection', { styles, classNames })} data-position=\"right\">\n {rightSection || <AccordionChevron {...ctx.getStyles('chevron')} size={14} />}\n </div>\n </UnstyledButton>\n );\n});\n\nMenuSubItem.classes = classes;\nMenu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AU,aAAa;KAAE;KAAQ;IAAW,CAAC;IAAG,wBAAA;IAC1D;GACE,CAAA;GAGP,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,GAAI,IAAI,UAAU,eAAe;KAAE;KAAQ;IAAW,CAAC;IAAG,iBAAc;cAC1E,gBAAgB,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;KAAkB,GAAI,IAAI,UAAU,SAAS;KAAG,MAAM;IAAK,CAAA;GACzE,CAAA;EACS;;AAEpB,CAAC;AAED,YAAY,UAAUC,oBAAAA;AACtB,YAAY,cAAc"}
1
+ {"version":3,"file":"MenuSubItem.cjs","names":["polymorphicFactory","useProps","useMenuContext","use","SubMenuContext","useMantineTheme","useDirection","useRef","parseThemeColor","createEventHandler","UnstyledButton","useMergedRef","createScopedKeydownHandler","AccordionChevron","classes"],"sources":["../../../../src/components/Menu/MenuSubItem/MenuSubItem.tsx"],"sourcesContent":["import { use, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n BoxProps,\n CompoundStylesApiProps,\n createEventHandler,\n createScopedKeydownHandler,\n MantineColor,\n parseThemeColor,\n polymorphicFactory,\n PolymorphicFactory,\n useDirection,\n useMantineTheme,\n useProps,\n} from '../../../core';\nimport { AccordionChevron } from '../../Accordion';\nimport { UnstyledButton } from '../../UnstyledButton';\nimport { useMenuContext } from '../Menu.context';\nimport { SubMenuContext } from '../MenuSub/MenuSub.context';\nimport classes from '../Menu.module.css';\n\nexport type MenuSubItemStylesNames = 'item' | 'itemLabel' | 'itemSection' | 'itemIndicator';\n\nexport interface MenuSubItemProps extends BoxProps, CompoundStylesApiProps<MenuSubItemFactory> {\n 'data-disabled'?: boolean;\n\n /** Item label */\n children?: React.ReactNode;\n\n /** Key of `theme.colors` or any valid CSS color */\n color?: MantineColor;\n\n /** Section displayed at the start of the label */\n leftSection?: React.ReactNode;\n\n /** Section displayed at the end of the label */\n rightSection?: React.ReactNode;\n\n /** Sets disabled attribute, applies disabled styles */\n disabled?: boolean;\n\n /** If set, the menu is closed when the item is clicked. Overrides `closeOnItemClick` prop on the `Menu` component. */\n closeMenuOnClick?: boolean;\n}\n\nexport type MenuSubItemFactory = PolymorphicFactory<{\n props: MenuSubItemProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: MenuSubItemStylesNames;\n compound: true;\n}>;\n\nexport const MenuSubItem = polymorphicFactory<MenuSubItemFactory>((props) => {\n const {\n classNames,\n className,\n style,\n styles,\n vars,\n color,\n leftSection,\n rightSection,\n children,\n disabled,\n 'data-disabled': dataDisabled,\n closeMenuOnClick,\n ref,\n ...others\n } = useProps('MenuSubItem', null, props);\n\n const ctx = useMenuContext();\n const subCtx = use(SubMenuContext);\n const theme = useMantineTheme();\n const { dir } = useDirection();\n const itemRef = useRef<HTMLButtonElement>(null);\n const _others: any = others;\n\n const colors = color ? theme.variantColorResolver({ color, theme, variant: 'light' }) : undefined;\n const parsedThemeColor = color ? parseThemeColor({ color, theme }) : null;\n\n const handleKeydown = createEventHandler<any>(_others.onKeyDown, (event) => {\n if (event.key === 'ArrowRight') {\n subCtx?.open();\n subCtx?.focusFirstItem();\n }\n\n if (event.key === 'ArrowLeft' && subCtx?.parentContext) {\n subCtx.parentContext.close();\n subCtx.parentContext.focusParentItem();\n }\n });\n\n const handleClick = createEventHandler(_others.onClick, () => {\n if (!dataDisabled && closeMenuOnClick) {\n ctx.closeDropdownImmediately();\n }\n });\n\n const handleMouseMove = createEventHandler<any>(_others.onMouseMove, () => {\n if (!ctx.hasSearch) {\n return;\n }\n const dropdown = itemRef.current?.closest('[data-menu-dropdown]');\n if (!dropdown) {\n return;\n }\n dropdown.querySelectorAll<HTMLElement>('[data-menu-active]').forEach((node) => {\n if (node !== itemRef.current && node.closest('[data-menu-dropdown]') === dropdown) {\n node.removeAttribute('data-menu-active');\n }\n });\n });\n\n const referenceProps = subCtx?.getReferenceProps({\n onMouseEnter: _others.onMouseEnter,\n onMouseLeave: _others.onMouseLeave,\n onPointerEnter: _others.onPointerEnter,\n onPointerLeave: _others.onPointerLeave,\n });\n\n return (\n <UnstyledButton\n onMouseDown={(event) => event.preventDefault()}\n {...others}\n {...referenceProps}\n unstyled={ctx.unstyled}\n tabIndex={ctx.menuItemTabIndex}\n {...ctx.getStyles('item', { className, style, styles, classNames })}\n ref={useMergedRef(itemRef, ref, subCtx?.setReference)}\n role=\"menuitem\"\n disabled={disabled}\n data-menu-item\n data-sub-menu-item\n data-disabled={disabled || dataDisabled || undefined}\n data-mantine-stop-propagation\n onClick={handleClick}\n onMouseMove={handleMouseMove}\n onKeyDown={createScopedKeydownHandler({\n siblingSelector: '[data-menu-item]:not([data-disabled])',\n parentSelector: '[data-menu-dropdown]',\n activateOnFocus: false,\n loop: ctx.loop,\n dir,\n orientation: 'vertical',\n onKeyDown: handleKeydown,\n })}\n __vars={{\n '--menu-item-color':\n parsedThemeColor?.isThemeColor && parsedThemeColor?.shade === undefined\n ? `var(--mantine-color-${parsedThemeColor.color}-6)`\n : colors?.color,\n '--menu-item-hover': colors?.hover,\n }}\n >\n {ctx.alignItemsLabels === 'all' && (\n <div {...ctx.getStyles('itemIndicator', { styles, classNames })} data-placeholder />\n )}\n {leftSection && (\n <div {...ctx.getStyles('itemSection', { styles, classNames })} data-position=\"left\">\n {leftSection}\n </div>\n )}\n\n {children && (\n <div {...ctx.getStyles('itemLabel', { styles, classNames })} data-menu-item-label>\n {children}\n </div>\n )}\n\n <div {...ctx.getStyles('itemSection', { styles, classNames })} data-position=\"right\">\n {rightSection || <AccordionChevron {...ctx.getStyles('chevron')} size={14} />}\n </div>\n </UnstyledButton>\n );\n});\n\nMenuSubItem.classes = classes;\nMenuSubItem.displayName = '@mantine/core/MenuSubItem';\n"],"mappings":";;;;;;;;;;;;;;;;;AAqDA,MAAa,cAAcA,4BAAAA,oBAAwC,UAAU;CAC3E,MAAM,EACJ,YACA,WACA,OACA,QACA,MACA,OACA,aACA,cACA,UACA,UACA,iBAAiB,cACjB,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IAAG,iBAAc;IAC1E,UAAA,gBAAgB,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;KAAkB,GAAI,IAAI,UAAU,SAAS;KAAG,MAAM;IAAK,CAAA;GACzE,CAAA;EACS;;AAEpB,CAAC;AAED,YAAY,UAAUC,oBAAAA;AACtB,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuTarget.cjs","names":["useProps","getSingleElementChild","useMenuContext","createEventHandler","Popover"],"sources":["../../../../src/components/Menu/MenuTarget/MenuTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { createEventHandler, getSingleElementChild, useProps } from '../../../core';\nimport { Popover } from '../../Popover';\nimport { useMenuContext } from '../Menu.context';\n\nexport interface MenuTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop used to get element ref, useful for forwarding refs to custom components @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<MenuTargetProps>;\n\nexport function MenuTarget(props: MenuTargetProps) {\n const { children, refProp, ...others } = useProps('MenuTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Menu.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 = useMenuContext();\n const _childProps = child.props as any;\n\n const onClick = createEventHandler(_childProps.onClick, () => {\n if (ctx.trigger === 'click') {\n ctx.toggleDropdown();\n } else if (ctx.trigger === 'click-hover') {\n ctx.setOpenedViaClick(true);\n if (!ctx.opened) {\n ctx.openDropdown();\n }\n }\n });\n\n const onMouseEnter = createEventHandler(\n _childProps.onMouseEnter,\n () => (ctx.trigger === 'hover' || ctx.trigger === 'click-hover') && ctx.openDropdown()\n );\n\n const onMouseLeave = createEventHandler(_childProps.onMouseLeave, () => {\n if (ctx.trigger === 'hover') {\n ctx.closeDropdown();\n } else if (ctx.trigger === 'click-hover' && !ctx.openedViaClick) {\n ctx.closeDropdown();\n }\n });\n\n return (\n <Popover.Target refProp={refProp} popupType=\"menu\" {...others}>\n {cloneElement(child, {\n onClick,\n onMouseEnter,\n onMouseLeave,\n 'data-expanded': ctx.opened ? true : undefined,\n } as any)}\n </Popover.Target>\n );\n}\n\nMenuTarget.displayName = '@mantine/core/MenuTarget';\n"],"mappings":";;;;;;;;;AAaA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAgB,WAAW,OAAwB;CACjD,MAAM,EAAE,UAAU,SAAS,GAAG,WAAWA,kBAAAA,SAAS,cAAc,cAAc,KAAK;CAEnF,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,+JACF;CAGF,MAAM,MAAMC,qBAAAA,eAAe;CAC3B,MAAM,cAAc,MAAM;CAE1B,MAAM,UAAUC,6BAAAA,mBAAmB,YAAY,eAAe;EAC5D,IAAI,IAAI,YAAY,SAClB,IAAI,eAAe;OACd,IAAI,IAAI,YAAY,eAAe;GACxC,IAAI,kBAAkB,IAAI;GAC1B,IAAI,CAAC,IAAI,QACP,IAAI,aAAa;EAErB;CACF,CAAC;CAED,MAAM,eAAeA,6BAAAA,mBACnB,YAAY,qBACL,IAAI,YAAY,WAAW,IAAI,YAAY,kBAAkB,IAAI,aAAa,CACvF;CAEA,MAAM,eAAeA,6BAAAA,mBAAmB,YAAY,oBAAoB;EACtE,IAAI,IAAI,YAAY,SAClB,IAAI,cAAc;OACb,IAAI,IAAI,YAAY,iBAAiB,CAAC,IAAI,gBAC/C,IAAI,cAAc;CAEtB,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,QAAT;EAAyB;EAAS,WAAU;EAAO,GAAI;oCACvC,OAAO;GACnB;GACA;GACA;GACA,iBAAiB,IAAI,SAAS,OAAO,KAAA;EACvC,CAAQ;CACM,CAAA;AAEpB;AAEA,WAAW,cAAc"}
1
+ {"version":3,"file":"MenuTarget.cjs","names":["useProps","getSingleElementChild","useMenuContext","createEventHandler","Popover","cloneElement"],"sources":["../../../../src/components/Menu/MenuTarget/MenuTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { createEventHandler, getSingleElementChild, useProps } from '../../../core';\nimport { Popover } from '../../Popover';\nimport { useMenuContext } from '../Menu.context';\n\nexport interface MenuTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop used to get element ref, useful for forwarding refs to custom components @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<MenuTargetProps>;\n\nexport function MenuTarget(props: MenuTargetProps) {\n const { children, refProp, ...others } = useProps('MenuTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Menu.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 = useMenuContext();\n const _childProps = child.props as any;\n\n const onClick = createEventHandler(_childProps.onClick, () => {\n if (ctx.trigger === 'click') {\n ctx.toggleDropdown();\n } else if (ctx.trigger === 'click-hover') {\n ctx.setOpenedViaClick(true);\n if (!ctx.opened) {\n ctx.openDropdown();\n }\n }\n });\n\n const onMouseEnter = createEventHandler(\n _childProps.onMouseEnter,\n () => (ctx.trigger === 'hover' || ctx.trigger === 'click-hover') && ctx.openDropdown()\n );\n\n const onMouseLeave = createEventHandler(_childProps.onMouseLeave, () => {\n if (ctx.trigger === 'hover') {\n ctx.closeDropdown();\n } else if (ctx.trigger === 'click-hover' && !ctx.openedViaClick) {\n ctx.closeDropdown();\n }\n });\n\n return (\n <Popover.Target refProp={refProp} popupType=\"menu\" {...others}>\n {cloneElement(child, {\n onClick,\n onMouseEnter,\n onMouseLeave,\n 'data-expanded': ctx.opened ? true : undefined,\n } as any)}\n </Popover.Target>\n );\n}\n\nMenuTarget.displayName = '@mantine/core/MenuTarget';\n"],"mappings":";;;;;;;;;AAaA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAgB,WAAW,OAAwB;CACjD,MAAM,EAAE,UAAU,SAAS,GAAG,WAAWA,kBAAAA,SAAS,cAAc,cAAc,KAAK;CAEnF,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,+JACF;CAGF,MAAM,MAAMC,qBAAAA,eAAe;CAC3B,MAAM,cAAc,MAAM;CAE1B,MAAM,UAAUC,6BAAAA,mBAAmB,YAAY,eAAe;EAC5D,IAAI,IAAI,YAAY,SAClB,IAAI,eAAe;OACd,IAAI,IAAI,YAAY,eAAe;GACxC,IAAI,kBAAkB,IAAI;GAC1B,IAAI,CAAC,IAAI,QACP,IAAI,aAAa;EAErB;CACF,CAAC;CAED,MAAM,eAAeA,6BAAAA,mBACnB,YAAY,qBACL,IAAI,YAAY,WAAW,IAAI,YAAY,kBAAkB,IAAI,aAAa,CACvF;CAEA,MAAM,eAAeA,6BAAAA,mBAAmB,YAAY,oBAAoB;EACtE,IAAI,IAAI,YAAY,SAClB,IAAI,cAAc;OACb,IAAI,IAAI,YAAY,iBAAiB,CAAC,IAAI,gBAC/C,IAAI,cAAc;CAEtB,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,QAAT;EAAyB;EAAS,WAAU;EAAO,GAAI;EACpDC,WAAAA,GAAAA,MAAAA,aAAAA,CAAa,OAAO;GACnB;GACA;GACA;GACA,iBAAiB,IAAI,SAAS,OAAO,KAAA;EACvC,CAAQ;CACM,CAAA;AAEpB;AAEA,WAAW,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-menu-type-ahead.cjs","names":[],"sources":["../../../src/components/Menu/use-menu-type-ahead.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nconst RESET_DELAY = 500;\n\ninterface UseMenuTypeAheadOptions {\n enabled: boolean;\n opened: boolean;\n getDropdown: () => HTMLElement | null;\n}\n\ninterface TypeAheadState {\n buffer: string;\n timeoutId: number | null;\n}\n\nfunction getItemText(item: HTMLElement): string {\n const label = item.querySelector<HTMLElement>('[data-menu-item-label]');\n return ((label ?? item).textContent ?? '').trim().toLowerCase();\n}\n\nfunction isRepeatedChar(buffer: string): boolean {\n return buffer.length > 1 && buffer.split('').every((char) => char === buffer[0]);\n}\n\nexport function useMenuTypeAhead({ enabled, opened, getDropdown }: UseMenuTypeAheadOptions) {\n const stateRef = useRef<TypeAheadState>({ buffer: '', timeoutId: null });\n\n useEffect(() => {\n if (opened && enabled) {\n return;\n }\n const state = stateRef.current;\n if (state.timeoutId !== null) {\n window.clearTimeout(state.timeoutId);\n state.timeoutId = null;\n }\n state.buffer = '';\n }, [opened, enabled]);\n\n useEffect(\n () => () => {\n const { timeoutId } = stateRef.current;\n if (timeoutId !== null) {\n window.clearTimeout(timeoutId);\n }\n },\n []\n );\n\n return (event: React.KeyboardEvent<HTMLElement>) => {\n if (!enabled || event.defaultPrevented) {\n return;\n }\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (event.key.length !== 1 || event.key === ' ') {\n return;\n }\n\n const target = event.target as HTMLElement | null;\n if (\n target &&\n (target.tagName === 'INPUT' ||\n target.tagName === 'TEXTAREA' ||\n target.tagName === 'SELECT' ||\n target.isContentEditable)\n ) {\n return;\n }\n\n const dropdown = getDropdown();\n if (!dropdown) {\n return;\n }\n\n const items = Array.from(\n dropdown.querySelectorAll<HTMLElement>('[data-menu-item]:not([data-disabled])')\n ).filter((item) => item.closest('[data-menu-dropdown]') === dropdown);\n\n if (items.length === 0) {\n return;\n }\n\n const state = stateRef.current;\n state.buffer = (state.buffer + event.key).toLowerCase();\n\n if (state.timeoutId !== null) {\n window.clearTimeout(state.timeoutId);\n }\n state.timeoutId = window.setTimeout(() => {\n state.buffer = '';\n state.timeoutId = null;\n }, RESET_DELAY);\n\n const activeElement = document.activeElement as HTMLElement | null;\n const currentIndex = activeElement ? items.indexOf(activeElement) : -1;\n\n let match: HTMLElement | null = null;\n\n if (state.buffer.length === 1 || isRepeatedChar(state.buffer)) {\n const char = state.buffer[0]!;\n const startIndex = currentIndex + 1;\n for (let i = 0; i < items.length; i += 1) {\n const idx = (startIndex + i) % items.length;\n if (getItemText(items[idx]!).startsWith(char)) {\n match = items[idx]!;\n break;\n }\n }\n } else {\n for (let i = 0; i < items.length; i += 1) {\n if (getItemText(items[i]!).startsWith(state.buffer)) {\n match = items[i]!;\n break;\n }\n }\n }\n\n if (match) {\n event.preventDefault();\n match.focus();\n }\n };\n}\n"],"mappings":";;;AAEA,MAAM,cAAc;AAapB,SAAS,YAAY,MAA2B;CAE9C,SADc,KAAK,cAA2B,wBACjC,KAAK,KAAA,CAAM,eAAe,GAAA,CAAI,KAAK,CAAC,CAAC,YAAY;AAChE;AAEA,SAAS,eAAe,QAAyB;CAC/C,OAAO,OAAO,SAAS,KAAK,OAAO,MAAM,EAAE,CAAC,CAAC,OAAO,SAAS,SAAS,OAAO,EAAE;AACjF;AAEA,SAAgB,iBAAiB,EAAE,SAAS,QAAQ,eAAwC;CAC1F,MAAM,YAAA,GAAA,MAAA,OAAA,CAAkC;EAAE,QAAQ;EAAI,WAAW;CAAK,CAAC;CAEvE,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,UAAU,SACZ;EAEF,MAAM,QAAQ,SAAS;EACvB,IAAI,MAAM,cAAc,MAAM;GAC5B,OAAO,aAAa,MAAM,SAAS;GACnC,MAAM,YAAY;EACpB;EACA,MAAM,SAAS;CACjB,GAAG,CAAC,QAAQ,OAAO,CAAC;CAEpB,CAAA,GAAA,MAAA,UAAA,aACc;EACV,MAAM,EAAE,cAAc,SAAS;EAC/B,IAAI,cAAc,MAChB,OAAO,aAAa,SAAS;CAEjC,GACA,CAAC,CACH;CAEA,QAAQ,UAA4C;EAClD,IAAI,CAAC,WAAW,MAAM,kBACpB;EAEF,IAAI,MAAM,WAAW,MAAM,WAAW,MAAM,QAC1C;EAEF,IAAI,MAAM,IAAI,WAAW,KAAK,MAAM,QAAQ,KAC1C;EAGF,MAA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],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nconst RESET_DELAY = 500;\n\ninterface UseMenuTypeAheadOptions {\n enabled: boolean;\n opened: boolean;\n getDropdown: () => HTMLElement | null;\n}\n\ninterface TypeAheadState {\n buffer: string;\n timeoutId: number | null;\n}\n\nfunction getItemText(item: HTMLElement): string {\n const label = item.querySelector<HTMLElement>('[data-menu-item-label]');\n return ((label ?? item).textContent ?? '').trim().toLowerCase();\n}\n\nfunction isRepeatedChar(buffer: string): boolean {\n return buffer.length > 1 && buffer.split('').every((char) => char === buffer[0]);\n}\n\nexport function useMenuTypeAhead({ enabled, opened, getDropdown }: UseMenuTypeAheadOptions) {\n const stateRef = useRef<TypeAheadState>({ buffer: '', timeoutId: null });\n\n useEffect(() => {\n if (opened && enabled) {\n return;\n }\n const state = stateRef.current;\n if (state.timeoutId !== null) {\n window.clearTimeout(state.timeoutId);\n state.timeoutId = null;\n }\n state.buffer = '';\n }, [opened, enabled]);\n\n useEffect(\n () => () => {\n const { timeoutId } = stateRef.current;\n if (timeoutId !== null) {\n window.clearTimeout(timeoutId);\n }\n },\n []\n );\n\n return (event: React.KeyboardEvent<HTMLElement>) => {\n if (!enabled || event.defaultPrevented) {\n return;\n }\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (event.key.length !== 1 || event.key === ' ') {\n return;\n }\n\n const target = event.target as HTMLElement | null;\n if (\n target &&\n (target.tagName === 'INPUT' ||\n target.tagName === 'TEXTAREA' ||\n target.tagName === 'SELECT' ||\n target.isContentEditable)\n ) {\n return;\n }\n\n const dropdown = getDropdown();\n if (!dropdown) {\n return;\n }\n\n const items = Array.from(\n dropdown.querySelectorAll<HTMLElement>('[data-menu-item]:not([data-disabled])')\n ).filter((item) => item.closest('[data-menu-dropdown]') === dropdown);\n\n if (items.length === 0) {\n return;\n }\n\n const state = stateRef.current;\n state.buffer = (state.buffer + event.key).toLowerCase();\n\n if (state.timeoutId !== null) {\n window.clearTimeout(state.timeoutId);\n }\n state.timeoutId = window.setTimeout(() => {\n state.buffer = '';\n state.timeoutId = null;\n }, RESET_DELAY);\n\n const activeElement = document.activeElement as HTMLElement | null;\n const currentIndex = activeElement ? items.indexOf(activeElement) : -1;\n\n let match: HTMLElement | null = null;\n\n if (state.buffer.length === 1 || isRepeatedChar(state.buffer)) {\n const char = state.buffer[0]!;\n const startIndex = currentIndex + 1;\n for (let i = 0; i < items.length; i += 1) {\n const idx = (startIndex + i) % items.length;\n if (getItemText(items[idx]!).startsWith(char)) {\n match = items[idx]!;\n break;\n }\n }\n } else {\n for (let i = 0; i < items.length; i += 1) {\n if (getItemText(items[i]!).startsWith(state.buffer)) {\n match = items[i]!;\n break;\n }\n }\n }\n\n if (match) {\n event.preventDefault();\n match.focus();\n }\n };\n}\n"],"mappings":";;;AAEA,MAAM,cAAc;AAapB,SAAS,YAAY,MAA2B;CAE9C,SADc,KAAK,cAA2B,wBACjC,KAAK,KAAA,CAAM,eAAe,GAAA,CAAI,KAAK,CAAC,CAAC,YAAY;AAChE;AAEA,SAAS,eAAe,QAAyB;CAC/C,OAAO,OAAO,SAAS,KAAK,OAAO,MAAM,EAAE,CAAC,CAAC,OAAO,SAAS,SAAS,OAAO,EAAE;AACjF;AAEA,SAAgB,iBAAiB,EAAE,SAAS,QAAQ,eAAwC;CAC1F,MAAM,YAAA,GAAWA,MAAAA,OAAAA,CAAuB;EAAE,QAAQ;EAAI,WAAW;CAAK,CAAC;CAEvE,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,UAAU,SACZ;EAEF,MAAM,QAAQ,SAAS;EACvB,IAAI,MAAM,cAAc,MAAM;GAC5B,OAAO,aAAa,MAAM,SAAS;GACnC,MAAM,YAAY;EACpB;EACA,MAAM,SAAS;CACjB,GAAG,CAAC,QAAQ,OAAO,CAAC;CAEpB,CAAA,GAAA,MAAA,UAAA,aACc;EACV,MAAM,EAAE,cAAc,SAAS;EAC/B,IAAI,cAAc,MAChB,OAAO,aAAa,SAAS;CAEjC,GAC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GAAG;GACnD,QAAQ,MAAM;GACd;EACF;EAIJ,IAAI,OAAO;GACT,MAAM,eAAe;GACrB,MAAM,MAAM;EACd;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Menubar.cjs","names":["factory","useProps","useStyles","MenubarContextProvider","Box","classes","MenubarMenu","MenubarTarget","MenubarDropdown"],"sources":["../../../src/components/Menubar/Menubar.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useId, useIsomorphicEffect, useMergedRef, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { FloatingPosition } from '../../utils/Floating';\nimport { MenubarContextProvider, type MenubarContextValue } from './Menubar.context';\nimport { MenubarDropdown, type MenubarDropdownProps } from './MenubarDropdown/MenubarDropdown';\nimport { MenubarMenu, type MenubarMenuProps } from './MenubarMenu/MenubarMenu';\nimport { MenubarTarget, type MenubarTargetProps } from './MenubarTarget/MenubarTarget';\nimport classes from './Menubar.module.css';\n\nexport type MenubarStylesNames = 'root' | 'target';\n\nexport type MenubarFactory = Factory<{\n props: MenubarProps;\n ref: HTMLDivElement;\n stylesNames: MenubarStylesNames;\n staticComponents: {\n Menu: typeof MenubarMenu;\n Target: typeof MenubarTarget;\n Dropdown: typeof MenubarDropdown;\n };\n}>;\n\nexport interface MenubarProps\n extends BoxProps, StylesApiProps<MenubarFactory>, ElementProps<'div'> {\n /** `Menubar.Menu` components */\n children?: React.ReactNode;\n\n /** Index of the controlled opened menu, `null` closes all menus */\n openIndex?: number | null;\n\n /** Index of the opened menu for uncontrolled component @default `null` */\n defaultOpenIndex?: number | null;\n\n /** Called when the opened menu changes with its index or `null` when all menus are closed */\n onOpenChange?: (index: number | null) => void;\n\n /** Event that opens a menu when none of the menus is opened. `'click'` opens a menu on target click and then switches menus on hover (desktop application pattern), `'hover'` opens a menu when the target is hovered @default `'click'` */\n trigger?: 'click' | 'hover';\n\n /** If set, arrow key navigation wraps from last to first menu and vice versa @default `true` */\n loop?: boolean;\n\n /** Dropdown position relative to the target element @default `'bottom-start'` */\n position?: FloatingPosition;\n}\n\nconst defaultProps = {\n trigger: 'click',\n loop: true,\n position: 'bottom-start',\n} satisfies Partial<MenubarProps>;\n\nexport const Menubar = factory<MenubarFactory>((_props) => {\n const props = useProps('Menubar', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n openIndex,\n defaultOpenIndex,\n onOpenChange,\n trigger,\n loop,\n position,\n attributes,\n mod,\n ref,\n ...others\n } = props;\n\n const getStyles = useStyles<MenubarFactory>({\n name: 'Menubar',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const rootRef = useRef<HTMLDivElement>(null);\n const menubarId = useId();\n\n const [_openIndex, setOpenIndex] = useUncontrolled<number | null>({\n value: openIndex,\n defaultValue: defaultOpenIndex,\n finalValue: null,\n onChange: onOpenChange,\n });\n\n const [activeIndex, setActiveIndex] = useState(0);\n const openSourceRef = useRef<'click' | 'hover' | null>(null);\n\n const openMenu = useCallback(\n (index: number, source: 'click' | 'hover') => {\n openSourceRef.current = source;\n setOpenIndex(index);\n },\n [setOpenIndex]\n );\n\n const closeMenu = useCallback(() => {\n openSourceRef.current = null;\n setOpenIndex(null);\n }, [setOpenIndex]);\n\n const closeTimeoutRef = useRef(-1);\n\n const cancelClose = useCallback(() => {\n window.clearTimeout(closeTimeoutRef.current);\n }, []);\n\n const scheduleClose = useCallback(() => {\n window.clearTimeout(closeTimeoutRef.current);\n closeTimeoutRef.current = window.setTimeout(closeMenu, 120);\n }, [closeMenu]);\n\n useIsomorphicEffect(() => () => window.clearTimeout(closeTimeoutRef.current), []);\n\n const getOpenSource = useCallback(() => openSourceRef.current, []);\n\n const previousOpenIndexRef = useRef<number | null>(_openIndex);\n const getPreviousOpenIndex = useCallback(() => previousOpenIndexRef.current, []);\n\n useIsomorphicEffect(() => {\n previousOpenIndexRef.current = _openIndex;\n });\n\n const getTargets = useCallback(\n () =>\n Array.from(\n rootRef.current?.querySelectorAll<HTMLButtonElement>('[data-menubar-target]') ?? []\n ),\n []\n );\n\n const getMenuIndex = useCallback(\n (id: string) => getTargets().findIndex((node) => node.getAttribute('data-menubar-id') === id),\n [getTargets]\n );\n\n const getEnabledIndexes = useCallback(\n () =>\n getTargets().reduce<number[]>((acc, node, index) => {\n if (!node.disabled && !node.hasAttribute('data-disabled')) {\n acc.push(index);\n }\n return acc;\n }, []),\n [getTargets]\n );\n\n const focusTarget = useCallback(\n (index: number) => {\n getTargets()[index]?.focus();\n },\n [getTargets]\n );\n\n const focusMenuItem = useCallback(\n (index: number, itemPosition: 'first' | 'last') => {\n window.setTimeout(() => {\n const target = getTargets()[index];\n const controls = target?.getAttribute('aria-controls');\n const dropdown = controls\n ? document.getElementById(controls)\n : document.querySelector<HTMLElement>(`[data-menubar-dropdown=\"${menubarId}\"]`);\n const items = dropdown?.querySelectorAll<HTMLElement>(\n '[data-menu-item]:not([data-disabled])'\n );\n\n if (items && items.length > 0) {\n const item = itemPosition === 'first' ? items[0] : items[items.length - 1];\n item?.focus();\n }\n }, 40);\n },\n [getTargets]\n );\n\n const getAdjacentIndex = useCallback(\n (current: number, direction: 1 | -1) => {\n const enabled = getEnabledIndexes();\n\n if (enabled.length === 0) {\n return current;\n }\n\n const currentPosition = enabled.indexOf(current);\n let nextPosition = currentPosition === -1 ? 0 : currentPosition + direction;\n\n if (loop) {\n nextPosition = (nextPosition + enabled.length) % enabled.length;\n } else {\n nextPosition = Math.max(0, Math.min(enabled.length - 1, nextPosition));\n }\n\n return enabled[nextPosition] ?? current;\n },\n [getEnabledIndexes, loop]\n );\n\n useIsomorphicEffect(() => {\n const enabled = getEnabledIndexes();\n if (enabled.length === 0) {\n return;\n }\n\n // While a menu is open, the single tab stop must stay on the opened menu's target,\n // including when it was opened programmatically via openIndex/defaultOpenIndex.\n if (_openIndex !== null && enabled.includes(_openIndex)) {\n if (activeIndex !== _openIndex) {\n setActiveIndex(_openIndex);\n }\n return;\n }\n\n if (!enabled.includes(activeIndex)) {\n setActiveIndex(enabled[0]);\n }\n });\n\n const contextValue: MenubarContextValue = {\n getStyles,\n id: menubarId,\n openIndex: _openIndex,\n setOpenIndex,\n openMenu,\n closeMenu,\n scheduleClose,\n cancelClose,\n getOpenSource,\n getPreviousOpenIndex,\n activeIndex,\n setActiveIndex,\n trigger: trigger!,\n loop: loop!,\n position: position!,\n unstyled,\n getMenuIndex,\n getTargets,\n getEnabledIndexes,\n getAdjacentIndex,\n focusTarget,\n focusMenuItem,\n };\n\n return (\n <MenubarContextProvider value={contextValue}>\n <Box\n ref={useMergedRef(ref, rootRef)}\n role=\"menubar\"\n aria-orientation=\"horizontal\"\n mod={mod}\n {...getStyles('root')}\n {...others}\n data-menubar\n >\n {children}\n </Box>\n </MenubarContextProvider>\n );\n});\n\nMenubar.classes = classes;\nMenubar.displayName = '@mantine/core/Menubar';\nMenubar.Menu = MenubarMenu;\nMenubar.Target = MenubarTarget;\nMenubar.Dropdown = MenubarDropdown;\n\nexport namespace Menubar {\n export type Props = MenubarProps;\n export type StylesNames = MenubarStylesNames;\n export type Factory = MenubarFactory;\n\n export namespace Menu {\n export type Props = MenubarMenuProps;\n }\n\n export namespace Target {\n export type Props = MenubarTargetProps;\n }\n\n export namespace Dropdown {\n export type Props = MenubarDropdownProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAwDA,MAAM,eAAe;CACnB,SAAS;CACT,MAAM;CACN,UAAU;AACZ;AAEA,MAAa,UAAUA,gBAAAA,SAAyB,WAAW;CACzD,MAAM,QAAQC,kBAAAA,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,WACA,kBACA,cACA,SACA,MACA,UACA,YACA,KACA,KACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA0B;EAC1C,MAAM;EACN,SAAA,uBAAA;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,gBAAgB,eAAe,QAAQ,UAAU,QAAQ;OAEzD,eAAe,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,SAAS,GAAG,YAAY,CAAC;EAGvE,OAAO,QAAQ,iBAAiB;CAClC,GACA,CAAC,mBAAmB,IAAI,CAC1B;CAEA,CAAA,GAAA,eAAA,oBAAA,OAA0B;EACxB,MAAM,UAAU,kBAAkB;EAClC,IAAI,QAAQ,WAAW,GACrB;EAKF,IAAI,eAAe,QAAQ,QAAQ,SAAS,UAAU,GAAG;GACvD,IAAI,gBAAgB,YAClB,eAAe,UAAU;GAE3B;EACF;EAEA,IAAI,CAAC,QAAQ,SAAS,WAAW,GAC/B,eAAe,QAAQ,EAAE;CAE7B,CAAC;CA2BD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,wBAAD;EAAwB,OAAO;GAzB/B;GACA,IAAI;GACJ,WAAW;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACS;GACH;GACI;GACV;GACA;GACA;GACA;GACA;GACA;GACA;EAI0C;YACxC,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;GACE,MAAA,GAAA,eAAA,aAAA,CAAkB,KAAK,OAAO;GAC9B,MAAK;GACL,oBAAiB;GACZ;GACL,GAAI,UAAU,MAAM;GACpB,GAAI;GACJ,gBAAA;GAEC;EACE,CAAA;CACiB,CAAA;AAE5B,CAAC;AAED,QAAQ,UAAUC,uBAAAA;AAClB,QAAQ,cAAc;AACtB,QAAQ,OAAOC,oBAAAA;AACf,QAAQ,SAASC,sBAAAA;AACjB,QAAQ,WAAWC,wBAAAA"}
1
+ {"version":3,"file":"Menubar.cjs","names":["factory","useProps","useStyles","useRef","useId","useUncontrolled","useState","useCallback","MenubarContextProvider","Box","useMergedRef","classes","MenubarMenu","MenubarTarget","MenubarDropdown"],"sources":["../../../src/components/Menubar/Menubar.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useId, useIsomorphicEffect, useMergedRef, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { FloatingPosition } from '../../utils/Floating';\nimport { MenubarContextProvider, type MenubarContextValue } from './Menubar.context';\nimport { MenubarDropdown, type MenubarDropdownProps } from './MenubarDropdown/MenubarDropdown';\nimport { MenubarMenu, type MenubarMenuProps } from './MenubarMenu/MenubarMenu';\nimport { MenubarTarget, type MenubarTargetProps } from './MenubarTarget/MenubarTarget';\nimport classes from './Menubar.module.css';\n\nexport type MenubarStylesNames = 'root' | 'target';\n\nexport type MenubarFactory = Factory<{\n props: MenubarProps;\n ref: HTMLDivElement;\n stylesNames: MenubarStylesNames;\n staticComponents: {\n Menu: typeof MenubarMenu;\n Target: typeof MenubarTarget;\n Dropdown: typeof MenubarDropdown;\n };\n}>;\n\nexport interface MenubarProps\n extends BoxProps, StylesApiProps<MenubarFactory>, ElementProps<'div'> {\n /** `Menubar.Menu` components */\n children?: React.ReactNode;\n\n /** Index of the controlled opened menu, `null` closes all menus */\n openIndex?: number | null;\n\n /** Index of the opened menu for uncontrolled component @default `null` */\n defaultOpenIndex?: number | null;\n\n /** Called when the opened menu changes with its index or `null` when all menus are closed */\n onOpenChange?: (index: number | null) => void;\n\n /** Event that opens a menu when none of the menus is opened. `'click'` opens a menu on target click and then switches menus on hover (desktop application pattern), `'hover'` opens a menu when the target is hovered @default `'click'` */\n trigger?: 'click' | 'hover';\n\n /** If set, arrow key navigation wraps from last to first menu and vice versa @default `true` */\n loop?: boolean;\n\n /** Dropdown position relative to the target element @default `'bottom-start'` */\n position?: FloatingPosition;\n}\n\nconst defaultProps = {\n trigger: 'click',\n loop: true,\n position: 'bottom-start',\n} satisfies Partial<MenubarProps>;\n\nexport const Menubar = factory<MenubarFactory>((_props) => {\n const props = useProps('Menubar', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n openIndex,\n defaultOpenIndex,\n onOpenChange,\n trigger,\n loop,\n position,\n attributes,\n mod,\n ref,\n ...others\n } = props;\n\n const getStyles = useStyles<MenubarFactory>({\n name: 'Menubar',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n const rootRef = useRef<HTMLDivElement>(null);\n const menubarId = useId();\n\n const [_openIndex, setOpenIndex] = useUncontrolled<number | null>({\n value: openIndex,\n defaultValue: defaultOpenIndex,\n finalValue: null,\n onChange: onOpenChange,\n });\n\n const [activeIndex, setActiveIndex] = useState(0);\n const openSourceRef = useRef<'click' | 'hover' | null>(null);\n\n const openMenu = useCallback(\n (index: number, source: 'click' | 'hover') => {\n openSourceRef.current = source;\n setOpenIndex(index);\n },\n [setOpenIndex]\n );\n\n const closeMenu = useCallback(() => {\n openSourceRef.current = null;\n setOpenIndex(null);\n }, [setOpenIndex]);\n\n const closeTimeoutRef = useRef(-1);\n\n const cancelClose = useCallback(() => {\n window.clearTimeout(closeTimeoutRef.current);\n }, []);\n\n const scheduleClose = useCallback(() => {\n window.clearTimeout(closeTimeoutRef.current);\n closeTimeoutRef.current = window.setTimeout(closeMenu, 120);\n }, [closeMenu]);\n\n useIsomorphicEffect(() => () => window.clearTimeout(closeTimeoutRef.current), []);\n\n const getOpenSource = useCallback(() => openSourceRef.current, []);\n\n const previousOpenIndexRef = useRef<number | null>(_openIndex);\n const getPreviousOpenIndex = useCallback(() => previousOpenIndexRef.current, []);\n\n useIsomorphicEffect(() => {\n previousOpenIndexRef.current = _openIndex;\n });\n\n const getTargets = useCallback(\n () =>\n Array.from(\n rootRef.current?.querySelectorAll<HTMLButtonElement>('[data-menubar-target]') ?? []\n ),\n []\n );\n\n const getMenuIndex = useCallback(\n (id: string) => getTargets().findIndex((node) => node.getAttribute('data-menubar-id') === id),\n [getTargets]\n );\n\n const getEnabledIndexes = useCallback(\n () =>\n getTargets().reduce<number[]>((acc, node, index) => {\n if (!node.disabled && !node.hasAttribute('data-disabled')) {\n acc.push(index);\n }\n return acc;\n }, []),\n [getTargets]\n );\n\n const focusTarget = useCallback(\n (index: number) => {\n getTargets()[index]?.focus();\n },\n [getTargets]\n );\n\n const focusMenuItem = useCallback(\n (index: number, itemPosition: 'first' | 'last') => {\n window.setTimeout(() => {\n const target = getTargets()[index];\n const controls = target?.getAttribute('aria-controls');\n const dropdown = controls\n ? document.getElementById(controls)\n : document.querySelector<HTMLElement>(`[data-menubar-dropdown=\"${menubarId}\"]`);\n const items = dropdown?.querySelectorAll<HTMLElement>(\n '[data-menu-item]:not([data-disabled])'\n );\n\n if (items && items.length > 0) {\n const item = itemPosition === 'first' ? items[0] : items[items.length - 1];\n item?.focus();\n }\n }, 40);\n },\n [getTargets]\n );\n\n const getAdjacentIndex = useCallback(\n (current: number, direction: 1 | -1) => {\n const enabled = getEnabledIndexes();\n\n if (enabled.length === 0) {\n return current;\n }\n\n const currentPosition = enabled.indexOf(current);\n let nextPosition = currentPosition === -1 ? 0 : currentPosition + direction;\n\n if (loop) {\n nextPosition = (nextPosition + enabled.length) % enabled.length;\n } else {\n nextPosition = Math.max(0, Math.min(enabled.length - 1, nextPosition));\n }\n\n return enabled[nextPosition] ?? current;\n },\n [getEnabledIndexes, loop]\n );\n\n useIsomorphicEffect(() => {\n const enabled = getEnabledIndexes();\n if (enabled.length === 0) {\n return;\n }\n\n // While a menu is open, the single tab stop must stay on the opened menu's target,\n // including when it was opened programmatically via openIndex/defaultOpenIndex.\n if (_openIndex !== null && enabled.includes(_openIndex)) {\n if (activeIndex !== _openIndex) {\n setActiveIndex(_openIndex);\n }\n return;\n }\n\n if (!enabled.includes(activeIndex)) {\n setActiveIndex(enabled[0]);\n }\n });\n\n const contextValue: MenubarContextValue = {\n getStyles,\n id: menubarId,\n openIndex: _openIndex,\n setOpenIndex,\n openMenu,\n closeMenu,\n scheduleClose,\n cancelClose,\n getOpenSource,\n getPreviousOpenIndex,\n activeIndex,\n setActiveIndex,\n trigger: trigger!,\n loop: loop!,\n position: position!,\n unstyled,\n getMenuIndex,\n getTargets,\n getEnabledIndexes,\n getAdjacentIndex,\n focusTarget,\n focusMenuItem,\n };\n\n return (\n <MenubarContextProvider value={contextValue}>\n <Box\n ref={useMergedRef(ref, rootRef)}\n role=\"menubar\"\n aria-orientation=\"horizontal\"\n mod={mod}\n {...getStyles('root')}\n {...others}\n data-menubar\n >\n {children}\n </Box>\n </MenubarContextProvider>\n );\n});\n\nMenubar.classes = classes;\nMenubar.displayName = '@mantine/core/Menubar';\nMenubar.Menu = MenubarMenu;\nMenubar.Target = MenubarTarget;\nMenubar.Dropdown = MenubarDropdown;\n\nexport namespace Menubar {\n export type Props = MenubarProps;\n export type StylesNames = MenubarStylesNames;\n export type Factory = MenubarFactory;\n\n export namespace Menu {\n export type Props = MenubarMenuProps;\n }\n\n export namespace Target {\n export type Props = MenubarTargetProps;\n }\n\n export namespace Dropdown {\n export type Props = MenubarDropdownProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAwDA,MAAM,eAAe;CACnB,SAAS;CACT,MAAM;CACN,UAAU;AACZ;AAEA,MAAa,UAAUA,gBAAAA,SAAyB,WAAW;CACzD,MAAM,QAAQC,kBAAAA,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,WACA,kBACA,cACA,SACA,MACA,UACA,YACA,KACA,KACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA0B;EAC1C,MAAM;EACN,SAAA,uBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,WAAA,GAAUC,MAAAA,OAAAA,CAAuB,IAAI;CAC3C,MAAM,aAAA,GAAYC,eAAAA,MAAAA,CAAM;CAExB,MAAM,CAAC,YAAY,iBAAA,GAAgBC,eAAAA,gBAAAA,CAA+B;EAChE,OAAO;EACP,cAAc;EACd,YAAY;EACZ,UAAU;CACZ,CAAC;CAED,MAAM,CAAC,aAAa,mBAAA,GAAkBC,M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EACxB,MAAM,UAAU,kBAAkB;EAClC,IAAI,QAAQ,WAAW,GACrB;EAKF,IAAI,eAAe,QAAQ,QAAQ,SAAS,UAAU,GAAG;GACvD,IAAI,gBAAgB,YAClB,eAAe,UAAU;GAE3B;EACF;EAEA,IAAI,CAAC,QAAQ,SAAS,WAAW,GAC/B,eAAe,QAAQ,EAAE;CAE7B,CAAC;CA2BD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,wBAAD;EAAwB,OAAO;GAzB/B;GACA,IAAI;GACJ,WAAW;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACS;GACH;GACI;GACV;GACA;GACA;GACA;GACA;GACA;GACA;EAI0C;EACxC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;GACE,MAAA,GAAKC,eAAAA,aAAAA,CAAa,KAAK,OAAO;GAC9B,MAAK;GACL,oBAAiB;GACZ;GACL,GAAI,UAAU,MAAM;GACpB,GAAI;GACJ,gBAAA;GAEC;EACE,CAAA;CACiB,CAAA;AAE5B,CAAC;AAED,QAAQ,UAAUC,uBAAAA;AAClB,QAAQ,cAAc;AACtB,QAAQ,OAAOC,oBAAAA;AACf,QAAQ,SAASC,sBAAAA;AACjB,QAAQ,WAAWC,wBAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenubarMenu.cjs","names":["useMenubarContext","MenubarMenuContextProvider","Menu"],"sources":["../../../../src/components/Menubar/MenubarMenu/MenubarMenu.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useId, useIsomorphicEffect } from '@mantine/hooks';\nimport { Menu, MenuProps } from '../../Menu';\nimport { MenubarMenuContextProvider, useMenubarContext } from '../Menubar.context';\n\nexport interface MenubarMenuProps extends Omit<\n MenuProps,\n 'opened' | 'defaultOpened' | 'onChange' | 'onOpen' | 'onClose' | 'trigger' | 'returnFocus'\n> {\n /** `Menubar.Target` and `Menubar.Dropdown` components */\n children?: React.ReactNode;\n}\n\nconst DEFAULT_TRANSITION_DURATION = 150;\n\nexport function MenubarMenu({ children, transitionProps, ...others }: MenubarMenuProps) {\n const ctx = useMenubarContext();\n const id = useId();\n const [index, setIndex] = useState(-1);\n\n useIsomorphicEffect(() => {\n const next = ctx.getMenuIndex(id);\n setIndex((current) => (current === next ? current : next));\n });\n\n const opened = ctx.openIndex !== null && index !== -1 && ctx.openIndex === index;\n\n const handleChange = (value: boolean) => {\n if (value) {\n ctx.openMenu(index, 'click');\n ctx.setActiveIndex(index);\n } else {\n ctx.closeMenu();\n }\n };\n\n // Transitions should only play when the whole bar opens or closes, not when\n // switching between sibling menus while one is already open.\n const baseDuration = transitionProps?.duration ?? DEFAULT_TRANSITION_DURATION;\n const baseExitDuration = transitionProps?.exitDuration ?? baseDuration;\n const animateEnter = ctx.getPreviousOpenIndex() === null;\n const animateExit = ctx.openIndex === null;\n const resolvedTransitionProps = {\n ...transitionProps,\n duration: animateEnter ? baseDuration : 0,\n exitDuration: animateExit ? baseExitDuration : 0,\n };\n\n return (\n <MenubarMenuContextProvider value={{ id, index, opened }}>\n <Menu\n position={ctx.position}\n loop={ctx.loop}\n unstyled={ctx.unstyled}\n menuItemTabIndex={-1}\n trapFocus={false}\n {...others}\n transitionProps={resolvedTransitionProps}\n opened={opened}\n onChange={handleChange}\n trigger=\"click\"\n returnFocus={false}\n >\n {children}\n </Menu>\n </MenubarMenuContextProvider>\n );\n}\n\nMenubarMenu.displayName = '@mantine/core/MenubarMenu';\n"],"mappings":";;;;;;;AAaA,MAAM,8BAA8B;AAEpC,SAAgB,YAAY,EAAE,UAAU,iBAAiB,GAAG,UAA4B;CACtF,MAAM,MAAMA,wBAAAA,kBAAkB;CAC9B,MAAM,MAAA,GAAA,eAAA,MAAA,CAAW;CACjB,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,CAAqB,EAAE;CAErC,CAAA,GAAA,eAAA,oBAAA,OAA0B;EACxB,MAAM,OAAO,IAAI,aAAa,EAAE;EAChC,UAAU,YAAa,YAAY,OAAO,UAAU,IAAK;CAC3D,CAAC;CAED,MAAM,SAAS,IAAI,cAAc,QAAQ,UAAU,MAAM,IAAI,cAAc;CAE3E,MAAM,gBAAgB,UAAmB;EACvC,IAAI,OAAO;GACT,IAAI,SAAS,OAAO,OAAO;GAC3B,IAAI,eAAe,KAAK;EAC1B,OACE,IAAI,UAAU;CAElB;CAIA,MAAM,eAAe,iBAAiB,YAAY;CAClD,MAAM,mBAAmB,iBAAiB,gBAAgB;CAC1D,MAAM,eAAe,IAAI,qBAAqB,MAAM;CACpD,MAAM,cAAc,IAAI,cAAc;CACtC,MAAM,0BAA0B;EAC9B,GAAG;EACH,UAAU,eAAe,eAAe;EACxC,cAAc,cAAc,mBAAmB;CACjD;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,4BAAD;EAA4B,OAAO;GAAE;GAAI;GAAO;EAAO;YACrD,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD;GACE,UAAU,IAAI;GACd,MAAM,IAAI;GACV,UAAU,IAAI;GACd,kBAAkB;GAClB,WAAW;GACX,GAAI;GACJ,iBAAiB;GACT;GACR,UAAU;GACV,SAAQ;GACR,aAAa;GAEZ;EACG,CAAA;CACoB,CAAA;AAEhC;AAEA,YAAY,cAAc"}
1
+ {"version":3,"file":"MenubarMenu.cjs","names":["useMenubarContext","useId","useState","MenubarMenuContextProvider","Menu"],"sources":["../../../../src/components/Menubar/MenubarMenu/MenubarMenu.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useId, useIsomorphicEffect } from '@mantine/hooks';\nimport { Menu, MenuProps } from '../../Menu';\nimport { MenubarMenuContextProvider, useMenubarContext } from '../Menubar.context';\n\nexport interface MenubarMenuProps extends Omit<\n MenuProps,\n 'opened' | 'defaultOpened' | 'onChange' | 'onOpen' | 'onClose' | 'trigger' | 'returnFocus'\n> {\n /** `Menubar.Target` and `Menubar.Dropdown` components */\n children?: React.ReactNode;\n}\n\nconst DEFAULT_TRANSITION_DURATION = 150;\n\nexport function MenubarMenu({ children, transitionProps, ...others }: MenubarMenuProps) {\n const ctx = useMenubarContext();\n const id = useId();\n const [index, setIndex] = useState(-1);\n\n useIsomorphicEffect(() => {\n const next = ctx.getMenuIndex(id);\n setIndex((current) => (current === next ? current : next));\n });\n\n const opened = ctx.openIndex !== null && index !== -1 && ctx.openIndex === index;\n\n const handleChange = (value: boolean) => {\n if (value) {\n ctx.openMenu(index, 'click');\n ctx.setActiveIndex(index);\n } else {\n ctx.closeMenu();\n }\n };\n\n // Transitions should only play when the whole bar opens or closes, not when\n // switching between sibling menus while one is already open.\n const baseDuration = transitionProps?.duration ?? DEFAULT_TRANSITION_DURATION;\n const baseExitDuration = transitionProps?.exitDuration ?? baseDuration;\n const animateEnter = ctx.getPreviousOpenIndex() === null;\n const animateExit = ctx.openIndex === null;\n const resolvedTransitionProps = {\n ...transitionProps,\n duration: animateEnter ? baseDuration : 0,\n exitDuration: animateExit ? baseExitDuration : 0,\n };\n\n return (\n <MenubarMenuContextProvider value={{ id, index, opened }}>\n <Menu\n position={ctx.position}\n loop={ctx.loop}\n unstyled={ctx.unstyled}\n menuItemTabIndex={-1}\n trapFocus={false}\n {...others}\n transitionProps={resolvedTransitionProps}\n opened={opened}\n onChange={handleChange}\n trigger=\"click\"\n returnFocus={false}\n >\n {children}\n </Menu>\n </MenubarMenuContextProvider>\n );\n}\n\nMenubarMenu.displayName = '@mantine/core/MenubarMenu';\n"],"mappings":";;;;;;;AAaA,MAAM,8BAA8B;AAEpC,SAAgB,YAAY,EAAE,UAAU,iBAAiB,GAAG,UAA4B;CACtF,MAAM,MAAMA,wBAAAA,kBAAkB;CAC9B,MAAM,MAAA,GAAKC,eAAAA,MAAAA,CAAM;CACjB,MAAM,CAAC,OAAO,aAAA,GAAYC,MAAAA,SAAAA,CAAS,EAAE;CAErC,CAAA,GAAA,eAAA,oBAAA,OAA0B;EACxB,MAAM,OAAO,IAAI,aAAa,EAAE;EAChC,UAAU,YAAa,YAAY,OAAO,UAAU,IAAK;CAC3D,CAAC;CAED,MAAM,SAAS,IAAI,cAAc,QAAQ,UAAU,MAAM,IAAI,cAAc;CAE3E,MAAM,gBAAgB,UAAmB;EACvC,IAAI,OAAO;GACT,IAAI,SAAS,OAAO,OAAO;GAC3B,IAAI,eAAe,KAAK;EAC1B,OACE,IAAI,UAAU;CAElB;CAIA,MAAM,eAAe,iBAAiB,YAAY;CAClD,MAAM,mBAAmB,iBAAiB,gBAAgB;CAC1D,MAAM,eAAe,IAAI,qBAAqB,MAAM;CACpD,MAAM,cAAc,IAAI,cAAc;CACtC,MAAM,0BAA0B;EAC9B,GAAG;EACH,UAAU,eAAe,eAAe;EACxC,cAAc,cAAc,mBAAmB;CACjD;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,4BAAD;EAA4B,OAAO;GAAE;GAAI;GAAO;EAAO;EACrD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD;GACE,UAAU,IAAI;GACd,MAAM,IAAI;GACV,UAAU,IAAI;GACd,kBAAkB;GAClB,WAAW;GACX,GAAI;GACJ,iBAAiB;GACT;GACR,UAAU;GACV,SAAQ;GACR,aAAa;GAEZ;EACG,CAAA;CACoB,CAAA;AAEhC;AAEA,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenubarTarget.cjs","names":["useProps","useMenubarContext","useMenubarMenuContext","useDirection","createEventHandler","Popover","UnstyledButton"],"sources":["../../../../src/components/Menubar/MenubarTarget/MenubarTarget.tsx"],"sourcesContent":["import {\n createEventHandler,\n ElementProps,\n MantineStyleProp,\n useDirection,\n useProps,\n} from '../../../core';\nimport { Popover } from '../../Popover';\nimport { UnstyledButton } from '../../UnstyledButton';\nimport { useMenubarContext, useMenubarMenuContext } from '../Menubar.context';\n\nexport interface MenubarTargetProps extends ElementProps<'button'> {\n 'data-disabled'?: boolean;\n\n /** Target label */\n children: React.ReactNode;\n\n /** Inline styles applied to the target button */\n style?: MantineStyleProp;\n\n /** Key of the prop used to get element ref, useful for forwarding refs to custom components @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<MenubarTargetProps>;\n\nfunction isPrintableKey(event: React.KeyboardEvent) {\n return (\n event.key.length === 1 && event.key !== ' ' && !event.ctrlKey && !event.metaKey && !event.altKey\n );\n}\n\nfunction getTargetLabel(node: HTMLElement) {\n return (node.textContent ?? '').trim().toLowerCase();\n}\n\nexport function MenubarTarget(props: MenubarTargetProps) {\n const {\n children,\n refProp,\n className,\n style,\n disabled,\n 'data-disabled': dataDisabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onKeyDown,\n ...others\n } = useProps('MenubarTarget', defaultProps, props);\n\n const ctx = useMenubarContext();\n const menuCtx = useMenubarMenuContext();\n const { dir } = useDirection();\n\n const isDisabled = disabled || dataDisabled;\n const isActive = ctx.activeIndex === menuCtx.index;\n\n // Before the menu indexes resolve from the DOM (first render / SSR HTML), every target\n // would otherwise compute `tabIndex={-1}`, leaving the menubar with no tab stop until\n // effects run. Keep unresolved targets focusable so keyboard users can enter the menubar.\n const isUnresolvedTabStop = menuCtx.index === -1 && !isDisabled;\n\n const moveToAdjacent = (direction: 1 | -1) => {\n const nextIndex = ctx.getAdjacentIndex(menuCtx.index, direction);\n ctx.setActiveIndex(nextIndex);\n ctx.focusTarget(nextIndex);\n if (ctx.openIndex !== null) {\n ctx.openMenu(nextIndex, 'click');\n }\n };\n\n const openAndFocusItem = (itemPosition: 'first' | 'last') => {\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n ctx.focusMenuItem(menuCtx.index, itemPosition);\n };\n\n const typeAhead = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n const targets = ctx.getTargets();\n if (targets.length === 0) {\n return;\n }\n\n const char = event.key.toLowerCase();\n for (let offset = 1; offset <= targets.length; offset += 1) {\n const index = (menuCtx.index + offset) % targets.length;\n const node = targets[index];\n if (\n node &&\n !node.disabled &&\n !node.hasAttribute('data-disabled') &&\n getTargetLabel(node).startsWith(char)\n ) {\n event.preventDefault();\n ctx.setActiveIndex(index);\n node.focus();\n if (ctx.openIndex !== null) {\n ctx.openMenu(index, 'click');\n }\n break;\n }\n }\n };\n\n const handleClick = createEventHandler<any>(onClick, () => {\n if (isDisabled) {\n return;\n }\n if (ctx.openIndex === menuCtx.index && ctx.getOpenSource() !== 'hover') {\n ctx.closeMenu();\n } else {\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n }\n });\n\n const handleMouseEnter = createEventHandler<any>(onMouseEnter, () => {\n if (isDisabled) {\n return;\n }\n ctx.cancelClose();\n if (ctx.trigger === 'hover') {\n ctx.openMenu(menuCtx.index, 'hover');\n ctx.setActiveIndex(menuCtx.index);\n } else if (ctx.openIndex !== null && ctx.openIndex !== menuCtx.index) {\n // Hover-switching with trigger=\"click\" continues a click-driven interaction:\n // keep 'click' as the open source so that the next click on the target\n // closes the menu, same as a click-opened menu (desktop application pattern)\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n }\n });\n\n const handleMouseLeave = createEventHandler<any>(onMouseLeave, () => {\n if (ctx.trigger === 'hover') {\n ctx.scheduleClose();\n }\n });\n\n const handleFocus = createEventHandler<any>(onFocus, () => ctx.setActiveIndex(menuCtx.index));\n\n const handleKeyDown = createEventHandler<any>(onKeyDown, (event) => {\n if (isDisabled) {\n return;\n }\n const forwardKey = dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n const backKey = dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n\n if (event.key === forwardKey) {\n event.preventDefault();\n moveToAdjacent(1);\n } else if (event.key === backKey) {\n event.preventDefault();\n moveToAdjacent(-1);\n } else if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n openAndFocusItem('first');\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n openAndFocusItem('last');\n } else if (event.key === 'Home') {\n event.preventDefault();\n const enabled = ctx.getEnabledIndexes();\n if (enabled.length > 0) {\n ctx.setActiveIndex(enabled[0]);\n ctx.focusTarget(enabled[0]);\n }\n } else if (event.key === 'End') {\n event.preventDefault();\n const enabled = ctx.getEnabledIndexes();\n if (enabled.length > 0) {\n const last = enabled[enabled.length - 1];\n ctx.setActiveIndex(last);\n ctx.focusTarget(last);\n }\n } else if (event.key === 'Escape') {\n if (menuCtx.opened) {\n ctx.closeMenu();\n }\n } else if (event.key === 'Tab') {\n if (menuCtx.opened) {\n ctx.closeMenu();\n }\n } else if (isPrintableKey(event)) {\n typeAhead(event);\n }\n });\n\n return (\n <Popover.Target refProp={refProp} popupType=\"menu\">\n <UnstyledButton\n {...others}\n unstyled={ctx.unstyled}\n role=\"menuitem\"\n tabIndex={isActive || isUnresolvedTabStop ? 0 : -1}\n disabled={disabled}\n data-menubar-target\n data-menubar-id={menuCtx.id}\n data-disabled={dataDisabled || undefined}\n data-expanded={menuCtx.opened || undefined}\n data-mantine-stop-propagation={menuCtx.opened || undefined}\n {...ctx.getStyles('target', { className, style })}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n >\n {children}\n </UnstyledButton>\n </Popover.Target>\n );\n}\n\nMenubarTarget.displayName = '@mantine/core/MenubarTarget';\n"],"mappings":";;;;;;;;;AAwBA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAS,eAAe,OAA4B;CAClD,OACE,MAAM,IAAI,WAAW,KAAK,MAAM,QAAQ,OAAO,CAAC,MAAM,WAAW,CAAC,MAAM,WAAW,CAAC,MAAM;AAE9F;AAEA,SAAS,eAAe,MAAmB;CACzC,QAAQ,KAAK,eAAe,GAAA,CAAI,KAAK,CAAC,CAAC,YAAY;AACrD;AAEA,SAAgB,cAAc,OAA2B;CACvD,MAAM,EACJ,UACA,SACA,WACA,OACA,U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SAAS,GAAG;IACtB,IAAI,eAAe,QAAQ,EAAE;IAC7B,IAAI,YAAY,QAAQ,EAAE;GAC5B;EACF,OAAO,IAAI,MAAM,QAAQ,OAAO;GAC9B,MAAM,eAAe;GACrB,MAAM,UAAU,IAAI,kBAAkB;GACtC,IAAI,QAAQ,SAAS,GAAG;IACtB,MAAM,OAAO,QAAQ,QAAQ,SAAS;IACtC,IAAI,eAAe,IAAI;IACvB,IAAI,YAAY,IAAI;GACtB;EACF,OAAO,IAAI,MAAM,QAAQ;OACnB,QAAQ,QACV,IAAI,UAAU;EAAA,OAEX,IAAI,MAAM,QAAQ;OACnB,QAAQ,QACV,IAAI,UAAU;EAAA,OAEX,IAAI,eAAe,KAAK,GAC7B,UAAU,KAAK;CAEnB,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,QAAQ,QAAT;EAAyB;EAAS,WAAU;YAC1C,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;GACE,GAAI;GACJ,UAAU,IAAI;GACd,MAAK;GACL,UAAU,YAAY,sBAAsB,IAAI;GACtC;GACV,uBAAA;GACA,mBAAiB,QAAQ;GACzB,iBAAe,gBAAgB,KAAA;GAC/B,iBAAe,QAAQ,UAAU,KAAA;GACjC,iCAA+B,QAAQ,UAAU,KAAA;GACjD,GAAI,IAAI,UAAU,UAAU;IAAE;IAAW;GAAM,CAAC;GAChD,SAAS;GACT,cAAc;GACd,cAAc;GACd,SAAS;GACT,WAAW;GAEV;EACa,CAAA;CACF,CAAA;AAEpB;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"MenubarTarget.cjs","names":["useProps","useMenubarContext","useMenubarMenuContext","useDirection","createEventHandler","Popover","UnstyledButton"],"sources":["../../../../src/components/Menubar/MenubarTarget/MenubarTarget.tsx"],"sourcesContent":["import {\n createEventHandler,\n ElementProps,\n MantineStyleProp,\n useDirection,\n useProps,\n} from '../../../core';\nimport { Popover } from '../../Popover';\nimport { UnstyledButton } from '../../UnstyledButton';\nimport { useMenubarContext, useMenubarMenuContext } from '../Menubar.context';\n\nexport interface MenubarTargetProps extends ElementProps<'button'> {\n 'data-disabled'?: boolean;\n\n /** Target label */\n children: React.ReactNode;\n\n /** Inline styles applied to the target button */\n style?: MantineStyleProp;\n\n /** Key of the prop used to get element ref, useful for forwarding refs to custom components @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<MenubarTargetProps>;\n\nfunction isPrintableKey(event: React.KeyboardEvent) {\n return (\n event.key.length === 1 && event.key !== ' ' && !event.ctrlKey && !event.metaKey && !event.altKey\n );\n}\n\nfunction getTargetLabel(node: HTMLElement) {\n return (node.textContent ?? '').trim().toLowerCase();\n}\n\nexport function MenubarTarget(props: MenubarTargetProps) {\n const {\n children,\n refProp,\n className,\n style,\n disabled,\n 'data-disabled': dataDisabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onKeyDown,\n ...others\n } = useProps('MenubarTarget', defaultProps, props);\n\n const ctx = useMenubarContext();\n const menuCtx = useMenubarMenuContext();\n const { dir } = useDirection();\n\n const isDisabled = disabled || dataDisabled;\n const isActive = ctx.activeIndex === menuCtx.index;\n\n // Before the menu indexes resolve from the DOM (first render / SSR HTML), every target\n // would otherwise compute `tabIndex={-1}`, leaving the menubar with no tab stop until\n // effects run. Keep unresolved targets focusable so keyboard users can enter the menubar.\n const isUnresolvedTabStop = menuCtx.index === -1 && !isDisabled;\n\n const moveToAdjacent = (direction: 1 | -1) => {\n const nextIndex = ctx.getAdjacentIndex(menuCtx.index, direction);\n ctx.setActiveIndex(nextIndex);\n ctx.focusTarget(nextIndex);\n if (ctx.openIndex !== null) {\n ctx.openMenu(nextIndex, 'click');\n }\n };\n\n const openAndFocusItem = (itemPosition: 'first' | 'last') => {\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n ctx.focusMenuItem(menuCtx.index, itemPosition);\n };\n\n const typeAhead = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n const targets = ctx.getTargets();\n if (targets.length === 0) {\n return;\n }\n\n const char = event.key.toLowerCase();\n for (let offset = 1; offset <= targets.length; offset += 1) {\n const index = (menuCtx.index + offset) % targets.length;\n const node = targets[index];\n if (\n node &&\n !node.disabled &&\n !node.hasAttribute('data-disabled') &&\n getTargetLabel(node).startsWith(char)\n ) {\n event.preventDefault();\n ctx.setActiveIndex(index);\n node.focus();\n if (ctx.openIndex !== null) {\n ctx.openMenu(index, 'click');\n }\n break;\n }\n }\n };\n\n const handleClick = createEventHandler<any>(onClick, () => {\n if (isDisabled) {\n return;\n }\n if (ctx.openIndex === menuCtx.index && ctx.getOpenSource() !== 'hover') {\n ctx.closeMenu();\n } else {\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n }\n });\n\n const handleMouseEnter = createEventHandler<any>(onMouseEnter, () => {\n if (isDisabled) {\n return;\n }\n ctx.cancelClose();\n if (ctx.trigger === 'hover') {\n ctx.openMenu(menuCtx.index, 'hover');\n ctx.setActiveIndex(menuCtx.index);\n } else if (ctx.openIndex !== null && ctx.openIndex !== menuCtx.index) {\n // Hover-switching with trigger=\"click\" continues a click-driven interaction:\n // keep 'click' as the open source so that the next click on the target\n // closes the menu, same as a click-opened menu (desktop application pattern)\n ctx.openMenu(menuCtx.index, 'click');\n ctx.setActiveIndex(menuCtx.index);\n }\n });\n\n const handleMouseLeave = createEventHandler<any>(onMouseLeave, () => {\n if (ctx.trigger === 'hover') {\n ctx.scheduleClose();\n }\n });\n\n const handleFocus = createEventHandler<any>(onFocus, () => ctx.setActiveIndex(menuCtx.index));\n\n const handleKeyDown = createEventHandler<any>(onKeyDown, (event) => {\n if (isDisabled) {\n return;\n }\n const forwardKey = dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n const backKey = dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n\n if (event.key === forwardKey) {\n event.preventDefault();\n moveToAdjacent(1);\n } else if (event.key === backKey) {\n event.preventDefault();\n moveToAdjacent(-1);\n } else if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n openAndFocusItem('first');\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n openAndFocusItem('last');\n } else if (event.key === 'Home') {\n event.preventDefault();\n const enabled = ctx.getEnabledIndexes();\n if (enabled.length > 0) {\n ctx.setActiveIndex(enabled[0]);\n ctx.focusTarget(enabled[0]);\n }\n } else if (event.key === 'End') {\n event.preventDefault();\n const enabled = ctx.getEnabledIndexes();\n if (enabled.length > 0) {\n const last = enabled[enabled.length - 1];\n ctx.setActiveIndex(last);\n ctx.focusTarget(last);\n }\n } else if (event.key === 'Escape') {\n if (menuCtx.opened) {\n ctx.closeMenu();\n }\n } else if (event.key === 'Tab') {\n if (menuCtx.opened) {\n ctx.closeMenu();\n }\n } else if (isPrintableKey(event)) {\n typeAhead(event);\n }\n });\n\n return (\n <Popover.Target refProp={refProp} popupType=\"menu\">\n <UnstyledButton\n {...others}\n unstyled={ctx.unstyled}\n role=\"menuitem\"\n tabIndex={isActive || isUnresolvedTabStop ? 0 : -1}\n disabled={disabled}\n data-menubar-target\n data-menubar-id={menuCtx.id}\n data-disabled={dataDisabled || undefined}\n data-expanded={menuCtx.opened || undefined}\n data-mantine-stop-propagation={menuCtx.opened || undefined}\n {...ctx.getStyles('target', { className, style })}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n >\n {children}\n </UnstyledButton>\n </Popover.Target>\n );\n}\n\nMenubarTarget.displayName = '@mantine/core/MenubarTarget';\n"],"mappings":";;;;;;;;;AAwBA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,SAAS,eAAe,OAA4B;CAClD,OACE,MAAM,IAAI,WAAW,KAAK,MAAM,QAAQ,OAAO,CAAC,MAAM,WAAW,CAAC,MAAM,WAAW,CAAC,MAAM;A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ModalStackContext","ModalRoot","ModalOverlay","ModalContent","ModalHeader","ModalTitle","ModalCloseButton","ModalBody","classes","ModalStack"],"sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { use, useEffect } from 'react';\nimport { factory, Factory, getDefaultZIndex, useProps } from '../../core';\nimport { ModalBaseCloseButtonProps, ModalBaseOverlayProps } from '../ModalBase';\nimport { ModalBody, type ModalBodyProps } from './ModalBody';\nimport { ModalCloseButton, type ModalCloseButtonProps } from './ModalCloseButton';\nimport { ModalContent, type ModalContentProps } from './ModalContent';\nimport { ModalHeader, type ModalHeaderProps } from './ModalHeader';\nimport { ModalOverlay, type ModalOverlayProps } from './ModalOverlay';\nimport {\n ModalRoot,\n ModalRootCssVariables,\n ModalRootProps,\n ModalRootStylesNames,\n} from './ModalRoot';\nimport { ModalStack, ModalStackContext, type ModalStackProps } from './ModalStack';\nimport { ModalTitle, type ModalTitleProps } from './ModalTitle';\nimport classes from './Modal.module.css';\nexport type ModalStylesNames = ModalRootStylesNames;\nexport type ModalCssVariables = ModalRootCssVariables;\n\nexport interface ModalProps extends ModalRootProps {\n __staticSelector?: string;\n\n /** Modal title */\n title?: React.ReactNode;\n\n /** If set, the overlay is rendered @default true */\n withOverlay?: boolean;\n\n /** Props passed down to the `Overlay` component, use to configure opacity, `background-color`, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** If set, the close button is rendered @default true */\n withCloseButton?: boolean;\n\n /** Props passed down to the close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n\n /** Id of the modal in the `Modal.Stack` */\n stackId?: string;\n}\n\nexport type ModalFactory = Factory<{\n props: ModalProps;\n ref: HTMLDivElement;\n stylesNames: ModalStylesNames;\n vars: ModalCssVariables;\n staticComponents: {\n Root: typeof ModalRoot;\n Overlay: typeof ModalOverlay;\n Content: typeof ModalContent;\n Body: typeof ModalBody;\n Header: typeof ModalHeader;\n Title: typeof ModalTitle;\n CloseButton: typeof ModalCloseButton;\n Stack: typeof ModalStack;\n };\n}>;\n\nconst defaultProps = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n transitionProps: { duration: 200, transition: 'fade-down' },\n withOverlay: true,\n withCloseButton: true,\n} satisfies Partial<ModalProps>;\n\nexport const Modal = factory<ModalFactory>((_props) => {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n radius,\n opened,\n stackId,\n zIndex,\n ...others\n } = useProps('Modal', defaultProps, _props);\n const ctx = use(ModalStackContext);\n const hasHeader = !!title || withCloseButton;\n const stackProps =\n ctx && stackId\n ? {\n closeOnEscape: ctx.currentId === stackId,\n trapFocus: ctx.currentId === stackId,\n zIndex: ctx.getZIndex(stackId),\n }\n : {};\n\n const overlayVisible =\n withOverlay === false ? false : stackId && ctx ? ctx.currentId === stackId : opened;\n\n useEffect(() => {\n if (ctx && stackId) {\n opened\n ? ctx.addModal(stackId, zIndex || getDefaultZIndex('modal'))\n : ctx.removeModal(stackId);\n }\n }, [opened, stackId, zIndex]);\n\n return (\n <ModalRoot\n radius={radius}\n opened={opened}\n zIndex={ctx && stackId ? ctx.getZIndex(stackId) : zIndex}\n {...others}\n {...stackProps}\n >\n {withOverlay && (\n <ModalOverlay\n visible={overlayVisible}\n transitionProps={ctx && stackId ? { duration: 0 } : undefined}\n {...overlayProps}\n />\n )}\n <ModalContent\n radius={radius}\n __hidden={ctx && stackId && opened ? stackId !== ctx.currentId : false}\n >\n {hasHeader && (\n <ModalHeader>\n {title && <ModalTitle>{title}</ModalTitle>}\n {withCloseButton && <ModalCloseButton {...closeButtonProps} />}\n </ModalHeader>\n )}\n\n <ModalBody>{children}</ModalBody>\n </ModalContent>\n </ModalRoot>\n );\n});\n\nModal.classes = classes;\nModal.displayName = '@mantine/core/Modal';\nModal.Root = ModalRoot;\nModal.Overlay = ModalOverlay;\nModal.Content = ModalContent;\nModal.Body = ModalBody;\nModal.Header = ModalHeader;\nModal.Title = ModalTitle;\nModal.CloseButton = ModalCloseButton;\nModal.Stack = ModalStack;\n\nexport namespace Modal {\n export type Props = ModalProps;\n export type StylesNames = ModalStylesNames;\n export type CssVariables = ModalCssVariables;\n export type Factory = ModalFactory;\n\n export namespace Root {\n export type Props = ModalRootProps;\n }\n\n export namespace Body {\n export type Props = ModalBodyProps;\n }\n\n export namespace CloseButton {\n export type Props = ModalCloseButtonProps;\n }\n\n export namespace Content {\n export type Props = ModalContentProps;\n }\n\n export namespace Header {\n export type Props = ModalHeaderProps;\n }\n\n export namespace Overlay {\n export type Props = ModalOverlayProps;\n }\n\n export namespace Title {\n export type Props = ModalTitleProps;\n }\n\n export namespace Stack {\n export type Props = ModalStackProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQA,4BAAAA,iBAAiB,OAAO;CAChC,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAY;CAC1D,aAAa;CACb,iBAAiB;AACnB;AAEA,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,EACJ,OACA,aACA,cACA,iBACA,kBACA,UACA,QACA,QACA,SACA,QACA,GAAG,WACDC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CAC1C,MAAM,OAAA,GAAA,MAAA,IAAA,CAAUC,mBAAAA,iBAAiB;CACjC,MAAM,YAAY,CAAC,CAAC,SAAS;CAC7B,MAAM,aACJ,OAAO,UACH;EACE,eAAe,IAAI,cAAc;EACjC,WAAW,IAAI,cAAc;EAC7B,QAAQ,IAAI,UAAU,OAAO;CAC/B,IACA,CAAC;CAEP,MAAM,iBACJ,gBAAgB,QAAQ,QAAQ,WAAW,MAAM,IAAI,cAAc,UAAU;CAE/E,CAAA,GAAA,MA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factory","useProps","use","ModalStackContext","ModalRoot","ModalOverlay","ModalContent","ModalHeader","ModalTitle","ModalCloseButton","ModalBody","classes","ModalStack"],"sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { use, useEffect } from 'react';\nimport { factory, Factory, getDefaultZIndex, useProps } from '../../core';\nimport { ModalBaseCloseButtonProps, ModalBaseOverlayProps } from '../ModalBase';\nimport { ModalBody, type ModalBodyProps } from './ModalBody';\nimport { ModalCloseButton, type ModalCloseButtonProps } from './ModalCloseButton';\nimport { ModalContent, type ModalContentProps } from './ModalContent';\nimport { ModalHeader, type ModalHeaderProps } from './ModalHeader';\nimport { ModalOverlay, type ModalOverlayProps } from './ModalOverlay';\nimport {\n ModalRoot,\n ModalRootCssVariables,\n ModalRootProps,\n ModalRootStylesNames,\n} from './ModalRoot';\nimport { ModalStack, ModalStackContext, type ModalStackProps } from './ModalStack';\nimport { ModalTitle, type ModalTitleProps } from './ModalTitle';\nimport classes from './Modal.module.css';\nexport type ModalStylesNames = ModalRootStylesNames;\nexport type ModalCssVariables = ModalRootCssVariables;\n\nexport interface ModalProps extends ModalRootProps {\n __staticSelector?: string;\n\n /** Modal title */\n title?: React.ReactNode;\n\n /** If set, the overlay is rendered @default true */\n withOverlay?: boolean;\n\n /** Props passed down to the `Overlay` component, use to configure opacity, `background-color`, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** If set, the close button is rendered @default true */\n withCloseButton?: boolean;\n\n /** Props passed down to the close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n\n /** Id of the modal in the `Modal.Stack` */\n stackId?: string;\n}\n\nexport type ModalFactory = Factory<{\n props: ModalProps;\n ref: HTMLDivElement;\n stylesNames: ModalStylesNames;\n vars: ModalCssVariables;\n staticComponents: {\n Root: typeof ModalRoot;\n Overlay: typeof ModalOverlay;\n Content: typeof ModalContent;\n Body: typeof ModalBody;\n Header: typeof ModalHeader;\n Title: typeof ModalTitle;\n CloseButton: typeof ModalCloseButton;\n Stack: typeof ModalStack;\n };\n}>;\n\nconst defaultProps = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n transitionProps: { duration: 200, transition: 'fade-down' },\n withOverlay: true,\n withCloseButton: true,\n} satisfies Partial<ModalProps>;\n\nexport const Modal = factory<ModalFactory>((_props) => {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n radius,\n opened,\n stackId,\n zIndex,\n ...others\n } = useProps('Modal', defaultProps, _props);\n const ctx = use(ModalStackContext);\n const hasHeader = !!title || withCloseButton;\n const stackProps =\n ctx && stackId\n ? {\n closeOnEscape: ctx.currentId === stackId,\n trapFocus: ctx.currentId === stackId,\n zIndex: ctx.getZIndex(stackId),\n }\n : {};\n\n const overlayVisible =\n withOverlay === false ? false : stackId && ctx ? ctx.currentId === stackId : opened;\n\n useEffect(() => {\n if (ctx && stackId) {\n opened\n ? ctx.addModal(stackId, zIndex || getDefaultZIndex('modal'))\n : ctx.removeModal(stackId);\n }\n }, [opened, stackId, zIndex]);\n\n return (\n <ModalRoot\n radius={radius}\n opened={opened}\n zIndex={ctx && stackId ? ctx.getZIndex(stackId) : zIndex}\n {...others}\n {...stackProps}\n >\n {withOverlay && (\n <ModalOverlay\n visible={overlayVisible}\n transitionProps={ctx && stackId ? { duration: 0 } : undefined}\n {...overlayProps}\n />\n )}\n <ModalContent\n radius={radius}\n __hidden={ctx && stackId && opened ? stackId !== ctx.currentId : false}\n >\n {hasHeader && (\n <ModalHeader>\n {title && <ModalTitle>{title}</ModalTitle>}\n {withCloseButton && <ModalCloseButton {...closeButtonProps} />}\n </ModalHeader>\n )}\n\n <ModalBody>{children}</ModalBody>\n </ModalContent>\n </ModalRoot>\n );\n});\n\nModal.classes = classes;\nModal.displayName = '@mantine/core/Modal';\nModal.Root = ModalRoot;\nModal.Overlay = ModalOverlay;\nModal.Content = ModalContent;\nModal.Body = ModalBody;\nModal.Header = ModalHeader;\nModal.Title = ModalTitle;\nModal.CloseButton = ModalCloseButton;\nModal.Stack = ModalStack;\n\nexport namespace Modal {\n export type Props = ModalProps;\n export type StylesNames = ModalStylesNames;\n export type CssVariables = ModalCssVariables;\n export type Factory = ModalFactory;\n\n export namespace Root {\n export type Props = ModalRootProps;\n }\n\n export namespace Body {\n export type Props = ModalBodyProps;\n }\n\n export namespace CloseButton {\n export type Props = ModalCloseButtonProps;\n }\n\n export namespace Content {\n export type Props = ModalContentProps;\n }\n\n export namespace Header {\n export type Props = ModalHeaderProps;\n }\n\n export namespace Overlay {\n export type Props = ModalOverlayProps;\n }\n\n export namespace Title {\n export type Props = ModalTitleProps;\n }\n\n export namespace Stack {\n export type Props = ModalStackProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQA,4BAAAA,iBAAiB,OAAO;CAChC,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAY;CAC1D,aAAa;CACb,iBAAiB;AACnB;AAEA,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,EACJ,OACA,aACA,cACA,iBACA,kBACA,UACA,QACA,QACA,SACA,QACA,GAAG,WACDC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CAC1C,MAAM,OAAA,GAAMC,MAAAA,IAAAA,CAAIC,mBAAAA,iBAAiB;CACjC,MAAM,YAAY,CAAC,CAAC,SAAS;CAC7B,MAAM,aACJ,OAAO,UACH;EACE,eAAe,IAAI,cAAc;EACjC,WAAW,IAAI,cAAc;EAC7B,QAAQ,IAAI,UAAU,OAAO;CAC/B,IACA,CAAC;CAEP,MAAM,iBACJ,gBAAgB,QAAQ,QAAQ,WAAW,MAAM,IAAI,cAAc,UAAU;CAE/E,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 -8,8 +8,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  //#region packages/@mantine/core/src/components/Modal/ModalBody.tsx
9
9
  const ModalBody = require_factory.factory((_props) => {
10
10
  const { classNames, className, style, styles, vars, ...others } = require_use_props.useProps("ModalBody", null, _props);
11
+ const ctx = require_Modal_context.useModalContext();
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModalBaseBody.ModalBaseBody, {
12
- ...require_Modal_context.useModalContext().getStyles("body", {
13
+ ...ctx.getStyles("body", {
13
14
  classNames,
14
15
  style,
15
16
  styles,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBody.cjs","names":["factory","useProps","ModalBaseBody","useModalContext","classes"],"sources":["../../../src/components/Modal/ModalBody.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseBody, ModalBaseBodyProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalBodyStylesNames = 'body';\n\nexport interface ModalBodyProps\n extends ModalBaseBodyProps, CompoundStylesApiProps<ModalBodyFactory> {}\n\nexport type ModalBodyFactory = Factory<{\n props: ModalBodyProps;\n ref: HTMLDivElement;\n stylesNames: ModalBodyStylesNames;\n compound: true;\n}>;\n\nexport const ModalBody = factory<ModalBodyFactory>((_props) => {\n const props = useProps('ModalBody', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseBody\n {...ctx.getStyles('body', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalBody.classes = classes;\nModalBody.displayName = '@mantine/core/ModalBody';\n"],"mappings":";;;;;;;;AAiBA,MAAa,YAAYA,gBAAAA,SAA2B,WAAW;CAE7D,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,aAAa,MAAM,MAC4B;CAItE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;EACE,GAJQC,sBAAAA,gBAIF,CAAC,CAAC,UAAU,QAAQ;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EAClE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,UAAU,UAAUC,qBAAAA;AACpB,UAAU,cAAc"}
1
+ {"version":3,"file":"ModalBody.cjs","names":["factory","useProps","useModalContext","ModalBaseBody","classes"],"sources":["../../../src/components/Modal/ModalBody.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseBody, ModalBaseBodyProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalBodyStylesNames = 'body';\n\nexport interface ModalBodyProps\n extends ModalBaseBodyProps, CompoundStylesApiProps<ModalBodyFactory> {}\n\nexport type ModalBodyFactory = Factory<{\n props: ModalBodyProps;\n ref: HTMLDivElement;\n stylesNames: ModalBodyStylesNames;\n compound: true;\n}>;\n\nexport const ModalBody = factory<ModalBodyFactory>((_props) => {\n const props = useProps('ModalBody', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseBody\n {...ctx.getStyles('body', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalBody.classes = classes;\nModalBody.displayName = '@mantine/core/ModalBody';\n"],"mappings":";;;;;;;;AAiBA,MAAa,YAAYA,gBAAAA,SAA2B,WAAW;CAE7D,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,aAAa,MAAM,MAC4B;CAEtE,MAAM,MAAMC,sBAAAA,gBAAgB;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;EACE,GAAI,IAAI,UAAU,QAAQ;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EAClE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,UAAU,UAAUC,qBAAAA;AACpB,UAAU,cAAc"}
@@ -8,8 +8,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  //#region packages/@mantine/core/src/components/Modal/ModalCloseButton.tsx
9
9
  const ModalCloseButton = require_factory.factory((_props) => {
10
10
  const { classNames, className, style, styles, vars, ...others } = require_use_props.useProps("ModalCloseButton", null, _props);
11
+ const ctx = require_Modal_context.useModalContext();
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModalBaseCloseButton.ModalBaseCloseButton, {
12
- ...require_Modal_context.useModalContext().getStyles("close", {
13
+ ...ctx.getStyles("close", {
13
14
  classNames,
14
15
  style,
15
16
  styles,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalCloseButton.cjs","names":["factory","useProps","ModalBaseCloseButton","useModalContext","classes"],"sources":["../../../src/components/Modal/ModalCloseButton.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseCloseButton, ModalBaseCloseButtonProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalCloseButtonStylesNames = 'close';\n\nexport interface ModalCloseButtonProps\n extends ModalBaseCloseButtonProps, CompoundStylesApiProps<ModalCloseButtonFactory> {}\n\nexport type ModalCloseButtonFactory = Factory<{\n props: ModalCloseButtonProps;\n ref: HTMLButtonElement;\n stylesNames: ModalCloseButtonStylesNames;\n compound: true;\n}>;\n\nexport const ModalCloseButton = factory<ModalCloseButtonFactory>((_props) => {\n const props = useProps('ModalCloseButton', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseCloseButton\n {...ctx.getStyles('close', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalCloseButton.classes = classes;\nModalCloseButton.displayName = '@mantine/core/ModalCloseButton';\n"],"mappings":";;;;;;;;AAiBA,MAAa,mBAAmBA,gBAAAA,SAAkC,WAAW;CAE3E,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,oBAAoB,MAAM,MACqB;CAItE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,sBAAD;EACE,GAJQC,sBAAAA,gBAIF,CAAC,CAAC,UAAU,SAAS;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACnE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,iBAAiB,UAAUC,qBAAAA;AAC3B,iBAAiB,cAAc"}
1
+ {"version":3,"file":"ModalCloseButton.cjs","names":["factory","useProps","useModalContext","ModalBaseCloseButton","classes"],"sources":["../../../src/components/Modal/ModalCloseButton.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseCloseButton, ModalBaseCloseButtonProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalCloseButtonStylesNames = 'close';\n\nexport interface ModalCloseButtonProps\n extends ModalBaseCloseButtonProps, CompoundStylesApiProps<ModalCloseButtonFactory> {}\n\nexport type ModalCloseButtonFactory = Factory<{\n props: ModalCloseButtonProps;\n ref: HTMLButtonElement;\n stylesNames: ModalCloseButtonStylesNames;\n compound: true;\n}>;\n\nexport const ModalCloseButton = factory<ModalCloseButtonFactory>((_props) => {\n const props = useProps('ModalCloseButton', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseCloseButton\n {...ctx.getStyles('close', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalCloseButton.classes = classes;\nModalCloseButton.displayName = '@mantine/core/ModalCloseButton';\n"],"mappings":";;;;;;;;AAiBA,MAAa,mBAAmBA,gBAAAA,SAAkC,WAAW;CAE3E,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,oBAAoB,MAAM,MACqB;CAEtE,MAAM,MAAMC,sBAAAA,gBAAgB;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,sBAAD;EACE,GAAI,IAAI,UAAU,SAAS;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACnE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,iBAAiB,UAAUC,qBAAAA;AAC3B,iBAAiB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContent.cjs","names":["factory","useProps","useModalContext","NativeScrollArea","ModalBaseContent","rem","classes"],"sources":["../../../src/components/Modal/ModalContent.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, rem, useProps } from '../../core';\nimport { ModalBaseContent, ModalBaseContentProps, NativeScrollArea } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalContentStylesNames = 'content' | 'inner';\n\nexport interface ModalContentProps\n extends ModalBaseContentProps, CompoundStylesApiProps<ModalContentFactory> {\n __hidden?: boolean;\n}\n\nexport type ModalContentFactory = Factory<{\n props: ModalContentProps;\n ref: HTMLDivElement;\n stylesNames: ModalContentStylesNames;\n compound: true;\n}>;\n\nexport const ModalContent = factory<ModalContentFactory>((_props) => {\n const props = useProps('ModalContent', null, _props);\n const { classNames, className, style, styles, vars, children, __hidden, ...others } = props;\n\n const ctx = useModalContext();\n const Scroll: React.FC<any> = ctx.scrollAreaComponent || NativeScrollArea;\n\n return (\n <ModalBaseContent\n {...ctx.getStyles('content', { className, style, styles, classNames })}\n innerProps={ctx.getStyles('inner', { className, style, styles, classNames })}\n data-full-screen={ctx.fullScreen || undefined}\n data-modal-content\n data-hidden={__hidden || undefined}\n {...others}\n >\n <Scroll\n style={{\n maxHeight: ctx.fullScreen ? '100dvh' : `calc(100dvh - (${rem(ctx.yOffset)} * 2))`,\n }}\n >\n {children}\n </Scroll>\n </ModalBaseContent>\n );\n});\n\nModalContent.classes = classes;\nModalContent.displayName = '@mantine/core/ModalContent';\n"],"mappings":";;;;;;;;;;AAmBA,MAAa,eAAeA,gBAAAA,SAA8B,WAAW;CAEnE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,UAAU,UAAU,GAAG,WAD7DC,kBAAAA,SAAS,gBAAgB,MAAM,MAC6C;CAE1F,MAAM,MAAMC,sBAAAA,gBAAgB;CAC5B,MAAM,SAAwB,IAAI,uBAAuBC,yBAAAA;CAEzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,GAAI,IAAI,UAAU,WAAW;GAAE;GAAW;GAAO;GAAQ;EAAW,CAAC;EACrE,YAAY,IAAI,UAAU,SAAS;GAAE;GAAW;GAAO;GAAQ;EAAW,CAAC;EAC3E,oBAAkB,IAAI,cAAc,KAAA;EACpC,sBAAA;EACA,eAAa,YAAY,KAAA;EACzB,GAAI;YAEJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,OAAO,EACL,WAAW,IAAI,aAAa,WAAW,kBAAkBC,YAAAA,IAAI,IAAI,OAAO,EAAE,QAC5E;GAEC;EACK,CAAA;CACQ,CAAA;AAEtB,CAAC;AAED,aAAa,UAAUC,qBAAAA;AACvB,aAAa,cAAc"}
1
+ {"version":3,"file":"ModalContent.cjs","names":["factory","useProps","useModalContext","NativeScrollArea","ModalBaseContent","rem","classes"],"sources":["../../../src/components/Modal/ModalContent.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, rem, useProps } from '../../core';\nimport { ModalBaseContent, ModalBaseContentProps, NativeScrollArea } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalContentStylesNames = 'content' | 'inner';\n\nexport interface ModalContentProps\n extends ModalBaseContentProps, CompoundStylesApiProps<ModalContentFactory> {\n __hidden?: boolean;\n}\n\nexport type ModalContentFactory = Factory<{\n props: ModalContentProps;\n ref: HTMLDivElement;\n stylesNames: ModalContentStylesNames;\n compound: true;\n}>;\n\nexport const ModalContent = factory<ModalContentFactory>((_props) => {\n const props = useProps('ModalContent', null, _props);\n const { classNames, className, style, styles, vars, children, __hidden, ...others } = props;\n\n const ctx = useModalContext();\n const Scroll: React.FC<any> = ctx.scrollAreaComponent || NativeScrollArea;\n\n return (\n <ModalBaseContent\n {...ctx.getStyles('content', { className, style, styles, classNames })}\n innerProps={ctx.getStyles('inner', { className, style, styles, classNames })}\n data-full-screen={ctx.fullScreen || undefined}\n data-modal-content\n data-hidden={__hidden || undefined}\n {...others}\n >\n <Scroll\n style={{\n maxHeight: ctx.fullScreen ? '100dvh' : `calc(100dvh - (${rem(ctx.yOffset)} * 2))`,\n }}\n >\n {children}\n </Scroll>\n </ModalBaseContent>\n );\n});\n\nModalContent.classes = classes;\nModalContent.displayName = '@mantine/core/ModalContent';\n"],"mappings":";;;;;;;;;;AAmBA,MAAa,eAAeA,gBAAAA,SAA8B,WAAW;CAEnE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,UAAU,UAAU,GAAG,WAD7DC,kBAAAA,SAAS,gBAAgB,MAAM,MAC6C;CAE1F,MAAM,MAAMC,sBAAAA,gBAAgB;CAC5B,MAAM,SAAwB,IAAI,uBAAuBC,yBAAAA;CAEzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,GAAI,IAAI,UAAU,WAAW;GAAE;GAAW;GAAO;GAAQ;EAAW,CAAC;EACrE,YAAY,IAAI,UAAU,SAAS;GAAE;GAAW;GAAO;GAAQ;EAAW,CAAC;EAC3E,oBAAkB,IAAI,cAAc,KAAA;EACpC,sBAAA;EACA,eAAa,YAAY,KAAA;EACzB,GAAI;EAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,OAAO,EACL,WAAW,IAAI,aAAa,WAAW,kBAAkBC,YAAAA,IAAI,IAAI,OAAO,EAAE,QAC5E;GAEC;EACK,CAAA;CACQ,CAAA;AAEtB,CAAC;AAED,aAAa,UAAUC,qBAAAA;AACvB,aAAa,cAAc"}
@@ -8,8 +8,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  //#region packages/@mantine/core/src/components/Modal/ModalHeader.tsx
9
9
  const ModalHeader = require_factory.factory((_props) => {
10
10
  const { classNames, className, style, styles, vars, ...others } = require_use_props.useProps("ModalHeader", null, _props);
11
+ const ctx = require_Modal_context.useModalContext();
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModalBaseHeader.ModalBaseHeader, {
12
- ...require_Modal_context.useModalContext().getStyles("header", {
13
+ ...ctx.getStyles("header", {
13
14
  classNames,
14
15
  style,
15
16
  styles,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHeader.cjs","names":["factory","useProps","ModalBaseHeader","useModalContext","classes"],"sources":["../../../src/components/Modal/ModalHeader.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseHeader, ModalBaseHeaderProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalHeaderStylesNames = 'header';\n\nexport interface ModalHeaderProps\n extends ModalBaseHeaderProps, CompoundStylesApiProps<ModalHeaderFactory> {}\n\nexport type ModalHeaderFactory = Factory<{\n props: ModalHeaderProps;\n ref: HTMLElement;\n stylesNames: ModalHeaderStylesNames;\n compound: true;\n}>;\n\nexport const ModalHeader = factory<ModalHeaderFactory>((_props) => {\n const props = useProps('ModalHeader', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseHeader\n {...ctx.getStyles('header', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalHeader.classes = classes;\nModalHeader.displayName = '@mantine/core/ModalHeader';\n"],"mappings":";;;;;;;;AAiBA,MAAa,cAAcA,gBAAAA,SAA6B,WAAW;CAEjE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,eAAe,MAAM,MAC0B;CAItE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,iBAAD;EACE,GAJQC,sBAAAA,gBAIF,CAAC,CAAC,UAAU,UAAU;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACpE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,YAAY,UAAUC,qBAAAA;AACtB,YAAY,cAAc"}
1
+ {"version":3,"file":"ModalHeader.cjs","names":["factory","useProps","useModalContext","ModalBaseHeader","classes"],"sources":["../../../src/components/Modal/ModalHeader.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseHeader, ModalBaseHeaderProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalHeaderStylesNames = 'header';\n\nexport interface ModalHeaderProps\n extends ModalBaseHeaderProps, CompoundStylesApiProps<ModalHeaderFactory> {}\n\nexport type ModalHeaderFactory = Factory<{\n props: ModalHeaderProps;\n ref: HTMLElement;\n stylesNames: ModalHeaderStylesNames;\n compound: true;\n}>;\n\nexport const ModalHeader = factory<ModalHeaderFactory>((_props) => {\n const props = useProps('ModalHeader', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseHeader\n {...ctx.getStyles('header', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalHeader.classes = classes;\nModalHeader.displayName = '@mantine/core/ModalHeader';\n"],"mappings":";;;;;;;;AAiBA,MAAa,cAAcA,gBAAAA,SAA6B,WAAW;CAEjE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,eAAe,MAAM,MAC0B;CAEtE,MAAM,MAAMC,sBAAAA,gBAAgB;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,wBAAAA,iBAAD;EACE,GAAI,IAAI,UAAU,UAAU;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACpE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,YAAY,UAAUC,qBAAAA;AACtB,YAAY,cAAc"}
@@ -8,8 +8,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  //#region packages/@mantine/core/src/components/Modal/ModalOverlay.tsx
9
9
  const ModalOverlay = require_factory.factory((_props) => {
10
10
  const { classNames, className, style, styles, vars, ...others } = require_use_props.useProps("ModalOverlay", null, _props);
11
+ const ctx = require_Modal_context.useModalContext();
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModalBaseOverlay.ModalBaseOverlay, {
12
- ...require_Modal_context.useModalContext().getStyles("overlay", {
13
+ ...ctx.getStyles("overlay", {
13
14
  classNames,
14
15
  style,
15
16
  styles,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalOverlay.cjs","names":["factory","useProps","ModalBaseOverlay","useModalContext","classes"],"sources":["../../../src/components/Modal/ModalOverlay.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseOverlay, ModalBaseOverlayProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalOverlayStylesNames = 'overlay';\n\nexport interface ModalOverlayProps\n extends ModalBaseOverlayProps, CompoundStylesApiProps<ModalOverlayFactory> {}\n\nexport type ModalOverlayFactory = Factory<{\n props: ModalOverlayProps;\n ref: HTMLDivElement;\n stylesNames: ModalOverlayStylesNames;\n compound: true;\n}>;\n\nexport const ModalOverlay = factory<ModalOverlayFactory>((_props) => {\n const props = useProps('ModalOverlay', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseOverlay\n {...ctx.getStyles('overlay', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalOverlay.classes = classes;\nModalOverlay.displayName = '@mantine/core/ModalOverlay';\n"],"mappings":";;;;;;;;AAiBA,MAAa,eAAeA,gBAAAA,SAA8B,WAAW;CAEnE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,gBAAgB,MAAM,MACyB;CAItE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,GAJQC,sBAAAA,gBAIF,CAAC,CAAC,UAAU,WAAW;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACrE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,aAAa,UAAUC,qBAAAA;AACvB,aAAa,cAAc"}
1
+ {"version":3,"file":"ModalOverlay.cjs","names":["factory","useProps","useModalContext","ModalBaseOverlay","classes"],"sources":["../../../src/components/Modal/ModalOverlay.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseOverlay, ModalBaseOverlayProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalOverlayStylesNames = 'overlay';\n\nexport interface ModalOverlayProps\n extends ModalBaseOverlayProps, CompoundStylesApiProps<ModalOverlayFactory> {}\n\nexport type ModalOverlayFactory = Factory<{\n props: ModalOverlayProps;\n ref: HTMLDivElement;\n stylesNames: ModalOverlayStylesNames;\n compound: true;\n}>;\n\nexport const ModalOverlay = factory<ModalOverlayFactory>((_props) => {\n const props = useProps('ModalOverlay', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseOverlay\n {...ctx.getStyles('overlay', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalOverlay.classes = classes;\nModalOverlay.displayName = '@mantine/core/ModalOverlay';\n"],"mappings":";;;;;;;;AAiBA,MAAa,eAAeA,gBAAAA,SAA8B,WAAW;CAEnE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,gBAAgB,MAAM,MACyB;CAEtE,MAAM,MAAMC,sBAAAA,gBAAgB;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EACE,GAAI,IAAI,UAAU,WAAW;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACrE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,aAAa,UAAUC,qBAAAA;AACvB,aAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalRoot.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","getSize","rem","factory","useProps","useStyles","ModalProvider","ModalBase","ScrollArea","classes"],"sources":["../../../src/components/Modal/ModalRoot.tsx"],"sourcesContent":["import {\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getSize,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { ModalBase, ModalBaseProps, ModalBaseStylesNames } from '../ModalBase';\nimport { ScrollArea } from '../ScrollArea';\nimport { ModalProvider, ScrollAreaComponent } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalRootStylesNames = ModalBaseStylesNames;\nexport type ModalRootCssVariables = {\n root: '--modal-radius' | '--modal-size' | '--modal-y-offset' | '--modal-x-offset';\n};\n\nexport interface ModalRootProps extends StylesApiProps<ModalRootFactory>, ModalBaseProps {\n __staticSelector?: string;\n\n /** Top/bottom modal offset @default 5dvh */\n yOffset?: React.CSSProperties['marginTop'];\n\n /** Left/right modal offset @default 5vw */\n xOffset?: React.CSSProperties['marginLeft'];\n\n /** Scroll area component @default 'div' */\n scrollAreaComponent?: ScrollAreaComponent;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** If set, the modal is centered vertically @default false */\n centered?: boolean;\n\n /** If set, the modal takes the entire screen @default false */\n fullScreen?: boolean;\n}\n\nexport type ModalRootFactory = Factory<{\n props: ModalRootProps;\n ref: HTMLDivElement;\n stylesNames: ModalRootStylesNames;\n vars: ModalRootCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'Modal',\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n transitionProps: { duration: 200, transition: 'fade-down' },\n yOffset: '5dvh',\n} satisfies Partial<ModalRootProps>;\n\nconst varsResolver = createVarsResolver<ModalRootFactory>(\n (_, { radius, size, yOffset, xOffset }) => ({\n root: {\n '--modal-radius': radius === undefined ? undefined : getRadius(radius),\n '--modal-size': getSize(size, 'modal-size'),\n '--modal-y-offset': rem(yOffset),\n '--modal-x-offset': rem(xOffset),\n },\n })\n);\n\nexport const ModalRoot = factory<ModalRootFactory>((_props) => {\n const props = useProps('ModalRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n yOffset,\n scrollAreaComponent,\n radius,\n fullScreen,\n centered,\n xOffset,\n __staticSelector,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ModalRootFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <ModalProvider value={{ yOffset, scrollAreaComponent, getStyles, fullScreen }}>\n <ModalBase\n {...getStyles('root')}\n data-full-screen={fullScreen || undefined}\n data-centered={centered || undefined}\n data-offset-scrollbars={scrollAreaComponent === ScrollArea.Autosize || undefined}\n unstyled={unstyled}\n {...others}\n />\n </ModalProvider>\n );\n});\n\nModalRoot.classes = classes;\nModalRoot.varsResolver = varsResolver;\nModalRoot.displayName = '@mantine/core/ModalRoot';\n"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAM,eAAe;CACnB,kBAAkB;CAClB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQA,4BAAAA,iBAAiB,OAAO;CAChC,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAY;CAC1D,SAAS;AACX;AAEA,MAAM,eAAeC,6BAAAA,oBAClB,GAAG,EAAE,QAAQ,MAAM,SAAS,eAAe,EAC1C,MAAM;CACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACrE,gBAAgBC,iBAAAA,QAAQ,MAAM,YAAY;CAC1C,oBAAoBC,YAAAA,IAAI,OAAO;CAC/B,oBAAoBA,YAAAA,IAAI,OAAO;AACjC,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,SACA,qBACA,QACA,YACA,UACA,SACA,kBACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA4B;EAC5C,MAAM;EACN,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;EAAe,OAAO;GAAE;GAAS;GAAqB;GAAW;EAAW;YAC1E,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;GACE,GAAI,UAAU,MAAM;GACpB,oBAAkB,cAAc,KAAA;GAChC,iBAAe,YAAY,KAAA;GAC3B,0BAAwB,wBAAwBC,mBAAAA,WAAW,YAAY,KAAA;GAC7D;GACV,GAAI;EACL,CAAA;CACY,CAAA;AAEnB,CAAC;AAED,UAAU,UAAUC,qBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
1
+ {"version":3,"file":"ModalRoot.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","getSize","rem","factory","useProps","useStyles","ModalProvider","ModalBase","ScrollArea","classes"],"sources":["../../../src/components/Modal/ModalRoot.tsx"],"sourcesContent":["import {\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getSize,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { ModalBase, ModalBaseProps, ModalBaseStylesNames } from '../ModalBase';\nimport { ScrollArea } from '../ScrollArea';\nimport { ModalProvider, ScrollAreaComponent } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalRootStylesNames = ModalBaseStylesNames;\nexport type ModalRootCssVariables = {\n root: '--modal-radius' | '--modal-size' | '--modal-y-offset' | '--modal-x-offset';\n};\n\nexport interface ModalRootProps extends StylesApiProps<ModalRootFactory>, ModalBaseProps {\n __staticSelector?: string;\n\n /** Top/bottom modal offset @default 5dvh */\n yOffset?: React.CSSProperties['marginTop'];\n\n /** Left/right modal offset @default 5vw */\n xOffset?: React.CSSProperties['marginLeft'];\n\n /** Scroll area component @default 'div' */\n scrollAreaComponent?: ScrollAreaComponent;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius` @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** If set, the modal is centered vertically @default false */\n centered?: boolean;\n\n /** If set, the modal takes the entire screen @default false */\n fullScreen?: boolean;\n}\n\nexport type ModalRootFactory = Factory<{\n props: ModalRootProps;\n ref: HTMLDivElement;\n stylesNames: ModalRootStylesNames;\n vars: ModalRootCssVariables;\n}>;\n\nconst defaultProps = {\n __staticSelector: 'Modal',\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n transitionProps: { duration: 200, transition: 'fade-down' },\n yOffset: '5dvh',\n} satisfies Partial<ModalRootProps>;\n\nconst varsResolver = createVarsResolver<ModalRootFactory>(\n (_, { radius, size, yOffset, xOffset }) => ({\n root: {\n '--modal-radius': radius === undefined ? undefined : getRadius(radius),\n '--modal-size': getSize(size, 'modal-size'),\n '--modal-y-offset': rem(yOffset),\n '--modal-x-offset': rem(xOffset),\n },\n })\n);\n\nexport const ModalRoot = factory<ModalRootFactory>((_props) => {\n const props = useProps('ModalRoot', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n yOffset,\n scrollAreaComponent,\n radius,\n fullScreen,\n centered,\n xOffset,\n __staticSelector,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ModalRootFactory>({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <ModalProvider value={{ yOffset, scrollAreaComponent, getStyles, fullScreen }}>\n <ModalBase\n {...getStyles('root')}\n data-full-screen={fullScreen || undefined}\n data-centered={centered || undefined}\n data-offset-scrollbars={scrollAreaComponent === ScrollArea.Autosize || undefined}\n unstyled={unstyled}\n {...others}\n />\n </ModalProvider>\n );\n});\n\nModalRoot.classes = classes;\nModalRoot.varsResolver = varsResolver;\nModalRoot.displayName = '@mantine/core/ModalRoot';\n"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAM,eAAe;CACnB,kBAAkB;CAClB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQA,4BAAAA,iBAAiB,OAAO;CAChC,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAY;CAC1D,SAAS;AACX;AAEA,MAAM,eAAeC,6BAAAA,oBAClB,GAAG,EAAE,QAAQ,MAAM,SAAS,eAAe,EAC1C,MAAM;CACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACrE,gBAAgBC,iBAAAA,QAAQ,MAAM,YAAY;CAC1C,oBAAoBC,YAAAA,IAAI,OAAO;CAC/B,oBAAoBA,YAAAA,IAAI,OAAO;AACjC,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,SACA,qBACA,QACA,YACA,UACA,SACA,kBACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA4B;EAC5C,MAAM;EACN,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;EAAe,OAAO;GAAE;GAAS;GAAqB;GAAW;EAAW;EAC1E,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;GACE,GAAI,UAAU,MAAM;GACpB,oBAAkB,cAAc,KAAA;GAChC,iBAAe,YAAY,KAAA;GAC3B,0BAAwB,wBAAwBC,mBAAAA,WAAW,YAAY,KAAA;GAC7D;GACV,GAAI;EACL,CAAA;CACY,CAAA;AAEnB,CAAC;AAED,UAAU,UAAUC,qBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalStack.cjs","names":["getDefaultZIndex"],"sources":["../../../src/components/Modal/ModalStack.tsx"],"sourcesContent":["import { createContext, useState } from 'react';\nimport { getDefaultZIndex } from '../../core';\n\ninterface ModalStackContext {\n stack: string[];\n addModal: (id: string, zIndex: number | string) => void;\n removeModal: (id: string) => void;\n getZIndex: (id: string) => string;\n currentId: string;\n maxZIndex: string | number;\n}\n\nexport const ModalStackContext = createContext<ModalStackContext | null>(null);\n\nexport interface ModalStackProps {\n children: React.ReactNode;\n}\n\nexport function ModalStack({ children }: ModalStackProps) {\n const [stack, setStack] = useState<string[]>([]);\n const [maxZIndex, setMaxZIndex] = useState<number | string>(getDefaultZIndex('modal'));\n\n return (\n <ModalStackContext\n value={{\n stack,\n addModal: (id, zIndex) => {\n setStack((current) => [...new Set([...current, id])]);\n setMaxZIndex((current) =>\n typeof zIndex === 'number' && typeof current === 'number'\n ? Math.max(current, zIndex)\n : current\n );\n },\n removeModal: (id) => setStack((current) => current.filter((currentId) => currentId !== id)),\n getZIndex: (id) => `calc(${maxZIndex} + ${stack.indexOf(id)} + 1)`,\n currentId: stack[stack.length - 1],\n maxZIndex,\n }}\n >\n {children}\n </ModalStackContext>\n );\n}\n\nModalStack.displayName = '@mantine/core/ModalStack';\n"],"mappings":";;;;;AAYA,MAAa,qBAAA,GAAA,MAAA,cAAA,CAA4D,IAAI;AAM7E,SAAgB,WAAW,EAAE,YAA6B;CACxD,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,CAA+B,CAAC,CAAC;CAC/C,MAAM,CAAC,WAAW,iBAAA,GAAA,MAAA,SAAA,CAA0CA,4BAAAA,iBAAiB,OAAO,CAAC;CAErF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAD;EACE,OAAO;GACL;GACA,WAAW,IAAI,WAAW;IACxB,UAAU,YAAY,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACpD,cAAc,YACZ,OAAO,WAAW,YAAY,OAAO,YAAY,WAC7C,KAAK,IAAI,SAAS,MAAM,IACxB,OACN;GACF;GACA,cAAc,OAAO,UAAU,YAAY,QAAQ,QAAQ,cAAc,cAAc,EAAE,CAAC;GAC1F,YAAY,OAAO,QAAQ,UAAU,KAAK,MAAM,QAAQ,EAAE,EAAE;GAC5D,WAAW,MAAM,MAAM,SAAS;GAChC;EACF;EAEC;CACgB,CAAA;AAEvB;AAEA,WAAW,cAAc"}
1
+ {"version":3,"file":"ModalStack.cjs","names":["createContext","useState","getDefaultZIndex"],"sources":["../../../src/components/Modal/ModalStack.tsx"],"sourcesContent":["import { createContext, useState } from 'react';\nimport { getDefaultZIndex } from '../../core';\n\ninterface ModalStackContext {\n stack: string[];\n addModal: (id: string, zIndex: number | string) => void;\n removeModal: (id: string) => void;\n getZIndex: (id: string) => string;\n currentId: string;\n maxZIndex: string | number;\n}\n\nexport const ModalStackContext = createContext<ModalStackContext | null>(null);\n\nexport interface ModalStackProps {\n children: React.ReactNode;\n}\n\nexport function ModalStack({ children }: ModalStackProps) {\n const [stack, setStack] = useState<string[]>([]);\n const [maxZIndex, setMaxZIndex] = useState<number | string>(getDefaultZIndex('modal'));\n\n return (\n <ModalStackContext\n value={{\n stack,\n addModal: (id, zIndex) => {\n setStack((current) => [...new Set([...current, id])]);\n setMaxZIndex((current) =>\n typeof zIndex === 'number' && typeof current === 'number'\n ? Math.max(current, zIndex)\n : current\n );\n },\n removeModal: (id) => setStack((current) => current.filter((currentId) => currentId !== id)),\n getZIndex: (id) => `calc(${maxZIndex} + ${stack.indexOf(id)} + 1)`,\n currentId: stack[stack.length - 1],\n maxZIndex,\n }}\n >\n {children}\n </ModalStackContext>\n );\n}\n\nModalStack.displayName = '@mantine/core/ModalStack';\n"],"mappings":";;;;;AAYA,MAAa,qBAAA,GAAoBA,MAAAA,cAAAA,CAAwC,IAAI;AAM7E,SAAgB,WAAW,EAAE,YAA6B;CACxD,MAAM,CAAC,OAAO,aAAA,GAAYC,MAAAA,SAAAA,CAAmB,CAAC,CAAC;CAC/C,MAAM,CAAC,WAAW,iBAAA,GAAgBA,MAAAA,SAAAA,CAA0BC,4BAAAA,iBAAiB,OAAO,CAAC;CAErF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAD;EACE,OAAO;GACL;GACA,WAAW,IAAI,WAAW;IACxB,UAAU,YAAY,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACpD,cAAc,YACZ,OAAO,WAAW,YAAY,OAAO,YAAY,WAC7C,KAAK,IAAI,SAAS,MAAM,IACxB,OACN;GACF;GACA,cAAc,OAAO,UAAU,YAAY,QAAQ,QAAQ,cAAc,cAAc,EAAE,CAAC;GAC1F,YAAY,OAAO,QAAQ,UAAU,KAAK,MAAM,QAAQ,EAAE,EAAE;GAC5D,WAAW,MAAM,MAAM,SAAS;GAChC;EACF;EAEC;CACgB,CAAA;AAEvB;AAEA,WAAW,cAAc"}
@@ -8,8 +8,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  //#region packages/@mantine/core/src/components/Modal/ModalTitle.tsx
9
9
  const ModalTitle = require_factory.factory((_props) => {
10
10
  const { classNames, className, style, styles, vars, ...others } = require_use_props.useProps("ModalTitle", null, _props);
11
+ const ctx = require_Modal_context.useModalContext();
11
12
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ModalBaseTitle.ModalBaseTitle, {
12
- ...require_Modal_context.useModalContext().getStyles("title", {
13
+ ...ctx.getStyles("title", {
13
14
  classNames,
14
15
  style,
15
16
  styles,
@@ -1 +1 @@
1
- {"version":3,"file":"ModalTitle.cjs","names":["factory","useProps","ModalBaseTitle","useModalContext","classes"],"sources":["../../../src/components/Modal/ModalTitle.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseTitle, ModalBaseTitleProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalTitleStylesNames = 'title';\n\nexport interface ModalTitleProps\n extends ModalBaseTitleProps, CompoundStylesApiProps<ModalTitleFactory> {}\n\nexport type ModalTitleFactory = Factory<{\n props: ModalTitleProps;\n ref: HTMLHeadingElement;\n stylesNames: ModalTitleStylesNames;\n compound: true;\n}>;\n\nexport const ModalTitle = factory<ModalTitleFactory>((_props) => {\n const props = useProps('ModalTitle', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseTitle\n {...ctx.getStyles('title', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalTitle.classes = classes;\nModalTitle.displayName = '@mantine/core/ModalTitle';\n"],"mappings":";;;;;;;;AAiBA,MAAa,aAAaA,gBAAAA,SAA4B,WAAW;CAE/D,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,cAAc,MAAM,MAC2B;CAItE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EACE,GAJQC,sBAAAA,gBAIF,CAAC,CAAC,UAAU,SAAS;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACnE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,WAAW,UAAUC,qBAAAA;AACrB,WAAW,cAAc"}
1
+ {"version":3,"file":"ModalTitle.cjs","names":["factory","useProps","useModalContext","ModalBaseTitle","classes"],"sources":["../../../src/components/Modal/ModalTitle.tsx"],"sourcesContent":["import { CompoundStylesApiProps, factory, Factory, useProps } from '../../core';\nimport { ModalBaseTitle, ModalBaseTitleProps } from '../ModalBase';\nimport { useModalContext } from './Modal.context';\nimport classes from './Modal.module.css';\n\nexport type ModalTitleStylesNames = 'title';\n\nexport interface ModalTitleProps\n extends ModalBaseTitleProps, CompoundStylesApiProps<ModalTitleFactory> {}\n\nexport type ModalTitleFactory = Factory<{\n props: ModalTitleProps;\n ref: HTMLHeadingElement;\n stylesNames: ModalTitleStylesNames;\n compound: true;\n}>;\n\nexport const ModalTitle = factory<ModalTitleFactory>((_props) => {\n const props = useProps('ModalTitle', null, _props);\n const { classNames, className, style, styles, vars, ...others } = props;\n\n const ctx = useModalContext();\n\n return (\n <ModalBaseTitle\n {...ctx.getStyles('title', { classNames, style, styles, className })}\n {...others}\n />\n );\n});\n\nModalTitle.classes = classes;\nModalTitle.displayName = '@mantine/core/ModalTitle';\n"],"mappings":";;;;;;;;AAiBA,MAAa,aAAaA,gBAAAA,SAA4B,WAAW;CAE/D,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WADzCC,kBAAAA,SAAS,cAAc,MAAM,MAC2B;CAEtE,MAAM,MAAMC,sBAAAA,gBAAgB;CAE5B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EACE,GAAI,IAAI,UAAU,SAAS;GAAE;GAAY;GAAO;GAAQ;EAAU,CAAC;EACnE,GAAI;CACL,CAAA;AAEL,CAAC;AAED,WAAW,UAAUC,qBAAAA;AACrB,WAAW,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-modals-stack.cjs","names":[],"sources":["../../../src/components/Modal/use-modals-stack.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\ninterface ModalStackReturnType<T extends string> {\n state: Record<T, boolean>;\n open: (id: T) => void;\n close: (id: T) => void;\n toggle: (id: T) => void;\n closeAll: () => void;\n register: (id: T) => { opened: boolean; onClose: () => void; stackId: T };\n}\n\nexport function useModalsStack<const T extends string>(modals: T[]): ModalStackReturnType<T> {\n const initialState = modals.reduce(\n (acc, modal) => ({ ...acc, [modal]: false }),\n {} as Record<T, boolean>\n );\n\n const [state, setState] = useState(initialState);\n\n const open = useCallback((modal: T) => {\n setState((current) => ({ ...current, [modal]: true }));\n }, []);\n\n const close = useCallback(\n (modal: T) => setState((current) => ({ ...current, [modal]: false })),\n []\n );\n\n const toggle = useCallback(\n (modal: T) => setState((current) => ({ ...current, [modal]: !current[modal] })),\n []\n );\n\n const closeAll = useCallback(() => setState(initialState), []);\n\n const register = useCallback(\n (modal: T) => ({\n opened: state[modal],\n onClose: () => close(modal),\n stackId: modal,\n }),\n [state]\n );\n\n return { state, open, close, closeAll, toggle, register };\n}\n\nexport const useDrawersStack = useModalsStack;\n"],"mappings":";;;AAWA,SAAgB,eAAuC,QAAsC;CAC3F,MAAM,eAAe,OAAO,QACzB,KAAK,WAAW;EAAE,GAAG;GAAM,QAAQ;CAAM,IAC1C,CAAC,CACH;CAEA,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,CAAqB,YAAY;CAE/C,MAAM,QAAA,GAAA,MAAA,YAAA,EAAoB,UAAa;EACrC,UAAU,aAAa;GAAE,GAAG;IAAU,QAAQ;EAAK,EAAE;CACvD,GAAG,CAAC,CAAC;CAEL,MAAM,SAAA,GAAA,MAAA,YAAA,EACH,UAAa,UAAU,aAAa;EAAE,GAAG;GAAU,QAAQ;CAAM,EAAE,GACpE,CAAC,CACH;CAEA,MAAM,UAAA,GAAA,MAAA,YAAA,EACH,UAAa,UAAU,aAAa;EAAE,GAAG;GAAU,QAAQ,CAAC,QAAQ;CAAO,EAAE,GAC9E,CAAC,CACH;CAaA,OAAO;EAAE;EAAO;EAAM;EAAO,WAAA,GAAA,MAAA,YAAA,OAXM,SAAS,YAAY,GAAG,CAAC,CAWxB;EAAG;EAAQ,WAAA,GAAA,MAAA,YAAA,EAR5C,WAAc;GACb,QAAQ,MAAM;GACd,eAAe,MAAM,KAAK;GAC1B,SAAS;EACX,IACA,CAAC,KAAK,CAG8C;CAAE;AAC1D;AAEA,MAAa,kBAAkB"}
1
+ {"version":3,"file":"use-modals-stack.cjs","names":["useState","useCallback"],"sources":["../../../src/components/Modal/use-modals-stack.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\ninterface ModalStackReturnType<T extends string> {\n state: Record<T, boolean>;\n open: (id: T) => void;\n close: (id: T) => void;\n toggle: (id: T) => void;\n closeAll: () => void;\n register: (id: T) => { opened: boolean; onClose: () => void; stackId: T };\n}\n\nexport function useModalsStack<const T extends string>(modals: T[]): ModalStackReturnType<T> {\n const initialState = modals.reduce(\n (acc, modal) => ({ ...acc, [modal]: false }),\n {} as Record<T, boolean>\n );\n\n const [state, setState] = useState(initialState);\n\n const open = useCallback((modal: T) => {\n setState((current) => ({ ...current, [modal]: true }));\n }, []);\n\n const close = useCallback(\n (modal: T) => setState((current) => ({ ...current, [modal]: false })),\n []\n );\n\n const toggle = useCallback(\n (modal: T) => setState((current) => ({ ...current, [modal]: !current[modal] })),\n []\n );\n\n const closeAll = useCallback(() => setState(initialState), []);\n\n const register = useCallback(\n (modal: T) => ({\n opened: state[modal],\n onClose: () => close(modal),\n stackId: modal,\n }),\n [state]\n );\n\n return { state, open, close, closeAll, toggle, register };\n}\n\nexport const useDrawersStack = useModalsStack;\n"],"mappings":";;;AAWA,SAAgB,eAAuC,QAAsC;CAC3F,MAAM,eAAe,OAAO,QACzB,KAAK,WAAW;EAAE,GAAG;GAAM,QAAQ;CAAM,IAC1C,CAAC,CACH;CAEA,MAAM,CAAC,OAAO,aAAA,GAAYA,MAAAA,SAAAA,CAAS,YAAY;CAE/C,MAAM,QAAA,GAAOC,MAAAA,YAAAA,EAAa,UAAa;EACrC,UAAU,aAAa;GAAE,GAAG;IAAU,QAAQ;EAAK,EAAE;CACvD,GAAG,CAAC,CAAC;CAEL,MAAM,SAAA,GAAQA,MAAAA,YAAAA,EACX,UAAa,UAAU,aAAa;EAAE,GAAG;GAAU,QAAQ;CAAM,EAAE,GACpE,CAAC,CACH;CAEA,MAAM,UAAA,GAASA,MAAAA,YAAAA,EACZ,UAAa,UAAU,aAAa;EAAE,GAAG;GAAU,QAAQ,CAAC,QAAQ;CAAO,EAAE,GAC9E,CAAC,CACH;CAaA,OAAO;EAAE;EAAO;EAAM;EAAO,WAAA,GAXZA,MAAAA,YAAAA,OAAkB,SAAS,YAAY,GAAG,CAAC,CAWxB;EAAG;EAAQ,WAAA,GAT9BA,MAAAA,YAAAA,EACd,WAAc;GACb,QAAQ,MAAM;GACd,eAAe,MAAM,KAAK;GAC1B,SAAS;EACX,IACA,CAAC,KAAK,CAG8C;CAAE;AAC1D;AAEA,MAAa,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBase.cjs","names":["useModal","OptionalPortal","ModalBaseProvider","RemoveScroll","Box","getDefaultZIndex","getShadow","getSpacing"],"sources":["../../../src/components/ModalBase/ModalBase.tsx"],"sourcesContent":["import { RemoveScroll } from 'react-remove-scroll';\nimport {\n Box,\n BoxProps,\n ElementProps,\n getDefaultZIndex,\n getShadow,\n getSpacing,\n MantineShadow,\n MantineSize,\n MantineSpacing,\n} from '../../core';\nimport { BasePortalProps, OptionalPortal } from '../Portal';\nimport { TransitionOverride } from '../Transition';\nimport { ModalBaseProvider } from './ModalBase.context';\nimport { useModal } from './use-modal';\n\ntype RemoveScrollProps = Omit<React.ComponentProps<typeof RemoveScroll>, 'children'>;\n\nexport interface ModalBaseProps extends BoxProps, ElementProps<'div', 'title'> {\n unstyled?: boolean;\n\n /** If set modal/drawer is not unmounted from the DOM when hidden. `display: none` styles are applied instead. @default false */\n keepMounted?: boolean;\n\n /** Controls how the modal/drawer is hidden when `keepMounted` is set:\n * `'activity'` - hidden with React 19 `Activity` component,\n * `'display-none'` - hidden with `display: none` styles\n * @default 'activity'\n */\n keepMountedMode?: 'activity' | 'display-none';\n\n /** Controls opened state */\n opened: boolean;\n\n /** Called when modal/drawer is closed */\n onClose: () => void;\n\n /** Id used to connect modal/drawer with body and title */\n id?: string;\n\n /** If set, scroll is locked when `opened={true}` @default true */\n lockScroll?: boolean;\n\n /** If set, focus is trapped within the modal/drawer @default true */\n trapFocus?: boolean;\n\n /** If set, the component is rendered inside `Portal` @default true */\n withinPortal?: boolean;\n\n /** Props passed down to the Portal component when `withinPortal` is set */\n portalProps?: BasePortalProps;\n\n /** Modal/drawer content */\n children?: React.ReactNode;\n\n /** If set, the modal/drawer is closed when user clicks on the overlay @default true */\n closeOnClickOutside?: boolean;\n\n /** Props added to the `Transition` component that used to animate overlay and body, use to configure duration and animation type, `{ duration: 200, transition: 'fade-down' }` by default */\n transitionProps?: TransitionOverride;\n\n /** Called when exit transition ends */\n onExitTransitionEnd?: () => void;\n\n /** Called when enter transition ends */\n onEnterTransitionEnd?: () => void;\n\n /** If set, `onClose` is called when user presses the escape key @default true */\n closeOnEscape?: boolean;\n\n /** If set, focus is returned to the last active element when `onClose` is called @default true */\n returnFocus?: boolean;\n\n /** `z-index` CSS property of the root element @default 200 */\n zIndex?: string | number;\n\n /** Key of `theme.shadows` or any valid CSS box-shadow value @default 'xl' */\n shadow?: MantineShadow;\n\n /** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default 'md' */\n padding?: MantineSpacing;\n\n /** Controls width of the content area @default 'md' */\n size?: MantineSize | (string & {}) | number;\n\n /** Props passed down to react-remove-scroll, can be used to customize scroll lock behavior */\n removeScrollProps?: RemoveScrollProps;\n}\n\nexport function ModalBase({\n keepMounted,\n keepMountedMode = 'activity',\n opened,\n onClose,\n id,\n transitionProps,\n onExitTransitionEnd,\n onEnterTransitionEnd,\n trapFocus,\n closeOnEscape,\n returnFocus,\n closeOnClickOutside,\n withinPortal,\n portalProps,\n lockScroll,\n children,\n zIndex,\n shadow,\n padding,\n __vars,\n unstyled,\n removeScrollProps,\n ...others\n}: ModalBaseProps) {\n const { _id, titleMounted, bodyMounted, shouldLockScroll, setTitleMounted, setBodyMounted } =\n useModal({ id, transitionProps, opened, trapFocus, closeOnEscape, onClose, returnFocus });\n\n const { key: removeScrollKey, ...otherRemoveScrollProps } = removeScrollProps || {};\n\n return (\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <ModalBaseProvider\n value={{\n opened,\n onClose,\n closeOnClickOutside,\n onExitTransitionEnd,\n onEnterTransitionEnd,\n transitionProps: { ...transitionProps, keepMounted, keepMountedMode },\n getTitleId: () => `${_id}-title`,\n getBodyId: () => `${_id}-body`,\n titleMounted,\n bodyMounted,\n setTitleMounted,\n setBodyMounted,\n trapFocus,\n closeOnEscape,\n zIndex,\n unstyled,\n }}\n >\n <RemoveScroll\n enabled={shouldLockScroll && lockScroll}\n key={removeScrollKey}\n {...otherRemoveScrollProps}\n >\n <Box\n {...others}\n id={_id}\n __vars={{\n ...__vars,\n '--mb-z-index': (zIndex || getDefaultZIndex('modal')).toString(),\n '--mb-shadow': getShadow(shadow),\n '--mb-padding': getSpacing(padding),\n }}\n >\n {children}\n </Box>\n </RemoveScroll>\n </ModalBaseProvider>\n </OptionalPortal>\n );\n}\n\nModalBase.displayName = '@mantine/core/ModalBase';\n"],"mappings":";;;;;;;;;;AA0FA,SAAgB,UAAU,EACxB,aACA,kBAAkB,YAClB,QACA,SACA,IACA,iBACA,qBACA,sBACA,WACA,eACA,aACA,qBACA,cACA,aACA,YACA,UACA,QACA,QACA,SACA,QACA,UACA,mBACA,GAAG,UACc;CACjB,MAAM,EAAE,KAAK,cAAc,aAAa,kBAAkB,iBAAiB,mBACzEA,kBAAAA,SAAS;EAAE;EAAI;EAAiB;EAAQ;EAAW;EAAe;EAAS;CAAY,CAAC;CAE1F,MAAM,EAAE,KAAK,iBAAiB,GAAG,2BAA2B,qBAAqB,CAAC;CAElF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EAAgB,GAAI;EAA2B;YAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,mBAAD;GACE,OAAO;IACL;IACA;IACA;IACA;IACA;IACA,iBAAiB;KAAE,GAAG;KAAiB;KAAa;IAAgB;IACpE,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG,IAAI;IACxB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;aAEA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,cAAD;IACE,SAAS,oBAAoB;IAE7B,GAAI;cAEJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;KACE,GAAI;KACJ,IAAI;KACJ,QAAQ;MACN,GAAG;MACH,iBAAiB,UAAUC,4BAAAA,iBAAiB,OAAO,EAAA,CAAG,SAAS;MAC/D,eAAeC,iBAAAA,UAAU,MAAM;MAC/B,gBAAgBC,iBAAAA,WAAW,OAAO;KACpC;KAEC;IACE,CAAA;GACO,GAfP,eAeO;EACG,CAAA;CACL,CAAA;AAEpB;AAEA,UAAU,cAAc"}
1
+ {"version":3,"file":"ModalBase.cjs","names":["useModal","OptionalPortal","ModalBaseProvider","RemoveScroll","Box","getDefaultZIndex","getShadow","getSpacing"],"sources":["../../../src/components/ModalBase/ModalBase.tsx"],"sourcesContent":["import { RemoveScroll } from 'react-remove-scroll';\nimport {\n Box,\n BoxProps,\n ElementProps,\n getDefaultZIndex,\n getShadow,\n getSpacing,\n MantineShadow,\n MantineSize,\n MantineSpacing,\n} from '../../core';\nimport { BasePortalProps, OptionalPortal } from '../Portal';\nimport { TransitionOverride } from '../Transition';\nimport { ModalBaseProvider } from './ModalBase.context';\nimport { useModal } from './use-modal';\n\ntype RemoveScrollProps = Omit<React.ComponentProps<typeof RemoveScroll>, 'children'>;\n\nexport interface ModalBaseProps extends BoxProps, ElementProps<'div', 'title'> {\n unstyled?: boolean;\n\n /** If set modal/drawer is not unmounted from the DOM when hidden. `display: none` styles are applied instead. @default false */\n keepMounted?: boolean;\n\n /** Controls how the modal/drawer is hidden when `keepMounted` is set:\n * `'activity'` - hidden with React 19 `Activity` component,\n * `'display-none'` - hidden with `display: none` styles\n * @default 'activity'\n */\n keepMountedMode?: 'activity' | 'display-none';\n\n /** Controls opened state */\n opened: boolean;\n\n /** Called when modal/drawer is closed */\n onClose: () => void;\n\n /** Id used to connect modal/drawer with body and title */\n id?: string;\n\n /** If set, scroll is locked when `opened={true}` @default true */\n lockScroll?: boolean;\n\n /** If set, focus is trapped within the modal/drawer @default true */\n trapFocus?: boolean;\n\n /** If set, the component is rendered inside `Portal` @default true */\n withinPortal?: boolean;\n\n /** Props passed down to the Portal component when `withinPortal` is set */\n portalProps?: BasePortalProps;\n\n /** Modal/drawer content */\n children?: React.ReactNode;\n\n /** If set, the modal/drawer is closed when user clicks on the overlay @default true */\n closeOnClickOutside?: boolean;\n\n /** Props added to the `Transition` component that used to animate overlay and body, use to configure duration and animation type, `{ duration: 200, transition: 'fade-down' }` by default */\n transitionProps?: TransitionOverride;\n\n /** Called when exit transition ends */\n onExitTransitionEnd?: () => void;\n\n /** Called when enter transition ends */\n onEnterTransitionEnd?: () => void;\n\n /** If set, `onClose` is called when user presses the escape key @default true */\n closeOnEscape?: boolean;\n\n /** If set, focus is returned to the last active element when `onClose` is called @default true */\n returnFocus?: boolean;\n\n /** `z-index` CSS property of the root element @default 200 */\n zIndex?: string | number;\n\n /** Key of `theme.shadows` or any valid CSS box-shadow value @default 'xl' */\n shadow?: MantineShadow;\n\n /** Key of `theme.spacing` or any valid CSS value to set content, header and footer padding @default 'md' */\n padding?: MantineSpacing;\n\n /** Controls width of the content area @default 'md' */\n size?: MantineSize | (string & {}) | number;\n\n /** Props passed down to react-remove-scroll, can be used to customize scroll lock behavior */\n removeScrollProps?: RemoveScrollProps;\n}\n\nexport function ModalBase({\n keepMounted,\n keepMountedMode = 'activity',\n opened,\n onClose,\n id,\n transitionProps,\n onExitTransitionEnd,\n onEnterTransitionEnd,\n trapFocus,\n closeOnEscape,\n returnFocus,\n closeOnClickOutside,\n withinPortal,\n portalProps,\n lockScroll,\n children,\n zIndex,\n shadow,\n padding,\n __vars,\n unstyled,\n removeScrollProps,\n ...others\n}: ModalBaseProps) {\n const { _id, titleMounted, bodyMounted, shouldLockScroll, setTitleMounted, setBodyMounted } =\n useModal({ id, transitionProps, opened, trapFocus, closeOnEscape, onClose, returnFocus });\n\n const { key: removeScrollKey, ...otherRemoveScrollProps } = removeScrollProps || {};\n\n return (\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <ModalBaseProvider\n value={{\n opened,\n onClose,\n closeOnClickOutside,\n onExitTransitionEnd,\n onEnterTransitionEnd,\n transitionProps: { ...transitionProps, keepMounted, keepMountedMode },\n getTitleId: () => `${_id}-title`,\n getBodyId: () => `${_id}-body`,\n titleMounted,\n bodyMounted,\n setTitleMounted,\n setBodyMounted,\n trapFocus,\n closeOnEscape,\n zIndex,\n unstyled,\n }}\n >\n <RemoveScroll\n enabled={shouldLockScroll && lockScroll}\n key={removeScrollKey}\n {...otherRemoveScrollProps}\n >\n <Box\n {...others}\n id={_id}\n __vars={{\n ...__vars,\n '--mb-z-index': (zIndex || getDefaultZIndex('modal')).toString(),\n '--mb-shadow': getShadow(shadow),\n '--mb-padding': getSpacing(padding),\n }}\n >\n {children}\n </Box>\n </RemoveScroll>\n </ModalBaseProvider>\n </OptionalPortal>\n );\n}\n\nModalBase.displayName = '@mantine/core/ModalBase';\n"],"mappings":";;;;;;;;;;AA0FA,SAAgB,UAAU,EACxB,aACA,kBAAkB,YAClB,QACA,SACA,IACA,iBACA,qBACA,sBACA,WACA,eACA,aACA,qBACA,cACA,aACA,YACA,UACA,QACA,QACA,SACA,QACA,UACA,mBACA,GAAG,UACc;CACjB,MAAM,EAAE,KAAK,cAAc,aAAa,kBAAkB,iBAAiB,mBACzEA,kBAAAA,SAAS;EAAE;EAAI;EAAiB;EAAQ;EAAW;EAAe;EAAS;CAAY,CAAC;CAE1F,MAAM,EAAE,KAAK,iBAAiB,GAAG,2BAA2B,qBAAqB,CAAC;CAElF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EAAgB,GAAI;EAA2B;EAC7C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,mBAAD;GACE,OAAO;IACL;IACA;IACA;IACA;IACA;IACA,iBAAiB;KAAE,GAAG;KAAiB;KAAa;IAAgB;IACpE,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG,IAAI;IACxB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,cAAD;IACE,SAAS,oBAAoB;IAE7B,GAAI;IAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;KACE,GAAI;KACJ,IAAI;KACJ,QAAQ;MACN,GAAG;MACH,iBAAiB,UAAUC,4BAAAA,iBAAiB,OAAO,EAAA,CAAG,SAAS;MAC/D,eAAeC,iBAAAA,UAAU,MAAM;MAC/B,gBAAgBC,iBAAAA,WAAW,OAAO;KACpC;KAEC;IACE,CAAA;GACO,GAfP,eAeO;EACG,CAAA;CACL,CAAA;AAEpB;AAEA,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBaseBody.cjs","names":["useModalBodyId","useModalBaseContext","Box","classes"],"sources":["../../../src/components/ModalBase/ModalBaseBody.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Box, BoxProps, ElementProps } from '../../core';\nimport { useModalBaseContext } from './ModalBase.context';\nimport { useModalBodyId } from './use-modal-body-id';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseBodyProps extends BoxProps, ElementProps<'div'> {}\n\nexport function ModalBaseBody({ className, ...others }: ModalBaseBodyProps) {\n const bodyId = useModalBodyId();\n const ctx = useModalBaseContext();\n return (\n <Box id={bodyId} className={cx({ [classes.body]: !ctx.unstyled }, className)} {...others} />\n );\n}\n\nModalBaseBody.displayName = '@mantine/core/ModalBaseBody';\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,cAAc,EAAE,WAAW,GAAG,UAA8B;CAC1E,MAAM,SAASA,0BAAAA,eAAe;CAC9B,MAAM,MAAMC,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EAAK,IAAI;EAAQ,YAAA,GAAA,KAAA,QAAA,CAAc,GAAGC,yBAAAA,QAAQ,OAAO,CAAC,IAAI,SAAS,GAAG,SAAS;EAAG,GAAI;CAAS,CAAA;AAE/F;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"ModalBaseBody.cjs","names":["useModalBodyId","useModalBaseContext","Box","cx","classes"],"sources":["../../../src/components/ModalBase/ModalBaseBody.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Box, BoxProps, ElementProps } from '../../core';\nimport { useModalBaseContext } from './ModalBase.context';\nimport { useModalBodyId } from './use-modal-body-id';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseBodyProps extends BoxProps, ElementProps<'div'> {}\n\nexport function ModalBaseBody({ className, ...others }: ModalBaseBodyProps) {\n const bodyId = useModalBodyId();\n const ctx = useModalBaseContext();\n return (\n <Box id={bodyId} className={cx({ [classes.body]: !ctx.unstyled }, className)} {...others} />\n );\n}\n\nModalBaseBody.displayName = '@mantine/core/ModalBaseBody';\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,cAAc,EAAE,WAAW,GAAG,UAA8B;CAC1E,MAAM,SAASA,0BAAAA,eAAe;CAC9B,MAAM,MAAMC,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EAAK,IAAI;EAAQ,YAAA,GAAWC,KAAAA,QAAAA,CAAG,GAAGC,yBAAAA,QAAQ,OAAO,CAAC,IAAI,SAAS,GAAG,SAAS;EAAG,GAAI;CAAS,CAAA;AAE/F;AAEA,cAAc,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBaseCloseButton.cjs","names":["useModalBaseContext","CloseButton","classes"],"sources":["../../../src/components/ModalBase/ModalBaseCloseButton.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { BoxProps, ElementProps } from '../../core';\nimport { __CloseButtonProps, CloseButton } from '../CloseButton';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseCloseButtonProps\n extends __CloseButtonProps, BoxProps, ElementProps<'button'> {}\n\nexport function ModalBaseCloseButton({ className, onClick, ...others }: ModalBaseCloseButtonProps) {\n const ctx = useModalBaseContext();\n return (\n <CloseButton\n {...others}\n onClick={(event) => {\n ctx.onClose();\n onClick?.(event);\n }}\n className={cx({ [classes.close]: !ctx.unstyled }, className)}\n unstyled={ctx.unstyled}\n />\n );\n}\n\nModalBaseCloseButton.displayName = '@mantine/core/ModalBaseCloseButton';\n"],"mappings":";;;;;;;;;AASA,SAAgB,qBAAqB,EAAE,WAAW,SAAS,GAAG,UAAqC;CACjG,MAAM,MAAMA,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;EACE,GAAI;EACJ,UAAU,UAAU;GAClB,IAAI,QAAQ;GACZ,UAAU,KAAK;EACjB;EACA,YAAA,GAAA,KAAA,QAAA,CAAc,GAAGC,yBAAAA,QAAQ,QAAQ,CAAC,IAAI,SAAS,GAAG,SAAS;EAC3D,UAAU,IAAI;CACf,CAAA;AAEL;AAEA,qBAAqB,cAAc"}
1
+ {"version":3,"file":"ModalBaseCloseButton.cjs","names":["useModalBaseContext","CloseButton","cx","classes"],"sources":["../../../src/components/ModalBase/ModalBaseCloseButton.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { BoxProps, ElementProps } from '../../core';\nimport { __CloseButtonProps, CloseButton } from '../CloseButton';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseCloseButtonProps\n extends __CloseButtonProps, BoxProps, ElementProps<'button'> {}\n\nexport function ModalBaseCloseButton({ className, onClick, ...others }: ModalBaseCloseButtonProps) {\n const ctx = useModalBaseContext();\n return (\n <CloseButton\n {...others}\n onClick={(event) => {\n ctx.onClose();\n onClick?.(event);\n }}\n className={cx({ [classes.close]: !ctx.unstyled }, className)}\n unstyled={ctx.unstyled}\n />\n );\n}\n\nModalBaseCloseButton.displayName = '@mantine/core/ModalBaseCloseButton';\n"],"mappings":";;;;;;;;;AASA,SAAgB,qBAAqB,EAAE,WAAW,SAAS,GAAG,UAAqC;CACjG,MAAM,MAAMA,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;EACE,GAAI;EACJ,UAAU,UAAU;GAClB,IAAI,QAAQ;GACZ,UAAU,KAAK;EACjB;EACA,YAAA,GAAWC,KAAAA,QAAAA,CAAG,GAAGC,yBAAAA,QAAQ,QAAQ,CAAC,IAAI,SAAS,GAAG,SAAS;EAC3D,UAAU,IAAI;CACf,CAAA;AAEL;AAEA,qBAAqB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBaseContent.cjs","names":["useModalBaseContext","Transition","classes","FocusTrap","Paper"],"sources":["../../../src/components/ModalBase/ModalBaseContent.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { BoxProps, ElementProps, MantineRadius, MantineShadow } from '../../core';\nimport { FocusTrap } from '../FocusTrap';\nimport { Paper } from '../Paper';\nimport { Transition, TransitionOverride } from '../Transition';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseContentProps extends BoxProps, ElementProps<'div'> {\n /** Props passed down to the `Transition` component */\n transitionProps?: TransitionOverride;\n\n /** Key of `theme.shadows` or any valid CSS value to set `box-shadow` */\n shadow?: MantineShadow;\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\ninterface _ModalBaseContentProps extends ModalBaseContentProps {\n innerProps: React.ComponentProps<'div'>;\n}\n\nexport function ModalBaseContent({\n transitionProps,\n className,\n innerProps,\n onKeyDown,\n style,\n ref,\n ...others\n}: _ModalBaseContentProps) {\n const ctx = useModalBaseContext();\n\n return (\n <Transition\n mounted={ctx.opened}\n transition=\"pop\"\n {...ctx.transitionProps}\n onExited={() => {\n ctx.onExitTransitionEnd?.();\n ctx.transitionProps?.onExited?.();\n }}\n onEntered={() => {\n ctx.onEnterTransitionEnd?.();\n ctx.transitionProps?.onEntered?.();\n }}\n {...transitionProps}\n >\n {(transitionStyles) => (\n <div\n {...innerProps}\n className={cx({ [classes.inner]: !ctx.unstyled }, innerProps.className)}\n >\n <FocusTrap active={ctx.opened && ctx.trapFocus} innerRef={ref}>\n <Paper\n {...others}\n component=\"section\"\n role=\"dialog\"\n tabIndex={-1}\n aria-modal\n aria-describedby={ctx.bodyMounted ? ctx.getBodyId() : undefined}\n aria-labelledby={ctx.titleMounted ? ctx.getTitleId() : undefined}\n style={[style, transitionStyles]}\n className={cx({ [classes.content]: !ctx.unstyled }, className)}\n unstyled={ctx.unstyled}\n >\n {others.children}\n </Paper>\n </FocusTrap>\n </div>\n )}\n </Transition>\n );\n}\n\nModalBaseContent.displayName = '@mantine/core/ModalBaseContent';\n"],"mappings":";;;;;;;;;;;AAuBA,SAAgB,iBAAiB,EAC/B,iBACA,WACA,YACA,WACA,OACA,KACA,GAAG,UACsB;CACzB,MAAM,MAAMA,0BAAAA,oBAAoB;CAEhC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;EACE,SAAS,IAAI;EACb,YAAW;EACX,GAAI,IAAI;EACR,gBAAgB;GACd,IAAI,sBAAsB;GAC1B,IAAI,iBAAiB,WAAW;EAClC;EACA,iBAAiB;GACf,IAAI,uBAAuB;GAC3B,IAAI,iBAAiB,YAAY;EACnC;EACA,GAAI;aAEF,qBACA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACJ,YAAA,GAAA,KAAA,QAAA,CAAc,GAAGC,yBAAAA,QAAQ,QAAQ,CAAC,IAAI,SAAS,GAAG,WAAW,SAAS;aAEtE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;IAAW,QAAQ,IAAI,UAAU,IAAI;IAAW,UAAU;cACxD,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;KACE,GAAI;KACJ,WAAU;KACV,MAAK;KACL,UAAU;KACV,cAAA;KACA,oBAAkB,IAAI,cAAc,IAAI,UAAU,IAAI,KAAA;KACtD,mBAAiB,IAAI,eAAe,IAAI,WAAW,IAAI,KAAA;KACvD,OAAO,CAAC,OAAO,gBAAgB;KAC/B,YAAA,GAAA,KAAA,QAAA,CAAc,GAAGF,yBAAAA,QAAQ,UAAU,CAAC,IAAI,SAAS,GAAG,SAAS;KAC7D,UAAU,IAAI;eAEb,OAAO;IACH,CAAA;GACE,CAAA;EACR,CAAA;CAEG,CAAA;AAEhB;AAEA,iBAAiB,cAAc"}
1
+ {"version":3,"file":"ModalBaseContent.cjs","names":["useModalBaseContext","Transition","cx","classes","FocusTrap","Paper"],"sources":["../../../src/components/ModalBase/ModalBaseContent.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { BoxProps, ElementProps, MantineRadius, MantineShadow } from '../../core';\nimport { FocusTrap } from '../FocusTrap';\nimport { Paper } from '../Paper';\nimport { Transition, TransitionOverride } from '../Transition';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseContentProps extends BoxProps, ElementProps<'div'> {\n /** Props passed down to the `Transition` component */\n transitionProps?: TransitionOverride;\n\n /** Key of `theme.shadows` or any valid CSS value to set `box-shadow` */\n shadow?: MantineShadow;\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\ninterface _ModalBaseContentProps extends ModalBaseContentProps {\n innerProps: React.ComponentProps<'div'>;\n}\n\nexport function ModalBaseContent({\n transitionProps,\n className,\n innerProps,\n onKeyDown,\n style,\n ref,\n ...others\n}: _ModalBaseContentProps) {\n const ctx = useModalBaseContext();\n\n return (\n <Transition\n mounted={ctx.opened}\n transition=\"pop\"\n {...ctx.transitionProps}\n onExited={() => {\n ctx.onExitTransitionEnd?.();\n ctx.transitionProps?.onExited?.();\n }}\n onEntered={() => {\n ctx.onEnterTransitionEnd?.();\n ctx.transitionProps?.onEntered?.();\n }}\n {...transitionProps}\n >\n {(transitionStyles) => (\n <div\n {...innerProps}\n className={cx({ [classes.inner]: !ctx.unstyled }, innerProps.className)}\n >\n <FocusTrap active={ctx.opened && ctx.trapFocus} innerRef={ref}>\n <Paper\n {...others}\n component=\"section\"\n role=\"dialog\"\n tabIndex={-1}\n aria-modal\n aria-describedby={ctx.bodyMounted ? ctx.getBodyId() : undefined}\n aria-labelledby={ctx.titleMounted ? ctx.getTitleId() : undefined}\n style={[style, transitionStyles]}\n className={cx({ [classes.content]: !ctx.unstyled }, className)}\n unstyled={ctx.unstyled}\n >\n {others.children}\n </Paper>\n </FocusTrap>\n </div>\n )}\n </Transition>\n );\n}\n\nModalBaseContent.displayName = '@mantine/core/ModalBaseContent';\n"],"mappings":";;;;;;;;;;;AAuBA,SAAgB,iBAAiB,EAC/B,iBACA,WACA,YACA,WACA,OACA,KACA,GAAG,UACsB;CACzB,MAAM,MAAMA,0BAAAA,oBAAoB;CAEhC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;EACE,SAAS,IAAI;EACb,YAAW;EACX,GAAI,IAAI;EACR,gBAAgB;GACd,IAAI,sBAAsB;GAC1B,IAAI,iBAAiB,WAAW;EAClC;EACA,iBAAiB;GACf,IAAI,uBAAuB;GAC3B,IAAI,iBAAiB,YAAY;EACnC;EACA,GAAI;EAEF,WAAA,qBACA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACJ,YAAA,GAAWC,KAAAA,QAAAA,CAAG,GAAGC,yBAAAA,QAAQ,QAAQ,CAAC,IAAI,SAAS,GAAG,WAAW,SAAS;GAEtE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;IAAW,QAAQ,IAAI,UAAU,IAAI;IAAW,UAAU;IACxD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;KACE,GAAI;KACJ,WAAU;KACV,MAAK;KACL,UAAU;KACV,cAAA;KACA,oBAAkB,IAAI,cAAc,IAAI,UAAU,IAAI,KAAA;KACtD,mBAAiB,IAAI,eAAe,IAAI,WAAW,IAAI,KAAA;KACvD,OAAO,CAAC,OAAO,gBAAgB;KAC/B,YAAA,GAAWH,KAAAA,QAAAA,CAAG,GAAGC,yBAAAA,QAAQ,UAAU,CAAC,IAAI,SAAS,GAAG,SAAS;KAC7D,UAAU,IAAI;KAEb,UAAA,OAAO;IACH,CAAA;GACE,CAAA;EACR,CAAA;CAEG,CAAA;AAEhB;AAEA,iBAAiB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBaseHeader.cjs","names":["useModalBaseContext","Box","classes"],"sources":["../../../src/components/ModalBase/ModalBaseHeader.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Box, BoxProps, ElementProps } from '../../core';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseHeaderProps extends BoxProps, ElementProps<'header'> {}\n\nexport function ModalBaseHeader({ className, ...others }: ModalBaseHeaderProps) {\n const ctx = useModalBaseContext();\n return (\n <Box\n component=\"header\"\n className={cx({ [classes.header]: !ctx.unstyled }, className)}\n {...others}\n />\n );\n}\n\nModalBaseHeader.displayName = '@mantine/core/ModalBaseHeader';\n"],"mappings":";;;;;;;;;AAOA,SAAgB,gBAAgB,EAAE,WAAW,GAAG,UAAgC;CAC9E,MAAM,MAAMA,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,WAAU;EACV,YAAA,GAAA,KAAA,QAAA,CAAc,GAAGC,yBAAAA,QAAQ,SAAS,CAAC,IAAI,SAAS,GAAG,SAAS;EAC5D,GAAI;CACL,CAAA;AAEL;AAEA,gBAAgB,cAAc"}
1
+ {"version":3,"file":"ModalBaseHeader.cjs","names":["useModalBaseContext","Box","cx","classes"],"sources":["../../../src/components/ModalBase/ModalBaseHeader.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Box, BoxProps, ElementProps } from '../../core';\nimport { useModalBaseContext } from './ModalBase.context';\nimport classes from './ModalBase.module.css';\n\nexport interface ModalBaseHeaderProps extends BoxProps, ElementProps<'header'> {}\n\nexport function ModalBaseHeader({ className, ...others }: ModalBaseHeaderProps) {\n const ctx = useModalBaseContext();\n return (\n <Box\n component=\"header\"\n className={cx({ [classes.header]: !ctx.unstyled }, className)}\n {...others}\n />\n );\n}\n\nModalBaseHeader.displayName = '@mantine/core/ModalBaseHeader';\n"],"mappings":";;;;;;;;;AAOA,SAAgB,gBAAgB,EAAE,WAAW,GAAG,UAAgC;CAC9E,MAAM,MAAMA,0BAAAA,oBAAoB;CAChC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,WAAU;EACV,YAAA,GAAWC,KAAAA,QAAAA,CAAG,GAAGC,yBAAAA,QAAQ,SAAS,CAAC,IAAI,SAAS,GAAG,SAAS;EAC5D,GAAI;CACL,CAAA;AAEL;AAEA,gBAAgB,cAAc"}