@servicetitan/anvil2 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{Alert-D9mBPs6z.js → Alert-efJbA3Sy.js} +4 -4
- package/dist/{Alert-D9mBPs6z.js.map → Alert-efJbA3Sy.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-B34cD6BC.js → Announcement-D9eVhPwx.js} +4 -4
- package/dist/{Announcement-B34cD6BC.js.map → Announcement-D9eVhPwx.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{AnvilProvider-C3pjoStP.js → AnvilProvider-DrjU73_k.js} +4 -4
- package/dist/{AnvilProvider-C3pjoStP.js.map → AnvilProvider-DrjU73_k.js.map} +1 -1
- package/dist/AnvilProvider.js +1 -1
- package/dist/{Avatar-DShevhcs.js → Avatar--E9iBILU.js} +2 -2
- package/dist/{Avatar-DShevhcs.js.map → Avatar--E9iBILU.js.map} +1 -1
- package/dist/{Avatar-COMPK7Ym.js → Avatar-CJCAu9Hk.js} +2 -2
- package/dist/{Avatar-COMPK7Ym.js.map → Avatar-CJCAu9Hk.js.map} +1 -1
- package/dist/Avatar.js +2 -2
- package/dist/{Badge-CS-CwcOQ.js → Badge-pHlnInjl.js} +2 -2
- package/dist/{Badge-CS-CwcOQ.js.map → Badge-pHlnInjl.js.map} +1 -1
- package/dist/Badge.js +1 -1
- package/dist/{Breadcrumbs-CEVH4s23.js → Breadcrumbs-B5deMJRX.js} +5 -5
- package/dist/{Breadcrumbs-CEVH4s23.js.map → Breadcrumbs-B5deMJRX.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Button-DrNDkO2f.js → Button-DuvaXRZ5.js} +4 -4
- package/dist/{Button-DrNDkO2f.js.map → Button-DuvaXRZ5.js.map} +1 -1
- package/dist/Button.css +49 -49
- package/dist/Button.js +1 -1
- package/dist/Button.module-wCtFYGVD.js +26 -0
- package/dist/Button.module-wCtFYGVD.js.map +1 -0
- package/dist/{ButtonCompound-D9VTKcL4.js → ButtonCompound-CfRJlClF.js} +3 -3
- package/dist/{ButtonCompound-D9VTKcL4.js.map → ButtonCompound-CfRJlClF.js.map} +1 -1
- package/dist/ButtonCompound.js +1 -1
- package/dist/{ButtonLink-DDtrmbVM.js → ButtonLink-B5Ixd5d5.js} +4 -4
- package/dist/{ButtonLink-DDtrmbVM.js.map → ButtonLink-B5Ixd5d5.js.map} +1 -1
- package/dist/ButtonLink.js +1 -1
- package/dist/{ButtonToggle-DrFewgOG.js → ButtonToggle-BkDR0AcM.js} +4 -4
- package/dist/{ButtonToggle-DrFewgOG.js.map → ButtonToggle-BkDR0AcM.js.map} +1 -1
- package/dist/ButtonToggle.js +1 -1
- package/dist/{Calendar-CtkL4zYU.js → Calendar-M8K2O28r.js} +5 -5
- package/dist/{Calendar-CtkL4zYU.js.map → Calendar-M8K2O28r.js.map} +1 -1
- package/dist/{Calendar-CkgpKD7Q.js → Calendar-MXQWMrwC.js} +2 -2
- package/dist/{Calendar-CkgpKD7Q.js.map → Calendar-MXQWMrwC.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Card-DDH7gI8m.js → Card-C5TyS0Iv.js} +2 -2
- package/dist/{Card-DDH7gI8m.js.map → Card-C5TyS0Iv.js.map} +1 -1
- package/dist/Card.js +1 -1
- package/dist/{Checkbox-CFgjreAl.js → Checkbox-Czx6UCfq.js} +2 -2
- package/dist/{Checkbox-CFgjreAl.js.map → Checkbox-Czx6UCfq.js.map} +1 -1
- package/dist/{Checkbox-CxjZpzPp.js → Checkbox-LPr8zpzs.js} +24 -34
- package/dist/Checkbox-LPr8zpzs.js.map +1 -0
- package/dist/Checkbox.css +71 -66
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.module-EkRZO48Y.js +28 -0
- package/dist/Checkbox.module-EkRZO48Y.js.map +1 -0
- package/dist/{Chip-Bc7jiIJ1.js → Chip-BJmzOMOd.js} +4 -4
- package/dist/{Chip-Bc7jiIJ1.js.map → Chip-BJmzOMOd.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/{Combobox-Drqb3GVU.js → Combobox-CnzBCYLC.js} +11 -15
- package/dist/Combobox-CnzBCYLC.js.map +1 -0
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-BLuJ4FtH.js → DataTable-Cau6ylNR.js} +13 -13
- package/dist/{DataTable-BLuJ4FtH.js.map → DataTable-Cau6ylNR.js.map} +1 -1
- package/dist/{DateFieldRange-CvlOeE4v.js → DateFieldRange-B1BR8K7C.js} +6 -6
- package/dist/{DateFieldRange-CvlOeE4v.js.map → DateFieldRange-B1BR8K7C.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-9UHxIxIA.js → DateFieldSingle-CaWruBBO.js} +6 -6
- package/dist/{DateFieldSingle-9UHxIxIA.js.map → DateFieldSingle-CaWruBBO.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-HNydELvO.js → DateFieldYearless-ClF88lnZ.js} +13 -21
- package/dist/DateFieldYearless-ClF88lnZ.js.map +1 -0
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-COb8v2CG.js → DateFieldYearlessRange-LZFr55tn.js} +16 -23
- package/dist/DateFieldYearlessRange-LZFr55tn.js.map +1 -0
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-D-WPj18i.js → DaysOfTheWeek-BLdndX4a.js} +6 -6
- package/dist/{DaysOfTheWeek-D-WPj18i.js.map → DaysOfTheWeek-BLdndX4a.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Details-BF0-a1by.js → Details-C9temdJE.js} +3 -3
- package/dist/{Details-BF0-a1by.js.map → Details-C9temdJE.js.map} +1 -1
- package/dist/Details.js +1 -1
- package/dist/{Dialog-DEAR058v.js → Dialog-CXnUkcrS.js} +5 -5
- package/dist/{Dialog-DEAR058v.js.map → Dialog-CXnUkcrS.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{DialogCancelButton-BfI9K4a4.js → DialogCancelButton-LfPkSYCE.js} +2 -2
- package/dist/{DialogCancelButton-BfI9K4a4.js.map → DialogCancelButton-LfPkSYCE.js.map} +1 -1
- package/dist/{Divider-De04mOU6.js → Divider-HHjG0KYA.js} +2 -2
- package/dist/{Divider-De04mOU6.js.map → Divider-HHjG0KYA.js.map} +1 -1
- package/dist/Divider.js +1 -1
- package/dist/Dnd.js +1 -1
- package/dist/DndSort.js +5 -5
- package/dist/{Drawer-CnMskBQl.js → Drawer-BmNHRJJJ.js} +5 -5
- package/dist/{Drawer-CnMskBQl.js.map → Drawer-BmNHRJJJ.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-CH-JE4ba.js → EditCard-8gQ6IJez.js} +6 -6
- package/dist/{EditCard-CH-JE4ba.js.map → EditCard-8gQ6IJez.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldDialog-C5mwMjrr.js → FieldDialog-DaRvLS6m.js} +13 -13
- package/dist/{FieldDialog-C5mwMjrr.js.map → FieldDialog-DaRvLS6m.js.map} +1 -1
- package/dist/FieldLabel-35fac7b-.js +125 -0
- package/dist/FieldLabel-35fac7b-.js.map +1 -0
- package/dist/FieldLabel.css +80 -10
- package/dist/FieldLabel.js +1 -1
- package/dist/{FieldMessage-OeP_xSUE.js → FieldMessage-eYenMJY5.js} +2 -2
- package/dist/{FieldMessage-OeP_xSUE.js.map → FieldMessage-eYenMJY5.js.map} +1 -1
- package/dist/FieldMessage.js +1 -1
- package/dist/{Flex-CUtXN-C0.js → Flex-DZu-_z-U.js} +2 -2
- package/dist/{Flex-CUtXN-C0.js.map → Flex-DZu-_z-U.js.map} +1 -1
- package/dist/Flex.js +1 -1
- package/dist/{Grid-CatFkT0X.js → Grid-xRKvVHA2.js} +2 -2
- package/dist/{Grid-CatFkT0X.js.map → Grid-xRKvVHA2.js.map} +1 -1
- package/dist/Grid.js +1 -1
- package/dist/{Helper-B2UrgJvr.js → Helper-CDZD_AOG.js} +2 -2
- package/dist/{Helper-B2UrgJvr.js.map → Helper-CDZD_AOG.js.map} +1 -1
- package/dist/{Icon-Bcil6aBo.js → Icon-Bgkq1egx.js} +2 -2
- package/dist/{Icon-Bcil6aBo.js.map → Icon-Bgkq1egx.js.map} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{InputMask-B7ZnJoR5.js → InputMask-DkvZ4MIT.js} +3 -3
- package/dist/{InputMask-B7ZnJoR5.js.map → InputMask-DkvZ4MIT.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{InteractiveCard-OszQGxGw.js → InteractiveCard-B3_FAoIE.js} +2 -2
- package/dist/{InteractiveCard-OszQGxGw.js.map → InteractiveCard-B3_FAoIE.js.map} +1 -1
- package/dist/InteractiveCard.js +1 -1
- package/dist/{Link-B3reiL5f.js → Link-DSyeiS7g.js} +3 -3
- package/dist/{Link-B3reiL5f.js.map → Link-DSyeiS7g.js.map} +1 -1
- package/dist/Link.js +1 -1
- package/dist/{LinkButton-D62f2os3.js → LinkButton-DOI4osnN.js} +2 -2
- package/dist/{LinkButton-D62f2os3.js.map → LinkButton-DOI4osnN.js.map} +1 -1
- package/dist/LinkButton.js +1 -1
- package/dist/{List-CtdOo1dv.js → List-Cyvkt0Px.js} +2 -2
- package/dist/{List-CtdOo1dv.js.map → List-Cyvkt0Px.js.map} +1 -1
- package/dist/List.js +1 -1
- package/dist/{ListView-CN8zu-cq.js → ListView-VzdUffCe.js} +3 -3
- package/dist/{ListView-CN8zu-cq.js.map → ListView-VzdUffCe.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-DMyxIokT.js → Listbox-SRBgb1VS.js} +5 -5
- package/dist/{Listbox-DMyxIokT.js.map → Listbox-SRBgb1VS.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/{LocalizationProvider-ay-XWdlo.js → LocalizationProvider-DWCyga_d.js} +2 -2
- package/dist/{LocalizationProvider-ay-XWdlo.js.map → LocalizationProvider-DWCyga_d.js.map} +1 -1
- package/dist/LocalizationProvider.js +1 -1
- package/dist/{Menu-CpRnsr0v.js → Menu-Bxbrulia.js} +4 -4
- package/dist/{Menu-CpRnsr0v.js.map → Menu-Bxbrulia.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-BnPzYM72.js → MultiSelectFieldSync-B6J42MpG.js} +7 -7
- package/dist/{MultiSelectFieldSync-BnPzYM72.js.map → MultiSelectFieldSync-B6J42MpG.js.map} +1 -1
- package/dist/{NumberField-ecubQsaf.js → NumberField-BgeDEoHw.js} +11 -12
- package/dist/NumberField-BgeDEoHw.js.map +1 -0
- package/dist/NumberField.js +1 -1
- package/dist/Overflow.js +2 -2
- package/dist/{Page-qOkG6psI.js → Page-DgqEClR7.js} +15 -15
- package/dist/{Page-qOkG6psI.js.map → Page-DgqEClR7.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-BuiyhZlJ.js → Pagination-DIredMzG.js} +6 -6
- package/dist/{Pagination-BuiyhZlJ.js.map → Pagination-DIredMzG.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CYWYCj7l.js → Popover-CsVesD9_.js} +6 -26
- package/dist/Popover-CsVesD9_.js.map +1 -0
- package/dist/Popover-ZyaN26OB.js +522 -0
- package/dist/Popover-ZyaN26OB.js.map +1 -0
- package/dist/Popover.js +1 -1
- package/dist/Popover2.css +68 -0
- package/dist/{ProgressBar-CBhVZIzK.js → ProgressBar-x1cyKo1E.js} +6 -6
- package/dist/{ProgressBar-CBhVZIzK.js.map → ProgressBar-x1cyKo1E.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-BMFwnzyz.js → Radio-Beneo_h3.js} +2 -2
- package/dist/{Radio-BMFwnzyz.js.map → Radio-Beneo_h3.js.map} +1 -1
- package/dist/{Radio-DtYoRq3m.js → Radio-D8HSazJ6.js} +36 -44
- package/dist/Radio-D8HSazJ6.js.map +1 -0
- package/dist/Radio.css +52 -47
- package/dist/Radio.js +1 -1
- package/dist/{SearchField-CtdtcrVV.js → SearchField-Dn_5cMo3.js} +3 -3
- package/dist/{SearchField-CtdtcrVV.js.map → SearchField-Dn_5cMo3.js.map} +1 -1
- package/dist/SearchField.js +1 -1
- package/dist/{SegmentedControl-CzTtiYS9.js → SegmentedControl-BshzGPsW.js} +2 -2
- package/dist/{SegmentedControl-CzTtiYS9.js.map → SegmentedControl-BshzGPsW.js.map} +1 -1
- package/dist/SegmentedControl.js +1 -1
- package/dist/{SelectCard-yWBNnm7t.js → SelectCard-D94UKLxM.js} +5 -5
- package/dist/{SelectCard-yWBNnm7t.js.map → SelectCard-D94UKLxM.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldSync-DCrafdbx.js → SelectFieldSync-BQrC0j2-.js} +5 -5
- package/dist/{SelectFieldSync-DCrafdbx.js.map → SelectFieldSync-BQrC0j2-.js.map} +1 -1
- package/dist/{SelectTrigger-Cs5CGc4D.js → SelectTrigger-D8xkq1wa.js} +6 -9
- package/dist/SelectTrigger-D8xkq1wa.js.map +1 -0
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-Cs827tDp.js → SelectTriggerBase-CBS5URqs.js} +6 -6
- package/dist/{SelectTriggerBase-Cs827tDp.js.map → SelectTriggerBase-CBS5URqs.js.map} +1 -1
- package/dist/{SideNav-CbMGsIPM.js → SideNav-2CgD8uxD.js} +3 -3
- package/dist/{SideNav-CbMGsIPM.js.map → SideNav-2CgD8uxD.js.map} +1 -1
- package/dist/SideNav.js +1 -1
- package/dist/Skeleton.js +1 -1
- package/dist/{Stepper-CzVKDg-N.js → Stepper-D71Zhlr9.js} +4 -4
- package/dist/{Stepper-CzVKDg-N.js.map → Stepper-D71Zhlr9.js.map} +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-CEmjmSiL.js → Switch-DxkmA-o4.js} +5 -5
- package/dist/{Switch-CEmjmSiL.js.map → Switch-DxkmA-o4.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/{Tab-DXivEqur.js → Tab-2mEMF0vc.js} +3 -3
- package/dist/{Tab-DXivEqur.js.map → Tab-2mEMF0vc.js.map} +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-DhheKsns.js → Text-BqES2rv3.js} +2 -2
- package/dist/{Text-DhheKsns.js.map → Text-BqES2rv3.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-D9VWORek.js → TextField-Dk90SWXl.js} +2 -2
- package/dist/{TextField-D9VWORek.js.map → TextField-Dk90SWXl.js.map} +1 -1
- package/dist/{TextField-atI4M79b.js → TextField-Dn6HWZoH.js} +9 -13
- package/dist/TextField-Dn6HWZoH.js.map +1 -0
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-D-kPIsIN.js → Textarea-D4gqy2ZR.js} +9 -13
- package/dist/Textarea-D4gqy2ZR.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/{ThemeProvider-BEt_iJgf.js → ThemeProvider-BwZHpkFv.js} +2 -2
- package/dist/{ThemeProvider-BEt_iJgf.js.map → ThemeProvider-BwZHpkFv.js.map} +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/{TimeField-DREFzFkw.js → TimeField-DgdGwPF9.js} +22 -12
- package/dist/TimeField-DgdGwPF9.js.map +1 -0
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-Bisc1mlh.js → Toaster-BBcWImWl.js} +2 -2
- package/dist/{Toaster-Bisc1mlh.js.map → Toaster-BBcWImWl.js.map} +1 -1
- package/dist/{Toaster-B652KIzq.js → Toaster-C07D40P9.js} +5 -5
- package/dist/{Toaster-B652KIzq.js.map → Toaster-C07D40P9.js.map} +1 -1
- package/dist/{Toolbar-jfZ-CupZ.js → Toolbar-4LHKM6ub.js} +24 -23
- package/dist/Toolbar-4LHKM6ub.js.map +1 -0
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-Bt62hC5J.js → Tooltip-BiW5nNAy.js} +11 -5
- package/dist/Tooltip-BiW5nNAy.js.map +1 -0
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-mW5KykHZ.js → YearlessDateInputWithPicker-CxfcJqro.js} +6 -6
- package/dist/{YearlessDateInputWithPicker-mW5KykHZ.js.map → YearlessDateInputWithPicker-CxfcJqro.js.map} +1 -1
- package/dist/assets/icons/st/resize_window_alt.svg +1 -0
- package/dist/assets/icons/st.ts +1 -0
- package/dist/beta.js +8 -8
- package/dist/components/Avatar/Avatar.figma.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.figma.d.ts +1 -0
- package/dist/components/Card/Card.figma.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.figma.d.ts +1 -0
- package/dist/components/Chip/Chip.figma.d.ts +1 -0
- package/dist/components/Combobox/ComboboxTypes.d.ts +1 -1
- package/dist/components/FieldLabel/FieldLabel.d.ts +3 -0
- package/dist/components/FieldLabel/internal/FieldLabelButton.d.ts +22 -0
- package/dist/components/FieldLabel/internal/FieldLabelMoreInfoIcon.d.ts +4 -6
- package/dist/components/Link/Link.figma.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBar.figma.d.ts +1 -0
- package/dist/components/SelectTrigger/SelectTrigger.d.ts +1 -1
- package/dist/components/Spinner/Spinner.figma.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.figma.d.ts +1 -0
- package/dist/floating-ui.react-S01OoTc9.js +2374 -0
- package/dist/floating-ui.react-S01OoTc9.js.map +1 -0
- package/dist/{floating-ui.react-dom-BZbDMh89.js → floating-ui.react-dom-DSiPHZwm.js} +237 -4
- package/dist/{floating-ui.react-dom-BZbDMh89.js.map → floating-ui.react-dom-DSiPHZwm.js.map} +1 -1
- package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +3 -3
- package/dist/{index-ClUtwV8V.js → index-DuDm69S1.js} +3 -3
- package/dist/{index-ClUtwV8V.js.map → index-DuDm69S1.js.map} +1 -1
- package/dist/{index.esm-K9kxJhLx.js → index.esm-BZV0wNKZ.js} +1 -2
- package/dist/{index.esm-K9kxJhLx.js.map → index.esm-BZV0wNKZ.js.map} +1 -1
- package/dist/index.js +69 -68
- package/dist/index.js.map +1 -1
- package/dist/internal/components/Popover/Popover.d.ts +266 -0
- package/dist/internal/components/Popover/PopoverButton.d.ts +24 -0
- package/dist/internal/components/Popover/PopoverClose.d.ts +24 -0
- package/dist/internal/components/Popover/PopoverContent.d.ts +30 -0
- package/dist/internal/components/Popover/PopoverTrigger.d.ts +46 -0
- package/dist/internal/components/Popover/index.d.ts +6 -0
- package/dist/internal/components/Popover/internal/PopoverContext.d.ts +45 -0
- package/dist/internal/components/Popover/internal/usePopoverContext.d.ts +6 -0
- package/dist/{useBreakpoint-BP3HZXmh.js → useBreakpoint-okJ64T1D.js} +4 -3
- package/dist/useBreakpoint-okJ64T1D.js.map +1 -0
- package/dist/useBreakpoint.js +1 -1
- package/dist/{useDrilldown-hUxMOdnz.js → useDrilldown-CuvPT4gS.js} +5 -5
- package/dist/{useDrilldown-hUxMOdnz.js.map → useDrilldown-CuvPT4gS.js.map} +1 -1
- package/dist/{useInitialFocus-BRRbylek.js → useInitialFocus-CdoVwSbr.js} +2 -2
- package/dist/{useInitialFocus-BRRbylek.js.map → useInitialFocus-CdoVwSbr.js.map} +1 -1
- package/dist/{useLayoutPropsUtil-loxbyklF.js → useLayoutPropsUtil-DMDdfIah.js} +2 -2
- package/dist/{useLayoutPropsUtil-loxbyklF.js.map → useLayoutPropsUtil-DMDdfIah.js.map} +1 -1
- package/dist/usePopoverTransitionStates-CDIoNUuf.js +24 -0
- package/dist/usePopoverTransitionStates-CDIoNUuf.js.map +1 -0
- package/package.json +3 -3
- package/dist/Button.module-DwCq9XU0.js +0 -26
- package/dist/Button.module-DwCq9XU0.js.map +0 -1
- package/dist/Checkbox-CxjZpzPp.js.map +0 -1
- package/dist/Checkbox.module-D4EgXL0i.js +0 -27
- package/dist/Checkbox.module-D4EgXL0i.js.map +0 -1
- package/dist/Combobox-Drqb3GVU.js.map +0 -1
- package/dist/DateFieldYearless-HNydELvO.js.map +0 -1
- package/dist/DateFieldYearlessRange-COb8v2CG.js.map +0 -1
- package/dist/FieldLabel-DL0D6fvc.js +0 -95
- package/dist/FieldLabel-DL0D6fvc.js.map +0 -1
- package/dist/NumberField-ecubQsaf.js.map +0 -1
- package/dist/Popover-CYWYCj7l.js.map +0 -1
- package/dist/Radio-DtYoRq3m.js.map +0 -1
- package/dist/SelectTrigger-Cs5CGc4D.js.map +0 -1
- package/dist/TextField-atI4M79b.js.map +0 -1
- package/dist/Textarea-D-kPIsIN.js.map +0 -1
- package/dist/TimeField-DREFzFkw.js.map +0 -1
- package/dist/Toolbar-jfZ-CupZ.js.map +0 -1
- package/dist/Tooltip-Bt62hC5J.js.map +0 -1
- package/dist/floating-ui.react-P5949bpO.js +0 -28
- package/dist/floating-ui.react-P5949bpO.js.map +0 -1
- package/dist/useBreakpoint-BP3HZXmh.js.map +0 -1
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
import { PopoverTrigger } from './PopoverTrigger';
|
|
4
|
+
import { DisableCloseOnEscapeOrClickProps } from '../../../types';
|
|
5
|
+
import { OpenCloseTransitionStateEffects } from '../../../internal/hooks';
|
|
6
|
+
/** ARIA role of the beta Popover popup. */
|
|
7
|
+
export type PopoverRole = "dialog" | "listbox" | "tree" | "grid";
|
|
8
|
+
/**
|
|
9
|
+
* Sub-options for `placement="auto"`. Constrains which sides `autoPlacement()`
|
|
10
|
+
* may choose from. Ignored when a specific placement is set.
|
|
11
|
+
*/
|
|
12
|
+
export type PopoverAutoPlacementConfig = {
|
|
13
|
+
/** Limits which sides autoPlacement() considers. Defaults to all sides. */
|
|
14
|
+
allowedPlacements?: Placement[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Sub-options for a specific placement (e.g. `"bottom"`). Overrides the default
|
|
18
|
+
* opposite-side fallback sequence used by `flip()`. Ignored when `placement="auto"`.
|
|
19
|
+
*/
|
|
20
|
+
export type PopoverFlipPlacementConfig = {
|
|
21
|
+
/** Explicit fallback sequence for flip(). Overrides the default opposite-side fallback. */
|
|
22
|
+
fallbackPlacements?: Placement[];
|
|
23
|
+
};
|
|
24
|
+
type PopoverPropsBase = {
|
|
25
|
+
/** Content to render inside the popover tree. */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/** Controlled open state. */
|
|
28
|
+
open?: boolean;
|
|
29
|
+
/** Initial open state for uncontrolled mode. @default false */
|
|
30
|
+
defaultOpen?: boolean;
|
|
31
|
+
/** Fires when the popover closes for any non-hover reason. */
|
|
32
|
+
onClose?: () => void;
|
|
33
|
+
/** Fires when the user clicks outside the popover. Not fired when disableCloseOnClickOutside is set. */
|
|
34
|
+
onClickOutside?: (e: globalThis.MouseEvent) => void;
|
|
35
|
+
/** Whether to hide the arrow/caret indicator. @default false */
|
|
36
|
+
disableCaret?: boolean;
|
|
37
|
+
/** Whether to remove default padding from the content area. @default false */
|
|
38
|
+
noPadding?: boolean;
|
|
39
|
+
/** Whether the popover width should match the trigger element width. @default false */
|
|
40
|
+
matchReferenceWidth?: boolean;
|
|
41
|
+
/** Whether the popover should have a fixed width of 40dvw. @default false */
|
|
42
|
+
fixedWidth?: boolean;
|
|
43
|
+
/** Fills available viewport height between the trigger and viewport edge. @default false */
|
|
44
|
+
fillAvailableHeight?: boolean;
|
|
45
|
+
/** Maximum height of the popover content. */
|
|
46
|
+
maxHeight?: number | string;
|
|
47
|
+
/** Constrains the popover to available viewport height. @default false */
|
|
48
|
+
fitScreen?: boolean;
|
|
49
|
+
/** Minimum height of the popover content. @default "2.875rem" */
|
|
50
|
+
minHeight?: number | string;
|
|
51
|
+
} & DisableCloseOnEscapeOrClickProps & OpenCloseTransitionStateEffects;
|
|
52
|
+
/**
|
|
53
|
+
* Role-specific props for `role="dialog"` (default).
|
|
54
|
+
*
|
|
55
|
+
* Only dialog popovers use `FloatingFocusManager` — focus moves into the content
|
|
56
|
+
* on open. The `modal`, `openOnHover`, and `delay` props are only meaningful
|
|
57
|
+
* in this context.
|
|
58
|
+
*/
|
|
59
|
+
type DialogRoleProps = {
|
|
60
|
+
/**
|
|
61
|
+
* The ARIA role of the popup. Drives `aria-haspopup` on the trigger and
|
|
62
|
+
* `role` on the content via Floating UI's `useRole`.
|
|
63
|
+
*
|
|
64
|
+
* @default "dialog"
|
|
65
|
+
*/
|
|
66
|
+
role?: "dialog";
|
|
67
|
+
/** Traps focus until closed (modal) or closes on Tab-out (non-modal). @default false */
|
|
68
|
+
modal?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the popover opens on hover instead of click. @default false
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Hover-triggered popovers should contain only readable text — no interactive
|
|
74
|
+
* elements (buttons, links, inputs). The content is intentionally removed from
|
|
75
|
+
* the tab order so Tab moves cleanly between page elements. Interactive content
|
|
76
|
+
* inside a hover-triggered popover is unreachable by keyboard users. Use a
|
|
77
|
+
* click-triggered popover (default) when the content includes interactive elements.
|
|
78
|
+
*/
|
|
79
|
+
openOnHover?: boolean;
|
|
80
|
+
/** Delay in ms before opening on hover. @default 100 */
|
|
81
|
+
delay?: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Role-specific props for combobox popup roles (`listbox`, `tree`, `grid`).
|
|
85
|
+
*
|
|
86
|
+
* These roles follow the ARIA combobox pattern — focus stays on the trigger and
|
|
87
|
+
* the inner component (e.g. `Listbox`) owns the role and keyboard navigation.
|
|
88
|
+
* `FloatingFocusManager` is disabled. `modal`, `openOnHover`, and `delay` are
|
|
89
|
+
* not applicable and are excluded at the type level.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Floating UI adds `role="combobox"` to the trigger element for these roles.
|
|
93
|
+
* The `combobox` ARIA role only accepts names from `aria-label` or
|
|
94
|
+
* `aria-labelledby` — visible text content is not used. Always provide an
|
|
95
|
+
* explicit `aria-label` on `Popover.Button` or your custom trigger.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* // ✅ Correct — explicit aria-label required for non-dialog roles
|
|
99
|
+
* <Popover role="listbox">
|
|
100
|
+
* <Popover.Button aria-label="Select an option">Open</Popover.Button>
|
|
101
|
+
* <Popover.Content>
|
|
102
|
+
* <Listbox>...</Listbox>
|
|
103
|
+
* </Popover.Content>
|
|
104
|
+
* </Popover>
|
|
105
|
+
*/
|
|
106
|
+
type NonDialogRoleProps = {
|
|
107
|
+
/** The ARIA role of the popup. */
|
|
108
|
+
role: Exclude<PopoverRole, "dialog">;
|
|
109
|
+
modal?: never;
|
|
110
|
+
openOnHover?: never;
|
|
111
|
+
delay?: never;
|
|
112
|
+
};
|
|
113
|
+
type WithAutoPlacement = {
|
|
114
|
+
/**
|
|
115
|
+
* Uses `autoPlacement()` — picks the side with the most space. Pass
|
|
116
|
+
* a specific placement (e.g. `"bottom"`) to express a preferred side
|
|
117
|
+
* with `flip()` fallback instead.
|
|
118
|
+
*/
|
|
119
|
+
placement?: "auto";
|
|
120
|
+
/** Sub-options for `autoPlacement()`. */
|
|
121
|
+
placementConfig?: PopoverAutoPlacementConfig;
|
|
122
|
+
};
|
|
123
|
+
type WithSpecificPlacement = {
|
|
124
|
+
/**
|
|
125
|
+
* Preferred placement relative to the trigger. Floating UI's `flip()`
|
|
126
|
+
* middleware will adapt to the opposite side if there is not enough space.
|
|
127
|
+
* Pass `"auto"` to let Floating UI pick the best side automatically.
|
|
128
|
+
*
|
|
129
|
+
* @default "bottom"
|
|
130
|
+
*/
|
|
131
|
+
placement: Placement;
|
|
132
|
+
/** Sub-options for `flip()`. */
|
|
133
|
+
placementConfig?: PopoverFlipPlacementConfig;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Props for the beta Popover component.
|
|
137
|
+
*
|
|
138
|
+
* Two independent discriminated unions are combined:
|
|
139
|
+
* - **Role**: `role="dialog"` (default) enables `FloatingFocusManager` and accepts `modal`,
|
|
140
|
+
* `openOnHover`, and `delay`. Non-dialog roles (`listbox`, `tree`, `grid`) disable
|
|
141
|
+
* focus management — the inner component owns focus and keyboard navigation.
|
|
142
|
+
* - **Placement**: `placement="auto"` uses `autoPlacement()` and accepts
|
|
143
|
+
* `placementConfig.allowedPlacements`. Specific placements use `flip()` and accept
|
|
144
|
+
* `placementConfig.fallbackPlacements`.
|
|
145
|
+
*
|
|
146
|
+
* @extends DisableCloseOnEscapeOrClickProps
|
|
147
|
+
* @extends OpenCloseTransitionStateEffects
|
|
148
|
+
*/
|
|
149
|
+
export type PopoverProps = (PopoverPropsBase & DialogRoleProps & WithAutoPlacement) | (PopoverPropsBase & DialogRoleProps & WithSpecificPlacement) | (PopoverPropsBase & NonDialogRoleProps & WithAutoPlacement) | (PopoverPropsBase & NonDialogRoleProps & WithSpecificPlacement);
|
|
150
|
+
/**
|
|
151
|
+
* Beta Popover component for displaying floating content relative to a trigger element.
|
|
152
|
+
*
|
|
153
|
+
* Built on three layers:
|
|
154
|
+
* - HTML Popover API (`popover="manual"`) for top-layer rendering without z-index management
|
|
155
|
+
* - Floating UI (`@floating-ui/react`) for JavaScript-based positioning
|
|
156
|
+
* - Floating UI interaction hooks for correct ARIA attributes and keyboard behavior
|
|
157
|
+
*
|
|
158
|
+
* Features:
|
|
159
|
+
* - Correct ARIA linkage: `aria-controls`, `aria-haspopup` with role string, `aria-expanded`
|
|
160
|
+
* - `FloatingFocusManager` for both modal (focus trapped) and non-modal (Tab-out closes)
|
|
161
|
+
* - `safePolygon()` hover zone replaces CSS `::before` hover bridge
|
|
162
|
+
* - `role` prop drives both `aria-haspopup` on trigger and `role` on content
|
|
163
|
+
* - Controlled and uncontrolled modes via `open` / `defaultOpen`
|
|
164
|
+
* - Imperative handle exposing `openPopover` and `closePopover`
|
|
165
|
+
* - Animation lifecycle callbacks via `onOpenAnimationStart` etc.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* <Popover>
|
|
169
|
+
* <Popover.Button>Open</Popover.Button>
|
|
170
|
+
* <Popover.Content>
|
|
171
|
+
* <p>Popover content</p>
|
|
172
|
+
* <Popover.Close>Close</Popover.Close>
|
|
173
|
+
* </Popover.Content>
|
|
174
|
+
* </Popover>
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* <Popover modal>
|
|
178
|
+
* <Popover.Trigger>
|
|
179
|
+
* {(props) => <Button {...props}>Open form</Button>}
|
|
180
|
+
* </Popover.Trigger>
|
|
181
|
+
* <Popover.Content>
|
|
182
|
+
* <TextField label="Name" />
|
|
183
|
+
* <Popover.Close>Done</Popover.Close>
|
|
184
|
+
* </Popover.Content>
|
|
185
|
+
* </Popover>
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* <Popover openOnHover role="dialog">
|
|
189
|
+
* <Popover.Button>Hover me</Popover.Button>
|
|
190
|
+
* <Popover.Content>Hover content</Popover.Content>
|
|
191
|
+
* </Popover>
|
|
192
|
+
*/
|
|
193
|
+
export declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<unknown>> & {
|
|
194
|
+
/**
|
|
195
|
+
* PopoverTrigger component for creating custom trigger elements.
|
|
196
|
+
*
|
|
197
|
+
* Features:
|
|
198
|
+
* - Render prop pattern for full control over the trigger element
|
|
199
|
+
* - ARIA attributes and event handlers injected via getReferenceProps
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* <Popover.Trigger>
|
|
203
|
+
* {(props) => (
|
|
204
|
+
* <Button {...props}>
|
|
205
|
+
* Click to open popover
|
|
206
|
+
* </Button>
|
|
207
|
+
* )}
|
|
208
|
+
* </Popover.Trigger>
|
|
209
|
+
*/
|
|
210
|
+
Trigger: typeof PopoverTrigger;
|
|
211
|
+
/**
|
|
212
|
+
* PopoverContent component for the main popover content area.
|
|
213
|
+
*
|
|
214
|
+
* Features:
|
|
215
|
+
* - HTML Popover API top-layer rendering (popover="manual")
|
|
216
|
+
* - Floating UI positioning via refs.setFloating and floatingStyles
|
|
217
|
+
* - FloatingFocusManager for focus trapping (modal) or Tab-out closing (non-modal)
|
|
218
|
+
* - Arrow/caret indicator with position computed from middlewareData.arrow
|
|
219
|
+
* - Scroll position reset when the popover opens
|
|
220
|
+
* - Optional scrollerRef for external scroll access
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* <Popover.Content>
|
|
224
|
+
* <p>Popover content</p>
|
|
225
|
+
* <Popover.Close>Close</Popover.Close>
|
|
226
|
+
* </Popover.Content>
|
|
227
|
+
*/
|
|
228
|
+
Content: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "popover"> & {
|
|
229
|
+
scrollerRef?: import('react').RefObject<HTMLDivElement>;
|
|
230
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
231
|
+
/**
|
|
232
|
+
* PopoverClose component for closing the popover.
|
|
233
|
+
*
|
|
234
|
+
* Features:
|
|
235
|
+
* - Supports all Button component props and styling
|
|
236
|
+
* - Closes the popover on click via closePopover
|
|
237
|
+
* - Automatic tracking ID generation for analytics
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* <Popover.Close>Close</Popover.Close>
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* <Popover.Close appearance="secondary" size="small">
|
|
244
|
+
* Cancel
|
|
245
|
+
* </Popover.Close>
|
|
246
|
+
*/
|
|
247
|
+
Close: import('react').ForwardRefExoticComponent<import('./PopoverClose').PopoverCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
248
|
+
/**
|
|
249
|
+
* PopoverButton component for creating button-style triggers.
|
|
250
|
+
*
|
|
251
|
+
* Features:
|
|
252
|
+
* - Button styling and behavior with all Button props
|
|
253
|
+
* - ARIA attributes and event handlers injected via getReferenceProps
|
|
254
|
+
* - Automatic tracking ID generation for analytics
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* <Popover.Button>Click to open</Popover.Button>
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* <Popover.Button appearance="primary" size="large" icon={InfoIcon}>
|
|
261
|
+
* Information
|
|
262
|
+
* </Popover.Button>
|
|
263
|
+
*/
|
|
264
|
+
Button: import('react').ForwardRefExoticComponent<import('./PopoverButton').PopoverButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
265
|
+
};
|
|
266
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonProps } from '../../../components/Button';
|
|
2
|
+
import { DataTrackingId } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PopoverButton component.
|
|
5
|
+
* @extends ButtonProps
|
|
6
|
+
*/
|
|
7
|
+
export type PopoverButtonProps = ButtonProps & DataTrackingId;
|
|
8
|
+
/**
|
|
9
|
+
* PopoverButton component for creating button-style triggers.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Button styling and behavior with all Button props
|
|
13
|
+
* - ARIA attributes and event handlers injected via getReferenceProps
|
|
14
|
+
* - Automatic tracking ID generation for analytics
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Popover.Button>Click to open</Popover.Button>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Popover.Button appearance="primary" size="large" icon={InfoIcon}>
|
|
21
|
+
* Information
|
|
22
|
+
* </Popover.Button>
|
|
23
|
+
*/
|
|
24
|
+
export declare const PopoverButton: import('react').ForwardRefExoticComponent<PopoverButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonProps } from '../../../components/Button';
|
|
2
|
+
import { DataTrackingId } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the PopoverClose component.
|
|
5
|
+
* @extends ButtonProps
|
|
6
|
+
*/
|
|
7
|
+
export type PopoverCloseProps = ButtonProps & DataTrackingId;
|
|
8
|
+
/**
|
|
9
|
+
* PopoverClose component for closing the popover.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Supports all Button component props and styling
|
|
13
|
+
* - Closes the popover on click via closePopover
|
|
14
|
+
* - Automatic tracking ID generation for analytics
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Popover.Close>Close</Popover.Close>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Popover.Close appearance="secondary" size="small">
|
|
21
|
+
* Cancel
|
|
22
|
+
* </Popover.Close>
|
|
23
|
+
*/
|
|
24
|
+
export declare const PopoverClose: import('react').ForwardRefExoticComponent<PopoverCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, HTMLAttributes, RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the PopoverContent component.
|
|
4
|
+
* @extends ComponentPropsWithoutRef<"div">
|
|
5
|
+
*/
|
|
6
|
+
export type PopoverContentProps = Omit<ComponentPropsWithoutRef<"div">, "popover"> & {
|
|
7
|
+
/** Reference to the scrollable content area. */
|
|
8
|
+
scrollerRef?: RefObject<HTMLDivElement>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* PopoverContent component for the main popover content area.
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - HTML Popover API top-layer rendering (popover="manual")
|
|
15
|
+
* - Floating UI positioning via refs.setFloating and floatingStyles
|
|
16
|
+
* - FloatingFocusManager for focus trapping (modal) or Tab-out closing (non-modal)
|
|
17
|
+
* - Arrow/caret indicator with position computed from middlewareData.arrow
|
|
18
|
+
* - Scroll position reset when the popover opens
|
|
19
|
+
* - Optional scrollerRef for external scroll access
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Popover.Content>
|
|
23
|
+
* <p>Popover content</p>
|
|
24
|
+
* <Popover.Close>Close</Popover.Close>
|
|
25
|
+
* </Popover.Content>
|
|
26
|
+
*/
|
|
27
|
+
export declare const PopoverContent: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "popover"> & {
|
|
28
|
+
/** Reference to the scrollable content area. */
|
|
29
|
+
scrollerRef?: RefObject<HTMLDivElement>;
|
|
30
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AriaAttributes, ReactElement, MouseEvent, KeyboardEvent, FocusEvent } from 'react';
|
|
2
|
+
/** Props passed to the PopoverTrigger render function. */
|
|
3
|
+
type PopoverTriggerChildrenProps = {
|
|
4
|
+
ref: (node: Element | null) => void;
|
|
5
|
+
id: string;
|
|
6
|
+
"aria-controls"?: string;
|
|
7
|
+
"aria-haspopup"?: AriaAttributes["aria-haspopup"];
|
|
8
|
+
"aria-expanded"?: boolean;
|
|
9
|
+
"data-state": "open" | "closed";
|
|
10
|
+
onClick?: (e: MouseEvent) => void;
|
|
11
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
12
|
+
onMouseEnter?: (e: MouseEvent) => void;
|
|
13
|
+
onMouseLeave?: (e: MouseEvent) => void;
|
|
14
|
+
onFocus?: (e: FocusEvent) => void;
|
|
15
|
+
onBlur?: (e: FocusEvent) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Props for the PopoverTrigger component.
|
|
19
|
+
*/
|
|
20
|
+
export type PopoverTriggerProps = {
|
|
21
|
+
/**
|
|
22
|
+
* Render function that receives trigger props and returns a React element.
|
|
23
|
+
*/
|
|
24
|
+
children: (props: PopoverTriggerChildrenProps) => ReactElement;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* PopoverTrigger component for creating custom trigger elements.
|
|
28
|
+
*
|
|
29
|
+
* Features:
|
|
30
|
+
* - Render prop pattern for full control over the trigger element
|
|
31
|
+
* - ARIA attributes and event handlers injected via getReferenceProps
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <Popover.Trigger>
|
|
35
|
+
* {(props) => (
|
|
36
|
+
* <Button {...props}>
|
|
37
|
+
* Click to open popover
|
|
38
|
+
* </Button>
|
|
39
|
+
* )}
|
|
40
|
+
* </Popover.Trigger>
|
|
41
|
+
*/
|
|
42
|
+
export declare function PopoverTrigger(props: PopoverTriggerProps): ReactElement<any, string | import('react').JSXElementConstructor<any>>;
|
|
43
|
+
export declare namespace PopoverTrigger {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './Popover';
|
|
2
|
+
export { type PopoverButtonProps } from './PopoverButton';
|
|
3
|
+
export { type PopoverCloseProps } from './PopoverClose';
|
|
4
|
+
export { type PopoverContentProps } from './PopoverContent';
|
|
5
|
+
export { type PopoverTriggerProps } from './PopoverTrigger';
|
|
6
|
+
export { Popover as default } from './Popover';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CSSProperties, RefObject, HTMLProps } from 'react';
|
|
2
|
+
import { FloatingContext, MiddlewareData, Placement } from '@floating-ui/react';
|
|
3
|
+
import { PopoverRole } from '../Popover';
|
|
4
|
+
export type PopoverContextProps = {
|
|
5
|
+
/** Context object from useFloating; required by FloatingFocusManager and interaction hooks. */
|
|
6
|
+
floatingContext: FloatingContext;
|
|
7
|
+
/** Callback refs from useFloating; setReference for the trigger, setFloating for the content. */
|
|
8
|
+
refs: {
|
|
9
|
+
setReference: (node: Element | null) => void;
|
|
10
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
11
|
+
};
|
|
12
|
+
/** Inline positioning styles from useFloating; applied to the content element. */
|
|
13
|
+
floatingStyles: CSSProperties;
|
|
14
|
+
/** Middleware output from useFloating; used for arrow positioning via middlewareData.arrow. */
|
|
15
|
+
middlewareData: MiddlewareData;
|
|
16
|
+
/** Merged prop getter for the trigger; spreads ARIA attributes and event handlers. */
|
|
17
|
+
getReferenceProps: (userProps?: HTMLProps<Element>) => Record<string, unknown>;
|
|
18
|
+
/** Merged prop getter for the content; spreads ARIA attributes and event handlers. */
|
|
19
|
+
getFloatingProps: (userProps?: HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
20
|
+
/** Auto-generated id for the trigger element; used as the default aria-labelledby on content. */
|
|
21
|
+
triggerId: string;
|
|
22
|
+
/** Current open/closed state. */
|
|
23
|
+
openState: boolean;
|
|
24
|
+
/** Opens the popover. */
|
|
25
|
+
openPopover: () => void;
|
|
26
|
+
/** Closes the popover. Fires onClose unless opened via hover. */
|
|
27
|
+
closePopover: () => void;
|
|
28
|
+
/** Whether the open state is externally controlled. */
|
|
29
|
+
controlled: boolean;
|
|
30
|
+
/** Resolved placement after flip/shift middleware; may differ from the placement prop. */
|
|
31
|
+
actualPlacement: Placement;
|
|
32
|
+
/** Ref attached to the arrow span element inside PopoverContent. */
|
|
33
|
+
arrowRef: RefObject<HTMLSpanElement>;
|
|
34
|
+
/** Whether the popover traps focus (modal) or closes on Tab-out (non-modal). Only applies when role is "dialog". */
|
|
35
|
+
modal?: boolean;
|
|
36
|
+
/** Whether the popover opens on hover/focus instead of click. Only applies when role is "dialog". */
|
|
37
|
+
openOnHover: boolean;
|
|
38
|
+
/** Whether to remove default padding from the content area. */
|
|
39
|
+
noPadding?: boolean;
|
|
40
|
+
/** Whether to hide the arrow/caret indicator. */
|
|
41
|
+
disableCaret?: boolean;
|
|
42
|
+
/** The ARIA role of the popup. Drives FloatingFocusManager and ARIA attribute behavior. */
|
|
43
|
+
role: PopoverRole;
|
|
44
|
+
};
|
|
45
|
+
export declare const PopoverContext: import('react').Context<PopoverContextProps | null>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the PopoverContext for use within Popover compound components.
|
|
3
|
+
* @returns The current PopoverContextProps value.
|
|
4
|
+
* @throws Error if called outside a Popover component.
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePopoverContext(): import('./PopoverContext').PopoverContextProps;
|
|
@@ -24,10 +24,11 @@ function getBreakpointFlags(name) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
function breakpoint(name, min, max) {
|
|
27
|
-
if (globalThis.
|
|
27
|
+
if (globalThis.innerWidth == null || globalThis.innerHeight == null) {
|
|
28
28
|
return void 0;
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const viewportWidth = globalThis.innerWidth;
|
|
31
|
+
const viewportHeight = globalThis.innerHeight;
|
|
31
32
|
if ((min == null || viewportWidth >= min) && (max == null || viewportWidth < max)) {
|
|
32
33
|
return {
|
|
33
34
|
name,
|
|
@@ -65,4 +66,4 @@ const useBreakpoint = (props) => {
|
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
export { useBreakpoint as u };
|
|
68
|
-
//# sourceMappingURL=useBreakpoint-
|
|
69
|
+
//# sourceMappingURL=useBreakpoint-okJ64T1D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint-okJ64T1D.js","sources":["../src/hooks/useBreakpoint/useBreakpoint.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { core } from \"@servicetitan/hammer-token\";\n\nconst breakpoints = {\n sm: parseInt(core.primitive?.BreakpointSm.value),\n md: parseInt(core.primitive?.BreakpointMd.value),\n lg: parseInt(core.primitive?.BreakpointLg.value),\n xl: parseInt(core.primitive?.BreakpointXl.value),\n xxl: parseInt(core.primitive?.BreakpointXxl.value),\n};\n\nconst areBreakpointsDefined = Object.values(breakpoints).every(\n (breakpoint) => breakpoint,\n);\n\n/**\n * Return type for the useBreakpoint hook\n */\nexport type BreakpointReturnProps = {\n /**\n * The breakpoint name\n */\n name: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n /**\n * Minimum width for this breakpoint\n */\n min: number | undefined;\n /**\n * Maximum width for this breakpoint\n */\n max: number | undefined;\n /**\n * Current device orientation\n */\n orientation: \"portrait\" | \"landscape\";\n /**\n * Current viewport width in CSS pixels (from window.innerWidth)\n */\n innerWidth: number;\n /**\n * Current viewport height in CSS pixels (from window.innerHeight)\n */\n innerHeight: number;\n /**\n * True for all breakpoints (mobile-first: xs and above)\n */\n xs: boolean;\n /**\n * True when viewport width >= 640px (mobile-first: sm and above)\n */\n sm: boolean;\n /**\n * True when viewport width >= 768px (mobile-first: md and above)\n */\n md: boolean;\n /**\n * True when viewport width >= 1024px (mobile-first: lg and above)\n */\n lg: boolean;\n /**\n * True when viewport width >= 1280px (mobile-first: xl and above)\n */\n xl: boolean;\n /**\n * True when viewport width >= 1536px (mobile-first: xxl and above)\n */\n xxl: boolean;\n};\n\n/**\n * Calculates mobile-first breakpoint boolean values based on the current breakpoint name.\n * Each property is true when the viewport is at or above that breakpoint.\n *\n * @param name - The current breakpoint name\n * @returns Object with boolean flags for each breakpoint\n */\nfunction getBreakpointFlags(name: BreakpointReturnProps[\"name\"]) {\n const breakpointOrder = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"] as const;\n const currentIndex = breakpointOrder.indexOf(name);\n\n return {\n xs: currentIndex >= 0,\n sm: currentIndex >= 1,\n md: currentIndex >= 2,\n lg: currentIndex >= 3,\n xl: currentIndex >= 4,\n xxl: currentIndex >= 5,\n };\n}\n\n/**\n * Determines if the current viewport matches a specific breakpoint\n * @param name - The breakpoint name\n * @param min - Minimum width for this breakpoint\n * @param max - Maximum width for this breakpoint\n * @returns Breakpoint information if matched, undefined otherwise\n */\nfunction breakpoint(\n name: BreakpointReturnProps[\"name\"],\n min?: number,\n max?: number,\n): BreakpointReturnProps | undefined {\n if (globalThis.innerWidth == null || globalThis.innerHeight == null) {\n return undefined;\n }\n\n const viewportWidth = globalThis.innerWidth;\n const viewportHeight = globalThis.innerHeight;\n\n if (\n (min == null || viewportWidth >= min) &&\n (max == null || viewportWidth < max)\n ) {\n return {\n name,\n min,\n max,\n orientation: viewportHeight > viewportWidth ? \"portrait\" : \"landscape\",\n innerWidth: viewportWidth,\n innerHeight: viewportHeight,\n ...getBreakpointFlags(name),\n } as const;\n }\n\n return undefined;\n}\n\n/**\n * Determines the current breakpoint based on viewport width and hammer-token breakpoint values.\n *\n * Features:\n * - Validates that all required hammer-token breakpoint values are available\n * - Uses cascade logic to determine the appropriate breakpoint\n * - Returns the first matching breakpoint in order of preference\n * - Handles edge cases where breakpoint values are missing\n * - Uses window.innerWidth/innerHeight for viewport measurements\n * - Supports all standard breakpoints (xs, sm, md, lg, xl, xxl)\n *\n * @returns Current breakpoint information or undefined if breakpoint values are unavailable\n */\nconst onResize = () => {\n if (!areBreakpointsDefined) {\n return;\n }\n\n const { sm, md, lg, xl, xxl } = breakpoints;\n\n return (\n breakpoint(\"xs\", undefined, sm) ??\n breakpoint(\"sm\", sm, md) ??\n breakpoint(\"md\", md, lg) ??\n breakpoint(\"lg\", lg, xl) ??\n breakpoint(\"xl\", xl, xxl) ??\n breakpoint(\"xxl\", xxl, undefined)\n );\n};\n\n/**\n * Custom hook for detecting current breakpoint and viewport information.\n *\n * Features:\n * - Detects current breakpoint based on viewport width\n * - Supports all standard breakpoints (xs, sm, md, lg, xl, xxl)\n * - Provides mobile-first boolean props (e.g., `lg` is true for lg, xl, and xxl)\n * - Provides device orientation information\n * - Returns current viewport dimensions\n * - Uses hammer-token breakpoint values for consistency\n * - Listens for window resize events\n * - Supports optional disable functionality\n * - Uses window.innerWidth/innerHeight for viewport measurements\n *\n * @example\n * ```tsx\n * const breakpoint = useBreakpoint();\n * // Mobile-first approach:\n * <div className={cn({ 'p-block-4': breakpoint?.lg })} />\n * ```\n *\n * @param props - Optional configuration object\n * @param props.disable - Whether to disable the hook\n * @returns Current breakpoint information or undefined if disabled\n */\nexport const useBreakpoint = (props?: { disable?: boolean }) => {\n const [size, setSize] = useState(onResize);\n\n useEffect(() => {\n if (!areBreakpointsDefined || props?.disable) return;\n\n const updateSize = () => {\n setSize(onResize());\n };\n\n globalThis.addEventListener(\"resize\", updateSize);\n\n return () => {\n globalThis.removeEventListener(\"resize\", updateSize);\n };\n }, [props?.disable]);\n\n if (props?.disable) return;\n\n return size;\n};\n"],"names":["core.primitive?.BreakpointSm","core.primitive?.BreakpointMd","core.primitive?.BreakpointLg","core.primitive?.BreakpointXl","core.primitive?.BreakpointXxl","breakpoint"],"mappings":"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"}
|
package/dist/useBreakpoint.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { u as default, u as useBreakpoint } from './useBreakpoint-
|
|
1
|
+
export { u as default, u as useBreakpoint } from './useBreakpoint-okJ64T1D.js';
|
|
2
2
|
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -3,11 +3,11 @@ import * as React from 'react';
|
|
|
3
3
|
import React__default, { forwardRef, useEffect, useRef, useCallback } from 'react';
|
|
4
4
|
import { g as getAugmentedNamespace, c as cx } from './index-SvGbrGuT.js';
|
|
5
5
|
import { d as drillDownStyles } from './DrillDown.module-C8VOhzaF.js';
|
|
6
|
-
import { t as tabbable, f as focusable, i as isTabbable, g as getTabIndex, a as isFocusable, b as index_esm } from './index.esm-
|
|
6
|
+
import { t as tabbable, f as focusable, i as isTabbable, g as getTabIndex, a as isFocusable, b as index_esm } from './index.esm-BZV0wNKZ.js';
|
|
7
7
|
import { u as useDrillDownContext } from './useDrillDownContext-BssSasVB.js';
|
|
8
|
-
import { F as Flex } from './Flex-
|
|
9
|
-
import { B as Button } from './Button-
|
|
10
|
-
import { T as Text } from './Text-
|
|
8
|
+
import { F as Flex } from './Flex-DZu-_z-U.js';
|
|
9
|
+
import { B as Button } from './Button-DuvaXRZ5.js';
|
|
10
|
+
import { T as Text } from './Text-BqES2rv3.js';
|
|
11
11
|
import { S as SvgClose } from './close-DZj38AEh.js';
|
|
12
12
|
import { c as childrenToString } from './childrenToString-Bz9MqbHb.js';
|
|
13
13
|
import { useTrackingId } from './useTrackingId.js';
|
|
@@ -1857,4 +1857,4 @@ function useDrillDown() {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
|
|
1859
1859
|
export { DrillDown as D, DrillDownHeader as a, DrillDownContent as b, DrillDownFooter as c, DrillDownNextButton as d, DrillDownPrevButton as e, useDrillDown as u };
|
|
1860
|
-
//# sourceMappingURL=useDrilldown-
|
|
1860
|
+
//# sourceMappingURL=useDrilldown-CuvPT4gS.js.map
|