@mantine/core 9.0.0 → 9.0.2

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 (474) hide show
  1. package/cjs/components/Accordion/Accordion.cjs.map +1 -1
  2. package/cjs/components/Accordion/Accordion.module.cjs.map +1 -1
  3. package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
  4. package/cjs/components/Affix/Affix.cjs.map +1 -1
  5. package/cjs/components/Alert/Alert.cjs.map +1 -1
  6. package/cjs/components/Anchor/Anchor.cjs.map +1 -1
  7. package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
  8. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  9. package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
  10. package/cjs/components/Autocomplete/Autocomplete.cjs +1 -1
  11. package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  12. package/cjs/components/Avatar/Avatar.cjs.map +1 -1
  13. package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
  14. package/cjs/components/Badge/Badge.cjs.map +1 -1
  15. package/cjs/components/Badge/Badge.module.cjs.map +1 -1
  16. package/cjs/components/Blockquote/Blockquote.cjs.map +1 -1
  17. package/cjs/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  18. package/cjs/components/Burger/Burger.cjs.map +1 -1
  19. package/cjs/components/Button/Button.cjs.map +1 -1
  20. package/cjs/components/Card/Card.cjs.map +1 -1
  21. package/cjs/components/Center/Center.cjs.map +1 -1
  22. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  23. package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
  24. package/cjs/components/Chip/Chip.cjs.map +1 -1
  25. package/cjs/components/Chip/ChipGroup/ChipGroup.cjs.map +1 -1
  26. package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
  27. package/cjs/components/Code/Code.cjs.map +1 -1
  28. package/cjs/components/Collapse/Collapse.cjs.map +1 -1
  29. package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
  30. package/cjs/components/ColorPicker/AlphaSlider/AlphaSlider.cjs.map +1 -1
  31. package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  32. package/cjs/components/ColorPicker/HueSlider/HueSlider.cjs.map +1 -1
  33. package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
  34. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs +1 -0
  35. package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
  36. package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
  37. package/cjs/components/Container/Container.cjs.map +1 -1
  38. package/cjs/components/Dialog/Dialog.cjs.map +1 -1
  39. package/cjs/components/Divider/Divider.cjs.map +1 -1
  40. package/cjs/components/Fieldset/Fieldset.cjs.map +1 -1
  41. package/cjs/components/FileButton/FileButton.cjs.map +1 -1
  42. package/cjs/components/FileInput/FileInput.cjs.map +1 -1
  43. package/cjs/components/Flex/Flex.cjs.map +1 -1
  44. package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
  45. package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
  46. package/cjs/components/Grid/Grid.cjs.map +1 -1
  47. package/cjs/components/Group/Group.cjs.map +1 -1
  48. package/cjs/components/Highlight/Highlight.cjs.map +1 -1
  49. package/cjs/components/Image/Image.cjs.map +1 -1
  50. package/cjs/components/Indicator/Indicator.cjs.map +1 -1
  51. package/cjs/components/Input/Input.cjs +3 -2
  52. package/cjs/components/Input/Input.cjs.map +1 -1
  53. package/cjs/components/InputBase/InputBase.cjs.map +1 -1
  54. package/cjs/components/JsonInput/JsonInput.cjs.map +1 -1
  55. package/cjs/components/Kbd/Kbd.cjs.map +1 -1
  56. package/cjs/components/List/List.cjs.map +1 -1
  57. package/cjs/components/Loader/Loader.cjs.map +1 -1
  58. package/cjs/components/LoadingOverlay/LoadingOverlay.cjs +1 -0
  59. package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
  60. package/cjs/components/Mark/Mark.cjs.map +1 -1
  61. package/cjs/components/Marquee/Marquee.cjs.map +1 -1
  62. package/cjs/components/Menu/Menu.cjs.map +1 -1
  63. package/cjs/components/Modal/Modal.cjs.map +1 -1
  64. package/cjs/components/MultiSelect/MultiSelect.cjs +3 -1
  65. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  66. package/cjs/components/NativeSelect/NativeSelect.cjs +4 -1
  67. package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
  68. package/cjs/components/NavLink/NavLink.cjs.map +1 -1
  69. package/cjs/components/Notification/Notification.cjs.map +1 -1
  70. package/cjs/components/NumberInput/NumberInput.cjs +1 -0
  71. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  72. package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
  73. package/cjs/components/Overlay/Overlay.cjs.map +1 -1
  74. package/cjs/components/Pagination/Pagination.cjs.map +1 -1
  75. package/cjs/components/Paper/Paper.cjs.map +1 -1
  76. package/cjs/components/PasswordInput/PasswordInput.cjs +4 -1
  77. package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
  78. package/cjs/components/Pill/Pill.cjs.map +1 -1
  79. package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
  80. package/cjs/components/PinInput/PinInput.cjs.map +1 -1
  81. package/cjs/components/Popover/Popover.cjs +9 -0
  82. package/cjs/components/Popover/Popover.cjs.map +1 -1
  83. package/cjs/components/Portal/OptionalPortal.cjs.map +1 -1
  84. package/cjs/components/Portal/Portal.cjs.map +1 -1
  85. package/cjs/components/Progress/Progress.cjs.map +1 -1
  86. package/cjs/components/Radio/Radio.cjs.map +1 -1
  87. package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
  88. package/cjs/components/Rating/Rating.cjs.map +1 -1
  89. package/cjs/components/RingProgress/RingProgress.cjs +1 -0
  90. package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
  91. package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
  92. package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.cjs.map +1 -1
  93. package/cjs/components/Scroller/Scroller.cjs.map +1 -1
  94. package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  95. package/cjs/components/Select/Select.cjs +1 -0
  96. package/cjs/components/Select/Select.cjs.map +1 -1
  97. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs +1 -2
  98. package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
  99. package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
  100. package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
  101. package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
  102. package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
  103. package/cjs/components/Slider/Slider.module.cjs.map +1 -1
  104. package/cjs/components/Space/Space.cjs.map +1 -1
  105. package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
  106. package/cjs/components/Stack/Stack.cjs.map +1 -1
  107. package/cjs/components/Stepper/Stepper.cjs.map +1 -1
  108. package/cjs/components/Switch/Switch.cjs.map +1 -1
  109. package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
  110. package/cjs/components/Table/Table.cjs.map +1 -1
  111. package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
  112. package/cjs/components/Tabs/Tabs.cjs.map +1 -1
  113. package/cjs/components/TagsInput/TagsInput.cjs +3 -1
  114. package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
  115. package/cjs/components/Text/Text.cjs.map +1 -1
  116. package/cjs/components/TextInput/TextInput.cjs.map +1 -1
  117. package/cjs/components/Textarea/Autosize.cjs +1 -0
  118. package/cjs/components/Textarea/Autosize.cjs.map +1 -1
  119. package/cjs/components/Textarea/Textarea.cjs.map +1 -1
  120. package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
  121. package/cjs/components/Timeline/Timeline.cjs.map +1 -1
  122. package/cjs/components/Title/Title.cjs.map +1 -1
  123. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  124. package/cjs/components/Tree/Tree.cjs.map +1 -1
  125. package/cjs/components/Typography/Typography.cjs.map +1 -1
  126. package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
  127. package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  128. package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs +3 -4
  129. package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs.map +1 -1
  130. package/cjs/core/MantineProvider/color-scheme-managers/local-storage-manager.cjs.map +1 -1
  131. package/cjs/core/utils/find-element-ancestor/find-element-ancestor.cjs.map +1 -1
  132. package/esm/components/Accordion/Accordion.mjs.map +1 -1
  133. package/esm/components/Accordion/Accordion.module.mjs.map +1 -1
  134. package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
  135. package/esm/components/Affix/Affix.mjs.map +1 -1
  136. package/esm/components/Alert/Alert.mjs.map +1 -1
  137. package/esm/components/Anchor/Anchor.mjs.map +1 -1
  138. package/esm/components/AngleSlider/AngleSlider.mjs.map +1 -1
  139. package/esm/components/AppShell/AppShell.mjs.map +1 -1
  140. package/esm/components/AspectRatio/AspectRatio.mjs.map +1 -1
  141. package/esm/components/Autocomplete/Autocomplete.mjs +1 -1
  142. package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
  143. package/esm/components/Avatar/Avatar.mjs.map +1 -1
  144. package/esm/components/BackgroundImage/BackgroundImage.mjs.map +1 -1
  145. package/esm/components/Badge/Badge.mjs.map +1 -1
  146. package/esm/components/Badge/Badge.module.mjs.map +1 -1
  147. package/esm/components/Blockquote/Blockquote.mjs.map +1 -1
  148. package/esm/components/Breadcrumbs/Breadcrumbs.mjs.map +1 -1
  149. package/esm/components/Burger/Burger.mjs.map +1 -1
  150. package/esm/components/Button/Button.mjs.map +1 -1
  151. package/esm/components/Card/Card.mjs.map +1 -1
  152. package/esm/components/Center/Center.mjs.map +1 -1
  153. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  154. package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
  155. package/esm/components/Chip/Chip.mjs.map +1 -1
  156. package/esm/components/Chip/ChipGroup/ChipGroup.mjs.map +1 -1
  157. package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
  158. package/esm/components/Code/Code.mjs.map +1 -1
  159. package/esm/components/Collapse/Collapse.mjs.map +1 -1
  160. package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
  161. package/esm/components/ColorPicker/AlphaSlider/AlphaSlider.mjs.map +1 -1
  162. package/esm/components/ColorPicker/ColorPicker.mjs.map +1 -1
  163. package/esm/components/ColorPicker/HueSlider/HueSlider.mjs.map +1 -1
  164. package/esm/components/ColorSwatch/ColorSwatch.mjs.map +1 -1
  165. package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs +1 -0
  166. package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs.map +1 -1
  167. package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
  168. package/esm/components/Container/Container.mjs.map +1 -1
  169. package/esm/components/Dialog/Dialog.mjs.map +1 -1
  170. package/esm/components/Divider/Divider.mjs.map +1 -1
  171. package/esm/components/Fieldset/Fieldset.mjs.map +1 -1
  172. package/esm/components/FileButton/FileButton.mjs.map +1 -1
  173. package/esm/components/FileInput/FileInput.mjs.map +1 -1
  174. package/esm/components/Flex/Flex.mjs.map +1 -1
  175. package/esm/components/FloatingIndicator/FloatingIndicator.mjs.map +1 -1
  176. package/esm/components/FloatingWindow/FloatingWindow.mjs.map +1 -1
  177. package/esm/components/Grid/Grid.mjs.map +1 -1
  178. package/esm/components/Group/Group.mjs.map +1 -1
  179. package/esm/components/Highlight/Highlight.mjs.map +1 -1
  180. package/esm/components/Image/Image.mjs.map +1 -1
  181. package/esm/components/Indicator/Indicator.mjs.map +1 -1
  182. package/esm/components/Input/Input.mjs +3 -2
  183. package/esm/components/Input/Input.mjs.map +1 -1
  184. package/esm/components/InputBase/InputBase.mjs.map +1 -1
  185. package/esm/components/JsonInput/JsonInput.mjs.map +1 -1
  186. package/esm/components/Kbd/Kbd.mjs.map +1 -1
  187. package/esm/components/List/List.mjs.map +1 -1
  188. package/esm/components/Loader/Loader.mjs.map +1 -1
  189. package/esm/components/LoadingOverlay/LoadingOverlay.mjs +1 -0
  190. package/esm/components/LoadingOverlay/LoadingOverlay.mjs.map +1 -1
  191. package/esm/components/Mark/Mark.mjs.map +1 -1
  192. package/esm/components/Marquee/Marquee.mjs.map +1 -1
  193. package/esm/components/Menu/Menu.mjs.map +1 -1
  194. package/esm/components/Modal/Modal.mjs.map +1 -1
  195. package/esm/components/MultiSelect/MultiSelect.mjs +3 -1
  196. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  197. package/esm/components/NativeSelect/NativeSelect.mjs +4 -1
  198. package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
  199. package/esm/components/NavLink/NavLink.mjs.map +1 -1
  200. package/esm/components/Notification/Notification.mjs.map +1 -1
  201. package/esm/components/NumberInput/NumberInput.mjs +1 -0
  202. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  203. package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
  204. package/esm/components/Overlay/Overlay.mjs.map +1 -1
  205. package/esm/components/Pagination/Pagination.mjs.map +1 -1
  206. package/esm/components/Paper/Paper.mjs.map +1 -1
  207. package/esm/components/PasswordInput/PasswordInput.mjs +4 -1
  208. package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
  209. package/esm/components/Pill/Pill.mjs.map +1 -1
  210. package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
  211. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  212. package/esm/components/Popover/Popover.mjs +9 -0
  213. package/esm/components/Popover/Popover.mjs.map +1 -1
  214. package/esm/components/Portal/OptionalPortal.mjs.map +1 -1
  215. package/esm/components/Portal/Portal.mjs.map +1 -1
  216. package/esm/components/Progress/Progress.mjs.map +1 -1
  217. package/esm/components/Radio/Radio.mjs.map +1 -1
  218. package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
  219. package/esm/components/Rating/Rating.mjs.map +1 -1
  220. package/esm/components/RingProgress/RingProgress.mjs +1 -0
  221. package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
  222. package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
  223. package/esm/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.mjs.map +1 -1
  224. package/esm/components/Scroller/Scroller.mjs.map +1 -1
  225. package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  226. package/esm/components/Select/Select.mjs +1 -0
  227. package/esm/components/Select/Select.mjs.map +1 -1
  228. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs +1 -2
  229. package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
  230. package/esm/components/SimpleGrid/SimpleGrid.mjs.map +1 -1
  231. package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
  232. package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
  233. package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
  234. package/esm/components/Slider/Slider.module.mjs.map +1 -1
  235. package/esm/components/Space/Space.mjs.map +1 -1
  236. package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
  237. package/esm/components/Stack/Stack.mjs.map +1 -1
  238. package/esm/components/Stepper/Stepper.mjs.map +1 -1
  239. package/esm/components/Switch/Switch.mjs.map +1 -1
  240. package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs.map +1 -1
  241. package/esm/components/Table/Table.mjs.map +1 -1
  242. package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
  243. package/esm/components/Tabs/Tabs.mjs.map +1 -1
  244. package/esm/components/TagsInput/TagsInput.mjs +3 -1
  245. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  246. package/esm/components/Text/Text.mjs.map +1 -1
  247. package/esm/components/TextInput/TextInput.mjs.map +1 -1
  248. package/esm/components/Textarea/Autosize.mjs +1 -0
  249. package/esm/components/Textarea/Autosize.mjs.map +1 -1
  250. package/esm/components/Textarea/Textarea.mjs.map +1 -1
  251. package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
  252. package/esm/components/Timeline/Timeline.mjs.map +1 -1
  253. package/esm/components/Title/Title.mjs.map +1 -1
  254. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  255. package/esm/components/Tree/Tree.mjs.map +1 -1
  256. package/esm/components/Typography/Typography.mjs.map +1 -1
  257. package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
  258. package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
  259. package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs +3 -4
  260. package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs.map +1 -1
  261. package/esm/core/MantineProvider/color-scheme-managers/local-storage-manager.mjs.map +1 -1
  262. package/esm/core/utils/find-element-ancestor/find-element-ancestor.mjs.map +1 -1
  263. package/lib/components/Accordion/Accordion.d.ts +21 -3
  264. package/lib/components/Accordion/index.d.ts +0 -17
  265. package/lib/components/ActionIcon/ActionIcon.d.ts +20 -2
  266. package/lib/components/ActionIcon/index.d.ts +0 -18
  267. package/lib/components/Affix/Affix.d.ts +6 -0
  268. package/lib/components/Affix/index.d.ts +0 -6
  269. package/lib/components/Alert/Alert.d.ts +6 -0
  270. package/lib/components/Alert/index.d.ts +0 -6
  271. package/lib/components/Anchor/Anchor.d.ts +7 -0
  272. package/lib/components/Anchor/index.d.ts +0 -8
  273. package/lib/components/AngleSlider/AngleSlider.d.ts +6 -0
  274. package/lib/components/AngleSlider/index.d.ts +0 -6
  275. package/lib/components/AppShell/AppShell.d.ts +30 -6
  276. package/lib/components/AppShell/index.d.ts +0 -24
  277. package/lib/components/AspectRatio/AspectRatio.d.ts +6 -0
  278. package/lib/components/AspectRatio/index.d.ts +0 -6
  279. package/lib/components/Autocomplete/Autocomplete.d.ts +6 -0
  280. package/lib/components/Autocomplete/index.d.ts +0 -6
  281. package/lib/components/Avatar/Avatar.d.ts +15 -1
  282. package/lib/components/Avatar/index.d.ts +0 -14
  283. package/lib/components/BackgroundImage/BackgroundImage.d.ts +6 -0
  284. package/lib/components/BackgroundImage/index.d.ts +0 -6
  285. package/lib/components/Badge/Badge.d.ts +7 -0
  286. package/lib/components/Badge/index.d.ts +0 -7
  287. package/lib/components/Blockquote/Blockquote.d.ts +6 -0
  288. package/lib/components/Blockquote/index.d.ts +0 -6
  289. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
  290. package/lib/components/Breadcrumbs/index.d.ts +0 -7
  291. package/lib/components/Burger/Burger.d.ts +6 -0
  292. package/lib/components/Burger/index.d.ts +0 -6
  293. package/lib/components/Button/Button.d.ts +22 -2
  294. package/lib/components/Button/index.d.ts +0 -20
  295. package/lib/components/Card/Card.d.ts +11 -1
  296. package/lib/components/Card/index.d.ts +0 -10
  297. package/lib/components/Center/Center.d.ts +5 -0
  298. package/lib/components/Center/index.d.ts +0 -5
  299. package/lib/components/Checkbox/Checkbox.d.ts +29 -3
  300. package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +8 -8
  301. package/lib/components/Checkbox/index.d.ts +0 -26
  302. package/lib/components/Chip/Chip.d.ts +12 -1
  303. package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +8 -8
  304. package/lib/components/Chip/index.d.ts +0 -11
  305. package/lib/components/CloseButton/CloseButton.d.ts +7 -0
  306. package/lib/components/CloseButton/index.d.ts +0 -7
  307. package/lib/components/Code/Code.d.ts +6 -0
  308. package/lib/components/Code/index.d.ts +0 -6
  309. package/lib/components/Collapse/Collapse.d.ts +4 -0
  310. package/lib/components/Collapse/index.d.ts +0 -4
  311. package/lib/components/ColorInput/ColorInput.d.ts +6 -0
  312. package/lib/components/ColorInput/index.d.ts +0 -6
  313. package/lib/components/ColorPicker/AlphaSlider/AlphaSlider.d.ts +4 -0
  314. package/lib/components/ColorPicker/ColorPicker.d.ts +6 -0
  315. package/lib/components/ColorPicker/HueSlider/HueSlider.d.ts +4 -0
  316. package/lib/components/ColorPicker/index.d.ts +0 -14
  317. package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
  318. package/lib/components/ColorSwatch/index.d.ts +0 -6
  319. package/lib/components/Container/Container.d.ts +6 -0
  320. package/lib/components/Container/index.d.ts +0 -6
  321. package/lib/components/Dialog/Dialog.d.ts +6 -0
  322. package/lib/components/Dialog/index.d.ts +0 -6
  323. package/lib/components/Divider/Divider.d.ts +7 -0
  324. package/lib/components/Divider/index.d.ts +0 -7
  325. package/lib/components/Fieldset/Fieldset.d.ts +6 -0
  326. package/lib/components/Fieldset/index.d.ts +0 -6
  327. package/lib/components/FileButton/FileButton.d.ts +4 -0
  328. package/lib/components/FileButton/index.d.ts +0 -4
  329. package/lib/components/FileInput/FileInput.d.ts +4 -0
  330. package/lib/components/FileInput/index.d.ts +0 -4
  331. package/lib/components/Flex/Flex.d.ts +5 -0
  332. package/lib/components/Flex/index.d.ts +0 -5
  333. package/lib/components/FloatingIndicator/FloatingIndicator.d.ts +6 -0
  334. package/lib/components/FloatingIndicator/index.d.ts +0 -6
  335. package/lib/components/FloatingWindow/FloatingWindow.d.ts +5 -0
  336. package/lib/components/FloatingWindow/index.d.ts +0 -5
  337. package/lib/components/Grid/Grid.d.ts +13 -2
  338. package/lib/components/Grid/index.d.ts +0 -11
  339. package/lib/components/Group/Group.d.ts +7 -0
  340. package/lib/components/Group/index.d.ts +0 -7
  341. package/lib/components/Highlight/Highlight.d.ts +5 -0
  342. package/lib/components/Highlight/index.d.ts +0 -5
  343. package/lib/components/Image/Image.d.ts +6 -0
  344. package/lib/components/Image/index.d.ts +0 -6
  345. package/lib/components/Indicator/Indicator.d.ts +6 -0
  346. package/lib/components/Indicator/index.d.ts +0 -6
  347. package/lib/components/Input/Input.d.ts +51 -7
  348. package/lib/components/Input/index.d.ts +0 -42
  349. package/lib/components/InputBase/InputBase.d.ts +4 -0
  350. package/lib/components/InputBase/index.d.ts +0 -4
  351. package/lib/components/JsonInput/JsonInput.d.ts +4 -0
  352. package/lib/components/JsonInput/index.d.ts +0 -4
  353. package/lib/components/Kbd/Kbd.d.ts +6 -0
  354. package/lib/components/Kbd/index.d.ts +0 -6
  355. package/lib/components/List/List.d.ts +12 -1
  356. package/lib/components/List/index.d.ts +0 -11
  357. package/lib/components/Loader/Loader.d.ts +6 -0
  358. package/lib/components/Loader/index.d.ts +0 -6
  359. package/lib/components/LoadingOverlay/LoadingOverlay.d.ts +6 -0
  360. package/lib/components/LoadingOverlay/index.d.ts +0 -6
  361. package/lib/components/Mark/Mark.d.ts +6 -0
  362. package/lib/components/Mark/index.d.ts +0 -6
  363. package/lib/components/Marquee/Marquee.d.ts +6 -0
  364. package/lib/components/Marquee/index.d.ts +0 -6
  365. package/lib/components/Menu/Menu.d.ts +43 -6
  366. package/lib/components/Menu/index.d.ts +0 -33
  367. package/lib/components/Modal/Modal.d.ts +37 -7
  368. package/lib/components/Modal/index.d.ts +0 -30
  369. package/lib/components/MultiSelect/MultiSelect.d.ts +5 -0
  370. package/lib/components/MultiSelect/index.d.ts +0 -6
  371. package/lib/components/NativeSelect/NativeSelect.d.ts +5 -0
  372. package/lib/components/NativeSelect/index.d.ts +0 -6
  373. package/lib/components/NavLink/NavLink.d.ts +7 -0
  374. package/lib/components/NavLink/index.d.ts +0 -7
  375. package/lib/components/Notification/Notification.d.ts +6 -0
  376. package/lib/components/Notification/index.d.ts +0 -6
  377. package/lib/components/NumberInput/NumberInput.d.ts +7 -0
  378. package/lib/components/NumberInput/index.d.ts +0 -7
  379. package/lib/components/OverflowList/OverflowList.d.ts +6 -0
  380. package/lib/components/OverflowList/index.d.ts +0 -6
  381. package/lib/components/Overlay/Overlay.d.ts +6 -0
  382. package/lib/components/Overlay/index.d.ts +0 -6
  383. package/lib/components/Pagination/Pagination.d.ts +25 -4
  384. package/lib/components/Pagination/index.d.ts +0 -21
  385. package/lib/components/Paper/Paper.d.ts +7 -0
  386. package/lib/components/Paper/index.d.ts +0 -7
  387. package/lib/components/PasswordInput/PasswordInput.d.ts +6 -0
  388. package/lib/components/PasswordInput/index.d.ts +0 -6
  389. package/lib/components/Pill/Pill.d.ts +14 -1
  390. package/lib/components/Pill/index.d.ts +0 -13
  391. package/lib/components/PillsInput/PillsInput.d.ts +12 -1
  392. package/lib/components/PillsInput/index.d.ts +0 -10
  393. package/lib/components/PinInput/PinInput.d.ts +5 -0
  394. package/lib/components/PinInput/index.d.ts +0 -5
  395. package/lib/components/Popover/Popover.d.ts +9 -0
  396. package/lib/components/Portal/OptionalPortal.d.ts +3 -0
  397. package/lib/components/Portal/Portal.d.ts +3 -0
  398. package/lib/components/Portal/index.d.ts +0 -6
  399. package/lib/components/Progress/Progress.d.ts +19 -3
  400. package/lib/components/Progress/index.d.ts +0 -15
  401. package/lib/components/Radio/Radio.d.ts +29 -3
  402. package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +8 -8
  403. package/lib/components/Radio/index.d.ts +0 -26
  404. package/lib/components/Rating/Rating.d.ts +5 -0
  405. package/lib/components/Rating/index.d.ts +0 -5
  406. package/lib/components/RingProgress/RingProgress.d.ts +7 -0
  407. package/lib/components/RingProgress/index.d.ts +0 -7
  408. package/lib/components/ScrollArea/ScrollArea.d.ts +10 -0
  409. package/lib/components/ScrollArea/index.d.ts +0 -10
  410. package/lib/components/Scroller/Scroller.d.ts +6 -0
  411. package/lib/components/Scroller/index.d.ts +0 -6
  412. package/lib/components/SegmentedControl/SegmentedControl.d.ts +7 -0
  413. package/lib/components/SegmentedControl/index.d.ts +0 -8
  414. package/lib/components/Select/Select.d.ts +5 -0
  415. package/lib/components/Select/index.d.ts +0 -6
  416. package/lib/components/SemiCircleProgress/SemiCircleProgress.d.ts +6 -0
  417. package/lib/components/SemiCircleProgress/index.d.ts +0 -6
  418. package/lib/components/SimpleGrid/SimpleGrid.d.ts +5 -0
  419. package/lib/components/SimpleGrid/index.d.ts +0 -5
  420. package/lib/components/Skeleton/Skeleton.d.ts +6 -0
  421. package/lib/components/Skeleton/index.d.ts +0 -6
  422. package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +8 -0
  423. package/lib/components/Slider/Slider/Slider.d.ts +7 -0
  424. package/lib/components/Slider/index.d.ts +0 -15
  425. package/lib/components/Space/Space.d.ts +4 -0
  426. package/lib/components/Space/index.d.ts +0 -5
  427. package/lib/components/Spoiler/Spoiler.d.ts +6 -0
  428. package/lib/components/Spoiler/index.d.ts +0 -6
  429. package/lib/components/Stack/Stack.d.ts +6 -0
  430. package/lib/components/Stack/index.d.ts +0 -6
  431. package/lib/components/Stepper/Stepper.d.ts +17 -2
  432. package/lib/components/Stepper/index.d.ts +0 -14
  433. package/lib/components/Switch/Switch.d.ts +13 -1
  434. package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +8 -8
  435. package/lib/components/Switch/index.d.ts +0 -12
  436. package/lib/components/Table/Table.d.ts +35 -2
  437. package/lib/components/Table/index.d.ts +0 -32
  438. package/lib/components/TableOfContents/TableOfContents.d.ts +7 -0
  439. package/lib/components/TableOfContents/index.d.ts +0 -7
  440. package/lib/components/Tabs/Tabs.d.ts +24 -3
  441. package/lib/components/Tabs/index.d.ts +0 -20
  442. package/lib/components/TagsInput/TagsInput.d.ts +5 -0
  443. package/lib/components/TagsInput/index.d.ts +0 -5
  444. package/lib/components/Text/Text.d.ts +7 -0
  445. package/lib/components/Text/index.d.ts +0 -7
  446. package/lib/components/TextInput/TextInput.d.ts +4 -0
  447. package/lib/components/TextInput/index.d.ts +0 -4
  448. package/lib/components/Textarea/Textarea.d.ts +4 -0
  449. package/lib/components/Textarea/index.d.ts +0 -4
  450. package/lib/components/ThemeIcon/ThemeIcon.d.ts +7 -0
  451. package/lib/components/ThemeIcon/index.d.ts +0 -7
  452. package/lib/components/Timeline/Timeline.d.ts +12 -1
  453. package/lib/components/Timeline/index.d.ts +0 -11
  454. package/lib/components/Title/Title.d.ts +8 -0
  455. package/lib/components/Title/index.d.ts +0 -8
  456. package/lib/components/Tooltip/Tooltip.d.ts +15 -2
  457. package/lib/components/Tooltip/index.d.ts +0 -13
  458. package/lib/components/Tree/Tree.d.ts +7 -0
  459. package/lib/components/Tree/index.d.ts +0 -7
  460. package/lib/components/Typography/Typography.d.ts +5 -0
  461. package/lib/components/Typography/index.d.ts +0 -5
  462. package/lib/components/UnstyledButton/UnstyledButton.d.ts +5 -0
  463. package/lib/components/UnstyledButton/index.d.ts +0 -5
  464. package/lib/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
  465. package/lib/components/VisuallyHidden/index.d.ts +0 -3
  466. package/package.json +2 -2
  467. package/styles/Accordion.css +0 -4
  468. package/styles/Accordion.layer.css +0 -4
  469. package/styles/Badge.css +0 -2
  470. package/styles/Badge.layer.css +0 -2
  471. package/styles/Slider.css +10 -10
  472. package/styles/Slider.layer.css +10 -10
  473. package/styles.css +10 -16
  474. package/styles.layer.css +10 -16
@@ -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 { TimelineItem, TimelineItemStylesNames } from './TimelineItem/TimelineItem';\nimport classes from './Timeline.module.css';\n\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"],"mappings":";;;;;;;;;;;;;;;;;;AAoEA,MAAM,eAAe;CACnB,QAAQ;CACR,OAAO;CACR;AAED,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,YAAY,WAAW,QAAQ,OAAO,oBAAoB,EAClE,MAAM;CACJ,oBAAoBC,YAAAA,IAAI,WAAW;CACnC,mBAAmBA,YAAAA,IAAI,UAAU;CACjC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,OAAO;CACnE,cAAc,QAAQC,wBAAAA,cAAc,OAAO,MAAM,GAAG,KAAA;CACpD,mBAAmBC,gCAAAA,qBAAqB,cAAc,MAAM,GACxDC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;EAAc,CAAC,GAChD,KAAA;CACL,EACF,EACF;AAED,MAAa,WAAWC,gBAAAA,SAA0B,WAAW;CAC3D,MAAM,QAAQC,kBAAAA,SAAS,YAAY,cAAc,OAAO;CACxD,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;EACD,CAAC;CAEF,MAAM,YAAYC,MAAAA,SAAS,QAAQ,SAAS;CAC5C,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;EAC3E,CAAC,CACH;AAED,QACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,kBAAD;EAAkB,OAAO,EAAE,WAAW;YACpC,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI;GAAE,GAAI;aACpD;GACG,CAAA;EACW,CAAA;EAErB;AAEF,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;CACR;AAED,MAAM,eAAeA,6BAAAA,oBAClB,OAAO,EAAE,YAAY,WAAW,QAAQ,OAAO,oBAAoB,EAClE,MAAM;CACJ,oBAAoBC,YAAAA,IAAI,WAAW;CACnC,mBAAmBA,YAAAA,IAAI,UAAU;CACjC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,OAAO;CACnE,cAAc,QAAQC,wBAAAA,cAAc,OAAO,MAAM,GAAG,KAAA;CACpD,mBAAmBC,gCAAAA,qBAAqB,cAAc,MAAM,GACxDC,2BAAAA,iBAAiB;EAAE;EAAO;EAAO;EAAc,CAAC,GAChD,KAAA;CACL,EACF,EACF;AAED,MAAa,WAAWC,gBAAAA,SAA0B,WAAW;CAC3D,MAAM,QAAQC,kBAAAA,SAAS,YAAY,cAAc,OAAO;CACxD,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;EACD,CAAC;CAEF,MAAM,YAAYC,MAAAA,SAAS,QAAQ,SAAS;CAC5C,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;EAC3E,CAAC,CACH;AAED,QACE,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,kBAAD;EAAkB,OAAO,EAAE,WAAW;YACpC,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI;GAAE,GAAI;aACpD;GACG,CAAA;EACW,CAAA;EAErB;AAEF,SAAS,UAAUC,wBAAAA;AACnB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,OAAOC,qBAAAA"}
@@ -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"],"mappings":";;;;;;;;;;;AA6CA,MAAM,eAAe,EACnB,OAAO,GACR;AAED,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgBC,uBAAAA,aAAa,SAAS,GAAG,KAAK;AACpD,QAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,UAAU,GAAG,KAAA;EAC7E,qBAAqB;EACtB,EACF;EACD;AAEF,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,OAAO;CACrD,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;EACD,CAAC;AAEF,KAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;EAAE,CAAC,SAAS,MAAM,CACrC,QAAO;AAGT,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAAI,UAAU,OAAO;EACrB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;GAAU,EAAE,IAAI;EACjE;EACN,GAAI;EACJ,CAAA;EAEJ;AAEF,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,GACR;AAED,MAAM,eAAeA,6BAAAA,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgBC,uBAAAA,aAAa,SAAS,GAAG,KAAK;AACpD,QAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,UAAU,GAAG,KAAA;EAC7E,qBAAqB;EACtB,EACF;EACD;AAEF,MAAa,QAAQC,gBAAAA,SAAuB,WAAW;CACrD,MAAM,QAAQC,kBAAAA,SAAS,SAAS,cAAc,OAAO;CACrD,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;EACD,CAAC;AAEF,KAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;EAAE,CAAC,SAAS,MAAM,CACrC,QAAO;AAGT,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAAI,UAAU,OAAO;EACrB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;GAAU,EAAE,IAAI;EACjE;EACN,GAAI;EACJ,CAAA;EAEJ;AAEF,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","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 getFloatingPosition,\n} from '../../utils/Floating';\nimport { OptionalPortal } from '../Portal';\nimport { getTransitionProps, Transition, TransitionOverride } from '../Transition';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from './Tooltip.types';\nimport { TooltipFloating } from './TooltipFloating/TooltipFloating';\nimport { TooltipGroup } from './TooltipGroup/TooltipGroup';\nimport { useTooltip } from './use-tooltip';\nimport classes from './Tooltip.module.css';\n\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\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 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 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,MAAM,eAAe;CACnB,UAAU;CACV,SAAS;CACT,cAAc;CACd,WAAW;CACX,aAAa;CACb,aAAa;CACb,eAAe;CACf,QAAQ;CACR,iBAAiB;EAAE,UAAU;EAAK,YAAY;EAAQ;CACtD,QAAQ;EAAE,OAAO;EAAM,OAAO;EAAO,OAAO;EAAO;CACnD,QAAQA,4BAAAA,iBAAiB,UAAU;CACnC,aAAa;EAAE,MAAM;EAAM,OAAO;EAAM,QAAQ;EAAO;CACxD;AAED,MAAM,eAAeC,6BAAAA,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC;EACA,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;EACrB,CAAC;AAEF,QAAO,EACL,SAAS;EACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,OAAO;EACxE,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,kBAAA,KAACC,mBAAAA,YAAD;GACE,GAAI;GACS;GACb,SAAS,CAAC,YAAY,CAAC,CAAC,QAAQ;GAChC,UAAU,QAAQ,eAAe,KAAK,WAAW;cAE/C,qBACA,iBAAA,GAAA,kBAAA,MAACC,YAAAA,KAAD;IACE,GAAI;IACJ,cAAY,qBAAqB,WAAW,KAAA;IACnC;IACT,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI;IACzB,GAAI,QAAQ,iBAAiB;KAC3B,KAAK,QAAQ;KACb,WAAW,UAAU,UAAU,CAAC;KAChC,OAAO;MACL,GAAG,UAAU,UAAU,CAAC;MACxB,GAAG;MACK;MACR,KAAK,QAAQ,KAAK;MAClB,MAAM,QAAQ,KAAK;MACpB;KACF,CAAC;cAfJ,CAiBG,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,QAAQ;KACtB,CAAA,CACE;;GAEG,CAAA;EACE,CAAA,GAAA,GAAA,MAAA,cAGf,OACA,QAAQ,kBAAkB;EACxB;EACA;EACA;EACA,aAAa,MAAM;EACnB,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,GAAG;EACH,YAAA,GAAA,KAAA,SAAc,WAAW,WAAW,UAAU;GAC7C,UAAU;EACZ,CAAC,CACH,CACA,EAAA,CAAA;EAEL;AAEF,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","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 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\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 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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,MAAM,eAAe;CACnB,UAAU;CACV,SAAS;CACT,cAAc;CACd,WAAW;CACX,aAAa;CACb,aAAa;CACb,eAAe;CACf,QAAQ;CACR,iBAAiB;EAAE,UAAU;EAAK,YAAY;EAAQ;CACtD,QAAQ;EAAE,OAAO;EAAM,OAAO;EAAO,OAAO;EAAO;CACnD,QAAQA,4BAAAA,iBAAiB,UAAU;CACnC,aAAa;EAAE,MAAM;EAAM,OAAO;EAAM,QAAQ;EAAO;CACxD;AAED,MAAM,eAAeC,6BAAAA,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC;EACA,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;EACrB,CAAC;AAEF,QAAO,EACL,SAAS;EACP,oBAAoB,WAAW,KAAA,IAAY,KAAA,IAAYC,iBAAAA,UAAU,OAAO;EACxE,gBAAgB,QAAQ,OAAO,aAAa,KAAA;EAC5C,mBAAmB,QAAQ,OAAO,QAAQ,KAAA;EAC3C,EACF;EAEJ;AAED,MAAa,UAAUC,gBAAAA,SAAyB,WAAW;CACzD,MAAM,QAAQC,kBAAAA,SAAS,WAAW,cAAc,OAAO;CACvD,MAAM,EACJ,UACA,UACA,SACA,OACA,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C;IACT,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI;IACzB,GAAI,QAAQ,iBAAiB;KAC3B,KAAK,QAAQ;KACb,WAAW,UAAU,UAAU,CAAC;KAChC,OAAO;MACL,GAAG,UAAU,UAAU,CAAC;MACxB,GAAG;MACK;MACR,KAAK,QAAQ,KAAK;MAClB,MAAM,QAAQ,KAAK;MACpB;KACF,CAAC;cAfJ,CAiBG,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,QAAQ;KACtB,CAAA,CACE;;GAEG,CAAA;EACE,CAAA,GAAA,GAAA,MAAA,cAGf,OACA,QAAQ,kBAAkB;EACxB;EACA;EACA;EACA,aAAa,MAAM;EACnB,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,GAAG;EACH,YAAA,GAAA,KAAA,SAAc,WAAW,WAAW,UAAU;GAC7C,UAAU;EACZ,CAAC,CACH,CACA,EAAA,CAAA;EAEL;AAEF,QAAQ,UAAUE,uBAAAA;AAClB,QAAQ,eAAe;AACvB,QAAQ,cAAc;AACtB,QAAQ,WAAWC,wBAAAA;AACnB,QAAQ,QAAQC,qBAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.cjs","names":["createVarsResolver","getSpacing","factory","useProps","useTree","useStyles","TreeNode","Box","classes"],"sources":["../../../src/components/Tree/Tree.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useClickOutside, useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TreeNode } from './TreeNode';\nimport { TreeController, useTree } from './use-tree';\nimport classes from './Tree.module.css';\n\nexport interface TreeNodeData {\n label: React.ReactNode;\n value: string;\n nodeProps?: Record<string, any>;\n children?: TreeNodeData[];\n}\n\nexport interface RenderTreeNodePayload {\n /** Node level in the tree */\n level: number;\n\n /** `true` if the node is expanded, applicable only for nodes with `children` */\n expanded: boolean;\n\n /** `true` if the node has non-empty `children` array */\n hasChildren: boolean;\n\n /** `true` if the node is selected */\n selected: boolean;\n\n /** Node data from the `data` prop of `Tree` */\n node: TreeNodeData;\n\n /** Tree controller instance, return value of `useTree` hook */\n tree: TreeController;\n\n /** Props to spread into the root node element */\n elementProps: {\n className: string;\n style: React.CSSProperties;\n onClick: (event: React.MouseEvent) => void;\n 'data-selected': boolean | undefined;\n 'data-value': string;\n };\n}\n\nexport type RenderNode = (payload: RenderTreeNodePayload) => React.ReactNode;\n\nexport type TreeStylesNames = 'root' | 'node' | 'subtree' | 'label';\nexport type TreeCssVariables = {\n root: '--level-offset';\n};\n\nexport interface TreeProps extends BoxProps, StylesApiProps<TreeFactory>, ElementProps<'ul'> {\n /** Data used to render nodes */\n data: TreeNodeData[];\n\n /** Horizontal padding of each subtree level, key of `theme.spacing` or any valid CSS value @default 'lg' */\n levelOffset?: MantineSpacing;\n\n /** If set, tree node with children is expanded on click @default true */\n expandOnClick?: boolean;\n\n /** If set, tree node with children is expanded on space key press @default true */\n expandOnSpace?: boolean;\n\n /** If set, tree node is checked on space key press @default false */\n checkOnSpace?: boolean;\n\n /** If set, tree node is selected on click @default false */\n selectOnClick?: boolean;\n\n /** Use-tree hook instance that can be used to manipulate component state */\n tree?: TreeController;\n\n /** A function to render tree node label */\n renderNode?: RenderNode;\n\n /** If set, selection is cleared when user clicks outside of the tree @default false */\n clearSelectionOnOutsideClick?: boolean;\n\n /** If set, tree nodes range can be selected with click when `Shift` key is pressed @default true */\n allowRangeSelection?: boolean;\n\n /** If set, subtree content is kept mounted when collapsed. React 19 `Activity` is used to preserve state. @default false */\n keepMounted?: boolean;\n}\n\nfunction getFlatValues(data: TreeNodeData[]): string[] {\n return data.reduce<string[]>((acc, item) => {\n acc.push(item.value);\n if (item.children) {\n acc.push(...getFlatValues(item.children));\n }\n return acc;\n }, []);\n}\n\nexport type TreeFactory = Factory<{\n props: TreeProps;\n ref: HTMLUListElement;\n stylesNames: TreeStylesNames;\n vars: TreeCssVariables;\n}>;\n\nconst defaultProps = {\n expandOnClick: true,\n allowRangeSelection: true,\n expandOnSpace: true,\n} satisfies Partial<TreeProps>;\n\nconst varsResolver = createVarsResolver<TreeFactory>((_theme, { levelOffset }) => ({\n root: {\n '--level-offset': getSpacing(levelOffset),\n },\n}));\n\nexport const Tree = factory<TreeFactory>((_props) => {\n const props = useProps('Tree', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n expandOnClick,\n tree,\n renderNode,\n selectOnClick,\n clearSelectionOnOutsideClick,\n allowRangeSelection,\n expandOnSpace,\n levelOffset,\n checkOnSpace,\n keepMounted,\n attributes,\n ref,\n ...others\n } = props;\n\n const defaultController = useTree();\n const controller = tree || defaultController;\n\n const getStyles = useStyles<TreeFactory>({\n name: 'Tree',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const clickOutsideRef = useClickOutside(\n () => clearSelectionOnOutsideClick && controller.clearSelected()\n );\n\n const mergedRef = useMergedRef(ref, clickOutsideRef);\n\n const flatValues = useMemo(() => getFlatValues(data), [data]);\n\n useEffect(() => {\n controller.initialize(data);\n }, [data]);\n\n const nodes = data.map((node, index) => (\n <TreeNode\n key={node.value}\n node={node}\n getStyles={getStyles}\n rootIndex={index}\n expandOnClick={expandOnClick}\n selectOnClick={selectOnClick}\n controller={controller}\n renderNode={renderNode}\n flatValues={flatValues}\n allowRangeSelection={allowRangeSelection}\n expandOnSpace={expandOnSpace}\n checkOnSpace={checkOnSpace}\n keepMounted={keepMounted}\n />\n ));\n\n return (\n <Box\n component=\"ul\"\n ref={mergedRef}\n {...getStyles('root')}\n {...others}\n role=\"tree\"\n aria-multiselectable={controller.multiple}\n data-tree-root\n >\n {nodes}\n </Box>\n );\n});\n\nTree.displayName = '@mantine/core/Tree';\nTree.classes = classes;\nTree.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;;AAiGA,SAAS,cAAc,MAAgC;AACrD,QAAO,KAAK,QAAkB,KAAK,SAAS;AAC1C,MAAI,KAAK,KAAK,MAAM;AACpB,MAAI,KAAK,SACP,KAAI,KAAK,GAAG,cAAc,KAAK,SAAS,CAAC;AAE3C,SAAO;IACN,EAAE,CAAC;;AAUR,MAAM,eAAe;CACnB,eAAe;CACf,qBAAqB;CACrB,eAAe;CAChB;AAED,MAAM,eAAeA,6BAAAA,oBAAiC,QAAQ,EAAE,mBAAmB,EACjF,MAAM,EACJ,kBAAkBC,iBAAAA,WAAW,YAAY,EAC1C,EACF,EAAE;AAEH,MAAa,OAAOC,gBAAAA,SAAsB,WAAW;CACnD,MAAM,QAAQC,kBAAAA,SAAS,QAAQ,cAAc,OAAO;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,eACA,MACA,YACA,eACA,8BACA,qBACA,eACA,aACA,cACA,aACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,oBAAoBC,iBAAAA,SAAS;CACnC,MAAM,aAAa,QAAQ;CAE3B,MAAM,YAAYC,mBAAAA,UAAuB;EACvC,MAAM;EACN,SAAA,oBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAMF,MAAM,aAAA,GAAA,eAAA,cAAyB,MAAA,GAAA,eAAA,uBAHvB,gCAAgC,WAAW,eAAe,CACjE,CAEmD;CAEpD,MAAM,cAAA,GAAA,MAAA,eAA2B,cAAc,KAAK,EAAE,CAAC,KAAK,CAAC;AAE7D,EAAA,GAAA,MAAA,iBAAgB;AACd,aAAW,WAAW,KAAK;IAC1B,CAAC,KAAK,CAAC;CAEV,MAAM,QAAQ,KAAK,KAAK,MAAM,UAC5B,iBAAA,GAAA,kBAAA,KAACC,iBAAAA,UAAD;EAEQ;EACK;EACX,WAAW;EACI;EACA;EACH;EACA;EACA;EACS;EACN;EACD;EACD;EACb,EAbK,KAAK,MAaV,CACF;AAEF,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,WAAU;EACV,KAAK;EACL,GAAI,UAAU,OAAO;EACrB,GAAI;EACJ,MAAK;EACL,wBAAsB,WAAW;EACjC,kBAAA;YAEC;EACG,CAAA;EAER;AAEF,KAAK,cAAc;AACnB,KAAK,UAAUC,oBAAAA;AACf,KAAK,eAAe"}
1
+ {"version":3,"file":"Tree.cjs","names":["createVarsResolver","getSpacing","factory","useProps","useTree","useStyles","TreeNode","Box","classes"],"sources":["../../../src/components/Tree/Tree.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useClickOutside, useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TreeNode } from './TreeNode';\nimport { TreeController, useTree } from './use-tree';\nimport classes from './Tree.module.css';\n\nexport interface TreeNodeData {\n label: React.ReactNode;\n value: string;\n nodeProps?: Record<string, any>;\n children?: TreeNodeData[];\n}\n\nexport interface RenderTreeNodePayload {\n /** Node level in the tree */\n level: number;\n\n /** `true` if the node is expanded, applicable only for nodes with `children` */\n expanded: boolean;\n\n /** `true` if the node has non-empty `children` array */\n hasChildren: boolean;\n\n /** `true` if the node is selected */\n selected: boolean;\n\n /** Node data from the `data` prop of `Tree` */\n node: TreeNodeData;\n\n /** Tree controller instance, return value of `useTree` hook */\n tree: TreeController;\n\n /** Props to spread into the root node element */\n elementProps: {\n className: string;\n style: React.CSSProperties;\n onClick: (event: React.MouseEvent) => void;\n 'data-selected': boolean | undefined;\n 'data-value': string;\n };\n}\n\nexport type RenderNode = (payload: RenderTreeNodePayload) => React.ReactNode;\n\nexport type TreeStylesNames = 'root' | 'node' | 'subtree' | 'label';\nexport type TreeCssVariables = {\n root: '--level-offset';\n};\n\nexport interface TreeProps extends BoxProps, StylesApiProps<TreeFactory>, ElementProps<'ul'> {\n /** Data used to render nodes */\n data: TreeNodeData[];\n\n /** Horizontal padding of each subtree level, key of `theme.spacing` or any valid CSS value @default 'lg' */\n levelOffset?: MantineSpacing;\n\n /** If set, tree node with children is expanded on click @default true */\n expandOnClick?: boolean;\n\n /** If set, tree node with children is expanded on space key press @default true */\n expandOnSpace?: boolean;\n\n /** If set, tree node is checked on space key press @default false */\n checkOnSpace?: boolean;\n\n /** If set, tree node is selected on click @default false */\n selectOnClick?: boolean;\n\n /** Use-tree hook instance that can be used to manipulate component state */\n tree?: TreeController;\n\n /** A function to render tree node label */\n renderNode?: RenderNode;\n\n /** If set, selection is cleared when user clicks outside of the tree @default false */\n clearSelectionOnOutsideClick?: boolean;\n\n /** If set, tree nodes range can be selected with click when `Shift` key is pressed @default true */\n allowRangeSelection?: boolean;\n\n /** If set, subtree content is kept mounted when collapsed. React 19 `Activity` is used to preserve state. @default false */\n keepMounted?: boolean;\n}\n\nfunction getFlatValues(data: TreeNodeData[]): string[] {\n return data.reduce<string[]>((acc, item) => {\n acc.push(item.value);\n if (item.children) {\n acc.push(...getFlatValues(item.children));\n }\n return acc;\n }, []);\n}\n\nexport type TreeFactory = Factory<{\n props: TreeProps;\n ref: HTMLUListElement;\n stylesNames: TreeStylesNames;\n vars: TreeCssVariables;\n}>;\n\nconst defaultProps = {\n expandOnClick: true,\n allowRangeSelection: true,\n expandOnSpace: true,\n} satisfies Partial<TreeProps>;\n\nconst varsResolver = createVarsResolver<TreeFactory>((_theme, { levelOffset }) => ({\n root: {\n '--level-offset': getSpacing(levelOffset),\n },\n}));\n\nexport const Tree = factory<TreeFactory>((_props) => {\n const props = useProps('Tree', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n expandOnClick,\n tree,\n renderNode,\n selectOnClick,\n clearSelectionOnOutsideClick,\n allowRangeSelection,\n expandOnSpace,\n levelOffset,\n checkOnSpace,\n keepMounted,\n attributes,\n ref,\n ...others\n } = props;\n\n const defaultController = useTree();\n const controller = tree || defaultController;\n\n const getStyles = useStyles<TreeFactory>({\n name: 'Tree',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const clickOutsideRef = useClickOutside(\n () => clearSelectionOnOutsideClick && controller.clearSelected()\n );\n\n const mergedRef = useMergedRef(ref, clickOutsideRef);\n\n const flatValues = useMemo(() => getFlatValues(data), [data]);\n\n useEffect(() => {\n controller.initialize(data);\n }, [data]);\n\n const nodes = data.map((node, index) => (\n <TreeNode\n key={node.value}\n node={node}\n getStyles={getStyles}\n rootIndex={index}\n expandOnClick={expandOnClick}\n selectOnClick={selectOnClick}\n controller={controller}\n renderNode={renderNode}\n flatValues={flatValues}\n allowRangeSelection={allowRangeSelection}\n expandOnSpace={expandOnSpace}\n checkOnSpace={checkOnSpace}\n keepMounted={keepMounted}\n />\n ));\n\n return (\n <Box\n component=\"ul\"\n ref={mergedRef}\n {...getStyles('root')}\n {...others}\n role=\"tree\"\n aria-multiselectable={controller.multiple}\n data-tree-root\n >\n {nodes}\n </Box>\n );\n});\n\nTree.displayName = '@mantine/core/Tree';\nTree.classes = classes;\nTree.varsResolver = varsResolver;\n\nexport namespace Tree {\n export type Props = TreeProps;\n export type StylesNames = TreeStylesNames;\n export type Factory = TreeFactory;\n export type NodeData = TreeNodeData;\n export type RenderNodePayload = RenderTreeNodePayload;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiGA,SAAS,cAAc,MAAgC;AACrD,QAAO,KAAK,QAAkB,KAAK,SAAS;AAC1C,MAAI,KAAK,KAAK,MAAM;AACpB,MAAI,KAAK,SACP,KAAI,KAAK,GAAG,cAAc,KAAK,SAAS,CAAC;AAE3C,SAAO;IACN,EAAE,CAAC;;AAUR,MAAM,eAAe;CACnB,eAAe;CACf,qBAAqB;CAC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3,"file":"Typography.cjs","names":["factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Typography.module.css';\n\nexport type TypographyStylesNames = 'root';\n\nexport interface TypographyProps\n extends BoxProps, StylesApiProps<TypographyFactory>, ElementProps<'div'> {}\n\nexport type TypographyFactory = Factory<{\n props: TypographyProps;\n ref: HTMLDivElement;\n stylesNames: TypographyStylesNames;\n}>;\n\nexport const Typography = factory<TypographyFactory>((_props) => {\n const props = useProps('Typography', null, _props);\n const { classNames, className, style, styles, unstyled, attributes, ...others } = props;\n\n const getStyles = useStyles<TypographyFactory>({\n name: 'Typography',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nTypography.classes = classes;\nTypography.displayName = '@mantine/core/Typography';\n"],"mappings":";;;;;;;;;AAuBA,MAAa,aAAaA,gBAAAA,SAA4B,WAAW;CAC/D,MAAM,QAAQC,kBAAAA,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,YAAY,GAAG,WAAW;AAclF,QAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,GAZMC,mBAAAA,UAA6B;GAC7C,MAAM;GACN,SAAA,0BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEwB,OAAO;EAAE,GAAI;EAAU,CAAA;EACjD;AAEF,WAAW,UAAUC,0BAAAA;AACrB,WAAW,cAAc"}
1
+ {"version":3,"file":"Typography.cjs","names":["factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Typography.module.css';\n\nexport type TypographyStylesNames = 'root';\n\nexport interface TypographyProps\n extends BoxProps, StylesApiProps<TypographyFactory>, ElementProps<'div'> {}\n\nexport type TypographyFactory = Factory<{\n props: TypographyProps;\n ref: HTMLDivElement;\n stylesNames: TypographyStylesNames;\n}>;\n\nexport const Typography = factory<TypographyFactory>((_props) => {\n const props = useProps('Typography', null, _props);\n const { classNames, className, style, styles, unstyled, attributes, ...others } = props;\n\n const getStyles = useStyles<TypographyFactory>({\n name: 'Typography',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nTypography.classes = classes;\nTypography.displayName = '@mantine/core/Typography';\n\nexport namespace Typography {\n export type Props = TypographyProps;\n export type StylesNames = TypographyStylesNames;\n export type Factory = TypographyFactory;\n}\n"],"mappings":";;;;;;;;;AAuBA,MAAa,aAAaA,gBAAAA,SAA4B,WAAW;CAC/D,MAAM,QAAQC,kBAAAA,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,YAAY,GAAG,WAAW;AAclF,QAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,GAZMC,mBAAAA,UAA6B;GAC7C,MAAM;GACN,SAAA,0BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEwB,OAAO;EAAE,GAAI;EAAU,CAAA;EACjD;AAEF,WAAW,UAAUC,0BAAAA;AACrB,WAAW,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"UnstyledButton.cjs","names":["polymorphicFactory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import {\n Box,\n BoxComponentProps,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './UnstyledButton.module.css';\n\nexport type UnstyledButtonStylesNames = 'root';\n\nexport interface UnstyledButtonProps\n extends Omit<BoxComponentProps, 'vars' | 'variant'>, StylesApiProps<UnstyledButtonFactory> {\n __staticSelector?: string;\n}\n\nconst defaultProps = {\n __staticSelector: 'UnstyledButton',\n} satisfies Partial<UnstyledButtonProps>;\n\nexport type UnstyledButtonFactory = PolymorphicFactory<{\n props: UnstyledButtonProps;\n stylesNames: UnstyledButtonStylesNames;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n}>;\n\nexport const UnstyledButton = polymorphicFactory<UnstyledButtonFactory>(\n (_props: UnstyledButtonProps & { component?: any }) => {\n const props = useProps('UnstyledButton', defaultProps, _props);\n const {\n className,\n component = 'button',\n __staticSelector,\n unstyled,\n classNames,\n styles,\n style,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<UnstyledButtonFactory>({\n name: __staticSelector,\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={component}\n type={component === 'button' ? 'button' : undefined}\n {...others}\n />\n );\n }\n);\n\nUnstyledButton.classes = classes;\nUnstyledButton.displayName = '@mantine/core/UnstyledButton';\n"],"mappings":";;;;;;;;;AAkBA,MAAM,eAAe,EACnB,kBAAkB,kBACnB;AASD,MAAa,iBAAiBA,4BAAAA,oBAC3B,WAAsD;CACrD,MAAM,QAAQC,kBAAAA,SAAS,kBAAkB,cAAc,OAAO;CAC9D,MAAM,EACJ,WACA,YAAY,UACZ,kBACA,UACA,YACA,QACA,OACA,YACA,GAAG,WACD;AAcJ,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAdcC,mBAAAA,UAAiC;GACjD,MAAM;GACN;GACA,SAAA,8BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAIgB,QAAQ,EAAE,WAAW,MAAM,CAAC;EAC/B;EACX,MAAM,cAAc,WAAW,WAAW,KAAA;EAC1C,GAAI;EACJ,CAAA;EAGP;AAED,eAAe,UAAUC,8BAAAA;AACzB,eAAe,cAAc"}
1
+ {"version":3,"file":"UnstyledButton.cjs","names":["polymorphicFactory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import {\n Box,\n BoxComponentProps,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './UnstyledButton.module.css';\n\nexport type UnstyledButtonStylesNames = 'root';\n\nexport interface UnstyledButtonProps\n extends Omit<BoxComponentProps, 'vars' | 'variant'>, StylesApiProps<UnstyledButtonFactory> {\n __staticSelector?: string;\n}\n\nconst defaultProps = {\n __staticSelector: 'UnstyledButton',\n} satisfies Partial<UnstyledButtonProps>;\n\nexport type UnstyledButtonFactory = PolymorphicFactory<{\n props: UnstyledButtonProps;\n stylesNames: UnstyledButtonStylesNames;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n}>;\n\nexport const UnstyledButton = polymorphicFactory<UnstyledButtonFactory>(\n (_props: UnstyledButtonProps & { component?: any }) => {\n const props = useProps('UnstyledButton', defaultProps, _props);\n const {\n className,\n component = 'button',\n __staticSelector,\n unstyled,\n classNames,\n styles,\n style,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<UnstyledButtonFactory>({\n name: __staticSelector,\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={component}\n type={component === 'button' ? 'button' : undefined}\n {...others}\n />\n );\n }\n);\n\nUnstyledButton.classes = classes;\nUnstyledButton.displayName = '@mantine/core/UnstyledButton';\n\nexport namespace UnstyledButton {\n export type Props = UnstyledButtonProps;\n export type StylesNames = UnstyledButtonStylesNames;\n export type Factory = UnstyledButtonFactory;\n}\n"],"mappings":";;;;;;;;;AAkBA,MAAM,eAAe,EACnB,kBAAkB,kBACnB;AASD,MAAa,iBAAiBA,4BAAAA,oBAC3B,WAAsD;CACrD,MAAM,QAAQC,kBAAAA,SAAS,kBAAkB,cAAc,OAAO;CAC9D,MAAM,EACJ,WACA,YAAY,UACZ,kBACA,UACA,YACA,QACA,OACA,YACA,GAAG,WACD;AAcJ,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,GAdcC,mBAAAA,UAAiC;GACjD,MAAM;GACN;GACA,SAAA,8BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAIgB,QAAQ,EAAE,WAAW,MAAM,CAAC;EAC/B;EACX,MAAM,cAAc,WAAW,WAAW,KAAA;EAC1C,GAAI;EACJ,CAAA;EAGP;AAED,eAAe,UAAUC,8BAAAA;AACzB,eAAe,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisuallyHidden.cjs","names":["factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/VisuallyHidden/VisuallyHidden.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './VisuallyHidden.module.css';\n\nexport type VisuallyHiddenStylesNames = 'root';\n\nexport interface VisuallyHiddenProps\n extends BoxProps, StylesApiProps<VisuallyHiddenFactory>, ElementProps<'span'> {}\n\nexport type VisuallyHiddenFactory = Factory<{\n props: VisuallyHiddenProps;\n ref: HTMLSpanElement;\n stylesNames: VisuallyHiddenStylesNames;\n}>;\n\nexport const VisuallyHidden = factory<VisuallyHiddenFactory>((_props) => {\n const props = useProps('VisuallyHidden', null, _props);\n const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;\n\n const getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box component=\"span\" {...getStyles('root')} {...others} />;\n});\n\nVisuallyHidden.classes = classes;\nVisuallyHidden.displayName = '@mantine/core/VisuallyHidden';\n"],"mappings":";;;;;;;;;AAuBA,MAAa,iBAAiBA,gBAAAA,SAAgC,WAAW;CACvE,MAAM,QAAQC,kBAAAA,SAAS,kBAAkB,MAAM,OAAO;CACtD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,MAAM,YAAY,GAAG,WAAW;AAcxF,QAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,WAAU;EAAO,GAZXC,mBAAAA,UAAiC;GACjD,MAAM;GACN,SAAA,8BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEyC,OAAO;EAAE,GAAI;EAAU,CAAA;EAClE;AAEF,eAAe,UAAUC,8BAAAA;AACzB,eAAe,cAAc"}
1
+ {"version":3,"file":"VisuallyHidden.cjs","names":["factory","useProps","Box","useStyles","classes"],"sources":["../../../src/components/VisuallyHidden/VisuallyHidden.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './VisuallyHidden.module.css';\n\nexport type VisuallyHiddenStylesNames = 'root';\n\nexport interface VisuallyHiddenProps\n extends BoxProps, StylesApiProps<VisuallyHiddenFactory>, ElementProps<'span'> {}\n\nexport type VisuallyHiddenFactory = Factory<{\n props: VisuallyHiddenProps;\n ref: HTMLSpanElement;\n stylesNames: VisuallyHiddenStylesNames;\n}>;\n\nexport const VisuallyHidden = factory<VisuallyHiddenFactory>((_props) => {\n const props = useProps('VisuallyHidden', null, _props);\n const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;\n\n const getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box component=\"span\" {...getStyles('root')} {...others} />;\n});\n\nVisuallyHidden.classes = classes;\nVisuallyHidden.displayName = '@mantine/core/VisuallyHidden';\n\nexport namespace VisuallyHidden {\n export type Props = VisuallyHiddenProps;\n}\n"],"mappings":";;;;;;;;;AAuBA,MAAa,iBAAiBA,gBAAAA,SAAgC,WAAW;CACvE,MAAM,QAAQC,kBAAAA,SAAS,kBAAkB,MAAM,OAAO;CACtD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,MAAM,YAAY,GAAG,WAAW;AAcxF,QAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,WAAU;EAAO,GAZXC,mBAAAA,UAAiC;GACjD,MAAM;GACN,SAAA,8BAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEyC,OAAO;EAAE,GAAI;EAAU,CAAA;EAClE;AAEF,eAAe,UAAUC,8BAAAA;AACzB,eAAe,cAAc"}
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  const require_rem = require("../../../utils/units-converters/rem.cjs");
3
- const require_luminance = require("../luminance/luminance.cjs");
4
3
  const require_parse_theme_color = require("../parse-theme-color/parse-theme-color.cjs");
5
4
  const require_darken = require("../darken/darken.cjs");
6
5
  const require_get_gradient = require("../get-gradient/get-gradient.cjs");
@@ -58,9 +57,9 @@ const defaultVariantColorsResolver = ({ color, theme, variant, gradient, autoCon
58
57
  };
59
58
  }
60
59
  return {
61
- background: color,
62
- hover: require_darken.darken(color, .1),
63
- color: require_luminance.isLightColor(color) ? "var(--mantine-color-black)" : "var(--mantine-color-white)",
60
+ background: require_rgba.rgba(color, .1),
61
+ hover: require_rgba.rgba(color, .12),
62
+ color,
64
63
  border: `${require_rem.rem(1)} solid transparent`
65
64
  };
66
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"default-variant-colors-resolver.cjs","names":["parseThemeColor","rem","darken","isLightColor","rgba","getGradient"],"sources":["../../../../../src/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.ts"],"sourcesContent":["import { rem } from '../../../utils';\nimport { MantineColor, MantineGradient, MantineTheme } from '../../theme.types';\nimport { darken } from '../darken/darken';\nimport { getGradient } from '../get-gradient/get-gradient';\nimport { isLightColor } from '../luminance/luminance';\nimport { parseThemeColor } from '../parse-theme-color/parse-theme-color';\nimport { rgba } from '../rgba/rgba';\n\nexport interface VariantColorsResolverInput {\n color: MantineColor | undefined;\n theme: MantineTheme;\n variant: string;\n gradient?: MantineGradient;\n autoContrast?: boolean;\n}\n\nexport interface VariantColorResolverResult {\n background: string;\n hover: string;\n color: string;\n border: string;\n hoverColor?: string;\n}\n\nexport type VariantColorsResolver = (\n input: VariantColorsResolverInput\n) => VariantColorResolverResult;\n\nexport const defaultVariantColorsResolver: VariantColorsResolver = ({\n color,\n theme,\n variant,\n gradient,\n autoContrast,\n}) => {\n const parsed = parseThemeColor({ color, theme });\n\n const _autoContrast = typeof autoContrast === 'boolean' ? autoContrast : theme.autoContrast;\n\n if (variant === 'none') {\n return {\n background: 'transparent',\n hover: 'transparent',\n color: 'inherit',\n border: 'none',\n };\n }\n\n if (variant === 'filled') {\n const textColor = _autoContrast\n ? parsed.isLight\n ? 'var(--mantine-color-black)'\n : 'var(--mantine-color-white)'\n : 'var(--mantine-color-white)';\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: `var(--mantine-color-${color}-filled)`,\n hover: `var(--mantine-color-${color}-filled-hover)`,\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n hover: `var(--mantine-color-${parsed.color}-${parsed.shade === 9 ? 8 : parsed.shade + 1})`,\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: color!,\n hover: darken(color!, 0.1),\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'light') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: `var(--mantine-color-${color}-light)`,\n hover: `var(--mantine-color-${color}-light-hover)`,\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n const parsedColor = theme.colors[parsed.color][parsed.shade];\n\n return {\n background: parsedColor,\n hover: darken(parsedColor, 0.1),\n color: `var(--mantine-color-${parsed.color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: color!,\n hover: darken(color!, 0.1),\n color: isLightColor(color!) ? 'var(--mantine-color-black)' : 'var(--mantine-color-white)',\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'outline') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: `var(--mantine-color-${color}-outline-hover)`,\n color: `var(--mantine-color-${color}-outline)`,\n border: `${rem(1)} solid var(--mantine-color-${color}-outline)`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(theme.colors[parsed.color][parsed.shade], 0.05),\n color: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n border: `${rem(1)} solid var(--mantine-color-${parsed.color}-${parsed.shade})`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(color!, 0.05),\n color: color!,\n border: `${rem(1)} solid ${color}`,\n };\n }\n\n if (variant === 'subtle') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: `var(--mantine-color-${color}-light-hover)`,\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n const parsedColor = theme.colors[parsed.color][parsed.shade];\n\n return {\n background: 'transparent',\n hover: rgba(parsedColor, 0.12),\n color: `var(--mantine-color-${parsed.color}-${Math.min(parsed.shade, 6)})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(color!, 0.12),\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'transparent') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: 'transparent',\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: 'transparent',\n color: `var(--mantine-color-${parsed.color}-${Math.min(parsed.shade, 6)})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: 'transparent',\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'white') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: `var(--mantine-color-${color}-filled)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'gradient') {\n return {\n background: getGradient(gradient, theme),\n hover: getGradient(gradient, theme),\n color: 'var(--mantine-color-white)',\n border: 'none',\n };\n }\n\n if (variant === 'default') {\n return {\n background: 'var(--mantine-color-default)',\n hover: 'var(--mantine-color-default-hover)',\n color: 'var(--mantine-color-default-color)',\n border: `${rem(1)} solid var(--mantine-color-default-border)`,\n };\n }\n\n return {} as VariantColorResolverResult;\n};\n"],"mappings":";;;;;;;;AA4BA,MAAa,gCAAuD,EAClE,OACA,OACA,SACA,UACA,mBACI;CACJ,MAAM,SAASA,0BAAAA,gBAAgB;EAAE;EAAO;EAAO,CAAC;CAEhD,MAAM,gBAAgB,OAAO,iBAAiB,YAAY,eAAe,MAAM;AAE/E,KAAI,YAAY,OACd,QAAO;EACL,YAAY;EACZ,OAAO;EACP,OAAO;EACP,QAAQ;EACT;AAGH,KAAI,YAAY,UAAU;EACxB,MAAM,YAAY,gBACd,OAAO,UACL,+BACA,+BACF;AACJ,MAAI,OAAO,cAAc;AACvB,OAAI,OAAO,UAAU,KAAA,EACnB,QAAO;IACL,YAAY,uBAAuB,MAAM;IACzC,OAAO,uBAAuB,MAAM;IACpC,OAAO;IACP,Q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B;;AAGH,SAAO;GACL,YAAY;GACZ,OAAO;GACA;GACP,QAAQ,GAAGA,YAAAA,IAAI,EAAE,CAAC;GACnB;;AAGH,KAAI,YAAY,SAAS;AACvB,MAAI,OAAO,cAAc;AACvB,OAAI,OAAO,UAAU,KAAA,EACnB,QAAO;IACL,YAAY;IACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;IAChC,OAAO,uBAAuB,MAAM;IACpC,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;IACnB;AAGH,UAAO;IACL,YAAY;IACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;IAChC,OAAO,uBAAuB,OAAO,MAAM,GAAG,OAAO,MAAM;IAC3D,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;IACnB;;AAGH,SAAO;GACL,YAAY;GACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;GACzB;GACP,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;GACnB;;AAGH,KAAI,YAAY,WACd,QAAO;EACL,YAAYI,qBAAAA,YAAY,UAAU,MAAM;EACxC,OAAOA,qBAAAA,YAAY,UAAU,MAAM;EACnC,OAAO;EACP,QAAQ;EACT;AAGH,KAAI,YAAY,UACd,QAAO;EACL,YAAY;EACZ,OAAO;EACP,OAAO;EACP,QAAQ,GAAGJ,YAAAA,IAAI,EAAE,CAAC;EACnB;AAGH,QAAO,EAAE"}
1
+ {"version":3,"file":"default-variant-colors-resolver.cjs","names":["parseThemeColor","rem","darken","rgba","getGradient"],"sources":["../../../../../src/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.ts"],"sourcesContent":["import { rem } from '../../../utils';\nimport { MantineColor, MantineGradient, MantineTheme } from '../../theme.types';\nimport { darken } from '../darken/darken';\nimport { getGradient } from '../get-gradient/get-gradient';\nimport { parseThemeColor } from '../parse-theme-color/parse-theme-color';\nimport { rgba } from '../rgba/rgba';\n\nexport interface VariantColorsResolverInput {\n color: MantineColor | undefined;\n theme: MantineTheme;\n variant: string;\n gradient?: MantineGradient;\n autoContrast?: boolean;\n}\n\nexport interface VariantColorResolverResult {\n background: string;\n hover: string;\n color: string;\n border: string;\n hoverColor?: string;\n}\n\nexport type VariantColorsResolver = (\n input: VariantColorsResolverInput\n) => VariantColorResolverResult;\n\nexport const defaultVariantColorsResolver: VariantColorsResolver = ({\n color,\n theme,\n variant,\n gradient,\n autoContrast,\n}) => {\n const parsed = parseThemeColor({ color, theme });\n\n const _autoContrast = typeof autoContrast === 'boolean' ? autoContrast : theme.autoContrast;\n\n if (variant === 'none') {\n return {\n background: 'transparent',\n hover: 'transparent',\n color: 'inherit',\n border: 'none',\n };\n }\n\n if (variant === 'filled') {\n const textColor = _autoContrast\n ? parsed.isLight\n ? 'var(--mantine-color-black)'\n : 'var(--mantine-color-white)'\n : 'var(--mantine-color-white)';\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: `var(--mantine-color-${color}-filled)`,\n hover: `var(--mantine-color-${color}-filled-hover)`,\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n hover: `var(--mantine-color-${parsed.color}-${parsed.shade === 9 ? 8 : parsed.shade + 1})`,\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: color!,\n hover: darken(color!, 0.1),\n color: textColor,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'light') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: `var(--mantine-color-${color}-light)`,\n hover: `var(--mantine-color-${color}-light-hover)`,\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n const parsedColor = theme.colors[parsed.color][parsed.shade];\n\n return {\n background: parsedColor,\n hover: darken(parsedColor, 0.1),\n color: `var(--mantine-color-${parsed.color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: rgba(color!, 0.1),\n hover: rgba(color!, 0.12),\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'outline') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: `var(--mantine-color-${color}-outline-hover)`,\n color: `var(--mantine-color-${color}-outline)`,\n border: `${rem(1)} solid var(--mantine-color-${color}-outline)`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(theme.colors[parsed.color][parsed.shade], 0.05),\n color: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n border: `${rem(1)} solid var(--mantine-color-${parsed.color}-${parsed.shade})`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(color!, 0.05),\n color: color!,\n border: `${rem(1)} solid ${color}`,\n };\n }\n\n if (variant === 'subtle') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: `var(--mantine-color-${color}-light-hover)`,\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n const parsedColor = theme.colors[parsed.color][parsed.shade];\n\n return {\n background: 'transparent',\n hover: rgba(parsedColor, 0.12),\n color: `var(--mantine-color-${parsed.color}-${Math.min(parsed.shade, 6)})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: rgba(color!, 0.12),\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'transparent') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'transparent',\n hover: 'transparent',\n color: `var(--mantine-color-${color}-light-color)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: 'transparent',\n color: `var(--mantine-color-${parsed.color}-${Math.min(parsed.shade, 6)})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'transparent',\n hover: 'transparent',\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'white') {\n if (parsed.isThemeColor) {\n if (parsed.shade === undefined) {\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: `var(--mantine-color-${color}-filled)`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: `var(--mantine-color-${parsed.color}-${parsed.shade})`,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n return {\n background: 'var(--mantine-color-white)',\n hover: darken(theme.white, 0.01),\n color: color!,\n border: `${rem(1)} solid transparent`,\n };\n }\n\n if (variant === 'gradient') {\n return {\n background: getGradient(gradient, theme),\n hover: getGradient(gradient, theme),\n color: 'var(--mantine-color-white)',\n border: 'none',\n };\n }\n\n if (variant === 'default') {\n return {\n background: 'var(--mantine-color-default)',\n hover: 'var(--mantine-color-default-hover)',\n color: 'var(--mantine-color-default-color)',\n border: `${rem(1)} solid var(--mantine-color-default-border)`,\n };\n }\n\n return {} as VariantColorResolverResult;\n};\n"],"mappings":";;;;;;;AA2BA,MAAa,gCAAuD,EAClE,OACA,OACA,SACA,UACA,mBACI;CACJ,MAAM,SAASA,0BAAAA,gBAAgB;EAAE;EAAO;EAAO,CAAC;CAEhD,MAAM,gBAAgB,OAAO,iBAAiB,YAAY,eAAe,MAAM;AAE/E,KAAI,YAAY,OACd,QAAO;EACL,YAAY;EACZ,OAAO;EACP,OAAO;EACP,QAAQ;EACT;AAGH,KAAI,YAAY,UAAU;EACxB,MAAM,YAAY,gBACd,OAAO,UACL,+BACA,+BACF;AACJ,MAAI,OAAO,cAAc;AACvB,OAAI,OAAO,UAAU,KAAA,EACnB,QAAO;IACL,YAAY,uBAAuB,MAAM;IACzC,OAAO,uBAAuB,MAAM;IACpC,OAAO;IACP,QAAQ,GAAGC,YAAAA,IAAI,EAAE,CAAC;IACnB;AAGH,UAAO;IACL,YAAY,uBAAuB,OAAO,MAAM,GAAG,OAAO,MAAM;IAChE,OAAO,uBAAuB,OAAO,MAA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I,OAAO,UAAU,KAAA,EACnB,QAAO;IACL,YAAY;IACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;IAChC,OAAO,uBAAuB,MAAM;IACpC,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;IACnB;AAGH,UAAO;IACL,YAAY;IACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;IAChC,OAAO,uBAAuB,OAAO,MAAM,GAAG,OAAO,MAAM;IAC3D,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;IACnB;;AAGH,SAAO;GACL,YAAY;GACZ,OAAOC,eAAAA,OAAO,MAAM,OAAO,IAAK;GACzB;GACP,QAAQ,GAAGD,YAAAA,IAAI,EAAE,CAAC;GACnB;;AAGH,KAAI,YAAY,WACd,QAAO;EACL,YAAYG,qBAAAA,YAAY,UAAU,MAAM;EACxC,OAAOA,qBAAAA,YAAY,UAAU,MAAM;EACnC,OAAO;EACP,QAAQ;EACT;AAGH,KAAI,YAAY,UACd,QAAO;EACL,YAAY;EACZ,OAAO;EACP,OAAO;EACP,QAAQ,GAAGH,YAAAA,IAAI,EAAE,CAAC;EACnB;AAGH,QAAO,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage-manager.cjs","names":["isMantineColorScheme"],"sources":["../../../../src/core/MantineProvider/color-scheme-managers/local-storage-manager.ts"],"sourcesContent":["import { isMantineColorScheme } from './is-mantine-color-scheme';\nimport type { MantineColorSchemeManager } from './types';\n\nexport interface LocalStorageColorSchemeManagerOptions {\n /** Local storage key used to retrieve value with `localStorage.getItem(key)`, `mantine-color-scheme-value` by default */\n key?: string;\n}\n\nexport function localStorageColorSchemeManager({\n key = 'mantine-color-scheme-value',\n}: LocalStorageColorSchemeManagerOptions = {}): MantineColorSchemeManager {\n let handleStorageEvent: (event: StorageEvent) => void;\n\n return {\n get: (defaultValue) => {\n if (typeof window === 'undefined') {\n return defaultValue;\n }\n\n try {\n const storedColorScheme = window.localStorage.getItem(key);\n return isMantineColorScheme(storedColorScheme) ? storedColorScheme : defaultValue;\n } catch {\n return defaultValue;\n }\n },\n\n set: (value) => {\n try {\n window.localStorage.setItem(key, value);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@mantine/core] Local storage color scheme manager was unable to save color scheme.',\n error\n );\n }\n },\n\n subscribe: (onUpdate) => {\n handleStorageEvent = (event) => {\n if (event.storageArea === window.localStorage && event.key === key) {\n isMantineColorScheme(event.newValue) && onUpdate(event.newValue);\n }\n };\n\n window.addEventListener('storage', handleStorageEvent);\n },\n\n unsubscribe: () => {\n window.removeEventListener('storage', handleStorageEvent);\n },\n\n clear: () => {\n window.localStorage.removeItem(key);\n },\n };\n}\n"],"mappings":";;;AAQA,SAAgB,+BAA+B,EAC7C,MAAM,iCACmC,EAAE,EAA6B;CACxE,IAAI;AAEJ,QAAO;EACL,MAAM,iBAAiB;AACrB,OAAI,OAAO,WAAW,YACpB,QAAO;AAGT,OAAI;IACF,MAAM,oBAAoB,OAAO,aAAa,QAAQ,IAAI;AAC1D,WAAOA,gCAAAA,qBAAqB,kBAAkB,GAAG,oBAAoB;WAC/D;AACN,WAAO;;;EAIX,MAAM,UAAU;AACd,OAAI;AACF,WAAO,aAAa,QAAQ,KAAK,MAAM;YAChC,OAAO;AAEd,YAAQ,KACN,uFACA,MACD;;;EAIL,YAAY,aAAa;AACvB,yBAAsB,UAAU;AAC9B,QAAI,MAAM,gBAAgB,OAAO,gBAAgB,MAAM,QAAQ,IAC7D,iCAAA,qBAAqB,MAAM,SAAS,IAAI,SAAS,MAAM,SAAS;;AAIpE,UAAO,iBAAiB,WAAW,mBAAmB;;EAGxD,mBAAmB;AACjB,UAAO,oBAAoB,WAAW,mBAAmB;;EAG3D,aAAa;AACX,UAAO,aAAa,WAAW,IAAI;;EAEtC"}
1
+ {"version":3,"file":"local-storage-manager.cjs","names":["isMantineColorScheme"],"sources":["../../../../src/core/MantineProvider/color-scheme-managers/local-storage-manager.ts"],"sourcesContent":["import { isMantineColorScheme } from './is-mantine-color-scheme';\nimport type { MantineColorSchemeManager } from './types';\n\nexport interface LocalStorageColorSchemeManagerOptions {\n /** Local storage key used to retrieve value with `localStorage.getItem(key)`, `mantine-color-scheme-value` by default */\n key?: string;\n}\n\nexport function localStorageColorSchemeManager({\n key = 'mantine-color-scheme-value',\n}: LocalStorageColorSchemeManagerOptions = {}): MantineColorSchemeManager {\n let handleStorageEvent: (event: StorageEvent) => void;\n\n return {\n get: (defaultValue) => {\n if (typeof window === 'undefined') {\n return defaultValue;\n }\n\n try {\n const storedColorScheme = window.localStorage.getItem(key);\n return isMantineColorScheme(storedColorScheme) ? storedColorScheme : defaultValue;\n } catch {\n return defaultValue;\n }\n },\n\n set: (value) => {\n try {\n window.localStorage.setItem(key, value);\n } catch (error) {\n // oxlint-disable-next-line no-console\n console.warn(\n '[@mantine/core] Local storage color scheme manager was unable to save color scheme.',\n error\n );\n }\n },\n\n subscribe: (onUpdate) => {\n handleStorageEvent = (event) => {\n if (event.storageArea === window.localStorage && event.key === key) {\n isMantineColorScheme(event.newValue) && onUpdate(event.newValue);\n }\n };\n\n window.addEventListener('storage', handleStorageEvent);\n },\n\n unsubscribe: () => {\n window.removeEventListener('storage', handleStorageEvent);\n },\n\n clear: () => {\n window.localStorage.removeItem(key);\n },\n };\n}\n"],"mappings":";;;AAQA,SAAgB,+BAA+B,EAC7C,MAAM,iCACmC,EAAE,EAA6B;CACxE,IAAI;AAEJ,QAAO;EACL,MAAM,iBAAiB;AACrB,OAAI,OAAO,WAAW,YACpB,QAAO;AAGT,OAAI;IACF,MAAM,oBAAoB,OAAO,aAAa,QAAQ,IAAI;AAC1D,WAAOA,gCAAAA,qBAAqB,kBAAkB,GAAG,oBAAoB;WAC/D;AACN,WAAO;;;EAIX,MAAM,UAAU;AACd,OAAI;AACF,WAAO,aAAa,QAAQ,KAAK,MAAM;YAChC,OAAO;AAEd,YAAQ,KACN,uFACA,MACD;;;EAIL,YAAY,aAAa;AACvB,yBAAsB,UAAU;AAC9B,QAAI,MAAM,gBAAgB,OAAO,gBAAgB,MAAM,QAAQ,IAC7D,iCAAA,qBAAqB,MAAM,SAAS,IAAI,SAAS,MAAM,SAAS;;AAIpE,UAAO,iBAAiB,WAAW,mBAAmB;;EAGxD,mBAAmB;AACjB,UAAO,oBAAoB,WAAW,mBAAmB;;EAG3D,aAAa;AACX,UAAO,aAAa,WAAW,IAAI;;EAEtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"find-element-ancestor.cjs","names":[],"sources":["../../../../src/core/utils/find-element-ancestor/find-element-ancestor.ts"],"sourcesContent":["/* eslint-disable no-empty */\nexport function findElementAncestor(element: HTMLElement, selector: string) {\n let _element: HTMLElement | null = element;\n while ((_element = _element.parentElement) && !_element.matches(selector)) {}\n return _element;\n}\n"],"mappings":";;AACA,SAAgB,oBAAoB,SAAsB,UAAkB;CAC1E,IAAI,WAA+B;AACnC,SAAQ,WAAW,SAAS,kBAAkB,CAAC,SAAS,QAAQ,SAAS;AACzE,QAAO"}
1
+ {"version":3,"file":"find-element-ancestor.cjs","names":[],"sources":["../../../../src/core/utils/find-element-ancestor/find-element-ancestor.ts"],"sourcesContent":["/* oxlint-disable no-empty */\nexport function findElementAncestor(element: HTMLElement, selector: string) {\n let _element: HTMLElement | null = element;\n while ((_element = _element.parentElement) && !_element.matches(selector)) {}\n return _element;\n}\n"],"mappings":";;AACA,SAAgB,oBAAoB,SAAsB,UAAkB;CAC1E,IAAI,WAA+B;AACnC,SAAQ,WAAW,SAAS,kBAAkB,CAAC,SAAS,QAAQ,SAAS;AACzE,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.mjs","names":["classes"],"sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { useId, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n Factory,\n genericFactory,\n getRadius,\n getSafeId,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { AccordionProvider } from './Accordion.context';\nimport { AccordionChevronPosition, AccordionHeadingOrder, AccordionValue } from './Accordion.types';\nimport { AccordionChevron } from './AccordionChevron';\nimport { AccordionControl } from './AccordionControl/AccordionControl';\nimport { AccordionItem } from './AccordionItem/AccordionItem';\nimport { AccordionPanel } from './AccordionPanel/AccordionPanel';\nimport classes from './Accordion.module.css';\n\nexport type AccordionStylesNames =\n | 'root'\n | 'content'\n | 'item'\n | 'panel'\n | 'icon'\n | 'chevron'\n | 'label'\n | 'itemTitle'\n | 'control';\n\nexport type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';\nexport type AccordionCssVariables = {\n root: '--accordion-transition-duration' | '--accordion-chevron-size' | '--accordion-radius';\n};\n\nexport interface AccordionProps<Multiple extends boolean = false>\n extends\n BoxProps,\n StylesApiProps<AccordionFactory>,\n ElementProps<'div', 'value' | 'defaultValue' | 'onChange'> {\n /** If set, multiple items can be opened at the same time */\n multiple?: Multiple;\n\n /** Controlled component value */\n value?: AccordionValue<Multiple>;\n\n /** Uncontrolled component default value */\n defaultValue?: AccordionValue<Multiple>;\n\n /** Called when value changes, payload type depends on `multiple` prop */\n onChange?: (value: AccordionValue<Multiple>) => void;\n\n /** If set, arrow keys loop through items (first to last and last to first) @default true */\n loop?: boolean;\n\n /** Transition duration in ms @default 200 */\n transitionDuration?: number;\n\n /** If set, chevron rotation is disabled */\n disableChevronRotation?: boolean;\n\n /** Position of the chevron relative to the item label @default right */\n chevronPosition?: AccordionChevronPosition;\n\n /** Size of the chevron icon container @default auto */\n chevronSize?: number | string;\n\n /** Size of the default chevron icon. Ignored when `chevron` prop is set. Use `chevronSize` instead when using custom chevron. @default 16 */\n chevronIconSize?: number | string;\n\n /** Sets heading level (h2-h6) for `Accordion.Control` elements to meet WAI-ARIA requirements. Has no visual effect. */\n order?: AccordionHeadingOrder;\n\n /** Custom chevron icon */\n chevron?: React.ReactNode;\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 /** If set to `false`, panels are unmounted when collapsed. By default, panels stay mounted when collapsed. */\n keepMounted?: boolean;\n}\n\nexport type AccordionFactory = Factory<{\n props: AccordionProps;\n ref: HTMLDivElement;\n stylesNames: AccordionStylesNames;\n vars: AccordionCssVariables;\n variant: AccordionVariant;\n signature: <Multiple extends boolean = false>(\n props: AccordionProps<Multiple>\n ) => React.JSX.Element;\n staticComponents: {\n Item: typeof AccordionItem;\n Panel: typeof AccordionPanel;\n Control: typeof AccordionControl;\n Chevron: typeof AccordionChevron;\n };\n}>;\n\nconst defaultProps = {\n multiple: false,\n disableChevronRotation: false,\n chevronPosition: 'right',\n variant: 'default',\n chevronSize: 'auto',\n chevronIconSize: 16,\n} satisfies Partial<AccordionProps>;\n\nconst varsResolver = createVarsResolver<AccordionFactory>(\n (_, { transitionDuration, chevronSize, radius }) => ({\n root: {\n '--accordion-transition-duration':\n transitionDuration === undefined ? undefined : `${transitionDuration}ms`,\n '--accordion-chevron-size': chevronSize === undefined ? undefined : rem(chevronSize),\n '--accordion-radius': radius === undefined ? undefined : getRadius(radius),\n },\n })\n);\n\nexport const Accordion = genericFactory<AccordionFactory>((_props) => {\n const props = useProps('Accordion', defaultProps as any, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n multiple,\n value,\n defaultValue,\n onChange,\n id,\n loop,\n transitionDuration,\n disableChevronRotation,\n chevronPosition,\n chevronSize,\n order,\n chevron,\n variant,\n radius,\n chevronIconSize,\n attributes,\n keepMounted,\n ...others\n } = props;\n\n const uid = useId(id);\n const [_value, handleChange] = useUncontrolled({\n value,\n defaultValue,\n finalValue: multiple ? ([] as any) : null,\n onChange,\n });\n\n const isItemActive = (itemValue: string) =>\n Array.isArray(_value) ? _value.includes(itemValue) : itemValue === _value;\n\n const handleItemChange = (itemValue: string) => {\n const nextValue = Array.isArray(_value)\n ? _value.includes(itemValue)\n ? _value.filter((selectedValue) => selectedValue !== itemValue)\n : [..._value, itemValue]\n : itemValue === _value\n ? null\n : (itemValue as any);\n\n handleChange(nextValue);\n };\n\n const getStyles = useStyles<AccordionFactory>({\n name: 'Accordion',\n classes,\n props: props as AccordionProps,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <AccordionProvider\n value={{\n isItemActive,\n onChange: handleItemChange,\n getControlId: getSafeId(\n `${uid}-control`,\n 'Accordion.Item component was rendered with invalid value or without value'\n ),\n getRegionId: getSafeId(\n `${uid}-panel`,\n 'Accordion.Item component was rendered with invalid value or without value'\n ),\n chevron: chevron === null ? null : chevron || <AccordionChevron size={chevronIconSize} />,\n transitionDuration,\n disableChevronRotation,\n chevronPosition,\n order,\n loop,\n getStyles,\n variant,\n unstyled,\n keepMounted,\n }}\n >\n <Box {...getStyles('root')} id={uid} {...others} variant={variant} data-accordion>\n {children}\n </Box>\n </AccordionProvider>\n );\n});\n\nAccordion.classes = classes;\nAccordion.varsResolver = varsResolver;\nAccordion.displayName = '@mantine/core/Accordion';\nAccordion.Item = AccordionItem;\nAccordion.Panel = AccordionPanel;\nAccordion.Control = AccordionControl;\nAccordion.Chevron = AccordionChevron;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyGA,MAAM,eAAe;CACnB,UAAU;CACV,wBAAwB;CACxB,iBAAiB;CACjB,SAAS;CACT,aAAa;CACb,iBAAiB;CAClB;AAED,MAAM,eAAe,oBAClB,GAAG,EAAE,oBAAoB,aAAa,cAAc,EACnD,MAAM;CACJ,mCACE,uBAAuB,KAAA,IAAY,KAAA,IAAY,GAAG,mBAAmB;CACvE,4BAA4B,gBAAgB,KAAA,IAAY,KAAA,IAAY,IAAI,YAAY;CACpF,sBAAsB,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,OAAO;CAC3E,EACF,EACF;AAED,MAAa,YAAY,gBAAkC,WAAW;CACpE,MAAM,QAAQ,SAAS,aAAa,cAAqB,OAAO;CAChE,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,UACA,OACA,cACA,UACA,IACA,MACA,oBACA,wBACA,iBACA,aACA,OACA,SACA,SACA,QACA,iBACA,YACA,aACA,GAAG,WACD;CAEJ,MAAM,MAAM,MAAM,GAAG;CACrB,MAAM,CAAC,QAAQ,gBAAgB,gBAAgB;EAC7C;EACA;EACA,YAAY,WAAY,EAAE,GAAW;EACrC;EACD,CAAC;CAEF,MAAM,gBAAgB,cACpB,MAAM,QAAQ,OAAO,GAAG,OAAO,SAAS,UAAU,GAAG,cAAc;CAErE,MAAM,oBAAoB,cAAsB;AAS9C,eARkB,MAAM,QAAQ,OAAO,GACnC,OAAO,SAAS,UAAU,GACxB,OAAO,QAAQ,kBAAkB,kBAAkB,UAAU,GAC7D,CAAC,GAAG,QAAQ,UAAU,GACxB,cAAc,SACZ,OACC,UAEgB;;CAGzB,MAAM,YAAY,UAA4B;EAC5C,MAAM;EACN,SAAA;EACO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,oBAAC,mBAAD;EACE,OAAO;GACL;GACA,UAAU;GACV,cAAc,UACZ,GAAG,IAAI,WACP,4EACD;GACD,aAAa,UACX,GAAG,IAAI,SACP,4EACD;GACD,SAAS,YAAY,OAAO,OAAO,WAAW,oBAAC,kBAAD,EAAkB,MAAM,iBAAmB,CAAA;GACzF;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;YAED,oBAAC,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,IAAI;GAAK,GAAI;GAAiB;GAAS,kBAAA;GAChE;GACG,CAAA;EACY,CAAA;EAEtB;AAEF,UAAU,UAAUA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc;AACxB,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,UAAU;AACpB,UAAU,UAAU"}
1
+ {"version":3,"file":"Accordion.mjs","names":["classes"],"sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { useId, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n Factory,\n genericFactory,\n getRadius,\n getSafeId,\n MantineRadius,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { AccordionProvider } from './Accordion.context';\nimport { AccordionChevronPosition, AccordionHeadingOrder, AccordionValue } from './Accordion.types';\nimport { AccordionChevron } from './AccordionChevron';\nimport { AccordionControl, type AccordionControlProps } from './AccordionControl/AccordionControl';\nimport { AccordionItem, type AccordionItemProps } from './AccordionItem/AccordionItem';\nimport { AccordionPanel, type AccordionPanelProps } from './AccordionPanel/AccordionPanel';\nimport classes from './Accordion.module.css';\nimport type { AccordionItemContextValue } from './AccordionItem.context';\nexport type AccordionStylesNames =\n | 'root'\n | 'content'\n | 'item'\n | 'panel'\n | 'icon'\n | 'chevron'\n | 'label'\n | 'itemTitle'\n | 'control';\n\nexport type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';\nexport type AccordionCssVariables = {\n root: '--accordion-transition-duration' | '--accordion-chevron-size' | '--accordion-radius';\n};\n\nexport interface AccordionProps<Multiple extends boolean = false>\n extends\n BoxProps,\n StylesApiProps<AccordionFactory>,\n ElementProps<'div', 'value' | 'defaultValue' | 'onChange'> {\n /** If set, multiple items can be opened at the same time */\n multiple?: Multiple;\n\n /** Controlled component value */\n value?: AccordionValue<Multiple>;\n\n /** Uncontrolled component default value */\n defaultValue?: AccordionValue<Multiple>;\n\n /** Called when value changes, payload type depends on `multiple` prop */\n onChange?: (value: AccordionValue<Multiple>) => void;\n\n /** If set, arrow keys loop through items (first to last and last to first) @default true */\n loop?: boolean;\n\n /** Transition duration in ms @default 200 */\n transitionDuration?: number;\n\n /** If set, chevron rotation is disabled */\n disableChevronRotation?: boolean;\n\n /** Position of the chevron relative to the item label @default right */\n chevronPosition?: AccordionChevronPosition;\n\n /** Size of the chevron icon container @default auto */\n chevronSize?: number | string;\n\n /** Size of the default chevron icon. Ignored when `chevron` prop is set. Use `chevronSize` instead when using custom chevron. @default 16 */\n chevronIconSize?: number | string;\n\n /** Sets heading level (h2-h6) for `Accordion.Control` elements to meet WAI-ARIA requirements. Has no visual effect. */\n order?: AccordionHeadingOrder;\n\n /** Custom chevron icon */\n chevron?: React.ReactNode;\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 /** If set to `false`, panels are unmounted when collapsed. By default, panels stay mounted when collapsed. */\n keepMounted?: boolean;\n}\n\nexport type AccordionFactory = Factory<{\n props: AccordionProps;\n ref: HTMLDivElement;\n stylesNames: AccordionStylesNames;\n vars: AccordionCssVariables;\n variant: AccordionVariant;\n signature: <Multiple extends boolean = false>(\n props: AccordionProps<Multiple>\n ) => React.JSX.Element;\n staticComponents: {\n Item: typeof AccordionItem;\n Panel: typeof AccordionPanel;\n Control: typeof AccordionControl;\n Chevron: typeof AccordionChevron;\n };\n}>;\n\nconst defaultProps = {\n multiple: false,\n disableChevronRotation: false,\n chevronPosition: 'right',\n variant: 'default',\n chevronSize: 'auto',\n chevronIconSize: 16,\n} satisfies Partial<AccordionProps>;\n\nconst varsResolver = createVarsResolver<AccordionFactory>(\n (_, { transitionDuration, chevronSize, radius }) => ({\n root: {\n '--accordion-transition-duration':\n transitionDuration === undefined ? undefined : `${transitionDuration}ms`,\n '--accordion-chevron-size': chevronSize === undefined ? undefined : rem(chevronSize),\n '--accordion-radius': radius === undefined ? undefined : getRadius(radius),\n },\n })\n);\n\nexport const Accordion = genericFactory<AccordionFactory>((_props) => {\n const props = useProps('Accordion', defaultProps as any, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n multiple,\n value,\n defaultValue,\n onChange,\n id,\n loop,\n transitionDuration,\n disableChevronRotation,\n chevronPosition,\n chevronSize,\n order,\n chevron,\n variant,\n radius,\n chevronIconSize,\n attributes,\n keepMounted,\n ...others\n } = props;\n\n const uid = useId(id);\n const [_value, handleChange] = useUncontrolled({\n value,\n defaultValue,\n finalValue: multiple ? ([] as any) : null,\n onChange,\n });\n\n const isItemActive = (itemValue: string) =>\n Array.isArray(_value) ? _value.includes(itemValue) : itemValue === _value;\n\n const handleItemChange = (itemValue: string) => {\n const nextValue = Array.isArray(_value)\n ? _value.includes(itemValue)\n ? _value.filter((selectedValue) => selectedValue !== itemValue)\n : [..._value, itemValue]\n : itemValue === _value\n ? null\n : (itemValue as any);\n\n handleChange(nextValue);\n };\n\n const getStyles = useStyles<AccordionFactory>({\n name: 'Accordion',\n classes,\n props: props as AccordionProps,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <AccordionProvider\n value={{\n isItemActive,\n onChange: handleItemChange,\n getControlId: getSafeId(\n `${uid}-control`,\n 'Accordion.Item component was rendered with invalid value or without value'\n ),\n getRegionId: getSafeId(\n `${uid}-panel`,\n 'Accordion.Item component was rendered with invalid value or without value'\n ),\n chevron: chevron === null ? null : chevron || <AccordionChevron size={chevronIconSize} />,\n transitionDuration,\n disableChevronRotation,\n chevronPosition,\n order,\n loop,\n getStyles,\n variant,\n unstyled,\n keepMounted,\n }}\n >\n <Box {...getStyles('root')} id={uid} {...others} variant={variant} data-accordion>\n {children}\n </Box>\n </AccordionProvider>\n );\n});\n\nAccordion.classes = classes;\nAccordion.varsResolver = varsResolver;\nAccordion.displayName = '@mantine/core/Accordion';\nAccordion.Item = AccordionItem;\nAccordion.Panel = AccordionPanel;\nAccordion.Control = AccordionControl;\nAccordion.Chevron = AccordionChevron;\n\nexport namespace Accordion {\n export type Props = AccordionProps;\n export type StylesNames = AccordionStylesNames;\n export type CssVariables = AccordionCssVariables;\n export type Factory = AccordionFactory;\n export type Variant = AccordionVariant;\n\n export namespace Control {\n export type Props = AccordionControlProps;\n }\n\n export namespace Item {\n export type Props = AccordionItemProps;\n export type Context = AccordionItemContextValue;\n }\n\n export namespace Panel {\n export type Props = AccordionPanelProps;\n }\n}\n"],"mapp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AAI,SACP,4EACD;GACD,SAAS,YAAY,OAAO,OAAO,WAAW,oBAAC,kBAAD,EAAkB,MAAM,iBAAmB,CAAA;GACzF;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;YAED,oBAAC,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,IAAI;GAAK,GAAI;GAAiB;GAAS,kBAAA;GAChE;GACG,CAAA;EACY,CAAA;EAEtB;AAEF,UAAU,UAAUA;AACpB,UAAU,eAAe;AACzB,UAAU,cAAc;AACxB,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,UAAU;AACpB,UAAU,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.module.mjs","names":[],"sources":["../../../src/components/Accordion/Accordion.module.css"],"sourcesContent":[".root {\n --accordion-radius: var(--mantine-radius-default);\n}\n\n.panel {\n overflow-wrap: break-word;\n}\n\n.content {\n padding: var(--mantine-spacing-md);\n padding-top: calc(var(--mantine-spacing-xs) / 2);\n}\n\n.itemTitle {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.control {\n width: 100%;\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n padding-inline: var(--mantine-spacing-md);\n opacity: 1;\n cursor: pointer;\n background-color: transparent;\n color: var(--mantine-color-bright);\n\n &:where([data-chevron-position='left']) {\n flex-direction: row;\n padding-inline-start: 0;\n }\n\n &:where(:disabled, [data-disabled]) {\n opacity: 0.4;\n cursor: not-allowed;\n }\n}\n\n.control--default,\n.control--contained {\n &:where(:not(:disabled, [data-disabled])) {\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n}\n\n.label {\n color: inherit;\n font-weight: var(--mantine-font-weight-regular);\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: var(--mantine-spacing-sm);\n padding-bottom: var(--mantine-spacing-sm);\n}\n\n.chevron {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n transition: transform var(--accordion-transition-duration, 200ms) ease;\n width: var(--accordion-chevron-size, rem(15px));\n min-width: var(--accordion-chevron-size, rem(15px));\n transform: rotate(0deg);\n\n &:where([data-rotate]) {\n transform: rotate(180deg);\n }\n\n &:where([data-position='left']) {\n margin-inline-end: var(--mantine-spacing-md);\n margin-inline-start: var(--mantine-spacing-md);\n }\n}\n\n.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: var(--mantine-spacing-sm);\n\n &:where([data-chevron-position='left']) {\n margin-inline-end: 0;\n margin-inline-start: var(--mantine-spacing-lg);\n }\n}\n\n.item {\n overflow: hidden;\n\n @mixin where-light {\n --item-border-color: var(--mantine-color-gray-3);\n --item-filled-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --item-border-color: var(--mantine-color-dark-4);\n --item-filled-color: var(--mantine-color-dark-6);\n }\n}\n\n.item--default {\n border-bottom: 1px solid var(--item-border-color);\n}\n\n.item--contained {\n border: 1px solid var(--item-border-color);\n transition: background-color 150ms ease;\n\n &:where([data-active]) {\n background-color: var(--item-filled-color);\n }\n\n &:first-of-type {\n border-start-start-radius: var(--accordion-radius);\n border-start-end-radius: var(--accordion-radius);\n\n & > [data-accordion-control] {\n border-start-start-radius: var(--accordion-radius);\n border-start-end-radius: var(--accordion-radius);\n }\n }\n\n &:last-of-type {\n border-end-start-radius: var(--accordion-radius);\n border-end-end-radius: var(--accordion-radius);\n\n & > [data-accordion-control] {\n border-end-start-radius: var(--accordion-radius);\n border-end-end-radius: var(--accordion-radius);\n }\n }\n\n & + & {\n border-top: 0;\n }\n}\n\n.item--filled {\n border-radius: var(--accordion-radius);\n\n &:where([data-active]) {\n background-color: var(--item-filled-color);\n }\n}\n\n.item--separated {\n background-color: var(--item-filled-color);\n border-radius: var(--accordion-radius);\n border: 1px solid transparent;\n transition: background-color 150ms ease;\n\n &[data-active] {\n border-color: var(--item-border-color);\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-7);\n }\n }\n\n & + & {\n margin-top: var(--mantine-spacing-md);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Accordion.module.mjs","names":[],"sources":["../../../src/components/Accordion/Accordion.module.css"],"sourcesContent":[".root {\n --accordion-radius: var(--mantine-radius-default);\n}\n\n.panel {\n overflow-wrap: break-word;\n}\n\n.content {\n padding: var(--mantine-spacing-md);\n padding-top: calc(var(--mantine-spacing-xs) / 2);\n}\n\n.itemTitle {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.control {\n width: 100%;\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n padding-inline: var(--mantine-spacing-md);\n opacity: 1;\n cursor: pointer;\n background-color: transparent;\n color: var(--mantine-color-bright);\n\n &:where([data-chevron-position='left']) {\n flex-direction: row;\n padding-inline-start: 0;\n }\n\n &:where(:disabled, [data-disabled]) {\n opacity: 0.4;\n cursor: not-allowed;\n }\n}\n\n.control--default,\n.control--contained {\n &:where(:not(:disabled, [data-disabled])) {\n @mixin hover {\n @mixin where-light {\n background-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-6);\n }\n }\n }\n}\n\n.label {\n color: inherit;\n font-weight: var(--mantine-font-weight-regular);\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: var(--mantine-spacing-sm);\n padding-bottom: var(--mantine-spacing-sm);\n}\n\n.chevron {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n transition: transform var(--accordion-transition-duration, 200ms) ease;\n width: var(--accordion-chevron-size, rem(15px));\n min-width: var(--accordion-chevron-size, rem(15px));\n transform: rotate(0deg);\n\n &:where([data-rotate]) {\n transform: rotate(180deg);\n }\n\n &:where([data-position='left']) {\n margin-inline-end: var(--mantine-spacing-md);\n margin-inline-start: var(--mantine-spacing-md);\n }\n}\n\n.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: var(--mantine-spacing-sm);\n\n &:where([data-chevron-position='left']) {\n margin-inline-end: 0;\n margin-inline-start: var(--mantine-spacing-lg);\n }\n}\n\n.item {\n @mixin where-light {\n --item-border-color: var(--mantine-color-gray-3);\n --item-filled-color: var(--mantine-color-gray-0);\n }\n\n @mixin where-dark {\n --item-border-color: var(--mantine-color-dark-4);\n --item-filled-color: var(--mantine-color-dark-6);\n }\n}\n\n.item--default {\n border-bottom: 1px solid var(--item-border-color);\n}\n\n.item--contained {\n border: 1px solid var(--item-border-color);\n transition: background-color 150ms ease;\n\n &:where([data-active]) {\n background-color: var(--item-filled-color);\n }\n\n &:first-of-type {\n border-start-start-radius: var(--accordion-radius);\n border-start-end-radius: var(--accordion-radius);\n\n & > [data-accordion-control] {\n border-start-start-radius: var(--accordion-radius);\n border-start-end-radius: var(--accordion-radius);\n }\n }\n\n &:last-of-type {\n border-end-start-radius: var(--accordion-radius);\n border-end-end-radius: var(--accordion-radius);\n\n & > [data-accordion-control] {\n border-end-start-radius: var(--accordion-radius);\n border-end-end-radius: var(--accordion-radius);\n }\n }\n\n & + & {\n border-top: 0;\n }\n}\n\n.item--filled {\n border-radius: var(--accordion-radius);\n\n &:where([data-active]) {\n background-color: var(--item-filled-color);\n }\n}\n\n.item--separated {\n background-color: var(--item-filled-color);\n border-radius: var(--accordion-radius);\n border: 1px solid transparent;\n transition: background-color 150ms ease;\n\n &[data-active] {\n border-color: var(--item-border-color);\n\n @mixin where-light {\n background-color: var(--mantine-color-white);\n }\n\n @mixin where-dark {\n background-color: var(--mantine-color-dark-7);\n }\n }\n\n & + & {\n margin-top: var(--mantine-spacing-md);\n }\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionIcon.mjs","names":["classes"],"sources":["../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n getRadius,\n getSize,\n MantineColor,\n MantineGradient,\n MantineRadius,\n MantineSize,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Loader, LoaderProps } from '../Loader';\nimport { Transition } from '../Transition';\nimport { UnstyledButton } from '../UnstyledButton';\nimport { ActionIconGroup } from './ActionIconGroup/ActionIconGroup';\nimport { ActionIconGroupSection } from './ActionIconGroupSection/ActionIconGroupSection';\nimport classes from './ActionIcon.module.css';\n\nexport type ActionIconVariant =\n | 'filled'\n | 'light'\n | 'outline'\n | 'transparent'\n | 'white'\n | 'subtle'\n | 'default'\n | 'gradient';\n\nexport type ActionIconStylesNames = 'root' | 'loader' | 'icon';\nexport type ActionIconCssVariables = {\n root:\n | '--ai-radius'\n | '--ai-size'\n | '--ai-bg'\n | '--ai-hover'\n | '--ai-hover-color'\n | '--ai-color'\n | '--ai-bd';\n};\n\nexport interface ActionIconProps extends BoxProps, StylesApiProps<ActionIconFactory> {\n 'data-disabled'?: boolean;\n __staticSelector?: string;\n\n /** If set, `Loader` component is displayed instead of the `children` */\n loading?: boolean;\n\n /** Props passed down to the `Loader` component. Ignored when `loading` prop is not set. */\n loaderProps?: LoaderProps;\n\n /** Controls width and height of the button. Numbers are converted to rem. @default 'md'. */\n size?: MantineSize | `input-${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 values used with `variant=\"gradient\"`. @default theme.defaultGradient. */\n gradient?: MantineGradient;\n\n /** Sets `disabled` attribute, prevents interactions */\n disabled?: boolean;\n\n /** Icon element */\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 ActionIconFactory = PolymorphicFactory<{\n props: ActionIconProps;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n stylesNames: ActionIconStylesNames;\n variant: ActionIconVariant;\n vars: ActionIconCssVariables;\n staticComponents: {\n Group: typeof ActionIconGroup;\n GroupSection: typeof ActionIconGroupSection;\n };\n}>;\n\nconst varsResolver = createVarsResolver<ActionIconFactory>(\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 '--ai-size': getSize(size, 'ai-size'),\n '--ai-radius': radius === undefined ? undefined : getRadius(radius),\n '--ai-bg': color || variant ? colors.background : undefined,\n '--ai-hover': color || variant ? colors.hover : undefined,\n '--ai-hover-color': color || variant ? colors.hoverColor : undefined,\n '--ai-color': colors.color,\n '--ai-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const ActionIcon = polymorphicFactory<ActionIconFactory>((_props) => {\n const props = useProps('ActionIcon', null, _props);\n const {\n className,\n unstyled,\n variant,\n classNames,\n styles,\n style,\n loading,\n loaderProps,\n size,\n color,\n radius,\n __staticSelector,\n gradient,\n vars,\n children,\n disabled,\n 'data-disabled': dataDisabled,\n autoContrast,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ActionIconFactory>({\n name: ['ActionIcon', __staticSelector],\n props,\n className,\n style,\n classes,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <UnstyledButton\n {...getStyles('root', { active: !disabled && !loading && !dataDisabled })}\n {...others}\n unstyled={unstyled}\n variant={variant}\n size={size}\n disabled={disabled || loading}\n mod={[{ loading, disabled: disabled || dataDisabled }, mod]}\n >\n {typeof loading === 'boolean' && (\n <Transition mounted={loading} transition=\"slide-down\" duration={150}>\n {(transitionStyles) => (\n <Box component=\"span\" {...getStyles('loader', { style: transitionStyles })} aria-hidden>\n <Loader color=\"var(--ai-color)\" size=\"calc(var(--ai-size) * 0.55)\" {...loaderProps} />\n </Box>\n )}\n </Transition>\n )}\n\n <Box component=\"span\" mod={{ loading }} {...getStyles('icon')}>\n {children}\n </Box>\n </UnstyledButton>\n );\n});\n\nActionIcon.classes = classes;\nActionIcon.varsResolver = varsResolver;\nActionIcon.displayName = '@mantine/core/ActionIcon';\nActionIcon.Group = ActionIconGroup;\nActionIcon.GroupSection = ActionIconGroupSection;\n"],"mappings":";;;;;;;;;;;;;;;AA0FA,MAAM,eAAe,oBAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,UAAU,OAAO,mBAAmB;CACnE,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA;EACA,SAAS,WAAW;EACpB;EACD,CAAC;AAEF,QAAO,EACL,MAAM;EACJ,aAAa,QAAQ,MAAM,UAAU;EACrC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,OAAO;EACnE,WAAW,SAAS,UAAU,OAAO,aAAa,KAAA;EAClD,cAAc,SAAS,UAAU,OAAO,QAAQ,KAAA;EAChD,oBAAoB,SAAS,UAAU,OAAO,aAAa,KAAA;EAC3D,cAAc,OAAO;EACrB,WAAW,SAAS,UAAU,OAAO,SAAS,KAAA;EAC/C,EACF;EAEJ;AAED,MAAa,aAAa,oBAAuC,WAAW;CAC1E,MAAM,QAAQ,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EACJ,WACA,UACA,SACA,YACA,QACA,OACA,SACA,aACA,MACA,OACA,QACA,kBACA,UACA,MACA,UACA,UACA,iBAAiB,cACjB,cACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA6B;EAC7C,MAAM,CAAC,cAAc,iBAAiB;EACtC;EACA;EACA;EACA,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,gBAAD;EACE,GAAI,UAAU,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,cAAc,CAAC;EACzE,GAAI;EACM;EACD;EACH;EACN,UAAU,YAAY;EACtB,KAAK,CAAC;GAAE;GAAS,UAAU,YAAY;GAAc,EAAE,IAAI;YAP7D,CASG,OAAO,YAAY,aAClB,oBAAC,YAAD;GAAY,SAAS;GAAS,YAAW;GAAa,UAAU;cAC5D,qBACA,oBAAC,KAAD;IAAK,WAAU;IAAO,GAAI,UAAU,UAAU,EAAE,OAAO,kBAAkB,CAAC;IAAE,eAAA;cAC1E,oBAAC,QAAD;KAAQ,OAAM;KAAkB,MAAK;KAA8B,GAAI;KAAe,CAAA;IAClF,CAAA;GAEG,CAAA,EAGf,oBAAC,KAAD;GAAK,WAAU;GAAO,KAAK,EAAE,SAAS;GAAE,GAAI,UAAU,OAAO;GAC1D;GACG,CAAA,CACS;;EAEnB;AAEF,WAAW,UAAUA;AACrB,WAAW,eAAe;AAC1B,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,eAAe"}
1
+ {"version":3,"file":"ActionIcon.mjs","names":["classes"],"sources":["../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n getRadius,\n getSize,\n MantineColor,\n MantineGradient,\n MantineRadius,\n MantineSize,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Loader, LoaderProps } from '../Loader';\nimport { Transition } from '../Transition';\nimport { UnstyledButton } from '../UnstyledButton';\nimport {\n ActionIconGroup,\n type ActionIconGroupProps,\n type ActionIconGroupStylesNames,\n type ActionIconGroupCssVariables,\n type ActionIconGroupFactory,\n} from './ActionIconGroup/ActionIconGroup';\nimport {\n ActionIconGroupSection,\n type ActionIconGroupSectionProps,\n type ActionIconGroupSectionStylesNames,\n type ActionIconGroupSectionCssVariables,\n type ActionIconGroupSectionFactory,\n} from './ActionIconGroupSection/ActionIconGroupSection';\nimport classes from './ActionIcon.module.css';\nexport type ActionIconVariant =\n | 'filled'\n | 'light'\n | 'outline'\n | 'transparent'\n | 'white'\n | 'subtle'\n | 'default'\n | 'gradient';\n\nexport type ActionIconStylesNames = 'root' | 'loader' | 'icon';\nexport type ActionIconCssVariables = {\n root:\n | '--ai-radius'\n | '--ai-size'\n | '--ai-bg'\n | '--ai-hover'\n | '--ai-hover-color'\n | '--ai-color'\n | '--ai-bd';\n};\n\nexport interface ActionIconProps extends BoxProps, StylesApiProps<ActionIconFactory> {\n 'data-disabled'?: boolean;\n __staticSelector?: string;\n\n /** If set, `Loader` component is displayed instead of the `children` */\n loading?: boolean;\n\n /** Props passed down to the `Loader` component. Ignored when `loading` prop is not set. */\n loaderProps?: LoaderProps;\n\n /** Controls width and height of the button. Numbers are converted to rem. @default 'md'. */\n size?: MantineSize | `input-${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 values used with `variant=\"gradient\"`. @default theme.defaultGradient. */\n gradient?: MantineGradient;\n\n /** Sets `disabled` attribute, prevents interactions */\n disabled?: boolean;\n\n /** Icon element */\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 ActionIconFactory = PolymorphicFactory<{\n props: ActionIconProps;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n stylesNames: ActionIconStylesNames;\n variant: ActionIconVariant;\n vars: ActionIconCssVariables;\n staticComponents: {\n Group: typeof ActionIconGroup;\n GroupSection: typeof ActionIconGroupSection;\n };\n}>;\n\nconst varsResolver = createVarsResolver<ActionIconFactory>(\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 '--ai-size': getSize(size, 'ai-size'),\n '--ai-radius': radius === undefined ? undefined : getRadius(radius),\n '--ai-bg': color || variant ? colors.background : undefined,\n '--ai-hover': color || variant ? colors.hover : undefined,\n '--ai-hover-color': color || variant ? colors.hoverColor : undefined,\n '--ai-color': colors.color,\n '--ai-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const ActionIcon = polymorphicFactory<ActionIconFactory>((_props) => {\n const props = useProps('ActionIcon', null, _props);\n const {\n className,\n unstyled,\n variant,\n classNames,\n styles,\n style,\n loading,\n loaderProps,\n size,\n color,\n radius,\n __staticSelector,\n gradient,\n vars,\n children,\n disabled,\n 'data-disabled': dataDisabled,\n autoContrast,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<ActionIconFactory>({\n name: ['ActionIcon', __staticSelector],\n props,\n className,\n style,\n classes,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <UnstyledButton\n {...getStyles('root', { active: !disabled && !loading && !dataDisabled })}\n {...others}\n unstyled={unstyled}\n variant={variant}\n size={size}\n disabled={disabled || loading}\n mod={[{ loading, disabled: disabled || dataDisabled }, mod]}\n >\n {typeof loading === 'boolean' && (\n <Transition mounted={loading} transition=\"slide-down\" duration={150}>\n {(transitionStyles) => (\n <Box component=\"span\" {...getStyles('loader', { style: transitionStyles })} aria-hidden>\n <Loader color=\"var(--ai-color)\" size=\"calc(var(--ai-size) * 0.55)\" {...loaderProps} />\n </Box>\n )}\n </Transition>\n )}\n\n <Box component=\"span\" mod={{ loading }} {...getStyles('icon')}>\n {children}\n </Box>\n </UnstyledButton>\n );\n});\n\nActionIcon.classes = classes;\nActionIcon.varsResolver = varsResolver;\nActionIcon.displayName = '@mantine/core/ActionIcon';\nActionIcon.Group = ActionIconGroup;\nActionIcon.GroupSection = ActionIconGroupSection;\n\nexport namespace ActionIcon {\n export type Props = ActionIconProps;\n export type StylesNames = ActionIconStylesNames;\n export type CssVariables = ActionIconCssVariables;\n export type Factory = ActionIconFactory;\n\n export namespace Group {\n export type Props = ActionIconGroupProps;\n export type StylesNames = ActionIconGroupStylesNames;\n export type CssVariables = ActionIconGroupCssVariables;\n export type Factory = ActionIconGroupFactory;\n }\n\n export namespace GroupSection {\n export type Props = ActionIconGroupSectionProps;\n export type StylesNames = ActionIconGroupSectionStylesNames;\n export type CssVariables = ActionIconGroupSectionCssVariables;\n export type Factory = ActionIconGroupSectionFactory;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqGA,MAAM,eAAe,oBAClB,OAAO,EAAE,MAAM,QAAQ,SAAS,UAAU,OAAO,mBAAmB;CACnE,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA;EACA,SAAS,WAAW;EACpB;EACD,CAAC;AAEF,QAAO,EACL,MAAM;EACJ,aAAa,QAAQ,MAAM,UAAU;EACrC,eAAe,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,OAAO;EACnE,WAAW,SAAS,UAAU,OAAO,aAAa,KAAA;EAClD,cAAc,SAAS,UAAU,OAAO,QAAQ,KAAA;EAChD,oBAAoB,SAAS,UAAU,OAAO,aAAa,KAAA;EAC3D,cAAc,OAAO;EACrB,WAAW,SAAS,UAAU,OAAO,SAAS,KAAA;EAC/C,EACF;EAEJ;AAED,MAAa,aAAa,oBAAuC,WAAW;CAC1E,MAAM,QAAQ,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EACJ,WACA,UACA,SACA,YACA,QACA,OACA,SACA,aACA,MACA,OACA,QACA,kBACA,UACA,MACA,UACA,UACA,iBAAiB,cACjB,cACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA6B;EAC7C,MAAM,CAAC,cAAc,iBAAiB;EACtC;EACA;EACA;EACA,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,gBAAD;EACE,GAAI,UAAU,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,cAAc,CAAC;EACzE,GAAI;EACM;EACD;EACH;EACN,UAAU,YAAY;EACtB,KAAK,CAAC;GAAE;GAAS,UAAU,YAAY;GAAc,EAAE,IAAI;YAP7D,CASG,OAAO,YAAY,aAClB,oBAAC,YAAD;GAAY,SAAS;GAAS,YAAW;GAAa,UAAU;cAC5D,qBACA,oBAAC,KAAD;IAAK,WAAU;IAAO,GAAI,UAAU,UAAU,EAAE,OAAO,kBAAkB,CAAC;IAAE,eAAA;cAC1E,oBAAC,QAAD;KAAQ,OAAM;KAAkB,MAAK;KAA8B,GAAI;KAAe,CAAA;IAClF,CAAA;GAEG,CAAA,EAGf,oBAAC,KAAD;GAAK,WAAU;GAAO,KAAK,EAAE,SAAS;GAAE,GAAI,UAAU,OAAO;GAC1D;GACG,CAAA,CACS;;EAEnB;AAEF,WAAW,UAAUA;AACrB,WAAW,eAAe;AAC1B,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"Affix.mjs","names":["classes"],"sources":["../../../src/components/Affix/Affix.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getDefaultZIndex,\n getSpacing,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { BasePortalProps, OptionalPortal } from '../Portal';\nimport classes from './Affix.module.css';\n\nexport type AffixStylesNames = 'root';\nexport type AffixCssVariables = {\n root: '--affix-z-index' | '--affix-top' | '--affix-left' | '--affix-bottom' | '--affix-right';\n};\n\nexport interface AffixPosition {\n top?: MantineSize | (string & {}) | number;\n left?: MantineSize | (string & {}) | number;\n bottom?: MantineSize | (string & {}) | number;\n right?: MantineSize | (string & {}) | number;\n}\n\nexport interface AffixBaseProps {\n /** Root element `z-index` property @default 200 */\n zIndex?: React.CSSProperties['zIndex'];\n\n /** Determines whether the component is rendered within `Portal` @default true */\n withinPortal?: boolean;\n\n /** Props passed down to the `Portal` component. Ignored when `withinPortal` is `false`. */\n portalProps?: BasePortalProps;\n\n /** Affix position on screen @default { bottom: 0, right: 0 } */\n position?: AffixPosition;\n}\n\nexport interface AffixProps\n extends BoxProps, AffixBaseProps, StylesApiProps<AffixFactory>, ElementProps<'div'> {}\n\nexport type AffixFactory = Factory<{\n props: AffixProps;\n ref: HTMLDivElement;\n stylesNames: AffixStylesNames;\n vars: AffixCssVariables;\n}>;\n\nconst defaultProps = {\n position: { bottom: 0, right: 0 },\n zIndex: getDefaultZIndex('modal'),\n withinPortal: true,\n} satisfies Partial<AffixProps>;\n\nconst varsResolver = createVarsResolver<AffixFactory>((_, { zIndex, position }) => ({\n root: {\n '--affix-z-index': zIndex?.toString(),\n '--affix-top': getSpacing(position?.top),\n '--affix-left': getSpacing(position?.left),\n '--affix-bottom': getSpacing(position?.bottom),\n '--affix-right': getSpacing(position?.right),\n },\n}));\n\nexport const Affix = factory<AffixFactory>((_props) => {\n const props = useProps('Affix', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n portalProps,\n zIndex,\n withinPortal,\n position,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<AffixFactory>({\n name: 'Affix',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Box {...getStyles('root')} {...others} />\n </OptionalPortal>\n );\n});\n\nAffix.classes = classes;\nAffix.varsResolver = varsResolver;\nAffix.displayName = '@mantine/core/Affix';\n"],"mappings":";;;;;;;;;;;;AAqDA,MAAM,eAAe;CACnB,UAAU;EAAE,QAAQ;EAAG,OAAO;EAAG;CACjC,QAAQ,iBAAiB,QAAQ;CACjC,cAAc;CACf;AAED,MAAM,eAAe,oBAAkC,GAAG,EAAE,QAAQ,gBAAgB,EAClF,MAAM;CACJ,mBAAmB,QAAQ,UAAU;CACrC,eAAe,WAAW,UAAU,IAAI;CACxC,gBAAgB,WAAW,UAAU,KAAK;CAC1C,kBAAkB,WAAW,UAAU,OAAO;CAC9C,iBAAiB,WAAW,UAAU,MAAM;CAC7C,EACF,EAAE;AAEH,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,cAAc,OAAO;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,aACA,QACA,cACA,UACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,oBAAC,gBAAD;EAAgB,GAAI;EAA2B;YAC7C,oBAAC,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,GAAI;GAAU,CAAA;EAC3B,CAAA;EAEnB;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
1
+ {"version":3,"file":"Affix.mjs","names":["classes"],"sources":["../../../src/components/Affix/Affix.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getDefaultZIndex,\n getSpacing,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { BasePortalProps, OptionalPortal } from '../Portal';\nimport classes from './Affix.module.css';\n\nexport type AffixStylesNames = 'root';\nexport type AffixCssVariables = {\n root: '--affix-z-index' | '--affix-top' | '--affix-left' | '--affix-bottom' | '--affix-right';\n};\n\nexport interface AffixPosition {\n top?: MantineSize | (string & {}) | number;\n left?: MantineSize | (string & {}) | number;\n bottom?: MantineSize | (string & {}) | number;\n right?: MantineSize | (string & {}) | number;\n}\n\nexport interface AffixBaseProps {\n /** Root element `z-index` property @default 200 */\n zIndex?: React.CSSProperties['zIndex'];\n\n /** Determines whether the component is rendered within `Portal` @default true */\n withinPortal?: boolean;\n\n /** Props passed down to the `Portal` component. Ignored when `withinPortal` is `false`. */\n portalProps?: BasePortalProps;\n\n /** Affix position on screen @default { bottom: 0, right: 0 } */\n position?: AffixPosition;\n}\n\nexport interface AffixProps\n extends BoxProps, AffixBaseProps, StylesApiProps<AffixFactory>, ElementProps<'div'> {}\n\nexport type AffixFactory = Factory<{\n props: AffixProps;\n ref: HTMLDivElement;\n stylesNames: AffixStylesNames;\n vars: AffixCssVariables;\n}>;\n\nconst defaultProps = {\n position: { bottom: 0, right: 0 },\n zIndex: getDefaultZIndex('modal'),\n withinPortal: true,\n} satisfies Partial<AffixProps>;\n\nconst varsResolver = createVarsResolver<AffixFactory>((_, { zIndex, position }) => ({\n root: {\n '--affix-z-index': zIndex?.toString(),\n '--affix-top': getSpacing(position?.top),\n '--affix-left': getSpacing(position?.left),\n '--affix-bottom': getSpacing(position?.bottom),\n '--affix-right': getSpacing(position?.right),\n },\n}));\n\nexport const Affix = factory<AffixFactory>((_props) => {\n const props = useProps('Affix', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n portalProps,\n zIndex,\n withinPortal,\n position,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<AffixFactory>({\n name: 'Affix',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Box {...getStyles('root')} {...others} />\n </OptionalPortal>\n );\n});\n\nAffix.classes = classes;\nAffix.varsResolver = varsResolver;\nAffix.displayName = '@mantine/core/Affix';\n\nexport namespace Affix {\n export type Props = AffixProps;\n export type StylesNames = AffixStylesNames;\n export type CssVariables = AffixCssVariables;\n export type Factory = AffixFactory;\n}\n"],"mappings":";;;;;;;;;;;;AAqDA,MAAM,eAAe;CACnB,UAAU;EAAE,QAAQ;EAAG,OAAO;EAAG;CACjC,QAAQ,iBAAiB,QAAQ;CACjC,cAAc;CACf;AAED,MAAM,eAAe,oBAAkC,GAAG,EAAE,QAAQ,gBAAgB,EAClF,MAAM;CACJ,mBAAmB,QAAQ,UAAU;CACrC,eAAe,WAAW,UAAU,IAAI;CACxC,gBAAgB,WAAW,UAAU,KAAK;CAC1C,kBAAkB,WAAW,UAAU,OAAO;CAC9C,iBAAiB,WAAW,UAAU,MAAM;CAC7C,EACF,EAAE;AAEH,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,cAAc,OAAO;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,aACA,QACA,cACA,UACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,oBAAC,gBAAD;EAAgB,GAAI;EAA2B;YAC7C,oBAAC,KAAD;GAAK,GAAI,UAAU,OAAO;GAAE,GAAI;GAAU,CAAA;EAC3B,CAAA;EAEnB;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.mjs","names":["classes"],"sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { useId } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineColor,\n MantineRadius,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { CloseButton } from '../CloseButton';\nimport classes from './Alert.module.css';\n\nexport type AlertStylesNames =\n | 'root'\n | 'body'\n | 'label'\n | 'title'\n | 'icon'\n | 'wrapper'\n | 'message'\n | 'closeButton';\nexport type AlertVariant = 'filled' | 'light' | 'outline' | 'default' | 'transparent' | 'white';\nexport type AlertCssVariables = {\n root: '--alert-radius' | '--alert-bg' | '--alert-color' | '--alert-bd';\n};\n\nexport interface AlertProps\n extends BoxProps, StylesApiProps<AlertFactory>, ElementProps<'div', 'title'> {\n /** Key of `theme.radius` or any valid CSS value to set border-radius @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color @default theme.primaryColor */\n color?: MantineColor;\n\n /** Alert title */\n title?: React.ReactNode;\n\n /** Icon displayed next to the title */\n icon?: React.ReactNode;\n\n /** Determines whether close button should be displayed @default false */\n withCloseButton?: boolean;\n\n /** Called when the close button is clicked */\n onClose?: () => void;\n\n /** Close button `aria-label` */\n closeButtonLabel?: string;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type AlertFactory = Factory<{\n props: AlertProps;\n ref: HTMLDivElement;\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n}>;\n\nconst varsResolver = createVarsResolver<AlertFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n variant: variant || 'light',\n autoContrast,\n });\n\n return {\n root: {\n '--alert-radius': radius === undefined ? undefined : getRadius(radius),\n '--alert-bg': color || variant ? colors.background : undefined,\n '--alert-color': colors.color,\n '--alert-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const Alert = factory<AlertFactory>((_props) => {\n const props = useProps('Alert', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n radius,\n color,\n title,\n children,\n id,\n icon,\n withCloseButton,\n onClose,\n closeButtonLabel,\n variant,\n autoContrast,\n role,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const rootId = useId(id);\n const titleId = (title && `${rootId}-title`) || undefined;\n const bodyId = `${rootId}-body`;\n\n return (\n <Box\n id={rootId}\n {...getStyles('root', { variant })}\n variant={variant}\n {...others}\n role={role || 'alert'}\n aria-describedby={children ? bodyId : undefined}\n aria-labelledby={title ? titleId : undefined}\n >\n <div {...getStyles('wrapper')}>\n {icon && <div {...getStyles('icon')}>{icon}</div>}\n\n <div {...getStyles('body')}>\n {title && (\n <div {...getStyles('title')} data-with-close-button={withCloseButton || undefined}>\n <span id={titleId} {...getStyles('label')}>\n {title}\n </span>\n </div>\n )}\n\n {children && (\n <div id={bodyId} {...getStyles('message')} data-variant={variant}>\n {children}\n </div>\n )}\n </div>\n\n {withCloseButton && (\n <CloseButton\n {...getStyles('closeButton')}\n onClick={onClose}\n variant=\"transparent\"\n size={16}\n iconSize={16}\n aria-label={closeButtonLabel}\n unstyled={unstyled}\n />\n )}\n </div>\n </Box>\n );\n});\n\nAlert.classes = classes;\nAlert.varsResolver = varsResolver;\nAlert.displayName = '@mantine/core/Alert';\n"],"mappings":";;;;;;;;;;;;AAmEA,MAAM,eAAe,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;EACpB;EACD,CAAC;AAEF,QAAO,EACL,MAAM;EACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,OAAO;EACtE,cAAc,SAAS,UAAU,OAAO,aAAa,KAAA;EACrD,iBAAiB,OAAO;EACxB,cAAc,SAAS,UAAU,OAAO,SAAS,KAAA;EAClD,EACF;EAEJ;AAED,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,MAAM,OAAO;CAC7C,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,QACA,OACA,OACA,UACA,IACA,MACA,iBACA,SACA,kBACA,SACA,cACA,MACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,SAAS,MAAM,GAAG;CACxB,MAAM,UAAW,SAAS,GAAG,OAAO,WAAY,KAAA;CAChD,MAAM,SAAS,GAAG,OAAO;AAEzB,QACE,oBAAC,KAAD;EACE,IAAI;EACJ,GAAI,UAAU,QAAQ,EAAE,SAAS,CAAC;EACzB;EACT,GAAI;EACJ,MAAM,QAAQ;EACd,oBAAkB,WAAW,SAAS,KAAA;EACtC,mBAAiB,QAAQ,UAAU,KAAA;YAEnC,qBAAC,OAAD;GAAK,GAAI,UAAU,UAAU;aAA7B;IACG,QAAQ,oBAAC,OAAD;KAAK,GAAI,UAAU,OAAO;eAAG;KAAW,CAAA;IAEjD,qBAAC,OAAD;KAAK,GAAI,UAAU,OAAO;eAA1B,CACG,SACC,oBAAC,OAAD;MAAK,GAAI,UAAU,QAAQ;MAAE,0BAAwB,mBAAmB,KAAA;gBACtE,oBAAC,QAAD;OAAM,IAAI;OAAS,GAAI,UAAU,QAAQ;iBACtC;OACI,CAAA;MACH,CAAA,EAGP,YACC,oBAAC,OAAD;MAAK,IAAI;MAAQ,GAAI,UAAU,UAAU;MAAE,gBAAc;MACtD;MACG,CAAA,CAEJ;;IAEL,mBACC,oBAAC,aAAD;KACE,GAAI,UAAU,cAAc;KAC5B,SAAS;KACT,SAAQ;KACR,MAAM;KACN,UAAU;KACV,cAAY;KACF;KACV,CAAA;IAEA;;EACF,CAAA;EAER;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
1
+ {"version":3,"file":"Alert.mjs","names":["classes"],"sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { useId } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getRadius,\n MantineColor,\n MantineRadius,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { CloseButton } from '../CloseButton';\nimport classes from './Alert.module.css';\n\nexport type AlertStylesNames =\n | 'root'\n | 'body'\n | 'label'\n | 'title'\n | 'icon'\n | 'wrapper'\n | 'message'\n | 'closeButton';\nexport type AlertVariant = 'filled' | 'light' | 'outline' | 'default' | 'transparent' | 'white';\nexport type AlertCssVariables = {\n root: '--alert-radius' | '--alert-bg' | '--alert-color' | '--alert-bd';\n};\n\nexport interface AlertProps\n extends BoxProps, StylesApiProps<AlertFactory>, ElementProps<'div', 'title'> {\n /** Key of `theme.radius` or any valid CSS value to set border-radius @default theme.defaultRadius */\n radius?: MantineRadius;\n\n /** Key of `theme.colors` or any valid CSS color @default theme.primaryColor */\n color?: MantineColor;\n\n /** Alert title */\n title?: React.ReactNode;\n\n /** Icon displayed next to the title */\n icon?: React.ReactNode;\n\n /** Determines whether close button should be displayed @default false */\n withCloseButton?: boolean;\n\n /** Called when the close button is clicked */\n onClose?: () => void;\n\n /** Close button `aria-label` */\n closeButtonLabel?: string;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n}\n\nexport type AlertFactory = Factory<{\n props: AlertProps;\n ref: HTMLDivElement;\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n}>;\n\nconst varsResolver = createVarsResolver<AlertFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n color: color || theme.primaryColor,\n theme,\n variant: variant || 'light',\n autoContrast,\n });\n\n return {\n root: {\n '--alert-radius': radius === undefined ? undefined : getRadius(radius),\n '--alert-bg': color || variant ? colors.background : undefined,\n '--alert-color': colors.color,\n '--alert-bd': color || variant ? colors.border : undefined,\n },\n };\n }\n);\n\nexport const Alert = factory<AlertFactory>((_props) => {\n const props = useProps('Alert', null, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n radius,\n color,\n title,\n children,\n id,\n icon,\n withCloseButton,\n onClose,\n closeButtonLabel,\n variant,\n autoContrast,\n role,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const rootId = useId(id);\n const titleId = (title && `${rootId}-title`) || undefined;\n const bodyId = `${rootId}-body`;\n\n return (\n <Box\n id={rootId}\n {...getStyles('root', { variant })}\n variant={variant}\n {...others}\n role={role || 'alert'}\n aria-describedby={children ? bodyId : undefined}\n aria-labelledby={title ? titleId : undefined}\n >\n <div {...getStyles('wrapper')}>\n {icon && <div {...getStyles('icon')}>{icon}</div>}\n\n <div {...getStyles('body')}>\n {title && (\n <div {...getStyles('title')} data-with-close-button={withCloseButton || undefined}>\n <span id={titleId} {...getStyles('label')}>\n {title}\n </span>\n </div>\n )}\n\n {children && (\n <div id={bodyId} {...getStyles('message')} data-variant={variant}>\n {children}\n </div>\n )}\n </div>\n\n {withCloseButton && (\n <CloseButton\n {...getStyles('closeButton')}\n onClick={onClose}\n variant=\"transparent\"\n size={16}\n iconSize={16}\n aria-label={closeButtonLabel}\n unstyled={unstyled}\n />\n )}\n </div>\n </Box>\n );\n});\n\nAlert.classes = classes;\nAlert.varsResolver = varsResolver;\nAlert.displayName = '@mantine/core/Alert';\n\nexport namespace Alert {\n export type Props = AlertProps;\n export type StylesNames = AlertStylesNames;\n export type CssVariables = AlertCssVariables;\n export type Factory = AlertFactory;\n}\n"],"mappings":";;;;;;;;;;;;AAmEA,MAAM,eAAe,oBAClB,OAAO,EAAE,QAAQ,OAAO,SAAS,mBAAmB;CACnD,MAAM,SAAS,MAAM,qBAAqB;EACxC,OAAO,SAAS,MAAM;EACtB;EACA,SAAS,WAAW;EACpB;EACD,CAAC;AAEF,QAAO,EACL,MAAM;EACJ,kBAAkB,WAAW,KAAA,IAAY,KAAA,IAAY,UAAU,OAAO;EACtE,cAAc,SAAS,UAAU,OAAO,aAAa,KAAA;EACrD,iBAAiB,OAAO;EACxB,cAAc,SAAS,UAAU,OAAO,SAAS,KAAA;EAClD,EACF;EAEJ;AAED,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,MAAM,OAAO;CAC7C,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,QACA,OACA,OACA,UACA,IACA,MACA,iBACA,SACA,kBACA,SACA,cACA,MACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,SAAS,MAAM,GAAG;CACxB,MAAM,UAAW,SAAS,GAAG,OAAO,WAAY,KAAA;CAChD,MAAM,SAAS,GAAG,OAAO;AAEzB,QACE,oBAAC,KAAD;EACE,IAAI;EACJ,GAAI,UAAU,QAAQ,EAAE,SAAS,CAAC;EACzB;EACT,GAAI;EACJ,MAAM,QAAQ;EACd,oBAAkB,WAAW,SAAS,KAAA;EACtC,mBAAiB,QAAQ,UAAU,KAAA;YAEnC,qBAAC,OAAD;GAAK,GAAI,UAAU,UAAU;aAA7B;IACG,QAAQ,oBAAC,OAAD;KAAK,GAAI,UAAU,OAAO;eAAG;KAAW,CAAA;IAEjD,qBAAC,OAAD;KAAK,GAAI,UAAU,OAAO;eAA1B,CACG,SACC,oBAAC,OAAD;MAAK,GAAI,UAAU,QAAQ;MAAE,0BAAwB,mBAAmB,KAAA;gBACtE,oBAAC,QAAD;OAAM,IAAI;OAAS,GAAI,UAAU,QAAQ;iBACtC;OACI,CAAA;MACH,CAAA,EAGP,YACC,oBAAC,OAAD;MAAK,IAAI;MAAQ,GAAI,UAAU,UAAU;MAAE,gBAAc;MACtD;MACG,CAAA,CAEJ;;IAEL,mBACC,oBAAC,aAAD;KACE,GAAI,UAAU,cAAc;KAC5B,SAAS;KACT,SAAQ;KACR,MAAM;KACN,UAAU;KACV,cAAY;KACF;KACV,CAAA;IAEA;;EACF,CAAA;EAER;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Anchor.mjs","names":["classes"],"sources":["../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { polymorphicFactory, PolymorphicFactory, useProps } from '../../core';\nimport { Text, TextCssVariables, TextProps, TextStylesNames, TextVariant } from '../Text';\nimport classes from './Anchor.module.css';\n\nexport type AnchorStylesNames = TextStylesNames;\nexport type AnchorVariant = TextVariant;\nexport type AnchorCssVariables = TextCssVariables;\n\nexport interface AnchorProps extends Omit<TextProps, 'span'> {\n /** Defines when `text-decoration: underline` styles are applied. @default hover */\n underline?: 'always' | 'hover' | 'not-hover' | 'never';\n}\n\nexport type AnchorFactory = PolymorphicFactory<{\n props: AnchorProps;\n defaultComponent: 'a';\n defaultRef: HTMLAnchorElement;\n stylesNames: AnchorStylesNames;\n vars: AnchorCssVariables;\n variant: AnchorVariant;\n}>;\n\nconst defaultProps = {\n underline: 'hover',\n} satisfies Partial<AnchorProps>;\n\nexport const Anchor = polymorphicFactory<AnchorFactory>((props) => {\n const { underline, className, unstyled, mod, ...others } = useProps(\n 'Anchor',\n defaultProps,\n props\n );\n\n return (\n <Text\n component=\"a\"\n className={cx({ [classes.root]: !unstyled }, className)}\n {...others}\n mod={[{ underline }, mod]}\n __staticSelector=\"Anchor\"\n unstyled={unstyled}\n />\n );\n});\n\nAnchor.classes = classes;\nAnchor.displayName = '@mantine/core/Anchor';\n"],"mappings":";;;;;;;;AAuBA,MAAM,eAAe,EACnB,WAAW,SACZ;AAED,MAAa,SAAS,oBAAmC,UAAU;CACjE,MAAM,EAAE,WAAW,WAAW,UAAU,KAAK,GAAG,WAAW,SACzD,UACA,cACA,MACD;AAED,QACE,oBAAC,MAAD;EACE,WAAU;EACV,WAAW,GAAG,GAAGA,sBAAQ,OAAO,CAAC,UAAU,EAAE,UAAU;EACvD,GAAI;EACJ,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI;EACzB,kBAAiB;EACP;EACV,CAAA;EAEJ;AAEF,OAAO,UAAUA;AACjB,OAAO,cAAc"}
1
+ {"version":3,"file":"Anchor.mjs","names":["classes"],"sources":["../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { polymorphicFactory, PolymorphicFactory, useProps } from '../../core';\nimport { Text, TextCssVariables, TextProps, TextStylesNames, TextVariant } from '../Text';\nimport classes from './Anchor.module.css';\n\nexport type AnchorStylesNames = TextStylesNames;\nexport type AnchorVariant = TextVariant;\nexport type AnchorCssVariables = TextCssVariables;\n\nexport interface AnchorProps extends Omit<TextProps, 'span'> {\n /** Defines when `text-decoration: underline` styles are applied. @default hover */\n underline?: 'always' | 'hover' | 'not-hover' | 'never';\n}\n\nexport type AnchorFactory = PolymorphicFactory<{\n props: AnchorProps;\n defaultComponent: 'a';\n defaultRef: HTMLAnchorElement;\n stylesNames: AnchorStylesNames;\n vars: AnchorCssVariables;\n variant: AnchorVariant;\n}>;\n\nconst defaultProps = {\n underline: 'hover',\n} satisfies Partial<AnchorProps>;\n\nexport const Anchor = polymorphicFactory<AnchorFactory>((props) => {\n const { underline, className, unstyled, mod, ...others } = useProps(\n 'Anchor',\n defaultProps,\n props\n );\n\n return (\n <Text\n component=\"a\"\n className={cx({ [classes.root]: !unstyled }, className)}\n {...others}\n mod={[{ underline }, mod]}\n __staticSelector=\"Anchor\"\n unstyled={unstyled}\n />\n );\n});\n\nAnchor.classes = classes;\nAnchor.displayName = '@mantine/core/Anchor';\n\nexport namespace Anchor {\n export type Props = AnchorProps;\n export type StylesNames = AnchorStylesNames;\n export type CssVariables = AnchorCssVariables;\n export type Factory = AnchorFactory;\n export type Variant = AnchorVariant;\n}\n"],"mappings":";;;;;;;;AAuBA,MAAM,eAAe,EACnB,WAAW,SACZ;AAED,MAAa,SAAS,oBAAmC,UAAU;CACjE,MAAM,EAAE,WAAW,WAAW,UAAU,KAAK,GAAG,WAAW,SACzD,UACA,cACA,MACD;AAED,QACE,oBAAC,MAAD;EACE,WAAU;EACV,WAAW,GAAG,GAAGA,sBAAQ,OAAO,CAAC,UAAU,EAAE,UAAU;EACvD,GAAI;EACJ,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI;EACzB,kBAAiB;EACP;EACV,CAAA;EAEJ;AAEF,OAAO,UAAUA;AACjB,OAAO,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"AngleSlider.mjs","names":["classes"],"sources":["../../../src/components/AngleSlider/AngleSlider.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { normalizeRadialValue, useMergedRef, useRadialMove, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n findClosestNumber,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './AngleSlider.module.css';\n\nexport type AngleSliderStylesNames = 'root' | 'thumb' | 'label' | 'marks' | 'mark';\nexport type AngleSliderCssVariables = {\n root: '--slider-size' | '--thumb-size';\n};\n\nexport interface AngleSliderProps\n extends BoxProps, StylesApiProps<AngleSliderFactory>, ElementProps<'div', 'onChange'> {\n /** Step between values @default 1 */\n step?: number;\n\n /** Controlled component value */\n value?: number;\n\n /** Uncontrolled component default value */\n defaultValue?: number;\n\n /** Called on value change */\n onChange?: (value: number) => void;\n\n /** Called after the selection is finished */\n onChangeEnd?: (value: number) => void;\n\n /** Called in `onMouseDown` and `onTouchStart` */\n onScrubStart?: () => void;\n\n /** Called in `onMouseUp` and `onTouchEnd` */\n onScrubEnd?: () => void;\n\n /** If set, the label is displayed inside the slider @default true */\n withLabel?: boolean;\n\n /** Array of marks displayed on the slider */\n marks?: { value: number; label?: string }[];\n\n /** Slider size in px @default 60 */\n size?: number;\n\n /** Size of the thumb in px. Calculated based on the `size` value by default. */\n thumbSize?: number;\n\n /** A function to format label based on the current value */\n formatLabel?: (value: number) => React.ReactNode;\n\n /** Sets `data-disabled` attribute, disables interactions */\n disabled?: boolean;\n\n /** If set, the selection is allowed only from the given marks array @default false */\n restrictToMarks?: boolean;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: React.ComponentProps<'input'>;\n\n /** Hidden input name, use with uncontrolled component */\n name?: string;\n}\n\nexport type AngleSliderFactory = Factory<{\n props: AngleSliderProps;\n ref: HTMLDivElement;\n stylesNames: AngleSliderStylesNames;\n vars: AngleSliderCssVariables;\n}>;\n\nconst defaultProps = {\n step: 1,\n withLabel: true,\n} satisfies Partial<AngleSliderProps>;\n\nconst varsResolver = createVarsResolver<AngleSliderFactory>((_, { size, thumbSize }) => ({\n root: {\n '--slider-size': rem(size),\n '--thumb-size': rem(thumbSize),\n },\n}));\n\nexport const AngleSlider = factory<AngleSliderFactory>((_props) => {\n const props = useProps('AngleSlider', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n step,\n value,\n defaultValue,\n onChange,\n onMouseDown,\n withLabel,\n marks,\n thumbSize,\n restrictToMarks,\n formatLabel,\n onChangeEnd,\n disabled,\n onTouchStart,\n name,\n hiddenInputProps,\n 'aria-label': ariaLabel,\n tabIndex,\n onScrubStart,\n onScrubEnd,\n mod,\n attributes,\n ref,\n ...others\n } = props;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: 0,\n onChange,\n });\n\n const update = (val: number) => {\n if (rootRef.current && !disabled) {\n const newValue =\n restrictToMarks && Array.isArray(marks)\n ? findClosestNumber(\n val,\n marks.map((mark) => mark.value)\n )\n : val;\n\n setValue(newValue);\n }\n };\n\n const { ref: radialMoveRef } = useRadialMove(update, {\n step,\n onChangeEnd,\n onScrubStart,\n onScrubEnd,\n });\n\n const getStyles = useStyles<AngleSliderFactory>({\n name: 'AngleSlider',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n let newValue = _value;\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n event.preventDefault();\n if (_value === 0) {\n newValue = 359;\n } else {\n newValue = normalizeRadialValue(_value - step, step);\n }\n }\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n event.preventDefault();\n if (_value === 359) {\n newValue = 0;\n } else {\n newValue = normalizeRadialValue(_value + step, step);\n }\n }\n\n if (event.key === 'Home') {\n newValue = 0;\n }\n\n if (event.key === 'End') {\n newValue = 359;\n }\n\n if (restrictToMarks && Array.isArray(marks)) {\n const markValues = marks.map((mark) => mark.value);\n const currentIndex = markValues.indexOf(_value);\n\n if (currentIndex !== -1) {\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n newValue = markValues[currentIndex === 0 ? markValues.length - 1 : currentIndex - 1];\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n newValue = markValues[currentIndex === markValues.length - 1 ? 0 : currentIndex + 1];\n } else {\n newValue = findClosestNumber(newValue, markValues);\n }\n } else {\n newValue = findClosestNumber(newValue, markValues);\n }\n }\n\n setValue(newValue);\n onChangeEnd?.(newValue);\n };\n\n const marksItems = marks?.map((mark, index) => (\n <div\n {...getStyles('mark', { style: { '--angle': `${mark.value}deg` } })}\n data-label={mark.label || undefined}\n key={index}\n />\n ));\n\n return (\n <Box\n ref={useMergedRef(ref, rootRef, radialMoveRef)}\n {...getStyles('root', { focusable: true })}\n mod={[{ disabled }, mod]}\n {...others}\n >\n {marksItems && marksItems.length > 0 && <div {...getStyles('marks')}>{marksItems}</div>}\n\n {withLabel && (\n <div {...getStyles('label')}>\n {typeof formatLabel === 'function' ? formatLabel(_value) : _value}\n </div>\n )}\n <div\n tabIndex={tabIndex ?? (disabled ? -1 : 0)}\n role=\"slider\"\n aria-valuemax={360}\n aria-valuemin={0}\n aria-valuenow={_value}\n onKeyDown={handleKeyDown}\n aria-label={ariaLabel}\n {...getStyles('thumb', { style: { transform: `rotate(${_value}deg)` } })}\n />\n <input type=\"hidden\" name={name} value={_value} {...hiddenInputProps} />\n </Box>\n );\n});\n\nAngleSlider.displayName = '@mantine/core/AngleSlider';\nAngleSlider.classes = classes;\nAngleSlider.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;AAgFA,MAAM,eAAe;CACnB,MAAM;CACN,WAAW;CACZ;AAED,MAAM,eAAe,oBAAwC,GAAG,EAAE,MAAM,iBAAiB,EACvF,MAAM;CACJ,iBAAiB,IAAI,KAAK;CAC1B,gBAAgB,IAAI,UAAU;CAC/B,EACF,EAAE;AAEH,MAAa,cAAc,SAA6B,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AAY,eAAe"}
1
+ {"version":3,"file":"AngleSlider.mjs","names":["classes"],"sources":["../../../src/components/AngleSlider/AngleSlider.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { normalizeRadialValue, useMergedRef, useRadialMove, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n findClosestNumber,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './AngleSlider.module.css';\n\nexport type AngleSliderStylesNames = 'root' | 'thumb' | 'label' | 'marks' | 'mark';\nexport type AngleSliderCssVariables = {\n root: '--slider-size' | '--thumb-size';\n};\n\nexport interface AngleSliderProps\n extends BoxProps, StylesApiProps<AngleSliderFactory>, ElementProps<'div', 'onChange'> {\n /** Step between values @default 1 */\n step?: number;\n\n /** Controlled component value */\n value?: number;\n\n /** Uncontrolled component default value */\n defaultValue?: number;\n\n /** Called on value change */\n onChange?: (value: number) => void;\n\n /** Called after the selection is finished */\n onChangeEnd?: (value: number) => void;\n\n /** Called in `onMouseDown` and `onTouchStart` */\n onScrubStart?: () => void;\n\n /** Called in `onMouseUp` and `onTouchEnd` */\n onScrubEnd?: () => void;\n\n /** If set, the label is displayed inside the slider @default true */\n withLabel?: boolean;\n\n /** Array of marks displayed on the slider */\n marks?: { value: number; label?: string }[];\n\n /** Slider size in px @default 60 */\n size?: number;\n\n /** Size of the thumb in px. Calculated based on the `size` value by default. */\n thumbSize?: number;\n\n /** A function to format label based on the current value */\n formatLabel?: (value: number) => React.ReactNode;\n\n /** Sets `data-disabled` attribute, disables interactions */\n disabled?: boolean;\n\n /** If set, the selection is allowed only from the given marks array @default false */\n restrictToMarks?: boolean;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: React.ComponentProps<'input'>;\n\n /** Hidden input name, use with uncontrolled component */\n name?: string;\n}\n\nexport type AngleSliderFactory = Factory<{\n props: AngleSliderProps;\n ref: HTMLDivElement;\n stylesNames: AngleSliderStylesNames;\n vars: AngleSliderCssVariables;\n}>;\n\nconst defaultProps = {\n step: 1,\n withLabel: true,\n} satisfies Partial<AngleSliderProps>;\n\nconst varsResolver = createVarsResolver<AngleSliderFactory>((_, { size, thumbSize }) => ({\n root: {\n '--slider-size': rem(size),\n '--thumb-size': rem(thumbSize),\n },\n}));\n\nexport const AngleSlider = factory<AngleSliderFactory>((_props) => {\n const props = useProps('AngleSlider', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n step,\n value,\n defaultValue,\n onChange,\n onMouseDown,\n withLabel,\n marks,\n thumbSize,\n restrictToMarks,\n formatLabel,\n onChangeEnd,\n disabled,\n onTouchStart,\n name,\n hiddenInputProps,\n 'aria-label': ariaLabel,\n tabIndex,\n onScrubStart,\n onScrubEnd,\n mod,\n attributes,\n ref,\n ...others\n } = props;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: 0,\n onChange,\n });\n\n const update = (val: number) => {\n if (rootRef.current && !disabled) {\n const newValue =\n restrictToMarks && Array.isArray(marks)\n ? findClosestNumber(\n val,\n marks.map((mark) => mark.value)\n )\n : val;\n\n setValue(newValue);\n }\n };\n\n const { ref: radialMoveRef } = useRadialMove(update, {\n step,\n onChangeEnd,\n onScrubStart,\n onScrubEnd,\n });\n\n const getStyles = useStyles<AngleSliderFactory>({\n name: 'AngleSlider',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n let newValue = _value;\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n event.preventDefault();\n if (_value === 0) {\n newValue = 359;\n } else {\n newValue = normalizeRadialValue(_value - step, step);\n }\n }\n\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n event.preventDefault();\n if (_value === 359) {\n newValue = 0;\n } else {\n newValue = normalizeRadialValue(_value + step, step);\n }\n }\n\n if (event.key === 'Home') {\n newValue = 0;\n }\n\n if (event.key === 'End') {\n newValue = 359;\n }\n\n if (restrictToMarks && Array.isArray(marks)) {\n const markValues = marks.map((mark) => mark.value);\n const currentIndex = markValues.indexOf(_value);\n\n if (currentIndex !== -1) {\n if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n newValue = markValues[currentIndex === 0 ? markValues.length - 1 : currentIndex - 1];\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n newValue = markValues[currentIndex === markValues.length - 1 ? 0 : currentIndex + 1];\n } else {\n newValue = findClosestNumber(newValue, markValues);\n }\n } else {\n newValue = findClosestNumber(newValue, markValues);\n }\n }\n\n setValue(newValue);\n onChangeEnd?.(newValue);\n };\n\n const marksItems = marks?.map((mark, index) => (\n <div\n {...getStyles('mark', { style: { '--angle': `${mark.value}deg` } })}\n data-label={mark.label || undefined}\n key={index}\n />\n ));\n\n return (\n <Box\n ref={useMergedRef(ref, rootRef, radialMoveRef)}\n {...getStyles('root', { focusable: true })}\n mod={[{ disabled }, mod]}\n {...others}\n >\n {marksItems && marksItems.length > 0 && <div {...getStyles('marks')}>{marksItems}</div>}\n\n {withLabel && (\n <div {...getStyles('label')}>\n {typeof formatLabel === 'function' ? formatLabel(_value) : _value}\n </div>\n )}\n <div\n tabIndex={tabIndex ?? (disabled ? -1 : 0)}\n role=\"slider\"\n aria-valuemax={360}\n aria-valuemin={0}\n aria-valuenow={_value}\n onKeyDown={handleKeyDown}\n aria-label={ariaLabel}\n {...getStyles('thumb', { style: { transform: `rotate(${_value}deg)` } })}\n />\n <input type=\"hidden\" name={name} value={_value} {...hiddenInputProps} />\n </Box>\n );\n});\n\nAngleSlider.displayName = '@mantine/core/AngleSlider';\nAngleSlider.classes = classes;\nAngleSlider.varsResolver = varsResolver;\n\nexport namespace AngleSlider {\n export type Props = AngleSliderProps;\n export type StylesNames = AngleSliderStylesNames;\n export type CssVariables = AngleSliderCssVariables;\n export type Factory = AngleSliderFactory;\n}\n"],"mappings":";;;;;;;;;;;;;AAgFA,MAAM,eAAe;CACnB,MAAM;CACN,WAAW;CACZ;AAED,MAAM,eAAe,oBAAwC,GAAG,EAAE,MAAM,iBAAiB,EACvF,MAAM;CACJ,iBAAiB,IAAI,KAAK;CAC1B,gBAAgB,IAAI,UAAU;CAC/B,EACF,EAAE;AAEH,MAAa,cAAc,SAA6B,WAAW;CACjE,MAAM,QAAQ,SAAS,eAAe,cAAc,OAAO;CAC3D,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,OACA,cACA,UACA,aACA,WACA,OACA,WACA,iBACA,aACA,aACA,UACA,cACA,MACA,kBACA,cAAc,WACd,UACA,cACA,YACA,KACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,UAAU,OAA8B,KAAK;CAEnD,MAAM,CAAC,QAAQ,YAAY,gBAAgB;EACzC;EACA;EACA,YAAY;EACZ;EACD,CAAC;CAEF,MAAM,UAAU,QAAgB;AAC9B,MAAI,QAAQ,WAAW,CAAC,SAStB,UAPE,mBAAmB,MAAM,QAAQ,MAAM,GACnC,kBACE,KACA,MAAM,KAAK,SAAS,KAAK,MAAM,CAChC,GACD,IAEY;;CAItB,MAAM,EAAE,KAAK,kBAAkB,cAAc,QAAQ;EACnD;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,YAAY,UAA8B;EAC9C,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,iBAAiB,UAA+C;AACpE,MAAI,SACF;EAGF,IAAI,WAAW;AAEf,MAAI,MAAM,QAAQ,eAAe,MAAM,QAAQ,aAAa;AAC1D,SAAM,gBAAgB;AACtB,OAAI,WAAW,EACb,YAAW;OAEX,YAAW,qBAAqB,SAAS,MAAM,KAAK;;AAIxD,MAAI,MAAM,QAAQ,gBAAgB,MAAM,QAAQ,WAAW;AACzD,SAAM,gBAAgB;A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