@persona/design-system 0.10.13 → 0.10.15
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 +22 -0
- package/dist/{Action-CHWYwpYR.d.mts → Action-sLO73eKq.d.mts} +2 -2
- 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 +2 -2
- package/dist/{Badge-B2AJMf3d.mjs → Badge-DZq6ByIU.mjs} +2 -2
- package/dist/{Badge-B2AJMf3d.mjs.map → Badge-DZq6ByIU.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumbs-DRs9eo1o.mjs → Breadcrumbs-I4VWR3NE.mjs} +9 -9
- package/dist/{Breadcrumbs-DRs9eo1o.mjs.map → Breadcrumbs-I4VWR3NE.mjs.map} +1 -1
- package/dist/{Button-DjD8QxcY.d.mts → Button-C4a4BTjL.d.mts} +2 -2
- package/dist/Button.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-DiUHtYg_.d.mts → Card-CPV4_mHk.d.mts} +4 -4
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +3 -3
- package/dist/CardGrouping.d.mts +1 -1
- package/dist/{CardV2-DO-8COfu.mjs → CardV2-CGwm01p7.mjs} +13 -13
- package/dist/{CardV2-DO-8COfu.mjs.map → CardV2-CGwm01p7.mjs.map} +1 -1
- package/dist/{Checkbox-BAh-wF_F.mjs → Checkbox-C0uefDLS.mjs} +6 -6
- package/dist/{Checkbox-BAh-wF_F.mjs.map → Checkbox-C0uefDLS.mjs.map} +1 -1
- package/dist/{CheckboxGroupField-BW_BcW3L.d.mts → CheckboxGroupField-NZ2-Y5KV.d.mts} +2 -2
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-DgYwerwd.d.mts → Combobox-CHpJVaXK.d.mts} +3 -3
- package/dist/{Combobox-DmFQ5cAy.mjs → Combobox-DPhX1GIR.mjs} +34 -23
- package/dist/Combobox-DPhX1GIR.mjs.map +1 -0
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-DoKiRjgS.d.mts → ComboboxBase-D2X8exFX.d.mts} +8 -6
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DsoIMJiZ.d.mts → ComboboxMultiSelect-O4awZnXr.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-CKsqOAGB.d.mts → ComboboxSingleSelect-Ck-xBJqU.d.mts} +3 -3
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-tNtY2EhN.d.mts → CompactBar-DdlHPalF.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-BCTWCws5.mjs → ConfigFormGroup-gOg83LzL.mjs} +3 -3
- package/dist/{ConfigFormGroup-BCTWCws5.mjs.map → ConfigFormGroup-gOg83LzL.mjs.map} +1 -1
- package/dist/{ControlBar-CDb6b1_6.d.mts → ControlBar-Z_GGxMpa.d.mts} +4 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/{DataTable-DZ0B2Zm9.mjs → DataTable-D2iX3Ua6.mjs} +18 -18
- package/dist/{DataTable-DZ0B2Zm9.mjs.map → DataTable-D2iX3Ua6.mjs.map} +1 -1
- package/dist/{DataTable-on3vGhyi.d.mts → DataTable-Xt9cBYlh.d.mts} +6 -6
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DatePicker-CHVYVKB-.mjs → DatePicker-CZsjaBO2.mjs} +11 -11
- package/dist/{DatePicker-CHVYVKB-.mjs.map → DatePicker-CZsjaBO2.mjs.map} +1 -1
- package/dist/DateRangeValueControl.d.mts +1 -1
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-BxZ5hn0X.mjs → DropdownButton-ILgsmuFy.mjs} +3 -3
- package/dist/{DropdownButton-BxZ5hn0X.mjs.map → DropdownButton-ILgsmuFy.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-eVY-Yjpq.d.mts → DropdownMenu-BK-AmDAC.d.mts} +3 -3
- package/dist/{DropdownMenu-Ip75l4Th.mjs → DropdownMenu-CYZTQS02.mjs} +3 -3
- package/dist/{DropdownMenu-Ip75l4Th.mjs.map → DropdownMenu-CYZTQS02.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{FieldRegistry-CJwGpUVK.d.mts → FieldRegistry-CD8fjf9Z.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-CA4mDAXK.d.mts → FilterBar-B1fwBKuZ.d.mts} +4 -4
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPanelSlot.d.mts +30 -0
- package/dist/FilterPanelVisibilityContext.d.mts +9 -0
- package/dist/FilterPickerMenu.d.mts +2 -2
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +1 -14
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/{FloatingToolbar-BA8Fqmrz.mjs → FloatingToolbar-Do5PMF_v.mjs} +4 -4
- package/dist/{FloatingToolbar-BA8Fqmrz.mjs.map → FloatingToolbar-Do5PMF_v.mjs.map} +1 -1
- package/dist/{FormControl-BoKGiWdQ.mjs → FormControl--iW9afGv.mjs} +5 -5
- package/dist/{FormControl-BoKGiWdQ.mjs.map → FormControl--iW9afGv.mjs.map} +1 -1
- package/dist/{FormControl-BQe3GRhi.d.mts → FormControl-DPYbLcBK.d.mts} +2 -2
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-BW5uMzId.d.mts → FormField-CYNGm2bJ.d.mts} +2 -2
- package/dist/{FormField-BfVrDOY0.mjs → FormField-C_rAxIPH.mjs} +16 -16
- package/dist/{FormField-BfVrDOY0.mjs.map → FormField-C_rAxIPH.mjs.map} +1 -1
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-CYpOqTUu.mjs → Grid-DVC0SSEZ.mjs} +2 -2
- package/dist/{Grid-CYpOqTUu.mjs.map → Grid-DVC0SSEZ.mjs.map} +1 -1
- package/dist/{Header-CV0Lcf0C.d.mts → Header-DaaUprCL.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-BNM3pTM-.d.mts → HelperTooltip-C5BDdJSI.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +1 -1
- package/dist/{HoverCopyableField-CJ_p3llp.mjs → HoverCopyableField-Dy_lE6Wg.mjs} +5 -5
- package/dist/{HoverCopyableField-CJ_p3llp.mjs.map → HoverCopyableField-Dy_lE6Wg.mjs.map} +1 -1
- package/dist/{IconButton-C_ReZm8v.d.mts → IconButton-7k-wjvH3.d.mts} +2 -2
- package/dist/{IconButton-Bj1fry_K.mjs → IconButton-kSjnfhWt.mjs} +8 -8
- package/dist/{IconButton-Bj1fry_K.mjs.map → IconButton-kSjnfhWt.mjs.map} +1 -1
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/IndexTableLayout.d.mts +4 -4
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DcbzPaax.mjs → Input-BIHbRmmU.mjs} +6 -6
- package/dist/{Input-DcbzPaax.mjs.map → Input-BIHbRmmU.mjs.map} +1 -1
- package/dist/{Input-DH-5dKor.d.mts → Input-CwvrBsiS.d.mts} +3 -3
- package/dist/Input.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/{Link-Df3zJrj2.mjs → Link-CnT85JqA.mjs} +4 -4
- package/dist/{Link-Df3zJrj2.mjs.map → Link-CnT85JqA.mjs.map} +1 -1
- package/dist/{ListBox-Bgug8YZF.d.mts → ListBox-Cu-NLNRF.d.mts} +3 -3
- package/dist/{ListBox-BRgjgUSp.mjs → ListBox-CwC9YztW.mjs} +13 -13
- package/dist/{ListBox-BRgjgUSp.mjs.map → ListBox-CwC9YztW.mjs.map} +1 -1
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-Cc1sX2bo.d.mts → ListBoxField-Vetrl4r5.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LoadingShimmer-BVVdBeN-.mjs → LoadingShimmer-BypAGgyP.mjs} +1 -1
- package/dist/{LoadingShimmer-BVVdBeN-.mjs.map → LoadingShimmer-BypAGgyP.mjs.map} +1 -1
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-B1_35ZJT.d.mts → LogicRow-D4YL4C6U.d.mts} +2 -2
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-keVl-eKm.d.mts → Menu-DNJMfxfw.d.mts} +4 -4
- package/dist/{Menu-BVn1jh46.mjs → Menu-DQPxDJ11.mjs} +5 -5
- package/dist/{Menu-BVn1jh46.mjs.map → Menu-DQPxDJ11.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText-DicQsLDG.mjs → MiddleTruncatedText--jzGTD00.mjs} +2 -2
- package/dist/{MiddleTruncatedText-DicQsLDG.mjs.map → MiddleTruncatedText--jzGTD00.mjs.map} +1 -1
- package/dist/{Modal-CujB7DuB.d.mts → Modal-7ZHanMzZ.d.mts} +9 -4
- package/dist/{Modal-SnCo7ecm.mjs → Modal-bsjGJxTM.mjs} +23 -20
- package/dist/{Modal-SnCo7ecm.mjs.map → Modal-bsjGJxTM.mjs.map} +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-UPiqJpIF.d.mts → PageHeader-BeBmYmUX.d.mts} +2 -2
- package/dist/{PageHeader-6KvtGED-.mjs → PageHeader-jvLx6GUu.mjs} +2 -2
- package/dist/{PageHeader-6KvtGED-.mjs.map → PageHeader-jvLx6GUu.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageLayout-BdVM37bV.d.mts → PageLayout-BXM_pyrU.d.mts} +2 -2
- package/dist/{PageLayout-CPiVnS_r.mjs → PageLayout-D_NZNEit.mjs} +3 -3
- package/dist/{PageLayout-CPiVnS_r.mjs.map → PageLayout-D_NZNEit.mjs.map} +1 -1
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageSelector-B5CcAzss.d.mts → PageSelector-C14ABZVL.d.mts} +2 -2
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-CqFvnlXc.mjs → Pagination-CgT2eQrk.mjs} +5 -5
- package/dist/{Pagination-CqFvnlXc.mjs.map → Pagination-CgT2eQrk.mjs.map} +1 -1
- package/dist/{Pii-BYPkrBuT.mjs → Pii-x1UInvWe.mjs} +2 -2
- package/dist/{Pii-BYPkrBuT.mjs.map → Pii-x1UInvWe.mjs.map} +1 -1
- package/dist/{PillShell-Bkyu5FXB.d.mts → PillShell-DuTRfsS1.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-DP9DXReH.mjs → Popover-BMX-ff3L.mjs} +3 -3
- package/dist/{Popover-DP9DXReH.mjs.map → Popover-BMX-ff3L.mjs.map} +1 -1
- package/dist/Popover.d.mts +1 -1
- package/dist/ProgressBar.d.mts +1 -1
- package/dist/{ProgressIndicator-zt3ndT9U.mjs → ProgressIndicator-hy1P-RG1.mjs} +3 -3
- package/dist/{ProgressIndicator-zt3ndT9U.mjs.map → ProgressIndicator-hy1P-RG1.mjs.map} +1 -1
- package/dist/{Radio-B1H_S-Qj.mjs → Radio-D6Vydkx-.mjs} +5 -5
- package/dist/{Radio-B1H_S-Qj.mjs.map → Radio-D6Vydkx-.mjs.map} +1 -1
- package/dist/{RadioGroup-7hdcVhsp.mjs → RadioGroup-C04h3el1.mjs} +3 -3
- package/dist/{RadioGroup-7hdcVhsp.mjs.map → RadioGroup-C04h3el1.mjs.map} +1 -1
- package/dist/RichTextEditor.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-BNOJ1FYQ.mjs → SegmentedControl-CaQ2DJsa.mjs} +4 -4
- package/dist/{SegmentedControl-BNOJ1FYQ.mjs.map → SegmentedControl-CaQ2DJsa.mjs.map} +1 -1
- package/dist/{Select-DbWEgH5c.mjs → Select-Bicuj8VD.mjs} +10 -10
- package/dist/{Select-DbWEgH5c.mjs.map → Select-Bicuj8VD.mjs.map} +1 -1
- package/dist/{Select-CiofH5-f.d.mts → Select-O4aTrBuF.d.mts} +2 -2
- package/dist/Select.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +1 -1
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
- package/dist/SmartTextInputPopover.d.mts +1 -1
- package/dist/{Spinner-k9ZiOdTr.mjs → Spinner-B8KWWUWy.mjs} +2 -2
- package/dist/{Spinner-k9ZiOdTr.mjs.map → Spinner-B8KWWUWy.mjs.map} +1 -1
- package/dist/{Stack-CODxfzhl.d.mts → Stack-B6MrjJeW.d.mts} +2 -2
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-CzRaEFSz.mjs → StatusIndicator-lwt35J6B.mjs} +3 -3
- package/dist/{StatusIndicator-CzRaEFSz.mjs.map → StatusIndicator-lwt35J6B.mjs.map} +1 -1
- package/dist/{Sticker-CLvRB8V5.d.mts → Sticker-C7Wv3Obx.d.mts} +4 -4
- package/dist/{Sticker-4VdGEFAu.mjs → Sticker-jfOM4Yi6.mjs} +5 -5
- package/dist/{Sticker-4VdGEFAu.mjs.map → Sticker-jfOM4Yi6.mjs.map} +1 -1
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +2 -2
- package/dist/{TabBar-d4sdknti.mjs → TabBar-B7U2uVD3.mjs} +6 -6
- package/dist/{TabBar-d4sdknti.mjs.map → TabBar-B7U2uVD3.mjs.map} +1 -1
- package/dist/{Table-9mNn8Q-d.mjs → Table-BsDubdR2.mjs} +10 -10
- package/dist/{Table-9mNn8Q-d.mjs.map → Table-BsDubdR2.mjs.map} +1 -1
- package/dist/{TableBox-RxpwflEb.mjs → TableBox-DmEfPlTG.mjs} +15 -15
- package/dist/{TableBox-RxpwflEb.mjs.map → TableBox-DmEfPlTG.mjs.map} +1 -1
- package/dist/TableBox.d.mts +1 -1
- package/dist/{TableBoxCell-C65YFYqj.d.mts → TableBoxCell-DiKY6wne.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-CHpClgsE.d.mts → TableBoxField-DPq_rueS.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-CK-b79uD.d.mts → TableBoxRow-B3DdXy6r.d.mts} +2 -2
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-CRaabjaY.d.mts → TableBoxRowActions-BYXYa9s5.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-CQsF7t4e.d.mts → TableCell-uv_jqT5e.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-v1NmlFTW.d.mts → TableControls-C4tMGBao.d.mts} +5 -5
- package/dist/{TableControls-DM4RddQ_.mjs → TableControls-fuaMJFA6.mjs} +115 -41
- package/dist/TableControls-fuaMJFA6.mjs.map +1 -0
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-DHYICXxy.d.mts → TableControlsContext-D8UNXFkq.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-1nT8wneI.d.mts → TableViewConfigurationDropdown-BlQj0RyT.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-DtV7Gawf.mjs → TechnicalSticker--98wizQK.mjs} +7 -7
- package/dist/{TechnicalSticker-DtV7Gawf.mjs.map → TechnicalSticker--98wizQK.mjs.map} +1 -1
- package/dist/{Text-CvaqognH.d.mts → Text-CdHeSHCc.d.mts} +2 -2
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-CQ1YNi2b.mjs → TextArea-BoVqMk8l.mjs} +2 -2
- package/dist/{TextArea-CQ1YNi2b.mjs.map → TextArea-BoVqMk8l.mjs.map} +1 -1
- package/dist/{TextUnderlineTooltip-Bd5e8KH3.d.mts → TextUnderlineTooltip-By1VVsSs.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/{Toggle-CzHoIR-n.mjs → Toggle-BU7Faaud.mjs} +7 -7
- package/dist/{Toggle-CzHoIR-n.mjs.map → Toggle-BU7Faaud.mjs.map} +1 -1
- package/dist/{Tooltip-CVBxc1yf.mjs → Tooltip-C2VB8I6y.mjs} +4 -4
- package/dist/{Tooltip-CVBxc1yf.mjs.map → Tooltip-C2VB8I6y.mjs.map} +1 -1
- package/dist/{Tooltip-Ddy2Jq0K.d.mts → Tooltip-OxVvOfn8.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-sr9Fhm3N.d.mts → TruncatedText-Dqj94BFK.d.mts} +2 -2
- package/dist/WizardModal.d.mts +1 -1
- package/dist/{clientFilterUtils-CaF2QZBy.d.mts → clientFilterUtils-CI85xKUy.d.mts} +2 -2
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +5 -5
- package/dist/components/Attribute/index.mjs +6 -6
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +3 -3
- package/dist/components/BottomPanel/index.mjs +7 -7
- 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 +3 -3
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +4 -4
- package/dist/components/Combobox/index.d.mts +4 -4
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +20 -20
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.d.mts +5 -5
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.mjs +1 -1
- 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 +7 -7
- package/dist/components/FloatingToolbar/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +1 -1
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +8 -8
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +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.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +1 -1
- 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 +2 -2
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RichTextEditor/index.mjs +10 -10
- package/dist/components/RightPanel/index.mjs +4 -4
- 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/SelectionCard/index.mjs +6 -6
- package/dist/components/Slider/index.mjs +4 -4
- package/dist/components/SmartTextInput/index.mjs +42 -25
- package/dist/components/SmartTextInput/index.mjs.map +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/SwatchPicker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +1 -1
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +1 -1
- 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/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +2 -2
- package/dist/components/Toast/index.mjs +4 -4
- 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/components/VersionHistory/index.mjs +8 -8
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{date-range-rule-value-DyLlMtjr.d.mts → date-range-rule-value-DY14Qlan.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/display.d.mts +1 -1
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-DVnjmuhk.d.mts → filter-size-context-BaFrCH_G.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/{filters-CShP0Jag.d.mts → filters-oNzv_Y5o.d.mts} +3 -3
- package/dist/filters.d.mts +1 -1
- package/dist/{helpers-Bbi1LyMW.d.mts → helpers-Cvy93JmP.d.mts} +2 -2
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-DTM_t7OG.d.mts → index-Dh3UpnW5.d.mts} +2 -2
- package/dist/{index-3-eDlpcj.d.mts → index-_ubFQdZK.d.mts} +3 -3
- package/dist/index2.d.mts +1 -1
- package/dist/index4.d.mts +3 -3
- package/dist/index5.d.mts +1 -1
- package/dist/index6.d.mts +13 -13
- package/dist/{inputFields-Dobwb4kT.d.mts → inputFields-CxgQOm9E.d.mts} +6 -6
- package/dist/inputFields.d.mts +1 -1
- package/dist/{intersperse-DvJsBw5D.mjs → intersperse--nD7mQCo.mjs} +1 -1
- package/dist/{intersperse-DvJsBw5D.mjs.map → intersperse--nD7mQCo.mjs.map} +1 -1
- package/dist/lib/MiddleTruncatedText.mjs +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/colorMode.d.mts +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/mixins/focus.mjs +1 -1
- package/dist/mixins/hoverable.mjs +1 -1
- package/dist/mixins/input.mjs +2 -2
- package/dist/mixins/motion.mjs +1 -1
- package/dist/{operators-B8_k3r69.d.mts → operators-B8fgw6F_.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/patterns/CardGrouping/index.mjs +8 -8
- package/dist/patterns/IndexTableLayout/index.mjs +3 -3
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
- package/dist/patterns/PageLayout/index.d.mts +1 -1
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/patterns/WizardModal/index.mjs +4 -4
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/tone.d.mts +1 -1
- package/dist/{types-BTaKBrxG.d.mts → types-BwbQx3-v.d.mts} +2 -2
- package/dist/{types-BJqmRXFV.d.mts → types-CnqmdPXi.d.mts} +3 -2
- package/dist/{types-BOsCi-kZ.d.mts → types-Dl-tYxwE.d.mts} +2 -2
- package/dist/{types-CUnL8JJj.d.mts → types-hhfBHo97.d.mts} +3 -3
- package/dist/types4.d.mts +1 -1
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/{url-state-CXPmXzIZ.d.mts → url-state-B5TJ9RJF.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/{useChain-B--KAtdN.d.mts → useChain-x9fd9Fyq.d.mts} +2 -2
- package/dist/useChainAtCursor.d.mts +1 -1
- package/dist/useColumnConfiguration.d.mts +2 -2
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-DiTS9DTg.d.mts → useFilterStateV2-Bo5NcLC9.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-pOVkb5BK.mjs → useFormField-Cd9sH-HM.mjs} +2 -2
- package/dist/{useFormField-pOVkb5BK.mjs.map → useFormField-Cd9sH-HM.mjs.map} +1 -1
- package/dist/{useFormGroup-DSQkoWLh.mjs → useFormGroup-CerJGY6Y.mjs} +1 -1
- package/dist/{useFormGroup-DSQkoWLh.mjs.map → useFormGroup-CerJGY6Y.mjs.map} +1 -1
- package/dist/{useTableColumns-BuxN7Usm.d.mts → useTableColumns-D80uOKnT.d.mts} +2 -2
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-BDQdQ1cY.d.mts → validation-lepFD1Fr.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-BFJZEWDn.d.mts → value-control-resolver-Dhmspfw-.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/value-labels.d.mts +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/ui-authoring/COMPONENTS.md +4 -1
- package/dist/Combobox-DmFQ5cAy.mjs.map +0 -1
- package/dist/TableControls-DM4RddQ_.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as Pagination } from "./Pagination-CCKuudiz.mjs";
|
|
2
|
-
import { i as BaseFilterConfig, n as AttributeColumn, s as FilterConfig } from "./types-
|
|
3
|
-
import { r as TableControlsProps, t as TableControls } from "./TableControls-
|
|
4
|
-
import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat, t as BulkAction } from "./types-
|
|
5
|
-
import { t as RenderFormatFn } from "./useTableColumns-
|
|
6
|
-
import { ComponentProps } from "react";
|
|
2
|
+
import { i as BaseFilterConfig, n as AttributeColumn, s as FilterConfig } from "./types-BwbQx3-v.mjs";
|
|
3
|
+
import { r as TableControlsProps, t as TableControls } from "./TableControls-C4tMGBao.mjs";
|
|
4
|
+
import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat, t as BulkAction } from "./types-hhfBHo97.mjs";
|
|
5
|
+
import { t as RenderFormatFn } from "./useTableColumns-D80uOKnT.mjs";
|
|
7
6
|
import * as _$styled_components0 from "styled-components";
|
|
7
|
+
import { ComponentProps } from "react";
|
|
8
8
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
9
9
|
import { ColumnFiltersState, RowData } from "@tanstack/react-table";
|
|
10
10
|
|
|
@@ -474,4 +474,4 @@ declare const DataTable: <TData extends RowData, TFilter extends BaseFilterConfi
|
|
|
474
474
|
}: DataTableProps<TData, TFilter>) => _$react_jsx_runtime0.JSX.Element;
|
|
475
475
|
//#endregion
|
|
476
476
|
export { FloatingActionBarContainer as a, DataTableProps as i, DataTableContainer as n, DataTableControls as r, DataTable as t };
|
|
477
|
-
//# sourceMappingURL=DataTable-
|
|
477
|
+
//# sourceMappingURL=DataTable-Xt9cBYlh.d.mts.map
|
package/dist/DataTable.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FloatingActionBarContainer, i as DataTableProps, n as DataTableContainer, r as DataTableControls, t as DataTable } from "./DataTable-
|
|
1
|
+
import { a as FloatingActionBarContainer, i as DataTableProps, n as DataTableContainer, r as DataTableControls, t as DataTable } from "./DataTable-Xt9cBYlh.mjs";
|
|
2
2
|
export { DataTable, DataTable as default, DataTableContainer, DataTableControls, DataTableProps, FloatingActionBarContainer };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as styled, r as css } from "./styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
-
import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
|
|
3
|
-
import { t as Card_default } from "./Card-DuQHyroh.mjs";
|
|
4
|
-
import { withAlpha } from "./lib/color.mjs";
|
|
5
2
|
import { isDisabled, isFocused, isFocusedVisible, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
6
|
-
import {
|
|
3
|
+
import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
|
|
7
4
|
import { focusWithinOutline } from "./mixins/focus.mjs";
|
|
5
|
+
import { withAlpha } from "./lib/color.mjs";
|
|
8
6
|
import inputMixin from "./mixins/input.mjs";
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { t as Card_default } from "./Card-DuQHyroh.mjs";
|
|
8
|
+
import { Z_INDICES } from "./lib/zindex.mjs";
|
|
9
|
+
import { t as IconButton } from "./IconButton-kSjnfhWt.mjs";
|
|
10
|
+
import { t as ClearButton } from "./Input-BIHbRmmU.mjs";
|
|
11
|
+
import { c as MenuList, s as MenuItem } from "./Menu-DQPxDJ11.mjs";
|
|
12
|
+
import { s as Popover_default } from "./Popover-BMX-ff3L.mjs";
|
|
13
|
+
import { a as FormLabel } from "./FormControl--iW9afGv.mjs";
|
|
15
14
|
import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
|
|
15
|
+
import { forwardRef, memo, useCallback, useEffect, useRef, useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { DateTime, Settings } from "luxon";
|
|
18
18
|
import { ArrowLeftIcon, ArrowRightIcon, CircleXInverseIcon } from "@persona/icons";
|
|
@@ -1070,4 +1070,4 @@ const DatePicker = (props) => {
|
|
|
1070
1070
|
//#endregion
|
|
1071
1071
|
export { RangeCalendar as a, DateField as i, Calendar as n, DateRangePicker as r, DatePicker as t };
|
|
1072
1072
|
|
|
1073
|
-
//# sourceMappingURL=DatePicker-
|
|
1073
|
+
//# sourceMappingURL=DatePicker-CZsjaBO2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker-CHVYVKB-.mjs","names":["Card","RangeCalendarPresets","useLocale","OpenButton","Popover","Popover"],"sources":["../src/components/DatePicker/Calendar/CalendarBase.tsx","../src/components/DatePicker/Calendar/CalendarCell.tsx","../src/components/DatePicker/Calendar/CalendarGrid.tsx","../src/components/DatePicker/Calendar/RangeCalendarPresets.tsx","../src/components/DatePicker/common.ts","../src/components/DatePicker/time-range.ts","../src/components/DatePicker/Calendar/RangeCalendar.tsx","../src/components/DatePicker/DateField.tsx","../src/components/DatePicker/DateRangePicker.tsx","../src/components/DatePicker/Calendar/Calendar.tsx","../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useButton } from 'react-aria';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\n\nimport { IconButton } from '#src/components/Button';\nimport type { IconButtonProps } from '#src/components/Button/IconButton';\n\nexport const CalendarContainer = styled.div`\n display: inline-block;\n`;\n\nexport const CalendarHeader = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: ${Spacing[2]};\n`;\n\nexport const CalendarHeading = styled.div`\n ${Typography.TextLargeBold};\n flex: 1;\n text-align: center;\n`;\n\nconst StyledCalendarButton = styled(IconButton)`\n width: 32px;\n height: 32px;\n`;\n\nexport const CalendarButton = (props: IconButtonProps) => {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { buttonProps } = useButton(props, ref);\n\n return (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <StyledCalendarButton {...buttonProps} className={props.className} ref={ref}>\n {props.children}\n </StyledCalendarButton>\n );\n};\n","import { type CalendarDate, type DateValue, isSameDay, isSameMonth } from '@internationalized/date';\nimport { useRef } from 'react';\nimport { useCalendarCell } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Typography } from '@persona/design-tokens';\n\nimport { withAlpha } from '#src/lib/color';\nimport { semanticColor, semanticTokens } from '#src/lib/semanticColor';\n\nconst CalendarCellContainer = styled.td`\n text-align: center;\n width: 38px;\n height: 38px;\n padding: 0px;\n`;\n\ninterface CalendarCellButtonProps {\n isSelected?: boolean;\n isSelectionStart?: boolean;\n isSelectionEnd?: boolean;\n isInvalid?: boolean;\n isDisabled?: boolean;\n}\n\nconst CalendarCellButton = styled.button<CalendarCellButtonProps>`\n ${Typography.TextMedium};\n border-style: none;\n padding: 0;\n background: none;\n width: 100%;\n height: 100%;\n cursor: pointer;\n position: relative;\n color: ${({ theme }) => semanticColor(theme, 'FgPrimary', theme.color.text.primary)};\n\n ${({ isSelected, theme }) => {\n if (!isSelected) {\n return null;\n }\n const tokens = semanticTokens(theme);\n return css`\n background: ${tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : Color.CorePurple100};\n ${tokens ? `color: ${tokens.FgPrimary};` : ''}\n `;\n }}\n\n ${({ isSelectionStart, theme }) =>\n isSelectionStart &&\n css`\n background: ${semanticColor(theme, 'ActionPrimary', Color.BackgroundButtonPrimary)};\n color: ${semanticColor(theme, 'FgInverse', Color.TextInverse)};\n border-top-left-radius: ${BorderRadius.Sm};\n border-bottom-left-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isSelectionEnd, theme }) =>\n isSelectionEnd &&\n css`\n background: ${semanticColor(theme, 'ActionPrimary', Color.BackgroundButtonPrimary)};\n color: ${semanticColor(theme, 'FgInverse', Color.TextInverse)};\n border-top-right-radius: ${BorderRadius.Sm};\n border-bottom-right-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isDisabled, theme }) =>\n isDisabled &&\n css`\n color: ${semanticColor(theme, 'FgDisabled', Color.CoreSlate300)};\n `}\n\n ${({ isInvalid, theme }) =>\n isInvalid &&\n css`\n background: ${semanticColor(theme, 'FeedbackDanger4', Color.BackgroundButtonDanger)};\n color: ${semanticColor(theme, 'FgInverseStatic', Color.TextInverse)};\n `}\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: -2px;\n box-shadow: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', Color.PrimaryWhite)} 0px 0px 0px 3px inset;\n z-index: 1;\n }\n`;\n\ninterface CalendarCellProps {\n state: CalendarState | RangeCalendarState;\n date: CalendarDate;\n currentMonth: DateValue;\n}\n\nconst CalendarCell = ({ state, date, currentMonth }: CalendarCellProps) => {\n const ref = useRef();\n const { cellProps, buttonProps, isSelected, isInvalid, isDisabled, formattedDate } =\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n useCalendarCell({ date }, state, ref);\n\n const highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n\n const isOutsideMonth = !isSameMonth(currentMonth, date);\n const isSelectionStart = highlightedRange ? isSameDay(date, highlightedRange.start) : isSelected;\n const isSelectionEnd = highlightedRange ? isSameDay(date, highlightedRange.end) : isSelected;\n\n return (\n <CalendarCellContainer {...cellProps}>\n <CalendarCellButton\n {...buttonProps}\n hidden={isOutsideMonth}\n isSelected={isSelected}\n isSelectionStart={isSelectionStart}\n isSelectionEnd={isSelectionEnd}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {formattedDate}\n </CalendarCellButton>\n </CalendarCellContainer>\n );\n};\n\nexport default CalendarCell;\n","import { type DateDuration, endOfMonth, getWeeksInMonth } from '@internationalized/date';\nimport { useCalendarGrid, useLocale } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Color, Typography } from '@persona/design-tokens';\n\nimport { semanticColor } from '#src/lib/semanticColor';\n\nimport CalendarCell from './CalendarCell';\n\nconst CalendarGridContainer = styled.table`\n width: 266px;\n border-spacing: 0px;\n border-collapse: collapse;\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: 1px;\n }\n`;\n\nconst CalendarGridDayHeader = styled.th`\n ${Typography.TextMedium};\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.TextSecondary)};\n`;\n\ninterface CalendarGridProps {\n state: CalendarState | RangeCalendarState;\n offset?: DateDuration;\n skipFromTabOrder?: boolean;\n}\n\nconst CalendarGrid = ({ state, offset = {}, skipFromTabOrder = false }: CalendarGridProps) => {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n {\n startDate,\n endDate,\n },\n state,\n );\n\n const weeksInMonth = getWeeksInMonth(startDate, locale);\n\n // Remove second calendar grid from tab order - use arrow keys to navigate between months\n const modifiedGridProps = skipFromTabOrder ? { ...gridProps, tabIndex: -1 } : gridProps;\n\n return (\n <CalendarGridContainer {...modifiedGridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <CalendarGridDayHeader key={index}>{day}</CalendarGridDayHeader>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, i) =>\n date ? (\n <CalendarCell key={i} state={state} date={date} currentMonth={startDate} />\n ) : (\n <td key={i} />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </CalendarGridContainer>\n );\n};\n\nexport default CalendarGrid;\n","import {\n type CalendarDate,\n type DateValue,\n endOfMonth,\n endOfYear,\n startOfMonth,\n startOfYear,\n today,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { Settings } from 'luxon';\nimport { memo, useRef } from 'react';\nimport { mergeProps, useButton } from 'react-aria';\nimport type { RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { Color } from '@persona/design-tokens';\n\nimport { MenuItem, MenuList } from '#src/components/Menu';\nimport { isFocused, isHovered, isNotDisabled } from '#src/lib/pseudoClass';\nimport { semanticColor } from '#src/lib/semanticColor';\n\ninterface DateRangePreset {\n id: DateFilterPreset;\n label: string;\n range: RangeValue<CalendarDate>;\n}\n\n/** The preset windows the picker offers; the codec resolves the same ids on read. */\nexport const getDefaultPresets = (tz: string): DateRangePreset[] => {\n const now = today(tz);\n return [\n {\n id: 'last_7_days',\n label: 'Last 7 days',\n range: {\n start: now.subtract({ days: 7 }),\n end: now,\n },\n },\n {\n id: 'last_14_days',\n label: 'Last 14 days',\n range: {\n start: now.subtract({ days: 14 }),\n end: now,\n },\n },\n {\n id: 'last_30_days',\n label: 'Last 30 days',\n range: {\n start: now.subtract({ days: 30 }),\n end: now,\n },\n },\n {\n id: 'this_month',\n label: 'This month',\n range: {\n start: startOfMonth(now),\n // Effectively, this should always be today, since we can't look forward\n end: now,\n },\n },\n {\n id: 'last_month',\n label: 'Last month',\n range: {\n start: startOfMonth(now.subtract({ months: 1 })),\n end: endOfMonth(now.subtract({ months: 1 })),\n },\n },\n {\n id: 'this_year',\n label: 'This year',\n range: {\n start: startOfYear(now),\n end: now,\n },\n },\n {\n id: 'last_year',\n label: 'Last year',\n range: {\n start: startOfYear(now.subtract({ years: 1 })),\n end: endOfYear(now.subtract({ years: 1 })),\n },\n },\n ];\n};\n\n/**\n * Compare two date values by year/month/day only, ignoring time components.\n */\nconst datesMatchByDay = (a: CalendarDate, b: DateValue): boolean =>\n a.year === b.year && a.month === b.month && a.day === b.day;\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\ninterface PresetButtonProps {\n state: RangeCalendarState;\n preset: DateRangePreset;\n isSelected: boolean;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n commitRange: (value: RangeValue<DateValue>) => void;\n}\n\nconst StyledPresetButton = styled(MenuItem)`\n ${({ selected }) =>\n !selected &&\n css`\n &${isNotDisabled}${isHovered}, &${isNotDisabled}${isFocused} {\n background-color: transparent;\n }\n `}\n\n &:focus-visible {\n // MenuItems default to outline: none, so we need to override it here.\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)} !important;\n outline-offset: 1px;\n }\n`;\n\ninterface DateRangePickerPresetsProps {\n presetsFn?: (tz: string) => DateRangePreset[];\n state: RangeCalendarState;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n selectedPreset?: DateFilterPreset | null;\n commitRange: (value: RangeValue<DateValue>) => void;\n}\n\nconst PresetButton = ({\n commitRange,\n state,\n preset,\n isSelected,\n setDateMode,\n onPresetSelect,\n ...props\n}: PresetButtonProps) => {\n const ref = useRef<HTMLDivElement>();\n const { buttonProps } = useButton(\n {\n onPress: () => {\n const commit = () => commitRange(preset.range);\n\n if (onPresetSelect) {\n onPresetSelect(preset.id, commit);\n } else {\n commit();\n }\n setDateMode(null);\n },\n },\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref,\n );\n\n // Strip aria-current from useButton's props so it doesn't override MenuItem's.\n const { 'aria-current': _ariaCurrent, ...mergedProps } = mergeProps(props, buttonProps);\n\n return (\n <StyledPresetButton\n selected={isSelected}\n {...mergedProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {preset.label}\n </StyledPresetButton>\n );\n};\n\nconst DateRangePickerPresets = ({\n presetsFn = getDefaultPresets,\n commitRange,\n state,\n setDateMode,\n onPresetSelect,\n selectedPreset,\n ...props\n}: DateRangePickerPresetsProps) => {\n // The reason that we need to do this at render time is because the default timezone for moment is set after\n // the current User's timezone is loaded. Thus we woudln't be getting the right timezone unless if we defer getting\n // the timezone.\n const presets = presetsFn(Settings.defaultZone.name);\n\n // First match wins — prevents multiple presets appearing selected when ranges overlap.\n const { value } = state;\n const selectedPresetIndex = value\n ? presets.findIndex(\n (preset) =>\n datesMatchByDay(preset.range.start, value.start) &&\n datesMatchByDay(preset.range.end, value.end),\n )\n : -1;\n\n // `undefined` falls back to matching on dates; `null` is an explicit \"no preset\".\n const infersSelection = typeof selectedPreset === 'undefined';\n\n return (\n <Container {...props}>\n <MenuList aria-label='Date range presets'>\n {presets.map((preset, i) => (\n <PresetButton\n key={i}\n preset={preset}\n commitRange={commitRange}\n state={state}\n setDateMode={setDateMode}\n onPresetSelect={onPresetSelect}\n isSelected={infersSelection ? i === selectedPresetIndex : preset.id === selectedPreset}\n />\n ))}\n </MenuList>\n </Container>\n );\n};\n\n// Skips re-renders driven by calendar state the preset list does not read —\n// focus and hover updates fire on every pointer move during range selection.\nconst arePropsEqual = (\n prevProps: DateRangePickerPresetsProps,\n nextProps: DateRangePickerPresetsProps,\n) => {\n if (\n prevProps.selectedPreset !== nextProps.selectedPreset ||\n prevProps.onPresetSelect !== nextProps.onPresetSelect ||\n prevProps.commitRange !== nextProps.commitRange ||\n prevProps.setDateMode !== nextProps.setDateMode ||\n prevProps.presetsFn !== nextProps.presetsFn\n ) {\n return false;\n }\n\n const prevValue = prevProps.state.value;\n const nextValue = nextProps.state.value;\n\n if (!prevValue && !nextValue) {\n return true;\n }\n if (!prevValue || !nextValue) {\n return false;\n }\n\n return (\n prevValue.start.compare(nextValue.start) === 0 && prevValue.end.compare(nextValue.end) === 0\n );\n};\n\nexport default memo(DateRangePickerPresets, arePropsEqual);\n","import { GregorianCalendar } from '@internationalized/date';\n\nexport const createCalendar = () => new GregorianCalendar();\n","import { type CalendarDateTime, now, toCalendarDateTime } from '@internationalized/date';\nimport { Settings } from 'luxon';\n\nconst earliest = (a: CalendarDateTime, b: CalendarDateTime) => (a.compare(b) <= 0 ? a : b);\n\nexport const presetEnd = (end: CalendarDateTime) =>\n earliest(\n end.set({ hour: 23, minute: 59, second: 59, millisecond: 999 }),\n toCalendarDateTime(now(Settings.defaultZone.name)).set({ second: 0, millisecond: 0 }),\n );\n","import {\n type CalendarDate,\n type DateValue,\n toCalendarDateTime,\n toZoned,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { range } from 'lodash-es';\nimport { Settings } from 'luxon';\nimport { type Ref, useCallback, useEffect, useRef } from 'react';\nimport {\n type DateRange,\n type RangeCalendarProps as RangeCalendarBaseProps,\n useDateFormatter,\n useLocale,\n useRangeCalendar,\n VisuallyHidden,\n} from 'react-aria';\nimport { type RangeCalendarState, useRangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\n\nimport Card from '#src/components/Card';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from '#src/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from '#src/components/DatePicker/Calendar/CalendarGrid';\nimport RangeCalendarPresets from '#src/components/DatePicker/Calendar/RangeCalendarPresets';\nimport { createCalendar } from '#src/components/DatePicker/common';\nimport { presetEnd } from '#src/components/DatePicker/time-range';\nimport { semanticColor } from '#src/lib/semanticColor';\n\nconst RangeCalendarHeader = styled(CalendarHeader)`\n gap: ${Spacing[5]};\n`;\n\nconst CalendarHeaderMonth = styled.div`\n display: grid;\n grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);\n grid-template-areas: 'prev title next';\n width: 266px;\n align-items: center;\n`;\n\nconst CalendarGrids = styled.div`\n display: flex;\n gap: ${Spacing[5]};\n align-items: start;\n`;\n\nconst PrevButton = styled(CalendarButton)`\n grid-area: prev;\n justify-self: start;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst NextButton = styled(CalendarButton)`\n grid-area: next;\n justify-self: end;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst RangeCalendarHeading = styled(CalendarHeading)`\n grid-area: title;\n`;\n\nconst RangeCalendarContainer = styled.div`\n display: flex;\n`;\n\nconst PresetsContainer = styled(Card.Body)`\n border-right: 1px solid ${({ theme }) => semanticColor(theme, 'BorderDivider', Color.BorderHairline)};\n`;\n\nexport interface RangeCalendarProps extends RangeCalendarBaseProps<DateValue> {\n minDate?: RangeCalendarBaseProps<DateValue>['minValue'];\n maxDate?: RangeCalendarBaseProps<DateValue>['maxValue'];\n calendarRef?: Ref<HTMLDivElement>;\n hidePresets?: boolean;\n visibleMonths?: 1 | 2;\n onSelectDate?: (d: CalendarDate) => void;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n selectedPreset?: DateFilterPreset | null;\n /**\n * From setValue of DateRangePicker\n */\n setValue: (value: DateRange | null) => void;\n granularity: 'day' | 'hour' | 'minute' | 'second';\n}\n\nconst hasTimeComponent = (date: DateValue) => 'hour' in date;\n\nconst RangeCalendar = ({\n calendarRef,\n onSelectDate,\n minDate,\n maxDate,\n hidePresets,\n visibleMonths = 2,\n setDateMode,\n onPresetSelect,\n selectedPreset,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\n const { locale } = useLocale();\n // Must gather the TZ from the user's settings.\n const timezoneName = Settings.defaultZone.name;\n const rangeCalendarState = useRangeCalendarState({\n ...props,\n minValue: minDate,\n maxValue: maxDate,\n visibleDuration: {\n months: visibleMonths,\n },\n locale,\n createCalendar,\n });\n\n const state: RangeCalendarState = {\n ...rangeCalendarState,\n setValue: (value) => {\n if (!value || granularity === 'day') {\n rangeCalendarState.setValue(value);\n return;\n }\n\n setValue({\n start: toZoned(toCalendarDateTime(value.start), timezoneName),\n // A date-only end comes from a preset, where the end date is inclusive.\n end: toZoned(\n hasTimeComponent(value.end)\n ? toCalendarDateTime(value.end)\n : presetEnd(toCalendarDateTime(value.end)),\n timezoneName,\n ),\n });\n },\n selectDate: (date) => {\n if (onSelectDate) {\n onSelectDate(date);\n rangeCalendarState.setAnchorDate(null);\n } else {\n rangeCalendarState.selectDate(date);\n }\n },\n };\n\n // The preset list is memoized on its own props, so it can hold a `state` from\n // an earlier render. Committing through a ref keeps the write on the current\n // `onChange` chain instead of one the parent has already replaced.\n const commitRef = useRef(state.setValue);\n useEffect(() => {\n commitRef.current = state.setValue;\n });\n const commitRange = useCallback((value: RangeValue<DateValue>) => commitRef.current(value), []);\n\n const ref = useRef();\n\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { calendarProps, prevButtonProps, nextButtonProps } = useRangeCalendar(props, state, ref);\n\n const monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n timeZone: timezoneName,\n });\n\n const monthHeaders = range(0, visibleMonths).map((i) => {\n return (\n <CalendarHeaderMonth key={`calendar-month-${i}`}>\n {i === 0 && (\n <PrevButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </PrevButton>\n )}\n <RangeCalendarHeading aria-hidden>\n {monthDateFormatter.format(\n state.visibleRange.start.add({ months: i }).toDate(timezoneName),\n )}\n </RangeCalendarHeading>\n {i === visibleMonths - 1 && (\n <NextButton {...nextButtonProps}>\n <ArrowRightIcon />\n </NextButton>\n )}\n </CalendarHeaderMonth>\n );\n });\n\n const monthGrids = range(0, visibleMonths).map((i) => {\n return (\n <CalendarGrid\n key={`calendar-grid-${i}`}\n state={state}\n offset={{ months: i }}\n skipFromTabOrder={i > 0}\n />\n );\n });\n\n return (\n <RangeCalendarContainer ref={calendarRef}>\n {!hidePresets && (\n <PresetsContainer padding={Spacing[3]}>\n <RangeCalendarPresets\n state={state}\n commitRange={commitRange}\n setDateMode={setDateMode}\n onPresetSelect={onPresetSelect}\n selectedPreset={selectedPreset}\n />\n </PresetsContainer>\n )}\n <Card.Body padding={Spacing[3]}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <CalendarContainer {...calendarProps} ref={ref}>\n {/* Calendar header is separate from grid like this to facilitate a11y. */}\n <RangeCalendarHeader>\n <VisuallyHidden isFocusable={false}>{calendarProps['aria-label']}</VisuallyHidden>\n {monthHeaders}\n </RangeCalendarHeader>\n <CalendarGrids>{monthGrids}</CalendarGrids>\n </CalendarContainer>\n </Card.Body>\n </RangeCalendarContainer>\n );\n};\n\nexport default RangeCalendar;\n","import type { DateValue } from '@internationalized/date';\nimport { type AriaDateFieldProps, useDateField, useDateSegment } from '@react-aria/datepicker';\nimport { useLocale } from '@react-aria/i18n';\nimport { mergeRefs } from '@react-aria/utils';\nimport {\n type DateFieldState,\n type DateSegment as DateSegmentObj,\n type SegmentType,\n useDateFieldState,\n} from '@react-stately/datepicker';\nimport { forwardRef, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\n\nimport { createCalendar } from '#src/components/DatePicker/common';\nimport { withAlpha } from '#src/lib/color';\nimport { isFocused, isFocusedVisible, isNotDisabled } from '#src/lib/pseudoClass';\nimport { semanticColor, semanticOnly, semanticTokens } from '#src/lib/semanticColor';\nimport { focusWithinOutline } from '#src/mixins/focus';\nimport inputMixin, { type InputMixinProps, type InputSizes } from '#src/mixins/input';\nimport type PseudoClassProps from '#src/types/PseudoClassProps';\n\ntype DateSegmentContainerProps = { $isComma?: boolean; $isTimezone?: boolean } & PseudoClassProps;\nconst DateSegmentContainer = styled.div<DateSegmentContainerProps>`\n font-variant-numeric: tabular-nums;\n box-sizing: content-box;\n text-align: end;\n\n ${isFocused} {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: 1px;\n background-color: ${({ theme }) => {\n const tokens = semanticTokens(theme);\n return tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : Color.CorePurple200;\n }};\n ${semanticOnly((tokens) => `color: ${tokens.FgAccent};`)}\n }\n\n ${({ $isComma, $isTimezone }) =>\n ($isComma || $isTimezone) &&\n css`\n margin-left: 0.25ch;\n margin-right: 0.25ch;\n `}\n\n ${({ $isTimezone }) =>\n $isTimezone &&\n css`\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.TextSecondary)};\n pointer-events: none;\n\n &:focus {\n outline: none;\n background-color: transparent;\n }\n `}\n`;\n\ntype DateSegmentPlaceholderProps = { isPlaceholder?: boolean; type: SegmentType };\nconst DateSegmentPlaceholder = styled.span<DateSegmentPlaceholderProps>`\n display: block;\n width: 100%;\n pointer-events: none;\n\n &:focus {\n outline: none;\n }\n\n ${({ isPlaceholder }) =>\n isPlaceholder\n ? css`\n height: 100%;\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.tertiary)};\n `\n : css`\n visibility: hidden;\n height: 0;\n `}\n ${({ type }) =>\n type === 'literal' &&\n css`\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n `}\n ${({ type, isPlaceholder }) =>\n type === 'month' &&\n isPlaceholder &&\n css`\n width: 3ch;\n `}\n`;\n\ninterface DateSegmentProps {\n segment: DateSegmentObj;\n state: DateFieldState;\n}\n\nfunction DateSegment({ segment, state }: DateSegmentProps) {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n let minWidth: string;\n\n switch (segment.type) {\n case 'dayPeriod': {\n minWidth = '2.75ch';\n break;\n }\n default: {\n minWidth = `${segment.maxValue != null && String(segment.maxValue).length + 0.25}ch`;\n break;\n }\n }\n\n const isComma = segment.type === 'literal' && segment.text === ', ';\n const isTimezone = segment.type === 'timeZoneName';\n\n return (\n <DateSegmentContainer\n {...segmentProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n style={{\n ...segmentProps.style,\n minWidth,\n }}\n $isComma={isComma}\n $isTimezone={isTimezone}\n {...(isTimezone && { tabIndex: -1, role: 'presentation' })}\n >\n {/* Always reserve space for the placeholder, to prevent layout shift when editing. */}\n {segment.placeholder && (\n <DateSegmentPlaceholder\n aria-hidden='true'\n isPlaceholder={segment.isPlaceholder}\n type={segment.type}\n >\n {segment.placeholder}\n </DateSegmentPlaceholder>\n )}\n {segment.isPlaceholder ? '' : segment.text}\n </DateSegmentContainer>\n );\n}\n\nconst InputBox = styled.div<\n InputMixinProps & { $hasTimeZone: boolean; $inputPosition: 'start' | 'end' }\n>`\n ${inputMixin};\n display: flex;\n padding-left: ${Spacing[2]};\n padding-right: ${Spacing[2]};\n line-height: 1;\n position: relative;\n white-space: nowrap;\n\n ${({ $hasTimeZone }) =>\n $hasTimeZone &&\n css`\n width: auto;\n flex: 1 0 auto;\n `}\n\n &${isFocusedVisible}${isNotDisabled} {\n position: relative;\n z-index: 1;\n }\n\n ${focusWithinOutline}\n\n ${({ $inputPosition }) => {\n switch ($inputPosition) {\n case 'start': {\n return css`\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n `;\n }\n case 'end': {\n return css`\n margin-left: -1px;\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n `;\n }\n }\n }}\n`;\n\ninterface DateFieldProps extends AriaDateFieldProps<DateValue> {\n inputPosition?: 'start' | 'end';\n focused?: boolean;\n readOnly?: boolean;\n value?: DateValue;\n disabled?: boolean;\n size?: InputSizes;\n style?: React.CSSProperties;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n hasError?: boolean;\n}\n\nexport const DateField = forwardRef<HTMLDivElement, DateFieldProps>(function DateField(\n props: DateFieldProps,\n forwardedRef,\n) {\n const { locale } = useLocale();\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const ref = useRef<HTMLDivElement>();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { fieldProps } = useDateField(props, state, ref);\n\n return (\n <InputBox\n {...fieldProps}\n {...(props.dateFieldProps || {})}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={mergeRefs<HTMLDivElement>(ref, forwardedRef)}\n focused={props.focused}\n disabled={props.disabled}\n aria-label={props['aria-label']}\n $size={props.size ?? 'md'}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n $inputPosition={props.inputPosition}\n $hasTimeZone={state.segments.some((segment) => segment.type === 'timeZoneName')}\n hasError={props.hasError}\n >\n {state.segments.map((segment, i) => (\n <DateSegment key={i} segment={segment} state={state} />\n ))}\n </InputBox>\n );\n});\n\nexport default DateField;\n","import {\n CalendarDate,\n type CalendarDateTime,\n type DateValue,\n parseAbsolute,\n toCalendarDateTime,\n toZoned,\n} from '@internationalized/date';\nimport type { DateRangePickerProps as DateRangePickerBase } from '@react-types/datepicker';\nimport type { AriaLabelingProps, RangeValue } from '@react-types/shared';\nimport { DateTime, Settings } from 'luxon';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n mergeProps,\n useButton,\n useDateRangePicker,\n useFocusWithin,\n usePress,\n VisuallyHidden,\n} from 'react-aria';\nimport { useDateRangePickerState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\n\nimport RangeCalendar from '#src/components/DatePicker/Calendar/RangeCalendar';\nimport DateField from '#src/components/DatePicker/DateField';\nimport { presetEnd } from '#src/components/DatePicker/time-range';\nimport { FormLabel } from '#src/components/FormControl';\nimport { ClearButton } from '#src/components/Input';\nimport Popover from '#src/components/Popover';\nimport { isDisabled } from '#src/lib/pseudoClass';\nimport type { InputSizes } from '#src/mixins/input';\n\nconst DateRangeContainer = styled.div`\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst DateRangeInputs = styled.div<{ $wrapOnNarrow: boolean }>`\n display: flex;\n align-items: center;\n\n ${({ $wrapOnNarrow }) =>\n $wrapOnNarrow &&\n css`\n > div:first-child,\n > div:nth-child(2) {\n width: auto;\n flex: 1 0 auto;\n }\n\n /* Widest measured timezone field pair (556.5px) + 24px popover padding + 32px gutter, rounded up to the 4px grid. */\n @media (max-width: 616px) {\n flex-wrap: wrap;\n row-gap: ${Spacing[2]};\n\n > div:first-child,\n > div:nth-child(2) {\n border-radius: ${({ theme }) => theme.element.borderRadius};\n }\n\n > div:nth-child(2) {\n margin-left: 0;\n }\n }\n `}\n`;\n\nconst CustomFormLabel = styled(FormLabel)`\n margin-bottom: ${Spacing[2]};\n ${Typography.TextMediumBold};\n`;\n\nexport type DateRange = {\n startDate?: DateTime;\n endDate?: DateTime;\n};\n\nexport type DateFilterChange =\n | {\n source: 'preset';\n preset: DateFilterPreset;\n range: RangeValue<DateValue>;\n }\n | {\n source: 'calendar';\n range: RangeValue<DateValue> | null;\n }\n | {\n source: 'clear';\n };\n\n/**\n * `onChange` fires for controlled prop replay as well as user edits, so only the\n * code path that started a write can say what that write meant.\n */\ntype WriteOrigin =\n | { kind: 'interaction' }\n | { kind: 'sync' }\n | { kind: 'clear' }\n | { kind: 'preset'; preset: DateFilterPreset };\n\nexport interface DateRangePickerProps extends DateRangePickerBase<DateValue>, AriaLabelingProps {\n dateRange: DateRange;\n onChange: (range: RangeValue<DateValue> | null) => void;\n disabled?: boolean;\n size?: InputSizes;\n minDate?: DateValue;\n maxDate?: DateValue;\n label?: string | null;\n dataTest?: string;\n id?: string;\n hidePresets?: boolean;\n visibleMonths?: 1 | 2;\n className?: string;\n /**\n * Whether or not to display clear button\n */\n showClear?: boolean;\n /**\n * Called when the clear button is clicked/pressed\n */\n onClear?: () => void;\n /**\n * Additive notification of genuine user interactions. Never fires for\n * controlled prop synchronization. `onChange` is unaffected by this prop.\n */\n onDateFilterChange?: (change: DateFilterChange) => void;\n /** `undefined` infers from dates, `null` selects none, and an id selects that preset. */\n selectedPreset?: DateFilterPreset | null;\n /**\n * z-index of the calendar popover\n */\n calendarZIndex?: number;\n /**\n * Element that should contain the calendar portal.\n */\n portalContainer?: HTMLElement | null;\n}\n\nconst OpenButton = ({ onOpen, disabled }: { onOpen: () => void; disabled?: boolean }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n onPress: onOpen,\n },\n openCalBtnRef,\n );\n\n return (\n <button\n {...buttonProps}\n type='button'\n ref={openCalBtnRef}\n aria-label='Open calendar'\n tabIndex={-1}\n />\n );\n};\n\nconst ClearRangeButton = styled(ClearButton)`\n height: 16px;\n width: 16px;\n margin-left: ${Spacing[2]};\n\n &${isDisabled}, &:disabled {\n background-color: transparent;\n }\n`;\n\nconst DateRangePicker = ({\n granularity = 'day',\n hideTimeZone = true,\n className,\n calendarZIndex,\n portalContainer,\n onDateFilterChange,\n selectedPreset,\n ...props\n}: DateRangePickerProps) => {\n const wrapOnNarrow = granularity !== 'day' && !hideTimeZone;\n const writeOriginRef = useRef<WriteOrigin>({ kind: 'interaction' });\n const writeWithOrigin = useCallback((origin: WriteOrigin, commit: () => void) => {\n writeOriginRef.current = origin;\n try {\n commit();\n } finally {\n writeOriginRef.current = { kind: 'interaction' };\n }\n }, []);\n\n const state = useDateRangePickerState({\n granularity,\n hideTimeZone,\n ...props,\n onChange: (range) => {\n props.onChange(range);\n\n const origin = writeOriginRef.current;\n if (origin.kind === 'sync' || origin.kind === 'clear') {\n return;\n }\n if (origin.kind === 'preset' && range) {\n onDateFilterChange?.({ source: 'preset', preset: origin.preset, range });\n return;\n }\n onDateFilterChange?.({ source: 'calendar', range });\n },\n });\n const ref = useRef<HTMLDivElement>(null);\n const startFieldRef = useRef<HTMLDivElement>(null);\n const endFieldRef = useRef<HTMLDivElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [dateMode, setDateMode] = useState<'start' | 'end' | null>(null);\n // A ref, not state: focus can return to a field before a state update would commit.\n const isClosingRef = useRef(false);\n const { groupProps, startFieldProps, endFieldProps, calendarProps, labelProps } =\n useDateRangePicker({ granularity, hideTimeZone, ...props }, state, ref);\n\n const focusCalendar = useCallback(() => {\n requestAnimationFrame(() => {\n const firstFocusableCalendarElement = calendarRef.current?.querySelector<HTMLElement>(\n '[role=\"menuitem\"], button:not(:disabled), [tabindex=\"0\"]',\n );\n firstFocusableCalendarElement?.focus();\n });\n }, []);\n\n const openCalendar = useCallback(() => {\n if (!props.disabled && !state.isOpen && !isClosingRef.current) {\n state.setOpen(true);\n }\n }, [props.disabled, state]);\n\n const openCalendarWithFocus = useCallback(() => {\n openCalendar();\n focusCalendar();\n }, [focusCalendar, openCalendar]);\n\n const handlePresetSelect = useCallback(\n (preset: DateFilterPreset, commit: () => void) =>\n writeWithOrigin({ kind: 'preset', preset }, commit),\n [writeWithOrigin],\n );\n\n // Keyed on instants rather than the `DateTime` identities: a caller that parses\n // its range during render hands us new objects every commit, and syncing on that\n // would call `setValue` -> `onChange` -> re-render without end.\n const startInstant = props.dateRange.startDate?.isValid\n ? props.dateRange.startDate.toMillis()\n : undefined;\n const endInstant = props.dateRange.endDate?.isValid\n ? props.dateRange.endDate.toMillis()\n : undefined;\n\n useEffect(() => {\n // If not set, return early\n if (startInstant == null || endInstant == null) {\n return;\n }\n\n // Find out the real time by adjusting the date to the user's timezone\n const startDate = DateTime.fromMillis(startInstant).setZone(Settings.defaultZone);\n const endDate = DateTime.fromMillis(endInstant).setZone(Settings.defaultZone);\n\n if (!startDate.isValid || !endDate.isValid) {\n return;\n }\n\n // Months are 1-indexed, no translations need to happen to CalendarDates\n const startCalendar = state.hasTime\n ? parseAbsolute(startDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(startDate.year, startDate.month, startDate.day);\n const endCalendar = state.hasTime\n ? parseAbsolute(endDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(endDate.year, endDate.month, endDate.day);\n\n const dateRangeV2: RangeValue<DateValue> = {\n start: startCalendar,\n end: endCalendar,\n };\n\n writeWithOrigin({ kind: 'sync' }, () => state.setValue(dateRangeV2));\n }, [startInstant, endInstant, granularity]);\n\n // Auto-close overlay when a complete range is selected (e.g., from presets with time enabled)\n const prevValueRef = useRef<RangeValue<DateValue | null> | null>(state.value);\n // The first calendar click in time mode seeds a distinct end, which must not read as a finished range.\n const skipAutoCloseRef = useRef(false);\n useEffect(() => {\n const prevValue = prevValueRef.current;\n const currentValue = state.value;\n\n // Update ref for next comparison\n prevValueRef.current = currentValue;\n\n if (skipAutoCloseRef.current) {\n skipAutoCloseRef.current = false;\n return;\n }\n\n // Close overlay only if BOTH start and end changed simultaneously to DIFFERENT dates (e.g., preset selection)\n // Do not close during manual date selection where:\n // 1. Only one date changes at a time, OR\n // 2. Both dates are set to the same value (initial selection from empty state)\n // Use value comparison (.compare) instead of object identity to handle controlled component re-renders\n const startChanged =\n prevValue?.start && currentValue?.start\n ? prevValue.start.compare(currentValue.start) !== 0\n : prevValue?.start !== currentValue?.start;\n const endChanged =\n prevValue?.end && currentValue?.end\n ? prevValue.end.compare(currentValue.end) !== 0\n : prevValue?.end !== currentValue?.end;\n const datesAreDifferent =\n currentValue?.start &&\n currentValue?.end &&\n currentValue.start.compare(currentValue.end) !== 0;\n\n if (state.isOpen && startChanged && endChanged && datesAreDifferent) {\n state.setOpen(false);\n }\n }, [state.value, state.isOpen]);\n\n const { focusWithinProps: startFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('start');\n openCalendar();\n },\n });\n\n const { focusWithinProps: endFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('end');\n openCalendar();\n },\n });\n\n const { focusWithinProps: containerFocusProps } = useFocusWithin({\n onBlurWithin: () => {\n requestAnimationFrame(() => {\n // Wait for popover focus transitions to settle before closing.\n const activeElement = document.activeElement;\n const isFocusInDateRangeInput =\n activeElement instanceof Node && ref.current?.contains(activeElement);\n const isFocusInCalendar =\n activeElement instanceof Node && calendarRef.current?.contains(activeElement);\n\n if (isFocusInDateRangeInput || isFocusInCalendar) {\n return;\n }\n\n setDateMode(null);\n if (state.isOpen) {\n state.setOpen(false);\n }\n });\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date inputs themselves\n if (ref.current?.contains(target)) {\n return;\n }\n\n // When there's a click outside of the containers + calendars, reset the highlighted date\n // Only close the calendar if it's open\n // Note: Radix UI's onInteractOutside already ensures the interaction is outside the popover content\n if (state.isOpen) {\n setDateMode(null);\n state.setOpen(false);\n }\n };\n\n const { pressProps: pressClearProps } = usePress({\n onPress: () => {\n writeWithOrigin({ kind: 'clear' }, () => state.setValue(null));\n\n if (props.onClear) {\n props.onClear();\n }\n onDateFilterChange?.({ source: 'clear' });\n },\n });\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault(); // Prevent form submission\n openCalendarWithFocus();\n }\n },\n [openCalendarWithFocus],\n );\n\n const isValueNull = state.value && state.value.start == null && state.value.end == null;\n\n return (\n <DateRangeContainer data-test={props.dataTest} className={className}>\n {props.label && <CustomFormLabel {...labelProps}>{props.label}</CustomFormLabel>}\n <Popover\n open={state.isOpen}\n modal={false}\n portalProps={portalContainer ? { container: portalContainer } : undefined}\n contentProps={{\n align: 'start',\n 'aria-modal': true,\n 'aria-label': props['aria-label'] ?? undefined,\n onInteractOutside: handleOutsideClick,\n onOpenAutoFocus: (e: Event) => {\n // Field focus opens the calendar for editing, while Enter/Open calendar moves focus inside.\n e.preventDefault();\n },\n onEscapeKeyDown: () => {\n state.setOpen(false);\n // Restore focus to the date field for keyboard users\n if (dateMode) {\n const fieldRef = dateMode === 'start' ? startFieldRef : endFieldRef;\n const seg = fieldRef.current?.querySelector('[tabindex=\"0\"]');\n if (seg instanceof HTMLElement) {\n seg.focus();\n }\n }\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration — Escape handles its own above.\n e.preventDefault();\n isClosingRef.current = true;\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\n },\n noPadding: true,\n style: { zIndex: calendarZIndex },\n zIndex: calendarZIndex,\n }}\n >\n <Popover.Trigger asChild>\n <DateRangeInputs\n {...mergeProps(groupProps, containerFocusProps)}\n ref={ref}\n $wrapOnNarrow={wrapOnNarrow}\n >\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={startFieldRef}\n inputPosition='start'\n focused={dateMode === 'start'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(startFieldProps, startFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={endFieldRef}\n inputPosition='end'\n focused={dateMode === 'end'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(endFieldProps, endFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {props.showClear && (\n <ClearRangeButton\n {...pressClearProps}\n type='button'\n disabled={isValueNull}\n aria-label='Clear date range'\n >\n <CircleXInverseIcon />\n </ClearRangeButton>\n )}\n <VisuallyHidden>\n <OpenButton onOpen={openCalendarWithFocus} disabled={props.disabled} />\n </VisuallyHidden>\n </DateRangeInputs>\n </Popover.Trigger>\n <RangeCalendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n setDateMode={setDateMode}\n setValue={state.setValue}\n granularity={granularity}\n hidePresets={props.hidePresets}\n visibleMonths={props.visibleMonths}\n onPresetSelect={handlePresetSelect}\n selectedPreset={selectedPreset}\n onSelectDate={(dateVal) => {\n const capToMax = <T extends DateValue>(end: T): T => {\n if (!state.hasTime || !props.maxDate) {\n return end;\n }\n const max =\n 'hour' in props.maxDate\n ? toCalendarDateTime(props.maxDate)\n : toCalendarDateTime(props.maxDate).set({\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n });\n if (toCalendarDateTime(end).compare(max) <= 0) {\n return end;\n }\n return end.set({\n year: max.year,\n month: max.month,\n day: max.day,\n hour: max.hour,\n minute: max.minute,\n second: max.second,\n millisecond: max.millisecond,\n }) as T;\n };\n /**\n * Please use caution when editing the logic below.\n * It is specific to react-aria's date picker and can be brittle.\n */\n if (dateVal) {\n const calendarDate = state.hasTime ? toCalendarDateTime(dateVal) : dateVal;\n const date = state.hasTime\n ? toZoned(calendarDate as CalendarDateTime, Settings.defaultZone.name)\n : calendarDate;\n const seededEnd = state.hasTime\n ? presetEnd(calendarDate as CalendarDateTime)\n : calendarDate;\n const emptyRangeEndValue =\n seededEnd.compare(calendarDate) < 0\n ? (calendarDate as CalendarDateTime).set({\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n })\n : seededEnd;\n const emptyRangeEnd = capToMax(\n state.hasTime\n ? toZoned(emptyRangeEndValue as CalendarDateTime, Settings.defaultZone.name)\n : emptyRangeEndValue,\n );\n // Typed endpoints are unzoned; zone them so both fields render the timezone segment.\n const toViewerZone = (value: DateValue | null) =>\n state.hasTime && value ? toZoned(value, Settings.defaultZone.name) : value;\n const start = toViewerZone(state.value.start);\n const end = toViewerZone(state.value.end);\n\n if (dateMode === 'start') {\n // Handle a case where we've deleted both dates\n if (end == null && start == null) {\n skipAutoCloseRef.current = true;\n state.setValue({\n start: date,\n end: emptyRangeEnd,\n });\n }\n // If end becomes the start\n else if (end && date.compare(end) > 0) {\n state.setValue({\n start: end,\n end: capToMax(end.set(dateVal)), // Preserve time\n });\n } else {\n state.setValue({\n // if start is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n start: start == null ? date : start.set(dateVal),\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n\n end,\n });\n }\n setDateMode('end');\n } else {\n // Handle a case where we've deleted both dates\n if (end == null && start == null) {\n state.setValue({\n start: date,\n end: emptyRangeEnd,\n });\n }\n // If start becomes the end\n else if (start && date.compare(start) < 0) {\n state.setValue({\n start: start.set(dateVal),\n end: start,\n });\n } else {\n state.setValue({\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n start,\n // if end is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n end: capToMax(end == null ? date : end.set(dateVal)),\n });\n }\n // Close popover and keep focus on end field\n state.setOpen(false);\n }\n }\n }}\n minDate={props.minDate}\n maxDate={props.maxDate}\n />\n </Popover>\n </DateRangeContainer>\n );\n};\n\nexport default DateRangePicker;\n","import type { Ref } from 'react';\nimport { type AriaCalendarProps, type DateValue, useCalendar, useLocale } from 'react-aria';\nimport { useCalendarState } from 'react-stately';\n\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\n\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from '#src/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from '#src/components/DatePicker/Calendar/CalendarGrid';\nimport { createCalendar } from '#src/components/DatePicker/common';\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n calendarRef?: Ref<HTMLDivElement>;\n}\n\nconst Calendar = (props: CalendarProps) => {\n const { locale } = useLocale();\n const state = useCalendarState({ ...props, locale, createCalendar });\n const { calendarProps, prevButtonProps, nextButtonProps, title } = useCalendar(props, state);\n\n return (\n <CalendarContainer {...calendarProps} ref={props.calendarRef}>\n <CalendarHeader>\n <CalendarButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </CalendarButton>\n <CalendarHeading>{title}</CalendarHeading>\n <CalendarButton {...nextButtonProps}>\n <ArrowRightIcon />\n </CalendarButton>\n </CalendarHeader>\n <CalendarGrid state={state} />\n </CalendarContainer>\n );\n};\n\nexport default Calendar;\n","import type { DateValue } from '@internationalized/date';\nimport type { DatePickerProps as DatePickerBase } from '@react-types/datepicker';\nimport { type RefObject, useCallback, useRef } from 'react';\nimport { mergeProps, useButton, useDatePicker, useFocusWithin, VisuallyHidden } from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport Calendar from '#src/components/DatePicker/Calendar/Calendar';\nimport DateField from '#src/components/DatePicker/DateField';\nimport Popover from '#src/components/Popover';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport type { InputSizes } from '#src/mixins/input';\n\nexport interface DatePickerProps extends DatePickerBase<DateValue> {\n id?: string;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n disabled?: boolean;\n size?: InputSizes;\n useModalZIndex?: boolean;\n}\n\nconst OpenButton = ({ calendarRef }: { calendarRef: RefObject<HTMLElement> }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n onPress: () => {\n if (calendarRef.current) {\n (\n calendarRef.current.querySelector('button[aria-label=\"Previous\"]') as HTMLButtonElement\n ).focus();\n }\n },\n },\n openCalBtnRef,\n );\n\n return <button {...buttonProps} ref={openCalBtnRef} aria-label='Open calendar' />;\n};\n\nexport const DatePicker = (props: DatePickerProps) => {\n const state = useDatePickerState(props);\n const ref = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLDivElement>(null);\n const { groupProps, fieldProps, calendarProps } = useDatePicker(props, state, ref);\n const calendarRef = useRef<HTMLDivElement>(null);\n // A ref, not state: the close sequence focuses the field before a state update would commit.\n const isClosingRef = useRef(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosingRef.current) {\n state.setOpen(true);\n }\n },\n onBlurWithin: (e) => {\n // Close calendar if next target is not within the calendar\n if (e.relatedTarget && !calendarRef?.current?.contains(e.relatedTarget) && state.isOpen) {\n state.setOpen(false);\n }\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date input itself\n if (ref.current?.contains(target)) {\n return;\n }\n if (state.isOpen) {\n state.setOpen(false);\n }\n };\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' && !state.isOpen) {\n event.preventDefault();\n state.setOpen(true);\n }\n },\n [state],\n );\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column' }}>\n <Popover\n open={state.isOpen}\n modal={false}\n contentProps={{\n style: { zIndex: props.useModalZIndex ? Z_INDICES.modalDropdown : Z_INDICES.dropdown },\n align: 'start',\n 'aria-modal': true,\n onInteractOutside: handleOutsideClick,\n onEscapeKeyDown: () => {\n state.setOpen(false);\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration\n e.preventDefault();\n isClosingRef.current = true;\n\n // Manually restore focus to the date field\n if (fieldRef.current) {\n const firstEditableSegment = fieldRef.current.querySelector('[tabindex=\"0\"]');\n if (firstEditableSegment instanceof HTMLElement) {\n firstEditableSegment.focus();\n }\n }\n\n // Reset flag after focus is done\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\n },\n noPadding: true,\n }}\n >\n <Popover.Trigger asChild>\n <div\n {...mergeProps(groupProps, focusWithinProps)}\n ref={ref}\n style={{ display: 'flex', position: 'relative' }}\n >\n <DateField\n ref={fieldRef}\n id={props.id}\n dateFieldProps={props.dateFieldProps}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(fieldProps, { onKeyDown: handleKeyDown })}\n value={fieldProps.value ?? undefined}\n />\n <VisuallyHidden>\n <OpenButton calendarRef={calendarRef} />\n </VisuallyHidden>\n </div>\n </Popover.Trigger>\n <Calendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n id='calendar-popover'\n />\n </Popover>\n </div>\n );\n};\n\nexport default DatePicker;\n"],"mappings":";;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AAY;eAHlD,CAKE,oBAAC,WAAD;MACE,KAAK;MACL,IAAI,MAAM;MACV,gBAAgB,MAAM;MACtB,UAAU,MAAM;MAChB,MAAM,MAAM;MACZ,GAAI,WAAW,YAAY,EAAE,WAAW,eAAe,CAAC;MACxD,OAAO,WAAW,SAAS,KAAA;MAC3B,CAAA,EACF,oBAAC,gBAAD,EAAA,UACE,oBAAC,YAAD,EAAyB,aAAe,CAAA,EACzB,CAAA,CACb;;IACU,CAAA,EAClB,oBAAC,UAAD;IACQ,GAAG;IAAe,WAAW,KAAA;IACtB;IACb,IAAG;IACH,CAAA,CACM;;EACN,CAAA"}
|
|
1
|
+
{"version":3,"file":"DatePicker-CZsjaBO2.mjs","names":["Card","RangeCalendarPresets","useLocale","OpenButton","Popover","Popover"],"sources":["../src/components/DatePicker/Calendar/CalendarBase.tsx","../src/components/DatePicker/Calendar/CalendarCell.tsx","../src/components/DatePicker/Calendar/CalendarGrid.tsx","../src/components/DatePicker/Calendar/RangeCalendarPresets.tsx","../src/components/DatePicker/common.ts","../src/components/DatePicker/time-range.ts","../src/components/DatePicker/Calendar/RangeCalendar.tsx","../src/components/DatePicker/DateField.tsx","../src/components/DatePicker/DateRangePicker.tsx","../src/components/DatePicker/Calendar/Calendar.tsx","../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useButton } from 'react-aria';\nimport styled from 'styled-components';\n\nimport { Spacing, Typography } from '@persona/design-tokens';\n\nimport { IconButton } from '#src/components/Button';\nimport type { IconButtonProps } from '#src/components/Button/IconButton';\n\nexport const CalendarContainer = styled.div`\n display: inline-block;\n`;\n\nexport const CalendarHeader = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: ${Spacing[2]};\n`;\n\nexport const CalendarHeading = styled.div`\n ${Typography.TextLargeBold};\n flex: 1;\n text-align: center;\n`;\n\nconst StyledCalendarButton = styled(IconButton)`\n width: 32px;\n height: 32px;\n`;\n\nexport const CalendarButton = (props: IconButtonProps) => {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { buttonProps } = useButton(props, ref);\n\n return (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <StyledCalendarButton {...buttonProps} className={props.className} ref={ref}>\n {props.children}\n </StyledCalendarButton>\n );\n};\n","import { type CalendarDate, type DateValue, isSameDay, isSameMonth } from '@internationalized/date';\nimport { useRef } from 'react';\nimport { useCalendarCell } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Typography } from '@persona/design-tokens';\n\nimport { withAlpha } from '#src/lib/color';\nimport { semanticColor, semanticTokens } from '#src/lib/semanticColor';\n\nconst CalendarCellContainer = styled.td`\n text-align: center;\n width: 38px;\n height: 38px;\n padding: 0px;\n`;\n\ninterface CalendarCellButtonProps {\n isSelected?: boolean;\n isSelectionStart?: boolean;\n isSelectionEnd?: boolean;\n isInvalid?: boolean;\n isDisabled?: boolean;\n}\n\nconst CalendarCellButton = styled.button<CalendarCellButtonProps>`\n ${Typography.TextMedium};\n border-style: none;\n padding: 0;\n background: none;\n width: 100%;\n height: 100%;\n cursor: pointer;\n position: relative;\n color: ${({ theme }) => semanticColor(theme, 'FgPrimary', theme.color.text.primary)};\n\n ${({ isSelected, theme }) => {\n if (!isSelected) {\n return null;\n }\n const tokens = semanticTokens(theme);\n return css`\n background: ${tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : Color.CorePurple100};\n ${tokens ? `color: ${tokens.FgPrimary};` : ''}\n `;\n }}\n\n ${({ isSelectionStart, theme }) =>\n isSelectionStart &&\n css`\n background: ${semanticColor(theme, 'ActionPrimary', Color.BackgroundButtonPrimary)};\n color: ${semanticColor(theme, 'FgInverse', Color.TextInverse)};\n border-top-left-radius: ${BorderRadius.Sm};\n border-bottom-left-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isSelectionEnd, theme }) =>\n isSelectionEnd &&\n css`\n background: ${semanticColor(theme, 'ActionPrimary', Color.BackgroundButtonPrimary)};\n color: ${semanticColor(theme, 'FgInverse', Color.TextInverse)};\n border-top-right-radius: ${BorderRadius.Sm};\n border-bottom-right-radius: ${BorderRadius.Sm};\n `}\n\n ${({ isDisabled, theme }) =>\n isDisabled &&\n css`\n color: ${semanticColor(theme, 'FgDisabled', Color.CoreSlate300)};\n `}\n\n ${({ isInvalid, theme }) =>\n isInvalid &&\n css`\n background: ${semanticColor(theme, 'FeedbackDanger4', Color.BackgroundButtonDanger)};\n color: ${semanticColor(theme, 'FgInverseStatic', Color.TextInverse)};\n `}\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: -2px;\n box-shadow: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', Color.PrimaryWhite)} 0px 0px 0px 3px inset;\n z-index: 1;\n }\n`;\n\ninterface CalendarCellProps {\n state: CalendarState | RangeCalendarState;\n date: CalendarDate;\n currentMonth: DateValue;\n}\n\nconst CalendarCell = ({ state, date, currentMonth }: CalendarCellProps) => {\n const ref = useRef();\n const { cellProps, buttonProps, isSelected, isInvalid, isDisabled, formattedDate } =\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n useCalendarCell({ date }, state, ref);\n\n const highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n\n const isOutsideMonth = !isSameMonth(currentMonth, date);\n const isSelectionStart = highlightedRange ? isSameDay(date, highlightedRange.start) : isSelected;\n const isSelectionEnd = highlightedRange ? isSameDay(date, highlightedRange.end) : isSelected;\n\n return (\n <CalendarCellContainer {...cellProps}>\n <CalendarCellButton\n {...buttonProps}\n hidden={isOutsideMonth}\n isSelected={isSelected}\n isSelectionStart={isSelectionStart}\n isSelectionEnd={isSelectionEnd}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {formattedDate}\n </CalendarCellButton>\n </CalendarCellContainer>\n );\n};\n\nexport default CalendarCell;\n","import { type DateDuration, endOfMonth, getWeeksInMonth } from '@internationalized/date';\nimport { useCalendarGrid, useLocale } from 'react-aria';\nimport type { CalendarState, RangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport { Color, Typography } from '@persona/design-tokens';\n\nimport { semanticColor } from '#src/lib/semanticColor';\n\nimport CalendarCell from './CalendarCell';\n\nconst CalendarGridContainer = styled.table`\n width: 266px;\n border-spacing: 0px;\n border-collapse: collapse;\n\n &:focus-visible {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: 1px;\n }\n`;\n\nconst CalendarGridDayHeader = styled.th`\n ${Typography.TextMedium};\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.TextSecondary)};\n`;\n\ninterface CalendarGridProps {\n state: CalendarState | RangeCalendarState;\n offset?: DateDuration;\n skipFromTabOrder?: boolean;\n}\n\nconst CalendarGrid = ({ state, offset = {}, skipFromTabOrder = false }: CalendarGridProps) => {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n {\n startDate,\n endDate,\n },\n state,\n );\n\n const weeksInMonth = getWeeksInMonth(startDate, locale);\n\n // Remove second calendar grid from tab order - use arrow keys to navigate between months\n const modifiedGridProps = skipFromTabOrder ? { ...gridProps, tabIndex: -1 } : gridProps;\n\n return (\n <CalendarGridContainer {...modifiedGridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <CalendarGridDayHeader key={index}>{day}</CalendarGridDayHeader>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, i) =>\n date ? (\n <CalendarCell key={i} state={state} date={date} currentMonth={startDate} />\n ) : (\n <td key={i} />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </CalendarGridContainer>\n );\n};\n\nexport default CalendarGrid;\n","import {\n type CalendarDate,\n type DateValue,\n endOfMonth,\n endOfYear,\n startOfMonth,\n startOfYear,\n today,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { Settings } from 'luxon';\nimport { memo, useRef } from 'react';\nimport { mergeProps, useButton } from 'react-aria';\nimport type { RangeCalendarState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { Color } from '@persona/design-tokens';\n\nimport { MenuItem, MenuList } from '#src/components/Menu';\nimport { isFocused, isHovered, isNotDisabled } from '#src/lib/pseudoClass';\nimport { semanticColor } from '#src/lib/semanticColor';\n\ninterface DateRangePreset {\n id: DateFilterPreset;\n label: string;\n range: RangeValue<CalendarDate>;\n}\n\n/** The preset windows the picker offers; the codec resolves the same ids on read. */\nexport const getDefaultPresets = (tz: string): DateRangePreset[] => {\n const now = today(tz);\n return [\n {\n id: 'last_7_days',\n label: 'Last 7 days',\n range: {\n start: now.subtract({ days: 7 }),\n end: now,\n },\n },\n {\n id: 'last_14_days',\n label: 'Last 14 days',\n range: {\n start: now.subtract({ days: 14 }),\n end: now,\n },\n },\n {\n id: 'last_30_days',\n label: 'Last 30 days',\n range: {\n start: now.subtract({ days: 30 }),\n end: now,\n },\n },\n {\n id: 'this_month',\n label: 'This month',\n range: {\n start: startOfMonth(now),\n // Effectively, this should always be today, since we can't look forward\n end: now,\n },\n },\n {\n id: 'last_month',\n label: 'Last month',\n range: {\n start: startOfMonth(now.subtract({ months: 1 })),\n end: endOfMonth(now.subtract({ months: 1 })),\n },\n },\n {\n id: 'this_year',\n label: 'This year',\n range: {\n start: startOfYear(now),\n end: now,\n },\n },\n {\n id: 'last_year',\n label: 'Last year',\n range: {\n start: startOfYear(now.subtract({ years: 1 })),\n end: endOfYear(now.subtract({ years: 1 })),\n },\n },\n ];\n};\n\n/**\n * Compare two date values by year/month/day only, ignoring time components.\n */\nconst datesMatchByDay = (a: CalendarDate, b: DateValue): boolean =>\n a.year === b.year && a.month === b.month && a.day === b.day;\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\ninterface PresetButtonProps {\n state: RangeCalendarState;\n preset: DateRangePreset;\n isSelected: boolean;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n commitRange: (value: RangeValue<DateValue>) => void;\n}\n\nconst StyledPresetButton = styled(MenuItem)`\n ${({ selected }) =>\n !selected &&\n css`\n &${isNotDisabled}${isHovered}, &${isNotDisabled}${isFocused} {\n background-color: transparent;\n }\n `}\n\n &:focus-visible {\n // MenuItems default to outline: none, so we need to override it here.\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)} !important;\n outline-offset: 1px;\n }\n`;\n\ninterface DateRangePickerPresetsProps {\n presetsFn?: (tz: string) => DateRangePreset[];\n state: RangeCalendarState;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n selectedPreset?: DateFilterPreset | null;\n commitRange: (value: RangeValue<DateValue>) => void;\n}\n\nconst PresetButton = ({\n commitRange,\n state,\n preset,\n isSelected,\n setDateMode,\n onPresetSelect,\n ...props\n}: PresetButtonProps) => {\n const ref = useRef<HTMLDivElement>();\n const { buttonProps } = useButton(\n {\n onPress: () => {\n const commit = () => commitRange(preset.range);\n\n if (onPresetSelect) {\n onPresetSelect(preset.id, commit);\n } else {\n commit();\n }\n setDateMode(null);\n },\n },\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref,\n );\n\n // Strip aria-current from useButton's props so it doesn't override MenuItem's.\n const { 'aria-current': _ariaCurrent, ...mergedProps } = mergeProps(props, buttonProps);\n\n return (\n <StyledPresetButton\n selected={isSelected}\n {...mergedProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n >\n {preset.label}\n </StyledPresetButton>\n );\n};\n\nconst DateRangePickerPresets = ({\n presetsFn = getDefaultPresets,\n commitRange,\n state,\n setDateMode,\n onPresetSelect,\n selectedPreset,\n ...props\n}: DateRangePickerPresetsProps) => {\n // The reason that we need to do this at render time is because the default timezone for moment is set after\n // the current User's timezone is loaded. Thus we woudln't be getting the right timezone unless if we defer getting\n // the timezone.\n const presets = presetsFn(Settings.defaultZone.name);\n\n // First match wins — prevents multiple presets appearing selected when ranges overlap.\n const { value } = state;\n const selectedPresetIndex = value\n ? presets.findIndex(\n (preset) =>\n datesMatchByDay(preset.range.start, value.start) &&\n datesMatchByDay(preset.range.end, value.end),\n )\n : -1;\n\n // `undefined` falls back to matching on dates; `null` is an explicit \"no preset\".\n const infersSelection = typeof selectedPreset === 'undefined';\n\n return (\n <Container {...props}>\n <MenuList aria-label='Date range presets'>\n {presets.map((preset, i) => (\n <PresetButton\n key={i}\n preset={preset}\n commitRange={commitRange}\n state={state}\n setDateMode={setDateMode}\n onPresetSelect={onPresetSelect}\n isSelected={infersSelection ? i === selectedPresetIndex : preset.id === selectedPreset}\n />\n ))}\n </MenuList>\n </Container>\n );\n};\n\n// Skips re-renders driven by calendar state the preset list does not read —\n// focus and hover updates fire on every pointer move during range selection.\nconst arePropsEqual = (\n prevProps: DateRangePickerPresetsProps,\n nextProps: DateRangePickerPresetsProps,\n) => {\n if (\n prevProps.selectedPreset !== nextProps.selectedPreset ||\n prevProps.onPresetSelect !== nextProps.onPresetSelect ||\n prevProps.commitRange !== nextProps.commitRange ||\n prevProps.setDateMode !== nextProps.setDateMode ||\n prevProps.presetsFn !== nextProps.presetsFn\n ) {\n return false;\n }\n\n const prevValue = prevProps.state.value;\n const nextValue = nextProps.state.value;\n\n if (!prevValue && !nextValue) {\n return true;\n }\n if (!prevValue || !nextValue) {\n return false;\n }\n\n return (\n prevValue.start.compare(nextValue.start) === 0 && prevValue.end.compare(nextValue.end) === 0\n );\n};\n\nexport default memo(DateRangePickerPresets, arePropsEqual);\n","import { GregorianCalendar } from '@internationalized/date';\n\nexport const createCalendar = () => new GregorianCalendar();\n","import { type CalendarDateTime, now, toCalendarDateTime } from '@internationalized/date';\nimport { Settings } from 'luxon';\n\nconst earliest = (a: CalendarDateTime, b: CalendarDateTime) => (a.compare(b) <= 0 ? a : b);\n\nexport const presetEnd = (end: CalendarDateTime) =>\n earliest(\n end.set({ hour: 23, minute: 59, second: 59, millisecond: 999 }),\n toCalendarDateTime(now(Settings.defaultZone.name)).set({ second: 0, millisecond: 0 }),\n );\n","import {\n type CalendarDate,\n type DateValue,\n toCalendarDateTime,\n toZoned,\n} from '@internationalized/date';\nimport type { RangeValue } from '@react-types/shared';\nimport { range } from 'lodash-es';\nimport { Settings } from 'luxon';\nimport { type Ref, useCallback, useEffect, useRef } from 'react';\nimport {\n type DateRange,\n type RangeCalendarProps as RangeCalendarBaseProps,\n useDateFormatter,\n useLocale,\n useRangeCalendar,\n VisuallyHidden,\n} from 'react-aria';\nimport { type RangeCalendarState, useRangeCalendarState } from 'react-stately';\nimport styled from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\n\nimport Card from '#src/components/Card';\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from '#src/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from '#src/components/DatePicker/Calendar/CalendarGrid';\nimport RangeCalendarPresets from '#src/components/DatePicker/Calendar/RangeCalendarPresets';\nimport { createCalendar } from '#src/components/DatePicker/common';\nimport { presetEnd } from '#src/components/DatePicker/time-range';\nimport { semanticColor } from '#src/lib/semanticColor';\n\nconst RangeCalendarHeader = styled(CalendarHeader)`\n gap: ${Spacing[5]};\n`;\n\nconst CalendarHeaderMonth = styled.div`\n display: grid;\n grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);\n grid-template-areas: 'prev title next';\n width: 266px;\n align-items: center;\n`;\n\nconst CalendarGrids = styled.div`\n display: flex;\n gap: ${Spacing[5]};\n align-items: start;\n`;\n\nconst PrevButton = styled(CalendarButton)`\n grid-area: prev;\n justify-self: start;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst NextButton = styled(CalendarButton)`\n grid-area: next;\n justify-self: end;\n border-radius: ${BorderRadius.Sm};\n`;\n\nconst RangeCalendarHeading = styled(CalendarHeading)`\n grid-area: title;\n`;\n\nconst RangeCalendarContainer = styled.div`\n display: flex;\n`;\n\nconst PresetsContainer = styled(Card.Body)`\n border-right: 1px solid ${({ theme }) => semanticColor(theme, 'BorderDivider', Color.BorderHairline)};\n`;\n\nexport interface RangeCalendarProps extends RangeCalendarBaseProps<DateValue> {\n minDate?: RangeCalendarBaseProps<DateValue>['minValue'];\n maxDate?: RangeCalendarBaseProps<DateValue>['maxValue'];\n calendarRef?: Ref<HTMLDivElement>;\n hidePresets?: boolean;\n visibleMonths?: 1 | 2;\n onSelectDate?: (d: CalendarDate) => void;\n setDateMode: (mode: 'start' | 'end' | null) => void;\n onPresetSelect?: (preset: DateFilterPreset, commit: () => void) => void;\n selectedPreset?: DateFilterPreset | null;\n /**\n * From setValue of DateRangePicker\n */\n setValue: (value: DateRange | null) => void;\n granularity: 'day' | 'hour' | 'minute' | 'second';\n}\n\nconst hasTimeComponent = (date: DateValue) => 'hour' in date;\n\nconst RangeCalendar = ({\n calendarRef,\n onSelectDate,\n minDate,\n maxDate,\n hidePresets,\n visibleMonths = 2,\n setDateMode,\n onPresetSelect,\n selectedPreset,\n setValue,\n granularity,\n ...props\n}: RangeCalendarProps) => {\n const { locale } = useLocale();\n // Must gather the TZ from the user's settings.\n const timezoneName = Settings.defaultZone.name;\n const rangeCalendarState = useRangeCalendarState({\n ...props,\n minValue: minDate,\n maxValue: maxDate,\n visibleDuration: {\n months: visibleMonths,\n },\n locale,\n createCalendar,\n });\n\n const state: RangeCalendarState = {\n ...rangeCalendarState,\n setValue: (value) => {\n if (!value || granularity === 'day') {\n rangeCalendarState.setValue(value);\n return;\n }\n\n setValue({\n start: toZoned(toCalendarDateTime(value.start), timezoneName),\n // A date-only end comes from a preset, where the end date is inclusive.\n end: toZoned(\n hasTimeComponent(value.end)\n ? toCalendarDateTime(value.end)\n : presetEnd(toCalendarDateTime(value.end)),\n timezoneName,\n ),\n });\n },\n selectDate: (date) => {\n if (onSelectDate) {\n onSelectDate(date);\n rangeCalendarState.setAnchorDate(null);\n } else {\n rangeCalendarState.selectDate(date);\n }\n },\n };\n\n // The preset list is memoized on its own props, so it can hold a `state` from\n // an earlier render. Committing through a ref keeps the write on the current\n // `onChange` chain instead of one the parent has already replaced.\n const commitRef = useRef(state.setValue);\n useEffect(() => {\n commitRef.current = state.setValue;\n });\n const commitRange = useCallback((value: RangeValue<DateValue>) => commitRef.current(value), []);\n\n const ref = useRef();\n\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { calendarProps, prevButtonProps, nextButtonProps } = useRangeCalendar(props, state, ref);\n\n const monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n timeZone: timezoneName,\n });\n\n const monthHeaders = range(0, visibleMonths).map((i) => {\n return (\n <CalendarHeaderMonth key={`calendar-month-${i}`}>\n {i === 0 && (\n <PrevButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </PrevButton>\n )}\n <RangeCalendarHeading aria-hidden>\n {monthDateFormatter.format(\n state.visibleRange.start.add({ months: i }).toDate(timezoneName),\n )}\n </RangeCalendarHeading>\n {i === visibleMonths - 1 && (\n <NextButton {...nextButtonProps}>\n <ArrowRightIcon />\n </NextButton>\n )}\n </CalendarHeaderMonth>\n );\n });\n\n const monthGrids = range(0, visibleMonths).map((i) => {\n return (\n <CalendarGrid\n key={`calendar-grid-${i}`}\n state={state}\n offset={{ months: i }}\n skipFromTabOrder={i > 0}\n />\n );\n });\n\n return (\n <RangeCalendarContainer ref={calendarRef}>\n {!hidePresets && (\n <PresetsContainer padding={Spacing[3]}>\n <RangeCalendarPresets\n state={state}\n commitRange={commitRange}\n setDateMode={setDateMode}\n onPresetSelect={onPresetSelect}\n selectedPreset={selectedPreset}\n />\n </PresetsContainer>\n )}\n <Card.Body padding={Spacing[3]}>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <CalendarContainer {...calendarProps} ref={ref}>\n {/* Calendar header is separate from grid like this to facilitate a11y. */}\n <RangeCalendarHeader>\n <VisuallyHidden isFocusable={false}>{calendarProps['aria-label']}</VisuallyHidden>\n {monthHeaders}\n </RangeCalendarHeader>\n <CalendarGrids>{monthGrids}</CalendarGrids>\n </CalendarContainer>\n </Card.Body>\n </RangeCalendarContainer>\n );\n};\n\nexport default RangeCalendar;\n","import type { DateValue } from '@internationalized/date';\nimport { type AriaDateFieldProps, useDateField, useDateSegment } from '@react-aria/datepicker';\nimport { useLocale } from '@react-aria/i18n';\nimport { mergeRefs } from '@react-aria/utils';\nimport {\n type DateFieldState,\n type DateSegment as DateSegmentObj,\n type SegmentType,\n useDateFieldState,\n} from '@react-stately/datepicker';\nimport { forwardRef, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\n\nimport { createCalendar } from '#src/components/DatePicker/common';\nimport { withAlpha } from '#src/lib/color';\nimport { isFocused, isFocusedVisible, isNotDisabled } from '#src/lib/pseudoClass';\nimport { semanticColor, semanticOnly, semanticTokens } from '#src/lib/semanticColor';\nimport { focusWithinOutline } from '#src/mixins/focus';\nimport inputMixin, { type InputMixinProps, type InputSizes } from '#src/mixins/input';\nimport type PseudoClassProps from '#src/types/PseudoClassProps';\n\ntype DateSegmentContainerProps = { $isComma?: boolean; $isTimezone?: boolean } & PseudoClassProps;\nconst DateSegmentContainer = styled.div<DateSegmentContainerProps>`\n font-variant-numeric: tabular-nums;\n box-sizing: content-box;\n text-align: end;\n\n ${isFocused} {\n outline: 2px solid ${({ theme }) => semanticColor(theme, 'BorderFocus', Color.BorderFocus)};\n outline-offset: 1px;\n background-color: ${({ theme }) => {\n const tokens = semanticTokens(theme);\n return tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : Color.CorePurple200;\n }};\n ${semanticOnly((tokens) => `color: ${tokens.FgAccent};`)}\n }\n\n ${({ $isComma, $isTimezone }) =>\n ($isComma || $isTimezone) &&\n css`\n margin-left: 0.25ch;\n margin-right: 0.25ch;\n `}\n\n ${({ $isTimezone }) =>\n $isTimezone &&\n css`\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.TextSecondary)};\n pointer-events: none;\n\n &:focus {\n outline: none;\n background-color: transparent;\n }\n `}\n`;\n\ntype DateSegmentPlaceholderProps = { isPlaceholder?: boolean; type: SegmentType };\nconst DateSegmentPlaceholder = styled.span<DateSegmentPlaceholderProps>`\n display: block;\n width: 100%;\n pointer-events: none;\n\n &:focus {\n outline: none;\n }\n\n ${({ isPlaceholder }) =>\n isPlaceholder\n ? css`\n height: 100%;\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.tertiary)};\n `\n : css`\n visibility: hidden;\n height: 0;\n `}\n ${({ type }) =>\n type === 'literal' &&\n css`\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n `}\n ${({ type, isPlaceholder }) =>\n type === 'month' &&\n isPlaceholder &&\n css`\n width: 3ch;\n `}\n`;\n\ninterface DateSegmentProps {\n segment: DateSegmentObj;\n state: DateFieldState;\n}\n\nfunction DateSegment({ segment, state }: DateSegmentProps) {\n const ref = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n let minWidth: string;\n\n switch (segment.type) {\n case 'dayPeriod': {\n minWidth = '2.75ch';\n break;\n }\n default: {\n minWidth = `${segment.maxValue != null && String(segment.maxValue).length + 0.25}ch`;\n break;\n }\n }\n\n const isComma = segment.type === 'literal' && segment.text === ', ';\n const isTimezone = segment.type === 'timeZoneName';\n\n return (\n <DateSegmentContainer\n {...segmentProps}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={ref}\n style={{\n ...segmentProps.style,\n minWidth,\n }}\n $isComma={isComma}\n $isTimezone={isTimezone}\n {...(isTimezone && { tabIndex: -1, role: 'presentation' })}\n >\n {/* Always reserve space for the placeholder, to prevent layout shift when editing. */}\n {segment.placeholder && (\n <DateSegmentPlaceholder\n aria-hidden='true'\n isPlaceholder={segment.isPlaceholder}\n type={segment.type}\n >\n {segment.placeholder}\n </DateSegmentPlaceholder>\n )}\n {segment.isPlaceholder ? '' : segment.text}\n </DateSegmentContainer>\n );\n}\n\nconst InputBox = styled.div<\n InputMixinProps & { $hasTimeZone: boolean; $inputPosition: 'start' | 'end' }\n>`\n ${inputMixin};\n display: flex;\n padding-left: ${Spacing[2]};\n padding-right: ${Spacing[2]};\n line-height: 1;\n position: relative;\n white-space: nowrap;\n\n ${({ $hasTimeZone }) =>\n $hasTimeZone &&\n css`\n width: auto;\n flex: 1 0 auto;\n `}\n\n &${isFocusedVisible}${isNotDisabled} {\n position: relative;\n z-index: 1;\n }\n\n ${focusWithinOutline}\n\n ${({ $inputPosition }) => {\n switch ($inputPosition) {\n case 'start': {\n return css`\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n `;\n }\n case 'end': {\n return css`\n margin-left: -1px;\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n `;\n }\n }\n }}\n`;\n\ninterface DateFieldProps extends AriaDateFieldProps<DateValue> {\n inputPosition?: 'start' | 'end';\n focused?: boolean;\n readOnly?: boolean;\n value?: DateValue;\n disabled?: boolean;\n size?: InputSizes;\n style?: React.CSSProperties;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n hasError?: boolean;\n}\n\nexport const DateField = forwardRef<HTMLDivElement, DateFieldProps>(function DateField(\n props: DateFieldProps,\n forwardedRef,\n) {\n const { locale } = useLocale();\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const ref = useRef<HTMLDivElement>();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const { fieldProps } = useDateField(props, state, ref);\n\n return (\n <InputBox\n {...fieldProps}\n {...(props.dateFieldProps || {})}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n ref={mergeRefs<HTMLDivElement>(ref, forwardedRef)}\n focused={props.focused}\n disabled={props.disabled}\n aria-label={props['aria-label']}\n $size={props.size ?? 'md'}\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n $inputPosition={props.inputPosition}\n $hasTimeZone={state.segments.some((segment) => segment.type === 'timeZoneName')}\n hasError={props.hasError}\n >\n {state.segments.map((segment, i) => (\n <DateSegment key={i} segment={segment} state={state} />\n ))}\n </InputBox>\n );\n});\n\nexport default DateField;\n","import {\n CalendarDate,\n type CalendarDateTime,\n type DateValue,\n parseAbsolute,\n toCalendarDateTime,\n toZoned,\n} from '@internationalized/date';\nimport type { DateRangePickerProps as DateRangePickerBase } from '@react-types/datepicker';\nimport type { AriaLabelingProps, RangeValue } from '@react-types/shared';\nimport { DateTime, Settings } from 'luxon';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n mergeProps,\n useButton,\n useDateRangePicker,\n useFocusWithin,\n usePress,\n VisuallyHidden,\n} from 'react-aria';\nimport { useDateRangePickerState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport type { DateFilterPreset } from '@persona/design-system/lib/date-filter';\nimport { Spacing, Typography } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\n\nimport RangeCalendar from '#src/components/DatePicker/Calendar/RangeCalendar';\nimport DateField from '#src/components/DatePicker/DateField';\nimport { presetEnd } from '#src/components/DatePicker/time-range';\nimport { FormLabel } from '#src/components/FormControl';\nimport { ClearButton } from '#src/components/Input';\nimport Popover from '#src/components/Popover';\nimport { isDisabled } from '#src/lib/pseudoClass';\nimport type { InputSizes } from '#src/mixins/input';\n\nconst DateRangeContainer = styled.div`\n display: inline-flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst DateRangeInputs = styled.div<{ $wrapOnNarrow: boolean }>`\n display: flex;\n align-items: center;\n\n ${({ $wrapOnNarrow }) =>\n $wrapOnNarrow &&\n css`\n > div:first-child,\n > div:nth-child(2) {\n width: auto;\n flex: 1 0 auto;\n }\n\n /* Widest measured timezone field pair (556.5px) + 24px popover padding + 32px gutter, rounded up to the 4px grid. */\n @media (max-width: 616px) {\n flex-wrap: wrap;\n row-gap: ${Spacing[2]};\n\n > div:first-child,\n > div:nth-child(2) {\n border-radius: ${({ theme }) => theme.element.borderRadius};\n }\n\n > div:nth-child(2) {\n margin-left: 0;\n }\n }\n `}\n`;\n\nconst CustomFormLabel = styled(FormLabel)`\n margin-bottom: ${Spacing[2]};\n ${Typography.TextMediumBold};\n`;\n\nexport type DateRange = {\n startDate?: DateTime;\n endDate?: DateTime;\n};\n\nexport type DateFilterChange =\n | {\n source: 'preset';\n preset: DateFilterPreset;\n range: RangeValue<DateValue>;\n }\n | {\n source: 'calendar';\n range: RangeValue<DateValue> | null;\n }\n | {\n source: 'clear';\n };\n\n/**\n * `onChange` fires for controlled prop replay as well as user edits, so only the\n * code path that started a write can say what that write meant.\n */\ntype WriteOrigin =\n | { kind: 'interaction' }\n | { kind: 'sync' }\n | { kind: 'clear' }\n | { kind: 'preset'; preset: DateFilterPreset };\n\nexport interface DateRangePickerProps extends DateRangePickerBase<DateValue>, AriaLabelingProps {\n dateRange: DateRange;\n onChange: (range: RangeValue<DateValue> | null) => void;\n disabled?: boolean;\n size?: InputSizes;\n minDate?: DateValue;\n maxDate?: DateValue;\n label?: string | null;\n dataTest?: string;\n id?: string;\n hidePresets?: boolean;\n visibleMonths?: 1 | 2;\n className?: string;\n /**\n * Whether or not to display clear button\n */\n showClear?: boolean;\n /**\n * Called when the clear button is clicked/pressed\n */\n onClear?: () => void;\n /**\n * Additive notification of genuine user interactions. Never fires for\n * controlled prop synchronization. `onChange` is unaffected by this prop.\n */\n onDateFilterChange?: (change: DateFilterChange) => void;\n /** `undefined` infers from dates, `null` selects none, and an id selects that preset. */\n selectedPreset?: DateFilterPreset | null;\n /**\n * z-index of the calendar popover\n */\n calendarZIndex?: number;\n /**\n * Element that should contain the calendar portal.\n */\n portalContainer?: HTMLElement | null;\n}\n\nconst OpenButton = ({ onOpen, disabled }: { onOpen: () => void; disabled?: boolean }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n isDisabled: disabled,\n onPress: onOpen,\n },\n openCalBtnRef,\n );\n\n return (\n <button\n {...buttonProps}\n type='button'\n ref={openCalBtnRef}\n aria-label='Open calendar'\n tabIndex={-1}\n />\n );\n};\n\nconst ClearRangeButton = styled(ClearButton)`\n height: 16px;\n width: 16px;\n margin-left: ${Spacing[2]};\n\n &${isDisabled}, &:disabled {\n background-color: transparent;\n }\n`;\n\nconst DateRangePicker = ({\n granularity = 'day',\n hideTimeZone = true,\n className,\n calendarZIndex,\n portalContainer,\n onDateFilterChange,\n selectedPreset,\n ...props\n}: DateRangePickerProps) => {\n const wrapOnNarrow = granularity !== 'day' && !hideTimeZone;\n const writeOriginRef = useRef<WriteOrigin>({ kind: 'interaction' });\n const writeWithOrigin = useCallback((origin: WriteOrigin, commit: () => void) => {\n writeOriginRef.current = origin;\n try {\n commit();\n } finally {\n writeOriginRef.current = { kind: 'interaction' };\n }\n }, []);\n\n const state = useDateRangePickerState({\n granularity,\n hideTimeZone,\n ...props,\n onChange: (range) => {\n props.onChange(range);\n\n const origin = writeOriginRef.current;\n if (origin.kind === 'sync' || origin.kind === 'clear') {\n return;\n }\n if (origin.kind === 'preset' && range) {\n onDateFilterChange?.({ source: 'preset', preset: origin.preset, range });\n return;\n }\n onDateFilterChange?.({ source: 'calendar', range });\n },\n });\n const ref = useRef<HTMLDivElement>(null);\n const startFieldRef = useRef<HTMLDivElement>(null);\n const endFieldRef = useRef<HTMLDivElement>(null);\n const calendarRef = useRef<HTMLDivElement>(null);\n const [dateMode, setDateMode] = useState<'start' | 'end' | null>(null);\n // A ref, not state: focus can return to a field before a state update would commit.\n const isClosingRef = useRef(false);\n const { groupProps, startFieldProps, endFieldProps, calendarProps, labelProps } =\n useDateRangePicker({ granularity, hideTimeZone, ...props }, state, ref);\n\n const focusCalendar = useCallback(() => {\n requestAnimationFrame(() => {\n const firstFocusableCalendarElement = calendarRef.current?.querySelector<HTMLElement>(\n '[role=\"menuitem\"], button:not(:disabled), [tabindex=\"0\"]',\n );\n firstFocusableCalendarElement?.focus();\n });\n }, []);\n\n const openCalendar = useCallback(() => {\n if (!props.disabled && !state.isOpen && !isClosingRef.current) {\n state.setOpen(true);\n }\n }, [props.disabled, state]);\n\n const openCalendarWithFocus = useCallback(() => {\n openCalendar();\n focusCalendar();\n }, [focusCalendar, openCalendar]);\n\n const handlePresetSelect = useCallback(\n (preset: DateFilterPreset, commit: () => void) =>\n writeWithOrigin({ kind: 'preset', preset }, commit),\n [writeWithOrigin],\n );\n\n // Keyed on instants rather than the `DateTime` identities: a caller that parses\n // its range during render hands us new objects every commit, and syncing on that\n // would call `setValue` -> `onChange` -> re-render without end.\n const startInstant = props.dateRange.startDate?.isValid\n ? props.dateRange.startDate.toMillis()\n : undefined;\n const endInstant = props.dateRange.endDate?.isValid\n ? props.dateRange.endDate.toMillis()\n : undefined;\n\n useEffect(() => {\n // If not set, return early\n if (startInstant == null || endInstant == null) {\n return;\n }\n\n // Find out the real time by adjusting the date to the user's timezone\n const startDate = DateTime.fromMillis(startInstant).setZone(Settings.defaultZone);\n const endDate = DateTime.fromMillis(endInstant).setZone(Settings.defaultZone);\n\n if (!startDate.isValid || !endDate.isValid) {\n return;\n }\n\n // Months are 1-indexed, no translations need to happen to CalendarDates\n const startCalendar = state.hasTime\n ? parseAbsolute(startDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(startDate.year, startDate.month, startDate.day);\n const endCalendar = state.hasTime\n ? parseAbsolute(endDate.toISO(), Settings.defaultZone.name)\n : new CalendarDate(endDate.year, endDate.month, endDate.day);\n\n const dateRangeV2: RangeValue<DateValue> = {\n start: startCalendar,\n end: endCalendar,\n };\n\n writeWithOrigin({ kind: 'sync' }, () => state.setValue(dateRangeV2));\n }, [startInstant, endInstant, granularity]);\n\n // Auto-close overlay when a complete range is selected (e.g., from presets with time enabled)\n const prevValueRef = useRef<RangeValue<DateValue | null> | null>(state.value);\n // The first calendar click in time mode seeds a distinct end, which must not read as a finished range.\n const skipAutoCloseRef = useRef(false);\n useEffect(() => {\n const prevValue = prevValueRef.current;\n const currentValue = state.value;\n\n // Update ref for next comparison\n prevValueRef.current = currentValue;\n\n if (skipAutoCloseRef.current) {\n skipAutoCloseRef.current = false;\n return;\n }\n\n // Close overlay only if BOTH start and end changed simultaneously to DIFFERENT dates (e.g., preset selection)\n // Do not close during manual date selection where:\n // 1. Only one date changes at a time, OR\n // 2. Both dates are set to the same value (initial selection from empty state)\n // Use value comparison (.compare) instead of object identity to handle controlled component re-renders\n const startChanged =\n prevValue?.start && currentValue?.start\n ? prevValue.start.compare(currentValue.start) !== 0\n : prevValue?.start !== currentValue?.start;\n const endChanged =\n prevValue?.end && currentValue?.end\n ? prevValue.end.compare(currentValue.end) !== 0\n : prevValue?.end !== currentValue?.end;\n const datesAreDifferent =\n currentValue?.start &&\n currentValue?.end &&\n currentValue.start.compare(currentValue.end) !== 0;\n\n if (state.isOpen && startChanged && endChanged && datesAreDifferent) {\n state.setOpen(false);\n }\n }, [state.value, state.isOpen]);\n\n const { focusWithinProps: startFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('start');\n openCalendar();\n },\n });\n\n const { focusWithinProps: endFocusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n setDateMode('end');\n openCalendar();\n },\n });\n\n const { focusWithinProps: containerFocusProps } = useFocusWithin({\n onBlurWithin: () => {\n requestAnimationFrame(() => {\n // Wait for popover focus transitions to settle before closing.\n const activeElement = document.activeElement;\n const isFocusInDateRangeInput =\n activeElement instanceof Node && ref.current?.contains(activeElement);\n const isFocusInCalendar =\n activeElement instanceof Node && calendarRef.current?.contains(activeElement);\n\n if (isFocusInDateRangeInput || isFocusInCalendar) {\n return;\n }\n\n setDateMode(null);\n if (state.isOpen) {\n state.setOpen(false);\n }\n });\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date inputs themselves\n if (ref.current?.contains(target)) {\n return;\n }\n\n // When there's a click outside of the containers + calendars, reset the highlighted date\n // Only close the calendar if it's open\n // Note: Radix UI's onInteractOutside already ensures the interaction is outside the popover content\n if (state.isOpen) {\n setDateMode(null);\n state.setOpen(false);\n }\n };\n\n const { pressProps: pressClearProps } = usePress({\n onPress: () => {\n writeWithOrigin({ kind: 'clear' }, () => state.setValue(null));\n\n if (props.onClear) {\n props.onClear();\n }\n onDateFilterChange?.({ source: 'clear' });\n },\n });\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault(); // Prevent form submission\n openCalendarWithFocus();\n }\n },\n [openCalendarWithFocus],\n );\n\n const isValueNull = state.value && state.value.start == null && state.value.end == null;\n\n return (\n <DateRangeContainer data-test={props.dataTest} className={className}>\n {props.label && <CustomFormLabel {...labelProps}>{props.label}</CustomFormLabel>}\n <Popover\n open={state.isOpen}\n modal={false}\n portalProps={portalContainer ? { container: portalContainer } : undefined}\n contentProps={{\n align: 'start',\n 'aria-modal': true,\n 'aria-label': props['aria-label'] ?? undefined,\n onInteractOutside: handleOutsideClick,\n onOpenAutoFocus: (e: Event) => {\n // Field focus opens the calendar for editing, while Enter/Open calendar moves focus inside.\n e.preventDefault();\n },\n onEscapeKeyDown: () => {\n state.setOpen(false);\n // Restore focus to the date field for keyboard users\n if (dateMode) {\n const fieldRef = dateMode === 'start' ? startFieldRef : endFieldRef;\n const seg = fieldRef.current?.querySelector('[tabindex=\"0\"]');\n if (seg instanceof HTMLElement) {\n seg.focus();\n }\n }\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration — Escape handles its own above.\n e.preventDefault();\n isClosingRef.current = true;\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\n },\n noPadding: true,\n style: { zIndex: calendarZIndex },\n zIndex: calendarZIndex,\n }}\n >\n <Popover.Trigger asChild>\n <DateRangeInputs\n {...mergeProps(groupProps, containerFocusProps)}\n ref={ref}\n $wrapOnNarrow={wrapOnNarrow}\n >\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={startFieldRef}\n inputPosition='start'\n focused={dateMode === 'start'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(startFieldProps, startFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <DateField\n ref={endFieldRef}\n inputPosition='end'\n focused={dateMode === 'end'}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(endFieldProps, endFocusWithinProps, { onKeyDown: handleKeyDown })}\n />\n {props.showClear && (\n <ClearRangeButton\n {...pressClearProps}\n type='button'\n disabled={isValueNull}\n aria-label='Clear date range'\n >\n <CircleXInverseIcon />\n </ClearRangeButton>\n )}\n <VisuallyHidden>\n <OpenButton onOpen={openCalendarWithFocus} disabled={props.disabled} />\n </VisuallyHidden>\n </DateRangeInputs>\n </Popover.Trigger>\n <RangeCalendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n setDateMode={setDateMode}\n setValue={state.setValue}\n granularity={granularity}\n hidePresets={props.hidePresets}\n visibleMonths={props.visibleMonths}\n onPresetSelect={handlePresetSelect}\n selectedPreset={selectedPreset}\n onSelectDate={(dateVal) => {\n const capToMax = <T extends DateValue>(end: T): T => {\n if (!state.hasTime || !props.maxDate) {\n return end;\n }\n const max =\n 'hour' in props.maxDate\n ? toCalendarDateTime(props.maxDate)\n : toCalendarDateTime(props.maxDate).set({\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n });\n if (toCalendarDateTime(end).compare(max) <= 0) {\n return end;\n }\n return end.set({\n year: max.year,\n month: max.month,\n day: max.day,\n hour: max.hour,\n minute: max.minute,\n second: max.second,\n millisecond: max.millisecond,\n }) as T;\n };\n /**\n * Please use caution when editing the logic below.\n * It is specific to react-aria's date picker and can be brittle.\n */\n if (dateVal) {\n const calendarDate = state.hasTime ? toCalendarDateTime(dateVal) : dateVal;\n const date = state.hasTime\n ? toZoned(calendarDate as CalendarDateTime, Settings.defaultZone.name)\n : calendarDate;\n const seededEnd = state.hasTime\n ? presetEnd(calendarDate as CalendarDateTime)\n : calendarDate;\n const emptyRangeEndValue =\n seededEnd.compare(calendarDate) < 0\n ? (calendarDate as CalendarDateTime).set({\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n })\n : seededEnd;\n const emptyRangeEnd = capToMax(\n state.hasTime\n ? toZoned(emptyRangeEndValue as CalendarDateTime, Settings.defaultZone.name)\n : emptyRangeEndValue,\n );\n // Typed endpoints are unzoned; zone them so both fields render the timezone segment.\n const toViewerZone = (value: DateValue | null) =>\n state.hasTime && value ? toZoned(value, Settings.defaultZone.name) : value;\n const start = toViewerZone(state.value.start);\n const end = toViewerZone(state.value.end);\n\n if (dateMode === 'start') {\n // Handle a case where we've deleted both dates\n if (end == null && start == null) {\n skipAutoCloseRef.current = true;\n state.setValue({\n start: date,\n end: emptyRangeEnd,\n });\n }\n // If end becomes the start\n else if (end && date.compare(end) > 0) {\n state.setValue({\n start: end,\n end: capToMax(end.set(dateVal)), // Preserve time\n });\n } else {\n state.setValue({\n // if start is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n start: start == null ? date : start.set(dateVal),\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n\n end,\n });\n }\n setDateMode('end');\n } else {\n // Handle a case where we've deleted both dates\n if (end == null && start == null) {\n state.setValue({\n start: date,\n end: emptyRangeEnd,\n });\n }\n // If start becomes the end\n else if (start && date.compare(start) < 0) {\n state.setValue({\n start: start.set(dateVal),\n end: start,\n });\n } else {\n state.setValue({\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n start,\n // if end is not set, set it to the date or date + time value, otherwise set the dateVal to preserve time\n end: capToMax(end == null ? date : end.set(dateVal)),\n });\n }\n // Close popover and keep focus on end field\n state.setOpen(false);\n }\n }\n }}\n minDate={props.minDate}\n maxDate={props.maxDate}\n />\n </Popover>\n </DateRangeContainer>\n );\n};\n\nexport default DateRangePicker;\n","import type { Ref } from 'react';\nimport { type AriaCalendarProps, type DateValue, useCalendar, useLocale } from 'react-aria';\nimport { useCalendarState } from 'react-stately';\n\nimport { ArrowLeftIcon, ArrowRightIcon } from '@persona/icons';\n\nimport {\n CalendarButton,\n CalendarContainer,\n CalendarHeader,\n CalendarHeading,\n} from '#src/components/DatePicker/Calendar/CalendarBase';\nimport CalendarGrid from '#src/components/DatePicker/Calendar/CalendarGrid';\nimport { createCalendar } from '#src/components/DatePicker/common';\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n calendarRef?: Ref<HTMLDivElement>;\n}\n\nconst Calendar = (props: CalendarProps) => {\n const { locale } = useLocale();\n const state = useCalendarState({ ...props, locale, createCalendar });\n const { calendarProps, prevButtonProps, nextButtonProps, title } = useCalendar(props, state);\n\n return (\n <CalendarContainer {...calendarProps} ref={props.calendarRef}>\n <CalendarHeader>\n <CalendarButton {...prevButtonProps}>\n <ArrowLeftIcon />\n </CalendarButton>\n <CalendarHeading>{title}</CalendarHeading>\n <CalendarButton {...nextButtonProps}>\n <ArrowRightIcon />\n </CalendarButton>\n </CalendarHeader>\n <CalendarGrid state={state} />\n </CalendarContainer>\n );\n};\n\nexport default Calendar;\n","import type { DateValue } from '@internationalized/date';\nimport type { DatePickerProps as DatePickerBase } from '@react-types/datepicker';\nimport { type RefObject, useCallback, useRef } from 'react';\nimport { mergeProps, useButton, useDatePicker, useFocusWithin, VisuallyHidden } from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport Calendar from '#src/components/DatePicker/Calendar/Calendar';\nimport DateField from '#src/components/DatePicker/DateField';\nimport Popover from '#src/components/Popover';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport type { InputSizes } from '#src/mixins/input';\n\nexport interface DatePickerProps extends DatePickerBase<DateValue> {\n id?: string;\n dateFieldProps?: {\n style?: React.CSSProperties;\n };\n disabled?: boolean;\n size?: InputSizes;\n useModalZIndex?: boolean;\n}\n\nconst OpenButton = ({ calendarRef }: { calendarRef: RefObject<HTMLElement> }) => {\n const openCalBtnRef = useRef<HTMLButtonElement>(null);\n const { buttonProps } = useButton(\n {\n onPress: () => {\n if (calendarRef.current) {\n (\n calendarRef.current.querySelector('button[aria-label=\"Previous\"]') as HTMLButtonElement\n ).focus();\n }\n },\n },\n openCalBtnRef,\n );\n\n return <button {...buttonProps} ref={openCalBtnRef} aria-label='Open calendar' />;\n};\n\nexport const DatePicker = (props: DatePickerProps) => {\n const state = useDatePickerState(props);\n const ref = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLDivElement>(null);\n const { groupProps, fieldProps, calendarProps } = useDatePicker(props, state, ref);\n const calendarRef = useRef<HTMLDivElement>(null);\n // A ref, not state: the close sequence focuses the field before a state update would commit.\n const isClosingRef = useRef(false);\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => {\n if (!state.isOpen && !isClosingRef.current) {\n state.setOpen(true);\n }\n },\n onBlurWithin: (e) => {\n // Close calendar if next target is not within the calendar\n if (e.relatedTarget && !calendarRef?.current?.contains(e.relatedTarget) && state.isOpen) {\n state.setOpen(false);\n }\n },\n });\n\n const handleOutsideClick = (e: Event) => {\n const target = e.target as Node;\n // Don't close if clicking on the date input itself\n if (ref.current?.contains(target)) {\n return;\n }\n if (state.isOpen) {\n state.setOpen(false);\n }\n };\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' && !state.isOpen) {\n event.preventDefault();\n state.setOpen(true);\n }\n },\n [state],\n );\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column' }}>\n <Popover\n open={state.isOpen}\n modal={false}\n contentProps={{\n style: { zIndex: props.useModalZIndex ? Z_INDICES.modalDropdown : Z_INDICES.dropdown },\n align: 'start',\n 'aria-modal': true,\n onInteractOutside: handleOutsideClick,\n onEscapeKeyDown: () => {\n state.setOpen(false);\n },\n onCloseAutoFocus: (e: Event) => {\n // Prevent Radix's default focus restoration\n e.preventDefault();\n isClosingRef.current = true;\n\n // Manually restore focus to the date field\n if (fieldRef.current) {\n const firstEditableSegment = fieldRef.current.querySelector('[tabindex=\"0\"]');\n if (firstEditableSegment instanceof HTMLElement) {\n firstEditableSegment.focus();\n }\n }\n\n // Reset flag after focus is done\n requestAnimationFrame(() => {\n isClosingRef.current = false;\n });\n },\n noPadding: true,\n }}\n >\n <Popover.Trigger asChild>\n <div\n {...mergeProps(groupProps, focusWithinProps)}\n ref={ref}\n style={{ display: 'flex', position: 'relative' }}\n >\n <DateField\n ref={fieldRef}\n id={props.id}\n dateFieldProps={props.dateFieldProps}\n disabled={props.disabled}\n size={props.size}\n {...mergeProps(fieldProps, { onKeyDown: handleKeyDown })}\n value={fieldProps.value ?? undefined}\n />\n <VisuallyHidden>\n <OpenButton calendarRef={calendarRef} />\n </VisuallyHidden>\n </div>\n </Popover.Trigger>\n <Calendar\n {...{ ...calendarProps, autoFocus: undefined }}\n calendarRef={calendarRef}\n id='calendar-popover'\n />\n </Popover>\n </div>\n );\n};\n\nexport default DatePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,oBAAoB,OAAO,GAAG;;;AAI3C,MAAa,iBAAiB,OAAO,GAAG;;;mBAGrB,QAAQ,GAAG;;AAG9B,MAAa,kBAAkB,OAAO,GAAG;IACrC,WAAW,cAAc;;;;AAK7B,MAAM,uBAAuB,OAAO,WAAW;;;;AAK/C,MAAa,kBAAkB,UAA2B;CACxD,MAAM,MAAM,QAAQ;CAEpB,MAAM,EAAE,gBAAgB,UAAU,OAAO,IAAI;AAE7C,QAEE,oBAAC,sBAAD;EAA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IACtB;IACb,IAAG;IACH,CAAA,CACM;;EACN,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as DateRangePickerProps } from "./DateRangePicker-DlHC2q--.mjs";
|
|
2
|
-
import { t as ValueControlProps } from "./types-
|
|
2
|
+
import { t as ValueControlProps } from "./types-Dl-tYxwE.mjs";
|
|
3
3
|
import { ReactElement } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/DataTable/TableControls/FiltersV2/value-controls/DateRangeValueControl/DateRangeValueControl.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ValueControlProps } from "./types-
|
|
1
|
+
import { t as ValueControlProps } from "./types-Dl-tYxwE.mjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/DataTable/TableControls/FiltersV2/value-controls/DateValueControl/DateValueControl.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Button } from "./IconButton-
|
|
2
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
1
|
+
import { n as Button } from "./IconButton-kSjnfhWt.mjs";
|
|
2
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-CYZTQS02.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { CaretDownIcon } from "@persona/icons";
|
|
5
5
|
//#region src/components/DropdownButton/DropdownButton.tsx
|
|
@@ -23,4 +23,4 @@ const DropdownButton = ({ children, menuItems, menuProps, side, ...props }) => {
|
|
|
23
23
|
//#endregion
|
|
24
24
|
export { DropdownButton as t };
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=DropdownButton-
|
|
26
|
+
//# sourceMappingURL=DropdownButton-ILgsmuFy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton-
|
|
1
|
+
{"version":3,"file":"DropdownButton-ILgsmuFy.mjs","names":["DropdownMenu"],"sources":["../src/components/DropdownButton/DropdownButton.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\n\nimport { CaretDownIcon } from '@persona/icons';\n\nimport Button, { type ButtonProps } from '#src/components/Button';\nimport DropdownMenu, { type DropdownMenuProps } from '#src/components/DropdownMenu/DropdownMenu';\n\nexport interface DropdownButtonProps extends ButtonProps {\n /**\n * Use `DropdownMenu.Item` components to render the menu items.\n */\n menuItems: ReactNode;\n /**\n * Additional props will be spread to the inner `<DropdownMenu>` component.\n */\n menuProps?: Partial<Omit<DropdownMenuProps, 'trigger'>>;\n /**\n * The side of the dropdown menu.\n */\n side?: DropdownMenuProps['side'];\n}\n\n/**\n * A button that opens a dropdown menu.\n */\nexport const DropdownButton: FC<DropdownButtonProps> = ({\n children,\n menuItems,\n menuProps,\n side,\n ...props\n}) => {\n return (\n <DropdownMenu\n trigger={\n <Button variant='basic' width='auto' suffixIcon={<CaretDownIcon />} {...props}>\n {children}\n </Button>\n }\n side={side}\n {...menuProps}\n >\n {menuItems}\n </DropdownMenu>\n );\n};\n\nexport default DropdownButton;\n"],"mappings":";;;;;;;;AAyBA,MAAa,kBAA2C,EACtD,UACA,WACA,WACA,MACA,GAAG,YACC;AACJ,QACE,oBAACA,sBAAD;EACE,SACE,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,OAAM;GAAO,YAAY,oBAAC,eAAD,EAAiB,CAAA;GAAE,GAAI;GACrE;GACM,CAAA;EAEL;EACN,GAAI;YAEH;EACY,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
2
|
-
import { n as DropdownMenuProps } from "./DropdownMenu-
|
|
1
|
+
import { r as ButtonProps } from "./Button-C4a4BTjL.mjs";
|
|
2
|
+
import { n as DropdownMenuProps } from "./DropdownMenu-BK-AmDAC.mjs";
|
|
3
3
|
import { FC, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/DropdownButton/DropdownButton.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as MenuItemProps, s as MenuHeadingProps } from "./Menu-
|
|
2
|
-
import { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, FC, FunctionComponentElement } from "react";
|
|
1
|
+
import { l as MenuItemProps, s as MenuHeadingProps } from "./Menu-DNJMfxfw.mjs";
|
|
3
2
|
import * as _$styled_components0 from "styled-components";
|
|
3
|
+
import { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, FC, FunctionComponentElement } from "react";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import * as Primitive from "@radix-ui/react-dropdown-menu";
|
|
6
6
|
import { Property } from "csstype";
|
|
@@ -72,4 +72,4 @@ declare const _default: (({
|
|
|
72
72
|
};
|
|
73
73
|
//#endregion
|
|
74
74
|
export { DropdownMenuProps as n, _default as r, DropdownMenu as t };
|
|
75
|
-
//# sourceMappingURL=DropdownMenu-
|
|
75
|
+
//# sourceMappingURL=DropdownMenu-BK-AmDAC.d.mts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as styled } from "./styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
+
import { popoverMotion } from "./mixins/motion.mjs";
|
|
2
3
|
import "./variables/spacing.mjs";
|
|
3
4
|
import { letPointerDownReachDocument } from "./lib/letPointerDownReachDocument.mjs";
|
|
4
5
|
import { mergeRefs, useCloseFocus } from "./lib/useCloseFocus.mjs";
|
|
5
6
|
import { Z_INDICES } from "./lib/zindex.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { a as MenuDivider, i as Menu, o as MenuHeading, s as MenuItem } from "./Menu-BVn1jh46.mjs";
|
|
7
|
+
import { a as MenuDivider, i as Menu, o as MenuHeading, s as MenuItem } from "./Menu-DQPxDJ11.mjs";
|
|
8
8
|
import { Children, forwardRef, useMemo, useRef } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import * as Primitive from "@radix-ui/react-dropdown-menu";
|
|
@@ -81,4 +81,4 @@ var DropdownMenu_default = Object.assign(DropdownMenu, {
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { DropdownMenu_default as n, DropdownMenu as t };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=DropdownMenu-
|
|
84
|
+
//# sourceMappingURL=DropdownMenu-CYZTQS02.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu-
|
|
1
|
+
{"version":3,"file":"DropdownMenu-CYZTQS02.mjs","names":[],"sources":["../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as Primitive from '@radix-ui/react-dropdown-menu';\nimport type { Property } from 'csstype';\nimport {\n Children,\n type ComponentPropsWithoutRef,\n type ComponentPropsWithRef,\n type ElementType,\n type FC,\n forwardRef,\n type FunctionComponentElement,\n type Ref,\n useMemo,\n useRef,\n} from 'react';\nimport styled from 'styled-components';\n\nimport Menu, {\n MenuDivider,\n MenuHeading,\n MenuItem,\n type MenuItemProps,\n} from '#src/components/Menu/Menu';\nimport { letPointerDownReachDocument } from '#src/lib/letPointerDownReachDocument';\nimport { mergeRefs, useCloseFocus } from '#src/lib/useCloseFocus';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport { popoverMotion } from '#src/mixins/motion';\nimport { BASE } from '#src/variables/spacing';\n\nconst DropdownMenuContent = styled(Primitive.Content)<{ $zIndex?: Property.ZIndex }>`\n ${popoverMotion('--radix-dropdown-menu-content-transform-origin')}\n z-index: ${({ $zIndex }) => $zIndex || Z_INDICES.tooltip};\n`;\n\nexport interface DropdownMenuProps\n extends Primitive.DropdownMenuProps, Pick<Primitive.DropdownMenuContentProps, 'side' | 'align'> {\n id?: string;\n className?: string;\n\n trigger: FunctionComponentElement<any>;\n\n /**\n * Props passed to internal DropdownMenu.Content component.\n */\n contentProps?: Primitive.DropdownMenuContentProps;\n\n /**\n * Props passed to internal DropdownMenu.Trigger component.\n */\n triggerProps?: Primitive.DropdownMenuTriggerProps;\n\n /**\n * Props passed to internal DropdownMenu.Portal component.\n */\n portalProps?: Primitive.DropdownMenuPortalProps;\n\n /**\n * Whether or not to wrap menu with DropdownMenu.Portal component.\n */\n portal?: boolean;\n\n /**\n * Whether or not clicks render menu items.\n */\n disabled?: boolean;\n\n zIndex?: Property.ZIndex;\n}\n\nexport const DropdownMenu = ({\n trigger,\n children,\n side,\n align = 'end',\n contentProps,\n triggerProps,\n portalProps,\n className,\n portal = false, // Default to false for old behavior\n modal = false,\n disabled = false,\n zIndex,\n ...props\n}: DropdownMenuProps) => {\n const triggerRef = useRef<HTMLButtonElement>(null);\n const { ref: closeFocusRef, ...closeFocus } = useCloseFocus({\n onCloseAutoFocus: contentProps?.onCloseAutoFocus,\n onInteractOutside: contentProps?.onInteractOutside,\n onEscapeKeyDown: contentProps?.onEscapeKeyDown,\n modal,\n triggerRef,\n reopenFocus: 'content',\n });\n const contentRef = (contentProps as { ref?: Ref<HTMLDivElement> } | undefined)?.ref;\n const triggerPropsRef = (triggerProps as { ref?: Ref<HTMLButtonElement> } | undefined)?.ref;\n const mergedContentRef = useMemo(\n () => mergeRefs(contentRef, closeFocusRef),\n [contentRef, closeFocusRef],\n );\n const mergedTriggerRef = useMemo(() => mergeRefs(triggerPropsRef, triggerRef), [triggerPropsRef]);\n\n if (Children.count(children) === 0) {\n return null;\n }\n\n const content = disabled ? null : (\n <DropdownMenuContent\n sideOffset={BASE}\n collisionPadding={BASE}\n align={align}\n side={side}\n $zIndex={zIndex}\n {...contentProps}\n {...closeFocus}\n ref={mergedContentRef}\n onPointerDownCapture={(event) => {\n contentProps?.onPointerDownCapture?.(event);\n letPointerDownReachDocument(event);\n }}\n >\n <Menu className={className} doNotSetRole>\n {children}\n </Menu>\n </DropdownMenuContent>\n );\n\n return (\n <Primitive.Root modal={modal} {...props}>\n <Primitive.Trigger asChild {...triggerProps} ref={mergedTriggerRef}>\n {trigger}\n </Primitive.Trigger>\n\n {portal ? <Primitive.Portal {...portalProps}>{content}</Primitive.Portal> : content}\n </Primitive.Root>\n );\n};\n\ninterface DropdownMenuItemProps<T extends ElementType = 'div'>\n extends MenuItemProps<T>, Omit<Primitive.DropdownMenuItemProps, 'asChild' | 'children'> {}\n\ninterface DropdownMenuItemType<T extends ElementType = 'div'> extends FC<\n DropdownMenuItemProps<T> & ComponentPropsWithRef<T>\n> {\n <T extends ElementType = 'div'>(\n props: DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>,\n ): ReturnType<FC<DropdownMenuItemProps<T> & ComponentPropsWithoutRef<T>>>;\n}\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst DropdownMenuItem: DropdownMenuItemType = forwardRef(function DropdownMenuItem(\n { children, disabled, ...props },\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <Primitive.Item asChild disabled={disabled} {...props}>\n <MenuItem disabled={disabled} ref={ref}>\n {children}\n </MenuItem>\n </Primitive.Item>\n );\n});\n\nexport default Object.assign(DropdownMenu, {\n Item: DropdownMenuItem,\n Heading: MenuHeading,\n Divider: MenuDivider,\n});\n"],"mappings":";;;;;;;;;;;AA4BA,MAAM,sBAAsB,OAAO,UAAU,QAAQ;IACjD,cAAc,iDAAiD,CAAC;cACtD,EAAE,cAAc,WAAW,UAAU,QAAQ;;AAsC3D,MAAa,gBAAgB,EAC3B,SACA,UACA,MACA,QAAQ,OACR,cACA,cACA,aACA,WACA,SAAS,OACT,QAAQ,OACR,WAAW,OACX,QACA,GAAG,YACoB;CACvB,MAAM,aAAa,OAA0B,KAAK;CAClD,MAAM,EAAE,KAAK,eAAe,GAAG,eAAe,cAAc;EAC1D,kBAAkB,cAAc;EAChC,mBAAmB,cAAc;EACjC,iBAAiB,cAAc;EAC/B;EACA;EACA,aAAa;EACd,CAAC;CACF,MAAM,aAAc,cAA4D;CAChF,MAAM,kBAAmB,cAA+D;CACxF,MAAM,mBAAmB,cACjB,UAAU,YAAY,cAAc,EAC1C,CAAC,YAAY,cAAc,CAC5B;CACD,MAAM,mBAAmB,cAAc,UAAU,iBAAiB,WAAW,EAAE,CAAC,gBAAgB,CAAC;AAEjG,KAAI,SAAS,MAAM,SAAS,KAAK,EAC/B,QAAO;CAGT,MAAM,UAAU,WAAW,OACzB,oBAAC,qBAAD;EACE,YAAA;EACA,kBAAA;EACO;EACD;EACN,SAAS;EACT,GAAI;EACJ,GAAI;EACJ,KAAK;EACL,uBAAuB,UAAU;AAC/B,iBAAc,uBAAuB,MAAM;AAC3C,+BAA4B,MAAM;;YAGpC,oBAAC,MAAD;GAAiB;GAAW,cAAA;GACzB;GACI,CAAA;EACa,CAAA;AAGxB,QACE,qBAAC,UAAU,MAAX;EAAuB;EAAO,GAAI;YAAlC,CACE,oBAAC,UAAU,SAAX;GAAmB,SAAA;GAAQ,GAAI;GAAc,KAAK;aAC/C;GACiB,CAAA,EAEnB,SAAS,oBAAC,UAAU,QAAX;GAAkB,GAAI;aAAc;GAA2B,CAAA,GAAG,QAC7D;;;AAgBrB,MAAM,mBAAyC,WAAW,SAAS,iBACjE,EAAE,UAAU,UAAU,GAAG,SACzB,KACA;AACA,QACE,oBAAC,UAAU,MAAX;EAAgB,SAAA;EAAkB;EAAU,GAAI;YAC9C,oBAAC,UAAD;GAAoB;GAAe;GAChC;GACQ,CAAA;EACI,CAAA;EAEnB;AAEF,IAAA,uBAAe,OAAO,OAAO,cAAc;CACzC,MAAM;CACN,SAAS;CACT,SAAS;CACV,CAAC"}
|
package/dist/DropdownMenu.d.mts
CHANGED
|
@@ -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-BK-AmDAC.mjs";
|
|
2
2
|
export { DropdownMenu, DropdownMenuProps, _default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as FilterOperator, o as FilterField } from "./types-
|
|
1
|
+
import { l as FilterOperator, o as FilterField } from "./types-CnqmdPXi.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/DataTable/TableControls/FiltersV2/FieldRegistry.d.ts
|
|
4
4
|
/**
|
|
@@ -119,4 +119,4 @@ declare function buildFieldRegistry(resource: string, fieldKeyToInfo: Record<str
|
|
|
119
119
|
}): FieldRegistry;
|
|
120
120
|
//#endregion
|
|
121
121
|
export { RawFieldInfo as n, buildFieldRegistry as r, FieldRegistry as t };
|
|
122
|
-
//# sourceMappingURL=FieldRegistry-
|
|
122
|
+
//# sourceMappingURL=FieldRegistry-CD8fjf9Z.d.mts.map
|