@mantine/core 9.6.3 → 9.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/cjs/components/ActionBar/ActionBar.cjs +0 -3
  2. package/cjs/components/ActionBar/ActionBar.cjs.map +1 -1
  3. package/cjs/components/ActionBar/ActionBar.module.cjs.map +1 -1
  4. package/cjs/components/AppShell/AppShell.cjs +33 -6
  5. package/cjs/components/AppShell/AppShell.cjs.map +1 -1
  6. package/cjs/components/AppShell/AppShell.context.cjs.map +1 -1
  7. package/cjs/components/AppShell/AppShell.module.cjs +2 -1
  8. package/cjs/components/AppShell/AppShell.module.cjs.map +1 -1
  9. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs +28 -7
  10. package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
  11. package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs +28 -7
  12. package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs.map +1 -1
  13. package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs +28 -7
  14. package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs.map +1 -1
  15. package/cjs/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.cjs +3 -2
  16. package/cjs/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.cjs.map +1 -1
  17. package/cjs/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.cjs +27 -16
  18. package/cjs/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.cjs.map +1 -1
  19. package/cjs/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.cjs +24 -16
  20. package/cjs/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.cjs.map +1 -1
  21. package/cjs/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.cjs +24 -16
  22. package/cjs/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.cjs.map +1 -1
  23. package/cjs/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.cjs +30 -19
  24. package/cjs/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.cjs.map +1 -1
  25. package/cjs/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.cjs +26 -0
  26. package/cjs/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.cjs.map +1 -0
  27. package/cjs/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.cjs +10 -0
  28. package/cjs/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.cjs.map +1 -0
  29. package/cjs/components/AppShell/AppShellMediaStyles/get-variables/get-variables.cjs +13 -5
  30. package/cjs/components/AppShell/AppShellMediaStyles/get-variables/get-variables.cjs.map +1 -1
  31. package/cjs/components/AppShell/AppShellNavbar/AppShellNavbar.cjs +28 -7
  32. package/cjs/components/AppShell/AppShellNavbar/AppShellNavbar.cjs.map +1 -1
  33. package/cjs/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.cjs +270 -0
  34. package/cjs/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.cjs.map +1 -0
  35. package/cjs/components/AppShell/use-app-shell-resize/clamp-resize-size.cjs +15 -0
  36. package/cjs/components/AppShell/use-app-shell-resize/clamp-resize-size.cjs.map +1 -0
  37. package/cjs/components/AppShell/use-app-shell-resize/resize-section-config.cjs +51 -0
  38. package/cjs/components/AppShell/use-app-shell-resize/resize-section-config.cjs.map +1 -0
  39. package/cjs/components/AppShell/use-app-shell-resize/safe-area-inset.cjs +12 -0
  40. package/cjs/components/AppShell/use-app-shell-resize/safe-area-inset.cjs.map +1 -0
  41. package/cjs/components/AppShell/use-app-shell-resize/use-app-shell-resize.cjs +127 -0
  42. package/cjs/components/AppShell/use-app-shell-resize/use-app-shell-resize.cjs.map +1 -0
  43. package/cjs/components/AppShell/use-resizing/use-resizing.cjs +20 -2
  44. package/cjs/components/AppShell/use-resizing/use-resizing.cjs.map +1 -1
  45. package/cjs/components/Checkbox/Checkbox.cjs +10 -2
  46. package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  47. package/cjs/components/Checkbox/Checkbox.module.cjs +1 -0
  48. package/cjs/components/Checkbox/Checkbox.module.cjs.map +1 -1
  49. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs +10 -2
  50. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs.map +1 -1
  51. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.cjs +1 -0
  52. package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.cjs.map +1 -1
  53. package/cjs/components/Dialog/Dialog.cjs +0 -1
  54. package/cjs/components/Dialog/Dialog.cjs.map +1 -1
  55. package/cjs/components/Dialog/Dialog.module.cjs.map +1 -1
  56. package/cjs/components/HoverCard/HoverCard.cjs +34 -5
  57. package/cjs/components/HoverCard/HoverCard.cjs.map +1 -1
  58. package/cjs/components/HoverCard/HoverCard.context.cjs.map +1 -1
  59. package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs +13 -18
  60. package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs.map +1 -1
  61. package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs +6 -23
  62. package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs.map +1 -1
  63. package/cjs/components/HoverCard/use-hover-card.cjs +26 -12
  64. package/cjs/components/HoverCard/use-hover-card.cjs.map +1 -1
  65. package/cjs/components/Radio/Radio.cjs +10 -2
  66. package/cjs/components/Radio/Radio.cjs.map +1 -1
  67. package/cjs/components/Radio/Radio.module.cjs +1 -0
  68. package/cjs/components/Radio/Radio.module.cjs.map +1 -1
  69. package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs +10 -2
  70. package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs.map +1 -1
  71. package/cjs/components/Radio/RadioIndicator/RadioIndicator.module.cjs +1 -0
  72. package/cjs/components/Radio/RadioIndicator/RadioIndicator.module.cjs.map +1 -1
  73. package/cjs/components/Toggle/Toggle.cjs +80 -0
  74. package/cjs/components/Toggle/Toggle.cjs.map +1 -0
  75. package/cjs/components/Toggle/Toggle.module.cjs +7 -0
  76. package/cjs/components/Toggle/Toggle.module.cjs.map +1 -0
  77. package/cjs/components/Toolbar/Toolbar.cjs +107 -0
  78. package/cjs/components/Toolbar/Toolbar.cjs.map +1 -0
  79. package/cjs/components/Toolbar/Toolbar.context.cjs +8 -0
  80. package/cjs/components/Toolbar/Toolbar.context.cjs.map +1 -0
  81. package/cjs/components/Toolbar/Toolbar.module.cjs +12 -0
  82. package/cjs/components/Toolbar/Toolbar.module.cjs.map +1 -0
  83. package/cjs/components/Toolbar/ToolbarDivider/ToolbarDivider.cjs +31 -0
  84. package/cjs/components/Toolbar/ToolbarDivider/ToolbarDivider.cjs.map +1 -0
  85. package/cjs/components/Toolbar/ToolbarGroup/ToolbarGroup.cjs +31 -0
  86. package/cjs/components/Toolbar/ToolbarGroup/ToolbarGroup.cjs.map +1 -0
  87. package/cjs/components/Toolbar/ToolbarToggle/ToolbarToggle.cjs +47 -0
  88. package/cjs/components/Toolbar/ToolbarToggle/ToolbarToggle.cjs.map +1 -0
  89. package/cjs/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.cjs +61 -0
  90. package/cjs/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.cjs.map +1 -0
  91. package/cjs/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.context.cjs +8 -0
  92. package/cjs/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.context.cjs.map +1 -0
  93. package/cjs/components/Toolbar/ToolbarToggleItem/ToolbarToggleItem.cjs +51 -0
  94. package/cjs/components/Toolbar/ToolbarToggleItem/ToolbarToggleItem.cjs.map +1 -0
  95. package/cjs/components/Toolbar/use-toolbar-navigation.cjs +76 -0
  96. package/cjs/components/Toolbar/use-toolbar-navigation.cjs.map +1 -0
  97. package/cjs/components/Tooltip/Tooltip.cjs +9 -5
  98. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  99. package/cjs/components/Tooltip/use-tooltip.cjs +6 -3
  100. package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
  101. package/cjs/components/Tour/Tour.cjs +283 -0
  102. package/cjs/components/Tour/Tour.cjs.map +1 -0
  103. package/cjs/components/Tour/Tour.context.cjs +25 -0
  104. package/cjs/components/Tour/Tour.context.cjs.map +1 -0
  105. package/cjs/components/Tour/Tour.module.cjs +19 -0
  106. package/cjs/components/Tour/Tour.module.cjs.map +1 -0
  107. package/cjs/components/Tour/TourBeacon/TourBeacon.cjs +54 -0
  108. package/cjs/components/Tour/TourBeacon/TourBeacon.cjs.map +1 -0
  109. package/cjs/components/Tour/TourBeaconPositioned.cjs +46 -0
  110. package/cjs/components/Tour/TourBeaconPositioned.cjs.map +1 -0
  111. package/cjs/components/Tour/TourBody/TourBody.cjs +37 -0
  112. package/cjs/components/Tour/TourBody/TourBody.cjs.map +1 -0
  113. package/cjs/components/Tour/TourCloseButton/TourCloseButton.cjs +26 -0
  114. package/cjs/components/Tour/TourCloseButton/TourCloseButton.cjs.map +1 -0
  115. package/cjs/components/Tour/TourNavigation/TourNavigation.cjs +63 -0
  116. package/cjs/components/Tour/TourNavigation/TourNavigation.cjs.map +1 -0
  117. package/cjs/components/Tour/TourOverlay/TourOverlay.cjs +70 -0
  118. package/cjs/components/Tour/TourOverlay/TourOverlay.cjs.map +1 -0
  119. package/cjs/components/Tour/TourRoot/TourRoot.cjs +125 -0
  120. package/cjs/components/Tour/TourRoot/TourRoot.cjs.map +1 -0
  121. package/cjs/components/Tour/TourStep/TourStep.cjs +10 -0
  122. package/cjs/components/Tour/TourStep/TourStep.cjs.map +1 -0
  123. package/cjs/components/Tour/TourTitle/TourTitle.cjs +38 -0
  124. package/cjs/components/Tour/TourTitle/TourTitle.cjs.map +1 -0
  125. package/cjs/components/Tour/TourTooltip/TourTooltip.cjs +87 -0
  126. package/cjs/components/Tour/TourTooltip/TourTooltip.cjs.map +1 -0
  127. package/cjs/components/Tour/get-overlay-hit-path.cjs +17 -0
  128. package/cjs/components/Tour/get-overlay-hit-path.cjs.map +1 -0
  129. package/cjs/components/Tour/is-element-in-view.cjs +30 -0
  130. package/cjs/components/Tour/is-element-in-view.cjs.map +1 -0
  131. package/cjs/components/Tour/press-aware-auto-update.cjs +38 -0
  132. package/cjs/components/Tour/press-aware-auto-update.cjs.map +1 -0
  133. package/cjs/components/Tour/use-target-rect.cjs +61 -0
  134. package/cjs/components/Tour/use-target-rect.cjs.map +1 -0
  135. package/cjs/components/Tour/use-tooltip-auto-focus.cjs +34 -0
  136. package/cjs/components/Tour/use-tooltip-auto-focus.cjs.map +1 -0
  137. package/cjs/components/Tour/use-tour-state.cjs +102 -0
  138. package/cjs/components/Tour/use-tour-state.cjs.map +1 -0
  139. package/cjs/components/Tour/use-tour.cjs +155 -0
  140. package/cjs/components/Tour/use-tour.cjs.map +1 -0
  141. package/cjs/components/TreeSelect/TreeSelect.cjs +29 -16
  142. package/cjs/components/TreeSelect/TreeSelect.cjs.map +1 -1
  143. package/cjs/index.cjs +41 -1
  144. package/esm/components/ActionBar/ActionBar.mjs +0 -3
  145. package/esm/components/ActionBar/ActionBar.mjs.map +1 -1
  146. package/esm/components/ActionBar/ActionBar.module.mjs.map +1 -1
  147. package/esm/components/AppShell/AppShell.context.mjs.map +1 -1
  148. package/esm/components/AppShell/AppShell.mjs +35 -8
  149. package/esm/components/AppShell/AppShell.mjs.map +1 -1
  150. package/esm/components/AppShell/AppShell.module.mjs +2 -1
  151. package/esm/components/AppShell/AppShell.module.mjs.map +1 -1
  152. package/esm/components/AppShell/AppShellAside/AppShellAside.mjs +29 -8
  153. package/esm/components/AppShell/AppShellAside/AppShellAside.mjs.map +1 -1
  154. package/esm/components/AppShell/AppShellFooter/AppShellFooter.mjs +29 -8
  155. package/esm/components/AppShell/AppShellFooter/AppShellFooter.mjs.map +1 -1
  156. package/esm/components/AppShell/AppShellHeader/AppShellHeader.mjs +29 -8
  157. package/esm/components/AppShell/AppShellHeader/AppShellHeader.mjs.map +1 -1
  158. package/esm/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.mjs +3 -2
  159. package/esm/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.mjs.map +1 -1
  160. package/esm/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.mjs +27 -16
  161. package/esm/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.mjs.map +1 -1
  162. package/esm/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.mjs +24 -16
  163. package/esm/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.mjs.map +1 -1
  164. package/esm/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.mjs +24 -16
  165. package/esm/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.mjs.map +1 -1
  166. package/esm/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.mjs +30 -19
  167. package/esm/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.mjs.map +1 -1
  168. package/esm/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.mjs +26 -0
  169. package/esm/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.mjs.map +1 -0
  170. package/esm/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.mjs +10 -0
  171. package/esm/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.mjs.map +1 -0
  172. package/esm/components/AppShell/AppShellMediaStyles/get-variables/get-variables.mjs +13 -5
  173. package/esm/components/AppShell/AppShellMediaStyles/get-variables/get-variables.mjs.map +1 -1
  174. package/esm/components/AppShell/AppShellNavbar/AppShellNavbar.mjs +29 -8
  175. package/esm/components/AppShell/AppShellNavbar/AppShellNavbar.mjs.map +1 -1
  176. package/esm/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.mjs +270 -0
  177. package/esm/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.mjs.map +1 -0
  178. package/esm/components/AppShell/use-app-shell-resize/clamp-resize-size.mjs +14 -0
  179. package/esm/components/AppShell/use-app-shell-resize/clamp-resize-size.mjs.map +1 -0
  180. package/esm/components/AppShell/use-app-shell-resize/resize-section-config.mjs +49 -0
  181. package/esm/components/AppShell/use-app-shell-resize/resize-section-config.mjs.map +1 -0
  182. package/esm/components/AppShell/use-app-shell-resize/safe-area-inset.mjs +12 -0
  183. package/esm/components/AppShell/use-app-shell-resize/safe-area-inset.mjs.map +1 -0
  184. package/esm/components/AppShell/use-app-shell-resize/use-app-shell-resize.mjs +127 -0
  185. package/esm/components/AppShell/use-app-shell-resize/use-app-shell-resize.mjs.map +1 -0
  186. package/esm/components/AppShell/use-resizing/use-resizing.mjs +21 -3
  187. package/esm/components/AppShell/use-resizing/use-resizing.mjs.map +1 -1
  188. package/esm/components/Checkbox/Checkbox.mjs +10 -2
  189. package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
  190. package/esm/components/Checkbox/Checkbox.module.mjs +1 -0
  191. package/esm/components/Checkbox/Checkbox.module.mjs.map +1 -1
  192. package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.mjs +10 -2
  193. package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.mjs.map +1 -1
  194. package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.mjs +1 -0
  195. package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.mjs.map +1 -1
  196. package/esm/components/Dialog/Dialog.mjs +0 -1
  197. package/esm/components/Dialog/Dialog.mjs.map +1 -1
  198. package/esm/components/Dialog/Dialog.module.mjs.map +1 -1
  199. package/esm/components/HoverCard/HoverCard.context.mjs.map +1 -1
  200. package/esm/components/HoverCard/HoverCard.mjs +34 -5
  201. package/esm/components/HoverCard/HoverCard.mjs.map +1 -1
  202. package/esm/components/HoverCard/HoverCardDropdown/HoverCardDropdown.mjs +13 -18
  203. package/esm/components/HoverCard/HoverCardDropdown/HoverCardDropdown.mjs.map +1 -1
  204. package/esm/components/HoverCard/HoverCardTarget/HoverCardTarget.mjs +7 -24
  205. package/esm/components/HoverCard/HoverCardTarget/HoverCardTarget.mjs.map +1 -1
  206. package/esm/components/HoverCard/use-hover-card.mjs +27 -13
  207. package/esm/components/HoverCard/use-hover-card.mjs.map +1 -1
  208. package/esm/components/Radio/Radio.mjs +10 -2
  209. package/esm/components/Radio/Radio.mjs.map +1 -1
  210. package/esm/components/Radio/Radio.module.mjs +1 -0
  211. package/esm/components/Radio/Radio.module.mjs.map +1 -1
  212. package/esm/components/Radio/RadioIndicator/RadioIndicator.mjs +10 -2
  213. package/esm/components/Radio/RadioIndicator/RadioIndicator.mjs.map +1 -1
  214. package/esm/components/Radio/RadioIndicator/RadioIndicator.module.mjs +1 -0
  215. package/esm/components/Radio/RadioIndicator/RadioIndicator.module.mjs.map +1 -1
  216. package/esm/components/Toggle/Toggle.mjs +80 -0
  217. package/esm/components/Toggle/Toggle.mjs.map +1 -0
  218. package/esm/components/Toggle/Toggle.module.mjs +7 -0
  219. package/esm/components/Toggle/Toggle.module.mjs.map +1 -0
  220. package/esm/components/Toolbar/Toolbar.context.mjs +8 -0
  221. package/esm/components/Toolbar/Toolbar.context.mjs.map +1 -0
  222. package/esm/components/Toolbar/Toolbar.mjs +107 -0
  223. package/esm/components/Toolbar/Toolbar.mjs.map +1 -0
  224. package/esm/components/Toolbar/Toolbar.module.mjs +12 -0
  225. package/esm/components/Toolbar/Toolbar.module.mjs.map +1 -0
  226. package/esm/components/Toolbar/ToolbarDivider/ToolbarDivider.mjs +31 -0
  227. package/esm/components/Toolbar/ToolbarDivider/ToolbarDivider.mjs.map +1 -0
  228. package/esm/components/Toolbar/ToolbarGroup/ToolbarGroup.mjs +31 -0
  229. package/esm/components/Toolbar/ToolbarGroup/ToolbarGroup.mjs.map +1 -0
  230. package/esm/components/Toolbar/ToolbarToggle/ToolbarToggle.mjs +47 -0
  231. package/esm/components/Toolbar/ToolbarToggle/ToolbarToggle.mjs.map +1 -0
  232. package/esm/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.context.mjs +8 -0
  233. package/esm/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.context.mjs.map +1 -0
  234. package/esm/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.mjs +61 -0
  235. package/esm/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.mjs.map +1 -0
  236. package/esm/components/Toolbar/ToolbarToggleItem/ToolbarToggleItem.mjs +51 -0
  237. package/esm/components/Toolbar/ToolbarToggleItem/ToolbarToggleItem.mjs.map +1 -0
  238. package/esm/components/Toolbar/use-toolbar-navigation.mjs +76 -0
  239. package/esm/components/Toolbar/use-toolbar-navigation.mjs.map +1 -0
  240. package/esm/components/Tooltip/Tooltip.mjs +9 -5
  241. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  242. package/esm/components/Tooltip/use-tooltip.mjs +7 -4
  243. package/esm/components/Tooltip/use-tooltip.mjs.map +1 -1
  244. package/esm/components/Tour/Tour.context.mjs +22 -0
  245. package/esm/components/Tour/Tour.context.mjs.map +1 -0
  246. package/esm/components/Tour/Tour.mjs +283 -0
  247. package/esm/components/Tour/Tour.mjs.map +1 -0
  248. package/esm/components/Tour/Tour.module.mjs +19 -0
  249. package/esm/components/Tour/Tour.module.mjs.map +1 -0
  250. package/esm/components/Tour/TourBeacon/TourBeacon.mjs +54 -0
  251. package/esm/components/Tour/TourBeacon/TourBeacon.mjs.map +1 -0
  252. package/esm/components/Tour/TourBeaconPositioned.mjs +46 -0
  253. package/esm/components/Tour/TourBeaconPositioned.mjs.map +1 -0
  254. package/esm/components/Tour/TourBody/TourBody.mjs +37 -0
  255. package/esm/components/Tour/TourBody/TourBody.mjs.map +1 -0
  256. package/esm/components/Tour/TourCloseButton/TourCloseButton.mjs +26 -0
  257. package/esm/components/Tour/TourCloseButton/TourCloseButton.mjs.map +1 -0
  258. package/esm/components/Tour/TourNavigation/TourNavigation.mjs +63 -0
  259. package/esm/components/Tour/TourNavigation/TourNavigation.mjs.map +1 -0
  260. package/esm/components/Tour/TourOverlay/TourOverlay.mjs +70 -0
  261. package/esm/components/Tour/TourOverlay/TourOverlay.mjs.map +1 -0
  262. package/esm/components/Tour/TourRoot/TourRoot.mjs +125 -0
  263. package/esm/components/Tour/TourRoot/TourRoot.mjs.map +1 -0
  264. package/esm/components/Tour/TourStep/TourStep.mjs +10 -0
  265. package/esm/components/Tour/TourStep/TourStep.mjs.map +1 -0
  266. package/esm/components/Tour/TourTitle/TourTitle.mjs +38 -0
  267. package/esm/components/Tour/TourTitle/TourTitle.mjs.map +1 -0
  268. package/esm/components/Tour/TourTooltip/TourTooltip.mjs +87 -0
  269. package/esm/components/Tour/TourTooltip/TourTooltip.mjs.map +1 -0
  270. package/esm/components/Tour/get-overlay-hit-path.mjs +17 -0
  271. package/esm/components/Tour/get-overlay-hit-path.mjs.map +1 -0
  272. package/esm/components/Tour/is-element-in-view.mjs +30 -0
  273. package/esm/components/Tour/is-element-in-view.mjs.map +1 -0
  274. package/esm/components/Tour/press-aware-auto-update.mjs +38 -0
  275. package/esm/components/Tour/press-aware-auto-update.mjs.map +1 -0
  276. package/esm/components/Tour/use-target-rect.mjs +59 -0
  277. package/esm/components/Tour/use-target-rect.mjs.map +1 -0
  278. package/esm/components/Tour/use-tooltip-auto-focus.mjs +34 -0
  279. package/esm/components/Tour/use-tooltip-auto-focus.mjs.map +1 -0
  280. package/esm/components/Tour/use-tour-state.mjs +102 -0
  281. package/esm/components/Tour/use-tour-state.mjs.map +1 -0
  282. package/esm/components/Tour/use-tour.mjs +155 -0
  283. package/esm/components/Tour/use-tour.mjs.map +1 -0
  284. package/esm/components/TreeSelect/TreeSelect.mjs +30 -17
  285. package/esm/components/TreeSelect/TreeSelect.mjs.map +1 -1
  286. package/esm/index.mjs +21 -2
  287. package/lib/components/ActionBar/ActionBar.d.ts +1 -1
  288. package/lib/components/AppShell/AppShell.context.d.ts +4 -0
  289. package/lib/components/AppShell/AppShell.d.ts +5 -3
  290. package/lib/components/AppShell/AppShell.types.d.ts +70 -0
  291. package/lib/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.d.ts +6 -1
  292. package/lib/components/AppShell/AppShellMediaStyles/assign-aside-variables/assign-aside-variables.d.ts +3 -1
  293. package/lib/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.d.ts +3 -1
  294. package/lib/components/AppShell/AppShellMediaStyles/assign-header-variables/assign-header-variables.d.ts +3 -1
  295. package/lib/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.d.ts +3 -1
  296. package/lib/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.d.ts +2 -0
  297. package/lib/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.d.ts +1 -0
  298. package/lib/components/AppShell/AppShellMediaStyles/get-variables/get-variables.d.ts +6 -1
  299. package/lib/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.d.ts +10 -0
  300. package/lib/components/AppShell/index.d.ts +3 -2
  301. package/lib/components/AppShell/use-app-shell-resize/clamp-resize-size.d.ts +9 -0
  302. package/lib/components/AppShell/use-app-shell-resize/resize-section-config.d.ts +29 -0
  303. package/lib/components/AppShell/use-app-shell-resize/safe-area-inset.d.ts +1 -0
  304. package/lib/components/AppShell/use-app-shell-resize/use-app-shell-resize.d.ts +2 -0
  305. package/lib/components/AppShell/use-resizing/use-resizing.d.ts +2 -1
  306. package/lib/components/Checkbox/Checkbox.d.ts +2 -2
  307. package/lib/components/Checkbox/CheckboxIndicator/CheckboxIndicator.d.ts +2 -2
  308. package/lib/components/HoverCard/HoverCard.context.d.ts +8 -4
  309. package/lib/components/HoverCard/HoverCard.d.ts +41 -0
  310. package/lib/components/HoverCard/index.d.ts +1 -1
  311. package/lib/components/HoverCard/use-hover-card.d.ts +11 -0
  312. package/lib/components/Radio/Radio.d.ts +2 -2
  313. package/lib/components/Radio/RadioIndicator/RadioIndicator.d.ts +2 -2
  314. package/lib/components/Toggle/Toggle.d.ts +73 -0
  315. package/lib/components/Toggle/index.d.ts +7 -0
  316. package/lib/components/Toolbar/Toolbar.context.d.ts +7 -0
  317. package/lib/components/Toolbar/Toolbar.d.ts +58 -0
  318. package/lib/components/Toolbar/ToolbarDivider/ToolbarDivider.d.ts +16 -0
  319. package/lib/components/Toolbar/ToolbarGroup/ToolbarGroup.d.ts +16 -0
  320. package/lib/components/Toolbar/ToolbarToggle/ToolbarToggle.d.ts +44 -0
  321. package/lib/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.context.d.ts +7 -0
  322. package/lib/components/Toolbar/ToolbarToggleGroup/ToolbarToggleGroup.d.ts +42 -0
  323. package/lib/components/Toolbar/ToolbarToggleItem/ToolbarToggleItem.d.ts +22 -0
  324. package/lib/components/Toolbar/index.d.ts +32 -0
  325. package/lib/components/Toolbar/use-toolbar-navigation.d.ts +11 -0
  326. package/lib/components/Tooltip/Tooltip.d.ts +2 -0
  327. package/lib/components/Tooltip/use-tooltip.d.ts +2 -0
  328. package/lib/components/Tour/Tour.context.d.ts +66 -0
  329. package/lib/components/Tour/Tour.d.ts +144 -0
  330. package/lib/components/Tour/TourBeacon/TourBeacon.d.ts +23 -0
  331. package/lib/components/Tour/TourBeaconPositioned.d.ts +13 -0
  332. package/lib/components/Tour/TourBody/TourBody.d.ts +19 -0
  333. package/lib/components/Tour/TourCloseButton/TourCloseButton.d.ts +12 -0
  334. package/lib/components/Tour/TourNavigation/TourNavigation.d.ts +11 -0
  335. package/lib/components/Tour/TourOverlay/TourOverlay.d.ts +22 -0
  336. package/lib/components/Tour/TourRoot/TourRoot.d.ts +72 -0
  337. package/lib/components/Tour/TourStep/TourStep.d.ts +30 -0
  338. package/lib/components/Tour/TourTitle/TourTitle.d.ts +19 -0
  339. package/lib/components/Tour/TourTooltip/TourTooltip.d.ts +29 -0
  340. package/lib/components/Tour/get-overlay-hit-path.d.ts +2 -0
  341. package/lib/components/Tour/index.d.ts +23 -0
  342. package/lib/components/Tour/is-element-in-view.d.ts +1 -0
  343. package/lib/components/Tour/press-aware-auto-update.d.ts +2 -0
  344. package/lib/components/Tour/use-target-rect.d.ts +13 -0
  345. package/lib/components/Tour/use-tooltip-auto-focus.d.ts +7 -0
  346. package/lib/components/Tour/use-tour-state.d.ts +23 -0
  347. package/lib/components/Tour/use-tour.d.ts +40 -0
  348. package/lib/components/TreeSelect/TreeSelect.d.ts +14 -0
  349. package/lib/components/TreeSelect/index.d.ts +2 -2
  350. package/lib/components/index.d.ts +3 -0
  351. package/package.json +5 -5
  352. package/styles/ActionBar.css +1 -0
  353. package/styles/ActionBar.layer.css +1 -0
  354. package/styles/AppShell.css +68 -0
  355. package/styles/AppShell.layer.css +68 -0
  356. package/styles/Checkbox.css +20 -0
  357. package/styles/Checkbox.layer.css +20 -0
  358. package/styles/CheckboxIndicator.css +16 -0
  359. package/styles/CheckboxIndicator.layer.css +16 -0
  360. package/styles/Dialog.css +1 -0
  361. package/styles/Dialog.layer.css +1 -0
  362. package/styles/Radio.css +10 -0
  363. package/styles/Radio.layer.css +10 -0
  364. package/styles/RadioIndicator.css +11 -0
  365. package/styles/RadioIndicator.layer.css +11 -0
  366. package/styles/Toggle.css +98 -0
  367. package/styles/Toggle.layer.css +99 -0
  368. package/styles/Toolbar.css +220 -0
  369. package/styles/Toolbar.layer.css +221 -0
  370. package/styles/Tour.css +127 -0
  371. package/styles/Tour.layer.css +128 -0
  372. package/styles.css +575 -0
  373. package/styles.layer.css +575 -0
@@ -3,10 +3,11 @@ import { keys } from "../../../../core/utils/keys/keys.mjs";
3
3
  import { rem } from "../../../../core/utils/units-converters/rem.mjs";
4
4
  import { getBreakpointValue } from "../../../../core/utils/get-breakpoint-value/get-breakpoint-value.mjs";
5
5
  import { getBaseSize } from "../get-base-size/get-base-size.mjs";
6
+ import { getResizedValue } from "../get-resized-value/get-resized-value.mjs";
6
7
  import { isPrimitiveSize } from "../is-primitive-size/is-primitive-size.mjs";
7
8
  import { isResponsiveSize } from "../is-responsive-size/is-responsive-size.mjs";
8
9
  //#region packages/@mantine/core/src/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.ts
9
- function assignNavbarVariables({ baseStyles, minMediaStyles, maxMediaStyles, navbar, theme, mode }) {
10
+ function assignNavbarVariables({ baseStyles, minMediaStyles, maxMediaStyles, navbar, theme, mode, resizedSize, resizable }) {
10
11
  const navbarWidth = navbar?.width;
11
12
  const collapsedNavbarTransform = "translateX(calc(var(--app-shell-navbar-width) * -1))";
12
13
  const collapsedNavbarTransformRtl = "translateX(var(--app-shell-navbar-width))";
@@ -15,27 +16,35 @@ function assignNavbarVariables({ baseStyles, minMediaStyles, maxMediaStyles, nav
15
16
  maxMediaStyles[navbar?.breakpoint]["--app-shell-navbar-offset"] = "0px";
16
17
  maxMediaStyles[navbar?.breakpoint]["--app-shell-navbar-width"] = "100%";
17
18
  if (mode === "static") maxMediaStyles[navbar?.breakpoint]["--app-shell-navbar-grid-width"] = "0px";
19
+ if (resizable) maxMediaStyles[navbar.breakpoint]["--app-shell-navbar-resize-handle-display"] = "none";
18
20
  }
19
- if (isPrimitiveSize(navbarWidth)) {
20
- const baseSize = rem(getBaseSize(navbarWidth));
21
- baseStyles["--app-shell-navbar-width"] = baseSize;
22
- baseStyles["--app-shell-navbar-offset"] = baseSize;
23
- if (mode === "static") baseStyles["--app-shell-navbar-grid-width"] = baseSize;
24
- }
25
- if (isResponsiveSize(navbarWidth)) {
26
- if (typeof navbarWidth.base !== "undefined") {
27
- baseStyles["--app-shell-navbar-width"] = rem(navbarWidth.base);
28
- baseStyles["--app-shell-navbar-offset"] = rem(navbarWidth.base);
29
- if (mode === "static") baseStyles["--app-shell-navbar-grid-width"] = rem(navbarWidth.base);
21
+ if (resizedSize !== void 0) {
22
+ const resizedValue = getResizedValue(resizedSize, "horizontal");
23
+ baseStyles["--app-shell-navbar-width"] = resizedValue;
24
+ baseStyles["--app-shell-navbar-offset"] = resizedValue;
25
+ if (mode === "static") baseStyles["--app-shell-navbar-grid-width"] = resizedValue;
26
+ } else {
27
+ if (isPrimitiveSize(navbarWidth)) {
28
+ const baseSize = rem(getBaseSize(navbarWidth));
29
+ baseStyles["--app-shell-navbar-width"] = baseSize;
30
+ baseStyles["--app-shell-navbar-offset"] = baseSize;
31
+ if (mode === "static") baseStyles["--app-shell-navbar-grid-width"] = baseSize;
30
32
  }
31
- keys(navbarWidth).forEach((key) => {
32
- if (key !== "base") {
33
- minMediaStyles[key] = minMediaStyles[key] || {};
34
- minMediaStyles[key]["--app-shell-navbar-width"] = rem(navbarWidth[key]);
35
- minMediaStyles[key]["--app-shell-navbar-offset"] = rem(navbarWidth[key]);
36
- if (mode === "static") minMediaStyles[key]["--app-shell-navbar-grid-width"] = rem(navbarWidth[key]);
33
+ if (isResponsiveSize(navbarWidth)) {
34
+ if (typeof navbarWidth.base !== "undefined") {
35
+ baseStyles["--app-shell-navbar-width"] = rem(navbarWidth.base);
36
+ baseStyles["--app-shell-navbar-offset"] = rem(navbarWidth.base);
37
+ if (mode === "static") baseStyles["--app-shell-navbar-grid-width"] = rem(navbarWidth.base);
37
38
  }
38
- });
39
+ keys(navbarWidth).forEach((key) => {
40
+ if (key !== "base") {
41
+ minMediaStyles[key] = minMediaStyles[key] || {};
42
+ minMediaStyles[key]["--app-shell-navbar-width"] = rem(navbarWidth[key]);
43
+ minMediaStyles[key]["--app-shell-navbar-offset"] = rem(navbarWidth[key]);
44
+ if (mode === "static") minMediaStyles[key]["--app-shell-navbar-grid-width"] = rem(navbarWidth[key]);
45
+ }
46
+ });
47
+ }
39
48
  }
40
49
  if (navbar?.breakpoint !== void 0 && mode === "static") {
41
50
  minMediaStyles[navbar.breakpoint] = minMediaStyles[navbar.breakpoint] || {};
@@ -55,6 +64,7 @@ function assignNavbarVariables({ baseStyles, minMediaStyles, maxMediaStyles, nav
55
64
  minMediaStyles[breakpointValue]["--app-shell-navbar-display"] = "none";
56
65
  minMediaStyles[breakpointValue]["--app-shell-main-column-start"] = "1";
57
66
  }
67
+ if (resizable) minMediaStyles[breakpointValue]["--app-shell-navbar-resize-handle-display"] = "none";
58
68
  }
59
69
  if (navbar?.collapsed?.mobile) {
60
70
  const breakpointValue = getBreakpointValue(navbar.breakpoint, theme.breakpoints) - .1;
@@ -64,6 +74,7 @@ function assignNavbarVariables({ baseStyles, minMediaStyles, maxMediaStyles, nav
64
74
  if (mode === "static") maxMediaStyles[breakpointValue]["--app-shell-navbar-grid-width"] = "0px";
65
75
  maxMediaStyles[breakpointValue]["--app-shell-navbar-transform"] = collapsedNavbarTransform;
66
76
  maxMediaStyles[breakpointValue]["--app-shell-navbar-transform-rtl"] = collapsedNavbarTransformRtl;
77
+ if (resizable) maxMediaStyles[breakpointValue]["--app-shell-navbar-resize-handle-display"] = "none";
67
78
  }
68
79
  }
69
80
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"assign-navbar-variables.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.ts"],"sourcesContent":["import { getBreakpointValue, keys, MantineTheme, rem } from '../../../../core';\nimport type { AppShellProps } from '../../AppShell';\nimport { getBaseSize } from '../get-base-size/get-base-size';\nimport type { CSSVariables, MediaQueryVariables } from '../get-variables/get-variables';\nimport { isPrimitiveSize } from '../is-primitive-size/is-primitive-size';\nimport { isResponsiveSize } from '../is-responsive-size/is-responsive-size';\n\ninterface AssignNavbarVariablesInput {\n baseStyles: CSSVariables;\n minMediaStyles: MediaQueryVariables;\n maxMediaStyles: MediaQueryVariables;\n navbar: AppShellProps['navbar'] | undefined;\n theme: MantineTheme;\n mode: 'fixed' | 'static';\n}\n\nexport function assignNavbarVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n navbar,\n theme,\n mode,\n}: AssignNavbarVariablesInput) {\n const navbarWidth = navbar?.width;\n const collapsedNavbarTransform = 'translateX(calc(var(--app-shell-navbar-width) * -1))';\n const collapsedNavbarTransformRtl = 'translateX(var(--app-shell-navbar-width))';\n\n if (navbar?.breakpoint !== undefined && !navbar?.collapsed?.mobile) {\n maxMediaStyles[navbar?.breakpoint] = maxMediaStyles[navbar?.breakpoint] || {};\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-offset'] = '0px';\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-width'] = '100%';\n if (mode === 'static') {\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-grid-width'] = '0px';\n }\n }\n\n if (isPrimitiveSize(navbarWidth)) {\n const baseSize = rem(getBaseSize(navbarWidth));\n baseStyles['--app-shell-navbar-width'] = baseSize;\n baseStyles['--app-shell-navbar-offset'] = baseSize;\n if (mode === 'static') {\n baseStyles['--app-shell-navbar-grid-width'] = baseSize;\n }\n }\n\n if (isResponsiveSize(navbarWidth)) {\n if (typeof navbarWidth.base !== 'undefined') {\n baseStyles['--app-shell-navbar-width'] = rem(navbarWidth.base);\n baseStyles['--app-shell-navbar-offset'] = rem(navbarWidth.base);\n if (mode === 'static') {\n baseStyles['--app-shell-navbar-grid-width'] = rem(navbarWidth.base);\n }\n }\n\n keys(navbarWidth).forEach((key) => {\n if (key !== 'base') {\n minMediaStyles[key] = minMediaStyles[key] || {};\n minMediaStyles[key]['--app-shell-navbar-width'] = rem(navbarWidth![key]);\n minMediaStyles[key]['--app-shell-navbar-offset'] = rem(navbarWidth![key]);\n if (mode === 'static') {\n minMediaStyles[key]['--app-shell-navbar-grid-width'] = rem(navbarWidth![key]);\n }\n }\n });\n }\n\n if (navbar?.breakpoint !== undefined && mode === 'static') {\n minMediaStyles[navbar.breakpoint] = minMediaStyles[navbar.breakpoint] || {};\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-position'] = 'sticky';\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-grid-row'] = '2';\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-grid-column'] = '1';\n minMediaStyles[navbar.breakpoint]['--app-shell-main-column-start'] = '2';\n }\n\n if (navbar?.collapsed?.desktop) {\n const breakpointValue = navbar!.breakpoint;\n minMediaStyles[breakpointValue] = minMediaStyles[breakpointValue] || {};\n minMediaStyles[breakpointValue]['--app-shell-navbar-transform'] = collapsedNavbarTransform;\n minMediaStyles[breakpointValue]['--app-shell-navbar-transform-rtl'] =\n collapsedNavbarTransformRtl;\n if (mode === 'fixed') {\n minMediaStyles[breakpointValue]['--app-shell-navbar-offset'] = '0px !important';\n } else {\n // In static mode, hide the element completely so grid column collapses\n minMediaStyles[breakpointValue]['--app-shell-navbar-width'] = '0px';\n minMediaStyles[breakpointValue]['--app-shell-navbar-display'] = 'none';\n minMediaStyles[breakpointValue]['--app-shell-main-column-start'] = '1';\n }\n }\n\n if (navbar?.collapsed?.mobile) {\n const breakpointValue = getBreakpointValue(navbar!.breakpoint, theme.breakpoints) - 0.1;\n maxMediaStyles[breakpointValue] = maxMediaStyles[breakpointValue] || {};\n maxMediaStyles[breakpointValue]['--app-shell-navbar-width'] = '100%';\n maxMediaStyles[breakpointValue]['--app-shell-navbar-offset'] = '0px';\n if (mode === 'static') {\n maxMediaStyles[breakpointValue]['--app-shell-navbar-grid-width'] = '0px';\n }\n maxMediaStyles[breakpointValue]['--app-shell-navbar-transform'] = collapsedNavbarTransform;\n maxMediaStyles[breakpointValue]['--app-shell-navbar-transform-rtl'] =\n collapsedNavbarTransformRtl;\n }\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,sBAAsB,EACpC,YACA,gBACA,gBACA,QACA,OACA,QAC6B;CAC7B,MAAM,cAAc,QAAQ;CAC5B,MAAM,2BAA2B;CACjC,MAAM,8BAA8B;CAEpC,IAAI,QAAQ,eAAe,KAAA,KAAa,CAAC,QAAQ,WAAW,QAAQ;EAClE,eAAe,QAAQ,cAAc,eAAe,QAAQ,eAAe,CAAC;EAC5E,eAAe,QAAQ,WAAW,CAAC,+BAA+B;EAClE,eAAe,QAAQ,WAAW,CA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1D;GAEL,eAAe,gBAAgB,CAAC,8BAA8B;GAC9D,eAAe,gBAAgB,CAAC,gCAAgC;GAChE,eAAe,gBAAgB,CAAC,mCAAmC;EACrE;CACF;CAEA,IAAI,QAAQ,WAAW,QAAQ;EAC7B,MAAM,kBAAkB,mBAAmB,OAAQ,YAAY,MAAM,WAAW,IAAI;EACpF,eAAe,mBAAmB,eAAe,oBAAoB,CAAC;EACtE,eAAe,gBAAgB,CAAC,8BAA8B;EAC9D,eAAe,gBAAgB,CAAC,+BAA+B;EAC/D,IAAI,SAAS,UACX,eAAe,gBAAgB,CAAC,mCAAmC;EAErE,eAAe,gBAAgB,CAAC,kCAAkC;EAClE,eAAe,gBAAgB,CAAC,sCAC9B;CACJ;AACF"}
1
+ {"version":3,"file":"assign-navbar-variables.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/assign-navbar-variables/assign-navbar-variables.ts"],"sourcesContent":["import { getBreakpointValue, keys, MantineTheme, rem } from '../../../../core';\nimport type { AppShellProps } from '../../AppShell';\nimport { getBaseSize } from '../get-base-size/get-base-size';\nimport { getResizedValue } from '../get-resized-value/get-resized-value';\nimport type { CSSVariables, MediaQueryVariables } from '../get-variables/get-variables';\nimport { isPrimitiveSize } from '../is-primitive-size/is-primitive-size';\nimport { isResponsiveSize } from '../is-responsive-size/is-responsive-size';\n\ninterface AssignNavbarVariablesInput {\n baseStyles: CSSVariables;\n minMediaStyles: MediaQueryVariables;\n maxMediaStyles: MediaQueryVariables;\n navbar: AppShellProps['navbar'] | undefined;\n theme: MantineTheme;\n mode: 'fixed' | 'static';\n resizedSize?: number;\n resizable?: boolean;\n}\n\nexport function assignNavbarVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n navbar,\n theme,\n mode,\n resizedSize,\n resizable,\n}: AssignNavbarVariablesInput) {\n const navbarWidth = navbar?.width;\n const collapsedNavbarTransform = 'translateX(calc(var(--app-shell-navbar-width) * -1))';\n const collapsedNavbarTransformRtl = 'translateX(var(--app-shell-navbar-width))';\n\n if (navbar?.breakpoint !== undefined && !navbar?.collapsed?.mobile) {\n maxMediaStyles[navbar?.breakpoint] = maxMediaStyles[navbar?.breakpoint] || {};\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-offset'] = '0px';\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-width'] = '100%';\n if (mode === 'static') {\n maxMediaStyles[navbar?.breakpoint]['--app-shell-navbar-grid-width'] = '0px';\n }\n if (resizable) {\n maxMediaStyles[navbar.breakpoint]['--app-shell-navbar-resize-handle-display'] = 'none';\n }\n }\n\n if (resizedSize !== undefined) {\n const resizedValue = getResizedValue(resizedSize, 'horizontal');\n baseStyles['--app-shell-navbar-width'] = resizedValue;\n baseStyles['--app-shell-navbar-offset'] = resizedValue;\n if (mode === 'static') {\n baseStyles['--app-shell-navbar-grid-width'] = resizedValue;\n }\n } else {\n if (isPrimitiveSize(navbarWidth)) {\n const baseSize = rem(getBaseSize(navbarWidth));\n baseStyles['--app-shell-navbar-width'] = baseSize;\n baseStyles['--app-shell-navbar-offset'] = baseSize;\n if (mode === 'static') {\n baseStyles['--app-shell-navbar-grid-width'] = baseSize;\n }\n }\n\n if (isResponsiveSize(navbarWidth)) {\n if (typeof navbarWidth.base !== 'undefined') {\n baseStyles['--app-shell-navbar-width'] = rem(navbarWidth.base);\n baseStyles['--app-shell-navbar-offset'] = rem(navbarWidth.base);\n if (mode === 'static') {\n baseStyles['--app-shell-navbar-grid-width'] = rem(navbarWidth.base);\n }\n }\n\n keys(navbarWidth).forEach((key) => {\n if (key !== 'base') {\n minMediaStyles[key] = minMediaStyles[key] || {};\n minMediaStyles[key]['--app-shell-navbar-width'] = rem(navbarWidth![key]);\n minMediaStyles[key]['--app-shell-navbar-offset'] = rem(navbarWidth![key]);\n if (mode === 'static') {\n minMediaStyles[key]['--app-shell-navbar-grid-width'] = rem(navbarWidth![key]);\n }\n }\n });\n }\n }\n\n if (navbar?.breakpoint !== undefined && mode === 'static') {\n minMediaStyles[navbar.breakpoint] = minMediaStyles[navbar.breakpoint] || {};\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-position'] = 'sticky';\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-grid-row'] = '2';\n minMediaStyles[navbar.breakpoint]['--app-shell-navbar-grid-column'] = '1';\n minMediaStyles[navbar.breakpoint]['--app-shell-main-column-start'] = '2';\n }\n\n if (navbar?.collapsed?.desktop) {\n const breakpointValue = navbar!.breakpoint;\n minMediaStyles[breakpointValue] = minMediaStyles[breakpointValue] || {};\n minMediaStyles[breakpointValue]['--app-shell-navbar-transform'] = collapsedNavbarTransform;\n minMediaStyles[breakpointValue]['--app-shell-navbar-transform-rtl'] =\n collapsedNavbarTransformRtl;\n if (mode === 'fixed') {\n minMediaStyles[breakpointValue]['--app-shell-navbar-offset'] = '0px !important';\n } else {\n // In static mode, hide the element completely so grid column collapses\n minMediaStyles[breakpointValue]['--app-shell-navbar-width'] = '0px';\n minMediaStyles[breakpointValue]['--app-shell-navbar-display'] = 'none';\n minMediaStyles[breakpointValue]['--app-shell-main-column-start'] = '1';\n }\n if (resizable) {\n minMediaStyles[breakpointValue]['--app-shell-navbar-resize-handle-display'] = 'none';\n }\n }\n\n if (navbar?.collapsed?.mobile) {\n const breakpointValue = getBreakpointValue(navbar!.breakpoint, theme.breakpoints) - 0.1;\n maxMediaStyles[breakpointValue] = maxMediaStyles[breakpointValue] || {};\n maxMediaStyles[breakpointValue]['--app-shell-navbar-width'] = '100%';\n maxMediaStyles[breakpointValue]['--app-shell-navbar-offset'] = '0px';\n if (mode === 'static') {\n maxMediaStyles[breakpointValue]['--app-shell-navbar-grid-width'] = '0px';\n }\n maxMediaStyles[breakpointValue]['--app-shell-navbar-transform'] = collapsedNavbarTransform;\n maxMediaStyles[breakpointValue]['--app-shell-navbar-transform-rtl'] =\n collapsedNavbarTransformRtl;\n if (resizable) {\n maxMediaStyles[breakpointValue]['--app-shell-navbar-resize-handle-display'] = 'none';\n }\n }\n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AAS,UACX,eAAe,IAAI,CAAC,mCAAmC,IAAI,YAAa,IAAI;IAEhF;GACF,CAAC;EACH;CACF;CAEA,IAAI,QAAQ,eAAe,KAAA,KAAa,SAAS,UAAU;EACzD,eAAe,OAAO,cAAc,eAAe,OAAO,eAAe,CAAC;EAC1E,eAAe,OAAO,WAAW,CAAC,iCAAiC;EACnE,eAAe,OAAO,WAAW,CAAC,iCAAiC;EACnE,eAAe,OAAO,WAAW,CAAC,oCAAoC;EACtE,eAAe,OAAO,WAAW,CAAC,mCAAmC;CACvE;CAEA,IAAI,QAAQ,WAAW,SAAS;EAC9B,MAAM,kBAAkB,OAAQ;EAChC,eAAe,mBAAmB,eAAe,oBAAoB,CAAC;EACtE,eAAe,gBAAgB,CAAC,kCAAkC;EAClE,eAAe,gBAAgB,CAAC,sCAC9B;EACF,IAAI,SAAS,SACX,eAAe,gBAAgB,CAAC,+BAA+B;OAC1D;GAEL,eAAe,gBAAgB,CAAC,8BAA8B;GAC9D,eAAe,gBAAgB,CAAC,gCAAgC;GAChE,eAAe,gBAAgB,CAAC,mCAAmC;EACrE;EACA,IAAI,WACF,eAAe,gBAAgB,CAAC,8CAA8C;CAElF;CAEA,IAAI,QAAQ,WAAW,QAAQ;EAC7B,MAAM,kBAAkB,mBAAmB,OAAQ,YAAY,MAAM,WAAW,IAAI;EACpF,eAAe,mBAAmB,eAAe,oBAAoB,CAAC;EACtE,eAAe,gBAAgB,CAAC,8BAA8B;EAC9D,eAAe,gBAAgB,CAAC,+BAA+B;EAC/D,IAAI,SAAS,UACX,eAAe,gBAAgB,CAAC,mCAAmC;EAErE,eAAe,gBAAgB,CAAC,kCAAkC;EAClE,eAAe,gBAAgB,CAAC,sCAC9B;EACF,IAAI,WACF,eAAe,gBAAgB,CAAC,8CAA8C;CAElF;AACF"}
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ //#region packages/@mantine/core/src/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.ts
3
+ function isNameCodeUnit(codeUnit) {
4
+ return codeUnit >= 128 || codeUnit === 45 || codeUnit === 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122;
5
+ }
6
+ function isDigit(codeUnit) {
7
+ return codeUnit >= 48 && codeUnit <= 57;
8
+ }
9
+ /** Serializes a string as a CSS identifier, same output as `CSS.escape`, works on the server */
10
+ function escapeCssId(value) {
11
+ let result = "";
12
+ for (let index = 0; index < value.length; index += 1) {
13
+ const codeUnit = value.charCodeAt(index);
14
+ const char = value.charAt(index);
15
+ if (codeUnit === 0) result += String.fromCharCode(65533);
16
+ else if (codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && isDigit(codeUnit) || index === 1 && isDigit(codeUnit) && value.charCodeAt(0) === 45) result += `\\${codeUnit.toString(16)} `;
17
+ else if (index === 0 && value.length === 1 && codeUnit === 45) result += `\\${char}`;
18
+ else if (isNameCodeUnit(codeUnit)) result += char;
19
+ else result += `\\${char}`;
20
+ }
21
+ return result;
22
+ }
23
+ //#endregion
24
+ export { escapeCssId };
25
+
26
+ //# sourceMappingURL=escape-css-id.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-css-id.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/escape-css-id/escape-css-id.ts"],"sourcesContent":["function isNameCodeUnit(codeUnit: number) {\n return (\n codeUnit >= 0x80 ||\n codeUnit === 0x2d ||\n codeUnit === 0x5f ||\n (codeUnit >= 0x30 && codeUnit <= 0x39) ||\n (codeUnit >= 0x41 && codeUnit <= 0x5a) ||\n (codeUnit >= 0x61 && codeUnit <= 0x7a)\n );\n}\n\nfunction isDigit(codeUnit: number) {\n return codeUnit >= 0x30 && codeUnit <= 0x39;\n}\n\n/** Serializes a string as a CSS identifier, same output as `CSS.escape`, works on the server */\nexport function escapeCssId(value: string) {\n let result = '';\n\n for (let index = 0; index < value.length; index += 1) {\n const codeUnit = value.charCodeAt(index);\n const char = value.charAt(index);\n\n if (codeUnit === 0) {\n result += String.fromCharCode(0xfffd);\n } else if (\n (codeUnit >= 0x1 && codeUnit <= 0x1f) ||\n codeUnit === 0x7f ||\n (index === 0 && isDigit(codeUnit)) ||\n (index === 1 && isDigit(codeUnit) && value.charCodeAt(0) === 0x2d)\n ) {\n result += `\\\\${codeUnit.toString(16)} `;\n } else if (index === 0 && value.length === 1 && codeUnit === 0x2d) {\n result += `\\\\${char}`;\n } else if (isNameCodeUnit(codeUnit)) {\n result += char;\n } else {\n result += `\\\\${char}`;\n }\n }\n\n return result;\n}\n"],"mappings":";;AAAA,SAAS,eAAe,UAAkB;CACxC,OACE,YAAY,OACZ,aAAa,MACb,aAAa,MACZ,YAAY,MAAQ,YAAY,MAChC,YAAY,MAAQ,YAAY,MAChC,YAAY,MAAQ,YAAY;AAErC;AAEA,SAAS,QAAQ,UAAkB;CACjC,OAAO,YAAY,MAAQ,YAAY;AACzC;;AAGA,SAAgB,YAAY,OAAe;CACzC,IAAI,SAAS;CAEb,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GAAG;EACpD,MAAM,WAAW,MAAM,WAAW,KAAK;EACvC,MAAM,OAAO,MAAM,OAAO,KAAK;EAE/B,IAAI,aAAa,GACf,UAAU,OAAO,aAAa,KAAM;OAC/B,IACJ,YAAY,KAAO,YAAY,MAChC,aAAa,OACZ,UAAU,KAAK,QAAQ,QAAQ,KAC/B,UAAU,KAAK,QAAQ,QAAQ,KAAK,MAAM,WAAW,CAAC,MAAM,IAE7D,UAAU,KAAK,SAAS,SAAS,EAAE,EAAE;OAChC,IAAI,UAAU,KAAK,MAAM,WAAW,KAAK,aAAa,IAC3D,UAAU,KAAK;OACV,IAAI,eAAe,QAAQ,GAChC,UAAU;OAEV,UAAU,KAAK;CAEnB;CAEA,OAAO;AACT"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { rem } from "../../../../core/utils/units-converters/rem.mjs";
3
+ //#region packages/@mantine/core/src/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.ts
4
+ function getResizedValue(size, axis) {
5
+ return `min(${rem(size)}, ${axis === "horizontal" ? "100vw" : "100dvh"})`;
6
+ }
7
+ //#endregion
8
+ export { getResizedValue };
9
+
10
+ //# sourceMappingURL=get-resized-value.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-resized-value.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/get-resized-value/get-resized-value.ts"],"sourcesContent":["import { rem } from '../../../../core';\n\nexport function getResizedValue(size: number, axis: 'horizontal' | 'vertical') {\n return `min(${rem(size)}, ${axis === 'horizontal' ? '100vw' : '100dvh'})`;\n}\n"],"mappings":";;;AAEA,SAAgB,gBAAgB,MAAc,MAAiC;CAC7E,OAAO,OAAO,IAAI,IAAI,EAAE,IAAI,SAAS,eAAe,UAAU,SAAS;AACzE"}
@@ -8,7 +8,7 @@ import { assignHeaderVariables } from "../assign-header-variables/assign-header-
8
8
  import { assignNavbarVariables } from "../assign-navbar-variables/assign-navbar-variables.mjs";
9
9
  import { assignPaddingVariables } from "../assign-padding-variables/assign-padding-variables.mjs";
10
10
  //#region packages/@mantine/core/src/components/AppShell/AppShellMediaStyles/get-variables/get-variables.ts
11
- function getVariables({ navbar, header, footer, aside, padding, theme, mode }) {
11
+ function getVariables({ navbar, header, footer, aside, padding, theme, mode, resize }) {
12
12
  const minMediaStyles = {};
13
13
  const maxMediaStyles = {};
14
14
  const baseStyles = {};
@@ -22,7 +22,9 @@ function getVariables({ navbar, header, footer, aside, padding, theme, mode }) {
22
22
  maxMediaStyles,
23
23
  navbar,
24
24
  theme,
25
- mode
25
+ mode,
26
+ resizedSize: resize?.sizes.navbar,
27
+ resizable: resize?.enabled.navbar
26
28
  });
27
29
  assignAsideVariables({
28
30
  baseStyles,
@@ -30,19 +32,25 @@ function getVariables({ navbar, header, footer, aside, padding, theme, mode }) {
30
32
  maxMediaStyles,
31
33
  aside,
32
34
  theme,
33
- mode
35
+ mode,
36
+ resizedSize: resize?.sizes.aside,
37
+ resizable: resize?.enabled.aside
34
38
  });
35
39
  assignHeaderVariables({
36
40
  baseStyles,
37
41
  minMediaStyles,
38
42
  header,
39
- mode
43
+ mode,
44
+ resizedSize: resize?.sizes.header,
45
+ resizable: resize?.enabled.header
40
46
  });
41
47
  assignFooterVariables({
42
48
  baseStyles,
43
49
  minMediaStyles,
44
50
  footer,
45
- mode
51
+ mode,
52
+ resizedSize: resize?.sizes.footer,
53
+ resizable: resize?.enabled.footer
46
54
  });
47
55
  assignPaddingVariables({
48
56
  baseStyles,
@@ -1 +1 @@
1
- {"version":3,"file":"get-variables.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/get-variables/get-variables.ts"],"sourcesContent":["import { em, getSortedBreakpoints, keys, MantineTheme } from '../../../../core';\nimport type { AppShellProps } from '../../AppShell';\nimport { assignAsideVariables } from '../assign-aside-variables/assign-aside-variables';\nimport { assignFooterVariables } from '../assign-footer-variables/assign-footer-variables';\nimport { assignHeaderVariables } from '../assign-header-variables/assign-header-variables';\nimport { assignNavbarVariables } from '../assign-navbar-variables/assign-navbar-variables';\nimport { assignPaddingVariables } from '../assign-padding-variables/assign-padding-variables';\n\nexport type CSSVariables = Record<`--${string}`, string | undefined>;\nexport type MediaQueryVariables = Record<string, Record<`--${string}`, string | undefined>>;\n\ninterface GetVariablesInput {\n navbar: AppShellProps['navbar'] | undefined;\n header: AppShellProps['header'] | undefined;\n footer: AppShellProps['footer'] | undefined;\n aside: AppShellProps['aside'] | undefined;\n padding: AppShellProps['padding'] | undefined;\n theme: MantineTheme;\n mode: 'fixed' | 'static';\n}\n\nexport function getVariables({\n navbar,\n header,\n footer,\n aside,\n padding,\n theme,\n mode,\n}: GetVariablesInput) {\n const minMediaStyles: MediaQueryVariables = {};\n const maxMediaStyles: MediaQueryVariables = {};\n const baseStyles: CSSVariables = {};\n\n // Set default main grid position in static mode\n if (mode === 'static') {\n baseStyles['--app-shell-main-grid-column'] = '1 / -1';\n baseStyles['--app-shell-main-grid-row'] = '2';\n }\n\n assignNavbarVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n navbar,\n theme,\n mode,\n });\n\n assignAsideVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n aside,\n theme,\n mode,\n });\n\n assignHeaderVariables({ baseStyles, minMediaStyles, header, mode });\n assignFooterVariables({ baseStyles, minMediaStyles, footer, mode });\n assignPaddingVariables({ baseStyles, minMediaStyles, padding });\n\n const minMedia = getSortedBreakpoints(keys(minMediaStyles), theme.breakpoints).map(\n (breakpoint) => ({\n query: `(min-width: ${em(breakpoint.px)})`,\n styles: minMediaStyles[breakpoint.value],\n })\n );\n\n const maxMedia = getSortedBreakpoints(keys(maxMediaStyles), theme.breakpoints).map(\n (breakpoint) => ({\n query: `(max-width: ${em(breakpoint.px)})`,\n styles: maxMediaStyles[breakpoint.value],\n })\n );\n\n const media = [...minMedia, ...maxMedia];\n\n return { baseStyles, media };\n}\n"],"mappings":";;;;;;;;;;AAqBA,SAAgB,aAAa,EAC3B,QACA,QACA,QACA,OACA,SACA,OACA,QACoB;CACpB,MAAM,iBAAsC,CAAC;CAC7C,MAAM,iBAAsC,CAAC;CAC7C,MAAM,aAA2B,CAAC;CAGlC,IAAI,SAAS,UAAU;EACrB,WAAW,kCAAkC;EAC7C,WAAW,+BAA+B;CAC5C;CAEA,sBAAsB;EACpB;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,qBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,sBAAsB;EAAE;EAAY;EAAgB;EAAQ;CAAK,CAAC;CAClE,sBAAsB;EAAE;EAAY;EAAgB;EAAQ;CAAK,CAAC;CAClE,uBAAuB;EAAE;EAAY;EAAgB;CAAQ,CAAC;CAE9D,MAAM,WAAW,qBAAqB,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,CAAC,KAC5E,gBAAgB;EACf,OAAO,eAAe,GAAG,WAAW,EAAE,EAAE;EACxC,QAAQ,eAAe,WAAW;CACpC,EACF;CAEA,MAAM,WAAW,qBAAqB,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,CAAC,KAC5E,gBAAgB;EACf,OAAO,eAAe,GAAG,WAAW,EAAE,EAAE;EACxC,QAAQ,eAAe,WAAW;CACpC,EACF;CAIA,OAAO;EAAE;EAAY,OAAA,CAFN,GAAG,UAAU,GAAG,QAEN;CAAE;AAC7B"}
1
+ {"version":3,"file":"get-variables.mjs","names":[],"sources":["../../../../../src/components/AppShell/AppShellMediaStyles/get-variables/get-variables.ts"],"sourcesContent":["import { em, getSortedBreakpoints, keys, MantineTheme } from '../../../../core';\nimport type { AppShellProps } from '../../AppShell';\nimport type { AppShellResizeSection, AppShellResizeSizes } from '../../AppShell.types';\nimport { assignAsideVariables } from '../assign-aside-variables/assign-aside-variables';\nimport { assignFooterVariables } from '../assign-footer-variables/assign-footer-variables';\nimport { assignHeaderVariables } from '../assign-header-variables/assign-header-variables';\nimport { assignNavbarVariables } from '../assign-navbar-variables/assign-navbar-variables';\nimport { assignPaddingVariables } from '../assign-padding-variables/assign-padding-variables';\n\nexport type CSSVariables = Record<`--${string}`, string | undefined>;\nexport type MediaQueryVariables = Record<string, Record<`--${string}`, string | undefined>>;\n\ninterface GetVariablesInput {\n navbar: AppShellProps['navbar'] | undefined;\n header: AppShellProps['header'] | undefined;\n footer: AppShellProps['footer'] | undefined;\n aside: AppShellProps['aside'] | undefined;\n padding: AppShellProps['padding'] | undefined;\n theme: MantineTheme;\n mode: 'fixed' | 'static';\n resize:\n | { sizes: AppShellResizeSizes; enabled: Partial<Record<AppShellResizeSection, boolean>> }\n | undefined;\n}\n\nexport function getVariables({\n navbar,\n header,\n footer,\n aside,\n padding,\n theme,\n mode,\n resize,\n}: GetVariablesInput) {\n const minMediaStyles: MediaQueryVariables = {};\n const maxMediaStyles: MediaQueryVariables = {};\n const baseStyles: CSSVariables = {};\n\n // Set default main grid position in static mode\n if (mode === 'static') {\n baseStyles['--app-shell-main-grid-column'] = '1 / -1';\n baseStyles['--app-shell-main-grid-row'] = '2';\n }\n\n assignNavbarVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n navbar,\n theme,\n mode,\n resizedSize: resize?.sizes.navbar,\n resizable: resize?.enabled.navbar,\n });\n\n assignAsideVariables({\n baseStyles,\n minMediaStyles,\n maxMediaStyles,\n aside,\n theme,\n mode,\n resizedSize: resize?.sizes.aside,\n resizable: resize?.enabled.aside,\n });\n\n assignHeaderVariables({\n baseStyles,\n minMediaStyles,\n header,\n mode,\n resizedSize: resize?.sizes.header,\n resizable: resize?.enabled.header,\n });\n assignFooterVariables({\n baseStyles,\n minMediaStyles,\n footer,\n mode,\n resizedSize: resize?.sizes.footer,\n resizable: resize?.enabled.footer,\n });\n assignPaddingVariables({ baseStyles, minMediaStyles, padding });\n\n const minMedia = getSortedBreakpoints(keys(minMediaStyles), theme.breakpoints).map(\n (breakpoint) => ({\n query: `(min-width: ${em(breakpoint.px)})`,\n styles: minMediaStyles[breakpoint.value],\n })\n );\n\n const maxMedia = getSortedBreakpoints(keys(maxMediaStyles), theme.breakpoints).map(\n (breakpoint) => ({\n query: `(max-width: ${em(breakpoint.px)})`,\n styles: maxMediaStyles[breakpoint.value],\n })\n );\n\n const media = [...minMedia, ...maxMedia];\n\n return { baseStyles, media };\n}\n"],"mappings":";;;;;;;;;;AAyBA,SAAgB,aAAa,EAC3B,QACA,QACA,QACA,OACA,SACA,OACA,MACA,UACoB;CACpB,MAAM,iBAAsC,CAAC;CAC7C,MAAM,iBAAsC,CAAC;CAC7C,MAAM,aAA2B,CAAC;CAGlC,IAAI,SAAS,UAAU;EACrB,WAAW,kCAAkC;EAC7C,WAAW,+BAA+B;CAC5C;CAEA,sBAAsB;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,aAAa,QAAQ,MAAM;EAC3B,WAAW,QAAQ,QAAQ;CAC7B,CAAC;CAED,qBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;EACA,aAAa,QAAQ,MAAM;EAC3B,WAAW,QAAQ,QAAQ;CAC7B,CAAC;CAED,sBAAsB;EACpB;EACA;EACA;EACA;EACA,aAAa,QAAQ,MAAM;EAC3B,WAAW,QAAQ,QAAQ;CAC7B,CAAC;CACD,sBAAsB;EACpB;EACA;EACA;EACA;EACA,aAAa,QAAQ,MAAM;EAC3B,WAAW,QAAQ,QAAQ;CAC7B,CAAC;CACD,uBAAuB;EAAE;EAAY;EAAgB;CAAQ,CAAC;CAE9D,MAAM,WAAW,qBAAqB,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,CAAC,KAC5E,gBAAgB;EACf,OAAO,eAAe,GAAG,WAAW,EAAE,EAAE;EACxC,QAAQ,eAAe,WAAW;CACpC,EACF;CAEA,MAAM,WAAW,qBAAqB,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,CAAC,KAC5E,gBAAgB;EACf,OAAO,eAAe,GAAG,WAAW,EAAE,EAAE;EACxC,QAAQ,eAAe,WAAW;CACpC,EACF;CAIA,OAAO;EAAE;EAAY,OAAA,CAFN,GAAG,UAAU,GAAG,QAEN;CAAE;AAC7B"}
@@ -3,26 +3,47 @@ import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs"
3
3
  import { factory } from "../../../core/factory/factory.mjs";
4
4
  import { Box } from "../../../core/Box/Box.mjs";
5
5
  import { useAppShellContext } from "../AppShell.context.mjs";
6
+ import { AppShellResizeHandle } from "../AppShellResizeHandle/AppShellResizeHandle.mjs";
6
7
  import AppShell_module_default from "../AppShell.module.mjs";
7
8
  import "react";
8
- import { jsx } from "react/jsx-runtime";
9
+ import { useId as useId$1 } from "@mantine/hooks";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
9
11
  //#region packages/@mantine/core/src/components/AppShell/AppShellNavbar/AppShellNavbar.tsx
10
12
  const AppShellNavbar = factory((_props) => {
11
13
  const { classNames, className, style, styles, unstyled, vars, withBorder, zIndex, mod, ...others } = useProps("AppShellNavbar", null, _props);
12
14
  const ctx = useAppShellContext();
15
+ const sectionId = useId$1(others.id);
13
16
  if (ctx.disabled) return null;
14
- return /* @__PURE__ */ jsx(Box, {
17
+ const isResizable = ctx.resize?.navbar.enabled ?? false;
18
+ const boxProps = ctx.getStyles("navbar", {
19
+ className,
20
+ classNames,
21
+ styles,
22
+ style
23
+ });
24
+ if (!isResizable) return /* @__PURE__ */ jsx(Box, {
15
25
  component: "nav",
16
26
  mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
17
- ...ctx.getStyles("navbar", {
18
- className,
19
- classNames,
20
- styles,
21
- style
22
- }),
27
+ ...boxProps,
23
28
  ...others,
24
29
  __vars: { "--app-shell-navbar-z-index": `calc(${zIndex ?? ctx.zIndex} + 1)` }
25
30
  });
31
+ const { children, dangerouslySetInnerHTML, ...rest } = others;
32
+ return /* @__PURE__ */ jsxs(Box, {
33
+ component: "nav",
34
+ mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
35
+ ...boxProps,
36
+ ...rest,
37
+ __vars: { "--app-shell-navbar-z-index": `calc(${zIndex ?? ctx.zIndex} + 1)` },
38
+ id: sectionId,
39
+ children: [dangerouslySetInnerHTML ? /* @__PURE__ */ jsx("div", {
40
+ style: { display: "contents" },
41
+ dangerouslySetInnerHTML
42
+ }) : children, /* @__PURE__ */ jsx(AppShellResizeHandle, {
43
+ section: "navbar",
44
+ sectionId
45
+ })]
46
+ });
26
47
  });
27
48
  AppShellNavbar.classes = AppShell_module_default;
28
49
  AppShellNavbar.displayName = "@mantine/core/AppShellNavbar";
@@ -1 +1 @@
1
- {"version":3,"file":"AppShellNavbar.mjs","names":["classes"],"sources":["../../../../src/components/AppShell/AppShellNavbar/AppShellNavbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n} from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\nimport type { AppShellCompoundProps } from '../AppShell.types';\nimport classes from '../AppShell.module.css';\n\nexport type AppShellNavbarStylesNames = 'navbar';\n\nexport interface AppShellNavbarProps\n extends\n BoxProps,\n AppShellCompoundProps,\n StylesApiProps<AppShellNavbarFactory>,\n ElementProps<'div'> {}\n\nexport type AppShellNavbarFactory = Factory<{\n props: AppShellNavbarProps;\n ref: HTMLElement;\n stylesNames: AppShellNavbarStylesNames;\n}>;\n\nexport const AppShellNavbar = factory<AppShellNavbarFactory>((_props) => {\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n withBorder,\n zIndex,\n mod,\n ...others\n } = useProps('AppShellNavbar', null, _props);\n\n const ctx = useAppShellContext();\n\n if (ctx.disabled) {\n return null;\n }\n\n return (\n <Box\n component=\"nav\"\n mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n {...ctx.getStyles('navbar', { className, classNames, styles, style })}\n {...others}\n __vars={{ '--app-shell-navbar-z-index': `calc(${zIndex ?? ctx.zIndex} + 1)` }}\n />\n );\n});\n\nAppShellNavbar.classes = classes;\nAppShellNavbar.displayName = '@mantine/core/AppShellNavbar';\n"],"mappings":";;;;;;;;;AA6BA,MAAa,iBAAiB,SAAgC,WAAW;CACvE,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,YACA,QACA,KACA,GAAG,WACD,SAAS,kBAAkB,MAAM,MAAM;CAE3C,MAAM,MAAM,mBAAmB;CAE/B,IAAI,IAAI,UACN,OAAO;CAGT,OACE,oBAAC,KAAD;EACE,WAAU;EACV,KAAK,CAAC,EAAE,eAAe,cAAc,IAAI,WAAW,GAAG,GAAG;EAC1D,GAAI,IAAI,UAAU,UAAU;GAAE;GAAW;GAAY;GAAQ;EAAM,CAAC;EACpE,GAAI;EACJ,QAAQ,EAAE,8BAA8B,QAAQ,UAAU,IAAI,OAAO,OAAO;CAC7E,CAAA;AAEL,CAAC;AAED,eAAe,UAAUA;AACzB,eAAe,cAAc"}
1
+ {"version":3,"file":"AppShellNavbar.mjs","names":["useId","classes"],"sources":["../../../../src/components/AppShell/AppShellNavbar/AppShellNavbar.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n} from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\nimport type { AppShellCompoundProps } from '../AppShell.types';\nimport { AppShellResizeHandle } from '../AppShellResizeHandle/AppShellResizeHandle';\nimport classes from '../AppShell.module.css';\n\nexport type AppShellNavbarStylesNames = 'navbar';\n\nexport interface AppShellNavbarProps\n extends\n BoxProps,\n AppShellCompoundProps,\n StylesApiProps<AppShellNavbarFactory>,\n ElementProps<'div'> {}\n\nexport type AppShellNavbarFactory = Factory<{\n props: AppShellNavbarProps;\n ref: HTMLElement;\n stylesNames: AppShellNavbarStylesNames;\n}>;\n\nexport const AppShellNavbar = factory<AppShellNavbarFactory>((_props) => {\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n withBorder,\n zIndex,\n mod,\n ...others\n } = useProps('AppShellNavbar', null, _props);\n\n const ctx = useAppShellContext();\n const sectionId = useId(others.id);\n\n if (ctx.disabled) {\n return null;\n }\n\n const isResizable = ctx.resize?.navbar.enabled ?? false;\n const boxProps = ctx.getStyles('navbar', { className, classNames, styles, style });\n\n if (!isResizable) {\n return (\n <Box\n component=\"nav\"\n mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n {...boxProps}\n {...others}\n __vars={{ '--app-shell-navbar-z-index': `calc(${zIndex ?? ctx.zIndex} + 1)` }}\n />\n );\n }\n\n const { children, dangerouslySetInnerHTML, ...rest } = others;\n\n return (\n <Box\n component=\"nav\"\n mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n {...boxProps}\n {...rest}\n __vars={{ '--app-shell-navbar-z-index': `calc(${zIndex ?? ctx.zIndex} + 1)` }}\n id={sectionId}\n >\n {dangerouslySetInnerHTML ? (\n <div style={{ display: 'contents' }} dangerouslySetInnerHTML={dangerouslySetInnerHTML} />\n ) : (\n children\n )}\n <AppShellResizeHandle section=\"navbar\" sectionId={sectionId} />\n </Box>\n );\n});\n\nAppShellNavbar.classes = classes;\nAppShellNavbar.displayName = '@mantine/core/AppShellNavbar';\n"],"mappings":";;;;;;;;;;;AA+BA,MAAa,iBAAiB,SAAgC,WAAW;CACvE,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,YACA,QACA,KACA,GAAG,WACD,SAAS,kBAAkB,MAAM,MAAM;CAE3C,MAAM,MAAM,mBAAmB;CAC/B,MAAM,YAAYA,QAAM,OAAO,EAAE;CAEjC,IAAI,IAAI,UACN,OAAO;CAGT,MAAM,cAAc,IAAI,QAAQ,OAAO,WAAW;CAClD,MAAM,WAAW,IAAI,UAAU,UAAU;EAAE;EAAW;EAAY;EAAQ;CAAM,CAAC;CAEjF,IAAI,CAAC,aACH,OACE,oBAAC,KAAD;EACE,WAAU;EACV,KAAK,CAAC,EAAE,eAAe,cAAc,IAAI,WAAW,GAAG,GAAG;EAC1D,GAAI;EACJ,GAAI;EACJ,QAAQ,EAAE,8BAA8B,QAAQ,UAAU,IAAI,OAAO,OAAO;CAC7E,CAAA;CAIL,MAAM,EAAE,UAAU,yBAAyB,GAAG,SAAS;CAEvD,OACE,qBAAC,KAAD;EACE,WAAU;EACV,KAAK,CAAC,EAAE,eAAe,cAAc,IAAI,WAAW,GAAG,GAAG;EAC1D,GAAI;EACJ,GAAI;EACJ,QAAQ,EAAE,8BAA8B,QAAQ,UAAU,IAAI,OAAO,OAAO;EAC5E,IAAI;EANN,UAAA,CAQG,0BACC,oBAAC,OAAD;GAAK,OAAO,EAAE,SAAS,WAAW;GAA4B;EAA0B,CAAA,IAExF,UAEF,oBAAC,sBAAD;GAAsB,SAAQ;GAAoB;EAAY,CAAA,CAC3D;;AAET,CAAC;AAED,eAAe,UAAUC;AACzB,eAAe,cAAc"}
@@ -0,0 +1,270 @@
1
+ "use client";
2
+ import { rem } from "../../../core/utils/units-converters/rem.mjs";
3
+ import { useMantineTheme } from "../../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.mjs";
4
+ import { Box } from "../../../core/Box/Box.mjs";
5
+ import { useDirection } from "../../../core/DirectionProvider/DirectionProvider.mjs";
6
+ import { useAppShellContext } from "../AppShell.context.mjs";
7
+ import { clampResizeSize, getCollapseState } from "../use-app-shell-resize/clamp-resize-size.mjs";
8
+ import { RESIZE_SECTIONS, getResizeDelta } from "../use-app-shell-resize/resize-section-config.mjs";
9
+ import { getSafeAreaInset } from "../use-app-shell-resize/safe-area-inset.mjs";
10
+ import { useRef, useState } from "react";
11
+ import { useIsomorphicEffect } from "@mantine/hooks";
12
+ import { jsx } from "react/jsx-runtime";
13
+ //#region packages/@mantine/core/src/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.tsx
14
+ const LABELS = {
15
+ navbar: "Resize navbar",
16
+ aside: "Resize aside",
17
+ header: "Resize header",
18
+ footer: "Resize footer"
19
+ };
20
+ const KEYBOARD_STEP = 10;
21
+ const KEYBOARD_SHIFT_STEP = 50;
22
+ const KEY_DELTAS = {
23
+ ArrowRight: {
24
+ deltaX: 1,
25
+ deltaY: 0
26
+ },
27
+ ArrowLeft: {
28
+ deltaX: -1,
29
+ deltaY: 0
30
+ },
31
+ ArrowDown: {
32
+ deltaX: 0,
33
+ deltaY: 1
34
+ },
35
+ ArrowUp: {
36
+ deltaX: 0,
37
+ deltaY: -1
38
+ }
39
+ };
40
+ function restoreBodyStyleProperty(property, value) {
41
+ if (value) document.body.style.setProperty(property, value);
42
+ else document.body.style.removeProperty(property);
43
+ }
44
+ function AppShellResizeHandle({ section, sectionId }) {
45
+ const ctx = useAppShellContext();
46
+ const controller = ctx.resize;
47
+ const handleRef = useRef(null);
48
+ const dragRef = useRef({
49
+ startSize: 0,
50
+ startX: 0,
51
+ startY: 0,
52
+ size: 0,
53
+ moved: false
54
+ });
55
+ const activePointerIdRef = useRef(null);
56
+ const abortRef = useRef(null);
57
+ const previousBodyStylesRef = useRef(null);
58
+ const { dir } = useDirection();
59
+ const theme = useMantineTheme();
60
+ const config = RESIZE_SECTIONS[section];
61
+ const options = controller?.options[section] ?? {};
62
+ const getViewportPx = () => config.axis === "horizontal" ? window.innerWidth : window.innerHeight;
63
+ const [viewportPx, setViewportPx] = useState(0);
64
+ const [measuredSize, setMeasuredSize] = useState(void 0);
65
+ const getViewportMax = () => getViewportPx() / theme.scale;
66
+ const measureSectionSize = (sectionElement) => {
67
+ const rect = sectionElement.getBoundingClientRect();
68
+ return ((config.axis === "horizontal" ? rect.width : rect.height) - getSafeAreaInset(sectionElement, config.safeAreaVariable)) / theme.scale;
69
+ };
70
+ const applyPreview = (size) => {
71
+ const root = ctx.rootRef.current;
72
+ if (!root) return;
73
+ const value = rem(size);
74
+ root.style.setProperty(config.sizeVariable, value);
75
+ if (ctx.resizeOffsets[section]) root.style.setProperty(config.offsetVariable, value);
76
+ if (ctx.mode === "static" && config.gridWidthVariable) root.style.setProperty(config.gridWidthVariable, value);
77
+ };
78
+ const clearPreview = () => {
79
+ const root = ctx.rootRef.current;
80
+ if (!root) return;
81
+ root.style.removeProperty(config.sizeVariable);
82
+ root.style.removeProperty(config.offsetVariable);
83
+ if (config.gridWidthVariable) root.style.removeProperty(config.gridWidthVariable);
84
+ };
85
+ const stopListeners = () => {
86
+ abortRef.current?.abort();
87
+ abortRef.current = null;
88
+ activePointerIdRef.current = null;
89
+ const previousBodyStyles = previousBodyStylesRef.current;
90
+ previousBodyStylesRef.current = null;
91
+ if (previousBodyStyles) {
92
+ restoreBodyStyleProperty("user-select", previousBodyStyles.userSelect);
93
+ restoreBodyStyleProperty("-webkit-user-select", previousBodyStyles.webkitUserSelect);
94
+ restoreBodyStyleProperty("cursor", previousBodyStyles.cursor);
95
+ }
96
+ };
97
+ const cancelResize = () => {
98
+ controller?.reportCollapse(section, getCollapseState(dragRef.current.startSize, options.collapseThreshold));
99
+ controller?.endResize(section, null);
100
+ };
101
+ const onPointerMove = (event) => {
102
+ if (event.pointerId !== activePointerIdRef.current) return;
103
+ dragRef.current.moved = true;
104
+ const delta = getResizeDelta({
105
+ section,
106
+ deltaX: event.clientX - dragRef.current.startX,
107
+ deltaY: event.clientY - dragRef.current.startY,
108
+ dir
109
+ }) / theme.scale;
110
+ const rawSize = dragRef.current.startSize + delta;
111
+ const size = clampResizeSize({
112
+ size: rawSize,
113
+ min: options.min,
114
+ max: options.max,
115
+ viewportMax: getViewportMax()
116
+ });
117
+ dragRef.current.size = size;
118
+ applyPreview(size);
119
+ handleRef.current?.setAttribute("aria-valuenow", String(Math.round(size)));
120
+ controller?.previewResize(section, size);
121
+ controller?.reportCollapse(section, getCollapseState(rawSize, options.collapseThreshold));
122
+ };
123
+ const onPointerUp = (event) => {
124
+ if (event.pointerId !== activePointerIdRef.current) return;
125
+ stopListeners();
126
+ if (!dragRef.current.moved) {
127
+ controller?.endResize(section, null);
128
+ return;
129
+ }
130
+ controller?.endResize(section, dragRef.current.size);
131
+ };
132
+ const onPointerCancel = (event) => {
133
+ if (event.pointerId !== activePointerIdRef.current) return;
134
+ stopListeners();
135
+ clearPreview();
136
+ cancelResize();
137
+ };
138
+ const onDragKeyDown = (event) => {
139
+ if (event.key !== "Escape") return;
140
+ event.preventDefault();
141
+ stopListeners();
142
+ clearPreview();
143
+ handleRef.current?.setAttribute("aria-valuenow", String(Math.round(dragRef.current.startSize)));
144
+ cancelResize();
145
+ };
146
+ const getCurrentSize = () => {
147
+ const size = controller?.[section].size;
148
+ if (size !== void 0) return size;
149
+ const sectionElement = handleRef.current?.parentElement;
150
+ if (!sectionElement) return 0;
151
+ return measureSectionSize(sectionElement);
152
+ };
153
+ const commitKeyboardSize = (size) => {
154
+ controller?.initCollapse(section, getCollapseState(getCurrentSize(), options.collapseThreshold));
155
+ controller?.reportCollapse(section, getCollapseState(size, options.collapseThreshold));
156
+ controller?.endResize(section, clampResizeSize({
157
+ size,
158
+ min: options.min,
159
+ max: options.max,
160
+ viewportMax: getViewportMax()
161
+ }));
162
+ };
163
+ const onKeyDown = (event) => {
164
+ const step = event.shiftKey ? KEYBOARD_SHIFT_STEP : KEYBOARD_STEP;
165
+ if (event.key === "Home") {
166
+ event.preventDefault();
167
+ commitKeyboardSize(options.min ?? 0);
168
+ return;
169
+ }
170
+ if (event.key === "End") {
171
+ event.preventDefault();
172
+ commitKeyboardSize(options.max ?? getViewportMax());
173
+ return;
174
+ }
175
+ const keyDelta = KEY_DELTAS[event.key];
176
+ if (!keyDelta) return;
177
+ const direction = getResizeDelta({
178
+ section,
179
+ ...keyDelta,
180
+ dir
181
+ });
182
+ if (direction === 0) return;
183
+ event.preventDefault();
184
+ commitKeyboardSize(getCurrentSize() + direction * step);
185
+ };
186
+ const onDoubleClick = () => {
187
+ clearPreview();
188
+ controller?.[section].reset();
189
+ };
190
+ const onPointerDown = (event) => {
191
+ if (event.button !== 0) return;
192
+ if (abortRef.current !== null) return;
193
+ const sectionElement = handleRef.current?.parentElement;
194
+ if (!sectionElement) return;
195
+ const startSize = measureSectionSize(sectionElement);
196
+ dragRef.current = {
197
+ startSize,
198
+ startX: event.clientX,
199
+ startY: event.clientY,
200
+ size: startSize,
201
+ moved: false
202
+ };
203
+ activePointerIdRef.current = event.pointerId;
204
+ controller?.initCollapse(section, getCollapseState(startSize, options.collapseThreshold));
205
+ const abortController = new AbortController();
206
+ abortRef.current = abortController;
207
+ const { signal } = abortController;
208
+ previousBodyStylesRef.current = {
209
+ userSelect: document.body.style.getPropertyValue("user-select"),
210
+ webkitUserSelect: document.body.style.getPropertyValue("-webkit-user-select"),
211
+ cursor: document.body.style.getPropertyValue("cursor")
212
+ };
213
+ document.body.style.setProperty("user-select", "none");
214
+ document.body.style.setProperty("-webkit-user-select", "none");
215
+ document.body.style.setProperty("cursor", config.axis === "horizontal" ? "col-resize" : "row-resize");
216
+ controller?.startResize(section);
217
+ document.addEventListener("pointermove", onPointerMove, { signal });
218
+ document.addEventListener("pointerup", onPointerUp, { signal });
219
+ document.addEventListener("pointercancel", onPointerCancel, { signal });
220
+ document.addEventListener("keydown", onDragKeyDown, { signal });
221
+ };
222
+ useIsomorphicEffect(() => {
223
+ if (controller && controller.activeSection !== section) clearPreview();
224
+ }, [controller?.activeSection, controller?.[section].size]);
225
+ useIsomorphicEffect(() => {
226
+ setViewportPx(getViewportPx());
227
+ const handleWindowResize = () => setViewportPx(getViewportPx());
228
+ window.addEventListener("resize", handleWindowResize);
229
+ return () => window.removeEventListener("resize", handleWindowResize);
230
+ }, [config.axis]);
231
+ useIsomorphicEffect(() => {
232
+ if (controller?.[section].size === void 0) setMeasuredSize(getCurrentSize());
233
+ }, [controller?.[section].size, viewportPx]);
234
+ useIsomorphicEffect(() => () => {
235
+ const wasDragging = abortRef.current !== null;
236
+ stopListeners();
237
+ clearPreview();
238
+ if (wasDragging) cancelResize();
239
+ }, []);
240
+ if (!controller?.[section].enabled) return null;
241
+ const viewportMax = viewportPx / theme.scale;
242
+ const effectiveMax = Math.min(options.max ?? viewportMax, viewportMax);
243
+ const committedSize = controller[section].size;
244
+ const currentValue = committedSize !== void 0 && viewportPx > 0 ? Math.min(committedSize, viewportMax) : committedSize ?? measuredSize;
245
+ return /* @__PURE__ */ jsx(Box, {
246
+ ref: handleRef,
247
+ role: "separator",
248
+ tabIndex: 0,
249
+ "aria-label": options.label ?? LABELS[section],
250
+ "aria-controls": sectionId,
251
+ "aria-orientation": config.orientation,
252
+ "aria-valuemin": options.min ?? 0,
253
+ "aria-valuemax": Math.round(effectiveMax),
254
+ "aria-valuenow": currentValue !== void 0 ? Math.round(currentValue) : void 0,
255
+ onPointerDown,
256
+ onKeyDown,
257
+ onDoubleClick,
258
+ mod: {
259
+ section,
260
+ orientation: config.orientation,
261
+ active: controller[section].active
262
+ },
263
+ ...ctx.getStyles("resizeHandle")
264
+ });
265
+ }
266
+ AppShellResizeHandle.displayName = "@mantine/core/AppShellResizeHandle";
267
+ //#endregion
268
+ export { AppShellResizeHandle };
269
+
270
+ //# sourceMappingURL=AppShellResizeHandle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShellResizeHandle.mjs","names":[],"sources":["../../../../src/components/AppShell/AppShellResizeHandle/AppShellResizeHandle.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { useIsomorphicEffect } from '@mantine/hooks';\nimport { Box, rem, useDirection, useMantineTheme } from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\nimport type { AppShellResizeSection } from '../AppShell.types';\nimport { clampResizeSize, getCollapseState } from '../use-app-shell-resize/clamp-resize-size';\nimport { getResizeDelta, RESIZE_SECTIONS } from '../use-app-shell-resize/resize-section-config';\nimport { getSafeAreaInset } from '../use-app-shell-resize/safe-area-inset';\n\ninterface AppShellResizeHandleProps {\n section: AppShellResizeSection;\n sectionId: string;\n}\n\nconst LABELS: Record<AppShellResizeSection, string> = {\n navbar: 'Resize navbar',\n aside: 'Resize aside',\n header: 'Resize header',\n footer: 'Resize footer',\n};\n\nconst KEYBOARD_STEP = 10;\nconst KEYBOARD_SHIFT_STEP = 50;\n\nconst KEY_DELTAS: Record<string, { deltaX: number; deltaY: number }> = {\n ArrowRight: { deltaX: 1, deltaY: 0 },\n ArrowLeft: { deltaX: -1, deltaY: 0 },\n ArrowDown: { deltaX: 0, deltaY: 1 },\n ArrowUp: { deltaX: 0, deltaY: -1 },\n};\n\ninterface PreviousBodyStyles {\n userSelect: string;\n webkitUserSelect: string;\n cursor: string;\n}\n\nfunction restoreBodyStyleProperty(property: string, value: string) {\n if (value) {\n document.body.style.setProperty(property, value);\n } else {\n document.body.style.removeProperty(property);\n }\n}\n\nexport function AppShellResizeHandle({ section, sectionId }: AppShellResizeHandleProps) {\n const ctx = useAppShellContext();\n const controller = ctx.resize;\n\n const handleRef = useRef<HTMLDivElement>(null);\n const dragRef = useRef({ startSize: 0, startX: 0, startY: 0, size: 0, moved: false });\n const activePointerIdRef = useRef<number | null>(null);\n const abortRef = useRef<AbortController | null>(null);\n const previousBodyStylesRef = useRef<PreviousBodyStyles | null>(null);\n const { dir } = useDirection();\n const theme = useMantineTheme();\n\n const config = RESIZE_SECTIONS[section];\n const options = controller?.options[section] ?? {};\n\n const getViewportPx = () =>\n config.axis === 'horizontal' ? window.innerWidth : window.innerHeight;\n\n const [viewportPx, setViewportPx] = useState(0);\n const [measuredSize, setMeasuredSize] = useState<number | undefined>(undefined);\n\n const getViewportMax = () => getViewportPx() / theme.scale;\n\n const measureSectionSize = (sectionElement: HTMLElement) => {\n const rect = sectionElement.getBoundingClientRect();\n const rawSize = config.axis === 'horizontal' ? rect.width : rect.height;\n const safeAreaInset = getSafeAreaInset(sectionElement, config.safeAreaVariable);\n return (rawSize - safeAreaInset) / theme.scale;\n };\n\n const applyPreview = (size: number) => {\n const root = ctx.rootRef.current;\n if (!root) {\n return;\n }\n\n const value = rem(size);\n root.style.setProperty(config.sizeVariable, value);\n\n if (ctx.resizeOffsets[section]) {\n root.style.setProperty(config.offsetVariable, value);\n }\n\n if (ctx.mode === 'static' && config.gridWidthVariable) {\n root.style.setProperty(config.gridWidthVariable, value);\n }\n };\n\n const clearPreview = () => {\n const root = ctx.rootRef.current;\n if (!root) {\n return;\n }\n\n root.style.removeProperty(config.sizeVariable);\n root.style.removeProperty(config.offsetVariable);\n if (config.gridWidthVariable) {\n root.style.removeProperty(config.gridWidthVariable);\n }\n };\n\n const stopListeners = () => {\n abortRef.current?.abort();\n abortRef.current = null;\n activePointerIdRef.current = null;\n\n const previousBodyStyles = previousBodyStylesRef.current;\n previousBodyStylesRef.current = null;\n if (previousBodyStyles) {\n restoreBodyStyleProperty('user-select', previousBodyStyles.userSelect);\n restoreBodyStyleProperty('-webkit-user-select', previousBodyStyles.webkitUserSelect);\n restoreBodyStyleProperty('cursor', previousBodyStyles.cursor);\n }\n };\n\n const cancelResize = () => {\n controller?.reportCollapse(\n section,\n getCollapseState(dragRef.current.startSize, options.collapseThreshold)\n );\n controller?.endResize(section, null);\n };\n\n const onPointerMove = (event: PointerEvent) => {\n if (event.pointerId !== activePointerIdRef.current) {\n return;\n }\n\n dragRef.current.moved = true;\n\n const delta =\n getResizeDelta({\n section,\n deltaX: event.clientX - dragRef.current.startX,\n deltaY: event.clientY - dragRef.current.startY,\n dir,\n }) / theme.scale;\n\n const rawSize = dragRef.current.startSize + delta;\n const size = clampResizeSize({\n size: rawSize,\n min: options.min,\n max: options.max,\n viewportMax: getViewportMax(),\n });\n\n dragRef.current.size = size;\n applyPreview(size);\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(size)));\n controller?.previewResize(section, size);\n controller?.reportCollapse(section, getCollapseState(rawSize, options.collapseThreshold));\n };\n\n const onPointerUp = (event: PointerEvent) => {\n if (event.pointerId !== activePointerIdRef.current) {\n return;\n }\n\n stopListeners();\n\n if (!dragRef.current.moved) {\n controller?.endResize(section, null);\n return;\n }\n\n controller?.endResize(section, dragRef.current.size);\n };\n\n const onPointerCancel = (event: PointerEvent) => {\n if (event.pointerId !== activePointerIdRef.current) {\n return;\n }\n\n stopListeners();\n clearPreview();\n cancelResize();\n };\n\n const onDragKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return;\n }\n\n event.preventDefault();\n stopListeners();\n clearPreview();\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(dragRef.current.startSize)));\n cancelResize();\n };\n\n const getCurrentSize = () => {\n const size = controller?.[section].size;\n if (size !== undefined) {\n return size;\n }\n\n const sectionElement = handleRef.current?.parentElement;\n if (!sectionElement) {\n return 0;\n }\n\n return measureSectionSize(sectionElement);\n };\n\n const commitKeyboardSize = (size: number) => {\n controller?.initCollapse(\n section,\n getCollapseState(getCurrentSize(), options.collapseThreshold)\n );\n controller?.reportCollapse(section, getCollapseState(size, options.collapseThreshold));\n controller?.endResize(\n section,\n clampResizeSize({\n size,\n min: options.min,\n max: options.max,\n viewportMax: getViewportMax(),\n })\n );\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const step = event.shiftKey ? KEYBOARD_SHIFT_STEP : KEYBOARD_STEP;\n\n if (event.key === 'Home') {\n event.preventDefault();\n commitKeyboardSize(options.min ?? 0);\n return;\n }\n\n if (event.key === 'End') {\n event.preventDefault();\n commitKeyboardSize(options.max ?? getViewportMax());\n return;\n }\n\n const keyDelta = KEY_DELTAS[event.key];\n if (!keyDelta) {\n return;\n }\n\n const direction = getResizeDelta({ section, ...keyDelta, dir });\n if (direction === 0) {\n return;\n }\n\n event.preventDefault();\n commitKeyboardSize(getCurrentSize() + direction * step);\n };\n\n const onDoubleClick = () => {\n clearPreview();\n controller?.[section].reset();\n };\n\n const onPointerDown = (event: React.PointerEvent<HTMLDivElement>) => {\n if (event.button !== 0) {\n return;\n }\n\n if (abortRef.current !== null) {\n return;\n }\n\n const sectionElement = handleRef.current?.parentElement;\n if (!sectionElement) {\n return;\n }\n\n const startSize = measureSectionSize(sectionElement);\n dragRef.current = {\n startSize,\n startX: event.clientX,\n startY: event.clientY,\n size: startSize,\n moved: false,\n };\n activePointerIdRef.current = event.pointerId;\n controller?.initCollapse(section, getCollapseState(startSize, options.collapseThreshold));\n\n const abortController = new AbortController();\n abortRef.current = abortController;\n const { signal } = abortController;\n\n previousBodyStylesRef.current = {\n userSelect: document.body.style.getPropertyValue('user-select'),\n webkitUserSelect: document.body.style.getPropertyValue('-webkit-user-select'),\n cursor: document.body.style.getPropertyValue('cursor'),\n };\n document.body.style.setProperty('user-select', 'none');\n document.body.style.setProperty('-webkit-user-select', 'none');\n document.body.style.setProperty(\n 'cursor',\n config.axis === 'horizontal' ? 'col-resize' : 'row-resize'\n );\n controller?.startResize(section);\n\n document.addEventListener('pointermove', onPointerMove, { signal });\n document.addEventListener('pointerup', onPointerUp, { signal });\n document.addEventListener('pointercancel', onPointerCancel, { signal });\n document.addEventListener('keydown', onDragKeyDown, { signal });\n };\n\n useIsomorphicEffect(() => {\n if (controller && controller.activeSection !== section) {\n clearPreview();\n }\n }, [controller?.activeSection, controller?.[section].size]);\n\n useIsomorphicEffect(() => {\n setViewportPx(getViewportPx());\n\n const handleWindowResize = () => setViewportPx(getViewportPx());\n window.addEventListener('resize', handleWindowResize);\n return () => window.removeEventListener('resize', handleWindowResize);\n }, [config.axis]);\n\n useIsomorphicEffect(() => {\n if (controller?.[section].size === undefined) {\n setMeasuredSize(getCurrentSize());\n }\n }, [controller?.[section].size, viewportPx]);\n\n useIsomorphicEffect(\n () => () => {\n const wasDragging = abortRef.current !== null;\n stopListeners();\n clearPreview();\n\n if (wasDragging) {\n cancelResize();\n }\n },\n []\n );\n\n if (!controller?.[section].enabled) {\n return null;\n }\n\n const viewportMax = viewportPx / theme.scale;\n const effectiveMax = Math.min(options.max ?? viewportMax, viewportMax);\n const committedSize = controller[section].size;\n const currentValue =\n committedSize !== undefined && viewportPx > 0\n ? Math.min(committedSize, viewportMax)\n : (committedSize ?? measuredSize);\n\n return (\n <Box\n ref={handleRef}\n role=\"separator\"\n tabIndex={0}\n aria-label={options.label ?? LABELS[section]}\n aria-controls={sectionId}\n aria-orientation={config.orientation}\n aria-valuemin={options.min ?? 0}\n aria-valuemax={Math.round(effectiveMax)}\n aria-valuenow={currentValue !== undefined ? Math.round(currentValue) : undefined}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n onDoubleClick={onDoubleClick}\n mod={{ section, orientation: config.orientation, active: controller[section].active }}\n {...ctx.getStyles('resizeHandle')}\n />\n );\n}\n\nAppShellResizeHandle.displayName = '@mantine/core/AppShellResizeHandle';\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,SAAgD;CACpD,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;AACV;AAEA,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;AAE5B,MAAM,aAAiE;CACrE,YAAY;EAAE,QAAQ;EAAG,QAAQ;CAAE;CACnC,WAAW;EAAE,QAAQ;EAAI,QAAQ;CAAE;CACnC,WAAW;EAAE,QAAQ;EAAG,QAAQ;CAAE;CAClC,SAAS;EAAE,QAAQ;EAAG,QAAQ;CAAG;AACnC;AAQA,SAAS,yBAAyB,U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