@persona/design-system 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/{Action-C2FTJhnQ.d.mts → Action-C7INft7X.d.mts} +3 -3
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +2 -2
- package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
- package/dist/ArrayValueControl.d.mts +1 -1
- package/dist/Attribute.d.mts +3 -3
- package/dist/{Badge-BtNIvtDZ.mjs → Badge-BD0Ut46g.mjs} +2 -2
- package/dist/{Badge-BtNIvtDZ.mjs.map → Badge-BD0Ut46g.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-BlAhp45l.d.mts → Breadcrumb-DtW1R9xW.d.mts} +2 -2
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-DdZ14ZFw.d.mts → Breadcrumbs-B6JyoS8n.d.mts} +2 -2
- package/dist/{Breadcrumbs-ClKHNIr-.mjs → Breadcrumbs-CCmf8oZ4.mjs} +9 -9
- package/dist/Breadcrumbs-CCmf8oZ4.mjs.map +1 -0
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-CTgyA3gc.d.mts → Button-HodDf_bB.d.mts} +18 -9
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-_gM6U5ET.d.mts → Calendar-DrdTvzAa.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-Dorym91P.d.mts → Card-CpDwATnX.d.mts} +3 -3
- package/dist/{Card-vQIPtdXi.mjs → Card-Dz6jqJuJ.mjs} +4 -4
- package/dist/{Card-vQIPtdXi.mjs.map → Card-Dz6jqJuJ.mjs.map} +1 -1
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +2 -2
- package/dist/{CardV2-CFTjYWoO.mjs → CardV2-Y_kRfd-R.mjs} +9 -9
- package/dist/{CardV2-CFTjYWoO.mjs.map → CardV2-Y_kRfd-R.mjs.map} +1 -1
- package/dist/{Checkbox-DRJXDs2T.d.mts → Checkbox-C-hMfItK.d.mts} +1 -1
- package/dist/{Checkbox-CyeitZ5q.mjs → Checkbox-DBAXDIQf.mjs} +4 -4
- package/dist/{Checkbox-CyeitZ5q.mjs.map → Checkbox-DBAXDIQf.mjs.map} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-Ddas5FN-.mjs → Combobox-CNdpK8VG.mjs} +10 -10
- package/dist/{Combobox-Ddas5FN-.mjs.map → Combobox-CNdpK8VG.mjs.map} +1 -1
- package/dist/{Combobox-DX4DLe1b.d.mts → Combobox-CPE-IV79.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-Ds_i3K2m.d.mts → ComboboxBase-B3Es1y9g.d.mts} +5 -5
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-S6oFJcOS.d.mts → ComboboxMultiSelect-4sRA7oL0.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-DFzCwW1Y.d.mts → ComboboxSingleSelect-DVPznL7L.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-DEqItiZr.d.mts → CompactBar-DhHh7Roq.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-DcsM-u8o.mjs → ConfigFormGroup-4lUy7CZH.mjs} +2 -2
- package/dist/{ConfigFormGroup-DcsM-u8o.mjs.map → ConfigFormGroup-4lUy7CZH.mjs.map} +1 -1
- package/dist/{ControlBar-BVG5Pbvh.d.mts → ControlBar-C8kagIck.d.mts} +2 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +4 -4
- package/dist/{DateField-CBCo8_d3.d.mts → DateField-2aigfD4u.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-DTT-mJ8r.mjs → DatePicker-CSd20-CW.mjs} +8 -8
- package/dist/{DatePicker-DTT-mJ8r.mjs.map → DatePicker-CSd20-CW.mjs.map} +1 -1
- package/dist/{DatePicker-BZ4_I4Db.d.mts → DatePicker-DC_RKjdM.d.mts} +2 -2
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-BMKJquPT.d.mts → DateRangePicker-ByD6IsLB.d.mts} +3 -3
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +2 -2
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-DV5if_uG.mjs → DropdownButton-gmGRrD1z.mjs} +3 -3
- package/dist/{DropdownButton-DV5if_uG.mjs.map → DropdownButton-gmGRrD1z.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-DovtBJBs.mjs → DropdownMenu-I5WDO-q5.mjs} +2 -2
- package/dist/{DropdownMenu-DovtBJBs.mjs.map → DropdownMenu-I5WDO-q5.mjs.map} +1 -1
- package/dist/{DropdownMenu-CbhEzWy1.d.mts → DropdownMenu-eP6v6XE4.d.mts} +2 -2
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-7eWoxSes.d.mts → ErrorProps-Dgu98PkH.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-BslyuPZw.d.mts → FieldRegistry-BtdqMYUD.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-DjZE4PoB.d.mts → FilterBar-CAnqGXgE.d.mts} +4 -4
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +2 -2
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +1 -1
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/{FormControl-BvRzRknE.mjs → FormControl-CButLg9b.mjs} +4 -4
- package/dist/{FormControl-BvRzRknE.mjs.map → FormControl-CButLg9b.mjs.map} +1 -1
- package/dist/{FormControl-gpLZZpNs.d.mts → FormControl-CJfYdgZF.d.mts} +2 -2
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +1 -1
- package/dist/{FormField-BDJ6zNE6.mjs → FormField-BHUeWCsa.mjs} +16 -16
- package/dist/{FormField-BDJ6zNE6.mjs.map → FormField-BHUeWCsa.mjs.map} +1 -1
- package/dist/{FormField-CZXKvCGt.d.mts → FormField-CK8o1sMB.d.mts} +2 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/{Header-1laYnwRP.d.mts → Header-ZnHGm8fs.d.mts} +1 -1
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-BPJS3EwC.d.mts → HelperTooltip-CQpPO16Q.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/{HoverCopyableField-WP6DPjy1.mjs → HoverCopyableField-B89NIwlE.mjs} +6 -6
- package/dist/{HoverCopyableField-WP6DPjy1.mjs.map → HoverCopyableField-B89NIwlE.mjs.map} +1 -1
- package/dist/{IconButton-CnJNIJVQ.mjs → IconButton-CqTPMhjV.mjs} +12 -5
- package/dist/IconButton-CqTPMhjV.mjs.map +1 -0
- package/dist/{IconButton-PnrnqQ1s.d.mts → IconButton-zu-VNp1h.d.mts} +2 -2
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DbfwNzS_.mjs → Input-C-TwCer2.mjs} +4 -4
- package/dist/{Input-DbfwNzS_.mjs.map → Input-C-TwCer2.mjs.map} +1 -1
- package/dist/{Input-Diztxhle.d.mts → Input-Ce8FvSYf.d.mts} +3 -3
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-BILq1X-n.d.mts → InputProps-B1Xod4wm.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/Link.d.mts +2 -2
- package/dist/{ListBox-CXh9Jfb-.mjs → ListBox-BHE4DO2l.mjs} +9 -9
- package/dist/{ListBox-CXh9Jfb-.mjs.map → ListBox-BHE4DO2l.mjs.map} +1 -1
- package/dist/{ListBox-P1eTecdo.d.mts → ListBox-CCBWdAUR.d.mts} +3 -3
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +2 -2
- package/dist/{LoadingShimmer-DeVCDCjT.mjs → LoadingShimmer-JyGh7M7V.mjs} +1 -1
- package/dist/{LoadingShimmer-DeVCDCjT.mjs.map → LoadingShimmer-JyGh7M7V.mjs.map} +1 -1
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-DtZYOzQ8.d.mts → LogicRow-DmI8NKrI.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/{Menu-_loh8pe3.d.mts → Menu-C8RxFGOG.d.mts} +3 -3
- package/dist/{Menu-CAGTCBqj.mjs → Menu-xENvm-Oa.mjs} +2 -2
- package/dist/{Menu-CAGTCBqj.mjs.map → Menu-xENvm-Oa.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-wpvRRTaa.mjs → PageHeader-7GBfUjU_.mjs} +3 -3
- package/dist/{PageHeader-wpvRRTaa.mjs.map → PageHeader-7GBfUjU_.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageSelector-CIa3Zts9.d.mts → PageSelector-BMz2Q4P6.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-wjr3W3xf.mjs → Pagination-BxNqU2yh.mjs} +5 -5
- package/dist/{Pagination-wjr3W3xf.mjs.map → Pagination-BxNqU2yh.mjs.map} +1 -1
- package/dist/{Pagination-C2eZEM7K.d.mts → Pagination-ne9hnVoe.d.mts} +2 -2
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-Bm-qkweh.mjs → Pii-B29k0Omf.mjs} +2 -2
- package/dist/{Pii-Bm-qkweh.mjs.map → Pii-B29k0Omf.mjs.map} +1 -1
- package/dist/{PillShell-D6dN9sWk.d.mts → PillShell-D9iQyM-8.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-DUyzmq3e.mjs → Popover-Dn3xmzSK.mjs} +3 -3
- package/dist/{Popover-DUyzmq3e.mjs.map → Popover-Dn3xmzSK.mjs.map} +1 -1
- package/dist/{PseudoClassProps-DnlHhW5u.d.mts → PseudoClassProps-CdRF3QNn.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-CkugnL91.mjs → Radio-BRPoGITE.mjs} +2 -2
- package/dist/{Radio-CkugnL91.mjs.map → Radio-BRPoGITE.mjs.map} +1 -1
- package/dist/{RadioGroup-8dI8gljw.mjs → RadioGroup-CahrWsXi.mjs} +2 -2
- package/dist/{RadioGroup-8dI8gljw.mjs.map → RadioGroup-CahrWsXi.mjs.map} +1 -1
- package/dist/{RadioGroup-Dg_gydUp.d.mts → RadioGroup-CxL6LW4q.d.mts} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/RangeCalendar-B7TwRJbg.d.mts +40 -0
- package/dist/RangeCalendar.d.mts +2 -40
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/RouterContext-B7N12wkK.d.mts +11 -0
- package/dist/RouterContext-CsPnkNdI.mjs +26 -0
- package/dist/RouterContext-CsPnkNdI.mjs.map +1 -0
- package/dist/RouterContext.d.mts +2 -0
- package/dist/RouterLink-Bq36EGjc.d.mts +8 -0
- package/dist/RouterLink.d.mts +2 -0
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-CNg109M5.d.mts → SearchInput-D69WxMNq.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-DQE0hN57.mjs → SegmentedControl-DLkAC2kW.mjs} +2 -2
- package/dist/{SegmentedControl-DQE0hN57.mjs.map → SegmentedControl-DLkAC2kW.mjs.map} +1 -1
- package/dist/{SegmentedControl-BBIHKcvo.d.mts → SegmentedControl-vCnGsdXo.d.mts} +1 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-wnr46ROZ.d.mts → Select-CpRijO_l.d.mts} +3 -3
- package/dist/{Select-D9OVjzPR.mjs → Select-YOgn_uD0.mjs} +7 -7
- package/dist/{Select-D9OVjzPR.mjs.map → Select-YOgn_uD0.mjs.map} +1 -1
- package/dist/Select.d.mts +1 -1
- package/dist/{Spacer-D58qwuXR.mjs → Spacer-BFOuo0sZ.mjs} +1 -1
- package/dist/{Spacer-D58qwuXR.mjs.map → Spacer-BFOuo0sZ.mjs.map} +1 -1
- package/dist/{Spinner-gBNWIwOn.mjs → Spinner-BDa0D1ze.mjs} +1 -1
- package/dist/{Spinner-gBNWIwOn.mjs.map → Spinner-BDa0D1ze.mjs.map} +1 -1
- package/dist/{Stack-DgC83-nw.d.mts → Stack-8KGPQp0u.d.mts} +1 -1
- package/dist/{Stack-BqQndGI9.mjs → Stack-ChsImaEY.mjs} +1 -1
- package/dist/{Stack-BqQndGI9.mjs.map → Stack-ChsImaEY.mjs.map} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/{Sticker-qvWkqEMw.d.mts → Sticker-Bf9rhSkv.d.mts} +4 -4
- package/dist/{Sticker-BDyejPZa.mjs → Sticker-C3Eb13OQ.mjs} +3 -3
- package/dist/{Sticker-BDyejPZa.mjs.map → Sticker-C3Eb13OQ.mjs.map} +1 -1
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +1 -1
- package/dist/{TabBar-B__54oO3.mjs → TabBar-RenaeJJ6.mjs} +3 -3
- package/dist/{TabBar-B__54oO3.mjs.map → TabBar-RenaeJJ6.mjs.map} +1 -1
- package/dist/{Table-CPvIH27_.d.mts → Table-BefytM6w.d.mts} +1 -1
- package/dist/{Table-CqIi5mVF.mjs → Table-DaxiIS96.mjs} +4 -4
- package/dist/{Table-CqIi5mVF.mjs.map → Table-DaxiIS96.mjs.map} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-CQYijW_3.d.mts → TableBody-BZ34-_wV.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-C-8RxZT4.mjs → TableBox-C7ZXamI7.mjs} +10 -10
- package/dist/{TableBox-C-8RxZT4.mjs.map → TableBox-C7ZXamI7.mjs.map} +1 -1
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-CQ3zT1jG.d.mts → TableBoxCell-B7kjO76l.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +3 -3
- package/dist/{TableBoxRow-ClK2pceY.d.mts → TableBoxRow-oVGEFVOO.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-CoF3DuUQ.d.mts → TableBoxRowActions-DIZw2OPP.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-BQv4ASkE.d.mts → TableCell-DorRxyke.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-CtEL3ioz.d.mts → TableControls-BtGFiZeD.d.mts} +3 -3
- package/dist/{TableControls-DplArh-9.mjs → TableControls-DxAUnR9v.mjs} +18 -18
- package/dist/{TableControls-DplArh-9.mjs.map → TableControls-DxAUnR9v.mjs.map} +1 -1
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-X-Lupvc6.d.mts → TableControlsContext-C3DYeUmB.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-DLLn0zoP.d.mts → TableHead-B0Fdldgw.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-DiJ2jyw4.d.mts → TableHeaderCell-C_7X8QAT.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-BgnUz8NO.d.mts → TableLayout-CXVVzq0e.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-Dgg8hGy5.d.mts → TableRow-Dr61XJNw.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-DRxd562-.d.mts → TableViewConfigurationDropdown-CCtwcB3I.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-D6MO_IfT.mjs → TechnicalSticker-D1PqG_yT.mjs} +3 -3
- package/dist/{TechnicalSticker-D6MO_IfT.mjs.map → TechnicalSticker-D1PqG_yT.mjs.map} +1 -1
- package/dist/{Text-Dn_p7ZvT.mjs → Text-BdluS7Fy.mjs} +1 -1
- package/dist/{Text-Dn_p7ZvT.mjs.map → Text-BdluS7Fy.mjs.map} +1 -1
- package/dist/{Text-tgFz40XD.d.mts → Text-DD_W_ixb.d.mts} +3 -3
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-BxxXQSwP.d.mts → TextArea-DOofaXJi.d.mts} +2 -2
- package/dist/{TextArea-CYirq-B2.mjs → TextArea-wwV-s5Oa.mjs} +2 -2
- package/dist/{TextArea-CYirq-B2.mjs.map → TextArea-wwV-s5Oa.mjs.map} +1 -1
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-DQVYsLqM.d.mts → TextUnderlineTooltip-BPLKU9wu.d.mts} +2 -2
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-BmUl78kH.d.mts → Toggle-2nrUX591.d.mts} +1 -1
- package/dist/{Toggle-CqgFNIYS.mjs → Toggle-iG2x_IZR.mjs} +4 -4
- package/dist/{Toggle-CqgFNIYS.mjs.map → Toggle-iG2x_IZR.mjs.map} +1 -1
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-BsuYG0fw.mjs → Tooltip-C0FuZS1C.mjs} +2 -2
- package/dist/{Tooltip-BsuYG0fw.mjs.map → Tooltip-C0FuZS1C.mjs.map} +1 -1
- package/dist/{Tooltip-eSaiYjxT.d.mts → Tooltip-Cnqf1-tx.d.mts} +2 -2
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-B2v53Y11.d.mts → TruncatedText-g2T5HlqX.d.mts} +1 -1
- package/dist/{codec-D5qlDVgU.d.mts → codec-CoX6LfOY.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/{color-fQTsW4gq.d.mts → color-Bt0Lv1e3.d.mts} +2 -2
- package/dist/components/Attribute/index.mjs +4 -4
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +1 -1
- package/dist/components/BottomPanel/index.mjs +3 -3
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/Card/index.mjs +1 -1
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.d.mts +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +3 -3
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +19 -19
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +15 -15
- package/dist/components/DataTable/index.mjs.map +1 -1
- package/dist/components/DataTable/types.d.mts +2 -2
- package/dist/components/DatePicker/index.d.mts +6 -5
- package/dist/components/DatePicker/index.mjs +2 -2
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +12 -12
- package/dist/components/FloatingPanel/index.mjs.map +1 -1
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +1 -1
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +7 -7
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +2 -2
- package/dist/components/Link/index.mjs.map +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.mjs +7 -69
- package/dist/components/Modal/index.mjs.map +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RightPanel/index.mjs +4 -4
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Slider/index.mjs +2 -2
- package/dist/components/SmartTextInput/parser/method-chain/grammar.pegjs +219 -0
- package/dist/components/SmartTextInput/parser/smart-text/grammar.pegjs +154 -0
- package/dist/components/Spacer/index.mjs +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Stack/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +2 -2
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Text/index.mjs +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +4 -4
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-zZyl7QbX.d.mts → constants-D8bzZ-7B.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/createPath-BDYRvl57.d.mts +7 -0
- package/dist/createPath.d.mts +2 -0
- package/dist/{date-filter-DMZnJwGs.mjs → date-filter-CZeChs9T.mjs} +1 -1
- package/dist/{date-filter-DMZnJwGs.mjs.map → date-filter-CZeChs9T.mjs.map} +1 -1
- package/dist/{date-range-rule-value-zJaa_jR9.d.mts → date-range-rule-value-C3wrh0jw.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-CdWv68my.d.mts → date-rule-intent-CC1LdkE7.d.mts} +3 -3
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +1 -1
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{fieldSchemaTypes-COEJOqYL.d.mts → fieldSchemaTypes-BVYSm74B.d.mts} +1 -1
- package/dist/{filter-size-context-DYkfYMkX.d.mts → filter-size-context-CCfFnaib.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-BX8dSNcy.d.mts → index-D-RD2Kfg.d.mts} +2 -2
- package/dist/{index-DxIXll2Z.d.mts → index-DalP_w0c.d.mts} +2 -2
- package/dist/{index-BJr_obTf.d.mts → index-Nip77QqW.d.mts} +3 -3
- package/dist/index-bHnO4ZKt.d.mts +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +3 -3
- package/dist/index4.d.mts +1 -1
- package/dist/index5.d.mts +14 -14
- package/dist/{input-DN_8iHVD.d.mts → input-DCJivcWf.d.mts} +3 -3
- package/dist/inputFields.d.mts +10 -10
- package/dist/{intersperse-CRUnXmnu.mjs → intersperse-DQAyfeEw.mjs} +1 -1
- package/dist/{intersperse-CRUnXmnu.mjs.map → intersperse-DQAyfeEw.mjs.map} +1 -1
- package/dist/{jsonSchema-B1VonQij.d.mts → jsonSchema-c_EfAj8y.d.mts} +2 -2
- package/dist/lib/PDSProvider.d.mts +3 -1
- package/dist/lib/PDSProvider.mjs +6 -2
- package/dist/lib/PDSProvider.mjs.map +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
- package/dist/lib/color.d.mts +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/fieldSchemaTypes.d.mts +1 -1
- package/dist/lib/jsonSchema.d.mts +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/router/adapters/reactRouter.d.mts +9 -0
- package/dist/lib/router/adapters/reactRouter.mjs +26 -0
- package/dist/lib/router/adapters/reactRouter.mjs.map +1 -0
- package/dist/lib/router/adapters/tanstack.d.mts +9 -0
- package/dist/lib/router/adapters/tanstack.mjs +65 -0
- package/dist/lib/router/adapters/tanstack.mjs.map +1 -0
- package/dist/lib/router/index.d.mts +6 -0
- package/dist/lib/router/index.mjs +3 -0
- package/dist/lib/semanticColor.d.mts +1 -1
- package/dist/lib/useModalInsetRight.mjs +69 -0
- package/dist/lib/useModalInsetRight.mjs.map +1 -0
- package/dist/{message-DfEpU8lV.d.mts → message-CjIHdhX1.d.mts} +1 -1
- package/dist/mixins/focus.d.mts +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/text.d.mts +1 -1
- package/dist/navigationEvents.d.mts +6 -0
- package/dist/{operators-F8X0hyQB.d.mts → operators-C4yL6qbl.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-BANY1Xfs.d.mts → palette-qgPRWgUN.d.mts} +3 -3
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +5 -5
- package/dist/reactRouterFallback.d.mts +11 -0
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/router-7FYDW80v.mjs +112 -0
- package/dist/router-7FYDW80v.mjs.map +1 -0
- package/dist/{semantic-Dy7mTyBP.d.mts → semantic-DUctmpu_.d.mts} +1 -1
- package/dist/{semanticColor-DkVQjcbc.d.mts → semanticColor-IAhXS17y.d.mts} +3 -3
- package/dist/{text-BaQdW8qa.d.mts → text-DjTGRUM1.d.mts} +1 -1
- package/dist/{theme-D02MOaH6.d.mts → theme-DKiszVRN.d.mts} +3 -3
- package/dist/theme.d.mts +1 -1
- package/dist/tone.d.mts +3 -3
- package/dist/{types-C2s9yhgO.d.mts → types-B8aAvU2a2.d.mts} +2 -2
- package/dist/{types-Ok2lRZeu.d.mts → types-CcZbBH0e.d.mts} +1 -1
- package/dist/types-CuQSgl1F.d.mts +36 -0
- package/dist/{types-COeginAF.d.mts → types-D8rWSj3z.d.mts} +1 -1
- package/dist/{types-1_JSe9Wr.d.mts → types-I9z-0m7q.d.mts} +2 -2
- package/dist/{types-CtLY82w5.d.mts → types-RWjW1d9I.d.mts} +1 -1
- package/dist/types.d.mts +2 -2
- package/dist/types2.d.mts +2 -2
- package/dist/types3.d.mts +2 -2
- package/dist/types4.d.mts +2 -2
- package/dist/types5.d.mts +2 -2
- package/dist/types6.d.mts +2 -0
- package/dist/{url-state-DP78aDol.d.mts → url-state-BOkOTKNZ.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-DC2rGXHK.d.mts → useFilterStateV2-CjXG2vjy.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-C-K1lgmv.mjs → useFormField-C61u9KvG.mjs} +2 -2
- package/dist/{useFormField-C-K1lgmv.mjs.map → useFormField-C61u9KvG.mjs.map} +1 -1
- package/dist/{useFormField--_14te0K.d.mts → useFormField-DDbo-ExT.d.mts} +2 -2
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs → useFormGroup-C89-oI4w.mjs} +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs.map → useFormGroup-C89-oI4w.mjs.map} +1 -1
- package/dist/useLocationPathname-K2N4fw8j.d.mts +5 -0
- package/dist/useLocationPathname.d.mts +2 -0
- package/dist/{useTableBoxDragAndDrop-DkCxC7Mi.d.mts → useTableBoxDragAndDrop-CbbH3pMK.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/{useToggle-0zLL1E7s.mjs → useToggle-DUHQjohK.mjs} +1 -1
- package/dist/{useToggle-0zLL1E7s.mjs.map → useToggle-DUHQjohK.mjs.map} +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-C1hOxjt_.d.mts → utilities-D0EhDri-.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/storybook.mjs +1 -1
- package/dist/utils/testing.d.mts +2 -0
- package/dist/utils/testing.mjs +10 -6
- package/dist/utils/testing.mjs.map +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-CpDsI-TM.d.mts → validation-C07D6XjI.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-DhaqxKmK.d.mts → value-control-resolver-zYNPNlRW.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/effect.d.mts +1 -1
- package/dist/variables/semantic.d.mts +1 -1
- package/llms.txt +2 -1
- package/package.json +16 -3
- package/skills/design-system-component-authoring/SKILL.md +79 -0
- package/skills/design-system-component-authoring/clarifying-scope.md +18 -0
- package/skills/design-system-component-authoring/component-conventions.md +70 -0
- package/skills/design-system-component-authoring/prop-interface-patterns.md +30 -0
- package/skills/ui-authoring/SKILL.md +28 -0
- package/dist/Breadcrumbs-ClKHNIr-.mjs.map +0 -1
- package/dist/IconButton-CnJNIJVQ.mjs.map +0 -1
- /package/dist/{index-1-AkepUA.d.mts → index-B33elXxm.d.mts} +0 -0
- /package/dist/{index-7rWKHdox.d.mts → index-BwAfCVZH2.d.mts} +0 -0
- /package/dist/{index-BFnNtGdX.d.mts → index-C6HcjJiY.d.mts} +0 -0
- /package/dist/{index-BPiqSRRl.d.mts → index-CRo77wc3.d.mts} +0 -0
- /package/dist/{index-BSVhZrWN.d.mts → index-CX869wwk.d.mts} +0 -0
- /package/dist/{index-BYd3Btr1.d.mts → index-CjDodOH2.d.mts} +0 -0
- /package/dist/{index-CMuRFTR3.d.mts → index-CoUVmp_Q.d.mts} +0 -0
- /package/dist/{index-Ci-uuV07.d.mts → index-CsuikFeJ.d.mts} +0 -0
- /package/dist/{index-CknANNvQ2.d.mts → index-CzItj62a.d.mts} +0 -0
- /package/dist/{index-CtJuGxUp.d.mts → index-D13oYj4_.d.mts} +0 -0
- /package/dist/{index-CuheJfs-.d.mts → index-D4DUvwPf.d.mts} +0 -0
- /package/dist/{index-DWfPppPU.d.mts → index-DMRtRo7y.d.mts} +0 -0
- /package/dist/{index-DYX_PQ7T2.d.mts → index-DXJd7-2Z.d.mts} +0 -0
- /package/dist/{index-De7MV8-j.d.mts → index-DeVKzGce.d.mts} +0 -0
- /package/dist/{index-N-OgGgfF.d.mts → index-Dflz2i1X.d.mts} +0 -0
- /package/dist/{index-VWno75SQ.d.mts → index-DkrC-i1D.d.mts} +0 -0
- /package/dist/{index-hcx6LMSC.d.mts → index-DztUdPP_.d.mts} +0 -0
- /package/dist/{index-uY8Qbwfx.d.mts → index-Rvd9MEUQ.d.mts} +0 -0
- /package/dist/{useModalInsetRight.d.mts → lib/useModalInsetRight.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as MenuItemProps } from "../../Menu-
|
|
2
|
-
import { o as StickerProps } from "../../Sticker-
|
|
1
|
+
import { l as MenuItemProps } from "../../Menu-C8RxFGOG.mjs";
|
|
2
|
+
import { o as StickerProps } from "../../Sticker-Bf9rhSkv.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,6 @@
|
|
|
1
|
-
import { n as DatePickerProps, t as DatePicker } from "../../DatePicker-
|
|
2
|
-
import { i as DateRangePickerProps, n as DateRange, r as DateRangePicker, t as DateFilterChange } from "../../DateRangePicker-
|
|
3
|
-
import { t as DateField } from "../../DateField-
|
|
4
|
-
import { t as Calendar } from "../../Calendar-
|
|
5
|
-
|
|
1
|
+
import { n as DatePickerProps, t as DatePicker } from "../../DatePicker-DC_RKjdM.mjs";
|
|
2
|
+
import { i as DateRangePickerProps, n as DateRange, r as DateRangePicker, t as DateFilterChange } from "../../DateRangePicker-ByD6IsLB.mjs";
|
|
3
|
+
import { t as DateField } from "../../DateField-2aigfD4u.mjs";
|
|
4
|
+
import { t as Calendar } from "../../Calendar-DrdTvzAa.mjs";
|
|
5
|
+
import { n as RangeCalendarProps, t as RangeCalendar } from "../../RangeCalendar-B7TwRJbg.mjs";
|
|
6
|
+
export { Calendar, DateField, DateFilterChange, DatePicker, DatePicker as default, DatePickerProps, DateRange, DateRangePicker, DateRangePickerProps, RangeCalendar, RangeCalendarProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { Calendar, DateField, DatePicker, DatePicker as default, DateRangePicker };
|
|
1
|
+
import { a as Calendar, i as DateField, n as RangeCalendar, r as DatePicker, t as DateRangePicker } from "../../DatePicker-CSd20-CW.mjs";
|
|
2
|
+
export { Calendar, DateField, DatePicker, DatePicker as default, DateRangePicker, RangeCalendar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DropdownButton } from "../../DropdownButton-
|
|
1
|
+
import { t as DropdownButton } from "../../DropdownButton-gmGRrD1z.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-
|
|
1
|
+
import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "../../DropdownMenu-eP6v6XE4.mjs";
|
|
2
2
|
export { DropdownMenu, DropdownMenuProps, _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-
|
|
1
|
+
import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-I5WDO-q5.mjs";
|
|
2
2
|
export { DropdownMenu, DropdownMenu_default as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import ConfigContext from "../../lib/ConfigContext.mjs";
|
|
2
2
|
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
3
|
+
import { t as usePathname } from "../../router-7FYDW80v.mjs";
|
|
3
4
|
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
4
5
|
import { Z_INDICES } from "../../lib/zindex.mjs";
|
|
5
6
|
import "../../variables/effect.mjs";
|
|
6
|
-
import { n as Stack } from "../../Stack-
|
|
7
|
-
import { t as IconButton } from "../../IconButton-
|
|
7
|
+
import { n as Stack } from "../../Stack-ChsImaEY.mjs";
|
|
8
|
+
import { t as IconButton } from "../../IconButton-CqTPMhjV.mjs";
|
|
8
9
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
9
10
|
import { cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
10
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
import { ArrowCollapseIcon, ArrowExpandIcon, XIcon } from "@persona/icons";
|
|
12
|
-
import { useLocation } from "react-router-dom";
|
|
13
13
|
import { motion, useDragControls, useMotionValue, useReducedMotion } from "framer-motion";
|
|
14
14
|
import { createPortal, flushSync } from "react-dom";
|
|
15
15
|
import { v4 } from "uuid";
|
|
@@ -145,11 +145,11 @@ const StyledIconButton = styled(IconButton)`
|
|
|
145
145
|
border-radius: ${BorderRadius.Md};
|
|
146
146
|
`;
|
|
147
147
|
function DismissOnNavigate({ onClose }) {
|
|
148
|
-
const
|
|
149
|
-
const initialPathname = useRef(
|
|
148
|
+
const pathname = usePathname();
|
|
149
|
+
const initialPathname = useRef(pathname);
|
|
150
150
|
useEffect(() => {
|
|
151
|
-
if (
|
|
152
|
-
}, [
|
|
151
|
+
if (pathname !== initialPathname.current) onClose();
|
|
152
|
+
}, [pathname, onClose]);
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
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 }) {
|
|
@@ -546,20 +546,20 @@ function FloatingPanel({ title = "Panel title", children, portal = true, trigger
|
|
|
546
546
|
const PanelContext = createContext(null);
|
|
547
547
|
const PanelProvider = ({ children }) => {
|
|
548
548
|
const [panels, setPanels] = useState([]);
|
|
549
|
-
const
|
|
549
|
+
const pathname = usePathname();
|
|
550
550
|
function shouldPanelPersist(currentUrl, persistUntilPathRoot) {
|
|
551
551
|
if (!persistUntilPathRoot) return false;
|
|
552
552
|
return currentUrl.includes(persistUntilPathRoot);
|
|
553
553
|
}
|
|
554
554
|
const openPanel = useCallback((panel) => {
|
|
555
555
|
const { key, panelElement, persistUntilPathRoot } = panel;
|
|
556
|
-
const pathRoot = persistUntilPathRoot ||
|
|
556
|
+
const pathRoot = persistUntilPathRoot || pathname;
|
|
557
557
|
setPanels((prev) => [...prev.filter((p) => p.key !== key), {
|
|
558
558
|
key,
|
|
559
559
|
panelElement,
|
|
560
560
|
persistUntilPathRoot: pathRoot
|
|
561
561
|
}]);
|
|
562
|
-
}, [
|
|
562
|
+
}, [pathname]);
|
|
563
563
|
const closePanel = useCallback((key) => {
|
|
564
564
|
setPanels((prev) => prev.filter((panel) => panel.key !== key));
|
|
565
565
|
}, []);
|
|
@@ -579,9 +579,9 @@ const PanelProvider = ({ children }) => {
|
|
|
579
579
|
setPanels([]);
|
|
580
580
|
}, []);
|
|
581
581
|
useEffect(() => {
|
|
582
|
-
const nextLocation =
|
|
582
|
+
const nextLocation = pathname;
|
|
583
583
|
setPanels((prevPanels) => prevPanels.filter((panel) => shouldPanelPersist(nextLocation, panel.persistUntilPathRoot)));
|
|
584
|
-
}, [
|
|
584
|
+
}, [pathname]);
|
|
585
585
|
return /* @__PURE__ */ jsx(PanelContext.Provider, {
|
|
586
586
|
value: {
|
|
587
587
|
openPanel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["uuid"],"sources":["../../../components/FloatingPanel/utils.ts","../../../components/FloatingPanel/FloatingPanel.tsx","../../../components/FloatingPanel/FloatingPanelContext.tsx","../../../components/FloatingPanel/FloatingPanelRenderer.tsx"],"sourcesContent":["export const PADDING = 8;\nexport const EDGE_PADDING = PADDING * 6;\n\n// Cap a content-fitting panel's height to the room below its top edge so it\n// can't overflow the viewport bottom when anchored partway down the screen.\nexport function autoFitMaxHeight(viewportHeight: number, topOffset: number, minHeight: number) {\n return Math.max(minHeight, viewportHeight - Math.max(EDGE_PADDING, topOffset) - EDGE_PADDING);\n}\n","import { flip, offset, type Placement, shift, useFloating } from '@floating-ui/react';\nimport { motion, useDragControls, useMotionValue, useReducedMotion } from 'framer-motion';\nimport {\n isValidElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal, flushSync } from 'react-dom';\nimport { useLocation } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport Stack from '@persona/design-system/components/Stack';\nimport { Z_INDICES } from '@persona/design-system/lib/zindex';\nimport { paragraphMixins } from '@persona/design-system/mixins/text';\nimport { Elevation } from '@persona/design-system/variables/effect';\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowCollapseIcon, ArrowExpandIcon, XIcon } from '@persona/icons';\nimport ConfigContext from 'design-system/lib/ConfigContext';\n\nimport { autoFitMaxHeight, PADDING } from './utils';\n\nexport const FLOATING_PANEL_ID_PREFIX = 'floating-panel__' as const;\n\nenum ResizeDirection {\n North = 'n',\n South = 's',\n East = 'e',\n West = 'w',\n NorthEast = 'ne',\n NorthWest = 'nw',\n SouthEast = 'se',\n SouthWest = 'sw',\n}\n\nexport interface FloatingPanelProps {\n /** The title text displayed in the panel header */\n title: ReactNode;\n /** Callback function called when the close button is clicked */\n onClose?: () => void;\n /** Content to render inside the main panel area */\n children?: ReactNode;\n /** Optional React component rendered to the left of the expand button in the header */\n headerActions?: ReactNode;\n\n /** Whether the panel displays the fullsize button */\n canFullsize?: boolean;\n\n /** When true, the panel opens already in full-size (maximized) mode. */\n defaultFullSize?: boolean;\n\n /** Initial width of the panel in pixels */\n initialWidth?: number;\n /** Initial height of the panel in pixels */\n initialHeight?: number;\n /** Minimum width the panel can be resized to in pixels */\n minWidth?: number;\n /** Minimum height the panel can be resized to in pixels */\n minHeight?: number;\n\n footerButtons?: ReactNode;\n\n footerAdditionalAction?: ReactNode;\n\n portal?: boolean;\n\n /** Reference to the element that triggered this panel, used for automatic positioning */\n triggerRef?: RefObject<HTMLElement>;\n\n /** Which placement of the trigger element to position the panel on */\n placement?: Placement;\n\n /** Additional main axis offset in pixels from the calculated position. Main axis is defined as the axis in position to where its being defined\n * i.e. right, top, left ,bottom */\n mainAxisOffset?: number;\n\n /** Additional cross offset in pixels from the calculated position. Cross is defined as the axis that runs along the alignment\n * of the floating element. */\n crossAxisOffset?: number;\n\n /** remove padding from the panel content */\n noPadding?: boolean;\n\n /** When true, automatically calls `onClose` if the route changes after the\n * panel mounts. Mirrors the auto-dismiss-on-navigation behavior provided by\n * `PanelProvider` / `usePersistentFloatingPanel` for panels that don't opt\n * into the persistent panel context. Defaults to `false` so existing\n * consumers (e.g. dirty-check confirmation flows) are not broken. */\n dismissOnNavigate?: boolean;\n\n /** When true, the panel's height auto-fits its content via CSS (`max-content`)\n * up to the viewport, instead of using `initialHeight`. Once the user manually\n * resizes, the panel switches to pixel mode and stays there. `initialHeight`\n * is ignored while auto-fitting. */\n fitContent?: boolean;\n}\n\nconst FloatingPanelContainer = styled(motion.div)<{\n $fitHeight?: boolean;\n $maxHeight?: number;\n $minHeight?: number;\n}>`\n position: absolute;\n z-index: ${Z_INDICES.modal};\n background: ${({ theme }) => theme.color.background.primary};\n border: 1px solid ${Color.BorderDivider};\n border-radius: ${BorderRadius.Lg};\n box-shadow: ${Elevation.Low};\n display: flex;\n flex-direction: column;\n cursor: auto;\n ${({ $fitHeight, $maxHeight, $minHeight }) =>\n $fitHeight &&\n css`\n height: auto;\n max-height: ${$maxHeight ?? 0}px;\n min-height: ${$minHeight ?? 0}px;\n `}\n`;\n\nconst DragHandle = styled(motion.div)<{ isFullSize: boolean }>`\n cursor: ${({ isFullSize }) => (isFullSize ? 'default' : 'grab')};\n user-select: none;\n\n &:active {\n cursor: ${({ isFullSize }) => (isFullSize ? 'default' : 'grabbing')};\n }\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 48px;\n height: 48px;\n overflow: hidden;\n padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};\n border-bottom: 1px solid ${Color.BorderDivider};\n`;\n\nconst Footer = styled.div`\n padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};\n border-top: 1px solid ${Color.BorderDivider};\n overflow-x: hidden;\n background-color: ${({ theme }) => theme.color.background.primary};\n width: 100%;\n border-radius: 0 0 ${BorderRadius.Lg} ${BorderRadius.Lg};\n`;\n\nconst ResizeHandleBase = styled.div`\n position: absolute;\n user-select: none;\n`;\n\n// Sets the width and height for base corner to 20px\nconst ResizeHandleBaseCorner = styled(ResizeHandleBase)`\n width: 1.25rem;\n height: 1.25rem;\n`;\n\nconst ResizeHandleBottomRight = styled(ResizeHandleBaseCorner)`\n bottom: -0.75rem;\n right: -0.75rem;\n cursor: nwse-resize;\n`;\n\nconst ResizeHandleBottomLeft = styled(ResizeHandleBaseCorner)`\n bottom: -0.75rem;\n left: -0.75rem;\n cursor: nesw-resize;\n`;\n\nconst ResizeHandleTopLeft = styled(ResizeHandleBaseCorner)`\n top: -0.75rem;\n left: -0.75rem;\n cursor: nwse-resize;\n`;\n\nconst ResizeHandleTopRight = styled(ResizeHandleBaseCorner)`\n top: -0.75rem;\n right: -0.75rem;\n cursor: nesw-resize;\n`;\n\n// These are all the Resize handles for the four cardinal direction,\n// To calculate the width, we subtract by the padding of 1rem on both sides\n// which are corners of the panel\nconst ResizeHandleBottom = styled(ResizeHandleBase)`\n bottom: -0.75rem;\n left: 0.5rem;\n width: calc(100% - 1rem);\n height: 1rem;\n cursor: ns-resize;\n user-select: none;\n`;\n\nconst ResizeHandleTop = styled(ResizeHandleBase)`\n top: -0.75rem;\n left: 0.5rem;\n width: calc(100% - 1rem);\n height: 1rem;\n cursor: ns-resize;\n`;\n\nconst ResizeHandleRight = styled(ResizeHandleBase)`\n right: -0.75rem;\n top: 0.5rem;\n width: 1rem;\n height: calc(100% - 1rem);\n cursor: ew-resize;\n`;\n\nconst ResizeHandleLeft = styled(ResizeHandleBase)`\n left: -0.75rem;\n top: 0.5rem;\n width: 1rem;\n height: calc(100% - 1rem);\n cursor: ew-resize;\n`;\n\nconst PanelContent = styled.div<{ $noPadding?: boolean; $fitHeight?: boolean }>`\n overflow-y: auto;\n overscroll-behavior: contain;\n min-height: 0;\n /* While the panel height is derived from its content, the content must size\n itself (a percentage flex-basis against an indefinite height collapses in\n WebKit); it still shrinks when the panel hits its max-height. */\n flex: ${({ $fitHeight }) => ($fitHeight ? '0 1 auto' : '1 1 0%')};\n padding: ${({ $noPadding }) => ($noPadding ? 0 : Spacing[3])};\n`;\n\n// Sets a min width so that the text will display, but overflows if needed\nconst PanelText = styled.p`\n ${paragraphMixins.sm}\n white-space: nowrap;\n min-width: 3rem;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n font-weight: 500;\n`;\n\nconst StyledIconButton = styled(IconButton)`\n width: 1.5rem;\n height: 1.5rem;\n border-radius: ${BorderRadius.Md};\n`;\n\n// Only rendered when dismissOnNavigate is true, keeping useLocation() out of the\n// main component body so FloatingPanel works without a Router when not needed.\nfunction DismissOnNavigate({ onClose }: { onClose: () => void }) {\n const location = useLocation();\n const initialPathname = useRef(location.pathname);\n useEffect(() => {\n if (location.pathname !== initialPathname.current) {\n onClose();\n }\n }, [location.pathname, onClose]);\n return null;\n}\n\nexport default function FloatingPanel({\n title = 'Panel title',\n children,\n portal = true,\n triggerRef,\n initialWidth = 400,\n initialHeight = 600,\n minWidth = 100,\n minHeight = 150,\n mainAxisOffset = 0,\n crossAxisOffset = 0,\n footerButtons,\n footerAdditionalAction,\n placement = 'right',\n canFullsize = true,\n defaultFullSize = false,\n noPadding,\n headerActions,\n dismissOnNavigate = false,\n fitContent = false,\n onClose = () => {},\n ...restProps\n}: FloatingPanelProps) {\n const { floatingPanel } = useContext(ConfigContext);\n const fullscreenRightInset = floatingPanel?.fullscreenRightInset ?? PADDING;\n const hasFooter = footerButtons || footerAdditionalAction;\n const isAdditionalActionButton =\n isValidElement(footerAdditionalAction) && footerAdditionalAction.type === 'button';\n\n const [panelSize, setPanelSize] = useState({ width: initialWidth, height: initialHeight });\n const panelSizeRef = useRef({ width: initialWidth, height: initialHeight });\n const [panelPosition, setPanelPosition] = useState({ x: 0, y: 0 });\n const [isPositionReady, setIsPositionReady] = useState(!triggerRef); // Ready immediately if no triggerRef\n\n const [fullSize, setFullSize] = useState(defaultFullSize);\n const resizeBottomRef = useRef<number | null>(null);\n const resizeRightRef = useRef<number | null>(null);\n\n const [wasFullSizeToggled, setWasFullSizeToggled] = useState(false);\n const resizeOffsetRef = useRef({ x: 0, y: 0 });\n\n const resizeDirectionRef = useRef<ResizeDirection | null>(null);\n const resizeStartDimensionsRef = useRef({\n width: initialWidth,\n height: initialHeight,\n x: 0,\n y: 0,\n });\n\n // Track if the user has manually resized the panel\n const [hasManuallyResized, setHasManuallyResized] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n\n // Track reduced motion preference\n const prefersReducedMotion = useReducedMotion();\n\n const dragControls = useDragControls();\n\n const x = useMotionValue(0);\n const y = useMotionValue(0);\n\n const {\n x: floatingX,\n y: floatingY,\n refs,\n } = useFloating({\n placement: placement,\n elements: {\n reference: triggerRef?.current || undefined,\n },\n middleware: [\n offset({\n mainAxis: mainAxisOffset,\n crossAxis: crossAxisOffset,\n }),\n flip(),\n // flip() only swaps sides, so a large panel can still open clipped off an\n // edge. shift() slides it back into view on both axes (crossAxis covers the\n // side axis flip leaves unhandled).\n shift({ crossAxis: true, padding: PADDING }),\n ],\n });\n\n useEffect(() => {\n // Only update position when floating values are not at the default 0,0\n // or when we don't have a triggerRef (meaning we should use initial position)\n if (!triggerRef || floatingX !== 0 || floatingY !== 0) {\n setPanelPosition({\n x: floatingX,\n y: floatingY,\n });\n setIsPositionReady(true);\n }\n }, [floatingX, floatingY, triggerRef]);\n\n // Window dimensions and drag constraints\n const [windowDimensions, setWindowDimensions] = useState({\n width: typeof window !== 'undefined' ? window.innerWidth : 1200,\n height: typeof window !== 'undefined' ? window.innerHeight : 800,\n });\n\n // Update window dimensions on resize\n useEffect(() => {\n const handleResize = () => {\n setWindowDimensions({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n const dragConstraints = fullSize\n ? undefined\n : {\n left: PADDING,\n right: Math.max(PADDING, windowDimensions.width - panelSize.width - PADDING),\n top: PADDING,\n bottom: Math.max(PADDING, windowDimensions.height - panelSize.height - PADDING),\n };\n\n // Clamp initial position and any position updates to be within bounds\n const clampPositionToBounds = useCallback(\n (position: { x: number; y: number }) => {\n if (fullSize) {\n return position;\n }\n\n return {\n x: Math.max(\n PADDING,\n Math.min(\n position.x,\n Math.max(PADDING, windowDimensions.width - panelSize.width - PADDING),\n ),\n ),\n y: Math.max(\n PADDING,\n Math.min(\n position.y,\n Math.max(PADDING, windowDimensions.height - panelSize.height - PADDING),\n ),\n ),\n };\n },\n [windowDimensions, panelSize, fullSize],\n );\n\n // Clamp position on window resize\n useEffect(() => {\n if (!fullSize) {\n const clampedPosition = clampPositionToBounds(panelPosition);\n if (clampedPosition.x !== panelPosition.x || clampedPosition.y !== panelPosition.y) {\n setPanelPosition(clampedPosition);\n }\n }\n }, [windowDimensions, panelPosition, clampPositionToBounds, fullSize]);\n\n useEffect(() => {\n if (wasFullSizeToggled) {\n const timer = setTimeout(() => setWasFullSizeToggled(false), 400); // match duration\n return () => clearTimeout(timer);\n }\n }, [wasFullSizeToggled]);\n\n // We need this useEffect here to sync a ref to the panel size, which is needed for resizing\n useEffect(() => {\n panelSizeRef.current = panelSize;\n }, [panelSize]);\n\n // True while the panel is letting CSS auto-fit its height to content\n // (`fitContent` opt-in, no manual resize yet, not in fullsize). In this mode\n // we omit `height` from the framer-motion animate prop so the styled\n // container's `height: max-content` is in effect.\n const isAutoHeight = fitContent && !hasManuallyResized && !fullSize;\n\n // Unified resize handler for all directions\n function handleResizeMouseDown(\n event: React.MouseEvent<HTMLDivElement>,\n direction: ResizeDirection,\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n let currentWidth: number;\n let currentHeight: number;\n let currentX: number;\n let currentY: number;\n\n if (fullSize) {\n // Exit fullscreen but preserve the current rendered dimensions so the panel\n // appears to stay in place while the user resizes from the edges.\n // Measure from the DOM so we get the real pixel width/height regardless of\n // what `calc(100% - 16px)` resolves to (differs for portaled vs. in-place\n // panels because `100%` is relative to the containing block, not the viewport).\n const container = contentRef.current?.parentElement;\n currentWidth = container?.offsetWidth ?? windowDimensions.width - 16;\n currentHeight = container?.offsetHeight ?? windowDimensions.height - 16;\n currentX = 8;\n currentY = 8;\n // Sync motion values now so x.get()/y.get() return the correct position for\n // computing fixed-edge anchors below.\n x.set(8);\n y.set(8);\n setFullSize(false);\n setPanelSize({ width: currentWidth, height: currentHeight });\n setPanelPosition({ x: currentX, y: currentY });\n } else if (isAutoHeight) {\n // If we're leaving CSS auto-fit, capture the current rendered height so the\n // panel doesn't jump from its content-fit size back to `initialHeight` when\n // pixel mode takes over.\n const container = contentRef.current?.parentElement;\n currentHeight = container?.offsetHeight ?? panelSize.height;\n currentWidth = panelSize.width;\n currentX = panelPosition.x;\n currentY = panelPosition.y;\n setPanelSize({ width: currentWidth, height: currentHeight });\n } else {\n currentWidth = panelSize.width;\n currentHeight = panelSize.height;\n currentX = panelPosition.x;\n currentY = panelPosition.y;\n }\n\n panelSizeRef.current = { width: currentWidth, height: currentHeight };\n // Capture start dimensions in a ref so handleResizeMouseMove (stale closure)\n // can read the correct initial values for unchanged axes without depending on\n // panelSize/panelPosition state captured at listener-registration time.\n resizeStartDimensionsRef.current = {\n width: currentWidth,\n height: currentHeight,\n x: currentX,\n y: currentY,\n };\n\n // Mark that user has manually resized - disable auto-resize from now on\n setHasManuallyResized(true);\n\n resizeDirectionRef.current = direction;\n\n // Calculate initial offsets and fixed points based on direction\n if (direction === ResizeDirection.SouthEast) {\n // Bottom-right: resize from bottom-right corner\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: event.clientY - currentHeight,\n };\n } else if (direction === ResizeDirection.SouthWest) {\n // Bottom-left: resize from bottom-left corner\n resizeRightRef.current = x.get() + currentWidth;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: event.clientY - currentHeight,\n };\n } else if (direction === ResizeDirection.NorthWest) {\n // Top-left: resize from top-left corner\n resizeRightRef.current = x.get() + currentWidth;\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.NorthEast) {\n // Top-right: resize from top-right corner\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.West) {\n // Left edge\n resizeRightRef.current = x.get() + currentWidth;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: 0,\n };\n } else if (direction === ResizeDirection.East) {\n // Right edge\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: 0,\n };\n } else if (direction === ResizeDirection.North) {\n // Top edge\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: 0,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.South) {\n // Bottom edge\n resizeOffsetRef.current = {\n x: 0,\n y: event.clientY - currentHeight,\n };\n }\n\n document.addEventListener('mousemove', handleResizeMouseMove);\n document.addEventListener('mouseup', handleResizeMouseUp);\n }\n\n // ResizeMouseMove to calculate the new size and position of the panel\n function handleResizeMouseMove(event: MouseEvent) {\n const direction = resizeDirectionRef.current;\n // Use resizeStartDimensionsRef (a ref, always current) rather than panelSize/panelPosition\n // (stale closure values). For unchanged axes, these provide the correct starting dimensions\n // set at drag start — including the case where the drag began in fullscreen mode.\n let newWidth = resizeStartDimensionsRef.current.width;\n let newHeight = resizeStartDimensionsRef.current.height;\n let clampedX = resizeStartDimensionsRef.current.x;\n let clampedY = resizeStartDimensionsRef.current.y;\n\n if (direction === ResizeDirection.SouthEast) {\n // Bottom-right corner\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n } else if (direction === ResizeDirection.SouthWest) {\n // Bottom-left corner\n const right = resizeRightRef.current!;\n const proposedX = event.clientX;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n clampedX = Math.round(right - newWidth);\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n } else if (direction === ResizeDirection.NorthWest) {\n // Top-left corner\n const right = resizeRightRef.current!;\n const bottom = resizeBottomRef.current!;\n const proposedX = event.clientX;\n const proposedY = event.clientY;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedX = Math.round(right - newWidth);\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.NorthEast) {\n // Top-right corner\n const bottom = resizeBottomRef.current!;\n const proposedY = event.clientY;\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.West) {\n // Left edge\n const right = resizeRightRef.current!;\n const proposedX = event.clientX;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n clampedX = Math.round(right - newWidth);\n } else if (direction === ResizeDirection.East) {\n // Right edge\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n } else if (direction === ResizeDirection.North) {\n // Top edge\n const bottom = resizeBottomRef.current!;\n const proposedY = event.clientY;\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.South) {\n // Bottom edge\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n }\n\n // We need to flush sync here because it would create jitter while the panel resizes from other directions\n // this is because the browser will animate serially, but we want to update the position and size together\n // so that the panel doesn't jump around\n flushSync(() => {\n setPanelPosition({ x: clampedX, y: clampedY });\n setPanelSize({ width: newWidth, height: newHeight });\n });\n }\n\n function handleResizeMouseUp() {\n document.removeEventListener('mousemove', handleResizeMouseMove);\n document.removeEventListener('mouseup', handleResizeMouseUp);\n }\n\n const panelContent = (\n <FloatingPanelContainer\n // Need to keep the values of x and y for positioning\n ref={refs.setFloating}\n $fitHeight={isAutoHeight}\n $maxHeight={autoFitMaxHeight(windowDimensions.height, panelPosition.y, minHeight)}\n $minHeight={minHeight}\n style={{\n x,\n y,\n }}\n initial={{\n top: 0,\n left: 0,\n opacity: 0,\n }}\n animate={{\n x: fullSize ? PADDING : panelPosition.x,\n y: fullSize ? PADDING : panelPosition.y,\n\n // When fullscreen, leave space for any reserved right-side content.\n width: fullSize ? `calc(100% - ${PADDING + fullscreenRightInset}px)` : panelSize.width,\n // Omit height when CSS auto-fit is active so `height: max-content`\n // on the styled container takes effect.\n ...(isAutoHeight ? {} : { height: fullSize ? 'calc(100% - 16px)' : panelSize.height }),\n opacity: isPositionReady ? 1 : 0,\n }}\n transition={\n wasFullSizeToggled\n ? {\n type: 'tween',\n // Easing curve for a smooth transition\n ease: [0.83, 0.0, 0.17, 1.0],\n duration: prefersReducedMotion ? 1.2 : 0.4,\n }\n : { opacity: { duration: 0.15, ease: 'easeOut' }, duration: 0 }\n }\n onDragEnd={() => {\n if (!fullSize) {\n const newPosition = { x: x.get(), y: y.get() };\n const clampedPosition = clampPositionToBounds(newPosition);\n setPanelPosition(clampedPosition);\n }\n }}\n drag={!fullSize}\n dragControls={dragControls}\n dragListener={false}\n dragMomentum={false}\n dragConstraints={dragConstraints}\n // The frame portals to the body, so panels that dismiss on an outside click\n // need this id to recognize a click in here as one of their own overlays.\n id={`${FLOATING_PANEL_ID_PREFIX}container`}\n {...restProps}\n >\n <DragHandle isFullSize={fullSize} onPointerDown={(e) => dragControls.start(e)}>\n <Stack align='center' direction='horizontal' justify='space-between'>\n <PanelText>{title}</PanelText>\n <Stack direction='horizontal' align='center' spacing={Spacing[1]}>\n {headerActions}\n {canFullsize && (\n <StyledIconButton\n size='sm'\n aria-label={fullSize ? 'collapse' : 'expand'}\n id='floating-panel__toggle-fullsize'\n onClick={() => {\n setWasFullSizeToggled(true);\n setFullSize(!fullSize);\n }}\n >\n {fullSize ? <ArrowCollapseIcon /> : <ArrowExpandIcon />}\n </StyledIconButton>\n )}\n\n <StyledIconButton\n size='sm'\n id='floating-panel__close-panel'\n onClick={() => onClose?.()}\n aria-label='close'\n >\n <XIcon />\n </StyledIconButton>\n </Stack>\n </Stack>\n </DragHandle>\n <PanelContent ref={contentRef} $noPadding={noPadding} $fitHeight={isAutoHeight}>\n {children}\n </PanelContent>\n {hasFooter && (\n <Footer style={{ paddingLeft: isAdditionalActionButton ? Spacing[1] : Spacing[3] }}>\n <Stack\n align='center'\n direction='horizontal'\n justify={footerAdditionalAction ? 'space-between' : 'flex-end'}\n >\n {footerAdditionalAction &&\n (isAdditionalActionButton ? (\n footerAdditionalAction\n ) : (\n <PanelText>{footerAdditionalAction}</PanelText>\n ))}\n\n {footerButtons && <div>{footerButtons}</div>}\n </Stack>\n </Footer>\n )}\n <ResizeHandleBottomRight\n data-test='resize-handle-se'\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.SouthEast)}\n />\n <ResizeHandleBottom\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.South)}\n />\n <ResizeHandleBottomLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.SouthWest)}\n />\n <ResizeHandleLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.West)}\n />\n <ResizeHandleTopLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.NorthWest)}\n />\n <ResizeHandleTop\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.North)}\n />\n <ResizeHandleTopRight\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.NorthEast)}\n />\n <ResizeHandleRight\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.East)}\n />\n </FloatingPanelContainer>\n );\n\n const content = (\n <>\n {dismissOnNavigate && <DismissOnNavigate onClose={onClose} />}\n {panelContent}\n </>\n );\n\n return portal ? createPortal(content, document.body) : content;\n}\n","import {\n createContext,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { v4 as uuid } from 'uuid';\n\nexport type Panel = {\n key: string;\n panelElement: ReactElement;\n persistUntilPathRoot?: string;\n};\n\ninterface PanelContextType {\n openPanel: (panel: Panel) => void;\n closePanel: (key: string) => void;\n togglePanel: (panel: Panel) => void;\n closeAllPanels: () => void;\n isPanelOpen: (key: string) => boolean;\n panels: Panel[];\n}\n\nconst PanelContext = createContext<PanelContextType | null>(null);\n\nexport const PanelProvider = ({ children }: { children: ReactNode }) => {\n const [panels, setPanels] = useState<Panel[]>([]);\n const location = useLocation();\n\n function shouldPanelPersist(currentUrl: string, persistUntilPathRoot?: string): boolean {\n if (!persistUntilPathRoot) {\n return false;\n }\n return currentUrl.includes(persistUntilPathRoot);\n }\n\n const openPanel = useCallback(\n (panel: Panel) => {\n const { key, panelElement, persistUntilPathRoot } = panel;\n const pathRoot = persistUntilPathRoot || location.pathname;\n setPanels((prev) => [\n ...prev.filter((p) => p.key !== key), // Remove existing panel with same key\n { key, panelElement, persistUntilPathRoot: pathRoot },\n ]);\n },\n [location.pathname],\n );\n\n const closePanel = useCallback((key: string) => {\n setPanels((prev) => prev.filter((panel) => panel.key !== key));\n }, []);\n\n const isPanelOpen = useCallback(\n (key: string) => {\n return panels.some((panel) => panel.key === key);\n },\n [panels],\n );\n\n const togglePanel = useCallback(\n (panel: Panel) => {\n const { key } = panel;\n if (isPanelOpen(key)) {\n closePanel(key);\n } else {\n openPanel(panel);\n }\n },\n [isPanelOpen, closePanel, openPanel],\n );\n\n const closeAllPanels = useCallback(() => {\n setPanels([]);\n }, []);\n\n useEffect(() => {\n const nextLocation = location.pathname;\n\n setPanels((prevPanels) =>\n prevPanels.filter((panel) => shouldPanelPersist(nextLocation, panel.persistUntilPathRoot)),\n );\n }, [location.pathname]);\n\n return (\n <PanelContext.Provider\n value={{ openPanel, closePanel, togglePanel, closeAllPanels, panels, isPanelOpen }}\n >\n {children}\n </PanelContext.Provider>\n );\n};\n\nexport const usePersistentFloatingPanels = () => {\n const ctx = useContext(PanelContext);\n if (!ctx) {\n throw new Error('usePersistentFloatingPanels must be used within a PanelProvider');\n }\n return ctx;\n};\n\n// This hook is used to open a panel that persists across multiple pages\n// For single page panels, use the useToggle hook instead to manage individual panel state.\nexport const usePersistentFloatingPanel = (panelId?: string) => {\n const ctx = useContext(PanelContext);\n if (!ctx) {\n throw new Error('usePersistentFloatingPanels must be used within a PanelProvider');\n }\n\n // If the panel doesn't need to persist across multiple pages, we generate an id that can be passed back\n const currentPanelId = panelId || `panel-${uuid()}`;\n\n return {\n id: currentPanelId,\n openPanel: useCallback(\n (panel: Panel) => {\n ctx.openPanel(panel);\n },\n [ctx],\n ),\n closePanel: useCallback(() => {\n ctx.closePanel(currentPanelId);\n }, [currentPanelId, ctx]),\n togglePanel: useCallback(\n (panel: Panel) => {\n ctx.togglePanel(panel);\n },\n [ctx],\n ),\n isPanelOpen: ctx.isPanelOpen(currentPanelId),\n };\n};\n","import { cloneElement } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { usePersistentFloatingPanels } from './FloatingPanelContext';\n\nexport default function FloatingPanelRenderer() {\n const { panels, closePanel } = usePersistentFloatingPanels();\n\n if (panels.length === 0) {\n return null;\n }\n\n return createPortal(\n panels.map(({ key, panelElement: panel }) => {\n return cloneElement(panel, { onClose: () => closePanel(key), key: key });\n }),\n document.body,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,MAAa,UAAU;AAKvB,SAAgB,iBAAiB,gBAAwB,WAAmB,WAAmB;AAC7F,QAAO,KAAK,IAAI,WAAW,iBAAiB,KAAK,IAAA,IAAkB,UAAU,GAAA,GAAgB;;;;ACqB/F,MAAa,2BAA2B;AA2ExC,MAAM,yBAAyB,OAAO,OAAO,IAAI;;aAMpC,UAAU,MAAM;iBACZ,EAAE,YAAY,MAAM,MAAM,WAAW,QAAQ;sBACxC,MAAM,cAAc;mBACvB,aAAa,GAAG;kIACL;;;;KAIzB,EAAE,YAAY,YAAY,iBAC3B,cACA,GAAG;;oBAEa,cAAc,EAAE;oBAChB,cAAc,EAAE;MAC9B;;AAGN,MAAM,aAAa,OAAO,OAAO,IAAI;aACxB,EAAE,iBAAkB,aAAa,YAAY,OAAQ;;;;eAInD,EAAE,iBAAkB,aAAa,YAAY,WAAY;;;;;;;;aAQ3D,QAAQ,GAAG,GAAG,QAAQ,GAAG,GAAG,QAAQ,GAAG,GAAG,QAAQ,GAAG;6BACrC,MAAM,cAAc;;AAGjD,MAAM,SAAS,OAAO,GAAG;aACZ,QAAQ,GAAG,GAAG,QAAQ,GAAG,GAAG,QAAQ,GAAG,GAAG,QAAQ,GAAG;0BACxC,MAAM,cAAc;;uBAEvB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IACZ,EAAE,CAAC;AAEN,iBAAgB;EACd,MAAM,eAAe,SAAS;AAE9B,aAAW,eACT,WAAW,QAAQ,UAAU,mBAAmB,cAAc,MAAM,qBAAqB,CAAC,CAC3F;IACA,CAAC,SAAS,SAAS,CAAC;AAEvB,QACE,oBAAC,aAAa,UAAd;EACE,OAAO;GAAE;GAAW;GAAY;GAAa;GAAgB;GAAQ;GAAa;EAEjF;EACqB,CAAA;;AAI5B,MAAa,oCAAoC;CAC/C,MAAM,MAAM,WAAW,aAAa;AACpC,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,kEAAkE;AAEpF,QAAO;;AAKT,MAAa,8BAA8B,YAAqB;CAC9D,MAAM,MAAM,WAAW,aAAa;AACpC,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,kEAAkE;CAIpF,MAAM,iBAAiB,WAAW,SAASA,IAAM;AAEjD,QAAO;EACL,IAAI;EACJ,WAAW,aACR,UAAiB;AAChB,OAAI,UAAU,MAAM;KAEtB,CAAC,IAAI,CACN;EACD,YAAY,kBAAkB;AAC5B,OAAI,WAAW,eAAe;KAC7B,CAAC,gBAAgB,IAAI,CAAC;EACzB,aAAa,aACV,UAAiB;AAChB,OAAI,YAAY,MAAM;KAExB,CAAC,IAAI,CACN;EACD,aAAa,IAAI,YAAY,eAAe;EAC7C;;;;AChIH,SAAwB,wBAAwB;CAC9C,MAAM,EAAE,QAAQ,eAAe,6BAA6B;AAE5D,KAAI,OAAO,WAAW,EACpB,QAAO;AAGT,QAAO,aACL,OAAO,KAAK,EAAE,KAAK,cAAc,YAAY;AAC3C,SAAO,aAAa,OAAO;GAAE,eAAe,WAAW,IAAI;GAAO;GAAK,CAAC;GACxE,EACF,SAAS,KACV"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["uuid"],"sources":["../../../components/FloatingPanel/utils.ts","../../../components/FloatingPanel/FloatingPanel.tsx","../../../components/FloatingPanel/FloatingPanelContext.tsx","../../../components/FloatingPanel/FloatingPanelRenderer.tsx"],"sourcesContent":["export const PADDING = 8;\nexport const EDGE_PADDING = PADDING * 6;\n\n// Cap a content-fitting panel's height to the room below its top edge so it\n// can't overflow the viewport bottom when anchored partway down the screen.\nexport function autoFitMaxHeight(viewportHeight: number, topOffset: number, minHeight: number) {\n return Math.max(minHeight, viewportHeight - Math.max(EDGE_PADDING, topOffset) - EDGE_PADDING);\n}\n","import { flip, offset, type Placement, shift, useFloating } from '@floating-ui/react';\nimport { motion, useDragControls, useMotionValue, useReducedMotion } from 'framer-motion';\nimport {\n isValidElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { createPortal, flushSync } from 'react-dom';\nimport styled, { css } from 'styled-components';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport Stack from '@persona/design-system/components/Stack';\nimport { Z_INDICES } from '@persona/design-system/lib/zindex';\nimport { paragraphMixins } from '@persona/design-system/mixins/text';\nimport { Elevation } from '@persona/design-system/variables/effect';\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowCollapseIcon, ArrowExpandIcon, XIcon } from '@persona/icons';\nimport ConfigContext from 'design-system/lib/ConfigContext';\nimport { usePathname } from 'design-system/lib/router';\n\nimport { autoFitMaxHeight, PADDING } from './utils';\n\nexport const FLOATING_PANEL_ID_PREFIX = 'floating-panel__' as const;\n\nenum ResizeDirection {\n North = 'n',\n South = 's',\n East = 'e',\n West = 'w',\n NorthEast = 'ne',\n NorthWest = 'nw',\n SouthEast = 'se',\n SouthWest = 'sw',\n}\n\nexport interface FloatingPanelProps {\n /** The title text displayed in the panel header */\n title: ReactNode;\n /** Callback function called when the close button is clicked */\n onClose?: () => void;\n /** Content to render inside the main panel area */\n children?: ReactNode;\n /** Optional React component rendered to the left of the expand button in the header */\n headerActions?: ReactNode;\n\n /** Whether the panel displays the fullsize button */\n canFullsize?: boolean;\n\n /** When true, the panel opens already in full-size (maximized) mode. */\n defaultFullSize?: boolean;\n\n /** Initial width of the panel in pixels */\n initialWidth?: number;\n /** Initial height of the panel in pixels */\n initialHeight?: number;\n /** Minimum width the panel can be resized to in pixels */\n minWidth?: number;\n /** Minimum height the panel can be resized to in pixels */\n minHeight?: number;\n\n footerButtons?: ReactNode;\n\n footerAdditionalAction?: ReactNode;\n\n portal?: boolean;\n\n /** Reference to the element that triggered this panel, used for automatic positioning */\n triggerRef?: RefObject<HTMLElement>;\n\n /** Which placement of the trigger element to position the panel on */\n placement?: Placement;\n\n /** Additional main axis offset in pixels from the calculated position. Main axis is defined as the axis in position to where its being defined\n * i.e. right, top, left ,bottom */\n mainAxisOffset?: number;\n\n /** Additional cross offset in pixels from the calculated position. Cross is defined as the axis that runs along the alignment\n * of the floating element. */\n crossAxisOffset?: number;\n\n /** remove padding from the panel content */\n noPadding?: boolean;\n\n /** When true, automatically calls `onClose` if the route changes after the\n * panel mounts. Mirrors the auto-dismiss-on-navigation behavior provided by\n * `PanelProvider` / `usePersistentFloatingPanel` for panels that don't opt\n * into the persistent panel context. Defaults to `false` so existing\n * consumers (e.g. dirty-check confirmation flows) are not broken. */\n dismissOnNavigate?: boolean;\n\n /** When true, the panel's height auto-fits its content via CSS (`max-content`)\n * up to the viewport, instead of using `initialHeight`. Once the user manually\n * resizes, the panel switches to pixel mode and stays there. `initialHeight`\n * is ignored while auto-fitting. */\n fitContent?: boolean;\n}\n\nconst FloatingPanelContainer = styled(motion.div)<{\n $fitHeight?: boolean;\n $maxHeight?: number;\n $minHeight?: number;\n}>`\n position: absolute;\n z-index: ${Z_INDICES.modal};\n background: ${({ theme }) => theme.color.background.primary};\n border: 1px solid ${Color.BorderDivider};\n border-radius: ${BorderRadius.Lg};\n box-shadow: ${Elevation.Low};\n display: flex;\n flex-direction: column;\n cursor: auto;\n ${({ $fitHeight, $maxHeight, $minHeight }) =>\n $fitHeight &&\n css`\n height: auto;\n max-height: ${$maxHeight ?? 0}px;\n min-height: ${$minHeight ?? 0}px;\n `}\n`;\n\nconst DragHandle = styled(motion.div)<{ isFullSize: boolean }>`\n cursor: ${({ isFullSize }) => (isFullSize ? 'default' : 'grab')};\n user-select: none;\n\n &:active {\n cursor: ${({ isFullSize }) => (isFullSize ? 'default' : 'grabbing')};\n }\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 48px;\n height: 48px;\n overflow: hidden;\n padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};\n border-bottom: 1px solid ${Color.BorderDivider};\n`;\n\nconst Footer = styled.div`\n padding: ${Spacing[1]} ${Spacing[1]} ${Spacing[1]} ${Spacing[3]};\n border-top: 1px solid ${Color.BorderDivider};\n overflow-x: hidden;\n background-color: ${({ theme }) => theme.color.background.primary};\n width: 100%;\n border-radius: 0 0 ${BorderRadius.Lg} ${BorderRadius.Lg};\n`;\n\nconst ResizeHandleBase = styled.div`\n position: absolute;\n user-select: none;\n`;\n\n// Sets the width and height for base corner to 20px\nconst ResizeHandleBaseCorner = styled(ResizeHandleBase)`\n width: 1.25rem;\n height: 1.25rem;\n`;\n\nconst ResizeHandleBottomRight = styled(ResizeHandleBaseCorner)`\n bottom: -0.75rem;\n right: -0.75rem;\n cursor: nwse-resize;\n`;\n\nconst ResizeHandleBottomLeft = styled(ResizeHandleBaseCorner)`\n bottom: -0.75rem;\n left: -0.75rem;\n cursor: nesw-resize;\n`;\n\nconst ResizeHandleTopLeft = styled(ResizeHandleBaseCorner)`\n top: -0.75rem;\n left: -0.75rem;\n cursor: nwse-resize;\n`;\n\nconst ResizeHandleTopRight = styled(ResizeHandleBaseCorner)`\n top: -0.75rem;\n right: -0.75rem;\n cursor: nesw-resize;\n`;\n\n// These are all the Resize handles for the four cardinal direction,\n// To calculate the width, we subtract by the padding of 1rem on both sides\n// which are corners of the panel\nconst ResizeHandleBottom = styled(ResizeHandleBase)`\n bottom: -0.75rem;\n left: 0.5rem;\n width: calc(100% - 1rem);\n height: 1rem;\n cursor: ns-resize;\n user-select: none;\n`;\n\nconst ResizeHandleTop = styled(ResizeHandleBase)`\n top: -0.75rem;\n left: 0.5rem;\n width: calc(100% - 1rem);\n height: 1rem;\n cursor: ns-resize;\n`;\n\nconst ResizeHandleRight = styled(ResizeHandleBase)`\n right: -0.75rem;\n top: 0.5rem;\n width: 1rem;\n height: calc(100% - 1rem);\n cursor: ew-resize;\n`;\n\nconst ResizeHandleLeft = styled(ResizeHandleBase)`\n left: -0.75rem;\n top: 0.5rem;\n width: 1rem;\n height: calc(100% - 1rem);\n cursor: ew-resize;\n`;\n\nconst PanelContent = styled.div<{ $noPadding?: boolean; $fitHeight?: boolean }>`\n overflow-y: auto;\n overscroll-behavior: contain;\n min-height: 0;\n /* While the panel height is derived from its content, the content must size\n itself (a percentage flex-basis against an indefinite height collapses in\n WebKit); it still shrinks when the panel hits its max-height. */\n flex: ${({ $fitHeight }) => ($fitHeight ? '0 1 auto' : '1 1 0%')};\n padding: ${({ $noPadding }) => ($noPadding ? 0 : Spacing[3])};\n`;\n\n// Sets a min width so that the text will display, but overflows if needed\nconst PanelText = styled.p`\n ${paragraphMixins.sm}\n white-space: nowrap;\n min-width: 3rem;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n font-weight: 500;\n`;\n\nconst StyledIconButton = styled(IconButton)`\n width: 1.5rem;\n height: 1.5rem;\n border-radius: ${BorderRadius.Md};\n`;\n\n// Only rendered when dismissOnNavigate is true, keeping the router lookup out of the\n// main component body so FloatingPanel works without a Router when not needed.\nfunction DismissOnNavigate({ onClose }: { onClose: () => void }) {\n const pathname = usePathname();\n const initialPathname = useRef(pathname);\n useEffect(() => {\n if (pathname !== initialPathname.current) {\n onClose();\n }\n }, [pathname, onClose]);\n return null;\n}\n\nexport default function FloatingPanel({\n title = 'Panel title',\n children,\n portal = true,\n triggerRef,\n initialWidth = 400,\n initialHeight = 600,\n minWidth = 100,\n minHeight = 150,\n mainAxisOffset = 0,\n crossAxisOffset = 0,\n footerButtons,\n footerAdditionalAction,\n placement = 'right',\n canFullsize = true,\n defaultFullSize = false,\n noPadding,\n headerActions,\n dismissOnNavigate = false,\n fitContent = false,\n onClose = () => {},\n ...restProps\n}: FloatingPanelProps) {\n const { floatingPanel } = useContext(ConfigContext);\n const fullscreenRightInset = floatingPanel?.fullscreenRightInset ?? PADDING;\n const hasFooter = footerButtons || footerAdditionalAction;\n const isAdditionalActionButton =\n isValidElement(footerAdditionalAction) && footerAdditionalAction.type === 'button';\n\n const [panelSize, setPanelSize] = useState({ width: initialWidth, height: initialHeight });\n const panelSizeRef = useRef({ width: initialWidth, height: initialHeight });\n const [panelPosition, setPanelPosition] = useState({ x: 0, y: 0 });\n const [isPositionReady, setIsPositionReady] = useState(!triggerRef); // Ready immediately if no triggerRef\n\n const [fullSize, setFullSize] = useState(defaultFullSize);\n const resizeBottomRef = useRef<number | null>(null);\n const resizeRightRef = useRef<number | null>(null);\n\n const [wasFullSizeToggled, setWasFullSizeToggled] = useState(false);\n const resizeOffsetRef = useRef({ x: 0, y: 0 });\n\n const resizeDirectionRef = useRef<ResizeDirection | null>(null);\n const resizeStartDimensionsRef = useRef({\n width: initialWidth,\n height: initialHeight,\n x: 0,\n y: 0,\n });\n\n // Track if the user has manually resized the panel\n const [hasManuallyResized, setHasManuallyResized] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n\n // Track reduced motion preference\n const prefersReducedMotion = useReducedMotion();\n\n const dragControls = useDragControls();\n\n const x = useMotionValue(0);\n const y = useMotionValue(0);\n\n const {\n x: floatingX,\n y: floatingY,\n refs,\n } = useFloating({\n placement: placement,\n elements: {\n reference: triggerRef?.current || undefined,\n },\n middleware: [\n offset({\n mainAxis: mainAxisOffset,\n crossAxis: crossAxisOffset,\n }),\n flip(),\n // flip() only swaps sides, so a large panel can still open clipped off an\n // edge. shift() slides it back into view on both axes (crossAxis covers the\n // side axis flip leaves unhandled).\n shift({ crossAxis: true, padding: PADDING }),\n ],\n });\n\n useEffect(() => {\n // Only update position when floating values are not at the default 0,0\n // or when we don't have a triggerRef (meaning we should use initial position)\n if (!triggerRef || floatingX !== 0 || floatingY !== 0) {\n setPanelPosition({\n x: floatingX,\n y: floatingY,\n });\n setIsPositionReady(true);\n }\n }, [floatingX, floatingY, triggerRef]);\n\n // Window dimensions and drag constraints\n const [windowDimensions, setWindowDimensions] = useState({\n width: typeof window !== 'undefined' ? window.innerWidth : 1200,\n height: typeof window !== 'undefined' ? window.innerHeight : 800,\n });\n\n // Update window dimensions on resize\n useEffect(() => {\n const handleResize = () => {\n setWindowDimensions({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n const dragConstraints = fullSize\n ? undefined\n : {\n left: PADDING,\n right: Math.max(PADDING, windowDimensions.width - panelSize.width - PADDING),\n top: PADDING,\n bottom: Math.max(PADDING, windowDimensions.height - panelSize.height - PADDING),\n };\n\n // Clamp initial position and any position updates to be within bounds\n const clampPositionToBounds = useCallback(\n (position: { x: number; y: number }) => {\n if (fullSize) {\n return position;\n }\n\n return {\n x: Math.max(\n PADDING,\n Math.min(\n position.x,\n Math.max(PADDING, windowDimensions.width - panelSize.width - PADDING),\n ),\n ),\n y: Math.max(\n PADDING,\n Math.min(\n position.y,\n Math.max(PADDING, windowDimensions.height - panelSize.height - PADDING),\n ),\n ),\n };\n },\n [windowDimensions, panelSize, fullSize],\n );\n\n // Clamp position on window resize\n useEffect(() => {\n if (!fullSize) {\n const clampedPosition = clampPositionToBounds(panelPosition);\n if (clampedPosition.x !== panelPosition.x || clampedPosition.y !== panelPosition.y) {\n setPanelPosition(clampedPosition);\n }\n }\n }, [windowDimensions, panelPosition, clampPositionToBounds, fullSize]);\n\n useEffect(() => {\n if (wasFullSizeToggled) {\n const timer = setTimeout(() => setWasFullSizeToggled(false), 400); // match duration\n return () => clearTimeout(timer);\n }\n }, [wasFullSizeToggled]);\n\n // We need this useEffect here to sync a ref to the panel size, which is needed for resizing\n useEffect(() => {\n panelSizeRef.current = panelSize;\n }, [panelSize]);\n\n // True while the panel is letting CSS auto-fit its height to content\n // (`fitContent` opt-in, no manual resize yet, not in fullsize). In this mode\n // we omit `height` from the framer-motion animate prop so the styled\n // container's `height: max-content` is in effect.\n const isAutoHeight = fitContent && !hasManuallyResized && !fullSize;\n\n // Unified resize handler for all directions\n function handleResizeMouseDown(\n event: React.MouseEvent<HTMLDivElement>,\n direction: ResizeDirection,\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n let currentWidth: number;\n let currentHeight: number;\n let currentX: number;\n let currentY: number;\n\n if (fullSize) {\n // Exit fullscreen but preserve the current rendered dimensions so the panel\n // appears to stay in place while the user resizes from the edges.\n // Measure from the DOM so we get the real pixel width/height regardless of\n // what `calc(100% - 16px)` resolves to (differs for portaled vs. in-place\n // panels because `100%` is relative to the containing block, not the viewport).\n const container = contentRef.current?.parentElement;\n currentWidth = container?.offsetWidth ?? windowDimensions.width - 16;\n currentHeight = container?.offsetHeight ?? windowDimensions.height - 16;\n currentX = 8;\n currentY = 8;\n // Sync motion values now so x.get()/y.get() return the correct position for\n // computing fixed-edge anchors below.\n x.set(8);\n y.set(8);\n setFullSize(false);\n setPanelSize({ width: currentWidth, height: currentHeight });\n setPanelPosition({ x: currentX, y: currentY });\n } else if (isAutoHeight) {\n // If we're leaving CSS auto-fit, capture the current rendered height so the\n // panel doesn't jump from its content-fit size back to `initialHeight` when\n // pixel mode takes over.\n const container = contentRef.current?.parentElement;\n currentHeight = container?.offsetHeight ?? panelSize.height;\n currentWidth = panelSize.width;\n currentX = panelPosition.x;\n currentY = panelPosition.y;\n setPanelSize({ width: currentWidth, height: currentHeight });\n } else {\n currentWidth = panelSize.width;\n currentHeight = panelSize.height;\n currentX = panelPosition.x;\n currentY = panelPosition.y;\n }\n\n panelSizeRef.current = { width: currentWidth, height: currentHeight };\n // Capture start dimensions in a ref so handleResizeMouseMove (stale closure)\n // can read the correct initial values for unchanged axes without depending on\n // panelSize/panelPosition state captured at listener-registration time.\n resizeStartDimensionsRef.current = {\n width: currentWidth,\n height: currentHeight,\n x: currentX,\n y: currentY,\n };\n\n // Mark that user has manually resized - disable auto-resize from now on\n setHasManuallyResized(true);\n\n resizeDirectionRef.current = direction;\n\n // Calculate initial offsets and fixed points based on direction\n if (direction === ResizeDirection.SouthEast) {\n // Bottom-right: resize from bottom-right corner\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: event.clientY - currentHeight,\n };\n } else if (direction === ResizeDirection.SouthWest) {\n // Bottom-left: resize from bottom-left corner\n resizeRightRef.current = x.get() + currentWidth;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: event.clientY - currentHeight,\n };\n } else if (direction === ResizeDirection.NorthWest) {\n // Top-left: resize from top-left corner\n resizeRightRef.current = x.get() + currentWidth;\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.NorthEast) {\n // Top-right: resize from top-right corner\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.West) {\n // Left edge\n resizeRightRef.current = x.get() + currentWidth;\n resizeOffsetRef.current = {\n x: event.clientX,\n y: 0,\n };\n } else if (direction === ResizeDirection.East) {\n // Right edge\n resizeOffsetRef.current = {\n x: event.clientX - currentWidth,\n y: 0,\n };\n } else if (direction === ResizeDirection.North) {\n // Top edge\n resizeBottomRef.current = y.get() + currentHeight;\n resizeOffsetRef.current = {\n x: 0,\n y: event.clientY,\n };\n } else if (direction === ResizeDirection.South) {\n // Bottom edge\n resizeOffsetRef.current = {\n x: 0,\n y: event.clientY - currentHeight,\n };\n }\n\n document.addEventListener('mousemove', handleResizeMouseMove);\n document.addEventListener('mouseup', handleResizeMouseUp);\n }\n\n // ResizeMouseMove to calculate the new size and position of the panel\n function handleResizeMouseMove(event: MouseEvent) {\n const direction = resizeDirectionRef.current;\n // Use resizeStartDimensionsRef (a ref, always current) rather than panelSize/panelPosition\n // (stale closure values). For unchanged axes, these provide the correct starting dimensions\n // set at drag start — including the case where the drag began in fullscreen mode.\n let newWidth = resizeStartDimensionsRef.current.width;\n let newHeight = resizeStartDimensionsRef.current.height;\n let clampedX = resizeStartDimensionsRef.current.x;\n let clampedY = resizeStartDimensionsRef.current.y;\n\n if (direction === ResizeDirection.SouthEast) {\n // Bottom-right corner\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n } else if (direction === ResizeDirection.SouthWest) {\n // Bottom-left corner\n const right = resizeRightRef.current!;\n const proposedX = event.clientX;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n clampedX = Math.round(right - newWidth);\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n } else if (direction === ResizeDirection.NorthWest) {\n // Top-left corner\n const right = resizeRightRef.current!;\n const bottom = resizeBottomRef.current!;\n const proposedX = event.clientX;\n const proposedY = event.clientY;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedX = Math.round(right - newWidth);\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.NorthEast) {\n // Top-right corner\n const bottom = resizeBottomRef.current!;\n const proposedY = event.clientY;\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.West) {\n // Left edge\n const right = resizeRightRef.current!;\n const proposedX = event.clientX;\n newWidth = Math.round(Math.max(minWidth, right - proposedX));\n clampedX = Math.round(right - newWidth);\n } else if (direction === ResizeDirection.East) {\n // Right edge\n newWidth = Math.round(Math.max(minWidth, event.clientX - resizeOffsetRef.current.x));\n } else if (direction === ResizeDirection.North) {\n // Top edge\n const bottom = resizeBottomRef.current!;\n const proposedY = event.clientY;\n newHeight = Math.round(Math.max(minHeight, bottom - proposedY));\n clampedY = Math.round(bottom - newHeight);\n } else if (direction === ResizeDirection.South) {\n // Bottom edge\n newHeight = Math.round(Math.max(minHeight, event.clientY - resizeOffsetRef.current.y));\n }\n\n // We need to flush sync here because it would create jitter while the panel resizes from other directions\n // this is because the browser will animate serially, but we want to update the position and size together\n // so that the panel doesn't jump around\n flushSync(() => {\n setPanelPosition({ x: clampedX, y: clampedY });\n setPanelSize({ width: newWidth, height: newHeight });\n });\n }\n\n function handleResizeMouseUp() {\n document.removeEventListener('mousemove', handleResizeMouseMove);\n document.removeEventListener('mouseup', handleResizeMouseUp);\n }\n\n const panelContent = (\n <FloatingPanelContainer\n // Need to keep the values of x and y for positioning\n ref={refs.setFloating}\n $fitHeight={isAutoHeight}\n $maxHeight={autoFitMaxHeight(windowDimensions.height, panelPosition.y, minHeight)}\n $minHeight={minHeight}\n style={{\n x,\n y,\n }}\n initial={{\n top: 0,\n left: 0,\n opacity: 0,\n }}\n animate={{\n x: fullSize ? PADDING : panelPosition.x,\n y: fullSize ? PADDING : panelPosition.y,\n\n // When fullscreen, leave space for any reserved right-side content.\n width: fullSize ? `calc(100% - ${PADDING + fullscreenRightInset}px)` : panelSize.width,\n // Omit height when CSS auto-fit is active so `height: max-content`\n // on the styled container takes effect.\n ...(isAutoHeight ? {} : { height: fullSize ? 'calc(100% - 16px)' : panelSize.height }),\n opacity: isPositionReady ? 1 : 0,\n }}\n transition={\n wasFullSizeToggled\n ? {\n type: 'tween',\n // Easing curve for a smooth transition\n ease: [0.83, 0.0, 0.17, 1.0],\n duration: prefersReducedMotion ? 1.2 : 0.4,\n }\n : { opacity: { duration: 0.15, ease: 'easeOut' }, duration: 0 }\n }\n onDragEnd={() => {\n if (!fullSize) {\n const newPosition = { x: x.get(), y: y.get() };\n const clampedPosition = clampPositionToBounds(newPosition);\n setPanelPosition(clampedPosition);\n }\n }}\n drag={!fullSize}\n dragControls={dragControls}\n dragListener={false}\n dragMomentum={false}\n dragConstraints={dragConstraints}\n // The frame portals to the body, so panels that dismiss on an outside click\n // need this id to recognize a click in here as one of their own overlays.\n id={`${FLOATING_PANEL_ID_PREFIX}container`}\n {...restProps}\n >\n <DragHandle isFullSize={fullSize} onPointerDown={(e) => dragControls.start(e)}>\n <Stack align='center' direction='horizontal' justify='space-between'>\n <PanelText>{title}</PanelText>\n <Stack direction='horizontal' align='center' spacing={Spacing[1]}>\n {headerActions}\n {canFullsize && (\n <StyledIconButton\n size='sm'\n aria-label={fullSize ? 'collapse' : 'expand'}\n id='floating-panel__toggle-fullsize'\n onClick={() => {\n setWasFullSizeToggled(true);\n setFullSize(!fullSize);\n }}\n >\n {fullSize ? <ArrowCollapseIcon /> : <ArrowExpandIcon />}\n </StyledIconButton>\n )}\n\n <StyledIconButton\n size='sm'\n id='floating-panel__close-panel'\n onClick={() => onClose?.()}\n aria-label='close'\n >\n <XIcon />\n </StyledIconButton>\n </Stack>\n </Stack>\n </DragHandle>\n <PanelContent ref={contentRef} $noPadding={noPadding} $fitHeight={isAutoHeight}>\n {children}\n </PanelContent>\n {hasFooter && (\n <Footer style={{ paddingLeft: isAdditionalActionButton ? Spacing[1] : Spacing[3] }}>\n <Stack\n align='center'\n direction='horizontal'\n justify={footerAdditionalAction ? 'space-between' : 'flex-end'}\n >\n {footerAdditionalAction &&\n (isAdditionalActionButton ? (\n footerAdditionalAction\n ) : (\n <PanelText>{footerAdditionalAction}</PanelText>\n ))}\n\n {footerButtons && <div>{footerButtons}</div>}\n </Stack>\n </Footer>\n )}\n <ResizeHandleBottomRight\n data-test='resize-handle-se'\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.SouthEast)}\n />\n <ResizeHandleBottom\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.South)}\n />\n <ResizeHandleBottomLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.SouthWest)}\n />\n <ResizeHandleLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.West)}\n />\n <ResizeHandleTopLeft\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.NorthWest)}\n />\n <ResizeHandleTop\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.North)}\n />\n <ResizeHandleTopRight\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.NorthEast)}\n />\n <ResizeHandleRight\n onMouseDown={(event) => handleResizeMouseDown(event, ResizeDirection.East)}\n />\n </FloatingPanelContainer>\n );\n\n const content = (\n <>\n {dismissOnNavigate && <DismissOnNavigate onClose={onClose} />}\n {panelContent}\n </>\n );\n\n return portal ? createPortal(content, document.body) : content;\n}\n","import {\n createContext,\n type ReactElement,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { v4 as uuid } from 'uuid';\n\nimport { usePathname } from 'design-system/lib/router';\n\nexport type Panel = {\n key: string;\n panelElement: ReactElement;\n persistUntilPathRoot?: string;\n};\n\ninterface PanelContextType {\n openPanel: (panel: Panel) => void;\n closePanel: (key: string) => void;\n togglePanel: (panel: Panel) => void;\n closeAllPanels: () => void;\n isPanelOpen: (key: string) => boolean;\n panels: Panel[];\n}\n\nconst PanelContext = createContext<PanelContextType | null>(null);\n\nexport const PanelProvider = ({ children }: { children: ReactNode }) => {\n const [panels, setPanels] = useState<Panel[]>([]);\n const pathname = usePathname();\n\n function shouldPanelPersist(currentUrl: string, persistUntilPathRoot?: string): boolean {\n if (!persistUntilPathRoot) {\n return false;\n }\n return currentUrl.includes(persistUntilPathRoot);\n }\n\n const openPanel = useCallback(\n (panel: Panel) => {\n const { key, panelElement, persistUntilPathRoot } = panel;\n const pathRoot = persistUntilPathRoot || pathname;\n setPanels((prev) => [\n ...prev.filter((p) => p.key !== key), // Remove existing panel with same key\n { key, panelElement, persistUntilPathRoot: pathRoot },\n ]);\n },\n [pathname],\n );\n\n const closePanel = useCallback((key: string) => {\n setPanels((prev) => prev.filter((panel) => panel.key !== key));\n }, []);\n\n const isPanelOpen = useCallback(\n (key: string) => {\n return panels.some((panel) => panel.key === key);\n },\n [panels],\n );\n\n const togglePanel = useCallback(\n (panel: Panel) => {\n const { key } = panel;\n if (isPanelOpen(key)) {\n closePanel(key);\n } else {\n openPanel(panel);\n }\n },\n [isPanelOpen, closePanel, openPanel],\n );\n\n const closeAllPanels = useCallback(() => {\n setPanels([]);\n }, []);\n\n useEffect(() => {\n const nextLocation = pathname;\n\n setPanels((prevPanels) =>\n prevPanels.filter((panel) => shouldPanelPersist(nextLocation, panel.persistUntilPathRoot)),\n );\n }, [pathname]);\n\n return (\n <PanelContext.Provider\n value={{ openPanel, closePanel, togglePanel, closeAllPanels, panels, isPanelOpen }}\n >\n {children}\n </PanelContext.Provider>\n );\n};\n\nexport const usePersistentFloatingPanels = () => {\n const ctx = useContext(PanelContext);\n if (!ctx) {\n throw new Error('usePersistentFloatingPanels must be used within a PanelProvider');\n }\n return ctx;\n};\n\n// This hook is used to open a panel that persists across multiple pages\n// For single page panels, use the useToggle hook instead to manage individual panel state.\nexport const usePersistentFloatingPanel = (panelId?: string) => {\n const ctx = useContext(PanelContext);\n if (!ctx) {\n throw new Error('usePersistentFloatingPanels must be used within a PanelProvider');\n }\n\n // If the panel doesn't need to persist across multiple pages, we generate an id that can be passed back\n const currentPanelId = panelId || `panel-${uuid()}`;\n\n return {\n id: currentPanelId,\n openPanel: useCallback(\n (panel: Panel) => {\n ctx.openPanel(panel);\n },\n [ctx],\n ),\n closePanel: useCallback(() => {\n ctx.closePanel(currentPanelId);\n }, [currentPanelId, ctx]),\n togglePanel: useCallback(\n (panel: Panel) => {\n ctx.togglePanel(panel);\n },\n [ctx],\n ),\n isPanelOpen: ctx.isPanelOpen(currentPanelId),\n };\n};\n","import { cloneElement } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { usePersistentFloatingPanels } from './FloatingPanelContext';\n\nexport default function FloatingPanelRenderer() {\n const { panels, closePanel } = usePersistentFloatingPanels();\n\n if (panels.length === 0) {\n return null;\n }\n\n return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AAO;;AAKT,MAAa,8BAA8B,YAAqB;CAC9D,MAAM,MAAM,WAAW,aAAa;AACpC,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,kEAAkE;CAIpF,MAAM,iBAAiB,WAAW,SAASA,IAAM;AAEjD,QAAO;EACL,IAAI;EACJ,WAAW,aACR,UAAiB;AAChB,OAAI,UAAU,MAAM;KAEtB,CAAC,IAAI,CACN;EACD,YAAY,kBAAkB;AAC5B,OAAI,WAAW,eAAe;KAC7B,CAAC,gBAAgB,IAAI,CAAC;EACzB,aAAa,aACV,UAAiB;AAChB,OAAI,YAAY,MAAM;KAExB,CAAC,IAAI,CACN;EACD,aAAa,IAAI,YAAY,eAAe;EAC7C;;;;ACjIH,SAAwB,wBAAwB;CAC9C,MAAM,EAAE,QAAQ,eAAe,6BAA6B;AAE5D,KAAI,OAAO,WAAW,EACpB,QAAO;AAGT,QAAO,aACL,OAAO,KAAK,EAAE,KAAK,cAAc,YAAY;AAC3C,SAAO,aAAa,OAAO;GAAE,eAAe,WAAW,IAAI;GAAO;GAAK,CAAC;GACxE,EACF,SAAS,KACV"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "../../FormControl-
|
|
2
|
-
import { r as useFormField } from "../../useFormField
|
|
1
|
+
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "../../FormControl-CJfYdgZF.mjs";
|
|
2
|
+
import { r as useFormField } from "../../useFormField-DDbo-ExT.mjs";
|
|
3
3
|
export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText, useFormField };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as useFormField } from "../../useFormField-
|
|
2
|
-
import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText, t as Container } from "../../FormControl-
|
|
1
|
+
import { n as useFormField } from "../../useFormField-C61u9KvG.mjs";
|
|
2
|
+
import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText, t as Container } from "../../FormControl-CButLg9b.mjs";
|
|
3
3
|
export { Container, ErrorText, FormControl, FormControl as default, FormInputContainer, FormLabel, HelperText, WarningText, useFormField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "../../FormField-
|
|
1
|
+
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "../../FormField-CK8o1sMB.mjs";
|
|
2
2
|
import { CheckboxField, CheckboxFieldProps, ComboboxField, ComboboxMultiSelectFieldProps, ComboboxSingleSelectFieldProps, ImplementsFormField, RadioGroupField, RadioGroupFieldProps, SegmentedControlField, SegmentedControlFieldProps, SelectField, SelectFieldProps, TextAreaField, TextAreaFieldProps, TextField, TextFieldProps, ToggleField, ToggleFieldProps, splitOutFormFieldProps } from "../../inputFields.mjs";
|
|
3
3
|
import CheckboxGroupField from "../../CheckboxGroupField.mjs";
|
|
4
4
|
import ListBoxField from "../../ListBoxField.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CheckboxField, c as SegmentedControlField, d as TextField, f as ToggleField, i as CheckboxGroupField, l as SelectField, m as FormField, n as TableBoxField, o as ComboboxField, p as splitOutFormFieldProps, r as ListBoxField, s as RadioGroupField, t as TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, u as TextAreaField } from "../../FormField-
|
|
1
|
+
import { a as CheckboxField, c as SegmentedControlField, d as TextField, f as ToggleField, i as CheckboxGroupField, l as SelectField, m as FormField, n as TableBoxField, o as ComboboxField, p as splitOutFormFieldProps, r as ListBoxField, s as RadioGroupField, t as TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, u as TextAreaField } from "../../FormField-BHUeWCsa.mjs";
|
|
2
2
|
export { CheckboxField, CheckboxGroupField, ComboboxField, FormField, FormField as default, ListBoxField, RadioGroupField, SegmentedControlField, SelectField, TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, TableBoxField, TextAreaField, TextField, ToggleField, splitOutFormFieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as HoverCopyableField } from "../../HoverCopyableField-
|
|
1
|
+
import { t as HoverCopyableField } from "../../HoverCopyableField-B89NIwlE.mjs";
|
|
2
2
|
export { HoverCopyableField as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
2
|
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
3
|
-
import { i as Paragraph } from "../../Text-
|
|
3
|
+
import { i as Paragraph } from "../../Text-BdluS7Fy.mjs";
|
|
4
4
|
import "../../variables/transitions.mjs";
|
|
5
|
-
import { a as Tooltip } from "../../Tooltip-
|
|
5
|
+
import { a as Tooltip } from "../../Tooltip-C0FuZS1C.mjs";
|
|
6
6
|
import { focusOutline } from "../../mixins/focus.mjs";
|
|
7
|
-
import { n as Stack } from "../../Stack-
|
|
8
|
-
import { t as IconButton } from "../../IconButton-
|
|
9
|
-
import { n as DropdownMenu_default } from "../../DropdownMenu-
|
|
10
|
-
import { t as LoadingShimmer } from "../../LoadingShimmer-
|
|
11
|
-
import { t as Checkbox } from "../../Checkbox-
|
|
7
|
+
import { n as Stack } from "../../Stack-ChsImaEY.mjs";
|
|
8
|
+
import { t as IconButton } from "../../IconButton-CqTPMhjV.mjs";
|
|
9
|
+
import { n as DropdownMenu_default } from "../../DropdownMenu-I5WDO-q5.mjs";
|
|
10
|
+
import { t as LoadingShimmer } from "../../LoadingShimmer-JyGh7M7V.mjs";
|
|
11
|
+
import { t as Checkbox } from "../../Checkbox-DBAXDIQf.mjs";
|
|
12
12
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
13
13
|
import { useEffect, useState } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "../../Input-
|
|
1
|
+
import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "../../Input-Ce8FvSYf.mjs";
|
|
2
2
|
export { ClearButton, Input, Input as default, InputGroup, InputGroupProps, InputProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { n as RouterLink } from "../../router-7FYDW80v.mjs";
|
|
2
3
|
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
3
4
|
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
4
5
|
import "../../variables/transitions.mjs";
|
|
@@ -6,7 +7,6 @@ import { focusOutline } from "../../mixins/focus.mjs";
|
|
|
6
7
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { LinkExternalIcon } from "@persona/icons";
|
|
9
|
-
import { Link as Link$1 } from "react-router-dom";
|
|
10
10
|
//#region components/Link/Link.tsx
|
|
11
11
|
const IconContainer = styled.span`
|
|
12
12
|
display: inline-block;
|
|
@@ -47,7 +47,7 @@ const baseLinkStyles = css`
|
|
|
47
47
|
const StyledAnchor = styled.a`
|
|
48
48
|
${baseLinkStyles}
|
|
49
49
|
`;
|
|
50
|
-
const StyledRouterLink = styled(
|
|
50
|
+
const StyledRouterLink = styled(RouterLink)`
|
|
51
51
|
${baseLinkStyles}
|
|
52
52
|
`;
|
|
53
53
|
const Link = ({ children, url, ...props }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LinkExternalIcon } from '@persona/icons';\nimport { RouterLink, type RouterLinkComponentProps } from 'design-system/lib/router';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport { focusOutline } from 'design-system/mixins/focus';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\ntype Target = '_blank' | '_self' | '_parent' | '_top';\n\ninterface BaseLinkProps {\n /**\n * The content to display inside the link.\n *\n */\n children?: ReactNode;\n /**\n * Provides an accessible name for the link when the visible text alone\n * isn't descriptive enough for screen reader users\n */\n 'aria-label'?: string;\n}\n\ninterface ExternalLinkProps extends BaseLinkProps, AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The URL to navigate to. Can be internal (e.g., \"/settings\") or external (e.g., \"https://example.com\").\n */\n url: string;\n\n /**\n * Where to open the link. Use \"_blank\" for external links to open in a new tab.\n */\n target?: Target;\n}\n\ninterface InternalLinkProps extends BaseLinkProps, Omit<RouterLinkComponentProps, 'to' | 'children'> {\n /**\n * The URL to navigate to. Should be an internal route (e.g., \"/settings\").\n */\n url: string;\n}\n\nexport type LinkProps = ExternalLinkProps | InternalLinkProps;\n\nconst IconContainer = styled.span`\n display: inline-block;\n vertical-align: middle;\n /* Uses padding here since we can't define flex on the element for multiline support */\n padding-left: 2px;\n /* Needed to reset the height of the container for SVG */\n line-height: 0;\n position: relative;\n /* Optical alignment adjustments */\n bottom: 1px;\n`;\n\nconst baseLinkStyles = css`\n ${paragraphMixins.md};\n color: ${({ theme }) => semanticColor(theme, 'FgAccent', Color.CorePurple600)};\n width: fit-content;\n position: relative;\n overflow: hidden;\n text-decoration: underline;\n\n transition:\n color ${TransitionDuration.ExtraFast} ease-out,\n text-underline-offset ${TransitionDuration.ExtraFast} ease-out;\n text-underline-offset: 2px;\n\n &:hover {\n color: ${({ theme }) => semanticColor(theme, 'FgAccentHover', Color.CorePurple800)};\n text-underline-offset: ${Spacing[1]};\n }\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n ${focusOutline}\n\n &:active {\n color: ${({ theme }) => semanticColor(theme, 'FgAccentActive', Color.CorePurple900)};\n }\n`;\n\nconst StyledAnchor = styled.a`\n ${baseLinkStyles}\n`;\n\nconst StyledRouterLink = styled(RouterLink)`\n ${baseLinkStyles}\n`;\n\nexport const Link = ({ children, url, ...props }: LinkProps) => {\n // Check if the URL is external by looking at the protocol or if target is _blank\n const isAbsoluteUrl = /^https?:\\/\\//.test(url);\n const hasBlankTarget = props.target === '_blank';\n const isExternal = isAbsoluteUrl || hasBlankTarget;\n\n if (isExternal) {\n const { 'aria-label': ariaLabel, ...anchorProps } = props;\n const externalProps = {\n href: url,\n target: '_blank',\n rel: 'noopener noreferrer',\n 'aria-label': ariaLabel,\n // Automatically inform screen readers that link opens in new window\n title: ariaLabel ? undefined : 'Opens in new window',\n ...anchorProps,\n };\n\n return (\n <StyledAnchor {...externalProps}>\n {children}\n <IconContainer>\n <LinkExternalIcon size={12} />\n </IconContainer>\n </StyledAnchor>\n );\n }\n\n const { 'aria-label': ariaLabel, ...routerProps } = props;\n const internalProps = {\n to: url,\n 'aria-label': ariaLabel,\n\n ...routerProps,\n };\n\n return <StyledRouterLink {...internalProps}>{children}</StyledRouterLink>;\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;AA+CA,MAAM,gBAAgB,OAAO,IAAI;;;;;;;;;;;AAYjC,MAAM,iBAAiB,GAAG;IACtB,gBAAgB,GAAG;YACX,EAAE,YAAY,cAAc,OAAO,YAAY,MAAM,cAAc,CAAC;;;;;;;oBAOvC;oCACgB;;;;cAI3C,EAAE,YAAY,cAAc,OAAO,iBAAiB,MAAM,cAAc,CAAC;6BAC1D,QAAQ,GAAG;;;oBAGpB,EAAE,YAAY,MAAM,OAAO,aAAa;IACxD,aAAa;;;cAGH,EAAE,YAAY,cAAc,OAAO,kBAAkB,MAAM,cAAc,CAAC;;;AAIxF,MAAM,eAAe,OAAO,CAAC;IACzB,eAAe;;AAGnB,MAAM,mBAAmB,OAAO,WAAW;IACvC,eAAe;;AAGnB,MAAa,QAAQ,EAAE,UAAU,KAAK,GAAG,YAAuB;CAE9D,MAAM,gBAAgB,eAAe,KAAK,IAAI;CAC9C,MAAM,iBAAiB,MAAM,WAAW;AAGxC,KAFmB,iBAAiB,gBAEpB;EACd,MAAM,EAAE,cAAc,WAAW,GAAG,gBAAgB;AAWpD,SACE,qBAAC,cAAD;GAVA,MAAM;GACN,QAAQ;GACR,KAAK;GACL,cAAc;GAEd,OAAO,YAAY,KAAA,IAAY;GAC/B,GAAG;aAIH,CACG,UACD,oBAAC,eAAD,EAAA,UACE,oBAAC,kBAAD,EAAkB,MAAM,IAAM,CAAA,EAChB,CAAA,CACH;;;CAInB,MAAM,EAAE,cAAc,WAAW,GAAG,gBAAgB;AAQpD,QAAO,oBAAC,kBAAD;EANL,IAAI;EACJ,cAAc;EAEd,GAAG;EAGwC;EAA4B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useListBoxContext, n as ListBoxItemProps, r as ListBoxProps } from "../../ListBox-
|
|
2
|
-
import { n as LogicRowProps } from "../../LogicRow-
|
|
3
|
-
import { t as ListBox } from "../../index-
|
|
1
|
+
import { i as useListBoxContext, n as ListBoxItemProps, r as ListBoxProps } from "../../ListBox-CCBWdAUR.mjs";
|
|
2
|
+
import { n as LogicRowProps } from "../../LogicRow-DmI8NKrI.mjs";
|
|
3
|
+
import { t as ListBox } from "../../index-Nip77QqW.mjs";
|
|
4
4
|
export { ListBox, ListBox as default, ListBoxItemProps, ListBoxProps, LogicRowProps, useListBoxContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useListBoxContext, t as ListBox } from "../../ListBox-
|
|
1
|
+
import { n as useListBoxContext, t as ListBox } from "../../ListBox-BHE4DO2l.mjs";
|
|
2
2
|
export { ListBox, ListBox as default, useListBoxContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as MaybeLoadingShimmer, n as LoadingShimmerHeading, r as LoadingShimmerParagraph, t as LoadingShimmer } from "../../LoadingShimmer-
|
|
1
|
+
import { i as MaybeLoadingShimmer, n as LoadingShimmerHeading, r as LoadingShimmerParagraph, t as LoadingShimmer } from "../../LoadingShimmer-JyGh7M7V.mjs";
|
|
2
2
|
export { LoadingShimmer, LoadingShimmerHeading, LoadingShimmerParagraph, MaybeLoadingShimmer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenuDivider, c as MenuItem, d as MenuList, f as MenuProps, i as Menu, l as MenuItemProps, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuHeadingProps, t as FloatingCard, u as MenuItemType } from "../../Menu-
|
|
1
|
+
import { a as MenuDivider, c as MenuItem, d as MenuList, f as MenuProps, i as Menu, l as MenuItemProps, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuHeadingProps, t as FloatingCard, u as MenuItemType } from "../../Menu-C8RxFGOG.mjs";
|
|
2
2
|
export { FloatingCard, IconContainer, ListItem, Menu, Menu as default, MenuDivider, MenuHeading, MenuHeadingProps, MenuItem, MenuItemProps, MenuItemType, MenuList, MenuProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenuDivider, c as MenuList, i as Menu, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuItem, t as FloatingCard } from "../../Menu-
|
|
1
|
+
import { a as MenuDivider, c as MenuList, i as Menu, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuItem, t as FloatingCard } from "../../Menu-xENvm-Oa.mjs";
|
|
2
2
|
export { FloatingCard, IconContainer, ListItem, Menu, Menu as default, MenuDivider, MenuHeading, MenuItem, MenuList };
|
|
@@ -1,79 +1,17 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
2
|
import { semanticColor, semanticOnly } from "../../lib/semanticColor.mjs";
|
|
3
|
-
import { t as Card_default } from "../../Card-
|
|
4
|
-
import { n as Heading$1 } from "../../Text-
|
|
3
|
+
import { t as Card_default } from "../../Card-Dz6jqJuJ.mjs";
|
|
4
|
+
import { n as Heading$1 } from "../../Text-BdluS7Fy.mjs";
|
|
5
5
|
import useEmbeddedSurface, { useEmbeddedSurfaceGate, useEmbeddedSurfaceId } from "../../lib/useEmbeddedSurface.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
6
|
+
import useModalInsetRight from "../../lib/useModalInsetRight.mjs";
|
|
7
|
+
import { n as Stack, t as HStack } from "../../Stack-ChsImaEY.mjs";
|
|
8
|
+
import { n as Button$1 } from "../../IconButton-CqTPMhjV.mjs";
|
|
9
|
+
import { i as TabBar, r as Tab } from "../../TabBar-RenaeJJ6.mjs";
|
|
9
10
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
10
|
-
import { forwardRef, useContext, useEffect,
|
|
11
|
+
import { forwardRef, useContext, useEffect, useState } from "react";
|
|
11
12
|
import { Button, Dialog, DialogTrigger, Heading, Modal, ModalOverlay, OverlayTriggerStateContext, Pressable } from "react-aria-components";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { XIcon } from "@persona/icons";
|
|
14
|
-
//#region lib/useModalInsetRight.ts
|
|
15
|
-
const CSS_VAR = "--modal-inset-right";
|
|
16
|
-
const getModalInsetRight = () => getComputedStyle(document.documentElement).getPropertyValue(CSS_VAR).trim() || "0px";
|
|
17
|
-
const prefersReducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the current value of --modal-inset-right from :root, reactively updating
|
|
20
|
-
* as the agents side panel animates open/closed or is resized. Also tracks whether
|
|
21
|
-
* the panel is opening, open, closing, or closed.
|
|
22
|
-
*
|
|
23
|
-
* panelState stays 'opening'/'closing' for the full transition duration so that
|
|
24
|
-
* CSS transitions on consumers have time to animate.
|
|
25
|
-
*/
|
|
26
|
-
const useModalInsetRight = () => {
|
|
27
|
-
const [insetRight, setInsetRight] = useState(getModalInsetRight);
|
|
28
|
-
const [panelState, setPanelState] = useState(() => getModalInsetRight() !== "0px" ? "open" : "closed");
|
|
29
|
-
const prevInsetRight = useRef(getModalInsetRight());
|
|
30
|
-
const transitionTimerRef = useRef(null);
|
|
31
|
-
const rafRef = useRef(null);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
const observer = new MutationObserver(() => {
|
|
34
|
-
const prev = prevInsetRight.current;
|
|
35
|
-
const next = getModalInsetRight();
|
|
36
|
-
prevInsetRight.current = next;
|
|
37
|
-
if (prev === "0px" && next !== "0px") if (prefersReducedMotion()) {
|
|
38
|
-
setInsetRight(next);
|
|
39
|
-
setPanelState("open");
|
|
40
|
-
} else {
|
|
41
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
42
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
43
|
-
setInsetRight("0px");
|
|
44
|
-
setPanelState("opening");
|
|
45
|
-
rafRef.current = requestAnimationFrame(() => setInsetRight(next));
|
|
46
|
-
transitionTimerRef.current = setTimeout(() => setPanelState("open"), 425);
|
|
47
|
-
}
|
|
48
|
-
else if (prev !== "0px" && next === "0px") if (prefersReducedMotion()) {
|
|
49
|
-
setInsetRight("0px");
|
|
50
|
-
setPanelState("closed");
|
|
51
|
-
} else {
|
|
52
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
53
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
54
|
-
setInsetRight(prev);
|
|
55
|
-
setPanelState("closing");
|
|
56
|
-
rafRef.current = requestAnimationFrame(() => setInsetRight("0px"));
|
|
57
|
-
transitionTimerRef.current = setTimeout(() => setPanelState("closed"), 200);
|
|
58
|
-
}
|
|
59
|
-
else setInsetRight(next);
|
|
60
|
-
});
|
|
61
|
-
observer.observe(document.documentElement, {
|
|
62
|
-
attributes: true,
|
|
63
|
-
attributeFilter: ["style"]
|
|
64
|
-
});
|
|
65
|
-
return () => {
|
|
66
|
-
observer.disconnect();
|
|
67
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
68
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
69
|
-
};
|
|
70
|
-
}, []);
|
|
71
|
-
return {
|
|
72
|
-
insetRight,
|
|
73
|
-
panelState
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
//#endregion
|
|
77
15
|
//#region components/Modal/Modal.tsx
|
|
78
16
|
const StyledModalOverlay = styled(ModalOverlay)`
|
|
79
17
|
@keyframes overlayShow {
|