@12-apps/ui 6.27.1 → 6.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/Alert/Alert.js +5 -4
- package/dist/_internal/components/data-display/Alert/Alert.metrics.js +3 -2
- package/dist/_internal/components/data-display/Alert/Alert.styles.js +4 -3
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.js +6 -5
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +4 -3
- package/dist/_internal/components/data-display/Badge/Badge.animations.js +4 -3
- package/dist/_internal/components/data-display/Badge/Badge.js +8 -7
- package/dist/_internal/components/data-display/Badge/Badge.metrics.js +3 -2
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +6 -5
- package/dist/_internal/components/data-display/Badge/Badge.variants.js +4 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +7 -6
- package/dist/_internal/components/data-display/Banner/Banner.js +5 -4
- package/dist/_internal/components/data-display/Banner/Banner.styles.js +4 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +5 -4
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -5
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +10 -9
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +2 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.js +5 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +2 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +2 -1
- package/dist/_internal/components/data-display/Chart/Chart.js +5 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +9 -8
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -1
- package/dist/_internal/components/data-display/Chart/chart-internals.js +2 -1
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +4 -3
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.body.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.cells.js +1 -1
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +5 -4
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +49 -47
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +68 -66
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +9 -8
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +10 -9
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +15 -14
- package/dist/_internal/components/data-display/DataViews/base-card.js +11 -10
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +12 -11
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +4 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +8 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +17 -16
- package/dist/_internal/components/data-display/DataViews/card-surface.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +6 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +10 -9
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +7 -6
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +7 -6
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +16 -14
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +45 -43
- package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +19 -18
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -7
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +11 -10
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-row-detail.js +8 -0
- package/dist/_internal/components/data-display/DataViews/data-views-row-detail.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +7 -6
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +15 -14
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +22 -21
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +14 -13
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +7 -6
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
- package/dist/_internal/components/data-display/DataViews/save-view-preview.js +5 -4
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +8 -7
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +5 -4
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +15 -15
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +11 -11
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +18 -17
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +3 -3
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +4 -4
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +10 -10
- 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 +5 -4
- package/dist/_internal/components/data-display/Progress/Progress.metrics.js +3 -2
- package/dist/_internal/components/data-display/Progress/Progress.styles.js +4 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +2 -1
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +2 -1
- 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 +74 -73
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -4
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +9 -8
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +6 -6
- package/dist/_internal/components/form/Button/Button.js +4 -3
- package/dist/_internal/components/form/Button/Button.styles.js +3 -2
- package/dist/_internal/components/form/Calendar/Calendar.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +6 -6
- package/dist/_internal/components/form/CepField/CepField.js +3 -3
- package/dist/_internal/components/form/Checkbox/Checkbox.js +3 -2
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +2 -2
- package/dist/_internal/components/form/Command/Command.js +4 -3
- package/dist/_internal/components/form/Command/Command.styles.js +2 -1
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/_internal/components/form/Input/Input.js +2 -2
- package/dist/_internal/components/form/Label/Label.js +2 -1
- package/dist/_internal/components/form/Label/Label.styles.js +2 -1
- package/dist/_internal/components/form/Menubar/Menubar.item.js +2 -1
- package/dist/_internal/components/form/Menubar/Menubar.js +2 -1
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +2 -1
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +2 -1
- package/dist/_internal/components/form/Switch/Switch.js +5 -4
- package/dist/_internal/components/form/Switch/Switch.parts.js +4 -3
- package/dist/_internal/components/form/Switch/Switch.styles.js +3 -2
- package/dist/_internal/components/form/index.js +24 -23
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/CepField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/TextField.js +3 -3
- package/dist/_internal/components/form/total-form/Fields/index.js +15 -15
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -4
- package/dist/_internal/components/index.js +122 -121
- package/dist/_internal/components/layout/Box/Box.js +5 -4
- package/dist/_internal/components/layout/Card/Card.js +2 -2
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +2 -2
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +2 -2
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +6 -5
- package/dist/_internal/components/layout/index.js +9 -9
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +9 -8
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +2 -1
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/index.js +18 -17
- package/dist/_internal/components/typography/Heading/Heading.js +5 -4
- package/dist/_internal/components/typography/Heading/Heading.metrics.js +3 -2
- package/dist/_internal/components/typography/Heading/Heading.styles.js +4 -3
- package/dist/_internal/components/typography/Paragraph/Paragraph.js +3 -2
- package/dist/_internal/components/typography/Text/Text.js +4 -3
- package/dist/_internal/components/typography/Text/Text.metrics.js +3 -2
- package/dist/_internal/components/typography/index.js +8 -7
- package/dist/_internal/icons/Icon.js +5 -4
- package/dist/_internal/provider/UiProvider.js +4 -3
- package/dist/_internal/provider/mui-bridge.js +3 -2
- package/dist/_internal/provider/use-ui-theme.js +4 -3
- package/dist/_internal/social-login-button/social-login-button.js +12 -11
- package/dist/_internal/tokens/ink-over.js +17 -0
- package/dist/_internal/tokens/ink-over.js.map +1 -0
- package/dist/_internal/tokens/theme.js +5 -3
- package/dist/_internal/user-avatar/user-avatar.js +13 -12
- package/dist/charts.js +19 -18
- package/dist/{chunk-Q3GSDSK2.js → chunk-236QP424.js} +2 -2
- package/dist/{chunk-JFRKBSWI.js → chunk-237NDIT2.js} +2 -2
- package/dist/chunk-2BYKTBDL.js +33 -0
- package/dist/chunk-2BYKTBDL.js.map +1 -0
- package/dist/{chunk-TQOPF7LD.js → chunk-2L2NWXWJ.js} +2 -2
- package/dist/{chunk-M4NFXC5R.js → chunk-2WSU6OGE.js} +5 -5
- package/dist/{chunk-72T5PAW7.js → chunk-3BPDHWVF.js} +9 -9
- package/dist/{chunk-EOHKZGOZ.js → chunk-3PUOLOEP.js} +2 -2
- package/dist/{chunk-ECMJ5VPW.js → chunk-3TFUAKWJ.js} +2 -2
- package/dist/{chunk-4ETQRBZC.js → chunk-46UPILLK.js} +4 -4
- package/dist/{chunk-6VHCSPKK.js → chunk-4H4Y2SX3.js} +3 -3
- package/dist/{chunk-L7S6N67X.js → chunk-4OSGKO7E.js} +2 -2
- package/dist/{chunk-UG76BO5K.js → chunk-5KFZGB5U.js} +2 -2
- package/dist/{chunk-FF3R67WD.js → chunk-5UC2RNOY.js} +4 -4
- package/dist/{chunk-EMNGIYH6.js → chunk-7TZ6OC5T.js} +5 -5
- package/dist/{chunk-G2JPUHEJ.js → chunk-AIBNBWQU.js} +2 -2
- package/dist/{chunk-QE2C35TO.js → chunk-ALAJBLBE.js} +5 -5
- package/dist/{chunk-E5LWJDI3.js → chunk-AROBXRC5.js} +11 -5
- package/dist/chunk-AROBXRC5.js.map +1 -0
- package/dist/{chunk-AIRWM7KK.js → chunk-AVI3XHRQ.js} +4 -4
- package/dist/{chunk-IE7ISTLQ.js → chunk-B443IIQG.js} +4 -4
- package/dist/{chunk-CKJI7JO5.js → chunk-BEWD734I.js} +2 -2
- package/dist/{chunk-RRX6ZTNX.js → chunk-BLT5ZBVL.js} +2 -2
- package/dist/{chunk-MDTSMJ7C.js → chunk-BYMWW65P.js} +3 -3
- package/dist/{chunk-Q3OFOOO7.js → chunk-C5EFVSBN.js} +2 -2
- package/dist/{chunk-Y55ILY2F.js → chunk-C5YBXQTK.js} +3 -3
- package/dist/{chunk-YANLN6HP.js → chunk-D6HDJVQW.js} +5 -5
- package/dist/{chunk-DIHVWBQV.js → chunk-DEE6IPGI.js} +32 -6
- package/dist/chunk-DEE6IPGI.js.map +1 -0
- package/dist/{chunk-ZA4U5GDU.js → chunk-DORPR2YP.js} +2 -2
- package/dist/{chunk-6YLAVHV4.js → chunk-DTKMBI7B.js} +4 -4
- package/dist/{chunk-5QUSX3TC.js → chunk-DVE53B2L.js} +7 -7
- package/dist/chunk-DVE53B2L.js.map +1 -0
- package/dist/{chunk-JXNT5TUP.js → chunk-DVEYD27F.js} +2 -2
- package/dist/{chunk-WZUNBSS7.js → chunk-DVUPIVI2.js} +4 -4
- package/dist/{chunk-CMN26J5Y.js → chunk-E6D2Y5EK.js} +2 -2
- package/dist/{chunk-HKB5C2KY.js → chunk-EMAX7RPN.js} +5 -5
- package/dist/{chunk-ZAJO2B75.js → chunk-EPRA5QLB.js} +2 -2
- package/dist/{chunk-ERX4XIYC.js → chunk-EUKYQXYU.js} +2 -2
- package/dist/{chunk-C3CMEDSO.js → chunk-EVXFEXBS.js} +2 -2
- package/dist/{chunk-O7HLQTB7.js → chunk-EYC6ERJJ.js} +3 -3
- package/dist/chunk-EYC6ERJJ.js.map +1 -0
- package/dist/{chunk-DYESJJ3Q.js → chunk-EZNTM6PT.js} +4 -4
- package/dist/{chunk-67ALTEWH.js → chunk-FGKKLHKY.js} +2 -2
- package/dist/{chunk-OXYR2HVK.js → chunk-FOKBP6HR.js} +10 -10
- package/dist/{chunk-22X7TT6Z.js → chunk-FR6AJSMT.js} +5 -5
- package/dist/{chunk-TUO47RL2.js → chunk-FVPN4YKW.js} +4 -4
- package/dist/{chunk-ZDWU52DJ.js → chunk-G5ZVD5IJ.js} +2 -2
- package/dist/{chunk-NPN7JTRM.js → chunk-GH2DC7PS.js} +4 -4
- package/dist/{chunk-77DF5LKI.js → chunk-GJUIZ5FN.js} +2 -2
- package/dist/{chunk-YJ4HM25H.js → chunk-GLWW2XCP.js} +2 -2
- package/dist/{chunk-7AIHK2XM.js → chunk-H53YNR23.js} +6 -6
- package/dist/{chunk-GT7C6TSM.js → chunk-HDNK7BAX.js} +3 -3
- package/dist/{chunk-7NEUPEV5.js → chunk-HQB5XNK5.js} +2 -2
- package/dist/{chunk-SZETT7QV.js → chunk-HS2OJI6L.js} +8 -8
- package/dist/{chunk-KZLLTOB2.js → chunk-HTZNB6IV.js} +2 -2
- package/dist/{chunk-NNXZ5RK5.js → chunk-IQ7WZ3RN.js} +4 -4
- package/dist/{chunk-7KEGJH3Q.js → chunk-IVVOIDE5.js} +3 -3
- package/dist/{chunk-45OHGD2B.js → chunk-J2K65BQQ.js} +4 -4
- package/dist/{chunk-SSWZHR46.js → chunk-J3ZP6EUS.js} +5 -5
- package/dist/{chunk-YPILHGEO.js → chunk-J6CSPDC7.js} +2 -2
- package/dist/{chunk-RRO2EOJB.js → chunk-JB67KPGM.js} +4 -4
- package/dist/{chunk-V5P5Q6HM.js → chunk-JOXBCXVL.js} +8 -8
- package/dist/{chunk-LO2B7FDQ.js → chunk-JPVDZXXX.js} +2 -2
- package/dist/{chunk-P7FQUGED.js → chunk-JRWPI4XF.js} +5 -5
- package/dist/{chunk-OVGASVPW.js → chunk-JVVTSSS4.js} +2 -2
- package/dist/{chunk-IASDP44E.js → chunk-K4N3V7YE.js} +4 -4
- package/dist/{chunk-L7LCSZ3H.js → chunk-K7DCYV5Q.js} +3 -3
- package/dist/{chunk-B5SW7I5W.js → chunk-L4D6YLLU.js} +2 -2
- package/dist/{chunk-FOF2RAVQ.js → chunk-L6TCIZFR.js} +4 -4
- package/dist/{chunk-7Z2AQEC5.js → chunk-LCXXPIG3.js} +2 -2
- package/dist/{chunk-MQPT254A.js → chunk-LSJY4LWZ.js} +4 -4
- package/dist/{chunk-CA7TA36R.js → chunk-MGPA6KTM.js} +2 -2
- package/dist/{chunk-OGHW7RQC.js → chunk-MHSTG7FF.js} +3 -3
- package/dist/{chunk-GQJ4NCZ6.js → chunk-MNSW33DU.js} +4 -4
- package/dist/{chunk-WETAIIKC.js → chunk-MRMNVGNX.js} +2 -2
- package/dist/{chunk-MYH7VISV.js → chunk-MSUSZLRE.js} +5 -5
- package/dist/{chunk-WKF54CCK.js → chunk-MVJYIHPH.js} +5 -5
- package/dist/{chunk-EQA4VQEO.js → chunk-NGM5XKAS.js} +2 -2
- package/dist/{chunk-PKFFJAQ6.js → chunk-NGVGTMHT.js} +2 -2
- package/dist/{chunk-3GB6KWHH.js → chunk-NUB4T3RQ.js} +2 -2
- package/dist/{chunk-GTLJYAEG.js → chunk-NWQWUYOV.js} +2 -2
- package/dist/{chunk-QXFPTRHB.js → chunk-NY2Y2SHA.js} +4 -4
- package/dist/{chunk-4A2Q22HO.js → chunk-O42ZA3TW.js} +3 -3
- package/dist/chunk-O5UGAL2V.js +15 -0
- package/dist/chunk-O5UGAL2V.js.map +1 -0
- package/dist/{chunk-DTIB5KWP.js → chunk-OJCK5RNJ.js} +3 -3
- package/dist/{chunk-OAWEUKUC.js → chunk-OLQDB346.js} +2 -2
- package/dist/{chunk-4IVOHL32.js → chunk-OP6F3NXX.js} +2 -2
- package/dist/{chunk-DWJBOR47.js → chunk-P3NRT6GV.js} +4 -4
- package/dist/{chunk-GBX5ACPF.js → chunk-PCYGUOWJ.js} +4 -4
- package/dist/{chunk-3PJLT5FX.js → chunk-PFZAUMJA.js} +5 -3
- package/dist/{chunk-3PJLT5FX.js.map → chunk-PFZAUMJA.js.map} +1 -1
- package/dist/{chunk-N5PY7IXI.js → chunk-PJTSGHTY.js} +2 -2
- package/dist/{chunk-AGYGNNOM.js → chunk-PQECNGDE.js} +2 -2
- package/dist/{chunk-XNOSTV5F.js → chunk-PTP3CZL4.js} +2 -2
- package/dist/{chunk-LGJ2H4AH.js → chunk-PVIAHB7D.js} +10 -10
- package/dist/{chunk-SC72DRTX.js → chunk-QGAYEBMU.js} +14 -8
- package/dist/chunk-QGAYEBMU.js.map +1 -0
- package/dist/{chunk-X5RDHO6G.js → chunk-QPDDS6DQ.js} +2 -2
- package/dist/{chunk-6SK3MTYJ.js → chunk-QSKJLMNS.js} +4 -4
- package/dist/{chunk-GYQT47YZ.js → chunk-QTZ7I6QS.js} +2 -2
- package/dist/{chunk-WBKWIFXA.js → chunk-QYNCPS5W.js} +6 -6
- package/dist/{chunk-DFLTUI7W.js → chunk-QZBUGUOY.js} +4 -4
- package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
- package/dist/{chunk-FGK2C7JR.js → chunk-RVGG5YJY.js} +2 -2
- package/dist/{chunk-7FOOLP5H.js → chunk-RXSGHPCR.js} +4 -4
- package/dist/{chunk-LUMF63BM.js → chunk-SFAP5EH5.js} +4 -4
- package/dist/{chunk-DW6GBMLQ.js → chunk-SLMA4UQS.js} +3 -3
- package/dist/{chunk-QRX5BYUQ.js → chunk-SOCKK67R.js} +7 -7
- package/dist/{chunk-QLI7ES7Z.js → chunk-SONWG2RT.js} +5 -18
- package/dist/chunk-SONWG2RT.js.map +1 -0
- package/dist/{chunk-G76H5PEM.js → chunk-SQV3HPTZ.js} +4 -4
- package/dist/{chunk-IV5QQLCS.js → chunk-T2VO32Z2.js} +2 -2
- package/dist/{chunk-VK4ULJFH.js → chunk-T5WNNEP5.js} +2 -2
- package/dist/{chunk-FRW4SYZD.js → chunk-TEE6HNHS.js} +4 -4
- package/dist/{chunk-JD3D6Y4U.js → chunk-THOPGHTY.js} +7 -7
- package/dist/{chunk-2LSCK45B.js → chunk-TSEWUY4V.js} +5 -3
- package/dist/{chunk-2LSCK45B.js.map → chunk-TSEWUY4V.js.map} +1 -1
- package/dist/{chunk-65METCKT.js → chunk-TSFFZ3AH.js} +20 -19
- package/dist/chunk-TSFFZ3AH.js.map +1 -0
- package/dist/{chunk-EZ5Z5UFI.js → chunk-TTW4MAOJ.js} +5 -5
- package/dist/{chunk-DTC224UJ.js → chunk-TX3ZHO5R.js} +5 -5
- package/dist/{chunk-H3BQFEN5.js → chunk-UC6A6ASM.js} +2 -2
- package/dist/{chunk-GSTRPZS4.js → chunk-UKPZVX3J.js} +2 -2
- package/dist/{chunk-EPNCYUQ7.js → chunk-UN5INW6K.js} +4 -4
- package/dist/{chunk-UGL6SJN6.js → chunk-UQNB2W2I.js} +3 -3
- package/dist/{chunk-P7IVAMAU.js → chunk-V7F53GEO.js} +7 -7
- package/dist/{chunk-ZC7RQDZ5.js → chunk-VESIQYBF.js} +5 -5
- package/dist/{chunk-2KVQIGVE.js → chunk-VKH7AENA.js} +2 -2
- package/dist/{chunk-S7HRED4D.js → chunk-VLHGBFR6.js} +3 -3
- package/dist/{chunk-SMZBGHR2.js → chunk-VRKS5K4N.js} +5 -5
- package/dist/{chunk-PW2WLDX3.js → chunk-VVXA7T2M.js} +2 -2
- package/dist/{chunk-2SWQ6HIK.js → chunk-W3FAKT3D.js} +4 -4
- package/dist/{chunk-QQLGSMGE.js → chunk-W5CW7JFZ.js} +2 -2
- package/dist/{chunk-HOJL2GKW.js → chunk-WC3W36AM.js} +4 -4
- package/dist/{chunk-3VZT2FAI.js → chunk-WC5XYWTE.js} +3 -3
- package/dist/{chunk-RFZU5BTG.js → chunk-WYDGPJ3Z.js} +4 -4
- package/dist/{chunk-27BL3DNT.js → chunk-XBZ43VIV.js} +9 -9
- package/dist/{chunk-KOFO6QZY.js → chunk-XGOWREVV.js} +2 -2
- package/dist/{chunk-KAV63FBG.js → chunk-XOCLWQON.js} +3 -3
- package/dist/{chunk-DF2FFYZ7.js → chunk-XSJWN3WH.js} +7 -7
- package/dist/{chunk-DB2MAYPK.js → chunk-XV2TDULR.js} +2 -2
- package/dist/{chunk-4OHRZW7U.js → chunk-XXE6NTJB.js} +4 -4
- package/dist/{chunk-4G3FGCWX.js → chunk-XXJRT6BP.js} +2 -2
- package/dist/{chunk-LV4UTYAD.js → chunk-XYDW5RQB.js} +2 -2
- package/dist/{chunk-7VN7LFBA.js → chunk-YD77RANW.js} +5 -5
- package/dist/{chunk-77OXG6DH.js → chunk-YFY3YVV6.js} +7 -7
- package/dist/{chunk-PENJBKPH.js → chunk-YTYROOLY.js} +3 -3
- package/dist/data-display/Alert.js +5 -4
- package/dist/data-display/AsyncStateContainer.js +4 -4
- package/dist/data-display/Avatar.js +6 -5
- package/dist/data-display/Badge.js +8 -7
- package/dist/data-display/Banner.js +5 -4
- package/dist/data-display/CardKit.js +13 -12
- package/dist/data-display/Carousel.js +5 -4
- package/dist/data-display/Chart.js +19 -18
- package/dist/data-display/DataGrid.js +3 -3
- package/dist/data-display/DataViews.js +87 -85
- package/dist/data-display/DescriptionItem.js +5 -4
- package/dist/data-display/FleetMap.js +18 -17
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/Lightbox.js +4 -4
- package/dist/data-display/LoadingState.js +3 -3
- package/dist/data-display/MapPreview.js +10 -10
- package/dist/data-display/Progress.js +5 -4
- package/dist/data-display/Sheet.js +4 -3
- package/dist/data-display/StatCard.js +3 -3
- package/dist/data-display/Table.js +2 -2
- package/dist/feedback/ConfirmAction.js +5 -4
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +6 -6
- package/dist/form/Button.js +4 -3
- package/dist/form/Calendar.js +2 -2
- package/dist/form/CategorySelect.js +8 -8
- package/dist/form/CepField.js +3 -3
- package/dist/form/Checkbox.js +3 -2
- package/dist/form/CodeEditor.js +2 -2
- package/dist/form/Command.js +4 -3
- package/dist/form/DateRangePicker.js +3 -3
- package/dist/form/Input.js +2 -2
- package/dist/form/Label.js +2 -1
- package/dist/form/Menubar.js +2 -1
- package/dist/form/Switch.js +5 -4
- package/dist/form/total-form.js +20 -19
- package/dist/icons.js +5 -4
- package/dist/layout/Box.js +5 -4
- package/dist/layout/Card.js +2 -2
- package/dist/layout/ContentToolbar.js +3 -3
- package/dist/layout/ScrollArea.js +2 -2
- package/dist/layout/SettingsLayout.js +6 -6
- package/dist/layout/Skeleton.js +2 -2
- package/dist/layout/Stack.js +6 -5
- package/dist/native/chunks/{chunk-XI7HTAVN.js → chunk-2HLEFYJ5.js} +2 -2
- package/dist/native/chunks/{chunk-UYREIOEM.js → chunk-6XDMYJBW.js} +2 -2
- package/dist/native/chunks/{chunk-6L4UZBQP.js → chunk-BEPOBULQ.js} +3 -3
- package/dist/native/chunks/{chunk-ZOP7UAZK.js → chunk-CO47ZRXO.js} +2 -2
- package/dist/native/chunks/{chunk-UII3IFLP.js → chunk-NVPXIJ2O.js} +2 -2
- package/dist/native/chunks/{chunk-2SBTJSQE.js → chunk-SOQVMWLQ.js} +5 -5
- package/dist/native/chunks/{chunk-MP3UDWTT.js → chunk-YQDDM6ZW.js} +24 -17
- package/dist/native/chunks/chunk-YQDDM6ZW.js.map +1 -0
- package/dist/native/chunks/{chunk-QEQZ5AF6.js → chunk-YXM4NR2B.js} +3 -3
- package/dist/native/data-display/Alert.js +3 -3
- package/dist/native/data-display/Avatar.js +3 -3
- package/dist/native/data-display/Badge.js +3 -3
- package/dist/native/data-display/Chip.js +3 -3
- package/dist/native/data-display/EmptyState.js +5 -5
- package/dist/native/data-display/ErrorState.js +4 -4
- package/dist/native/data-display/FleetMap.js +6 -6
- package/dist/native/data-display/LoadingState.js +2 -2
- package/dist/native/data-display/Progress.js +2 -2
- package/dist/native/feedback/Dialog.js +3 -3
- package/dist/native/form/Button.js +3 -3
- package/dist/native/form/Checkbox.js +3 -3
- package/dist/native/form/Input.js +3 -3
- package/dist/native/form/Select.js +4 -4
- package/dist/native/form/Switch.js +2 -2
- package/dist/native/icons.js +3 -3
- package/dist/native/layout/Box.js +3 -3
- package/dist/native/layout/Card.js +2 -2
- package/dist/native/layout/Container.js +2 -2
- package/dist/native/layout/Skeleton.js +3 -3
- package/dist/native/layout/Spacer.js +2 -2
- package/dist/native/layout/Stack.js +3 -3
- package/dist/native/provider.js +2 -2
- package/dist/native/tokens.js +1 -1
- package/dist/native/typography/Heading.js +2 -2
- package/dist/native/typography/Paragraph.js +2 -2
- package/dist/native/typography/Text.js +2 -2
- package/dist/navigation/AppHeader.js +11 -10
- package/dist/navigation/NavigationMenu.js +5 -5
- package/dist/navigation/Tabs.js +2 -2
- package/dist/provider.js +5 -4
- package/dist/social-login-button.js +12 -11
- package/dist/tokens.js +5 -3
- package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts.map +1 -1
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +10 -0
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +6 -0
- package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +3 -0
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts +3 -0
- package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +3 -0
- 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-row-detail.d.ts +27 -0
- package/dist/types/components/data-display/DataViews/data-views-row-detail.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/index.d.ts +1 -0
- package/dist/types/components/data-display/DataViews/index.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/types/tokens/ink-over.d.ts +12 -0
- package/dist/types/tokens/ink-over.d.ts.map +1 -0
- package/dist/types/tokens/theme.d.ts +2 -44
- package/dist/types/tokens/theme.d.ts.map +1 -1
- package/dist/types-native/tokens/ink-over.d.ts +12 -0
- package/dist/types-native/tokens/ink-over.d.ts.map +1 -0
- package/dist/types-native/tokens/theme.d.ts +2 -44
- package/dist/types-native/tokens/theme.d.ts.map +1 -1
- package/dist/typography/Heading.js +5 -4
- package/dist/typography/Paragraph.js +3 -2
- package/dist/typography/Text.js +4 -3
- package/dist/user-avatar.js +13 -12
- package/package.json +1 -1
- package/src/components/data-display/DataGrid/DataGrid.cells.tsx +23 -9
- package/src/components/data-display/DataGrid/DataGrid.md +8 -0
- package/src/components/data-display/DataGrid/DataGrid.types.ts +10 -0
- package/src/components/data-display/DataViews/DataViewsGrid.tsx +6 -0
- package/src/components/data-display/DataViews/DataViewsTableBase.tsx +3 -0
- package/src/components/data-display/DataViews/data-views-grid-bodies.tsx +7 -0
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +4 -0
- package/src/components/data-display/DataViews/data-views-row-detail.ts +40 -0
- package/src/components/data-display/DataViews/index.ts +1 -0
- package/src/components/form/Switch/Switch.styles.ts +29 -3
- package/src/tokens/ink-over.ts +142 -0
- package/src/tokens/theme.ts +10 -65
- package/dist/chunk-5QUSX3TC.js.map +0 -1
- package/dist/chunk-65METCKT.js.map +0 -1
- package/dist/chunk-DIHVWBQV.js.map +0 -1
- package/dist/chunk-E5LWJDI3.js.map +0 -1
- package/dist/chunk-O7HLQTB7.js.map +0 -1
- package/dist/chunk-QLI7ES7Z.js.map +0 -1
- package/dist/chunk-SC72DRTX.js.map +0 -1
- package/dist/native/chunks/chunk-MP3UDWTT.js.map +0 -1
- /package/dist/{chunk-Q3GSDSK2.js.map → chunk-236QP424.js.map} +0 -0
- /package/dist/{chunk-JFRKBSWI.js.map → chunk-237NDIT2.js.map} +0 -0
- /package/dist/{chunk-TQOPF7LD.js.map → chunk-2L2NWXWJ.js.map} +0 -0
- /package/dist/{chunk-M4NFXC5R.js.map → chunk-2WSU6OGE.js.map} +0 -0
- /package/dist/{chunk-72T5PAW7.js.map → chunk-3BPDHWVF.js.map} +0 -0
- /package/dist/{chunk-EOHKZGOZ.js.map → chunk-3PUOLOEP.js.map} +0 -0
- /package/dist/{chunk-ECMJ5VPW.js.map → chunk-3TFUAKWJ.js.map} +0 -0
- /package/dist/{chunk-4ETQRBZC.js.map → chunk-46UPILLK.js.map} +0 -0
- /package/dist/{chunk-6VHCSPKK.js.map → chunk-4H4Y2SX3.js.map} +0 -0
- /package/dist/{chunk-L7S6N67X.js.map → chunk-4OSGKO7E.js.map} +0 -0
- /package/dist/{chunk-UG76BO5K.js.map → chunk-5KFZGB5U.js.map} +0 -0
- /package/dist/{chunk-FF3R67WD.js.map → chunk-5UC2RNOY.js.map} +0 -0
- /package/dist/{chunk-EMNGIYH6.js.map → chunk-7TZ6OC5T.js.map} +0 -0
- /package/dist/{chunk-G2JPUHEJ.js.map → chunk-AIBNBWQU.js.map} +0 -0
- /package/dist/{chunk-QE2C35TO.js.map → chunk-ALAJBLBE.js.map} +0 -0
- /package/dist/{chunk-AIRWM7KK.js.map → chunk-AVI3XHRQ.js.map} +0 -0
- /package/dist/{chunk-IE7ISTLQ.js.map → chunk-B443IIQG.js.map} +0 -0
- /package/dist/{chunk-CKJI7JO5.js.map → chunk-BEWD734I.js.map} +0 -0
- /package/dist/{chunk-RRX6ZTNX.js.map → chunk-BLT5ZBVL.js.map} +0 -0
- /package/dist/{chunk-MDTSMJ7C.js.map → chunk-BYMWW65P.js.map} +0 -0
- /package/dist/{chunk-Q3OFOOO7.js.map → chunk-C5EFVSBN.js.map} +0 -0
- /package/dist/{chunk-Y55ILY2F.js.map → chunk-C5YBXQTK.js.map} +0 -0
- /package/dist/{chunk-YANLN6HP.js.map → chunk-D6HDJVQW.js.map} +0 -0
- /package/dist/{chunk-ZA4U5GDU.js.map → chunk-DORPR2YP.js.map} +0 -0
- /package/dist/{chunk-6YLAVHV4.js.map → chunk-DTKMBI7B.js.map} +0 -0
- /package/dist/{chunk-JXNT5TUP.js.map → chunk-DVEYD27F.js.map} +0 -0
- /package/dist/{chunk-WZUNBSS7.js.map → chunk-DVUPIVI2.js.map} +0 -0
- /package/dist/{chunk-CMN26J5Y.js.map → chunk-E6D2Y5EK.js.map} +0 -0
- /package/dist/{chunk-HKB5C2KY.js.map → chunk-EMAX7RPN.js.map} +0 -0
- /package/dist/{chunk-ZAJO2B75.js.map → chunk-EPRA5QLB.js.map} +0 -0
- /package/dist/{chunk-ERX4XIYC.js.map → chunk-EUKYQXYU.js.map} +0 -0
- /package/dist/{chunk-C3CMEDSO.js.map → chunk-EVXFEXBS.js.map} +0 -0
- /package/dist/{chunk-DYESJJ3Q.js.map → chunk-EZNTM6PT.js.map} +0 -0
- /package/dist/{chunk-67ALTEWH.js.map → chunk-FGKKLHKY.js.map} +0 -0
- /package/dist/{chunk-OXYR2HVK.js.map → chunk-FOKBP6HR.js.map} +0 -0
- /package/dist/{chunk-22X7TT6Z.js.map → chunk-FR6AJSMT.js.map} +0 -0
- /package/dist/{chunk-TUO47RL2.js.map → chunk-FVPN4YKW.js.map} +0 -0
- /package/dist/{chunk-ZDWU52DJ.js.map → chunk-G5ZVD5IJ.js.map} +0 -0
- /package/dist/{chunk-NPN7JTRM.js.map → chunk-GH2DC7PS.js.map} +0 -0
- /package/dist/{chunk-77DF5LKI.js.map → chunk-GJUIZ5FN.js.map} +0 -0
- /package/dist/{chunk-YJ4HM25H.js.map → chunk-GLWW2XCP.js.map} +0 -0
- /package/dist/{chunk-7AIHK2XM.js.map → chunk-H53YNR23.js.map} +0 -0
- /package/dist/{chunk-GT7C6TSM.js.map → chunk-HDNK7BAX.js.map} +0 -0
- /package/dist/{chunk-7NEUPEV5.js.map → chunk-HQB5XNK5.js.map} +0 -0
- /package/dist/{chunk-SZETT7QV.js.map → chunk-HS2OJI6L.js.map} +0 -0
- /package/dist/{chunk-KZLLTOB2.js.map → chunk-HTZNB6IV.js.map} +0 -0
- /package/dist/{chunk-NNXZ5RK5.js.map → chunk-IQ7WZ3RN.js.map} +0 -0
- /package/dist/{chunk-7KEGJH3Q.js.map → chunk-IVVOIDE5.js.map} +0 -0
- /package/dist/{chunk-45OHGD2B.js.map → chunk-J2K65BQQ.js.map} +0 -0
- /package/dist/{chunk-SSWZHR46.js.map → chunk-J3ZP6EUS.js.map} +0 -0
- /package/dist/{chunk-YPILHGEO.js.map → chunk-J6CSPDC7.js.map} +0 -0
- /package/dist/{chunk-RRO2EOJB.js.map → chunk-JB67KPGM.js.map} +0 -0
- /package/dist/{chunk-V5P5Q6HM.js.map → chunk-JOXBCXVL.js.map} +0 -0
- /package/dist/{chunk-LO2B7FDQ.js.map → chunk-JPVDZXXX.js.map} +0 -0
- /package/dist/{chunk-P7FQUGED.js.map → chunk-JRWPI4XF.js.map} +0 -0
- /package/dist/{chunk-OVGASVPW.js.map → chunk-JVVTSSS4.js.map} +0 -0
- /package/dist/{chunk-IASDP44E.js.map → chunk-K4N3V7YE.js.map} +0 -0
- /package/dist/{chunk-L7LCSZ3H.js.map → chunk-K7DCYV5Q.js.map} +0 -0
- /package/dist/{chunk-B5SW7I5W.js.map → chunk-L4D6YLLU.js.map} +0 -0
- /package/dist/{chunk-FOF2RAVQ.js.map → chunk-L6TCIZFR.js.map} +0 -0
- /package/dist/{chunk-7Z2AQEC5.js.map → chunk-LCXXPIG3.js.map} +0 -0
- /package/dist/{chunk-MQPT254A.js.map → chunk-LSJY4LWZ.js.map} +0 -0
- /package/dist/{chunk-CA7TA36R.js.map → chunk-MGPA6KTM.js.map} +0 -0
- /package/dist/{chunk-OGHW7RQC.js.map → chunk-MHSTG7FF.js.map} +0 -0
- /package/dist/{chunk-GQJ4NCZ6.js.map → chunk-MNSW33DU.js.map} +0 -0
- /package/dist/{chunk-WETAIIKC.js.map → chunk-MRMNVGNX.js.map} +0 -0
- /package/dist/{chunk-MYH7VISV.js.map → chunk-MSUSZLRE.js.map} +0 -0
- /package/dist/{chunk-WKF54CCK.js.map → chunk-MVJYIHPH.js.map} +0 -0
- /package/dist/{chunk-EQA4VQEO.js.map → chunk-NGM5XKAS.js.map} +0 -0
- /package/dist/{chunk-PKFFJAQ6.js.map → chunk-NGVGTMHT.js.map} +0 -0
- /package/dist/{chunk-3GB6KWHH.js.map → chunk-NUB4T3RQ.js.map} +0 -0
- /package/dist/{chunk-GTLJYAEG.js.map → chunk-NWQWUYOV.js.map} +0 -0
- /package/dist/{chunk-QXFPTRHB.js.map → chunk-NY2Y2SHA.js.map} +0 -0
- /package/dist/{chunk-4A2Q22HO.js.map → chunk-O42ZA3TW.js.map} +0 -0
- /package/dist/{chunk-DTIB5KWP.js.map → chunk-OJCK5RNJ.js.map} +0 -0
- /package/dist/{chunk-OAWEUKUC.js.map → chunk-OLQDB346.js.map} +0 -0
- /package/dist/{chunk-4IVOHL32.js.map → chunk-OP6F3NXX.js.map} +0 -0
- /package/dist/{chunk-DWJBOR47.js.map → chunk-P3NRT6GV.js.map} +0 -0
- /package/dist/{chunk-GBX5ACPF.js.map → chunk-PCYGUOWJ.js.map} +0 -0
- /package/dist/{chunk-N5PY7IXI.js.map → chunk-PJTSGHTY.js.map} +0 -0
- /package/dist/{chunk-AGYGNNOM.js.map → chunk-PQECNGDE.js.map} +0 -0
- /package/dist/{chunk-XNOSTV5F.js.map → chunk-PTP3CZL4.js.map} +0 -0
- /package/dist/{chunk-LGJ2H4AH.js.map → chunk-PVIAHB7D.js.map} +0 -0
- /package/dist/{chunk-X5RDHO6G.js.map → chunk-QPDDS6DQ.js.map} +0 -0
- /package/dist/{chunk-6SK3MTYJ.js.map → chunk-QSKJLMNS.js.map} +0 -0
- /package/dist/{chunk-GYQT47YZ.js.map → chunk-QTZ7I6QS.js.map} +0 -0
- /package/dist/{chunk-WBKWIFXA.js.map → chunk-QYNCPS5W.js.map} +0 -0
- /package/dist/{chunk-DFLTUI7W.js.map → chunk-QZBUGUOY.js.map} +0 -0
- /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
- /package/dist/{chunk-FGK2C7JR.js.map → chunk-RVGG5YJY.js.map} +0 -0
- /package/dist/{chunk-7FOOLP5H.js.map → chunk-RXSGHPCR.js.map} +0 -0
- /package/dist/{chunk-LUMF63BM.js.map → chunk-SFAP5EH5.js.map} +0 -0
- /package/dist/{chunk-DW6GBMLQ.js.map → chunk-SLMA4UQS.js.map} +0 -0
- /package/dist/{chunk-QRX5BYUQ.js.map → chunk-SOCKK67R.js.map} +0 -0
- /package/dist/{chunk-G76H5PEM.js.map → chunk-SQV3HPTZ.js.map} +0 -0
- /package/dist/{chunk-IV5QQLCS.js.map → chunk-T2VO32Z2.js.map} +0 -0
- /package/dist/{chunk-VK4ULJFH.js.map → chunk-T5WNNEP5.js.map} +0 -0
- /package/dist/{chunk-FRW4SYZD.js.map → chunk-TEE6HNHS.js.map} +0 -0
- /package/dist/{chunk-JD3D6Y4U.js.map → chunk-THOPGHTY.js.map} +0 -0
- /package/dist/{chunk-EZ5Z5UFI.js.map → chunk-TTW4MAOJ.js.map} +0 -0
- /package/dist/{chunk-DTC224UJ.js.map → chunk-TX3ZHO5R.js.map} +0 -0
- /package/dist/{chunk-H3BQFEN5.js.map → chunk-UC6A6ASM.js.map} +0 -0
- /package/dist/{chunk-GSTRPZS4.js.map → chunk-UKPZVX3J.js.map} +0 -0
- /package/dist/{chunk-EPNCYUQ7.js.map → chunk-UN5INW6K.js.map} +0 -0
- /package/dist/{chunk-UGL6SJN6.js.map → chunk-UQNB2W2I.js.map} +0 -0
- /package/dist/{chunk-P7IVAMAU.js.map → chunk-V7F53GEO.js.map} +0 -0
- /package/dist/{chunk-ZC7RQDZ5.js.map → chunk-VESIQYBF.js.map} +0 -0
- /package/dist/{chunk-2KVQIGVE.js.map → chunk-VKH7AENA.js.map} +0 -0
- /package/dist/{chunk-S7HRED4D.js.map → chunk-VLHGBFR6.js.map} +0 -0
- /package/dist/{chunk-SMZBGHR2.js.map → chunk-VRKS5K4N.js.map} +0 -0
- /package/dist/{chunk-PW2WLDX3.js.map → chunk-VVXA7T2M.js.map} +0 -0
- /package/dist/{chunk-2SWQ6HIK.js.map → chunk-W3FAKT3D.js.map} +0 -0
- /package/dist/{chunk-QQLGSMGE.js.map → chunk-W5CW7JFZ.js.map} +0 -0
- /package/dist/{chunk-HOJL2GKW.js.map → chunk-WC3W36AM.js.map} +0 -0
- /package/dist/{chunk-3VZT2FAI.js.map → chunk-WC5XYWTE.js.map} +0 -0
- /package/dist/{chunk-RFZU5BTG.js.map → chunk-WYDGPJ3Z.js.map} +0 -0
- /package/dist/{chunk-27BL3DNT.js.map → chunk-XBZ43VIV.js.map} +0 -0
- /package/dist/{chunk-KOFO6QZY.js.map → chunk-XGOWREVV.js.map} +0 -0
- /package/dist/{chunk-KAV63FBG.js.map → chunk-XOCLWQON.js.map} +0 -0
- /package/dist/{chunk-DF2FFYZ7.js.map → chunk-XSJWN3WH.js.map} +0 -0
- /package/dist/{chunk-DB2MAYPK.js.map → chunk-XV2TDULR.js.map} +0 -0
- /package/dist/{chunk-4OHRZW7U.js.map → chunk-XXE6NTJB.js.map} +0 -0
- /package/dist/{chunk-4G3FGCWX.js.map → chunk-XXJRT6BP.js.map} +0 -0
- /package/dist/{chunk-LV4UTYAD.js.map → chunk-XYDW5RQB.js.map} +0 -0
- /package/dist/{chunk-7VN7LFBA.js.map → chunk-YD77RANW.js.map} +0 -0
- /package/dist/{chunk-77OXG6DH.js.map → chunk-YFY3YVV6.js.map} +0 -0
- /package/dist/{chunk-PENJBKPH.js.map → chunk-YTYROOLY.js.map} +0 -0
- /package/dist/native/chunks/{chunk-XI7HTAVN.js.map → chunk-2HLEFYJ5.js.map} +0 -0
- /package/dist/native/chunks/{chunk-UYREIOEM.js.map → chunk-6XDMYJBW.js.map} +0 -0
- /package/dist/native/chunks/{chunk-6L4UZBQP.js.map → chunk-BEPOBULQ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-ZOP7UAZK.js.map → chunk-CO47ZRXO.js.map} +0 -0
- /package/dist/native/chunks/{chunk-UII3IFLP.js.map → chunk-NVPXIJ2O.js.map} +0 -0
- /package/dist/native/chunks/{chunk-2SBTJSQE.js.map → chunk-SOQVMWLQ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-QEQZ5AF6.js.map → chunk-YXM4NR2B.js.map} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { contrastText, inkOver } from './ink-over';
|
|
2
|
+
export { contrastText, inkOver };
|
|
1
3
|
import { type HeadingLevel } from './heading-scale';
|
|
2
4
|
import type { SizeValue } from './vocabulary';
|
|
3
5
|
/**
|
|
@@ -137,50 +139,6 @@ export declare const DEFAULT_BRAND: Record<UiThemeMode, {
|
|
|
137
139
|
primary: string;
|
|
138
140
|
secondary: string;
|
|
139
141
|
}>;
|
|
140
|
-
/**
|
|
141
|
-
* MUI's `getContrastText`: white where white reads at 3:1 on the colour, the
|
|
142
|
-
* light mode's dark ink otherwise. (MUI's source spells the white as the DARK
|
|
143
|
-
* palette's `text.primary`, which is what made it easy to read backwards.)
|
|
144
|
-
*/
|
|
145
|
-
export declare function contrastText(background: string): string;
|
|
146
|
-
/**
|
|
147
|
-
* The ink that reads on EVERY one of these fills (FUT-1924).
|
|
148
|
-
*
|
|
149
|
-
* {@link contrastText} answers for one fill, which is all MUI's `augmentColor`
|
|
150
|
-
* ever needs: a solid button is a single flat colour. Two components paint the
|
|
151
|
-
* label over something that is not one colour — `Button`'s `gradient` variant
|
|
152
|
-
* runs between two stops, and `Switch`'s thumb travels the whole length of a
|
|
153
|
-
* checked track — and both of them stated `#fff` outright instead, which is
|
|
154
|
-
* white-on-pale the moment a white-labelled host hands the library a pale
|
|
155
|
-
* brand. Audited across the library, those two were the only places a hardcoded
|
|
156
|
-
* white sat over a surface the TENANT chooses.
|
|
157
|
-
*
|
|
158
|
-
* **This deliberately does not follow `contrastText`'s rule.** MUI's is a
|
|
159
|
-
* threshold that PREFERS white — white wherever white clears 3:1 — which is a
|
|
160
|
-
* brand-feel decision, and it is kept for every existing caller so nothing
|
|
161
|
-
* already legible moves. Here the fills can disagree: over MUI's own success
|
|
162
|
-
* pair white is 2.78:1 on `#4caf50` and dark ink 2.66:1 on `#1b5e20`, so
|
|
163
|
-
* neither meets any threshold and asking whether one does is the wrong
|
|
164
|
-
* question. The answer is whichever ink has the better WORST case across the
|
|
165
|
-
* fills — which is also not what either fill says on its own, since
|
|
166
|
-
* `contrastText('#4caf50')` is dark ink.
|
|
167
|
-
*
|
|
168
|
-
* A gradient wide enough that neither ink clears 4.5:1 anywhere is a palette
|
|
169
|
-
* problem this cannot fix — it returns the less bad ink and does not pretend
|
|
170
|
-
* otherwise.
|
|
171
|
-
*
|
|
172
|
-
* `Math.min` is the claim, and it is worth knowing that no test can prove it
|
|
173
|
-
* against `Math.max` today: the two candidate inks sit at opposite ends of the
|
|
174
|
-
* luminance range, so ranking them by their best fill and by their worst gives
|
|
175
|
-
* the same winner for every possible pair (checked exhaustively). Worst case is
|
|
176
|
-
* still what this MEANS, and the moment a third ink or one that is not an
|
|
177
|
-
* extreme is offered, the two stop agreeing.
|
|
178
|
-
*
|
|
179
|
-
* `fallback` is returned when a fill cannot be decomposed: {@link getContrastRatio}
|
|
180
|
-
* throws on a format it does not know, and a throw inside an emotion style
|
|
181
|
-
* function takes the render down with it.
|
|
182
|
-
*/
|
|
183
|
-
export declare function inkOver(fills: readonly string[], fallback: string): string;
|
|
184
142
|
/**
|
|
185
143
|
* MUI's `augmentColor` for a custom colour: derive whatever shade the seed
|
|
186
144
|
* left out. `light` is one tonal offset up, `dark` one and a half down.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/tokens/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/tokens/theme.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "../chunk-6GP2DOOO.js";
|
|
2
2
|
import {
|
|
3
3
|
Heading
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SLMA4UQS.js";
|
|
5
|
+
import "../chunk-XYDW5RQB.js";
|
|
6
|
+
import "../chunk-EUKYQXYU.js";
|
|
7
7
|
import "../chunk-TYJR4GOF.js";
|
|
8
8
|
import "../chunk-PT6TCWIW.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-SONWG2RT.js";
|
|
10
10
|
import "../chunk-AG66JBNH.js";
|
|
11
|
+
import "../chunk-2BYKTBDL.js";
|
|
11
12
|
import "../chunk-6JAIFIPW.js";
|
|
12
13
|
import "../chunk-FZXKH2ZT.js";
|
|
13
14
|
import "../chunk-PZ5AY32C.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Paragraph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NWQWUYOV.js";
|
|
4
4
|
import "../chunk-QKLGH3RZ.js";
|
|
5
5
|
import "../chunk-TYJR4GOF.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-SONWG2RT.js";
|
|
7
7
|
import "../chunk-AG66JBNH.js";
|
|
8
|
+
import "../chunk-2BYKTBDL.js";
|
|
8
9
|
import "../chunk-6JAIFIPW.js";
|
|
9
10
|
import "../chunk-FZXKH2ZT.js";
|
|
10
11
|
import "../chunk-PZ5AY32C.js";
|
package/dist/typography/Text.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../chunk-VUHLNYAE.js";
|
|
2
2
|
import {
|
|
3
3
|
Text
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-YTYROOLY.js";
|
|
5
|
+
import "../chunk-EPRA5QLB.js";
|
|
6
6
|
import "../chunk-TYJR4GOF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-SONWG2RT.js";
|
|
8
8
|
import "../chunk-AG66JBNH.js";
|
|
9
|
+
import "../chunk-2BYKTBDL.js";
|
|
9
10
|
import "../chunk-6JAIFIPW.js";
|
|
10
11
|
import "../chunk-FZXKH2ZT.js";
|
|
11
12
|
import "../chunk-PZ5AY32C.js";
|
package/dist/user-avatar.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UserAvatar,
|
|
3
3
|
UserMenu
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ALAJBLBE.js";
|
|
5
5
|
import "./chunk-UDQSIRAP.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-SZETT7QV.js";
|
|
8
|
-
import "./chunk-XRMZMBE3.js";
|
|
9
|
-
import "./chunk-FAITHWIO.js";
|
|
6
|
+
import "./chunk-THOPGHTY.js";
|
|
10
7
|
import "./chunk-3ZVUNSFF.js";
|
|
8
|
+
import "./chunk-HS2OJI6L.js";
|
|
9
|
+
import "./chunk-FAITHWIO.js";
|
|
10
|
+
import "./chunk-XRMZMBE3.js";
|
|
11
11
|
import "./chunk-VUHLNYAE.js";
|
|
12
12
|
import "./chunk-2GSIEDGN.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-AVI3XHRQ.js";
|
|
14
|
+
import "./chunk-FKUYRQSP.js";
|
|
14
15
|
import "./chunk-BEBLRL5D.js";
|
|
15
16
|
import "./chunk-6Q6T3FW5.js";
|
|
16
|
-
import "./chunk-FKUYRQSP.js";
|
|
17
17
|
import "./chunk-BA4RHQ3B.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-GJUIZ5FN.js";
|
|
19
|
+
import "./chunk-TSEWUY4V.js";
|
|
20
20
|
import "./chunk-5LQ7PKMW.js";
|
|
21
21
|
import "./chunk-TAMIZE4Q.js";
|
|
22
22
|
import "./chunk-73BEVJCS.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-YTYROOLY.js";
|
|
24
|
+
import "./chunk-EPRA5QLB.js";
|
|
25
25
|
import "./chunk-TYJR4GOF.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-SONWG2RT.js";
|
|
27
27
|
import "./chunk-AG66JBNH.js";
|
|
28
|
+
import "./chunk-2BYKTBDL.js";
|
|
28
29
|
import "./chunk-6JAIFIPW.js";
|
|
29
30
|
import "./chunk-FZXKH2ZT.js";
|
|
30
31
|
import "./chunk-PZ5AY32C.js";
|
package/package.json
CHANGED
|
@@ -166,6 +166,7 @@ export interface GridRowProps<T extends Record<string, unknown>> {
|
|
|
166
166
|
|
|
167
167
|
/** The leading checkbox / chevron cells, which exist only for enabled features. */
|
|
168
168
|
function RowControls<T extends Record<string, unknown>>({
|
|
169
|
+
row,
|
|
169
170
|
index,
|
|
170
171
|
rowId,
|
|
171
172
|
isSelected,
|
|
@@ -187,13 +188,26 @@ function RowControls<T extends Record<string, unknown>>({
|
|
|
187
188
|
)}
|
|
188
189
|
{expansion && (
|
|
189
190
|
<TableCell padding="checkbox">
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
{expansion.isRowExpandable?.(row) === false ? null : (
|
|
192
|
+
<IconButton
|
|
193
|
+
size="small"
|
|
194
|
+
// Stopped so a host that opens the record on a row click does not
|
|
195
|
+
// ALSO open it here: the chevron is its own control.
|
|
196
|
+
onClick={(event) => {
|
|
197
|
+
event.stopPropagation();
|
|
198
|
+
model.onToggleExpansion(rowId);
|
|
199
|
+
}}
|
|
200
|
+
aria-expanded={isExpanded}
|
|
201
|
+
aria-label={
|
|
202
|
+
isExpanded
|
|
203
|
+
? (expansion.collapseLabel ?? 'Collapse row')
|
|
204
|
+
: (expansion.expandLabel ?? 'Expand row')
|
|
205
|
+
}
|
|
206
|
+
data-slot="expand-toggle"
|
|
207
|
+
>
|
|
208
|
+
{isExpanded ? <ExpandLess /> : <ExpandMore />}
|
|
209
|
+
</IconButton>
|
|
210
|
+
)}
|
|
197
211
|
</TableCell>
|
|
198
212
|
)}
|
|
199
213
|
</>
|
|
@@ -234,8 +248,8 @@ export function GridRow<T extends Record<string, unknown>>(
|
|
|
234
248
|
/>
|
|
235
249
|
))}
|
|
236
250
|
</TableRow>
|
|
237
|
-
{expansion && isExpanded && (
|
|
238
|
-
<TableRow>
|
|
251
|
+
{expansion && isExpanded && expansion.isRowExpandable?.(row) !== false && (
|
|
252
|
+
<TableRow data-slot="row-detail">
|
|
239
253
|
<TableCell colSpan={totalColumns}>{expansion.render(row, index)}</TableCell>
|
|
240
254
|
</TableRow>
|
|
241
255
|
)}
|
|
@@ -105,6 +105,11 @@ export interface GridRowExpansion<T = any> {
|
|
|
105
105
|
defaultExpandedRowIds?: Array<string | number>;
|
|
106
106
|
/** Row id equality uses `getRowId` */
|
|
107
107
|
onChangeExpanded?: (ids: Array<string | number>) => void;
|
|
108
|
+
/** Which rows have a detail; omitted, every row does. Refused rows keep an empty cell. */
|
|
109
|
+
isRowExpandable?: (row: T) => boolean;
|
|
110
|
+
/** Accessible names for the chevron (defaults "Expand row" / "Collapse row"). */
|
|
111
|
+
expandLabel?: string;
|
|
112
|
+
collapseLabel?: string;
|
|
108
113
|
}
|
|
109
114
|
|
|
110
115
|
export interface GridSelection {
|
|
@@ -254,6 +259,9 @@ export interface DataGridProps<T = any> extends React.HTMLAttributes<HTMLElement
|
|
|
254
259
|
|
|
255
260
|
- **Expansion**:
|
|
256
261
|
- Row expand/collapse before/after row; expanded region must be focusable and labelled.
|
|
262
|
+
- `isRowExpandable` withholds the chevron per row (the cell stays, so columns align).
|
|
263
|
+
- The chevron's click does not reach the row's cells, so it never also fires a cell's
|
|
264
|
+
`onClick` (a row-click that opens the record).
|
|
257
265
|
|
|
258
266
|
## 6) Styling Contract (data attributes & slots)
|
|
259
267
|
|
|
@@ -73,6 +73,16 @@ export interface GridRowExpansion<T = Record<string, unknown>> {
|
|
|
73
73
|
defaultExpandedRowIds?: Array<string | number>;
|
|
74
74
|
/** Row id equality uses `getRowId` */
|
|
75
75
|
onChangeExpanded?: (ids: Array<string | number>) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Which rows HAVE a detail. Omitted, every row does. A row it refuses keeps
|
|
78
|
+
* the (empty) chevron cell, so the columns still line up, but offers no
|
|
79
|
+
* toggle — a chevron that opens onto nothing is a promise the row cannot keep.
|
|
80
|
+
*/
|
|
81
|
+
isRowExpandable?: (row: T) => boolean;
|
|
82
|
+
/** The chevron's accessible name while the row is collapsed. Default "Expand row". */
|
|
83
|
+
expandLabel?: string;
|
|
84
|
+
/** The chevron's accessible name while the row is expanded. Default "Collapse row". */
|
|
85
|
+
collapseLabel?: string;
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
export interface GridSelection {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
type RangeFieldConfig,
|
|
23
23
|
type RowAction,
|
|
24
24
|
} from "./data-views-types";
|
|
25
|
+
import type { DataViewRowDetail } from "./data-views-row-detail";
|
|
25
26
|
import { useDataViewsState } from "./use-data-views-state";
|
|
26
27
|
|
|
27
28
|
interface DataViewsGridProps<T extends Record<string, unknown>> {
|
|
@@ -116,6 +117,11 @@ interface DataViewsGridProps<T extends Record<string, unknown>> {
|
|
|
116
117
|
* `rowActions`/`bulkActions` still drive the multi-row bulk menu.
|
|
117
118
|
*/
|
|
118
119
|
renderRowMenu?: (row: T) => React.ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Opt-in expandable rows (table layout only): a chevron in a leading column
|
|
122
|
+
* opens `render(row)` under the row. See {@link DataViewRowDetail}.
|
|
123
|
+
*/
|
|
124
|
+
rowDetail?: DataViewRowDetail<T>;
|
|
119
125
|
/**
|
|
120
126
|
* Opt-in "Grade" (cards) layout. When provided, a Grade/Tabela toggle appears in
|
|
121
127
|
* the toolbar and the cards body renders each visible row via this function
|
|
@@ -12,6 +12,7 @@ import { DeleteViewDialog } from "./DeleteViewDialog";
|
|
|
12
12
|
import type { BoardConfig } from "./DataViewsBoard";
|
|
13
13
|
import type { DataViewExport } from "./data-views-export";
|
|
14
14
|
import type { ScopeConfig } from "./data-views-scopes";
|
|
15
|
+
import type { DataViewRowDetail } from "./data-views-row-detail";
|
|
15
16
|
import { ViewDialogs, ViewMutationErrorAlert } from "./data-views-table-parts";
|
|
16
17
|
import {
|
|
17
18
|
useSavedViewsController,
|
|
@@ -81,6 +82,8 @@ export interface DataViewsTableBaseProps<T extends Record<string, unknown>> {
|
|
|
81
82
|
selectionExtra?: SelectionExtraRender<T>;
|
|
82
83
|
/** Bespoke per-row menu (an entity's self-contained 3-dots menu) instead of the auto kebab. */
|
|
83
84
|
renderRowMenu?: (row: T) => React.ReactNode;
|
|
85
|
+
/** Opt-in expandable rows (table layout only) — see {@link DataViewRowDetail}. */
|
|
86
|
+
rowDetail?: DataViewRowDetail<T>;
|
|
84
87
|
/** Opt-in "Grade" (cards) layout — a card renderer per row; adds a Grade/Tabela toggle. */
|
|
85
88
|
renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;
|
|
86
89
|
/** Opt-in "Quadro" (board) layout — the loaded page as columns of one field. Needs `renderCard`. */
|
|
@@ -18,6 +18,7 @@ import { DataViewsBoard, type BoardConfig } from "./DataViewsBoard";
|
|
|
18
18
|
import { SelectAllStrip } from "./data-views-select-all-strip";
|
|
19
19
|
import { ListCardGroup, type ListGroupConfig } from "./list-card-rails";
|
|
20
20
|
import type { DataViewCardSelection } from "./data-views-types";
|
|
21
|
+
import { toGridExpansion, type DataViewRowDetail } from "./data-views-row-detail";
|
|
21
22
|
import type { DataViewsController } from "./use-data-views-state";
|
|
22
23
|
import { useDataViewsCopy } from "./data-views-copy-context";
|
|
23
24
|
|
|
@@ -35,6 +36,7 @@ interface GridBodyProps<T extends Record<string, unknown>> {
|
|
|
35
36
|
sortMode: "client" | "server";
|
|
36
37
|
/** Vertical cell padding, from the density preference. */
|
|
37
38
|
rowPadding: number;
|
|
39
|
+
rowDetail?: DataViewRowDetail<T>;
|
|
38
40
|
dataTestId?: string;
|
|
39
41
|
emptyState?: React.ReactNode;
|
|
40
42
|
}
|
|
@@ -50,6 +52,7 @@ function GridBody<T extends Record<string, unknown>>({
|
|
|
50
52
|
onChangeSortBy,
|
|
51
53
|
sortMode,
|
|
52
54
|
rowPadding,
|
|
55
|
+
rowDetail,
|
|
53
56
|
dataTestId,
|
|
54
57
|
emptyState,
|
|
55
58
|
}: GridBodyProps<T>): React.JSX.Element {
|
|
@@ -77,6 +80,7 @@ function GridBody<T extends Record<string, unknown>>({
|
|
|
77
80
|
headerHeight={36}
|
|
78
81
|
selection={{ mode: "multi", selectedRowIds: selectedIds, onChangeSelected }}
|
|
79
82
|
sorting={{ mode: sortMode, sortBy, onChangeSortBy }}
|
|
83
|
+
expansion={toGridExpansion(rowDetail, copy)}
|
|
80
84
|
data-testid={dataTestId}
|
|
81
85
|
emptyState={emptyState}
|
|
82
86
|
emptyText={copy.grid.emptyFilteredTitle}
|
|
@@ -260,6 +264,8 @@ interface GridMainProps<T extends Record<string, unknown>> {
|
|
|
260
264
|
listGroup?: ListGroupConfig<T>;
|
|
261
265
|
/** Opt-in "Quadro" (board) layout — needs `renderCard`, since it reuses the card. */
|
|
262
266
|
board?: BoardConfig<T>;
|
|
267
|
+
/** Opt-in expandable rows — the TABLE only; the headerless layouts ignore it. */
|
|
268
|
+
rowDetail?: DataViewRowDetail<T>;
|
|
263
269
|
dataTestId?: string;
|
|
264
270
|
emptyState?: React.ReactNode;
|
|
265
271
|
testIdPrefix: string;
|
|
@@ -382,6 +388,7 @@ export function GridMain<T extends Record<string, unknown>>(props: GridMainProps
|
|
|
382
388
|
onChangeSortBy={(next: GridSort[]) => c.patch({ sortBy: next })}
|
|
383
389
|
sortMode={c.serverMode ? "server" : "client"}
|
|
384
390
|
rowPadding={DENSITY_ROW_PADDING[layoutState.density]}
|
|
391
|
+
rowDetail={props.rowDetail}
|
|
385
392
|
dataTestId={dataTestId}
|
|
386
393
|
emptyState={emptyState}
|
|
387
394
|
/>
|
|
@@ -34,6 +34,7 @@ import type {
|
|
|
34
34
|
RangeValue,
|
|
35
35
|
RowAction,
|
|
36
36
|
} from "./data-views-types";
|
|
37
|
+
import type { DataViewRowDetail } from "./data-views-row-detail";
|
|
37
38
|
import type { DataViewsController } from "./use-data-views-state";
|
|
38
39
|
|
|
39
40
|
/* ── Layout ⇄ view-state mirror ──────────────────────────────────────────── */
|
|
@@ -197,6 +198,8 @@ interface GridShellProps<T extends Record<string, unknown>> {
|
|
|
197
198
|
renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;
|
|
198
199
|
/** The Lista's shared columns, so its rows line up by construction. */
|
|
199
200
|
listGroup?: ListGroupConfig<T>;
|
|
201
|
+
/** Opt-in expandable rows, drawn by the table layout only. */
|
|
202
|
+
rowDetail?: DataViewRowDetail<T>;
|
|
200
203
|
/** The page-level partition rendered as tabs under the toolbar. */
|
|
201
204
|
scopes?: ScopeConfig[];
|
|
202
205
|
/**
|
|
@@ -300,6 +303,7 @@ function ShellStack<T extends Record<string, unknown>>({
|
|
|
300
303
|
renderListRow={props.renderListRow}
|
|
301
304
|
listGroup={props.listGroup}
|
|
302
305
|
board={props.board}
|
|
306
|
+
rowDetail={props.rowDetail}
|
|
303
307
|
dataTestId={dataTestId}
|
|
304
308
|
testIdPrefix={testIdPrefix}
|
|
305
309
|
emptyState={body}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
|
|
3
|
+
import type { GridRowExpansion } from "../DataGrid";
|
|
4
|
+
import type { DataViewsCopy } from "./data-views-copy";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A detail that opens UNDER a table row — a sub-table, say — behind a chevron
|
|
8
|
+
* in its own leading column.
|
|
9
|
+
*
|
|
10
|
+
* TABLE layout only. The cards, the list and the board draw no chevron: each is
|
|
11
|
+
* an entity-rendered surface with its own way of showing more, and a second
|
|
12
|
+
* disclosure beside that one would compete with it.
|
|
13
|
+
*/
|
|
14
|
+
export interface DataViewRowDetail<T> {
|
|
15
|
+
/** The detail for one row. Rendered only while that row is expanded. */
|
|
16
|
+
render: (row: T) => React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Which rows HAVE a detail. Omitted, every row does. A refused row keeps an
|
|
19
|
+
* empty chevron cell, so the columns stay aligned, but offers nothing to open.
|
|
20
|
+
*/
|
|
21
|
+
isExpandable?: (row: T) => boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The DataGrid `expansion` a `rowDetail` becomes. The chevron speaks the SAME
|
|
26
|
+
* words the list card's disclosure does, so the two layouts name the one
|
|
27
|
+
* gesture identically in every locale.
|
|
28
|
+
*/
|
|
29
|
+
export function toGridExpansion<T extends Record<string, unknown>>(
|
|
30
|
+
rowDetail: DataViewRowDetail<T> | undefined,
|
|
31
|
+
copy: DataViewsCopy,
|
|
32
|
+
): GridRowExpansion<T> | undefined {
|
|
33
|
+
if (!rowDetail) return undefined;
|
|
34
|
+
return {
|
|
35
|
+
render: (row) => rowDetail.render(row),
|
|
36
|
+
isRowExpandable: rowDetail.isExpandable,
|
|
37
|
+
expandLabel: copy.selection.expandRow,
|
|
38
|
+
collapseLabel: copy.selection.collapseRow,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -200,9 +200,35 @@ const switchBaseSx = (
|
|
|
200
200
|
color: checkedInk(flags, palette),
|
|
201
201
|
'& .MuiSwitch-thumb': {
|
|
202
202
|
animation: flags.loading ? 'none' : `${bounceAnimation} ${seconds(SWITCH_TRANSITION.ms)} ease-out`,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
/*
|
|
204
|
+
GLASS KEEPS ITS WASH AND GAINS AN OUTLINE (FUT-2067).
|
|
205
|
+
|
|
206
|
+
It used to keep the wash and nothing else, on the argument that a
|
|
207
|
+
translucent thumb MEANS to show the track through itself, so painting
|
|
208
|
+
it opaque would be repainting the variant rather than fixing it. The
|
|
209
|
+
first half of that is still true and this still does not touch the
|
|
210
|
+
fill. The second half was doing more work than the number supports:
|
|
211
|
+
`SWITCH_GLASS.thumbAlpha` is **0.9**, so nine parts in ten of the knob
|
|
212
|
+
are `background.paper` and one part is the track. On a pale brand that
|
|
213
|
+
composites to within about 1.1:1 of the bar it is sitting on — the
|
|
214
|
+
same "reads as OFF while it is on" state FUT-1924 exists for, in the
|
|
215
|
+
one variant whose own argument points AT the tenant-controlled
|
|
216
|
+
surface.
|
|
217
|
+
|
|
218
|
+
So the separation moves to the EDGE, which is the thing a glass
|
|
219
|
+
surface is allowed to have. The colour is {@link checkedInk} — the
|
|
220
|
+
same derivation the opaque thumb gets, so there is one rule for "what
|
|
221
|
+
reads on this track" rather than two — at full strength rather than
|
|
222
|
+
the `divider` hairline at `borderAlpha` 0.2 the resting thumb wears,
|
|
223
|
+
which on a pale track is not an outline at all.
|
|
224
|
+
|
|
225
|
+
Checked only. The resting track is `action.disabled` washed over the
|
|
226
|
+
page, which no tenant chooses, so the quiet hairline stays right
|
|
227
|
+
there — the same split {@link checkedInk}'s own docblock makes.
|
|
228
|
+
*/
|
|
229
|
+
...(flags.glass
|
|
230
|
+
? { borderColor: checkedInk(flags, palette) }
|
|
231
|
+
: { backgroundColor: checkedInk(flags, palette) }),
|
|
206
232
|
},
|
|
207
233
|
'& + .MuiSwitch-track': checkedTrack(flags, palette),
|
|
208
234
|
'&.Mui-disabled + .MuiSwitch-track': { opacity: DISABLED.checkedTrackOpacity },
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PRODUCT'S TWO INKS, AND THE TWO RULES FOR CHOOSING BETWEEN THEM.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `theme.ts` when that file reached the 400-line cap, and the seam
|
|
5
|
+
* is a real one rather than a place the knife happened to land: everything here
|
|
6
|
+
* answers one question — given a surface, which of the two inks goes on it —
|
|
7
|
+
* and nothing here builds a palette. `theme.ts` keeps the tables and the
|
|
8
|
+
* factories and imports the answers.
|
|
9
|
+
*
|
|
10
|
+
* Both functions stay exported from `theme.ts` as well, because both were
|
|
11
|
+
* published from there and a caller should not have to learn about this file.
|
|
12
|
+
*/
|
|
13
|
+
import { getContrastRatio } from './color';
|
|
14
|
+
|
|
15
|
+
/** MUI's `createPalette` contrast defaults, exactly. */
|
|
16
|
+
export const CONTRAST_THRESHOLD = 3;
|
|
17
|
+
export const DARK_TEXT_PRIMARY = 'rgba(0, 0, 0, 0.87)';
|
|
18
|
+
export const LIGHT_TEXT_PRIMARY = '#fff';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* MUI's `getContrastText`: white where white reads at 3:1 on the colour, the
|
|
22
|
+
* light mode's dark ink otherwise. (MUI's source spells the white as the DARK
|
|
23
|
+
* palette's `text.primary`, which is what made it easy to read backwards.)
|
|
24
|
+
*/
|
|
25
|
+
export function contrastText(background: string): string {
|
|
26
|
+
return getContrastRatio(background, LIGHT_TEXT_PRIMARY) >= CONTRAST_THRESHOLD
|
|
27
|
+
? LIGHT_TEXT_PRIMARY
|
|
28
|
+
: DARK_TEXT_PRIMARY;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The ink that reads on EVERY one of these fills (FUT-1924).
|
|
33
|
+
*
|
|
34
|
+
* {@link contrastText} answers for one fill, which is all MUI's `augmentColor`
|
|
35
|
+
* ever needs: a solid button is a single flat colour. Two components paint the
|
|
36
|
+
* label over something that is not one colour — `Button`'s `gradient` variant
|
|
37
|
+
* runs between two stops, and `Switch`'s thumb travels the whole length of a
|
|
38
|
+
* checked track — and both of them stated `#fff` outright instead, which is
|
|
39
|
+
* white-on-pale the moment a white-labelled host hands the library a pale
|
|
40
|
+
* brand. Audited across the library, those two were the only places a hardcoded
|
|
41
|
+
* white sat over a surface the TENANT chooses.
|
|
42
|
+
*
|
|
43
|
+
* **This deliberately does not follow `contrastText`'s rule.** MUI's is a
|
|
44
|
+
* threshold that PREFERS white — white wherever white clears 3:1 — which is a
|
|
45
|
+
* brand-feel decision, and it is kept for every existing caller so nothing
|
|
46
|
+
* already legible moves. Here the fills can disagree: over MUI's own success
|
|
47
|
+
* pair white is 2.78:1 on `#4caf50` and dark ink 2.66:1 on `#1b5e20`, so
|
|
48
|
+
* neither meets any threshold and asking whether one does is the wrong
|
|
49
|
+
* question. The answer is whichever ink has the better WORST case across the
|
|
50
|
+
* fills — which is also not what either fill says on its own, since
|
|
51
|
+
* `contrastText('#4caf50')` is dark ink.
|
|
52
|
+
*
|
|
53
|
+
* A gradient wide enough that neither ink clears 4.5:1 anywhere is a palette
|
|
54
|
+
* problem this cannot fix — it returns the less bad ink and does not pretend
|
|
55
|
+
* otherwise.
|
|
56
|
+
*
|
|
57
|
+
* **It no longer takes the better ink for free (FUT-2066).** "Better worst
|
|
58
|
+
* case" decides WHICH ink wins; {@link INK_CHANGE_MARGIN} decides whether the
|
|
59
|
+
* win is big enough to repaint a brand over. The two rows that moved when this
|
|
60
|
+
* function landed were `warning` — 2.16:1 white on an orange, the defect — and
|
|
61
|
+
* `danger`, bought for a quarter of a point. Only the first survives the
|
|
62
|
+
* margin, which is the whole point: one of them was a fix and the other was
|
|
63
|
+
* churn, and nothing in the old rule could tell them apart.
|
|
64
|
+
*
|
|
65
|
+
* `Math.min` is the claim, and it is worth knowing that no test can prove it
|
|
66
|
+
* against `Math.max` today: the two candidate inks sit at opposite ends of the
|
|
67
|
+
* luminance range, so ranking them by their best fill and by their worst gives
|
|
68
|
+
* the same winner for every possible pair (checked exhaustively). Worst case is
|
|
69
|
+
* still what this MEANS, and the moment a third ink or one that is not an
|
|
70
|
+
* extreme is offered, the two stop agreeing.
|
|
71
|
+
*
|
|
72
|
+
* `incumbent` is the palette's own `contrastText` for this role — what both
|
|
73
|
+
* call sites already passed, under the name `fallback`. It is still returned
|
|
74
|
+
* when a fill cannot be decomposed ({@link getContrastRatio} throws on a format
|
|
75
|
+
* it does not know, and a throw inside an emotion style function takes the
|
|
76
|
+
* render down with it), so nothing about that path changed; it has simply
|
|
77
|
+
* stopped being only a last resort.
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* HOW MUCH BETTER THE OTHER INK HAS TO BE BEFORE A BRAND IS REPAINTED (FUT-2066).
|
|
81
|
+
*
|
|
82
|
+
* Half a contrast point. The rule this guards is "take the better worst case",
|
|
83
|
+
* and on MUI's own stock palette that rule repainted `danger`'s gradient button
|
|
84
|
+
* from white-on-red to black-on-red for **0.25 of a point** — 3.49 against 3.74,
|
|
85
|
+
* with neither ink clearing AA either way. A rule that churns a brand for a
|
|
86
|
+
* rounding difference will churn it again on the next palette tweak, and the
|
|
87
|
+
* consumer who has to explain why their destructive button changed colour has
|
|
88
|
+
* no better answer than "it rounded the other way".
|
|
89
|
+
*
|
|
90
|
+
* The number sits in a wide measured band rather than on a cliff. Walking the
|
|
91
|
+
* five gradient pairs `Button.styles.ts` paints, the only two gaps that exist
|
|
92
|
+
* are `danger`'s **0.25** — the churn — and `warning`'s **3.38**, white at
|
|
93
|
+
* 2.16:1 on an orange against dark ink at 5.54:1, which is the defect FUT-1924
|
|
94
|
+
* exists for. Anything in `[0.3, 3.38]` separates them; 0.5 is the round number
|
|
95
|
+
* nearest the bottom of that band, so the next palette move has to be
|
|
96
|
+
* substantially larger than a rounding difference before this fires.
|
|
97
|
+
*
|
|
98
|
+
* FUT-2066 recorded this as undecidable, on a measurement that turns out to be
|
|
99
|
+
* wrong: it reports the incumbent for `success` as DARK ink and concludes that
|
|
100
|
+
* a margin would hold it at 2.66 where the current rule gets 2.78. The gradient
|
|
101
|
+
* runs `success.light → success.dark`, but `contrastText` answers for
|
|
102
|
+
* `success.MAIN` — `#2e7d32`, not the `#4caf50` the table names — and white on
|
|
103
|
+
* `#2e7d32` is 5.7:1, so the incumbent is white and a margin leaves that row
|
|
104
|
+
* exactly where it is. With that row corrected the objection goes away and the
|
|
105
|
+
* shape the ticket proposed is simply right.
|
|
106
|
+
*/
|
|
107
|
+
const INK_CHANGE_MARGIN = 0.5;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The contrast below which the incumbent is not worth keeping at any margin.
|
|
111
|
+
*
|
|
112
|
+
* MUI's own `contrastThreshold`, and the same number for the same reason: below
|
|
113
|
+
* 3:1 an ink is not a brand decision, it is text nobody can read. `warning` is
|
|
114
|
+
* caught by this AND by {@link INK_CHANGE_MARGIN} — white sits at 2.16:1 on
|
|
115
|
+
* that orange — which is deliberate: the one row that has to move should not
|
|
116
|
+
* depend on which clause fires.
|
|
117
|
+
*/
|
|
118
|
+
const INK_CHANGE_FLOOR = CONTRAST_THRESHOLD;
|
|
119
|
+
|
|
120
|
+
export function inkOver(fills: readonly string[], incumbent: string): string {
|
|
121
|
+
try {
|
|
122
|
+
const worstCase = (ink: string): number =>
|
|
123
|
+
Math.min(...fills.map((fill) => getContrastRatio(ink, fill)));
|
|
124
|
+
|
|
125
|
+
const better =
|
|
126
|
+
worstCase(LIGHT_TEXT_PRIMARY) >= worstCase(DARK_TEXT_PRIMARY)
|
|
127
|
+
? LIGHT_TEXT_PRIMARY
|
|
128
|
+
: DARK_TEXT_PRIMARY;
|
|
129
|
+
|
|
130
|
+
// The incumbent is the palette's OWN answer for this role, which is what
|
|
131
|
+
// makes "keep it unless the gain is material" a statement about churn
|
|
132
|
+
// rather than about arithmetic. It arrives as the same argument that used
|
|
133
|
+
// to be the parse-failure fallback, because it always was `contrastText`
|
|
134
|
+
// at both call sites — the parameter has stopped being a last resort and
|
|
135
|
+
// started being the thing being defended.
|
|
136
|
+
const held = worstCase(incumbent);
|
|
137
|
+
const gain = worstCase(better) - held;
|
|
138
|
+
return gain >= INK_CHANGE_MARGIN || held < INK_CHANGE_FLOOR ? better : incumbent;
|
|
139
|
+
} catch {
|
|
140
|
+
return incumbent;
|
|
141
|
+
}
|
|
142
|
+
}
|