@persona/design-system 0.2.1 → 0.3.1

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 (448) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +3 -3
  3. package/dist/{Action-DnR0YTxO.d.mts → Action-DL3kHI9Z.d.mts} +3 -3
  4. package/dist/Action.d.mts +1 -1
  5. package/dist/AdvancedFilterRuleRow.d.mts +2 -2
  6. package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
  7. package/dist/ArrayValueControl.d.mts +1 -1
  8. package/dist/Attribute.d.mts +4 -4
  9. package/dist/{Badge-DRn_r6is.mjs → Badge-BL0J5oMa.mjs} +3 -3
  10. package/dist/{Badge-DRn_r6is.mjs.map → Badge-BL0J5oMa.mjs.map} +1 -1
  11. package/dist/BooleanValueControl.d.mts +1 -1
  12. package/dist/{Breadcrumb-DEwZFJHF.d.mts → Breadcrumb-Czgdi0xf.d.mts} +1 -1
  13. package/dist/Breadcrumb.d.mts +1 -1
  14. package/dist/{Breadcrumbs-Byf2ye6H.mjs → Breadcrumbs-ed4wRDS7.mjs} +10 -10
  15. package/dist/{Breadcrumbs-Byf2ye6H.mjs.map → Breadcrumbs-ed4wRDS7.mjs.map} +1 -1
  16. package/dist/{Breadcrumbs-0e_3v9FF.d.mts → Breadcrumbs-zei-cpdU.d.mts} +2 -2
  17. package/dist/Breadcrumbs.d.mts +1 -1
  18. package/dist/{Button-DkjwN_Op.d.mts → Button-CKzNTpPL.d.mts} +3 -3
  19. package/dist/Button.d.mts +1 -1
  20. package/dist/Calendar-CcxN7y3e.d.mts +12 -0
  21. package/dist/Calendar.d.mts +2 -12
  22. package/dist/CalendarBase.d.mts +1 -1
  23. package/dist/{Card-CLTkZLKr.mjs → Card-CKrJtn1f.mjs} +5 -5
  24. package/dist/{Card-CLTkZLKr.mjs.map → Card-CKrJtn1f.mjs.map} +1 -1
  25. package/dist/{Card-DxFajLnx.d.mts → Card-pr4FQWjn.d.mts} +4 -4
  26. package/dist/Card.d.mts +1 -1
  27. package/dist/Card2.d.mts +4 -4
  28. package/dist/{CardV2-m9yOInMU.mjs → CardV2-D3m5EKlp.mjs} +19 -13
  29. package/dist/CardV2-D3m5EKlp.mjs.map +1 -0
  30. package/dist/{Checkbox-CU27-Aa8.mjs → Checkbox-Ccuicmlo.mjs} +8 -8
  31. package/dist/Checkbox-Ccuicmlo.mjs.map +1 -0
  32. package/dist/ChoicesValueControl.d.mts +1 -1
  33. package/dist/{Combobox-DhTUY8JT.mjs → Combobox-BGRyr_-L.mjs} +12 -12
  34. package/dist/{Combobox-DhTUY8JT.mjs.map → Combobox-BGRyr_-L.mjs.map} +1 -1
  35. package/dist/{Combobox-BgKEHP9p.d.mts → Combobox-Bf_Xe1BG.d.mts} +3 -3
  36. package/dist/Combobox.d.mts +2 -2
  37. package/dist/{ComboboxBase-Dmzn8a53.d.mts → ComboboxBase-CWzN8GML.d.mts} +7 -7
  38. package/dist/ComboboxBase.d.mts +1 -1
  39. package/dist/{ComboboxMultiSelect-BLKUKNEW.d.mts → ComboboxMultiSelect-iSuvyOx2.d.mts} +2 -2
  40. package/dist/ComboboxMultiSelect.d.mts +1 -1
  41. package/dist/{ComboboxSingleSelect-Kpl-iOok.d.mts → ComboboxSingleSelect-DVRFKPi1.d.mts} +4 -4
  42. package/dist/ComboboxSingleSelect.d.mts +1 -1
  43. package/dist/{CompactBar-E9hPDRvI.d.mts → CompactBar-C_61pgp7.d.mts} +3 -3
  44. package/dist/CompactBar.d.mts +1 -1
  45. package/dist/{ConfigFormGroup-GgzSDzgL.mjs → ConfigFormGroup-DGCTW3by.mjs} +3 -3
  46. package/dist/{ConfigFormGroup-GgzSDzgL.mjs.map → ConfigFormGroup-DGCTW3by.mjs.map} +1 -1
  47. package/dist/{ControlBar-DYrjBDzu.d.mts → ControlBar-0XwbM4yC.d.mts} +2 -2
  48. package/dist/ControlBar.d.mts +1 -1
  49. package/dist/DataTable.d.mts +3 -3
  50. package/dist/DateField-CKeSIhGy.d.mts +23 -0
  51. package/dist/DateField.d.mts +2 -23
  52. package/dist/DatePicker-B1iWrqR5.d.mts +19 -0
  53. package/dist/{DatePicker-DpGvo7Bd.mjs → DatePicker-BNnZ6L1y.mjs} +37 -19
  54. package/dist/DatePicker-BNnZ6L1y.mjs.map +1 -0
  55. package/dist/DatePicker.d.mts +2 -19
  56. package/dist/DateRangePicker-BmF9eH9R.d.mts +53 -0
  57. package/dist/DateRangePicker.d.mts +2 -53
  58. package/dist/DateRangeValueControl.d.mts +19 -0
  59. package/dist/DateValueControl.d.mts +1 -1
  60. package/dist/{DropdownButton-DGgfGW_o.mjs → DropdownButton-BlVeFbJ0.mjs} +3 -3
  61. package/dist/{DropdownButton-DGgfGW_o.mjs.map → DropdownButton-BlVeFbJ0.mjs.map} +1 -1
  62. package/dist/DropdownButton.d.mts +2 -2
  63. package/dist/{DropdownMenu-DZIFSJXD.mjs → DropdownMenu-82xH1AZr.mjs} +3 -3
  64. package/dist/{DropdownMenu-DZIFSJXD.mjs.map → DropdownMenu-82xH1AZr.mjs.map} +1 -1
  65. package/dist/{DropdownMenu-B2t3Bwky.d.mts → DropdownMenu-DuTnq9j7.d.mts} +3 -3
  66. package/dist/DropdownMenu.d.mts +1 -1
  67. package/dist/{FieldRegistry-COyIA4VU.d.mts → FieldRegistry-D1vghSC_.d.mts} +2 -2
  68. package/dist/FieldRegistry.d.mts +1 -1
  69. package/dist/{FilterBar-CS2YjiTr.d.mts → FilterBar-Ck085Dic.d.mts} +5 -8
  70. package/dist/FilterBar.d.mts +1 -1
  71. package/dist/FilterPickerMenu.d.mts +2 -2
  72. package/dist/FilterPill.d.mts +1 -1
  73. package/dist/FilterPopover.d.mts +2 -12
  74. package/dist/FloatValueControl.d.mts +1 -1
  75. package/dist/FloatingPanel.d.mts +80 -0
  76. package/dist/FloatingPanelContext.d.mts +33 -0
  77. package/dist/FloatingPanelRenderer.d.mts +7 -0
  78. package/dist/{FormControl-CZFmub1N.d.mts → FormControl-CfpwZGlD.d.mts} +2 -2
  79. package/dist/{FormControl-BIXJ-FPI.mjs → FormControl-D1HIqDKm.mjs} +6 -6
  80. package/dist/FormControl-D1HIqDKm.mjs.map +1 -0
  81. package/dist/FormControl.d.mts +1 -1
  82. package/dist/FormControlLabel.d.mts +2 -2
  83. package/dist/{FormField-8rlT8pm0.d.mts → FormField-0p4y0sS5.d.mts} +2 -2
  84. package/dist/{FormField-DcGQvgNW.mjs → FormField-CVnbsNvU.mjs} +46 -44
  85. package/dist/FormField-CVnbsNvU.mjs.map +1 -0
  86. package/dist/FormField.d.mts +1 -1
  87. package/dist/{Header-OLZuv8fF.d.mts → Header-gDUTQgWj.d.mts} +2 -2
  88. package/dist/Header.d.mts +1 -1
  89. package/dist/{HelperTooltip-CJDG7Ugp.d.mts → HelperTooltip-CqhiRb5g.d.mts} +2 -2
  90. package/dist/HelperTooltip.d.mts +1 -1
  91. package/dist/{HoverCopyableField-BHdCaR-R.mjs → HoverCopyableField-HWshrU_1.mjs} +32 -21
  92. package/dist/HoverCopyableField-HWshrU_1.mjs.map +1 -0
  93. package/dist/HoverCopyableField.d.mts +14 -3
  94. package/dist/{IconButton-DC4rh6ow.mjs → IconButton-BgL3QUVO.mjs} +9 -9
  95. package/dist/IconButton-BgL3QUVO.mjs.map +1 -0
  96. package/dist/{IconButton-Dc17jZPG.d.mts → IconButton-CLsHdYm7.d.mts} +2 -2
  97. package/dist/IconButton.d.mts +1 -1
  98. package/dist/ImageTile.d.mts +1 -1
  99. package/dist/InlineCombobox.d.mts +1 -1
  100. package/dist/InlineInput.d.mts +1 -1
  101. package/dist/{Input-DsS4J78T.d.mts → Input-BHHWpSKN.d.mts} +5 -5
  102. package/dist/{Input-PWfwMSJ7.mjs → Input-DoB8YswA.mjs} +5 -5
  103. package/dist/{Input-PWfwMSJ7.mjs.map → Input-DoB8YswA.mjs.map} +1 -1
  104. package/dist/Input.d.mts +1 -1
  105. package/dist/{InputProps-Buxtnz77.d.mts → InputProps-sHxlDiss.d.mts} +2 -2
  106. package/dist/InputProps.d.mts +1 -1
  107. package/dist/IntegerValueControl.d.mts +1 -1
  108. package/dist/LayoutLoadingSpinner.d.mts +11 -0
  109. package/dist/Link.d.mts +2 -2
  110. package/dist/{ListBox-BwD-q7wF.mjs → ListBox-B9uuMt2R.mjs} +23 -16
  111. package/dist/ListBox-B9uuMt2R.mjs.map +1 -0
  112. package/dist/{ListBox-Nl9aOBeh.d.mts → ListBox-BrY1bQ5-.d.mts} +3 -3
  113. package/dist/ListBox.d.mts +1 -1
  114. package/dist/ListBoxField.d.mts +5 -2
  115. package/dist/{LoadingShimmer-BPYPtFE1.mjs → LoadingShimmer-dsBWRdTU.mjs} +2 -2
  116. package/dist/{LoadingShimmer-BPYPtFE1.mjs.map → LoadingShimmer-dsBWRdTU.mjs.map} +1 -1
  117. package/dist/LoadingShimmer.d.mts +2 -2
  118. package/dist/{LogicRow-BAREMenx.d.mts → LogicRow-9a_klV2v.d.mts} +3 -3
  119. package/dist/LogicRow.d.mts +1 -1
  120. package/dist/MaskedInput.d.mts +2 -2
  121. package/dist/MatchHighlight.d.mts +1 -1
  122. package/dist/{Menu-DpM8o234.mjs → Menu-CHbUf9PQ.mjs} +5 -5
  123. package/dist/{Menu-DpM8o234.mjs.map → Menu-CHbUf9PQ.mjs.map} +1 -1
  124. package/dist/{Menu-DM9OoZ71.d.mts → Menu-D4Y_J-QI.d.mts} +4 -4
  125. package/dist/Menu.d.mts +1 -1
  126. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs → MiddleTruncatedText-DnF7F_1D.mjs} +2 -2
  127. package/dist/{MiddleTruncatedText-Bzpg3zAU.mjs.map → MiddleTruncatedText-DnF7F_1D.mjs.map} +1 -1
  128. package/dist/Modal.d.mts +4 -5
  129. package/dist/{PageHeader-Dq-J3san.mjs → PageHeader-XxGsFLHb.mjs} +4 -4
  130. package/dist/{PageHeader-Dq-J3san.mjs.map → PageHeader-XxGsFLHb.mjs.map} +1 -1
  131. package/dist/PageHeader.d.mts +2 -2
  132. package/dist/PageLayout.d.mts +1 -1
  133. package/dist/{PageSelector-Ca4TcyxG.d.mts → PageSelector-BDo3ge1E.d.mts} +2 -2
  134. package/dist/PageSelector.d.mts +1 -1
  135. package/dist/{Pagination-GALyid4q.mjs → Pagination-DvVKQLdC.mjs} +8 -8
  136. package/dist/{Pagination-GALyid4q.mjs.map → Pagination-DvVKQLdC.mjs.map} +1 -1
  137. package/dist/{Pii-BalLvfze.mjs → Pii-BD48BtZ0.mjs} +2 -2
  138. package/dist/{Pii-BalLvfze.mjs.map → Pii-BD48BtZ0.mjs.map} +1 -1
  139. package/dist/PillShell.d.mts +1 -1
  140. package/dist/{Popover-BZ5Bs80y.mjs → Popover-DNH8Jx1-.mjs} +4 -4
  141. package/dist/{Popover-BZ5Bs80y.mjs.map → Popover-DNH8Jx1-.mjs.map} +1 -1
  142. package/dist/{PseudoClassProps-CcSlKNev.d.mts → PseudoClassProps-DgT5G_z5.d.mts} +1 -1
  143. package/dist/PseudoClassProps.d.mts +1 -1
  144. package/dist/{Radio-CtPz3EzX.mjs → Radio-DSMPX5_2.mjs} +5 -5
  145. package/dist/Radio-DSMPX5_2.mjs.map +1 -0
  146. package/dist/{RadioGroup-sjBzFE_-.mjs → RadioGroup-D5IITQLz.mjs} +3 -3
  147. package/dist/{RadioGroup-sjBzFE_-.mjs.map → RadioGroup-D5IITQLz.mjs.map} +1 -1
  148. package/dist/{RadioGroup-Xn46ovrV.d.mts → RadioGroup-Jl1yAvGu.d.mts} +1 -1
  149. package/dist/RadioGroup.d.mts +1 -1
  150. package/dist/RuleEditorFields.d.mts +2 -2
  151. package/dist/RulesPill.d.mts +1 -1
  152. package/dist/{SearchInput-Try11aJD.d.mts → SearchInput-CaKHRC_s.d.mts} +2 -2
  153. package/dist/SearchInput.d.mts +1 -1
  154. package/dist/Section.d.mts +1 -1
  155. package/dist/SectionHeading.d.mts +77 -2
  156. package/dist/{SegmentedControl-BugnH-h2.mjs → SegmentedControl-JUgRw_M-.mjs} +3 -3
  157. package/dist/{SegmentedControl-BugnH-h2.mjs.map → SegmentedControl-JUgRw_M-.mjs.map} +1 -1
  158. package/dist/{SegmentedControl-DckAdhcD.d.mts → SegmentedControl-e6xDtoHC.d.mts} +1 -1
  159. package/dist/SegmentedControl.d.mts +1 -1
  160. package/dist/{Select-BmJ1OjXA.d.mts → Select-CPYztD4m.d.mts} +3 -3
  161. package/dist/{Select-DL-AjL0Q.mjs → Select-DX3toj6M.mjs} +10 -10
  162. package/dist/{Select-DL-AjL0Q.mjs.map → Select-DX3toj6M.mjs.map} +1 -1
  163. package/dist/Select.d.mts +1 -1
  164. package/dist/{Spacer-Ln3KChb5.mjs → Spacer-BsK8tTwA.mjs} +2 -2
  165. package/dist/{Spacer-Ln3KChb5.mjs.map → Spacer-BsK8tTwA.mjs.map} +1 -1
  166. package/dist/{Spinner-BgBCCHGo.mjs → Spinner-D3wXIoXN.mjs} +3 -3
  167. package/dist/{Spinner-BgBCCHGo.mjs.map → Spinner-D3wXIoXN.mjs.map} +1 -1
  168. package/dist/{Stack-ckRN7LrP.mjs → Stack-Bre2oiov.mjs} +2 -2
  169. package/dist/{Stack-ckRN7LrP.mjs.map → Stack-Bre2oiov.mjs.map} +1 -1
  170. package/dist/{Stack-CbcJykx9.d.mts → Stack-DHaK1-dw.d.mts} +2 -2
  171. package/dist/Stack.d.mts +1 -1
  172. package/dist/{Sticker-B0TbkV4o.mjs → Sticker-CQ6sOKUj.mjs} +6 -6
  173. package/dist/{Sticker-B0TbkV4o.mjs.map → Sticker-CQ6sOKUj.mjs.map} +1 -1
  174. package/dist/{Sticker-BIVuastf.d.mts → Sticker-DnSemOcW.d.mts} +5 -5
  175. package/dist/Sticker.d.mts +1 -1
  176. package/dist/StringValueControl.d.mts +1 -1
  177. package/dist/Tab.d.mts +2 -2
  178. package/dist/{TabBar-DLf4Hwa4.mjs → TabBar-sYllYizt.mjs} +6 -6
  179. package/dist/{TabBar-DLf4Hwa4.mjs.map → TabBar-sYllYizt.mjs.map} +1 -1
  180. package/dist/TabBarIconButton.d.mts +2 -2
  181. package/dist/{Table-C-mx8Uj0.mjs → Table-C2pkP5Xg.mjs} +7 -7
  182. package/dist/{Table-C-mx8Uj0.mjs.map → Table-C2pkP5Xg.mjs.map} +1 -1
  183. package/dist/{Table-8jXlKYLy.d.mts → Table-CFbPINKr.d.mts} +1 -1
  184. package/dist/Table.d.mts +1 -1
  185. package/dist/{TableBody-ByEcFueE.d.mts → TableBody-BQsGc4Lw.d.mts} +1 -1
  186. package/dist/TableBody.d.mts +1 -1
  187. package/dist/{TableBox-DGjKVQFO.mjs → TableBox-CaTHcR4F.mjs} +15 -15
  188. package/dist/{TableBox-DGjKVQFO.mjs.map → TableBox-CaTHcR4F.mjs.map} +1 -1
  189. package/dist/TableBox.d.mts +2 -2
  190. package/dist/{TableBoxCell-BmoPs1u1.d.mts → TableBoxCell-52g97gEg.d.mts} +7 -7
  191. package/dist/TableBoxCell.d.mts +1 -1
  192. package/dist/TableBoxField.d.mts +3 -3
  193. package/dist/{TableBoxRow-BAYvEDjT.d.mts → TableBoxRow-DnoumHIE.d.mts} +3 -3
  194. package/dist/TableBoxRow.d.mts +1 -1
  195. package/dist/{TableBoxRowActions-DRs4MdK0.d.mts → TableBoxRowActions-CDcREhP4.d.mts} +2 -2
  196. package/dist/TableBoxRowActions.d.mts +1 -1
  197. package/dist/TableCell.d.mts +1 -1
  198. package/dist/{TableControls-BK8DCsqi.mjs → TableControls-3bXyd8gS.mjs} +247 -103
  199. package/dist/TableControls-3bXyd8gS.mjs.map +1 -0
  200. package/dist/{TableControls-DscP6fyt.d.mts → TableControls-CrGGlkEG.d.mts} +4 -8
  201. package/dist/TableControls.d.mts +1 -1
  202. package/dist/{TableControlsContext-BeJ7GHPN.d.mts → TableControlsContext-BKZt2Jid.d.mts} +2 -2
  203. package/dist/TableControlsContext.d.mts +1 -1
  204. package/dist/{TableHead-g3afLl5B.d.mts → TableHead-CqVIJfjh.d.mts} +1 -1
  205. package/dist/TableHead.d.mts +1 -1
  206. package/dist/{TableHeaderCell-CWTMf2Fe.d.mts → TableHeaderCell-DK4R8vdK.d.mts} +1 -1
  207. package/dist/TableHeaderCell.d.mts +1 -1
  208. package/dist/{TableLayout-hPlVO3dD.d.mts → TableLayout-BcIazRB-.d.mts} +1 -1
  209. package/dist/TableLayout.d.mts +1 -1
  210. package/dist/{TableRow-lvjbVccA.d.mts → TableRow-DdJcjG2b.d.mts} +2 -2
  211. package/dist/TableRow.d.mts +1 -1
  212. package/dist/TableTH.d.mts +1 -1
  213. package/dist/{TableViewConfigurationDropdown-Ccxtk5dA.d.mts → TableViewConfigurationDropdown-CHBOjw7O.d.mts} +5 -3
  214. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  215. package/dist/{TechnicalSticker-BrvR0zhC.mjs → TechnicalSticker-D3eeGMDR.mjs} +6 -6
  216. package/dist/{TechnicalSticker-BrvR0zhC.mjs.map → TechnicalSticker-D3eeGMDR.mjs.map} +1 -1
  217. package/dist/{Text-hEoPeOc9.mjs → Text-B0orb-cZ.mjs} +2 -2
  218. package/dist/{Text-hEoPeOc9.mjs.map → Text-B0orb-cZ.mjs.map} +1 -1
  219. package/dist/{Text-CfIFUyHt.d.mts → Text-BIgrwIdS.d.mts} +4 -4
  220. package/dist/Text.d.mts +1 -1
  221. package/dist/{TextArea-DiKEhpfD.d.mts → TextArea-CiLttt0s.d.mts} +2 -2
  222. package/dist/{TextArea-BFsXUkuj.mjs → TextArea-DWXuV2aZ.mjs} +3 -3
  223. package/dist/{TextArea-BFsXUkuj.mjs.map → TextArea-DWXuV2aZ.mjs.map} +1 -1
  224. package/dist/TextArea.d.mts +1 -1
  225. package/dist/{TextUnderlineTooltip-Bs6Jn5yr.d.mts → TextUnderlineTooltip-_7mIrZ2-.d.mts} +3 -3
  226. package/dist/TextUnderlineTooltip.d.mts +1 -1
  227. package/dist/Tile.d.mts +1 -1
  228. package/dist/Toast.d.mts +1 -1
  229. package/dist/{Toggle-oukvAn6V.d.mts → Toggle-Cav7bMxg.d.mts} +1 -1
  230. package/dist/{Toggle-CC2FTAKS.mjs → Toggle-e8DCYa6i.mjs} +6 -6
  231. package/dist/{Toggle-CC2FTAKS.mjs.map → Toggle-e8DCYa6i.mjs.map} +1 -1
  232. package/dist/Toggle.d.mts +1 -1
  233. package/dist/{Tooltip-0iXDCV2O.d.mts → Tooltip-DX-N-szt.d.mts} +3 -3
  234. package/dist/{Tooltip-CDvOu1UN.mjs → Tooltip-iJcfJqxn.mjs} +4 -4
  235. package/dist/{Tooltip-CDvOu1UN.mjs.map → Tooltip-iJcfJqxn.mjs.map} +1 -1
  236. package/dist/Tooltip.d.mts +1 -1
  237. package/dist/{TruncatedText-CdeU19Ev.d.mts → TruncatedText-D2R7uy_y.d.mts} +2 -2
  238. package/dist/components/Attribute/index.mjs +8 -9
  239. package/dist/components/Attribute/index.mjs.map +1 -1
  240. package/dist/components/Badge/index.mjs +1 -1
  241. package/dist/components/Banner/index.mjs +3 -3
  242. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  243. package/dist/components/Breadcrumbs/index.mjs +1 -1
  244. package/dist/components/Button/index.d.mts +2 -2
  245. package/dist/components/Button/index.mjs +1 -1
  246. package/dist/components/ButtonGroup/index.mjs +3 -3
  247. package/dist/components/Card/index.d.mts +2 -2
  248. package/dist/components/Card/index.mjs +1 -1
  249. package/dist/components/CardV2/index.d.mts +3 -2
  250. package/dist/components/CardV2/index.mjs +2 -2
  251. package/dist/components/Checkbox/index.mjs +1 -1
  252. package/dist/components/Combobox/index.d.mts +2 -2
  253. package/dist/components/Combobox/index.mjs +1 -1
  254. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  255. package/dist/components/DataTable/TableControls/index.d.mts +16 -16
  256. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  257. package/dist/components/DataTable/index.mjs +22 -24
  258. package/dist/components/DataTable/index.mjs.map +1 -1
  259. package/dist/components/DataTable/types.d.mts +2 -2
  260. package/dist/components/DatePicker/index.d.mts +4 -4
  261. package/dist/components/DatePicker/index.mjs +1 -1
  262. package/dist/components/DropdownButton/index.mjs +1 -1
  263. package/dist/components/DropdownMenu/index.d.mts +1 -1
  264. package/dist/components/DropdownMenu/index.mjs +1 -1
  265. package/dist/components/FloatingPanel/index.d.mts +5 -0
  266. package/dist/components/FloatingPanel/index.mjs +635 -0
  267. package/dist/components/FloatingPanel/index.mjs.map +1 -0
  268. package/dist/components/FormControl/index.d.mts +2 -2
  269. package/dist/components/FormControl/index.mjs +2 -2
  270. package/dist/components/FormField/index.d.mts +1 -1
  271. package/dist/components/FormField/index.mjs +1 -1
  272. package/dist/components/HoverCopyableField/index.d.mts +2 -2
  273. package/dist/components/HoverCopyableField/index.mjs +2 -2
  274. package/dist/components/ImageTile/index.mjs +9 -9
  275. package/dist/components/Input/index.d.mts +1 -1
  276. package/dist/components/Input/index.mjs +1 -1
  277. package/dist/components/Link/index.mjs +3 -3
  278. package/dist/components/Link/index.mjs.map +1 -1
  279. package/dist/components/ListBox/index.d.mts +3 -3
  280. package/dist/components/ListBox/index.mjs +1 -1
  281. package/dist/components/LoadingShimmer/index.mjs +1 -1
  282. package/dist/components/MaskedInput/index.mjs +1 -1
  283. package/dist/components/MatchHighlight/index.mjs +1 -1
  284. package/dist/components/Menu/index.d.mts +1 -1
  285. package/dist/components/Menu/index.mjs +1 -1
  286. package/dist/components/Modal/index.mjs +46 -17
  287. package/dist/components/Modal/index.mjs.map +1 -1
  288. package/dist/components/PageHeader/index.mjs +1 -1
  289. package/dist/components/Pagination/index.d.mts +1 -1
  290. package/dist/components/Pagination/index.mjs +1 -1
  291. package/dist/components/Pii/index.mjs +1 -1
  292. package/dist/components/Popover/index.mjs +1 -1
  293. package/dist/components/ProgressBar/index.mjs +4 -4
  294. package/dist/components/ProgressBar/index.mjs.map +1 -1
  295. package/dist/components/ProgressIndicator/index.mjs +2 -2
  296. package/dist/components/Radio/index.mjs +1 -1
  297. package/dist/components/RadioGroup/index.d.mts +1 -1
  298. package/dist/components/RadioGroup/index.mjs +1 -1
  299. package/dist/components/SegmentedControl/index.d.mts +1 -1
  300. package/dist/components/SegmentedControl/index.mjs +1 -1
  301. package/dist/components/Select/index.d.mts +1 -1
  302. package/dist/components/Select/index.mjs +1 -1
  303. package/dist/components/Slider/index.mjs +5 -5
  304. package/dist/components/Slider/index.mjs.map +1 -1
  305. package/dist/components/Spacer/index.mjs +1 -1
  306. package/dist/components/Spinner/index.mjs +1 -1
  307. package/dist/components/Stack/index.d.mts +1 -1
  308. package/dist/components/Stack/index.mjs +1 -1
  309. package/dist/components/StatusIndicator/index.mjs +2 -2
  310. package/dist/components/Sticker/index.d.mts +1 -1
  311. package/dist/components/Sticker/index.mjs +1 -1
  312. package/dist/components/SwatchPicker/index.mjs +1 -1
  313. package/dist/components/TabBar/index.mjs +1 -1
  314. package/dist/components/Table/index.d.mts +7 -7
  315. package/dist/components/Table/index.mjs +1 -1
  316. package/dist/components/TableBox/index.d.mts +2 -2
  317. package/dist/components/TableBox/index.mjs +1 -1
  318. package/dist/components/TechnicalSticker/index.mjs +1 -1
  319. package/dist/components/Text/index.d.mts +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 +5 -5
  324. package/dist/components/Toast/index.mjs +5 -5
  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/display.d.mts +1 -1
  331. package/dist/fieldPickerOptions.d.mts +2 -2
  332. package/dist/{filter-size-context-C1TvrE_O.d.mts → filter-size-context-C7injfBh.d.mts} +2 -2
  333. package/dist/filter-size-context.d.mts +1 -1
  334. package/dist/{index-BC4edEsD.d.mts → index-BPfK-u7y.d.mts} +2 -2
  335. package/dist/{index-CdaoOvFH.d.mts → index-BxBsQi2S.d.mts} +3 -3
  336. package/dist/{index-DJn4AeE4.d.mts → index-d_fTFuMM.d.mts} +4 -4
  337. package/dist/index.d.mts +1 -1
  338. package/dist/index2.d.mts +1 -1
  339. package/dist/index3.d.mts +3 -3
  340. package/dist/index4.d.mts +11 -11
  341. package/dist/{input-D3Qd6dI8.d.mts → input-D9FuQmlI.d.mts} +2 -2
  342. package/dist/inputFields.d.mts +10 -24
  343. package/dist/{intersperse-yd3oMrQl.mjs → intersperse-CLkblj9A.mjs} +1 -1
  344. package/dist/{intersperse-yd3oMrQl.mjs.map → intersperse-CLkblj9A.mjs.map} +1 -1
  345. package/dist/lib/ConfigContext.d.mts +4 -1
  346. package/dist/lib/ConfigContext.mjs.map +1 -1
  347. package/dist/lib/GlobalStyles.mjs +1 -1
  348. package/dist/lib/HeadlessAriaButton.mjs +1 -1
  349. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  350. package/dist/lib/PDSProvider.d.mts +1 -1
  351. package/dist/lib/PDSProvider.mjs +1 -1
  352. package/dist/lib/TruncatedText.d.mts +1 -1
  353. package/dist/lib/TruncatedText.mjs +1 -1
  354. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  355. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  356. package/dist/lib/embeddedSurfaceProtocol.d.mts +13 -1
  357. package/dist/lib/embeddedSurfaceProtocol.mjs +32 -5
  358. package/dist/lib/embeddedSurfaceProtocol.mjs.map +1 -1
  359. package/dist/lib/message.d.mts +1 -1
  360. package/dist/lib/pseudoClass.d.mts +1 -1
  361. package/dist/lib/useEmbeddedSurface.d.mts +31 -3
  362. package/dist/lib/useEmbeddedSurface.mjs +118 -13
  363. package/dist/lib/useEmbeddedSurface.mjs.map +1 -1
  364. package/dist/{message-CsK3sIq0.d.mts → message-CqKB5mko.d.mts} +1 -1
  365. package/dist/mixins/focus.d.mts +1 -1
  366. package/dist/mixins/focus.mjs +1 -1
  367. package/dist/mixins/hoverable.d.mts +2 -2
  368. package/dist/mixins/hoverable.mjs +2 -2
  369. package/dist/mixins/input.d.mts +1 -1
  370. package/dist/mixins/input.mjs +2 -2
  371. package/dist/mixins/menuItem.d.mts +2 -2
  372. package/dist/mixins/menuItem.mjs +1 -1
  373. package/dist/mixins/print/index.mjs +1 -1
  374. package/dist/mixins/text.d.mts +1 -1
  375. package/dist/mixins/text.mjs +1 -1
  376. package/dist/{operators-C_xPzItk.d.mts → operators-CgcsYzfy.d.mts} +24 -3
  377. package/dist/operators.d.mts +2 -2
  378. package/dist/patterns/LayoutLoadingShimmer/index.mjs +6 -6
  379. package/dist/patterns/LayoutLoadingSpinner/index.d.mts +2 -0
  380. package/dist/patterns/LayoutLoadingSpinner/index.mjs +56 -0
  381. package/dist/patterns/LayoutLoadingSpinner/index.mjs.map +1 -0
  382. package/dist/patterns/PageLayout/index.mjs +1 -1
  383. package/dist/styledComponentsInterop-8zScIQyC.mjs +33 -0
  384. package/dist/styledComponentsInterop-8zScIQyC.mjs.map +1 -0
  385. package/dist/{text-BaQdW8qa.d.mts → text-xwtyWIbE.d.mts} +1 -1
  386. package/dist/{theme-D9Y6NOzb.d.mts → theme-Ftogn9Wo.d.mts} +1 -1
  387. package/dist/theme.d.mts +1 -1
  388. package/dist/{types-CjHuZoVJ.d.mts → types-0_9G0kWg.d.mts} +3 -1
  389. package/dist/{types-BKEwt0uq.d.mts → types-BrNreYUU.d.mts} +2 -2
  390. package/dist/{types-mb3woqzE.d.mts → types-D55MZSyx.d.mts} +6 -3
  391. package/dist/types.d.mts +1 -1
  392. package/dist/types2.d.mts +1 -1
  393. package/dist/types3.d.mts +1 -1
  394. package/dist/useComboboxFooterAction.d.mts +1 -1
  395. package/dist/{useFilterStateV2-CGzRyv0i.d.mts → useFilterStateV2-D8Q8QKhS.d.mts} +3 -3
  396. package/dist/useFilterStateV2.d.mts +1 -1
  397. package/dist/{useFormField-DhwEi45-.d.mts → useFormField-BBbq1izo.d.mts} +1 -1
  398. package/dist/{useFormField-eftOPiXj.mjs → useFormField-Bz2iMPBO.mjs} +2 -2
  399. package/dist/{useFormField-eftOPiXj.mjs.map → useFormField-Bz2iMPBO.mjs.map} +1 -1
  400. package/dist/useFormField.d.mts +1 -1
  401. package/dist/{useFormGroup-BMukAMAd.mjs → useFormGroup-CaTiD_Yt.mjs} +1 -1
  402. package/dist/{useFormGroup-BMukAMAd.mjs.map → useFormGroup-CaTiD_Yt.mjs.map} +1 -1
  403. package/dist/{useTableBoxDragAndDrop-CsnN52lx.d.mts → useTableBoxDragAndDrop-Bye8gJTl.d.mts} +1 -1
  404. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  405. package/dist/{useToggle-3k3EkV8V.mjs → useToggle-Bo3yd14Y.mjs} +1 -1
  406. package/dist/{useToggle-3k3EkV8V.mjs.map → useToggle-Bo3yd14Y.mjs.map} +1 -1
  407. package/dist/useTruncation.d.mts +1 -1
  408. package/dist/{utilities-DnSIlR1i.d.mts → utilities-Bmwk_DRn.d.mts} +1 -1
  409. package/dist/utilities.d.mts +1 -1
  410. package/dist/utils/storybook.mjs +1 -1
  411. package/dist/utils.d.mts +1 -1
  412. package/dist/utils2.d.mts +12 -1
  413. package/dist/utils3.d.mts +7 -0
  414. package/dist/{validation-BdP2vajF.d.mts → validation-CAtTuHO9.d.mts} +3 -3
  415. package/dist/validation.d.mts +1 -1
  416. package/dist/{value-control-resolver-CiGEHQAc.d.mts → value-control-resolver-DadI8r9a.d.mts} +2 -2
  417. package/dist/value-control-resolver.d.mts +1 -1
  418. package/dist/variables/keyframes.mjs +1 -1
  419. package/llms.txt +5 -5
  420. package/package.json +8 -3
  421. package/skills/ui-authoring/COMPONENTS.md +69 -305
  422. package/skills/ui-authoring/PATTERNS.md +362 -0
  423. package/skills/ui-authoring/SKILL.md +15 -147
  424. package/skills/ui-authoring/TOKENS.md +400 -0
  425. package/dist/CardV2-m9yOInMU.mjs.map +0 -1
  426. package/dist/Checkbox-CU27-Aa8.mjs.map +0 -1
  427. package/dist/DatePicker-DpGvo7Bd.mjs.map +0 -1
  428. package/dist/FormControl-BIXJ-FPI.mjs.map +0 -1
  429. package/dist/FormField-DcGQvgNW.mjs.map +0 -1
  430. package/dist/HoverCopyableField-BHdCaR-R.mjs.map +0 -1
  431. package/dist/IconButton-DC4rh6ow.mjs.map +0 -1
  432. package/dist/ListBox-BwD-q7wF.mjs.map +0 -1
  433. package/dist/Radio-CtPz3EzX.mjs.map +0 -1
  434. package/dist/SectionHeading-DvP9NEgN.d.mts +0 -71
  435. package/dist/TableControls-BK8DCsqi.mjs.map +0 -1
  436. package/skills/ui-authoring/EXAMPLES.md +0 -370
  437. package/skills/ui-authoring/REFERENCE.md +0 -293
  438. /package/dist/{index-7rWKHdox.d.mts → index-BSVhZrWN.d.mts} +0 -0
  439. /package/dist/{index-B4woaFSm.d.mts → index-BrGZHEgX.d.mts} +0 -0
  440. /package/dist/{index-BOn0AAue.d.mts → index-BwAfCVZH2.d.mts} +0 -0
  441. /package/dist/{index-CKKoxA9V.d.mts → index-CDGG7lCB.d.mts} +0 -0
  442. /package/dist/{index-CRo77wc3.d.mts → index-CFhUdAHM.d.mts} +0 -0
  443. /package/dist/{index-Ci-uuV07.d.mts → index-CROz1VSV.d.mts} +0 -0
  444. /package/dist/{index-DDdPqD_H.d.mts → index-DA6_cwf8.d.mts} +0 -0
  445. /package/dist/{index-Es5nKSSL.d.mts → index-DM6vVDZD.d.mts} +0 -0
  446. /package/dist/{index-FtE8MXJ_.d.mts → index-Jh0C5PIG.d.mts} +0 -0
  447. /package/dist/{index-ehD5GjMH.d.mts → index-PWQavSPf.d.mts} +0 -0
  448. /package/dist/{index-uMNhmxEh.d.mts → index-sViox9YW.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-DnSemOcW.mjs";
2
+ import { l as MenuItemProps } from "../../Menu-D4Y_J-QI.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-B1iWrqR5.mjs";
2
+ import { n as DateRangePicker, r as DateRangePickerProps, t as DateRange } from "../../DateRangePicker-BmF9eH9R.mjs";
3
+ import { t as DateField } from "../../DateField-CKeSIhGy.mjs";
4
+ import { t as Calendar } from "../../Calendar-CcxN7y3e.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-BNnZ6L1y.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-BlVeFbJ0.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-DuTnq9j7.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-82xH1AZr.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 ConfigContext from "../../lib/ConfigContext.mjs";
2
+ import { a as styled, r as css } from "../../styledComponentsInterop-8zScIQyC.mjs";
3
+ import { paragraphMixins } from "../../mixins/text.mjs";
4
+ import { Z_INDICES } from "../../lib/zindex.mjs";
5
+ import "../../variables/effect.mjs";
6
+ import { n as Stack } from "../../Stack-Bre2oiov.mjs";
7
+ import { t as IconButton } from "../../IconButton-BgL3QUVO.mjs";
8
+ import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
9
+ import { cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useRef, useState } from "react";
10
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
+ import { ArrowCollapseIcon, ArrowExpandIcon, XIcon } from "@persona/icons";
12
+ import { useLocation } from "react-router-dom";
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$1, { 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