@12-apps/ui 6.93.0 → 6.93.2
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/components-catalog.md +9 -2
- package/components-guidelines.md +30 -0
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.js +2 -2
- package/dist/_internal/components/data-display/AlertDialog/AlertDialog.parts.js +9 -3
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +3 -3
- package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -7
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +7 -7
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +7 -7
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +31 -31
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +42 -42
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +7 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +26 -26
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-range-bounds.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
- package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.js +25 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.js.map +1 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.styles.js +23 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.styles.js.map +1 -0
- package/dist/_internal/components/data-display/DayRuler/DayRuler.js +14 -12
- package/dist/_internal/components/data-display/DayRuler/DayRuler.keyboard.js +3 -3
- package/dist/_internal/components/data-display/DayRuler/DayRuler.metrics.js +1 -1
- package/dist/_internal/components/data-display/DayRuler/DayRuler.parts.js +12 -15
- package/dist/_internal/components/data-display/DayRuler/DayRuler.styles.js +3 -11
- package/dist/_internal/components/data-display/DayRuler/day-ruler-model.js +5 -1
- package/dist/_internal/components/data-display/DayRuler/useRulerDrag.js +3 -3
- package/dist/_internal/components/data-display/DayRuler/useTextFits.js +4 -3
- package/dist/_internal/components/data-display/ErrorState/ErrorState.js +2 -2
- package/dist/_internal/components/data-display/ErrorState/ErrorState.metrics.js +3 -1
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.js +6 -6
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.parts.js +5 -5
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.styles.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/ScheduleNameCell.js +3 -3
- package/dist/_internal/components/data-display/ScheduleGrid/schedule-name.styles.js +2 -2
- package/dist/_internal/components/data-display/ScheduleGrid/schedule-tones.js +3 -1
- package/dist/_internal/components/data-display/index.js +41 -39
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +4 -4
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +3 -3
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +4 -4
- package/dist/_internal/components/feedback/index.js +6 -6
- package/dist/_internal/components/index.js +52 -50
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +9 -9
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +4 -4
- package/dist/_internal/components/navigation/index.js +9 -9
- package/dist/_internal/user-avatar/user-avatar.js +3 -3
- package/dist/charts.js +13 -13
- package/dist/{chunk-LDCZPZPD.js → chunk-24HHUCWB.js} +2 -2
- package/dist/{chunk-7ZQ3KQ7J.js → chunk-273OLFJD.js} +16 -6
- package/dist/chunk-273OLFJD.js.map +1 -0
- package/dist/{chunk-FAUNQ3FS.js → chunk-2M3W6ACW.js} +3 -3
- package/dist/{chunk-ALOEOGQV.js → chunk-3TZUZXY5.js} +2 -2
- package/dist/{chunk-4HK4FVMV.js → chunk-3UAHDLKH.js} +7 -1
- package/dist/{chunk-4HK4FVMV.js.map → chunk-3UAHDLKH.js.map} +1 -1
- package/dist/{chunk-F5H3WDG7.js → chunk-4E2RQOSQ.js} +2 -2
- package/dist/{chunk-JIEVKHOH.js → chunk-4J62V5OE.js} +6 -6
- package/dist/{chunk-OJZLFFG4.js → chunk-5AZEDQXX.js} +59 -70
- package/dist/chunk-5AZEDQXX.js.map +1 -0
- package/dist/{chunk-CZVAVX5L.js → chunk-6ATXOJVQ.js} +2 -2
- package/dist/{chunk-E2UOEI7N.js → chunk-6LGKJVOA.js} +2 -2
- package/dist/{chunk-XBWW3QSI.js → chunk-7WE432RQ.js} +9 -9
- package/dist/{chunk-5357QUVE.js → chunk-AMLHEKSV.js} +5 -5
- package/dist/{chunk-HSVSU7I2.js → chunk-ASEHJIIV.js} +3 -3
- package/dist/{chunk-FYUNROLW.js → chunk-BZYLTGOE.js} +2 -2
- package/dist/{chunk-TZ44F6W7.js → chunk-CGS2LQE5.js} +2 -2
- package/dist/{chunk-KPUUHAK6.js → chunk-CWXX5JR3.js} +11 -9
- package/dist/chunk-CWXX5JR3.js.map +1 -0
- package/dist/{chunk-6HXNFNOB.js → chunk-EE6DJPB7.js} +4 -4
- package/dist/{chunk-OM6ZT64U.js → chunk-F2UP5ZF4.js} +3 -3
- package/dist/{chunk-P53ANKZV.js → chunk-F7LBTMCA.js} +4 -4
- package/dist/{chunk-6HPVCDVU.js → chunk-FGZIEZEP.js} +69 -112
- package/dist/chunk-FGZIEZEP.js.map +1 -0
- package/dist/{chunk-IWSTMVCA.js → chunk-FKS2PNJF.js} +8 -8
- package/dist/{chunk-3WYEENUH.js → chunk-FPNVOB52.js} +7 -7
- package/dist/{chunk-E73C73UD.js → chunk-FYSS2PYA.js} +3 -3
- package/dist/{chunk-N557OEZR.js → chunk-G6NMSBSQ.js} +2 -2
- package/dist/{chunk-A5OERY43.js → chunk-GARM5SX6.js} +2 -2
- package/dist/{chunk-WJMSND5Q.js → chunk-GXGHEOWC.js} +2 -2
- package/dist/{chunk-U2SAW6DH.js → chunk-GY53SDVL.js} +4 -4
- package/dist/{chunk-MFX4ASX5.js → chunk-HWZETMO4.js} +3 -3
- package/dist/{chunk-HBH7V3IP.js → chunk-I6IFUFLW.js} +5 -3
- package/dist/chunk-I6IFUFLW.js.map +1 -0
- package/dist/{chunk-MM3QESLI.js → chunk-ILJ3FXIC.js} +2 -2
- package/dist/{chunk-K6VEN5VN.js → chunk-K3PMMW23.js} +4 -4
- package/dist/{chunk-T5RFH2T5.js → chunk-KOGJBAFI.js} +2 -2
- package/dist/{chunk-COK65GX2.js → chunk-KURE5R7Z.js} +12 -2
- package/dist/chunk-KURE5R7Z.js.map +1 -0
- package/dist/{chunk-MAYAJXO6.js → chunk-KXDLLS62.js} +5 -5
- package/dist/{chunk-LE5JYNR7.js → chunk-L5CAHQIN.js} +23 -2
- package/dist/chunk-L5CAHQIN.js.map +1 -0
- package/dist/{chunk-DBI6AMNY.js → chunk-LKWXU6NH.js} +4 -4
- package/dist/chunk-MPVH2GM5.js +83 -0
- package/dist/chunk-MPVH2GM5.js.map +1 -0
- package/dist/{chunk-6DO672AG.js → chunk-N5PVD4J5.js} +7 -7
- package/dist/{chunk-ZYZPSBNQ.js → chunk-OGSTMHT6.js} +22 -7
- package/dist/chunk-OGSTMHT6.js.map +1 -0
- package/dist/{chunk-TLGGVE56.js → chunk-OTVOQHZB.js} +3 -1
- package/dist/{chunk-TLGGVE56.js.map → chunk-OTVOQHZB.js.map} +1 -1
- package/dist/{chunk-7F6D73NL.js → chunk-RLTGD5WJ.js} +2 -2
- package/dist/{chunk-R52N5UCS.js → chunk-SB2SEGR6.js} +2 -2
- package/dist/{chunk-Z2WZDVGG.js → chunk-SI5SKX52.js} +2 -2
- package/dist/{chunk-RYJ6XGFA.js → chunk-SJAOQGQI.js} +2 -2
- package/dist/{chunk-D7R6SRJB.js → chunk-SKQPUAMK.js} +3 -3
- package/dist/{chunk-AMIUZRDQ.js → chunk-SNWCT6JN.js} +3 -3
- package/dist/{chunk-7W5X3KQ2.js → chunk-SW7JCF4Z.js} +2 -2
- package/dist/{chunk-BNBWUXT3.js → chunk-TE6HAWDM.js} +2 -2
- package/dist/{chunk-JG733RMP.js → chunk-TZC6KIK2.js} +5 -5
- package/dist/{chunk-4QGKR65P.js → chunk-U4Z6GZDW.js} +5 -5
- package/dist/{chunk-XFZDO2KB.js → chunk-UIIHUWOV.js} +13 -13
- package/dist/{chunk-L4V7FZJI.js → chunk-UKUGSU3Y.js} +2 -2
- package/dist/{chunk-VJIJCLUX.js → chunk-UOKXYV3U.js} +2 -2
- package/dist/{chunk-K7IDOTSU.js → chunk-VNMD6BA4.js} +2 -2
- package/dist/chunk-WG7CAT5D.js +65 -0
- package/dist/chunk-WG7CAT5D.js.map +1 -0
- package/dist/chunk-WSSD7H5E.js +52 -0
- package/dist/chunk-WSSD7H5E.js.map +1 -0
- package/dist/{chunk-DTZOP4ZR.js → chunk-XCUHGPPZ.js} +2 -2
- package/dist/{chunk-3YFDGFEK.js → chunk-Y7BOP7VZ.js} +2 -2
- package/dist/{chunk-XNAI7QGU.js → chunk-ZM6FJCWS.js} +4 -4
- package/dist/{chunk-FC7UCFFA.js → chunk-ZPWPA6FR.js} +8 -8
- package/dist/data-display/AlertDialog.js +2 -2
- package/dist/data-display/AsyncStateContainer.js +3 -3
- package/dist/data-display/Avatar.js +2 -2
- package/dist/data-display/Badge.js +2 -2
- package/dist/data-display/CardKit.js +10 -10
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +13 -13
- package/dist/data-display/DataViews.js +56 -56
- package/dist/data-display/DayRuler.js +14 -12
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/ScheduleGrid.js +6 -6
- package/dist/feedback/ConfirmAction.js +6 -6
- package/dist/native/data-display/ErrorState.js.map +1 -1
- package/dist/navigation/SectionNav.js +9 -9
- package/dist/types/components/data-display/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts +11 -0
- package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.footer.d.ts +16 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.footer.d.ts.map +1 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.footer.styles.d.ts +18 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.footer.styles.d.ts.map +1 -0
- package/dist/types/components/data-display/DayRuler/DayRuler.metrics.d.ts +15 -5
- package/dist/types/components/data-display/DayRuler/DayRuler.metrics.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.parts.d.ts +13 -14
- package/dist/types/components/data-display/DayRuler/DayRuler.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.styles.d.ts +20 -23
- package/dist/types/components/data-display/DayRuler/DayRuler.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts +13 -3
- package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/day-ruler-model.d.ts +27 -0
- package/dist/types/components/data-display/DayRuler/day-ruler-model.d.ts.map +1 -1
- package/dist/types/components/data-display/DayRuler/useTextFits.d.ts +11 -9
- package/dist/types/components/data-display/DayRuler/useTextFits.d.ts.map +1 -1
- package/dist/types/components/data-display/ErrorState/ErrorState.d.ts.map +1 -1
- package/dist/types/components/data-display/ErrorState/ErrorState.metrics.d.ts +5 -0
- package/dist/types/components/data-display/ErrorState/ErrorState.metrics.d.ts.map +1 -1
- package/dist/types/components/data-display/ScheduleGrid/schedule-tones.d.ts +8 -0
- package/dist/types/components/data-display/ScheduleGrid/schedule-tones.d.ts.map +1 -1
- package/dist/types-native/components/data-display/ErrorState/ErrorState.metrics.d.ts +5 -0
- package/dist/types-native/components/data-display/ErrorState/ErrorState.metrics.d.ts.map +1 -1
- package/dist/user-avatar.js +3 -3
- package/package.json +1 -1
- package/src/components/data-display/AlertDialog/AlertDialog.md +25 -1
- package/src/components/data-display/AlertDialog/AlertDialog.parts.tsx +28 -0
- package/src/components/data-display/AlertDialog/AlertDialog.tsx +34 -5
- package/src/components/data-display/DayRuler/DayRuler.footer.styles.ts +54 -0
- package/src/components/data-display/DayRuler/DayRuler.footer.tsx +123 -0
- package/src/components/data-display/DayRuler/DayRuler.md +37 -13
- package/src/components/data-display/DayRuler/DayRuler.metrics.ts +15 -5
- package/src/components/data-display/DayRuler/DayRuler.parts.tsx +86 -155
- package/src/components/data-display/DayRuler/DayRuler.styles.ts +89 -83
- package/src/components/data-display/DayRuler/DayRuler.tsx +3 -2
- package/src/components/data-display/DayRuler/DayRuler.types.ts +13 -3
- package/src/components/data-display/DayRuler/day-ruler-model.ts +45 -0
- package/src/components/data-display/DayRuler/useTextFits.ts +68 -25
- package/src/components/data-display/ErrorState/ErrorState.metrics.ts +5 -0
- package/src/components/data-display/ErrorState/ErrorState.tsx +2 -0
- package/src/components/data-display/ScheduleGrid/schedule-tones.ts +13 -0
- package/src/components/feedback/ConfirmAction/ConfirmAction.md +10 -0
- package/dist/chunk-6HPVCDVU.js.map +0 -1
- package/dist/chunk-7ZQ3KQ7J.js.map +0 -1
- package/dist/chunk-COK65GX2.js.map +0 -1
- package/dist/chunk-HBH7V3IP.js.map +0 -1
- package/dist/chunk-KPUUHAK6.js.map +0 -1
- package/dist/chunk-LE5JYNR7.js.map +0 -1
- package/dist/chunk-OJZLFFG4.js.map +0 -1
- package/dist/chunk-YMYJO2CZ.js +0 -32
- package/dist/chunk-YMYJO2CZ.js.map +0 -1
- package/dist/chunk-ZYZPSBNQ.js.map +0 -1
- /package/dist/{chunk-LDCZPZPD.js.map → chunk-24HHUCWB.js.map} +0 -0
- /package/dist/{chunk-FAUNQ3FS.js.map → chunk-2M3W6ACW.js.map} +0 -0
- /package/dist/{chunk-ALOEOGQV.js.map → chunk-3TZUZXY5.js.map} +0 -0
- /package/dist/{chunk-F5H3WDG7.js.map → chunk-4E2RQOSQ.js.map} +0 -0
- /package/dist/{chunk-JIEVKHOH.js.map → chunk-4J62V5OE.js.map} +0 -0
- /package/dist/{chunk-CZVAVX5L.js.map → chunk-6ATXOJVQ.js.map} +0 -0
- /package/dist/{chunk-E2UOEI7N.js.map → chunk-6LGKJVOA.js.map} +0 -0
- /package/dist/{chunk-XBWW3QSI.js.map → chunk-7WE432RQ.js.map} +0 -0
- /package/dist/{chunk-5357QUVE.js.map → chunk-AMLHEKSV.js.map} +0 -0
- /package/dist/{chunk-HSVSU7I2.js.map → chunk-ASEHJIIV.js.map} +0 -0
- /package/dist/{chunk-FYUNROLW.js.map → chunk-BZYLTGOE.js.map} +0 -0
- /package/dist/{chunk-TZ44F6W7.js.map → chunk-CGS2LQE5.js.map} +0 -0
- /package/dist/{chunk-6HXNFNOB.js.map → chunk-EE6DJPB7.js.map} +0 -0
- /package/dist/{chunk-OM6ZT64U.js.map → chunk-F2UP5ZF4.js.map} +0 -0
- /package/dist/{chunk-P53ANKZV.js.map → chunk-F7LBTMCA.js.map} +0 -0
- /package/dist/{chunk-IWSTMVCA.js.map → chunk-FKS2PNJF.js.map} +0 -0
- /package/dist/{chunk-3WYEENUH.js.map → chunk-FPNVOB52.js.map} +0 -0
- /package/dist/{chunk-E73C73UD.js.map → chunk-FYSS2PYA.js.map} +0 -0
- /package/dist/{chunk-N557OEZR.js.map → chunk-G6NMSBSQ.js.map} +0 -0
- /package/dist/{chunk-A5OERY43.js.map → chunk-GARM5SX6.js.map} +0 -0
- /package/dist/{chunk-WJMSND5Q.js.map → chunk-GXGHEOWC.js.map} +0 -0
- /package/dist/{chunk-U2SAW6DH.js.map → chunk-GY53SDVL.js.map} +0 -0
- /package/dist/{chunk-MFX4ASX5.js.map → chunk-HWZETMO4.js.map} +0 -0
- /package/dist/{chunk-MM3QESLI.js.map → chunk-ILJ3FXIC.js.map} +0 -0
- /package/dist/{chunk-K6VEN5VN.js.map → chunk-K3PMMW23.js.map} +0 -0
- /package/dist/{chunk-T5RFH2T5.js.map → chunk-KOGJBAFI.js.map} +0 -0
- /package/dist/{chunk-MAYAJXO6.js.map → chunk-KXDLLS62.js.map} +0 -0
- /package/dist/{chunk-DBI6AMNY.js.map → chunk-LKWXU6NH.js.map} +0 -0
- /package/dist/{chunk-6DO672AG.js.map → chunk-N5PVD4J5.js.map} +0 -0
- /package/dist/{chunk-7F6D73NL.js.map → chunk-RLTGD5WJ.js.map} +0 -0
- /package/dist/{chunk-R52N5UCS.js.map → chunk-SB2SEGR6.js.map} +0 -0
- /package/dist/{chunk-Z2WZDVGG.js.map → chunk-SI5SKX52.js.map} +0 -0
- /package/dist/{chunk-RYJ6XGFA.js.map → chunk-SJAOQGQI.js.map} +0 -0
- /package/dist/{chunk-D7R6SRJB.js.map → chunk-SKQPUAMK.js.map} +0 -0
- /package/dist/{chunk-AMIUZRDQ.js.map → chunk-SNWCT6JN.js.map} +0 -0
- /package/dist/{chunk-7W5X3KQ2.js.map → chunk-SW7JCF4Z.js.map} +0 -0
- /package/dist/{chunk-BNBWUXT3.js.map → chunk-TE6HAWDM.js.map} +0 -0
- /package/dist/{chunk-JG733RMP.js.map → chunk-TZC6KIK2.js.map} +0 -0
- /package/dist/{chunk-4QGKR65P.js.map → chunk-U4Z6GZDW.js.map} +0 -0
- /package/dist/{chunk-XFZDO2KB.js.map → chunk-UIIHUWOV.js.map} +0 -0
- /package/dist/{chunk-L4V7FZJI.js.map → chunk-UKUGSU3Y.js.map} +0 -0
- /package/dist/{chunk-VJIJCLUX.js.map → chunk-UOKXYV3U.js.map} +0 -0
- /package/dist/{chunk-K7IDOTSU.js.map → chunk-VNMD6BA4.js.map} +0 -0
- /package/dist/{chunk-DTZOP4ZR.js.map → chunk-XCUHGPPZ.js.map} +0 -0
- /package/dist/{chunk-3YFDGFEK.js.map → chunk-Y7BOP7VZ.js.map} +0 -0
- /package/dist/{chunk-XNAI7QGU.js.map → chunk-ZM6FJCWS.js.map} +0 -0
- /package/dist/{chunk-FC7UCFFA.js.map → chunk-ZPWPA6FR.js.map} +0 -0
|
@@ -11,6 +11,11 @@ import CircularProgress from "@mui/material/CircularProgress/index.js";
|
|
|
11
11
|
import DialogActions from "@mui/material/DialogActions/index.js";
|
|
12
12
|
import { styled, useTheme } from "@mui/material/styles/index.js";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var ALERT_DIALOG_CONTAINER = "alert-dialog";
|
|
15
|
+
var ALERT_DIALOG_NARROW_BELOW = 480;
|
|
16
|
+
function narrowDialog(theme) {
|
|
17
|
+
return `@container ${ALERT_DIALOG_CONTAINER} (width < ${rem(theme, ALERT_DIALOG_NARROW_BELOW)})`;
|
|
18
|
+
}
|
|
14
19
|
var StyledDialogActions = styled(DialogActions, {
|
|
15
20
|
shouldForwardProp: (prop) => prop !== "fill"
|
|
16
21
|
})(({ theme, fill }) => ({
|
|
@@ -21,7 +26,9 @@ var StyledDialogActions = styled(DialogActions, {
|
|
|
21
26
|
// A 40px tap target, the floor the kit's own Button keeps (FUT-3269): MUI's
|
|
22
27
|
// medium button is 37px, short of it on a phone.
|
|
23
28
|
"& > .MuiButton-root": { minHeight: rem(theme, 40) },
|
|
24
|
-
...fill && { "& > .MuiButton-root": { flexGrow: 1, minHeight: rem(theme, 40) } }
|
|
29
|
+
...fill && { "& > .MuiButton-root": { flexGrow: 1, minHeight: rem(theme, 40) } },
|
|
30
|
+
// A PAIR only: a lone button (`showCancel={false}`) keeps its own width.
|
|
31
|
+
[narrowDialog(theme)]: { "& > .MuiButton-root:not(:only-child)": { flexGrow: 1 } }
|
|
25
32
|
}));
|
|
26
33
|
var confirmButtonColor = (variant) => variant === "destructive" ? "error" : "primary";
|
|
27
34
|
var buttonLooks = (emphasis, variant) => emphasis === "cancel" ? {
|
|
@@ -97,6 +104,9 @@ function AlertDialogFooter({
|
|
|
97
104
|
}
|
|
98
105
|
|
|
99
106
|
export {
|
|
107
|
+
ALERT_DIALOG_CONTAINER,
|
|
108
|
+
ALERT_DIALOG_NARROW_BELOW,
|
|
109
|
+
narrowDialog,
|
|
100
110
|
AlertDialogFooter
|
|
101
111
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-KURE5R7Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/AlertDialog/AlertDialog.parts.tsx"],"sourcesContent":["/**\n * The AlertDialog's action row, kept apart from the dialog shell so each stays\n * inside the complexity budget: which button is filled, where each one sits,\n * and how the row wraps.\n */\nimport type { ButtonProps } from '@mui/material/Button/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport DialogActions from '@mui/material/DialogActions/index.js';\nimport { styled, useTheme } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { rem } from '../../../tokens/relative';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\n\nimport type { AlertDialogProps } from './AlertDialog.types';\n\n/** The query container the dialog's narrow layout reads: its `.MuiDialog-container`. */\nexport const ALERT_DIALOG_CONTAINER = 'alert-dialog';\n\n/**\n * Below this width of the space the dialog is given, it lays out for a phone:\n * the icon above the title, the buttons each across the row. 480px covers\n * every phone (320–430) and leaves a tablet's dialog as it was.\n */\nexport const ALERT_DIALOG_NARROW_BELOW = 480;\n\n/** `@container` for a dialog given less than {@link ALERT_DIALOG_NARROW_BELOW}. Never a media query. */\nexport function narrowDialog(theme: Theme): string {\n return `@container ${ALERT_DIALOG_CONTAINER} (width < ${rem(theme, ALERT_DIALOG_NARROW_BELOW)})`;\n}\n\n/**\n * The action row WRAPS WHOLE BUTTONS; it never breaks a label inside one. A pair\n * that did not fit side by side used to squeeze the longer label onto two\n * lines, so one button stood twice as tall as its neighbour. Now the row breaks\n * instead. `wrap-reverse` puts the LAST button — the primary, whichever\n * `emphasis` picks — on top when it stacks, the same slot it holds on the right\n * when the row fits. A pair that fits is laid out exactly as before: natural\n * widths, pushed to the right.\n *\n * `fill` — set only by `emphasis=\"cancel\"` — lets the buttons grow to share the\n * row, and so to take the full width of their line once it stacks. It is not\n * the default because growing also stretches a pair that fits, which would\n * redraw every existing dialog's footer.\n *\n * Narrow (a dialog given less than {@link ALERT_DIALOG_NARROW_BELOW}, a\n * phone) a PAIR of buttons always grows (a lone one keeps its width), so a pair that stacks is two buttons each\n * across the row rather than two ragged widths pushed to the right\n * (FUT-3831). The stacked ORDER is the library's rule, the platforms' too\n * (Material's stacked dialog actions, Apple's stacked alert buttons): the\n * primary on top and the dismissive one at the bottom, the slot a thumb\n * reaches first — so on a destructive question the safe tap is the near one,\n * and Cancel is still FIRST in the DOM, the tab order. See\n * `components-guidelines.md`, \"Stacked buttons\".\n *\n * Rendered with `disableSpacing`: MUI's own spacing is a left margin on every\n * button after the first, which would indent a button that wrapped onto a line\n * of its own. The gaps below replace it, at the same 16px across.\n */\nconst StyledDialogActions = styled(DialogActions, {\n shouldForwardProp: (prop) => prop !== 'fill',\n})<{ fill: boolean }>(({ theme, fill }) => ({\n padding: theme.spacing(2, 3, 3, 3),\n flexWrap: 'wrap-reverse',\n columnGap: theme.spacing(2),\n rowGap: theme.spacing(1),\n // A 40px tap target, the floor the kit's own Button keeps (FUT-3269): MUI's\n // medium button is 37px, short of it on a phone.\n '& > .MuiButton-root': { minHeight: rem(theme, 40) },\n ...(fill && { '& > .MuiButton-root': { flexGrow: 1, minHeight: rem(theme, 40) } }),\n // A PAIR only: a lone button (`showCancel={false}`) keeps its own width.\n [narrowDialog(theme)]: { '& > .MuiButton-root:not(:only-child)': { flexGrow: 1 } },\n}));\n\nconst confirmButtonColor = (variant: AlertDialogProps['variant']): 'error' | 'primary' =>\n variant === 'destructive' ? 'error' : 'primary';\n\ninterface ButtonLook {\n variant: ButtonProps['variant'];\n color: ButtonProps['color'];\n}\n\n/**\n * How each button is drawn, by `emphasis`: the emphasised one is filled, the\n * other a NEUTRAL outline. Primary / neutral both ways round — a confirm that\n * steps down drops the variant's colour too, so the one filled button is the\n * only coloured thing in the row and the eye has a single place to land.\n */\nconst buttonLooks = (\n emphasis: AlertDialogProps['emphasis'],\n variant: AlertDialogProps['variant'],\n): { cancel: ButtonLook; confirm: ButtonLook } =>\n emphasis === 'cancel'\n ? {\n cancel: { variant: 'contained', color: 'primary' },\n confirm: { variant: 'outlined', color: 'inherit' },\n }\n : {\n cancel: { variant: 'outlined', color: 'inherit' },\n confirm: { variant: 'contained', color: confirmButtonColor(variant) },\n };\n\n/**\n * The emphasis that applies: `cancel` only while the cancel is shown. A hidden\n * cancel with the confirm stepped down would leave a dialog with no primary.\n */\nconst effectiveEmphasis = (\n emphasis: AlertDialogProps['emphasis'],\n showCancel: boolean,\n): NonNullable<AlertDialogProps['emphasis']> =>\n emphasis === 'cancel' && showCancel ? 'cancel' : 'confirm';\n\n/**\n * Whether the cancel owns focus on open: what `initialFocus` says, and when it\n * says nothing, the emphasised button — so Enter on a steered question keeps\n * the work instead of completing the loss.\n */\nconst focusesCancel = (\n initialFocus: AlertDialogProps['initialFocus'],\n emphasis: NonNullable<AlertDialogProps['emphasis']>,\n): boolean => (initialFocus ?? emphasis) === 'cancel';\n\n/** The two buttons in slot order: the emphasised one LAST, the primary slot. */\nconst inSlotOrder = (\n emphasis: AlertDialogProps['emphasis'],\n cancel: React.ReactNode,\n confirm: React.ReactNode,\n): React.ReactNode[] => (emphasis === 'cancel' ? [confirm, cancel] : [cancel, confirm]);\n\n/**\n * Action row: the optional cancel button and the (variant-coloured) confirm,\n * with the emphasised one LAST — the primary slot, on the right or, once the\n * row stacks, on top. DOM order is the tab order, so it follows the same rule.\n */\nexport function AlertDialogFooter({\n variant,\n cancelText = EN_US_UI_LABELS.alertDialog.cancel,\n confirmText = EN_US_UI_LABELS.alertDialog.confirm,\n showCancel = true,\n loading = false,\n confirmDisabled = false,\n initialFocus,\n emphasis: asked,\n onCancel,\n onConfirm,\n dataTestId,\n}: Pick<\n AlertDialogProps,\n | 'variant'\n | 'cancelText'\n | 'confirmText'\n | 'showCancel'\n | 'loading'\n | 'confirmDisabled'\n | 'initialFocus'\n | 'emphasis'\n> & {\n onCancel: () => void;\n onConfirm: () => void;\n dataTestId: string;\n}): React.ReactElement {\n const theme = useTheme();\n const emphasis = effectiveEmphasis(asked, showCancel);\n const look = buttonLooks(emphasis, variant);\n const cancelFocused = focusesCancel(initialFocus, emphasis);\n const cancel = showCancel && (\n <Button\n key=\"cancel\"\n onClick={onCancel}\n variant={look.cancel.variant}\n color={look.cancel.color}\n disabled={loading}\n autoFocus={cancelFocused}\n data-testid={`${dataTestId}-cancel-button`}\n >\n {cancelText}\n </Button>\n );\n const confirm = (\n <Button\n key=\"confirm\"\n onClick={onConfirm}\n variant={look.confirm.variant}\n color={look.confirm.color}\n disabled={confirmDisabled || loading}\n startIcon={\n loading ? (\n <CircularProgress\n size={rem(theme, 16)}\n color=\"inherit\"\n data-testid={`${dataTestId}-loading-spinner`}\n />\n ) : undefined\n }\n autoFocus={!cancelFocused}\n data-testid={`${dataTestId}-confirm-button`}\n >\n {confirmText}\n </Button>\n );\n return (\n <StyledDialogActions\n disableSpacing\n fill={emphasis === 'cancel'}\n data-testid={`${dataTestId}-actions`}\n >\n {inSlotOrder(emphasis, cancel, confirm)}\n </StyledDialogActions>\n );\n}\n"],"mappings":";;;;;;;;AAMA,OAAO,YAAY;AACnB,OAAO,sBAAsB;AAC7B,OAAO,mBAAmB;AAC1B,SAAS,QAAQ,gBAAgB;AA+J7B;AArJG,IAAM,yBAAyB;AAO/B,IAAM,4BAA4B;AAGlC,SAAS,aAAa,OAAsB;AACjD,SAAO,cAAc,sBAAsB,aAAa,IAAI,OAAO,yBAAyB,CAAC;AAC/F;AA8BA,IAAM,sBAAsB,OAAO,eAAe;AAAA,EAChD,mBAAmB,CAAC,SAAS,SAAS;AACxC,CAAC,EAAqB,CAAC,EAAE,OAAO,KAAK,OAAO;AAAA,EAC1C,SAAS,MAAM,QAAQ,GAAG,GAAG,GAAG,CAAC;AAAA,EACjC,UAAU;AAAA,EACV,WAAW,MAAM,QAAQ,CAAC;AAAA,EAC1B,QAAQ,MAAM,QAAQ,CAAC;AAAA;AA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,KAAK,OAAO;AAAA,MACrB,OAAO,KAAK,OAAO;AAAA,MACnB,UAAU;AAAA,MACV,WAAW;AAAA,MACX,eAAa,GAAG,UAAU;AAAA,MAEzB;AAAA;AAAA,IARG;AAAA,EASN;AAEF,QAAM,UACJ;AAAA,IAAC;AAAA;AAAA,MAEC,SAAS;AAAA,MACT,SAAS,KAAK,QAAQ;AAAA,MACtB,OAAO,KAAK,QAAQ;AAAA,MACpB,UAAU,mBAAmB;AAAA,MAC7B,WACE,UACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,IAAI,OAAO,EAAE;AAAA,UACnB,OAAM;AAAA,UACN,eAAa,GAAG,UAAU;AAAA;AAAA,MAC5B,IACE;AAAA,MAEN,WAAW,CAAC;AAAA,MACZ,eAAa,GAAG,UAAU;AAAA,MAEzB;AAAA;AAAA,IAjBG;AAAA,EAkBN;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAc;AAAA,MACd,MAAM,aAAa;AAAA,MACnB,eAAa,GAAG,UAAU;AAAA,MAEzB,sBAAY,UAAU,QAAQ,OAAO;AAAA;AAAA,EACxC;AAEJ;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DAY_RULER_METRICS
|
|
3
|
+
} from "./chunk-273OLFJD.js";
|
|
1
4
|
import {
|
|
2
5
|
createdSpan,
|
|
3
6
|
hourAt,
|
|
4
7
|
moved,
|
|
5
8
|
resized
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
DAY_RULER_METRICS
|
|
9
|
-
} from "./chunk-7ZQ3KQ7J.js";
|
|
9
|
+
} from "./chunk-L5CAHQIN.js";
|
|
10
10
|
import {
|
|
11
11
|
useDragWindow,
|
|
12
12
|
useTrailingClick
|
|
@@ -101,4 +101,4 @@ function useRulerDrag(scale, handlers) {
|
|
|
101
101
|
export {
|
|
102
102
|
useRulerDrag
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-KXDLLS62.js.map
|
|
@@ -42,6 +42,25 @@ function ticksOf(from, to, step) {
|
|
|
42
42
|
for (let h = from; h <= to + 1e-9; h += step) out.push(h);
|
|
43
43
|
return out;
|
|
44
44
|
}
|
|
45
|
+
function hitBoundsOf(spans) {
|
|
46
|
+
const order = spans.map((_, index) => index).sort((a, b) => spans[a].at - spans[b].at);
|
|
47
|
+
const out = spans.map(() => ({ lo: 0, hi: 100 }));
|
|
48
|
+
for (let k = 1; k < order.length; k += 1) {
|
|
49
|
+
const left = spans[order[k - 1]];
|
|
50
|
+
const right = spans[order[k]];
|
|
51
|
+
const leftEnd = left.at + left.share;
|
|
52
|
+
const mid = leftEnd <= right.at ? (leftEnd + right.at) / 2 : null;
|
|
53
|
+
out[order[k - 1]].hi = Math.min(out[order[k - 1]].hi, mid ?? leftEnd);
|
|
54
|
+
out[order[k]].lo = Math.max(out[order[k]].lo, mid ?? right.at);
|
|
55
|
+
}
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
function textFitOf(fullWidth, shortWidth, room) {
|
|
59
|
+
const slack = 0.5;
|
|
60
|
+
if (fullWidth <= room + slack) return "full";
|
|
61
|
+
if (shortWidth <= room + slack) return "short";
|
|
62
|
+
return "none";
|
|
63
|
+
}
|
|
45
64
|
|
|
46
65
|
export {
|
|
47
66
|
snapTo,
|
|
@@ -53,6 +72,8 @@ export {
|
|
|
53
72
|
moved,
|
|
54
73
|
resized,
|
|
55
74
|
createdSpan,
|
|
56
|
-
ticksOf
|
|
75
|
+
ticksOf,
|
|
76
|
+
hitBoundsOf,
|
|
77
|
+
textFitOf
|
|
57
78
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-L5CAHQIN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DayRuler/day-ruler-model.ts"],"sourcesContent":["import type { RulerHour } from './DayRuler.types';\n\n/**\n * THE RULER'S ARITHMETIC, as pure functions (FUT-3825): snapping, clamping,\n * positions and the HH:MM the ruler writes. Hours are from the day's\n * midnight; past 24 is the next morning.\n */\n\n/** `h` on the `snap`-hour grid (0.25 for 15 minutes). */\nexport function snapTo(h: RulerHour, snap: number): RulerHour {\n return snap > 0 ? Math.round(h / snap) * snap : h;\n}\n\nexport function clamp(h: RulerHour, from: RulerHour, to: RulerHour): RulerHour {\n return Math.min(to, Math.max(from, h));\n}\n\n/** The hour under `x` on a track whose box starts at `left` and is `width` wide, snapped and clamped. */\nexport function hourAt(x: number, left: number, width: number, from: RulerHour, to: RulerHour, snap: number): RulerHour {\n const share = width > 0 ? (x - left) / width : 0;\n return clamp(snapTo(from + share * (to - from), snap), from, to);\n}\n\n/** Where `h` sits along the ruler, 0..100 (%), clamped to it. */\nexport function percentOf(h: RulerHour, from: RulerHour, to: RulerHour): number {\n return ((clamp(h, from, to) - from) / (to - from)) * 100;\n}\n\n/** \"20:45\"; 26 → \"02:00\", 24 → \"00:00\". */\nexport function formatHour(h: RulerHour): string {\n const minutes = Math.round(h * 60);\n const hh = Math.floor(minutes / 60) % 24;\n const mm = minutes % 60;\n return `${String(hh).padStart(2, '0')}:${String(mm).padStart(2, '0')}`;\n}\n\n/** \"20:45–00:45\". */\nexport function formatRange(start: RulerHour, end: RulerHour): string {\n return `${formatHour(start)}–${formatHour(end)}`;\n}\n\n/** A block slid by `delta`, keeping its length and staying on the ruler. */\nexport function moved(start: RulerHour, end: RulerHour, delta: number, from: RulerHour, to: RulerHour): [RulerHour, RulerHour] {\n const length = end - start;\n const next = clamp(start + delta, from, to - length);\n return [next, next + length];\n}\n\n/** A block whose `side` was dragged to `h`, never shorter than `minHours`, never off the ruler. */\nexport function resized(\n start: RulerHour,\n end: RulerHour,\n side: 'start' | 'end',\n h: RulerHour,\n minHours: number,\n from: RulerHour,\n to: RulerHour,\n): [RulerHour, RulerHour] {\n if (side === 'start') return [clamp(Math.min(h, end - minHours), from, to), end];\n return [start, clamp(Math.max(h, start + minHours), from, to)];\n}\n\n/** A click alone (shorter than `minHours`) becomes `createHours` from where it was pressed. */\nexport function createdSpan(\n a: RulerHour,\n b: RulerHour,\n minHours: number,\n createHours: number,\n to: RulerHour,\n): [RulerHour, RulerHour] {\n const start = Math.min(a, b);\n const end = Math.max(a, b);\n if (end - start >= minHours) return [start, end];\n return [start, Math.min(to, start + createHours)];\n}\n\n/** The axis labels: every `step` hours from `from` to `to`, both ends included. */\nexport function ticksOf(from: RulerHour, to: RulerHour, step: number): RulerHour[] {\n const out: RulerHour[] = [];\n if (step <= 0) return [from, to];\n for (let h = from; h <= to + 1e-9; h += step) out.push(h);\n return out;\n}\n\n/** A bar along the track: where it starts and how long it is, both in % of the track. */\nexport interface TrackSpan {\n at: number;\n share: number;\n}\n\n/**\n * How far each bar's hit band may reach, in % of the track (FUT-3831): from\n * `lo` to `hi`, never past the track's ends and never past the MIDPOINT of\n * the gap to the bar beside it, so a band widened round a short bar cannot\n * take a tap meant for its neighbour. Two bars that touch or overlap give each\n * other nothing: the band stays on the bar's own edge on that side.\n *\n * The band itself is drawn in CSS — at least the hit area wide, centred on the\n * bar, then cut to `lo…hi` — because the bar's width in px is the layout's.\n */\nexport function hitBoundsOf(spans: readonly TrackSpan[]): { lo: number; hi: number }[] {\n const order = spans.map((_, index) => index).sort((a, b) => spans[a]!.at - spans[b]!.at);\n const out = spans.map(() => ({ lo: 0, hi: 100 }));\n for (let k = 1; k < order.length; k += 1) {\n const left = spans[order[k - 1]!]!;\n const right = spans[order[k]!]!;\n const leftEnd = left.at + left.share;\n const mid = leftEnd <= right.at ? (leftEnd + right.at) / 2 : null;\n out[order[k - 1]!]!.hi = Math.min(out[order[k - 1]!]!.hi, mid ?? leftEnd);\n out[order[k]!]!.lo = Math.max(out[order[k]!]!.lo, mid ?? right.at);\n }\n return out;\n}\n\n/** What a block can say in its bar: its full text, its start, or nothing. */\nexport type BlockTextFit = 'full' | 'short' | 'none';\n\n/**\n * Which of a block's texts fits the room it leaves inside the bar, by pixels\n * (FUT-3831): the full one, else the short one, else NOTHING — a cut \"12:\"\n * says less than an empty bar whose title and accessible name carry the text.\n */\nexport function textFitOf(fullWidth: number, shortWidth: number, room: number): BlockTextFit {\n const slack = 0.5;\n if (fullWidth <= room + slack) return 'full';\n if (shortWidth <= room + slack) return 'short';\n return 'none';\n}\n"],"mappings":";AASO,SAAS,OAAO,GAAc,MAAyB;AAC5D,SAAO,OAAO,IAAI,KAAK,MAAM,IAAI,IAAI,IAAI,OAAO;AAClD;AAEO,SAAS,MAAM,GAAc,MAAiB,IAA0B;AAC7E,SAAO,KAAK,IAAI,IAAI,KAAK,IAAI,MAAM,CAAC,CAAC;AACvC;AAGO,SAAS,OAAO,GAAW,MAAc,OAAe,MAAiB,IAAe,MAAyB;AACtH,QAAM,QAAQ,QAAQ,KAAK,IAAI,QAAQ,QAAQ;AAC/C,SAAO,MAAM,OAAO,OAAO,SAAS,KAAK,OAAO,IAAI,GAAG,MAAM,EAAE;AACjE;AAGO,SAAS,UAAU,GAAc,MAAiB,IAAuB;AAC9E,UAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,KAAK,QAAS;AACvD;AAGO,SAAS,WAAW,GAAsB;AAC/C,QAAM,UAAU,KAAK,MAAM,IAAI,EAAE;AACjC,QAAM,KAAK,KAAK,MAAM,UAAU,EAAE,IAAI;AACtC,QAAM,KAAK,UAAU;AACrB,SAAO,GAAG,OAAO,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAO,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC;AACtE;AAGO,SAAS,YAAY,OAAkB,KAAwB;AACpE,SAAO,GAAG,WAAW,KAAK,CAAC,SAAI,WAAW,GAAG,CAAC;AAChD;AAGO,SAAS,MAAM,OAAkB,KAAgB,OAAe,MAAiB,IAAuC;AAC7H,QAAM,SAAS,MAAM;AACrB,QAAM,OAAO,MAAM,QAAQ,OAAO,MAAM,KAAK,MAAM;AACnD,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AI,MAAM,IAAI,CAAC,CAAE,EAAG,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,CAAC,CAAE,EAAG,IAAI,OAAO,OAAO;AACxE,QAAI,MAAM,CAAC,CAAE,EAAG,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,CAAE,EAAG,IAAI,OAAO,MAAM,EAAE;AAAA,EACnE;AACA,SAAO;AACT;AAUO,SAAS,UAAU,WAAmB,YAAoB,MAA4B;AAC3F,QAAM,QAAQ;AACd,MAAI,aAAa,OAAO,MAAO,QAAO;AACtC,MAAI,cAAc,OAAO,MAAO,QAAO;AACvC,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DataViewsDisplayPanel
|
|
3
|
+
} from "./chunk-EE6DJPB7.js";
|
|
1
4
|
import {
|
|
2
5
|
DataViewsExportMenu
|
|
3
6
|
} from "./chunk-4NG3LTRX.js";
|
|
4
|
-
import {
|
|
5
|
-
DataViewsDisplayPanel
|
|
6
|
-
} from "./chunk-6HXNFNOB.js";
|
|
7
7
|
import {
|
|
8
8
|
STICKY_BAR_ATTR
|
|
9
9
|
} from "./chunk-4IE66GY2.js";
|
|
@@ -143,4 +143,4 @@ function GridToolbar(props) {
|
|
|
143
143
|
export {
|
|
144
144
|
GridToolbar
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-LKWXU6NH.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
footerCellSx,
|
|
3
|
+
footerNoteSx,
|
|
4
|
+
trendSx
|
|
5
|
+
} from "./chunk-WSSD7H5E.js";
|
|
6
|
+
import {
|
|
7
|
+
coverageLabelSx,
|
|
8
|
+
coverageSx,
|
|
9
|
+
lineSx
|
|
10
|
+
} from "./chunk-5AZEDQXX.js";
|
|
11
|
+
import {
|
|
12
|
+
formatHour
|
|
13
|
+
} from "./chunk-L5CAHQIN.js";
|
|
14
|
+
import {
|
|
15
|
+
SR_ONLY_SX
|
|
16
|
+
} from "./chunk-SJAOQGQI.js";
|
|
17
|
+
|
|
18
|
+
// src/components/data-display/DayRuler/DayRuler.footer.tsx
|
|
19
|
+
import Box from "@mui/material/Box/index.js";
|
|
20
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
function trendPoints(values, hours) {
|
|
22
|
+
const present = values.slice(0, hours).filter((value) => value !== null);
|
|
23
|
+
const max = Math.max(0, ...present);
|
|
24
|
+
return values.slice(0, hours).flatMap((value, index) => {
|
|
25
|
+
if (value === null) return [];
|
|
26
|
+
const x = (index + 0.5) * 100 / hours;
|
|
27
|
+
const y = max > 0 ? 38 - value / max * 34 : 38;
|
|
28
|
+
return [`${x.toFixed(2)},${y.toFixed(2)}`];
|
|
29
|
+
}).join(" ");
|
|
30
|
+
}
|
|
31
|
+
var hourWords = (hour, text) => text ? `${formatHour(hour)} \xB7 ${text}` : formatHour(hour);
|
|
32
|
+
function markedWords(cell, hour, marked) {
|
|
33
|
+
return cell.title ?? `${hourWords(hour, cell.text)} \xB7 ${marked}`;
|
|
34
|
+
}
|
|
35
|
+
function FooterCells({ cells, ctx }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(Box, { sx: coverageSx(ctx.hours), children: Array.from({ length: ctx.hours }, (_, index) => {
|
|
37
|
+
const cell = cells[index] ?? { text: "" };
|
|
38
|
+
const hour = ctx.from + index;
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
Box,
|
|
41
|
+
{
|
|
42
|
+
component: "span",
|
|
43
|
+
sx: footerCellSx(Boolean(cell.marked)),
|
|
44
|
+
title: cell.marked ? markedWords(cell, hour, ctx.marked) : cell.title ?? hourWords(hour, cell.text),
|
|
45
|
+
"data-marked": cell.marked ? "" : void 0,
|
|
46
|
+
children: cell.marked ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: cell.text }),
|
|
48
|
+
/* @__PURE__ */ jsx(Box, { component: "span", sx: SR_ONLY_SX, children: markedWords(cell, hour, ctx.marked) })
|
|
49
|
+
] }) : cell.text
|
|
50
|
+
},
|
|
51
|
+
index
|
|
52
|
+
);
|
|
53
|
+
}) });
|
|
54
|
+
}
|
|
55
|
+
function trendWords(values, ctx) {
|
|
56
|
+
return values.slice(0, ctx.hours).flatMap((value, index) => value === null ? [] : [`${formatHour(ctx.from + index)} ${Math.round(value * 10) / 10}`]).join(" \xB7 ");
|
|
57
|
+
}
|
|
58
|
+
function FooterFigures({ row, ctx }) {
|
|
59
|
+
if (row.trend) {
|
|
60
|
+
return /* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "block", minWidth: 0 }, children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Box, { component: "svg", viewBox: "0 0 100 40", preserveAspectRatio: "none", sx: trendSx, "aria-hidden": true, children: /* @__PURE__ */ jsx("polyline", { fill: "none", stroke: "currentColor", strokeWidth: 1.5, vectorEffect: "non-scaling-stroke", points: trendPoints(row.trend, ctx.hours) }) }),
|
|
62
|
+
/* @__PURE__ */ jsx(Box, { component: "span", sx: SR_ONLY_SX, children: trendWords(row.trend, ctx) })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
if (row.note !== void 0) {
|
|
66
|
+
return /* @__PURE__ */ jsx(Box, { component: "span", sx: footerNoteSx(Boolean(row.marked)), "data-marked": row.marked ? "" : void 0, children: row.note });
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsx(FooterCells, { cells: row.cells ?? [], ctx });
|
|
69
|
+
}
|
|
70
|
+
function GroupFooter(props) {
|
|
71
|
+
const { rows, scale, testId } = props;
|
|
72
|
+
const ctx = { hours: scale.to - scale.from, from: scale.from, marked: props.marked };
|
|
73
|
+
return /* @__PURE__ */ jsx(Fragment, { children: rows.map((row) => /* @__PURE__ */ jsxs(Box, { sx: lineSx, "data-testid": `${testId}-footer-${row.id}`, children: [
|
|
74
|
+
/* @__PURE__ */ jsx(Box, { component: "span", sx: coverageLabelSx, children: row.label }),
|
|
75
|
+
/* @__PURE__ */ jsx(FooterFigures, { row, ctx })
|
|
76
|
+
] }, row.id)) });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
trendPoints,
|
|
81
|
+
GroupFooter
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=chunk-MPVH2GM5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DayRuler/DayRuler.footer.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport type * as React from 'react';\n\nimport { SR_ONLY_SX } from '../ScheduleGrid/ScheduleGrid.styles';\nimport type { RulerScale } from './DayRuler.keyboard';\nimport { coverageLabelSx, coverageSx, lineSx } from './DayRuler.styles';\nimport { footerCellSx, footerNoteSx, trendSx } from './DayRuler.footer.styles';\nimport type { DayRulerFooterCell, DayRulerFooterRow, RulerHour } from './DayRuler.types';\nimport { formatHour } from './day-ruler-model';\n\n/** The points of a trend over the hours' centres, in a 100 × 40 box: the highest value near the top, `null` breaks nothing (it is skipped). */\nexport function trendPoints(values: readonly (number | null)[], hours: number): string {\n const present = values.slice(0, hours).filter((value): value is number => value !== null);\n const max = Math.max(0, ...present);\n return values\n .slice(0, hours)\n .flatMap((value, index) => {\n if (value === null) return [];\n const x = ((index + 0.5) * 100) / hours;\n const y = max > 0 ? 38 - (value / max) * 34 : 38;\n return [`${x.toFixed(2)},${y.toFixed(2)}`];\n })\n .join(' ');\n}\n\n/** One hour's default words: \"20:00 · 4\"; just the hour when it says nothing. */\nconst hourWords = (hour: RulerHour, text: string): string => (text ? `${formatHour(hour)} · ${text}` : formatHour(hour));\n\n/** What a reader hears for a marked hour: the host's `title`, else the hour, its count and that it is short. */\nfunction markedWords(cell: DayRulerFooterCell, hour: RulerHour, marked: string): string {\n return cell.title ?? `${hourWords(hour, cell.text)} · ${marked}`;\n}\n\ninterface FooterContext {\n hours: number;\n from: RulerHour;\n /** `labels.footerMarked`. */\n marked: string;\n}\n\nfunction FooterCells({ cells, ctx }: { cells: readonly DayRulerFooterCell[]; ctx: FooterContext }): React.JSX.Element {\n return (\n <Box sx={coverageSx(ctx.hours)}>\n {Array.from({ length: ctx.hours }, (_, index) => {\n const cell = cells[index] ?? { text: '' };\n const hour = ctx.from + index;\n return (\n <Box\n key={index}\n component=\"span\"\n sx={footerCellSx(Boolean(cell.marked))}\n title={cell.marked ? markedWords(cell, hour, ctx.marked) : (cell.title ?? hourWords(hour, cell.text))}\n data-marked={cell.marked ? '' : undefined}\n >\n {/* A marked hour is said in words too, not only by its outline and a tooltip touch never shows. */}\n {cell.marked ? (\n <>\n <span aria-hidden>{cell.text}</span>\n <Box component=\"span\" sx={SR_ONLY_SX}>\n {markedWords(cell, hour, ctx.marked)}\n </Box>\n </>\n ) : (\n cell.text\n )}\n </Box>\n );\n })}\n </Box>\n );\n}\n\n/** A trend's figures in words, for the reader the drawn line does not reach: \"11:00 4 · 12:00 6\". */\nfunction trendWords(values: readonly (number | null)[], ctx: FooterContext): string {\n return values\n .slice(0, ctx.hours)\n .flatMap((value, index) => (value === null ? [] : [`${formatHour(ctx.from + index)} ${Math.round(value * 10) / 10}`]))\n .join(' · ');\n}\n\nfunction FooterFigures({ row, ctx }: { row: DayRulerFooterRow; ctx: FooterContext }): React.JSX.Element {\n if (row.trend) {\n return (\n <Box component=\"span\" sx={{ display: 'block', minWidth: 0 }}>\n <Box component=\"svg\" viewBox=\"0 0 100 40\" preserveAspectRatio=\"none\" sx={trendSx} aria-hidden>\n <polyline fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} vectorEffect=\"non-scaling-stroke\" points={trendPoints(row.trend, ctx.hours)} />\n </Box>\n <Box component=\"span\" sx={SR_ONLY_SX}>\n {trendWords(row.trend, ctx)}\n </Box>\n </Box>\n );\n }\n if (row.note !== undefined) {\n return (\n <Box component=\"span\" sx={footerNoteSx(Boolean(row.marked))} data-marked={row.marked ? '' : undefined}>\n {row.note}\n </Box>\n );\n }\n return <FooterCells cells={row.cells ?? []} ctx={ctx} />;\n}\n\n/**\n * A group's lines under its rows (FUT-3882): counts per hour, a trend, or a\n * sentence, on the tracks' columns. `marked` is `labels.footerMarked`.\n */\nexport function GroupFooter(props: { rows: readonly DayRulerFooterRow[]; scale: RulerScale; testId: string; marked: string }): React.JSX.Element {\n const { rows, scale, testId } = props;\n const ctx: FooterContext = { hours: scale.to - scale.from, from: scale.from, marked: props.marked };\n return (\n <>\n {rows.map((row) => (\n <Box key={row.id} sx={lineSx} data-testid={`${testId}-footer-${row.id}`}>\n <Box component=\"span\" sx={coverageLabelSx}>\n {row.label}\n </Box>\n <FooterFigures row={row} ctx={ctx} />\n </Box>\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAwDF,mBACE,KADF;AA7CP,SAAS,YAAY,QAAoC,OAAuB;AACrF,QAAM,UAAU,OAAO,MAAM,GAAG,KAAK,EAAE,OAAO,CAAC,UAA2B,UAAU,IAAI;AACxF,QAAM,MAAM,KAAK,IAAI,GAAG,GAAG,OAAO;AAClC,SAAO,OACJ,MAAM,GAAG,KAAK,EACd,QAAQ,CAAC,OAAO,UAAU;AACzB,QAAI,UAAU,KAAM,QAAO,CAAC;AAC5B,UAAM,KAAM,QAAQ,OAAO,MAAO;AAClC,UAAM,IAAI,MAAM,IAAI,KAAM,QAAQ,MAAO,KAAK;AAC9C,WAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE;AAAA,EAC3C,CAAC,EACA,KAAK,GAAG;AACb;AAGA,IAAM,YAAY,CAAC,MAAiB,SAA0B,OAAO,GAAG,WAAW,IAAI,CAAC,SAAM,IAAI,KAAK,WAAW,IAAI;AAGtH,SAAS,YAAY,MAA0B,MAAiB,QAAwB;AACtF,SAAO,KAAK,SAAS,GAAG,UAAU,MAA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AAW,MAC3F,8BAAC,cAAS,MAAK,QAAO,QAAO,gBAAe,aAAa,KAAK,cAAa,sBAAqB,QAAQ,YAAY,IAAI,OAAO,IAAI,KAAK,GAAG,GAC7I;AAAA,MACA,oBAAC,OAAI,WAAU,QAAO,IAAI,YACvB,qBAAW,IAAI,OAAO,GAAG,GAC5B;AAAA,OACF;AAAA,EAEJ;AACA,MAAI,IAAI,SAAS,QAAW;AAC1B,WACE,oBAAC,OAAI,WAAU,QAAO,IAAI,aAAa,QAAQ,IAAI,MAAM,CAAC,GAAG,eAAa,IAAI,SAAS,KAAK,QACzF,cAAI,MACP;AAAA,EAEJ;AACA,SAAO,oBAAC,eAAY,OAAO,IAAI,SAAS,CAAC,GAAG,KAAU;AACxD;AAMO,SAAS,YAAY,OAAqH;AAC/I,QAAM,EAAE,MAAM,OAAO,OAAO,IAAI;AAChC,QAAM,MAAqB,EAAE,OAAO,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,MAAM,QAAQ,MAAM,OAAO;AAClG,SACE,gCACG,eAAK,IAAI,CAAC,QACT,qBAAC,OAAiB,IAAI,QAAQ,eAAa,GAAG,MAAM,WAAW,IAAI,EAAE,IACnE;AAAA,wBAAC,OAAI,WAAU,QAAO,IAAI,iBACvB,cAAI,OACP;AAAA,IACA,oBAAC,iBAAc,KAAU,KAAU;AAAA,OAJ3B,IAAI,EAKd,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
badgeContentOf,
|
|
3
|
+
definedAria,
|
|
4
|
+
formatCount,
|
|
5
|
+
resolveBadgeProps
|
|
6
|
+
} from "./chunk-6C5D6O3D.js";
|
|
1
7
|
import {
|
|
2
8
|
buildBadgeContent
|
|
3
9
|
} from "./chunk-ZNCYCE7L.js";
|
|
@@ -5,12 +11,6 @@ import {
|
|
|
5
11
|
badgeStyles,
|
|
6
12
|
getAnchorOrigin
|
|
7
13
|
} from "./chunk-2L3VRVRE.js";
|
|
8
|
-
import {
|
|
9
|
-
badgeContentOf,
|
|
10
|
-
definedAria,
|
|
11
|
-
formatCount,
|
|
12
|
-
resolveBadgeProps
|
|
13
|
-
} from "./chunk-6C5D6O3D.js";
|
|
14
14
|
import {
|
|
15
15
|
CLOSE_DELAY_MS,
|
|
16
16
|
MOUNT_ANIMATION_MS
|
|
@@ -180,4 +180,4 @@ Badge.displayName = "Badge";
|
|
|
180
180
|
export {
|
|
181
181
|
Badge
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-N5PVD4J5.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ALERT_DIALOG_CONTAINER,
|
|
3
|
+
AlertDialogFooter,
|
|
4
|
+
narrowDialog
|
|
5
|
+
} from "./chunk-KURE5R7Z.js";
|
|
4
6
|
import {
|
|
5
7
|
EN_US_UI_LABELS
|
|
6
8
|
} from "./chunk-XOXXG7Q5.js";
|
|
@@ -39,9 +41,12 @@ var pulseAnimation = (theme) => keyframes`
|
|
|
39
41
|
opacity: 0;
|
|
40
42
|
}
|
|
41
43
|
`;
|
|
44
|
+
var QUERY_CONTAINER = {
|
|
45
|
+
"& .MuiDialog-container": { containerType: "inline-size", containerName: ALERT_DIALOG_CONTAINER }
|
|
46
|
+
};
|
|
42
47
|
var StyledDialog = styled(Dialog, {
|
|
43
48
|
shouldForwardProp: (prop) => !["customVariant", "glow", "pulse"].includes(prop)
|
|
44
|
-
})(({ theme, customVariant, glow, pulse }) => ({
|
|
49
|
+
})(QUERY_CONTAINER, ({ theme, customVariant, glow, pulse }) => ({
|
|
45
50
|
"& .MuiDialog-paper": {
|
|
46
51
|
borderRadius: theme.spacing(2),
|
|
47
52
|
transition: "all 0.3s ease",
|
|
@@ -115,7 +120,9 @@ var StyledDialog = styled(Dialog, {
|
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
}));
|
|
118
|
-
var StyledDialogTitle = styled(DialogTitle
|
|
123
|
+
var StyledDialogTitle = styled(DialogTitle, {
|
|
124
|
+
shouldForwardProp: (prop) => prop !== "withIcon"
|
|
125
|
+
})(({ theme, withIcon }) => ({
|
|
119
126
|
display: "flex",
|
|
120
127
|
alignItems: "center",
|
|
121
128
|
gap: theme.spacing(1.5),
|
|
@@ -124,6 +131,14 @@ var StyledDialogTitle = styled(DialogTitle)(({ theme }) => ({
|
|
|
124
131
|
"& .MuiTypography-root": {
|
|
125
132
|
fontWeight: 600,
|
|
126
133
|
fontSize: rem(theme, 20)
|
|
134
|
+
},
|
|
135
|
+
...withIcon && {
|
|
136
|
+
[narrowDialog(theme)]: {
|
|
137
|
+
flexDirection: "column",
|
|
138
|
+
alignItems: "flex-start",
|
|
139
|
+
paddingRight: theme.spacing(3),
|
|
140
|
+
"& > [data-alert-icon]": { display: "flex", minHeight: rem(theme, 24) }
|
|
141
|
+
}
|
|
127
142
|
}
|
|
128
143
|
}));
|
|
129
144
|
var StyledDialogContent = styled(DialogContent)(({ theme }) => ({
|
|
@@ -162,8 +177,8 @@ function AlertDialogHeader({
|
|
|
162
177
|
dataTestId
|
|
163
178
|
}) {
|
|
164
179
|
if (!title) return null;
|
|
165
|
-
return /* @__PURE__ */ jsxs(StyledDialogTitle, { id: titleId(dataTestId), "data-testid": `${dataTestId}-title`, children: [
|
|
166
|
-
icon !== null && /* @__PURE__ */ jsx("span", { "data-testid": `${dataTestId}-icon`, children: variantIcon(variant, icon) }),
|
|
180
|
+
return /* @__PURE__ */ jsxs(StyledDialogTitle, { id: titleId(dataTestId), "data-testid": `${dataTestId}-title`, withIcon: icon !== null, children: [
|
|
181
|
+
icon !== null && /* @__PURE__ */ jsx("span", { "data-testid": `${dataTestId}-icon`, "data-alert-icon": "", children: variantIcon(variant, icon) }),
|
|
167
182
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", component: "span", children: title })
|
|
168
183
|
] });
|
|
169
184
|
}
|
|
@@ -254,4 +269,4 @@ AlertDialog.displayName = "AlertDialog";
|
|
|
254
269
|
export {
|
|
255
270
|
AlertDialog
|
|
256
271
|
};
|
|
257
|
-
//# sourceMappingURL=chunk-
|
|
272
|
+
//# sourceMappingURL=chunk-OGSTMHT6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport Error from '@mui/icons-material/Error';\nimport Info from '@mui/icons-material/Info';\nimport Dialog from '@mui/material/Dialog/index.js';\nimport DialogContent from '@mui/material/DialogContent/index.js';\nimport DialogContentText from '@mui/material/DialogContentText/index.js';\nimport DialogTitle from '@mui/material/DialogTitle/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, keyframes, styled } 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 { neutralTones } from '../../../tokens/ink';\n\nimport { ALERT_DIALOG_CONTAINER, AlertDialogFooter, narrowDialog } from './AlertDialog.parts';\nimport type { AlertDialogProps } from './AlertDialog.types';\nimport { rem, rems } from '../../../tokens/relative';\n\n// Define pulse animation\nconst pulseAnimation = (theme: Theme) => keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 ${rem(theme, 15)} currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\n/**\n * The container the narrow layout answers to: the space the dialog is given\n * (the viewport, or the element a host portals it into), read with a\n * container query — never a media query (FUT-3831).\n */\nconst QUERY_CONTAINER = {\n '& .MuiDialog-container': { containerType: 'inline-size', containerName: ALERT_DIALOG_CONTAINER },\n} as const;\n\nconst StyledDialog = styled(Dialog, {\n shouldForwardProp: (prop) => \n !['customVariant', 'glow', 'pulse'].includes(prop as string),\n})<{ \n customVariant?: string; \n glow?: boolean; \n pulse?: boolean; \n}>(QUERY_CONTAINER, ({ theme, customVariant, glow, pulse }) => ({\n '& .MuiDialog-paper': {\n borderRadius: theme.spacing(2),\n transition: 'all 0.3s ease',\n position: 'relative',\n overflow: 'hidden',\n\n // Variant styles\n ...(customVariant === 'default' && {\n backgroundColor: theme.palette.background.paper,\n border: `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n }),\n\n // The error tint is LAYERED over the paper, not used as the background\n // itself: `alpha(error, 0.05)` alone leaves the panel 95% transparent, so\n // the page behind it showed straight through the question and its buttons.\n // A confirm nobody can read is the one dialog that must never be hard to\n // read. Same tint, opaque base.\n ...(customVariant === 'destructive' && {\n backgroundColor: theme.palette.background.paper,\n backgroundImage: `linear-gradient(${alpha(theme.palette.error.main, 0.05)}, ${alpha(\n theme.palette.error.main,\n 0.05,\n )})`,\n border: `1px solid ${alpha(theme.palette.error.main, 0.2)}`,\n }),\n\n ...(customVariant === 'glass' && {\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: `blur(${rem(theme, 20)})`,\n border: `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n }),\n\n // Glow effect\n ...(glow && !pulse && {\n boxShadow: `0 0 ${rems(theme, 30, 10)} ${alpha(theme.palette.primary.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n }),\n\n // Pulse animation\n ...(pulse && !glow && {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: theme.palette.primary.main,\n opacity: 0.1,\n animation: `${pulseAnimation(theme)} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n\n // Both glow and pulse\n ...(glow && pulse && {\n position: 'relative',\n boxShadow: `0 0 ${rems(theme, 30, 10)} ${alpha(theme.palette.primary.main, 0.3)} !important`,\n filter: 'brightness(1.05)',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: theme.palette.primary.main,\n opacity: 0.1,\n animation: `${pulseAnimation(theme)} 2s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n }),\n },\n}));\n\n/**\n * The title row. Wide: the icon beside the title, which keeps clear of the\n * close button. Narrow (a dialog given less than `narrowBelow`, a phone): the\n * icon ABOVE the title, beside the close button, so the question takes the\n * paper's whole width — at 320 the icon column and the close button had left\n * it about two words a line (FUT-3831). Without an icon the title keeps the\n * close button's clearance at every width.\n */\nconst StyledDialogTitle = styled(DialogTitle, {\n shouldForwardProp: (prop) => prop !== 'withIcon',\n})<{ withIcon: boolean }>(({ theme, withIcon }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1.5),\n paddingRight: theme.spacing(6), // Space for close button\n '& .MuiTypography-root': {\n fontWeight: 600,\n fontSize: rem(theme, 20),\n },\n ...(withIcon && {\n [narrowDialog(theme)]: {\n flexDirection: 'column',\n alignItems: 'flex-start',\n paddingRight: theme.spacing(3),\n '& > [data-alert-icon]': { display: 'flex', minHeight: rem(theme, 24) },\n },\n }),\n}));\n\nconst StyledDialogContent = styled(DialogContent)(({ theme }) => ({\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n}));\n\nconst CloseButton = styled(IconButton)(({ theme }) => ({\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n // 40px, not the small IconButton's 34: the floor a phone's tap needs (FUT-3269).\n width: rem(theme, 40),\n height: rem(theme, 40),\n color: neutralTones(theme).muted,\n}));\n\n/**\n * Per-variant lookups, hoisted out of the render function. They depend on\n * nothing but their arguments, so keeping them at module scope means they are\n * not rebuilt on every render — and it keeps the component's own branch count\n * inside the repo's complexity budget.\n */\nconst variantIcon = (\n variant: AlertDialogProps['variant'],\n icon: AlertDialogProps['icon'],\n): React.ReactNode => {\n if (icon) return icon;\n return variant === 'destructive' ? <Error color=\"error\" /> : <Info color=\"primary\" />;\n};\n\n/**\n * Ids for the two elements that give the dialog its accessible name and\n * description. Derived from the test id so they are stable and unique per\n * dialog without a generated id that would change on every render.\n */\nconst titleId = (dataTestId: string): string => `${dataTestId}-title`;\nconst descriptionId = (dataTestId: string): string => `${dataTestId}-description`;\n\n/**\n * `alertdialog`, not `dialog`.\n *\n * This component interrupts what the operator was doing and will not go away\n * until they answer — which is exactly the distinction the two roles draw, and\n * it is what makes a screen reader announce the message itself on open rather\n * than just the dialog's name. MUI hardcodes `role=\"dialog\"` on the paper, so\n * it has to be overridden through the paper slot.\n */\nconst ALERT_ROLE = 'alertdialog';\n\n/**\n * The paper slot's a11y props: the role, plus the name and description wired to\n * the elements that actually carry them, so the announcement is the QUESTION\n * rather than the word \"dialog\".\n *\n * Both references are conditional — pointing `aria-labelledby` at an element\n * that was never rendered leaves a dangling id, which screen readers treat as\n * no name at all, i.e. worse than omitting it.\n */\nfunction ariaSlotProps(\n dataTestId: string,\n title: AlertDialogProps['title'],\n description: AlertDialogProps['description'],\n): { paper: Record<string, string> } {\n return {\n paper: {\n role: ALERT_ROLE,\n ...(title ? { 'aria-labelledby': titleId(dataTestId) } : {}),\n ...(description ? { 'aria-describedby': descriptionId(dataTestId) } : {}),\n },\n };\n}\n\n/** Title row: the variant icon (unless explicitly suppressed with `null`) + the title. */\nfunction AlertDialogHeader({\n title,\n icon,\n variant,\n dataTestId,\n}: {\n title: AlertDialogProps['title'];\n icon: AlertDialogProps['icon'];\n variant: AlertDialogProps['variant'];\n dataTestId: string;\n}): React.ReactElement | null {\n if (!title) return null;\n return (\n <StyledDialogTitle id={titleId(dataTestId)} data-testid={`${dataTestId}-title`} withIcon={icon !== null}>\n {icon !== null && (\n <span data-testid={`${dataTestId}-icon`} data-alert-icon=\"\">\n {variantIcon(variant, icon)}\n </span>\n )}\n <Typography variant=\"h6\" component=\"span\">\n {title}\n </Typography>\n </StyledDialogTitle>\n );\n}\n\nexport const AlertDialog = React.forwardRef<HTMLDivElement, AlertDialogProps>(\n ({\n variant = 'default',\n glow = false,\n pulse = false,\n title,\n description,\n icon,\n cancelText,\n confirmText,\n closeLabel = EN_US_UI_LABELS.common.close,\n onCancel,\n onConfirm,\n showCancel,\n loading,\n confirmDisabled,\n initialFocus,\n emphasis,\n children,\n onClose,\n 'data-testid': dataTestId = 'alert-dialog',\n ...props\n }, ref) => {\n const handleCancel = () => {\n onCancel?.();\n onClose?.({}, 'backdropClick');\n };\n\n return (\n <StyledDialog\n ref={ref}\n customVariant={variant}\n glow={glow}\n pulse={pulse}\n onClose={onClose}\n data-testid={dataTestId}\n slotProps={ariaSlotProps(dataTestId, title, description)}\n {...props}\n >\n <CloseButton\n aria-label={closeLabel}\n onClick={handleCancel}\n size=\"small\"\n data-testid={`${dataTestId}-close-button`}\n >\n <Close />\n </CloseButton>\n\n <AlertDialogHeader title={title} icon={icon} variant={variant} dataTestId={dataTestId} />\n\n <StyledDialogContent data-testid={`${dataTestId}-content`}>\n {description && (\n <DialogContentText\n id={descriptionId(dataTestId)}\n data-testid={`${dataTestId}-description`}\n >\n {description}\n </DialogContentText>\n )}\n {children}\n </StyledDialogContent>\n\n <AlertDialogFooter\n variant={variant}\n cancelText={cancelText}\n confirmText={confirmText}\n showCancel={showCancel}\n loading={loading}\n confirmDisabled={confirmDisabled}\n initialFocus={initialFocus}\n emphasis={emphasis}\n onCancel={handleCancel}\n onConfirm={() => onConfirm?.()}\n dataTestId={dataTestId}\n />\n </StyledDialog>\n );\n }\n);\n\nAlertDialog.displayName = 'AlertDialog';"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,mBAAmB;AAC1B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,OAAO,WAAW,cAAc;AAEzC,OAAO,WAAW;AAiLm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AAY,SAAkB,YAAwB;AAAA,UAEvF,qBAAC,uBAAoB,eAAa,GAAG,UAAU,YAC5C;AAAA,2BACC;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI,cAAc,UAAU;AAAA,gBAC5B,eAAa,GAAG,UAAU;AAAA,gBAEzB;AAAA;AAAA,YACH;AAAA,YAED;AAAA,aACH;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,UAAU;AAAA,cACV,WAAW,MAAM,YAAY;AAAA,cAC7B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":[]}
|
|
@@ -10,6 +10,7 @@ var ERROR_MESSAGE_MAX_WIDTH = 400;
|
|
|
10
10
|
var ERROR_MESSAGE_LINE_HEIGHT = 1.6;
|
|
11
11
|
var RETRY_MARGIN_TOP_UNITS = 1;
|
|
12
12
|
var RETRY_MIN_WIDTH = 120;
|
|
13
|
+
var RETRY_MIN_HEIGHT = 40;
|
|
13
14
|
var RETRY_BUTTON = {
|
|
14
15
|
paddingVertical: 5,
|
|
15
16
|
paddingHorizontal: 15,
|
|
@@ -31,7 +32,8 @@ export {
|
|
|
31
32
|
ERROR_MESSAGE_LINE_HEIGHT,
|
|
32
33
|
RETRY_MARGIN_TOP_UNITS,
|
|
33
34
|
RETRY_MIN_WIDTH,
|
|
35
|
+
RETRY_MIN_HEIGHT,
|
|
34
36
|
RETRY_BUTTON,
|
|
35
37
|
errorStatePalette
|
|
36
38
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-OTVOQHZB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/ErrorState/ErrorState.metrics.ts"],"sourcesContent":["import type { ErrorStateSeverity } from './ErrorState.base';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `ErrorState` RENDERERS DRAW WITH.\n *\n * `ErrorState.tsx` (MUI) and `ErrorState.native.tsx` (React Native) read this\n * one table. Spacing is in SPACING UNITS where the web writes\n * `theme.spacing(n)`; everything else is px or a ratio.\n */\n\n/** The region: a centred column, `theme.spacing(6)` of padding, at least 200px tall, its parts 16px apart. */\nexport const ERROR_STATE_PADDING_UNITS = 6;\nexport const ERROR_STATE_MIN_HEIGHT = 200;\nexport const ERROR_STATE_GAP_UNITS = 2;\n\n/** The glyph sits in an 80px disc of the severity's `light` shade at 0.9 opacity. */\nexport const ERROR_ICON_BOX = 80;\nexport const ERROR_ICON_BOX_OPACITY = 0.9;\nexport const ERROR_ICON_SIZE = 48;\n\n/** Title and message are 8px apart; the message wraps at 400px on a 1.6 line height. */\nexport const ERROR_TEXT_GAP_UNITS = 1;\nexport const ERROR_MESSAGE_MAX_WIDTH = 400;\nexport const ERROR_MESSAGE_LINE_HEIGHT = 1.6;\n\n/** The retry button: 8px below the text, no narrower than 120px. */\nexport const RETRY_MARGIN_TOP_UNITS = 1;\nexport const RETRY_MIN_WIDTH = 120;\n/**\n * The web retry IS MUI's medium outlined `Button`: 5px 15px inside its 1px\n * border, 14px type, the theme's radius, a 20px start icon. The native side\n * sizes the house `Button` to these.\n */\nexport const RETRY_BUTTON = {\n paddingVertical: 5,\n paddingHorizontal: 15,\n iconSize: 20,\n} as const;\n\n/** `error` is MUI's name for the `danger` slot; `warning` is its own. */\nexport function errorStatePalette(theme: UiTheme, severity: ErrorStateSeverity): UiPaletteColor {\n return severity === 'error' ? theme.palette.danger : theme.palette.warning;\n}\n"],"mappings":";AAYO,IAAM,4BAA4B;AAClC,IAAM,yBAAyB;AAC/B,IAAM,wBAAwB;AAG9B,IAAM,iBAAiB;AACvB,IAAM,yBAAyB;AAC/B,IAAM,kBAAkB;AAGxB,IAAM,uBAAuB;AAC7B,IAAM,0BAA0B;AAChC,IAAM,4BAA4B;AAGlC,IAAM,yBAAyB;AAC/B,IAAM,kBAAkB;
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/ErrorState/ErrorState.metrics.ts"],"sourcesContent":["import type { ErrorStateSeverity } from './ErrorState.base';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `ErrorState` RENDERERS DRAW WITH.\n *\n * `ErrorState.tsx` (MUI) and `ErrorState.native.tsx` (React Native) read this\n * one table. Spacing is in SPACING UNITS where the web writes\n * `theme.spacing(n)`; everything else is px or a ratio.\n */\n\n/** The region: a centred column, `theme.spacing(6)` of padding, at least 200px tall, its parts 16px apart. */\nexport const ERROR_STATE_PADDING_UNITS = 6;\nexport const ERROR_STATE_MIN_HEIGHT = 200;\nexport const ERROR_STATE_GAP_UNITS = 2;\n\n/** The glyph sits in an 80px disc of the severity's `light` shade at 0.9 opacity. */\nexport const ERROR_ICON_BOX = 80;\nexport const ERROR_ICON_BOX_OPACITY = 0.9;\nexport const ERROR_ICON_SIZE = 48;\n\n/** Title and message are 8px apart; the message wraps at 400px on a 1.6 line height. */\nexport const ERROR_TEXT_GAP_UNITS = 1;\nexport const ERROR_MESSAGE_MAX_WIDTH = 400;\nexport const ERROR_MESSAGE_LINE_HEIGHT = 1.6;\n\n/** The retry button: 8px below the text, no narrower than 120px. */\nexport const RETRY_MARGIN_TOP_UNITS = 1;\nexport const RETRY_MIN_WIDTH = 120;\n/**\n * The web retry is never shorter than the 40px tap floor. MUI's medium outlined\n * button is 37px tall on its own (FUT-1310), so the floor is stated, not inherited.\n */\nexport const RETRY_MIN_HEIGHT = 40;\n/**\n * The web retry IS MUI's medium outlined `Button`: 5px 15px inside its 1px\n * border, 14px type, the theme's radius, a 20px start icon. The native side\n * sizes the house `Button` to these.\n */\nexport const RETRY_BUTTON = {\n paddingVertical: 5,\n paddingHorizontal: 15,\n iconSize: 20,\n} as const;\n\n/** `error` is MUI's name for the `danger` slot; `warning` is its own. */\nexport function errorStatePalette(theme: UiTheme, severity: ErrorStateSeverity): UiPaletteColor {\n return severity === 'error' ? theme.palette.danger : theme.palette.warning;\n}\n"],"mappings":";AAYO,IAAM,4BAA4B;AAClC,IAAM,yBAAyB;AAC/B,IAAM,wBAAwB;AAG9B,IAAM,iBAAiB;AACvB,IAAM,yBAAyB;AAC/B,IAAM,kBAAkB;AAGxB,IAAM,uBAAuB;AAC7B,IAAM,0BAA0B;AAChC,IAAM,4BAA4B;AAGlC,IAAM,yBAAyB;AAC/B,IAAM,kBAAkB;AAKxB,IAAM,mBAAmB;AAMzB,IAAM,eAAe;AAAA,EAC1B,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,UAAU;AACZ;AAGO,SAAS,kBAAkB,OAAgB,UAA8C;AAC9F,SAAO,aAAa,UAAU,MAAM,QAAQ,SAAS,MAAM,QAAQ;AACrE;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErrorState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I6IFUFLW.js";
|
|
4
4
|
import {
|
|
5
5
|
LoadingState
|
|
6
6
|
} from "./chunk-3Z6JX7UN.js";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
AsyncStateContainer,
|
|
66
66
|
AsyncStateContainer_default
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-RLTGD5WJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chart
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AMLHEKSV.js";
|
|
4
4
|
import {
|
|
5
5
|
CHART_SEMANTIC_COLORS,
|
|
6
6
|
specToChartProps
|
|
@@ -46,4 +46,4 @@ var SpecChart = ({
|
|
|
46
46
|
export {
|
|
47
47
|
SpecChart
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-SB2SEGR6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridToolbar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LKWXU6NH.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-SI5SKX52.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blockToneStyles,
|
|
3
3
|
breakHatch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3UAHDLKH.js";
|
|
5
5
|
import {
|
|
6
6
|
SCHEDULE_GRID_METRICS
|
|
7
7
|
} from "./chunk-3R6BR22L.js";
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
skeletonCellSx,
|
|
347
347
|
SR_ONLY_SX
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-SJAOQGQI.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridBody,
|
|
3
3
|
GridHeader
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FYSS2PYA.js";
|
|
5
5
|
import {
|
|
6
6
|
focusables,
|
|
7
7
|
handleGridKey
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
rootSx,
|
|
26
26
|
rowGridSx,
|
|
27
27
|
scrollSx
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-SJAOQGQI.js";
|
|
29
29
|
import {
|
|
30
30
|
useAnnouncer
|
|
31
31
|
} from "./chunk-35HMJQLO.js";
|
|
@@ -144,4 +144,4 @@ function ScheduleGrid(props) {
|
|
|
144
144
|
export {
|
|
145
145
|
ScheduleGrid
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-SKQPUAMK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RailCreateMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ILJ3FXIC.js";
|
|
4
4
|
import {
|
|
5
5
|
Box,
|
|
6
6
|
CONTROL_RESET,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
controlProps,
|
|
12
12
|
destinationControl,
|
|
13
13
|
focusRing
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-24HHUCWB.js";
|
|
15
15
|
import {
|
|
16
16
|
destinationState,
|
|
17
17
|
isMenu
|
|
@@ -295,4 +295,4 @@ function SectionNavRail({
|
|
|
295
295
|
export {
|
|
296
296
|
SectionNavRail
|
|
297
297
|
};
|
|
298
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-SNWCT6JN.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-LZRVUOMU.js";
|
|
4
4
|
import {
|
|
5
5
|
AlertDialog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OGSTMHT6.js";
|
|
7
7
|
|
|
8
8
|
// src/components/feedback/ConfirmAction/ConfirmAction.parts.tsx
|
|
9
9
|
import Alert from "@mui/material/Alert/index.js";
|
|
@@ -114,4 +114,4 @@ export {
|
|
|
114
114
|
typedMatches,
|
|
115
115
|
ConfirmActionDialog
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-SW7JCF4Z.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfirmActionDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SW7JCF4Z.js";
|
|
4
4
|
import {
|
|
5
5
|
useConfirmAction
|
|
6
6
|
} from "./chunk-EMYESBIT.js";
|
|
@@ -23,4 +23,4 @@ ConfirmAction.displayName = "ConfirmAction";
|
|
|
23
23
|
export {
|
|
24
24
|
ConfirmAction
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-TE6HAWDM.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveAxisConfig,
|
|
3
|
-
resolveBarGeometry
|
|
4
|
-
} from "./chunk-SOHQPPYJ.js";
|
|
5
1
|
import {
|
|
6
2
|
getAxisStyles,
|
|
7
3
|
getDefaultColors,
|
|
8
4
|
getSizeStyles,
|
|
9
5
|
resolveSeries
|
|
10
6
|
} from "./chunk-TCWISGSS.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveAxisConfig,
|
|
9
|
+
resolveBarGeometry
|
|
10
|
+
} from "./chunk-SOHQPPYJ.js";
|
|
11
11
|
import {
|
|
12
12
|
remPx
|
|
13
13
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -73,4 +73,4 @@ function marginPx(theme, margin) {
|
|
|
73
73
|
export {
|
|
74
74
|
buildChartContext
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-TZC6KIK2.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DAY_RULER_METRICS
|
|
3
|
+
} from "./chunk-273OLFJD.js";
|
|
1
4
|
import {
|
|
2
5
|
clamp,
|
|
3
6
|
formatRange,
|
|
4
7
|
moved,
|
|
5
8
|
resized,
|
|
6
9
|
snapTo
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
DAY_RULER_METRICS
|
|
10
|
-
} from "./chunk-7ZQ3KQ7J.js";
|
|
10
|
+
} from "./chunk-L5CAHQIN.js";
|
|
11
11
|
|
|
12
12
|
// src/components/data-display/DayRuler/DayRuler.keyboard.ts
|
|
13
13
|
function gestureOf(event, block, can) {
|
|
@@ -59,4 +59,4 @@ export {
|
|
|
59
59
|
handleBlockKey,
|
|
60
60
|
keyCreateSpan
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-U4Z6GZDW.js.map
|