@12-apps/ui 6.79.0 → 6.80.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/dist/_internal/components/data-display/AlertDialog/AlertDialog.js +3 -3
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.parts.js +2 -1
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +6 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -1
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +8 -8
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +8 -8
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +26 -25
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +38 -37
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +9 -9
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +7 -6
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +12 -11
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +23 -22
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +12 -11
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +10 -9
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +11 -10
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +3 -2
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +11 -10
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +16 -15
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +10 -9
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +1 -1
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +2 -1
- package/dist/_internal/components/data-display/ErrorState/ErrorState.js +2 -1
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +8 -8
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +1 -1
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +11 -10
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +2 -2
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -1
- package/dist/_internal/components/data-display/MapPreview/MapControlBar.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapPreview.helpers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +6 -6
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.parts.js +2 -1
- package/dist/_internal/components/data-display/Stepper/Stepper.js +2 -2
- package/dist/_internal/components/data-display/Table/Table.js +3 -3
- package/dist/_internal/components/data-display/Table/TableParts.hooks.js +2 -2
- package/dist/_internal/components/data-display/Table/TableParts.js +2 -2
- package/dist/_internal/components/data-display/Timeline/Timeline.js +2 -2
- package/dist/_internal/components/data-display/index.js +29 -29
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +5 -5
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +4 -4
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +6 -6
- package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +3 -3
- package/dist/_internal/components/feedback/Sonner/Sonner.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +3 -3
- package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
- package/dist/_internal/components/feedback/Toast/Toast.js +2 -2
- package/dist/_internal/components/feedback/index.js +13 -13
- package/dist/_internal/components/form/Command/Command.hooks.js +2 -1
- package/dist/_internal/components/form/Command/Command.js +4 -3
- package/dist/_internal/components/form/Command/Command.parts.js +2 -1
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +3 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +5 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +2 -1
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +3 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +2 -1
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.dom.js +2 -2
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.format.js +3 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.hooks.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +5 -5
- package/dist/_internal/components/form/index.js +13 -13
- package/dist/_internal/components/form/total-form/FormErrorSnackbar.js +3 -3
- package/dist/_internal/components/index.js +75 -74
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +2 -1
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -2
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +2 -1
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +2 -2
- package/dist/_internal/components/layout/Dashboard/Dashboard.js +2 -2
- package/dist/_internal/components/layout/Drawer/Drawer.js +2 -1
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -2
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.rail.js +1 -1
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +2 -1
- package/dist/_internal/components/layout/index.js +9 -8
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +2 -1
- package/dist/_internal/components/navigation/Breadcrumbs/Breadcrumbs.js +2 -1
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +4 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +5 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -2
- package/dist/_internal/components/navigation/index.js +15 -14
- package/dist/_internal/components/typography/Code/Code.js +2 -2
- package/dist/_internal/components/typography/index.js +2 -2
- package/dist/_internal/components/utility/AnimatedIcon/AnimatedIcon.js +2 -1
- package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.js +3 -2
- package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.parts.js +2 -1
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +2 -2
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +5 -5
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +4 -4
- package/dist/_internal/components/utility/index.js +8 -8
- package/dist/_internal/en-US.data-display.js +1 -1
- package/dist/_internal/en-US.labels.js +1 -1
- package/dist/_internal/pt-BR.data-display.js +1 -1
- package/dist/_internal/pt-BR.labels.js +1 -1
- package/dist/_internal/social-login-button/social-login-button.js +2 -1
- package/dist/_internal/user-avatar/user-avatar.js +3 -2
- package/dist/{chunk-LIWONEAU.js → chunk-3B7EJIG7.js} +2 -2
- package/dist/{chunk-GHXW6O5T.js → chunk-3LQLLL2J.js} +4 -4
- package/dist/chunk-3LQLLL2J.js.map +1 -0
- package/dist/{chunk-GJMWQUAD.js → chunk-3OWFUFZL.js} +6 -3
- package/dist/chunk-3OWFUFZL.js.map +1 -0
- package/dist/{chunk-V64USPG3.js → chunk-4JV46KXS.js} +3 -3
- package/dist/{chunk-UJT6AQHL.js → chunk-4NVEUJXK.js} +2 -2
- package/dist/{chunk-PBMCRDZI.js → chunk-4PREA2R5.js} +5 -2
- package/dist/chunk-4PREA2R5.js.map +1 -0
- package/dist/{chunk-YZX4DVRS.js → chunk-52UVUVYQ.js} +6 -3
- package/dist/chunk-52UVUVYQ.js.map +1 -0
- package/dist/{chunk-PIP7XII2.js → chunk-5JDY5W7O.js} +3 -3
- package/dist/{chunk-YJ6UQDA6.js → chunk-634Z7HGN.js} +6 -3
- package/dist/chunk-634Z7HGN.js.map +1 -0
- package/dist/{chunk-556LO6KA.js → chunk-6B7VZFAO.js} +2 -2
- package/dist/{chunk-FLTXJWOC.js → chunk-6EERXU6R.js} +2 -2
- package/dist/{chunk-TPGFR24B.js → chunk-6IVR5HFI.js} +6 -6
- package/dist/{chunk-J26ZWYQI.js → chunk-6KCJNERH.js} +2 -2
- package/dist/{chunk-AXZCCX7O.js → chunk-6S7CFH6V.js} +2 -2
- package/dist/{chunk-3XLSA3YB.js → chunk-763AHWKU.js} +2 -2
- package/dist/{chunk-6MGYPTAL.js → chunk-7DODMQRK.js} +2 -2
- package/dist/{chunk-C4OETF7K.js → chunk-7H5BIZ33.js} +3 -3
- package/dist/{chunk-UGYBN6OO.js → chunk-7HYLXERK.js} +4 -4
- package/dist/{chunk-M3ZNQTS5.js → chunk-7S3NG2AO.js} +4 -4
- package/dist/{chunk-WE43PZ4P.js → chunk-7UDQJOZZ.js} +2 -2
- package/dist/{chunk-3ZWCKCZC.js → chunk-A7LBWRRW.js} +5 -2
- package/dist/chunk-A7LBWRRW.js.map +1 -0
- package/dist/{chunk-5GLOEGOM.js → chunk-ABJOW7EK.js} +2 -2
- package/dist/{chunk-GPPUKDA6.js → chunk-AFSXC5FU.js} +2 -2
- package/dist/{chunk-G2IVONJD.js → chunk-AISCD6W6.js} +2 -2
- package/dist/{chunk-ZYKDUKAH.js → chunk-B2RNNJRO.js} +7 -4
- package/dist/chunk-B2RNNJRO.js.map +1 -0
- package/dist/{chunk-HPEBSLYP.js → chunk-B67KUCWU.js} +2 -2
- package/dist/{chunk-CYKINZKO.js → chunk-BFBCTF2Y.js} +2 -2
- package/dist/{chunk-WUW6NDXC.js → chunk-BLVFHVDM.js} +7 -7
- package/dist/{chunk-GHGZI7PK.js → chunk-BMVLTTTC.js} +6 -3
- package/dist/{chunk-GHGZI7PK.js.map → chunk-BMVLTTTC.js.map} +1 -1
- package/dist/{chunk-UG4EMHMW.js → chunk-BTDY2NYV.js} +2 -2
- package/dist/{chunk-KE74C2SM.js → chunk-C2I7NQC4.js} +2 -2
- package/dist/{chunk-LR473BUT.js → chunk-C7LHIDVB.js} +3 -3
- package/dist/{chunk-V45JGJ3W.js → chunk-CFDYQSN6.js} +3 -3
- package/dist/{chunk-BJ7NWZWO.js → chunk-D4LMRSY7.js} +2 -2
- package/dist/{chunk-GPQ22MPR.js → chunk-DB7OJM6X.js} +2 -2
- package/dist/{chunk-66BRUS2M.js → chunk-DD3VFDB2.js} +2 -2
- package/dist/{chunk-J2RUDZVJ.js → chunk-DE2GWZ6X.js} +5 -2
- package/dist/chunk-DE2GWZ6X.js.map +1 -0
- package/dist/{chunk-JKNKGGOG.js → chunk-DKRMOIX2.js} +7 -1
- package/dist/chunk-DKRMOIX2.js.map +1 -0
- package/dist/{chunk-CSQWPDQV.js → chunk-DT22MDC3.js} +4 -4
- package/dist/{chunk-7HKXTRTK.js → chunk-DWCH6GH5.js} +2 -2
- package/dist/{chunk-NTO5DALI.js → chunk-DWLSYFQW.js} +5 -2
- package/dist/chunk-DWLSYFQW.js.map +1 -0
- package/dist/{chunk-F742IMLQ.js → chunk-EXKK73UN.js} +5 -2
- package/dist/chunk-EXKK73UN.js.map +1 -0
- package/dist/{chunk-4MKVGSHX.js → chunk-F5SUBK42.js} +6 -3
- package/dist/chunk-F5SUBK42.js.map +1 -0
- package/dist/{chunk-5KNDAC24.js → chunk-FCCOUOP7.js} +8 -2
- package/dist/chunk-FCCOUOP7.js.map +1 -0
- package/dist/{chunk-5MAD6ZEI.js → chunk-G3SWMBZS.js} +2 -2
- package/dist/{chunk-P3QFJJJY.js → chunk-GHTVBYFA.js} +3 -3
- package/dist/{chunk-RRSLH2FV.js → chunk-GLAAX5JJ.js} +7 -2
- package/dist/chunk-GLAAX5JJ.js.map +1 -0
- package/dist/{chunk-XLTHZI5W.js → chunk-GX2LIB4T.js} +6 -3
- package/dist/chunk-GX2LIB4T.js.map +1 -0
- package/dist/{chunk-RKVS5AA6.js → chunk-H3NXDKFH.js} +7 -4
- package/dist/chunk-H3NXDKFH.js.map +1 -0
- package/dist/{chunk-47VRDPR2.js → chunk-HFZE2PGM.js} +5 -2
- package/dist/chunk-HFZE2PGM.js.map +1 -0
- package/dist/{chunk-5MMAV7XK.js → chunk-HWKBCLKD.js} +4 -2
- package/dist/chunk-HWKBCLKD.js.map +1 -0
- package/dist/{chunk-IASPZGYB.js → chunk-HWUFOII2.js} +3 -3
- package/dist/chunk-HWUFOII2.js.map +1 -0
- package/dist/{chunk-VMU52I5D.js → chunk-J7CIRTWQ.js} +8 -3
- package/dist/chunk-J7CIRTWQ.js.map +1 -0
- package/dist/{chunk-MBY7DWGT.js → chunk-JJNY5MZL.js} +2 -2
- package/dist/{chunk-EF4DVYD2.js → chunk-JMUZ5JZA.js} +2 -2
- package/dist/{chunk-NUUX4BBR.js → chunk-JQSF3CUR.js} +7 -2
- package/dist/chunk-JQSF3CUR.js.map +1 -0
- package/dist/{chunk-KYE7I6NT.js → chunk-KSOIFQJ6.js} +4 -4
- package/dist/{chunk-JSY234NY.js → chunk-KW2KCPZF.js} +2 -2
- package/dist/{chunk-RNQA7MDM.js → chunk-LDPN55AA.js} +2 -2
- package/dist/{chunk-U6XXAVBO.js → chunk-LHRAHDJF.js} +2 -2
- package/dist/{chunk-VQ6UB4MN.js → chunk-MKRJUT5O.js} +3 -3
- package/dist/{chunk-CXTRDTNM.js → chunk-NF5TATKP.js} +4 -4
- package/dist/{chunk-NA3M7KDE.js → chunk-NGXDOWUP.js} +2 -2
- package/dist/{chunk-EVYLJ5JB.js → chunk-NSS3X7FK.js} +2 -2
- package/dist/{chunk-RECD3XOL.js → chunk-NWNHSASQ.js} +2 -2
- package/dist/{chunk-W5PRZHLU.js → chunk-O2RXSXSF.js} +74 -3
- package/dist/chunk-O2RXSXSF.js.map +1 -0
- package/dist/{chunk-VMN6KG2U.js → chunk-OCLEKMBP.js} +3 -3
- package/dist/chunk-OCLEKMBP.js.map +1 -0
- package/dist/{chunk-HBP2OU4Q.js → chunk-OOCD2QR3.js} +4 -3
- package/dist/chunk-OOCD2QR3.js.map +1 -0
- package/dist/{chunk-URAXAKUI.js → chunk-OT4HIG7S.js} +3 -3
- package/dist/{chunk-K53XSVQO.js → chunk-OTION43A.js} +8 -4
- package/dist/chunk-OTION43A.js.map +1 -0
- package/dist/{chunk-H6R2L7VI.js → chunk-PAKLYZ6G.js} +2 -2
- package/dist/{chunk-SYSR2K2M.js → chunk-PF2A2IM7.js} +2 -2
- package/dist/{chunk-SRNBD6EV.js → chunk-PGBIUO2A.js} +2 -2
- package/dist/{chunk-QDRHIK2R.js → chunk-QK3XXPBA.js} +2 -2
- package/dist/{chunk-A6V7KE45.js → chunk-QVEJGFRP.js} +3 -3
- package/dist/{chunk-73OYC22L.js → chunk-RMZQHJEP.js} +2 -2
- package/dist/{chunk-VBGC7G4F.js → chunk-RQ3IS5NQ.js} +2 -2
- package/dist/{chunk-7S25RDE4.js → chunk-SCQARHMU.js} +2 -2
- package/dist/{chunk-47IAX6PI.js → chunk-SEUJNFOD.js} +2 -2
- package/dist/{chunk-RQMYEPRR.js → chunk-SM2O6D5F.js} +2 -2
- package/dist/{chunk-AAWVAQI2.js → chunk-SXNGH56D.js} +2 -2
- package/dist/{chunk-V7INHV5V.js → chunk-SYZVXWEQ.js} +3 -3
- package/dist/{chunk-DX5PLJKN.js → chunk-TAR5LSGT.js} +2 -2
- package/dist/{chunk-VFVATUC6.js → chunk-TGZ6GPYQ.js} +3 -3
- package/dist/{chunk-25HBYY4O.js → chunk-TLVKJBPM.js} +2 -2
- package/dist/{chunk-BGTG7G54.js → chunk-TLZR6UPJ.js} +6 -3
- package/dist/chunk-TLZR6UPJ.js.map +1 -0
- package/dist/{chunk-XLCVMRSO.js → chunk-U67CX4FL.js} +12 -4
- package/dist/chunk-U67CX4FL.js.map +1 -0
- package/dist/{chunk-PU3FQG7T.js → chunk-UCQRJTCI.js} +2 -2
- package/dist/{chunk-I2CT4XIP.js → chunk-UF4JFRLE.js} +3 -3
- package/dist/{chunk-4N3I7ZHQ.js → chunk-URAX2JPM.js} +6 -3
- package/dist/chunk-URAX2JPM.js.map +1 -0
- package/dist/{chunk-MGDCGNLC.js → chunk-UYNJ3FYE.js} +3 -3
- package/dist/{chunk-6SFJIW54.js → chunk-V65YK5DC.js} +2 -2
- package/dist/{chunk-VZVAP2ZR.js → chunk-V6DMNSW6.js} +4 -4
- package/dist/chunk-V6DMNSW6.js.map +1 -0
- package/dist/{chunk-CRFOAKQL.js → chunk-VAGGIRLA.js} +6 -3
- package/dist/chunk-VAGGIRLA.js.map +1 -0
- package/dist/{chunk-L35TCXFA.js → chunk-VRKNVZZQ.js} +74 -3
- package/dist/chunk-VRKNVZZQ.js.map +1 -0
- package/dist/{chunk-RZ3QMKM7.js → chunk-W3EVATBS.js} +2 -2
- package/dist/{chunk-CAHN7AMY.js → chunk-WWIYYXY3.js} +14 -7
- package/dist/chunk-WWIYYXY3.js.map +1 -0
- package/dist/{chunk-WOXWLJYR.js → chunk-XF47LPCF.js} +5 -2
- package/dist/chunk-XF47LPCF.js.map +1 -0
- package/dist/{chunk-3YLRR4JM.js → chunk-Y3YZBB74.js} +2 -2
- package/dist/{chunk-V37QIB7B.js → chunk-YMKSPW4T.js} +2 -2
- package/dist/{chunk-YOKUDQIJ.js → chunk-YOQAK2RN.js} +7 -3
- package/dist/chunk-YOQAK2RN.js.map +1 -0
- package/dist/{chunk-KYT5G4K7.js → chunk-Z52W7FEU.js} +2 -2
- package/dist/{chunk-3YCV4EP7.js → chunk-ZDBG7QG2.js} +3 -3
- package/dist/{chunk-7HZ6TJRH.js → chunk-ZT73ACK3.js} +2 -2
- package/dist/{chunk-TJO4CBYT.js → chunk-ZX3QMCYO.js} +6 -3
- package/dist/chunk-ZX3QMCYO.js.map +1 -0
- package/dist/data-display/AlertDialog.js +3 -3
- package/dist/data-display/AsyncStateContainer.js +6 -4
- package/dist/data-display/Avatar.js +2 -1
- package/dist/data-display/CardKit.js +9 -9
- package/dist/data-display/Carousel.js +4 -4
- package/dist/data-display/DataViews.js +38 -37
- package/dist/data-display/EmptyState.js +2 -1
- package/dist/data-display/ErrorState.js +2 -1
- package/dist/data-display/FleetMap.js +11 -10
- package/dist/data-display/LazyImage.js +2 -2
- package/dist/data-display/LoadingState.js +3 -1
- package/dist/data-display/MapPreview.js +6 -6
- package/dist/data-display/SectionOnboarding.js +4 -4
- package/dist/data-display/Sheet.js +4 -3
- package/dist/data-display/Stepper.js +2 -2
- package/dist/data-display/Table.js +3 -3
- package/dist/data-display/Timeline.js +2 -2
- package/dist/en-US.js +4 -4
- package/dist/feedback/ConfirmAction.js +7 -7
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/SequenceResolver.js +3 -3
- package/dist/feedback/Sonner.js +2 -2
- package/dist/feedback/StackedModal.js +3 -3
- package/dist/feedback/Toast.js +2 -2
- package/dist/form/Command.js +4 -3
- package/dist/form/DateRangePicker.js +5 -4
- package/dist/form/PhoneInput.js +2 -1
- package/dist/form/RichTextEditor.js +5 -5
- package/dist/form/total-form.js +3 -3
- package/dist/layout/ContentToolbar.js +6 -5
- package/dist/layout/Dashboard.js +2 -2
- package/dist/layout/Drawer.js +2 -1
- package/dist/layout/SettingsLayout.js +3 -2
- package/dist/layout/TableFilter.js +2 -1
- package/dist/locales.js +8 -8
- package/dist/native/chunks/{chunk-4SP3BDPZ.js → chunk-67CYDCHZ.js} +2 -2
- package/dist/native/chunks/{chunk-FGAX5BRS.js → chunk-7AVFQB6A.js} +7 -4
- package/dist/native/chunks/chunk-7AVFQB6A.js.map +1 -0
- package/dist/native/chunks/{chunk-SPK34J7Y.js → chunk-DUELD4HY.js} +74 -3
- package/dist/native/chunks/chunk-DUELD4HY.js.map +1 -0
- package/dist/native/data-display/Avatar.js +4 -1
- package/dist/native/data-display/Avatar.js.map +1 -1
- package/dist/native/data-display/Badge.js +3 -3
- package/dist/native/data-display/Chip.js +3 -3
- package/dist/native/data-display/EmptyState.js +3 -3
- package/dist/native/data-display/ErrorState.js +5 -3
- package/dist/native/data-display/ErrorState.js.map +1 -1
- package/dist/native/data-display/FleetMap.js +3 -3
- package/dist/native/data-display/LoadingState.js +16 -5
- package/dist/native/data-display/LoadingState.js.map +1 -1
- package/dist/native/feedback/Dialog.js +3 -3
- package/dist/native/form/Button.js +2 -2
- package/dist/native/form/Checkbox.js +3 -3
- package/dist/native/form/Input.js +1 -1
- package/dist/native/form/Switch.js +1 -1
- package/dist/navigation/AppHeader.js +8 -7
- package/dist/navigation/Breadcrumbs.js +2 -1
- package/dist/navigation/NavigationMenu.js +3 -3
- package/dist/navigation/SectionNav.js +5 -4
- package/dist/pt-BR.js +4 -4
- package/dist/social-login-button.js +2 -1
- package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DeleteViewDialog.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +11 -0
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts +6 -2
- package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/use-data-views-state.d.ts.map +1 -1
- package/dist/types/components/data-display/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/types/components/data-display/ErrorState/ErrorState.d.ts.map +1 -1
- package/dist/types/components/data-display/LoadingState/LoadingState.base.d.ts +7 -0
- package/dist/types/components/data-display/LoadingState/LoadingState.base.d.ts.map +1 -1
- package/dist/types/components/data-display/LoadingState/LoadingState.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.body.d.ts +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.body.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.types.d.ts +10 -0
- package/dist/types/components/data-display/Sheet/Sheet.types.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.d.ts.map +1 -1
- package/dist/types/components/form/Command/Command.hooks.d.ts.map +1 -1
- package/dist/types/components/form/Command/Command.parts.d.ts.map +1 -1
- package/dist/types/components/form/DateRangePicker/DateRangePicker.range.d.ts.map +1 -1
- package/dist/types/components/form/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/types/components/form/total-form/FormErrorSnackbar.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ColumnsMenu.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/FilterTrigger.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/MultiSelectDropdown.d.ts.map +1 -1
- package/dist/types/components/layout/Dashboard/Dashboard.d.ts +1 -1
- package/dist/types/components/layout/Dashboard/Dashboard.d.ts.map +1 -1
- package/dist/types/components/layout/Drawer/Drawer.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.rail.d.ts +3 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.rail.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.types.d.ts +6 -0
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.types.d.ts.map +1 -1
- package/dist/types/components/layout/TableFilter/TableFilter.d.ts.map +1 -1
- package/dist/types/components/navigation/AppHeader/AppHeader.identity.d.ts.map +1 -1
- package/dist/types/components/navigation/AppHeader/AppHeader.types.d.ts +5 -1
- package/dist/types/components/navigation/AppHeader/AppHeader.types.d.ts.map +1 -1
- package/dist/types/components/navigation/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/components/utility/AnimatedIcon/AnimatedIcon.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts +1 -0
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts.map +1 -1
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts +6 -0
- package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts.map +1 -1
- package/dist/types/copy/labels.d.ts +113 -2
- package/dist/types/copy/labels.d.ts.map +1 -1
- package/dist/types/en-US.data-display.d.ts.map +1 -1
- package/dist/types/en-US.labels.d.ts.map +1 -1
- package/dist/types/pt-BR.data-display.d.ts.map +1 -1
- package/dist/types/pt-BR.labels.d.ts.map +1 -1
- package/dist/types/social-login-button/social-login-button.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Avatar/Avatar.native.d.ts.map +1 -1
- package/dist/types-native/components/data-display/EmptyState/EmptyState.native.d.ts.map +1 -1
- package/dist/types-native/components/data-display/ErrorState/ErrorState.native.d.ts.map +1 -1
- package/dist/types-native/components/data-display/LoadingState/LoadingState.base.d.ts +7 -0
- package/dist/types-native/components/data-display/LoadingState/LoadingState.base.d.ts.map +1 -1
- package/dist/types-native/components/data-display/LoadingState/LoadingState.native.d.ts.map +1 -1
- package/dist/types-native/copy/labels.d.ts +113 -2
- package/dist/types-native/copy/labels.d.ts.map +1 -1
- package/dist/types-native/en-US.labels.d.ts.map +1 -1
- package/dist/types-native/utils/resolve-labels.d.ts +9 -0
- package/dist/types-native/utils/resolve-labels.d.ts.map +1 -0
- package/dist/typography/Code.js +2 -2
- package/dist/user-avatar.js +3 -2
- package/dist/utility/AnimatedIcon.js +2 -1
- package/dist/utility/InfiniteScroll.js +3 -2
- package/dist/utility/WorkflowStep.js +5 -5
- package/package.json +2 -2
- package/src/components/data-display/AlertDialog/AlertDialog.parts.tsx +3 -2
- package/src/components/data-display/Avatar/Avatar.native.tsx +2 -1
- package/src/components/data-display/Avatar/Avatar.tsx +2 -1
- package/src/components/data-display/DataViews/DeleteViewDialog.tsx +2 -2
- package/src/components/data-display/DataViews/data-views-copy.ts +11 -0
- package/src/components/data-display/DataViews/data-views-grid-helpers.tsx +8 -3
- package/src/components/data-display/DataViews/data-views-view-nav.tsx +2 -2
- package/src/components/data-display/DataViews/use-data-views-state.ts +3 -1
- package/src/components/data-display/EmptyState/EmptyState.native.tsx +3 -2
- package/src/components/data-display/EmptyState/EmptyState.tsx +3 -2
- package/src/components/data-display/ErrorState/ErrorState.native.tsx +2 -1
- package/src/components/data-display/ErrorState/ErrorState.tsx +2 -1
- package/src/components/data-display/LoadingState/LoadingState.base.ts +8 -0
- package/src/components/data-display/LoadingState/LoadingState.native.tsx +10 -5
- package/src/components/data-display/LoadingState/LoadingState.tsx +9 -3
- package/src/components/data-display/Sheet/Sheet.body.tsx +3 -0
- package/src/components/data-display/Sheet/Sheet.md +1 -0
- package/src/components/data-display/Sheet/Sheet.parts.tsx +4 -0
- package/src/components/data-display/Sheet/Sheet.types.ts +10 -0
- package/src/components/feedback/StackedModal/StackedModal.tsx +2 -1
- package/src/components/form/Command/Command.hooks.ts +3 -2
- package/src/components/form/Command/Command.parts.tsx +3 -2
- package/src/components/form/DateRangePicker/DateRangePicker.range.ts +2 -1
- package/src/components/form/PhoneInput/PhoneInput.tsx +3 -2
- package/src/components/form/total-form/FormErrorSnackbar.tsx +2 -1
- package/src/components/layout/ContentToolbar/ColumnsMenu.tsx +3 -2
- package/src/components/layout/ContentToolbar/FilterTrigger.tsx +4 -1
- package/src/components/layout/ContentToolbar/MultiSelectDropdown.tsx +4 -3
- package/src/components/layout/Dashboard/Dashboard.tsx +4 -1
- package/src/components/layout/Drawer/Drawer.tsx +2 -1
- package/src/components/layout/SettingsLayout/SettingsLayout.md +1 -0
- package/src/components/layout/SettingsLayout/SettingsLayout.rail.tsx +9 -2
- package/src/components/layout/SettingsLayout/SettingsLayout.tsx +16 -5
- package/src/components/layout/SettingsLayout/SettingsLayout.types.ts +6 -0
- package/src/components/layout/TableFilter/TableFilter.tsx +4 -3
- package/src/components/navigation/AppHeader/AppHeader.identity.tsx +2 -1
- package/src/components/navigation/AppHeader/AppHeader.types.ts +5 -1
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +2 -1
- package/src/components/navigation/NavigationMenu/NavigationStandardBody.tsx +1 -1
- package/src/components/utility/AnimatedIcon/AnimatedIcon.tsx +2 -1
- package/src/components/utility/InfiniteScroll/InfiniteScroll.parts.tsx +6 -2
- package/src/components/utility/InfiniteScroll/InfiniteScroll.tsx +2 -1
- package/src/components/utility/InfiniteScroll/InfiniteScroll.types.ts +6 -0
- package/src/copy/labels.ts +131 -2
- package/src/en-US.data-display.ts +5 -0
- package/src/en-US.labels.ts +71 -0
- package/src/pt-BR.data-display.ts +5 -0
- package/src/pt-BR.labels.ts +71 -0
- package/src/social-login-button/social-login-button.tsx +3 -2
- package/dist/chunk-3ZWCKCZC.js.map +0 -1
- package/dist/chunk-47VRDPR2.js.map +0 -1
- package/dist/chunk-4MKVGSHX.js.map +0 -1
- package/dist/chunk-4N3I7ZHQ.js.map +0 -1
- package/dist/chunk-5KNDAC24.js.map +0 -1
- package/dist/chunk-5MMAV7XK.js.map +0 -1
- package/dist/chunk-BGTG7G54.js.map +0 -1
- package/dist/chunk-CAHN7AMY.js.map +0 -1
- package/dist/chunk-CRFOAKQL.js.map +0 -1
- package/dist/chunk-F742IMLQ.js.map +0 -1
- package/dist/chunk-GHXW6O5T.js.map +0 -1
- package/dist/chunk-GJMWQUAD.js.map +0 -1
- package/dist/chunk-HBP2OU4Q.js.map +0 -1
- package/dist/chunk-IASPZGYB.js.map +0 -1
- package/dist/chunk-J2RUDZVJ.js.map +0 -1
- package/dist/chunk-JKNKGGOG.js.map +0 -1
- package/dist/chunk-K53XSVQO.js.map +0 -1
- package/dist/chunk-L35TCXFA.js.map +0 -1
- package/dist/chunk-NTO5DALI.js.map +0 -1
- package/dist/chunk-NUUX4BBR.js.map +0 -1
- package/dist/chunk-PBMCRDZI.js.map +0 -1
- package/dist/chunk-RKVS5AA6.js.map +0 -1
- package/dist/chunk-RRSLH2FV.js.map +0 -1
- package/dist/chunk-TJO4CBYT.js.map +0 -1
- package/dist/chunk-VMN6KG2U.js.map +0 -1
- package/dist/chunk-VMU52I5D.js.map +0 -1
- package/dist/chunk-VZVAP2ZR.js.map +0 -1
- package/dist/chunk-W5PRZHLU.js.map +0 -1
- package/dist/chunk-WOXWLJYR.js.map +0 -1
- package/dist/chunk-XLCVMRSO.js.map +0 -1
- package/dist/chunk-XLTHZI5W.js.map +0 -1
- package/dist/chunk-YJ6UQDA6.js.map +0 -1
- package/dist/chunk-YOKUDQIJ.js.map +0 -1
- package/dist/chunk-YZX4DVRS.js.map +0 -1
- package/dist/chunk-ZYKDUKAH.js.map +0 -1
- package/dist/native/chunks/chunk-FGAX5BRS.js.map +0 -1
- package/dist/native/chunks/chunk-SPK34J7Y.js.map +0 -1
- /package/dist/{chunk-LIWONEAU.js.map → chunk-3B7EJIG7.js.map} +0 -0
- /package/dist/{chunk-V64USPG3.js.map → chunk-4JV46KXS.js.map} +0 -0
- /package/dist/{chunk-UJT6AQHL.js.map → chunk-4NVEUJXK.js.map} +0 -0
- /package/dist/{chunk-PIP7XII2.js.map → chunk-5JDY5W7O.js.map} +0 -0
- /package/dist/{chunk-556LO6KA.js.map → chunk-6B7VZFAO.js.map} +0 -0
- /package/dist/{chunk-FLTXJWOC.js.map → chunk-6EERXU6R.js.map} +0 -0
- /package/dist/{chunk-TPGFR24B.js.map → chunk-6IVR5HFI.js.map} +0 -0
- /package/dist/{chunk-J26ZWYQI.js.map → chunk-6KCJNERH.js.map} +0 -0
- /package/dist/{chunk-AXZCCX7O.js.map → chunk-6S7CFH6V.js.map} +0 -0
- /package/dist/{chunk-3XLSA3YB.js.map → chunk-763AHWKU.js.map} +0 -0
- /package/dist/{chunk-6MGYPTAL.js.map → chunk-7DODMQRK.js.map} +0 -0
- /package/dist/{chunk-C4OETF7K.js.map → chunk-7H5BIZ33.js.map} +0 -0
- /package/dist/{chunk-UGYBN6OO.js.map → chunk-7HYLXERK.js.map} +0 -0
- /package/dist/{chunk-M3ZNQTS5.js.map → chunk-7S3NG2AO.js.map} +0 -0
- /package/dist/{chunk-WE43PZ4P.js.map → chunk-7UDQJOZZ.js.map} +0 -0
- /package/dist/{chunk-5GLOEGOM.js.map → chunk-ABJOW7EK.js.map} +0 -0
- /package/dist/{chunk-GPPUKDA6.js.map → chunk-AFSXC5FU.js.map} +0 -0
- /package/dist/{chunk-G2IVONJD.js.map → chunk-AISCD6W6.js.map} +0 -0
- /package/dist/{chunk-HPEBSLYP.js.map → chunk-B67KUCWU.js.map} +0 -0
- /package/dist/{chunk-CYKINZKO.js.map → chunk-BFBCTF2Y.js.map} +0 -0
- /package/dist/{chunk-WUW6NDXC.js.map → chunk-BLVFHVDM.js.map} +0 -0
- /package/dist/{chunk-UG4EMHMW.js.map → chunk-BTDY2NYV.js.map} +0 -0
- /package/dist/{chunk-KE74C2SM.js.map → chunk-C2I7NQC4.js.map} +0 -0
- /package/dist/{chunk-LR473BUT.js.map → chunk-C7LHIDVB.js.map} +0 -0
- /package/dist/{chunk-V45JGJ3W.js.map → chunk-CFDYQSN6.js.map} +0 -0
- /package/dist/{chunk-BJ7NWZWO.js.map → chunk-D4LMRSY7.js.map} +0 -0
- /package/dist/{chunk-GPQ22MPR.js.map → chunk-DB7OJM6X.js.map} +0 -0
- /package/dist/{chunk-66BRUS2M.js.map → chunk-DD3VFDB2.js.map} +0 -0
- /package/dist/{chunk-CSQWPDQV.js.map → chunk-DT22MDC3.js.map} +0 -0
- /package/dist/{chunk-7HKXTRTK.js.map → chunk-DWCH6GH5.js.map} +0 -0
- /package/dist/{chunk-5MAD6ZEI.js.map → chunk-G3SWMBZS.js.map} +0 -0
- /package/dist/{chunk-P3QFJJJY.js.map → chunk-GHTVBYFA.js.map} +0 -0
- /package/dist/{chunk-MBY7DWGT.js.map → chunk-JJNY5MZL.js.map} +0 -0
- /package/dist/{chunk-EF4DVYD2.js.map → chunk-JMUZ5JZA.js.map} +0 -0
- /package/dist/{chunk-KYE7I6NT.js.map → chunk-KSOIFQJ6.js.map} +0 -0
- /package/dist/{chunk-JSY234NY.js.map → chunk-KW2KCPZF.js.map} +0 -0
- /package/dist/{chunk-RNQA7MDM.js.map → chunk-LDPN55AA.js.map} +0 -0
- /package/dist/{chunk-U6XXAVBO.js.map → chunk-LHRAHDJF.js.map} +0 -0
- /package/dist/{chunk-VQ6UB4MN.js.map → chunk-MKRJUT5O.js.map} +0 -0
- /package/dist/{chunk-CXTRDTNM.js.map → chunk-NF5TATKP.js.map} +0 -0
- /package/dist/{chunk-NA3M7KDE.js.map → chunk-NGXDOWUP.js.map} +0 -0
- /package/dist/{chunk-EVYLJ5JB.js.map → chunk-NSS3X7FK.js.map} +0 -0
- /package/dist/{chunk-RECD3XOL.js.map → chunk-NWNHSASQ.js.map} +0 -0
- /package/dist/{chunk-URAXAKUI.js.map → chunk-OT4HIG7S.js.map} +0 -0
- /package/dist/{chunk-H6R2L7VI.js.map → chunk-PAKLYZ6G.js.map} +0 -0
- /package/dist/{chunk-SYSR2K2M.js.map → chunk-PF2A2IM7.js.map} +0 -0
- /package/dist/{chunk-SRNBD6EV.js.map → chunk-PGBIUO2A.js.map} +0 -0
- /package/dist/{chunk-QDRHIK2R.js.map → chunk-QK3XXPBA.js.map} +0 -0
- /package/dist/{chunk-A6V7KE45.js.map → chunk-QVEJGFRP.js.map} +0 -0
- /package/dist/{chunk-73OYC22L.js.map → chunk-RMZQHJEP.js.map} +0 -0
- /package/dist/{chunk-VBGC7G4F.js.map → chunk-RQ3IS5NQ.js.map} +0 -0
- /package/dist/{chunk-7S25RDE4.js.map → chunk-SCQARHMU.js.map} +0 -0
- /package/dist/{chunk-47IAX6PI.js.map → chunk-SEUJNFOD.js.map} +0 -0
- /package/dist/{chunk-RQMYEPRR.js.map → chunk-SM2O6D5F.js.map} +0 -0
- /package/dist/{chunk-AAWVAQI2.js.map → chunk-SXNGH56D.js.map} +0 -0
- /package/dist/{chunk-V7INHV5V.js.map → chunk-SYZVXWEQ.js.map} +0 -0
- /package/dist/{chunk-DX5PLJKN.js.map → chunk-TAR5LSGT.js.map} +0 -0
- /package/dist/{chunk-VFVATUC6.js.map → chunk-TGZ6GPYQ.js.map} +0 -0
- /package/dist/{chunk-25HBYY4O.js.map → chunk-TLVKJBPM.js.map} +0 -0
- /package/dist/{chunk-PU3FQG7T.js.map → chunk-UCQRJTCI.js.map} +0 -0
- /package/dist/{chunk-I2CT4XIP.js.map → chunk-UF4JFRLE.js.map} +0 -0
- /package/dist/{chunk-MGDCGNLC.js.map → chunk-UYNJ3FYE.js.map} +0 -0
- /package/dist/{chunk-6SFJIW54.js.map → chunk-V65YK5DC.js.map} +0 -0
- /package/dist/{chunk-RZ3QMKM7.js.map → chunk-W3EVATBS.js.map} +0 -0
- /package/dist/{chunk-3YLRR4JM.js.map → chunk-Y3YZBB74.js.map} +0 -0
- /package/dist/{chunk-V37QIB7B.js.map → chunk-YMKSPW4T.js.map} +0 -0
- /package/dist/{chunk-KYT5G4K7.js.map → chunk-Z52W7FEU.js.map} +0 -0
- /package/dist/{chunk-3YCV4EP7.js.map → chunk-ZDBG7QG2.js.map} +0 -0
- /package/dist/{chunk-7HZ6TJRH.js.map → chunk-ZT73ACK3.js.map} +0 -0
- /package/dist/native/chunks/{chunk-4SP3BDPZ.js.map → chunk-67CYDCHZ.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/TableFilter/TableFilter.tsx"],"sourcesContent":["'use client';\n\nimport CloseIcon from '@mui/icons-material/Close';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Box from '@mui/material/Box/index.js';\nimport Checkbox from '@mui/material/Checkbox/index.js';\nimport Divider from '@mui/material/Divider/index.js';\nimport FormControlLabel from '@mui/material/FormControlLabel/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport InputAdornment from '@mui/material/InputAdornment/index.js';\nimport Link from '@mui/material/Link/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React, { useRef, useState } from 'react';\n\nimport { TableFilterContext, useTableFilterContext } from './TableFilterContext';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport type {\n TableFilterCheckboxFieldProps,\n TableFilterKeywordProps,\n TableFilterLayoutProps,\n TableFilterMainProps,\n TableFilterPanelProps,\n TableFilterProps,\n TableFilterRangeFieldProps,\n TableFilterSectionProps,\n} from './TableFilter.types';\nimport { fieldTextFieldStyles } from '../../../tokens/field-height';\nimport { sxRem } from '../../../tokens/relative';\n\n/** The open panel's width, 280 design px through the type scale. */\nconst PANEL_WIDTH = sxRem(280);\n\n/**\n * Compound filter-panel system, MUI port of the reference `TableFilter`. Provides\n * open/close state; `Panel` slides in from the right beside `Main` (no overlap).\n *\n * @example\n * ```tsx\n * <TableFilter open={open} onOpenChange={setOpen} hasActiveFilters={n > 0}>\n * <TableFilter.Layout>\n * <TableFilter.Main>{table}</TableFilter.Main>\n * <TableFilter.Panel onClearAll={clearAll}>\n * <TableFilter.Keyword value={q} onChange={setQ} />\n * <TableFilter.Section title=\"Attributes\">\n * <TableFilter.CheckboxField label=\"Category\" options={cats} selected={sel} onToggle={toggle} />\n * <TableFilter.RangeField label=\"Price\" unit=\"R$\" value={price} onChange={setPrice} />\n * </TableFilter.Section>\n * </TableFilter.Panel>\n * </TableFilter.Layout>\n * </TableFilter>\n * ```\n */\nexport function TableFilter({\n children,\n open,\n onOpenChange,\n hasActiveFilters = false,\n copy,\n}: TableFilterProps): React.JSX.Element {\n return (\n <TableFilterContext.Provider value={{ open, onOpenChange, hasActiveFilters, copy }}>\n {children}\n </TableFilterContext.Provider>\n );\n}\nTableFilter.displayName = 'TableFilter';\n\nconst TableFilterLayout = ({ children, className }: TableFilterLayoutProps): React.JSX.Element => {\n const { open } = useTableFilterContext();\n return (\n <Box\n className={className}\n sx={{\n display: 'flex',\n minHeight: 0,\n minWidth: 0,\n flex: 1,\n alignItems: 'stretch',\n overflow: 'hidden',\n gap: open ? 2 : 0,\n }}\n >\n {children}\n </Box>\n );\n};\nTableFilterLayout.displayName = 'TableFilter.Layout';\n\nconst TableFilterMain = ({ children, className }: TableFilterMainProps): React.JSX.Element => (\n <Box className={className} sx={{ minWidth: 0, flex: 1, overflowY: 'auto', overflowX: 'hidden' }}>\n {children}\n </Box>\n);\nTableFilterMain.displayName = 'TableFilter.Main';\n\nconst TableFilterPanel = ({\n children,\n onClearAll,\n ariaLabel = EN_US_UI_LABELS.tableFilter.filters,\n clearTestId,\n}: TableFilterPanelProps): React.JSX.Element => {\n const { open, copy } = useTableFilterContext();\n return (\n <Box\n component=\"aside\"\n aria-label={ariaLabel}\n aria-hidden={!open}\n sx={{\n display: 'flex',\n minHeight: 0,\n flexShrink: 0,\n flexDirection: 'column',\n alignSelf: 'stretch',\n overflow: 'hidden',\n bgcolor: 'background.paper',\n width: open ? PANEL_WIDTH : 0,\n borderLeft: open ? 1 : 0,\n borderColor: 'divider',\n transition: 'width 300ms ease-in-out',\n '@media (prefers-reduced-motion: reduce)': { transition: 'none' },\n }}\n >\n <Box\n sx={{\n display: 'flex',\n minHeight: 0,\n flex: 1,\n flexDirection: 'column',\n overflowY: 'auto',\n overflowX: 'hidden',\n visibility: open ? 'visible' : 'hidden',\n opacity: open ? 1 : 0,\n pointerEvents: open ? 'auto' : 'none',\n transition: 'opacity 200ms ease-out',\n }}\n >\n <Box sx={{ boxSizing: 'border-box', display: 'flex', width: '100%', minWidth: 0, flexDirection: 'column', gap: 2.5, p: 2 }}>\n <Box sx={{ display: 'flex', justifyContent: 'flex-end' }}>\n <Link\n component=\"button\"\n type=\"button\"\n underline=\"hover\"\n data-testid={clearTestId}\n onClick={onClearAll}\n sx={{ fontSize: sxRem(12), color: 'text.secondary' }}\n >\n {copy.clearAllFilters}\n </Link>\n </Box>\n {children}\n </Box>\n </Box>\n </Box>\n );\n};\nTableFilterPanel.displayName = 'TableFilter.Panel';\n\nconst TableFilterKeyword = ({\n value,\n onChange,\n placeholder = EN_US_UI_LABELS.tableFilter.keywordPlaceholder,\n label = EN_US_UI_LABELS.tableFilter.keywordLabel,\n testId,\n}: TableFilterKeywordProps): React.JSX.Element => {\n const { copy } = useTableFilterContext();\n const [draft, setDraft] = useState(value);\n const prevValue = useRef(value);\n if (prevValue.current !== value) {\n prevValue.current = value;\n if (draft !== value) setDraft(value);\n }\n\n const commit = (): void => {\n if (draft !== value) onChange(draft);\n };\n const clearKeyword = (): void => {\n setDraft('');\n if (value !== '') onChange('');\n };\n\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>\n <Typography component=\"label\" sx={{ fontSize: sxRem(12), fontWeight: 500, color: 'text.secondary' }}>\n {label}\n </Typography>\n <TextField\n size=\"small\"\n sx={fieldTextFieldStyles}\n name=\"keyword\"\n placeholder={placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={commit}\n onKeyDown={(event) => {\n if (event.key !== 'Enter') return;\n event.preventDefault();\n commit();\n }}\n inputProps={{ 'aria-label': label, 'data-testid': testId }}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon sx={{ fontSize: sxRem(16), color: 'text.secondary' }} />\n </InputAdornment>\n ),\n endAdornment:\n draft !== '' ? (\n <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n aria-label={copy.clearKeyword}\n data-testid={testId ? `${testId}-clear` : undefined}\n onMouseDown={(event) => event.preventDefault()}\n onClick={clearKeyword}\n >\n <CloseIcon sx={{ fontSize: sxRem(16) }} />\n </IconButton>\n </InputAdornment>\n ) : null,\n }}\n />\n </Box>\n );\n};\nTableFilterKeyword.displayName = 'TableFilter.Keyword';\n\nconst TableFilterSection = ({ title, children }: TableFilterSectionProps): React.JSX.Element => (\n <Box>\n <Divider sx={{ mb: 2.5 }} />\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5 }}>\n <Typography component=\"h2\" sx={{ fontSize: sxRem(14), fontWeight: 600, color: 'text.primary' }}>\n {title}\n </Typography>\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>{children}</Box>\n </Box>\n </Box>\n);\nTableFilterSection.displayName = 'TableFilter.Section';\n\nfunction TableFilterCheckboxField<TValue extends string = string>({\n label,\n options,\n selected,\n onToggle,\n testId,\n}: TableFilterCheckboxFieldProps<TValue>): React.JSX.Element {\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }} data-testid={testId}>\n <Typography sx={{ fontSize: sxRem(12), fontWeight: 500, color: 'text.secondary' }}>{label}</Typography>\n <Box sx={{ display: 'flex', flexDirection: 'column' }}>\n {options.map((option) => {\n const checked = selected.has(option.value);\n return (\n <FormControlLabel\n key={option.value}\n control={\n <Checkbox\n size=\"small\"\n checked={checked}\n onChange={(event) => onToggle(option.value, event.target.checked)}\n data-testid={testId ? `${testId}-${option.value}` : undefined}\n sx={{ py: 0.25 }}\n />\n }\n label={\n <Box component=\"span\" sx={{ fontSize: sxRem(14) }}>\n {option.label}\n {option.count != null && (\n <Box component=\"span\" sx={{ color: 'text.secondary' }}>\n {' '}\n ({option.count})\n </Box>\n )}\n </Box>\n }\n sx={{ ml: -0.5, mr: 0 }}\n />\n );\n })}\n </Box>\n </Box>\n );\n}\nTableFilterCheckboxField.displayName = 'TableFilter.CheckboxField';\n\nfunction parseBound(text: string): number | undefined {\n if (text.trim() === '') return undefined;\n const parsed = Number(text);\n return Number.isNaN(parsed) ? undefined : parsed;\n}\n\n/** One numeric bound input (min or max) for {@link TableFilterRangeField}. */\nfunction RangeBound({\n bound,\n error,\n placeholder,\n step,\n ariaLabel,\n testId,\n onChange,\n}: {\n bound: number | undefined;\n error: boolean;\n placeholder: string;\n step?: number;\n ariaLabel: string;\n testId?: string;\n onChange: (next: number | undefined) => void;\n}): React.JSX.Element {\n return (\n <TextField\n size=\"small\"\n sx={fieldTextFieldStyles}\n type=\"number\"\n error={error}\n placeholder={placeholder}\n value={bound != null ? String(bound) : ''}\n onChange={(event) => onChange(parseBound(event.target.value))}\n inputProps={{ step, 'aria-label': ariaLabel, 'data-testid': testId }}\n />\n );\n}\n\n/** Inverted range: both ends set and max < min (surfaced to the user as an error). */\nconst isRangeInverted = (value: { min?: number; max?: number }): boolean =>\n value.min != null && value.max != null && value.max < value.min;\n\nconst TableFilterRangeField = ({\n label,\n value,\n onChange,\n unit,\n step,\n minPlaceholder,\n maxPlaceholder,\n invalidLabel,\n testId,\n}: TableFilterRangeFieldProps): React.JSX.Element => {\n const { copy } = useTableFilterContext();\n const invalid = isRangeInverted(value);\n // A field may override any of the three; unset, they come from the root's\n // table. Neither path reaches an English literal in this package.\n const minText = minPlaceholder ?? copy.rangeMin;\n const maxText = maxPlaceholder ?? copy.rangeMax;\n const invalidText = invalidLabel ?? copy.invalidRange;\n return (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }} data-testid={testId}>\n <Typography sx={{ fontSize: sxRem(12), fontWeight: 500, color: 'text.secondary' }}>\n {label}\n {unit ? ` (${unit})` : ''}\n </Typography>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <RangeBound\n bound={value.min}\n error={invalid}\n placeholder={minText}\n step={step}\n ariaLabel={`${label} ${minText}`}\n testId={testId ? `${testId}-min` : undefined}\n onChange={(min) => onChange({ ...value, min })}\n />\n <Typography component=\"span\" sx={{ color: 'text.secondary' }}>\n –\n </Typography>\n <RangeBound\n bound={value.max}\n error={invalid}\n placeholder={maxText}\n step={step}\n ariaLabel={`${label} ${maxText}`}\n testId={testId ? `${testId}-max` : undefined}\n onChange={(max) => onChange({ ...value, max })}\n />\n </Box>\n {invalid && (\n <Typography\n role=\"alert\"\n data-testid={testId ? `${testId}-error` : undefined}\n sx={{ fontSize: sxRem(11.2), color: 'error.main' }}\n >\n {invalidText}\n </Typography>\n )}\n </Box>\n );\n};\nTableFilterRangeField.displayName = 'TableFilter.RangeField';\n\nTableFilter.Layout = TableFilterLayout;\nTableFilter.Main = TableFilterMain;\nTableFilter.Panel = TableFilterPanel;\nTableFilter.Keyword = TableFilterKeyword;\nTableFilter.Section = TableFilterSection;\nTableFilter.CheckboxField = TableFilterCheckboxField;\nTableFilter.RangeField = TableFilterRangeField;\n"],"mappings":";;;;;;;;;;;;;;;AAEA,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,aAAa;AACpB,OAAO,sBAAsB;AAC7B,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,UAAU;AACjB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAAgB,QAAQ,gBAAgB;AAgDpC,cA4EI,YA5EJ;AA9BJ,IAAM,cAAc,MAAM,GAAG;AAsBtB,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AACF,GAAwC;AACtC,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,MAAM,c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,YAAY,UAAU,KAAK,EAAE,GACvD;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM;AAAA,UACb,OAAO;AAAA,UACP,aAAa;AAAA,UACb;AAAA,UACA,WAAW,GAAG,KAAK,IAAI,OAAO;AAAA,UAC9B,QAAQ,SAAS,GAAG,MAAM,SAAS;AAAA,UACnC,UAAU,CAAC,QAAQ,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA;AAAA,MAC/C;AAAA,MACA,oBAAC,cAAW,WAAU,QAAO,IAAI,EAAE,OAAO,iBAAiB,GAAG,oBAE9D;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM;AAAA,UACb,OAAO;AAAA,UACP,aAAa;AAAA,UACb;AAAA,UACA,WAAW,GAAG,KAAK,IAAI,OAAO;AAAA,UAC9B,QAAQ,SAAS,GAAG,MAAM,SAAS;AAAA,UACnC,UAAU,CAAC,QAAQ,SAAS,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,IACC,WACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAa,SAAS,GAAG,MAAM,WAAW;AAAA,QAC1C,IAAI,EAAE,UAAU,MAAM,IAAI,GAAG,OAAO,aAAa;AAAA,QAEhD;AAAA;AAAA,IACH;AAAA,KAEJ;AAEJ;AACA,sBAAsB,cAAc;AAEpC,YAAY,SAAS;AACrB,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,YAAY,UAAU;AACtB,YAAY,gBAAgB;AAC5B,YAAY,aAAa;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
buildGridColumns,
|
|
3
3
|
buildRowActionsColumn,
|
|
4
4
|
isActionsColumn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3LQLLL2J.js";
|
|
6
6
|
|
|
7
7
|
// src/components/data-display/DataViews/data-views-columns.ts
|
|
8
8
|
import { useTheme } from "@mui/material/styles/index.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
useColumnsWithActions,
|
|
63
63
|
useRenderedColumns
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-B67KUCWU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EN_US_UI_LABELS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O2RXSXSF.js";
|
|
4
4
|
import {
|
|
5
5
|
modeInk,
|
|
6
6
|
neutralTones
|
|
@@ -217,4 +217,4 @@ Code.displayName = "Code";
|
|
|
217
217
|
export {
|
|
218
218
|
Code
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-BFBCTF2Y.js.map
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-LUNN5GTB.js";
|
|
4
4
|
import {
|
|
5
5
|
InlineFilterControls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DT22MDC3.js";
|
|
7
7
|
import {
|
|
8
8
|
GridHeaderRow
|
|
9
9
|
} from "./chunk-X3AFXHY5.js";
|
|
10
10
|
import {
|
|
11
11
|
GridMain
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KW2KCPZF.js";
|
|
13
13
|
import {
|
|
14
14
|
FilterDialog,
|
|
15
15
|
GridFilterPanel
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6IVR5HFI.js";
|
|
17
17
|
import {
|
|
18
18
|
DataViewsPagination
|
|
19
19
|
} from "./chunk-3W2B7IZG.js";
|
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
} from "./chunk-K3PMMW23.js";
|
|
34
34
|
import {
|
|
35
35
|
ShellToolbar
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-DB7OJM6X.js";
|
|
37
37
|
import {
|
|
38
38
|
SHELL_PROPS,
|
|
39
39
|
useStickyBarTop
|
|
40
40
|
} from "./chunk-4IE66GY2.js";
|
|
41
41
|
import {
|
|
42
42
|
togglePillValues
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-3LQLLL2J.js";
|
|
44
44
|
import {
|
|
45
45
|
DataViewsLayoutProvider,
|
|
46
46
|
useDataViewsLayout
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
} from "./chunk-KHG57NAE.js";
|
|
51
51
|
import {
|
|
52
52
|
TableFilter
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-B2RNNJRO.js";
|
|
54
54
|
import {
|
|
55
55
|
default as default2
|
|
56
56
|
} from "./chunk-WEBEOBN5.js";
|
|
@@ -251,4 +251,4 @@ function GridShell(props) {
|
|
|
251
251
|
export {
|
|
252
252
|
GridShell
|
|
253
253
|
};
|
|
254
|
-
//# sourceMappingURL=chunk-
|
|
254
|
+
//# sourceMappingURL=chunk-BLVFHVDM.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-CUMSPE6B.js";
|
|
14
14
|
import {
|
|
15
15
|
EN_US_UI_LABELS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O2RXSXSF.js";
|
|
17
17
|
import {
|
|
18
18
|
sxRem
|
|
19
19
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -171,7 +171,10 @@ var DashboardFilters = ({ children, className }) => {
|
|
|
171
171
|
};
|
|
172
172
|
DashboardFilters.displayName = "Dashboard.Filters";
|
|
173
173
|
DashboardFilters.dashboardSlot = "filters";
|
|
174
|
-
var DashboardMoreFilters = ({
|
|
174
|
+
var DashboardMoreFilters = ({
|
|
175
|
+
children,
|
|
176
|
+
label = EN_US_UI_LABELS.dashboard.moreFilters
|
|
177
|
+
}) => {
|
|
175
178
|
const { moreFiltersOpen, toggleMoreFilters, testIdPrefix } = useDashboardContext();
|
|
176
179
|
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
177
180
|
/* @__PURE__ */ jsx(
|
|
@@ -214,4 +217,4 @@ export {
|
|
|
214
217
|
markDashboardSlot,
|
|
215
218
|
Dashboard
|
|
216
219
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-BMVLTTTC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/Dashboard/Dashboard.tsx"],"sourcesContent":["'use client';\n\nimport ExpandLessIcon from '@mui/icons-material/ExpandLess';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport FilterIcon from '@mui/icons-material/FilterListRounded';\nimport NavigateNextIcon from '@mui/icons-material/NavigateNext';\nimport Box from '@mui/material/Box/index.js';\nimport MuiBreadcrumbs from '@mui/material/Breadcrumbs/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport MuiLink from '@mui/material/Link/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { useMemo, useState } from 'react';\n\nimport { DashboardContext, useDashboardContext } from './DashboardContext';\nimport {\n DashboardAction,\n DashboardActions,\n DashboardExport,\n DashboardFilterToggle,\n DashboardInfo,\n DashboardSettings,\n DashboardSpacer,\n} from './DashboardParts';\nimport type {\n DashboardBodyProps,\n DashboardBreadcrumbProps,\n DashboardFiltersProps,\n DashboardHeaderProps,\n DashboardMoreFiltersProps,\n DashboardProps,\n} from './Dashboard.types';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { sxRem } from '../../../tokens/relative';\n\n/**\n * Ordered slot keys. The root reorders composed children into this sequence so\n * authoring order in JSX never matters — a `<Dashboard.Filters>` placed above\n * a `<Dashboard.Header>` still renders below it.\n */\nconst SLOT_ORDER = ['breadcrumb', 'header', 'filters', 'body'] as const;\n/** A slot a component can occupy in the canonical Dashboard order. */\nexport type DashboardSlot = (typeof SLOT_ORDER)[number];\n\n/** Marker attached to each sub-component so the root can rank it by slot. */\ntype SlottedComponent = { dashboardSlot?: DashboardSlot };\n\n/**\n * Tag a component with the Dashboard slot it occupies so the root ranks it in\n * canonical order. The root inspects only its DIRECT children's `type`, so a\n * page that wraps a `<Dashboard.Header>` (or any part) in its own component MUST\n * mark that wrapper — otherwise it counts as an unrecognised child and sinks\n * below the body. Returns the component for convenient inline use.\n *\n * @example\n * ```tsx\n * function ProductsHeader(props) {\n * return <Dashboard.Header title=\"Products\">{/* … *\\/}</Dashboard.Header>;\n * }\n * markDashboardSlot(ProductsHeader, 'header');\n * ```\n */\nexport function markDashboardSlot<T>(component: T, slot: DashboardSlot): T {\n (component as SlottedComponent).dashboardSlot = slot;\n return component;\n}\n\nconst Root = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n width: '100%',\n}));\n\nfunction slotRank(node: React.ReactNode): number {\n if (React.isValidElement(node)) {\n const slot = (node.type as SlottedComponent).dashboardSlot;\n if (slot) {\n const rank = SLOT_ORDER.indexOf(slot);\n if (rank >= 0) {\n return rank;\n }\n }\n }\n // Unknown / arbitrary children keep their relative position after the\n // recognised slots.\n return SLOT_ORDER.length;\n}\n\n/**\n * Composable page shell. `<Dashboard>` provides shared state through context\n * and renders whichever sub-components you compose — nothing is implied. Drop\n * in only the parts you need; omit `<Dashboard.Filters>` and there is simply no\n * filter UI.\n *\n * @example\n * ```tsx\n * <Dashboard activeFilterCount={2}>\n * <Dashboard.Breadcrumb items={[{ label: 'Admin', href: '/admin' }, { label: 'Products' }]} />\n * <Dashboard.Header title=\"Products\">\n * <Dashboard.Info>What this page does…</Dashboard.Info>\n * <Dashboard.FilterToggle />\n * <Dashboard.Settings>In development</Dashboard.Settings>\n * <Dashboard.Spacer />\n * <Dashboard.Export onExport={handleExport} />\n * <Dashboard.Action><Button variant=\"contained\">New product</Button></Dashboard.Action>\n * </Dashboard.Header>\n * <Dashboard.Filters>{/* search + pills *\\/}</Dashboard.Filters>\n * <Dashboard.Body>{table}</Dashboard.Body>\n * </Dashboard>\n * ```\n */\nexport const Dashboard = ({\n children,\n defaultFiltersVisible = true,\n activeFilterCount = 0,\n testIdPrefix = 'dashboard',\n className,\n}: DashboardProps): React.JSX.Element => {\n const [filtersVisible, setFiltersVisible] = useState(defaultFiltersVisible);\n const [moreFiltersOpen, setMoreFiltersOpen] = useState(false);\n\n const value = useMemo(\n () => ({\n filtersVisible,\n toggleFilters: () => setFiltersVisible((v) => !v),\n moreFiltersOpen,\n toggleMoreFilters: () => setMoreFiltersOpen((v) => !v),\n activeFilterCount,\n testIdPrefix,\n }),\n [filtersVisible, moreFiltersOpen, activeFilterCount, testIdPrefix],\n );\n\n // Stable sort recognised slots into canonical order, preserving the original\n // order of anything unrecognised.\n const ordered = useMemo(() => {\n const arr = React.Children.toArray(children);\n return arr\n .map((node, index) => ({ node, index, rank: slotRank(node) }))\n .sort((a, b) => (a.rank === b.rank ? a.index - b.index : a.rank - b.rank))\n .map((entry) => entry.node);\n }, [children]);\n\n return (\n <DashboardContext.Provider value={value}>\n <Root className={className} data-testid={testIdPrefix}>\n {ordered}\n </Root>\n </DashboardContext.Provider>\n );\n};\n\nDashboard.displayName = 'Dashboard';\n\n/* -------------------------------------------------------------------------- */\n/* Breadcrumb */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardBreadcrumb = ({\n items,\n renderLink,\n ariaLabel = EN_US_UI_LABELS.dashboard.breadcrumb,\n className,\n}: DashboardBreadcrumbProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <MuiBreadcrumbs\n separator={<NavigateNextIcon fontSize=\"small\" />}\n className={className}\n aria-label={ariaLabel}\n data-testid={`${testIdPrefix}-breadcrumb`}\n sx={{ fontSize: sxRem(14), color: 'text.secondary' }}\n >\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n if (isLast || !item.href) {\n return (\n <Typography\n key={`${item.label}-${index}`}\n component=\"span\"\n sx={{ fontSize: sxRem(14), color: isLast ? 'text.primary' : 'text.secondary' }}\n aria-current={isLast ? 'page' : undefined}\n >\n {item.label}\n </Typography>\n );\n }\n const linkContent = item.label;\n if (renderLink) {\n return <React.Fragment key={`${item.label}-${index}`}>{renderLink(item, linkContent)}</React.Fragment>;\n }\n return (\n <MuiLink\n key={`${item.label}-${index}`}\n href={item.href}\n underline=\"hover\"\n color=\"inherit\"\n sx={{ fontSize: sxRem(14) }}\n >\n {linkContent}\n </MuiLink>\n );\n })}\n </MuiBreadcrumbs>\n );\n};\nDashboardBreadcrumb.displayName = 'Dashboard.Breadcrumb';\n(DashboardBreadcrumb as SlottedComponent).dashboardSlot = 'breadcrumb';\n\n/* -------------------------------------------------------------------------- */\n/* Header + action parts */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardHeader = ({ title, children, className }: DashboardHeaderProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <Box\n className={className}\n data-testid={`${testIdPrefix}-header`}\n sx={{ display: 'flex', alignItems: 'center', gap: 1, flexWrap: 'wrap', minHeight: sxRem(40) }}\n >\n <Typography variant=\"h5\" component=\"h1\" sx={{ fontWeight: 600, mr: 0.5 }}>\n {title}\n </Typography>\n {children}\n </Box>\n );\n};\nDashboardHeader.displayName = 'Dashboard.Header';\n(DashboardHeader as SlottedComponent).dashboardSlot = 'header';\n\n/** Flexible spacer — everything composed after it is pushed to the right. */\n/* -------------------------------------------------------------------------- */\n/* Filters */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardFilters = ({ children, className }: DashboardFiltersProps): React.JSX.Element => {\n const { filtersVisible, testIdPrefix } = useDashboardContext();\n return (\n <Collapse in={filtersVisible} unmountOnExit data-testid={`${testIdPrefix}-filters`}>\n <Box\n className={className}\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 1.5,\n p: 2,\n borderRadius: 1,\n border: 1,\n borderColor: 'divider',\n bgcolor: 'action.hover',\n }}\n >\n {children}\n </Box>\n </Collapse>\n );\n};\nDashboardFilters.displayName = 'Dashboard.Filters';\n(DashboardFilters as SlottedComponent).dashboardSlot = 'filters';\n\nconst DashboardMoreFilters = ({ children, label = 'More filters' }: DashboardMoreFiltersProps): React.JSX.Element => {\n const { moreFiltersOpen, toggleMoreFilters, testIdPrefix } = useDashboardContext();\n return (\n <Box>\n <Button\n variant=\"text\"\n size=\"small\"\n startIcon={<FilterIcon fontSize=\"small\" />}\n endIcon={moreFiltersOpen ? <ExpandLessIcon fontSize=\"small\" /> : <ExpandMoreIcon fontSize=\"small\" />}\n onClick={toggleMoreFilters}\n aria-expanded={moreFiltersOpen}\n data-testid={`${testIdPrefix}-more-filters-toggle`}\n >\n {label}\n </Button>\n <Collapse in={moreFiltersOpen} unmountOnExit data-testid={`${testIdPrefix}-more-filters-panel`}>\n <Box sx={{ mt: 1.5, p: 2, borderRadius: 1, border: 1, borderColor: 'divider', bgcolor: 'background.paper' }}>\n {children}\n </Box>\n </Collapse>\n </Box>\n );\n};\nDashboardMoreFilters.displayName = 'Dashboard.MoreFilters';\n\n/* -------------------------------------------------------------------------- */\n/* Body */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardBody = ({ children, className }: DashboardBodyProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <Box className={className} data-testid={`${testIdPrefix}-body`}>\n {children}\n </Box>\n );\n};\nDashboardBody.displayName = 'Dashboard.Body';\n(DashboardBody as SlottedComponent).dashboardSlot = 'body';\n\n/* -------------------------------------------------------------------------- */\n/* Attach sub-components as dot-notation parts */\n/* -------------------------------------------------------------------------- */\n\nDashboard.Breadcrumb = DashboardBreadcrumb;\nDashboard.Header = DashboardHeader;\nDashboard.Spacer = DashboardSpacer;\nDashboard.Info = DashboardInfo;\nDashboard.FilterToggle = DashboardFilterToggle;\nDashboard.Settings = DashboardSettings;\nDashboard.Export = DashboardExport;\nDashboard.Action = DashboardAction;\nDashboard.Actions = DashboardActions;\nDashboard.Filters = DashboardF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,UAAU,UAAU;AACpB,UAAU,UAAU;AACpB,UAAU,cAAc;AACxB,UAAU,OAAO;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/Dashboard/Dashboard.tsx"],"sourcesContent":["'use client';\n\nimport ExpandLessIcon from '@mui/icons-material/ExpandLess';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport FilterIcon from '@mui/icons-material/FilterListRounded';\nimport NavigateNextIcon from '@mui/icons-material/NavigateNext';\nimport Box from '@mui/material/Box/index.js';\nimport MuiBreadcrumbs from '@mui/material/Breadcrumbs/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport MuiLink from '@mui/material/Link/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { useMemo, useState } from 'react';\n\nimport { DashboardContext, useDashboardContext } from './DashboardContext';\nimport {\n DashboardAction,\n DashboardActions,\n DashboardExport,\n DashboardFilterToggle,\n DashboardInfo,\n DashboardSettings,\n DashboardSpacer,\n} from './DashboardParts';\nimport type {\n DashboardBodyProps,\n DashboardBreadcrumbProps,\n DashboardFiltersProps,\n DashboardHeaderProps,\n DashboardMoreFiltersProps,\n DashboardProps,\n} from './Dashboard.types';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { sxRem } from '../../../tokens/relative';\n\n/**\n * Ordered slot keys. The root reorders composed children into this sequence so\n * authoring order in JSX never matters — a `<Dashboard.Filters>` placed above\n * a `<Dashboard.Header>` still renders below it.\n */\nconst SLOT_ORDER = ['breadcrumb', 'header', 'filters', 'body'] as const;\n/** A slot a component can occupy in the canonical Dashboard order. */\nexport type DashboardSlot = (typeof SLOT_ORDER)[number];\n\n/** Marker attached to each sub-component so the root can rank it by slot. */\ntype SlottedComponent = { dashboardSlot?: DashboardSlot };\n\n/**\n * Tag a component with the Dashboard slot it occupies so the root ranks it in\n * canonical order. The root inspects only its DIRECT children's `type`, so a\n * page that wraps a `<Dashboard.Header>` (or any part) in its own component MUST\n * mark that wrapper — otherwise it counts as an unrecognised child and sinks\n * below the body. Returns the component for convenient inline use.\n *\n * @example\n * ```tsx\n * function ProductsHeader(props) {\n * return <Dashboard.Header title=\"Products\">{/* … *\\/}</Dashboard.Header>;\n * }\n * markDashboardSlot(ProductsHeader, 'header');\n * ```\n */\nexport function markDashboardSlot<T>(component: T, slot: DashboardSlot): T {\n (component as SlottedComponent).dashboardSlot = slot;\n return component;\n}\n\nconst Root = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n width: '100%',\n}));\n\nfunction slotRank(node: React.ReactNode): number {\n if (React.isValidElement(node)) {\n const slot = (node.type as SlottedComponent).dashboardSlot;\n if (slot) {\n const rank = SLOT_ORDER.indexOf(slot);\n if (rank >= 0) {\n return rank;\n }\n }\n }\n // Unknown / arbitrary children keep their relative position after the\n // recognised slots.\n return SLOT_ORDER.length;\n}\n\n/**\n * Composable page shell. `<Dashboard>` provides shared state through context\n * and renders whichever sub-components you compose — nothing is implied. Drop\n * in only the parts you need; omit `<Dashboard.Filters>` and there is simply no\n * filter UI.\n *\n * @example\n * ```tsx\n * <Dashboard activeFilterCount={2}>\n * <Dashboard.Breadcrumb items={[{ label: 'Admin', href: '/admin' }, { label: 'Products' }]} />\n * <Dashboard.Header title=\"Products\">\n * <Dashboard.Info>What this page does…</Dashboard.Info>\n * <Dashboard.FilterToggle />\n * <Dashboard.Settings>In development</Dashboard.Settings>\n * <Dashboard.Spacer />\n * <Dashboard.Export onExport={handleExport} />\n * <Dashboard.Action><Button variant=\"contained\">New product</Button></Dashboard.Action>\n * </Dashboard.Header>\n * <Dashboard.Filters>{/* search + pills *\\/}</Dashboard.Filters>\n * <Dashboard.Body>{table}</Dashboard.Body>\n * </Dashboard>\n * ```\n */\nexport const Dashboard = ({\n children,\n defaultFiltersVisible = true,\n activeFilterCount = 0,\n testIdPrefix = 'dashboard',\n className,\n}: DashboardProps): React.JSX.Element => {\n const [filtersVisible, setFiltersVisible] = useState(defaultFiltersVisible);\n const [moreFiltersOpen, setMoreFiltersOpen] = useState(false);\n\n const value = useMemo(\n () => ({\n filtersVisible,\n toggleFilters: () => setFiltersVisible((v) => !v),\n moreFiltersOpen,\n toggleMoreFilters: () => setMoreFiltersOpen((v) => !v),\n activeFilterCount,\n testIdPrefix,\n }),\n [filtersVisible, moreFiltersOpen, activeFilterCount, testIdPrefix],\n );\n\n // Stable sort recognised slots into canonical order, preserving the original\n // order of anything unrecognised.\n const ordered = useMemo(() => {\n const arr = React.Children.toArray(children);\n return arr\n .map((node, index) => ({ node, index, rank: slotRank(node) }))\n .sort((a, b) => (a.rank === b.rank ? a.index - b.index : a.rank - b.rank))\n .map((entry) => entry.node);\n }, [children]);\n\n return (\n <DashboardContext.Provider value={value}>\n <Root className={className} data-testid={testIdPrefix}>\n {ordered}\n </Root>\n </DashboardContext.Provider>\n );\n};\n\nDashboard.displayName = 'Dashboard';\n\n/* -------------------------------------------------------------------------- */\n/* Breadcrumb */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardBreadcrumb = ({\n items,\n renderLink,\n ariaLabel = EN_US_UI_LABELS.dashboard.breadcrumb,\n className,\n}: DashboardBreadcrumbProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <MuiBreadcrumbs\n separator={<NavigateNextIcon fontSize=\"small\" />}\n className={className}\n aria-label={ariaLabel}\n data-testid={`${testIdPrefix}-breadcrumb`}\n sx={{ fontSize: sxRem(14), color: 'text.secondary' }}\n >\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n if (isLast || !item.href) {\n return (\n <Typography\n key={`${item.label}-${index}`}\n component=\"span\"\n sx={{ fontSize: sxRem(14), color: isLast ? 'text.primary' : 'text.secondary' }}\n aria-current={isLast ? 'page' : undefined}\n >\n {item.label}\n </Typography>\n );\n }\n const linkContent = item.label;\n if (renderLink) {\n return <React.Fragment key={`${item.label}-${index}`}>{renderLink(item, linkContent)}</React.Fragment>;\n }\n return (\n <MuiLink\n key={`${item.label}-${index}`}\n href={item.href}\n underline=\"hover\"\n color=\"inherit\"\n sx={{ fontSize: sxRem(14) }}\n >\n {linkContent}\n </MuiLink>\n );\n })}\n </MuiBreadcrumbs>\n );\n};\nDashboardBreadcrumb.displayName = 'Dashboard.Breadcrumb';\n(DashboardBreadcrumb as SlottedComponent).dashboardSlot = 'breadcrumb';\n\n/* -------------------------------------------------------------------------- */\n/* Header + action parts */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardHeader = ({ title, children, className }: DashboardHeaderProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <Box\n className={className}\n data-testid={`${testIdPrefix}-header`}\n sx={{ display: 'flex', alignItems: 'center', gap: 1, flexWrap: 'wrap', minHeight: sxRem(40) }}\n >\n <Typography variant=\"h5\" component=\"h1\" sx={{ fontWeight: 600, mr: 0.5 }}>\n {title}\n </Typography>\n {children}\n </Box>\n );\n};\nDashboardHeader.displayName = 'Dashboard.Header';\n(DashboardHeader as SlottedComponent).dashboardSlot = 'header';\n\n/** Flexible spacer — everything composed after it is pushed to the right. */\n/* -------------------------------------------------------------------------- */\n/* Filters */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardFilters = ({ children, className }: DashboardFiltersProps): React.JSX.Element => {\n const { filtersVisible, testIdPrefix } = useDashboardContext();\n return (\n <Collapse in={filtersVisible} unmountOnExit data-testid={`${testIdPrefix}-filters`}>\n <Box\n className={className}\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 1.5,\n p: 2,\n borderRadius: 1,\n border: 1,\n borderColor: 'divider',\n bgcolor: 'action.hover',\n }}\n >\n {children}\n </Box>\n </Collapse>\n );\n};\nDashboardFilters.displayName = 'Dashboard.Filters';\n(DashboardFilters as SlottedComponent).dashboardSlot = 'filters';\n\nconst DashboardMoreFilters = ({\n children,\n label = EN_US_UI_LABELS.dashboard.moreFilters,\n}: DashboardMoreFiltersProps): React.JSX.Element => {\n const { moreFiltersOpen, toggleMoreFilters, testIdPrefix } = useDashboardContext();\n return (\n <Box>\n <Button\n variant=\"text\"\n size=\"small\"\n startIcon={<FilterIcon fontSize=\"small\" />}\n endIcon={moreFiltersOpen ? <ExpandLessIcon fontSize=\"small\" /> : <ExpandMoreIcon fontSize=\"small\" />}\n onClick={toggleMoreFilters}\n aria-expanded={moreFiltersOpen}\n data-testid={`${testIdPrefix}-more-filters-toggle`}\n >\n {label}\n </Button>\n <Collapse in={moreFiltersOpen} unmountOnExit data-testid={`${testIdPrefix}-more-filters-panel`}>\n <Box sx={{ mt: 1.5, p: 2, borderRadius: 1, border: 1, borderColor: 'divider', bgcolor: 'background.paper' }}>\n {children}\n </Box>\n </Collapse>\n </Box>\n );\n};\nDashboardMoreFilters.displayName = 'Dashboard.MoreFilters';\n\n/* -------------------------------------------------------------------------- */\n/* Body */\n/* -------------------------------------------------------------------------- */\n\nconst DashboardBody = ({ children, className }: DashboardBodyProps): React.JSX.Element => {\n const { testIdPrefix } = useDashboardContext();\n return (\n <Box className={className} data-testid={`${testIdPrefix}-body`}>\n {children}\n </Box>\n );\n};\nDashboardBody.displayName = 'Dashboard.Body';\n(DashboardBody as SlottedComponent).dashboardSlot = 'body';\n\n/* -------------------------------------------------------------------------- */\n/* Attach sub-components as dot-notation parts */\n/* -------------------------------------------------------------------------- */\n\nDashboard.Breadcrumb = DashboardBreadcrumb;\nDashboard.Header = DashboardHeader;\nDashboard.Spacer = DashboardSpacer;\nDashboard.Info = DashboardInfo;\nDashboard.FilterToggle = DashboardFilterToggle;\nDashboard.Settings = DashboardSettings;\nDashboard.Export = DashboardExport;\nDashboard.Action = DashboardAction;\nDashboard.Actions = DashboardActions;\nDashboard.Filters = DashboardFilters;\nDashboard.MoreFilters = DashboardMoreFilters;\nDashboard.Body = DashboardBody;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,oBAAoB;AAC3B,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAA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ancedTableBody,
|
|
11
11
|
EnhancedTableHeader
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AISCD6W6.js";
|
|
13
13
|
import {
|
|
14
14
|
TABLE_DEFAULTS,
|
|
15
15
|
containerStyle,
|
|
@@ -310,4 +310,4 @@ Table.displayName = "Table";
|
|
|
310
310
|
export {
|
|
311
311
|
Table
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-BTDY2NYV.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CarouselArrows,
|
|
3
3
|
CarouselIndicators,
|
|
4
4
|
CarouselThumbnails
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QK3XXPBA.js";
|
|
6
6
|
|
|
7
7
|
// src/components/data-display/Carousel/Carousel.chrome.tsx
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -60,4 +60,4 @@ var CarouselChrome = ({
|
|
|
60
60
|
export {
|
|
61
61
|
CarouselChrome
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-C2I7NQC4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRichTextEditor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7UDQJOZZ.js";
|
|
4
4
|
import {
|
|
5
5
|
RichTextEditorToolbar
|
|
6
6
|
} from "./chunk-C465AAD5.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-LL2BWQPM.js";
|
|
10
10
|
import {
|
|
11
11
|
EN_US_UI_LABELS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O2RXSXSF.js";
|
|
13
13
|
import {
|
|
14
14
|
fieldEdge
|
|
15
15
|
} from "./chunk-7ZADLRLP.js";
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
RichTextEditor,
|
|
185
185
|
RichTextEditor_default
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-C7LHIDVB.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-LYVTJLCF.js";
|
|
8
8
|
import {
|
|
9
9
|
SheetBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HWKBCLKD.js";
|
|
11
11
|
import {
|
|
12
12
|
SheetOverlay
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DKRMOIX2.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_DRAG_RESISTANCE,
|
|
16
16
|
DEFAULT_VELOCITY_THRESHOLD,
|
|
@@ -143,4 +143,4 @@ var Sheet = (props) => {
|
|
|
143
143
|
export {
|
|
144
144
|
Sheet
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-CFDYQSN6.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-H2J2MTRE.js";
|
|
4
4
|
import {
|
|
5
5
|
EN_US_MAP_PREVIEW_COPY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GLAAX5JJ.js";
|
|
7
7
|
import {
|
|
8
8
|
rem
|
|
9
9
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -46,4 +46,4 @@ export {
|
|
|
46
46
|
resolveMapPreviewProps,
|
|
47
47
|
glassStyles
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-D4LMRSY7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridToolbar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7S3NG2AO.js";
|
|
4
4
|
|
|
5
5
|
// src/components/data-display/DataViews/data-views-shell-toolbar.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -68,4 +68,4 @@ function ShellToolbar({
|
|
|
68
68
|
export {
|
|
69
69
|
ShellToolbar
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-DB7OJM6X.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
MoreGroup,
|
|
3
3
|
MoreQuick,
|
|
4
4
|
fieldClearing
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZDBG7QG2.js";
|
|
6
6
|
import {
|
|
7
7
|
useDataViewsCopy
|
|
8
8
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -193,4 +193,4 @@ function MoreFilters({
|
|
|
193
193
|
export {
|
|
194
194
|
MoreFilters
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=chunk-
|
|
196
|
+
//# sourceMappingURL=chunk-DD3VFDB2.js.map
|
|
@@ -12,6 +12,9 @@ import {
|
|
|
12
12
|
GROUP_MAX,
|
|
13
13
|
GROUP_OVERLAP
|
|
14
14
|
} from "./chunk-6ZZGK5DT.js";
|
|
15
|
+
import {
|
|
16
|
+
EN_US_UI_LABELS
|
|
17
|
+
} from "./chunk-O2RXSXSF.js";
|
|
15
18
|
import {
|
|
16
19
|
rem
|
|
17
20
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -119,7 +122,7 @@ function useAvatarModel(raw, ref) {
|
|
|
119
122
|
clickable: interactive || !!onClick,
|
|
120
123
|
imgSrc: imageError ? void 0 : src,
|
|
121
124
|
alt,
|
|
122
|
-
ariaLabel: rest["aria-label"] || alt ||
|
|
125
|
+
ariaLabel: rest["aria-label"] || alt || EN_US_UI_LABELS.avatar.name,
|
|
123
126
|
content,
|
|
124
127
|
contentType,
|
|
125
128
|
className,
|
|
@@ -175,4 +178,4 @@ export {
|
|
|
175
178
|
Avatar,
|
|
176
179
|
AvatarGroup
|
|
177
180
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
181
|
+
//# sourceMappingURL=chunk-DE2GWZ6X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Avatar/Avatar.tsx"],"sourcesContent":["import BrokenImage from '@mui/icons-material/BrokenImage';\nimport Person from '@mui/icons-material/Person';\nimport { styled } from '@mui/material/styles/index.js';\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport {\n AVATAR_DEFAULTS,\n contentTypeOf,\n pickAvatarContent,\n type AvatarContentPick,\n} from './Avatar.helpers';\nimport { GROUP_MAX, GROUP_OVERLAP, GROUP_HOVER, BORDER_WIDTH } from './Avatar.metrics';\nimport type { AvatarProps, ContentType } from './Avatar.types';\nimport { rem } from '../../../tokens/relative';\nimport { AvatarView, type AvatarViewProps } from './Avatar.view';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\n\n/** The node behind the winning content slot; the pick itself is shared. */\nfunction resolveContent(args: {\n children?: React.ReactNode;\n fallback?: React.ReactNode;\n icon?: React.ReactNode;\n imageError: boolean;\n showFallbackOnError: boolean;\n}): { content: React.ReactNode; contentType: ContentType } {\n const { children, fallback, icon, imageError, showFallbackOnError } = args;\n const pick = pickAvatarContent({\n hasChildren: Boolean(children),\n hasFallback: Boolean(fallback),\n hasIcon: Boolean(icon),\n imageError,\n showFallbackOnError,\n });\n const NODES: Record<AvatarContentPick, React.ReactNode> = {\n children,\n fallback,\n icon,\n broken: <BrokenImage />,\n default: <Person />,\n };\n return { content: NODES[pick], contentType: contentTypeOf(pick) };\n}\n\n/** Fades the avatar in after `animationDelay`ms. */\nfunction useMountedFade(animationDelay: number): boolean {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n const timer = window.setTimeout(() => setMounted(true), animationDelay);\n return () => window.clearTimeout(timer);\n }, [animationDelay]);\n return mounted;\n}\n\ninterface ImageState {\n imageError: boolean;\n imageLoading: boolean;\n handleImageError: React.ReactEventHandler;\n handleImageLoad: () => void;\n}\n\n/**\n * Tracks the `<img>` load lifecycle. `imageLoading` starts true whenever there is\n * a `src` and clears on load/error — the handlers must be wired to the actual img\n * (via `slotProps.img` in the view), since load/error don't bubble to the root.\n */\nfunction useImageState(src: string | undefined, onError?: React.ReactEventHandler): ImageState {\n const [imageError, setImageError] = useState(false);\n const [imageLoading, setImageLoading] = useState(!!src);\n\n useEffect(() => {\n setImageError(false);\n setImageLoading(!!src);\n }, [src]);\n\n const handleImageError = useCallback<React.ReactEventHandler>(\n (event) => {\n setImageError(true);\n setImageLoading(false);\n onError?.(event);\n },\n [onError],\n );\n\n const handleImageLoad = useCallback(() => setImageLoading(false), []);\n\n return { imageError, imageLoading, handleImageError, handleImageLoad };\n}\n\n/** Normalizes props (defaults + rest passthrough) and derives everything the view needs. */\nfunction useAvatarModel(raw: AvatarProps, ref: React.Ref<HTMLDivElement>): AvatarViewProps {\n const {\n variant,\n size,\n glow,\n pulse,\n status,\n fallback,\n icon,\n bordered,\n color,\n src,\n alt,\n children,\n loading,\n onError,\n onClick,\n interactive,\n showFallbackOnError,\n animationDelay,\n className,\n dataTestId,\n // React Native's spelling of the same id; it names the component on both\n // sides and must not reach the DOM as an attribute.\n testID,\n ...rest\n } = { ...AVATAR_DEFAULTS, ...raw };\n\n const mounted = useMountedFade(animationDelay);\n const { imageError, imageLoading, handleImageError, handleImageLoad } = useImageState(src, onError);\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => onClick?.(event),\n [onClick],\n );\n const { content, contentType } = resolveContent({\n children,\n fallback,\n icon,\n imageError,\n showFallbackOnError,\n });\n\n return {\n mounted,\n variant,\n size,\n color,\n glow,\n pulse,\n bordered,\n showSpinner: loading || imageLoading,\n imageError,\n clickable: interactive || !!onClick,\n imgSrc: imageError ? undefined : src,\n alt,\n ariaLabel: (rest['aria-label'] as string) || alt || EN_US_UI_LABELS.avatar.name,\n content,\n contentType,\n className,\n dataTestId: testID ?? dataTestId,\n status,\n forwardedRef: ref,\n onClick: handleClick,\n handleImageError,\n handleImageLoad,\n rest,\n };\n}\n\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>((props, ref) => (\n <AvatarView {...useAvatarModel(props, ref)} />\n));\n\nAvatar.displayName = 'Avatar';\n\nconst AvatarGroupContainer = styled('div')<{ overlap?: number }>(({ theme, overlap = GROUP_OVERLAP }) => ({\n display: 'flex',\n alignItems: 'center',\n '& > *': {\n marginLeft: rem(theme, -overlap),\n transition: 'all 0.3s ease',\n position: 'relative',\n border: `${rem(theme, BORDER_WIDTH)} solid ${theme.palette.background.paper}`,\n '&:hover': {\n zIndex: 100,\n transform: `scale(${GROUP_HOVER.scale}) translateY(${rem(theme, -GROUP_HOVER.lift)})`,\n },\n '&:first-of-type': {\n marginLeft: 0,\n },\n },\n}));\n\n// Export AvatarGroup for grouped avatars\nexport const AvatarGroup: React.FC<{\n children: React.ReactNode;\n max?: number;\n overlap?: number;\n className?: string;\n dataTestId?: string;\n}> = ({ children, max = GROUP_MAX, overlap = GROUP_OVERLAP, className, dataTestId }) => {\n const childrenArray = React.Children.toArray(children);\n const visibleChildren = max ? childrenArray.slice(0, max) : childrenArray;\n const remainingCount = childrenArray.length - visibleChildren.length;\n\n return (\n <AvatarGroupContainer overlap={overlap} className={className} data-testid={dataTestId}>\n {visibleChildren}\n {remainingCount > 0 && (\n <Avatar\n size={(visibleChildren[0] as React.ReactElement<AvatarProps>)?.props?.size || 'md'}\n color=\"neutral\"\n fallback={`+${remainingCount}`}\n bordered\n dataTestId={dataTestId ? `${dataTestId}-overflow` : undefined}\n />\n )}\n </AvatarGroupContainer>\n );\n};\n\nAvatarGroup.displayName = 'AvatarGroup';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,iBAAiB;AACxB,OAAO,YAAY;AACnB,SAAS,cAAc;AACvB,OAAO,SAAS,aAAa,WAAW,gBAAgB;AAkC5C,cA8JR,YA9JQ;AAnBZ,SAAS,eAAe,MAMmC;AACzD,QAAM,EA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AA,EACZ,SAAS;AAAA,IACP,YAAY,IAAI,OAAO,CAAC,OAAO;AAAA,IAC/B,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,QAAQ,GAAG,IAAI,OAAO,YAAY,CAAC,UAAU,MAAM,QAAQ,WAAW,KAAK;AAAA,IAC3E,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,WAAW,SAAS,YAAY,KAAK,gBAAgB,IAAI,OAAO,CAAC,YAAY,IAAI,CAAC;AAAA,IACpF;AAAA,IACA,mBAAmB;AAAA,MACjB,YAAY;AAAA,IACd;AAAA,EACF;AACF,EAAE;AAGK,IAAM,cAMR,CAAC,EAAE,UAAU,MAAM,WAAW,UAAU,eAAe,WAAW,WAAW,MAAM;AACtF,QAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;AACrD,QAAM,kBAAkB,MAAM,cAAc,MAAM,GAAG,GAAG,IAAI;AAC5D,QAAM,iBAAiB,cAAc,SAAS,gBAAgB;AAE9D,SACE,qBAAC,wBAAqB,SAAkB,WAAsB,eAAa,YACxE;AAAA;AAAA,IACA,iBAAiB,KAChB;AAAA,MAAC;AAAA;AAAA,QACC,MAAO,gBAAgB,CAAC,GAAuC,OAAO,QAAQ;AAAA,QAC9E,OAAM;AAAA,QACN,UAAU,IAAI,cAAc;AAAA,QAC5B,UAAQ;AAAA,QACR,YAAY,aAAa,GAAG,UAAU,cAAc;AAAA;AAAA,IACtD;AAAA,KAEJ;AAEJ;AAEA,YAAY,cAAc;","names":[]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
shimmerAnimation
|
|
3
3
|
} from "./chunk-IM4DMKH4.js";
|
|
4
|
+
import {
|
|
5
|
+
EN_US_UI_LABELS
|
|
6
|
+
} from "./chunk-O2RXSXSF.js";
|
|
4
7
|
import {
|
|
5
8
|
withDefaults
|
|
6
9
|
} from "./chunk-HPK33ACY.js";
|
|
@@ -78,6 +81,7 @@ var SheetHandle = ({ isDraggable }) => {
|
|
|
78
81
|
);
|
|
79
82
|
};
|
|
80
83
|
var HEADER_DEFAULTS = {
|
|
84
|
+
closeLabel: EN_US_UI_LABELS.common.close,
|
|
81
85
|
isDraggable: false,
|
|
82
86
|
dataTestId: "sheet-header"
|
|
83
87
|
};
|
|
@@ -86,6 +90,7 @@ var SheetHeader = (props) => {
|
|
|
86
90
|
title,
|
|
87
91
|
description,
|
|
88
92
|
showCloseButton,
|
|
93
|
+
closeLabel,
|
|
89
94
|
onClose,
|
|
90
95
|
showHandle,
|
|
91
96
|
isDraggable,
|
|
@@ -121,6 +126,7 @@ var SheetHeader = (props) => {
|
|
|
121
126
|
IconButton,
|
|
122
127
|
{
|
|
123
128
|
onClick: onClose,
|
|
129
|
+
"aria-label": closeLabel,
|
|
124
130
|
size: "small",
|
|
125
131
|
sx: { ml: 1, mt: -0.5 },
|
|
126
132
|
"data-testid": `${dataTestId}-close-button`,
|
|
@@ -214,4 +220,4 @@ export {
|
|
|
214
220
|
SheetFooter,
|
|
215
221
|
SheetOverlay
|
|
216
222
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-DKRMOIX2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Sheet/Sheet.parts.tsx"],"sourcesContent":["import CloseIcon from '@mui/icons-material/Close';\nimport Backdrop from '@mui/material/Backdrop/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Divider from '@mui/material/Divider/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { scrim, sheen } from '../../../tokens/ink';\nimport { rem, rems } from '../../../tokens/relative';\nimport { withDefaults } from '../../../utils/withDefaults';\n\nimport { shimmerAnimation } from './Sheet.animations';\nimport type {\n SheetContentProps,\n SheetFooterProps,\n SheetHeaderProps,\n SheetOverlayProps,\n} from './Sheet.types';\n\n/**\n * The grab handle's own styling. A draggable handle is deliberately larger and\n * tinted, so the affordance reads as draggable before the user tries it; a\n * decorative one stays a neutral bar.\n */\nconst handleSx = (theme: Theme, isDraggable: boolean) => ({\n width: rem(theme, isDraggable ? 48 : 32),\n height: rem(theme, isDraggable ? 6 : 4),\n backgroundColor: alpha(theme.palette.text.primary, 0.3),\n borderRadius: 3,\n transition: theme.transitions.create(['all'], {\n duration: theme.transitions.duration.short,\n easing: theme.transitions.easing.easeInOut,\n }),\n position: 'relative',\n overflow: 'hidden',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: '-100%',\n width: '100%',\n height: '100%',\n background: `linear-gradient(\n 90deg,\n transparent,\n ${sheen(theme, 0.3)},\n transparent\n )`,\n animation: isDraggable ? `${shimmerAnimation(theme)} 2s infinite` : 'none',\n },\n ...(isDraggable && {\n backgroundColor: alpha(theme.palette.primary.main, 0.4),\n boxShadow: `${rems(theme, 0, 2, 4)} ${alpha(theme.palette.primary.main, 0.2)}`,\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n transform: 'scaleX(1.15) scaleY(1.2)',\n boxShadow: `${rems(theme, 0, 3, 6)} ${alpha(theme.palette.primary.main, 0.3)}`,\n },\n }),\n});\n\nconst SheetHandle: React.FC<{ isDraggable: boolean }> = ({ isDraggable }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n mb: 1,\n // The handle is decoration on a draggable header: the drag listeners sit\n // on the header itself, so letting the bar swallow the press would open\n // a dead zone in the middle of the grab target.\n pointerEvents: isDraggable ? 'none' : 'auto',\n }}\n >\n <Box sx={handleSx(theme, isDraggable)} />\n </Box>\n );\n};\n\nconst HEADER_DEFAULTS: Partial<SheetHeaderProps> = {\n closeLabel: EN_US_UI_LABELS.common.close,\n isDraggable: false,\n dataTestId: 'sheet-header',\n};\n\nexport const SheetHeader: React.FC<SheetHeaderProps> = (props) => {\n const {\n title,\n description,\n showCloseButton,\n closeLabel,\n onClose,\n showHandle,\n isDraggable,\n onDragStart,\n className,\n style,\n children,\n dataTestId,\n } = withDefaults(props, HEADER_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n pb: showHandle ? 1 : 2,\n cursor: isDraggable ? 'grab' : 'auto',\n '&:active': isDraggable ? { cursor: 'grabbing' } : {},\n ...style,\n }}\n onMouseDown={isDraggable ? onDragStart : undefined}\n onTouchStart={isDraggable ? onDragStart : undefined}\n >\n {showHandle && <SheetHandle isDraggable={Boolean(isDraggable)} />}\n\n <Box sx={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between' }}>\n <Box sx={{ flex: 1 }}>\n {title && (\n <Typography variant=\"h6\" sx={{ fontWeight: 600 }} data-testid={`${dataTestId}-title`}>\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mt: 0.5 }}>\n {description}\n </Typography>\n )}\n {children}\n </Box>\n\n {showCloseButton && (\n <IconButton\n onClick={onClose}\n aria-label={closeLabel}\n size=\"small\"\n sx={{ ml: 1, mt: -0.5 }}\n data-testid={`${dataTestId}-close-button`}\n >\n <CloseIcon data-testid={`${dataTestId}-close-icon`} />\n </IconButton>\n )}\n </Box>\n </Box>\n );\n};\n\nconst CONTENT_DEFAULTS: Partial<SheetContentProps> = {\n padded: true,\n dataTestId: 'sheet-content',\n};\n\nexport const SheetContent: React.FC<SheetContentProps> = (props) => {\n const { children, className, style, padded, dataTestId } = withDefaults(props, CONTENT_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n // No `minHeight: 0` here, deliberately: a flex item's automatic minimum\n // size only applies while its main-axis `overflow` is `visible`, and this\n // one is `auto`, so it already shrinks. `SheetBody` above is the item that\n // needs it stated.\n sx={{ flex: 1, overflow: 'auto', p: padded ? 2 : 0, ...style }}\n >\n {children}\n </Box>\n );\n};\n\nconst FOOTER_DEFAULTS: Partial<SheetFooterProps> = {\n sticky: false,\n divider: false,\n dataTestId: 'sheet-footer',\n};\n\nexport const SheetFooter: React.FC<SheetFooterProps> = (props) => {\n const { children, className, style, sticky, divider, dataTestId } = withDefaults(\n props,\n FOOTER_DEFAULTS,\n );\n\n return (\n <>\n {divider && <Divider />}\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n position: sticky ? 'sticky' : 'relative',\n bottom: sticky ? 0 : 'auto',\n backgroundColor: 'background.paper',\n borderTop: sticky ? '1px solid' : 'none',\n borderColor: 'divider',\n ...style,\n }}\n >\n {children}\n </Box>\n </>\n );\n};\n\nconst OVERLAY_DEFAULTS: Partial<SheetOverlayProps> = {\n open: false,\n blur: false,\n};\n\nexport const SheetOverlay: React.FC<SheetOverlayProps> = (props) => {\n const { open, onClick, className, style, blur, animated } = withDefaults(props, OVERLAY_DEFAULTS);\n const theme = useTheme();\n const timeout = animated === false ? 0 : 300;\n\n return (\n <Fade in={open} timeout={timeout}>\n <Backdrop\n open={Boolean(open)}\n transitionDuration={timeout}\n onClick={onClick}\n className={className}\n sx={{\n // One below the drawer, under the panel. Inside a Sheet this veil is\n // VISUAL only: the drawer's invisible backdrop above it catches the\n // tap (`ClickCatcher` in Sheet.tsx). The onClick keeps it usable alone.\n zIndex: theme.zIndex.drawer - 1,\n backgroundColor: scrim(theme, blur ? 0.6 : 0.5),\n backdropFilter: blur ? `blur(${rem(theme, 8)}) saturate(180%)` : 'none',\n WebkitBackdropFilter: blur ? `blur(${rem(theme, 8)}) saturate(180%)` : 'none',\n ...style,\n }}\n />\n </Fade>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,SAAS;AAChB,OAAO,aAAa;AACpB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAA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,CAAC,UAAU;AAClE,QAAM,EAAE,MAAM,SAAS,WAAW,OAAO,MAAM,SAAS,IAAI,aAAa,OAAO,gBAAgB;AAChG,QAAM,QAAQ,SAAS;AACvB,QAAM,UAAU,aAAa,QAAQ,IAAI;AAEzC,SACE,oBAAC,QAAK,IAAI,MAAM,SACd;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ,IAAI;AAAA,MAClB,oBAAoB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,IAAI;AAAA;AAAA;AAAA;AAAA,QAIF,QAAQ,MAAM,OAAO,SAAS;AAAA,QAC9B,iBAAiB,MAAM,OAAO,OAAO,MAAM,GAAG;AAAA,QAC9C,gBAAgB,OAAO,QAAQ,IAAI,OAAO,CAAC,CAAC,qBAAqB;AAAA,QACjE,sBAAsB,OAAO,QAAQ,IAAI,OAAO,CAAC,CAAC,qBAAqB;AAAA,QACvE,GAAG;AAAA,MACL;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-YH7G44WL.js";
|
|
5
5
|
import {
|
|
6
6
|
MoreFilters
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DD3VFDB2.js";
|
|
8
8
|
import {
|
|
9
9
|
PillControl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RMZQHJEP.js";
|
|
11
11
|
import {
|
|
12
12
|
isQuickActive
|
|
13
13
|
} from "./chunk-KYUEO2IO.js";
|
|
14
14
|
import {
|
|
15
15
|
RangePill
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4NVEUJXK.js";
|
|
17
17
|
import {
|
|
18
18
|
QuickChip
|
|
19
19
|
} from "./chunk-MHFXJRLD.js";
|
|
@@ -244,4 +244,4 @@ function FilterSlots({
|
|
|
244
244
|
export {
|
|
245
245
|
InlineFilterControls
|
|
246
246
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
247
|
+
//# sourceMappingURL=chunk-DT22MDC3.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-62SXUU5U.js";
|
|
9
9
|
import {
|
|
10
10
|
EN_US_UI_LABELS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O2RXSXSF.js";
|
|
12
12
|
import {
|
|
13
13
|
fieldHeight
|
|
14
14
|
} from "./chunk-QQHZBJMU.js";
|
|
@@ -278,4 +278,4 @@ LazyImage.displayName = "LazyImage";
|
|
|
278
278
|
export {
|
|
279
279
|
LazyImage
|
|
280
280
|
};
|
|
281
|
-
//# sourceMappingURL=chunk-
|
|
281
|
+
//# sourceMappingURL=chunk-DWCH6GH5.js.map
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
isoToMasked
|
|
7
7
|
} from "./chunk-62XVHRTX.js";
|
|
8
|
+
import {
|
|
9
|
+
EN_US_UI_LABELS
|
|
10
|
+
} from "./chunk-O2RXSXSF.js";
|
|
8
11
|
|
|
9
12
|
// src/components/form/DateRangePicker/DateRangePicker.range.ts
|
|
10
13
|
function resolveDayRange(draft, maxRangeDays) {
|
|
@@ -27,7 +30,7 @@ function defaultMessages() {
|
|
|
27
30
|
reversed: "The end date must be on or after the start date.",
|
|
28
31
|
overMax: ({ maxRangeDays }) => `Choose a range of at most ${maxRangeDays} days.`,
|
|
29
32
|
summary: ({ from, to }) => `${isoToMasked(from, dayMask)} \u2013 ${isoToMasked(to, dayMask)}`,
|
|
30
|
-
calendarLabel:
|
|
33
|
+
calendarLabel: EN_US_UI_LABELS.dateRangePicker.calendar,
|
|
31
34
|
dayMask
|
|
32
35
|
};
|
|
33
36
|
}
|
|
@@ -62,4 +65,4 @@ export {
|
|
|
62
65
|
resolveQuickRanges,
|
|
63
66
|
activeQuickRangeId
|
|
64
67
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-DWLSYFQW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/DateRangePicker/DateRangePicker.range.ts"],"sourcesContent":["/**\n * Judging a draft, and saying so in words.\n *\n * The picker never repairs what it is given. A reversed pair is not silently\n * swapped and an over-long one is not clipped to the cap: both are reported,\n * because a control that returns a different range from the one on screen is\n * indistinguishable from one that ignored you. The caller reads\n * {@link DateRangeStatus} and keeps its own confirm button shut.\n */\nimport { isoToMasked } from '../../data-display/DataViews/data-views-day-input';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\n\nimport { dayCount, isAfterDay } from './DateRangePicker.dates';\nimport type {\n DateRangePickerMessages,\n DateRangeDraft,\n DateRangeStatus,\n QuickRange,\n QuickRangeContext,\n ResolvedQuickRange,\n} from './DateRangePicker.types';\n\n/**\n * Whether a draft is a window this picker will hand over.\n *\n * Exported because the caller needs the same verdict the picker shows: a dialog\n * disabling its \"Apply\" button must not re-derive \"is this legal\" from the two\n * strings, or the two answers drift and the button ends up enabled over a\n * message saying the range is impossible.\n */\nexport function resolveDayRange(\n draft: DateRangeDraft,\n maxRangeDays?: number,\n): DateRangeStatus {\n const { from, to } = draft;\n if (!from || !to) return { ok: false, problem: 'incomplete', days: 0 };\n if (isAfterDay(from, to)) return { ok: false, problem: 'reversed', days: 0 };\n\n const days = dayCount(from, to);\n if (maxRangeDays !== undefined && days > maxRangeDays) {\n return { ok: false, problem: 'over-max', days };\n }\n return { ok: true, window: { from, to }, days };\n}\n\n/**\n * The English defaults.\n *\n * The summary prints the days in the SAME `dd/mm/aaaa` the two fields are\n * masked to, rather than in the host locale's order. One control cannot show\n * the same date two ways: an `en-US` host formatting the summary as `08/05`\n * over a field reading `05/08` leaves the reader to work out which of the two\n * is lying. A host that wants its own order replaces `messages.summary`, which\n * moves both halves of the decision to the same place.\n */\nexport function defaultMessages(): DateRangePickerMessages {\n // ONE mask, read by both the fields and the summary below. They are the same\n // date in the same control, so a summary formatted in a different order from\n // the boxes it summarises is a control arguing with itself — which is what\n // two independent literals eventually become.\n const dayMask = 'dd/mm/yyyy';\n return {\n from: 'Start date',\n to: 'End date',\n quickRanges: 'Quick ranges',\n incomplete: 'Choose both dates.',\n reversed: 'The end date must be on or after the start date.',\n overMax: ({ maxRangeDays }) => `Choose a range of at most ${maxRangeDays} days.`,\n summary: ({ from, to }) => `${isoToMasked(from, dayMask)} – ${isoToMasked(to, dayMask)}`,\n calendarLabel: EN_US_UI_LABELS.dateRangePicker.calendar,\n dayMask,\n };\n}\n\n/** The line under the fields: the chosen window, or why there isn't one. */\nexport function statusMessage(\n status: DateRangeStatus,\n messages: DateRangePickerMessages,\n maxRangeDays: number | undefined,\n): string {\n if (status.ok) return messages.summary(status.window);\n if (status.problem === 'incomplete') return messages.incomplete;\n if (status.problem === 'reversed') return messages.reversed;\n return messages.overMax({ maxRangeDays: maxRangeDays ?? status.days, days: status.days });\n}\n\n/** Every quick range with its window, its length, and whether it is over cap. */\nexport function resolveQuickRanges(\n quickRanges: QuickRange[],\n context: QuickRangeContext,\n maxRangeDays: number | undefined,\n): ResolvedQuickRange[] {\n return quickRanges.map((quickRange) => {\n const window = quickRange.resolve(context);\n const days = dayCount(window.from, window.to);\n return {\n ...quickRange,\n window,\n days,\n overMax: maxRangeDays !== undefined && days > maxRangeDays,\n };\n });\n}\n\n/** The quick range the draft currently IS, if it is exactly one of them. */\nexport function activeQuickRangeId(\n options: ResolvedQuickRange[],\n draft: DateRangeDraft,\n): string | undefined {\n return options.find(\n (option) => option.window.from === draft.from && option.window.to === draft.to,\n )?.id;\n}\n"],"mappings":";;;;;;;;;;;;AA8BO,SAAS,gBACd,OACA,cACiB;AACjB,QAAM,EAAE,MAAM,GAAG,IAAI;AACrB,MAAI,CAAC,QAAQ,CAAC,GAAI,QAAO,EAAE,IAAI,OAAO,SAAS,cAAc,MAAM,EAAE;AACrE,MAAI,WAAW,MAAM,EAAE,EAAG,QAAO,EAAE,IAAI,OAAO,SAAS,YAAY,MAAM,EAAE;AAE3E,QAAM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,EAC9E,GAAG;AACL;","names":[]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EN_US_UI_LABELS
|
|
3
|
+
} from "./chunk-O2RXSXSF.js";
|
|
1
4
|
import {
|
|
2
5
|
shadowInk
|
|
3
6
|
} from "./chunk-XJAD6E3V.js";
|
|
@@ -137,7 +140,7 @@ var DrawerHeader = ({
|
|
|
137
140
|
{
|
|
138
141
|
onClick: onClose,
|
|
139
142
|
edge: "end",
|
|
140
|
-
"aria-label": closeLabel ??
|
|
143
|
+
"aria-label": closeLabel ?? EN_US_UI_LABELS.drawer.close,
|
|
141
144
|
"data-testid": dataTestId ? `${dataTestId}-close` : "drawer-close",
|
|
142
145
|
children: /* @__PURE__ */ jsx(Close, {})
|
|
143
146
|
}
|
|
@@ -167,4 +170,4 @@ export {
|
|
|
167
170
|
DrawerHeader,
|
|
168
171
|
DrawerContent
|
|
169
172
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-EXKK73UN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/Drawer/Drawer.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport MuiDrawer from '@mui/material/Drawer/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport type { DrawerContentProps,DrawerHeaderProps, DrawerProps } from './Drawer.types';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\nimport { shadowInk } from '../../../tokens/ink';\nimport { rem, rems } from '../../../tokens/relative';\n\ntype DrawerAnchor = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * A `width`/`height` prop as CSS. `sx` reads a number of 1 or less as a\n * fraction of the parent, and that stays so; any other number is design px,\n * through the type scale; a string is as given.\n */\nconst drawerLength = (theme: Theme, value: number | string | undefined): string | undefined => {\n if (typeof value !== 'number') return value;\n return value <= 1 && value !== 0 ? `${value * 100}%` : rem(theme, value);\n};\n\n// `variant` doubles as a position preset, but an explicit `anchor` always wins.\nconst resolveAnchor = (\n anchor: DrawerProps['anchor'],\n variant: DrawerProps['variant'],\n): DrawerAnchor => {\n if (anchor) return anchor;\n\n // Map variant to anchor position\n switch (variant) {\n case 'right':\n return 'right';\n case 'top':\n return 'top';\n case 'bottom':\n return 'bottom';\n case 'glass':\n return 'right';\n case 'left':\n default:\n return 'left';\n }\n};\n\nconst buildDrawerStyles = (\n theme: Theme,\n anchor: DrawerAnchor,\n variant: DrawerProps['variant'],\n width: DrawerProps['width'],\n height: DrawerProps['height'],\n // Merged LAST into the surface's own rules, so a caller can shape the sliding\n // surface itself (rounded corners on a bottom sheet, a docked panel's offset)\n // without reaching for the MUI paper class from outside. Undefined by default:\n // omit it and the drawer styles exactly as it always has.\n paperSx?: DrawerProps['paperSx'],\n) => {\n const widthCss = drawerLength(theme, width);\n const heightCss = drawerLength(theme, height);\n const baseStyles = {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n flexShrink: 0,\n };\n\n if (variant === 'glass') {\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: widthCss,\n height: '100%',\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: `blur(${rem(theme, 20)})`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.2)}`,\n boxShadow: `${rems(theme, 0, 8, 32)} ${shadowInk(theme, 0.1)}`,\n ...paperSx,\n },\n };\n }\n\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n boxSizing: 'border-box',\n ...paperSx,\n },\n };\n};\n\nexport const Drawer: React.FC<DrawerProps> = ({\n children,\n open,\n onClose,\n variant = 'left',\n anchor,\n width,\n height = '100%',\n persistent = false,\n backdrop = true,\n hideBackdrop = false,\n keepMounted = false,\n paperSx,\n className,\n dataTestId,\n ...rest\n}) => {\n const theme = useTheme();\n const drawerAnchor = resolveAnchor(anchor, variant);\n\n return (\n <MuiDrawer\n anchor={drawerAnchor}\n open={open}\n onClose={onClose}\n variant={persistent ? 'persistent' : 'temporary'}\n ModalProps={{\n keepMounted,\n hideBackdrop,\n BackdropProps: {\n invisible: !backdrop,\n },\n }}\n sx={buildDrawerStyles(theme, drawerAnchor, variant, width ?? 280, height, paperSx)}\n className={className}\n data-testid={dataTestId || 'drawer'}\n {...rest}\n >\n {children}\n </MuiDrawer>\n );\n};\n\nexport const DrawerHeader: React.FC<DrawerHeaderProps> = ({\n children,\n onClose,\n showCloseButton = true,\n closeLabel,\n dataTestId,\n}) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-header'}\n sx={{\n display: 'flex',\n alignItems: 'center',\n // 12px above and below: the close button is 40px tall, so the header lands on\n // its own 64px minimum instead of 72 — the height of the page header beside\n // a docked drawer (FUT-3476).\n padding: theme.spacing(1.5, 2),\n borderBottom: `1px solid ${theme.palette.divider}`,\n minHeight: rem(theme, 64),\n justifyContent: 'space-between',\n }}\n >\n <Box sx={{ flex: 1 }} data-testid={dataTestId ? `${dataTestId}-title` : 'drawer-title'}>\n {typeof children === 'string' ? <Typography variant=\"h6\">{children}</Typography> : children}\n </Box>\n {showCloseButton && onClose && (\n <IconButton\n onClick={onClose}\n edge=\"end\"\n aria-label={closeLabel ?? EN_US_UI_LABELS.drawer.close}\n data-testid={dataTestId ? `${dataTestId}-close` : 'drawer-close'}\n >\n <Close />\n </IconButton>\n )}\n </Box>\n );\n};\n\nexport const DrawerContent: React.FC<DrawerContentProps> = ({ children, padding = true, dataTestId }) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-content'}\n sx={{\n flex: 1,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