@mantine/core 9.3.2 → 9.4.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 (828) hide show
  1. package/cjs/components/Accordion/Accordion.cjs +1 -0
  2. package/cjs/components/Accordion/Accordion.cjs.map +1 -1
  3. package/cjs/components/Accordion/Accordion.context.cjs.map +1 -1
  4. package/cjs/components/Accordion/AccordionChevron.cjs.map +1 -1
  5. package/cjs/components/Accordion/AccordionControl/AccordionControl.cjs.map +1 -1
  6. package/cjs/components/Accordion/AccordionItem/AccordionItem.cjs.map +1 -1
  7. package/cjs/components/Accordion/AccordionItem.context.cjs.map +1 -1
  8. package/cjs/components/Accordion/AccordionPanel/AccordionPanel.cjs.map +1 -1
  9. package/cjs/components/ActionIcon/ActionIcon.cjs +1 -0
  10. package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
  11. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs +1 -1
  12. package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs.map +1 -1
  13. package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs.map +1 -1
  14. package/cjs/components/Affix/Affix.cjs.map +1 -1
  15. package/cjs/components/Alert/Alert.cjs.map +1 -1
  16. package/cjs/components/Anchor/Anchor.cjs.map +1 -1
  17. package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
  18. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  19. package/cjs/components/AppShell/AppShell.context.cjs.map +1 -1
  20. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
  21. package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs.map +1 -1
  22. package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs.map +1 -1
  23. package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs.map +1 -1
  24. package/cjs/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.cjs.map +1 -1
  25. package/cjs/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.cjs.map +1 -1
  26. package/cjs/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.cjs.map +1 -1
  27. package/cjs/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.cjs.map +1 -1
  28. package/cjs/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.cjs.map +1 -1
  29. package/cjs/components/AppShell/AppShellMediaStyles/assign-padding-variables/assign-padding-variables.cjs.map +1 -1
  30. package/cjs/components/AppShell/AppShellMediaStyles/get-variables/get-variables.cjs.map +1 -1
  31. package/cjs/components/AppShell/AppShellMediaStyles/is-primitive-size/is-primitive-size.cjs.map +1 -1
  32. package/cjs/components/AppShell/AppShellMediaStyles/is-responsive-size/is-responsive-size.cjs.map +1 -1
  33. package/cjs/components/AppShell/AppShellNavbar/AppShellNavbar.cjs.map +1 -1
  34. package/cjs/components/AppShell/AppShellSection/AppShellSection.cjs.map +1 -1
  35. package/cjs/components/AppShell/use-resizing/use-resizing.cjs.map +1 -1
  36. package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
  37. package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  38. package/cjs/components/Avatar/Avatar.cjs.map +1 -1
  39. package/cjs/components/Avatar/AvatarGroup/AvatarGroup.cjs.map +1 -1
  40. package/cjs/components/Avatar/AvatarPlaceholderIcon.cjs.map +1 -1
  41. package/cjs/components/Avatar/get-initials/get-initials.cjs.map +1 -1
  42. package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
  43. package/cjs/components/Badge/Badge.cjs.map +1 -1
  44. package/cjs/components/Blockquote/Blockquote.cjs.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.map +1 -1
  49. package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs.map +1 -1
  50. package/cjs/components/Card/Card.cjs.map +1 -1
  51. package/cjs/components/Card/Card.context.cjs.map +1 -1
  52. package/cjs/components/Card/CardSection/CardSection.cjs.map +1 -1
  53. package/cjs/components/Center/Center.cjs.map +1 -1
  54. package/cjs/components/Checkbox/CheckIcon.cjs.map +1 -1
  55. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  56. package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs.map +1 -1
  57. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  58. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs.map +1 -1
  59. package/cjs/components/Chip/Chip.cjs.map +1 -1
  60. package/cjs/components/Chip/ChipGroup/ChipGroup.cjs.map +1 -1
  61. package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
  62. package/cjs/components/CloseButton/CloseIcon.cjs.map +1 -1
  63. package/cjs/components/Code/Code.cjs.map +1 -1
  64. package/cjs/components/Collapse/Collapse.cjs.map +1 -1
  65. package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
  66. package/cjs/components/ColorInput/EyeDropperIcon.cjs.map +1 -1
  67. package/cjs/components/ColorPicker/AlphaSlider/AlphaSlider.cjs.map +1 -1
  68. package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  69. package/cjs/components/ColorPicker/ColorPicker.context.cjs.map +1 -1
  70. package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs.map +1 -1
  71. package/cjs/components/ColorPicker/HueSlider/HueSlider.cjs.map +1 -1
  72. package/cjs/components/ColorPicker/Saturation/Saturation.cjs.map +1 -1
  73. package/cjs/components/ColorPicker/Swatches/Swatches.cjs.map +1 -1
  74. package/cjs/components/ColorPicker/Thumb/Thumb.cjs.map +1 -1
  75. package/cjs/components/ColorPicker/converters/converters.cjs.map +1 -1
  76. package/cjs/components/ColorPicker/converters/parsers.cjs.map +1 -1
  77. package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
  78. package/cjs/components/Combobox/Combobox.cjs.map +1 -1
  79. package/cjs/components/Combobox/Combobox.context.cjs.map +1 -1
  80. package/cjs/components/Combobox/ComboboxChevron/ComboboxChevron.cjs.map +1 -1
  81. package/cjs/components/Combobox/ComboboxClearButton/ComboboxClearButton.cjs.map +1 -1
  82. package/cjs/components/Combobox/ComboboxDropdown/ComboboxDropdown.cjs.map +1 -1
  83. package/cjs/components/Combobox/ComboboxDropdownTarget/ComboboxDropdownTarget.cjs.map +1 -1
  84. package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs.map +1 -1
  85. package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs.map +1 -1
  86. package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs.map +1 -1
  87. package/cjs/components/Combobox/ComboboxGroup/ComboboxGroup.cjs +3 -2
  88. package/cjs/components/Combobox/ComboboxGroup/ComboboxGroup.cjs.map +1 -1
  89. package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs.map +1 -1
  90. package/cjs/components/Combobox/ComboboxHiddenInput/ComboboxHiddenInput.cjs.map +1 -1
  91. package/cjs/components/Combobox/ComboboxOption/ComboboxOption.cjs.map +1 -1
  92. package/cjs/components/Combobox/ComboboxOptions/ComboboxOptions.cjs.map +1 -1
  93. package/cjs/components/Combobox/ComboboxSearch/ComboboxSearch.cjs.map +1 -1
  94. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
  95. package/cjs/components/Combobox/OptionsDropdown/OptionsDropdown.cjs +2 -2
  96. package/cjs/components/Combobox/OptionsDropdown/OptionsDropdown.cjs.map +1 -1
  97. package/cjs/components/Combobox/OptionsDropdown/default-options-filter.cjs.map +1 -1
  98. package/cjs/components/Combobox/use-combobox/get-index/get-index.cjs.map +1 -1
  99. package/cjs/components/Combobox/use-combobox/use-combobox.cjs.map +1 -1
  100. package/cjs/components/Combobox/use-combobox/use-virtualized-combobox.cjs.map +1 -1
  101. package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
  102. package/cjs/components/Combobox/use-pills-reorder/use-pills-reorder.cjs.map +1 -1
  103. package/cjs/components/ComboboxPopover/ComboboxPopover.cjs +218 -0
  104. package/cjs/components/ComboboxPopover/ComboboxPopover.cjs.map +1 -0
  105. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs +45 -0
  106. package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs.map +1 -0
  107. package/cjs/components/Container/Container.cjs.map +1 -1
  108. package/cjs/components/CopyButton/CopyButton.cjs.map +1 -1
  109. package/cjs/components/DataList/DataList.cjs +61 -0
  110. package/cjs/components/DataList/DataList.cjs.map +1 -0
  111. package/cjs/components/DataList/DataList.context.cjs +8 -0
  112. package/cjs/components/DataList/DataList.context.cjs.map +1 -0
  113. package/cjs/components/DataList/DataList.module.cjs +12 -0
  114. package/cjs/components/DataList/DataList.module.cjs.map +1 -0
  115. package/cjs/components/DataList/DataListItem/DataListItem.cjs +32 -0
  116. package/cjs/components/DataList/DataListItem/DataListItem.cjs.map +1 -0
  117. package/cjs/components/DataList/DataListItemLabel/DataListItemLabel.cjs +33 -0
  118. package/cjs/components/DataList/DataListItemLabel/DataListItemLabel.cjs.map +1 -0
  119. package/cjs/components/DataList/DataListItemValue/DataListItemValue.cjs +33 -0
  120. package/cjs/components/DataList/DataListItemValue/DataListItemValue.cjs.map +1 -0
  121. package/cjs/components/Dialog/Dialog.cjs.map +1 -1
  122. package/cjs/components/Divider/Divider.cjs.map +1 -1
  123. package/cjs/components/Drawer/Drawer.cjs.map +1 -1
  124. package/cjs/components/Drawer/Drawer.context.cjs.map +1 -1
  125. package/cjs/components/Drawer/DrawerBody.cjs.map +1 -1
  126. package/cjs/components/Drawer/DrawerCloseButton.cjs.map +1 -1
  127. package/cjs/components/Drawer/DrawerContent.cjs.map +1 -1
  128. package/cjs/components/Drawer/DrawerHeader.cjs.map +1 -1
  129. package/cjs/components/Drawer/DrawerOverlay.cjs.map +1 -1
  130. package/cjs/components/Drawer/DrawerRoot.cjs.map +1 -1
  131. package/cjs/components/Drawer/DrawerStack.cjs.map +1 -1
  132. package/cjs/components/Drawer/DrawerTitle.cjs.map +1 -1
  133. package/cjs/components/EmptyState/EmptyState.cjs +102 -0
  134. package/cjs/components/EmptyState/EmptyState.cjs.map +1 -0
  135. package/cjs/components/EmptyState/EmptyState.context.cjs +8 -0
  136. package/cjs/components/EmptyState/EmptyState.context.cjs.map +1 -0
  137. package/cjs/components/EmptyState/EmptyState.module.cjs +14 -0
  138. package/cjs/components/EmptyState/EmptyState.module.cjs.map +1 -0
  139. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs +28 -0
  140. package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs.map +1 -0
  141. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs +29 -0
  142. package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs.map +1 -0
  143. package/cjs/components/EmptyState/EmptyStateIndicator/EmptyStateIndicator.cjs +29 -0
  144. package/cjs/components/EmptyState/EmptyStateIndicator/EmptyStateIndicator.cjs.map +1 -0
  145. package/cjs/components/EmptyState/EmptyStateTitle/EmptyStateTitle.cjs +30 -0
  146. package/cjs/components/EmptyState/EmptyStateTitle/EmptyStateTitle.cjs.map +1 -0
  147. package/cjs/components/Fieldset/Fieldset.cjs.map +1 -1
  148. package/cjs/components/FileButton/FileButton.cjs.map +1 -1
  149. package/cjs/components/FileInput/FileInput.cjs.map +1 -1
  150. package/cjs/components/Flex/Flex.cjs.map +1 -1
  151. package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
  152. package/cjs/components/FloatingIndicator/use-floating-indicator.cjs.map +1 -1
  153. package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
  154. package/cjs/components/FocusTrap/FocusTrap.cjs.map +1 -1
  155. package/cjs/components/Grid/Grid.cjs.map +1 -1
  156. package/cjs/components/Grid/Grid.context.cjs.map +1 -1
  157. package/cjs/components/Grid/GridCol/GridCol.cjs.map +1 -1
  158. package/cjs/components/Grid/GridCol/GridColVariables.cjs.map +1 -1
  159. package/cjs/components/Grid/GridVariables.cjs.map +1 -1
  160. package/cjs/components/Group/Group.cjs.map +1 -1
  161. package/cjs/components/Group/filter-falsy-children/filter-falsy-children.cjs.map +1 -1
  162. package/cjs/components/Highlight/Highlight.cjs.map +1 -1
  163. package/cjs/components/Highlight/highlighter/highlighter.cjs.map +1 -1
  164. package/cjs/components/HoverCard/HoverCard.cjs.map +1 -1
  165. package/cjs/components/HoverCard/HoverCard.context.cjs.map +1 -1
  166. package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs.map +1 -1
  167. package/cjs/components/HoverCard/HoverCardGroup/HoverCardGroup.cjs.map +1 -1
  168. package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs.map +1 -1
  169. package/cjs/components/HoverCard/use-hover-card.cjs.map +1 -1
  170. package/cjs/components/Image/Image.cjs.map +1 -1
  171. package/cjs/components/Indicator/Indicator.cjs.map +1 -1
  172. package/cjs/components/Input/Input.cjs +7 -2
  173. package/cjs/components/Input/Input.cjs.map +1 -1
  174. package/cjs/components/Input/Input.context.cjs.map +1 -1
  175. package/cjs/components/Input/Input.module.cjs +1 -0
  176. package/cjs/components/Input/Input.module.cjs.map +1 -1
  177. package/cjs/components/Input/InputClearButton/InputClearButton.cjs.map +1 -1
  178. package/cjs/components/Input/InputClearSection/InputClearSection.cjs.map +1 -1
  179. package/cjs/components/Input/InputDescription/InputDescription.cjs.map +1 -1
  180. package/cjs/components/Input/InputError/InputError.cjs.map +1 -1
  181. package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
  182. package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs.map +1 -1
  183. package/cjs/components/Input/InputSuccess/InputSuccess.cjs +48 -0
  184. package/cjs/components/Input/InputSuccess/InputSuccess.cjs.map +1 -0
  185. package/cjs/components/Input/InputWrapper/InputWrapper.cjs +22 -5
  186. package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
  187. package/cjs/components/Input/InputWrapper.context.cjs.map +1 -1
  188. package/cjs/components/Input/use-input-props.cjs +4 -1
  189. package/cjs/components/Input/use-input-props.cjs.map +1 -1
  190. package/cjs/components/InputBase/InputBase.cjs.map +1 -1
  191. package/cjs/components/JsonInput/JsonInput.cjs.map +1 -1
  192. package/cjs/components/JsonInput/validate-json/validate-json.cjs.map +1 -1
  193. package/cjs/components/Kbd/Kbd.cjs.map +1 -1
  194. package/cjs/components/List/List.cjs.map +1 -1
  195. package/cjs/components/List/List.context.cjs.map +1 -1
  196. package/cjs/components/List/ListItem/ListItem.cjs.map +1 -1
  197. package/cjs/components/Loader/Loader.cjs.map +1 -1
  198. package/cjs/components/Loader/loaders/Bars.cjs.map +1 -1
  199. package/cjs/components/Loader/loaders/Dots.cjs.map +1 -1
  200. package/cjs/components/Loader/loaders/Oval.cjs.map +1 -1
  201. package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
  202. package/cjs/components/Mark/Mark.cjs.map +1 -1
  203. package/cjs/components/Marquee/Marquee.cjs.map +1 -1
  204. package/cjs/components/MaskInput/MaskInput.cjs.map +1 -1
  205. package/cjs/components/MaskInput/use-mask-input-props.cjs.map +1 -1
  206. package/cjs/components/Menu/Menu.cjs.map +1 -1
  207. package/cjs/components/Menu/Menu.context.cjs.map +1 -1
  208. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs.map +1 -1
  209. package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.context.cjs.map +1 -1
  210. package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs.map +1 -1
  211. package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs.map +1 -1
  212. package/cjs/components/Menu/MenuDivider/MenuDivider.cjs.map +1 -1
  213. package/cjs/components/Menu/MenuDropdown/MenuDropdown.cjs.map +1 -1
  214. package/cjs/components/Menu/MenuItem/MenuItem.cjs.map +1 -1
  215. package/cjs/components/Menu/MenuLabel/MenuLabel.cjs.map +1 -1
  216. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.cjs.map +1 -1
  217. package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.context.cjs.map +1 -1
  218. package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs.map +1 -1
  219. package/cjs/components/Menu/MenuSearch/MenuSearch.cjs.map +1 -1
  220. package/cjs/components/Menu/MenuSelectableItem/MenuSelectableItem.cjs.map +1 -1
  221. package/cjs/components/Menu/MenuSub/MenuSub.cjs.map +1 -1
  222. package/cjs/components/Menu/MenuSub/MenuSub.context.cjs.map +1 -1
  223. package/cjs/components/Menu/MenuSubDropdown/MenuSubDropdown.cjs.map +1 -1
  224. package/cjs/components/Menu/MenuSubItem/MenuSubItem.cjs.map +1 -1
  225. package/cjs/components/Menu/MenuSubTarget/MenuSubTarget.cjs.map +1 -1
  226. package/cjs/components/Menu/MenuTarget/MenuTarget.cjs.map +1 -1
  227. package/cjs/components/Menu/use-menu-type-ahead.cjs.map +1 -1
  228. package/cjs/components/Menubar/Menubar.cjs +146 -0
  229. package/cjs/components/Menubar/Menubar.cjs.map +1 -0
  230. package/cjs/components/Menubar/Menubar.context.cjs +12 -0
  231. package/cjs/components/Menubar/Menubar.context.cjs.map +1 -0
  232. package/cjs/components/Menubar/Menubar.module.cjs +10 -0
  233. package/cjs/components/Menubar/Menubar.module.cjs.map +1 -0
  234. package/cjs/components/Menubar/MenubarDropdown/MenubarDropdown.cjs +61 -0
  235. package/cjs/components/Menubar/MenubarDropdown/MenubarDropdown.cjs.map +1 -0
  236. package/cjs/components/Menubar/MenubarMenu/MenubarMenu.cjs +59 -0
  237. package/cjs/components/Menubar/MenubarMenu/MenubarMenu.cjs.map +1 -0
  238. package/cjs/components/Menubar/MenubarTarget/MenubarTarget.cjs +143 -0
  239. package/cjs/components/Menubar/MenubarTarget/MenubarTarget.cjs.map +1 -0
  240. package/cjs/components/Modal/Modal.cjs.map +1 -1
  241. package/cjs/components/Modal/Modal.context.cjs.map +1 -1
  242. package/cjs/components/Modal/ModalBody.cjs.map +1 -1
  243. package/cjs/components/Modal/ModalCloseButton.cjs.map +1 -1
  244. package/cjs/components/Modal/ModalContent.cjs.map +1 -1
  245. package/cjs/components/Modal/ModalHeader.cjs.map +1 -1
  246. package/cjs/components/Modal/ModalOverlay.cjs.map +1 -1
  247. package/cjs/components/Modal/ModalRoot.cjs.map +1 -1
  248. package/cjs/components/Modal/ModalStack.cjs.map +1 -1
  249. package/cjs/components/Modal/ModalTitle.cjs.map +1 -1
  250. package/cjs/components/Modal/use-modals-stack.cjs.map +1 -1
  251. package/cjs/components/ModalBase/ModalBase.cjs.map +1 -1
  252. package/cjs/components/ModalBase/ModalBase.context.cjs.map +1 -1
  253. package/cjs/components/ModalBase/ModalBaseBody.cjs.map +1 -1
  254. package/cjs/components/ModalBase/ModalBaseCloseButton.cjs.map +1 -1
  255. package/cjs/components/ModalBase/ModalBaseContent.cjs.map +1 -1
  256. package/cjs/components/ModalBase/ModalBaseHeader.cjs.map +1 -1
  257. package/cjs/components/ModalBase/ModalBaseOverlay.cjs.map +1 -1
  258. package/cjs/components/ModalBase/ModalBaseTitle.cjs.map +1 -1
  259. package/cjs/components/ModalBase/NativeScrollArea.cjs.map +1 -1
  260. package/cjs/components/ModalBase/use-lock-scroll.cjs.map +1 -1
  261. package/cjs/components/ModalBase/use-modal-body-id.cjs.map +1 -1
  262. package/cjs/components/ModalBase/use-modal-title-id.cjs.map +1 -1
  263. package/cjs/components/ModalBase/use-modal.cjs.map +1 -1
  264. package/cjs/components/MultiSelect/MultiSelect.cjs +4 -1
  265. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  266. package/cjs/components/MultiSelect/filter-picked-values.cjs.map +1 -1
  267. package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
  268. package/cjs/components/NativeSelect/NativeSelectOption.cjs.map +1 -1
  269. package/cjs/components/NavLink/NavLink.cjs.map +1 -1
  270. package/cjs/components/Notification/Notification.cjs.map +1 -1
  271. package/cjs/components/NumberFormatter/NumberFormatter.cjs.map +1 -1
  272. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  273. package/cjs/components/NumberInput/NumberInputChevron.cjs.map +1 -1
  274. package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
  275. package/cjs/components/OverflowList/get-row-position-data.cjs.map +1 -1
  276. package/cjs/components/OverflowList/use-dimensions.cjs.map +1 -1
  277. package/cjs/components/Overlay/Overlay.cjs.map +1 -1
  278. package/cjs/components/Pagination/Pagination.cjs.map +1 -1
  279. package/cjs/components/Pagination/Pagination.context.cjs.map +1 -1
  280. package/cjs/components/Pagination/Pagination.icons.cjs.map +1 -1
  281. package/cjs/components/Pagination/PaginationControl/PaginationControl.cjs.map +1 -1
  282. package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs.map +1 -1
  283. package/cjs/components/Pagination/PaginationEdges/PaginationEdges.cjs.map +1 -1
  284. package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs.map +1 -1
  285. package/cjs/components/Pagination/PaginationLabel/PaginationLabel.cjs.map +1 -1
  286. package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs.map +1 -1
  287. package/cjs/components/Paper/Paper.cjs.map +1 -1
  288. package/cjs/components/PasswordInput/PasswordInput.cjs +11 -2
  289. package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
  290. package/cjs/components/PasswordInput/PasswordToggleIcon.cjs.map +1 -1
  291. package/cjs/components/Pill/Pill.cjs.map +1 -1
  292. package/cjs/components/Pill/PillGroup/PillGroup.cjs.map +1 -1
  293. package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
  294. package/cjs/components/PillsInput/PillsInput.context.cjs.map +1 -1
  295. package/cjs/components/PillsInput/PillsInputField/PillsInputField.cjs.map +1 -1
  296. package/cjs/components/PinInput/PinInput.cjs +2 -1
  297. package/cjs/components/PinInput/PinInput.cjs.map +1 -1
  298. package/cjs/components/PinInput/create-pin-array/create-pin-array.cjs.map +1 -1
  299. package/cjs/components/Popover/Popover.cjs.map +1 -1
  300. package/cjs/components/Popover/Popover.context.cjs.map +1 -1
  301. package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs.map +1 -1
  302. package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
  303. package/cjs/components/Popover/PopoverTarget/PopoverTarget.cjs.map +1 -1
  304. package/cjs/components/Popover/use-popover.cjs.map +1 -1
  305. package/cjs/components/Portal/OptionalPortal.cjs.map +1 -1
  306. package/cjs/components/Portal/Portal.cjs.map +1 -1
  307. package/cjs/components/Progress/Progress.cjs.map +1 -1
  308. package/cjs/components/Progress/Progress.context.cjs.map +1 -1
  309. package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs.map +1 -1
  310. package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs.map +1 -1
  311. package/cjs/components/Progress/ProgressSection/ProgressSection.cjs.map +1 -1
  312. package/cjs/components/Radio/Radio.cjs.map +1 -1
  313. package/cjs/components/Radio/RadioCard/RadioCard.cjs.map +1 -1
  314. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
  315. package/cjs/components/Radio/RadioIcon.cjs.map +1 -1
  316. package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs.map +1 -1
  317. package/cjs/components/Rating/Rating.cjs.map +1 -1
  318. package/cjs/components/Rating/Rating.context.cjs.map +1 -1
  319. package/cjs/components/Rating/RatingItem/RatingItem.cjs.map +1 -1
  320. package/cjs/components/Rating/StarSymbol/StarIcon.cjs.map +1 -1
  321. package/cjs/components/Rating/StarSymbol/StarSymbol.cjs.map +1 -1
  322. package/cjs/components/RingProgress/Curve/Curve.cjs.map +1 -1
  323. package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
  324. package/cjs/components/RingProgress/get-curves/get-curves.cjs.map +1 -1
  325. package/cjs/components/RollingNumber/DigitColumn.cjs.map +1 -1
  326. package/cjs/components/RollingNumber/RollingNumber.cjs.map +1 -1
  327. package/cjs/components/RollingNumber/get-digit-parts.cjs.map +1 -1
  328. package/cjs/components/RollingNumber/get-render-slots.cjs.map +1 -1
  329. package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
  330. package/cjs/components/ScrollArea/ScrollArea.context.cjs.map +1 -1
  331. package/cjs/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.cjs.map +1 -1
  332. package/cjs/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.cjs.map +1 -1
  333. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.cjs.map +1 -1
  334. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.cjs.map +1 -1
  335. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.cjs.map +1 -1
  336. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.cjs.map +1 -1
  337. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.cjs.map +1 -1
  338. package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.cjs.map +1 -1
  339. package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.context.cjs.map +1 -1
  340. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.cjs.map +1 -1
  341. package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.cjs.map +1 -1
  342. package/cjs/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.cjs.map +1 -1
  343. package/cjs/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.cjs +1 -0
  344. package/cjs/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.cjs.map +1 -1
  345. package/cjs/components/ScrollArea/use-resize-observer.cjs.map +1 -1
  346. package/cjs/components/ScrollArea/utils/add-unlinked-scroll-listener.cjs.map +1 -1
  347. package/cjs/components/ScrollArea/utils/get-scroll-position-from-pointer.cjs.map +1 -1
  348. package/cjs/components/ScrollArea/utils/get-thumb-offset-from-scroll.cjs.map +1 -1
  349. package/cjs/components/Scroller/Scroller.cjs.map +1 -1
  350. package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  351. package/cjs/components/Select/Select.cjs.map +1 -1
  352. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs +4 -1
  353. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
  354. package/cjs/components/SemiCircleProgress/SemiCircleProgress.module.cjs.map +1 -1
  355. package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
  356. package/cjs/components/SimpleGrid/SimpleGridVariables.cjs.map +1 -1
  357. package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
  358. package/cjs/components/Slider/Marks/Marks.cjs.map +1 -1
  359. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
  360. package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
  361. package/cjs/components/Slider/Slider.context.cjs.map +1 -1
  362. package/cjs/components/Slider/SliderRoot/SliderRoot.cjs.map +1 -1
  363. package/cjs/components/Slider/Thumb/Thumb.cjs.map +1 -1
  364. package/cjs/components/Slider/Track/Track.cjs.map +1 -1
  365. package/cjs/components/Slider/utils/get-precision/get-precision.cjs.map +1 -1
  366. package/cjs/components/Slider/utils/get-step-mark-value/get-step-mark-value.cjs.map +1 -1
  367. package/cjs/components/Space/Space.cjs.map +1 -1
  368. package/cjs/components/Splitter/GripIcon.cjs.map +1 -1
  369. package/cjs/components/Splitter/Splitter.cjs +22 -1
  370. package/cjs/components/Splitter/Splitter.cjs.map +1 -1
  371. package/cjs/components/Splitter/Splitter.context.cjs.map +1 -1
  372. package/cjs/components/Splitter/SplitterPane/SplitterPane.cjs +1 -2
  373. package/cjs/components/Splitter/SplitterPane/SplitterPane.cjs.map +1 -1
  374. package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
  375. package/cjs/components/Stack/Stack.cjs.map +1 -1
  376. package/cjs/components/Stepper/Stepper.cjs.map +1 -1
  377. package/cjs/components/Stepper/Stepper.context.cjs.map +1 -1
  378. package/cjs/components/Stepper/StepperStep/StepperStep.cjs.map +1 -1
  379. package/cjs/components/Switch/Switch.cjs.map +1 -1
  380. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
  381. package/cjs/components/Table/Table.cjs.map +1 -1
  382. package/cjs/components/Table/Table.components.cjs.map +1 -1
  383. package/cjs/components/Table/Table.context.cjs.map +1 -1
  384. package/cjs/components/Table/TableDataRenderer.cjs.map +1 -1
  385. package/cjs/components/Table/TableScrollContainer.cjs.map +1 -1
  386. package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
  387. package/cjs/components/Tabs/Tabs.cjs +16 -1
  388. package/cjs/components/Tabs/Tabs.cjs.map +1 -1
  389. package/cjs/components/Tabs/Tabs.context.cjs.map +1 -1
  390. package/cjs/components/Tabs/TabsList/TabsList.cjs.map +1 -1
  391. package/cjs/components/Tabs/TabsPanel/TabsPanel.cjs +6 -0
  392. package/cjs/components/Tabs/TabsPanel/TabsPanel.cjs.map +1 -1
  393. package/cjs/components/Tabs/TabsTab/TabsTab.cjs +1 -1
  394. package/cjs/components/Tabs/TabsTab/TabsTab.cjs.map +1 -1
  395. package/cjs/components/TagsInput/TagsInput.cjs +4 -1
  396. package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
  397. package/cjs/components/TagsInput/filter-picked-tags.cjs.map +1 -1
  398. package/cjs/components/TagsInput/get-splitted-tags.cjs.map +1 -1
  399. package/cjs/components/Text/Text.cjs.map +1 -1
  400. package/cjs/components/TextInput/TextInput.cjs.map +1 -1
  401. package/cjs/components/Textarea/Autosize.cjs.map +1 -1
  402. package/cjs/components/Textarea/Textarea.cjs.map +1 -1
  403. package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
  404. package/cjs/components/Timeline/Timeline.cjs.map +1 -1
  405. package/cjs/components/Timeline/Timeline.context.cjs.map +1 -1
  406. package/cjs/components/Timeline/TimelineItem/TimelineItem.cjs.map +1 -1
  407. package/cjs/components/Title/Title.cjs.map +1 -1
  408. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  409. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs.map +1 -1
  410. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs.map +1 -1
  411. package/cjs/components/Tooltip/TooltipGroup/TooltipGroup.cjs.map +1 -1
  412. package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
  413. package/cjs/components/Transition/Transition.cjs.map +1 -1
  414. package/cjs/components/Transition/get-transition-styles/get-transition-styles.cjs.map +1 -1
  415. package/cjs/components/Transition/use-transition.cjs.map +1 -1
  416. package/cjs/components/Tree/FlatTreeNode.cjs.map +1 -1
  417. package/cjs/components/Tree/Tree.cjs.map +1 -1
  418. package/cjs/components/Tree/TreeNode.cjs.map +1 -1
  419. package/cjs/components/Tree/filter-tree-data/filter-tree-data.cjs.map +1 -1
  420. package/cjs/components/Tree/is-node-checked/is-node-checked.cjs.map +1 -1
  421. package/cjs/components/Tree/is-node-indeterminate/is-node-indeterminate.cjs.map +1 -1
  422. package/cjs/components/Tree/use-tree-node-drag-drop.cjs.map +1 -1
  423. package/cjs/components/Tree/use-tree.cjs.map +1 -1
  424. package/cjs/components/TreeSelect/TreeSelect.cjs +7 -1
  425. package/cjs/components/TreeSelect/TreeSelect.cjs.map +1 -1
  426. package/cjs/components/TreeSelect/TreeSelectOption.cjs.map +1 -1
  427. package/cjs/components/TreeSelect/get-checked-values-by-strategy.cjs.map +1 -1
  428. package/cjs/components/Typography/Typography.cjs.map +1 -1
  429. package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
  430. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  431. package/cjs/core/Box/Box.cjs.map +1 -1
  432. package/cjs/core/Box/get-box-mod/get-box-mod.cjs.map +1 -1
  433. package/cjs/core/Box/get-box-style/get-box-style.cjs.map +1 -1
  434. package/cjs/core/Box/get-style-object/get-style-object.cjs.map +1 -1
  435. package/cjs/core/Box/style-props/parse-style-props/parse-style-props.cjs.map +1 -1
  436. package/cjs/core/Box/style-props/parse-style-props/sort-media-queries.cjs.map +1 -1
  437. package/cjs/core/Box/style-props/resolvers/border-resolver/border-resolver.cjs.map +1 -1
  438. package/cjs/core/Box/use-random-classname/use-random-classname.cjs.map +1 -1
  439. package/cjs/core/DirectionProvider/DirectionProvider.cjs.map +1 -1
  440. package/cjs/core/InlineStyles/InlineStyles.cjs.map +1 -1
  441. package/cjs/core/InlineStyles/css-object-to-string/css-object-to-string.cjs.map +1 -1
  442. package/cjs/core/InlineStyles/hash-styles.cjs.map +1 -1
  443. package/cjs/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.cjs.map +1 -1
  444. package/cjs/core/MantineProvider/Mantine.context.cjs.map +1 -1
  445. package/cjs/core/MantineProvider/MantineClasses/MantineClasses.cjs.map +1 -1
  446. package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs.map +1 -1
  447. package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs +5 -1
  448. package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs.map +1 -1
  449. package/cjs/core/MantineProvider/MantineCssVariables/get-css-color-variables.cjs.map +1 -1
  450. package/cjs/core/MantineProvider/MantineCssVariables/remove-default-variables.cjs.map +1 -1
  451. package/cjs/core/MantineProvider/MantineCssVariables/v8-css-variables-resolver.cjs +3 -1
  452. package/cjs/core/MantineProvider/MantineCssVariables/v8-css-variables-resolver.cjs.map +1 -1
  453. package/cjs/core/MantineProvider/MantineCssVariables/virtual-color/virtual-color.cjs.map +1 -1
  454. package/cjs/core/MantineProvider/MantineProvider.cjs.map +1 -1
  455. package/cjs/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs.map +1 -1
  456. package/cjs/core/MantineProvider/color-functions/colors-tuple/colors-tuple.cjs.map +1 -1
  457. package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs +3 -1
  458. package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs.map +1 -1
  459. package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs +19 -3
  460. package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs.map +1 -1
  461. package/cjs/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.cjs.map +1 -1
  462. package/cjs/core/MantineProvider/color-functions/to-rgba/to-rgba.cjs.map +1 -1
  463. package/cjs/core/MantineProvider/convert-css-variables/convert-css-variables.cjs.map +1 -1
  464. package/cjs/core/MantineProvider/convert-css-variables/css-variables-object-to-string.cjs.map +1 -1
  465. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-computed-color-scheme.cjs.map +1 -1
  466. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs.map +1 -1
  467. package/cjs/core/MantineProvider/use-mantine-color-scheme/use-provider-color-scheme.cjs.map +1 -1
  468. package/cjs/core/MantineProvider/use-props/use-props.cjs.map +1 -1
  469. package/cjs/core/MantineProvider/use-respect-reduce-motion/use-respect-reduce-motion.cjs.map +1 -1
  470. package/cjs/core/factory/factory.cjs.map +1 -1
  471. package/cjs/core/factory/polymorphic-factory.cjs.map +1 -1
  472. package/cjs/core/styles-api/use-styles/get-class-name/get-class-name.cjs.map +1 -1
  473. package/cjs/core/styles-api/use-styles/get-class-name/get-global-class-names/get-global-class-names.cjs.map +1 -1
  474. package/cjs/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.cjs.map +1 -1
  475. package/cjs/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.cjs.map +1 -1
  476. package/cjs/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.cjs.map +1 -1
  477. package/cjs/core/styles-api/use-styles/get-style/get-style.cjs.map +1 -1
  478. package/cjs/core/styles-api/use-styles/get-style/resolve-vars/merge-vars.cjs.map +1 -1
  479. package/cjs/core/styles-api/use-styles/use-styles.cjs.map +1 -1
  480. package/cjs/core/styles-api/use-styles/use-transformed-styles.cjs.map +1 -1
  481. package/cjs/core/utils/create-safe-context/create-safe-context.cjs.map +1 -1
  482. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs +3 -5
  483. package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs.map +1 -1
  484. package/cjs/core/utils/create-use-external-events/create-use-external-events.cjs.map +1 -1
  485. package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -1
  486. package/cjs/core/utils/filter-props/filter-props.cjs.map +1 -1
  487. package/cjs/core/utils/get-context-item-index/get-context-item-index.cjs.map +1 -1
  488. package/cjs/core/utils/get-safe-id/get-safe-id.cjs.map +1 -1
  489. package/cjs/core/utils/is-number-like/is-number-like.cjs.map +1 -1
  490. package/cjs/core/utils/units-converters/px.cjs.map +1 -1
  491. package/cjs/core/utils/units-converters/rem.cjs.map +1 -1
  492. package/cjs/core/utils/use-hovered/use-hovered.cjs.map +1 -1
  493. package/cjs/index.cjs +42 -2
  494. package/cjs/utils/Floating/FloatingArrow/FloatingArrow.cjs.map +1 -1
  495. package/cjs/utils/Floating/use-context-menu-handlers.cjs.map +1 -1
  496. package/cjs/utils/Floating/use-delayed-hover.cjs.map +1 -1
  497. package/cjs/utils/InlineInput/InlineInput.cjs.map +1 -1
  498. package/cjs/utils/InputsGroupFieldset/InputsGroupFieldset.cjs.map +1 -1
  499. package/esm/components/Accordion/Accordion.mjs +1 -0
  500. package/esm/components/Accordion/Accordion.mjs.map +1 -1
  501. package/esm/components/ActionIcon/ActionIcon.mjs +1 -0
  502. package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
  503. package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs +1 -1
  504. package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
  505. package/esm/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.mjs.map +1 -1
  506. package/esm/components/AppShell/AppShellFooter/AppShellFooter.mjs.map +1 -1
  507. package/esm/components/AppShell/AppShellHeader/AppShellHeader.mjs.map +1 -1
  508. package/esm/components/AppShell/AppShellMain/AppShellMain.mjs.map +1 -1
  509. package/esm/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.mjs.map +1 -1
  510. package/esm/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.mjs.map +1 -1
  511. package/esm/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.mjs.map +1 -1
  512. package/esm/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.mjs.map +1 -1
  513. package/esm/components/AppShell/AppShellMediaStyles/assign-padding-variables/assign-padding-variables.mjs.map +1 -1
  514. package/esm/components/AppShell/AppShellMediaStyles/get-variables/get-variables.mjs.map +1 -1
  515. package/esm/components/AppShell/AppShellMediaStyles/is-primitive-size/is-primitive-size.mjs.map +1 -1
  516. package/esm/components/AppShell/AppShellMediaStyles/is-responsive-size/is-responsive-size.mjs.map +1 -1
  517. package/esm/components/AspectRatio/AspectRatio.mjs.map +1 -1
  518. package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
  519. package/esm/components/Avatar/AvatarGroup/AvatarGroup.mjs.map +1 -1
  520. package/esm/components/Avatar/get-initials/get-initials.mjs.map +1 -1
  521. package/esm/components/BackgroundImage/BackgroundImage.mjs.map +1 -1
  522. package/esm/components/Blockquote/Blockquote.mjs.map +1 -1
  523. package/esm/components/Breadcrumbs/Breadcrumbs.mjs.map +1 -1
  524. package/esm/components/Button/ButtonGroup/ButtonGroup.mjs.map +1 -1
  525. package/esm/components/Button/ButtonGroupSection/ButtonGroupSection.mjs.map +1 -1
  526. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  527. package/esm/components/Collapse/Collapse.mjs.map +1 -1
  528. package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
  529. package/esm/components/ColorPicker/ColorSlider/ColorSlider.mjs.map +1 -1
  530. package/esm/components/ColorPicker/converters/converters.mjs.map +1 -1
  531. package/esm/components/ColorPicker/converters/parsers.mjs.map +1 -1
  532. package/esm/components/Combobox/ComboboxEmpty/ComboboxEmpty.mjs.map +1 -1
  533. package/esm/components/Combobox/ComboboxFooter/ComboboxFooter.mjs.map +1 -1
  534. package/esm/components/Combobox/ComboboxGroup/ComboboxGroup.mjs +3 -2
  535. package/esm/components/Combobox/ComboboxGroup/ComboboxGroup.mjs.map +1 -1
  536. package/esm/components/Combobox/ComboboxHeader/ComboboxHeader.mjs.map +1 -1
  537. package/esm/components/Combobox/OptionsDropdown/OptionsDropdown.mjs +2 -2
  538. package/esm/components/Combobox/OptionsDropdown/OptionsDropdown.mjs.map +1 -1
  539. package/esm/components/Combobox/OptionsDropdown/default-options-filter.mjs.map +1 -1
  540. package/esm/components/Combobox/use-combobox/get-index/get-index.mjs.map +1 -1
  541. package/esm/components/Combobox/use-combobox/use-combobox.mjs.map +1 -1
  542. package/esm/components/Combobox/use-pills-reorder/use-pills-reorder.mjs.map +1 -1
  543. package/esm/components/ComboboxPopover/ComboboxPopover.mjs +216 -0
  544. package/esm/components/ComboboxPopover/ComboboxPopover.mjs.map +1 -0
  545. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs +45 -0
  546. package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs.map +1 -0
  547. package/esm/components/DataList/DataList.context.mjs +8 -0
  548. package/esm/components/DataList/DataList.context.mjs.map +1 -0
  549. package/esm/components/DataList/DataList.mjs +61 -0
  550. package/esm/components/DataList/DataList.mjs.map +1 -0
  551. package/esm/components/DataList/DataList.module.mjs +12 -0
  552. package/esm/components/DataList/DataList.module.mjs.map +1 -0
  553. package/esm/components/DataList/DataListItem/DataListItem.mjs +32 -0
  554. package/esm/components/DataList/DataListItem/DataListItem.mjs.map +1 -0
  555. package/esm/components/DataList/DataListItemLabel/DataListItemLabel.mjs +33 -0
  556. package/esm/components/DataList/DataListItemLabel/DataListItemLabel.mjs.map +1 -0
  557. package/esm/components/DataList/DataListItemValue/DataListItemValue.mjs +33 -0
  558. package/esm/components/DataList/DataListItemValue/DataListItemValue.mjs.map +1 -0
  559. package/esm/components/Drawer/DrawerBody.mjs.map +1 -1
  560. package/esm/components/Drawer/DrawerCloseButton.mjs.map +1 -1
  561. package/esm/components/Drawer/DrawerHeader.mjs.map +1 -1
  562. package/esm/components/Drawer/DrawerOverlay.mjs.map +1 -1
  563. package/esm/components/Drawer/DrawerRoot.mjs.map +1 -1
  564. package/esm/components/Drawer/DrawerTitle.mjs.map +1 -1
  565. package/esm/components/EmptyState/EmptyState.context.mjs +8 -0
  566. package/esm/components/EmptyState/EmptyState.context.mjs.map +1 -0
  567. package/esm/components/EmptyState/EmptyState.mjs +102 -0
  568. package/esm/components/EmptyState/EmptyState.mjs.map +1 -0
  569. package/esm/components/EmptyState/EmptyState.module.mjs +14 -0
  570. package/esm/components/EmptyState/EmptyState.module.mjs.map +1 -0
  571. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs +28 -0
  572. package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs.map +1 -0
  573. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs +29 -0
  574. package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs.map +1 -0
  575. package/esm/components/EmptyState/EmptyStateIndicator/EmptyStateIndicator.mjs +29 -0
  576. package/esm/components/EmptyState/EmptyStateIndicator/EmptyStateIndicator.mjs.map +1 -0
  577. package/esm/components/EmptyState/EmptyStateTitle/EmptyStateTitle.mjs +30 -0
  578. package/esm/components/EmptyState/EmptyStateTitle/EmptyStateTitle.mjs.map +1 -0
  579. package/esm/components/FileInput/FileInput.mjs.map +1 -1
  580. package/esm/components/Grid/GridCol/GridColVariables.mjs.map +1 -1
  581. package/esm/components/Grid/GridVariables.mjs.map +1 -1
  582. package/esm/components/Group/Group.mjs.map +1 -1
  583. package/esm/components/Group/filter-falsy-children/filter-falsy-children.mjs.map +1 -1
  584. package/esm/components/Highlight/highlighter/highlighter.mjs.map +1 -1
  585. package/esm/components/HoverCard/HoverCardDropdown/HoverCardDropdown.mjs.map +1 -1
  586. package/esm/components/HoverCard/use-hover-card.mjs.map +1 -1
  587. package/esm/components/Input/Input.mjs +7 -2
  588. package/esm/components/Input/Input.mjs.map +1 -1
  589. package/esm/components/Input/Input.module.mjs +1 -0
  590. package/esm/components/Input/Input.module.mjs.map +1 -1
  591. package/esm/components/Input/InputDescription/InputDescription.mjs.map +1 -1
  592. package/esm/components/Input/InputError/InputError.mjs.map +1 -1
  593. package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs.map +1 -1
  594. package/esm/components/Input/InputSuccess/InputSuccess.mjs +48 -0
  595. package/esm/components/Input/InputSuccess/InputSuccess.mjs.map +1 -0
  596. package/esm/components/Input/InputWrapper/InputWrapper.mjs +22 -5
  597. package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
  598. package/esm/components/Input/use-input-props.mjs +4 -1
  599. package/esm/components/Input/use-input-props.mjs.map +1 -1
  600. package/esm/components/JsonInput/validate-json/validate-json.mjs.map +1 -1
  601. package/esm/components/Kbd/Kbd.mjs.map +1 -1
  602. package/esm/components/Mark/Mark.mjs.map +1 -1
  603. package/esm/components/Marquee/Marquee.mjs.map +1 -1
  604. package/esm/components/Menu/MenuDivider/MenuDivider.mjs.map +1 -1
  605. package/esm/components/Menu/MenuDropdown/MenuDropdown.mjs.map +1 -1
  606. package/esm/components/Menu/MenuItem/MenuItem.mjs.map +1 -1
  607. package/esm/components/Menu/MenuLabel/MenuLabel.mjs.map +1 -1
  608. package/esm/components/Menu/MenuSearch/MenuSearch.mjs.map +1 -1
  609. package/esm/components/Menu/MenuSelectableItem/MenuSelectableItem.mjs.map +1 -1
  610. package/esm/components/Menu/MenuSub/MenuSub.mjs.map +1 -1
  611. package/esm/components/Menu/MenuSubItem/MenuSubItem.mjs.map +1 -1
  612. package/esm/components/Menu/use-menu-type-ahead.mjs.map +1 -1
  613. package/esm/components/Menubar/Menubar.context.mjs +9 -0
  614. package/esm/components/Menubar/Menubar.context.mjs.map +1 -0
  615. package/esm/components/Menubar/Menubar.mjs +146 -0
  616. package/esm/components/Menubar/Menubar.mjs.map +1 -0
  617. package/esm/components/Menubar/Menubar.module.mjs +10 -0
  618. package/esm/components/Menubar/Menubar.module.mjs.map +1 -0
  619. package/esm/components/Menubar/MenubarDropdown/MenubarDropdown.mjs +61 -0
  620. package/esm/components/Menubar/MenubarDropdown/MenubarDropdown.mjs.map +1 -0
  621. package/esm/components/Menubar/MenubarMenu/MenubarMenu.mjs +59 -0
  622. package/esm/components/Menubar/MenubarMenu/MenubarMenu.mjs.map +1 -0
  623. package/esm/components/Menubar/MenubarTarget/MenubarTarget.mjs +143 -0
  624. package/esm/components/Menubar/MenubarTarget/MenubarTarget.mjs.map +1 -0
  625. package/esm/components/Modal/ModalBody.mjs.map +1 -1
  626. package/esm/components/Modal/ModalCloseButton.mjs.map +1 -1
  627. package/esm/components/Modal/ModalHeader.mjs.map +1 -1
  628. package/esm/components/Modal/ModalOverlay.mjs.map +1 -1
  629. package/esm/components/Modal/ModalTitle.mjs.map +1 -1
  630. package/esm/components/ModalBase/ModalBase.mjs.map +1 -1
  631. package/esm/components/MultiSelect/MultiSelect.mjs +4 -1
  632. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  633. package/esm/components/MultiSelect/filter-picked-values.mjs.map +1 -1
  634. package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
  635. package/esm/components/NativeSelect/NativeSelectOption.mjs.map +1 -1
  636. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  637. package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
  638. package/esm/components/OverflowList/get-row-position-data.mjs.map +1 -1
  639. package/esm/components/OverflowList/use-dimensions.mjs.map +1 -1
  640. package/esm/components/Overlay/Overlay.mjs.map +1 -1
  641. package/esm/components/Pagination/Pagination.mjs.map +1 -1
  642. package/esm/components/Pagination/PaginationDots/PaginationDots.mjs.map +1 -1
  643. package/esm/components/Pagination/PaginationItems/PaginationItems.mjs.map +1 -1
  644. package/esm/components/PasswordInput/PasswordInput.mjs +11 -2
  645. package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
  646. package/esm/components/Pill/PillGroup/PillGroup.mjs.map +1 -1
  647. package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
  648. package/esm/components/PinInput/PinInput.mjs +2 -1
  649. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  650. package/esm/components/PinInput/create-pin-array/create-pin-array.mjs.map +1 -1
  651. package/esm/components/Popover/use-popover.mjs.map +1 -1
  652. package/esm/components/Portal/Portal.mjs.map +1 -1
  653. package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs.map +1 -1
  654. package/esm/components/Radio/Radio.mjs.map +1 -1
  655. package/esm/components/Radio/RadioCard/RadioCard.mjs.map +1 -1
  656. package/esm/components/Rating/Rating.mjs.map +1 -1
  657. package/esm/components/Rating/RatingItem/RatingItem.mjs.map +1 -1
  658. package/esm/components/Rating/StarSymbol/StarSymbol.mjs.map +1 -1
  659. package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
  660. package/esm/components/RingProgress/get-curves/get-curves.mjs.map +1 -1
  661. package/esm/components/RollingNumber/get-digit-parts.mjs.map +1 -1
  662. package/esm/components/RollingNumber/get-render-slots.mjs.map +1 -1
  663. package/esm/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.mjs +1 -0
  664. package/esm/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.mjs.map +1 -1
  665. package/esm/components/ScrollArea/utils/add-unlinked-scroll-listener.mjs.map +1 -1
  666. package/esm/components/ScrollArea/utils/get-scroll-position-from-pointer.mjs.map +1 -1
  667. package/esm/components/ScrollArea/utils/get-thumb-offset-from-scroll.mjs.map +1 -1
  668. package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  669. package/esm/components/Select/Select.mjs.map +1 -1
  670. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs +4 -1
  671. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
  672. package/esm/components/SemiCircleProgress/SemiCircleProgress.module.mjs.map +1 -1
  673. package/esm/components/SimpleGrid/SimpleGridVariables.mjs.map +1 -1
  674. package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
  675. package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
  676. package/esm/components/Slider/utils/get-precision/get-precision.mjs.map +1 -1
  677. package/esm/components/Slider/utils/get-step-mark-value/get-step-mark-value.mjs.map +1 -1
  678. package/esm/components/Splitter/Splitter.context.mjs.map +1 -1
  679. package/esm/components/Splitter/Splitter.mjs +22 -1
  680. package/esm/components/Splitter/Splitter.mjs.map +1 -1
  681. package/esm/components/Splitter/SplitterPane/SplitterPane.mjs +1 -2
  682. package/esm/components/Splitter/SplitterPane/SplitterPane.mjs.map +1 -1
  683. package/esm/components/Stack/Stack.mjs.map +1 -1
  684. package/esm/components/Stepper/Stepper.mjs.map +1 -1
  685. package/esm/components/Switch/Switch.mjs.map +1 -1
  686. package/esm/components/Table/Table.components.mjs.map +1 -1
  687. package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
  688. package/esm/components/Tabs/Tabs.context.mjs.map +1 -1
  689. package/esm/components/Tabs/Tabs.mjs +18 -3
  690. package/esm/components/Tabs/Tabs.mjs.map +1 -1
  691. package/esm/components/Tabs/TabsPanel/TabsPanel.mjs +7 -1
  692. package/esm/components/Tabs/TabsPanel/TabsPanel.mjs.map +1 -1
  693. package/esm/components/Tabs/TabsTab/TabsTab.mjs +1 -1
  694. package/esm/components/Tabs/TabsTab/TabsTab.mjs.map +1 -1
  695. package/esm/components/TagsInput/TagsInput.mjs +4 -1
  696. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  697. package/esm/components/TagsInput/filter-picked-tags.mjs.map +1 -1
  698. package/esm/components/TagsInput/get-splitted-tags.mjs.map +1 -1
  699. package/esm/components/Text/Text.mjs.map +1 -1
  700. package/esm/components/Textarea/Autosize.mjs.map +1 -1
  701. package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
  702. package/esm/components/Title/Title.mjs.map +1 -1
  703. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  704. package/esm/components/Tooltip/use-tooltip.mjs.map +1 -1
  705. package/esm/components/Transition/get-transition-styles/get-transition-styles.mjs.map +1 -1
  706. package/esm/components/Tree/FlatTreeNode.mjs.map +1 -1
  707. package/esm/components/Tree/TreeNode.mjs.map +1 -1
  708. package/esm/components/Tree/filter-tree-data/filter-tree-data.mjs.map +1 -1
  709. package/esm/components/Tree/is-node-checked/is-node-checked.mjs.map +1 -1
  710. package/esm/components/Tree/is-node-indeterminate/is-node-indeterminate.mjs.map +1 -1
  711. package/esm/components/Tree/use-tree.mjs.map +1 -1
  712. package/esm/components/TreeSelect/TreeSelect.mjs +7 -1
  713. package/esm/components/TreeSelect/TreeSelect.mjs.map +1 -1
  714. package/esm/components/TreeSelect/get-checked-values-by-strategy.mjs.map +1 -1
  715. package/esm/components/Typography/Typography.mjs.map +1 -1
  716. package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
  717. package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
  718. package/esm/core/Box/Box.mjs.map +1 -1
  719. package/esm/core/Box/get-box-mod/get-box-mod.mjs.map +1 -1
  720. package/esm/core/Box/get-box-style/get-box-style.mjs.map +1 -1
  721. package/esm/core/Box/get-style-object/get-style-object.mjs.map +1 -1
  722. package/esm/core/Box/style-props/parse-style-props/parse-style-props.mjs.map +1 -1
  723. package/esm/core/Box/style-props/parse-style-props/sort-media-queries.mjs.map +1 -1
  724. package/esm/core/Box/style-props/resolvers/border-resolver/border-resolver.mjs.map +1 -1
  725. package/esm/core/Box/use-random-classname/use-random-classname.mjs.map +1 -1
  726. package/esm/core/InlineStyles/InlineStyles.mjs.map +1 -1
  727. package/esm/core/InlineStyles/css-object-to-string/css-object-to-string.mjs.map +1 -1
  728. package/esm/core/InlineStyles/hash-styles.mjs.map +1 -1
  729. package/esm/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.mjs.map +1 -1
  730. package/esm/core/MantineProvider/Mantine.context.mjs.map +1 -1
  731. package/esm/core/MantineProvider/MantineClasses/MantineClasses.mjs.map +1 -1
  732. package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs +6 -2
  733. package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs.map +1 -1
  734. package/esm/core/MantineProvider/MantineCssVariables/get-css-color-variables.mjs.map +1 -1
  735. package/esm/core/MantineProvider/MantineCssVariables/remove-default-variables.mjs.map +1 -1
  736. package/esm/core/MantineProvider/MantineCssVariables/v8-css-variables-resolver.mjs +3 -1
  737. package/esm/core/MantineProvider/MantineCssVariables/v8-css-variables-resolver.mjs.map +1 -1
  738. package/esm/core/MantineProvider/MantineCssVariables/virtual-color/virtual-color.mjs.map +1 -1
  739. package/esm/core/MantineProvider/color-functions/colors-tuple/colors-tuple.mjs.map +1 -1
  740. package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs +3 -1
  741. package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs.map +1 -1
  742. package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs +19 -4
  743. package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs.map +1 -1
  744. package/esm/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.mjs.map +1 -1
  745. package/esm/core/MantineProvider/color-functions/to-rgba/to-rgba.mjs.map +1 -1
  746. package/esm/core/MantineProvider/convert-css-variables/convert-css-variables.mjs.map +1 -1
  747. package/esm/core/MantineProvider/convert-css-variables/css-variables-object-to-string.mjs.map +1 -1
  748. package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs.map +1 -1
  749. package/esm/core/MantineProvider/use-mantine-color-scheme/use-provider-color-scheme.mjs.map +1 -1
  750. package/esm/core/MantineProvider/use-props/use-props.mjs.map +1 -1
  751. package/esm/core/MantineProvider/use-respect-reduce-motion/use-respect-reduce-motion.mjs.map +1 -1
  752. package/esm/core/styles-api/use-styles/get-class-name/get-options-class-names/get-options-class-names.mjs.map +1 -1
  753. package/esm/core/styles-api/use-styles/get-class-name/get-resolved-class-names/get-resolved-class-names.mjs.map +1 -1
  754. package/esm/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.mjs.map +1 -1
  755. package/esm/core/styles-api/use-styles/get-style/get-style.mjs.map +1 -1
  756. package/esm/core/styles-api/use-styles/get-style/resolve-vars/merge-vars.mjs.map +1 -1
  757. package/esm/core/styles-api/use-styles/use-styles.mjs.map +1 -1
  758. package/esm/core/styles-api/use-styles/use-transformed-styles.mjs.map +1 -1
  759. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs +3 -5
  760. package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs.map +1 -1
  761. package/esm/core/utils/create-use-external-events/create-use-external-events.mjs.map +1 -1
  762. package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -1
  763. package/esm/core/utils/filter-props/filter-props.mjs.map +1 -1
  764. package/esm/core/utils/get-context-item-index/get-context-item-index.mjs.map +1 -1
  765. package/esm/core/utils/get-safe-id/get-safe-id.mjs.map +1 -1
  766. package/esm/core/utils/is-number-like/is-number-like.mjs.map +1 -1
  767. package/esm/core/utils/units-converters/px.mjs.map +1 -1
  768. package/esm/core/utils/units-converters/rem.mjs.map +1 -1
  769. package/esm/index.mjs +23 -4
  770. package/lib/components/Accordion/Accordion.d.ts +4 -4
  771. package/lib/components/ActionIcon/ActionIcon.d.ts +3 -3
  772. package/lib/components/Combobox/Combobox.types.d.ts +4 -3
  773. package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -1
  774. package/lib/components/Combobox/index.d.ts +1 -1
  775. package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +110 -0
  776. package/lib/components/ComboboxPopover/ComboboxPopover.types.d.ts +2 -0
  777. package/lib/components/ComboboxPopover/ComboboxPopoverTarget.d.ts +16 -0
  778. package/lib/components/ComboboxPopover/index.d.ts +14 -0
  779. package/lib/components/DataList/DataList.context.d.ts +6 -0
  780. package/lib/components/DataList/DataList.d.ts +44 -0
  781. package/lib/components/DataList/DataListItem/DataListItem.d.ts +18 -0
  782. package/lib/components/DataList/DataListItemLabel/DataListItemLabel.d.ts +18 -0
  783. package/lib/components/DataList/DataListItemValue/DataListItemValue.d.ts +18 -0
  784. package/lib/components/DataList/index.d.ts +32 -0
  785. package/lib/components/EmptyState/EmptyState.context.d.ts +8 -0
  786. package/lib/components/EmptyState/EmptyState.d.ts +83 -0
  787. package/lib/components/EmptyState/EmptyStateActions/EmptyStateActions.d.ts +18 -0
  788. package/lib/components/EmptyState/EmptyStateDescription/EmptyStateDescription.d.ts +18 -0
  789. package/lib/components/EmptyState/EmptyStateIndicator/EmptyStateIndicator.d.ts +18 -0
  790. package/lib/components/EmptyState/EmptyStateTitle/EmptyStateTitle.d.ts +20 -0
  791. package/lib/components/EmptyState/index.d.ts +13 -0
  792. package/lib/components/Input/Input.d.ts +11 -0
  793. package/lib/components/Input/InputSuccess/InputSuccess.d.ts +23 -0
  794. package/lib/components/Input/InputWrapper/InputWrapper.d.ts +7 -2
  795. package/lib/components/Input/index.d.ts +3 -1
  796. package/lib/components/Input/use-input-props.d.ts +5 -2
  797. package/lib/components/MaskInput/use-mask-input-props.d.ts +5 -1
  798. package/lib/components/Menubar/Menubar.context.d.ts +51 -0
  799. package/lib/components/Menubar/Menubar.d.ts +56 -0
  800. package/lib/components/Menubar/MenubarDropdown/MenubarDropdown.d.ts +7 -0
  801. package/lib/components/Menubar/MenubarMenu/MenubarMenu.d.ts +9 -0
  802. package/lib/components/Menubar/MenubarTarget/MenubarTarget.d.ts +14 -0
  803. package/lib/components/Menubar/index.d.ts +11 -0
  804. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  805. package/lib/components/NativeSelect/NativeSelect.d.ts +2 -2
  806. package/lib/components/PinInput/PinInput.d.ts +2 -0
  807. package/lib/components/Splitter/Splitter.context.d.ts +3 -1
  808. package/lib/components/Splitter/Splitter.d.ts +10 -10
  809. package/lib/components/Splitter/SplitterPane/SplitterPane.d.ts +9 -8
  810. package/lib/components/Tabs/Tabs.context.d.ts +2 -0
  811. package/lib/components/index.d.ts +4 -0
  812. package/lib/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.d.ts +7 -2
  813. package/lib/core/MantineProvider/color-functions/index.d.ts +1 -1
  814. package/package.json +5 -5
  815. package/styles/DataList.css +54 -0
  816. package/styles/DataList.layer.css +55 -0
  817. package/styles/EmptyState.css +121 -0
  818. package/styles/EmptyState.layer.css +122 -0
  819. package/styles/Input.css +21 -2
  820. package/styles/Input.layer.css +21 -2
  821. package/styles/Menubar.css +29 -0
  822. package/styles/Menubar.layer.css +30 -0
  823. package/styles/SemiCircleProgress.css +1 -0
  824. package/styles/SemiCircleProgress.layer.css +1 -0
  825. package/styles/default-css-variables.css +2 -0
  826. package/styles/default-css-variables.layer.css +2 -0
  827. package/styles.css +231 -2
  828. package/styles.layer.css +231 -2
@@ -1 +1 @@
1
- {"version":3,"file":"TagsInput.cjs","names":["factory","useProps","getParsedComboboxData","getOptionsLockup","useCombobox","extractStyleProps","usePillsReorder","useStyles","useResolvedStylesApi","getSplittedTags","Fragment","Pill","Combobox","PillsInput","OptionsDropdown","filterPickedTags","InputBase"],"sources":["../../../src/components/TagsInput/TagsInput.tsx"],"sourcesContent":["import { Fragment, useEffect, useRef } from 'react';\nimport { useId, useMergedRef, useUncontrolled } from '@mantine/hooks';\nimport {\n BoxProps,\n ElementProps,\n extractStyleProps,\n factory,\n Factory,\n Primitive,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '../../core';\nimport {\n Combobox,\n ComboboxGenericData,\n ComboboxGenericItem,\n ComboboxLikeProps,\n ComboboxLikeRenderOptionInput,\n ComboboxLikeStylesNames,\n ComboboxRenderPillInput,\n getOptionsLockup,\n getParsedComboboxData,\n OptionsDropdown,\n OptionsFilter,\n useCombobox,\n usePillsReorder,\n} from '../Combobox';\nimport {\n __BaseInputProps,\n __InputStylesNames,\n ClearSectionMode,\n InputClearButtonProps,\n} from '../Input';\nimport { InputBase } from '../InputBase';\nimport { Pill } from '../Pill';\nimport { PillsInput } from '../PillsInput';\nimport { ScrollAreaProps } from '../ScrollArea';\nimport { filterPickedTags } from './filter-picked-tags';\nimport { getSplittedTags } from './get-splitted-tags';\n\nexport type TagsInputStylesNames =\n | __InputStylesNames\n | ComboboxLikeStylesNames\n | 'pill'\n | 'pillsList'\n | 'inputField';\n\nexport interface TagsInputProps\n extends\n BoxProps,\n __BaseInputProps,\n Omit<ComboboxLikeProps, 'data'>,\n StylesApiProps<TagsInputFactory>,\n ElementProps<'input', 'size' | 'value' | 'defaultValue' | 'onChange'> {\n /** Data displayed in the dropdown. Values must be unique. */\n data?: ComboboxGenericData;\n\n /** Controlled component value */\n value?: string[];\n\n /** Uncontrolled component default value */\n defaultValue?: string[];\n\n /** Called when value changes */\n onChange?: (value: string[]) => void;\n\n /** Called when tag is removed */\n onRemove?: (value: string) => void;\n\n /** Called when the clear button is clicked */\n onClear?: () => void;\n\n /** Controlled search value */\n searchValue?: string;\n\n /** Default search value */\n defaultSearchValue?: string;\n\n /** Called when search changes */\n onSearchChange?: (value: string) => void;\n\n /** Maximum number of tags @default Infinity */\n maxTags?: number;\n\n /** Called when user tries to add more tags than maxTags */\n onMaxTags?: (value: string) => void;\n\n /** If set, duplicate tags are allowed @default false */\n allowDuplicates?: boolean;\n\n /** Called when user tries to submit a duplicated tag */\n onDuplicate?: (value: string) => void;\n\n /** Characters that should trigger tags split, `[',']` by default */\n splitChars?: string[];\n\n /** If set, the clear button is displayed in the right section when the component has value @default false */\n clearable?: boolean;\n\n /** Determines how the clear button and rightSection are rendered @default 'both' */\n clearSectionMode?: ClearSectionMode;\n\n /** Props passed down to the clear button */\n clearButtonProps?: InputClearButtonProps;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: Omit<React.ComponentProps<'input'>, 'value'>;\n\n /** Divider used to separate values in the hidden input `value` attribute @default ',' */\n hiddenInputValuesDivider?: string;\n\n /** A function to render content of the option, replaces the default content of the option */\n renderOption?: (input: ComboboxLikeRenderOptionInput<ComboboxGenericItem>) => React.ReactNode;\n\n /** A function to render content of the pill, replaces the default content of the pill */\n renderPill?: (props: ComboboxRenderPillInput) => React.ReactNode;\n\n /** Props passed down to the underlying `ScrollArea` component in the dropdown */\n scrollAreaProps?: ScrollAreaProps;\n\n /** If set, the value typed in by the user but not submitted is accepted when the input is blurred @default true */\n acceptValueOnBlur?: boolean;\n\n /** Custom function to determine if a tag is duplicate. Accepts tag value and array of current values. By default, checks if the tag exists case-insensitively. */\n isDuplicate?: (value: string, currentValues: string[]) => boolean;\n\n /** If set, the dropdown opens when the input receives focus @default true */\n openOnFocus?: boolean;\n\n /** If set, tags can be reordered by dragging pills. Disabled when `disabled` or `readOnly` is set. @default false */\n withPillsReorder?: boolean;\n}\n\nexport type TagsInputFactory = Factory<{\n props: TagsInputProps;\n ref: HTMLInputElement;\n stylesNames: TagsInputStylesNames;\n}>;\n\nconst defaultProps = {\n maxTags: Infinity,\n acceptValueOnBlur: true,\n splitChars: [','],\n hiddenInputValuesDivider: ',',\n openOnFocus: true,\n size: 'sm',\n} satisfies Partial<TagsInputProps>;\n\nexport const TagsInput = factory<TagsInputFactory>((_props) => {\n const props = useProps(['Input', 'InputWrapper', 'TagsInput'], defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n size,\n value,\n defaultValue,\n onChange,\n onKeyDown,\n maxTags,\n allowDuplicates,\n onDuplicate,\n variant,\n data,\n dropdownOpened,\n defaultDropdownOpened,\n onDropdownOpen,\n onDropdownClose,\n selectFirstOptionOnChange,\n selectFirstOptionOnDropdownOpen,\n onOptionSubmit,\n comboboxProps,\n filter,\n limit,\n withScrollArea,\n maxDropdownHeight,\n floatingHeight,\n searchValue,\n defaultSearchValue,\n onSearchChange,\n readOnly,\n disabled,\n splitChars,\n onFocus,\n onBlur,\n onPaste,\n radius,\n rightSection,\n rightSectionWidth,\n rightSectionPointerEvents,\n rightSectionProps,\n leftSection,\n leftSectionWidth,\n leftSectionPointerEvents,\n leftSectionProps,\n inputContainer,\n inputWrapperOrder,\n withAsterisk,\n required,\n labelProps,\n descriptionProps,\n errorProps,\n wrapperProps,\n description,\n label,\n error,\n withErrorStyles,\n name,\n form,\n id,\n clearable,\n clearSectionMode,\n clearButtonProps,\n hiddenInputProps,\n hiddenInputValuesDivider,\n mod,\n renderOption,\n renderPill,\n onRemove,\n onClear,\n onMaxTags,\n scrollAreaProps,\n acceptValueOnBlur,\n isDuplicate,\n openOnFocus,\n attributes,\n ref,\n loading,\n loadingPosition,\n withPillsReorder,\n ...others\n } = props;\n\n const _id = useId(id);\n const parsedData = getParsedComboboxData(data);\n const optionsLockup = getOptionsLockup(parsedData);\n const inputRef = useRef<HTMLInputElement>(null);\n const _ref = useMergedRef(inputRef, ref);\n\n const combobox = useCombobox({\n opened: dropdownOpened,\n defaultOpened: defaultDropdownOpened,\n onDropdownOpen: () => {\n onDropdownOpen?.();\n if (selectFirstOptionOnDropdownOpen) {\n combobox.selectFirstOption();\n }\n },\n onDropdownClose: () => {\n onDropdownClose?.();\n combobox.resetSelectedOption();\n },\n });\n\n const {\n styleProps,\n rest: { type, autoComplete, ...rest },\n } = extractStyleProps(others);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: [],\n onChange,\n });\n\n const { getPillProps, getListProps, handleInputKeyDown } = usePillsReorder({\n value: _value,\n onChange: setValue,\n enabled: withPillsReorder && !disabled && !readOnly,\n });\n\n const [_searchValue, setSearchValue] = useUncontrolled({\n value: searchValue,\n defaultValue: defaultSearchValue,\n finalValue: '',\n onChange: onSearchChange,\n });\n\n const handleSearchChange = (value: string) => {\n setSearchValue(value);\n combobox.resetSelectedOption();\n };\n\n const getStyles = useStyles<TagsInputFactory>({\n name: 'TagsInput',\n classes: {} as any,\n props: props as any,\n classNames,\n styles,\n unstyled,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<TagsInputFactory>({\n props,\n styles,\n classNames,\n });\n\n const handleValueSelect = (val: string) => {\n const isDuplicated = isDuplicate\n ? isDuplicate(val, _value)\n : _value.some((tag) => tag.toLowerCase() === val.toLowerCase());\n\n if (isDuplicated) {\n onDuplicate?.(val);\n if (!allowDuplicates) {\n handleSearchChange('');\n return;\n }\n }\n\n if (_value.length >= maxTags) {\n onMaxTags?.(val);\n return;\n }\n\n onOptionSubmit?.(val);\n handleSearchChange('');\n if (val.length > 0) {\n setValue([..._value, val]);\n }\n };\n\n const handleInputKeydown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n\n if (event.defaultPrevented || event.isPropagationStopped()) {\n return;\n }\n\n const inputValue = _searchValue.trim();\n const { length } = inputValue;\n\n if (splitChars.includes(event.key) && length > 0) {\n setValue(\n getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value: _searchValue,\n currentTags: _value,\n isDuplicate,\n onDuplicate,\n })\n );\n handleSearchChange('');\n event.preventDefault();\n }\n\n if (event.key === 'Enter' && length > 0 && !event.nativeEvent.isComposing) {\n event.preventDefault();\n\n const hasActiveSelection = !!document.querySelector<HTMLDivElement>(\n `#${combobox.listId} [data-combobox-option][data-combobox-selected]`\n );\n\n if (hasActiveSelection) {\n return;\n }\n\n handleValueSelect(inputValue);\n }\n\n if (\n event.key === 'Backspace' &&\n length === 0 &&\n _value.length > 0 &&\n !event.nativeEvent.isComposing &&\n !readOnly\n ) {\n onRemove?.(_value[_value.length - 1]);\n setValue(_value.slice(0, _value.length - 1));\n }\n\n handleInputKeyDown(event);\n };\n\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n onPaste?.(event);\n event.preventDefault();\n\n if (event.clipboardData) {\n const pastedText = event.clipboardData.getData('text/plain');\n setValue(\n getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value: `${_searchValue}${pastedText}`,\n currentTags: _value,\n isDuplicate,\n onDuplicate,\n })\n );\n handleSearchChange('');\n }\n };\n\n const values = _value.map((item, index) => {\n const onRemoveItem = () => {\n const next_value = _value.slice();\n next_value.splice(index, 1);\n setValue(next_value);\n onRemove?.(item);\n };\n\n const reorderProps = getPillProps(index);\n\n if (renderPill) {\n return (\n <Fragment key={`${item}-${index}`}>\n {renderPill({\n option: optionsLockup[item] || { value: item, label: item, disabled: false },\n value: item,\n onRemove: onRemoveItem,\n disabled: disabled || readOnly,\n reorderProps,\n })}\n </Fragment>\n );\n }\n\n return (\n <Pill\n key={`${item}-${index}`}\n withRemoveButton={!readOnly}\n onRemove={onRemoveItem}\n unstyled={unstyled}\n disabled={disabled}\n attributes={attributes}\n {...getStyles('pill')}\n {...reorderProps}\n >\n {item}\n </Pill>\n );\n });\n\n useEffect(() => {\n if (selectFirstOptionOnChange) {\n combobox.selectFirstOption();\n }\n }, [selectFirstOptionOnChange, _value, _searchValue]);\n\n const clearButton = (\n <Combobox.ClearButton\n {...clearButtonProps}\n onClear={() => {\n setValue([]);\n handleSearchChange('');\n inputRef.current?.focus();\n combobox.openDropdown();\n onClear?.();\n }}\n />\n );\n\n return (\n <>\n <Combobox\n store={combobox}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n size={size}\n readOnly={readOnly}\n __staticSelector=\"TagsInput\"\n attributes={attributes}\n floatingHeight={floatingHeight}\n onOptionSubmit={(val) => {\n onOptionSubmit?.(val);\n handleSearchChange('');\n\n if (_value.length >= maxTags) {\n onMaxTags?.(val);\n } else {\n setValue([..._value, optionsLockup[val].value]);\n }\n\n combobox.resetSelectedOption();\n }}\n {...comboboxProps}\n >\n <Combobox.DropdownTarget>\n <PillsInput\n {...styleProps}\n __staticSelector=\"TagsInput\"\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n size={size}\n className={className}\n style={style}\n variant={variant}\n disabled={disabled}\n radius={radius}\n rightSection={rightSection}\n __clearSection={clearButton}\n __clearable={clearable && _value.length > 0 && !disabled && !readOnly}\n __clearSectionMode={clearSectionMode}\n rightSectionWidth={rightSectionWidth}\n rightSectionPointerEvents={rightSectionPointerEvents}\n rightSectionProps={rightSectionProps}\n leftSection={leftSection}\n leftSectionWidth={leftSectionWidth}\n leftSectionPointerEvents={leftSectionPointerEvents}\n leftSectionProps={leftSectionProps}\n loading={loading}\n loadingPosition={loadingPosition}\n inputContainer={inputContainer}\n inputWrapperOrder={inputWrapperOrder}\n withAsterisk={withAsterisk}\n required={required}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorProps={errorProps}\n wrapperProps={wrapperProps}\n description={description}\n label={label}\n error={error}\n withErrorStyles={withErrorStyles}\n __stylesApiProps={{ ...props, multiline: true }}\n id={_id}\n mod={mod}\n attributes={attributes}\n >\n <Pill.Group\n disabled={disabled}\n unstyled={unstyled}\n {...getStyles('pillsList')}\n {...getListProps()}\n >\n {values}\n <Combobox.EventsTarget autoComplete={autoComplete} withExpandedAttribute>\n <PillsInput.Field\n {...rest}\n ref={_ref}\n {...getStyles('inputField')}\n unstyled={unstyled}\n onKeyDown={handleInputKeydown}\n onFocus={(event) => {\n onFocus?.(event);\n openOnFocus && combobox.openDropdown();\n }}\n onBlur={(event) => {\n onBlur?.(event);\n acceptValueOnBlur && handleValueSelect(_searchValue);\n combobox.closeDropdown();\n }}\n onPaste={handlePaste}\n value={_searchValue}\n onChange={(event) => handleSearchChange(event.currentTarget.value)}\n required={required && _value.length === 0}\n disabled={disabled}\n readOnly={readOnly}\n id={_id}\n />\n </Combobox.EventsTarget>\n </Pill.Group>\n </PillsInput>\n </Combobox.DropdownTarget>\n\n <OptionsDropdown\n data={filterPickedTags({ data: parsedData, value: _value })}\n hidden={readOnly || disabled}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={_searchValue}\n limit={limit}\n hiddenWhenEmpty\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n unstyled={unstyled}\n labelId={label ? `${_id}-label` : undefined}\n aria-label={label ? undefined : others['aria-label']}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n />\n </Combobox>\n <Combobox.HiddenInput\n name={name}\n form={form}\n value={_value}\n valuesDivider={hiddenInputValuesDivider}\n disabled={disabled}\n {...hiddenInputProps}\n />\n </>\n );\n});\n\nTagsInput.classes = { ...InputBase.classes, ...Combobox.classes };\nTagsInput.displayName = '@mantine/core/TagsInput';\n\nexport namespace TagsInput {\n export type Props = TagsInputProps;\n export type StylesNames = TagsInputStylesNames;\n export type Factory = TagsInputFactory;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6IA,MAAM,eAAe;CACnB,SAAS;CACT,mBAAmB;CACnB,YAAY,CAAC,GAAG;CAChB,0BAA0B;CAC1B,aAAa;CACb,MAAM;AACR;AAEA,MAAa,YAAYA,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS;EAAC;EAAS;EAAgB;CAAW,GAAG,cAAc,MAAM;CACnF,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,OACA,cACA,UACA,WACA,SACA,iBACA,aACA,SACA,MACA,gBACA,uBACA,gBACA,iBACA,2BACA,iCACA,gBACA,eACA,QACA,OACA,gBACA,mBACA,gBACA,aACA,oBACA,gBACA,UACA,UACA,YACA,SACA,QACA,SACA,QACA,cACA,mBACA,2BACA,mBACA,aACA,kBACA,0BACA,kBACA,gBACA,mBACA,cACA,UAC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AU,YAAY,OAAO,WAAW;MAC9B;MACA;MACV,IAAI;KACL,CAAA;IACoB,CAAA,CACb;;EACF,CAAA,EACW,CAAA,GAEzB,iBAAA,GAAA,kBAAA,KAACC,wBAAAA,iBAAD;GACE,MAAMC,2BAAAA,iBAAiB;IAAE,MAAM;IAAY,OAAO;GAAO,CAAC;GAC1D,QAAQ,YAAY;GACZ;GACR,QAAQ;GACD;GACP,iBAAA;GACgB;GACG;GACT;GACV,SAAS,QAAQ,GAAG,IAAI,UAAU,KAAA;GAClC,cAAY,QAAQ,KAAA,IAAY,OAAO;GACzB;GACG;EAClB,CAAA,CACO;KACV,iBAAA,GAAA,kBAAA,KAACH,iBAAAA,SAAS,aAAV;EACQ;EACA;EACN,OAAO;EACP,eAAe;EACL;EACV,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,UAAU,UAAU;CAAE,GAAGI,kBAAAA,UAAU;CAAS,GAAGJ,iBAAAA,SAAS;AAAQ;AAChE,UAAU,cAAc"}
1
+ {"version":3,"file":"TagsInput.cjs","names":["factory","useProps","getParsedComboboxData","getOptionsLockup","useCombobox","extractStyleProps","usePillsReorder","useStyles","useResolvedStylesApi","getSplittedTags","Fragment","Pill","Combobox","PillsInput","OptionsDropdown","filterPickedTags","InputBase"],"sources":["../../../src/components/TagsInput/TagsInput.tsx"],"sourcesContent":["import { Fragment, useEffect, useRef } from 'react';\nimport { useId, useMergedRef, useUncontrolled } from '@mantine/hooks';\nimport {\n BoxProps,\n ElementProps,\n extractStyleProps,\n factory,\n Factory,\n Primitive,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n useStyles,\n} from '../../core';\nimport {\n Combobox,\n ComboboxGenericData,\n ComboboxGenericItem,\n ComboboxLikeProps,\n ComboboxLikeRenderOptionInput,\n ComboboxLikeStylesNames,\n ComboboxRenderPillInput,\n getOptionsLockup,\n getParsedComboboxData,\n OptionsDropdown,\n OptionsFilter,\n useCombobox,\n usePillsReorder,\n} from '../Combobox';\nimport {\n __BaseInputProps,\n __InputStylesNames,\n ClearSectionMode,\n InputClearButtonProps,\n} from '../Input';\nimport { InputBase } from '../InputBase';\nimport { Pill } from '../Pill';\nimport { PillsInput } from '../PillsInput';\nimport { ScrollAreaProps } from '../ScrollArea';\nimport { filterPickedTags } from './filter-picked-tags';\nimport { getSplittedTags } from './get-splitted-tags';\n\nexport type TagsInputStylesNames =\n | __InputStylesNames\n | ComboboxLikeStylesNames\n | 'pill'\n | 'pillsList'\n | 'inputField';\n\nexport interface TagsInputProps\n extends\n BoxProps,\n __BaseInputProps,\n Omit<ComboboxLikeProps, 'data'>,\n StylesApiProps<TagsInputFactory>,\n ElementProps<'input', 'size' | 'value' | 'defaultValue' | 'onChange'> {\n /** Data displayed in the dropdown. Values must be unique. */\n data?: ComboboxGenericData;\n\n /** Controlled component value */\n value?: string[];\n\n /** Uncontrolled component default value */\n defaultValue?: string[];\n\n /** Called when value changes */\n onChange?: (value: string[]) => void;\n\n /** Called when tag is removed */\n onRemove?: (value: string) => void;\n\n /** Called when the clear button is clicked */\n onClear?: () => void;\n\n /** Controlled search value */\n searchValue?: string;\n\n /** Default search value */\n defaultSearchValue?: string;\n\n /** Called when search changes */\n onSearchChange?: (value: string) => void;\n\n /** Maximum number of tags @default Infinity */\n maxTags?: number;\n\n /** Called when user tries to add more tags than maxTags */\n onMaxTags?: (value: string) => void;\n\n /** If set, duplicate tags are allowed @default false */\n allowDuplicates?: boolean;\n\n /** Called when user tries to submit a duplicated tag */\n onDuplicate?: (value: string) => void;\n\n /** Characters that should trigger tags split, `[',']` by default */\n splitChars?: string[];\n\n /** If set, the clear button is displayed in the right section when the component has value @default false */\n clearable?: boolean;\n\n /** Determines how the clear button and rightSection are rendered @default 'both' */\n clearSectionMode?: ClearSectionMode;\n\n /** Props passed down to the clear button */\n clearButtonProps?: InputClearButtonProps;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: Omit<React.ComponentProps<'input'>, 'value'>;\n\n /** Divider used to separate values in the hidden input `value` attribute @default ',' */\n hiddenInputValuesDivider?: string;\n\n /** A function to render content of the option, replaces the default content of the option */\n renderOption?: (input: ComboboxLikeRenderOptionInput<ComboboxGenericItem>) => React.ReactNode;\n\n /** A function to render content of the pill, replaces the default content of the pill */\n renderPill?: (props: ComboboxRenderPillInput) => React.ReactNode;\n\n /** Props passed down to the underlying `ScrollArea` component in the dropdown */\n scrollAreaProps?: ScrollAreaProps;\n\n /** If set, the value typed in by the user but not submitted is accepted when the input is blurred @default true */\n acceptValueOnBlur?: boolean;\n\n /** Custom function to determine if a tag is duplicate. Accepts tag value and array of current values. By default, checks if the tag exists case-insensitively. */\n isDuplicate?: (value: string, currentValues: string[]) => boolean;\n\n /** If set, the dropdown opens when the input receives focus @default true */\n openOnFocus?: boolean;\n\n /** If set, tags can be reordered by dragging pills. Disabled when `disabled` or `readOnly` is set. @default false */\n withPillsReorder?: boolean;\n}\n\nexport type TagsInputFactory = Factory<{\n props: TagsInputProps;\n ref: HTMLInputElement;\n stylesNames: TagsInputStylesNames;\n}>;\n\nconst defaultProps = {\n maxTags: Infinity,\n acceptValueOnBlur: true,\n splitChars: [','],\n hiddenInputValuesDivider: ',',\n openOnFocus: true,\n size: 'sm',\n} satisfies Partial<TagsInputProps>;\n\nexport const TagsInput = factory<TagsInputFactory>((_props) => {\n const props = useProps(['Input', 'InputWrapper', 'TagsInput'], defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n size,\n value,\n defaultValue,\n onChange,\n onKeyDown,\n maxTags,\n allowDuplicates,\n onDuplicate,\n variant,\n data,\n dropdownOpened,\n defaultDropdownOpened,\n onDropdownOpen,\n onDropdownClose,\n selectFirstOptionOnChange,\n selectFirstOptionOnDropdownOpen,\n onOptionSubmit,\n comboboxProps,\n filter,\n limit,\n withScrollArea,\n maxDropdownHeight,\n floatingHeight,\n searchValue,\n defaultSearchValue,\n onSearchChange,\n readOnly,\n disabled,\n splitChars,\n onFocus,\n onBlur,\n onPaste,\n radius,\n rightSection,\n rightSectionWidth,\n rightSectionPointerEvents,\n rightSectionProps,\n leftSection,\n leftSectionWidth,\n leftSectionPointerEvents,\n leftSectionProps,\n inputContainer,\n inputWrapperOrder,\n withAsterisk,\n required,\n labelProps,\n descriptionProps,\n errorProps,\n successProps,\n wrapperProps,\n description,\n label,\n error,\n success,\n withErrorStyles,\n withSuccessStyles,\n name,\n form,\n id,\n clearable,\n clearSectionMode,\n clearButtonProps,\n hiddenInputProps,\n hiddenInputValuesDivider,\n mod,\n renderOption,\n renderPill,\n onRemove,\n onClear,\n onMaxTags,\n scrollAreaProps,\n acceptValueOnBlur,\n isDuplicate,\n openOnFocus,\n attributes,\n ref,\n loading,\n loadingPosition,\n withPillsReorder,\n ...others\n } = props;\n\n const _id = useId(id);\n const parsedData = getParsedComboboxData(data);\n const optionsLockup = getOptionsLockup(parsedData);\n const inputRef = useRef<HTMLInputElement>(null);\n const _ref = useMergedRef(inputRef, ref);\n\n const combobox = useCombobox({\n opened: dropdownOpened,\n defaultOpened: defaultDropdownOpened,\n onDropdownOpen: () => {\n onDropdownOpen?.();\n if (selectFirstOptionOnDropdownOpen) {\n combobox.selectFirstOption();\n }\n },\n onDropdownClose: () => {\n onDropdownClose?.();\n combobox.resetSelectedOption();\n },\n });\n\n const {\n styleProps,\n rest: { type, autoComplete, ...rest },\n } = extractStyleProps(others);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: [],\n onChange,\n });\n\n const { getPillProps, getListProps, handleInputKeyDown } = usePillsReorder({\n value: _value,\n onChange: setValue,\n enabled: withPillsReorder && !disabled && !readOnly,\n });\n\n const [_searchValue, setSearchValue] = useUncontrolled({\n value: searchValue,\n defaultValue: defaultSearchValue,\n finalValue: '',\n onChange: onSearchChange,\n });\n\n const handleSearchChange = (value: string) => {\n setSearchValue(value);\n combobox.resetSelectedOption();\n };\n\n const getStyles = useStyles<TagsInputFactory>({\n name: 'TagsInput',\n classes: {} as any,\n props: props as any,\n classNames,\n styles,\n unstyled,\n });\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<TagsInputFactory>({\n props,\n styles,\n classNames,\n });\n\n const handleValueSelect = (val: string) => {\n const isDuplicated = isDuplicate\n ? isDuplicate(val, _value)\n : _value.some((tag) => tag.toLowerCase() === val.toLowerCase());\n\n if (isDuplicated) {\n onDuplicate?.(val);\n if (!allowDuplicates) {\n handleSearchChange('');\n return;\n }\n }\n\n if (_value.length >= maxTags) {\n onMaxTags?.(val);\n return;\n }\n\n onOptionSubmit?.(val);\n handleSearchChange('');\n if (val.length > 0) {\n setValue([..._value, val]);\n }\n };\n\n const handleInputKeydown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n\n if (event.defaultPrevented || event.isPropagationStopped()) {\n return;\n }\n\n const inputValue = _searchValue.trim();\n const { length } = inputValue;\n\n if (splitChars.includes(event.key) && length > 0) {\n setValue(\n getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value: _searchValue,\n currentTags: _value,\n isDuplicate,\n onDuplicate,\n })\n );\n handleSearchChange('');\n event.preventDefault();\n }\n\n if (event.key === 'Enter' && length > 0 && !event.nativeEvent.isComposing) {\n event.preventDefault();\n\n const hasActiveSelection = !!document.querySelector<HTMLDivElement>(\n `#${combobox.listId} [data-combobox-option][data-combobox-selected]`\n );\n\n if (hasActiveSelection) {\n return;\n }\n\n handleValueSelect(inputValue);\n }\n\n if (\n event.key === 'Backspace' &&\n length === 0 &&\n _value.length > 0 &&\n !event.nativeEvent.isComposing &&\n !readOnly\n ) {\n onRemove?.(_value[_value.length - 1]);\n setValue(_value.slice(0, _value.length - 1));\n }\n\n handleInputKeyDown(event);\n };\n\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n onPaste?.(event);\n event.preventDefault();\n\n if (event.clipboardData) {\n const pastedText = event.clipboardData.getData('text/plain');\n setValue(\n getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value: `${_searchValue}${pastedText}`,\n currentTags: _value,\n isDuplicate,\n onDuplicate,\n })\n );\n handleSearchChange('');\n }\n };\n\n const values = _value.map((item, index) => {\n const onRemoveItem = () => {\n const next_value = _value.slice();\n next_value.splice(index, 1);\n setValue(next_value);\n onRemove?.(item);\n };\n\n const reorderProps = getPillProps(index);\n\n if (renderPill) {\n return (\n <Fragment key={`${item}-${index}`}>\n {renderPill({\n option: optionsLockup[item] || { value: item, label: item, disabled: false },\n value: item,\n onRemove: onRemoveItem,\n disabled: disabled || readOnly,\n reorderProps,\n })}\n </Fragment>\n );\n }\n\n return (\n <Pill\n key={`${item}-${index}`}\n withRemoveButton={!readOnly}\n onRemove={onRemoveItem}\n unstyled={unstyled}\n disabled={disabled}\n attributes={attributes}\n {...getStyles('pill')}\n {...reorderProps}\n >\n {item}\n </Pill>\n );\n });\n\n useEffect(() => {\n if (selectFirstOptionOnChange) {\n combobox.selectFirstOption();\n }\n }, [selectFirstOptionOnChange, _value, _searchValue]);\n\n const clearButton = (\n <Combobox.ClearButton\n {...clearButtonProps}\n onClear={() => {\n setValue([]);\n handleSearchChange('');\n inputRef.current?.focus();\n combobox.openDropdown();\n onClear?.();\n }}\n />\n );\n\n return (\n <>\n <Combobox\n store={combobox}\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n size={size}\n readOnly={readOnly}\n __staticSelector=\"TagsInput\"\n attributes={attributes}\n floatingHeight={floatingHeight}\n onOptionSubmit={(val) => {\n onOptionSubmit?.(val);\n handleSearchChange('');\n\n if (_value.length >= maxTags) {\n onMaxTags?.(val);\n } else {\n setValue([..._value, optionsLockup[val].value]);\n }\n\n combobox.resetSelectedOption();\n }}\n {...comboboxProps}\n >\n <Combobox.DropdownTarget>\n <PillsInput\n {...styleProps}\n __staticSelector=\"TagsInput\"\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n size={size}\n className={className}\n style={style}\n variant={variant}\n disabled={disabled}\n radius={radius}\n rightSection={rightSection}\n __clearSection={clearButton}\n __clearable={clearable && _value.length > 0 && !disabled && !readOnly}\n __clearSectionMode={clearSectionMode}\n rightSectionWidth={rightSectionWidth}\n rightSectionPointerEvents={rightSectionPointerEvents}\n rightSectionProps={rightSectionProps}\n leftSection={leftSection}\n leftSectionWidth={leftSectionWidth}\n leftSectionPointerEvents={leftSectionPointerEvents}\n leftSectionProps={leftSectionProps}\n loading={loading}\n loadingPosition={loadingPosition}\n inputContainer={inputContainer}\n inputWrapperOrder={inputWrapperOrder}\n withAsterisk={withAsterisk}\n required={required}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorProps={errorProps}\n successProps={successProps}\n wrapperProps={wrapperProps}\n description={description}\n label={label}\n error={error}\n success={success}\n withErrorStyles={withErrorStyles}\n withSuccessStyles={withSuccessStyles}\n __stylesApiProps={{ ...props, multiline: true }}\n id={_id}\n mod={mod}\n attributes={attributes}\n >\n <Pill.Group\n disabled={disabled}\n unstyled={unstyled}\n {...getStyles('pillsList')}\n {...getListProps()}\n >\n {values}\n <Combobox.EventsTarget autoComplete={autoComplete} withExpandedAttribute>\n <PillsInput.Field\n {...rest}\n ref={_ref}\n {...getStyles('inputField')}\n unstyled={unstyled}\n onKeyDown={handleInputKeydown}\n onFocus={(event) => {\n onFocus?.(event);\n openOnFocus && combobox.openDropdown();\n }}\n onBlur={(event) => {\n onBlur?.(event);\n acceptValueOnBlur && handleValueSelect(_searchValue);\n combobox.closeDropdown();\n }}\n onPaste={handlePaste}\n value={_searchValue}\n onChange={(event) => handleSearchChange(event.currentTarget.value)}\n required={required && _value.length === 0}\n disabled={disabled}\n readOnly={readOnly}\n id={_id}\n />\n </Combobox.EventsTarget>\n </Pill.Group>\n </PillsInput>\n </Combobox.DropdownTarget>\n\n <OptionsDropdown\n data={filterPickedTags({ data: parsedData, value: _value })}\n hidden={readOnly || disabled}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={_searchValue}\n limit={limit}\n hiddenWhenEmpty\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n unstyled={unstyled}\n labelId={label ? `${_id}-label` : undefined}\n aria-label={label ? undefined : others['aria-label']}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n />\n </Combobox>\n <Combobox.HiddenInput\n name={name}\n form={form}\n value={_value}\n valuesDivider={hiddenInputValuesDivider}\n disabled={disabled}\n {...hiddenInputProps}\n />\n </>\n );\n});\n\nTagsInput.classes = { ...InputBase.classes, ...Combobox.classes };\nTagsInput.displayName = '@mantine/core/TagsInput';\n\nexport namespace TagsInput {\n export type Props = TagsInputProps;\n export type StylesNames = TagsInputStylesNames;\n export type Factory = TagsInputFactory;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6IA,MAAM,eAAe;CACnB,SAAS;CACT,mBAAmB;CACnB,YAAY,CAAC,GAAG;CAChB,0BAA0B;CAC1B,aAAa;CACb,MAAM;AACR;AAEA,MAAa,YAAYA,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS;EAAC;EAAS;EAAgB;CAAW,GAAG,cAAc,MAAM;CACnF,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,OACA,cACA,UACA,WACA,SACA,iBACA,aACA,SACA,MACA,gBACA,uBACA,gBACA,iBACA,2BACA,iCACA,gBACA,eACA,QACA,OACA,gBACA,mBACA,gBACA,aACA,oBACA,gBACA,UACA,UACA,YACA,SACA,QACA,SACA,QACA,cACA,mBACA,2BACA,mBACA,aACA,kBACA,0BACA,kBACA,gBACA,mBACA,cACA,UACA,YACA,kBACA,YACA,cACA,cACA,aACA,OACA,OACA,SACA,iBACA,mBACA,MACA,MACA,IACA,WACA,kBACA,kBACA,kBACA,0BACA,KACA,cACA,YACA,UACA,SACA,WACA,iBACA,mBACA,aACA,aACA,YACA,KACA,SACA,iBACA,kBACA,GAAG,WACD;CAEJ,MAAM,OAAA,GAAA,eAAA,MAAA,CAAY,EAAE;CACpB,MAAM,aAAaC,iCAAAA,sBAAs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A,iBAAD;GACE,MAAMC,2BAAAA,iBAAiB;IAAE,MAAM;IAAY,OAAO;GAAO,CAAC;GAC1D,QAAQ,YAAY;GACZ;GACR,QAAQ;GACD;GACP,iBAAA;GACgB;GACG;GACT;GACV,SAAS,QAAQ,GAAG,IAAI,UAAU,KAAA;GAClC,cAAY,QAAQ,KAAA,IAAY,OAAO;GACzB;GACG;EAClB,CAAA,CACO;KACV,iBAAA,GAAA,kBAAA,IAAA,CAACH,iBAAAA,SAAS,aAAV;EACQ;EACA;EACN,OAAO;EACP,eAAe;EACL;EACV,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,UAAU,UAAU;CAAE,GAAGI,kBAAAA,UAAU;CAAS,GAAGJ,iBAAAA,SAAS;AAAQ;AAChE,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter-picked-tags.cjs","names":["isOptionsGroup"],"sources":["../../../src/components/TagsInput/filter-picked-tags.ts"],"sourcesContent":["import { ComboboxParsedItem, isOptionsGroup } from '../Combobox';\n\ninterface FilterPickedTagsInput {\n data: ComboboxParsedItem[];\n value: string[];\n}\n\nexport function filterPickedTags({ data, value }: FilterPickedTagsInput) {\n const normalizedValue = value.map((item) => item.trim().toLowerCase());\n\n const filtered = data.reduce<ComboboxParsedItem[]>((acc, item) => {\n if (isOptionsGroup(item)) {\n acc.push({\n group: item.group,\n items: item.items.filter(\n (option) => normalizedValue.indexOf(option.label.toLowerCase().trim()) === -1\n ),\n });\n } else if (normalizedValue.indexOf(item.label.toLowerCase().trim()) === -1) {\n acc.push(item);\n }\n\n return acc;\n }, []);\n\n return filtered;\n}\n"],"mappings":";;;AAOA,SAAgB,iBAAiB,EAAE,MAAM,SAAgC;CACvE,MAAM,kBAAkB,MAAM,KAAK,SAAS,KAAK,KAAK,EAAE,YAAY,CAAC;CAiBrE,OAfiB,KAAK,QAA8B,KAAK,SAAS;EAChE,IAAIA,yBAAAA,eAAe,IAAI,GACrB,IAAI,KAAK;GACP,OAAO,KAAK;GACZ,OAAO,KAAK,MAAM,QACf,WAAW,gBAAgB,QAAQ,OAAO,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,EAC7E;EACF,CAAC;OACI,IAAI,gBAAgB,QAAQ,KAAK,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,IACtE,IAAI,KAAK,IAAI;EAGf,OAAO;CACT,GAAG,CAAC,CAEU;AAChB"}
1
+ {"version":3,"file":"filter-picked-tags.cjs","names":["isOptionsGroup"],"sources":["../../../src/components/TagsInput/filter-picked-tags.ts"],"sourcesContent":["import { ComboboxParsedItem, isOptionsGroup } from '../Combobox';\n\ninterface FilterPickedTagsInput {\n data: ComboboxParsedItem[];\n value: string[];\n}\n\nexport function filterPickedTags({ data, value }: FilterPickedTagsInput) {\n const normalizedValue = value.map((item) => item.trim().toLowerCase());\n\n const filtered = data.reduce<ComboboxParsedItem[]>((acc, item) => {\n if (isOptionsGroup(item)) {\n acc.push({\n group: item.group,\n items: item.items.filter(\n (option) => normalizedValue.indexOf(option.label.toLowerCase().trim()) === -1\n ),\n });\n } else if (normalizedValue.indexOf(item.label.toLowerCase().trim()) === -1) {\n acc.push(item);\n }\n\n return acc;\n }, []);\n\n return filtered;\n}\n"],"mappings":";;;AAOA,SAAgB,iBAAiB,EAAE,MAAM,SAAgC;CACvE,MAAM,kBAAkB,MAAM,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,YAAY,CAAC;CAiBrE,OAfiB,KAAK,QAA8B,KAAK,SAAS;EAChE,IAAIA,yBAAAA,eAAe,IAAI,GACrB,IAAI,KAAK;GACP,OAAO,KAAK;GACZ,OAAO,KAAK,MAAM,QACf,WAAW,gBAAgB,QAAQ,OAAO,MAAM,YAAY,CAAC,CAAC,KAAK,CAAC,MAAM,EAC7E;EACF,CAAC;OACI,IAAI,gBAAgB,QAAQ,KAAK,MAAM,YAAY,CAAC,CAAC,KAAK,CAAC,MAAM,IACtE,IAAI,KAAK,IAAI;EAGf,OAAO;CACT,GAAG,CAAC,CAEU;AAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-splitted-tags.cjs","names":[],"sources":["../../../src/components/TagsInput/get-splitted-tags.ts"],"sourcesContent":["function splitTags(splitChars: string[] | undefined, value: string) {\n if (!splitChars) {\n return [value];\n }\n\n return value\n .split(new RegExp(`[${splitChars.join('')}]`))\n .map((tag) => tag.trim())\n .filter((tag) => tag !== '');\n}\n\ninterface GetSplittedTagsInput {\n splitChars: string[] | undefined;\n allowDuplicates: boolean | undefined;\n maxTags: number | undefined;\n value: string;\n currentTags: string[];\n isDuplicate?: (value: string, currentValues: string[]) => boolean;\n onDuplicate?: (value: string) => void;\n}\n\nexport function getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value,\n currentTags,\n isDuplicate,\n onDuplicate,\n}: GetSplittedTagsInput) {\n const splitted = splitTags(splitChars, value);\n const merged: string[] = [];\n\n if (allowDuplicates) {\n merged.push(...currentTags, ...splitted);\n } else {\n merged.push(...currentTags);\n for (const tag of splitted) {\n const checkDuplicate = isDuplicate\n ? (val: string) => isDuplicate(val, merged)\n : (val: string) => merged.some((t) => t.toLowerCase() === val.toLowerCase());\n\n if (checkDuplicate(tag)) {\n onDuplicate?.(tag);\n } else {\n merged.push(tag);\n }\n }\n }\n\n return maxTags ? merged.slice(0, maxTags) : merged;\n}\n"],"mappings":";;AAAA,SAAS,UAAU,YAAkC,OAAe;CAClE,IAAI,CAAC,YACH,OAAO,CAAC,KAAK;CAGf,OAAO,MACJ,MAAM,IAAI,OAAO,IAAI,WAAW,KAAK,EAAE,EAAE,EAAE,CAAC,EAC5C,KAAK,QAAQ,IAAI,KAAK,CAAC,EACvB,QAAQ,QAAQ,QAAQ,EAAE;AAC/B;AAYA,SAAgB,gBAAgB,EAC9B,YACA,iBACA,SACA,OACA,aACA,aACA,eACuB;CACvB,MAAM,WAAW,UAAU,YAAY,KAAK;CAC5C,MAAM,SAAmB,CAAC;CAE1B,IAAI,iBACF,OAAO,KAAK,GAAG,aAAa,GAAG,QAAQ;MAClC;EACL,OAAO,KAAK,GAAG,WAAW;EAC1B,KAAK,MAAM,OAAO,UAKhB,KAJuB,eAClB,QAAgB,YAAY,KAAK,MAAM,KACvC,QAAgB,OAAO,MAAM,MAAM,EAAE,YAAY,MAAM,IAAI,YAAY,CAAC,GAE1D,GAAG,GACpB,cAAc,GAAG;OAEjB,OAAO,KAAK,GAAG;CAGrB;CAEA,OAAO,UAAU,OAAO,MAAM,GAAG,OAAO,IAAI;AAC9C"}
1
+ {"version":3,"file":"get-splitted-tags.cjs","names":[],"sources":["../../../src/components/TagsInput/get-splitted-tags.ts"],"sourcesContent":["function splitTags(splitChars: string[] | undefined, value: string) {\n if (!splitChars) {\n return [value];\n }\n\n return value\n .split(new RegExp(`[${splitChars.join('')}]`))\n .map((tag) => tag.trim())\n .filter((tag) => tag !== '');\n}\n\ninterface GetSplittedTagsInput {\n splitChars: string[] | undefined;\n allowDuplicates: boolean | undefined;\n maxTags: number | undefined;\n value: string;\n currentTags: string[];\n isDuplicate?: (value: string, currentValues: string[]) => boolean;\n onDuplicate?: (value: string) => void;\n}\n\nexport function getSplittedTags({\n splitChars,\n allowDuplicates,\n maxTags,\n value,\n currentTags,\n isDuplicate,\n onDuplicate,\n}: GetSplittedTagsInput) {\n const splitted = splitTags(splitChars, value);\n const merged: string[] = [];\n\n if (allowDuplicates) {\n merged.push(...currentTags, ...splitted);\n } else {\n merged.push(...currentTags);\n for (const tag of splitted) {\n const checkDuplicate = isDuplicate\n ? (val: string) => isDuplicate(val, merged)\n : (val: string) => merged.some((t) => t.toLowerCase() === val.toLowerCase());\n\n if (checkDuplicate(tag)) {\n onDuplicate?.(tag);\n } else {\n merged.push(tag);\n }\n }\n }\n\n return maxTags ? merged.slice(0, maxTags) : merged;\n}\n"],"mappings":";;AAAA,SAAS,UAAU,YAAkC,OAAe;CAClE,IAAI,CAAC,YACH,OAAO,CAAC,KAAK;CAGf,OAAO,MACJ,MAAM,IAAI,OAAO,IAAI,WAAW,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAC7C,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CACxB,QAAQ,QAAQ,QAAQ,EAAE;AAC/B;AAYA,SAAgB,gBAAgB,EAC9B,YACA,iBACA,SACA,OACA,aACA,aACA,eACuB;CACvB,MAAM,WAAW,UAAU,YAAY,KAAK;CAC5C,MAAM,SAAmB,CAAC;CAE1B,IAAI,iBACF,OAAO,KAAK,GAAG,aAAa,GAAG,QAAQ;MAClC;EACL,OAAO,KAAK,GAAG,WAAW;EAC1B,KAAK,MAAM,OAAO,UAKhB,KAJuB,eAClB,QAAgB,YAAY,KAAK,MAAM,KACvC,QAAgB,OAAO,MAAM,MAAM,EAAE,YAAY,MAAM,IAAI,YAAY,CAAC,EAAA,CAE1D,GAAG,GACpB,cAAc,GAAG;OAEjB,OAAO,KAAK,GAAG;CAGrB;CAEA,OAAO,UAAU,OAAO,MAAM,GAAG,OAAO,IAAI;AAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","names":["createVarsResolver","getFontSize","getLineHeight","getGradient","polymorphicFactory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n getFontSize,\n getGradient,\n getLineHeight,\n MantineFontSize,\n MantineGradient,\n MantineLineHeight,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Text.module.css';\n\ntype TextTruncate = 'end' | 'start' | boolean;\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start';\n }\n\n if (truncate === 'end' || truncate) {\n return 'end';\n }\n\n return undefined;\n}\n\nexport type TextStylesNames = 'root';\nexport type TextVariant = 'text' | 'gradient';\nexport type TextCssVariables = {\n root: '--text-gradient' | '--text-line-clamp' | '--text-fz' | '--text-lh' | '--text-text-wrap';\n};\n\nexport interface TextProps extends BoxProps, StylesApiProps<TextFactory> {\n __staticSelector?: string;\n\n /** Controls `font-size` and `line-height` @default 'md' */\n size?: MantineFontSize | MantineLineHeight;\n\n /** Number of lines after which Text will be truncated */\n lineClamp?: number;\n\n /** Side on which Text must be truncated, if `true`, text is truncated from the start */\n truncate?: TextTruncate;\n\n /** Sets `line-height` to 1 for centering @default false */\n inline?: boolean;\n\n /** Determines whether font properties should be inherited from the parent @default false */\n inherit?: boolean;\n\n /** Gradient configuration, ignored when `variant` is not `gradient` @default theme.defaultGradient */\n gradient?: MantineGradient;\n\n /** Shorthand for `component=\"span\"` */\n span?: boolean;\n\n /** Controls `text-wrap` CSS property */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TextFactory = PolymorphicFactory<{\n props: TextProps;\n defaultComponent: 'p';\n defaultRef: HTMLParagraphElement;\n stylesNames: TextStylesNames;\n vars: TextCssVariables;\n variant: TextVariant;\n}>;\n\nconst defaultProps = {\n inherit: false,\n} satisfies Partial<TextProps>;\n\nconst varsResolver = createVarsResolver<TextFactory>(\n // Will be removed in 9.0\n\n (theme, { variant, lineClamp, gradient, size, textWrap }) => ({\n root: {\n '--text-fz': getFontSize(size),\n '--text-lh': getLineHeight(size),\n '--text-gradient': variant === 'gradient' ? getGradient(gradient, theme) : undefined,\n '--text-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--text-text-wrap': textWrap,\n },\n })\n);\n\nexport const Text = polymorphicFactory<TextFactory>((_props) => {\n const props = useProps('Text', defaultProps, _props);\n const {\n lineClamp,\n truncate,\n inline,\n inherit,\n gradient,\n span,\n textWrap,\n __staticSelector,\n vars,\n className,\n style,\n classNames,\n styles,\n unstyled,\n variant,\n mod,\n size,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TextFactory>({\n name: ['Text', __staticSelector],\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={span ? 'span' : 'p'}\n variant={variant}\n mod={[\n {\n 'data-truncate': getTextTruncate(truncate),\n 'data-line-clamp': typeof lineClamp === 'number',\n 'data-inline': inline,\n 'data-inherit': inherit,\n },\n mod,\n ]}\n size={size}\n {...others}\n />\n );\n});\n\nText.classes = classes;\nText.varsResolver = varsResolver;\nText.displayName = '@mantine/core/Text';\n\nexport namespace Text {\n export type Props = TextProps;\n export type StylesNames = TextStylesNames;\n export type CssVariables = TextCssVariables;\n export type Factory = TextFactory;\n export type Variant = TextVariant;\n}\n"],"mappings":";;;;;;;;;;;AAoBA,SAAS,gBAAgB,UAAoC;CAC3D,IAAI,aAAa,SACf,OAAO;CAGT,IAAI,aAAa,SAAS,UACxB,OAAO;AAIX;AA6CA,MAAM,eAAe,EACnB,SAAS,MACX;AAEA,MAAM,eAAeA,6BAAAA,oBAGlB,OAAO,EAAE,SAAS,WAAW,UAAU,MAAM,gBAAgB,EAC5D,MAAM;CACJ,aAAaC,iBAAAA,YAAY,IAAI;CAC7B,aAAaC,iBAAAA,cAAc,IAAI;CAC/B,mBAAmB,YAAY,aAAaC,qBAAAA,YAAY,UAAU,KAAK,IAAI,KAAA;CAC3E,qBAAqB,OAAO,cAAc,WAAW,UAAU,SAAS,IAAI,KAAA;CAC5E,oBAAoB;AACtB,EACF,EACF;AAEA,MAAa,OAAOC,4BAAAA,oBAAiC,WAAW;CAC9D,MAAM,QAAQC,kBAAAA,SAAS,QAAQ,cAAc,MAAM;CACnD,MAAM,EACJ,WACA,UACA,QACA,SACA,UACA,MACA,UACA,kBACA,MACA,WACA,OACA,YACA,QACA,UACA,SACA,KACA,MACA,YACA,GAAG,WACD;CAgBJ,OACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAhBcC,mBAAAA,UAAuB;GACvC,MAAM,CAAC,QAAQ,gBAAgB;GAC/B;GACA,SAAA,oBAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAIgB,EAAE,QAAQ,EAAE,WAAW,KAAK,CAAC;EACzC,WAAW,OAAO,SAAS;EAClB;EACT,KAAK,CACH;GACE,iBAAiB,gBAAgB,QAAQ;GACzC,mBAAmB,OAAO,cAAc;GACxC,eAAe;GACf,gBAAgB;EAClB,GACA,GACF;EACM;EACN,GAAI;CACL,CAAA;AAEL,CAAC;AAED,KAAK,UAAUC,oBAAAA;AACf,KAAK,eAAe;AACpB,KAAK,cAAc"}
1
+ {"version":3,"file":"Text.cjs","names":["createVarsResolver","getFontSize","getLineHeight","getGradient","polymorphicFactory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n getFontSize,\n getGradient,\n getLineHeight,\n MantineFontSize,\n MantineGradient,\n MantineLineHeight,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Text.module.css';\n\ntype TextTruncate = 'end' | 'start' | boolean;\n\nfunction getTextTruncate(truncate: TextTruncate | undefined) {\n if (truncate === 'start') {\n return 'start';\n }\n\n if (truncate === 'end' || truncate) {\n return 'end';\n }\n\n return undefined;\n}\n\nexport type TextStylesNames = 'root';\nexport type TextVariant = 'text' | 'gradient';\nexport type TextCssVariables = {\n root: '--text-gradient' | '--text-line-clamp' | '--text-fz' | '--text-lh' | '--text-text-wrap';\n};\n\nexport interface TextProps extends BoxProps, StylesApiProps<TextFactory> {\n __staticSelector?: string;\n\n /** Controls `font-size` and `line-height` @default 'md' */\n size?: MantineFontSize | MantineLineHeight;\n\n /** Number of lines after which Text will be truncated */\n lineClamp?: number;\n\n /** Side on which Text must be truncated, if `true`, text is truncated from the start */\n truncate?: TextTruncate;\n\n /** Sets `line-height` to 1 for centering @default false */\n inline?: boolean;\n\n /** Determines whether font properties should be inherited from the parent @default false */\n inherit?: boolean;\n\n /** Gradient configuration, ignored when `variant` is not `gradient` @default theme.defaultGradient */\n gradient?: MantineGradient;\n\n /** Shorthand for `component=\"span\"` */\n span?: boolean;\n\n /** Controls `text-wrap` CSS property */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TextFactory = PolymorphicFactory<{\n props: TextProps;\n defaultComponent: 'p';\n defaultRef: HTMLParagraphElement;\n stylesNames: TextStylesNames;\n vars: TextCssVariables;\n variant: TextVariant;\n}>;\n\nconst defaultProps = {\n inherit: false,\n} satisfies Partial<TextProps>;\n\nconst varsResolver = createVarsResolver<TextFactory>(\n // Will be removed in 9.0\n\n (theme, { variant, lineClamp, gradient, size, textWrap }) => ({\n root: {\n '--text-fz': getFontSize(size),\n '--text-lh': getLineHeight(size),\n '--text-gradient': variant === 'gradient' ? getGradient(gradient, theme) : undefined,\n '--text-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--text-text-wrap': textWrap,\n },\n })\n);\n\nexport const Text = polymorphicFactory<TextFactory>((_props) => {\n const props = useProps('Text', defaultProps, _props);\n const {\n lineClamp,\n truncate,\n inline,\n inherit,\n gradient,\n span,\n textWrap,\n __staticSelector,\n vars,\n className,\n style,\n classNames,\n styles,\n unstyled,\n variant,\n mod,\n size,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TextFactory>({\n name: ['Text', __staticSelector],\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={span ? 'span' : 'p'}\n variant={variant}\n mod={[\n {\n 'data-truncate': getTextTruncate(truncate),\n 'data-line-clamp': typeof lineClamp === 'number',\n 'data-inline': inline,\n 'data-inherit': inherit,\n },\n mod,\n ]}\n size={size}\n {...others}\n />\n );\n});\n\nText.classes = classes;\nText.varsResolver = varsResolver;\nText.displayName = '@mantine/core/Text';\n\nexport namespace Text {\n export type Props = TextProps;\n export type StylesNames = TextStylesNames;\n export type CssVariables = TextCssVariables;\n export type Factory = Text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"TextInput.cjs","names":["factory","InputBase","useProps"],"sources":["../../../src/components/TextInput/TextInput.tsx"],"sourcesContent":["import { BoxProps, ElementProps, factory, Factory, StylesApiProps, useProps } from '../../core';\nimport { __BaseInputProps, __InputStylesNames, InputVariant } from '../Input';\nimport { InputBase } from '../InputBase';\n\nexport interface TextInputProps\n extends\n BoxProps,\n __BaseInputProps,\n StylesApiProps<TextInputFactory>,\n ElementProps<'input', 'size'> {}\n\nexport type TextInputFactory = Factory<{\n props: TextInputProps;\n variant: InputVariant;\n ref: HTMLInputElement;\n stylesNames: __InputStylesNames;\n}>;\n\nexport const TextInput = factory<TextInputFactory>((props) => {\n const _props = useProps(['Input', 'InputWrapper', 'TextInput'], null, props);\n return <InputBase component=\"input\" {..._props} __staticSelector=\"TextInput\" />;\n});\n\nTextInput.classes = InputBase.classes;\nTextInput.displayName = '@mantine/core/TextInput';\n\nexport namespace TextInput {\n export type Props = TextInputProps;\n export type Factory = TextInputFactory;\n}\n"],"mappings":";;;;;;AAkBA,MAAa,YAAYA,gBAAAA,SAA2B,UAAU;CAE5D,OAAO,iBAAA,GAAA,kBAAA,KAACC,kBAAAA,WAAD;EAAW,WAAU;EAAQ,GADrBC,kBAAAA,SAAS;GAAC;GAAS;GAAgB;EAAW,GAAG,MAAM,KACzB;EAAG,kBAAiB;CAAa,CAAA;AAChF,CAAC;AAED,UAAU,UAAUD,kBAAAA,UAAU;AAC9B,UAAU,cAAc"}
1
+ {"version":3,"file":"TextInput.cjs","names":["factory","InputBase","useProps"],"sources":["../../../src/components/TextInput/TextInput.tsx"],"sourcesContent":["import { BoxProps, ElementProps, factory, Factory, StylesApiProps, useProps } from '../../core';\nimport { __BaseInputProps, __InputStylesNames, InputVariant } from '../Input';\nimport { InputBase } from '../InputBase';\n\nexport interface TextInputProps\n extends\n BoxProps,\n __BaseInputProps,\n StylesApiProps<TextInputFactory>,\n ElementProps<'input', 'size'> {}\n\nexport type TextInputFactory = Factory<{\n props: TextInputProps;\n variant: InputVariant;\n ref: HTMLInputElement;\n stylesNames: __InputStylesNames;\n}>;\n\nexport const TextInput = factory<TextInputFactory>((props) => {\n const _props = useProps(['Input', 'InputWrapper', 'TextInput'], null, props);\n return <InputBase component=\"input\" {..._props} __staticSelector=\"TextInput\" />;\n});\n\nTextInput.classes = InputBase.classes;\nTextInput.displayName = '@mantine/core/TextInput';\n\nexport namespace TextInput {\n export type Props = TextInputProps;\n export type Factory = TextInputFactory;\n}\n"],"mappings":";;;;;;AAkBA,MAAa,YAAYA,gBAAAA,SAA2B,UAAU;CAE5D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;EAAW,WAAU;EAAQ,GADrBC,kBAAAA,SAAS;GAAC;GAAS;GAAgB;EAAW,GAAG,MAAM,KACzB;EAAG,kBAAiB;CAAa,CAAA;AAChF,CAAC;AAED,UAAU,UAAUD,kBAAAA,UAAU;AAC9B,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Autosize.cjs","names":[],"sources":["../../../src/components/Textarea/Autosize.tsx"],"sourcesContent":["import React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\n\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nexport interface TextareaAutosizeProps extends Omit<TextareaProps, 'style'> {\n ref?: React.Ref<HTMLTextAreaElement>;\n maxRows?: number;\n minRows?: number;\n style?: Omit<NonNullable<TextareaProps['style']>, 'maxHeight' | 'minHeight'> & {\n height?: number;\n };\n}\n\nconst SIZING_STYLE_KEYS = [\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopWidth',\n 'boxSizing',\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'letterSpacing',\n 'lineHeight',\n 'paddingBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'tabSize',\n 'textIndent',\n 'textRendering',\n 'textTransform',\n 'width',\n 'wordBreak',\n 'wordSpacing',\n 'scrollbarGutter',\n] as const;\n\ntype SizingStyleKey = (typeof SIZING_STYLE_KEYS)[number];\n\ninterface SizingData {\n sizingStyle: Pick<CSSStyleDeclaration, Extract<SizingStyleKey, keyof CSSStyleDeclaration>>;\n paddingSize: number;\n borderSize: number;\n}\n\nconst HIDDEN_TEXTAREA_STYLE: Record<string, string> = {\n 'min-height': '0',\n 'max-height': 'none',\n height: '0',\n visibility: 'hidden',\n overflow: 'hidden',\n position: 'absolute',\n 'z-index': '-1000',\n top: '0',\n right: '0',\n display: 'block',\n};\n\nfunction forceHiddenStyles(node: HTMLElement) {\n Object.keys(HIDDEN_TEXTAREA_STYLE).forEach((key) => {\n node.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');\n });\n}\n\nfunction getSizingData(node: HTMLElement): SizingData | null {\n const style = window.getComputedStyle(node);\n\n if (style === null) {\n return null;\n }\n\n const sizingStyle = {} as SizingData['sizingStyle'];\n for (const key of SIZING_STYLE_KEYS) {\n (sizingStyle as any)[key] = style[key as keyof CSSStyleDeclaration];\n }\n\n if ((sizingStyle as any).boxSizing === '') {\n return null;\n }\n\n const paddingSize = parseFloat(sizingStyle.paddingBottom!) + parseFloat(sizingStyle.paddingTop!);\n\n const borderSize =\n parseFloat(sizingStyle.borderBottomWidth!) + parseFloat(sizingStyle.borderTopWidth!);\n\n return { sizingStyle, paddingSize, borderSize };\n}\n\nlet hiddenTextarea: HTMLTextAreaElement | null = null;\n\nfunction calculateNodeHeight(\n sizingData: SizingData,\n value: string,\n minRows = 1,\n maxRows = Infinity\n): [number, number] {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea');\n hiddenTextarea.setAttribute('tabindex', '-1');\n hiddenTextarea.setAttribute('aria-hidden', 'true');\n hiddenTextarea.setAttribute('aria-label', 'autosize measurement');\n forceHiddenStyles(hiddenTextarea);\n }\n\n if (hiddenTextarea.parentNode === null) {\n document.body.appendChild(hiddenTextarea);\n }\n\n const { paddingSize, borderSize, sizingStyle } = sizingData;\n const { boxSizing } = sizingStyle;\n\n Object.keys(sizingStyle).forEach((key) => {\n (hiddenTextarea!.style as any)[key] = (sizingStyle as any)[key];\n });\n\n forceHiddenStyles(hiddenTextarea);\n\n hiddenTextarea.value = value;\n let height =\n boxSizing === 'border-box'\n ? hiddenTextarea.scrollHeight + borderSize\n : hiddenTextarea.scrollHeight - paddingSize;\n\n // Double set and calc due to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1795904\n hiddenTextarea.value = value;\n height =\n boxSizing === 'border-box'\n ? hiddenTextarea.scrollHeight + borderSize\n : hiddenTextarea.scrollHeight - paddingSize;\n\n hiddenTextarea.value = 'x';\n const rowHeight = hiddenTextarea.scrollHeight - paddingSize;\n\n let minHeight = rowHeight * minRows;\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize;\n }\n height = Math.max(minHeight, height);\n\n let maxHeight = rowHeight * maxRows;\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n height = Math.min(maxHeight, height);\n\n return [height, rowHeight];\n}\n\nexport function TextareaAutosize({\n maxRows,\n minRows,\n onChange,\n ref: userRef,\n ...props\n}: TextareaAutosizeProps) {\n const isControlled = props.value !== undefined;\n const libRef = useRef<HTMLTextAreaElement | null>(null);\n const ref = useMergedRef(libRef, userRef);\n const heightRef = useRef(0);\n const widthRef = useRef(0);\n\n const resizeTextarea = () => {\n const node = libRef.current;\n\n if (!node) {\n return;\n }\n\n const nodeSizingData = getSizingData(node);\n\n if (!nodeSizingData) {\n return;\n }\n\n const [height] = calculateNodeHeight(\n nodeSizingData,\n node.value || node.placeholder || 'x',\n minRows,\n maxRows\n );\n\n if (heightRef.current !== height) {\n heightRef.current = height;\n node.style.setProperty('height', `${height}px`, 'important');\n }\n };\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) {\n resizeTextarea();\n }\n onChange?.(event);\n };\n\n useLayoutEffect(resizeTextarea);\n\n useEffect(() => {\n const handleResize = () => resizeTextarea();\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n useEffect(() => {\n const node = libRef.current;\n\n if (!node || typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n widthRef.current = node.offsetWidth;\n\n const observer = new ResizeObserver(() => {\n if (libRef.current && libRef.current.offsetWidth !== widthRef.current) {\n widthRef.current = libRef.current.offsetWidth;\n resizeTextarea();\n }\n });\n\n observer.observe(node);\n return () => observer.disconnect();\n }, []);\n\n useEffect(() => {\n const handleFontsLoaded = () => resizeTextarea();\n document.fonts.addEventListener('loadingdone', handleFontsLoaded);\n return () => document.fonts.removeEventListener('loadingdone', handleFontsLoaded);\n }, []);\n\n useEffect(() => {\n const handleReset = (event: Event) => {\n if (libRef.current?.form === event.target && !isControlled) {\n const currentValue = libRef.current!.value;\n requestAnimationFrame(() => {\n if (libRef.current && currentValue !== libRef.current.value) {\n resizeTextarea();\n }\n });\n }\n };\n document.body.addEventListener('reset', handleReset);\n return () => document.body.removeEventListener('reset', handleReset);\n }, [isControlled]);\n\n return <textarea {...props} onChange={handleChange} ref={ref} />;\n}\n"],"mappings":";;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,MAAM,wBAAgD;CACpD,cAAc;CACd,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,UAAU;CACV,UAAU;CACV,WAAW;CACX,KAAK;CACL,OAAO;CACP,SAAS;AACX;AAEA,SAAS,kBAAkB,MAAmB;CAC5C,OAAO,KAAK,qBAAqB,EAAE,SAAS,QAAQ;EAClD,KAAK,MAAM,YAAY,KAAK,sBAAsB,MAAM,WAAW;CACrE,CAAC;AACH;AAEA,SAAS,cAAc,MAAsC;CAC3D,MAAM,QAAQ,OAAO,iBAAiB,IAAI;CAE1C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AA,iBAAgB;EACd,MAAM,0BAA0B,eAAe;EAC/C,SAAS,MAAM,iBAAiB,eAAe,iBAAiB;EAChE,aAAa,SAAS,MAAM,oBAAoB,eAAe,iBAAiB;CAClF,GAAG,CAAC,CAAC;CAEL,CAAA,GAAA,MAAA,iBAAgB;EACd,MAAM,eAAe,UAAiB;GACpC,IAAI,OAAO,SAAS,SAAS,MAAM,UAAU,CAAC,cAAc;IAC1D,MAAM,eAAe,OAAO,QAAS;IACrC,4BAA4B;KAC1B,IAAI,OAAO,WAAW,iBAAiB,OAAO,QAAQ,OACpD,eAAe;IAEnB,CAAC;GACH;EACF;EACA,SAAS,KAAK,iBAAiB,SAAS,WAAW;EACnD,aAAa,SAAS,KAAK,oBAAoB,SAAS,WAAW;CACrE,GAAG,CAAC,YAAY,CAAC;CAEjB,OAAO,iBAAA,GAAA,kBAAA,KAAC,YAAD;EAAU,GAAI;EAAO,UAAU;EAAmB;CAAM,CAAA;AACjE"}
1
+ {"version":3,"file":"Autosize.cjs","names":[],"sources":["../../../src/components/Textarea/Autosize.tsx"],"sourcesContent":["import React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\n\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nexport interface TextareaAutosizeProps extends Omit<TextareaProps, 'style'> {\n ref?: React.Ref<HTMLTextAreaElement>;\n maxRows?: number;\n minRows?: number;\n style?: Omit<NonNullable<TextareaProps['style']>, 'maxHeight' | 'minHeight'> & {\n height?: number;\n };\n}\n\nconst SIZING_STYLE_KEYS = [\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopWidth',\n 'boxSizing',\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'letterSpacing',\n 'lineHeight',\n 'paddingBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'tabSize',\n 'textIndent',\n 'textRendering',\n 'textTransform',\n 'width',\n 'wordBreak',\n 'wordSpacing',\n 'scrollbarGutter',\n] as const;\n\ntype SizingStyleKey = (typeof SIZING_STYLE_KEYS)[number];\n\ninterface SizingData {\n sizingStyle: Pick<CSSStyleDeclaration, Extract<SizingStyleKey, keyof CSSStyleDeclaration>>;\n paddingSize: number;\n borderSize: number;\n}\n\nconst HIDDEN_TEXTAREA_STYLE: Record<string, string> = {\n 'min-height': '0',\n 'max-height': 'none',\n height: '0',\n visibility: 'hidden',\n overflow: 'hidden',\n position: 'absolute',\n 'z-index': '-1000',\n top: '0',\n right: '0',\n display: 'block',\n};\n\nfunction forceHiddenStyles(node: HTMLElement) {\n Object.keys(HIDDEN_TEXTAREA_STYLE).forEach((key) => {\n node.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');\n });\n}\n\nfunction getSizingData(node: HTMLElement): SizingData | null {\n const style = window.getComputedStyle(node);\n\n if (style === null) {\n return null;\n }\n\n const sizingStyle = {} as SizingData['sizingStyle'];\n for (const key of SIZING_STYLE_KEYS) {\n (sizingStyle as any)[key] = style[key as keyof CSSStyleDeclaration];\n }\n\n if ((sizingStyle as any).boxSizing === '') {\n return null;\n }\n\n const paddingSize = parseFloat(sizingStyle.paddingBottom!) + parseFloat(sizingStyle.paddingTop!);\n\n const borderSize =\n parseFloat(sizingStyle.borderBottomWidth!) + parseFloat(sizingStyle.borderTopWidth!);\n\n return { sizingStyle, paddingSize, borderSize };\n}\n\nlet hiddenTextarea: HTMLTextAreaElement | null = null;\n\nfunction calculateNodeHeight(\n sizingData: SizingData,\n value: string,\n minRows = 1,\n maxRows = Infinity\n): [number, number] {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea');\n hiddenTextarea.setAttribute('tabindex', '-1');\n hiddenTextarea.setAttribute('aria-hidden', 'true');\n hiddenTextarea.setAttribute('aria-label', 'autosize measurement');\n forceHiddenStyles(hiddenTextarea);\n }\n\n if (hiddenTextarea.parentNode === null) {\n document.body.appendChild(hiddenTextarea);\n }\n\n const { paddingSize, borderSize, sizingStyle } = sizingData;\n const { boxSizing } = sizingStyle;\n\n Object.keys(sizingStyle).forEach((key) => {\n (hiddenTextarea!.style as any)[key] = (sizingStyle as any)[key];\n });\n\n forceHiddenStyles(hiddenTextarea);\n\n hiddenTextarea.value = value;\n let height =\n boxSizing === 'border-box'\n ? hiddenTextarea.scrollHeight + borderSize\n : hiddenTextarea.scrollHeight - paddingSize;\n\n // Double set and calc due to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1795904\n hiddenTextarea.value = value;\n height =\n boxSizing === 'border-box'\n ? hiddenTextarea.scrollHeight + borderSize\n : hiddenTextarea.scrollHeight - paddingSize;\n\n hiddenTextarea.value = 'x';\n const rowHeight = hiddenTextarea.scrollHeight - paddingSize;\n\n let minHeight = rowHeight * minRows;\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize;\n }\n height = Math.max(minHeight, height);\n\n let maxHeight = rowHeight * maxRows;\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n height = Math.min(maxHeight, height);\n\n return [height, rowHeight];\n}\n\nexport function TextareaAutosize({\n maxRows,\n minRows,\n onChange,\n ref: userRef,\n ...props\n}: TextareaAutosizeProps) {\n const isControlled = props.value !== undefined;\n const libRef = useRef<HTMLTextAreaElement | null>(null);\n const ref = useMergedRef(libRef, userRef);\n const heightRef = useRef(0);\n const widthRef = useRef(0);\n\n const resizeTextarea = () => {\n const node = libRef.current;\n\n if (!node) {\n return;\n }\n\n const nodeSizingData = getSizingData(node);\n\n if (!nodeSizingData) {\n return;\n }\n\n const [height] = calculateNodeHeight(\n nodeSizingData,\n node.value || node.placeholder || 'x',\n minRows,\n maxRows\n );\n\n if (heightRef.current !== height) {\n heightRef.current = height;\n node.style.setProperty('height', `${height}px`, 'important');\n }\n };\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) {\n resizeTextarea();\n }\n onChange?.(event);\n };\n\n useLayoutEffect(resizeTextarea);\n\n useEffect(() => {\n const handleResize = () => resizeTextarea();\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n useEffect(() => {\n const node = libRef.current;\n\n if (!node || typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n widthRef.current = node.offsetWidth;\n\n const observer = new ResizeObserver(() => {\n if (libRef.current && libRef.current.offsetWidth !== widthRef.current) {\n widthRef.current = libRef.current.offsetWidth;\n resizeTextarea();\n }\n });\n\n observer.observe(node);\n return () => observer.disconnect();\n }, []);\n\n useEffect(() => {\n const handleFontsLoaded = () => resizeTextarea();\n document.fonts.addEventListener('loadingdone', handleFontsLoaded);\n return () => document.fonts.removeEventListener('loadingdone', handleFontsLoaded);\n }, []);\n\n useEffect(() => {\n const handleReset = (event: Event) => {\n if (libRef.current?.form === event.target && !isControlled) {\n const currentValue = libRef.current!.value;\n requestAnimationFrame(() => {\n if (libRef.current && currentValue !== libRef.current.value) {\n resizeTextarea();\n }\n });\n }\n };\n document.body.addEventListener('reset', handleReset);\n return () => document.body.removeEventListener('reset', handleReset);\n }, [isControlled]);\n\n return <textarea {...props} onChange={handleChange} ref={ref} />;\n}\n"],"mappings":";;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,MAAM,wBAAgD;CACpD,cAAc;CACd,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,UAAU;CACV,UAAU;CACV,WAAW;CACX,KAAK;CACL,OAAO;CACP,SAAS;AACX;AAEA,SAAS,kBAAkB,MAAmB;CAC5C,OAAO,KAAK,qBAAqB,CAAC,CAAC,SAAS,QAAQ;EAClD,KAAK,MAAM,YAAY,KAAK,sBAAsB,MAAM,WAAW;CACrE,CAAC;AACH;AAEA,SAAS,cAAc,MAAsC;CAC3D,MAAM,QAAQ,OAAO,iBAA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AAa,SAAS,WAAW;CACnC,GAAG,CAAC,CAAC;CAEL,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,MAAM,0BAA0B,eAAe;EAC/C,SAAS,MAAM,iBAAiB,eAAe,iBAAiB;EAChE,aAAa,SAAS,MAAM,oBAAoB,eAAe,iBAAiB;CAClF,GAAG,CAAC,CAAC;CAEL,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,MAAM,eAAe,UAAiB;GACpC,IAAI,OAAO,SAAS,SAAS,MAAM,UAAU,CAAC,cAAc;IAC1D,MAAM,eAAe,OAAO,QAAS;IACrC,4BAA4B;KAC1B,IAAI,OAAO,WAAW,iBAAiB,OAAO,QAAQ,OACpD,eAAe;IAEnB,CAAC;GACH;EACF;EACA,SAAS,KAAK,iBAAiB,SAAS,WAAW;EACnD,aAAa,SAAS,KAAK,oBAAoB,SAAS,WAAW;CACrE,GAAG,CAAC,YAAY,CAAC;CAEjB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;EAAU,GAAI;EAAO,UAAU;EAAmB;CAAM,CAAA;AACjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.cjs","names":["factory","useProps","getEnv","InputBase","TextareaAutosize"],"sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import {\n BoxProps,\n ElementProps,\n factory,\n Factory,\n getEnv,\n StylesApiProps,\n useProps,\n} from '../../core';\nimport { __BaseInputProps, __InputStylesNames } from '../Input';\nimport { InputBase } from '../InputBase';\nimport { TextareaAutosize } from './Autosize';\n\nexport interface TextareaProps\n extends\n BoxProps,\n __BaseInputProps,\n StylesApiProps<TextareaFactory>,\n ElementProps<'textarea', 'size'> {\n __staticSelector?: string;\n\n /** If set, enables textarea height growing with its content @default false */\n autosize?: boolean;\n\n /** Maximum rows for autosize textarea to grow, ignored if `autosize` prop is not set */\n maxRows?: number;\n\n /** Minimum rows of autosize textarea, ignored if `autosize` prop is not set */\n minRows?: number;\n\n /** Controls `resize` CSS property @default 'none' */\n resize?: React.CSSProperties['resize'];\n\n /** Content rendered at the bottom of the input, inside the border */\n bottomSection?: React.ReactNode;\n\n /** Props passed down to the `bottomSection` element */\n bottomSectionProps?: React.ComponentProps<'div'>;\n}\n\nexport type TextareaFactory = Factory<{\n props: TextareaProps;\n ref: HTMLTextAreaElement;\n stylesNames: __InputStylesNames;\n}>;\n\nexport const Textarea = factory<TextareaFactory>((props) => {\n const {\n autosize,\n maxRows,\n minRows,\n __staticSelector,\n resize,\n bottomSection,\n bottomSectionProps,\n ...others\n } = useProps(['Input', 'InputWrapper', 'Textarea'], null, props);\n\n const shouldAutosize = autosize && getEnv() !== 'test';\n const autosizeProps = shouldAutosize ? { maxRows, minRows } : {};\n\n return (\n <InputBase<any>\n component={shouldAutosize ? TextareaAutosize : 'textarea'}\n {...others}\n __staticSelector={__staticSelector || 'Textarea'}\n __bottomSection={bottomSection}\n __bottomSectionProps={bottomSectionProps}\n multiline\n data-no-overflow={(autosize && maxRows === undefined) || undefined}\n __vars={{ '--input-resize': resize }}\n {...autosizeProps}\n />\n );\n});\n\nTextarea.classes = InputBase.classes;\nTextarea.displayName = '@mantine/core/Textarea';\n\nexport namespace Textarea {\n export type Props = TextareaProps;\n export type Factory = TextareaFactory;\n}\n"],"mappings":";;;;;;;;AA8CA,MAAa,WAAWA,gBAAAA,SAA0B,UAAU;CAC1D,MAAM,EACJ,UACA,SACA,SACA,kBACA,QACA,eACA,oBACA,GAAG,WACDC,kBAAAA,SAAS;EAAC;EAAS;EAAgB;CAAU,GAAG,MAAM,KAAK;CAE/D,MAAM,iBAAiB,YAAYC,gBAAAA,OAAO,MAAM;CAChD,MAAM,gBAAgB,iBAAiB;EAAE;EAAS;CAAQ,IAAI,CAAC;CAE/D,OACE,iBAAA,GAAA,kBAAA,KAACC,kBAAAA,WAAD;EACE,WAAW,iBAAiBC,iBAAAA,mBAAmB;EAC/C,GAAI;EACJ,kBAAkB,oBAAoB;EACtC,iBAAiB;EACjB,sBAAsB;EACtB,WAAA;EACA,oBAAmB,YAAY,YAAY,KAAA,KAAc,KAAA;EACzD,QAAQ,EAAE,kBAAkB,OAAO;EACnC,GAAI;CACL,CAAA;AAEL,CAAC;AAED,SAAS,UAAUD,kBAAAA,UAAU;AAC7B,SAAS,cAAc"}
1
+ {"version":3,"file":"Textarea.cjs","names":["factory","useProps","getEnv","InputBase","TextareaAutosize"],"sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import {\n BoxProps,\n ElementProps,\n factory,\n Factory,\n getEnv,\n StylesApiProps,\n useProps,\n} from '../../core';\nimport { __BaseInputProps, __InputStylesNames } from '../Input';\nimport { InputBase } from '../InputBase';\nimport { TextareaAutosize } from './Autosize';\n\nexport interface TextareaProps\n extends\n BoxProps,\n __BaseInputProps,\n StylesApiProps<TextareaFactory>,\n ElementProps<'textarea', 'size'> {\n __staticSelector?: string;\n\n /** If set, enables textarea height growing with its content @default false */\n autosize?: boolean;\n\n /** Maximum rows for autosize textarea to grow, ignored if `autosize` prop is not set */\n maxRows?: number;\n\n /** Minimum rows of autosize textarea, ignored if `autosize` prop is not set */\n minRows?: number;\n\n /** Controls `resize` CSS property @default 'none' */\n resize?: React.CSSProperties['resize'];\n\n /** Content rendered at the bottom of the input, inside the border */\n bottomSection?: React.ReactNode;\n\n /** Props passed down to the `bottomSection` element */\n bottomSectionProps?: React.ComponentProps<'div'>;\n}\n\nexport type TextareaFactory = Factory<{\n props: TextareaProps;\n ref: HTMLTextAreaElement;\n stylesNames: __InputStylesNames;\n}>;\n\nexport const Textarea = factory<TextareaFactory>((props) => {\n const {\n autosize,\n maxRows,\n minRows,\n __staticSelector,\n resize,\n bottomSection,\n bottomSectionProps,\n ...others\n } = useProps(['Input', 'InputWrapper', 'Textarea'], null, props);\n\n const shouldAutosize = autosize && getEnv() !== 'test';\n const autosizeProps = shouldAutosize ? { maxRows, minRows } : {};\n\n return (\n <InputBase<any>\n component={shouldAutosize ? TextareaAutosize : 'textarea'}\n {...others}\n __staticSelector={__staticSelector || 'Textarea'}\n __bottomSection={bottomSection}\n __bottomSectionProps={bottomSectionProps}\n multiline\n data-no-overflow={(autosize && maxRows === undefined) || undefined}\n __vars={{ '--input-resize': resize }}\n {...autosizeProps}\n />\n );\n});\n\nTextarea.classes = InputBase.classes;\nTextarea.displayName = '@mantine/core/Textarea';\n\nexport namespace Textarea {\n export type Props = TextareaProps;\n export type Factory = TextareaFactory;\n}\n"],"mappings":";;;;;;;;AA8CA,MAAa,WAAWA,gBAAAA,SAA0B,UAAU;CAC1D,MAAM,EACJ,UACA,SACA,SACA,kBACA,QACA,eACA,oBACA,GAAG,WACDC,kBAAAA,SAAS;EAAC;EAAS;EAAgB;CAAU,GAAG,MAAM,KAAK;CAE/D,MAAM,iBAAiB,YAAYC,gBAAAA,OAAO,MAAM;CAChD,MAAM,gBAAgB,iBAAiB;EAAE;EAAS;CAAQ,IAAI,CAAC;CAE/D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;EACE,WAAW,iBAAiBC,iBAAAA,mBAAmB;EAC/C,GAAI;EACJ,kBAAkB,oBAAoB;EACtC,iBAAiB;EACjB,sBAAsB;EACtB,WAAA;EACA,oBAAmB,YAAY,YAAY,KAAA,KAAc,KAAA;EACzD,QAAQ,EAAE,kBAAkB,OAAO;EACnC,GAAI;CACL,CAAA;AAEL,CAAC;AAED,SAAS,UAAUD,kBAAAA,UAAU;AAC7B,SAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeIcon.cjs","names":["createVarsResolver","getSize","getRadius","factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/ThemeIcon/ThemeIcon.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getSize,\n MantineColor,\n MantineGradient,\n MantineRadius,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './ThemeIcon.module.css';\n\nexport type ThemeIconStylesNames = 'root';\nexport type ThemeIconVariant =\n | 'filled'\n | 'light'\n | 'outline'\n | 'transparent'\n | 'white'\n | 'default'\n | 'gradient';\n\nexport type ThemeIconCssVariables = {\n root: '--ti-radius' | '--ti-size' | '--ti-bg' | '--ti-color' | '--ti-bd';\n};\n\nexport interface ThemeIconProps\n extends BoxProps, StylesApiProps<ThemeIconFactory>, ElementProps<'div'> {\n /** Controls width and height of the button. Numbers are converted to rem. @default 'md' */\n size?: MantineSize | (string & {}) | number;\n\n /** Key of `theme.colors` or any valid CSS color. @default theme.primaryColor */\n color?: MantineColor;\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 /** Gradient data used when `variant=\"gradient\"` @default theme.defaultGradient */\n gradient?: MantineGradient;\n\n /** Icon displayed inside the component */\n children?: React.ReactNode;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type ThemeIconFactory = Factory<{\n props: ThemeIconProps;\n ref: HTMLDivElement;\n stylesNames: ThemeIconStylesNames;\n vars: ThemeIconCssVariables;\n variant: ThemeIconVariant;\n}>;\n\nconst varsResolver = createVarsResolver<ThemeIconFactory>(\n (theme, { size, radius, variant, gradient, color, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n gradient,\n variant: variant || 'filled',\n autoContrast,\n });\n\n return {\n root: {\n '--ti-size': getSize(size, 'ti-size'),\n '--ti-radius': radius === undefined ? undefined : getRadius(radius),\n '--ti-bg': color || variant ? colors.background : undefined,\n '--ti-color': color || variant ? colors.color : undefined,\n '--ti-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const ThemeIcon = factory<ThemeIconFactory>((_props) => {\n const props = useProps('ThemeIcon', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n autoContrast,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ThemeIconFactory>({\n name: 'ThemeIcon',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nThemeIcon.classes = classes;\nThemeIcon.varsResolver = varsResolver;\nThemeIcon.displayName = '@mantine/core/ThemeIcon';\n\nexport namespace ThemeIcon {\n export type Props = ThemeIconProps;\n export type StylesNames = ThemeIconStylesNames;\n export type Factory = ThemeIconFactory;\n export type Variant = ThemeIconVariant;\n export type CssVariables = ThemeIconCssVariables;\n}\n"],"mappings":";;;;;;;;;;AA8DA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,UAAU,OAAO,mBAAmB;CACnE,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA;EACA,SAAS,WAAW;EACpB;CACF,CAAC;CAED,OAAO,EACL,MAAM;EACJ,aAAaC,iBAAAA,QAAQ,MAAM,SAAS;EACpC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EAClE,WAAW,SAAS,UAAU,OAAO,aAAa,KAAA;EAClD,cAAc,SAAS,UAAU,OAAO,QAAQ,KAAA;EAChD,WAAW,SAAS,UAAU,OAAO,SAAS,KAAA;CAChD,EACF;AACF,CACF;AAEA,MAAa,YAAYC,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS,aAAa,MAAM,MAAM;CAChD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,cACA,YACA,GAAG,WACD;CAgBJ,OAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,GAdMC,mBAAAA,UAA4B;GAC5C,MAAM;GACN,SAAA,yBAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAEwB,EAAE,MAAM;EAAG,GAAI;CAAS,CAAA;AAClD,CAAC;AAED,UAAU,UAAUC,yBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
1
+ {"version":3,"file":"ThemeIcon.cjs","names":["createVarsResolver","getSize","getRadius","factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/ThemeIcon/ThemeIcon.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getSize,\n MantineColor,\n MantineGradient,\n MantineRadius,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './ThemeIcon.module.css';\n\nexport type ThemeIconStylesNames = 'root';\nexport type ThemeIconVariant =\n | 'filled'\n | 'light'\n | 'outline'\n | 'transparent'\n | 'white'\n | 'default'\n | 'gradient';\n\nexport type ThemeIconCssVariables = {\n root: '--ti-radius' | '--ti-size' | '--ti-bg' | '--ti-color' | '--ti-bd';\n};\n\nexport interface ThemeIconProps\n extends BoxProps, StylesApiProps<ThemeIconFactory>, ElementProps<'div'> {\n /** Controls width and height of the button. Numbers are converted to rem. @default 'md' */\n size?: MantineSize | (string & {}) | number;\n\n /** Key of `theme.colors` or any valid CSS color. @default theme.primaryColor */\n color?: MantineColor;\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 /** Gradient data used when `variant=\"gradient\"` @default theme.defaultGradient */\n gradient?: MantineGradient;\n\n /** Icon displayed inside the component */\n children?: React.ReactNode;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type ThemeIconFactory = Factory<{\n props: ThemeIconProps;\n ref: HTMLDivElement;\n stylesNames: ThemeIconStylesNames;\n vars: ThemeIconCssVariables;\n variant: ThemeIconVariant;\n}>;\n\nconst varsResolver = createVarsResolver<ThemeIconFactory>(\n (theme, { size, radius, variant, gradient, color, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n gradient,\n variant: variant || 'filled',\n autoContrast,\n });\n\n return {\n root: {\n '--ti-size': getSize(size, 'ti-size'),\n '--ti-radius': radius === undefined ? undefined : getRadius(radius),\n '--ti-bg': color || variant ? colors.background : undefined,\n '--ti-color': color || variant ? colors.color : undefined,\n '--ti-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const ThemeIcon = factory<ThemeIconFactory>((_props) => {\n const props = useProps('ThemeIcon', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n autoContrast,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ThemeIconFactory>({\n name: 'ThemeIcon',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nThemeIcon.classes = classes;\nThemeIcon.varsResolver = varsResolver;\nThemeIcon.displayName = '@mantine/core/ThemeIcon';\n\nexport namespace ThemeIcon {\n export type Props = ThemeIconProps;\n export type StylesNames = ThemeIconStylesNames;\n export type Factory = ThemeIconFactory;\n export type Variant = ThemeIconVariant;\n export type CssVariables = ThemeIconCssVariables;\n}\n"],"mappings":";;;;;;;;;;AA8DA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,UAAU,OAAO,mBAAmB;CACnE,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA;EACA,SAAS,WAAW;EACpB;CACF,CAAC;CAED,OAAO,EACL,MAAM;EACJ,aAAaC,iBAAAA,QAAQ,MAAM,SAAS;EACpC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EAClE,WAAW,SAAS,UAAU,OAAO,aAAa,KAAA;EAClD,cAAc,SAAS,UAAU,OAAO,QAAQ,KAAA;EAChD,WAAW,SAAS,UAAU,OAAO,SAAS,KAAA;CAChD,EACF;AACF,CACF;AAEA,MAAa,YAAYC,gBAAAA,SAA2B,WAAW;CAC7D,MAAM,QAAQC,kBAAAA,SAAS,aAAa,MAAM,MAAM;CAChD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,cACA,YACA,GAAG,WACD;CAgBJ,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EAAK,GAdMC,mBAAAA,UAA4B;GAC5C,MAAM;GACN,SAAA,yBAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAEwB,CAAC,CAAC,MAAM;EAAG,GAAI;CAAS,CAAA;AAClD,CAAC;AAED,UAAU,UAAUC,yBAAAA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.cjs","names":["createVarsResolver","rem","getRadius","getThemeColor","getAutoContrastValue","getContrastColor","factory","useProps","useStyles","Children","TimelineProvider","Box","classes","TimelineItem"],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import { Children, cloneElement } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getAutoContrastValue,\n getContrastColor,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TimelineProvider } from './Timeline.context';\nimport {\n TimelineItem,\n TimelineItemStylesNames,\n type TimelineItemProps,\n type TimelineItemFactory,\n} from './TimelineItem/TimelineItem';\nimport classes from './Timeline.module.css';\nexport type TimelineStylesNames = 'root' | TimelineItemStylesNames;\nexport type TimelineCssVariables = {\n root: '--tl-line-width' | '--tl-bullet-size' | '--tl-color' | '--tl-icon-color' | '--tl-radius';\n};\n\nexport interface TimelineProps\n extends BoxProps, StylesApiProps<TimelineFactory>, ElementProps<'div'> {\n /** `Timeline.Item` components */\n children?: React.ReactNode;\n\n /** Index of the active element */\n active?: number;\n\n /** Key of `theme.colors` or any valid CSS color to control active item colors @default theme.primaryColor */\n color?: MantineColor;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default 'xl' */\n radius?: MantineRadius;\n\n /** Size of the bullet @default 20 */\n bulletSize?: number | string;\n\n /** Position of content relative to the bullet @default 'left' */\n align?: 'right' | 'left';\n\n /** Control width of the line */\n lineWidth?: number | string;\n\n /** If set, the active items direction is reversed without reversing items order @default false */\n reverseActive?: boolean;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type TimelineFactory = Factory<{\n props: TimelineProps;\n ref: HTMLDivElement;\n stylesNames: TimelineStylesNames;\n vars: TimelineCssVariables;\n staticComponents: {\n Item: typeof TimelineItem;\n };\n}>;\n\nconst defaultProps = {\n active: -1,\n align: 'left',\n} satisfies Partial<TimelineProps>;\n\nconst varsResolver = createVarsResolver<TimelineFactory>(\n (theme, { bulletSize, lineWidth, radius, color, autoContrast }) => ({\n root: {\n '--tl-bullet-size': rem(bulletSize),\n '--tl-line-width': rem(lineWidth),\n '--tl-radius': radius === undefined ? undefined : getRadius(radius),\n '--tl-color': color ? getThemeColor(color, theme) : undefined,\n '--tl-icon-color': getAutoContrastValue(autoContrast, theme)\n ? getContrastColor({ color, theme, autoContrast })\n : undefined,\n },\n })\n);\n\nexport const Timeline = factory<TimelineFactory>((_props) => {\n const props = useProps('Timeline', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n active,\n color,\n radius,\n bulletSize,\n align,\n lineWidth,\n reverseActive,\n mod,\n autoContrast,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TimelineFactory>({\n name: 'Timeline',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const _children = Children.toArray(children);\n const items = _children.map((item: any, index) =>\n cloneElement(item, {\n unstyled,\n __align: align,\n __active:\n item.props?.active ||\n (reverseActive ? active >= _children.length - index - 1 : active >= index),\n __lineActive:\n item.props?.lineActive ||\n (reverseActive ? active >= _children.length - index - 1 : active - 1 >= index),\n })\n );\n\n return (\n <TimelineProvider value={{ getStyles }}>\n <Box {...getStyles('root')} mod={[{ align }, mod]} {...others}>\n {items}\n </Box>\n </TimelineProvider>\n );\n});\n\nTimeline.classes = classes;\nTimeline.varsResolver = varsResolver;\nTimeline.displayName = '@mantine/core/Timeline';\nTimeline.Item = TimelineItem;\n\nexport namespace Timeline {\n export type Props = TimelineProps;\n export type StylesNames = TimelineStylesNames;\n export type CssVariables = TimelineCssVariables;\n export type Factory = TimelineFactory;\n\n export namespace Item {\n export type Props = TimelineItemProps;\n export type StylesNames = TimelineItemStylesNames;\n export type Factory = TimelineItemFactory;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwEA,MAAM,eAAe;CACnB,QAAQ;CACR,OAAO;AACT;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,YAAY,WAAW,QAAQ,OAAO,oBAAoB,EAClE,MAAM;CACJ,oBAAoBC,YAAAA,IAAI,UAAU;CAClC,mBAAmBA,YAAAA,IAAI,SAAS;CAChC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CAClE,cAAc,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CACpD,mBAAmBC,gCAAAA,qBAAqB,cAAc,KAAK,IACvDC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;CAAa,CAAC,IAC/C,KAAA;AACN,EACF,EACF;AAEA,MAAa,WAAWC,gBAAAA,SAA0B,WAAW;CAC3D,MAAM,QAAQC,kBAAAA,SAAS,YAAY,cAAc,MAAM;CACvD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,QACA,OACA,QACA,YACA,OACA,WACA,eACA,KACA,cACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA2B;EAC3C,MAAM;EACN,SAAA,wBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,YAAYC,MAAAA,SAAS,QAAQ,QAAQ;CAC3C,MAAM,QAAQ,UAAU,KAAK,MAAW,WAAA,GAAA,MAAA,cACzB,MAAM;EACjB;EACA,SAAS;EACT,UACE,KAAK,OAAO,WACX,gBAAgB,UAAU,UAAU,SAAS,QAAQ,IAAI,UAAU;EACtE,cACE,KAAK,OAAO,eACX,gBAAgB,UAAU,UAAU,SAAS,QAAQ,IAAI,SAAS,KAAK;CAC5E,CAAC,CACH;CAEA,OACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,kBAAD;EAAkB,OAAO,EAAE,UAAU;YACnC,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;GAAK,GAAI,UAAU,MAAM;GAAG,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG;GAAG,GAAI;aACpD;EACE,CAAA;CACW,CAAA;AAEtB,CAAC;AAED,SAAS,UAAUC,wBAAAA;AACnB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,OAAOC,qBAAAA"}
1
+ {"version":3,"file":"Timeline.cjs","names":["createVarsResolver","rem","getRadius","getThemeColor","getAutoContrastValue","getContrastColor","factory","useProps","useStyles","Children","TimelineProvider","Box","classes","TimelineItem"],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import { Children, cloneElement } from 'react';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getAutoContrastValue,\n getContrastColor,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TimelineProvider } from './Timeline.context';\nimport {\n TimelineItem,\n TimelineItemStylesNames,\n type TimelineItemProps,\n type TimelineItemFactory,\n} from './TimelineItem/TimelineItem';\nimport classes from './Timeline.module.css';\nexport type TimelineStylesNames = 'root' | TimelineItemStylesNames;\nexport type TimelineCssVariables = {\n root: '--tl-line-width' | '--tl-bullet-size' | '--tl-color' | '--tl-icon-color' | '--tl-radius';\n};\n\nexport interface TimelineProps\n extends BoxProps, StylesApiProps<TimelineFactory>, ElementProps<'div'> {\n /** `Timeline.Item` components */\n children?: React.ReactNode;\n\n /** Index of the active element */\n active?: number;\n\n /** Key of `theme.colors` or any valid CSS color to control active item colors @default theme.primaryColor */\n color?: MantineColor;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default 'xl' */\n radius?: MantineRadius;\n\n /** Size of the bullet @default 20 */\n bulletSize?: number | string;\n\n /** Position of content relative to the bullet @default 'left' */\n align?: 'right' | 'left';\n\n /** Control width of the line */\n lineWidth?: number | string;\n\n /** If set, the active items direction is reversed without reversing items order @default false */\n reverseActive?: boolean;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type TimelineFactory = Factory<{\n props: TimelineProps;\n ref: HTMLDivElement;\n stylesNames: TimelineStylesNames;\n vars: TimelineCssVariables;\n staticComponents: {\n Item: typeof TimelineItem;\n };\n}>;\n\nconst defaultProps = {\n active: -1,\n align: 'left',\n} satisfies Partial<TimelineProps>;\n\nconst varsResolver = createVarsResolver<TimelineFactory>(\n (theme, { bulletSize, lineWidth, radius, color, autoContrast }) => ({\n root: {\n '--tl-bullet-size': rem(bulletSize),\n '--tl-line-width': rem(lineWidth),\n '--tl-radius': radius === undefined ? undefined : getRadius(radius),\n '--tl-color': color ? getThemeColor(color, theme) : undefined,\n '--tl-icon-color': getAutoContrastValue(autoContrast, theme)\n ? getContrastColor({ color, theme, autoContrast })\n : undefined,\n },\n })\n);\n\nexport const Timeline = factory<TimelineFactory>((_props) => {\n const props = useProps('Timeline', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n active,\n color,\n radius,\n bulletSize,\n align,\n lineWidth,\n reverseActive,\n mod,\n autoContrast,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TimelineFactory>({\n name: 'Timeline',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const _children = Children.toArray(children);\n const items = _children.map((item: any, index) =>\n cloneElement(item, {\n unstyled,\n __align: align,\n __active:\n item.props?.active ||\n (reverseActive ? active >= _children.length - index - 1 : active >= index),\n __lineActive:\n item.props?.lineActive ||\n (reverseActive ? active >= _children.length - index - 1 : active - 1 >= index),\n })\n );\n\n return (\n <TimelineProvider value={{ getStyles }}>\n <Box {...getStyles('root')} mod={[{ align }, mod]} {...others}>\n {items}\n </Box>\n </TimelineProvider>\n );\n});\n\nTimeline.classes = classes;\nTimeline.varsResolver = varsResolver;\nTimeline.displayName = '@mantine/core/Timeline';\nTimeline.Item = TimelineItem;\n\nexport namespace Timeline {\n export type Props = TimelineProps;\n export type StylesNames = TimelineStylesNames;\n export type CssVariables = TimelineCssVariables;\n export type Factory = TimelineFactory;\n\n export namespace Item {\n export type Props = TimelineItemProps;\n export type StylesNames = TimelineItemStylesNames;\n export type Factory = TimelineItemFactory;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwEA,MAAM,eAAe;CACnB,QAAQ;CACR,OAAO;AACT;AAEA,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,YAAY,WAAW,QAAQ,OAAO,oBAAoB,EAClE,MAAM;CACJ,oBAAoBC,YAAAA,IAAI,UAAU;CAClC,mBAAmBA,YAAAA,IAAI,SAAS;CAChC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CAClE,cAAc,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CACpD,mBAAmBC,gCAAAA,qBAAqB,cAAc,KAAK,IACvDC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;CAAa,CAAC,IAC/C,KAAA;AACN,EACF,EACF;AAEA,MAAa,WAAWC,gBAAAA,SAA0B,WAAW;CAC3D,MAAM,QAAQC,kBAAAA,SAAS,YAAY,cAAc,MAAM;CACvD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,QACA,OACA,QACA,YACA,OACA,WACA,eACA,KACA,cACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAA2B;EAC3C,MAAM;EACN,SAAA,wBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,MAAM,YAAYC,MAAAA,SAAS,QAAQ,QAAQ;CAC3C,MAAM,QAAQ,UAAU,KAAK,MAAW,WAAA,GAAA,MAAA,aAAA,CACzB,MAAM;EACjB;EACA,SAAS;EACT,UACE,KAAK,OAAO,WACX,gBAAgB,UAAU,UAAU,SAAS,QAAQ,IAAI,UAAU;EACtE,cACE,KAAK,OAAO,eACX,gBAAgB,UAAU,UAAU,SAAS,QAAQ,IAAI,SAAS,KAAK;CAC5E,CAAC,CACH;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;EAAkB,OAAO,EAAE,UAAU;YACnC,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;GAAK,GAAI,UAAU,MAAM;GAAG,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG;GAAG,GAAI;aACpD;EACE,CAAA;CACW,CAAA;AAEtB,CAAC;AAED,SAAS,UAAUC,wBAAAA;AACnB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,OAAOC,qBAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.context.cjs","names":["createSafeContext"],"sources":["../../../src/components/Timeline/Timeline.context.ts"],"sourcesContent":["import { createSafeContext, GetStylesApi } from '../../core';\nimport type { TimelineFactory } from './Timeline';\n\ninterface TimelineContextValue {\n getStyles: GetStylesApi<TimelineFactory>;\n}\n\nexport const [TimelineProvider, useTimelineContext] = createSafeContext<TimelineContextValue>(\n 'Timeline component was not found in tree'\n);\n"],"mappings":";;AAOA,MAAa,CAAC,kBAAkB,4FAAsBA,EAAAA,kBACpD,0CACF"}
1
+ {"version":3,"file":"Timeline.context.cjs","names":["createSafeContext"],"sources":["../../../src/components/Timeline/Timeline.context.ts"],"sourcesContent":["import { createSafeContext, GetStylesApi } from '../../core';\nimport type { TimelineFactory } from './Timeline';\n\ninterface TimelineContextValue {\n getStyles: GetStylesApi<TimelineFactory>;\n}\n\nexport const [TimelineProvider, useTimelineContext] = createSafeContext<TimelineContextValue>(\n 'Timeline component was not found in tree'\n);\n"],"mappings":";;AAOA,MAAa,CAAC,kBAAkB,4FAAsBA,CAAAA,CAAAA,kBACpD,0CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"TimelineItem.cjs","names":["factory","useProps","useTimelineContext","useMantineTheme","Box","getRadius","getThemeColor","classes"],"sources":["../../../../src/components/Timeline/TimelineItem/TimelineItem.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n useMantineTheme,\n useProps,\n} from '../../../core';\nimport { useTimelineContext } from '../Timeline.context';\nimport classes from '../Timeline.module.css';\n\nexport type TimelineItemStylesNames =\n | 'itemBody'\n | 'itemContent'\n | 'itemBullet'\n | 'item'\n | 'itemTitle';\n\nexport interface TimelineItemProps\n extends BoxProps, CompoundStylesApiProps<TimelineItemFactory>, ElementProps<'div', 'title'> {\n __active?: boolean;\n __lineActive?: boolean;\n __align?: 'right' | 'left';\n\n /** Item title, displayed next to the bullet */\n title?: React.ReactNode;\n\n /** Content displayed below the title */\n children?: React.ReactNode;\n\n /** React node that should be rendered inside the bullet – icon, image, avatar, etc. By default, large white dot is displayed. */\n bullet?: React.ReactNode;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default 'xl' */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color to control active item colors @default theme.primaryColor */\n color?: MantineColor;\n\n /** Controls line border style @default 'solid' */\n lineVariant?: 'solid' | 'dashed' | 'dotted';\n}\n\nexport type TimelineItemFactory = Factory<{\n props: TimelineItemProps;\n ref: HTMLDivElement;\n stylesNames: TimelineItemStylesNames;\n compound: true;\n}>;\n\nexport const TimelineItem = factory<TimelineItemFactory>((_props) => {\n const props = useProps('TimelineItem', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n vars,\n __active,\n __align,\n __lineActive,\n __vars,\n bullet,\n radius,\n color,\n lineVariant,\n children,\n title,\n mod,\n ...others\n } = props;\n\n const ctx = useTimelineContext();\n const theme = useMantineTheme();\n\n const stylesApiProps = { classNames, styles };\n\n return (\n <Box\n {...ctx.getStyles('item', { ...stylesApiProps, className, style })}\n mod={[{ 'line-active': __lineActive, active: __active }, mod]}\n __vars={{\n '--tli-radius': radius !== undefined ? getRadius(radius) : undefined,\n '--tli-color': color ? getThemeColor(color, theme) : undefined,\n '--tli-border-style': lineVariant || undefined,\n }}\n {...others}\n >\n <Box\n {...ctx.getStyles('itemBullet', stylesApiProps)}\n mod={{ 'with-child': !!bullet, align: __align, active: __active }}\n >\n {bullet}\n </Box>\n\n <div {...ctx.getStyles('itemBody', stylesApiProps)}>\n {title && <div {...ctx.getStyles('itemTitle', stylesApiProps)}>{title}</div>}\n <div {...ctx.getStyles('itemContent', stylesApiProps)}>{children}</div>\n </div>\n </Box>\n );\n});\n\nTimelineItem.classes = classes;\nTimelineItem.displayName = '@mantine/core/TimelineItem';\n"],"mappings":";;;;;;;;;;;AAwDA,MAAa,eAAeA,gBAAAA,SAA8B,WAAW;CAEnE,MAAM,EACJ,YACA,WACA,OACA,QACA,MACA,UACA,SACA,cACA,QACA,QACA,QACA,OACA,aACA,UACA,OACA,KACA,GAAG,WAlBSC,kBAAAA,SAAS,gBAAgB,MAAM,MAmBrC;CAER,MAAM,MAAMC,yBAAAA,mBAAmB;CAC/B,MAAM,QAAQC,6BAAAA,gBAAgB;CAE9B,MAAM,iBAAiB;EAAE;EAAY;CAAO;CAE5C,OACE,iBAAA,GAAA,kBAAA,MAACC,YAAAA,KAAD;EACE,GAAI,IAAI,UAAU,QAAQ;GAAE,GAAG;GAAgB;GAAW;EAAM,CAAC;EACjE,KAAK,CAAC;GAAE,eAAe;GAAc,QAAQ;EAAS,GAAG,GAAG;EAC5D,QAAQ;GACN,gBAAgB,WAAW,KAAA,IAAYC,iBAAAA,UAAU,MAAM,IAAI,KAAA;GAC3D,eAAe,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;GACrD,sBAAsB,eAAe,KAAA;EACvC;EACA,GAAI;YARN,CAUE,iBAAA,GAAA,kBAAA,KAACF,YAAAA,KAAD;GACE,GAAI,IAAI,UAAU,cAAc,cAAc;GAC9C,KAAK;IAAE,cAAc,CAAC,CAAC;IAAQ,OAAO;IAAS,QAAQ;GAAS;aAE/D;EACE,CAAA,GAEL,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,GAAI,IAAI,UAAU,YAAY,cAAc;aAAjD,CACG,SAAS,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,GAAI,IAAI,UAAU,aAAa,cAAc;cAAI;GAAW,CAAA,GAC3E,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,GAAI,IAAI,UAAU,eAAe,cAAc;IAAI;GAAc,CAAA,CACnE;IACF;;AAET,CAAC;AAED,aAAa,UAAUG,wBAAAA;AACvB,aAAa,cAAc"}
1
+ {"version":3,"file":"TimelineItem.cjs","names":["factory","useProps","useTimelineContext","useMantineTheme","Box","getRadius","getThemeColor","classes"],"sources":["../../../../src/components/Timeline/TimelineItem/TimelineItem.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n getRadius,\n getThemeColor,\n MantineColor,\n MantineRadius,\n useMantineTheme,\n useProps,\n} from '../../../core';\nimport { useTimelineContext } from '../Timeline.context';\nimport classes from '../Timeline.module.css';\n\nexport type TimelineItemStylesNames =\n | 'itemBody'\n | 'itemContent'\n | 'itemBullet'\n | 'item'\n | 'itemTitle';\n\nexport interface TimelineItemProps\n extends BoxProps, CompoundStylesApiProps<TimelineItemFactory>, ElementProps<'div', 'title'> {\n __active?: boolean;\n __lineActive?: boolean;\n __align?: 'right' | 'left';\n\n /** Item title, displayed next to the bullet */\n title?: React.ReactNode;\n\n /** Content displayed below the title */\n children?: React.ReactNode;\n\n /** React node that should be rendered inside the bullet – icon, image, avatar, etc. By default, large white dot is displayed. */\n bullet?: React.ReactNode;\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem @default 'xl' */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color to control active item colors @default theme.primaryColor */\n color?: MantineColor;\n\n /** Controls line border style @default 'solid' */\n lineVariant?: 'solid' | 'dashed' | 'dotted';\n}\n\nexport type TimelineItemFactory = Factory<{\n props: TimelineItemProps;\n ref: HTMLDivElement;\n stylesNames: TimelineItemStylesNames;\n compound: true;\n}>;\n\nexport const TimelineItem = factory<TimelineItemFactory>((_props) => {\n const props = useProps('TimelineItem', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n vars,\n __active,\n __align,\n __lineActive,\n __vars,\n bullet,\n radius,\n color,\n lineVariant,\n children,\n title,\n mod,\n ...others\n } = props;\n\n const ctx = useTimelineContext();\n const theme = useMantineTheme();\n\n const stylesApiProps = { classNames, styles };\n\n return (\n <Box\n {...ctx.getStyles('item', { ...stylesApiProps, className, style })}\n mod={[{ 'line-active': __lineActive, active: __active }, mod]}\n __vars={{\n '--tli-radius': radius !== undefined ? getRadius(radius) : undefined,\n '--tli-color': color ? getThemeColor(color, theme) : undefined,\n '--tli-border-style': lineVariant || undefined,\n }}\n {...others}\n >\n <Box\n {...ctx.getStyles('itemBullet', stylesApiProps)}\n mod={{ 'with-child': !!bullet, align: __align, active: __active }}\n >\n {bullet}\n </Box>\n\n <div {...ctx.getStyles('itemBody', stylesApiProps)}>\n {title && <div {...ctx.getStyles('itemTitle', stylesApiProps)}>{title}</div>}\n <div {...ctx.getStyles('itemContent', stylesApiProps)}>{children}</div>\n </div>\n </Box>\n );\n});\n\nTimelineItem.classes = classes;\nT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UG,wBAAAA;AACvB,aAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Title.cjs","names":["createVarsResolver","getTitleSize","factory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineFontSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getTitleSize } from './get-title-size';\nimport classes from './Title.module.css';\n\nexport type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;\nexport type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] | MantineFontSize;\n\nexport type TitleStylesNames = 'root';\nexport type TitleCssVariables = {\n root: '--title-fw' | '--title-lh' | '--title-fz' | '--title-line-clamp' | '--title-text-wrap';\n};\n\nexport interface TitleProps\n extends BoxProps, StylesApiProps<TitleFactory>, ElementProps<'h1', 'color'> {\n /** Heading order (1-6), controls `font-size` style if `size` prop is not set @default 1 */\n order?: TitleOrder;\n\n /** Changes title size, if not set, then size is controlled by `order` prop */\n size?: TitleSize;\n\n /** Number of lines after which heading will be truncated */\n lineClamp?: number;\n\n /** Heading `text-wrap` CSS property @default 'wrap' */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TitleFactory = Factory<{\n props: TitleProps;\n ref: HTMLHeadingElement;\n stylesNames: TitleStylesNames;\n vars: TitleCssVariables;\n}>;\n\nconst defaultProps = {\n order: 1,\n} satisfies Partial<TitleProps>;\n\nconst varsResolver = createVarsResolver<TitleFactory>((_, { order, size, lineClamp, textWrap }) => {\n const sizeVariables = getTitleSize(order || 1, size);\n return {\n root: {\n '--title-fw': sizeVariables.fontWeight,\n '--title-lh': sizeVariables.lineHeight,\n '--title-fz': sizeVariables.fontSize,\n '--title-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--title-text-wrap': textWrap,\n },\n };\n});\n\nexport const Title = factory<TitleFactory>((_props) => {\n const props = useProps('Title', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n order,\n vars,\n size,\n variant,\n lineClamp,\n textWrap,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TitleFactory>({\n name: 'Title',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (![1, 2, 3, 4, 5, 6].includes(order)) {\n return null;\n }\n\n return (\n <Box\n {...getStyles('root')}\n component={`h${order}`}\n variant={variant}\n mod={[{ order, 'data-line-clamp': typeof lineClamp === 'number' }, mod]}\n size={size}\n {...others}\n />\n );\n});\n\nTitle.classes = classes;\nTitle.varsResolver = varsResolver;\nTitle.displayName = '@mantine/core/Title';\n\nexport namespace Title {\n export type Props = TitleProps;\n export type Order = TitleOrder;\n export type Size = TitleSize;\n export type StylesNames = TitleStylesNames;\n export type CssVariables = TitleCssVariables;\n export type Factory = TitleFactory;\n}\n"],"mappings":";;;;;;;;;;AA6CA,MAAM,eAAe,EACnB,OAAO,EACT;AAEA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgBC,uBAAAA,aAAa,SAAS,GAAG,IAAI;CACnD,OAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,SAAS,IAAI,KAAA;EAC7E,qBAAqB;CACvB,EACF;AACF,CAAC;AAED,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,OACA,MACA,MACA,SACA,WACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAAwB;EACxC,MAAM;EACN;EACA,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,IAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;CAAC,EAAE,SAAS,KAAK,GACpC,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAAI,UAAU,MAAM;EACpB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;EAAS,GAAG,GAAG;EAChE;EACN,GAAI;CACL,CAAA;AAEL,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
1
+ {"version":3,"file":"Title.cjs","names":["createVarsResolver","getTitleSize","factory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineFontSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getTitleSize } from './get-title-size';\nimport classes from './Title.module.css';\n\nexport type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;\nexport type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] | MantineFontSize;\n\nexport type TitleStylesNames = 'root';\nexport type TitleCssVariables = {\n root: '--title-fw' | '--title-lh' | '--title-fz' | '--title-line-clamp' | '--title-text-wrap';\n};\n\nexport interface TitleProps\n extends BoxProps, StylesApiProps<TitleFactory>, ElementProps<'h1', 'color'> {\n /** Heading order (1-6), controls `font-size` style if `size` prop is not set @default 1 */\n order?: TitleOrder;\n\n /** Changes title size, if not set, then size is controlled by `order` prop */\n size?: TitleSize;\n\n /** Number of lines after which heading will be truncated */\n lineClamp?: number;\n\n /** Heading `text-wrap` CSS property @default 'wrap' */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TitleFactory = Factory<{\n props: TitleProps;\n ref: HTMLHeadingElement;\n stylesNames: TitleStylesNames;\n vars: TitleCssVariables;\n}>;\n\nconst defaultProps = {\n order: 1,\n} satisfies Partial<TitleProps>;\n\nconst varsResolver = createVarsResolver<TitleFactory>((_, { order, size, lineClamp, textWrap }) => {\n const sizeVariables = getTitleSize(order || 1, size);\n return {\n root: {\n '--title-fw': sizeVariables.fontWeight,\n '--title-lh': sizeVariables.lineHeight,\n '--title-fz': sizeVariables.fontSize,\n '--title-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--title-text-wrap': textWrap,\n },\n };\n});\n\nexport const Title = factory<TitleFactory>((_props) => {\n const props = useProps('Title', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n order,\n vars,\n size,\n variant,\n lineClamp,\n textWrap,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TitleFactory>({\n name: 'Title',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (![1, 2, 3, 4, 5, 6].includes(order)) {\n return null;\n }\n\n return (\n <Box\n {...getStyles('root')}\n component={`h${order}`}\n variant={variant}\n mod={[{ order, 'data-line-clamp': typeof lineClamp === 'number' }, mod]}\n size={size}\n {...others}\n />\n );\n});\n\nTitle.classes = classes;\nTitle.varsResolver = varsResolver;\nTitle.displayName = '@mantine/core/Title';\n\nexport namespace Title {\n export type Props = TitleProps;\n export type Order = TitleOrder;\n export type Size = TitleSize;\n export type StylesNames = TitleStylesNames;\n export type CssVariables = TitleCssVariables;\n export type Factory = TitleFactory;\n}\n"],"mappings":";;;;;;;;;;AA6CA,MAAM,eAAe,EACnB,OAAO,EACT;AAEA,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgBC,uBAAAA,aAAa,SAAS,GAAG,IAAI;CACnD,OAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,SAAS,IAAI,KAAA;EAC7E,qBAAqB;CACvB,EACF;AACF,CAAC;AAED,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,MAAM;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,OACA,MACA,MACA,SACA,WACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAAwB;EACxC,MAAM;EACN;EACA,SAAA,qBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,IAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;CAAC,CAAC,CAAC,SAAS,KAAK,GACpC,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,GAAI,UAAU,MAAM;EACpB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;EAAS,GAAG,GAAG;EAChE;EACN,GAAI;CACL,CAAA;AAEL,CAAC;AAED,MAAM,UAAUC,qBAAAA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","factory","useProps","useDirection","useTooltip","getFloatingPosition","useStyles","getSingleElementChild","getArrowMergeDropdownStyles","getTransitionProps","OptionalPortal","Transition","Box","FloatingArrow","getRefProp","classes","TooltipFloating","TooltipGroup"],"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { cloneElement, useEffect, useRef } from 'react';\nimport cx from 'clsx';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n useDirection,\n useProps,\n useStyles,\n} from '../../core';\nimport {\n ArrowPosition,\n FloatingArrow,\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n getArrowMergeDropdownStyles,\n getFloatingPosition,\n} from '../../utils/Floating';\nimport { OptionalPortal } from '../Portal';\nimport { getTransitionProps, Transition, TransitionOverride } from '../Transition';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from './Tooltip.types';\nimport { TooltipFloating, type TooltipFloatingProps } from './TooltipFloating/TooltipFloating';\nimport {\n TooltipGroup,\n type TooltipGroupProps,\n type TooltipGroupContextValue,\n} from './TooltipGroup/TooltipGroup';\nimport { useTooltip } from './use-tooltip';\nimport classes from './Tooltip.module.css';\nexport interface TooltipProps extends TooltipBaseProps {\n /** Called when tooltip position changes */\n onPositionChange?: (position: FloatingPosition) => void;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms @default 0 */\n closeDelay?: number;\n\n /** Controlled opened state */\n opened?: boolean;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n\n /** Space between target element and tooltip in px @default 5 */\n offset?: number | FloatingAxesOffsets;\n\n /** If set, the tooltip has an arrow @default false */\n withArrow?: boolean;\n\n /** Arrow size in px @default 4 */\n arrowSize?: number;\n\n /** Arrow offset in px @default 5 */\n arrowOffset?: number;\n\n /** Arrow `border-radius` in px @default 0 */\n arrowRadius?: number;\n\n /** Arrow position relative to the tooltip @default side */\n arrowPosition?: ArrowPosition;\n\n /** Props passed down to the `Transition` component that used to animate tooltip presence, use to configure duration and animation type @default { duration: 100, transition: 'fade' } */\n transitionProps?: TransitionOverride;\n\n /** Determines which events will be used to show tooltip @default { hover: true, focus: false, touch: false } */\n events?: { hover: boolean; focus: boolean; touch: boolean };\n\n /** Must be set if the tooltip target is an inline element */\n inline?: boolean;\n\n /** If set, the tooltip is not unmounted from the DOM when hidden, `display: none` styles are applied instead */\n keepMounted?: boolean;\n\n /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy) @default 'absolute' */\n floatingStrategy?: FloatingStrategy;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n\n /** Selector, ref of an element or element itself that should be used for positioning */\n target?: React.RefObject<HTMLElement | null> | HTMLElement | null | string;\n}\n\nexport type TooltipFactory = Factory<{\n props: TooltipProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n staticComponents: {\n Floating: typeof TooltipFloating;\n Group: typeof TooltipGroup;\n };\n}>;\n\nconst defaultProps = {\n position: 'top',\n refProp: 'ref',\n withinPortal: true,\n arrowSize: 4,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n offset: 5,\n transitionProps: { duration: 100, transition: 'fade' },\n events: { hover: true, focus: false, touch: false },\n zIndex: getDefaultZIndex('popover'),\n middlewares: { flip: true, shift: true, inline: false },\n} satisfies Partial<TooltipProps>;\n\nconst varsResolver = createVarsResolver<TooltipFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n theme,\n color: color || theme.primaryColor,\n autoContrast,\n variant: variant || 'filled',\n });\n\n return {\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? colors.background : undefined,\n '--tooltip-color': color ? colors.color : undefined,\n },\n };\n }\n);\n\nexport const Tooltip = factory<TooltipFactory>((_props) => {\n const props = useProps('Tooltip', defaultProps, _props);\n const {\n children,\n position,\n refProp,\n label,\n openDelay,\n closeDelay,\n onPositionChange,\n opened,\n defaultOpened,\n withinPortal,\n radius,\n color,\n classNames,\n styles,\n unstyled,\n style,\n className,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n offset,\n transitionProps,\n multiline,\n events,\n zIndex,\n disabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n inline,\n variant,\n keepMounted,\n vars,\n portalProps,\n mod,\n floatingStrategy,\n middlewares,\n autoContrast,\n attributes,\n target,\n ref,\n ...others\n } = props;\n\n const { dir } = useDirection();\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const tooltip = useTooltip({\n position: getFloatingPosition(dir, position),\n closeDelay,\n openDelay,\n onPositionChange,\n opened,\n defaultOpened,\n events,\n arrowRef,\n arrowOffset,\n offset: typeof offset === 'number' ? offset + (withArrow ? arrowSize / 2 : 0) : offset,\n inline,\n strategy: floatingStrategy,\n middlewares,\n });\n\n useEffect(() => {\n const targetNode =\n target instanceof HTMLElement\n ? target\n : typeof target === 'string'\n ? document.querySelector(target)\n : target?.current || null;\n\n if (targetNode) {\n tooltip.reference(targetNode);\n }\n }, [target, tooltip]);\n\n const getStyles = useStyles<TooltipFactory>({\n name: 'Tooltip',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const child = getSingleElementChild(children);\n if (!target && !child) {\n throw new Error(\n '[@mantine/core] Tooltip 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 tooltipStyles = getStyles('tooltip');\n const mergeStyles =\n arrowPosition === 'merge' && withArrow\n ? getArrowMergeDropdownStyles({ position: tooltip.placement, dir })\n : undefined;\n\n if (target) {\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltipStyles}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: tooltipStyles.className,\n style: {\n ...tooltipStyles.style,\n ...transitionStyles,\n ...mergeStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize!}\n arrowOffset={arrowOffset!}\n arrowRadius={arrowRadius!}\n arrowPosition={arrowPosition!}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n </>\n );\n }\n\n // fallback to children-based approach\n const childProps = child!.props as any;\n const targetRef = useMergedRef(tooltip.reference, getRefProp(child), ref);\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: getStyles('tooltip').className,\n style: {\n ...getStyles('tooltip').style,\n ...transitionStyles,\n ...mergeStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n\n {cloneElement(\n child!,\n tooltip.getReferenceProps({\n onClick,\n onMouseEnter,\n onMouseLeave,\n onMouseMove: props.onMouseMove,\n onPointerDown: props.onPointerDown,\n onPointerEnter: props.onPointerEnter,\n ...childProps,\n className: cx(className, childProps.className),\n [refProp]: targetRef,\n })\n )}\n </>\n );\n});\n\nTooltip.classes = classes;\nTooltip.varsResolver = varsResolver;\nTooltip.displayName = '@mantine/core/Tooltip';\nTooltip.Floating = TooltipFloating;\nTooltip.Group = TooltipGroup;\n\nexport namespace Tooltip {\n export type Props = TooltipProps;\n export type Factory = TooltipFactory;\n export type CssVariables = TooltipCssVariables;\n export type StylesNames = TooltipStylesNames;\n\n export namespace Group {\n export type Props = TooltipGroupProps;\n export type ContextValue = TooltipGroupContextValue;\n }\n\n export namespace Floating {\n export type Props = TooltipFloatingProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,MAAM,eAAe;CACnB,UAAU;CACV,SAAS;CACT,cAAc;CACd,WAAW;CACX,aAAa;CACb,aAAa;CACb,eAAe;CACf,QAAQ;CACR,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAO;CACrD,QAAQ;EAAE,OAAO;EAAM,OAAO;EAAO,OAAO;CAAM;CAClD,QAAQA,4BAAAA,iBAAiB,SAAS;CAClC,aAAa;EAAE,MAAM;EAAM,OAAO;EAAM,QAAQ;CAAM;AACxD;AAEA,MAAM,eAAeC,6BAAAA,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC;EACA,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;CACtB,CAAC;CAED,OAAO,EACL,SAAS;EACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EACvE,gBAAgB,QAAQ,OAAO,aAAa,KAAA;EAC5C,mBAAmB,QAAQ,OAAO,QAAQ,KAAA;CAC5C,EACF;AACF,CACF;AAEA,MAAa,UAAUC,gBAAAA,SAAyB,WAAW;CACzD,MAAM,QAAQC,kBAAAA,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,UACA,UACA,SACA,OACA,WACA,YACA,kBACA,QACA,eACA,cACA,QACA,OACA,YACA,QACA,UACA,OACA,WACA,WACA,WACA,aACA,aACA,eACA,QACA,iBACA,WACA,QACA,QACA,UACA,SACA,cACA,cACA,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K,CAAC,EAAE,UAAU,GAAG,GAAG;IACxB,GAAI,QAAQ,iBAAiB;KAC3B,KAAK,QAAQ;KACb,WAAW,UAAU,SAAS,EAAE;KAChC,OAAO;MACL,GAAG,UAAU,SAAS,EAAE;MACxB,GAAG;MACH,GAAG;MACK;MACR,KAAK,QAAQ,KAAK;MAClB,MAAM,QAAQ,KAAK;KACrB;IACF,CAAC;cAhBH,CAkBG,OACD,iBAAA,GAAA,kBAAA,KAACC,sBAAAA,eAAD;KACE,KAAK;KACL,QAAQ,QAAQ;KAChB,QAAQ,QAAQ;KAChB,SAAS;KACT,UAAU,QAAQ;KACP;KACE;KACA;KACE;KACf,GAAI,UAAU,OAAO;IACtB,CAAA,CACE;;EAEG,CAAA;CACE,CAAA,IAAA,GAAA,MAAA,cAGd,OACA,QAAQ,kBAAkB;EACxB;EACA;EACA;EACA,aAAa,MAAM;EACnB,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,GAAG;EACH,YAAA,GAAA,KAAA,SAAc,WAAW,WAAW,SAAS;GAC5C,UAAU;CACb,CAAC,CACH,CACA,EAAA,CAAA;AAEN,CAAC;AAED,QAAQ,UAAUE,uBAAAA;AAClB,QAAQ,eAAe;AACvB,QAAQ,cAAc;AACtB,QAAQ,WAAWC,wBAAAA;AACnB,QAAQ,QAAQC,qBAAAA"}
1
+ {"version":3,"file":"Tooltip.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","factory","useProps","useDirection","useTooltip","getFloatingPosition","useStyles","getSingleElementChild","getArrowMergeDropdownStyles","getTransitionProps","OptionalPortal","Transition","Box","FloatingArrow","getRefProp","classes","TooltipFloating","TooltipGroup"],"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { cloneElement, useEffect, useRef } from 'react';\nimport cx from 'clsx';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n useDirection,\n useProps,\n useStyles,\n} from '../../core';\nimport {\n ArrowPosition,\n FloatingArrow,\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n getArrowMergeDropdownStyles,\n getFloatingPosition,\n} from '../../utils/Floating';\nimport { OptionalPortal } from '../Portal';\nimport { getTransitionProps, Transition, TransitionOverride } from '../Transition';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from './Tooltip.types';\nimport { TooltipFloating, type TooltipFloatingProps } from './TooltipFloating/TooltipFloating';\nimport {\n TooltipGroup,\n type TooltipGroupProps,\n type TooltipGroupContextValue,\n} from './TooltipGroup/TooltipGroup';\nimport { useTooltip } from './use-tooltip';\nimport classes from './Tooltip.module.css';\nexport interface TooltipProps extends TooltipBaseProps {\n /** Called when tooltip position changes */\n onPositionChange?: (position: FloatingPosition) => void;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms @default 0 */\n closeDelay?: number;\n\n /** Controlled opened state */\n opened?: boolean;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n\n /** Space between target element and tooltip in px @default 5 */\n offset?: number | FloatingAxesOffsets;\n\n /** If set, the tooltip has an arrow @default false */\n withArrow?: boolean;\n\n /** Arrow size in px @default 4 */\n arrowSize?: number;\n\n /** Arrow offset in px @default 5 */\n arrowOffset?: number;\n\n /** Arrow `border-radius` in px @default 0 */\n arrowRadius?: number;\n\n /** Arrow position relative to the tooltip @default side */\n arrowPosition?: ArrowPosition;\n\n /** Props passed down to the `Transition` component that used to animate tooltip presence, use to configure duration and animation type @default { duration: 100, transition: 'fade' } */\n transitionProps?: TransitionOverride;\n\n /** Determines which events will be used to show tooltip @default { hover: true, focus: false, touch: false } */\n events?: { hover: boolean; focus: boolean; touch: boolean };\n\n /** Must be set if the tooltip target is an inline element */\n inline?: boolean;\n\n /** If set, the tooltip is not unmounted from the DOM when hidden, `display: none` styles are applied instead */\n keepMounted?: boolean;\n\n /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy) @default 'absolute' */\n floatingStrategy?: FloatingStrategy;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n\n /** Selector, ref of an element or element itself that should be used for positioning */\n target?: React.RefObject<HTMLElement | null> | HTMLElement | null | string;\n}\n\nexport type TooltipFactory = Factory<{\n props: TooltipProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n staticComponents: {\n Floating: typeof TooltipFloating;\n Group: typeof TooltipGroup;\n };\n}>;\n\nconst defaultProps = {\n position: 'top',\n refProp: 'ref',\n withinPortal: true,\n arrowSize: 4,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n offset: 5,\n transitionProps: { duration: 100, transition: 'fade' },\n events: { hover: true, focus: false, touch: false },\n zIndex: getDefaultZIndex('popover'),\n middlewares: { flip: true, shift: true, inline: false },\n} satisfies Partial<TooltipProps>;\n\nconst varsResolver = createVarsResolver<TooltipFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n theme,\n color: color || theme.primaryColor,\n autoContrast,\n variant: variant || 'filled',\n });\n\n return {\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? colors.background : undefined,\n '--tooltip-color': color ? colors.color : undefined,\n },\n };\n }\n);\n\nexport const Tooltip = factory<TooltipFactory>((_props) => {\n const props = useProps('Tooltip', defaultProps, _props);\n const {\n children,\n position,\n refProp,\n label,\n openDelay,\n closeDelay,\n onPositionChange,\n opened,\n defaultOpened,\n withinPortal,\n radius,\n color,\n classNames,\n styles,\n unstyled,\n style,\n className,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n offset,\n transitionProps,\n multiline,\n events,\n zIndex,\n disabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n inline,\n variant,\n keepMounted,\n vars,\n portalProps,\n mod,\n floatingStrategy,\n middlewares,\n autoContrast,\n attributes,\n target,\n ref,\n ...others\n } = props;\n\n const { dir } = useDirection();\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const tooltip = useTooltip({\n position: getFloatingPosition(dir, position),\n closeDelay,\n openDelay,\n onPositionChange,\n opened,\n defaultOpened,\n events,\n arrowRef,\n arrowOffset,\n offset: typeof offset === 'number' ? offset + (withArrow ? arrowSize / 2 : 0) : offset,\n inline,\n strategy: floatingStrategy,\n middlewares,\n });\n\n useEffect(() => {\n const targetNode =\n target instanceof HTMLElement\n ? target\n : typeof target === 'string'\n ? document.querySelector(target)\n : target?.current || null;\n\n if (targetNode) {\n tooltip.reference(targetNode);\n }\n }, [target, tooltip]);\n\n const getStyles = useStyles<TooltipFactory>({\n name: 'Tooltip',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const child = getSingleElementChild(children);\n if (!target && !child) {\n throw new Error(\n '[@mantine/core] Tooltip 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 tooltipStyles = getStyles('tooltip');\n const mergeStyles =\n arrowPosition === 'merge' && withArrow\n ? getArrowMergeDropdownStyles({ position: tooltip.placement, dir })\n : undefined;\n\n if (target) {\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltipStyles}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: tooltipStyles.className,\n style: {\n ...tooltipStyles.style,\n ...transitionStyles,\n ...mergeStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize!}\n arrowOffset={arrowOffset!}\n arrowRadius={arrowRadius!}\n arrowPosition={arrowPosition!}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n </>\n );\n }\n\n // fallback to children-based approach\n const childProps = child!.props as any;\n const targetRef = useMergedRef(tooltip.reference, getRefProp(child), ref);\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: getStyles('tooltip').className,\n style: {\n ...getStyles('tooltip').style,\n ...transitionStyles,\n ...mergeStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n\n {cloneElement(\n child!,\n tooltip.getReferenceProps({\n onClick,\n onMouseEnter,\n onMouseLeave,\n onMouseMove: props.onMouseMove,\n onPointerDown: props.onPointerDown,\n onPointerEnter: props.onPointerEnter,\n ...childProps,\n className: cx(className, childProps.className),\n [refProp]: targetRef,\n })\n )}\n </>\n );\n});\n\nTooltip.classes = classes;\nTooltip.varsResolver = varsResolver;\nTooltip.displayName = '@mantine/core/Tooltip';\nTooltip.Floating = TooltipFloating;\nTooltip.Group = TooltipGroup;\n\nexport namespace Tooltip {\n export type Props = TooltipProps;\n export type Factory = TooltipFactory;\n export type CssVariables = TooltipCssVariables;\n export type StylesNames = TooltipStylesNames;\n\n export namespace Group {\n export type Props = TooltipGroupProps;\n export type ContextValue = TooltipGroupContextValue;\n }\n\n export namespace Floating {\n export type Props = TooltipFloatingProps;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,MAAM,eAAe;CACnB,UAAU;CACV,SAAS;CACT,cAAc;CACd,WAAW;CACX,aAAa;CACb,aAAa;CACb,eAAe;CACf,QAAQ;CACR,iBAAiB;EAAE,UAAU;EAAK,YAAY;CAAO;CACrD,QAAQ;EAAE,OAAO;EAAM,OAAO;EAAO,OAAO;CAAM;CAClD,QAAQA,4BAAAA,iBAAiB,SAAS;CAClC,aAAa;EAAE,MAAM;EAAM,OAAO;EAAM,QAAQ;CAAM;AACxD;AAEA,MAAM,eAAeC,6BAAAA,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC;EACA,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;CACtB,CAAC;CAED,OAAO,EACL,SAAS;EACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;EACvE,gBAAgB,QAAQ,OAAO,aAAa,KAAA;EAC5C,mBAAmB,QAAQ,OAAO,QAAQ,KAAA;CAC5C,EACF;AACF,CACF;AAEA,MAAa,UAAUC,gBAAAA,SAAyB,WAAW;CACzD,MAAM,QAAQC,kBAAAA,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,UACA,UACA,SACA,OACA,WACA,YACA,kBACA,QACA,eACA,cACA,QACA,OACA,YACA,QACA,UACA,OACA,WACA,W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Q,eAAe,KAAK,WAAW;cAE/C,qBACA,iBAAA,GAAA,kBAAA,KAAA,CAACC,YAAAA,KAAD;IACE,GAAI;IACJ,cAAY,qBAAqB,WAAW,KAAA;IACnC;IACT,KAAK,CAAC,EAAE,UAAU,GAAG,GAAG;IACxB,GAAI,QAAQ,iBAAiB;KAC3B,KAAK,QAAQ;KACb,WAAW,UAAU,SAAS,CAAC,CAAC;KAChC,OAAO;MACL,GAAG,UAAU,SAAS,CAAC,CAAC;MACxB,GAAG;MACH,GAAG;MACK;MACR,KAAK,QAAQ,KAAK;MAClB,MAAM,QAAQ,KAAK;KACrB;IACF,CAAC;cAhBH,CAkBG,OACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,eAAD;KACE,KAAK;KACL,QAAQ,QAAQ;KAChB,QAAQ,QAAQ;KAChB,SAAS;KACT,UAAU,QAAQ;KACP;KACE;KACA;KACE;KACf,GAAI,UAAU,OAAO;IACtB,CAAA,CACE;;EAEG,CAAA;CACE,CAAA,IAAA,GAAA,MAAA,aAAA,CAGd,OACA,QAAQ,kBAAkB;EACxB;EACA;EACA;EACA,aAAa,MAAM;EACnB,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,GAAG;EACH,YAAA,GAAA,KAAA,QAAA,CAAc,WAAW,WAAW,SAAS;GAC5C,UAAU;CACb,CAAC,CACH,CACA,EAAA,CAAA;AAEN,CAAC;AAED,QAAQ,UAAUE,uBAAAA;AAClB,QAAQ,eAAe;AACvB,QAAQ,cAAc;AACtB,QAAQ,WAAWC,wBAAAA;AACnB,QAAQ,QAAQC,qBAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipFloating.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","getThemeColor","factory","useProps","useMantineTheme","useStyles","useFloatingTooltip","getSingleElementChild","getRefProp","OptionalPortal","Box","getStyleObject","classes"],"sources":["../../../../src/components/Tooltip/TooltipFloating/TooltipFloating.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n getStyleObject,\n getThemeColor,\n useMantineTheme,\n useProps,\n useStyles,\n} from '../../../core';\nimport { OptionalPortal } from '../../Portal';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from '../Tooltip.types';\nimport { useFloatingTooltip } from './use-floating-tooltip';\nimport classes from '../Tooltip.module.css';\n\nexport interface TooltipFloatingProps extends TooltipBaseProps {\n /** Offset from mouse in px @default 10 */\n offset?: number;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n}\n\nexport type TooltipFloatingFactory = Factory<{\n props: TooltipFloatingProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n}>;\n\nconst defaultProps = {\n refProp: 'ref',\n withinPortal: true,\n offset: 10,\n position: 'right',\n zIndex: getDefaultZIndex('popover'),\n} satisfies Partial<TooltipFloatingProps>;\n\nconst varsResolver = createVarsResolver<TooltipFloatingFactory>((theme, { radius, color }) => ({\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? getThemeColor(color, theme) : undefined,\n '--tooltip-color': color ? 'var(--mantine-color-white)' : undefined,\n },\n}));\n\nexport const TooltipFloating = factory<TooltipFloatingFactory>((_props) => {\n const props = useProps('TooltipFloating', defaultProps, _props);\n const {\n children,\n refProp,\n withinPortal,\n style,\n className,\n classNames,\n styles,\n unstyled,\n radius,\n color,\n label,\n offset,\n position,\n multiline,\n zIndex,\n disabled,\n defaultOpened,\n variant,\n vars,\n portalProps,\n attributes,\n ref,\n ...others\n } = props;\n\n const theme = useMantineTheme();\n const getStyles = useStyles<TooltipFloatingFactory>({\n name: 'TooltipFloating',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const { handleMouseMove, x, y, opened, boundaryRef, floating, setOpened } = useFloatingTooltip({\n offset,\n position,\n defaultOpened,\n });\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n '[@mantine/core] Tooltip.Floating 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 targetRef = useMergedRef(boundaryRef, getRefProp(child), ref);\n const childProps = child.props as any;\n\n const onMouseEnter = (event: React.MouseEvent<unknown, MouseEvent>) => {\n childProps.onMouseEnter?.(event);\n handleMouseMove(event);\n setOpened(true);\n };\n\n const onMouseLeave = (event: React.MouseEvent<unknown, MouseEvent>) => {\n childProps.onMouseLeave?.(event);\n setOpened(false);\n };\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Box\n {...others}\n {...getStyles('tooltip', {\n style: {\n ...getStyleObject(style, theme),\n zIndex: zIndex as React.CSSProperties['zIndex'],\n display: !disabled && opened ? 'block' : 'none',\n top: (y && Math.round(y)) ?? '',\n left: (x && Math.round(x)) ?? '',\n },\n })}\n variant={variant}\n ref={floating}\n mod={{ multiline }}\n >\n {label}\n </Box>\n </OptionalPortal>\n\n {cloneElement(child, {\n ...childProps,\n [refProp]: targetRef,\n onMouseEnter,\n onMouseLeave,\n })}\n </>\n );\n});\n\nTooltipFloating.classes = classes;\nTooltipFloating.varsResolver = varsResolver;\nTooltipFloating.displayName = '@mantine/core/TooltipFloating';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,eAAe;CACnB,SAAS;CACT,cAAc;CACd,QAAQ;CACR,UAAU;CACV,QAAQA,4BAAAA,iBAAiB,SAAS;AACpC;AAEA,MAAM,eAAeC,6BAAAA,oBAA4C,OAAO,EAAE,QAAQ,aAAa,EAC7F,SAAS;CACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACvE,gBAAgB,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CAC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ACzC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM;IAC7B,OAAO,KAAK,KAAK,MAAM,CAAC,MAAM;GAChC,EACF,CAAC;GACQ;GACT,KAAK;GACL,KAAK,EAAE,UAAU;aAEhB;EACE,CAAA;CACS,CAAA,IAAA,GAAA,MAAA,cAEF,OAAO;EACnB,GAAG;GACF,UAAU;EACX;EACA;CACF,CAAC,CACD,EAAA,CAAA;AAEN,CAAC;AAED,gBAAgB,UAAUC,uBAAAA;AAC1B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TooltipFloating.cjs","names":["getDefaultZIndex","createVarsResolver","getRadius","getThemeColor","factory","useProps","useMantineTheme","useStyles","useFloatingTooltip","getSingleElementChild","getRefProp","OptionalPortal","Box","getStyleObject","classes"],"sources":["../../../../src/components/Tooltip/TooltipFloating/TooltipFloating.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n getStyleObject,\n getThemeColor,\n useMantineTheme,\n useProps,\n useStyles,\n} from '../../../core';\nimport { OptionalPortal } from '../../Portal';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from '../Tooltip.types';\nimport { useFloatingTooltip } from './use-floating-tooltip';\nimport classes from '../Tooltip.module.css';\n\nexport interface TooltipFloatingProps extends TooltipBaseProps {\n /** Offset from mouse in px @default 10 */\n offset?: number;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n}\n\nexport type TooltipFloatingFactory = Factory<{\n props: TooltipFloatingProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n}>;\n\nconst defaultProps = {\n refProp: 'ref',\n withinPortal: true,\n offset: 10,\n position: 'right',\n zIndex: getDefaultZIndex('popover'),\n} satisfies Partial<TooltipFloatingProps>;\n\nconst varsResolver = createVarsResolver<TooltipFloatingFactory>((theme, { radius, color }) => ({\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? getThemeColor(color, theme) : undefined,\n '--tooltip-color': color ? 'var(--mantine-color-white)' : undefined,\n },\n}));\n\nexport const TooltipFloating = factory<TooltipFloatingFactory>((_props) => {\n const props = useProps('TooltipFloating', defaultProps, _props);\n const {\n children,\n refProp,\n withinPortal,\n style,\n className,\n classNames,\n styles,\n unstyled,\n radius,\n color,\n label,\n offset,\n position,\n multiline,\n zIndex,\n disabled,\n defaultOpened,\n variant,\n vars,\n portalProps,\n attributes,\n ref,\n ...others\n } = props;\n\n const theme = useMantineTheme();\n const getStyles = useStyles<TooltipFloatingFactory>({\n name: 'TooltipFloating',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const { handleMouseMove, x, y, opened, boundaryRef, floating, setOpened } = useFloatingTooltip({\n offset,\n position,\n defaultOpened,\n });\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n '[@mantine/core] Tooltip.Floating 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 targetRef = useMergedRef(boundaryRef, getRefProp(child), ref);\n const childProps = child.props as any;\n\n const onMouseEnter = (event: React.MouseEvent<unknown, MouseEvent>) => {\n childProps.onMouseEnter?.(event);\n handleMouseMove(event);\n setOpened(true);\n };\n\n const onMouseLeave = (event: React.MouseEvent<unknown, MouseEvent>) => {\n childProps.onMouseLeave?.(event);\n setOpened(false);\n };\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Box\n {...others}\n {...getStyles('tooltip', {\n style: {\n ...getStyleObject(style, theme),\n zIndex: zIndex as React.CSSProperties['zIndex'],\n display: !disabled && opened ? 'block' : 'none',\n top: (y && Math.round(y)) ?? '',\n left: (x && Math.round(x)) ?? '',\n },\n })}\n variant={variant}\n ref={floating}\n mod={{ multiline }}\n >\n {label}\n </Box>\n </OptionalPortal>\n\n {cloneElement(child, {\n ...childProps,\n [refProp]: targetRef,\n onMouseEnter,\n onMouseLeave,\n })}\n </>\n );\n});\n\nTooltipFloating.classes = classes;\nTooltipFloating.varsResolver = varsResolver;\nTooltipFloating.displayName = '@mantine/core/TooltipFloating';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,eAAe;CACnB,SAAS;CACT,cAAc;CACd,QAAQ;CACR,UAAU;CACV,QAAQA,4BAAAA,iBAAiB,SAAS;AACpC;AAEA,MAAM,eAAeC,6BAAAA,oBAA4C,OAAO,EAAE,QAAQ,aAAa,EAC7F,SAAS;CACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,MAAM;CACvE,gBAAgB,QAAQC,wBAAAA,cAAc,OAAO,KAAK,IAAI,KAAA;CACtD,mBAAmB,QAAQ,+BAA+B,KAAA;AAC5D,EACF,EAAE;AAEF,MAAa,kBAAkBC,gBAAAA,SAAiC,WAAW;CACzE,MAAM,QAAQC,kBAAAA,SAAS,mBAAmB,cAAc,MAAM;CAC9D,MAAM,EACJ,UACA,SACA,cACA,OACA,WACA,YACA,QACA,UACA,QACA,OACA,OACA,QACA,UACA,WACA,QACA,UACA,eACA,SACA,MACA,aACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,QAAQC,6BAAAA,gBAAgB;CAC9B,MAAM,YAAYC,mBAAAA,UAAkC;EAClD,MAAM;EACN;EACA,SAAA,uBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;CACF,CAAC;CAED,MAAM,EAAE,iBAAiB,GAAG,GAAG,QAAQ,aAAa,UAAU,cAAcC,6BAAAA,mBAAmB;EAC7F;EACA;EACA;CACF,CAAC;CAED,MAAM,QAAQC,iCAAAA,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,oLACF;CAGF,MAAM,aAAA,GAAA,eAAA,aAAA,CAAyB,aAAaC,qBAAAA,WAAW,KAAK,GAAG,GAAG;CAClE,MAAM,aAAa,MAAM;CAEzB,MAAM,gBAAgB,UAAiD;EACrE,WAAW,eAAe,KAAK;EAC/B,gBAAgB,KAAK;EACrB,UAAU,IAAI;CAChB;CAEA,MAAM,gBAAgB,UAAiD;EACrE,WAAW,eAAe,KAAK;EAC/B,UAAU,KAAK;CACjB;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,gBAAD;EAAgB,GAAI;EAA2B;YAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;GACE,GAAI;GACJ,GAAI,UAAU,WAAW,EACvB,OAAO;IACL,GAAGC,yBAAAA,eAAe,OAAO,KAAK;IACtB;IACR,SAAS,CAAC,YAAY,SAAS,UAAU;IACzC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM;IAC7B,OAAO,KAAK,KAAK,MAAM,CAAC,MAAM;GAChC,EACF,CAAC;GACQ;GACT,KAAK;GACL,KAAK,EAAE,UAAU;aAEhB;EACE,CAAA;CACS,CAAA,IAAA,GAAA,MAAA,aAAA,CAEF,OAAO;EACnB,GAAG;GACF,UAAU;EACX;EACA;CACF,CAAC,CACD,EAAA,CAAA;AAEN,CAAC;AAED,gBAAgB,UAAUC,uBAAAA;AAC1B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-floating-tooltip.cjs","names":[],"sources":["../../../../src/components/Tooltip/TooltipFloating/use-floating-tooltip.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getOverflowAncestors, shift, useFloating } from '@floating-ui/react';\nimport { FloatingPosition } from '../../../utils/Floating';\n\ninterface UseFloatingTooltip {\n offset: number;\n position: FloatingPosition;\n defaultOpened?: boolean;\n}\n\nexport function useFloatingTooltip<T extends HTMLElement = any>({\n offset,\n position,\n defaultOpened,\n}: UseFloatingTooltip) {\n const [opened, setOpened] = useState(defaultOpened);\n const boundaryRef = useRef<T>(null);\n const { x, y, elements, refs, update, placement } = useFloating({\n placement: position,\n middleware: [\n shift({\n crossAxis: true,\n padding: 5,\n rootBoundary: 'document',\n }),\n ],\n });\n\n const horizontalOffset = placement.includes('right')\n ? offset\n : position.includes('left')\n ? offset * -1\n : 0;\n\n const verticalOffset = placement.includes('bottom')\n ? offset\n : position.includes('top')\n ? offset * -1\n : 0;\n\n const handleMouseMove = useCallback(\n ({ clientX, clientY }: MouseEvent | React.MouseEvent<T, MouseEvent>) => {\n refs.setPositionReference({\n getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n x: clientX,\n y: clientY,\n left: clientX + horizontalOffset,\n top: clientY + verticalOffset,\n right: clientX,\n bottom: clientY,\n };\n },\n });\n },\n [elements.reference]\n );\n\n useEffect(() => {\n if (refs.floating.current) {\n const boundary = boundaryRef.current!;\n boundary.addEventListener('mousemove', handleMouseMove);\n\n const parents = getOverflowAncestors(refs.floating.current);\n parents.forEach((parent) => {\n parent.addEventListener('scroll', update);\n });\n\n return () => {\n boundary.removeEventListener('mousemove', handleMouseMove);\n parents.forEach((parent) => {\n parent.removeEventListener('scroll', update);\n });\n };\n }\n\n return undefined;\n }, [elements.reference, refs.floating.current, update, handleMouseMove, opened]);\n\n return { handleMouseMove, x, y, opened, setOpened, boundaryRef, floating: refs.setFloating };\n}\n"],"mappings":";;;;AAUA,SAAgB,mBAAgD,EAC9D,QACA,UACA,iBACqB;CACrB,MAAM,CAAC,QAAQ,cAAA,GAAA,MAAA,UAAsB,aAAa;CAClD,MAAM,eAAA,GAAA,MAAA,QAAwB,IAAI;CAClC,MAAM,EAAE,GAAG,GAAG,UAAU,MAAM,QAAQ,eAAA,GAAA,mBAAA,aAA0B;EAC9D,WAAW;EACX,YAAY,EAAA,GAAA,mBAAA,OACJ;GACJ,WAAW;GACX,SAAS;GACT,cAAc;EAChB,CAAC,CACH;CACF,CAAC;CAED,MAAM,mBAAmB,UAAU,SAAS,OAAO,IAC/C,SACA,SAAS,SAAS,MAAM,IACtB,SAAS,KACT;CAEN,MAAM,iBAAiB,UAAU,SAAS,QAAQ,IAC9C,SACA,SAAS,SAAS,KAAK,IACrB,SAAS,KACT;CAEN,MAAM,mBAAA,GAAA,MAAA,cACH,EAAE,SAAS,cAA4D;EACtE,KAAK,qBAAqB,EACxB,wBAAwB;GACtB,OAAO;IACL,OAAO;IACP,QAAQ;IACR,GAAG;IACH,GAAG;IACH,MAAM,UAAU;IAChB,KAAK,UAAU;IACf,OAAO;IACP,QAAQ;GACV;EACF,EACF,CAAC;CACH,GACA,CAAC,SAAS,SAAS,CACrB;CAEA,CAAA,GAAA,MAAA,iBAAgB;EACd,IAAI,KAAK,SAAS,SAAS;GACzB,MAAM,WAAW,YAAY;GAC7B,SAAS,iBAAiB,aAAa,eAAe;GAEtD,MAAM,WAAA,GAAA,mBAAA,sBAA+B,KAAK,SAAS,OAAO;GAC1D,QAAQ,SAAS,WAAW;IAC1B,OAAO,iBAAiB,UAAU,MAAM;GAC1C,CAAC;GAED,aAAa;IACX,SAAS,oBAAoB,aAAa,eAAe;IACzD,QAAQ,SAAS,WAAW;KAC1B,OAAO,oBAAoB,UAAU,MAAM;IAC7C,CAAC;GACH;EACF;CAGF,GAAG;EAAC,SAAS;EAAW,KAAK,SAAS;EAAS;EAAQ;EAAiB;CAAM,CAAC;CAE/E,OAAO;EAAE;EAAiB;EAAG;EAAG;EAAQ;EAAW;EAAa,UAAU,KAAK;CAAY;AAC7F"}
1
+ {"version":3,"file":"use-floating-tooltip.cjs","names":[],"sources":["../../../../src/components/Tooltip/TooltipFloating/use-floating-tooltip.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getOverflowAncestors, shift, useFloating } from '@floating-ui/react';\nimport { FloatingPosition } from '../../../utils/Floating';\n\ninterface UseFloatingTooltip {\n offset: number;\n position: FloatingPosition;\n defaultOpened?: boolean;\n}\n\nexport function useFloatingTooltip<T extends HTMLElement = any>({\n offset,\n position,\n defaultOpened,\n}: UseFloatingTooltip) {\n const [opened, setOpened] = useState(defaultOpened);\n const boundaryRef = useRef<T>(null);\n const { x, y, elements, refs, update, placement } = useFloating({\n placement: position,\n middleware: [\n shift({\n crossAxis: true,\n padding: 5,\n rootBoundary: 'document',\n }),\n ],\n });\n\n const horizontalOffset = placement.includes('right')\n ? offset\n : position.includes('left')\n ? offset * -1\n : 0;\n\n const verticalOffset = placement.includes('bottom')\n ? offset\n : position.includes('top')\n ? offset * -1\n : 0;\n\n const handleMouseMove = useCallback(\n ({ clientX, clientY }: MouseEvent | React.MouseEvent<T, MouseEvent>) => {\n refs.setPositionReference({\n getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n x: clientX,\n y: clientY,\n left: clientX + horizontalOffset,\n top: clientY + verticalOffset,\n right: clientX,\n bottom: clientY,\n };\n },\n });\n },\n [elements.reference]\n );\n\n useEffect(() => {\n if (refs.floating.current) {\n const boundary = boundaryRef.current!;\n boundary.addEventListener('mousemove', handleMouseMove);\n\n const parents = getOverflowAncestors(refs.floating.current);\n parents.forEach((parent) => {\n parent.addEventListener('scroll', update);\n });\n\n return () => {\n boundary.removeEventListener('mousemove', handleMouseMove);\n parents.forEach((parent) => {\n parent.removeEventListener('scroll', update);\n });\n };\n }\n\n return undefined;\n }, [elements.reference, refs.floating.current, update, handleMouseMove, opened]);\n\n return { handleMouseMove, x, y, opened, setOpened, boundaryRef, floating: refs.setFloating };\n}\n"],"mappings":";;;;AAUA,SAAgB,mBAAgD,EAC9D,QACA,UACA,iBACqB;CACrB,MAAM,CAAC,QAAQ,cAAA,GAAA,MAAA,SAAA,CAAsB,aAAa;CAClD,MAAM,eAAA,GAAA,MAAA,OAAA,CAAwB,IAAI;CAClC,MAAM,EAAE,GAAG,GAAG,UAAU,MAAM,QAAQ,eAAA,GAAA,mBAAA,YAAA,CAA0B;EAC9D,WAAW;EACX,YAAY,EAAA,GAAA,mBAAA,MAAA,CACJ;GACJ,WAAW;GACX,SAAS;GACT,cAAc;EAChB,CAAC,CACH;CACF,CAAC;CAED,MAAM,mBAAmB,UAAU,SAAS,OAAO,IAC/C,SACA,SAAS,SAAS,MAAM,IACtB,SAAS,KACT;CAEN,MAAM,iBAAiB,UAAU,SAAS,QAAQ,IAC9C,SACA,SAAS,SAAS,KAAK,IACrB,SAAS,KACT;CAEN,MAAM,mBAAA,GAAA,MAAA,YAAA,EACH,EAAE,SAAS,cAA4D;EACtE,KAAK,qBAAqB,EACxB,wBAAwB;GACtB,OAAO;IACL,OAAO;IACP,QAAQ;IACR,GAAG;IACH,GAAG;IACH,MAAM,UAAU;IAChB,KAAK,UAAU;IACf,OAAO;IACP,QAAQ;GACV;EACF,EACF,CAAC;CACH,GACA,CAAC,SAAS,SAAS,CACrB;CAEA,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,KAAK,SAAS,SAAS;GACzB,MAAM,WAAW,YAAY;GAC7B,SAAS,iBAAiB,aAAa,eAAe;GAEtD,MAAM,WAAA,GAAA,mBAAA,qBAAA,CAA+B,KAAK,SAAS,OAAO;GAC1D,QAAQ,SAAS,WAAW;IAC1B,OAAO,iBAAiB,UAAU,MAAM;GAC1C,CAAC;GAED,aAAa;IACX,SAAS,oBAAoB,aAAa,eAAe;IACzD,QAAQ,SAAS,WAAW;KAC1B,OAAO,oBAAoB,UAAU,MAAM;IAC7C,CAAC;GACH;EACF;CAGF,GAAG;EAAC,SAAS;EAAW,KAAK,SAAS;EAAS;EAAQ;EAAiB;CAAM,CAAC;CAE/E,OAAO;EAAE;EAAiB;EAAG;EAAG;EAAQ;EAAW;EAAa,UAAU,KAAK;CAAY;AAC7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipGroup.cjs","names":["useProps","FloatingDelayGroup"],"sources":["../../../../src/components/Tooltip/TooltipGroup/TooltipGroup.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { FloatingDelayGroup } from '@floating-ui/react';\nimport { ExtendComponent, Factory, MantineThemeComponent, useProps } from '../../../core';\n\nexport interface TooltipGroupContextValue {\n withinGroup: boolean;\n}\n\nexport const TooltipGroupContext = createContext<TooltipGroupContextValue>({ withinGroup: false });\n\nexport interface TooltipGroupProps {\n /** `Tooltip` components */\n children: React.ReactNode;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms */\n closeDelay?: number;\n}\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 0,\n} satisfies Partial<TooltipGroupProps>;\n\nexport function TooltipGroup(props: TooltipGroupProps) {\n const { openDelay, closeDelay, children } = useProps('TooltipGroup', defaultProps, props);\n\n return (\n <TooltipGroupContext value={{ withinGroup: true }}>\n <FloatingDelayGroup delay={{ open: openDelay, close: closeDelay }}>\n {children}\n </FloatingDelayGroup>\n </TooltipGroupContext>\n );\n}\n\nexport type TooltipGroupFactory = Factory<{\n props: TooltipGroupProps;\n}>;\n\nTooltipGroup.displayName = '@mantine/core/TooltipGroup';\nTooltipGroup.extend = (c: ExtendComponent<TooltipGroupFactory>): MantineThemeComponent => c;\n"],"mappings":";;;;;;AAQA,MAAa,uBAAA,GAAA,MAAA,eAA8D,EAAE,aAAa,MAAM,CAAC;AAajG,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;AACd;AAEA,SAAgB,aAAa,OAA0B;CACrD,MAAM,EAAE,WAAW,YAAY,aAAaA,kBAAAA,SAAS,gBAAgB,cAAc,KAAK;CAExF,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAD;EAAqB,OAAO,EAAE,aAAa,KAAK;YAC9C,iBAAA,GAAA,kBAAA,KAACC,mBAAAA,oBAAD;GAAoB,OAAO;IAAE,MAAM;IAAW,OAAO;GAAW;GAC7D;EACiB,CAAA;CACD,CAAA;AAEzB;AAMA,aAAa,cAAc;AAC3B,aAAa,UAAU,MAAmE"}
1
+ {"version":3,"file":"TooltipGroup.cjs","names":["useProps","FloatingDelayGroup"],"sources":["../../../../src/components/Tooltip/TooltipGroup/TooltipGroup.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { FloatingDelayGroup } from '@floating-ui/react';\nimport { ExtendComponent, Factory, MantineThemeComponent, useProps } from '../../../core';\n\nexport interface TooltipGroupContextValue {\n withinGroup: boolean;\n}\n\nexport const TooltipGroupContext = createContext<TooltipGroupContextValue>({ withinGroup: false });\n\nexport interface TooltipGroupProps {\n /** `Tooltip` components */\n children: React.ReactNode;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms */\n closeDelay?: number;\n}\n\nconst defaultProps = {\n openDelay: 0,\n closeDelay: 0,\n} satisfies Partial<TooltipGroupProps>;\n\nexport function TooltipGroup(props: TooltipGroupProps) {\n const { openDelay, closeDelay, children } = useProps('TooltipGroup', defaultProps, props);\n\n return (\n <TooltipGroupContext value={{ withinGroup: true }}>\n <FloatingDelayGroup delay={{ open: openDelay, close: closeDelay }}>\n {children}\n </FloatingDelayGroup>\n </TooltipGroupContext>\n );\n}\n\nexport type TooltipGroupFactory = Factory<{\n props: TooltipGroupProps;\n}>;\n\nTooltipGroup.displayName = '@mantine/core/TooltipGroup';\nTooltipGroup.extend = (c: ExtendComponent<TooltipGroupFactory>): MantineThemeComponent => c;\n"],"mappings":";;;;;;AAQA,MAAa,uBAAA,GAAA,MAAA,cAAA,CAA8D,EAAE,aAAa,MAAM,CAAC;AAajG,MAAM,eAAe;CACnB,WAAW;CACX,YAAY;AACd;AAEA,SAAgB,aAAa,OAA0B;CACrD,MAAM,EAAE,WAAW,YAAY,aAAaA,kBAAAA,SAAS,gBAAgB,cAAc,KAAK;CAExF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAD;EAAqB,OAAO,EAAE,aAAa,KAAK;YAC9C,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,oBAAD;GAAoB,OAAO;IAAE,MAAM;IAAW,OAAO;GAAW;GAC7D;EACiB,CAAA;CACD,CAAA;AAEzB;AAMA,aAAa,cAAc;AAC3B,aAAa,UAAU,MAAmE"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-tooltip.cjs","names":["TooltipGroupContext","autoUpdate"],"sources":["../../../src/components/Tooltip/use-tooltip.ts"],"sourcesContent":["import { use, useCallback, useRef, useState } from 'react';\nimport {\n arrow,\n autoUpdate,\n flip,\n inline,\n offset,\n shift,\n useDelayGroup,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n type Middleware,\n} from '@floating-ui/react';\nimport { useId, useIsomorphicEffect } from '@mantine/hooks';\nimport { FloatingAxesOffsets, FloatingPosition, FloatingStrategy } from '../../utils/Floating';\nimport { type TooltipMiddlewares } from './Tooltip.types';\nimport { TooltipGroupContext } from './TooltipGroup/TooltipGroup';\n\ninterface UseTooltip {\n position: FloatingPosition;\n closeDelay?: number;\n openDelay?: number;\n onPositionChange?: (position: FloatingPosition) => void;\n opened?: boolean;\n defaultOpened?: boolean;\n offset: number | FloatingAxesOffsets;\n arrowRef?: React.RefObject<HTMLDivElement | null>;\n arrowOffset?: number;\n events?: { hover: boolean; focus: boolean; touch: boolean };\n inline?: boolean;\n strategy?: FloatingStrategy;\n middlewares?: TooltipMiddlewares;\n}\n\nfunction getDefaultMiddlewares(middlewares: TooltipMiddlewares | undefined): TooltipMiddlewares {\n if (middlewares === undefined) {\n return { shift: true, flip: true };\n }\n\n const result = { ...middlewares };\n if (middlewares.shift === undefined) {\n result.shift = true;\n }\n\n if (middlewares.flip === undefined) {\n result.flip = true;\n }\n\n return result;\n}\n\nfunction getTooltipMiddlewares(settings: UseTooltip) {\n const middlewaresOptions = getDefaultMiddlewares(settings.middlewares);\n const middlewares: Middleware[] = [offset(settings.offset)];\n\n if (middlewaresOptions.shift) {\n middlewares.push(\n shift(\n typeof middlewaresOptions.shift === 'boolean'\n ? { padding: 8 }\n : { padding: 8, ...middlewaresOptions.shift }\n )\n );\n }\n\n if (middlewaresOptions.flip) {\n middlewares.push(\n typeof middlewaresOptions.flip === 'boolean' ? flip() : flip(middlewaresOptions.flip)\n );\n }\n\n middlewares.push(arrow({ element: settings.arrowRef!, padding: settings.arrowOffset }));\n\n if (middlewaresOptions.inline) {\n middlewares.push(\n typeof middlewaresOptions.inline === 'boolean' ? inline() : inline(middlewaresOptions.inline)\n );\n } else if (settings.inline) {\n middlewares.push(inline());\n }\n\n return middlewares;\n}\n\nexport function useTooltip(settings: UseTooltip) {\n const [uncontrolledOpened, setUncontrolledOpened] = useState(settings.defaultOpened);\n const controlled = typeof settings.opened === 'boolean';\n const opened = controlled ? settings.opened : uncontrolledOpened;\n const withinGroup = use(TooltipGroupContext).withinGroup;\n const uid = useId();\n\n const onChange = useCallback(\n (_opened: boolean) => {\n setUncontrolledOpened(_opened);\n\n if (_opened) {\n setCurrentId(uid);\n }\n },\n [uid]\n );\n\n const {\n x,\n y,\n context,\n refs,\n placement,\n middlewareData: { arrow: { x: arrowX, y: arrowY } = {} },\n } = useFloating({\n strategy: settings.strategy,\n placement: settings.position,\n open: opened,\n onOpenChange: onChange,\n middleware: getTooltipMiddlewares(settings),\n whileElementsMounted: autoUpdate,\n });\n\n const { delay: groupDelay, currentId, setCurrentId } = useDelayGroup(context, { id: uid });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useHover(context, {\n enabled: settings.events?.hover,\n delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },\n mouseOnly: !settings.events?.touch,\n }),\n useFocus(context, { enabled: settings.events?.focus, visibleOnly: true }),\n useRole(context, { role: 'tooltip' }),\n // Cannot be used with controlled tooltip, page jumps\n useDismiss(context, { enabled: typeof settings.opened === 'undefined' }),\n ]);\n\n const previousPlacementRef = useRef(placement);\n useIsomorphicEffect(() => {\n if (previousPlacementRef.current !== placement) {\n previousPlacementRef.current = placement;\n settings.onPositionChange?.(placement);\n }\n }, [placement]);\n\n const isGroupPhase = opened && currentId && currentId !== uid;\n\n return {\n x,\n y,\n arrowX,\n arrowY,\n reference: refs.setReference,\n floating: refs.setFloating,\n getFloatingProps,\n getReferenceProps,\n isGroupPhase,\n opened,\n placement,\n };\n}\n"],"mappings":";;;;;;AAsCA,SAAS,sBAAsB,aAAiE;CAC9F,IAAI,gBAAgB,KAAA,GAClB,OAAO;EAAE,OAAO;EAAM,MAAM;CAAK;CAGnC,MAAM,SAAS,EAAE,GAAG,YAAY;CAChC,IAAI,YAAY,UAAU,KAAA,GACxB,OAAO,QAAQ;CAGjB,IAAI,YAAY,SAAS,KAAA,GACvB,OAAO,OAAO;CAGhB,OAAO;AACT;AAEA,SAAS,sBAAsB,UAAsB;CACnD,MAAM,qBAAqB,sBAAsB,SAAS,WAAW;CACrE,MAAM,cAA4B,EAAA,GAAA,mBAAA,QAAQ,SAAS,MAAM,CAAC;CAE1D,IAAI,mBAAmB,OACrB,YAAY,MAAA,GAAA,mBAAA,OAER,OAAO,mBAAmB,UAAU,YAChC,EAAE,SAAS,EAAE,IACb;EAAE,SAAS;EAAG,GAAG,mBAAmB;CAAM,CAChD,CACF;CAGF,IAAI,mBAAmB,MACrB,YAAY,KACV,OAAO,mBAAmB,SAAS,aAAA,GAAA,mBAAA,MAAiB,KAAA,GAAA,mBAAA,MAAS,mBAAmB,IAAI,CACtF;CAGF,YAAY,MAAA,GAAA,mBAAA,OAAW;EAAE,SAAS,SAAS;EAAW,SAAS,SAAS;CAAY,CAAC,CAAC;CAEtF,IAAI,mBAAmB,QACrB,YAAY,KACV,OAAO,mBAAmB,WAAW,aAAA,GAAA,mBAAA,QAAmB,KAAA,GAAA,mBAAA,QAAW,mBAAmB,MAAM,CAC9F;MACK,IAAI,SAAS,QAClB,YAAY,MAAA,GAAA,mBAAA,QAAY,CAAC;CAG3B,OAAO;AACT;AAEA,SAAgB,WAAW,UAAsB;CAC/C,MAAM,CAAC,oBAAoB,0BAAA,GAAA,MAAA,UAAkC,SAAS,aAAa;CAEnF,MAAM,SADa,OAAO,SAAS,WAAW,YAClB,SAAS,SAAS;CAC9C,MAA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EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-tooltip.cjs","names":["TooltipGroupContext","autoUpdate"],"sources":["../../../src/components/Tooltip/use-tooltip.ts"],"sourcesContent":["import { use, useCallback, useRef, useState } from 'react';\nimport {\n arrow,\n autoUpdate,\n flip,\n inline,\n offset,\n shift,\n useDelayGroup,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n type Middleware,\n} from '@floating-ui/react';\nimport { useId, useIsomorphicEffect } from '@mantine/hooks';\nimport { FloatingAxesOffsets, FloatingPosition, FloatingStrategy } from '../../utils/Floating';\nimport { type TooltipMiddlewares } from './Tooltip.types';\nimport { TooltipGroupContext } from './TooltipGroup/TooltipGroup';\n\ninterface UseTooltip {\n position: FloatingPosition;\n closeDelay?: number;\n openDelay?: number;\n onPositionChange?: (position: FloatingPosition) => void;\n opened?: boolean;\n defaultOpened?: boolean;\n offset: number | FloatingAxesOffsets;\n arrowRef?: React.RefObject<HTMLDivElement | null>;\n arrowOffset?: number;\n events?: { hover: boolean; focus: boolean; touch: boolean };\n inline?: boolean;\n strategy?: FloatingStrategy;\n middlewares?: TooltipMiddlewares;\n}\n\nfunction getDefaultMiddlewares(middlewares: TooltipMiddlewares | undefined): TooltipMiddlewares {\n if (middlewares === undefined) {\n return { shift: true, flip: true };\n }\n\n const result = { ...middlewares };\n if (middlewares.shift === undefined) {\n result.shift = true;\n }\n\n if (middlewares.flip === undefined) {\n result.flip = true;\n }\n\n return result;\n}\n\nfunction getTooltipMiddlewares(settings: UseTooltip) {\n const middlewaresOptions = getDefaultMiddlewares(settings.middlewares);\n const middlewares: Middleware[] = [offset(settings.offset)];\n\n if (middlewaresOptions.shift) {\n middlewares.push(\n shift(\n typeof middlewaresOptions.shift === 'boolean'\n ? { padding: 8 }\n : { padding: 8, ...middlewaresOptions.shift }\n )\n );\n }\n\n if (middlewaresOptions.flip) {\n middlewares.push(\n typeof middlewaresOptions.flip === 'boolean' ? flip() : flip(middlewaresOptions.flip)\n );\n }\n\n middlewares.push(arrow({ element: settings.arrowRef!, padding: settings.arrowOffset }));\n\n if (middlewaresOptions.inline) {\n middlewares.push(\n typeof middlewaresOptions.inline === 'boolean' ? inline() : inline(middlewaresOptions.inline)\n );\n } else if (settings.inline) {\n middlewares.push(inline());\n }\n\n return middlewares;\n}\n\nexport function useTooltip(settings: UseTooltip) {\n const [uncontrolledOpened, setUncontrolledOpened] = useState(settings.defaultOpened);\n const controlled = typeof settings.opened === 'boolean';\n const opened = controlled ? settings.opened : uncontrolledOpened;\n const withinGroup = use(TooltipGroupContext).withinGroup;\n const uid = useId();\n\n const onChange = useCallback(\n (_opened: boolean) => {\n setUncontrolledOpened(_opened);\n\n if (_opened) {\n setCurrentId(uid);\n }\n },\n [uid]\n );\n\n const {\n x,\n y,\n context,\n refs,\n placement,\n middlewareData: { arrow: { x: arrowX, y: arrowY } = {} },\n } = useFloating({\n strategy: settings.strategy,\n placement: settings.position,\n open: opened,\n onOpenChange: onChange,\n middleware: getTooltipMiddlewares(settings),\n whileElementsMounted: autoUpdate,\n });\n\n const { delay: groupDelay, currentId, setCurrentId } = useDelayGroup(context, { id: uid });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useHover(context, {\n enabled: settings.events?.hover,\n delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },\n mouseOnly: !settings.events?.touch,\n }),\n useFocus(context, { enabled: settings.events?.focus, visibleOnly: true }),\n useRole(context, { role: 'tooltip' }),\n // Cannot be used with controlled tooltip, page jumps\n useDismiss(context, { enabled: typeof settings.opened === 'undefined' }),\n ]);\n\n const previousPlacementRef = useRef(placement);\n useIsomorphicEffect(() => {\n if (previousPlacementRef.current !== placement) {\n previousPlacementRef.current = placement;\n settings.onPositionChange?.(placement);\n }\n }, [placement]);\n\n const isGroupPhase = opened && currentId && currentId !== uid;\n\n return {\n x,\n y,\n arrowX,\n arrowY,\n reference: refs.setReference,\n floating: refs.setFloating,\n getFloatingProps,\n getRe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