@12-apps/ui 6.22.0 → 6.24.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/NATIVE.md +2 -1
- package/components-catalog.md +7 -0
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +3 -3
- package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.view.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 +1 -1
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +1 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
- 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/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +41 -41
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +47 -47
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +1 -1
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +4 -4
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.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 +10 -10
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +36 -36
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
- 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 +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +5 -5
- 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 +4 -4
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +32 -0
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +23 -0
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.base.js +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.base.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +57 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.helpers.js +14 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.helpers.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.hooks.js +9 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.hooks.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +47 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.metrics.js +20 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.metrics.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.types.js +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetMap.types.js.map +1 -0
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +15 -0
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js.map +1 -0
- package/dist/_internal/components/data-display/HoverCard/HoverCard.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +6 -6
- package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +3 -3
- package/dist/_internal/components/data-display/Table/Table.js +3 -3
- package/dist/_internal/components/data-display/index.js +90 -69
- package/dist/_internal/components/feedback/Modal/Modal.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +2 -2
- package/dist/_internal/components/feedback/index.js +14 -14
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +3 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +5 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +4 -4
- package/dist/_internal/components/form/Command/Command.js +2 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/_internal/components/form/PhoneInput/PhoneInput.hooks.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/index.js +30 -30
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/index.js +9 -9
- package/dist/_internal/components/index.js +160 -140
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +2 -2
- package/dist/_internal/components/layout/index.js +20 -20
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +4 -4
- package/dist/_internal/components/navigation/Pagination/Pagination.js +2 -2
- package/dist/_internal/components/navigation/index.js +12 -12
- package/dist/_internal/components/utility/index.js +4 -4
- package/dist/_internal/platform/aria.js.map +1 -1
- package/dist/_internal/pt-BR.data-display.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +5 -5
- package/dist/charts.js +10 -10
- package/dist/{chunk-WGRS4PGY.js → chunk-2C47DEVU.js} +4 -4
- package/dist/chunk-2RQINU5T.js +41 -0
- package/dist/chunk-2RQINU5T.js.map +1 -0
- package/dist/{chunk-WMALDOF5.js → chunk-4G3FGCWX.js} +4 -4
- package/dist/{chunk-ZOUWHGV3.js → chunk-4MGFUPQT.js} +4 -4
- package/dist/{chunk-QFJRB27Q.js → chunk-6LGWJFQK.js} +2 -2
- package/dist/{chunk-XSF6AXEU.js → chunk-6RZDDUSM.js} +2 -2
- package/dist/{chunk-VIK3HAUQ.js → chunk-73NJCGQG.js} +2 -2
- package/dist/{chunk-UU3QAKG6.js → chunk-B7DKSBAE.js} +14 -14
- package/dist/{chunk-3FLVIVOK.js → chunk-BHIGHSXA.js} +2 -2
- package/dist/{chunk-HKV4MQ2W.js → chunk-BLBOYCOV.js} +5 -5
- package/dist/chunk-BTQZ3EX3.js +45 -0
- package/dist/chunk-BTQZ3EX3.js.map +1 -0
- package/dist/{chunk-PFV6RL4Q.js → chunk-C6KTQF4F.js} +3 -3
- package/dist/chunk-CDCTLPMD.js +1 -0
- package/dist/chunk-CDCTLPMD.js.map +1 -0
- package/dist/{chunk-LYSSO6WC.js → chunk-CZPU5TW3.js} +4 -4
- package/dist/{chunk-PMS3H3OO.js → chunk-DF2FFYZ7.js} +4 -4
- package/dist/{chunk-QZBUGUOY.js → chunk-DFLTUI7W.js} +4 -4
- package/dist/{chunk-WLQTHPMX.js → chunk-EJQW2IYW.js} +2 -2
- package/dist/{chunk-VQAM2XZV.js → chunk-EMUBMZMA.js} +2 -2
- package/dist/{chunk-XFUNJYFT.js → chunk-EPNUVSNK.js} +7 -7
- package/dist/{chunk-MSUSZLRE.js → chunk-EWT3WMVY.js} +5 -5
- package/dist/{chunk-Q75SJ35X.js → chunk-GMTM6EN7.js} +3 -3
- package/dist/{chunk-R6SBP5M5.js → chunk-GOWBYHYW.js} +4 -4
- package/dist/{chunk-6NZTYZP5.js → chunk-GVA5CYKP.js} +2 -2
- package/dist/chunk-HMV4QMXS.js +219 -0
- package/dist/chunk-HMV4QMXS.js.map +1 -0
- package/dist/{chunk-VR5HDUBK.js → chunk-HP2ODXNA.js} +2 -2
- package/dist/{chunk-2MMEIN4T.js → chunk-I3E2QHTH.js} +4 -4
- package/dist/{chunk-UVGRRI7N.js → chunk-IPVYEPXO.js} +4 -4
- package/dist/{chunk-5ZTUP65G.js → chunk-JM64OEU6.js} +5 -5
- package/dist/{chunk-7BYFC2MR.js → chunk-JUHUKZGU.js} +7 -7
- package/dist/chunk-JZXWCEH5.js +116 -0
- package/dist/chunk-JZXWCEH5.js.map +1 -0
- package/dist/{chunk-DVUPIVI2.js → chunk-KT6HWAEN.js} +4 -4
- package/dist/{chunk-TLMLEC4F.js → chunk-KW7H5O3K.js} +6 -6
- package/dist/{chunk-VLHGBFR6.js → chunk-MZQTHSLN.js} +3 -3
- package/dist/{chunk-4SQFO4GW.js → chunk-NA7MIEG6.js} +7 -7
- package/dist/{chunk-QWDEOITU.js → chunk-O4VCZTK4.js} +2 -2
- package/dist/{chunk-LS4FMSHY.js → chunk-OAYX4XN7.js} +4 -4
- package/dist/{chunk-Y5UCOBQN.js → chunk-OGGHD64H.js} +4 -4
- package/dist/{chunk-7TZ6OC5T.js → chunk-OH3YGJT5.js} +2 -2
- package/dist/{chunk-REMK55JI.js → chunk-OLZTGVBT.js} +4 -4
- package/dist/{chunk-VNNG46TS.js → chunk-ORSLFKKZ.js} +6 -6
- package/dist/{chunk-ZIYMBR7K.js → chunk-OTH7H3IP.js} +2 -2
- package/dist/{chunk-5NKUYCZD.js → chunk-PN5CQKA2.js} +4 -4
- package/dist/{chunk-J4W4TQPC.js → chunk-QJRDDVZ2.js} +5 -5
- package/dist/{chunk-VNDOQEJ7.js → chunk-QRX5BYUQ.js} +4 -4
- package/dist/{chunk-XT7HMNBW.js → chunk-R6SNYC3D.js} +5 -5
- package/dist/{chunk-W2UTDN4T.js → chunk-RBGOGTT2.js} +4 -4
- package/dist/chunk-RP5FK3SO.js +79 -0
- package/dist/chunk-RP5FK3SO.js.map +1 -0
- package/dist/{chunk-X5MPHXG5.js → chunk-RPWEXIAW.js} +6 -6
- package/dist/chunk-RQWZYD6H.js +1 -0
- package/dist/chunk-RQWZYD6H.js.map +1 -0
- package/dist/{chunk-EXJBPKGW.js → chunk-SHDIZSN5.js} +5 -5
- package/dist/{chunk-23FCBIUN.js → chunk-TNVO2DTB.js} +8 -8
- package/dist/{chunk-AGSBIUPV.js → chunk-TPLKJHNN.js} +4 -4
- package/dist/{chunk-YQ6TNHAC.js → chunk-TTLI6PF7.js} +5 -5
- package/dist/{chunk-U2AC4AQX.js → chunk-TU5EIKJA.js} +4 -4
- package/dist/{chunk-KTK4A3IF.js → chunk-TX5V42AY.js} +11 -11
- package/dist/{chunk-BGYLL467.js → chunk-TXHJX2NG.js} +4 -4
- package/dist/{chunk-FL54G7PV.js → chunk-WIT3Y7JT.js} +2 -2
- package/dist/{chunk-W7Y6RA6W.js → chunk-WR5JFDQ5.js} +4 -4
- package/dist/chunk-XPMGFAJ3.js +36 -0
- package/dist/chunk-XPMGFAJ3.js.map +1 -0
- package/dist/{chunk-2UYR2OOE.js → chunk-YRUCIKPO.js} +4 -4
- package/dist/{chunk-AEGXHZQT.js → chunk-YW5T6KZ5.js} +7 -7
- package/dist/{chunk-QKIJ6YXZ.js → chunk-ZA4U5GDU.js} +4 -4
- package/dist/chunk-ZCPSND5Y.js +64 -0
- package/dist/chunk-ZCPSND5Y.js.map +1 -0
- package/dist/{chunk-ZKR5B6YJ.js → chunk-ZRPGVHTR.js} +2 -2
- package/dist/{chunk-OXQP3N6X.js → chunk-ZTZ6S5Q6.js} +4 -4
- package/dist/data-display/AsyncStateContainer.js +3 -3
- package/dist/data-display/Avatar.js +4 -4
- package/dist/data-display/Badge.js +2 -2
- package/dist/data-display/CardKit.js +11 -11
- package/dist/data-display/Carousel.js +2 -2
- package/dist/data-display/Chart.js +10 -10
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +68 -68
- package/dist/data-display/FleetMap.js +55 -0
- package/dist/data-display/FleetMap.js.map +1 -0
- package/dist/data-display/HoverCard.js +2 -2
- package/dist/data-display/Lightbox.js +2 -2
- package/dist/data-display/MapPreview.js +6 -6
- package/dist/data-display/Sheet.js +3 -3
- package/dist/data-display/Table.js +3 -3
- package/dist/feedback/ConfirmAction.js +3 -3
- package/dist/feedback/Modal.js +2 -2
- package/dist/feedback/StackedModal.js +2 -2
- package/dist/form/AddressAutocomplete.js +5 -5
- package/dist/form/CategorySelect.js +4 -4
- package/dist/form/Command.js +2 -2
- package/dist/form/DateRangePicker.js +5 -5
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/total-form.js +9 -9
- package/dist/layout/SettingsLayout.js +2 -2
- package/dist/locales.js +4 -4
- package/dist/native/chunks/{chunk-T6BJPP3E.js → chunk-DN73KYIZ.js} +1 -1
- package/dist/native/chunks/chunk-DN73KYIZ.js.map +1 -0
- package/dist/native/chunks/chunk-GW7TQ7HO.js +215 -0
- package/dist/native/chunks/chunk-GW7TQ7HO.js.map +1 -0
- package/dist/native/chunks/chunk-MJVSQXOD.js +9 -0
- package/dist/native/chunks/chunk-MJVSQXOD.js.map +1 -0
- package/dist/native/chunks/chunk-ZAQ3AZJM.js +292 -0
- package/dist/native/chunks/chunk-ZAQ3AZJM.js.map +1 -0
- package/dist/native/data-display/Alert.js +4 -4
- package/dist/native/data-display/Avatar.js +3 -3
- package/dist/native/data-display/Badge.js +4 -4
- package/dist/native/data-display/Chip.js +3 -5
- package/dist/native/data-display/Chip.js.map +1 -1
- package/dist/native/data-display/EmptyState.js +9 -286
- package/dist/native/data-display/EmptyState.js.map +1 -1
- package/dist/native/data-display/ErrorState.js +6 -6
- package/dist/native/data-display/FleetMap.js +498 -0
- package/dist/native/data-display/FleetMap.js.map +1 -0
- package/dist/native/data-display/LoadingState.js +3 -3
- package/dist/native/feedback/Dialog.js +3 -3
- package/dist/native/form/Checkbox.js +1 -1
- package/dist/native/form/Input.js +1 -1
- package/dist/native/form/Select.js +1 -1
- package/dist/native/form/Switch.js +1 -1
- package/dist/native/layout/Card.js +3 -3
- package/dist/native/layout/Skeleton.js +6 -209
- package/dist/native/layout/Skeleton.js.map +1 -1
- package/dist/navigation/AppHeader.js +6 -6
- package/dist/navigation/Pagination.js +2 -2
- package/dist/pt-BR.js +4 -4
- package/dist/types/components/data-display/FleetMap/FleetBody.d.ts +22 -0
- package/dist/types/components/data-display/FleetMap/FleetBody.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetCanvas.d.ts +50 -0
- package/dist/types/components/data-display/FleetMap/FleetCanvas.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.base.d.ts +141 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.base.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.d.ts +32 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.fixtures.d.ts +23 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.fixtures.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.helpers.d.ts +45 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.helpers.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.hooks.d.ts +71 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.hooks.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.metrics.d.ts +76 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.metrics.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.types.d.ts +45 -0
- package/dist/types/components/data-display/FleetMap/FleetMap.types.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/FleetRoster.d.ts +15 -0
- package/dist/types/components/data-display/FleetMap/FleetRoster.d.ts.map +1 -0
- package/dist/types/components/data-display/FleetMap/index.d.ts +5 -0
- package/dist/types/components/data-display/FleetMap/index.d.ts.map +1 -0
- package/dist/types/components/data-display/index.d.ts +1 -0
- package/dist/types/components/data-display/index.d.ts.map +1 -1
- package/dist/types/platform/aria.d.ts +13 -0
- package/dist/types/platform/aria.d.ts.map +1 -1
- package/dist/types-native/components/data-display/FleetMap/FleetMap.base.d.ts +141 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.base.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.helpers.d.ts +45 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.helpers.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.hooks.d.ts +71 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.hooks.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.metrics.d.ts +76 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.metrics.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.native.d.ts +30 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.types.native.d.ts +36 -0
- package/dist/types-native/components/data-display/FleetMap/FleetMap.types.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/FleetRoster.native.d.ts +17 -0
- package/dist/types-native/components/data-display/FleetMap/FleetRoster.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/FleetMap/index.native.d.ts +4 -0
- package/dist/types-native/components/data-display/FleetMap/index.native.d.ts.map +1 -0
- package/dist/types-native/platform/aria.d.ts +13 -0
- package/dist/types-native/platform/aria.d.ts.map +1 -1
- package/dist/user-avatar.js +5 -5
- package/package.json +9 -1
- package/src/components/data-display/FleetMap/FleetBody.tsx +96 -0
- package/src/components/data-display/FleetMap/FleetCanvas.tsx +80 -0
- package/src/components/data-display/FleetMap/FleetMap.base.ts +144 -0
- package/src/components/data-display/FleetMap/FleetMap.fixtures.ts +70 -0
- package/src/components/data-display/FleetMap/FleetMap.helpers.ts +85 -0
- package/src/components/data-display/FleetMap/FleetMap.hooks.ts +183 -0
- package/src/components/data-display/FleetMap/FleetMap.md +189 -0
- package/src/components/data-display/FleetMap/FleetMap.metrics.ts +81 -0
- package/src/components/data-display/FleetMap/FleetMap.native.tsx +185 -0
- package/src/components/data-display/FleetMap/FleetMap.tsx +163 -0
- package/src/components/data-display/FleetMap/FleetMap.types.native.ts +44 -0
- package/src/components/data-display/FleetMap/FleetMap.types.ts +53 -0
- package/src/components/data-display/FleetMap/FleetRoster.native.tsx +382 -0
- package/src/components/data-display/FleetMap/FleetRoster.tsx +327 -0
- package/src/components/data-display/FleetMap/NATIVE-NOTES.md +14 -0
- package/src/components/data-display/FleetMap/index.native.ts +10 -0
- package/src/components/data-display/FleetMap/index.ts +9 -0
- package/src/components/data-display/FleetMap/tests.md +84 -0
- package/src/components/data-display/FleetMap/track.md +50 -0
- package/src/components/data-display/index.ts +1 -0
- package/src/components/feedback/ConfirmAction/ConfirmAction.md +10 -4
- package/src/platform/aria.ts +13 -0
- package/dist/chunk-X3HL5C6H.js +0 -1
- package/dist/native/chunks/chunk-T6BJPP3E.js.map +0 -1
- /package/dist/{chunk-X3HL5C6H.js.map → _internal/components/data-display/FleetMap/FleetBody.js.map} +0 -0
- /package/dist/{chunk-WGRS4PGY.js.map → chunk-2C47DEVU.js.map} +0 -0
- /package/dist/{chunk-WMALDOF5.js.map → chunk-4G3FGCWX.js.map} +0 -0
- /package/dist/{chunk-ZOUWHGV3.js.map → chunk-4MGFUPQT.js.map} +0 -0
- /package/dist/{chunk-QFJRB27Q.js.map → chunk-6LGWJFQK.js.map} +0 -0
- /package/dist/{chunk-XSF6AXEU.js.map → chunk-6RZDDUSM.js.map} +0 -0
- /package/dist/{chunk-VIK3HAUQ.js.map → chunk-73NJCGQG.js.map} +0 -0
- /package/dist/{chunk-UU3QAKG6.js.map → chunk-B7DKSBAE.js.map} +0 -0
- /package/dist/{chunk-3FLVIVOK.js.map → chunk-BHIGHSXA.js.map} +0 -0
- /package/dist/{chunk-HKV4MQ2W.js.map → chunk-BLBOYCOV.js.map} +0 -0
- /package/dist/{chunk-PFV6RL4Q.js.map → chunk-C6KTQF4F.js.map} +0 -0
- /package/dist/{chunk-LYSSO6WC.js.map → chunk-CZPU5TW3.js.map} +0 -0
- /package/dist/{chunk-PMS3H3OO.js.map → chunk-DF2FFYZ7.js.map} +0 -0
- /package/dist/{chunk-QZBUGUOY.js.map → chunk-DFLTUI7W.js.map} +0 -0
- /package/dist/{chunk-WLQTHPMX.js.map → chunk-EJQW2IYW.js.map} +0 -0
- /package/dist/{chunk-VQAM2XZV.js.map → chunk-EMUBMZMA.js.map} +0 -0
- /package/dist/{chunk-XFUNJYFT.js.map → chunk-EPNUVSNK.js.map} +0 -0
- /package/dist/{chunk-MSUSZLRE.js.map → chunk-EWT3WMVY.js.map} +0 -0
- /package/dist/{chunk-Q75SJ35X.js.map → chunk-GMTM6EN7.js.map} +0 -0
- /package/dist/{chunk-R6SBP5M5.js.map → chunk-GOWBYHYW.js.map} +0 -0
- /package/dist/{chunk-6NZTYZP5.js.map → chunk-GVA5CYKP.js.map} +0 -0
- /package/dist/{chunk-VR5HDUBK.js.map → chunk-HP2ODXNA.js.map} +0 -0
- /package/dist/{chunk-2MMEIN4T.js.map → chunk-I3E2QHTH.js.map} +0 -0
- /package/dist/{chunk-UVGRRI7N.js.map → chunk-IPVYEPXO.js.map} +0 -0
- /package/dist/{chunk-5ZTUP65G.js.map → chunk-JM64OEU6.js.map} +0 -0
- /package/dist/{chunk-7BYFC2MR.js.map → chunk-JUHUKZGU.js.map} +0 -0
- /package/dist/{chunk-DVUPIVI2.js.map → chunk-KT6HWAEN.js.map} +0 -0
- /package/dist/{chunk-TLMLEC4F.js.map → chunk-KW7H5O3K.js.map} +0 -0
- /package/dist/{chunk-VLHGBFR6.js.map → chunk-MZQTHSLN.js.map} +0 -0
- /package/dist/{chunk-4SQFO4GW.js.map → chunk-NA7MIEG6.js.map} +0 -0
- /package/dist/{chunk-QWDEOITU.js.map → chunk-O4VCZTK4.js.map} +0 -0
- /package/dist/{chunk-LS4FMSHY.js.map → chunk-OAYX4XN7.js.map} +0 -0
- /package/dist/{chunk-Y5UCOBQN.js.map → chunk-OGGHD64H.js.map} +0 -0
- /package/dist/{chunk-7TZ6OC5T.js.map → chunk-OH3YGJT5.js.map} +0 -0
- /package/dist/{chunk-REMK55JI.js.map → chunk-OLZTGVBT.js.map} +0 -0
- /package/dist/{chunk-VNNG46TS.js.map → chunk-ORSLFKKZ.js.map} +0 -0
- /package/dist/{chunk-ZIYMBR7K.js.map → chunk-OTH7H3IP.js.map} +0 -0
- /package/dist/{chunk-5NKUYCZD.js.map → chunk-PN5CQKA2.js.map} +0 -0
- /package/dist/{chunk-J4W4TQPC.js.map → chunk-QJRDDVZ2.js.map} +0 -0
- /package/dist/{chunk-VNDOQEJ7.js.map → chunk-QRX5BYUQ.js.map} +0 -0
- /package/dist/{chunk-XT7HMNBW.js.map → chunk-R6SNYC3D.js.map} +0 -0
- /package/dist/{chunk-W2UTDN4T.js.map → chunk-RBGOGTT2.js.map} +0 -0
- /package/dist/{chunk-X5MPHXG5.js.map → chunk-RPWEXIAW.js.map} +0 -0
- /package/dist/{chunk-EXJBPKGW.js.map → chunk-SHDIZSN5.js.map} +0 -0
- /package/dist/{chunk-23FCBIUN.js.map → chunk-TNVO2DTB.js.map} +0 -0
- /package/dist/{chunk-AGSBIUPV.js.map → chunk-TPLKJHNN.js.map} +0 -0
- /package/dist/{chunk-YQ6TNHAC.js.map → chunk-TTLI6PF7.js.map} +0 -0
- /package/dist/{chunk-U2AC4AQX.js.map → chunk-TU5EIKJA.js.map} +0 -0
- /package/dist/{chunk-KTK4A3IF.js.map → chunk-TX5V42AY.js.map} +0 -0
- /package/dist/{chunk-BGYLL467.js.map → chunk-TXHJX2NG.js.map} +0 -0
- /package/dist/{chunk-FL54G7PV.js.map → chunk-WIT3Y7JT.js.map} +0 -0
- /package/dist/{chunk-W7Y6RA6W.js.map → chunk-WR5JFDQ5.js.map} +0 -0
- /package/dist/{chunk-2UYR2OOE.js.map → chunk-YRUCIKPO.js.map} +0 -0
- /package/dist/{chunk-AEGXHZQT.js.map → chunk-YW5T6KZ5.js.map} +0 -0
- /package/dist/{chunk-QKIJ6YXZ.js.map → chunk-ZA4U5GDU.js.map} +0 -0
- /package/dist/{chunk-ZKR5B6YJ.js.map → chunk-ZRPGVHTR.js.map} +0 -0
- /package/dist/{chunk-OXQP3N6X.js.map → chunk-ZTZ6S5Q6.js.map} +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { EmptyState } from '../EmptyState/EmptyState.native';
|
|
5
|
+
|
|
6
|
+
import { useFleetMap } from './FleetMap.hooks';
|
|
7
|
+
import {
|
|
8
|
+
FLEET_DEFAULT_LAGGING_AFTER_SECONDS,
|
|
9
|
+
FLEET_DEFAULT_STALE_AFTER_SECONDS,
|
|
10
|
+
FLEET_PANEL,
|
|
11
|
+
} from './FleetMap.metrics';
|
|
12
|
+
import type { FleetMapProps } from './FleetMap.types.native';
|
|
13
|
+
import { FleetRoster } from './FleetRoster.native';
|
|
14
|
+
import { webAria, webRole } from '../../../platform/aria';
|
|
15
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
16
|
+
import { MUI_FONT_WEIGHT_MEDIUM, muiTypeStyle } from '../../../tokens/mui-type';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The reload announcement, and nothing else.
|
|
20
|
+
*
|
|
21
|
+
* A busy region marks itself stale for assistive technology but UTTERS nothing,
|
|
22
|
+
* and the skeletons beside it are hidden from the reader — so a screen-reader
|
|
23
|
+
* user got silence while the roster reloaded. This is the utterance.
|
|
24
|
+
*
|
|
25
|
+
* Optional by design: the sentence is in the reader's language, which only the
|
|
26
|
+
* caller knows, and inventing an English one in a component whose whole premise
|
|
27
|
+
* is that every word arrives through `copy` would be the bug it exists to
|
|
28
|
+
* avoid. No `copy.loading`, no region.
|
|
29
|
+
*
|
|
30
|
+
* ## The node outlives the text, and that is the whole trick
|
|
31
|
+
*
|
|
32
|
+
* A live region has to exist BEFORE its content changes; a reader watches an
|
|
33
|
+
* existing region for mutations rather than announcing one that appears already
|
|
34
|
+
* populated. Mounting region-and-text together in a single commit is the classic
|
|
35
|
+
* silent case — it satisfies a query while announcing nothing. So the region
|
|
36
|
+
* mounts as soon as the caller offers the copy and merely EMPTIES when idle.
|
|
37
|
+
*
|
|
38
|
+
* `role="status"` and `aria-live` reach the DOM through react-native-web; on a
|
|
39
|
+
* device the announcement is made by `AccessibilityInfo` or not at all, which
|
|
40
|
+
* is recorded in `NATIVE-NOTES.md` rather than papered over here.
|
|
41
|
+
*/
|
|
42
|
+
function FleetStatus({
|
|
43
|
+
announcement,
|
|
44
|
+
loading,
|
|
45
|
+
testId,
|
|
46
|
+
}: {
|
|
47
|
+
announcement: string | undefined;
|
|
48
|
+
loading: boolean;
|
|
49
|
+
testId: string;
|
|
50
|
+
}): React.JSX.Element | null {
|
|
51
|
+
// No copy, no region at all — the caller has not asked for an announcement.
|
|
52
|
+
if (announcement === undefined) return null;
|
|
53
|
+
return (
|
|
54
|
+
<View
|
|
55
|
+
{...webRole('status')}
|
|
56
|
+
aria-live="polite"
|
|
57
|
+
accessibilityLiveRegion="polite"
|
|
58
|
+
testID={`${testId}-status`}
|
|
59
|
+
style={styles.srOnly}
|
|
60
|
+
>
|
|
61
|
+
<Text>{loading ? announcement : ''}</Text>
|
|
62
|
+
</View>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* FleetMap on React Native — where a set of tracked units is right now.
|
|
68
|
+
*
|
|
69
|
+
* Product-free by construction: it draws a labelled row with a freshness, and
|
|
70
|
+
* every word — the heading, the three freshness states, how a duration and a
|
|
71
|
+
* distance are written — arrives through `copy`. Couriers, service vans and
|
|
72
|
+
* field engineers are all the same list.
|
|
73
|
+
*
|
|
74
|
+
* ## What this renderer does NOT draw, and why
|
|
75
|
+
*
|
|
76
|
+
* There is no map. `MapPreview` — 2,200 lines that project, tile and decorate
|
|
77
|
+
* their own surface — has no React Native build, and porting it is its own
|
|
78
|
+
* change with its own consumers. What that costs is smaller than it sounds,
|
|
79
|
+
* because the web half already calls this list "the accessible representation,
|
|
80
|
+
* not a sidebar": every fact a pin carries — who, how recently, how precisely,
|
|
81
|
+
* what they are carrying — is on a row, in an order the map cannot express. So
|
|
82
|
+
* a native board is the half a screen reader was always given, and a device
|
|
83
|
+
* gets the same answers a dispatcher asks for. The gap is stated in
|
|
84
|
+
* `NATIVE-NOTES.md` rather than claimed away, and it is where the map goes when
|
|
85
|
+
* `MapPreview` is ported.
|
|
86
|
+
*
|
|
87
|
+
* The consequence for the API is one line in `FleetMap.types.native.ts`: the
|
|
88
|
+
* native copy interface has no `map` and no `mapLabel`, because a caller should
|
|
89
|
+
* not be asked to name controls nothing renders.
|
|
90
|
+
*/
|
|
91
|
+
export const FleetMap: React.FC<FleetMapProps> = React.memo(
|
|
92
|
+
({
|
|
93
|
+
units,
|
|
94
|
+
copy,
|
|
95
|
+
// NO default. `undefined` is what tells the hook the caller does not own
|
|
96
|
+
// the selection; defaulting it to `null` made every render look controlled
|
|
97
|
+
// and the uncontrolled path unreachable.
|
|
98
|
+
selectedId,
|
|
99
|
+
onSelect,
|
|
100
|
+
laggingAfterSeconds = FLEET_DEFAULT_LAGGING_AFTER_SECONDS,
|
|
101
|
+
staleAfterSeconds = FLEET_DEFAULT_STALE_AFTER_SECONDS,
|
|
102
|
+
loading = false,
|
|
103
|
+
maxHeight,
|
|
104
|
+
style,
|
|
105
|
+
dataTestId,
|
|
106
|
+
}) => {
|
|
107
|
+
const theme = useUiTheme();
|
|
108
|
+
const testId = dataTestId ?? 'fleet-map';
|
|
109
|
+
const { ordered, active, select, onKeyDown } = useFleetMap(units, selectedId, onSelect);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<View
|
|
113
|
+
{...webRole('region')}
|
|
114
|
+
accessibilityLabel={copy.title}
|
|
115
|
+
testID={testId}
|
|
116
|
+
style={[styles.panel, { gap: theme.spacing(FLEET_PANEL.gapUnits) }, style]}
|
|
117
|
+
>
|
|
118
|
+
<Text
|
|
119
|
+
{...webRole('heading')}
|
|
120
|
+
{...webAria({ 'aria-level': 2 })}
|
|
121
|
+
testID={`${testId}-title`}
|
|
122
|
+
style={[
|
|
123
|
+
muiTypeStyle(theme, 'body1'),
|
|
124
|
+
{ color: theme.palette.text.primary, fontWeight: `${MUI_FONT_WEIGHT_MEDIUM}` },
|
|
125
|
+
]}
|
|
126
|
+
>
|
|
127
|
+
{copy.title}
|
|
128
|
+
</Text>
|
|
129
|
+
|
|
130
|
+
<FleetStatus announcement={copy.loading} loading={loading} testId={testId} />
|
|
131
|
+
|
|
132
|
+
{!loading && ordered.length === 0 ? (
|
|
133
|
+
<EmptyState
|
|
134
|
+
variant="minimal"
|
|
135
|
+
title={copy.emptyTitle}
|
|
136
|
+
description={copy.emptyDescription}
|
|
137
|
+
dataTestId={`${testId}-empty`}
|
|
138
|
+
/>
|
|
139
|
+
) : (
|
|
140
|
+
/* The busy marker belongs on the BODY and never on the panel root —
|
|
141
|
+
the live region announcing the reload is a sibling above, and a
|
|
142
|
+
live region inside a busy subtree is exactly what busy tells
|
|
143
|
+
assistive technology to hold back. Marking the root would silence
|
|
144
|
+
the announcement for the whole of the only window in which it has
|
|
145
|
+
anything to say. The web half splits them the same way, and the
|
|
146
|
+
wrapper is also what the shared loading stories address. */
|
|
147
|
+
<View
|
|
148
|
+
aria-busy={loading || undefined}
|
|
149
|
+
accessibilityState={{ busy: loading }}
|
|
150
|
+
testID={`${testId}-body`}
|
|
151
|
+
style={styles.body}
|
|
152
|
+
>
|
|
153
|
+
<FleetRoster
|
|
154
|
+
units={ordered}
|
|
155
|
+
copy={copy}
|
|
156
|
+
selectedId={active}
|
|
157
|
+
onSelect={select}
|
|
158
|
+
laggingAfterSeconds={laggingAfterSeconds}
|
|
159
|
+
staleAfterSeconds={staleAfterSeconds}
|
|
160
|
+
loading={loading}
|
|
161
|
+
maxHeight={maxHeight}
|
|
162
|
+
testId={testId}
|
|
163
|
+
onKeyDown={onKeyDown}
|
|
164
|
+
/>
|
|
165
|
+
</View>
|
|
166
|
+
)}
|
|
167
|
+
</View>
|
|
168
|
+
);
|
|
169
|
+
},
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
FleetMap.displayName = 'FleetMap';
|
|
173
|
+
|
|
174
|
+
const styles = StyleSheet.create({
|
|
175
|
+
body: { flexShrink: 1, minWidth: 0 },
|
|
176
|
+
panel: { flexDirection: 'column', minWidth: 0 },
|
|
177
|
+
/**
|
|
178
|
+
* Off screen but still in the tree, which is what a live region needs. A
|
|
179
|
+
* `display: 'none'` view is not announced, and a zero-size one clips its text
|
|
180
|
+
* on some readers.
|
|
181
|
+
*/
|
|
182
|
+
srOnly: { height: 1, opacity: 0, overflow: 'hidden', position: 'absolute', width: 1 },
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export default FleetMap;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import Box from '@mui/material/Box/index.js';
|
|
2
|
+
import Typography from '@mui/material/Typography/index.js';
|
|
3
|
+
import { useTheme } from '@mui/material/styles/index.js';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { SR_ONLY_SX } from '../../form/Label/Label.styles';
|
|
7
|
+
import { EmptyState } from '../EmptyState/EmptyState';
|
|
8
|
+
|
|
9
|
+
import { FleetBody } from './FleetBody';
|
|
10
|
+
import { useFleetMap } from './FleetMap.hooks';
|
|
11
|
+
import {
|
|
12
|
+
FLEET_DEFAULT_LAGGING_AFTER_SECONDS,
|
|
13
|
+
FLEET_DEFAULT_STALE_AFTER_SECONDS,
|
|
14
|
+
FLEET_PANEL,
|
|
15
|
+
} from './FleetMap.metrics';
|
|
16
|
+
import type { FleetMapProps } from './FleetMap.types';
|
|
17
|
+
|
|
18
|
+
/** The map's own default height. Overridable, and never a hardcoded viewport. */
|
|
19
|
+
const DEFAULT_HEIGHT = '420px';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The reload announcement, and nothing else.
|
|
23
|
+
*
|
|
24
|
+
* `aria-busy` marks the region stale for assistive technology but UTTERS
|
|
25
|
+
* nothing, and the skeletons beside it are `aria-hidden` — so a screen-reader
|
|
26
|
+
* user got silence while the roster reloaded. This is the utterance.
|
|
27
|
+
*
|
|
28
|
+
* Optional by design: the sentence is in the reader's language, which only the
|
|
29
|
+
* caller knows, and inventing an English one in a component whose whole premise
|
|
30
|
+
* is that every word arrives through `copy` would be the bug it exists to
|
|
31
|
+
* avoid. No `copy.loading`, no region.
|
|
32
|
+
*
|
|
33
|
+
* ## The node outlives the text, and that is the whole trick
|
|
34
|
+
*
|
|
35
|
+
* A live region has to be in the DOM BEFORE its content changes; a screen
|
|
36
|
+
* reader watches an existing region for mutations rather than announcing one
|
|
37
|
+
* that appears already populated. Mounting region-and-text together in a single
|
|
38
|
+
* commit is the classic silent case — it satisfies a DOM assertion while
|
|
39
|
+
* announcing nothing. So the region mounts as soon as the caller offers the
|
|
40
|
+
* copy and merely EMPTIES when idle, which is what `CepField`, `UploadButton`
|
|
41
|
+
* and `DateRangePickerFields` all do.
|
|
42
|
+
*/
|
|
43
|
+
function FleetStatus({
|
|
44
|
+
announcement,
|
|
45
|
+
loading,
|
|
46
|
+
testId,
|
|
47
|
+
}: {
|
|
48
|
+
announcement: string | undefined;
|
|
49
|
+
loading: boolean;
|
|
50
|
+
testId: string;
|
|
51
|
+
}): React.JSX.Element | null {
|
|
52
|
+
// No copy, no region at all — the caller has not asked for an announcement.
|
|
53
|
+
if (announcement === undefined) return null;
|
|
54
|
+
return (
|
|
55
|
+
<Box role="status" aria-live="polite" data-testid={`${testId}-status`} sx={SR_ONLY_SX}>
|
|
56
|
+
{loading ? announcement : ''}
|
|
57
|
+
</Box>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* FleetMap — where a set of tracked units is right now, as a map beside the
|
|
63
|
+
* roster that reads it.
|
|
64
|
+
*
|
|
65
|
+
* Product-free by construction: it draws labelled dots with a freshness, and
|
|
66
|
+
* every word — the heading, the three freshness states, how a duration and a
|
|
67
|
+
* distance are written — arrives through {@link FleetMapProps.copy}. Couriers,
|
|
68
|
+
* service vans and field engineers are all the same picture.
|
|
69
|
+
*
|
|
70
|
+
* ## Three decisions worth knowing before changing it
|
|
71
|
+
*
|
|
72
|
+
* **The roster is the accessible representation, not a sidebar.** A map is a
|
|
73
|
+
* picture and a screen reader cannot read one, so the list carries the
|
|
74
|
+
* information: everything a sighted user gets from a pin — who, how recently,
|
|
75
|
+
* what they are carrying — is on the row. The map is a NAMED region rather than
|
|
76
|
+
* an `aria-hidden` one, because its controls are focusable and hiding a
|
|
77
|
+
* focusable subtree is the `aria-hidden-focus` violation.
|
|
78
|
+
*
|
|
79
|
+
* **Nothing here formats.** `lastSeen` and `accuracy` are functions on the copy
|
|
80
|
+
* object, the same line `StatCard` holds for its `value`: a duration and a
|
|
81
|
+
* distance are locale rules, and a component that wrote "2 min ago" would have
|
|
82
|
+
* made English the only language it could ever render.
|
|
83
|
+
*
|
|
84
|
+
* **An empty fleet is an empty STATE, not an empty map.** A map with no pins is
|
|
85
|
+
* indistinguishable from a map that failed to load, and the difference is the
|
|
86
|
+
* whole question a dispatcher is asking.
|
|
87
|
+
*/
|
|
88
|
+
export const FleetMap: React.FC<FleetMapProps> = React.memo(
|
|
89
|
+
({
|
|
90
|
+
units,
|
|
91
|
+
copy,
|
|
92
|
+
// NO default. `undefined` is what tells the hook the caller does not own
|
|
93
|
+
// the selection; defaulting it to `null` here made every render look
|
|
94
|
+
// controlled and the uncontrolled path unreachable.
|
|
95
|
+
selectedId,
|
|
96
|
+
onSelect,
|
|
97
|
+
laggingAfterSeconds = FLEET_DEFAULT_LAGGING_AFTER_SECONDS,
|
|
98
|
+
staleAfterSeconds = FLEET_DEFAULT_STALE_AFTER_SECONDS,
|
|
99
|
+
height = DEFAULT_HEIGHT,
|
|
100
|
+
loading = false,
|
|
101
|
+
className,
|
|
102
|
+
dataTestId,
|
|
103
|
+
}) => {
|
|
104
|
+
const theme = useTheme();
|
|
105
|
+
const testId = dataTestId || 'fleet-map';
|
|
106
|
+
const headingId = React.useId();
|
|
107
|
+
const { ordered, active, centre, select, markers, onKeyDown } = useFleetMap(
|
|
108
|
+
units,
|
|
109
|
+
selectedId,
|
|
110
|
+
onSelect,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<Box
|
|
115
|
+
role="region"
|
|
116
|
+
aria-labelledby={headingId}
|
|
117
|
+
className={className}
|
|
118
|
+
data-testid={testId}
|
|
119
|
+
sx={{ display: 'flex', flexDirection: 'column', gap: theme.spacing(FLEET_PANEL.gapUnits), minWidth: 0 }}
|
|
120
|
+
>
|
|
121
|
+
<Typography
|
|
122
|
+
id={headingId}
|
|
123
|
+
variant="subtitle1"
|
|
124
|
+
component="h2"
|
|
125
|
+
data-testid={`${testId}-title`}
|
|
126
|
+
sx={{ fontWeight: theme.typography.fontWeightMedium }}
|
|
127
|
+
>
|
|
128
|
+
{copy.title}
|
|
129
|
+
</Typography>
|
|
130
|
+
|
|
131
|
+
<FleetStatus announcement={copy.loading} loading={loading} testId={testId} />
|
|
132
|
+
|
|
133
|
+
{!loading && ordered.length === 0 ? (
|
|
134
|
+
<EmptyState
|
|
135
|
+
variant="minimal"
|
|
136
|
+
title={copy.emptyTitle}
|
|
137
|
+
description={copy.emptyDescription}
|
|
138
|
+
dataTestId={`${testId}-empty`}
|
|
139
|
+
/>
|
|
140
|
+
) : (
|
|
141
|
+
<FleetBody
|
|
142
|
+
ordered={ordered}
|
|
143
|
+
centre={centre}
|
|
144
|
+
markers={markers}
|
|
145
|
+
select={select}
|
|
146
|
+
onKeyDown={onKeyDown}
|
|
147
|
+
copy={copy}
|
|
148
|
+
selectedId={active}
|
|
149
|
+
laggingAfterSeconds={laggingAfterSeconds}
|
|
150
|
+
staleAfterSeconds={staleAfterSeconds}
|
|
151
|
+
height={height}
|
|
152
|
+
loading={loading}
|
|
153
|
+
testId={testId}
|
|
154
|
+
/>
|
|
155
|
+
)}
|
|
156
|
+
</Box>
|
|
157
|
+
);
|
|
158
|
+
},
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
FleetMap.displayName = 'FleetMap';
|
|
162
|
+
|
|
163
|
+
export default FleetMap;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { FleetMapBaseProps, FleetMapCopyBase } from './FleetMap.base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The REACT NATIVE half of `FleetMap`'s contract.
|
|
7
|
+
*
|
|
8
|
+
* Everything platform-neutral is re-exported from `FleetMap.base.ts` unchanged.
|
|
9
|
+
* What differs is at both ends of the file: there is no `map` copy and no
|
|
10
|
+
* `mapLabel`, because there is no map — `MapPreview` has no native build, and
|
|
11
|
+
* the roster is this component's own stated "accessible representation, not a
|
|
12
|
+
* sidebar", which is exactly the half that ports. And `style` stands where the
|
|
13
|
+
* web takes `className`, which is the ordinary `sx`/`style` split.
|
|
14
|
+
*/
|
|
15
|
+
export type {
|
|
16
|
+
FleetFreshness,
|
|
17
|
+
FleetMapBaseProps,
|
|
18
|
+
FleetMapCopyBase,
|
|
19
|
+
FleetUnit,
|
|
20
|
+
} from './FleetMap.base';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Every word the native board prints.
|
|
24
|
+
*
|
|
25
|
+
* An alias rather than an empty `extends`, so that the day `MapPreview` is
|
|
26
|
+
* ported this becomes an interface with the map's words in it and no consumer
|
|
27
|
+
* import has to move.
|
|
28
|
+
*/
|
|
29
|
+
export type FleetMapCopy = FleetMapCopyBase;
|
|
30
|
+
|
|
31
|
+
/** Props for the native {@link FleetMap} board. */
|
|
32
|
+
export interface FleetMapProps extends FleetMapBaseProps {
|
|
33
|
+
copy: FleetMapCopy;
|
|
34
|
+
/**
|
|
35
|
+
* A ceiling for the roster, so a fleet of thirty scrolls inside the panel
|
|
36
|
+
* rather than pushing everything below it off the screen.
|
|
37
|
+
*
|
|
38
|
+
* A NUMBER of pixels, where the web takes any CSS length: React Native has no
|
|
39
|
+
* `calc`, no viewport units and no `%` that resolves against a parent which
|
|
40
|
+
* has not sized itself.
|
|
41
|
+
*/
|
|
42
|
+
maxHeight?: number;
|
|
43
|
+
style?: StyleProp<ViewStyle>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { MapPreviewCopy } from '../../../copy';
|
|
2
|
+
|
|
3
|
+
import type { FleetMapBaseProps, FleetMapCopyBase } from './FleetMap.base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The WEB half of `FleetMap`'s contract.
|
|
7
|
+
*
|
|
8
|
+
* Everything platform-neutral lives in `FleetMap.base.ts` and is re-exported
|
|
9
|
+
* here unchanged, so a consumer's `import type { FleetUnit } from
|
|
10
|
+
* '@12-apps/ui/data-display/FleetMap'` keeps resolving exactly as it did. What
|
|
11
|
+
* this file adds is what only the web has: the map.
|
|
12
|
+
*/
|
|
13
|
+
export type {
|
|
14
|
+
FleetFreshness,
|
|
15
|
+
FleetMapBaseProps,
|
|
16
|
+
FleetMapCopyBase,
|
|
17
|
+
FleetUnit,
|
|
18
|
+
} from './FleetMap.base';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Every word the board prints, plus the map control bar's own six.
|
|
22
|
+
*
|
|
23
|
+
* `map` is web-only because the map half is: `MapPreview` has no React Native
|
|
24
|
+
* build yet, so the native copy interface stops at the roster's words rather
|
|
25
|
+
* than asking a caller to name controls nothing renders. See `NATIVE-NOTES.md`.
|
|
26
|
+
*/
|
|
27
|
+
export interface FleetMapCopy extends FleetMapCopyBase {
|
|
28
|
+
/**
|
|
29
|
+
* The map region's accessible name.
|
|
30
|
+
*
|
|
31
|
+
* The map is NOT `aria-hidden`, and that is deliberate rather than an
|
|
32
|
+
* oversight: it carries focusable controls (zoom, centre, map type), and
|
|
33
|
+
* `aria-hidden` over a focusable subtree is the `aria-hidden-focus`
|
|
34
|
+
* violation — a keyboard user tabs into a region a screen reader insists is
|
|
35
|
+
* not there. So it is a NAMED region a reader can skip past instead, and the
|
|
36
|
+
* roster beside it carries every fact a pin does.
|
|
37
|
+
*
|
|
38
|
+
* Skipping it does not silence it: `MapPreview` carries its own
|
|
39
|
+
* `aria-live="polite"` and announces its centre in English on every
|
|
40
|
+
* re-centre. See `FleetCanvas` for why that is stated rather than fixed here.
|
|
41
|
+
*/
|
|
42
|
+
mapLabel: string;
|
|
43
|
+
/** The map control bar's own six names. */
|
|
44
|
+
map: MapPreviewCopy;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Props for the {@link FleetMap} live board. */
|
|
48
|
+
export interface FleetMapProps extends FleetMapBaseProps {
|
|
49
|
+
copy: FleetMapCopy;
|
|
50
|
+
/** Map height, any CSS length. */
|
|
51
|
+
height?: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|