@gnome-ui/react 1.45.1 → 1.45.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 (574) hide show
  1. package/dist/components/AboutDialog/AboutDialog.cjs +1 -1
  2. package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
  3. package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
  4. package/dist/components/AboutDialog/AboutDialog.js +2 -3
  5. package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
  6. package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
  7. package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
  8. package/dist/components/AboutDialog.cjs +1 -1
  9. package/dist/components/ActionRow/ActionRow.cjs +1 -1
  10. package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
  11. package/dist/components/ActionRow/ActionRow.d.ts +1 -1
  12. package/dist/components/ActionRow/ActionRow.js +2 -2
  13. package/dist/components/ActionRow/ActionRow.js.map +1 -1
  14. package/dist/components/ActionRow.cjs +1 -1
  15. package/dist/components/Avatar/Avatar.cjs +1 -1
  16. package/dist/components/Avatar/Avatar.cjs.map +1 -1
  17. package/dist/components/Avatar/Avatar.d.ts +1 -1
  18. package/dist/components/Avatar/Avatar.js +2 -2
  19. package/dist/components/Avatar/Avatar.js.map +1 -1
  20. package/dist/components/Avatar.cjs +1 -1
  21. package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
  22. package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
  23. package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
  24. package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
  25. package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
  26. package/dist/components/AvatarRotator.cjs +1 -1
  27. package/dist/components/Badge/Badge.cjs +1 -1
  28. package/dist/components/Badge/Badge.cjs.map +1 -1
  29. package/dist/components/Badge/Badge.d.ts +1 -1
  30. package/dist/components/Badge/Badge.js +2 -2
  31. package/dist/components/Badge/Badge.js.map +1 -1
  32. package/dist/components/Badge.cjs +1 -1
  33. package/dist/components/Banner/Banner.cjs +1 -1
  34. package/dist/components/Banner/Banner.cjs.map +1 -1
  35. package/dist/components/Banner/Banner.d.ts +1 -1
  36. package/dist/components/Banner/Banner.js +34 -36
  37. package/dist/components/Banner/Banner.js.map +1 -1
  38. package/dist/components/Banner/Banner.module.css.cjs +1 -1
  39. package/dist/components/Banner/Banner.module.css.js +11 -12
  40. package/dist/components/Banner.cjs +1 -1
  41. package/dist/components/Bin/Bin.cjs +1 -1
  42. package/dist/components/Bin/Bin.cjs.map +1 -1
  43. package/dist/components/Bin/Bin.d.ts +1 -1
  44. package/dist/components/Bin/Bin.js +4 -6
  45. package/dist/components/Bin/Bin.js.map +1 -1
  46. package/dist/components/Bin.cjs +1 -1
  47. package/dist/components/Blockquote/Blockquote.cjs +1 -1
  48. package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
  49. package/dist/components/Blockquote/Blockquote.d.ts +1 -1
  50. package/dist/components/Blockquote/Blockquote.js +24 -26
  51. package/dist/components/Blockquote/Blockquote.js.map +1 -1
  52. package/dist/components/Blockquote.cjs +1 -1
  53. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  54. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  55. package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
  56. package/dist/components/BottomSheet/BottomSheet.js +2 -3
  57. package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
  58. package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
  59. package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
  60. package/dist/components/BottomSheet.cjs +1 -1
  61. package/dist/components/Box/Box.cjs +1 -1
  62. package/dist/components/Box/Box.cjs.map +1 -1
  63. package/dist/components/Box/Box.d.ts +1 -1
  64. package/dist/components/Box/Box.js +2 -2
  65. package/dist/components/Box/Box.js.map +1 -1
  66. package/dist/components/Box.cjs +1 -1
  67. package/dist/components/BoxedList/BoxedList.cjs +1 -1
  68. package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
  69. package/dist/components/BoxedList/BoxedList.d.ts +1 -1
  70. package/dist/components/BoxedList/BoxedList.js +2 -2
  71. package/dist/components/BoxedList/BoxedList.js.map +1 -1
  72. package/dist/components/BoxedList.cjs +1 -1
  73. package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
  74. package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
  75. package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
  76. package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
  77. package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
  78. package/dist/components/BreakpointBin.cjs +1 -1
  79. package/dist/components/Button/Button.cjs +1 -1
  80. package/dist/components/Button/Button.cjs.map +1 -1
  81. package/dist/components/Button/Button.js.map +1 -1
  82. package/dist/components/Button.cjs +1 -1
  83. package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
  84. package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
  85. package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
  86. package/dist/components/ButtonContent/ButtonContent.js +24 -26
  87. package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
  88. package/dist/components/ButtonContent.cjs +1 -1
  89. package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
  90. package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
  91. package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
  92. package/dist/components/ButtonRow/ButtonRow.js +22 -24
  93. package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
  94. package/dist/components/ButtonRow.cjs +1 -1
  95. package/dist/components/Card/Card.cjs +1 -1
  96. package/dist/components/Card/Card.cjs.map +1 -1
  97. package/dist/components/Card/Card.d.ts +1 -1
  98. package/dist/components/Card/Card.js +10 -12
  99. package/dist/components/Card/Card.js.map +1 -1
  100. package/dist/components/Card/Card.module.css.cjs +1 -1
  101. package/dist/components/Card/Card.module.css.js +4 -5
  102. package/dist/components/Card.cjs +1 -1
  103. package/dist/components/Carousel/Carousel.cjs +1 -1
  104. package/dist/components/Carousel/Carousel.cjs.map +1 -1
  105. package/dist/components/Carousel/Carousel.d.ts +3 -3
  106. package/dist/components/Carousel/Carousel.js +28 -34
  107. package/dist/components/Carousel/Carousel.js.map +1 -1
  108. package/dist/components/Carousel.cjs +1 -1
  109. package/dist/components/CheckRow/CheckRow.cjs +1 -1
  110. package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
  111. package/dist/components/CheckRow/CheckRow.d.ts +1 -1
  112. package/dist/components/CheckRow/CheckRow.js +7 -7
  113. package/dist/components/CheckRow/CheckRow.js.map +1 -1
  114. package/dist/components/CheckRow.cjs +1 -1
  115. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  116. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  117. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  118. package/dist/components/Checkbox/Checkbox.js +2 -2
  119. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  120. package/dist/components/Checkbox.cjs +1 -1
  121. package/dist/components/Chip/Chip.cjs +1 -1
  122. package/dist/components/Chip/Chip.cjs.map +1 -1
  123. package/dist/components/Chip/Chip.d.ts +1 -1
  124. package/dist/components/Chip/Chip.js +2 -2
  125. package/dist/components/Chip/Chip.js.map +1 -1
  126. package/dist/components/Chip.cjs +1 -1
  127. package/dist/components/Clamp/Clamp.cjs +1 -1
  128. package/dist/components/Clamp/Clamp.cjs.map +1 -1
  129. package/dist/components/Clamp/Clamp.d.ts +1 -1
  130. package/dist/components/Clamp/Clamp.js +9 -11
  131. package/dist/components/Clamp/Clamp.js.map +1 -1
  132. package/dist/components/Clamp.cjs +1 -1
  133. package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
  134. package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
  135. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
  136. package/dist/components/ColorPicker/ColorPicker.js +33 -37
  137. package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
  138. package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
  139. package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
  140. package/dist/components/ColorPicker.cjs +1 -1
  141. package/dist/components/ColumnView/ColumnView.cjs +1 -1
  142. package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
  143. package/dist/components/ColumnView/ColumnView.d.ts +1 -1
  144. package/dist/components/ColumnView/ColumnView.js +24 -28
  145. package/dist/components/ColumnView/ColumnView.js.map +1 -1
  146. package/dist/components/ColumnView.cjs +1 -1
  147. package/dist/components/ComboRow/ComboRow.cjs +1 -1
  148. package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
  149. package/dist/components/ComboRow/ComboRow.d.ts +1 -1
  150. package/dist/components/ComboRow/ComboRow.js +2 -2
  151. package/dist/components/ComboRow/ComboRow.js.map +1 -1
  152. package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
  153. package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
  154. package/dist/components/ComboRow.cjs +1 -1
  155. package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
  156. package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
  157. package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
  158. package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
  159. package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
  160. package/dist/components/ContributionGraph.cjs +1 -1
  161. package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
  162. package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
  163. package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
  164. package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
  165. package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
  166. package/dist/components/CountDownTimer.cjs +1 -1
  167. package/dist/components/Dialog/Dialog.cjs +1 -1
  168. package/dist/components/Dialog/Dialog.cjs.map +1 -1
  169. package/dist/components/Dialog/Dialog.d.ts +1 -1
  170. package/dist/components/Dialog/Dialog.js +2 -2
  171. package/dist/components/Dialog/Dialog.js.map +1 -1
  172. package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
  173. package/dist/components/Dialog/Dialog.module.css.js +8 -9
  174. package/dist/components/Dialog/dialogUtils.cjs +1 -1
  175. package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
  176. package/dist/components/Dialog/dialogUtils.js.map +1 -1
  177. package/dist/components/Dialog.cjs +1 -1
  178. package/dist/components/Drawer/Drawer.cjs +1 -1
  179. package/dist/components/Drawer/Drawer.cjs.map +1 -1
  180. package/dist/components/Drawer/Drawer.d.ts +1 -1
  181. package/dist/components/Drawer/Drawer.js +2 -2
  182. package/dist/components/Drawer/Drawer.js.map +1 -1
  183. package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
  184. package/dist/components/Drawer/Drawer.module.css.js +11 -12
  185. package/dist/components/Drawer.cjs +1 -1
  186. package/dist/components/Dropdown/Dropdown.cjs +1 -1
  187. package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
  188. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  189. package/dist/components/Dropdown/Dropdown.js +2 -2
  190. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  191. package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
  192. package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
  193. package/dist/components/Dropdown.cjs +1 -1
  194. package/dist/components/EntryRow/EntryRow.cjs +1 -1
  195. package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
  196. package/dist/components/EntryRow/EntryRow.d.ts +1 -1
  197. package/dist/components/EntryRow/EntryRow.js +2 -2
  198. package/dist/components/EntryRow/EntryRow.js.map +1 -1
  199. package/dist/components/EntryRow.cjs +1 -1
  200. package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
  201. package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
  202. package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
  203. package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
  204. package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
  205. package/dist/components/ExpanderRow.cjs +1 -1
  206. package/dist/components/Footer/Footer.cjs +1 -1
  207. package/dist/components/Footer/Footer.cjs.map +1 -1
  208. package/dist/components/Footer/Footer.d.ts +1 -1
  209. package/dist/components/Footer/Footer.js +22 -24
  210. package/dist/components/Footer/Footer.js.map +1 -1
  211. package/dist/components/Footer.cjs +1 -1
  212. package/dist/components/Frame/Frame.cjs +1 -1
  213. package/dist/components/Frame/Frame.cjs.map +1 -1
  214. package/dist/components/Frame/Frame.d.ts +1 -1
  215. package/dist/components/Frame/Frame.js +5 -7
  216. package/dist/components/Frame/Frame.js.map +1 -1
  217. package/dist/components/Frame.cjs +1 -1
  218. package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
  219. package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
  220. package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
  221. package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
  222. package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
  223. package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
  224. package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
  225. package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
  226. package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
  227. package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
  228. package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
  229. package/dist/components/HeaderBar/HeaderBar.js +26 -28
  230. package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
  231. package/dist/components/HeaderBar.cjs +1 -1
  232. package/dist/components/Icon/Icon.cjs +1 -1
  233. package/dist/components/Icon/Icon.cjs.map +1 -1
  234. package/dist/components/Icon/Icon.d.ts +1 -1
  235. package/dist/components/Icon/Icon.js +2 -2
  236. package/dist/components/Icon/Icon.js.map +1 -1
  237. package/dist/components/Icon.cjs +1 -1
  238. package/dist/components/IconButton/IconButton.cjs +1 -1
  239. package/dist/components/IconButton/IconButton.cjs.map +1 -1
  240. package/dist/components/IconButton/IconButton.js +4 -4
  241. package/dist/components/IconButton/IconButton.js.map +1 -1
  242. package/dist/components/IconButton.cjs +1 -1
  243. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
  244. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
  245. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
  246. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
  247. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
  248. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
  249. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
  250. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
  251. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
  252. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
  253. package/dist/components/InlineViewSwitcher.cjs +1 -1
  254. package/dist/components/Link/Link.cjs +1 -1
  255. package/dist/components/Link/Link.cjs.map +1 -1
  256. package/dist/components/Link/Link.d.ts +1 -1
  257. package/dist/components/Link/Link.js +2 -2
  258. package/dist/components/Link/Link.js.map +1 -1
  259. package/dist/components/Link.cjs +1 -1
  260. package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
  261. package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
  262. package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
  263. package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
  264. package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
  265. package/dist/components/LinkedGroup.cjs +1 -1
  266. package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
  267. package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
  268. package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
  269. package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
  270. package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
  271. package/dist/components/NavigationSplitView.cjs +1 -1
  272. package/dist/components/NavigationView/NavigationView.cjs +1 -1
  273. package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
  274. package/dist/components/NavigationView/NavigationView.d.ts +2 -2
  275. package/dist/components/NavigationView/NavigationView.js +3 -4
  276. package/dist/components/NavigationView/NavigationView.js.map +1 -1
  277. package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
  278. package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
  279. package/dist/components/NavigationView.cjs +1 -1
  280. package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
  281. package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
  282. package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
  283. package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
  284. package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
  285. package/dist/components/OverlaySplitView.cjs +1 -1
  286. package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
  287. package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
  288. package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
  289. package/dist/components/PasswordEntryRow/PasswordEntryRow.js +2 -2
  290. package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
  291. package/dist/components/PasswordEntryRow.cjs +1 -1
  292. package/dist/components/PathBar/PathBar.cjs +1 -1
  293. package/dist/components/PathBar/PathBar.cjs.map +1 -1
  294. package/dist/components/PathBar/PathBar.d.ts +1 -1
  295. package/dist/components/PathBar/PathBar.js +48 -50
  296. package/dist/components/PathBar/PathBar.js.map +1 -1
  297. package/dist/components/PathBar.cjs +1 -1
  298. package/dist/components/Popover/Popover.cjs +1 -1
  299. package/dist/components/Popover/Popover.cjs.map +1 -1
  300. package/dist/components/Popover/Popover.d.ts +1 -1
  301. package/dist/components/Popover/Popover.js +5 -5
  302. package/dist/components/Popover/Popover.js.map +1 -1
  303. package/dist/components/Popover.cjs +1 -1
  304. package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
  305. package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
  306. package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
  307. package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
  308. package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
  309. package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
  310. package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
  311. package/dist/components/PreferencesDialog.cjs +1 -1
  312. package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
  313. package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
  314. package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
  315. package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
  316. package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
  317. package/dist/components/PreferencesGroup.cjs +1 -1
  318. package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
  319. package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
  320. package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
  321. package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
  322. package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
  323. package/dist/components/PreferencesPage.cjs +1 -1
  324. package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
  325. package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
  326. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
  327. package/dist/components/ProgressBar/ProgressBar.js +2 -2
  328. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  329. package/dist/components/ProgressBar.cjs +1 -1
  330. package/dist/components/RadioButton/RadioButton.cjs +1 -1
  331. package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
  332. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  333. package/dist/components/RadioButton/RadioButton.js +5 -7
  334. package/dist/components/RadioButton/RadioButton.js.map +1 -1
  335. package/dist/components/RadioButton.cjs +1 -1
  336. package/dist/components/SearchBar/SearchBar.cjs +1 -1
  337. package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
  338. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  339. package/dist/components/SearchBar/SearchBar.js +2 -2
  340. package/dist/components/SearchBar/SearchBar.js.map +1 -1
  341. package/dist/components/SearchBar.cjs +1 -1
  342. package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
  343. package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
  344. package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
  345. package/dist/components/SegmentedBar.cjs +1 -1
  346. package/dist/components/Separator/Separator.cjs +1 -1
  347. package/dist/components/Separator/Separator.cjs.map +1 -1
  348. package/dist/components/Separator/Separator.d.ts +1 -1
  349. package/dist/components/Separator/Separator.js +2 -2
  350. package/dist/components/Separator/Separator.js.map +1 -1
  351. package/dist/components/Separator.cjs +1 -1
  352. package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
  353. package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
  354. package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
  355. package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
  356. package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
  357. package/dist/components/ShortcutLabel.cjs +1 -1
  358. package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
  359. package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
  360. package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
  361. package/dist/components/ShortcutsDialog/ShortcutsDialog.js +2 -3
  362. package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
  363. package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
  364. package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
  365. package/dist/components/ShortcutsDialog.cjs +1 -1
  366. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  367. package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
  368. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  369. package/dist/components/Sidebar/Sidebar.js +2 -3
  370. package/dist/components/Sidebar/Sidebar.js.map +1 -1
  371. package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
  372. package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
  373. package/dist/components/Sidebar/SidebarItem.cjs +1 -1
  374. package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
  375. package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
  376. package/dist/components/Sidebar/SidebarItem.js +16 -16
  377. package/dist/components/Sidebar/SidebarItem.js.map +1 -1
  378. package/dist/components/Sidebar/SidebarSection.cjs +1 -1
  379. package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
  380. package/dist/components/Sidebar/SidebarSection.js.map +1 -1
  381. package/dist/components/Sidebar.cjs +1 -1
  382. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  383. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  384. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  385. package/dist/components/Skeleton/Skeleton.js +9 -10
  386. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  387. package/dist/components/Skeleton.cjs +1 -1
  388. package/dist/components/Slider/Slider.cjs +1 -1
  389. package/dist/components/Slider/Slider.cjs.map +1 -1
  390. package/dist/components/Slider/Slider.d.ts +1 -1
  391. package/dist/components/Slider/Slider.js +2 -2
  392. package/dist/components/Slider/Slider.js.map +1 -1
  393. package/dist/components/Slider.cjs +1 -1
  394. package/dist/components/SpinButton/SpinButton.cjs +1 -1
  395. package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
  396. package/dist/components/SpinButton/SpinButton.d.ts +1 -1
  397. package/dist/components/SpinButton/SpinButton.js +2 -2
  398. package/dist/components/SpinButton/SpinButton.js.map +1 -1
  399. package/dist/components/SpinButton.cjs +1 -1
  400. package/dist/components/SpinRow/SpinRow.cjs +1 -1
  401. package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
  402. package/dist/components/SpinRow/SpinRow.d.ts +1 -1
  403. package/dist/components/SpinRow/SpinRow.js +2 -2
  404. package/dist/components/SpinRow/SpinRow.js.map +1 -1
  405. package/dist/components/SpinRow.cjs +1 -1
  406. package/dist/components/Spinner/Spinner.cjs +1 -1
  407. package/dist/components/Spinner/Spinner.cjs.map +1 -1
  408. package/dist/components/Spinner/Spinner.d.ts +1 -1
  409. package/dist/components/Spinner/Spinner.js +2 -2
  410. package/dist/components/Spinner/Spinner.js.map +1 -1
  411. package/dist/components/Spinner.cjs +1 -1
  412. package/dist/components/SplitButton/SplitButton.cjs +1 -1
  413. package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
  414. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  415. package/dist/components/SplitButton/SplitButton.js +2 -2
  416. package/dist/components/SplitButton/SplitButton.js.map +1 -1
  417. package/dist/components/SplitButton.cjs +1 -1
  418. package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
  419. package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
  420. package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
  421. package/dist/components/StatusBadge/StatusBadge.js +9 -11
  422. package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
  423. package/dist/components/StatusBadge.cjs +1 -1
  424. package/dist/components/StatusPage/StatusPage.cjs +1 -1
  425. package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
  426. package/dist/components/StatusPage/StatusPage.d.ts +1 -1
  427. package/dist/components/StatusPage/StatusPage.js +2 -2
  428. package/dist/components/StatusPage/StatusPage.js.map +1 -1
  429. package/dist/components/StatusPage.cjs +1 -1
  430. package/dist/components/Switch/Switch.cjs +1 -1
  431. package/dist/components/Switch/Switch.cjs.map +1 -1
  432. package/dist/components/Switch/Switch.d.ts +1 -1
  433. package/dist/components/Switch/Switch.js +6 -8
  434. package/dist/components/Switch/Switch.js.map +1 -1
  435. package/dist/components/Switch.cjs +1 -1
  436. package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
  437. package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
  438. package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
  439. package/dist/components/SwitchRow/SwitchRow.js +7 -7
  440. package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
  441. package/dist/components/SwitchRow.cjs +1 -1
  442. package/dist/components/Tabs/TabBar.cjs +1 -1
  443. package/dist/components/Tabs/TabBar.cjs.map +1 -1
  444. package/dist/components/Tabs/TabBar.d.ts +1 -1
  445. package/dist/components/Tabs/TabBar.js +2 -2
  446. package/dist/components/Tabs/TabBar.js.map +1 -1
  447. package/dist/components/Tabs/TabItem.cjs +1 -1
  448. package/dist/components/Tabs/TabItem.cjs.map +1 -1
  449. package/dist/components/Tabs/TabItem.js.map +1 -1
  450. package/dist/components/Tabs/TabPanel.cjs +1 -1
  451. package/dist/components/Tabs/TabPanel.cjs.map +1 -1
  452. package/dist/components/Tabs/TabPanel.d.ts +1 -1
  453. package/dist/components/Tabs/TabPanel.js +8 -10
  454. package/dist/components/Tabs/TabPanel.js.map +1 -1
  455. package/dist/components/Tabs.cjs +1 -1
  456. package/dist/components/TerminalView/TerminalView.cjs +1 -1
  457. package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
  458. package/dist/components/TerminalView/TerminalView.d.ts +1 -1
  459. package/dist/components/TerminalView/TerminalView.js +2 -2
  460. package/dist/components/TerminalView/TerminalView.js.map +1 -1
  461. package/dist/components/TerminalView.cjs +1 -1
  462. package/dist/components/Text/Text.cjs +1 -1
  463. package/dist/components/Text/Text.cjs.map +1 -1
  464. package/dist/components/Text/Text.d.ts +1 -1
  465. package/dist/components/Text/Text.js +10 -13
  466. package/dist/components/Text/Text.js.map +1 -1
  467. package/dist/components/Text/Text.module.css.cjs +1 -1
  468. package/dist/components/Text/Text.module.css.js +9 -10
  469. package/dist/components/Text.cjs +1 -1
  470. package/dist/components/TextField/TextField.cjs +1 -1
  471. package/dist/components/TextField/TextField.cjs.map +1 -1
  472. package/dist/components/TextField/TextField.d.ts +1 -1
  473. package/dist/components/TextField/TextField.js +2 -2
  474. package/dist/components/TextField/TextField.js.map +1 -1
  475. package/dist/components/TextField.cjs +1 -1
  476. package/dist/components/Timeline/Timeline.cjs +1 -1
  477. package/dist/components/Timeline/Timeline.cjs.map +1 -1
  478. package/dist/components/Timeline/Timeline.d.ts +1 -1
  479. package/dist/components/Timeline/Timeline.js +2 -2
  480. package/dist/components/Timeline/Timeline.js.map +1 -1
  481. package/dist/components/Timeline.cjs +1 -1
  482. package/dist/components/Toast/Toast.cjs +1 -1
  483. package/dist/components/Toast/Toast.cjs.map +1 -1
  484. package/dist/components/Toast/Toast.d.ts +1 -1
  485. package/dist/components/Toast/Toast.js +2 -2
  486. package/dist/components/Toast/Toast.js.map +1 -1
  487. package/dist/components/Toast/Toast.module.css.cjs +1 -1
  488. package/dist/components/Toast/Toast.module.css.js +10 -11
  489. package/dist/components/Toast/Toaster.cjs +1 -1
  490. package/dist/components/Toast/Toaster.cjs.map +1 -1
  491. package/dist/components/Toast/Toaster.d.ts +1 -1
  492. package/dist/components/Toast/Toaster.js +2 -2
  493. package/dist/components/Toast/Toaster.js.map +1 -1
  494. package/dist/components/Toast.cjs +1 -1
  495. package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
  496. package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
  497. package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
  498. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  499. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
  500. package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
  501. package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
  502. package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
  503. package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
  504. package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
  505. package/dist/components/ToggleGroup.cjs +1 -1
  506. package/dist/components/Toolbar/Spacer.cjs +1 -1
  507. package/dist/components/Toolbar/Spacer.cjs.map +1 -1
  508. package/dist/components/Toolbar/Spacer.d.ts +1 -1
  509. package/dist/components/Toolbar/Spacer.js +5 -7
  510. package/dist/components/Toolbar/Spacer.js.map +1 -1
  511. package/dist/components/Toolbar/Toolbar.cjs +1 -1
  512. package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
  513. package/dist/components/Toolbar/Toolbar.d.ts +1 -1
  514. package/dist/components/Toolbar/Toolbar.js +5 -7
  515. package/dist/components/Toolbar/Toolbar.js.map +1 -1
  516. package/dist/components/Toolbar.cjs +1 -1
  517. package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
  518. package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
  519. package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
  520. package/dist/components/ToolbarView/ToolbarView.js +18 -20
  521. package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
  522. package/dist/components/ToolbarView.cjs +1 -1
  523. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  524. package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
  525. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  526. package/dist/components/Tooltip/Tooltip.js +2 -2
  527. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  528. package/dist/components/Tooltip.cjs +1 -1
  529. package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
  530. package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
  531. package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
  532. package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
  533. package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
  534. package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
  535. package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
  536. package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
  537. package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
  538. package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
  539. package/dist/components/ViewSwitcher.cjs +1 -1
  540. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
  541. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
  542. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
  543. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
  544. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
  545. package/dist/components/ViewSwitcherBar.cjs +1 -1
  546. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
  547. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
  548. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
  549. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
  550. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
  551. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
  552. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
  553. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
  554. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
  555. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
  556. package/dist/components/ViewSwitcherSidebar.cjs +1 -1
  557. package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
  558. package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
  559. package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
  560. package/dist/components/WindowTitle/WindowTitle.js +11 -13
  561. package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
  562. package/dist/components/WindowTitle.cjs +1 -1
  563. package/dist/components/WrapBox/WrapBox.cjs +1 -1
  564. package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
  565. package/dist/components/WrapBox/WrapBox.d.ts +1 -1
  566. package/dist/components/WrapBox/WrapBox.js +5 -5
  567. package/dist/components/WrapBox/WrapBox.js.map +1 -1
  568. package/dist/components/WrapBox.cjs +1 -1
  569. package/dist/hooks/useBreakpoint.cjs +1 -1
  570. package/dist/hooks/useBreakpoint.cjs.map +1 -1
  571. package/dist/hooks/useBreakpoint.js.map +1 -1
  572. package/dist/hooks.cjs +1 -1
  573. package/dist/index.cjs +1 -1
  574. package/package.json +2 -2
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./OverlaySplitView/OverlaySplitView.cjs`);exports.OverlaySplitView=e.OverlaySplitView;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./OverlaySplitView/OverlaySplitView.cjs");exports.OverlaySplitView=e.OverlaySplitView;
@@ -1,2 +1,2 @@
1
- const e=require(`../Icon/Icon.cjs`),t=require(`../EntryRow/EntryRow.cjs`),n=require(`./PasswordEntryRow.module.css.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`@gnome-ui/icons`);function o({trailing:o,disabled:s,...c}){let[l,u]=(0,r.useState)(!1),d=(0,i.jsx)(`button`,{type:`button`,className:n.default.revealButton,onClick:e=>{e.stopPropagation(),u(e=>!e)},"aria-label":l?`Conceal password`:`Reveal password`,"aria-pressed":l,disabled:s,children:(0,i.jsx)(e.Icon,{icon:l?a.ViewConceal:a.ViewReveal,size:`md`,"aria-hidden":!0})});return(0,i.jsx)(t.EntryRow,{...c,type:l?`text`:`password`,disabled:s,trailing:(0,i.jsxs)(i.Fragment,{children:[o,d]})})}exports.PasswordEntryRow=o;
1
+ const e=require("../Icon/Icon.cjs"),t=require("../EntryRow/EntryRow.cjs"),n=require("./PasswordEntryRow.module.css.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("@gnome-ui/icons");var o=({trailing:o,disabled:s,...c})=>{let[l,u]=(0,r.useState)(!1),d=(0,i.jsx)(`button`,{type:`button`,className:n.default.revealButton,onClick:e=>{e.stopPropagation(),u(e=>!e)},"aria-label":l?`Conceal password`:`Reveal password`,"aria-pressed":l,disabled:s,children:(0,i.jsx)(e.Icon,{icon:l?a.ViewConceal:a.ViewReveal,size:`md`,"aria-hidden":!0})});return(0,i.jsx)(t.EntryRow,{...c,type:l?`text`:`password`,disabled:s,trailing:(0,i.jsxs)(i.Fragment,{children:[o,d]})})};exports.PasswordEntryRow=o;
2
2
  //# sourceMappingURL=PasswordEntryRow.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordEntryRow.cjs","names":[],"sources":["../../../src/components/PasswordEntryRow/PasswordEntryRow.tsx"],"sourcesContent":["import { ViewConceal, ViewReveal } from '@gnome-ui/icons';\nimport { type ReactNode, useState } from 'react';\n\nimport { EntryRow, type EntryRowProps } from '../EntryRow';\nimport { Icon } from '../Icon';\n\nimport styles from './PasswordEntryRow.module.css';\n\nexport interface PasswordEntryRowProps extends Omit<EntryRowProps, 'type' | 'trailing'> {\n /** Additional trailing widgets placed before the reveal button. */\n trailing?: ReactNode;\n}\n\n/**\n * Password entry row with a built-in reveal/conceal toggle.\n *\n * Mirrors `AdwPasswordEntryRow` — an `EntryRow` variant that defaults to\n * `type=\"password\"` and provides a trailing icon button to reveal or conceal\n * the entered text. Use inside a `BoxedList` for password settings fields.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PasswordEntryRow.html\n */\nexport function PasswordEntryRow({ trailing, disabled, ...props }: PasswordEntryRowProps) {\n const [revealed, setRevealed] = useState(false);\n\n const revealButton = (\n <button\n type=\"button\"\n className={styles.revealButton}\n onClick={(e) => {\n e.stopPropagation();\n setRevealed((v) => !v);\n }}\n aria-label={revealed ? 'Conceal password' : 'Reveal password'}\n aria-pressed={revealed}\n disabled={disabled}\n >\n <Icon icon={revealed ? ViewConceal : ViewReveal} size=\"md\" aria-hidden />\n </button>\n );\n\n return (\n <EntryRow\n {...props}\n type={revealed ? 'text' : 'password'}\n disabled={disabled}\n trailing={\n <>\n {trailing}\n {revealButton}\n </>\n }\n />\n );\n}\n"],"mappings":"4MAsBA,SAAgB,EAAiB,CAAE,WAAU,WAAU,GAAG,GAAgC,CACxF,GAAM,CAAC,EAAU,IAAA,EAAA,EAAA,UAAwB,GAAM,CAEzC,GACJ,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAA,QAAO,aAClB,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAa,GAAM,CAAC,EAAE,EAExB,aAAY,EAAW,mBAAqB,kBAC5C,eAAc,EACJ,qBAEV,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAM,EAAW,EAAA,YAAc,EAAA,WAAY,KAAK,KAAK,cAAA,GAAc,CAAA,CAClE,CAAA,CAGX,OACE,EAAA,EAAA,KAAC,EAAA,SAAD,CACE,GAAI,EACJ,KAAM,EAAW,OAAS,WAChB,WACV,UACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,EACA,EACA,CAAA,CAAA,CAEL,CAAA"}
1
+ {"version":3,"file":"PasswordEntryRow.cjs","names":[],"sources":["../../../src/components/PasswordEntryRow/PasswordEntryRow.tsx"],"sourcesContent":["import { ViewConceal, ViewReveal } from '@gnome-ui/icons';\nimport { type ReactNode, useState } from 'react';\n\nimport { EntryRow, type EntryRowProps } from '../EntryRow';\nimport { Icon } from '../Icon';\n\nimport styles from './PasswordEntryRow.module.css';\n\nexport interface PasswordEntryRowProps extends Omit<EntryRowProps, 'type' | 'trailing'> {\n /** Additional trailing widgets placed before the reveal button. */\n trailing?: ReactNode;\n}\n\n/**\n * Password entry row with a built-in reveal/conceal toggle.\n *\n * Mirrors `AdwPasswordEntryRow` — an `EntryRow` variant that defaults to\n * `type=\"password\"` and provides a trailing icon button to reveal or conceal\n * the entered text. Use inside a `BoxedList` for password settings fields.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PasswordEntryRow.html\n */\nexport const PasswordEntryRow = ({ trailing, disabled, ...props }: PasswordEntryRowProps) => {\n const [revealed, setRevealed] = useState(false);\n\n const revealButton = (\n <button\n type=\"button\"\n className={styles.revealButton}\n onClick={(e) => {\n e.stopPropagation();\n setRevealed((v) => !v);\n }}\n aria-label={revealed ? 'Conceal password' : 'Reveal password'}\n aria-pressed={revealed}\n disabled={disabled}\n >\n <Icon icon={revealed ? ViewConceal : ViewReveal} size=\"md\" aria-hidden />\n </button>\n );\n\n return (\n <EntryRow\n {...props}\n type={revealed ? 'text' : 'password'}\n disabled={disabled}\n trailing={\n <>\n {trailing}\n {revealButton}\n </>\n }\n />\n );\n};\n"],"mappings":"4MAsBA,IAAa,GAAoB,CAAE,WAAU,WAAU,GAAG,KAAmC,CAC3F,GAAM,CAAC,EAAU,IAAA,EAAA,EAAA,UAAwB,EAAK,EAExC,GACJ,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAA,QAAO,aAClB,QAAU,GAAM,CACd,EAAE,gBAAgB,EAClB,EAAa,GAAM,CAAC,CAAC,CACvB,EACA,aAAY,EAAW,mBAAqB,kBAC5C,eAAc,EACJ,qBAEV,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAM,EAAW,EAAA,YAAc,EAAA,WAAY,KAAK,KAAK,cAAA,EAAa,CAAA,CAClE,CAAA,EAGV,OACE,EAAA,EAAA,KAAC,EAAA,SAAD,CACE,GAAI,EACJ,KAAM,EAAW,OAAS,WAChB,WACV,UACE,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,EACA,CACD,CAAA,CAAA,CAEL,CAAA,CAEL"}
@@ -13,4 +13,4 @@ export interface PasswordEntryRowProps extends Omit<EntryRowProps, 'type' | 'tra
13
13
  *
14
14
  * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PasswordEntryRow.html
15
15
  */
16
- export declare function PasswordEntryRow({ trailing, disabled, ...props }: PasswordEntryRowProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare const PasswordEntryRow: ({ trailing, disabled, ...props }: PasswordEntryRowProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ import { useState as r } from "react";
5
5
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  import { ViewConceal as s, ViewReveal as c } from "@gnome-ui/icons";
7
7
  //#region src/components/PasswordEntryRow/PasswordEntryRow.tsx
8
- function l({ trailing: l, disabled: u, ...d }) {
8
+ var l = ({ trailing: l, disabled: u, ...d }) => {
9
9
  let [f, p] = r(!1), m = /* @__PURE__ */ a("button", {
10
10
  type: "button",
11
11
  className: n.revealButton,
@@ -27,7 +27,7 @@ function l({ trailing: l, disabled: u, ...d }) {
27
27
  disabled: u,
28
28
  trailing: /* @__PURE__ */ o(i, { children: [l, m] })
29
29
  });
30
- }
30
+ };
31
31
  //#endregion
32
32
  export { l as PasswordEntryRow };
33
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordEntryRow.js","names":[],"sources":["../../../src/components/PasswordEntryRow/PasswordEntryRow.tsx"],"sourcesContent":["import { ViewConceal, ViewReveal } from '@gnome-ui/icons';\nimport { type ReactNode, useState } from 'react';\n\nimport { EntryRow, type EntryRowProps } from '../EntryRow';\nimport { Icon } from '../Icon';\n\nimport styles from './PasswordEntryRow.module.css';\n\nexport interface PasswordEntryRowProps extends Omit<EntryRowProps, 'type' | 'trailing'> {\n /** Additional trailing widgets placed before the reveal button. */\n trailing?: ReactNode;\n}\n\n/**\n * Password entry row with a built-in reveal/conceal toggle.\n *\n * Mirrors `AdwPasswordEntryRow` — an `EntryRow` variant that defaults to\n * `type=\"password\"` and provides a trailing icon button to reveal or conceal\n * the entered text. Use inside a `BoxedList` for password settings fields.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PasswordEntryRow.html\n */\nexport function PasswordEntryRow({ trailing, disabled, ...props }: PasswordEntryRowProps) {\n const [revealed, setRevealed] = useState(false);\n\n const revealButton = (\n <button\n type=\"button\"\n className={styles.revealButton}\n onClick={(e) => {\n e.stopPropagation();\n setRevealed((v) => !v);\n }}\n aria-label={revealed ? 'Conceal password' : 'Reveal password'}\n aria-pressed={revealed}\n disabled={disabled}\n >\n <Icon icon={revealed ? ViewConceal : ViewReveal} size=\"md\" aria-hidden />\n </button>\n );\n\n return (\n <EntryRow\n {...props}\n type={revealed ? 'text' : 'password'}\n disabled={disabled}\n trailing={\n <>\n {trailing}\n {revealButton}\n </>\n }\n />\n );\n}\n"],"mappings":";;;;;;;AAsBA,SAAgB,EAAiB,EAAE,aAAU,aAAU,GAAG,KAAgC;CACxF,IAAM,CAAC,GAAU,KAAe,EAAS,GAAM,EAEzC,IACJ,kBAAC,UAAD;EACE,MAAK;EACL,WAAW,EAAO;EAClB,UAAU,MAAM;AAEd,GADA,EAAE,iBAAiB,EACnB,GAAa,MAAM,CAAC,EAAE;;EAExB,cAAY,IAAW,qBAAqB;EAC5C,gBAAc;EACJ;YAEV,kBAAC,GAAD;GAAM,MAAM,IAAW,IAAc;GAAY,MAAK;GAAK,eAAA;GAAc,CAAA;EAClE,CAAA;AAGX,QACE,kBAAC,GAAD;EACE,GAAI;EACJ,MAAM,IAAW,SAAS;EAChB;EACV,UACE,kBAAA,GAAA,EAAA,UAAA,CACG,GACA,EACA,EAAA,CAAA;EAEL,CAAA"}
1
+ {"version":3,"file":"PasswordEntryRow.js","names":[],"sources":["../../../src/components/PasswordEntryRow/PasswordEntryRow.tsx"],"sourcesContent":["import { ViewConceal, ViewReveal } from '@gnome-ui/icons';\nimport { type ReactNode, useState } from 'react';\n\nimport { EntryRow, type EntryRowProps } from '../EntryRow';\nimport { Icon } from '../Icon';\n\nimport styles from './PasswordEntryRow.module.css';\n\nexport interface PasswordEntryRowProps extends Omit<EntryRowProps, 'type' | 'trailing'> {\n /** Additional trailing widgets placed before the reveal button. */\n trailing?: ReactNode;\n}\n\n/**\n * Password entry row with a built-in reveal/conceal toggle.\n *\n * Mirrors `AdwPasswordEntryRow` — an `EntryRow` variant that defaults to\n * `type=\"password\"` and provides a trailing icon button to reveal or conceal\n * the entered text. Use inside a `BoxedList` for password settings fields.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PasswordEntryRow.html\n */\nexport const PasswordEntryRow = ({ trailing, disabled, ...props }: PasswordEntryRowProps) => {\n const [revealed, setRevealed] = useState(false);\n\n const revealButton = (\n <button\n type=\"button\"\n className={styles.revealButton}\n onClick={(e) => {\n e.stopPropagation();\n setRevealed((v) => !v);\n }}\n aria-label={revealed ? 'Conceal password' : 'Reveal password'}\n aria-pressed={revealed}\n disabled={disabled}\n >\n <Icon icon={revealed ? ViewConceal : ViewReveal} size=\"md\" aria-hidden />\n </button>\n );\n\n return (\n <EntryRow\n {...props}\n type={revealed ? 'text' : 'password'}\n disabled={disabled}\n trailing={\n <>\n {trailing}\n {revealButton}\n </>\n }\n />\n );\n};\n"],"mappings":";;;;;;;AAsBA,IAAa,KAAoB,EAAE,aAAU,aAAU,GAAG,QAAmC;CAC3F,IAAM,CAAC,GAAU,KAAe,EAAS,EAAK,GAExC,IACJ,kBAAC,UAAD;EACE,MAAK;EACL,WAAW,EAAO;EAClB,UAAU,MAAM;GAEd,AADA,EAAE,gBAAgB,GAClB,GAAa,MAAM,CAAC,CAAC;EACvB;EACA,cAAY,IAAW,qBAAqB;EAC5C,gBAAc;EACJ;YAEV,kBAAC,GAAD;GAAM,MAAM,IAAW,IAAc;GAAY,MAAK;GAAK,eAAA;EAAa,CAAA;CAClE,CAAA;CAGV,OACE,kBAAC,GAAD;EACE,GAAI;EACJ,MAAM,IAAW,SAAS;EAChB;EACV,UACE,kBAAA,GAAA,EAAA,UAAA,CACG,GACA,CACD,EAAA,CAAA;CAEL,CAAA;AAEL"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./PasswordEntryRow/PasswordEntryRow.cjs`);exports.PasswordEntryRow=e.PasswordEntryRow;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./PasswordEntryRow/PasswordEntryRow.cjs");exports.PasswordEntryRow=e.PasswordEntryRow;
@@ -1,2 +1,2 @@
1
- const e=require(`./PathBar.module.css.cjs`);let t=require(`react/jsx-runtime`);function n({segments:n,onNavigate:r,className:i,...a}){return(0,t.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:[e.default.pathBar,i].filter(Boolean).join(` `),...a,children:(0,t.jsx)(`ol`,{className:e.default.list,"aria-label":`Path segments`,children:n.map((i,a)=>{let o=a===n.length-1;return(0,t.jsxs)(`li`,{className:e.default.item,children:[a>0&&(0,t.jsx)(`span`,{className:e.default.separator,"aria-hidden":`true`,children:(0,t.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,focusable:`false`,children:(0,t.jsx)(`path`,{d:`M4 2l4 4-4 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),o?(0,t.jsxs)(`span`,{className:e.default.current,"aria-current":`page`,children:[i.icon&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:i.icon}),i.label]}):(0,t.jsxs)(`button`,{type:`button`,className:e.default.segment,onClick:()=>r?.(i.path,a),children:[i.icon&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:i.icon}),i.label]})]},i.path)})})})}exports.PathBar=n;
1
+ const e=require("./PathBar.module.css.cjs");let t=require("react/jsx-runtime");var n=({segments:n,onNavigate:r,className:i,...a})=>(0,t.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:[e.default.pathBar,i].filter(Boolean).join(` `),...a,children:(0,t.jsx)(`ol`,{className:e.default.list,"aria-label":`Path segments`,children:n.map((i,a)=>{let o=a===n.length-1;return(0,t.jsxs)(`li`,{className:e.default.item,children:[a>0&&(0,t.jsx)(`span`,{className:e.default.separator,"aria-hidden":`true`,children:(0,t.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,focusable:`false`,children:(0,t.jsx)(`path`,{d:`M4 2l4 4-4 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),o?(0,t.jsxs)(`span`,{className:e.default.current,"aria-current":`page`,children:[i.icon&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:i.icon}),i.label]}):(0,t.jsxs)(`button`,{type:`button`,className:e.default.segment,onClick:()=>r?.(i.path,a),children:[i.icon&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:i.icon}),i.label]})]},i.path)})})});exports.PathBar=n;
2
2
  //# sourceMappingURL=PathBar.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PathBar.cjs","names":[],"sources":["../../../src/components/PathBar/PathBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './PathBar.module.css';\n\nexport interface PathBarSegment {\n /** Display label for this path segment. */\n label: string;\n /** Opaque path value passed to `onNavigate` when the segment is clicked. */\n path: string;\n /** Optional icon placed before the label (e.g. a folder icon). */\n icon?: ReactNode;\n}\n\nexport interface PathBarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Ordered path segments from root to current location.\n * The last segment is the current folder and is rendered non-interactive.\n */\n segments: PathBarSegment[];\n /**\n * Called when the user clicks on a non-current segment.\n * Receives the `path` and zero-based `index` of the clicked segment.\n */\n onNavigate?: (path: string, index: number) => void;\n}\n\n/**\n * Breadcrumb path bar for navigating a hierarchical location.\n *\n * Mirrors the location bar in GNOME Files (Nautilus). Segments are separated\n * by chevron dividers. All segments except the last are interactive — clicking\n * them calls `onNavigate`. The last segment represents the current location and\n * is rendered as a static label.\n *\n * @see https://developer.gnome.org/hig/patterns/nav/search.html\n */\nexport function PathBar({ segments, onNavigate, className, ...props }: PathBarProps) {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={[styles.pathBar, className].filter(Boolean).join(' ')}\n {...props}\n >\n <ol className={styles.list} aria-label=\"Path segments\">\n {segments.map((segment, index) => {\n const isCurrent = index === segments.length - 1;\n\n return (\n <li key={segment.path} className={styles.item}>\n {/* Separator chevron (not before the first segment) */}\n {index > 0 && (\n <span className={styles.separator} aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <path\n d=\"M4 2l4 4-4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n )}\n\n {isCurrent ? (\n /* Current folder — non-interactive */\n <span className={styles.current} aria-current=\"page\">\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </span>\n ) : (\n /* Ancestor folder — clickable */\n <button\n type=\"button\"\n className={styles.segment}\n onClick={() => onNavigate?.(segment.path, index)}\n >\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </button>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"mappings":"+EAoCA,SAAgB,EAAQ,CAAE,WAAU,aAAY,YAAW,GAAG,GAAuB,CACnF,OACE,EAAA,EAAA,KAAC,MAAD,CACE,aAAW,aACX,UAAW,CAAC,EAAA,QAAO,QAAS,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAChE,GAAI,YAEJ,EAAA,EAAA,KAAC,KAAD,CAAI,UAAW,EAAA,QAAO,KAAM,aAAW,yBACpC,EAAS,KAAK,EAAS,IAAU,CAChC,IAAM,EAAY,IAAU,EAAS,OAAS,EAE9C,OACE,EAAA,EAAA,MAAC,KAAD,CAAuB,UAAW,EAAA,QAAO,cAAzC,CAEG,EAAQ,IACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,UAAW,cAAY,iBAC7C,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,UAAU,kBACxD,EAAA,EAAA,KAAC,OAAD,CACE,EAAE,eACF,KAAK,OACL,OAAO,eACP,YAAY,MACZ,cAAc,QACd,eAAe,QACf,CAAA,CACE,CAAA,CACD,CAAA,CAGR,GAEC,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,EAAA,QAAO,QAAS,eAAa,gBAA9C,CACG,EAAQ,OACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,KAAM,cAAY,gBACvC,EAAQ,KACJ,CAAA,CAER,EAAQ,MACJ,IAGP,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAA,QAAO,QAClB,YAAe,IAAa,EAAQ,KAAM,EAAM,UAHlD,CAKG,EAAQ,OACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,KAAM,cAAY,gBACvC,EAAQ,KACJ,CAAA,CAER,EAAQ,MACF,GAER,EA1CI,EAAQ,KA0CZ,EAEP,CACC,CAAA,CACD,CAAA"}
1
+ {"version":3,"file":"PathBar.cjs","names":[],"sources":["../../../src/components/PathBar/PathBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './PathBar.module.css';\n\nexport interface PathBarSegment {\n /** Display label for this path segment. */\n label: string;\n /** Opaque path value passed to `onNavigate` when the segment is clicked. */\n path: string;\n /** Optional icon placed before the label (e.g. a folder icon). */\n icon?: ReactNode;\n}\n\nexport interface PathBarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Ordered path segments from root to current location.\n * The last segment is the current folder and is rendered non-interactive.\n */\n segments: PathBarSegment[];\n /**\n * Called when the user clicks on a non-current segment.\n * Receives the `path` and zero-based `index` of the clicked segment.\n */\n onNavigate?: (path: string, index: number) => void;\n}\n\n/**\n * Breadcrumb path bar for navigating a hierarchical location.\n *\n * Mirrors the location bar in GNOME Files (Nautilus). Segments are separated\n * by chevron dividers. All segments except the last are interactive — clicking\n * them calls `onNavigate`. The last segment represents the current location and\n * is rendered as a static label.\n *\n * @see https://developer.gnome.org/hig/patterns/nav/search.html\n */\nexport const PathBar = ({ segments, onNavigate, className, ...props }: PathBarProps) => {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={[styles.pathBar, className].filter(Boolean).join(' ')}\n {...props}\n >\n <ol className={styles.list} aria-label=\"Path segments\">\n {segments.map((segment, index) => {\n const isCurrent = index === segments.length - 1;\n\n return (\n <li key={segment.path} className={styles.item}>\n {/* Separator chevron (not before the first segment) */}\n {index > 0 && (\n <span className={styles.separator} aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <path\n d=\"M4 2l4 4-4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n )}\n\n {isCurrent ? (\n /* Current folder — non-interactive */\n <span className={styles.current} aria-current=\"page\">\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </span>\n ) : (\n /* Ancestor folder — clickable */\n <button\n type=\"button\"\n className={styles.segment}\n onClick={() => onNavigate?.(segment.path, index)}\n >\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.ic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,CAAA,CACD,CAAA"}
@@ -29,4 +29,4 @@ export interface PathBarProps extends HTMLAttributes<HTMLElement> {
29
29
  *
30
30
  * @see https://developer.gnome.org/hig/patterns/nav/search.html
31
31
  */
32
- export declare function PathBar({ segments, onNavigate, className, ...props }: PathBarProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare const PathBar: ({ segments, onNavigate, className, ...props }: PathBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,58 +1,56 @@
1
1
  import e from "./PathBar.module.css.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/components/PathBar/PathBar.tsx
4
- function r({ segments: r, onNavigate: i, className: a, ...o }) {
5
- return /* @__PURE__ */ t("nav", {
6
- "aria-label": "Breadcrumb",
7
- className: [e.pathBar, a].filter(Boolean).join(" "),
8
- ...o,
9
- children: /* @__PURE__ */ t("ol", {
10
- className: e.list,
11
- "aria-label": "Path segments",
12
- children: r.map((a, o) => {
13
- let s = o === r.length - 1;
14
- return /* @__PURE__ */ n("li", {
15
- className: e.item,
16
- children: [o > 0 && /* @__PURE__ */ t("span", {
17
- className: e.separator,
18
- "aria-hidden": "true",
19
- children: /* @__PURE__ */ t("svg", {
20
- width: "12",
21
- height: "12",
22
- viewBox: "0 0 12 12",
23
- focusable: "false",
24
- children: /* @__PURE__ */ t("path", {
25
- d: "M4 2l4 4-4 4",
26
- fill: "none",
27
- stroke: "currentColor",
28
- strokeWidth: "1.5",
29
- strokeLinecap: "round",
30
- strokeLinejoin: "round"
31
- })
4
+ var r = ({ segments: r, onNavigate: i, className: a, ...o }) => /* @__PURE__ */ t("nav", {
5
+ "aria-label": "Breadcrumb",
6
+ className: [e.pathBar, a].filter(Boolean).join(" "),
7
+ ...o,
8
+ children: /* @__PURE__ */ t("ol", {
9
+ className: e.list,
10
+ "aria-label": "Path segments",
11
+ children: r.map((a, o) => {
12
+ let s = o === r.length - 1;
13
+ return /* @__PURE__ */ n("li", {
14
+ className: e.item,
15
+ children: [o > 0 && /* @__PURE__ */ t("span", {
16
+ className: e.separator,
17
+ "aria-hidden": "true",
18
+ children: /* @__PURE__ */ t("svg", {
19
+ width: "12",
20
+ height: "12",
21
+ viewBox: "0 0 12 12",
22
+ focusable: "false",
23
+ children: /* @__PURE__ */ t("path", {
24
+ d: "M4 2l4 4-4 4",
25
+ fill: "none",
26
+ stroke: "currentColor",
27
+ strokeWidth: "1.5",
28
+ strokeLinecap: "round",
29
+ strokeLinejoin: "round"
32
30
  })
33
- }), s ? /* @__PURE__ */ n("span", {
34
- className: e.current,
35
- "aria-current": "page",
36
- children: [a.icon && /* @__PURE__ */ t("span", {
37
- className: e.icon,
38
- "aria-hidden": "true",
39
- children: a.icon
40
- }), a.label]
41
- }) : /* @__PURE__ */ n("button", {
42
- type: "button",
43
- className: e.segment,
44
- onClick: () => i?.(a.path, o),
45
- children: [a.icon && /* @__PURE__ */ t("span", {
46
- className: e.icon,
47
- "aria-hidden": "true",
48
- children: a.icon
49
- }), a.label]
50
- })]
51
- }, a.path);
52
- })
31
+ })
32
+ }), s ? /* @__PURE__ */ n("span", {
33
+ className: e.current,
34
+ "aria-current": "page",
35
+ children: [a.icon && /* @__PURE__ */ t("span", {
36
+ className: e.icon,
37
+ "aria-hidden": "true",
38
+ children: a.icon
39
+ }), a.label]
40
+ }) : /* @__PURE__ */ n("button", {
41
+ type: "button",
42
+ className: e.segment,
43
+ onClick: () => i?.(a.path, o),
44
+ children: [a.icon && /* @__PURE__ */ t("span", {
45
+ className: e.icon,
46
+ "aria-hidden": "true",
47
+ children: a.icon
48
+ }), a.label]
49
+ })]
50
+ }, a.path);
53
51
  })
54
- });
55
- }
52
+ })
53
+ });
56
54
  //#endregion
57
55
  export { r as PathBar };
58
56
 
@@ -1 +1 @@
1
- {"version":3,"file":"PathBar.js","names":[],"sources":["../../../src/components/PathBar/PathBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './PathBar.module.css';\n\nexport interface PathBarSegment {\n /** Display label for this path segment. */\n label: string;\n /** Opaque path value passed to `onNavigate` when the segment is clicked. */\n path: string;\n /** Optional icon placed before the label (e.g. a folder icon). */\n icon?: ReactNode;\n}\n\nexport interface PathBarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Ordered path segments from root to current location.\n * The last segment is the current folder and is rendered non-interactive.\n */\n segments: PathBarSegment[];\n /**\n * Called when the user clicks on a non-current segment.\n * Receives the `path` and zero-based `index` of the clicked segment.\n */\n onNavigate?: (path: string, index: number) => void;\n}\n\n/**\n * Breadcrumb path bar for navigating a hierarchical location.\n *\n * Mirrors the location bar in GNOME Files (Nautilus). Segments are separated\n * by chevron dividers. All segments except the last are interactive — clicking\n * them calls `onNavigate`. The last segment represents the current location and\n * is rendered as a static label.\n *\n * @see https://developer.gnome.org/hig/patterns/nav/search.html\n */\nexport function PathBar({ segments, onNavigate, className, ...props }: PathBarProps) {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={[styles.pathBar, className].filter(Boolean).join(' ')}\n {...props}\n >\n <ol className={styles.list} aria-label=\"Path segments\">\n {segments.map((segment, index) => {\n const isCurrent = index === segments.length - 1;\n\n return (\n <li key={segment.path} className={styles.item}>\n {/* Separator chevron (not before the first segment) */}\n {index > 0 && (\n <span className={styles.separator} aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <path\n d=\"M4 2l4 4-4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n )}\n\n {isCurrent ? (\n /* Current folder — non-interactive */\n <span className={styles.current} aria-current=\"page\">\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </span>\n ) : (\n /* Ancestor folder — clickable */\n <button\n type=\"button\"\n className={styles.segment}\n onClick={() => onNavigate?.(segment.path, index)}\n >\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </button>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"mappings":";;;AAoCA,SAAgB,EAAQ,EAAE,aAAU,eAAY,cAAW,GAAG,KAAuB;AACnF,QACE,kBAAC,OAAD;EACE,cAAW;EACX,WAAW,CAAC,EAAO,SAAS,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EAChE,GAAI;YAEJ,kBAAC,MAAD;GAAI,WAAW,EAAO;GAAM,cAAW;aACpC,EAAS,KAAK,GAAS,MAAU;IAChC,IAAM,IAAY,MAAU,EAAS,SAAS;AAE9C,WACE,kBAAC,MAAD;KAAuB,WAAW,EAAO;eAAzC,CAEG,IAAQ,KACP,kBAAC,QAAD;MAAM,WAAW,EAAO;MAAW,eAAY;gBAC7C,kBAAC,OAAD;OAAK,OAAM;OAAK,QAAO;OAAK,SAAQ;OAAY,WAAU;iBACxD,kBAAC,QAAD;QACE,GAAE;QACF,MAAK;QACL,QAAO;QACP,aAAY;QACZ,eAAc;QACd,gBAAe;QACf,CAAA;OACE,CAAA;MACD,CAAA,EAGR,IAEC,kBAAC,QAAD;MAAM,WAAW,EAAO;MAAS,gBAAa;gBAA9C,CACG,EAAQ,QACP,kBAAC,QAAD;OAAM,WAAW,EAAO;OAAM,eAAY;iBACvC,EAAQ;OACJ,CAAA,EAER,EAAQ,MACJ;UAGP,kBAAC,UAAD;MACE,MAAK;MACL,WAAW,EAAO;MAClB,eAAe,IAAa,EAAQ,MAAM,EAAM;gBAHlD,CAKG,EAAQ,QACP,kBAAC,QAAD;OAAM,WAAW,EAAO;OAAM,eAAY;iBACvC,EAAQ;OACJ,CAAA,EAER,EAAQ,MACF;QAER;OA1CI,EAAQ,KA0CZ;KAEP;GACC,CAAA;EACD,CAAA"}
1
+ {"version":3,"file":"PathBar.js","names":[],"sources":["../../../src/components/PathBar/PathBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './PathBar.module.css';\n\nexport interface PathBarSegment {\n /** Display label for this path segment. */\n label: string;\n /** Opaque path value passed to `onNavigate` when the segment is clicked. */\n path: string;\n /** Optional icon placed before the label (e.g. a folder icon). */\n icon?: ReactNode;\n}\n\nexport interface PathBarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Ordered path segments from root to current location.\n * The last segment is the current folder and is rendered non-interactive.\n */\n segments: PathBarSegment[];\n /**\n * Called when the user clicks on a non-current segment.\n * Receives the `path` and zero-based `index` of the clicked segment.\n */\n onNavigate?: (path: string, index: number) => void;\n}\n\n/**\n * Breadcrumb path bar for navigating a hierarchical location.\n *\n * Mirrors the location bar in GNOME Files (Nautilus). Segments are separated\n * by chevron dividers. All segments except the last are interactive — clicking\n * them calls `onNavigate`. The last segment represents the current location and\n * is rendered as a static label.\n *\n * @see https://developer.gnome.org/hig/patterns/nav/search.html\n */\nexport const PathBar = ({ segments, onNavigate, className, ...props }: PathBarProps) => {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={[styles.pathBar, className].filter(Boolean).join(' ')}\n {...props}\n >\n <ol className={styles.list} aria-label=\"Path segments\">\n {segments.map((segment, index) => {\n const isCurrent = index === segments.length - 1;\n\n return (\n <li key={segment.path} className={styles.item}>\n {/* Separator chevron (not before the first segment) */}\n {index > 0 && (\n <span className={styles.separator} aria-hidden=\"true\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" focusable=\"false\">\n <path\n d=\"M4 2l4 4-4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n )}\n\n {isCurrent ? (\n /* Current folder — non-interactive */\n <span className={styles.current} aria-current=\"page\">\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </span>\n ) : (\n /* Ancestor folder — clickable */\n <button\n type=\"button\"\n className={styles.segment}\n onClick={() => onNavigate?.(segment.path, index)}\n >\n {segment.icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {segment.icon}\n </span>\n )}\n {segment.label}\n </button>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n"],"mappings":";;;AAoCA,IAAa,KAAW,EAAE,aAAU,eAAY,cAAW,GAAG,QAE1D,kBAAC,OAAD;CACE,cAAW;CACX,WAAW,CAAC,EAAO,SAAS,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAC/D,GAAI;WAEJ,kBAAC,MAAD;EAAI,WAAW,EAAO;EAAM,cAAW;YACpC,EAAS,KAAK,GAAS,MAAU;GAChC,IAAM,IAAY,MAAU,EAAS,SAAS;GAE9C,OACE,kBAAC,MAAD;IAAuB,WAAW,EAAO;cAAzC,CAEG,IAAQ,KACP,kBAAC,QAAD;KAAM,WAAW,EAAO;KAAW,eAAY;eAC7C,kBAAC,OAAD;MAAK,OAAM;MAAK,QAAO;MAAK,SAAQ;MAAY,WAAU;gBACxD,kBAAC,QAAD;OACE,GAAE;OACF,MAAK;OACL,QAAO;OACP,aAAY;OACZ,eAAc;OACd,gBAAe;MAChB,CAAA;KACE,CAAA;IACD,CAAA,GAGP,IAEC,kBAAC,QAAD;KAAM,WAAW,EAAO;KAAS,gBAAa;eAA9C,CACG,EAAQ,QACP,kBAAC,QAAD;MAAM,WAAW,EAAO;MAAM,eAAY;gBACvC,EAAQ;KACL,CAAA,GAEP,EAAQ,KACL;SAGN,kBAAC,UAAD;KACE,MAAK;KACL,WAAW,EAAO;KAClB,eAAe,IAAa,EAAQ,MAAM,CAAK;eAHjD,CAKG,EAAQ,QACP,kBAAC,QAAD;MAAM,WAAW,EAAO;MAAM,eAAY;gBACvC,EAAQ;KACL,CAAA,GAEP,EAAQ,KACH;MAER;MA1CK,EAAQ,IA0Cb;EAER,CAAC;CACC,CAAA;AACD,CAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./PathBar/PathBar.cjs`);exports.PathBar=e.PathBar;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./PathBar/PathBar.cjs");exports.PathBar=e.PathBar;
@@ -1,2 +1,2 @@
1
- const e=require(`./Popover.module.css.cjs`);let t=require(`react`),n=require(`react-dom`),r=require(`react/jsx-runtime`);var i=8,a=10,o=6;function s(e,t,n){let r=window.innerWidth,s=window.innerHeight,c=[...new Set([n,n===`top`?`bottom`:n===`bottom`?`top`:n===`left`?`right`:`left`,`bottom`,`top`,`left`,`right`])];function l(n){return n===`bottom`?{top:e.bottom+i,left:e.left+e.width/2-t.width/2}:n===`top`?{top:e.top-t.height-i,left:e.left+e.width/2-t.width/2}:n===`left`?{top:e.top+e.height/2-t.height/2,left:e.left-t.width-i}:{top:e.top+e.height/2-t.height/2,left:e.right+i}}for(let n of c){let{top:i,left:o}=l(n),c=o>=a&&o+t.width<=r-a,u=i>=a&&i+t.height<=s-a;if(c&&u)return{top:i,left:o,placement:n,arrowOffset:n===`top`||n===`bottom`?e.left+e.width/2-o:e.top+e.height/2-i}}for(let n of c){let{top:i,left:c}=l(n),u=i>=a&&i+t.height<=s-a,d=c>=a&&c+t.width<=r-a;if((n===`top`||n===`bottom`)&&u){let s=Math.max(a,Math.min(c,r-t.width-a)),l=e.left+e.width/2-s;return{top:i,left:s,placement:n,arrowOffset:Math.max(o+4,Math.min(l,t.width-o-4))}}if((n===`left`||n===`right`)&&d){let r=Math.max(a,Math.min(i,s-t.height-a)),l=e.top+e.height/2-r;return{top:r,left:c,placement:n,arrowOffset:Math.max(o+4,Math.min(l,t.height-o-4))}}}let u=e.bottom+i,d=e.left+e.width/2-t.width/2,f=Math.max(a,Math.min(u,s-t.height-a)),p=Math.max(a,Math.min(d,r-t.width-a)),m=e.left+e.width/2-p;return{top:f,left:p,placement:`bottom`,arrowOffset:Math.max(o+4,Math.min(m,t.width-o-4))}}function c({content:i,placement:a=`bottom`,open:c,onClose:l,onOpenChange:u,children:d}){let f=c!==void 0,[p,m]=(0,t.useState)(!1),h=f?c:p,[g,_]=(0,t.useState)(null),v=(0,t.useId)(),y=(0,t.useId)(),b=(0,t.useRef)(null),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useCallback)(()=>{f?l?.():m(!1),u?.(!1)},[f,l,u]),w=(0,t.useCallback)(()=>{h?C():(f||m(!0),u?.(!0))},[h,C,f,u]),T=(0,t.useCallback)(()=>{!b.current||!x.current||_(s(b.current.getBoundingClientRect(),x.current.getBoundingClientRect(),a))},[a]);(0,t.useEffect)(()=>{if(!h)return;let e=requestAnimationFrame(()=>{T(),window.addEventListener(`scroll`,T,{passive:!0,capture:!0}),window.addEventListener(`resize`,T,{passive:!0})});return()=>{cancelAnimationFrame(e),window.removeEventListener(`scroll`,T,{capture:!0}),window.removeEventListener(`resize`,T)}},[h,T]),(0,t.useEffect)(()=>{h?(S.current=document.activeElement,requestAnimationFrame(()=>{(x.current?.querySelector(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)??x.current)?.focus()})):(S.current?.focus(),_(null))},[h]),(0,t.useEffect)(()=>{if(!h)return;let e=e=>{!b.current?.contains(e.target)&&!x.current?.contains(e.target)&&C()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[h,C]);let E=(0,t.useCallback)(e=>{e.key===`Escape`&&(e.stopPropagation(),C())},[C]),D=(0,t.cloneElement)(d,{ref:b,id:v,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":h?y:void 0,onClick:e=>{w(),d.props.onClick?.(e)}}),O=(0,r.jsxs)(`div`,{ref:x,id:y,role:`dialog`,"aria-labelledby":v,tabIndex:-1,className:[e.default.panel,g?e.default[g.placement]:null,h&&g?e.default.visible:null].filter(Boolean).join(` `),style:g?{top:g.top,left:g.left}:{visibility:`hidden`,pointerEvents:`none`,top:-9999,left:-9999},onKeyDown:E,children:[(0,r.jsx)(`div`,{className:e.default.arrow,"aria-hidden":`true`,style:g?.arrowOffset===void 0?void 0:g.placement===`top`||g.placement===`bottom`?{left:g.arrowOffset-o,marginLeft:0}:{top:g.arrowOffset-o,marginTop:0}}),i]});return(0,r.jsxs)(r.Fragment,{children:[D,h&&(typeof document<`u`?(0,n.createPortal)(O,document.body):O)]})}exports.Popover=c;
1
+ const e=require("./Popover.module.css.cjs");let t=require("react"),n=require("react-dom"),r=require("react/jsx-runtime");var i=8,a=10,o=6;function s(e,t,n){let r=window.innerWidth,s=window.innerHeight,c=[...new Set([n,n===`top`?`bottom`:n===`bottom`?`top`:n===`left`?`right`:`left`,`bottom`,`top`,`left`,`right`])];function l(n){return n===`bottom`?{top:e.bottom+i,left:e.left+e.width/2-t.width/2}:n===`top`?{top:e.top-t.height-i,left:e.left+e.width/2-t.width/2}:n===`left`?{top:e.top+e.height/2-t.height/2,left:e.left-t.width-i}:{top:e.top+e.height/2-t.height/2,left:e.right+i}}for(let n of c){let{top:i,left:o}=l(n),c=o>=a&&o+t.width<=r-a,u=i>=a&&i+t.height<=s-a;if(c&&u)return{top:i,left:o,placement:n,arrowOffset:n===`top`||n===`bottom`?e.left+e.width/2-o:e.top+e.height/2-i}}for(let n of c){let{top:i,left:c}=l(n),u=i>=a&&i+t.height<=s-a,d=c>=a&&c+t.width<=r-a;if((n===`top`||n===`bottom`)&&u){let s=Math.max(a,Math.min(c,r-t.width-a)),l=e.left+e.width/2-s;return{top:i,left:s,placement:n,arrowOffset:Math.max(10,Math.min(l,t.width-o-4))}}if((n===`left`||n===`right`)&&d){let r=Math.max(a,Math.min(i,s-t.height-a)),l=e.top+e.height/2-r;return{top:r,left:c,placement:n,arrowOffset:Math.max(10,Math.min(l,t.height-o-4))}}}let u=e.bottom+i,d=e.left+e.width/2-t.width/2,f=Math.max(a,Math.min(u,s-t.height-a)),p=Math.max(a,Math.min(d,r-t.width-a)),m=e.left+e.width/2-p;return{top:f,left:p,placement:`bottom`,arrowOffset:Math.max(10,Math.min(m,t.width-o-4))}}var c=({content:i,placement:a=`bottom`,open:c,onClose:l,onOpenChange:u,children:d})=>{let f=c!==void 0,[p,m]=(0,t.useState)(!1),h=f?c:p,[g,_]=(0,t.useState)(null),v=(0,t.useId)(),y=(0,t.useId)(),b=(0,t.useRef)(null),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useCallback)(()=>{f?l?.():m(!1),u?.(!1)},[f,l,u]),w=(0,t.useCallback)(()=>{h?C():(f||m(!0),u?.(!0))},[h,C,f,u]),T=(0,t.useCallback)(()=>{!b.current||!x.current||_(s(b.current.getBoundingClientRect(),x.current.getBoundingClientRect(),a))},[a]);(0,t.useEffect)(()=>{if(!h)return;let e=requestAnimationFrame(()=>{T(),window.addEventListener(`scroll`,T,{passive:!0,capture:!0}),window.addEventListener(`resize`,T,{passive:!0})});return()=>{cancelAnimationFrame(e),window.removeEventListener(`scroll`,T,{capture:!0}),window.removeEventListener(`resize`,T)}},[h,T]),(0,t.useEffect)(()=>{h?(S.current=document.activeElement,requestAnimationFrame(()=>{(x.current?.querySelector(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)??x.current)?.focus()})):(S.current?.focus(),_(null))},[h]),(0,t.useEffect)(()=>{if(!h)return;let e=e=>{!b.current?.contains(e.target)&&!x.current?.contains(e.target)&&C()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[h,C]);let E=(0,t.useCallback)(e=>{e.key===`Escape`&&(e.stopPropagation(),C())},[C]),D=(0,t.cloneElement)(d,{ref:b,id:v,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":h?y:void 0,onClick:e=>{w(),d.props.onClick?.(e)}}),O=(0,r.jsxs)(`div`,{ref:x,id:y,role:`dialog`,"aria-labelledby":v,tabIndex:-1,className:[e.default.panel,g?e.default[g.placement]:null,h&&g?e.default.visible:null].filter(Boolean).join(` `),style:g?{top:g.top,left:g.left}:{visibility:`hidden`,pointerEvents:`none`,top:-9999,left:-9999},onKeyDown:E,children:[(0,r.jsx)(`div`,{className:e.default.arrow,"aria-hidden":`true`,style:g?.arrowOffset===void 0?void 0:g.placement===`top`||g.placement===`bottom`?{left:g.arrowOffset-o,marginLeft:0}:{top:g.arrowOffset-o,marginTop:0}}),i]});return(0,r.jsxs)(r.Fragment,{children:[D,h&&(typeof document<`u`?(0,n.createPortal)(O,document.body):O)]})};exports.Popover=c;
2
2
  //# sourceMappingURL=Popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.cjs","names":[],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Popover.module.css';\n\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface PopoverProps {\n /**\n * The rich content rendered inside the popover panel.\n * Can include interactive elements (buttons, links, forms).\n */\n content: ReactNode;\n /**\n * Preferred placement relative to the trigger.\n * Flips automatically when there is not enough viewport space.\n * Defaults to `\"bottom\"`.\n */\n placement?: PopoverPlacement;\n /**\n * Whether the popover is open (controlled mode).\n * Omit to use uncontrolled mode where the trigger toggles it.\n */\n open?: boolean;\n /**\n * Called when the popover requests to be closed\n * (Escape key, outside click, or trigger click while open).\n */\n onClose?: () => void;\n /**\n * Called when open state should change (controlled mode).\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The trigger element. Must be a single React element that can\n * receive `ref` and click/keyboard event props.\n */\n children: ReactElement<HTMLAttributes<HTMLElement>>;\n}\n\ninterface Position {\n top: number;\n left: number;\n placement: PopoverPlacement;\n /** Arrow center offset in px from the near edge of the panel.\n * Horizontal (left) for top/bottom; vertical (top) for left/right.\n * Undefined means use the default 50% CSS. */\n arrowOffset?: number;\n}\n\nconst GAP = 8;\nconst MARGIN = 10;\nconst ARROW_HALF = 6; // half of the 12 px arrow\n\nfunction computePosition(\n trigger: DOMRect,\n popover: DOMRect,\n preferred: PopoverPlacement,\n): Position {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n\n const order: PopoverPlacement[] = [\n preferred,\n preferred === 'top'\n ? 'bottom'\n : preferred === 'bottom'\n ? 'top'\n : preferred === 'left'\n ? 'right'\n : 'left',\n 'bottom',\n 'top',\n 'left',\n 'right',\n ];\n\n // De-duplicate while preserving order\n const candidates = [...new Set(order)];\n\n function calcRaw(p: PopoverPlacement): { top: number; left: number } {\n if (p === 'bottom') {\n return {\n top: trigger.bottom + GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'top') {\n return {\n top: trigger.top - popover.height - GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'left') {\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.left - popover.width - GAP,\n };\n }\n\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.right + GAP,\n };\n }\n\n // First pass: find a placement that fits both axes perfectly.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n\n if (fitsH && fitsV) {\n // Always use pixel arrowOffset (never rely on CSS left:50%) so the arrow\n // points exactly at the trigger center regardless of sub-pixel rounding.\n const arrowOffset =\n p === 'top' || p === 'bottom'\n ? trigger.left + trigger.width / 2 - left\n : trigger.top + trigger.height / 2 - top;\n\n return { top, left, placement: p, arrowOffset };\n }\n }\n\n // Second pass: fits the primary axis; clamp the secondary axis and\n // shift the arrow so it still points at the trigger center.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n\n if ((p === 'top' || p === 'bottom') && fitsV) {\n const clampedLeft = Math.max(MARGIN, Math.min(left, vw - popover.width - MARGIN));\n const rawOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top,\n left: clampedLeft,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.width - ARROW_HALF - 4)),\n };\n }\n\n if ((p === 'left' || p === 'right') && fitsH) {\n const clampedTop = Math.max(MARGIN, Math.min(top, vh - popover.height - MARGIN));\n const rawOffset = trigger.top + trigger.height / 2 - clampedTop;\n\n return {\n top: clampedTop,\n left,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.height - ARROW_HALF - 4)),\n };\n }\n }\n\n // Fallback: clamp bottom placement and shift arrow to match trigger.\n const fbTop = trigger.bottom + GAP;\n const fbLeft = trigger.left + trigger.width / 2 - popover.width / 2;\n const clampedTop = Math.max(MARGIN, Math.min(fbTop, vh - popover.height - MARGIN));\n const clampedLeft = Math.max(MARGIN, Math.min(fbLeft, vw - popover.width - MARGIN));\n const rawArrowOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top: clampedTop,\n left: clampedLeft,\n placement: 'bottom',\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawArrowOffset, popover.width - ARROW_HALF - 4)),\n };\n}\n\n/**\n * Floating panel anchored to a trigger element.\n *\n * Unlike `Tooltip`, a Popover can contain rich interactive content\n * (menus, forms, details). It follows the Adwaita `GtkPopover` pattern.\n *\n * - Supports both controlled (`open` + `onClose`) and uncontrolled modes.\n * - Auto-positions with viewport-aware flip.\n * - Closes on Escape, outside click, or trigger re-click.\n * - Focus is moved into the panel on open; returns to the trigger on close.\n * - `aria-haspopup=\"dialog\"` + `aria-expanded` wired to the trigger.\n * - `role=\"dialog\"` on the panel with `aria-labelledby` when a heading is present.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Popover.html\n */\nexport function Popover({\n content,\n placement: preferredPlacement = 'bottom',\n open: controlledOpen,\n onClose,\n onOpenChange,\n children,\n}: PopoverProps) {\n const isControlled = controlledOpen !== undefined;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const [pos, setPos] = useState<Position | null>(null);\n\n const triggerId = useId();\n const popoverId = useId();\n const triggerRef = useRef<HTMLElement>(null);\n const panelRef = useRef<HTMLDivElement>(null);\n const previouslyFocused = useRef<Element | null>(null);\n\n const close = useCallback(() => {\n if (isControlled) {\n onClose?.();\n } else {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n }, [isControlled, onClose, onOpenChange]);\n\n const toggle = useCallback(() => {\n if (open) {\n close();\n } else {\n if (!isControlled) {\n setUncontrolledOpen(true);\n }\n\n onOpenChange?.(true);\n }\n }, [open, close, isControlled, onOpenChange]);\n\n // Position panel\n const place = useCallback(() => {\n if (!triggerRef.current || !panelRef.current) {\n return;\n }\n\n setPos(\n computePosition(\n triggerRef.current.getBoundingClientRect(),\n panelRef.current.getBoundingClientRect(),\n preferredPlacement,\n ),\n );\n }, [preferredPlacement]);\n\n // Reposition on open, scroll, resize\n useEffect(() => {\n if (!open) {\n return;\n }\n\n // Two RAF: first lets panel mount with hidden styles so we can measure it;\n // second applies the measured position.\n const id = requestAnimationFrame(() => {\n place();\n window.addEventListener('scroll', place, { passive: true, capture: true });\n window.addEventListener('resize', place, { passive: true });\n });\n\n return () => {\n cancelAnimationFrame(id);\n window.removeEventListener('scroll', place, { capture: true });\n window.removeEventListener('resize', place);\n };\n }, [open, place]);\n\n // Save / restore focus\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n requestAnimationFrame(() => {\n const first = panelRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n (first ?? panelRef.current)?.focus();\n });\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n setPos(null);\n }\n }, [open]);\n\n // Close on outside pointer\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const handler = (e: MouseEvent) => {\n if (\n !triggerRef.current?.contains(e.target as Node) &&\n !panelRef.current?.contains(e.target as Node)\n ) {\n close();\n }\n };\n\n document.addEventListener('mousedown', handler);\n\n return () => document.removeEventListener('mousedown', handler);\n }, [open, close]);\n\n // Escape key\n const handlePanelKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n close();\n }\n },\n [close],\n );\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const trigger = cloneElement(children as any, {\n ref: triggerRef,\n id: triggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': open,\n 'aria-controls': open ? popoverId : undefined,\n onClick: (e: ReactMouseEvent<HTMLElement>) => {\n toggle();\n children.props.onClick?.(e);\n },\n });\n\n const panel = (\n <div\n ref={panelRef}\n id={popoverId}\n role=\"dialog\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n className={[\n styles.panel,\n pos ? styles[pos.placement] : null,\n open && pos ? styles.visible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n pos\n ? { top: pos.top, left: pos.left }\n : { visibility: 'hidden', pointerEvents: 'none', top: -9999, left: -9999 }\n }\n onKeyDown={handlePanelKeyDown}\n >\n {/* Arrow — offset shifts it to point at the trigger when the panel is clamped */}\n <div\n className={styles.arrow}\n aria-hidden=\"true\"\n style={\n pos?.arrowOffset !== undefined\n ? pos.placement === 'top' || pos.placement === 'bottom'\n ? { left: pos.arrowOffset - ARROW_HALF, marginLeft: 0 }\n : { top: pos.arrowOffset - ARROW_HALF, marginTop: 0 }\n : undefined\n }\n />\n {content}\n </div>\n );\n\n return (\n <>\n {trigger}\n {open && (typeof document !== 'undefined' ? createPortal(panel, document.body) : panel)}\n </>\n );\n}\n"],"mappings":"yHA+DA,IAAM,EAAM,EACN,EAAS,GACT,EAAa,EAEnB,SAAS,EACP,EACA,EACA,EACU,CACV,IAAM,EAAK,OAAO,WACZ,EAAK,OAAO,YAkBZ,EAAa,CAAC,G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,EAAA,EAAA,cAA2B,EAAO,SAAS,KAAK,CAAG,GAChF,CAAA,CAAA"}
1
+ {"version":3,"file":"Popover.cjs","names":[],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Popover.module.css';\n\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface PopoverProps {\n /**\n * The rich content rendered inside the popover panel.\n * Can include interactive elements (buttons, links, forms).\n */\n content: ReactNode;\n /**\n * Preferred placement relative to the trigger.\n * Flips automatically when there is not enough viewport space.\n * Defaults to `\"bottom\"`.\n */\n placement?: PopoverPlacement;\n /**\n * Whether the popover is open (controlled mode).\n * Omit to use uncontrolled mode where the trigger toggles it.\n */\n open?: boolean;\n /**\n * Called when the popover requests to be closed\n * (Escape key, outside click, or trigger click while open).\n */\n onClose?: () => void;\n /**\n * Called when open state should change (controlled mode).\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The trigger element. Must be a single React element that can\n * receive `ref` and click/keyboard event props.\n */\n children: ReactElement<HTMLAttributes<HTMLElement>>;\n}\n\ninterface Position {\n top: number;\n left: number;\n placement: PopoverPlacement;\n /** Arrow center offset in px from the near edge of the panel.\n * Horizontal (left) for top/bottom; vertical (top) for left/right.\n * Undefined means use the default 50% CSS. */\n arrowOffset?: number;\n}\n\nconst GAP = 8;\nconst MARGIN = 10;\nconst ARROW_HALF = 6; // half of the 12 px arrow\n\nfunction computePosition(\n trigger: DOMRect,\n popover: DOMRect,\n preferred: PopoverPlacement,\n): Position {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n\n const order: PopoverPlacement[] = [\n preferred,\n preferred === 'top'\n ? 'bottom'\n : preferred === 'bottom'\n ? 'top'\n : preferred === 'left'\n ? 'right'\n : 'left',\n 'bottom',\n 'top',\n 'left',\n 'right',\n ];\n\n // De-duplicate while preserving order\n const candidates = [...new Set(order)];\n\n function calcRaw(p: PopoverPlacement): { top: number; left: number } {\n if (p === 'bottom') {\n return {\n top: trigger.bottom + GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'top') {\n return {\n top: trigger.top - popover.height - GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'left') {\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.left - popover.width - GAP,\n };\n }\n\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.right + GAP,\n };\n }\n\n // First pass: find a placement that fits both axes perfectly.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n\n if (fitsH && fitsV) {\n // Always use pixel arrowOffset (never rely on CSS left:50%) so the arrow\n // points exactly at the trigger center regardless of sub-pixel rounding.\n const arrowOffset =\n p === 'top' || p === 'bottom'\n ? trigger.left + trigger.width / 2 - left\n : trigger.top + trigger.height / 2 - top;\n\n return { top, left, placement: p, arrowOffset };\n }\n }\n\n // Second pass: fits the primary axis; clamp the secondary axis and\n // shift the arrow so it still points at the trigger center.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n\n if ((p === 'top' || p === 'bottom') && fitsV) {\n const clampedLeft = Math.max(MARGIN, Math.min(left, vw - popover.width - MARGIN));\n const rawOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top,\n left: clampedLeft,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.width - ARROW_HALF - 4)),\n };\n }\n\n if ((p === 'left' || p === 'right') && fitsH) {\n const clampedTop = Math.max(MARGIN, Math.min(top, vh - popover.height - MARGIN));\n const rawOffset = trigger.top + trigger.height / 2 - clampedTop;\n\n return {\n top: clampedTop,\n left,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.height - ARROW_HALF - 4)),\n };\n }\n }\n\n // Fallback: clamp bottom placement and shift arrow to match trigger.\n const fbTop = trigger.bottom + GAP;\n const fbLeft = trigger.left + trigger.width / 2 - popover.width / 2;\n const clampedTop = Math.max(MARGIN, Math.min(fbTop, vh - popover.height - MARGIN));\n const clampedLeft = Math.max(MARGIN, Math.min(fbLeft, vw - popover.width - MARGIN));\n const rawArrowOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top: clampedTop,\n left: clampedLeft,\n placement: 'bottom',\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawArrowOffset, popover.width - ARROW_HALF - 4)),\n };\n}\n\n/**\n * Floating panel anchored to a trigger element.\n *\n * Unlike `Tooltip`, a Popover can contain rich interactive content\n * (menus, forms, details). It follows the Adwaita `GtkPopover` pattern.\n *\n * - Supports both controlled (`open` + `onClose`) and uncontrolled modes.\n * - Auto-positions with viewport-aware flip.\n * - Closes on Escape, outside click, or trigger re-click.\n * - Focus is moved into the panel on open; returns to the trigger on close.\n * - `aria-haspopup=\"dialog\"` + `aria-expanded` wired to the trigger.\n * - `role=\"dialog\"` on the panel with `aria-labelledby` when a heading is present.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Popover.html\n */\nexport const Popover = ({\n content,\n placement: preferredPlacement = 'bottom',\n open: controlledOpen,\n onClose,\n onOpenChange,\n children,\n}: PopoverProps) => {\n const isControlled = controlledOpen !== undefined;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const [pos, setPos] = useState<Position | null>(null);\n\n const triggerId = useId();\n const popoverId = useId();\n const triggerRef = useRef<HTMLElement>(null);\n const panelRef = useRef<HTMLDivElement>(null);\n const previouslyFocused = useRef<Element | null>(null);\n\n const close = useCallback(() => {\n if (isControlled) {\n onClose?.();\n } else {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n }, [isControlled, onClose, onOpenChange]);\n\n const toggle = useCallback(() => {\n if (open) {\n close();\n } else {\n if (!isControlled) {\n setUncontrolledOpen(true);\n }\n\n onOpenChange?.(true);\n }\n }, [open, close, isControlled, onOpenChange]);\n\n // Position panel\n const place = useCallback(() => {\n if (!triggerRef.current || !panelRef.current) {\n return;\n }\n\n setPos(\n computePosition(\n triggerRef.current.getBoundingClientRect(),\n panelRef.current.getBoundingClientRect(),\n preferredPlacement,\n ),\n );\n }, [preferredPlacement]);\n\n // Reposition on open, scroll, resize\n useEffect(() => {\n if (!open) {\n return;\n }\n\n // Two RAF: first lets panel mount with hidden styles so we can measure it;\n // second applies the measured position.\n const id = requestAnimationFrame(() => {\n place();\n window.addEventListener('scroll', place, { passive: true, capture: true });\n window.addEventListener('resize', place, { passive: true });\n });\n\n return () => {\n cancelAnimationFrame(id);\n window.removeEventListener('scroll', place, { capture: true });\n window.removeEventListener('resize', place);\n };\n }, [open, place]);\n\n // Save / restore focus\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n requestAnimationFrame(() => {\n const first = panelRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n (first ?? panelRef.current)?.focus();\n });\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n setPos(null);\n }\n }, [open]);\n\n // Close on outside pointer\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const handler = (e: MouseEvent) => {\n if (\n !triggerRef.current?.contains(e.target as Node) &&\n !panelRef.current?.contains(e.target as Node)\n ) {\n close();\n }\n };\n\n document.addEventListener('mousedown', handler);\n\n return () => document.removeEventListener('mousedown', handler);\n }, [open, close]);\n\n // Escape key\n const handlePanelKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n close();\n }\n },\n [close],\n );\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const trigger = cloneElement(children as any, {\n ref: triggerRef,\n id: triggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': open,\n 'aria-controls': open ? popoverId : undefined,\n onClick: (e: ReactMouseEvent<HTMLElement>) => {\n toggle();\n children.props.onClick?.(e);\n },\n });\n\n const panel = (\n <div\n ref={panelRef}\n id={popoverId}\n role=\"dialog\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n className={[\n styles.panel,\n pos ? styles[pos.placement] : null,\n open && pos ? styles.visible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n pos\n ? { top: pos.top, left: pos.left }\n : { visibility: 'hidden', pointerEvents: 'none', top: -9999, left: -9999 }\n }\n onKeyDown={handlePanelKeyDown}\n >\n {/* Arrow — offset shifts it to point at the trigger when the panel is clamped */}\n <div\n className={styles.arrow}\n aria-hidden=\"true\"\n style={\n pos?.arrowOffset !== undefined\n ? pos.placement === 'top' || pos.placement === 'bottom'\n ? { left: pos.arrowOffset - ARROW_HALF, marginLeft: 0 }\n : { top: pos.arrowOffset - ARROW_HALF, marginTop: 0 }\n : undefined\n }\n />\n {content}\n </div>\n );\n\n return (\n <>\n {trigger}\n {open && (typeof document !== 'undefined' ? createPortal(panel, document.body) : panel)}\n </>\n );\n};\n"],"mappings":"yHA+DA,IAAM,EAAM,EACN,EAAS,GACT,EAAa,EAEnB,SAAS,EACP,EACA,EACA,EACU,CACV,IAAM,EAAK,OAAO,WACZ,EAAK,OAAO,YAkBZ,EAAa,CAAC,GAAG,IAAI,IAAI,CAf7B,EACA,IAAc,MACV,SACA,IAAc,SACZ,MACA,IAAc,OACZ,QACA,OACR,SACA,MACA,OACA,OAI6B,CAAK,CAAC,EAErC,SAAS,EAAQ,EAAoD,CAsBnE,OArBI,IAAM,SACD,CACL,IAAK,EAAQ,OAAS,EACt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ome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Popover.html
49
49
  */
50
- export declare function Popover({ content, placement: preferredPlacement, open: controlledOpen, onClose, onOpenChange, children, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
50
+ export declare const Popover: ({ content, placement: preferredPlacement, open: controlledOpen, onClose, onOpenChange, children, }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -45,7 +45,7 @@ function m(e, t, n) {
45
45
  top: a,
46
46
  left: i,
47
47
  placement: n,
48
- arrowOffset: Math.max(p + 4, Math.min(o, t.width - p - 4))
48
+ arrowOffset: Math.max(10, Math.min(o, t.width - p - 4))
49
49
  };
50
50
  }
51
51
  if ((n === "left" || n === "right") && l) {
@@ -54,7 +54,7 @@ function m(e, t, n) {
54
54
  top: r,
55
55
  left: s,
56
56
  placement: n,
57
- arrowOffset: Math.max(p + 4, Math.min(o, t.height - p - 4))
57
+ arrowOffset: Math.max(10, Math.min(o, t.height - p - 4))
58
58
  };
59
59
  }
60
60
  }
@@ -63,10 +63,10 @@ function m(e, t, n) {
63
63
  top: l,
64
64
  left: u,
65
65
  placement: "bottom",
66
- arrowOffset: Math.max(p + 4, Math.min(m, t.width - p - 4))
66
+ arrowOffset: Math.max(10, Math.min(m, t.width - p - 4))
67
67
  };
68
68
  }
69
- function h({ content: d, placement: f = "bottom", open: h, onClose: g, onOpenChange: _, children: v }) {
69
+ var h = ({ content: d, placement: f = "bottom", open: h, onClose: g, onOpenChange: _, children: v }) => {
70
70
  let y = h !== void 0, [b, x] = o(!1), S = y ? h : b, [C, w] = o(null), T = i(), E = i(), D = a(null), O = a(null), k = a(null), A = n(() => {
71
71
  y ? g?.() : x(!1), _?.(!1);
72
72
  }, [
@@ -150,7 +150,7 @@ function h({ content: d, placement: f = "bottom", open: h, onClose: g, onOpenCha
150
150
  }), d]
151
151
  });
152
152
  return /* @__PURE__ */ u(c, { children: [P, S && (typeof document < "u" ? s(F, document.body) : F)] });
153
- }
153
+ };
154
154
  //#endregion
155
155
  export { h as Popover };
156
156
 
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","names":[],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Popover.module.css';\n\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface PopoverProps {\n /**\n * The rich content rendered inside the popover panel.\n * Can include interactive elements (buttons, links, forms).\n */\n content: ReactNode;\n /**\n * Preferred placement relative to the trigger.\n * Flips automatically when there is not enough viewport space.\n * Defaults to `\"bottom\"`.\n */\n placement?: PopoverPlacement;\n /**\n * Whether the popover is open (controlled mode).\n * Omit to use uncontrolled mode where the trigger toggles it.\n */\n open?: boolean;\n /**\n * Called when the popover requests to be closed\n * (Escape key, outside click, or trigger click while open).\n */\n onClose?: () => void;\n /**\n * Called when open state should change (controlled mode).\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The trigger element. Must be a single React element that can\n * receive `ref` and click/keyboard event props.\n */\n children: ReactElement<HTMLAttributes<HTMLElement>>;\n}\n\ninterface Position {\n top: number;\n left: number;\n placement: PopoverPlacement;\n /** Arrow center offset in px from the near edge of the panel.\n * Horizontal (left) for top/bottom; vertical (top) for left/right.\n * Undefined means use the default 50% CSS. */\n arrowOffset?: number;\n}\n\nconst GAP = 8;\nconst MARGIN = 10;\nconst ARROW_HALF = 6; // half of the 12 px arrow\n\nfunction computePosition(\n trigger: DOMRect,\n popover: DOMRect,\n preferred: PopoverPlacement,\n): Position {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n\n const order: PopoverPlacement[] = [\n preferred,\n preferred === 'top'\n ? 'bottom'\n : preferred === 'bottom'\n ? 'top'\n : preferred === 'left'\n ? 'right'\n : 'left',\n 'bottom',\n 'top',\n 'left',\n 'right',\n ];\n\n // De-duplicate while preserving order\n const candidates = [...new Set(order)];\n\n function calcRaw(p: PopoverPlacement): { top: number; left: number } {\n if (p === 'bottom') {\n return {\n top: trigger.bottom + GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'top') {\n return {\n top: trigger.top - popover.height - GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'left') {\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.left - popover.width - GAP,\n };\n }\n\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.right + GAP,\n };\n }\n\n // First pass: find a placement that fits both axes perfectly.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n\n if (fitsH && fitsV) {\n // Always use pixel arrowOffset (never rely on CSS left:50%) so the arrow\n // points exactly at the trigger center regardless of sub-pixel rounding.\n const arrowOffset =\n p === 'top' || p === 'bottom'\n ? trigger.left + trigger.width / 2 - left\n : trigger.top + trigger.height / 2 - top;\n\n return { top, left, placement: p, arrowOffset };\n }\n }\n\n // Second pass: fits the primary axis; clamp the secondary axis and\n // shift the arrow so it still points at the trigger center.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n\n if ((p === 'top' || p === 'bottom') && fitsV) {\n const clampedLeft = Math.max(MARGIN, Math.min(left, vw - popover.width - MARGIN));\n const rawOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top,\n left: clampedLeft,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.width - ARROW_HALF - 4)),\n };\n }\n\n if ((p === 'left' || p === 'right') && fitsH) {\n const clampedTop = Math.max(MARGIN, Math.min(top, vh - popover.height - MARGIN));\n const rawOffset = trigger.top + trigger.height / 2 - clampedTop;\n\n return {\n top: clampedTop,\n left,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.height - ARROW_HALF - 4)),\n };\n }\n }\n\n // Fallback: clamp bottom placement and shift arrow to match trigger.\n const fbTop = trigger.bottom + GAP;\n const fbLeft = trigger.left + trigger.width / 2 - popover.width / 2;\n const clampedTop = Math.max(MARGIN, Math.min(fbTop, vh - popover.height - MARGIN));\n const clampedLeft = Math.max(MARGIN, Math.min(fbLeft, vw - popover.width - MARGIN));\n const rawArrowOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top: clampedTop,\n left: clampedLeft,\n placement: 'bottom',\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawArrowOffset, popover.width - ARROW_HALF - 4)),\n };\n}\n\n/**\n * Floating panel anchored to a trigger element.\n *\n * Unlike `Tooltip`, a Popover can contain rich interactive content\n * (menus, forms, details). It follows the Adwaita `GtkPopover` pattern.\n *\n * - Supports both controlled (`open` + `onClose`) and uncontrolled modes.\n * - Auto-positions with viewport-aware flip.\n * - Closes on Escape, outside click, or trigger re-click.\n * - Focus is moved into the panel on open; returns to the trigger on close.\n * - `aria-haspopup=\"dialog\"` + `aria-expanded` wired to the trigger.\n * - `role=\"dialog\"` on the panel with `aria-labelledby` when a heading is present.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Popover.html\n */\nexport function Popover({\n content,\n placement: preferredPlacement = 'bottom',\n open: controlledOpen,\n onClose,\n onOpenChange,\n children,\n}: PopoverProps) {\n const isControlled = controlledOpen !== undefined;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const [pos, setPos] = useState<Position | null>(null);\n\n const triggerId = useId();\n const popoverId = useId();\n const triggerRef = useRef<HTMLElement>(null);\n const panelRef = useRef<HTMLDivElement>(null);\n const previouslyFocused = useRef<Element | null>(null);\n\n const close = useCallback(() => {\n if (isControlled) {\n onClose?.();\n } else {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n }, [isControlled, onClose, onOpenChange]);\n\n const toggle = useCallback(() => {\n if (open) {\n close();\n } else {\n if (!isControlled) {\n setUncontrolledOpen(true);\n }\n\n onOpenChange?.(true);\n }\n }, [open, close, isControlled, onOpenChange]);\n\n // Position panel\n const place = useCallback(() => {\n if (!triggerRef.current || !panelRef.current) {\n return;\n }\n\n setPos(\n computePosition(\n triggerRef.current.getBoundingClientRect(),\n panelRef.current.getBoundingClientRect(),\n preferredPlacement,\n ),\n );\n }, [preferredPlacement]);\n\n // Reposition on open, scroll, resize\n useEffect(() => {\n if (!open) {\n return;\n }\n\n // Two RAF: first lets panel mount with hidden styles so we can measure it;\n // second applies the measured position.\n const id = requestAnimationFrame(() => {\n place();\n window.addEventListener('scroll', place, { passive: true, capture: true });\n window.addEventListener('resize', place, { passive: true });\n });\n\n return () => {\n cancelAnimationFrame(id);\n window.removeEventListener('scroll', place, { capture: true });\n window.removeEventListener('resize', place);\n };\n }, [open, place]);\n\n // Save / restore focus\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n requestAnimationFrame(() => {\n const first = panelRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n (first ?? panelRef.current)?.focus();\n });\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n setPos(null);\n }\n }, [open]);\n\n // Close on outside pointer\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const handler = (e: MouseEvent) => {\n if (\n !triggerRef.current?.contains(e.target as Node) &&\n !panelRef.current?.contains(e.target as Node)\n ) {\n close();\n }\n };\n\n document.addEventListener('mousedown', handler);\n\n return () => document.removeEventListener('mousedown', handler);\n }, [open, close]);\n\n // Escape key\n const handlePanelKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n close();\n }\n },\n [close],\n );\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const trigger = cloneElement(children as any, {\n ref: triggerRef,\n id: triggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': open,\n 'aria-controls': open ? popoverId : undefined,\n onClick: (e: ReactMouseEvent<HTMLElement>) => {\n toggle();\n children.props.onClick?.(e);\n },\n });\n\n const panel = (\n <div\n ref={panelRef}\n id={popoverId}\n role=\"dialog\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n className={[\n styles.panel,\n pos ? styles[pos.placement] : null,\n open && pos ? styles.visible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n pos\n ? { top: pos.top, left: pos.left }\n : { visibility: 'hidden', pointerEvents: 'none', top: -9999, left: -9999 }\n }\n onKeyDown={handlePanelKeyDown}\n >\n {/* Arrow — offset shifts it to point at the trigger when the panel is clamped */}\n <div\n className={styles.arrow}\n aria-hidden=\"true\"\n style={\n pos?.arrowOffset !== undefined\n ? pos.placement === 'top' || pos.placement === 'bottom'\n ? { left: pos.arrowOffset - ARROW_HALF, marginLeft: 0 }\n : { top: pos.arrowOffset - ARROW_HALF, marginTop: 0 }\n : undefined\n }\n />\n {content}\n </div>\n );\n\n return (\n <>\n {trigger}\n {open && (typeof document !== 'undefined' ? createPortal(panel, document.body) : panel)}\n </>\n );\n}\n"],"mappings":";;;;;AA+DA,IAAM,IAAM,GACN,IAAS,IACT,IAAa;AAEnB,SAAS,EACP,GACA,GACA,GACU;CACV,IAAM,IAAK,OAAO,YACZ,IAAK,OAAO,aAkBZ,IAAa,CAAC,GAAG,IAAI,IAhBO;EAChC;EACA,MAAc,QACV,WACA,MAAc,WACZ,QACA,MAAc,SACZ,UACA;EACR;EACA;EACA;EACA;EACD,CAGoC,CAAC;CAEtC,SAAS,EAAQ,GAAoD;AAsBnE,SArBI,MAAM,WACD;GACL,KAAK,EAAQ,SAAS;GACtB,MAAM,EAAQ,OAAO,EAAQ,QAA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EAC5C,KAAK;EACL,IAAI;EACJ,iBAAiB;EACjB,iBAAiB;EACjB,iBAAiB,IAAO,IAAY,KAAA;EACpC,UAAU,MAAoC;AAE5C,GADA,GAAQ,EACR,EAAS,MAAM,UAAU,EAAE;;EAE9B,CAAC,EAEI,IACJ,kBAAC,OAAD;EACE,KAAK;EACL,IAAI;EACJ,MAAK;EACL,mBAAiB;EACjB,UAAU;EACV,WAAW;GACT,EAAO;GACP,IAAM,EAAO,EAAI,aAAa;GAC9B,KAAQ,IAAM,EAAO,UAAU;GAChC,CACE,OAAO,QAAQ,CACf,KAAK,IAAI;EACZ,OACE,IACI;GAAE,KAAK,EAAI;GAAK,MAAM,EAAI;GAAM,GAChC;GAAE,YAAY;GAAU,eAAe;GAAQ,KAAK;GAAO,MAAM;GAAO;EAE9E,WAAW;YAlBb,CAqBE,kBAAC,OAAD;GACE,WAAW,EAAO;GAClB,eAAY;GACZ,OACE,GAAK,gBAAgB,KAAA,IAIjB,KAAA,IAHA,EAAI,cAAc,SAAS,EAAI,cAAc,WAC3C;IAAE,MAAM,EAAI,cAAc;IAAY,YAAY;IAAG,GACrD;IAAE,KAAK,EAAI,cAAc;IAAY,WAAW;IAAG;GAG3D,CAAA,EACD,EACG;;AAGR,QACE,kBAAA,GAAA,EAAA,UAAA,CACG,GACA,MAAS,OAAO,WAAa,MAAc,EAAa,GAAO,SAAS,KAAK,GAAG,GAChF,EAAA,CAAA"}
1
+ {"version":3,"file":"Popover.js","names":[],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import {\n cloneElement,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactElement,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Popover.module.css';\n\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface PopoverProps {\n /**\n * The rich content rendered inside the popover panel.\n * Can include interactive elements (buttons, links, forms).\n */\n content: ReactNode;\n /**\n * Preferred placement relative to the trigger.\n * Flips automatically when there is not enough viewport space.\n * Defaults to `\"bottom\"`.\n */\n placement?: PopoverPlacement;\n /**\n * Whether the popover is open (controlled mode).\n * Omit to use uncontrolled mode where the trigger toggles it.\n */\n open?: boolean;\n /**\n * Called when the popover requests to be closed\n * (Escape key, outside click, or trigger click while open).\n */\n onClose?: () => void;\n /**\n * Called when open state should change (controlled mode).\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The trigger element. Must be a single React element that can\n * receive `ref` and click/keyboard event props.\n */\n children: ReactElement<HTMLAttributes<HTMLElement>>;\n}\n\ninterface Position {\n top: number;\n left: number;\n placement: PopoverPlacement;\n /** Arrow center offset in px from the near edge of the panel.\n * Horizontal (left) for top/bottom; vertical (top) for left/right.\n * Undefined means use the default 50% CSS. */\n arrowOffset?: number;\n}\n\nconst GAP = 8;\nconst MARGIN = 10;\nconst ARROW_HALF = 6; // half of the 12 px arrow\n\nfunction computePosition(\n trigger: DOMRect,\n popover: DOMRect,\n preferred: PopoverPlacement,\n): Position {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n\n const order: PopoverPlacement[] = [\n preferred,\n preferred === 'top'\n ? 'bottom'\n : preferred === 'bottom'\n ? 'top'\n : preferred === 'left'\n ? 'right'\n : 'left',\n 'bottom',\n 'top',\n 'left',\n 'right',\n ];\n\n // De-duplicate while preserving order\n const candidates = [...new Set(order)];\n\n function calcRaw(p: PopoverPlacement): { top: number; left: number } {\n if (p === 'bottom') {\n return {\n top: trigger.bottom + GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'top') {\n return {\n top: trigger.top - popover.height - GAP,\n left: trigger.left + trigger.width / 2 - popover.width / 2,\n };\n }\n\n if (p === 'left') {\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.left - popover.width - GAP,\n };\n }\n\n return {\n top: trigger.top + trigger.height / 2 - popover.height / 2,\n left: trigger.right + GAP,\n };\n }\n\n // First pass: find a placement that fits both axes perfectly.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n\n if (fitsH && fitsV) {\n // Always use pixel arrowOffset (never rely on CSS left:50%) so the arrow\n // points exactly at the trigger center regardless of sub-pixel rounding.\n const arrowOffset =\n p === 'top' || p === 'bottom'\n ? trigger.left + trigger.width / 2 - left\n : trigger.top + trigger.height / 2 - top;\n\n return { top, left, placement: p, arrowOffset };\n }\n }\n\n // Second pass: fits the primary axis; clamp the secondary axis and\n // shift the arrow so it still points at the trigger center.\n for (const p of candidates) {\n const { top, left } = calcRaw(p);\n const fitsV = top >= MARGIN && top + popover.height <= vh - MARGIN;\n const fitsH = left >= MARGIN && left + popover.width <= vw - MARGIN;\n\n if ((p === 'top' || p === 'bottom') && fitsV) {\n const clampedLeft = Math.max(MARGIN, Math.min(left, vw - popover.width - MARGIN));\n const rawOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top,\n left: clampedLeft,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.width - ARROW_HALF - 4)),\n };\n }\n\n if ((p === 'left' || p === 'right') && fitsH) {\n const clampedTop = Math.max(MARGIN, Math.min(top, vh - popover.height - MARGIN));\n const rawOffset = trigger.top + trigger.height / 2 - clampedTop;\n\n return {\n top: clampedTop,\n left,\n placement: p,\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawOffset, popover.height - ARROW_HALF - 4)),\n };\n }\n }\n\n // Fallback: clamp bottom placement and shift arrow to match trigger.\n const fbTop = trigger.bottom + GAP;\n const fbLeft = trigger.left + trigger.width / 2 - popover.width / 2;\n const clampedTop = Math.max(MARGIN, Math.min(fbTop, vh - popover.height - MARGIN));\n const clampedLeft = Math.max(MARGIN, Math.min(fbLeft, vw - popover.width - MARGIN));\n const rawArrowOffset = trigger.left + trigger.width / 2 - clampedLeft;\n\n return {\n top: clampedTop,\n left: clampedLeft,\n placement: 'bottom',\n arrowOffset: Math.max(ARROW_HALF + 4, Math.min(rawArrowOffset, popover.width - ARROW_HALF - 4)),\n };\n}\n\n/**\n * Floating panel anchored to a trigger element.\n *\n * Unlike `Tooltip`, a Popover can contain rich interactive content\n * (menus, forms, details). It follows the Adwaita `GtkPopover` pattern.\n *\n * - Supports both controlled (`open` + `onClose`) and uncontrolled modes.\n * - Auto-positions with viewport-aware flip.\n * - Closes on Escape, outside click, or trigger re-click.\n * - Focus is moved into the panel on open; returns to the trigger on close.\n * - `aria-haspopup=\"dialog\"` + `aria-expanded` wired to the trigger.\n * - `role=\"dialog\"` on the panel with `aria-labelledby` when a heading is present.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Popover.html\n */\nexport const Popover = ({\n content,\n placement: preferredPlacement = 'bottom',\n open: controlledOpen,\n onClose,\n onOpenChange,\n children,\n}: PopoverProps) => {\n const isControlled = controlledOpen !== undefined;\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const [pos, setPos] = useState<Position | null>(null);\n\n const triggerId = useId();\n const popoverId = useId();\n const triggerRef = useRef<HTMLElement>(null);\n const panelRef = useRef<HTMLDivElement>(null);\n const previouslyFocused = useRef<Element | null>(null);\n\n const close = useCallback(() => {\n if (isControlled) {\n onClose?.();\n } else {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n }, [isControlled, onClose, onOpenChange]);\n\n const toggle = useCallback(() => {\n if (open) {\n close();\n } else {\n if (!isControlled) {\n setUncontrolledOpen(true);\n }\n\n onOpenChange?.(true);\n }\n }, [open, close, isControlled, onOpenChange]);\n\n // Position panel\n const place = useCallback(() => {\n if (!triggerRef.current || !panelRef.current) {\n return;\n }\n\n setPos(\n computePosition(\n triggerRef.current.getBoundingClientRect(),\n panelRef.current.getBoundingClientRect(),\n preferredPlacement,\n ),\n );\n }, [preferredPlacement]);\n\n // Reposition on open, scroll, resize\n useEffect(() => {\n if (!open) {\n return;\n }\n\n // Two RAF: first lets panel mount with hidden styles so we can measure it;\n // second applies the measured position.\n const id = requestAnimationFrame(() => {\n place();\n window.addEventListener('scroll', place, { passive: true, capture: true });\n window.addEventListener('resize', place, { passive: true });\n });\n\n return () => {\n cancelAnimationFrame(id);\n window.removeEventListener('scroll', place, { capture: true });\n window.removeEventListener('resize', place);\n };\n }, [open, place]);\n\n // Save / restore focus\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n requestAnimationFrame(() => {\n const first = panelRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n (first ?? panelRef.current)?.focus();\n });\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n setPos(null);\n }\n }, [open]);\n\n // Close on outside pointer\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const handler = (e: MouseEvent) => {\n if (\n !triggerRef.current?.contains(e.target as Node) &&\n !panelRef.current?.contains(e.target as Node)\n ) {\n close();\n }\n };\n\n document.addEventListener('mousedown', handler);\n\n return () => document.removeEventListener('mousedown', handler);\n }, [open, close]);\n\n // Escape key\n const handlePanelKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n close();\n }\n },\n [close],\n );\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const trigger = cloneElement(children as any, {\n ref: triggerRef,\n id: triggerId,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': open,\n 'aria-controls': open ? popoverId : undefined,\n onClick: (e: ReactMouseEvent<HTMLElement>) => {\n toggle();\n children.props.onClick?.(e);\n },\n });\n\n const panel = (\n <div\n ref={panelRef}\n id={popoverId}\n role=\"dialog\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n className={[\n styles.panel,\n pos ? styles[pos.placement] : null,\n open && pos ? styles.visible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n pos\n ? { top: pos.top, left: pos.left }\n : { visibility: 'hidden', pointerEvents: 'none', top: -9999, left: -9999 }\n }\n onKeyDown={handlePanelKeyDown}\n >\n {/* Arrow — offset shifts it to point at the trigger when the panel is clamped */}\n <div\n className={styles.arrow}\n aria-hidden=\"true\"\n style={\n pos?.arrowOffset !== undefined\n ? pos.placement === 'top' || pos.placement === 'bottom'\n ? { left: pos.arrowOffset - ARROW_HALF, marginLeft: 0 }\n : { top: pos.arrowOffset - ARROW_HALF, marginTop: 0 }\n : undefined\n }\n />\n {content}\n </div>\n );\n\n return (\n <>\n {trigger}\n {open && (typeof document !== 'undefined' ? createPortal(panel, document.body) : panel)}\n </>\n );\n};\n"],"mappings":";;;;;AA+DA,IAAM,IAAM,GACN,IAAS,IACT,IAAa;AAEnB,SAAS,EACP,GACA,GACA,GACU;CACV,IAAM,IAAK,OAAO,YACZ,IAAK,OAAO,aAkBZ,IAAa,CAAC,GAAG,IAAI,IAAI;EAf7B;EACA,MAAc,QACV,WACA,MAAc,WACZ,QACA,MAAc,SACZ,UACA;EACR;EACA;EACA;EACA;CAI6B,CAAK,CAAC;CAErC,SAAS,EAAQ,GAAoD;EAsBnE,OArBI,MAAM,WACD;GACL,KAAK,EAAQ,SAAS;GACtB,MAAM,EAAQ,OAAO,EAAQ,QAAQ,IAAI,EAAQ,QAAQ;EAC3D,IAGE,MAAM,QACD;GACL,KAAK,EAAQ,MAAM,EAAQ,SAAS;GACpC,MAAM,EAAQ,OAAO,EAAQ,QAAQ,IAAI,EAAQ,QAAQ;EAC3D,IAGE,MAAM,SACD;GACL,KAAK,EAAQ,MAAM,EAAQ,SAAS,IAAI,EAAQ,SAAS;GACzD,MAAM,EAAQ,OAAO,EAAQ,QAAQ;EACvC,IAGK;GACL,KAAK,EAAQ,MAAM,EAAQ,SAAS,IAAI,EAAQ,SAAS;GACzD,MAAM,EAAQ,QAAQ;EACxB;CACF;CAGA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,IAAM,EAAO,UAAU;EACjC,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,OACE,IACI;GAAE,KAAK,EAAI;GAAK,MAAM,EAAI;EAAK,IAC/B;GAAE,YAAY;GAAU,eAAe;GAAQ,KAAK;GAAO,MAAM;EAAM;EAE7E,WAAW;YAlBb,CAqBE,kBAAC,OAAD;GACE,WAAW,EAAO;GAClB,eAAY;GACZ,OACE,GAAK,gBAAgB,KAAA,IAIjB,KAAA,IAHA,EAAI,cAAc,SAAS,EAAI,cAAc,WAC3C;IAAE,MAAM,EAAI,cAAc;IAAY,YAAY;GAAE,IACpD;IAAE,KAAK,EAAI,cAAc;IAAY,WAAW;GAAE;EAG3D,CAAA,GACA,CACE;;CAGP,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,GACA,MAAS,OAAO,WAAa,MAAc,EAAa,GAAO,SAAS,IAAI,IAAI,EACjF,EAAA,CAAA;AAEN"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./Popover/Popover.cjs`);exports.Popover=e.Popover;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Popover/Popover.cjs");exports.Popover=e.Popover;
@@ -1,2 +1,2 @@
1
- const e=require(`./PreferencesDialog.module.css.cjs`);let t=require(`react`),n=require(`react-dom`),r=require(`react/jsx-runtime`);var i=`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function a(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.current?.querySelectorAll(i)??[]);if(!n.length)return;let r=n[0],a=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),r.focus())}function o({open:o,onClose:s,children:c,searchable:l=!0,className:u,...d}){let f=(0,t.useRef)(null),p=(0,t.useRef)(null),m=(0,t.useId)(),h=t.Children.toArray(c).filter(e=>(0,t.isValidElement)(e)),[g,_]=(0,t.useState)(0),[v,y]=(0,t.useState)(``);(0,t.useEffect)(()=>{if(o){_(0),y(``);let e=requestAnimationFrame(()=>{l&&p.current?p.current.focus():(f.current?.querySelector(i))?.focus()});return()=>cancelAnimationFrame(e)}},[o,l]);let b=(0,t.useCallback)(e=>{if(e.key===`Escape`){e.stopPropagation(),s();return}a(e,f)},[s]),x=h.length>1,S=h[g]??h[0],C=v.trim().toLowerCase();return o?(0,n.createPortal)((0,r.jsx)(`div`,{className:e.default.backdrop,onClick:e=>{e.target===e.currentTarget&&s()},role:`presentation`,children:(0,r.jsxs)(`div`,{ref:f,role:`dialog`,"aria-modal":`true`,"aria-labelledby":m,className:[e.default.dialog,x?e.default.dialogMulti:null,u].filter(Boolean).join(` `),onKeyDown:b,...d,children:[(0,r.jsxs)(`div`,{className:e.default.header,children:[(0,r.jsx)(`button`,{type:`button`,className:e.default.closeBtn,onClick:s,"aria-label":`Close preferences`,children:`✕`}),(0,r.jsx)(`span`,{id:m,className:e.default.title,children:`Preferences`}),l&&(0,r.jsx)(`div`,{className:e.default.searchWrap,children:(0,r.jsx)(`input`,{ref:p,type:`search`,placeholder:`Search…`,value:v,onChange:e=>y(e.target.value),className:e.default.searchInput,"aria-label":`Search preferences`})})]}),(0,r.jsxs)(`div`,{className:e.default.body,children:[x&&(0,r.jsx)(`nav`,{className:e.default.sidebar,"aria-label":`Preferences pages`,children:(0,r.jsx)(`ul`,{className:e.default.navList,children:h.map((t,n)=>(0,r.jsx)(`li`,{role:`presentation`,children:(0,r.jsxs)(`button`,{role:`tab`,type:`button`,"aria-selected":n===g,className:[e.default.navItem,n===g?e.default.navItemActive:null].filter(Boolean).join(` `),onClick:()=>_(n),children:[t.props.iconName&&(0,r.jsx)(`span`,{className:[e.default.navIcon,`icon`,t.props.iconName].join(` `),"aria-hidden":`true`}),(0,r.jsx)(`span`,{className:e.default.navLabel,children:t.props.title})]})},n))})}),(0,r.jsx)(`div`,{className:e.default.pageWrap,children:S&&(0,t.cloneElement)(S,{"data-search-query":C||void 0})})]})]})}),document.body):null}exports.PreferencesDialog=o;
1
+ const e=require("./PreferencesDialog.module.css.cjs");let t=require("react"),n=require("react-dom"),r=require("react/jsx-runtime");var i=`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function a(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.current?.querySelectorAll(i)??[]);if(!n.length)return;let r=n[0],a=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),r.focus())}var o=({open:o,onClose:s,children:c,searchable:l=!0,className:u,...d})=>{let f=(0,t.useRef)(null),p=(0,t.useRef)(null),m=(0,t.useId)(),h=t.Children.toArray(c).filter(e=>(0,t.isValidElement)(e)),[g,_]=(0,t.useState)(0),[v,y]=(0,t.useState)(``);(0,t.useEffect)(()=>{if(o){_(0),y(``);let e=requestAnimationFrame(()=>{l&&p.current?p.current.focus():(f.current?.querySelector(i))?.focus()});return()=>cancelAnimationFrame(e)}},[o,l]);let b=(0,t.useCallback)(e=>{if(e.key===`Escape`){e.stopPropagation(),s();return}a(e,f)},[s]),x=h.length>1,S=h[g]??h[0],C=v.trim().toLowerCase();return o?(0,n.createPortal)((0,r.jsx)(`div`,{className:e.default.backdrop,onClick:e=>{e.target===e.currentTarget&&s()},role:`presentation`,children:(0,r.jsxs)(`div`,{ref:f,role:`dialog`,"aria-modal":`true`,"aria-labelledby":m,className:[e.default.dialog,x?e.default.dialogMulti:null,u].filter(Boolean).join(` `),onKeyDown:b,...d,children:[(0,r.jsxs)(`div`,{className:e.default.header,children:[(0,r.jsx)(`button`,{type:`button`,className:e.default.closeBtn,onClick:s,"aria-label":`Close preferences`,children:`✕`}),(0,r.jsx)(`span`,{id:m,className:e.default.title,children:`Preferences`}),l&&(0,r.jsx)(`div`,{className:e.default.searchWrap,children:(0,r.jsx)(`input`,{ref:p,type:`search`,placeholder:`Search…`,value:v,onChange:e=>y(e.target.value),className:e.default.searchInput,"aria-label":`Search preferences`})})]}),(0,r.jsxs)(`div`,{className:e.default.body,children:[x&&(0,r.jsx)(`nav`,{className:e.default.sidebar,"aria-label":`Preferences pages`,children:(0,r.jsx)(`ul`,{className:e.default.navList,children:h.map((t,n)=>(0,r.jsx)(`li`,{role:`presentation`,children:(0,r.jsxs)(`button`,{role:`tab`,type:`button`,"aria-selected":n===g,className:[e.default.navItem,n===g?e.default.navItemActive:null].filter(Boolean).join(` `),onClick:()=>_(n),children:[t.props.iconName&&(0,r.jsx)(`span`,{className:[e.default.navIcon,`icon`,t.props.iconName].join(` `),"aria-hidden":`true`}),(0,r.jsx)(`span`,{className:e.default.navLabel,children:t.props.title})]})},n))})}),(0,r.jsx)(`div`,{className:e.default.pageWrap,children:S&&(0,t.cloneElement)(S,{"data-search-query":C||void 0})})]})]})}),document.body):null};exports.PreferencesDialog=o;
2
2
  //# sourceMappingURL=PreferencesDialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesDialog.cjs","names":[],"sources":["../../../src/components/PreferencesDialog/PreferencesDialog.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n type HTMLAttributes,\n isValidElement,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport type { PreferencesPageProps } from '../PreferencesPage/PreferencesPage';\n\nimport styles from './PreferencesDialog.module.css';\n\n// ─── Focus trap ───────────────────────────────────────────────────────────────\n\nconst FOCUSABLE =\n 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nfunction trapFocus(e: KeyboardEvent<HTMLDivElement>, ref: RefObject<HTMLDivElement | null>) {\n if (e.key !== 'Tab') {\n return;\n }\n\n const focusable = Array.from(ref.current?.querySelectorAll<HTMLElement>(FOCUSABLE) ?? []);\n\n if (!focusable.length) {\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (e.shiftKey) {\n if (document.activeElement === first) {\n e.preventDefault();\n last.focus();\n }\n } else {\n if (document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface PreferencesDialogProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Whether the dialog is open. */\n open: boolean;\n /** Called when the user requests to close the dialog. */\n onClose: () => void;\n /**\n * `PreferencesPage` children. Each page appears as a sidebar entry.\n * When only one page is provided the sidebar is hidden.\n */\n children?: ReactNode;\n /**\n * Whether to show a search bar in the header.\n * When `true` the user can filter group/row content by typing.\n * Defaults to `true`.\n */\n searchable?: boolean;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Multi-page settings dialog using `PreferencesPage` tabs.\n *\n * Renders a wide modal with an optional sidebar listing pages. Each\n * `PreferencesPage` child becomes a navigation entry. Supports built-in\n * search when `searchable` is `true` (the default).\n *\n * Mirrors `AdwPreferencesDialog`.\n *\n * @example\n * ```tsx\n * <PreferencesDialog open={open} onClose={() => setOpen(false)}>\n * <PreferencesPage title=\"General\" iconName=\"preferences-system-symbolic\">\n * <PreferencesGroup title=\"Appearance\">\n * <BoxedList>\n * <SwitchRow title=\"Dark mode\" />\n * </BoxedList>\n * </PreferencesGroup>\n * </PreferencesPage>\n * </PreferencesDialog>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PreferencesDialog.html\n */\nexport function PreferencesDialog({\n open,\n onClose,\n children,\n searchable = true,\n className,\n ...props\n}: PreferencesDialogProps) {\n const dialogRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n const titleId = useId();\n\n const pages = Children.toArray(children).filter((c): c is ReactElement<PreferencesPageProps> =>\n isValidElement(c),\n ) as ReactElement<PreferencesPageProps>[];\n\n const [activeIndex, setActiveIndex] = useState(0);\n const [searchQuery, setSearchQuery] = useState('');\n\n // Reset state when dialog opens\n useEffect(() => {\n if (open) {\n setActiveIndex(0);\n setSearchQuery('');\n // Focus search or first focusable after open animation\n const id = requestAnimationFrame(() => {\n if (searchable && searchRef.current) {\n searchRef.current.focus();\n } else {\n const first = dialogRef.current?.querySelector<HTMLElement>(FOCUSABLE);\n\n first?.focus();\n }\n });\n\n return () => cancelAnimationFrame(id);\n }\n }, [open, searchable]);\n\n // Close on Escape\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n onClose();\n\n return;\n }\n\n trapFocus(e, dialogRef);\n },\n [onClose],\n );\n\n const multiPage = pages.length > 1;\n const activePage = pages[activeIndex] ?? pages[0];\n\n // Filter content by search query\n const query = searchQuery.trim().toLowerCase();\n\n if (!open) {\n return null;\n }\n\n return createPortal(\n <div\n className={styles.backdrop}\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n onClose();\n }\n }}\n role=\"presentation\"\n >\n <div\n ref={dialogRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n className={[styles.dialog, multiPage ? styles.dialogMulti : null, className]\n .filter(Boolean)\n .join(' ')}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {/* ── Header ─────────────────────────────────────────────────────── */}\n <div className={styles.header}>\n <button\n type=\"button\"\n className={styles.closeBtn}\n onClick={onClose}\n aria-label=\"Close preferences\"\n >\n ✕\n </button>\n <span id={titleId} className={styles.title}>\n Preferences\n </span>\n {searchable && (\n <div className={styles.searchWrap}>\n <input\n ref={searchRef}\n type=\"search\"\n placeholder=\"Search…\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className={styles.searchInput}\n aria-label=\"Search preferences\"\n />\n </div>\n )}\n </div>\n\n {/* ── Body ───────────────────────────────────────────────────────── */}\n <div className={styles.body}>\n {/* Sidebar — only shown when there are multiple pages */}\n {multiPage && (\n <nav className={styles.sidebar} aria-label=\"Preferences pages\">\n <ul className={styles.navList}>\n {pages.map((page, i) => (\n <li key={i} role=\"presentation\">\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={i === activeIndex}\n className={[styles.navItem, i === activeIndex ? styles.navItemActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => setActiveIndex(i)}\n >\n {page.props.iconName && (\n <span\n className={[styles.navIcon, 'icon', page.props.iconName].join(' ')}\n aria-hidden=\"true\"\n />\n )}\n <span className={styles.navLabel}>{page.props.title}</span>\n </button>\n </li>\n ))}\n </ul>\n </nav>\n )}\n\n {/* Page content */}\n <div className={styles.pageWrap}>\n {activePage &&\n cloneElement(activePage, {\n 'data-search-query': query || undefined,\n } as Partial<PreferencesPageProps>)}\n </div>\n </div>\n </div>\n </div>,\n document.body,\n );\n}\n"],"mappings":"mIAwBA,IAAM,EACJ,2IAEF,SAAS,EAAU,EAAkC,EAAuC,CAC1F,GAAI,EAAE,MAAQ,MACZ,OAGF,IAAM,EAAY,MAAM,KAAK,EAAI,SAAS,iBAA8B,EAAU,EAAI,EAAE,CAAC,CAEzF,GAAI,CAAC,EAAU,OACb,OAGF,IAAM,EAAQ,EAAU,GAClB,EAAO,EAAU,EAAU,OAAS,GAEtC,EAAE,SACA,SAAS,gBAAkB,IAC7B,EAAE,gBAAgB,CAClB,EAAK,OAAO,EAGV,SAAS,gBAAkB,IAC7B,EAAE,gBAAgB,CAClB,EAAM,OAAO,EAmDnB,SAAgB,EAAkB,CAChC,OACA,UACA,WACA,aAAa,GACb,YACA,GAAG,GACsB,CACzB,IAAM,GAAA,EAAA,EAAA,QAAmC,KAAK,CACxC,GAAA,EAAA,EAAA,QAAqC,KAAK,CAC1C,GAAA,EAAA,EAAA,QAAiB,CAEjB,EAAQ,EAAA,SAAS,QAAQ,EAAS,CAAC,OAAQ,IAAA,EAAA,EAAA,gBAChC,EAAE,CAClB,CAEK,CAAC,EAAa,IAAA,EAAA,EAAA,UAA2B,EAAE,CAC3C,CAAC,EAAa,I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AA,KAAC,QAAD,CACE,IAAK,EACL,KAAK,SACL,YAAY,UACZ,MAAO,EACP,SAAW,GAAM,EAAe,EAAE,OAAO,MAAM,CAC/C,UAAW,EAAA,QAAO,YAClB,aAAW,qBACX,CAAA,CACE,CAAA,CAEJ,IAGN,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,QAAO,cAAvB,CAEG,IACC,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAS,aAAW,8BACzC,EAAA,EAAA,KAAC,KAAD,CAAI,UAAW,EAAA,QAAO,iBACnB,EAAM,KAAK,EAAM,KAChB,EAAA,EAAA,KAAC,KAAD,CAAY,KAAK,yBACf,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,MACL,KAAK,SACL,gBAAe,IAAM,EACrB,UAAW,CAAC,EAAA,QAAO,QAAS,IAAM,EAAc,EAAA,QAAO,cAAgB,KAAK,CACzE,OAAO,QAAQ,CACf,KAAK,IAAI,CACZ,YAAe,EAAe,EAAE,UAPlC,CASG,EAAK,MAAM,WACV,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,CAAC,EAAA,QAAO,QAAS,OAAQ,EAAK,MAAM,SAAS,CAAC,KAAK,IAAI,CAClE,cAAY,OACZ,CAAA,EAEJ,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,EAAK,MAAM,MAAa,CAAA,CACpD,GACN,CAlBI,EAkBJ,CACL,CACC,CAAA,CACD,CAAA,EAIR,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,kBACpB,IAAA,EAAA,EAAA,cACc,EAAY,CACvB,oBAAqB,GAAS,IAAA,GAC/B,CAAkC,CACjC,CAAA,CACF,GACF,GACF,CAAA,CACN,SAAS,KACV,CA9FQ"}
1
+ {"version":3,"file":"PreferencesDialog.cjs","names":[],"sources":["../../../src/components/PreferencesDialog/PreferencesDialog.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n type HTMLAttributes,\n isValidElement,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport type { PreferencesPageProps } from '../PreferencesPage/PreferencesPage';\n\nimport styles from './PreferencesDialog.module.css';\n\n// ─── Focus trap ───────────────────────────────────────────────────────────────\n\nconst FOCUSABLE =\n 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nfunction trapFocus(e: KeyboardEvent<HTMLDivElement>, ref: RefObject<HTMLDivElement | null>) {\n if (e.key !== 'Tab') {\n return;\n }\n\n const focusable = Array.from(ref.current?.querySelectorAll<HTMLElement>(FOCUSABLE) ?? []);\n\n if (!focusable.length) {\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (e.shiftKey) {\n if (document.activeElement === first) {\n e.preventDefault();\n last.focus();\n }\n } else {\n if (document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface PreferencesDialogProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Whether the dialog is open. */\n open: boolean;\n /** Called when the user requests to close the dialog. */\n onClose: () => void;\n /**\n * `PreferencesPage` children. Each page appears as a sidebar entry.\n * When only one page is provided the sidebar is hidden.\n */\n children?: ReactNode;\n /**\n * Whether to show a search bar in the header.\n * When `true` the user can filter group/row content by typing.\n * Defaults to `true`.\n */\n searchable?: boolean;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Multi-page settings dialog using `PreferencesPage` tabs.\n *\n * Renders a wide modal with an optional sidebar listing pages. Each\n * `PreferencesPage` child becomes a navigation entry. Supports built-in\n * search when `searchable` is `true` (the default).\n *\n * Mirrors `AdwPreferencesDialog`.\n *\n * @example\n * ```tsx\n * <PreferencesDialog open={open} onClose={() => setOpen(false)}>\n * <PreferencesPage title=\"General\" iconName=\"preferences-system-symbolic\">\n * <PreferencesGroup title=\"Appearance\">\n * <BoxedList>\n * <SwitchRow title=\"Dark mode\" />\n * </BoxedList>\n * </PreferencesGroup>\n * </PreferencesPage>\n * </PreferencesDialog>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PreferencesDialog.html\n */\nexport const PreferencesDialog = ({\n open,\n onClose,\n children,\n searchable = true,\n className,\n ...props\n}: PreferencesDialogProps) => {\n const dialogRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n const titleId = useId();\n\n const pages = Children.toArray(children).filter((c): c is ReactElement<PreferencesPageProps> =>\n isValidElement(c),\n ) as ReactElement<PreferencesPageProps>[];\n\n const [activeIndex, setActiveIndex] = useState(0);\n const [searchQuery, setSearchQuery] = useState('');\n\n // Reset state when dialog opens\n useEffect(() => {\n if (open) {\n setActiveIndex(0);\n setSearchQuery('');\n // Focus search or first focusable after open animation\n const id = requestAnimationFrame(() => {\n if (searchable && searchRef.current) {\n searchRef.current.focus();\n } else {\n const first = dialogRef.current?.querySelector<HTMLElement>(FOCUSABLE);\n\n first?.focus();\n }\n });\n\n return () => cancelAnimationFrame(id);\n }\n }, [open, searchable]);\n\n // Close on Escape\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n onClose();\n\n return;\n }\n\n trapFocus(e, dialogRef);\n },\n [onClose],\n );\n\n const multiPage = pages.length > 1;\n const activePage = pages[activeIndex] ?? pages[0];\n\n // Filter content by search query\n const query = searchQuery.trim().toLowerCase();\n\n if (!open) {\n return null;\n }\n\n return createPortal(\n <div\n className={styles.backdrop}\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n onClose();\n }\n }}\n role=\"presentation\"\n >\n <div\n ref={dialogRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n className={[styles.dialog, multiPage ? styles.dialogMulti : null, className]\n .filter(Boolean)\n .join(' ')}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {/* ── Header ─────────────────────────────────────────────────────── */}\n <div className={styles.header}>\n <button\n type=\"button\"\n className={styles.closeBtn}\n onClick={onClose}\n aria-label=\"Close preferences\"\n >\n ✕\n </button>\n <span id={titleId} className={styles.title}>\n Preferences\n </span>\n {searchable && (\n <div className={styles.searchWrap}>\n <input\n ref={searchRef}\n type=\"search\"\n placeholder=\"Search…\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className={styles.searchInput}\n aria-label=\"Search preferences\"\n />\n </div>\n )}\n </div>\n\n {/* ── Body ───────────────────────────────────────────────────────── */}\n <div className={styles.body}>\n {/* Sidebar — only shown when there are multiple pages */}\n {multiPage && (\n <nav className={styles.sidebar} aria-label=\"Preferences pages\">\n <ul className={styles.navList}>\n {pages.map((page, i) => (\n <li key={i} role=\"presentation\">\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={i === activeIndex}\n className={[styles.navItem, i === activeIndex ? styles.navItemActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => setActiveIndex(i)}\n >\n {page.props.iconName && (\n <span\n className={[styles.navIcon, 'icon', page.props.iconName].join(' ')}\n aria-hidden=\"true\"\n />\n )}\n <span className={styles.navLabel}>{page.props.title}</span>\n </button>\n </li>\n ))}\n </ul>\n </nav>\n )}\n\n {/* Page content */}\n <div className={styles.pageWrap}>\n {activePage &&\n cloneElement(activePage, {\n 'data-search-query': query || undefined,\n } as Partial<PreferencesPageProps>)}\n </div>\n </div>\n </div>\n </div>,\n document.body,\n );\n};\n"],"mappings":"mIAwBA,IAAM,EACJ,2IAEF,SAAS,EAAU,EAAkC,EAAuC,CAC1F,GAAI,EAAE,MAAQ,MACZ,OAGF,IAAM,EAAY,MAAM,KAAK,EAAI,SAAS,iBAA8B,CAAS,GAAK,CAAC,CAAC,EAExF,GAAI,CAAC,EAAU,OACb,OAGF,IAAM,EAAQ,EA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AC,EAAA,QAAO,QAAS,OAAQ,EAAK,MAAM,QAAQ,EAAE,KAAK,GAAG,EACjE,cAAY,MACb,CAAA,GAEH,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,EAAK,MAAM,KAAY,CAAA,CACpD,GACN,EAlBK,CAkBL,CACL,CACC,CAAA,CACD,CAAA,GAIP,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,kBACpB,IAAA,EAAA,EAAA,cACc,EAAY,CACvB,oBAAqB,GAAS,IAAA,EAChC,CAAkC,CACjC,CAAA,CACF,GACF,GACF,CAAA,EACL,SAAS,IACX,EA9FS,IA+FX"}
@@ -40,4 +40,4 @@ export interface PreferencesDialogProps extends Omit<HTMLAttributes<HTMLDivEleme
40
40
  *
41
41
  * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PreferencesDialog.html
42
42
  */
43
- export declare function PreferencesDialog({ open, onClose, children, searchable, className, ...props }: PreferencesDialogProps): import('react').ReactPortal | null;
43
+ export declare const PreferencesDialog: ({ open, onClose, children, searchable, className, ...props }: PreferencesDialogProps) => import('react').ReactPortal | null;