@persona/design-system 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{Action-DnR0YTxO.d.mts → Action-CnNf5T-l.d.mts} +2 -2
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/AdvancedFilterRuleRow.d.mts +3 -3
  5. package/dist/AdvancedFilterRulesPopover.d.mts +3 -3
  6. package/dist/ArrayValueControl.d.mts +1 -1
  7. package/dist/Attribute.d.mts +2 -2
  8. package/dist/AttributeGrid.d.mts +1 -1
  9. package/dist/{Badge-DRn_r6is.mjs → Badge-BqS6Nk4J.mjs} +2 -2
  10. package/dist/{Badge-DRn_r6is.mjs.map → Badge-BqS6Nk4J.mjs.map} +1 -1
  11. package/dist/Banner.d.mts +1 -1
  12. package/dist/BooleanValueControl.d.mts +1 -1
  13. package/dist/{Breadcrumbs-Byf2ye6H.mjs → Breadcrumbs-CqKtnZqu.mjs} +8 -8
  14. package/dist/{Breadcrumbs-Byf2ye6H.mjs.map → Breadcrumbs-CqKtnZqu.mjs.map} +1 -1
  15. package/dist/{Button-DkjwN_Op.d.mts → Button-C0F0F2IL.d.mts} +2 -2
  16. package/dist/Button.d.mts +1 -1
  17. package/dist/ButtonGroup.d.mts +1 -1
  18. package/dist/Calendar-BvLNcHQM.d.mts +12 -0
  19. package/dist/Calendar.d.mts +2 -12
  20. package/dist/CalendarBase.d.mts +1 -1
  21. package/dist/{Card-CLTkZLKr.mjs → Card-BMCB9eFC.mjs} +4 -4
  22. package/dist/{Card-CLTkZLKr.mjs.map → Card-BMCB9eFC.mjs.map} +1 -1
  23. package/dist/{Card-DxFajLnx.d.mts → Card-BxNoIQWw.d.mts} +3 -3
  24. package/dist/Card.d.mts +1 -1
  25. package/dist/Card2.d.mts +1 -1
  26. package/dist/{CardV2-m9yOInMU.mjs → CardV2-B0ZweQYk.mjs} +22 -16
  27. package/dist/CardV2-B0ZweQYk.mjs.map +1 -0
  28. package/dist/{Checkbox-Bmm-r5ei.d.mts → Checkbox-Bm8exUfH.d.mts} +1 -1
  29. package/dist/{Checkbox-CU27-Aa8.mjs → Checkbox-DAvbgZgO.mjs} +5 -5
  30. package/dist/Checkbox-DAvbgZgO.mjs.map +1 -0
  31. package/dist/Checkbox.d.mts +1 -1
  32. package/dist/CheckboxGroupField.d.mts +2 -2
  33. package/dist/ChoicesValueControl.d.mts +1 -1
  34. package/dist/{Combobox-BgKEHP9p.d.mts → Combobox-C8ue0cBP.d.mts} +3 -3
  35. package/dist/{Combobox-DhTUY8JT.mjs → Combobox-xBrxiUAu.mjs} +18 -18
  36. package/dist/Combobox-xBrxiUAu.mjs.map +1 -0
  37. package/dist/Combobox.d.mts +2 -2
  38. package/dist/{ComboboxBase-Dmzn8a53.d.mts → ComboboxBase-DJGTMf1_.d.mts} +6 -6
  39. package/dist/ComboboxBase.d.mts +1 -1
  40. package/dist/{ComboboxMultiSelect-BLKUKNEW.d.mts → ComboboxMultiSelect-D7A2bbWU.d.mts} +2 -2
  41. package/dist/ComboboxMultiSelect.d.mts +1 -1
  42. package/dist/{ComboboxSingleSelect-Kpl-iOok.d.mts → ComboboxSingleSelect-D1uzEyKj.d.mts} +4 -4
  43. package/dist/ComboboxSingleSelect.d.mts +1 -1
  44. package/dist/{CompactBar-E9hPDRvI.d.mts → CompactBar-DMuvqaV5.d.mts} +3 -3
  45. package/dist/CompactBar.d.mts +1 -1
  46. package/dist/{ConfigFormGroup-GgzSDzgL.mjs → ConfigFormGroup-D2_sajXe.mjs} +2 -2
  47. package/dist/{ConfigFormGroup-GgzSDzgL.mjs.map → ConfigFormGroup-D2_sajXe.mjs.map} +1 -1
  48. package/dist/{ControlBar-DYrjBDzu.d.mts → ControlBar-Dg8JeU8f.d.mts} +2 -2
  49. package/dist/ControlBar.d.mts +1 -1
  50. package/dist/DataTable.d.mts +4 -4
  51. package/dist/DateField-Com9f2-j.d.mts +23 -0
  52. package/dist/DateField.d.mts +2 -23
  53. package/dist/DatePicker-BGO6doLx.d.mts +19 -0
  54. package/dist/{DatePicker-DpGvo7Bd.mjs → DatePicker-BlnE2MBD.mjs} +17 -16
  55. package/dist/{DatePicker-DpGvo7Bd.mjs.map → DatePicker-BlnE2MBD.mjs.map} +1 -1
  56. package/dist/DatePicker.d.mts +2 -19
  57. package/dist/DateRangePicker-DfRBm9z4.d.mts +53 -0
  58. package/dist/DateRangePicker.d.mts +2 -53
  59. package/dist/DateRangeValueControl.d.mts +19 -0
  60. package/dist/DateValueControl.d.mts +1 -1
  61. package/dist/{DropdownButton-DGgfGW_o.mjs → DropdownButton-CpWNRUma.mjs} +3 -3
  62. package/dist/{DropdownButton-DGgfGW_o.mjs.map → DropdownButton-CpWNRUma.mjs.map} +1 -1
  63. package/dist/DropdownButton.d.mts +2 -2
  64. package/dist/{DropdownMenu-DZIFSJXD.mjs → DropdownMenu-BCyV8nC0.mjs} +3 -3
  65. package/dist/{DropdownMenu-DZIFSJXD.mjs.map → DropdownMenu-BCyV8nC0.mjs.map} +1 -1
  66. package/dist/{DropdownMenu-B2t3Bwky.d.mts → DropdownMenu-CnaK78rP.d.mts} +3 -3
  67. package/dist/DropdownMenu.d.mts +1 -1
  68. package/dist/{ErrorProps-DX50vo-U.d.mts → ErrorProps-CN2XjaOX.d.mts} +1 -1
  69. package/dist/ErrorProps.d.mts +1 -1
  70. package/dist/{FieldRegistry-COyIA4VU.d.mts → FieldRegistry-DdA63Vnh.d.mts} +2 -2
  71. package/dist/FieldRegistry.d.mts +1 -1
  72. package/dist/{FilterBar-CS2YjiTr.d.mts → FilterBar-CxNsBVrn.d.mts} +5 -8
  73. package/dist/FilterBar.d.mts +1 -1
  74. package/dist/FilterPickerMenu.d.mts +3 -3
  75. package/dist/FilterPill.d.mts +1 -1
  76. package/dist/FilterPopover.d.mts +3 -13
  77. package/dist/FloatValueControl.d.mts +1 -1
  78. package/dist/FloatingPanel.d.mts +80 -0
  79. package/dist/FloatingPanelContext.d.mts +33 -0
  80. package/dist/FloatingPanelRenderer.d.mts +7 -0
  81. package/dist/{FormControl-CZFmub1N.d.mts → FormControl-Doj2gvF0.d.mts} +3 -3
  82. package/dist/{FormControl-BIXJ-FPI.mjs → FormControl-HVzZEqJH.mjs} +4 -4
  83. package/dist/FormControl-HVzZEqJH.mjs.map +1 -0
  84. package/dist/FormControl.d.mts +1 -1
  85. package/dist/{FormField-DcGQvgNW.mjs → FormField-B9P3BWvS.mjs} +50 -48
  86. package/dist/FormField-B9P3BWvS.mjs.map +1 -0
  87. package/dist/{FormField-8rlT8pm0.d.mts → FormField-D8dHbqZZ.d.mts} +2 -2
  88. package/dist/FormField.d.mts +1 -1
  89. package/dist/{Header-OLZuv8fF.d.mts → Header-CBlB65NY.d.mts} +2 -2
  90. package/dist/Header.d.mts +1 -1
  91. package/dist/{HelperTooltip-CJDG7Ugp.d.mts → HelperTooltip-C28h1zFl.d.mts} +3 -3
  92. package/dist/HelperTooltip.d.mts +1 -1
  93. package/dist/{HoverCopyableField-BHdCaR-R.mjs → HoverCopyableField-0Bzygbp9.mjs} +6 -6
  94. package/dist/{HoverCopyableField-BHdCaR-R.mjs.map → HoverCopyableField-0Bzygbp9.mjs.map} +1 -1
  95. package/dist/HoverCopyableField.d.mts +1 -1
  96. package/dist/{IconButton-DC4rh6ow.mjs → IconButton-BfDlic2K.mjs} +8 -8
  97. package/dist/IconButton-BfDlic2K.mjs.map +1 -0
  98. package/dist/{IconButton-Dc17jZPG.d.mts → IconButton-CBcW7ZU8.d.mts} +2 -2
  99. package/dist/IconButton.d.mts +1 -1
  100. package/dist/ImageTile.d.mts +2 -2
  101. package/dist/InlineCombobox.d.mts +2 -2
  102. package/dist/InlineInput.d.mts +1 -1
  103. package/dist/{Input-PWfwMSJ7.mjs → Input-Bimw8KFj.mjs} +4 -4
  104. package/dist/{Input-PWfwMSJ7.mjs.map → Input-Bimw8KFj.mjs.map} +1 -1
  105. package/dist/{Input-DsS4J78T.d.mts → Input-CVdjkX88.d.mts} +4 -4
  106. package/dist/Input.d.mts +1 -1
  107. package/dist/{InputProps-Buxtnz77.d.mts → InputProps-BwKkmImn.d.mts} +2 -2
  108. package/dist/InputProps.d.mts +1 -1
  109. package/dist/IntegerValueControl.d.mts +1 -1
  110. package/dist/Link.d.mts +1 -1
  111. package/dist/{ListBox-Nl9aOBeh.d.mts → ListBox-CDl5oZPX.d.mts} +5 -5
  112. package/dist/{ListBox-BwD-q7wF.mjs → ListBox-DKZpGYjo.mjs} +22 -15
  113. package/dist/ListBox-DKZpGYjo.mjs.map +1 -0
  114. package/dist/ListBox.d.mts +1 -1
  115. package/dist/ListBoxField.d.mts +6 -3
  116. package/dist/{LoadingShimmer-BPYPtFE1.mjs → LoadingShimmer-DC2vqicd.mjs} +1 -1
  117. package/dist/{LoadingShimmer-BPYPtFE1.mjs.map → LoadingShimmer-DC2vqicd.mjs.map} +1 -1
  118. package/dist/LoadingShimmer.d.mts +1 -1
  119. package/dist/{LogicRow-BAREMenx.d.mts → LogicRow-CkbyvrUw.d.mts} +4 -4
  120. package/dist/LogicRow.d.mts +1 -1
  121. package/dist/MaskedInput.d.mts +1 -1
  122. package/dist/{Menu-DM9OoZ71.d.mts → Menu-CYRdEnfo.d.mts} +4 -4
  123. package/dist/{Menu-DpM8o234.mjs → Menu-Dir03WA9.mjs} +3 -3
  124. package/dist/{Menu-DpM8o234.mjs.map → Menu-Dir03WA9.mjs.map} +1 -1
  125. package/dist/Menu.d.mts +1 -1
  126. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs → MiddleTruncatedText-GXI-CPvs.mjs} +3 -3
  127. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs.map → MiddleTruncatedText-GXI-CPvs.mjs.map} +1 -1
  128. package/dist/Modal.d.mts +3 -3
  129. package/dist/{PageHeader-Dq-J3san.mjs → PageHeader-C2IUKhCg.mjs} +3 -3
  130. package/dist/{PageHeader-Dq-J3san.mjs.map → PageHeader-C2IUKhCg.mjs.map} +1 -1
  131. package/dist/PageHeader.d.mts +1 -1
  132. package/dist/PageLayout.d.mts +1 -1
  133. package/dist/{PageSelector-Ca4TcyxG.d.mts → PageSelector-vay4jpMp.d.mts} +3 -3
  134. package/dist/PageSelector.d.mts +1 -1
  135. package/dist/{Pagination-GALyid4q.mjs → Pagination-0VhVdXv0.mjs} +9 -9
  136. package/dist/{Pagination-GALyid4q.mjs.map → Pagination-0VhVdXv0.mjs.map} +1 -1
  137. package/dist/{Pagination-Dcmv7bVe.d.mts → Pagination-ygLutOst.d.mts} +2 -2
  138. package/dist/Pagination.d.mts +1 -1
  139. package/dist/{Pii-BalLvfze.mjs → Pii-C7pA72Bh.mjs} +2 -2
  140. package/dist/{Pii-BalLvfze.mjs.map → Pii-C7pA72Bh.mjs.map} +1 -1
  141. package/dist/Pii.d.mts +1 -1
  142. package/dist/PillShell.d.mts +1 -1
  143. package/dist/{Popover-BZ5Bs80y.mjs → Popover-BkDpDdaO.mjs} +5 -5
  144. package/dist/{Popover-BZ5Bs80y.mjs.map → Popover-BkDpDdaO.mjs.map} +1 -1
  145. package/dist/Popover.d.mts +1 -1
  146. package/dist/ProgressBar.d.mts +1 -1
  147. package/dist/ProgressIndicator.d.mts +1 -1
  148. package/dist/{Radio-CtPz3EzX.mjs → Radio-BaFutxgV.mjs} +3 -3
  149. package/dist/Radio-BaFutxgV.mjs.map +1 -0
  150. package/dist/{RadioGroup-Xn46ovrV.d.mts → RadioGroup-BuJaitgG.d.mts} +1 -1
  151. package/dist/{RadioGroup-sjBzFE_-.mjs → RadioGroup-ClMzOZl0.mjs} +3 -3
  152. package/dist/{RadioGroup-sjBzFE_-.mjs.map → RadioGroup-ClMzOZl0.mjs.map} +1 -1
  153. package/dist/RadioGroup.d.mts +1 -1
  154. package/dist/RangeCalendar.d.mts +1 -1
  155. package/dist/RangeCalendarPresets.d.mts +1 -1
  156. package/dist/RuleEditorFields.d.mts +3 -3
  157. package/dist/RulesPill.d.mts +1 -1
  158. package/dist/{SearchInput-Try11aJD.d.mts → SearchInput-Ca3_np5e.d.mts} +3 -3
  159. package/dist/SearchInput.d.mts +1 -1
  160. package/dist/Section.d.mts +1 -1
  161. package/dist/SectionHeading.d.mts +77 -2
  162. package/dist/{SegmentedControl-BugnH-h2.mjs → SegmentedControl-DgyJL4uN.mjs} +3 -3
  163. package/dist/{SegmentedControl-BugnH-h2.mjs.map → SegmentedControl-DgyJL4uN.mjs.map} +1 -1
  164. package/dist/{SegmentedControl-DckAdhcD.d.mts → SegmentedControl-_I4sWeD7.d.mts} +2 -2
  165. package/dist/SegmentedControl.d.mts +1 -1
  166. package/dist/{Select-DL-AjL0Q.mjs → Select-D6MqSYVa.mjs} +8 -8
  167. package/dist/{Select-DL-AjL0Q.mjs.map → Select-D6MqSYVa.mjs.map} +1 -1
  168. package/dist/{Select-BmJ1OjXA.d.mts → Select-vwXGlHuW.d.mts} +4 -4
  169. package/dist/Select.d.mts +1 -1
  170. package/dist/Slider.d.mts +1 -1
  171. package/dist/SliderRHF.d.mts +1 -1
  172. package/dist/SliderThumb.d.mts +1 -1
  173. package/dist/{Spacer-Ln3KChb5.mjs → Spacer-CJp0lwkL.mjs} +1 -1
  174. package/dist/{Spacer-Ln3KChb5.mjs.map → Spacer-CJp0lwkL.mjs.map} +1 -1
  175. package/dist/{Stack-ckRN7LrP.mjs → Stack-Bl54WmhY.mjs} +1 -1
  176. package/dist/{Stack-ckRN7LrP.mjs.map → Stack-Bl54WmhY.mjs.map} +1 -1
  177. package/dist/{Stack-CbcJykx9.d.mts → Stack-CkV7k7TE.d.mts} +2 -2
  178. package/dist/Stack.d.mts +1 -1
  179. package/dist/StatusIndicator.d.mts +1 -1
  180. package/dist/{Sticker-BIVuastf.d.mts → Sticker-Dhx2wqTL.d.mts} +4 -4
  181. package/dist/{Sticker-B0TbkV4o.mjs → Sticker-xtDMuOoN.mjs} +3 -3
  182. package/dist/{Sticker-B0TbkV4o.mjs.map → Sticker-xtDMuOoN.mjs.map} +1 -1
  183. package/dist/Sticker.d.mts +1 -1
  184. package/dist/StringValueControl.d.mts +1 -1
  185. package/dist/SwatchPicker.d.mts +1 -1
  186. package/dist/Tab.d.mts +2 -2
  187. package/dist/{TabBar-DLf4Hwa4.mjs → TabBar-D6UocZXi.mjs} +4 -4
  188. package/dist/{TabBar-DLf4Hwa4.mjs.map → TabBar-D6UocZXi.mjs.map} +1 -1
  189. package/dist/TabBarIconButton.d.mts +1 -1
  190. package/dist/{Table-C-mx8Uj0.mjs → Table-D1WyUQuv.mjs} +4 -4
  191. package/dist/{Table-C-mx8Uj0.mjs.map → Table-D1WyUQuv.mjs.map} +1 -1
  192. package/dist/{Table-8jXlKYLy.d.mts → Table-cO7ZwGPM.d.mts} +1 -1
  193. package/dist/Table.d.mts +1 -1
  194. package/dist/{TableBody-ByEcFueE.d.mts → TableBody-CirMgfAV.d.mts} +1 -1
  195. package/dist/TableBody.d.mts +1 -1
  196. package/dist/{TableBox-DGjKVQFO.mjs → TableBox-C5qWhr82.mjs} +12 -12
  197. package/dist/{TableBox-DGjKVQFO.mjs.map → TableBox-C5qWhr82.mjs.map} +1 -1
  198. package/dist/TableBox.d.mts +2 -2
  199. package/dist/{TableBoxCell-BmoPs1u1.d.mts → TableBoxCell-DmVX_tgn.d.mts} +7 -7
  200. package/dist/TableBoxCell.d.mts +1 -1
  201. package/dist/TableBoxField.d.mts +4 -4
  202. package/dist/{TableBoxRow-BAYvEDjT.d.mts → TableBoxRow-nwq41Bpi.d.mts} +4 -4
  203. package/dist/TableBoxRow.d.mts +1 -1
  204. package/dist/{TableBoxRowActions-DRs4MdK0.d.mts → TableBoxRowActions-B4_ojiQo.d.mts} +2 -2
  205. package/dist/TableBoxRowActions.d.mts +1 -1
  206. package/dist/TableCell.d.mts +1 -1
  207. package/dist/{TableControls-BK8DCsqi.mjs → TableControls-CZ9iu3ma.mjs} +181 -62
  208. package/dist/TableControls-CZ9iu3ma.mjs.map +1 -0
  209. package/dist/{TableControls-DscP6fyt.d.mts → TableControls-RwIPBxyU.d.mts} +4 -4
  210. package/dist/TableControls.d.mts +1 -1
  211. package/dist/{TableControlsContext-BeJ7GHPN.d.mts → TableControlsContext-D_SBFZN1.d.mts} +2 -2
  212. package/dist/TableControlsContext.d.mts +1 -1
  213. package/dist/{TableHead-g3afLl5B.d.mts → TableHead-DMq_q_W0.d.mts} +1 -1
  214. package/dist/TableHead.d.mts +1 -1
  215. package/dist/{TableHeaderCell-CWTMf2Fe.d.mts → TableHeaderCell-C2pqXBYO.d.mts} +1 -1
  216. package/dist/TableHeaderCell.d.mts +1 -1
  217. package/dist/{TableLayout-hPlVO3dD.d.mts → TableLayout-DQKu6Rcj.d.mts} +1 -1
  218. package/dist/TableLayout.d.mts +1 -1
  219. package/dist/{TableRow-lvjbVccA.d.mts → TableRow-CPqZ8DK3.d.mts} +1 -1
  220. package/dist/TableRow.d.mts +1 -1
  221. package/dist/TableTH.d.mts +1 -1
  222. package/dist/{TableViewConfigurationDropdown-Ccxtk5dA.d.mts → TableViewConfigurationDropdown-BYPh4dIP.d.mts} +2 -2
  223. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  224. package/dist/{TechnicalSticker-BrvR0zhC.mjs → TechnicalSticker-DTjg6d2F.mjs} +5 -5
  225. package/dist/{TechnicalSticker-BrvR0zhC.mjs.map → TechnicalSticker-DTjg6d2F.mjs.map} +1 -1
  226. package/dist/TechnicalSticker.d.mts +1 -1
  227. package/dist/{Text-hEoPeOc9.mjs → Text-RcEfNFLx.mjs} +1 -1
  228. package/dist/{Text-hEoPeOc9.mjs.map → Text-RcEfNFLx.mjs.map} +1 -1
  229. package/dist/{TextArea-DiKEhpfD.d.mts → TextArea-DhPBI_1-.d.mts} +2 -2
  230. package/dist/{TextArea-BFsXUkuj.mjs → TextArea-ZMgbE_Lh.mjs} +2 -2
  231. package/dist/{TextArea-BFsXUkuj.mjs.map → TextArea-ZMgbE_Lh.mjs.map} +1 -1
  232. package/dist/TextArea.d.mts +1 -1
  233. package/dist/{TextUnderlineTooltip-Bs6Jn5yr.d.mts → TextUnderlineTooltip-BzmmiJlC.d.mts} +3 -3
  234. package/dist/TextUnderlineTooltip.d.mts +1 -1
  235. package/dist/Tile.d.mts +2 -2
  236. package/dist/Toast.d.mts +1 -1
  237. package/dist/{Toggle-oukvAn6V.d.mts → Toggle-BGGQ4Ukl.d.mts} +1 -1
  238. package/dist/{Toggle-CC2FTAKS.mjs → Toggle-BPgfSjuu.mjs} +4 -4
  239. package/dist/{Toggle-CC2FTAKS.mjs.map → Toggle-BPgfSjuu.mjs.map} +1 -1
  240. package/dist/Toggle.d.mts +1 -1
  241. package/dist/{Tooltip-CDvOu1UN.mjs → Tooltip-BvDbmXak.mjs} +3 -3
  242. package/dist/{Tooltip-CDvOu1UN.mjs.map → Tooltip-BvDbmXak.mjs.map} +1 -1
  243. package/dist/{Tooltip-0iXDCV2O.d.mts → Tooltip-D_a-RwAN.d.mts} +3 -3
  244. package/dist/Tooltip.d.mts +1 -1
  245. package/dist/{TruncatedText-CdeU19Ev.d.mts → TruncatedText-BJnowVTx.d.mts} +1 -1
  246. package/dist/components/Attribute/index.mjs +9 -10
  247. package/dist/components/Attribute/index.mjs.map +1 -1
  248. package/dist/components/Badge/index.mjs +1 -1
  249. package/dist/components/Banner/index.mjs +1 -1
  250. package/dist/components/Breadcrumbs/index.mjs +1 -1
  251. package/dist/components/Button/index.d.mts +2 -2
  252. package/dist/components/Button/index.mjs +1 -1
  253. package/dist/components/ButtonGroup/index.mjs +2 -2
  254. package/dist/components/Card/index.d.mts +2 -2
  255. package/dist/components/Card/index.mjs +1 -1
  256. package/dist/components/CardV2/index.d.mts +3 -2
  257. package/dist/components/CardV2/index.mjs +2 -2
  258. package/dist/components/Checkbox/index.d.mts +1 -1
  259. package/dist/components/Checkbox/index.mjs +1 -1
  260. package/dist/components/Combobox/index.d.mts +2 -2
  261. package/dist/components/Combobox/index.mjs +1 -1
  262. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  263. package/dist/components/DataTable/TableControls/index.d.mts +16 -16
  264. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  265. package/dist/components/DataTable/index.mjs +27 -29
  266. package/dist/components/DataTable/index.mjs.map +1 -1
  267. package/dist/components/DataTable/types.d.mts +2 -2
  268. package/dist/components/DatePicker/index.d.mts +4 -4
  269. package/dist/components/DatePicker/index.mjs +1 -1
  270. package/dist/components/DropdownButton/index.mjs +1 -1
  271. package/dist/components/DropdownMenu/index.d.mts +1 -1
  272. package/dist/components/DropdownMenu/index.mjs +1 -1
  273. package/dist/components/FloatingPanel/index.d.mts +5 -0
  274. package/dist/components/FloatingPanel/index.mjs +635 -0
  275. package/dist/components/FloatingPanel/index.mjs.map +1 -0
  276. package/dist/components/FormControl/index.d.mts +2 -2
  277. package/dist/components/FormControl/index.mjs +1 -1
  278. package/dist/components/FormField/index.d.mts +1 -1
  279. package/dist/components/FormField/index.mjs +1 -1
  280. package/dist/components/HoverCopyableField/index.mjs +1 -1
  281. package/dist/components/ImageTile/index.mjs +8 -8
  282. package/dist/components/Input/index.d.mts +1 -1
  283. package/dist/components/Input/index.mjs +1 -1
  284. package/dist/components/Link/index.mjs +1 -1
  285. package/dist/components/ListBox/index.d.mts +3 -3
  286. package/dist/components/ListBox/index.mjs +1 -1
  287. package/dist/components/LoadingShimmer/index.mjs +1 -1
  288. package/dist/components/MaskedInput/index.mjs +2 -2
  289. package/dist/components/Menu/index.d.mts +1 -1
  290. package/dist/components/Menu/index.mjs +1 -1
  291. package/dist/components/Modal/index.mjs +11 -12
  292. package/dist/components/Modal/index.mjs.map +1 -1
  293. package/dist/components/PageHeader/index.mjs +1 -1
  294. package/dist/components/Pagination/index.d.mts +3 -3
  295. package/dist/components/Pagination/index.mjs +1 -1
  296. package/dist/components/Pii/index.mjs +1 -1
  297. package/dist/components/Popover/index.mjs +1 -1
  298. package/dist/components/ProgressBar/index.mjs +3 -3
  299. package/dist/components/ProgressBar/index.mjs.map +1 -1
  300. package/dist/components/Radio/index.mjs +1 -1
  301. package/dist/components/RadioGroup/index.d.mts +1 -1
  302. package/dist/components/RadioGroup/index.mjs +1 -1
  303. package/dist/components/SegmentedControl/index.d.mts +1 -1
  304. package/dist/components/SegmentedControl/index.mjs +1 -1
  305. package/dist/components/Select/index.d.mts +1 -1
  306. package/dist/components/Select/index.mjs +1 -1
  307. package/dist/components/Slider/index.mjs +4 -4
  308. package/dist/components/Slider/index.mjs.map +1 -1
  309. package/dist/components/Spacer/index.mjs +1 -1
  310. package/dist/components/Stack/index.d.mts +1 -1
  311. package/dist/components/Stack/index.mjs +1 -1
  312. package/dist/components/Sticker/index.d.mts +1 -1
  313. package/dist/components/Sticker/index.mjs +1 -1
  314. package/dist/components/TabBar/index.mjs +1 -1
  315. package/dist/components/Table/index.d.mts +7 -7
  316. package/dist/components/Table/index.mjs +1 -1
  317. package/dist/components/TableBox/index.d.mts +2 -2
  318. package/dist/components/TableBox/index.mjs +1 -1
  319. package/dist/components/TechnicalSticker/index.mjs +1 -1
  320. package/dist/components/Text/index.mjs +1 -1
  321. package/dist/components/TextArea/index.d.mts +1 -1
  322. package/dist/components/TextArea/index.mjs +1 -1
  323. package/dist/components/Tile/index.mjs +4 -4
  324. package/dist/components/Toast/index.mjs +1 -1
  325. package/dist/components/Toggle/index.d.mts +1 -1
  326. package/dist/components/Toggle/index.mjs +1 -1
  327. package/dist/components/Tooltip/index.d.mts +3 -3
  328. package/dist/components/Tooltip/index.mjs +1 -1
  329. package/dist/compound-expression.d.mts +1 -1
  330. package/dist/{constants-bA9kCzRQ.d.mts → constants-BASogfT_.d.mts} +1 -1
  331. package/dist/constants.d.mts +1 -1
  332. package/dist/display.d.mts +1 -1
  333. package/dist/fieldPickerOptions.d.mts +2 -2
  334. package/dist/{filter-size-context-C1TvrE_O.d.mts → filter-size-context-Bw5F7082.d.mts} +2 -2
  335. package/dist/filter-size-context.d.mts +1 -1
  336. package/dist/helpers.d.mts +1 -1
  337. package/dist/{index-BC4edEsD.d.mts → index--5Mfhlkj.d.mts} +2 -2
  338. package/dist/{index-DJn4AeE4.d.mts → index-C1bz13uw.d.mts} +4 -4
  339. package/dist/{index-CdaoOvFH.d.mts → index-DiCnyORA.d.mts} +5 -5
  340. package/dist/index.d.mts +1 -1
  341. package/dist/index2.d.mts +1 -1
  342. package/dist/index3.d.mts +3 -3
  343. package/dist/index4.d.mts +11 -11
  344. package/dist/{input-D3Qd6dI8.d.mts → input-CzO-6_1V.d.mts} +2 -2
  345. package/dist/inputFields.d.mts +12 -26
  346. package/dist/lib/ConfigContext.d.mts +4 -1
  347. package/dist/lib/ConfigContext.mjs.map +1 -1
  348. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  349. package/dist/lib/TruncatedText.d.mts +1 -1
  350. package/dist/lib/TruncatedText.mjs +1 -1
  351. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  352. package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
  353. package/dist/lib/message.d.mts +1 -1
  354. package/dist/lib/pseudoClass.d.mts +7 -7
  355. package/dist/{message-CsK3sIq0.d.mts → message-Cu84fcqB.d.mts} +1 -1
  356. package/dist/mixins/input.d.mts +1 -1
  357. package/dist/{operators-C_xPzItk.d.mts → operators-CmSqHnTH.d.mts} +24 -3
  358. package/dist/operators.d.mts +2 -2
  359. package/dist/patterns/LayoutLoadingShimmer/index.mjs +5 -5
  360. package/dist/{types-mb3woqzE.d.mts → types-C-TkDdkG.d.mts} +6 -3
  361. package/dist/{types-CjHuZoVJ.d.mts → types-DEh_pXgS.d.mts} +1 -1
  362. package/dist/{types-BKEwt0uq.d.mts → types-NJtAxsU1.d.mts} +2 -2
  363. package/dist/{types-DVsBRqjZ.d.mts → types-TV9nVfSe.d.mts} +1 -1
  364. package/dist/types.d.mts +1 -1
  365. package/dist/types2.d.mts +1 -1
  366. package/dist/types3.d.mts +1 -1
  367. package/dist/types4.d.mts +1 -1
  368. package/dist/useComboboxFooterAction.d.mts +1 -1
  369. package/dist/{useFilterStateV2-CGzRyv0i.d.mts → useFilterStateV2-C4itmN4S.d.mts} +3 -3
  370. package/dist/useFilterStateV2.d.mts +1 -1
  371. package/dist/{useFormField-DhwEi45-.d.mts → useFormField-B2U4GOH4.d.mts} +2 -2
  372. package/dist/useFormField.d.mts +1 -1
  373. package/dist/{useTableBoxDragAndDrop-CsnN52lx.d.mts → useTableBoxDragAndDrop-CpemHLhL.d.mts} +1 -1
  374. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  375. package/dist/{useToggle-3k3EkV8V.mjs → useToggle-Bo3yd14Y.mjs} +1 -1
  376. package/dist/{useToggle-3k3EkV8V.mjs.map → useToggle-Bo3yd14Y.mjs.map} +1 -1
  377. package/dist/useTruncation.d.mts +1 -1
  378. package/dist/utils/storybook.mjs +1 -1
  379. package/dist/utils/testing.d.mts +1 -1
  380. package/dist/utils/testing.mjs +1 -1
  381. package/dist/utils.d.mts +1 -1
  382. package/dist/utils3.d.mts +7 -0
  383. package/dist/{validation-BdP2vajF.d.mts → validation-B5IXsdkE.d.mts} +3 -3
  384. package/dist/validation.d.mts +1 -1
  385. package/dist/{value-control-resolver-CiGEHQAc.d.mts → value-control-resolver-BPlTeIX7.d.mts} +2 -2
  386. package/dist/value-control-resolver.d.mts +1 -1
  387. package/llms.txt +1 -1
  388. package/package.json +5 -2
  389. package/skills/ui-authoring/SKILL.md +1 -1
  390. package/dist/CardV2-m9yOInMU.mjs.map +0 -1
  391. package/dist/Checkbox-CU27-Aa8.mjs.map +0 -1
  392. package/dist/Combobox-DhTUY8JT.mjs.map +0 -1
  393. package/dist/FormControl-BIXJ-FPI.mjs.map +0 -1
  394. package/dist/FormField-DcGQvgNW.mjs.map +0 -1
  395. package/dist/IconButton-DC4rh6ow.mjs.map +0 -1
  396. package/dist/ListBox-BwD-q7wF.mjs.map +0 -1
  397. package/dist/Radio-CtPz3EzX.mjs.map +0 -1
  398. package/dist/SectionHeading-DvP9NEgN.d.mts +0 -71
  399. package/dist/TableControls-BK8DCsqi.mjs.map +0 -1
  400. /package/dist/{index-0-W_aPej.d.mts → index-BMBcfD_R.d.mts} +0 -0
  401. /package/dist/{index-7in8TPrM.d.mts → index-BYd3Btr1.d.mts} +0 -0
  402. /package/dist/{index-B4woaFSm.d.mts → index-CNxS4Tlu.d.mts} +0 -0
  403. /package/dist/{index-BINnViIh.d.mts → index-CWB6exYm.d.mts} +0 -0
  404. /package/dist/{index-BNRXMhlr.d.mts → index-CtJuGxUp.d.mts} +0 -0
  405. /package/dist/{index-BO_854F2.d.mts → index-CzItj62a.d.mts} +0 -0
  406. /package/dist/{index-CCt0lwyI.d.mts → index-D4DUvwPf.d.mts} +0 -0
  407. /package/dist/{index-CREkvfw9.d.mts → index-D5tSVhTd.d.mts} +0 -0
  408. /package/dist/{index-Ci-uuV07.d.mts → index-DGsJdI5l.d.mts} +0 -0
  409. /package/dist/{index-CzUpNo0e.d.mts → index-DkrC-i1D.d.mts} +0 -0
  410. /package/dist/{index-DDdPqD_H.d.mts → index-DztUdPP_.d.mts} +0 -0
  411. /package/dist/{index-DeVKzGce.d.mts → index-IE5cwTAE2.d.mts} +0 -0
  412. /package/dist/{index-uMNhmxEh.d.mts → index-e6k85DKM.d.mts} +0 -0
@@ -1,5 +1,5 @@
1
- import { o as StickerProps } from "../../Sticker-BIVuastf.mjs";
2
- import { l as MenuItemProps } from "../../Menu-DM9OoZ71.mjs";
1
+ import { o as StickerProps } from "../../Sticker-Dhx2wqTL.mjs";
2
+ import { l as MenuItemProps } from "../../Menu-CYRdEnfo.mjs";
3
3
  import { ReactNode } from "react";
4
4
  import { Column, DeepKeys, FilterFnOption, Header, RowData, SortingState, Table } from "@tanstack/react-table";
5
5
 
@@ -1,5 +1,5 @@
1
- import Calendar from "../../Calendar.mjs";
2
- import { DateField } from "../../DateField.mjs";
3
- import { DatePicker, DatePickerProps } from "../../DatePicker.mjs";
4
- import DateRangePicker, { DateRange, DateRangePickerProps } from "../../DateRangePicker.mjs";
1
+ import { n as DatePickerProps, t as DatePicker } from "../../DatePicker-BGO6doLx.mjs";
2
+ import { n as DateRangePicker, r as DateRangePickerProps, t as DateRange } from "../../DateRangePicker-DfRBm9z4.mjs";
3
+ import { t as DateField } from "../../DateField-Com9f2-j.mjs";
4
+ import { t as Calendar } from "../../Calendar-BvLNcHQM.mjs";
5
5
  export { Calendar, DateField, DatePicker, DatePicker as default, DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps };
@@ -1,2 +1,2 @@
1
- import { i as Calendar, n as DatePicker, r as DateField, t as DateRangePicker } from "../../DatePicker-DpGvo7Bd.mjs";
1
+ import { i as Calendar, n as DatePicker, r as DateField, t as DateRangePicker } from "../../DatePicker-BlnE2MBD.mjs";
2
2
  export { Calendar, DateField, DatePicker, DatePicker as default, DateRangePicker };
@@ -1,2 +1,2 @@
1
- import { t as DropdownButton } from "../../DropdownButton-DGgfGW_o.mjs";
1
+ import { t as DropdownButton } from "../../DropdownButton-CpWNRUma.mjs";
2
2
  export { DropdownButton, DropdownButton as default };
@@ -1,2 +1,2 @@
1
- import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "../../DropdownMenu-B2t3Bwky.mjs";
1
+ import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "../../DropdownMenu-CnaK78rP.mjs";
2
2
  export { DropdownMenu, DropdownMenuProps, _default as default };
@@ -1,2 +1,2 @@
1
- import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-DZIFSJXD.mjs";
1
+ import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-BCyV8nC0.mjs";
2
2
  export { DropdownMenu, DropdownMenu_default as default };
@@ -0,0 +1,5 @@
1
+ import FloatingPanel, { FLOATING_PANEL_ID_PREFIX, FloatingPanelProps } from "../../FloatingPanel.mjs";
2
+ import { Panel, PanelProvider, usePersistentFloatingPanel, usePersistentFloatingPanels } from "../../FloatingPanelContext.mjs";
3
+ import FloatingPanelRenderer from "../../FloatingPanelRenderer.mjs";
4
+ import { PADDING } from "../../utils3.mjs";
5
+ export { FLOATING_PANEL_ID_PREFIX, PADDING as FLOATING_PANEL_PADDING, FloatingPanelProps, FloatingPanelRenderer, type Panel, PanelProvider, FloatingPanel as default, usePersistentFloatingPanel, usePersistentFloatingPanels };
@@ -0,0 +1,635 @@
1
+ import "../../variables/effect.mjs";
2
+ import { paragraphMixins } from "../../mixins/text.mjs";
3
+ import { n as Stack } from "../../Stack-Bl54WmhY.mjs";
4
+ import ConfigContext from "../../lib/ConfigContext.mjs";
5
+ import { Z_INDICES } from "../../lib/zindex.mjs";
6
+ import { t as IconButton } from "../../IconButton-BfDlic2K.mjs";
7
+ import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
8
+ import styled, { css } from "styled-components";
9
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { useLocation } from "react-router-dom";
11
+ import { cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useRef, useState } from "react";
12
+ import { ArrowCollapseIcon, ArrowExpandIcon, XIcon } from "@persona/icons";
13
+ import { motion, useDragControls, useMotionValue, useReducedMotion } from "framer-motion";
14
+ import { createPortal, flushSync } from "react-dom";
15
+ import { v4 } from "uuid";
16
+ import { flip, offset, shift, useFloating } from "@floating-ui/react";
17
+ //#region components/FloatingPanel/utils.ts
18
+ const PADDING = 8;
19
+ function autoFitMaxHeight(viewportHeight, topOffset, minHeight) {
20
+ return Math.max(minHeight, viewportHeight - Math.max(48, topOffset) - 48);
21
+ }
22
+ //#endregion
23
+ //#region components/FloatingPanel/FloatingPanel.tsx
24
+ const FLOATING_PANEL_ID_PREFIX = "floating-panel__";
25
+ const FloatingPanelContainer = styled(motion.div)`
26
+ position: absolute;
27
+ z-index: ${Z_INDICES.modal};
28
+ background: ${({ theme }) => theme.color.background.primary};
29
+ border: 1px solid ${Color.BorderDivider};
30
+ border-radius: ${BorderRadius.Lg};
31
+ box-shadow: ${"0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 3px 14px 0px rgba(0, 0, 0, 0.04), 0px 8px 10px 0px rgba(0, 0, 0, 0.04)"};
32
+ display: flex;
33
+ flex-direction: column;
34
+ cursor: auto;
35
+ ${({ $fitHeight, $maxHeight, $minHeight }) => $fitHeight && css`
36
+ height: auto;
37
+ max-height: ${$maxHeight ?? 0}px;
38
+ min-height: ${$minHeight ?? 0}px;
39
+ `}
40
+ `;
41
+ const DragHandle = styled(motion.div)`
42
+ cursor: ${({ isFullSize }) => isFullSize ? "default" : "grab"};
43
+ user-select: none;
44
+
45
+ &:active {
46
+ cursor: ${({ isFullSize }) => isFullSize ? "default" : "grabbing"};
47
+ }
48
+ display: flex;
49
+ flex-direction: column;
50
+ justify-content: center;
51
+ min-height: 48px;
52
+ height: 48px;
53
+ overflow: hidden;
54
+ padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};
55
+ border-bottom: 1px solid ${Color.BorderDivider};
56
+ `;
57
+ const Footer = styled.div`
58
+ padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};
59
+ border-top: 1px solid ${Color.BorderDivider};
60
+ overflow-x: hidden;
61
+ background-color: ${({ theme }) => theme.color.background.primary};
62
+ width: 100%;
63
+ border-radius: 0 0 ${BorderRadius.Lg} ${BorderRadius.Lg};
64
+ `;
65
+ const ResizeHandleBase = styled.div`
66
+ position: absolute;
67
+ user-select: none;
68
+ `;
69
+ const ResizeHandleBaseCorner = styled(ResizeHandleBase)`
70
+ width: 1.25rem;
71
+ height: 1.25rem;
72
+ `;
73
+ const ResizeHandleBottomRight = styled(ResizeHandleBaseCorner)`
74
+ bottom: -0.75rem;
75
+ right: -0.75rem;
76
+ cursor: nwse-resize;
77
+ `;
78
+ const ResizeHandleBottomLeft = styled(ResizeHandleBaseCorner)`
79
+ bottom: -0.75rem;
80
+ left: -0.75rem;
81
+ cursor: nesw-resize;
82
+ `;
83
+ const ResizeHandleTopLeft = styled(ResizeHandleBaseCorner)`
84
+ top: -0.75rem;
85
+ left: -0.75rem;
86
+ cursor: nwse-resize;
87
+ `;
88
+ const ResizeHandleTopRight = styled(ResizeHandleBaseCorner)`
89
+ top: -0.75rem;
90
+ right: -0.75rem;
91
+ cursor: nesw-resize;
92
+ `;
93
+ const ResizeHandleBottom = styled(ResizeHandleBase)`
94
+ bottom: -0.75rem;
95
+ left: 0.5rem;
96
+ width: calc(100% - 1rem);
97
+ height: 1rem;
98
+ cursor: ns-resize;
99
+ user-select: none;
100
+ `;
101
+ const ResizeHandleTop = styled(ResizeHandleBase)`
102
+ top: -0.75rem;
103
+ left: 0.5rem;
104
+ width: calc(100% - 1rem);
105
+ height: 1rem;
106
+ cursor: ns-resize;
107
+ `;
108
+ const ResizeHandleRight = styled(ResizeHandleBase)`
109
+ right: -0.75rem;
110
+ top: 0.5rem;
111
+ width: 1rem;
112
+ height: calc(100% - 1rem);
113
+ cursor: ew-resize;
114
+ `;
115
+ const ResizeHandleLeft = styled(ResizeHandleBase)`
116
+ left: -0.75rem;
117
+ top: 0.5rem;
118
+ width: 1rem;
119
+ height: calc(100% - 1rem);
120
+ cursor: ew-resize;
121
+ `;
122
+ const PanelContent = styled.div`
123
+ overflow-y: auto;
124
+ overscroll-behavior: contain;
125
+ min-height: 0;
126
+ /* While the panel height is derived from its content, the content must size
127
+ itself (a percentage flex-basis against an indefinite height collapses in
128
+ WebKit); it still shrinks when the panel hits its max-height. */
129
+ flex: ${({ $fitHeight }) => $fitHeight ? "0 1 auto" : "1 1 0%"};
130
+ padding: ${({ $noPadding }) => $noPadding ? 0 : Spacing[3]};
131
+ `;
132
+ const PanelText = styled.p`
133
+ ${paragraphMixins.sm}
134
+ white-space: nowrap;
135
+ min-width: 3rem;
136
+ overflow: hidden;
137
+ text-overflow: ellipsis;
138
+ display: flex;
139
+ align-items: center;
140
+ font-weight: 500;
141
+ `;
142
+ const StyledIconButton = styled(IconButton)`
143
+ width: 1.5rem;
144
+ height: 1.5rem;
145
+ border-radius: ${BorderRadius.Md};
146
+ `;
147
+ function DismissOnNavigate({ onClose }) {
148
+ const location = useLocation();
149
+ const initialPathname = useRef(location.pathname);
150
+ useEffect(() => {
151
+ if (location.pathname !== initialPathname.current) onClose();
152
+ }, [location.pathname, onClose]);
153
+ return null;
154
+ }
155
+ function FloatingPanel({ title = "Panel title", children, portal = true, triggerRef, initialWidth = 400, initialHeight = 600, minWidth = 100, minHeight = 150, mainAxisOffset = 0, crossAxisOffset = 0, footerButtons, footerAdditionalAction, placement = "right", canFullsize = true, defaultFullSize = false, noPadding, headerActions, dismissOnNavigate = false, fitContent = false, onClose = () => {}, ...restProps }) {
156
+ const { floatingPanel } = useContext(ConfigContext);
157
+ const fullscreenRightInset = floatingPanel?.fullscreenRightInset ?? 8;
158
+ const hasFooter = footerButtons || footerAdditionalAction;
159
+ const isAdditionalActionButton = isValidElement(footerAdditionalAction) && footerAdditionalAction.type === "button";
160
+ const [panelSize, setPanelSize] = useState({
161
+ width: initialWidth,
162
+ height: initialHeight
163
+ });
164
+ const panelSizeRef = useRef({
165
+ width: initialWidth,
166
+ height: initialHeight
167
+ });
168
+ const [panelPosition, setPanelPosition] = useState({
169
+ x: 0,
170
+ y: 0
171
+ });
172
+ const [isPositionReady, setIsPositionReady] = useState(!triggerRef);
173
+ const [fullSize, setFullSize] = useState(defaultFullSize);
174
+ const resizeBottomRef = useRef(null);
175
+ const resizeRightRef = useRef(null);
176
+ const [wasFullSizeToggled, setWasFullSizeToggled] = useState(false);
177
+ const resizeOffsetRef = useRef({
178
+ x: 0,
179
+ y: 0
180
+ });
181
+ const resizeDirectionRef = useRef(null);
182
+ const resizeStartDimensionsRef = useRef({
183
+ width: initialWidth,
184
+ height: initialHeight,
185
+ x: 0,
186
+ y: 0
187
+ });
188
+ const [hasManuallyResized, setHasManuallyResized] = useState(false);
189
+ const contentRef = useRef(null);
190
+ const prefersReducedMotion = useReducedMotion();
191
+ const dragControls = useDragControls();
192
+ const x = useMotionValue(0);
193
+ const y = useMotionValue(0);
194
+ const { x: floatingX, y: floatingY, refs } = useFloating({
195
+ placement,
196
+ elements: { reference: triggerRef?.current || void 0 },
197
+ middleware: [
198
+ offset({
199
+ mainAxis: mainAxisOffset,
200
+ crossAxis: crossAxisOffset
201
+ }),
202
+ flip(),
203
+ shift({
204
+ crossAxis: true,
205
+ padding: 8
206
+ })
207
+ ]
208
+ });
209
+ useEffect(() => {
210
+ if (!triggerRef || floatingX !== 0 || floatingY !== 0) {
211
+ setPanelPosition({
212
+ x: floatingX,
213
+ y: floatingY
214
+ });
215
+ setIsPositionReady(true);
216
+ }
217
+ }, [
218
+ floatingX,
219
+ floatingY,
220
+ triggerRef
221
+ ]);
222
+ const [windowDimensions, setWindowDimensions] = useState({
223
+ width: typeof window !== "undefined" ? window.innerWidth : 1200,
224
+ height: typeof window !== "undefined" ? window.innerHeight : 800
225
+ });
226
+ useEffect(() => {
227
+ const handleResize = () => {
228
+ setWindowDimensions({
229
+ width: window.innerWidth,
230
+ height: window.innerHeight
231
+ });
232
+ };
233
+ window.addEventListener("resize", handleResize);
234
+ return () => window.removeEventListener("resize", handleResize);
235
+ }, []);
236
+ const dragConstraints = fullSize ? void 0 : {
237
+ left: 8,
238
+ right: Math.max(8, windowDimensions.width - panelSize.width - 8),
239
+ top: 8,
240
+ bottom: Math.max(8, windowDimensions.height - panelSize.height - 8)
241
+ };
242
+ const clampPositionToBounds = useCallback((position) => {
243
+ if (fullSize) return position;
244
+ return {
245
+ x: Math.max(8, Math.min(position.x, Math.max(8, windowDimensions.width - panelSize.width - 8))),
246
+ y: Math.max(8, Math.min(position.y, Math.max(8, windowDimensions.height - panelSize.height - 8)))
247
+ };
248
+ }, [
249
+ windowDimensions,
250
+ panelSize,
251
+ fullSize
252
+ ]);
253
+ useEffect(() => {
254
+ if (!fullSize) {
255
+ const clampedPosition = clampPositionToBounds(panelPosition);
256
+ if (clampedPosition.x !== panelPosition.x || clampedPosition.y !== panelPosition.y) setPanelPosition(clampedPosition);
257
+ }
258
+ }, [
259
+ windowDimensions,
260
+ panelPosition,
261
+ clampPositionToBounds,
262
+ fullSize
263
+ ]);
264
+ useEffect(() => {
265
+ if (wasFullSizeToggled) {
266
+ const timer = setTimeout(() => setWasFullSizeToggled(false), 400);
267
+ return () => clearTimeout(timer);
268
+ }
269
+ }, [wasFullSizeToggled]);
270
+ useEffect(() => {
271
+ panelSizeRef.current = panelSize;
272
+ }, [panelSize]);
273
+ const isAutoHeight = fitContent && !hasManuallyResized && !fullSize;
274
+ function handleResizeMouseDown(event, direction) {
275
+ event.preventDefault();
276
+ event.stopPropagation();
277
+ let currentWidth;
278
+ let currentHeight;
279
+ let currentX;
280
+ let currentY;
281
+ if (fullSize) {
282
+ const container = contentRef.current?.parentElement;
283
+ currentWidth = container?.offsetWidth ?? windowDimensions.width - 16;
284
+ currentHeight = container?.offsetHeight ?? windowDimensions.height - 16;
285
+ currentX = 8;
286
+ currentY = 8;
287
+ x.set(8);
288
+ y.set(8);
289
+ setFullSize(false);
290
+ setPanelSize({
291
+ width: currentWidth,
292
+ height: currentHeight
293
+ });
294
+ setPanelPosition({
295
+ x: currentX,
296
+ y: currentY
297
+ });
298
+ } else if (isAutoHeight) {
299
+ currentHeight = (contentRef.current?.parentElement)?.offsetHeight ?? panelSize.height;
300
+ currentWidth = panelSize.width;
301
+ currentX = panelPosition.x;
302
+ currentY = panelPosition.y;
303
+ setPanelSize({
304
+ width: currentWidth,
305
+ height: currentHeight
306
+ });
307
+ } else {
308
+ currentWidth = panelSize.width;
309
+ currentHeight = panelSize.height;
310
+ currentX = panelPosition.x;
311
+ currentY = panelPosition.y;
312
+ }
313
+ panelSizeRef.current = {
314
+ width: currentWidth,
315
+ height: currentHeight
316
+ };
317
+ resizeStartDimensionsRef.current = {
318
+ width: currentWidth,
319
+ height: currentHeight,
320
+ x: currentX,
321
+ y: currentY
322
+ };
323
+ setHasManuallyResized(true);
324
+ resizeDirectionRef.current = direction;
325
+ if (direction === "se") resizeOffsetRef.current = {
326
+ x: event.clientX - currentWidth,
327
+ y: event.clientY - currentHeight
328
+ };
329
+ else if (direction === "sw") {
330
+ resizeRightRef.current = x.get() + currentWidth;
331
+ resizeOffsetRef.current = {
332
+ x: event.clientX,
333
+ y: event.clientY - currentHeight
334
+ };
335
+ } else if (direction === "nw") {
336
+ resizeRightRef.current = x.get() + currentWidth;
337
+ resizeBottomRef.current = y.get() + currentHeight;
338
+ resizeOffsetRef.current = {
339
+ x: event.clientX,
340
+ y: event.clientY
341
+ };
342
+ } else if (direction === "ne") {
343
+ resizeBottomRef.current = y.get() + currentHeight;
344
+ resizeOffsetRef.current = {
345
+ x: event.clientX - currentWidth,
346
+ y: event.clientY
347
+ };
348
+ } else if (direction === "w") {
349
+ resizeRightRef.current = x.get() + currentWidth;
350
+ resizeOffsetRef.current = {
351
+ x: event.clientX,
352
+ y: 0
353
+ };
354
+ } else if (direction === "e") resizeOffsetRef.current = {
355
+ x: event.clientX - currentWidth,
356
+ y: 0
357
+ };
358
+ else if (direction === "n") {
359
+ resizeBottomRef.current = y.get() + currentHeight;
360
+ resizeOffsetRef.current = {
361
+ x: 0,
362
+ y: event.clientY
363
+ };
364
+ } else if (direction === "s") resizeOffsetRef.current = {
365
+ x: 0,
366
+ y: event.clientY - currentHeight
367
+ };
368
+ document.addEventListener("mousemove", handleResizeMouseMove);
369
+ document.addEventListener("mouseup", handleResizeMouseUp);
370
+ }
371
+ function handleResizeMouseMove(event) {
372
+ const direction = resizeDirectionRef.current;
373
+ let newWidth = resizeStartDimensionsRef.current.width;
374
+ let newHeight = resizeStartDimensionsRef.current.height;
375
+ let clampedX = resizeStartDimensionsRef.current.x;
376
+ let clampedY = resizeStartDimensionsRef.current.y;
377
+ if (direction === "se") {
378
+ newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));
379
+ newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));
380
+ } else if (direction === "sw") {
381
+ const right = resizeRightRef.current;
382
+ const proposedX = event.clientX;
383
+ newWidth = Math.round(Math.max(minWidth, right - proposedX));
384
+ clampedX = Math.round(right - newWidth);
385
+ newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));
386
+ } else if (direction === "nw") {
387
+ const right = resizeRightRef.current;
388
+ const bottom = resizeBottomRef.current;
389
+ const proposedX = event.clientX;
390
+ const proposedY = event.clientY;
391
+ newWidth = Math.round(Math.max(minWidth, right - proposedX));
392
+ newHeight = Math.round(Math.max(minHeight, bottom - proposedY));
393
+ clampedX = Math.round(right - newWidth);
394
+ clampedY = Math.round(bottom - newHeight);
395
+ } else if (direction === "ne") {
396
+ const bottom = resizeBottomRef.current;
397
+ const proposedY = event.clientY;
398
+ newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));
399
+ newHeight = Math.round(Math.max(minHeight, bottom - proposedY));
400
+ clampedY = Math.round(bottom - newHeight);
401
+ } else if (direction === "w") {
402
+ const right = resizeRightRef.current;
403
+ const proposedX = event.clientX;
404
+ newWidth = Math.round(Math.max(minWidth, right - proposedX));
405
+ clampedX = Math.round(right - newWidth);
406
+ } else if (direction === "e") newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));
407
+ else if (direction === "n") {
408
+ const bottom = resizeBottomRef.current;
409
+ const proposedY = event.clientY;
410
+ newHeight = Math.round(Math.max(minHeight, bottom - proposedY));
411
+ clampedY = Math.round(bottom - newHeight);
412
+ } else if (direction === "s") newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));
413
+ flushSync(() => {
414
+ setPanelPosition({
415
+ x: clampedX,
416
+ y: clampedY
417
+ });
418
+ setPanelSize({
419
+ width: newWidth,
420
+ height: newHeight
421
+ });
422
+ });
423
+ }
424
+ function handleResizeMouseUp() {
425
+ document.removeEventListener("mousemove", handleResizeMouseMove);
426
+ document.removeEventListener("mouseup", handleResizeMouseUp);
427
+ }
428
+ const panelContent = /* @__PURE__ */ jsxs(FloatingPanelContainer, {
429
+ ref: refs.setFloating,
430
+ $fitHeight: isAutoHeight,
431
+ $maxHeight: autoFitMaxHeight(windowDimensions.height, panelPosition.y, minHeight),
432
+ $minHeight: minHeight,
433
+ style: {
434
+ x,
435
+ y
436
+ },
437
+ initial: {
438
+ top: 0,
439
+ left: 0,
440
+ opacity: 0
441
+ },
442
+ animate: {
443
+ x: fullSize ? 8 : panelPosition.x,
444
+ y: fullSize ? 8 : panelPosition.y,
445
+ width: fullSize ? `calc(100% - ${8 + fullscreenRightInset}px)` : panelSize.width,
446
+ ...isAutoHeight ? {} : { height: fullSize ? "calc(100% - 16px)" : panelSize.height },
447
+ opacity: isPositionReady ? 1 : 0
448
+ },
449
+ transition: wasFullSizeToggled ? {
450
+ type: "tween",
451
+ ease: [
452
+ .83,
453
+ 0,
454
+ .17,
455
+ 1
456
+ ],
457
+ duration: prefersReducedMotion ? 1.2 : .4
458
+ } : {
459
+ opacity: {
460
+ duration: .15,
461
+ ease: "easeOut"
462
+ },
463
+ duration: 0
464
+ },
465
+ onDragEnd: () => {
466
+ if (!fullSize) setPanelPosition(clampPositionToBounds({
467
+ x: x.get(),
468
+ y: y.get()
469
+ }));
470
+ },
471
+ drag: !fullSize,
472
+ dragControls,
473
+ dragListener: false,
474
+ dragMomentum: false,
475
+ dragConstraints,
476
+ id: `${FLOATING_PANEL_ID_PREFIX}container`,
477
+ ...restProps,
478
+ children: [
479
+ /* @__PURE__ */ jsx(DragHandle, {
480
+ isFullSize: fullSize,
481
+ onPointerDown: (e) => dragControls.start(e),
482
+ children: /* @__PURE__ */ jsxs(Stack, {
483
+ align: "center",
484
+ direction: "horizontal",
485
+ justify: "space-between",
486
+ children: [/* @__PURE__ */ jsx(PanelText, { children: title }), /* @__PURE__ */ jsxs(Stack, {
487
+ direction: "horizontal",
488
+ align: "center",
489
+ spacing: Spacing[1],
490
+ children: [
491
+ headerActions,
492
+ canFullsize && /* @__PURE__ */ jsx(StyledIconButton, {
493
+ size: "sm",
494
+ "aria-label": fullSize ? "collapse" : "expand",
495
+ id: "floating-panel__toggle-fullsize",
496
+ onClick: () => {
497
+ setWasFullSizeToggled(true);
498
+ setFullSize(!fullSize);
499
+ },
500
+ children: fullSize ? /* @__PURE__ */ jsx(ArrowCollapseIcon, {}) : /* @__PURE__ */ jsx(ArrowExpandIcon, {})
501
+ }),
502
+ /* @__PURE__ */ jsx(StyledIconButton, {
503
+ size: "sm",
504
+ id: "floating-panel__close-panel",
505
+ onClick: () => onClose?.(),
506
+ "aria-label": "close",
507
+ children: /* @__PURE__ */ jsx(XIcon, {})
508
+ })
509
+ ]
510
+ })]
511
+ })
512
+ }),
513
+ /* @__PURE__ */ jsx(PanelContent, {
514
+ ref: contentRef,
515
+ $noPadding: noPadding,
516
+ $fitHeight: isAutoHeight,
517
+ children
518
+ }),
519
+ hasFooter && /* @__PURE__ */ jsx(Footer, {
520
+ style: { paddingLeft: isAdditionalActionButton ? Spacing[1] : Spacing[3] },
521
+ children: /* @__PURE__ */ jsxs(Stack, {
522
+ align: "center",
523
+ direction: "horizontal",
524
+ justify: footerAdditionalAction ? "space-between" : "flex-end",
525
+ children: [footerAdditionalAction && (isAdditionalActionButton ? footerAdditionalAction : /* @__PURE__ */ jsx(PanelText, { children: footerAdditionalAction })), footerButtons && /* @__PURE__ */ jsx("div", { children: footerButtons })]
526
+ })
527
+ }),
528
+ /* @__PURE__ */ jsx(ResizeHandleBottomRight, {
529
+ "data-test": "resize-handle-se",
530
+ onMouseDown: (event) => handleResizeMouseDown(event, "se")
531
+ }),
532
+ /* @__PURE__ */ jsx(ResizeHandleBottom, { onMouseDown: (event) => handleResizeMouseDown(event, "s") }),
533
+ /* @__PURE__ */ jsx(ResizeHandleBottomLeft, { onMouseDown: (event) => handleResizeMouseDown(event, "sw") }),
534
+ /* @__PURE__ */ jsx(ResizeHandleLeft, { onMouseDown: (event) => handleResizeMouseDown(event, "w") }),
535
+ /* @__PURE__ */ jsx(ResizeHandleTopLeft, { onMouseDown: (event) => handleResizeMouseDown(event, "nw") }),
536
+ /* @__PURE__ */ jsx(ResizeHandleTop, { onMouseDown: (event) => handleResizeMouseDown(event, "n") }),
537
+ /* @__PURE__ */ jsx(ResizeHandleTopRight, { onMouseDown: (event) => handleResizeMouseDown(event, "ne") }),
538
+ /* @__PURE__ */ jsx(ResizeHandleRight, { onMouseDown: (event) => handleResizeMouseDown(event, "e") })
539
+ ]
540
+ });
541
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [dismissOnNavigate && /* @__PURE__ */ jsx(DismissOnNavigate, { onClose }), panelContent] });
542
+ return portal ? createPortal(content, document.body) : content;
543
+ }
544
+ //#endregion
545
+ //#region components/FloatingPanel/FloatingPanelContext.tsx
546
+ const PanelContext = createContext(null);
547
+ const PanelProvider = ({ children }) => {
548
+ const [panels, setPanels] = useState([]);
549
+ const location = useLocation();
550
+ function shouldPanelPersist(currentUrl, persistUntilPathRoot) {
551
+ if (!persistUntilPathRoot) return false;
552
+ return currentUrl.includes(persistUntilPathRoot);
553
+ }
554
+ const openPanel = useCallback((panel) => {
555
+ const { key, panelElement, persistUntilPathRoot } = panel;
556
+ const pathRoot = persistUntilPathRoot || location.pathname;
557
+ setPanels((prev) => [...prev.filter((p) => p.key !== key), {
558
+ key,
559
+ panelElement,
560
+ persistUntilPathRoot: pathRoot
561
+ }]);
562
+ }, [location.pathname]);
563
+ const closePanel = useCallback((key) => {
564
+ setPanels((prev) => prev.filter((panel) => panel.key !== key));
565
+ }, []);
566
+ const isPanelOpen = useCallback((key) => {
567
+ return panels.some((panel) => panel.key === key);
568
+ }, [panels]);
569
+ const togglePanel = useCallback((panel) => {
570
+ const { key } = panel;
571
+ if (isPanelOpen(key)) closePanel(key);
572
+ else openPanel(panel);
573
+ }, [
574
+ isPanelOpen,
575
+ closePanel,
576
+ openPanel
577
+ ]);
578
+ const closeAllPanels = useCallback(() => {
579
+ setPanels([]);
580
+ }, []);
581
+ useEffect(() => {
582
+ const nextLocation = location.pathname;
583
+ setPanels((prevPanels) => prevPanels.filter((panel) => shouldPanelPersist(nextLocation, panel.persistUntilPathRoot)));
584
+ }, [location.pathname]);
585
+ return /* @__PURE__ */ jsx(PanelContext.Provider, {
586
+ value: {
587
+ openPanel,
588
+ closePanel,
589
+ togglePanel,
590
+ closeAllPanels,
591
+ panels,
592
+ isPanelOpen
593
+ },
594
+ children
595
+ });
596
+ };
597
+ const usePersistentFloatingPanels = () => {
598
+ const ctx = useContext(PanelContext);
599
+ if (!ctx) throw new Error("usePersistentFloatingPanels must be used within a PanelProvider");
600
+ return ctx;
601
+ };
602
+ const usePersistentFloatingPanel = (panelId) => {
603
+ const ctx = useContext(PanelContext);
604
+ if (!ctx) throw new Error("usePersistentFloatingPanels must be used within a PanelProvider");
605
+ const currentPanelId = panelId || `panel-${v4()}`;
606
+ return {
607
+ id: currentPanelId,
608
+ openPanel: useCallback((panel) => {
609
+ ctx.openPanel(panel);
610
+ }, [ctx]),
611
+ closePanel: useCallback(() => {
612
+ ctx.closePanel(currentPanelId);
613
+ }, [currentPanelId, ctx]),
614
+ togglePanel: useCallback((panel) => {
615
+ ctx.togglePanel(panel);
616
+ }, [ctx]),
617
+ isPanelOpen: ctx.isPanelOpen(currentPanelId)
618
+ };
619
+ };
620
+ //#endregion
621
+ //#region components/FloatingPanel/FloatingPanelRenderer.tsx
622
+ function FloatingPanelRenderer() {
623
+ const { panels, closePanel } = usePersistentFloatingPanels();
624
+ if (panels.length === 0) return null;
625
+ return createPortal(panels.map(({ key, panelElement: panel }) => {
626
+ return cloneElement(panel, {
627
+ onClose: () => closePanel(key),
628
+ key
629
+ });
630
+ }), document.body);
631
+ }
632
+ //#endregion
633
+ export { FLOATING_PANEL_ID_PREFIX, PADDING as FLOATING_PANEL_PADDING, FloatingPanelRenderer, PanelProvider, FloatingPanel as default, usePersistentFloatingPanel, usePersistentFloatingPanels };
634
+
635
+ //# sourceMappingURL=index.mjs.map