@12-apps/ui 6.83.0 → 6.85.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 +1 -1
- package/components-catalog.md +7 -0
- package/dist/_internal/components/data-display/Alert/Alert.js +2 -2
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.js +3 -3
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +3 -3
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +3 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +5 -5
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +9 -9
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +7 -7
- package/dist/_internal/components/data-display/Carousel/Carousel.js +11 -11
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +6 -6
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +6 -6
- package/dist/_internal/components/data-display/Chart/SpecChart.js +10 -10
- package/dist/_internal/components/data-display/Chart/chart-context.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-internals.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +5 -5
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +68 -67
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +82 -81
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +5 -5
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +6 -6
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +8 -8
- package/dist/_internal/components/data-display/DataViews/base-card.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +19 -19
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +9 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +32 -31
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +64 -63
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +34 -33
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +28 -27
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +31 -30
- package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +8 -7
- package/dist/_internal/components/data-display/DataViews/data-views-range-reset.js +9 -0
- package/dist/_internal/components/data-display/DataViews/data-views-search.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +20 -20
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-writers.js +3 -1
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +8 -8
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +22 -22
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +17 -17
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +24 -24
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +4 -4
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +5 -5
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +6 -6
- package/dist/_internal/components/data-display/Lightbox/LightboxControls.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/LightboxOverlay.js +3 -3
- package/dist/_internal/components/data-display/Lightbox/LightboxThumbnails.js +2 -2
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapControlBar.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +8 -8
- package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapPreview.helpers.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +16 -16
- package/dist/_internal/components/data-display/MapPreview/MapSearchBar.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
- package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
- package/dist/_internal/components/data-display/RegionMap/RegionMap.fixtures.js +51 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.fixtures.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.helpers.js +38 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.helpers.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.hooks.js +9 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.hooks.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.js +37 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.types.js +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMap.types.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapDrawing.js +10 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapDrawing.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapLegend.js +9 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapLegend.js.map +1 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapList.js +34 -0
- package/dist/_internal/components/data-display/RegionMap/RegionMapList.js.map +1 -0
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +6 -6
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +3 -3
- package/dist/_internal/components/data-display/StatCard/StatCard.js +3 -3
- package/dist/_internal/components/data-display/Table/Table.js +2 -2
- package/dist/_internal/components/data-display/index.js +103 -86
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/Modal/Modal.js +2 -2
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +7 -7
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +10 -10
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js +9 -9
- package/dist/_internal/components/feedback/index.js +21 -21
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +8 -8
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +6 -6
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +3 -3
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +4 -4
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +3 -3
- package/dist/_internal/components/form/Button/Button.js +4 -4
- package/dist/_internal/components/form/Button/Button.styles.js +3 -3
- package/dist/_internal/components/form/Calendar/Calendar.js +5 -5
- package/dist/_internal/components/form/Calendar/CalendarSelectorsMonth.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +8 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +11 -11
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +4 -4
- package/dist/_internal/components/form/CepField/CepField.js +6 -6
- package/dist/_internal/components/form/Checkbox/Checkbox.js +2 -2
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- package/dist/_internal/components/form/Command/Command.js +3 -3
- package/dist/_internal/components/form/Command/Command.styles.js +3 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +5 -5
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +12 -12
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +5 -5
- package/dist/_internal/components/form/Input/Input.factory.js +4 -4
- package/dist/_internal/components/form/Input/Input.js +5 -5
- package/dist/_internal/components/form/Input/Input.styles.js +3 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.hooks.js +1 -1
- package/dist/_internal/components/form/InputOTP/InputOTP.js +5 -5
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +3 -3
- package/dist/_internal/components/form/Label/Label.js +3 -3
- package/dist/_internal/components/form/Label/Label.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.item.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.js +7 -7
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +5 -5
- package/dist/_internal/components/form/NumberField/NumberField.js +6 -6
- package/dist/_internal/components/form/PhoneInput/PhoneInput.hooks.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +5 -5
- package/dist/_internal/components/form/PickerSheet/PickerSheet.js +6 -6
- package/dist/_internal/components/form/PickerSheet/PickerSheet.parts.js +4 -4
- package/dist/_internal/components/form/PickerSheet/PickerSheet.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +5 -5
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/Select/Select.js +6 -6
- package/dist/_internal/components/form/Select/Select.menu.js +4 -4
- package/dist/_internal/components/form/Select/Select.searchable.js +4 -4
- package/dist/_internal/components/form/Select/Select.styles.js +3 -3
- package/dist/_internal/components/form/Textarea/Textarea.js +3 -3
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +3 -3
- package/dist/_internal/components/form/ToggleGroup/ToggleGroup.js +3 -3
- package/dist/_internal/components/form/index.js +60 -60
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +12 -12
- package/dist/_internal/components/form/total-form/Fields/CepField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/TextField.js +6 -6
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +31 -31
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -5
- package/dist/_internal/components/index.js +235 -218
- package/dist/_internal/components/layout/Box/Box.js +6 -6
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +4 -4
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectTriggers.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SavedViewsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SortByDropdown.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +3 -3
- package/dist/_internal/components/layout/Screen/Screen.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +12 -12
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +12 -12
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +2 -2
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +7 -7
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +3 -3
- package/dist/_internal/components/layout/index.js +34 -34
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +9 -9
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +3 -3
- package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +2 -2
- package/dist/_internal/components/navigation/Pagination/Pagination.js +4 -4
- package/dist/_internal/components/navigation/Pagination/PaginationParts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/Tabs/Tabs.styles.js +2 -2
- package/dist/_internal/components/navigation/index.js +18 -18
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
- package/dist/_internal/components/utility/index.js +16 -16
- package/dist/_internal/en-US.data-display.js +2 -2
- package/dist/_internal/icons/Icon.js +6 -6
- package/dist/_internal/provider/UiProvider.js +5 -5
- package/dist/_internal/provider/mui-bridge.js +4 -4
- package/dist/_internal/provider/use-ui-theme.js +5 -5
- package/dist/_internal/pt-BR.data-display.js +2 -2
- package/dist/_internal/social-login-button/social-login-button.js +5 -5
- package/dist/_internal/tokens/density.js +3 -3
- package/dist/_internal/tokens/field-height.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +8 -8
- package/dist/charts.js +20 -20
- package/dist/{chunk-3RHU2Y2N.js → chunk-2DDCRHJE.js} +2 -2
- package/dist/{chunk-EBEMNKTK.js → chunk-2GDPZ53K.js} +8 -5
- package/dist/chunk-2GDPZ53K.js.map +1 -0
- package/dist/{chunk-X3EB67O2.js → chunk-2VRJ577J.js} +4 -4
- package/dist/{chunk-QSRZOXQI.js → chunk-2WVHZIWP.js} +2 -2
- package/dist/{chunk-6OYB3MRF.js → chunk-33AVAYCR.js} +3 -3
- package/dist/{chunk-62SXUU5U.js → chunk-3DPPDGOF.js} +5 -5
- package/dist/{chunk-7RG37FVT.js → chunk-3IX2TP4I.js} +30 -3
- package/dist/chunk-3IX2TP4I.js.map +1 -0
- package/dist/chunk-3OL2TSEJ.js +80 -0
- package/dist/chunk-3OL2TSEJ.js.map +1 -0
- package/dist/{chunk-BTGXHQX3.js → chunk-4JNC5AEF.js} +2 -2
- package/dist/{chunk-6MOJK2QT.js → chunk-4SQ2WCZA.js} +2 -2
- package/dist/{chunk-QHFAKEZZ.js → chunk-4V37DAMA.js} +3 -3
- package/dist/{chunk-RDRXTH47.js → chunk-52RHAAIH.js} +17 -13
- package/dist/chunk-52RHAAIH.js.map +1 -0
- package/dist/{chunk-E3E4L7MH.js → chunk-56GWNA5V.js} +5 -5
- package/dist/{chunk-JK3QB7MO.js → chunk-5CP5Z3YU.js} +2 -2
- package/dist/{chunk-2ZMR3TZU.js → chunk-5S5K73I6.js} +3 -3
- package/dist/{chunk-RBW5QQXW.js → chunk-5XTPEA3O.js} +2 -2
- package/dist/{chunk-WWB43LWU.js → chunk-5ZC7CNU4.js} +2 -2
- package/dist/{chunk-V4JMZZGH.js → chunk-6A4PTK5Q.js} +5 -5
- package/dist/{chunk-2P5ZBBTL.js → chunk-6GICMRDX.js} +5 -5
- package/dist/{chunk-QOTMQLMW.js → chunk-6OISIUZM.js} +3 -3
- package/dist/{chunk-34FX3NRZ.js → chunk-6PTP5NID.js} +2 -2
- package/dist/{chunk-3XZZSHE5.js → chunk-6VTOGR36.js} +5 -5
- package/dist/{chunk-SEUJNFOD.js → chunk-6WHIJPEF.js} +2 -2
- package/dist/{chunk-62XVHRTX.js → chunk-72HOUWAW.js} +71 -22
- package/dist/chunk-72HOUWAW.js.map +1 -0
- package/dist/{chunk-2D4WKET2.js → chunk-75FHDUJW.js} +5 -5
- package/dist/{chunk-66QQ7YQN.js → chunk-75I42HHE.js} +2 -2
- package/dist/{chunk-AAREDFH6.js → chunk-7TKQIZ3K.js} +2 -2
- package/dist/{chunk-WPFVQVQC.js → chunk-7VUXSNVZ.js} +5 -5
- package/dist/{chunk-4J62V5OE.js → chunk-7YJYIMWP.js} +2 -2
- package/dist/chunk-A63WU4UZ.js +226 -0
- package/dist/chunk-A63WU4UZ.js.map +1 -0
- package/dist/chunk-ABRUOINB.js +1 -0
- package/dist/chunk-ABRUOINB.js.map +1 -0
- package/dist/{chunk-UERGWYGY.js → chunk-ABRVOPC2.js} +3 -3
- package/dist/{chunk-M74YHHJE.js → chunk-ACBHZG3Z.js} +5 -5
- package/dist/chunk-ACFKPE2T.js +1 -0
- package/dist/chunk-ACFKPE2T.js.map +1 -0
- package/dist/{chunk-XKPV52CG.js → chunk-ARMKSYEQ.js} +3 -3
- package/dist/{chunk-MHFXJRLD.js → chunk-AT6UKTH4.js} +2 -2
- package/dist/{chunk-RB3R6BJL.js → chunk-AWUFS2ZC.js} +7 -7
- package/dist/{chunk-QK3XXPBA.js → chunk-BECKKDYG.js} +2 -2
- package/dist/{chunk-64UNVW6D.js → chunk-BP3ZKIPE.js} +4 -4
- package/dist/{chunk-ENRB6PIN.js → chunk-BRHRK7BK.js} +2 -2
- package/dist/chunk-BRZKOUEL.js +115 -0
- package/dist/chunk-BRZKOUEL.js.map +1 -0
- package/dist/{chunk-UQ6SAIX7.js → chunk-C74PDNTF.js} +4 -4
- package/dist/{chunk-76IHYINM.js → chunk-CARUHKZW.js} +23 -16
- package/dist/chunk-CARUHKZW.js.map +1 -0
- package/dist/{chunk-3HSLEUVW.js → chunk-CBO46LJH.js} +5 -5
- package/dist/{chunk-EMSMJRP3.js → chunk-CESGZRVQ.js} +4 -4
- package/dist/{chunk-LODYTVOO.js → chunk-CFDWKQZT.js} +2 -2
- package/dist/chunk-COOSJKZL.js +197 -0
- package/dist/chunk-COOSJKZL.js.map +1 -0
- package/dist/{chunk-TPAMLIN7.js → chunk-CPZGFIFH.js} +2 -2
- package/dist/{chunk-D4LMRSY7.js → chunk-CSGBHYW6.js} +2 -2
- package/dist/{chunk-JW7MN4DG.js → chunk-D34PZJH3.js} +2 -2
- package/dist/{chunk-WT7VZDTI.js → chunk-DDNUPFPE.js} +5 -5
- package/dist/{chunk-LZ5PGB7U.js → chunk-DYRZRY2T.js} +5 -5
- package/dist/{chunk-73BMQ3VC.js → chunk-ENJOBJPK.js} +2 -2
- package/dist/{chunk-7XSCEHGA.js → chunk-EOQ6EKTS.js} +7 -7
- package/dist/{chunk-U36BXXQ7.js → chunk-EP3DRILI.js} +2 -2
- package/dist/{chunk-SYERREN5.js → chunk-FCLON3MO.js} +6 -6
- package/dist/{chunk-GLAAX5JJ.js → chunk-FEKWKWGK.js} +5 -4
- package/dist/{chunk-GLAAX5JJ.js.map → chunk-FEKWKWGK.js.map} +1 -1
- package/dist/{chunk-33MMQHYU.js → chunk-FJ3UZ4RC.js} +2 -2
- package/dist/{chunk-LNIK7FJO.js → chunk-FORQEHRQ.js} +2 -2
- package/dist/{chunk-N3W6FZOC.js → chunk-FQGPYP2M.js} +4 -4
- package/dist/{chunk-MAHY7PK3.js → chunk-FQMLTCXT.js} +4 -4
- package/dist/{chunk-BDJIP4HG.js → chunk-FRUDRDJX.js} +4 -4
- package/dist/{chunk-MO4FFK62.js → chunk-FXECKKPW.js} +3 -3
- package/dist/{chunk-UWVVKUCG.js → chunk-FZEDQNUN.js} +3 -3
- package/dist/{chunk-6LMYQJZP.js → chunk-GCBWZ3MX.js} +2 -2
- package/dist/{chunk-YASSCBWN.js → chunk-GHP5JLL3.js} +2 -2
- package/dist/{chunk-3S352ZSG.js → chunk-GLR5MSU3.js} +2 -2
- package/dist/chunk-GMRQPNG3.js +80 -0
- package/dist/chunk-GMRQPNG3.js.map +1 -0
- package/dist/{chunk-ATJTGQYE.js → chunk-GOQOVKUZ.js} +3 -3
- package/dist/{chunk-REMODSVN.js → chunk-HDTFLW42.js} +2 -2
- package/dist/{chunk-SFVHZAGE.js → chunk-HG2YLNGJ.js} +2 -2
- package/dist/{chunk-AMLHEKSV.js → chunk-HI7JPDD6.js} +5 -5
- package/dist/{chunk-OKDAHCYE.js → chunk-HJJR2WGL.js} +2 -2
- package/dist/{chunk-J34VGMA5.js → chunk-HNEZWVDR.js} +2 -2
- package/dist/{chunk-YJPBNIEM.js → chunk-HUXAIQC5.js} +2 -2
- package/dist/{chunk-OUI5IPS6.js → chunk-HWPQKHN2.js} +6 -6
- package/dist/{chunk-MNNIOQTQ.js → chunk-I7JUAHUO.js} +3 -3
- package/dist/{chunk-LC6ND4ET.js → chunk-IBOFASAZ.js} +2 -2
- package/dist/{chunk-TNDTEI6D.js → chunk-IDRVQVDL.js} +2 -2
- package/dist/{chunk-GYFKIPR2.js → chunk-IEAPXS57.js} +2 -2
- package/dist/{chunk-NQCTANF3.js → chunk-IF5UY3CT.js} +4 -4
- package/dist/{chunk-YHKHHSZH.js → chunk-IFX5KP65.js} +4 -4
- package/dist/{chunk-XATRYJ4Q.js → chunk-IMCSY2SI.js} +6 -6
- package/dist/{chunk-BARTUKJU.js → chunk-IU2WSJ4F.js} +2 -2
- package/dist/{chunk-GVSRBFP3.js → chunk-IYDXKLCE.js} +7 -7
- package/dist/{chunk-5NT2M2JI.js → chunk-JKIKHWD2.js} +4 -4
- package/dist/{chunk-HQCZT6TO.js → chunk-JVOEVTCZ.js} +5 -5
- package/dist/{chunk-LCGK22QQ.js → chunk-JVTZ7FWR.js} +5 -5
- package/dist/{chunk-BO6IMK5P.js → chunk-JZQYVGPV.js} +3 -3
- package/dist/{chunk-3W2B7IZG.js → chunk-K6WY2CHG.js} +2 -2
- package/dist/{chunk-RWCQ6TEM.js → chunk-KR4TN3OF.js} +2 -2
- package/dist/{chunk-SUCVFEPT.js → chunk-KRPDBVUB.js} +5 -5
- package/dist/{chunk-LRIPJ2D5.js → chunk-KRYOT3KB.js} +2 -2
- package/dist/{chunk-3V3Z4EML.js → chunk-L4FWEI2P.js} +5 -5
- package/dist/{chunk-I3OKAQ5L.js → chunk-L7HNQRFS.js} +7 -7
- package/dist/{chunk-J7C7FPVO.js → chunk-LABIUXDM.js} +2 -2
- package/dist/{chunk-GJOU26UW.js → chunk-LH3YT5NL.js} +8 -8
- package/dist/chunk-LH3YT5NL.js.map +1 -0
- package/dist/{chunk-GM7BG3SD.js → chunk-LLPPIO3K.js} +3 -3
- package/dist/{chunk-RCTHCXS6.js → chunk-LRQT4MQO.js} +2 -2
- package/dist/{chunk-LTSVYILY.js → chunk-LXMFHD7M.js} +4 -4
- package/dist/{chunk-72OG3AGH.js → chunk-LYB6YYTG.js} +2 -2
- package/dist/{chunk-DRJL3JHR.js → chunk-LZJHHMOF.js} +2 -2
- package/dist/{chunk-Y4KR4LT2.js → chunk-MIUPTZS6.js} +2 -2
- package/dist/{chunk-XXUTD74L.js → chunk-MK6UXAWY.js} +3 -3
- package/dist/{chunk-BIUT3K6A.js → chunk-MKNW4FRR.js} +6 -6
- package/dist/{chunk-NZDIO5UG.js → chunk-MVNFUIJS.js} +5 -5
- package/dist/{chunk-APBIQH4G.js → chunk-N5OEDOJT.js} +7 -7
- package/dist/{chunk-UAOE3ZPC.js → chunk-NEYZV6V5.js} +6 -6
- package/dist/{chunk-ZXHODKHH.js → chunk-NKHNUTTY.js} +3 -3
- package/dist/{chunk-JL4I7OQE.js → chunk-NOF2FF4K.js} +2 -2
- package/dist/{chunk-WOSUYOAU.js → chunk-NQYC7V5N.js} +5 -5
- package/dist/{chunk-HF2WLLGH.js → chunk-NTRWUDP6.js} +3 -3
- package/dist/{chunk-HF2WLLGH.js.map → chunk-NTRWUDP6.js.map} +1 -1
- package/dist/{chunk-ZCCKIWZU.js → chunk-NYA26GV2.js} +2 -2
- package/dist/{chunk-N3LW5ER5.js → chunk-NZBEE2PR.js} +3 -3
- package/dist/{chunk-DYHOBKPU.js → chunk-OA6T2ME3.js} +5 -5
- package/dist/{chunk-U5FOJBLG.js → chunk-OOLES6RR.js} +14 -2
- package/dist/chunk-OOLES6RR.js.map +1 -0
- package/dist/{chunk-4UCXJYOO.js → chunk-OPY2AGAU.js} +6 -6
- package/dist/chunk-OPY2AGAU.js.map +1 -0
- package/dist/{chunk-4IVEBBF6.js → chunk-OQN2FHEL.js} +5 -4
- package/dist/{chunk-4IVEBBF6.js.map → chunk-OQN2FHEL.js.map} +1 -1
- package/dist/{chunk-WNIL2KTB.js → chunk-OQW4OERS.js} +3 -3
- package/dist/{chunk-JJNY5MZL.js → chunk-OZYUE2BI.js} +2 -2
- package/dist/{chunk-Y3TD7HOY.js → chunk-P4Q7JK4L.js} +2 -2
- package/dist/{chunk-W676GY42.js → chunk-P772HCHI.js} +4 -4
- package/dist/chunk-PBRCKHN3.js +75 -0
- package/dist/chunk-PBRCKHN3.js.map +1 -0
- package/dist/{chunk-4AJY7HMH.js → chunk-PD7MKJCM.js} +5 -5
- package/dist/{chunk-ICKR3QTG.js → chunk-PGHSNG33.js} +4 -4
- package/dist/{chunk-ZNJGEDCE.js → chunk-PGYYDSNX.js} +2 -2
- package/dist/{chunk-KXTNTDRD.js → chunk-PPEHBI5O.js} +2 -2
- package/dist/{chunk-5RPT32EL.js → chunk-PVIQDBUN.js} +2 -2
- package/dist/{chunk-N3ZOZWP5.js → chunk-Q3HYEAVQ.js} +2 -2
- package/dist/{chunk-HKQQ2NED.js → chunk-Q4GAPZDA.js} +2 -2
- package/dist/{chunk-VUBFCHXL.js → chunk-Q7XLTN2D.js} +3 -3
- package/dist/{chunk-6ATXOJVQ.js → chunk-QADTI63U.js} +4 -4
- package/dist/{chunk-YQIT3ET7.js → chunk-QAH3XILB.js} +3 -3
- package/dist/{chunk-YH7G44WL.js → chunk-QLJU7UUI.js} +2 -2
- package/dist/{chunk-TVMSXL3R.js → chunk-QO7UJXXO.js} +2 -2
- package/dist/{chunk-4OTJ66ID.js → chunk-QZOQVJ5L.js} +18 -7
- package/dist/chunk-QZOQVJ5L.js.map +1 -0
- package/dist/{chunk-UETHX57J.js → chunk-R6L376KR.js} +21 -7
- package/dist/chunk-R6L376KR.js.map +1 -0
- package/dist/{chunk-QQHZBJMU.js → chunk-RGVNXES5.js} +4 -4
- package/dist/{chunk-MWPD2BXO.js → chunk-RHVJ3L4U.js} +2 -2
- package/dist/{chunk-YV4O7KDR.js → chunk-S6HIZQIG.js} +5 -5
- package/dist/{chunk-MQVIYTH5.js → chunk-SAKSIN7E.js} +2 -2
- package/dist/{chunk-4HBCWKIX.js → chunk-SGFRSRAL.js} +2 -2
- package/dist/{chunk-WLLUARTC.js → chunk-T2G4LDU5.js} +2 -2
- package/dist/{chunk-37G7M2GJ.js → chunk-T6QVM5Q5.js} +5 -5
- package/dist/{chunk-BLNFOP2O.js → chunk-T6YTDEY4.js} +4 -4
- package/dist/{chunk-QTLM2YY2.js → chunk-TI4FGQYV.js} +2 -2
- package/dist/{chunk-SB2SEGR6.js → chunk-TIM4PXWN.js} +3 -3
- package/dist/{chunk-JQSF3CUR.js → chunk-TRYR424I.js} +5 -4
- package/dist/{chunk-JQSF3CUR.js.map → chunk-TRYR424I.js.map} +1 -1
- package/dist/{chunk-C2I7NQC4.js → chunk-U2ILXZDG.js} +2 -2
- package/dist/{chunk-TR7ZA67L.js → chunk-U2QV4TTZ.js} +2 -2
- package/dist/{chunk-A5U7HEBI.js → chunk-U3HGQHEO.js} +6 -4
- package/dist/chunk-U3HGQHEO.js.map +1 -0
- package/dist/{chunk-3YFDGFEK.js → chunk-U4WAAZXJ.js} +2 -2
- package/dist/{chunk-UQUN2NGE.js → chunk-UAFSEZ2E.js} +2 -2
- package/dist/{chunk-D5Y4PNC5.js → chunk-ULAZDF6D.js} +2 -2
- package/dist/{chunk-3OWFUFZL.js → chunk-UMI3GYWI.js} +6 -6
- package/dist/{chunk-Q7QQXNL7.js → chunk-UT545JBQ.js} +3 -3
- package/dist/{chunk-JXK53XJW.js → chunk-UTUYXH72.js} +5 -5
- package/dist/{chunk-E72INDBL.js → chunk-UXOFA3ZP.js} +4 -4
- package/dist/{chunk-54OJAOXC.js → chunk-V6KQ5R4T.js} +11 -11
- package/dist/{chunk-FLJ3RIRP.js → chunk-VEKTKCSB.js} +5 -5
- package/dist/{chunk-UJACXYC2.js → chunk-VHGHF537.js} +3 -3
- package/dist/{chunk-OFXCSLGX.js → chunk-VLH3IMJG.js} +2 -2
- package/dist/{chunk-AKBL7S7A.js → chunk-VPGDYI63.js} +5 -5
- package/dist/{chunk-6DGNMASB.js → chunk-VPH3TENY.js} +2 -2
- package/dist/{chunk-45AON4CS.js → chunk-VYQZ5U3N.js} +2 -2
- package/dist/{chunk-GXSHLMT4.js → chunk-WDSJ6SVY.js} +2 -2
- package/dist/{chunk-JMDT3GQ3.js → chunk-WMAS6DZR.js} +3 -3
- package/dist/{chunk-XE7QBHXN.js → chunk-WTOA52EQ.js} +2 -2
- package/dist/{chunk-MLGAGZJ3.js → chunk-XMWTVDQN.js} +22 -21
- package/dist/chunk-XMWTVDQN.js.map +1 -0
- package/dist/{chunk-D22FGMGU.js → chunk-XNMU32XC.js} +2 -2
- package/dist/{chunk-PEMXXFXL.js → chunk-XQJPR57I.js} +2 -2
- package/dist/{chunk-54F7QIV2.js → chunk-XW44IFYE.js} +5 -5
- package/dist/{chunk-I2KAN3YB.js → chunk-Y3LK6ZQG.js} +2 -2
- package/dist/{chunk-7AC2UGTU.js → chunk-Y46R26TE.js} +3 -3
- package/dist/{chunk-GQ2T44BC.js → chunk-YEKPQAOW.js} +2 -2
- package/dist/{chunk-XNLJ2Z7T.js → chunk-YGWLMTPB.js} +5 -3
- package/dist/chunk-YGWLMTPB.js.map +1 -0
- package/dist/{chunk-ZGAOA7LN.js → chunk-YHPSPFU5.js} +9 -9
- package/dist/chunk-YOPMXGHY.js +23 -0
- package/dist/chunk-YOPMXGHY.js.map +1 -0
- package/dist/{chunk-F6LZHF4O.js → chunk-YTDUIU7X.js} +2 -2
- package/dist/{chunk-CO7GH3W7.js → chunk-YWXCLPCX.js} +2 -2
- package/dist/{chunk-RIPG3QIN.js → chunk-Z445LLFN.js} +4 -4
- package/dist/{chunk-M7HYNXCU.js → chunk-ZAPP32GD.js} +2 -2
- package/dist/{chunk-MT74NRLY.js → chunk-ZLVRCQPG.js} +9 -9
- package/dist/{chunk-KSJBFT4G.js → chunk-ZVZTQF7E.js} +4 -4
- package/dist/data-display/Alert.js +2 -2
- package/dist/data-display/AsyncStateContainer.js +4 -4
- package/dist/data-display/Avatar.js +3 -3
- package/dist/data-display/Badge.js +3 -3
- package/dist/data-display/CardKit.js +12 -12
- package/dist/data-display/Carousel.js +11 -11
- package/dist/data-display/Chart.js +20 -20
- package/dist/data-display/DataGrid.js +3 -3
- package/dist/data-display/DataViews.js +93 -92
- package/dist/data-display/FleetMap.js +24 -24
- package/dist/data-display/LazyImage.js +5 -5
- package/dist/data-display/Lightbox.js +6 -6
- package/dist/data-display/LoadingState.js +3 -3
- package/dist/data-display/MapPreview.js +16 -16
- package/dist/data-display/Progress.js +2 -2
- package/dist/data-display/RegionMap.js +45 -0
- package/dist/data-display/RegionMap.js.map +1 -0
- package/dist/data-display/Sheet.js +6 -6
- package/dist/data-display/StatCard.js +3 -3
- package/dist/data-display/Table.js +2 -2
- package/dist/en-US.js +6 -6
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/Modal.js +2 -2
- package/dist/feedback/NotificationStatusNotice.js +7 -7
- package/dist/feedback/SequenceResolver.js +10 -10
- package/dist/form/AddressAutocomplete.js +8 -8
- package/dist/form/Autocomplete.js +4 -4
- package/dist/form/Button.js +4 -4
- package/dist/form/Calendar.js +5 -5
- package/dist/form/CategorySelect.js +11 -11
- package/dist/form/CepField.js +6 -6
- package/dist/form/Checkbox.js +2 -2
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/Command.js +3 -3
- package/dist/form/CreatableSelect.js +3 -3
- package/dist/form/DateRangePicker.js +12 -12
- package/dist/form/Input/outlined.js +5 -5
- package/dist/form/Input.js +5 -5
- package/dist/form/InputOTP.js +5 -5
- package/dist/form/Label.js +3 -3
- package/dist/form/MenuSelect.js +4 -4
- package/dist/form/Menubar.js +7 -7
- package/dist/form/NumberField.js +6 -6
- package/dist/form/PhoneInput.js +5 -5
- package/dist/form/PickerSheet.js +6 -6
- package/dist/form/RadioGroup.js +5 -5
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/Select.js +6 -6
- package/dist/form/Textarea.js +3 -3
- package/dist/form/Toggle.js +4 -4
- package/dist/form/ToggleGroup.js +3 -3
- package/dist/form/total-form.js +34 -34
- package/dist/icons.js +6 -6
- package/dist/layout/Box.js +6 -6
- package/dist/layout/ContentToolbar.js +12 -12
- package/dist/layout/Screen.js +7 -7
- package/dist/layout/SettingCard.js +15 -15
- package/dist/layout/SettingsLayout.js +2 -2
- package/dist/layout/Skeleton.js +2 -2
- package/dist/layout/Stack.js +7 -7
- package/dist/layout/TableFilter.js +3 -3
- package/dist/locales.js +14 -14
- package/dist/navigation/AppHeader.js +9 -9
- package/dist/navigation/CommandPalette.js +2 -2
- package/dist/navigation/Pagination.js +4 -4
- package/dist/navigation/SectionNav.js +4 -4
- package/dist/navigation/Tabs.js +2 -2
- package/dist/provider.js +6 -6
- package/dist/pt-BR.js +8 -8
- package/dist/social-login-button.js +5 -5
- package/dist/tokens.js +4 -4
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +6 -0
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts +32 -5
- package/dist/types/components/data-display/DataViews/data-views-day-input.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-filter-panel.d.ts +6 -0
- package/dist/types/components/data-display/DataViews/data-views-filter-panel.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts +3 -1
- package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-more-filters.d.ts +3 -1
- package/dist/types/components/data-display/DataViews/data-views-more-filters.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-range-pill.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-range-reset.d.ts +16 -0
- package/dist/types/components/data-display/DataViews/data-views-range-reset.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/data-views-writers.d.ts +13 -0
- package/dist/types/components/data-display/DataViews/data-views-writers.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/use-data-views-state.d.ts +4 -0
- package/dist/types/components/data-display/DataViews/use-data-views-state.d.ts.map +1 -1
- package/dist/types/components/data-display/RegionMap/RegionMap.d.ts +25 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.fixtures.d.ts +27 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.fixtures.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.helpers.d.ts +110 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.helpers.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.hooks.d.ts +28 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.hooks.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.types.d.ts +116 -0
- package/dist/types/components/data-display/RegionMap/RegionMap.types.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMapDrawing.d.ts +28 -0
- package/dist/types/components/data-display/RegionMap/RegionMapDrawing.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMapLegend.d.ts +12 -0
- package/dist/types/components/data-display/RegionMap/RegionMapLegend.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/RegionMapList.d.ts +20 -0
- package/dist/types/components/data-display/RegionMap/RegionMapList.d.ts.map +1 -0
- package/dist/types/components/data-display/RegionMap/index.d.ts +5 -0
- package/dist/types/components/data-display/RegionMap/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/components/form/CepField/CepField.d.ts +1 -1
- package/dist/types/components/form/CepField/CepField.d.ts.map +1 -1
- package/dist/types/components/form/CepField/CepField.types.d.ts +8 -0
- package/dist/types/components/form/CepField/CepField.types.d.ts.map +1 -1
- package/dist/types/components/form/InputOTP/InputOTP.d.ts.map +1 -1
- package/dist/types/components/form/InputOTP/InputOTP.hooks.d.ts.map +1 -1
- package/dist/types/components/form/total-form/Fields/CepField.d.ts +6 -1
- package/dist/types/components/form/total-form/Fields/CepField.d.ts.map +1 -1
- package/dist/types/components/form/total-form/Fields/TextField.d.ts +22 -1
- package/dist/types/components/form/total-form/Fields/TextField.d.ts.map +1 -1
- package/dist/types/components/form/total-form/Fields/index.d.ts +1 -1
- package/dist/types/components/form/total-form/Fields/index.d.ts.map +1 -1
- package/dist/types/components/form/total-form/index.d.ts +1 -1
- package/dist/types/components/form/total-form/index.d.ts.map +1 -1
- package/dist/types/en-US.data-display.d.ts.map +1 -1
- package/dist/types/pt-BR.data-display.d.ts.map +1 -1
- package/dist/user-avatar.js +8 -8
- package/dist/utility/WorkflowStep.js +3 -3
- package/package.json +5 -1
- package/src/components/data-display/DataViews/data-views-copy.ts +6 -0
- package/src/components/data-display/DataViews/data-views-day-input.tsx +134 -38
- package/src/components/data-display/DataViews/data-views-empty.tsx +1 -1
- package/src/components/data-display/DataViews/data-views-filter-panel.tsx +8 -2
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +3 -1
- package/src/components/data-display/DataViews/data-views-inline-bar.tsx +7 -0
- package/src/components/data-display/DataViews/data-views-more-filters.tsx +4 -1
- package/src/components/data-display/DataViews/data-views-range-pill.tsx +11 -3
- package/src/components/data-display/DataViews/data-views-range-reset.ts +34 -0
- package/src/components/data-display/DataViews/data-views-writers.ts +24 -1
- package/src/components/data-display/DataViews/use-data-views-state.ts +6 -1
- package/src/components/data-display/RegionMap/RegionMap.fixtures.ts +67 -0
- package/src/components/data-display/RegionMap/RegionMap.helpers.ts +338 -0
- package/src/components/data-display/RegionMap/RegionMap.hooks.ts +125 -0
- package/src/components/data-display/RegionMap/RegionMap.md +144 -0
- package/src/components/data-display/RegionMap/RegionMap.tsx +88 -0
- package/src/components/data-display/RegionMap/RegionMap.types.ts +117 -0
- package/src/components/data-display/RegionMap/RegionMapDrawing.tsx +299 -0
- package/src/components/data-display/RegionMap/RegionMapLegend.tsx +81 -0
- package/src/components/data-display/RegionMap/RegionMapList.tsx +167 -0
- package/src/components/data-display/RegionMap/index.ts +13 -0
- package/src/components/data-display/RegionMap/tests.md +22 -0
- package/src/components/data-display/RegionMap/track.md +13 -0
- package/src/components/data-display/index.ts +1 -0
- package/src/components/form/CepField/CepField.md +7 -2
- package/src/components/form/CepField/CepField.tsx +13 -2
- package/src/components/form/CepField/CepField.types.ts +8 -0
- package/src/components/form/InputOTP/InputOTP.hooks.ts +48 -9
- package/src/components/form/InputOTP/InputOTP.md +6 -1
- package/src/components/form/InputOTP/InputOTP.tsx +40 -1
- package/src/components/form/total-form/Fields/CepField.tsx +7 -0
- package/src/components/form/total-form/Fields/TextField.tsx +64 -1
- package/src/components/form/total-form/Fields/index.ts +1 -1
- package/src/components/form/total-form/index.ts +1 -1
- package/src/en-US.data-display.ts +1 -0
- package/src/pt-BR.data-display.ts +1 -0
- package/dist/chunk-4OTJ66ID.js.map +0 -1
- package/dist/chunk-4UCXJYOO.js.map +0 -1
- package/dist/chunk-62XVHRTX.js.map +0 -1
- package/dist/chunk-76IHYINM.js.map +0 -1
- package/dist/chunk-7RG37FVT.js.map +0 -1
- package/dist/chunk-A5U7HEBI.js.map +0 -1
- package/dist/chunk-CDCTLPMD.js +0 -1
- package/dist/chunk-EBEMNKTK.js.map +0 -1
- package/dist/chunk-GJOU26UW.js.map +0 -1
- package/dist/chunk-MLGAGZJ3.js.map +0 -1
- package/dist/chunk-RDRXTH47.js.map +0 -1
- package/dist/chunk-U5FOJBLG.js.map +0 -1
- package/dist/chunk-UETHX57J.js.map +0 -1
- package/dist/chunk-XNLJ2Z7T.js.map +0 -1
- /package/dist/{chunk-CDCTLPMD.js.map → _internal/components/data-display/DataViews/data-views-range-reset.js.map} +0 -0
- /package/dist/{chunk-3RHU2Y2N.js.map → chunk-2DDCRHJE.js.map} +0 -0
- /package/dist/{chunk-X3EB67O2.js.map → chunk-2VRJ577J.js.map} +0 -0
- /package/dist/{chunk-QSRZOXQI.js.map → chunk-2WVHZIWP.js.map} +0 -0
- /package/dist/{chunk-6OYB3MRF.js.map → chunk-33AVAYCR.js.map} +0 -0
- /package/dist/{chunk-62SXUU5U.js.map → chunk-3DPPDGOF.js.map} +0 -0
- /package/dist/{chunk-BTGXHQX3.js.map → chunk-4JNC5AEF.js.map} +0 -0
- /package/dist/{chunk-6MOJK2QT.js.map → chunk-4SQ2WCZA.js.map} +0 -0
- /package/dist/{chunk-QHFAKEZZ.js.map → chunk-4V37DAMA.js.map} +0 -0
- /package/dist/{chunk-E3E4L7MH.js.map → chunk-56GWNA5V.js.map} +0 -0
- /package/dist/{chunk-JK3QB7MO.js.map → chunk-5CP5Z3YU.js.map} +0 -0
- /package/dist/{chunk-2ZMR3TZU.js.map → chunk-5S5K73I6.js.map} +0 -0
- /package/dist/{chunk-RBW5QQXW.js.map → chunk-5XTPEA3O.js.map} +0 -0
- /package/dist/{chunk-WWB43LWU.js.map → chunk-5ZC7CNU4.js.map} +0 -0
- /package/dist/{chunk-V4JMZZGH.js.map → chunk-6A4PTK5Q.js.map} +0 -0
- /package/dist/{chunk-2P5ZBBTL.js.map → chunk-6GICMRDX.js.map} +0 -0
- /package/dist/{chunk-QOTMQLMW.js.map → chunk-6OISIUZM.js.map} +0 -0
- /package/dist/{chunk-34FX3NRZ.js.map → chunk-6PTP5NID.js.map} +0 -0
- /package/dist/{chunk-3XZZSHE5.js.map → chunk-6VTOGR36.js.map} +0 -0
- /package/dist/{chunk-SEUJNFOD.js.map → chunk-6WHIJPEF.js.map} +0 -0
- /package/dist/{chunk-2D4WKET2.js.map → chunk-75FHDUJW.js.map} +0 -0
- /package/dist/{chunk-66QQ7YQN.js.map → chunk-75I42HHE.js.map} +0 -0
- /package/dist/{chunk-AAREDFH6.js.map → chunk-7TKQIZ3K.js.map} +0 -0
- /package/dist/{chunk-WPFVQVQC.js.map → chunk-7VUXSNVZ.js.map} +0 -0
- /package/dist/{chunk-4J62V5OE.js.map → chunk-7YJYIMWP.js.map} +0 -0
- /package/dist/{chunk-UERGWYGY.js.map → chunk-ABRVOPC2.js.map} +0 -0
- /package/dist/{chunk-M74YHHJE.js.map → chunk-ACBHZG3Z.js.map} +0 -0
- /package/dist/{chunk-XKPV52CG.js.map → chunk-ARMKSYEQ.js.map} +0 -0
- /package/dist/{chunk-MHFXJRLD.js.map → chunk-AT6UKTH4.js.map} +0 -0
- /package/dist/{chunk-RB3R6BJL.js.map → chunk-AWUFS2ZC.js.map} +0 -0
- /package/dist/{chunk-QK3XXPBA.js.map → chunk-BECKKDYG.js.map} +0 -0
- /package/dist/{chunk-64UNVW6D.js.map → chunk-BP3ZKIPE.js.map} +0 -0
- /package/dist/{chunk-ENRB6PIN.js.map → chunk-BRHRK7BK.js.map} +0 -0
- /package/dist/{chunk-UQ6SAIX7.js.map → chunk-C74PDNTF.js.map} +0 -0
- /package/dist/{chunk-3HSLEUVW.js.map → chunk-CBO46LJH.js.map} +0 -0
- /package/dist/{chunk-EMSMJRP3.js.map → chunk-CESGZRVQ.js.map} +0 -0
- /package/dist/{chunk-LODYTVOO.js.map → chunk-CFDWKQZT.js.map} +0 -0
- /package/dist/{chunk-TPAMLIN7.js.map → chunk-CPZGFIFH.js.map} +0 -0
- /package/dist/{chunk-D4LMRSY7.js.map → chunk-CSGBHYW6.js.map} +0 -0
- /package/dist/{chunk-JW7MN4DG.js.map → chunk-D34PZJH3.js.map} +0 -0
- /package/dist/{chunk-WT7VZDTI.js.map → chunk-DDNUPFPE.js.map} +0 -0
- /package/dist/{chunk-LZ5PGB7U.js.map → chunk-DYRZRY2T.js.map} +0 -0
- /package/dist/{chunk-73BMQ3VC.js.map → chunk-ENJOBJPK.js.map} +0 -0
- /package/dist/{chunk-7XSCEHGA.js.map → chunk-EOQ6EKTS.js.map} +0 -0
- /package/dist/{chunk-U36BXXQ7.js.map → chunk-EP3DRILI.js.map} +0 -0
- /package/dist/{chunk-SYERREN5.js.map → chunk-FCLON3MO.js.map} +0 -0
- /package/dist/{chunk-33MMQHYU.js.map → chunk-FJ3UZ4RC.js.map} +0 -0
- /package/dist/{chunk-LNIK7FJO.js.map → chunk-FORQEHRQ.js.map} +0 -0
- /package/dist/{chunk-N3W6FZOC.js.map → chunk-FQGPYP2M.js.map} +0 -0
- /package/dist/{chunk-MAHY7PK3.js.map → chunk-FQMLTCXT.js.map} +0 -0
- /package/dist/{chunk-BDJIP4HG.js.map → chunk-FRUDRDJX.js.map} +0 -0
- /package/dist/{chunk-MO4FFK62.js.map → chunk-FXECKKPW.js.map} +0 -0
- /package/dist/{chunk-UWVVKUCG.js.map → chunk-FZEDQNUN.js.map} +0 -0
- /package/dist/{chunk-6LMYQJZP.js.map → chunk-GCBWZ3MX.js.map} +0 -0
- /package/dist/{chunk-YASSCBWN.js.map → chunk-GHP5JLL3.js.map} +0 -0
- /package/dist/{chunk-3S352ZSG.js.map → chunk-GLR5MSU3.js.map} +0 -0
- /package/dist/{chunk-ATJTGQYE.js.map → chunk-GOQOVKUZ.js.map} +0 -0
- /package/dist/{chunk-REMODSVN.js.map → chunk-HDTFLW42.js.map} +0 -0
- /package/dist/{chunk-SFVHZAGE.js.map → chunk-HG2YLNGJ.js.map} +0 -0
- /package/dist/{chunk-AMLHEKSV.js.map → chunk-HI7JPDD6.js.map} +0 -0
- /package/dist/{chunk-OKDAHCYE.js.map → chunk-HJJR2WGL.js.map} +0 -0
- /package/dist/{chunk-J34VGMA5.js.map → chunk-HNEZWVDR.js.map} +0 -0
- /package/dist/{chunk-YJPBNIEM.js.map → chunk-HUXAIQC5.js.map} +0 -0
- /package/dist/{chunk-OUI5IPS6.js.map → chunk-HWPQKHN2.js.map} +0 -0
- /package/dist/{chunk-MNNIOQTQ.js.map → chunk-I7JUAHUO.js.map} +0 -0
- /package/dist/{chunk-LC6ND4ET.js.map → chunk-IBOFASAZ.js.map} +0 -0
- /package/dist/{chunk-TNDTEI6D.js.map → chunk-IDRVQVDL.js.map} +0 -0
- /package/dist/{chunk-GYFKIPR2.js.map → chunk-IEAPXS57.js.map} +0 -0
- /package/dist/{chunk-NQCTANF3.js.map → chunk-IF5UY3CT.js.map} +0 -0
- /package/dist/{chunk-YHKHHSZH.js.map → chunk-IFX5KP65.js.map} +0 -0
- /package/dist/{chunk-XATRYJ4Q.js.map → chunk-IMCSY2SI.js.map} +0 -0
- /package/dist/{chunk-BARTUKJU.js.map → chunk-IU2WSJ4F.js.map} +0 -0
- /package/dist/{chunk-GVSRBFP3.js.map → chunk-IYDXKLCE.js.map} +0 -0
- /package/dist/{chunk-5NT2M2JI.js.map → chunk-JKIKHWD2.js.map} +0 -0
- /package/dist/{chunk-HQCZT6TO.js.map → chunk-JVOEVTCZ.js.map} +0 -0
- /package/dist/{chunk-LCGK22QQ.js.map → chunk-JVTZ7FWR.js.map} +0 -0
- /package/dist/{chunk-BO6IMK5P.js.map → chunk-JZQYVGPV.js.map} +0 -0
- /package/dist/{chunk-3W2B7IZG.js.map → chunk-K6WY2CHG.js.map} +0 -0
- /package/dist/{chunk-RWCQ6TEM.js.map → chunk-KR4TN3OF.js.map} +0 -0
- /package/dist/{chunk-SUCVFEPT.js.map → chunk-KRPDBVUB.js.map} +0 -0
- /package/dist/{chunk-LRIPJ2D5.js.map → chunk-KRYOT3KB.js.map} +0 -0
- /package/dist/{chunk-3V3Z4EML.js.map → chunk-L4FWEI2P.js.map} +0 -0
- /package/dist/{chunk-I3OKAQ5L.js.map → chunk-L7HNQRFS.js.map} +0 -0
- /package/dist/{chunk-J7C7FPVO.js.map → chunk-LABIUXDM.js.map} +0 -0
- /package/dist/{chunk-GM7BG3SD.js.map → chunk-LLPPIO3K.js.map} +0 -0
- /package/dist/{chunk-RCTHCXS6.js.map → chunk-LRQT4MQO.js.map} +0 -0
- /package/dist/{chunk-LTSVYILY.js.map → chunk-LXMFHD7M.js.map} +0 -0
- /package/dist/{chunk-72OG3AGH.js.map → chunk-LYB6YYTG.js.map} +0 -0
- /package/dist/{chunk-DRJL3JHR.js.map → chunk-LZJHHMOF.js.map} +0 -0
- /package/dist/{chunk-Y4KR4LT2.js.map → chunk-MIUPTZS6.js.map} +0 -0
- /package/dist/{chunk-XXUTD74L.js.map → chunk-MK6UXAWY.js.map} +0 -0
- /package/dist/{chunk-BIUT3K6A.js.map → chunk-MKNW4FRR.js.map} +0 -0
- /package/dist/{chunk-NZDIO5UG.js.map → chunk-MVNFUIJS.js.map} +0 -0
- /package/dist/{chunk-APBIQH4G.js.map → chunk-N5OEDOJT.js.map} +0 -0
- /package/dist/{chunk-UAOE3ZPC.js.map → chunk-NEYZV6V5.js.map} +0 -0
- /package/dist/{chunk-ZXHODKHH.js.map → chunk-NKHNUTTY.js.map} +0 -0
- /package/dist/{chunk-JL4I7OQE.js.map → chunk-NOF2FF4K.js.map} +0 -0
- /package/dist/{chunk-WOSUYOAU.js.map → chunk-NQYC7V5N.js.map} +0 -0
- /package/dist/{chunk-ZCCKIWZU.js.map → chunk-NYA26GV2.js.map} +0 -0
- /package/dist/{chunk-N3LW5ER5.js.map → chunk-NZBEE2PR.js.map} +0 -0
- /package/dist/{chunk-DYHOBKPU.js.map → chunk-OA6T2ME3.js.map} +0 -0
- /package/dist/{chunk-WNIL2KTB.js.map → chunk-OQW4OERS.js.map} +0 -0
- /package/dist/{chunk-JJNY5MZL.js.map → chunk-OZYUE2BI.js.map} +0 -0
- /package/dist/{chunk-Y3TD7HOY.js.map → chunk-P4Q7JK4L.js.map} +0 -0
- /package/dist/{chunk-W676GY42.js.map → chunk-P772HCHI.js.map} +0 -0
- /package/dist/{chunk-4AJY7HMH.js.map → chunk-PD7MKJCM.js.map} +0 -0
- /package/dist/{chunk-ICKR3QTG.js.map → chunk-PGHSNG33.js.map} +0 -0
- /package/dist/{chunk-ZNJGEDCE.js.map → chunk-PGYYDSNX.js.map} +0 -0
- /package/dist/{chunk-KXTNTDRD.js.map → chunk-PPEHBI5O.js.map} +0 -0
- /package/dist/{chunk-5RPT32EL.js.map → chunk-PVIQDBUN.js.map} +0 -0
- /package/dist/{chunk-N3ZOZWP5.js.map → chunk-Q3HYEAVQ.js.map} +0 -0
- /package/dist/{chunk-HKQQ2NED.js.map → chunk-Q4GAPZDA.js.map} +0 -0
- /package/dist/{chunk-VUBFCHXL.js.map → chunk-Q7XLTN2D.js.map} +0 -0
- /package/dist/{chunk-6ATXOJVQ.js.map → chunk-QADTI63U.js.map} +0 -0
- /package/dist/{chunk-YQIT3ET7.js.map → chunk-QAH3XILB.js.map} +0 -0
- /package/dist/{chunk-YH7G44WL.js.map → chunk-QLJU7UUI.js.map} +0 -0
- /package/dist/{chunk-TVMSXL3R.js.map → chunk-QO7UJXXO.js.map} +0 -0
- /package/dist/{chunk-QQHZBJMU.js.map → chunk-RGVNXES5.js.map} +0 -0
- /package/dist/{chunk-MWPD2BXO.js.map → chunk-RHVJ3L4U.js.map} +0 -0
- /package/dist/{chunk-YV4O7KDR.js.map → chunk-S6HIZQIG.js.map} +0 -0
- /package/dist/{chunk-MQVIYTH5.js.map → chunk-SAKSIN7E.js.map} +0 -0
- /package/dist/{chunk-4HBCWKIX.js.map → chunk-SGFRSRAL.js.map} +0 -0
- /package/dist/{chunk-WLLUARTC.js.map → chunk-T2G4LDU5.js.map} +0 -0
- /package/dist/{chunk-37G7M2GJ.js.map → chunk-T6QVM5Q5.js.map} +0 -0
- /package/dist/{chunk-BLNFOP2O.js.map → chunk-T6YTDEY4.js.map} +0 -0
- /package/dist/{chunk-QTLM2YY2.js.map → chunk-TI4FGQYV.js.map} +0 -0
- /package/dist/{chunk-SB2SEGR6.js.map → chunk-TIM4PXWN.js.map} +0 -0
- /package/dist/{chunk-C2I7NQC4.js.map → chunk-U2ILXZDG.js.map} +0 -0
- /package/dist/{chunk-TR7ZA67L.js.map → chunk-U2QV4TTZ.js.map} +0 -0
- /package/dist/{chunk-3YFDGFEK.js.map → chunk-U4WAAZXJ.js.map} +0 -0
- /package/dist/{chunk-UQUN2NGE.js.map → chunk-UAFSEZ2E.js.map} +0 -0
- /package/dist/{chunk-D5Y4PNC5.js.map → chunk-ULAZDF6D.js.map} +0 -0
- /package/dist/{chunk-3OWFUFZL.js.map → chunk-UMI3GYWI.js.map} +0 -0
- /package/dist/{chunk-Q7QQXNL7.js.map → chunk-UT545JBQ.js.map} +0 -0
- /package/dist/{chunk-JXK53XJW.js.map → chunk-UTUYXH72.js.map} +0 -0
- /package/dist/{chunk-E72INDBL.js.map → chunk-UXOFA3ZP.js.map} +0 -0
- /package/dist/{chunk-54OJAOXC.js.map → chunk-V6KQ5R4T.js.map} +0 -0
- /package/dist/{chunk-FLJ3RIRP.js.map → chunk-VEKTKCSB.js.map} +0 -0
- /package/dist/{chunk-UJACXYC2.js.map → chunk-VHGHF537.js.map} +0 -0
- /package/dist/{chunk-OFXCSLGX.js.map → chunk-VLH3IMJG.js.map} +0 -0
- /package/dist/{chunk-AKBL7S7A.js.map → chunk-VPGDYI63.js.map} +0 -0
- /package/dist/{chunk-6DGNMASB.js.map → chunk-VPH3TENY.js.map} +0 -0
- /package/dist/{chunk-45AON4CS.js.map → chunk-VYQZ5U3N.js.map} +0 -0
- /package/dist/{chunk-GXSHLMT4.js.map → chunk-WDSJ6SVY.js.map} +0 -0
- /package/dist/{chunk-JMDT3GQ3.js.map → chunk-WMAS6DZR.js.map} +0 -0
- /package/dist/{chunk-XE7QBHXN.js.map → chunk-WTOA52EQ.js.map} +0 -0
- /package/dist/{chunk-D22FGMGU.js.map → chunk-XNMU32XC.js.map} +0 -0
- /package/dist/{chunk-PEMXXFXL.js.map → chunk-XQJPR57I.js.map} +0 -0
- /package/dist/{chunk-54F7QIV2.js.map → chunk-XW44IFYE.js.map} +0 -0
- /package/dist/{chunk-I2KAN3YB.js.map → chunk-Y3LK6ZQG.js.map} +0 -0
- /package/dist/{chunk-7AC2UGTU.js.map → chunk-Y46R26TE.js.map} +0 -0
- /package/dist/{chunk-GQ2T44BC.js.map → chunk-YEKPQAOW.js.map} +0 -0
- /package/dist/{chunk-ZGAOA7LN.js.map → chunk-YHPSPFU5.js.map} +0 -0
- /package/dist/{chunk-F6LZHF4O.js.map → chunk-YTDUIU7X.js.map} +0 -0
- /package/dist/{chunk-CO7GH3W7.js.map → chunk-YWXCLPCX.js.map} +0 -0
- /package/dist/{chunk-RIPG3QIN.js.map → chunk-Z445LLFN.js.map} +0 -0
- /package/dist/{chunk-M7HYNXCU.js.map → chunk-ZAPP32GD.js.map} +0 -0
- /package/dist/{chunk-MT74NRLY.js.map → chunk-ZLVRCQPG.js.map} +0 -0
- /package/dist/{chunk-KSJBFT4G.js.map → chunk-ZVZTQF7E.js.map} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { decodePolyline } from './RegionMap.helpers';
|
|
2
|
+
import type { RegionMapCopy, RegionMapRegion } from './RegionMap.types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The copy and the areas every story and test shares.
|
|
6
|
+
*
|
|
7
|
+
* The areas are REAL: ten of Belo Horizonte's bairros as IBGE outlines them
|
|
8
|
+
* (Malha de Bairros, Censo 2022; public data), coverage-simplified at ~11 m,
|
|
9
|
+
* around a point in Venda Nova. Real shapes are what show the drawing's actual
|
|
10
|
+
* problems — a hole that is another area, a sliver no finger can hit — which a
|
|
11
|
+
* grid of squares never would.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** English, because stories are developer-facing. A consumer passes its own. */
|
|
15
|
+
export const REGION_MAP_COPY: RegionMapCopy = {
|
|
16
|
+
mapLabel: 'Map of the neighbourhoods around the store',
|
|
17
|
+
legendExcluded: 'Not delivered to',
|
|
18
|
+
legendCircle: (metres) => `${(metres / 1000).toLocaleString('en-US')} km radius`,
|
|
19
|
+
legendCenter: 'Store',
|
|
20
|
+
listLabel: 'Neighbourhoods in reach · tap to toggle',
|
|
21
|
+
showList: (count) => `See the ${count} neighbourhoods as a list`,
|
|
22
|
+
hideList: 'Hide the list',
|
|
23
|
+
rowState: { excluded: 'not delivered to', outside: 'outside the radius' },
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** The point the circles are drawn from. */
|
|
27
|
+
export const REGION_MAP_CENTER = { latitude: -19.8136, longitude: -43.9619 };
|
|
28
|
+
|
|
29
|
+
/** id, name, encoded outline (rings by `,`, polygons by `;`). */
|
|
30
|
+
const OUTLINES: readonly (readonly [string, string, string])[] = [
|
|
31
|
+
["3106200190", "Ceu Azul", "rc`xBxookGx@tNJbDtEW@ZsAlKCb@SK_BoBGhDM|D`EAh@^CbEOpGM|KoLpAoDt@iEdBiCr@QhAuBpJkAzIwFqAkG_AcARw@q@Nw@{@GgB_ELq@kCuF}Ag@]c@e@{Aq@w@{HjBu@ZgDpBy@\\yCl@cBTgEMg@NaB`Bk@t@Qx@uOgEOk@cB{As@kBuAc@Iu@VcAb@}@l@k@REtC_BrBeHFqBTwCJg@j@RbCmGfCzBhE`@`@n@dAd@`@}K_A]q@e@qBcA{Ak@`CyJ\\cBXa@r@c@tCq@`Bu@~EcBh@q@v@d@l@u@d@?x@gA|@cBlA{@|@[`AUhAKH`CbESNfCiD`@uAv@i@Ui@f@IUgAbALj@Ql@}@hB|@CrHq@nDyDbBFzW{AdY}A"],
|
|
32
|
+
["3106200365", "Serra Verde", "ryzwBnahkGw@`DaBbBaBpEyBpCOIgEjArBdJTl@x@hA}B~AmBjAiBzAoDbEkJaEa@E{@\\kBa@cBq@oAUgCI{A`@u@b@_Ch@y@b@uBnBoAf@w@p@kCRaGNy@YaAIeALmAv@]b@yEpEi@^yAXgAYcDO}@[c@eAoAy@IeAm@{BwBmDgAWoAg@wBuAi@}@yAIyAkBQ{@CaAVcAa@u@Lm@OoAu@e@uB@gAK_A[uCaBmAwASeA?qB`@iB?uAQiACcAa@s@Iy@k@wAWoAJa@E_AXqC\\a@Lu@GaDeC~@w@eDYgBZuCWmAY[zACd@ORq@yA@AoAbLYtH?vGNdFHfQVvBFrIFhEJzIXvRvAxHRhHJzC@lMV|a@t@zR\\CpAoCl@uBPmCx@qCxDgBvBk@h@_C|CcAzCy@vAuChA[b@,l}xwBprgkGA`LyBABmDIcFn@e@pAV"],
|
|
33
|
+
["3106200367", "Venda Nova", "le}wBltikGgAaBcAj@CrAyBtAoHdGsApAKb@_FKgApEy@nB{@zAqAhAmB}CdAaAt@kAd@kBrAmIp@yCPe@vAuBfAqA`A{Af@kAXyBFuAFwEXyAX_AxAcDtCeHx@eCpAuBnAgBnAyAlC}BrAy@lQaJf@]tAaBpIpGpNnKU`Dy@O[UiCiDkAeAqAy@cE{BeCcAiGjB?b@YzGuElAfAdDdBhCJdBa@zBlAdF_BfAe@r@s@rCc@dAoG~H]ZyDtE"],
|
|
34
|
+
["3106200418", "Santa Monica", "zq`xBhxlkGOp@a@AGr@_@z@w@`AsAjAe@Na@g@m@r@{FzE}@|@e@VyAXS_AqB`@T|@yElADPi@LRz@cB`@?`@sAE{C\\aBJm@RRbDm@FB\\iARGEsBhA{BhAuBhA{Ar@RoCi@UuD{CbAwAv@yCh@oCfGyAjGuAnA]gAeGc@oBc@JcAImEeApA}FaDmAaDs@uGcBeCk@oKmCeCiA}@s@iAoAgAgBa@cAu@wCeAcFy@cD?oAV_D`BpA`D~Cn@\\hORlAIfJiFvKkGj@_@PMpC{AzAs@`DiAhDqAfDkB?}Df@yAzA}B|OjEfB`@~HfCH~@A`BX`FV|GyBXqCp@cCTyAC[b@oBZv@rFRz@|@hCp@x@|AtAz@lAf@vAv@xAd@j@h@lATzAXlENxCF`DLD"],
|
|
35
|
+
["3106200457", "Vila Jardim Leblon", "xp~wBzdnkGBx@c@@LfEy@AYz@DwFBQzAs@;pn~wBlsnkGBh@x@EXzFa@BFv@m@@Ce@_@B[UEeA|@CGcBSyBR@"],
|
|
36
|
+
["3106200471", "Conjunto Minascaixa", "ryzwBnahkG`AhAfDhELVpCtDlFbHiFxBcA`@kAz@{BpBy@~AkAtCoDiA\\Up@cAREp@mAuBgAiAADr@eDqA_@t@e@b@Um@sBeJfEkANHxBqC`BqE`BcBv@aD"],
|
|
37
|
+
["3106200477", "Jardim Leblon", "f|~wBb~mkG^~@N|@hBGNUa@YS_CScDl@S`BKzC]rADr@KX`@l@LJ~AxAI@Tn@AIgA}@FOyBJq@bA_@RUbABhCa@l@]Dp@^Td@GNjAJjCfApTr@|M\\|Ey@FPlET~DeY|A{WzAcBGm@}@Ko@OgCcERIaC{@{QvAX`AvAfDODdAZT^CBd@l@AGw@`@CY{Fy@DCi@SAIqCX{@x@@MgEb@ACy@tBiAzBiArBiAFD,fz~wBrrnkGNbDaAFKqB|@y@,fz~wBrrnkGAM|BGGgAxBMKoAU[eBAG{AbAELd@rAtApBdBBNzFYIuB`AEJrB|@GUmDfAIB~Ab@jHx@E?TzDQJ[x@G\\tGT?D`AM`ALtA]DBt@uDRF`AQ?FfAW?F`A]BN`A}@FIgA[BAaAw@D@bAcDPKuBm@BAoAg@BAcAiCT_DJEeB_@sD_ADEs@hAEI{@x@GUaFaAFAo@{DP"],
|
|
38
|
+
["3106200479", "Lagoinha Leblon", "`g{wB|zpkG}N_@d@_VDqEJiFZ_TJyEbBt@zElA`@V|AZfA`@T}@iAa@JaAlCHh@Jz@`BrBfB|AbCUbB`@`@fDrEk@b@|AzChBpB}BrE[g@kAEyBbCeCCI`Cj@DcGzFwBGKhFK`C"],
|
|
39
|
+
["3106200482", "Mantiqueira", "x`ywBh{nkGiEg@mCPaBU]e@}@j@aDg@yAIe@a@SbAgBXqEQo@x@u@CY{@cCMc@y@wAGcBi@qCCWg@q@b@e@Bq@y@t@Bx@mC`AmE?_AYcEg@?a@iAEs@c@uB{@eDeBf@Vo@M_Am@MZw@Kk@s@KwD`AOgC|Bm@gAu@{@cLeAw@v@w@|@b@@a@]_FxBW~AGzARtA^tAsAxAWbBy@~Ag@bEY|@m@BWo@oAt@QfFhIJZk@b@_A\\V|@m@r@eA|@w@S[f@eCFYRoATcCsA]LXz@@r@bAAnAThAUR\\lDmAdAFxAqAFXfAFJfAf@GNg@AwA}@{A^y@l@KJ]Is@d@YSa@tDmBjBBZMbA_A~CS`BsA_B_B^{AlBmAbC|Bb@Xf@kA`Cu@nAe@RXtK~KzFiJH]`BA_A|Bt@~ApFfGtBo@vD{@@Tp@XfA}AJ_@hAv@fBoAvCnEUnMo@jc@k@?qA`@k@^c@lAAjJO~G[vAy@vA]hAqMoB{Ew@oEk@{Do@i@EIhAuJoAUdC,njywBzsnkGx@Mv@F?g@p@F?PlALFu@o@AQ}@?cAW@Dh@mA`@q@fAOs@}@Og@DBf@`@Dh@x@"],
|
|
40
|
+
["3106200484", "Minascaixa", "r~|wBzahkGqAtBy@dCuCdHyAbDY~@YxAGvEGtAYxBg@jAaAzAgApAwAtBQd@eCeCmBoAyDqCeHoEwEuCoB{AhFyBmFcHqCuDMWgDiEaAiAZc@tCiAx@wAbA{C~B}Cj@i@fBwBpCyDlCy@tBQnCm@BqArB?tEPj@AAx@o@Nm@f@tFjGxBdGnA~AzI~H"],
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
/** The areas, decoded, none excluded. */
|
|
44
|
+
export const REGION_MAP_AREAS: RegionMapRegion[] = OUTLINES.map(([id, name, outline]) => ({
|
|
45
|
+
id,
|
|
46
|
+
name,
|
|
47
|
+
rings: outline
|
|
48
|
+
.split(';')
|
|
49
|
+
.flatMap((polygon) => polygon.split(','))
|
|
50
|
+
.map((ring) => decodePolyline(ring)),
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Context outside the circle: three of the areas marked `outside` — drawn
|
|
55
|
+
* faded, left off the list — and one tagged as too small to tap.
|
|
56
|
+
*/
|
|
57
|
+
export const REGION_MAP_WITH_CONTEXT: RegionMapRegion[] = REGION_MAP_AREAS.map((area) => ({
|
|
58
|
+
...area,
|
|
59
|
+
outside: ['Ceu Azul', 'Lagoinha Leblon', 'Mantiqueira'].includes(area.name),
|
|
60
|
+
detail: area.name === 'Vila Jardim Leblon' ? 'tiny' : undefined,
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
/** The same areas with two of them excluded. */
|
|
64
|
+
export const REGION_MAP_WITH_EXCLUSIONS: RegionMapRegion[] = REGION_MAP_AREAS.map((area) => ({
|
|
65
|
+
...area,
|
|
66
|
+
excluded: area.name === 'Minascaixa' || area.name === 'Jardim Leblon',
|
|
67
|
+
}));
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import type { RegionMapPoint, RegionMapRegion, RegionMapRing } from './RegionMap.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The geometry behind `RegionMap`, kept pure so it is tested without a DOM.
|
|
5
|
+
*
|
|
6
|
+
* Coordinates are projected to METRES on a plane around the centre
|
|
7
|
+
* (equirectangular): within the tens of kilometres a map like this spans, its
|
|
8
|
+
* error is far below any outline's own. `y` grows SOUTH, as SVG's does.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Metres per degree of latitude on the mean sphere. */
|
|
12
|
+
const METRES_PER_DEGREE = 111_195;
|
|
13
|
+
|
|
14
|
+
/** A projected point, metres east (`x`) and south (`y`) of the centre. */
|
|
15
|
+
export interface PlanePoint {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** An SVG viewBox in projected metres. */
|
|
21
|
+
export interface PlaneBox {
|
|
22
|
+
/** West edge, metres east of the centre. */
|
|
23
|
+
minX: number;
|
|
24
|
+
/** North edge, metres south of the centre. */
|
|
25
|
+
minY: number;
|
|
26
|
+
/** East-west extent, metres. */
|
|
27
|
+
spanX: number;
|
|
28
|
+
/** North-south extent, metres. */
|
|
29
|
+
spanY: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Projection {
|
|
33
|
+
project: (point: RegionMapPoint) => PlanePoint;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** The projection around a centre. */
|
|
37
|
+
export function projectionAt(center: { latitude: number; longitude: number }): Projection {
|
|
38
|
+
const kx = METRES_PER_DEGREE * Math.cos((center.latitude * Math.PI) / 180);
|
|
39
|
+
return {
|
|
40
|
+
project: ([latitude, longitude]) => ({
|
|
41
|
+
x: (longitude - center.longitude) * kx,
|
|
42
|
+
y: -(latitude - center.latitude) * METRES_PER_DEGREE,
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A ring as an SVG path segment, closed. */
|
|
48
|
+
function ringPath(ring: readonly PlanePoint[]): string {
|
|
49
|
+
if (ring.length === 0) return '';
|
|
50
|
+
const [first, ...rest] = ring;
|
|
51
|
+
return `M${first!.x.toFixed(1)} ${first!.y.toFixed(1)}${rest.map((p) => `L${p.x.toFixed(1)} ${p.y.toFixed(1)}`).join('')}Z`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Every ring of an area as one path, to be filled with `fill-rule="evenodd"`. */
|
|
55
|
+
export function regionPath(rings: readonly (readonly PlanePoint[])[]): string {
|
|
56
|
+
return rings.map(ringPath).join('');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** The smallest and largest of some numbers, in one pass (no spread). */
|
|
60
|
+
export function extent(values: Iterable<number>): { min: number; max: number } | null {
|
|
61
|
+
let min = Infinity;
|
|
62
|
+
let max = -Infinity;
|
|
63
|
+
for (const value of values) {
|
|
64
|
+
if (value < min) min = value;
|
|
65
|
+
if (value > max) max = value;
|
|
66
|
+
}
|
|
67
|
+
return min === Infinity ? null : { min, max };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The box around projected rings. */
|
|
71
|
+
export function planeBounds(rings: readonly (readonly PlanePoint[])[]): PlaneBox | null {
|
|
72
|
+
const points = rings.flat();
|
|
73
|
+
const xs = extent(points.map((p) => p.x));
|
|
74
|
+
const ys = extent(points.map((p) => p.y));
|
|
75
|
+
if (xs === null || ys === null) return null;
|
|
76
|
+
return { minX: xs.min, minY: ys.min, spanX: xs.max - xs.min, spanY: ys.max - ys.min };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The square the map shows: the largest circle with a margin, else every area,
|
|
81
|
+
* else nothing. Square so the drawing keeps its proportions at every width.
|
|
82
|
+
*/
|
|
83
|
+
export function viewBoxFor(
|
|
84
|
+
largestRadius: number | null,
|
|
85
|
+
areaBounds: PlaneBox | null,
|
|
86
|
+
margin = 0.12,
|
|
87
|
+
): PlaneBox | null {
|
|
88
|
+
if (largestRadius !== null && largestRadius > 0) {
|
|
89
|
+
const half = largestRadius * (1 + margin);
|
|
90
|
+
return { minX: -half, minY: -half, spanX: half * 2, spanY: half * 2 };
|
|
91
|
+
}
|
|
92
|
+
if (areaBounds === null) return null;
|
|
93
|
+
const side = Math.max(areaBounds.spanX, areaBounds.spanY) * (1 + margin) || 1;
|
|
94
|
+
const cx = areaBounds.minX + areaBounds.spanX / 2;
|
|
95
|
+
const cy = areaBounds.minY + areaBounds.spanY / 2;
|
|
96
|
+
return { minX: cx - side / 2, minY: cy - side / 2, spanX: side, spanY: side };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Do two boxes overlap? Used to skip areas wholly outside the view. */
|
|
100
|
+
export function boxesOverlap(a: PlaneBox, b: PlaneBox): boolean {
|
|
101
|
+
return (
|
|
102
|
+
a.minX <= b.minX + b.spanX &&
|
|
103
|
+
b.minX <= a.minX + a.spanX &&
|
|
104
|
+
a.minY <= b.minY + b.spanY &&
|
|
105
|
+
b.minY <= a.minY + a.spanY
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** How many of one ring's edges a ray from the point, eastward, crosses. */
|
|
110
|
+
function ringCrossings(ring: readonly PlanePoint[], point: PlanePoint): number {
|
|
111
|
+
let crossings = 0;
|
|
112
|
+
for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {
|
|
113
|
+
const a = ring[i]!;
|
|
114
|
+
const b = ring[j]!;
|
|
115
|
+
if (a.y > point.y !== b.y > point.y && point.x < ((b.x - a.x) * (point.y - a.y)) / (b.y - a.y) + a.x) {
|
|
116
|
+
crossings += 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return crossings;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Is the point inside the rings, by the even-odd rule? */
|
|
123
|
+
export function ringsContain(rings: readonly (readonly PlanePoint[])[], point: PlanePoint): boolean {
|
|
124
|
+
return rings.reduce((sum, ring) => sum + ringCrossings(ring, point), 0) % 2 === 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** The point's distance to one ring's nearest edge. */
|
|
128
|
+
function ringDistance(ring: readonly PlanePoint[], point: PlanePoint): number {
|
|
129
|
+
let best = Infinity;
|
|
130
|
+
for (let i = 1; i <= ring.length; i++) {
|
|
131
|
+
const a = ring[i - 1]!;
|
|
132
|
+
const b = ring[i % ring.length]!;
|
|
133
|
+
const dx = b.x - a.x;
|
|
134
|
+
const dy = b.y - a.y;
|
|
135
|
+
const lengthSquared = dx * dx + dy * dy;
|
|
136
|
+
const t =
|
|
137
|
+
lengthSquared === 0
|
|
138
|
+
? 0
|
|
139
|
+
: Math.max(0, Math.min(1, ((point.x - a.x) * dx + (point.y - a.y) * dy) / lengthSquared));
|
|
140
|
+
best = Math.min(best, Math.hypot(a.x + t * dx - point.x, a.y + t * dy - point.y));
|
|
141
|
+
}
|
|
142
|
+
return best;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** The point's distance to the rings: 0 inside, else to the nearest edge. */
|
|
146
|
+
export function ringsDistance(rings: readonly (readonly PlanePoint[])[], point: PlanePoint): number {
|
|
147
|
+
if (ringsContain(rings, point)) return 0;
|
|
148
|
+
let best = Infinity;
|
|
149
|
+
for (const ring of rings) best = Math.min(best, ringDistance(ring, point));
|
|
150
|
+
return best;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** An area projected once: what drawing it and hit-testing it read. */
|
|
154
|
+
export interface AreaGeometry {
|
|
155
|
+
rings: readonly (readonly PlanePoint[])[];
|
|
156
|
+
/** Null for an area with no points. */
|
|
157
|
+
bounds: PlaneBox | null;
|
|
158
|
+
/** Square metres of the largest ring — orders hits and draw order. */
|
|
159
|
+
area: number;
|
|
160
|
+
/** The SVG path, every ring, for `fill-rule="evenodd"`. */
|
|
161
|
+
path: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** A projected area, as the hit test reads it. */
|
|
165
|
+
export interface PlaneRegion {
|
|
166
|
+
id: string;
|
|
167
|
+
geometry: AreaGeometry;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Is the point within `margin` of the box? */
|
|
171
|
+
function nearBox(box: PlaneBox, point: PlanePoint, margin: number): boolean {
|
|
172
|
+
return (
|
|
173
|
+
point.x >= box.minX - margin &&
|
|
174
|
+
point.x <= box.minX + box.spanX + margin &&
|
|
175
|
+
point.y >= box.minY - margin &&
|
|
176
|
+
point.y <= box.minY + box.spanY + margin
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Which area a tap at this point means: the SMALLEST area within `tolerance`
|
|
182
|
+
* of it, the ones holding it included (distance 0).
|
|
183
|
+
*
|
|
184
|
+
* Smallest, because a fingertip is wider than a sliver: a tap that lands on a
|
|
185
|
+
* big area a few pixels from a 10 m strip almost always meant the strip, and
|
|
186
|
+
* the big one stays easy to hit everywhere else. An area in another's hole is
|
|
187
|
+
* smaller than the one around it, so it wins too. Nothing within the
|
|
188
|
+
* tolerance — empty map — is nothing: a tap there is not a guess. Areas whose
|
|
189
|
+
* box is not near the point are skipped before any ray is cast.
|
|
190
|
+
*/
|
|
191
|
+
export function hitRegion(
|
|
192
|
+
regions: readonly PlaneRegion[],
|
|
193
|
+
point: PlanePoint,
|
|
194
|
+
tolerance: number,
|
|
195
|
+
): string | null {
|
|
196
|
+
let best: { id: string; area: number; distance: number } | null = null;
|
|
197
|
+
for (const { id, geometry } of regions) {
|
|
198
|
+
const distance = reach(geometry, point, tolerance);
|
|
199
|
+
if (distance !== null && beats(geometry.area, distance, best)) {
|
|
200
|
+
best = { id, area: geometry.area, distance };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return best?.id ?? null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** The point's distance to the area, or null when it is beyond the tolerance. */
|
|
207
|
+
function reach(geometry: AreaGeometry, point: PlanePoint, tolerance: number): number | null {
|
|
208
|
+
if (geometry.bounds === null || !nearBox(geometry.bounds, point, tolerance)) return null;
|
|
209
|
+
const distance = ringsDistance(geometry.rings, point);
|
|
210
|
+
return distance <= tolerance ? distance : null;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Smaller wins; between two the same size, the nearer. */
|
|
214
|
+
function beats(area: number, distance: number, best: { area: number; distance: number } | null): boolean {
|
|
215
|
+
if (best === null || area < best.area) return true;
|
|
216
|
+
return area === best.area && distance < best.distance;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Signed area and centroid of one ring (shoelace). */
|
|
220
|
+
function ringCentroid(ring: readonly PlanePoint[]): { area: number; x: number; y: number } {
|
|
221
|
+
let area = 0;
|
|
222
|
+
let cx = 0;
|
|
223
|
+
let cy = 0;
|
|
224
|
+
for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {
|
|
225
|
+
const a = ring[j]!;
|
|
226
|
+
const b = ring[i]!;
|
|
227
|
+
const cross = a.x * b.y - b.x * a.y;
|
|
228
|
+
area += cross;
|
|
229
|
+
cx += (a.x + b.x) * cross;
|
|
230
|
+
cy += (a.y + b.y) * cross;
|
|
231
|
+
}
|
|
232
|
+
area /= 2;
|
|
233
|
+
if (area === 0) return { area: 0, x: ring[0]?.x ?? 0, y: ring[0]?.y ?? 0 };
|
|
234
|
+
return { area, x: cx / (6 * area), y: cy / (6 * area) };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The area's size in square metres, read from its LARGEST ring. Rough on
|
|
239
|
+
* purpose — holes and second parts are ignored — because it only orders
|
|
240
|
+
* things: which of two areas holding a tap is the smaller, and which is drawn
|
|
241
|
+
* first so a small one is never painted over by its neighbour.
|
|
242
|
+
*/
|
|
243
|
+
export function planeArea(rings: readonly (readonly PlanePoint[])[]): number {
|
|
244
|
+
let largest = 0;
|
|
245
|
+
for (const ring of rings) largest = Math.max(largest, Math.abs(ringCentroid(ring).area));
|
|
246
|
+
return largest;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Where an area's label goes: the centroid of its largest ring, pulled back
|
|
251
|
+
* inside the view, as fractions of the view (0..1) — the label is HTML laid
|
|
252
|
+
* over the drawing, so its type stays the theme's size at every width.
|
|
253
|
+
*/
|
|
254
|
+
export function labelPosition(
|
|
255
|
+
rings: readonly (readonly PlanePoint[])[],
|
|
256
|
+
view: PlaneBox,
|
|
257
|
+
inset = 0.04,
|
|
258
|
+
): { fractionX: number; fractionY: number } {
|
|
259
|
+
const largest = rings
|
|
260
|
+
.map(ringCentroid)
|
|
261
|
+
.reduce((a, b) => (Math.abs(b.area) > Math.abs(a.area) ? b : a), { area: 0, x: 0, y: 0 });
|
|
262
|
+
const clamp = (value: number): number => Math.min(1 - inset, Math.max(inset, value));
|
|
263
|
+
return {
|
|
264
|
+
fractionX: clamp((largest.x - view.minX) / view.spanX),
|
|
265
|
+
fractionY: clamp((largest.y - view.minY) / view.spanY),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** Every ring of an area, projected. */
|
|
270
|
+
export function projectRings(rings: readonly RegionMapRing[], projection: Projection): PlanePoint[][] {
|
|
271
|
+
return rings.map((ring) => ring.map(projection.project));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** One area's geometry, projected and pathed. */
|
|
275
|
+
export function areaGeometry(rings: readonly RegionMapRing[], projection: Projection): AreaGeometry {
|
|
276
|
+
const plane = projectRings(rings, projection);
|
|
277
|
+
return { rings: plane, bounds: planeBounds(plane), area: planeArea(plane), path: regionPath(plane) };
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* A cache of geometry per `rings` IDENTITY, for one projection. A host that
|
|
282
|
+
* re-creates its region objects on every toggle (`{ ...area, excluded }`)
|
|
283
|
+
* keeps the same `rings` arrays, so a tap re-projects nothing.
|
|
284
|
+
*/
|
|
285
|
+
export function geometryCache(projection: Projection): (rings: readonly RegionMapRing[]) => AreaGeometry {
|
|
286
|
+
const cache = new WeakMap<readonly RegionMapRing[], AreaGeometry>();
|
|
287
|
+
return (rings) => {
|
|
288
|
+
let geometry = cache.get(rings);
|
|
289
|
+
if (geometry === undefined) {
|
|
290
|
+
geometry = areaGeometry(rings, projection);
|
|
291
|
+
cache.set(rings, geometry);
|
|
292
|
+
}
|
|
293
|
+
return geometry;
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** An area as the drawing reads it. */
|
|
298
|
+
export type DrawnRegion = RegionMapRegion & { geometry: AreaGeometry };
|
|
299
|
+
|
|
300
|
+
/** The areas worth drawing — any part in the view — largest first. */
|
|
301
|
+
export function drawOrder(
|
|
302
|
+
regions: readonly RegionMapRegion[],
|
|
303
|
+
geometryOf: (rings: readonly RegionMapRing[]) => AreaGeometry,
|
|
304
|
+
view: PlaneBox,
|
|
305
|
+
): DrawnRegion[] {
|
|
306
|
+
return regions
|
|
307
|
+
.map((region) => ({ ...region, geometry: geometryOf(region.rings) }))
|
|
308
|
+
.filter(({ geometry }) => geometry.bounds !== null && boxesOverlap(geometry.bounds, view))
|
|
309
|
+
.sort((a, b) => b.geometry.area - a.geometry.area);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* A Google encoded polyline into `[latitude, longitude]` points, at 1e-5 — the
|
|
314
|
+
* compact form an outline usually travels in. Product-free, so it lives here.
|
|
315
|
+
*/
|
|
316
|
+
export function decodePolyline(encoded: string, precision = 1e5): RegionMapPoint[] {
|
|
317
|
+
const points: RegionMapPoint[] = [];
|
|
318
|
+
let index = 0;
|
|
319
|
+
let lat = 0;
|
|
320
|
+
let lng = 0;
|
|
321
|
+
const next = (): number => {
|
|
322
|
+
let shift = 0;
|
|
323
|
+
let result = 0;
|
|
324
|
+
let byte: number;
|
|
325
|
+
do {
|
|
326
|
+
byte = encoded.charCodeAt(index++) - 63;
|
|
327
|
+
result |= (byte & 0x1f) << shift;
|
|
328
|
+
shift += 5;
|
|
329
|
+
} while (byte >= 0x20);
|
|
330
|
+
return result & 1 ? ~(result >> 1) : result >> 1;
|
|
331
|
+
};
|
|
332
|
+
while (index < encoded.length) {
|
|
333
|
+
lat += next();
|
|
334
|
+
lng += next();
|
|
335
|
+
points.push([lat / precision, lng / precision]);
|
|
336
|
+
}
|
|
337
|
+
return points;
|
|
338
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
drawOrder,
|
|
5
|
+
extent,
|
|
6
|
+
geometryCache,
|
|
7
|
+
hitRegion,
|
|
8
|
+
projectionAt,
|
|
9
|
+
viewBoxFor,
|
|
10
|
+
type DrawnRegion,
|
|
11
|
+
type PlaneBox,
|
|
12
|
+
} from './RegionMap.helpers';
|
|
13
|
+
import type { RegionMapProps, RegionMapRegion } from './RegionMap.types';
|
|
14
|
+
|
|
15
|
+
/** What the drawing needs, derived from the props. */
|
|
16
|
+
export interface RegionMapModel {
|
|
17
|
+
/** The square shown, or null when there is nothing to centre on. */
|
|
18
|
+
view: PlaneBox | null;
|
|
19
|
+
drawn: DrawnRegion[];
|
|
20
|
+
/** Radii drawn, in metres; empty without circles. */
|
|
21
|
+
radii: number[];
|
|
22
|
+
outermostMetres: number | null;
|
|
23
|
+
/** The tap handlers for the drawing's `<svg>`. */
|
|
24
|
+
onPointerDown: (event: React.PointerEvent<SVGSVGElement>) => void;
|
|
25
|
+
onClick: (event: React.MouseEvent<SVGSVGElement>) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** A tap reaches an area this close: a share of the view (~8 px on a phone). */
|
|
29
|
+
const TOLERANCE_SHARE = 1 / 45;
|
|
30
|
+
|
|
31
|
+
/** The middle of every area, for a map with no centre of its own. */
|
|
32
|
+
function centreOf(regions: readonly RegionMapRegion[]): { latitude: number; longitude: number } | null {
|
|
33
|
+
const points = regions.flatMap((r) => r.rings.flat());
|
|
34
|
+
const lats = extent(points.map(([lat]) => lat));
|
|
35
|
+
const lngs = extent(points.map(([, lng]) => lng));
|
|
36
|
+
if (lats === null || lngs === null) return null;
|
|
37
|
+
return { latitude: (lats.min + lats.max) / 2, longitude: (lngs.min + lngs.max) / 2 };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The click, in the drawing's own coordinates — or null where it cannot be read. */
|
|
41
|
+
function svgPoint(event: React.MouseEvent<SVGSVGElement>): { x: number; y: number } | null {
|
|
42
|
+
const svg = event.currentTarget;
|
|
43
|
+
const matrix = typeof svg.getScreenCTM === 'function' ? svg.getScreenCTM() : null;
|
|
44
|
+
if (!matrix || typeof DOMPoint === 'undefined') return null;
|
|
45
|
+
const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix.inverse());
|
|
46
|
+
return { x: point.x, y: point.y };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The view: the outermost circle when there is one, else every area's box. */
|
|
50
|
+
function viewOf(outermostMetres: number | null, drawable: () => (PlaneBox | null)[]): PlaneBox | null {
|
|
51
|
+
if (outermostMetres !== null) return viewBoxFor(outermostMetres, null);
|
|
52
|
+
const boxes = drawable().filter((box): box is PlaneBox => box !== null);
|
|
53
|
+
const xs = extent(boxes.flatMap((b) => [b.minX, b.minX + b.spanX]));
|
|
54
|
+
const ys = extent(boxes.flatMap((b) => [b.minY, b.minY + b.spanY]));
|
|
55
|
+
if (xs === null || ys === null) return null;
|
|
56
|
+
return viewBoxFor(null, { minX: xs.min, minY: ys.min, spanX: xs.max - xs.min, spanY: ys.max - ys.min });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Which area a click or tap means — see `useRegionMap`. */
|
|
60
|
+
function tappedRegion(
|
|
61
|
+
event: React.MouseEvent<SVGSVGElement>,
|
|
62
|
+
pointer: string,
|
|
63
|
+
drawn: readonly DrawnRegion[],
|
|
64
|
+
view: PlaneBox,
|
|
65
|
+
): string | null {
|
|
66
|
+
const targetId = (event.target as Element).getAttribute('data-region-id');
|
|
67
|
+
if (pointer === 'mouse' && targetId) return targetId;
|
|
68
|
+
const point = svgPoint(event);
|
|
69
|
+
if (point === null) return targetId;
|
|
70
|
+
return hitRegion(
|
|
71
|
+
drawn.map((d) => ({ id: d.id, geometry: d.geometry })),
|
|
72
|
+
point,
|
|
73
|
+
view.spanX * TOLERANCE_SHARE,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The geometry cache for a centre, or null without one. */
|
|
78
|
+
function useGeometry(
|
|
79
|
+
origin: { latitude: number; longitude: number } | null,
|
|
80
|
+
): ReturnType<typeof geometryCache> | null {
|
|
81
|
+
const lat = origin?.latitude ?? null;
|
|
82
|
+
const lng = origin?.longitude ?? null;
|
|
83
|
+
return React.useMemo(
|
|
84
|
+
() => (lat === null || lng === null ? null : geometryCache(projectionAt({ latitude: lat, longitude: lng }))),
|
|
85
|
+
[lat, lng],
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The projection, the view, the areas in draw order and the tap handlers.
|
|
91
|
+
*
|
|
92
|
+
* Geometry is projected once per `rings` identity and centre
|
|
93
|
+
* (`geometryCache`), so a toggle — which changes `excluded`, not `rings` —
|
|
94
|
+
* re-projects nothing.
|
|
95
|
+
*
|
|
96
|
+
* A MOUSE click on a path is that path's area: a pointer is precise. Any
|
|
97
|
+
* other tap — a finger, a pen — goes to `hitRegion`: the smallest area within
|
|
98
|
+
* a few pixels, so a sliver beside a big area is reachable from the map.
|
|
99
|
+
*/
|
|
100
|
+
export function useRegionMap({
|
|
101
|
+
regions,
|
|
102
|
+
center,
|
|
103
|
+
circles = [],
|
|
104
|
+
onToggle,
|
|
105
|
+
}: Pick<RegionMapProps, 'regions' | 'center' | 'circles' | 'onToggle'>): RegionMapModel {
|
|
106
|
+
const geometryOf = useGeometry(center ?? centreOf(regions));
|
|
107
|
+
const radii = circles.map((c) => c.radiusMetres);
|
|
108
|
+
const outermostMetres = extent(radii)?.max ?? null;
|
|
109
|
+
const view =
|
|
110
|
+
geometryOf === null ? null : viewOf(outermostMetres, () => regions.map((r) => geometryOf(r.rings).bounds));
|
|
111
|
+
const drawn = geometryOf && view ? drawOrder(regions, geometryOf, view) : [];
|
|
112
|
+
const pointerType = React.useRef<string>('mouse');
|
|
113
|
+
|
|
114
|
+
const onPointerDown = (event: React.PointerEvent<SVGSVGElement>): void => {
|
|
115
|
+
pointerType.current = event.pointerType || 'mouse';
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const onClick = (event: React.MouseEvent<SVGSVGElement>): void => {
|
|
119
|
+
if (!onToggle || view === null) return;
|
|
120
|
+
const hit = tappedRegion(event, pointerType.current, drawn, view);
|
|
121
|
+
if (hit) onToggle(hit);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return { view, drawn, radii, outermostMetres, onPointerDown, onClick };
|
|
125
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# RegionMap
|
|
2
|
+
|
|
3
|
+
A hand-drawn map of named **areas** around a centre — polygons with holes,
|
|
4
|
+
drawn as inline SVG — where a tap toggles an area's `excluded` state.
|
|
5
|
+
|
|
6
|
+
Product-free. An area is a bairro, a delivery zone, a sales territory or a
|
|
7
|
+
parking sector alike; coordinates are plain latitude/longitude, and every word
|
|
8
|
+
arrives through `copy`. Built for a delivery host's "which neighbourhoods does this store not
|
|
9
|
+
deliver to", and deliberately not named after it.
|
|
10
|
+
|
|
11
|
+
## Use cases
|
|
12
|
+
|
|
13
|
+
- Picking which neighbourhoods inside a delivery radius are left out.
|
|
14
|
+
- Marking territories, zones or sectors on/off around a point.
|
|
15
|
+
- Showing a read-only picture of which areas are in and out (omit `onToggle`).
|
|
16
|
+
|
|
17
|
+
## Decisions that shape the API
|
|
18
|
+
|
|
19
|
+
### No tiles, no key, nothing fetched
|
|
20
|
+
|
|
21
|
+
The question is "which of THESE areas", not "what is this street called", so
|
|
22
|
+
the drawing is the areas themselves over a plain background. That keeps it
|
|
23
|
+
free of a tile provider, an API key and a network request, and it renders the
|
|
24
|
+
same in a test as on a phone. `MapPreview` is the component for a real map.
|
|
25
|
+
|
|
26
|
+
### The list is the accessible way in
|
|
27
|
+
|
|
28
|
+
The drawing is ONE `role="img"` with `copy.mapLabel`; its areas are not tab
|
|
29
|
+
stops. Real areas are many and some are far too small to tap on a phone (IBGE
|
|
30
|
+
outlines 11 of the 48 bairros inside a 3 km ring in one Belo Horizonte
|
|
31
|
+
neighbourhood at under 0.1 km²). Every area is also a toggle button in the list
|
|
32
|
+
beneath (`aria-pressed`, plus its state in words from `copy.rowState`), which
|
|
33
|
+
is what a keyboard and a screen reader use, and what reaches a sliver no finger
|
|
34
|
+
can. `listMode` decides how it is offered:
|
|
35
|
+
`shown` (a computer), `collapsed` behind one button that names the count (a
|
|
36
|
+
phone), or `none` for a host that renders its own.
|
|
37
|
+
|
|
38
|
+
The list holds only the areas in reach: an `outside` area is drawn faded on the
|
|
39
|
+
map for context but has no row unless `listed: true`, and the count matches the
|
|
40
|
+
rows. `listSort: 'name'` orders it by name; `detail` carries a distance or a
|
|
41
|
+
size tag ("tiny") for an area too small to tap.
|
|
42
|
+
|
|
43
|
+
### Excluded is hatched AND named, never only coloured
|
|
44
|
+
|
|
45
|
+
An excluded area gets a hatch, a darker edge and its name on the map, and a
|
|
46
|
+
pressed, filled row with a check in the list, whose inverted colours hold under
|
|
47
|
+
hover and keyboard focus, with a focus ring. Colour is never the only signal,
|
|
48
|
+
and the error colour is never used: leaving an area out is a choice, not a
|
|
49
|
+
failure. The highlighted areas (`highlightedIds`, e.g. a search's hits — several
|
|
50
|
+
at once) use the primary colour and are named too.
|
|
51
|
+
|
|
52
|
+
### Our hit test, not only the browser's
|
|
53
|
+
|
|
54
|
+
A MOUSE click on an area's path is that area: the browser hit-tests the
|
|
55
|
+
even-odd fill, and areas are drawn largest first, so an area in another's hole
|
|
56
|
+
is on top. A finger's (or pen's) tap goes to `hitRegion`: the SMALLEST area
|
|
57
|
+
within ~2% of the view (about 8 px on a phone), the ones holding the tap
|
|
58
|
+
included — so a strip a few metres wide beside a big area can be hit from the
|
|
59
|
+
map, and the big one stays easy to hit everywhere else. A tap on empty map
|
|
60
|
+
toggles nothing. An area too thin even for that is on the list.
|
|
61
|
+
|
|
62
|
+
### A toggle is cheap
|
|
63
|
+
|
|
64
|
+
Geometry is projected once per `rings` array identity and centre, so a host
|
|
65
|
+
that rebuilds its region objects on every toggle (`{ ...area, excluded }`) but
|
|
66
|
+
keeps their `rings` re-projects nothing. The base areas are a memoised layer: a
|
|
67
|
+
toggle re-renders only the hatch, highlight and label layers. Measured on 102
|
|
68
|
+
areas of 300 vertices each at 4× CPU throttle: 18–46 ms from tap to commit.
|
|
69
|
+
|
|
70
|
+
### Strokes and type stay their size at every width
|
|
71
|
+
|
|
72
|
+
Strokes use `vector-effect: non-scaling-stroke`, and labels are HTML laid over
|
|
73
|
+
the drawing at theme sizes, moved in by their measured width so none is
|
|
74
|
+
clipped at an edge — the map reads the same at 320 px and at 1600 px. The
|
|
75
|
+
drawing is square; `maxHeight` caps it on a wide screen, and where it sits in a
|
|
76
|
+
wider box is the host's call.
|
|
77
|
+
|
|
78
|
+
## Props
|
|
79
|
+
|
|
80
|
+
| prop | type | default | what it does |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| `regions` | `readonly RegionMapRegion[]` | — | the areas; drawn when any part is in view |
|
|
83
|
+
| `center` | `{ latitude, longitude } \| null` | — | centre, dot and circles; `null` centres on the areas, no dot |
|
|
84
|
+
| `circles` | `readonly { radiusMetres }[]` | `[]` | dashed circles; the view fits the largest |
|
|
85
|
+
| `onToggle` | `(id: string) => void` | — | a tap or a list press; omit for read-only |
|
|
86
|
+
| `highlightedIds` | `readonly string[]` | `[]` | areas to point at (a search's hits), outlined and named |
|
|
87
|
+
| `copy` | `RegionMapCopy` | — | every word |
|
|
88
|
+
| `listMode` | `'shown' \| 'collapsed' \| 'none'` | `'collapsed'` | how the list is offered |
|
|
89
|
+
| `listSort` | `'given' \| 'name'` | `'given'` | the list's order |
|
|
90
|
+
| `maxHeight` | `string` | — | the drawing's largest height, any CSS length |
|
|
91
|
+
| `className` | `string` | — | on the root |
|
|
92
|
+
| `dataTestId` | `string` | `'region-map'` | every child test id derives from it |
|
|
93
|
+
|
|
94
|
+
### `RegionMapRegion`
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
{
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
rings: readonly (readonly [latitude, longitude])[][]; // even-odd: holes are rings
|
|
101
|
+
excluded?: boolean;
|
|
102
|
+
outside?: boolean; // drawn faded (context beyond the circles); still tappable
|
|
103
|
+
listed?: boolean; // has a list row; defaults to !outside
|
|
104
|
+
detail?: string; // pre-formatted, on the list row: "2.7 km away", "tiny"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `RegionMapCopy`
|
|
109
|
+
|
|
110
|
+
`mapLabel`, `legendExcluded`, `legendCircle(radiusMetres)`, `legendCenter`,
|
|
111
|
+
`listLabel`, `showList(count)` (the count of LISTED areas), `hideList`, and
|
|
112
|
+
`rowState: { excluded, outside }` — a row's state in words, for a screen reader.
|
|
113
|
+
|
|
114
|
+
## Helpers
|
|
115
|
+
|
|
116
|
+
- `decodePolyline(encoded, precision = 1e5)` — Google's encoded polyline into
|
|
117
|
+
`[latitude, longitude]` points; outlines usually travel this way.
|
|
118
|
+
- `hitRegion(regions, point, tolerance)` and `projectionAt(center)` — the hit
|
|
119
|
+
test and projection the component uses, for a host that draws its own layer.
|
|
120
|
+
|
|
121
|
+
## Example
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
<RegionMap
|
|
125
|
+
regions={bairros.map((b) => ({
|
|
126
|
+
id: b.code,
|
|
127
|
+
name: b.name,
|
|
128
|
+
rings: b.outline.split(';').flatMap((p) => p.split(',')).map((r) => decodePolyline(r)),
|
|
129
|
+
excluded: excluded.has(b.code),
|
|
130
|
+
detail: b.distanceLabel,
|
|
131
|
+
}))}
|
|
132
|
+
center={store}
|
|
133
|
+
circles={rings.map((r) => ({ radiusMetres: r.maxDistanceMetres }))}
|
|
134
|
+
onToggle={toggle}
|
|
135
|
+
highlightedIds={searchHits}
|
|
136
|
+
copy={copy}
|
|
137
|
+
listMode={isPhone ? 'collapsed' : 'shown'}
|
|
138
|
+
/>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Not here (yet)
|
|
142
|
+
|
|
143
|
+
- Zoom and pan. The list covers the areas too small to tap.
|
|
144
|
+
- A React Native build.
|