@12-apps/ui 6.48.0 → 6.49.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/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +8 -6
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +6 -4
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +7 -5
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +7 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.js +10 -8
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +6 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +6 -4
- package/dist/_internal/components/data-display/Chart/Chart.js +10 -8
- package/dist/_internal/components/data-display/Chart/SpecChart.js +14 -12
- package/dist/_internal/components/data-display/Chart/chart-context.js +7 -5
- package/dist/_internal/components/data-display/Chart/chart-internals.js +6 -4
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +9 -7
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +7 -5
- package/dist/_internal/components/data-display/DataGrid/DataGrid.model.js +5 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +48 -46
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +60 -58
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +4 -4
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +5 -5
- package/dist/_internal/components/data-display/DataViews/base-card.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +9 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +8 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +11 -9
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +11 -9
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +7 -5
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +3 -3
- 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 +15 -13
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +44 -42
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +6 -4
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +7 -5
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +18 -16
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +17 -15
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +3 -3
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +7 -5
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +10 -10
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +5 -5
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +17 -15
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +4 -4
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
- 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/MapMarkers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +4 -4
- package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +5 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +9 -7
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +6 -4
- package/dist/_internal/components/data-display/StatCard/StatCard.js +3 -3
- package/dist/_internal/components/data-display/Table/Table.js +7 -5
- package/dist/_internal/components/data-display/index.js +68 -66
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +3 -3
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +3 -3
- package/dist/_internal/components/feedback/index.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +2 -2
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +3 -3
- package/dist/_internal/components/form/Button/Button.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.hooks.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.js +6 -6
- package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
- package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +4 -4
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- package/dist/_internal/components/form/Command/Command.js +7 -5
- package/dist/_internal/components/form/Command/Command.styles.js +6 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
- package/dist/_internal/components/form/Label/Label.js +7 -5
- package/dist/_internal/components/form/Label/Label.styles.js +6 -4
- package/dist/_internal/components/form/Menubar/Menubar.item.js +7 -5
- package/dist/_internal/components/form/Menubar/Menubar.js +10 -8
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +6 -4
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +8 -6
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/Switch/Switch.js +2 -2
- package/dist/_internal/components/form/index.js +37 -35
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/index.js +8 -8
- package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
- package/dist/_internal/components/index.js +142 -140
- package/dist/_internal/components/layout/Box/Box.js +8 -6
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +3 -3
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +12 -10
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +11 -9
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +12 -10
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +17 -15
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +15 -13
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +17 -15
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +9 -7
- package/dist/_internal/components/layout/index.js +36 -34
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +12 -10
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +6 -4
- 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/SectionNav/SectionNav.bar.js +12 -10
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +14 -12
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +9 -7
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +10 -8
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +10 -8
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +10 -8
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +5 -3
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js.map +1 -1
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/index.js +31 -29
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +5 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +5 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +5 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +5 -3
- package/dist/_internal/components/utility/index.js +5 -3
- package/dist/_internal/icons/Icon.js +8 -6
- package/dist/_internal/provider/UiProvider.js +7 -5
- package/dist/_internal/provider/mui-bridge.js +6 -4
- package/dist/_internal/provider/use-ui-theme.js +7 -5
- package/dist/_internal/social-login-button/social-login-button.js +3 -3
- package/dist/_internal/tokens/density-overrides.js +20 -4
- package/dist/_internal/tokens/density-overrides.navigation.js +19 -0
- package/dist/_internal/tokens/density-overrides.navigation.js.map +1 -0
- package/dist/_internal/tokens/density-overrides.selection.js +11 -0
- package/dist/_internal/tokens/density-overrides.selection.js.map +1 -0
- package/dist/_internal/tokens/density.js +4 -2
- package/dist/_internal/user-avatar/user-avatar.js +7 -7
- package/dist/charts.js +22 -20
- package/dist/{chunk-ODFJTEIL.js → chunk-23YZEAUU.js} +4 -4
- package/dist/{chunk-OBID7SOG.js → chunk-2GAFEQ2T.js} +3 -3
- package/dist/{chunk-BIDPJNCG.js → chunk-2LQU7DRI.js} +25 -9
- package/dist/chunk-2LQU7DRI.js.map +1 -0
- package/dist/{chunk-NRSVI23L.js → chunk-2T7L6ZWF.js} +2 -2
- package/dist/{chunk-TMOC2XUE.js → chunk-2UPWKLHQ.js} +21 -5
- package/dist/chunk-2UPWKLHQ.js.map +1 -0
- package/dist/{chunk-2YKTB2IZ.js → chunk-32JMSHEA.js} +2 -2
- package/dist/{chunk-QFJ3JXXP.js → chunk-3IPPMWUA.js} +1 -1
- package/dist/{chunk-QFJ3JXXP.js.map → chunk-3IPPMWUA.js.map} +1 -1
- package/dist/{chunk-2NYVMLFQ.js → chunk-3YRPEZ3F.js} +2 -2
- package/dist/{chunk-CGL7R37P.js → chunk-43Q6CVPB.js} +4 -4
- package/dist/{chunk-G6II7SVX.js → chunk-44USLRMT.js} +4 -4
- package/dist/{chunk-E4GTZ26X.js → chunk-4CDZP6KD.js} +2 -2
- package/dist/{chunk-5D52CMNX.js → chunk-4ELI2MM3.js} +2 -52
- package/dist/chunk-4ELI2MM3.js.map +1 -0
- package/dist/{chunk-HISEWACT.js → chunk-4GRUNQNB.js} +2 -2
- package/dist/{chunk-AOKLEE64.js → chunk-4NDNV45Y.js} +2 -2
- package/dist/{chunk-LTJDZIYR.js → chunk-4O7X45T5.js} +7 -7
- package/dist/{chunk-H5XKBPKK.js → chunk-4UQY2DUN.js} +3 -3
- package/dist/{chunk-43UFSKEK.js → chunk-4WCYKU3S.js} +3 -3
- package/dist/{chunk-JAHWFJCW.js → chunk-5JCGBCFJ.js} +5 -5
- package/dist/{chunk-UJOFRJLX.js → chunk-5MW7OYBM.js} +2 -2
- package/dist/{chunk-4A7PSQB5.js → chunk-6EPXOVY3.js} +4 -4
- package/dist/{chunk-AQC67NQZ.js → chunk-6EXGL36F.js} +2 -2
- package/dist/{chunk-CMLIWUBW.js → chunk-6PPHALM3.js} +4 -4
- package/dist/{chunk-WHYVVKRS.js → chunk-6SI22JFV.js} +2 -2
- package/dist/{chunk-RZPYKTOG.js → chunk-6SM5ML75.js} +5 -5
- package/dist/{chunk-THCDUP6Q.js → chunk-6SXXW5GR.js} +6 -6
- package/dist/{chunk-5OX6KZIZ.js → chunk-6TLY2E24.js} +4 -4
- package/dist/{chunk-SAJ5H5VC.js → chunk-7JTTE4OY.js} +4 -4
- package/dist/{chunk-AG3DY5TH.js → chunk-ADSA76T7.js} +2 -2
- package/dist/{chunk-25OI5W6Y.js → chunk-AH4XGLE2.js} +2 -2
- package/dist/{chunk-CACBJ4CR.js → chunk-AJAPP56P.js} +2 -2
- package/dist/{chunk-GMC3F43L.js → chunk-AMSNWV7V.js} +3 -3
- package/dist/{chunk-MWPXKZ7O.js → chunk-AY5MY7HJ.js} +6 -6
- package/dist/{chunk-2LSJTQIL.js → chunk-B22NXESR.js} +2 -2
- package/dist/{chunk-E32YPPF5.js → chunk-B4Y6W3OU.js} +2 -2
- package/dist/{chunk-2K2B5QM2.js → chunk-BEGTLELZ.js} +5 -5
- package/dist/{chunk-6J32H2RN.js → chunk-C7GYSLPO.js} +4 -3
- package/dist/{chunk-6J32H2RN.js.map → chunk-C7GYSLPO.js.map} +1 -1
- package/dist/{chunk-33NBMNTB.js → chunk-CF25EQFU.js} +2 -2
- package/dist/{chunk-WDAEYLT5.js → chunk-D6ROYZ6H.js} +2 -2
- package/dist/{chunk-ZVJSY2OV.js → chunk-EF5XUS44.js} +4 -4
- package/dist/{chunk-6PU3JYVY.js → chunk-F3AYISXT.js} +4 -4
- package/dist/{chunk-ST36ZSAN.js → chunk-FRIUYEXD.js} +2 -2
- package/dist/{chunk-K6LNHHSH.js → chunk-GC5XJ7YB.js} +4 -4
- package/dist/{chunk-JYLOCXMV.js → chunk-GI63FQEJ.js} +4 -4
- package/dist/{chunk-FVKBP3UX.js → chunk-GLKQT2DS.js} +2 -2
- package/dist/{chunk-MEYKNJNI.js → chunk-GT6HPOS2.js} +8 -8
- package/dist/{chunk-XFAXRMWY.js → chunk-GUAK7QUR.js} +4 -4
- package/dist/{chunk-JUKA4NY5.js → chunk-GWONO2ML.js} +6 -6
- package/dist/{chunk-YRACC6BB.js → chunk-GWVJZ7SX.js} +4 -4
- package/dist/{chunk-5NFQKL7C.js → chunk-H6K3AP42.js} +6 -6
- package/dist/{chunk-VOG5IVQW.js → chunk-H6N7XXUB.js} +2 -2
- package/dist/{chunk-PP7CDKO4.js → chunk-HCBGCR4N.js} +3 -3
- package/dist/{chunk-5OEC546C.js → chunk-HDI37JLT.js} +2 -2
- package/dist/{chunk-LHTEAPYG.js → chunk-HDQMSZA7.js} +3 -3
- package/dist/{chunk-VU63PDWW.js → chunk-HOXWNOQV.js} +3 -3
- package/dist/{chunk-KESGVMHW.js → chunk-HUGXO5PE.js} +3 -3
- package/dist/{chunk-3CDU7DLD.js → chunk-IKXS2YVQ.js} +2 -2
- package/dist/{chunk-BU6TCB76.js → chunk-INCTNS4X.js} +2 -2
- package/dist/{chunk-FS7UVKEE.js → chunk-IR5A2BKL.js} +4 -4
- package/dist/{chunk-2ZRZTGWP.js → chunk-ISW5K72V.js} +5 -5
- package/dist/{chunk-VZ4VAQX3.js → chunk-IVJKILIX.js} +2 -2
- package/dist/{chunk-NRI2TZDS.js → chunk-JNX4B3EE.js} +2 -2
- package/dist/{chunk-JWJ77IMK.js → chunk-JRV3UFOJ.js} +8 -8
- package/dist/{chunk-ZRIWMIHK.js → chunk-JVOV5WAJ.js} +6 -6
- package/dist/chunk-K3YHXOWZ.js +126 -0
- package/dist/chunk-K3YHXOWZ.js.map +1 -0
- package/dist/{chunk-HR7YTBR7.js → chunk-K4N3V7YE.js} +4 -4
- package/dist/{chunk-WU2KXA6I.js → chunk-KC733FDV.js} +3 -3
- package/dist/{chunk-ZCXVTFYQ.js → chunk-KG64HV34.js} +2 -2
- package/dist/{chunk-LB27LKG3.js → chunk-KUNHGNGF.js} +4 -4
- package/dist/{chunk-FQT4C5R4.js → chunk-KWIR73YH.js} +12 -12
- package/dist/{chunk-IKZSQKOE.js → chunk-LFHAYETO.js} +3 -3
- package/dist/{chunk-NM2FLCPV.js → chunk-LO4M5D7T.js} +3 -3
- package/dist/{chunk-CGBUWNNQ.js → chunk-LWFJZ3Q5.js} +4 -4
- package/dist/{chunk-OCQ6GDCF.js → chunk-MH3XW3WR.js} +2 -2
- package/dist/{chunk-3WAAL3KN.js → chunk-MT2OCLGT.js} +7 -7
- package/dist/{chunk-QJK7BNH3.js → chunk-N7KUKE45.js} +3 -3
- package/dist/{chunk-WAD5VL6B.js → chunk-NBFP645M.js} +7 -7
- package/dist/{chunk-TTJTMDLI.js → chunk-NF42BHI5.js} +2 -2
- package/dist/{chunk-6MN5KOVM.js → chunk-NHMFBUBK.js} +2 -2
- package/dist/{chunk-N4HHFYPB.js → chunk-NND4UTWS.js} +2 -2
- package/dist/{chunk-EMEXXAQI.js → chunk-NYFGFELX.js} +7 -7
- package/dist/{chunk-Q2LQVYXY.js → chunk-OL2BEJZR.js} +2 -2
- package/dist/{chunk-KTX7XME6.js → chunk-PAICZOL5.js} +4 -4
- package/dist/{chunk-AJ4MRDKM.js → chunk-PAK25GQC.js} +4 -4
- package/dist/{chunk-KYQ4OORF.js → chunk-PJNA6STF.js} +6 -6
- package/dist/{chunk-BPOVRMVS.js → chunk-Q4PS47EB.js} +8 -8
- package/dist/{chunk-YXU45AVO.js → chunk-QBJBKXF4.js} +10 -10
- package/dist/{chunk-EKWH4LGM.js → chunk-QEHEYVOL.js} +2 -2
- package/dist/{chunk-XNTDEQEB.js → chunk-QMA7TNZJ.js} +4 -4
- package/dist/{chunk-P2OQ4IGP.js → chunk-QTMXGMM7.js} +2 -2
- package/dist/{chunk-NQ7NMCRI.js → chunk-QTN7G5T2.js} +2 -2
- package/dist/{chunk-DSDNGTH6.js → chunk-R4XZTIZG.js} +7 -7
- package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
- package/dist/{chunk-F56VOHFW.js → chunk-RJTVUM5E.js} +2 -2
- package/dist/{chunk-KN7C6R6L.js → chunk-ROG7LMPK.js} +20 -20
- package/dist/{chunk-J44PPGBF.js → chunk-RX7J6VRI.js} +2 -2
- package/dist/{chunk-FIF4RQ4S.js → chunk-RXLD5XS2.js} +3 -3
- package/dist/{chunk-I2STNAIQ.js → chunk-RYWX6LK4.js} +2 -2
- package/dist/{chunk-HGRC635A.js → chunk-RZ4SBSLP.js} +2 -2
- package/dist/{chunk-S22XIXLL.js → chunk-SA2ERYVV.js} +5 -5
- package/dist/{chunk-6VKHS2BB.js → chunk-SDBNXZ2S.js} +2 -2
- package/dist/{chunk-KQS4ZJGS.js → chunk-SHAEK26Y.js} +4 -4
- package/dist/{chunk-PIUQYYOM.js → chunk-TBDAH7WC.js} +2 -2
- package/dist/{chunk-IHO2O44S.js → chunk-TE3XYCX7.js} +5 -5
- package/dist/{chunk-6DMUVVON.js → chunk-TJ7NQG7E.js} +4 -4
- package/dist/{chunk-Y6C4MYZE.js → chunk-TNQDSTIA.js} +7 -7
- package/dist/{chunk-UILH4OAZ.js → chunk-TOEBPWKG.js} +5 -5
- package/dist/{chunk-DWG5SEGW.js → chunk-TOMCXNAO.js} +2 -2
- package/dist/{chunk-YTIUFMRM.js → chunk-TU7ZXJX4.js} +3 -3
- package/dist/{chunk-P53KRCKW.js → chunk-TZASFX6G.js} +4 -4
- package/dist/{chunk-3CUWQXTG.js → chunk-UBUT2T5B.js} +2 -2
- package/dist/{chunk-ACU7LEFG.js → chunk-UDTA7YWD.js} +2 -2
- package/dist/{chunk-VYV3JOV5.js → chunk-UFGPKDF4.js} +2 -2
- package/dist/{chunk-WSYPM3SR.js → chunk-UI5O6J6R.js} +4 -4
- package/dist/{chunk-JQ6HDXKA.js → chunk-VFLNP2ZZ.js} +4 -4
- package/dist/{chunk-7PUSFB3T.js → chunk-W34CCOUM.js} +2 -2
- package/dist/{chunk-WDQRQIT7.js → chunk-WCVVM66J.js} +2 -2
- package/dist/{chunk-AEJ3FFNE.js → chunk-WQQON4RL.js} +5 -5
- package/dist/{chunk-H7DVH6KD.js → chunk-WT5SSBTU.js} +7 -7
- package/dist/{chunk-EWVJJ32N.js → chunk-WXAFPVMW.js} +5 -5
- package/dist/chunk-XK77FY42.js +59 -0
- package/dist/chunk-XK77FY42.js.map +1 -0
- package/dist/{chunk-6KLDYVRY.js → chunk-XKYOQOZK.js} +2 -2
- package/dist/{chunk-CKFZQQ6T.js → chunk-XNDMCT5G.js} +2 -2
- package/dist/{chunk-R53ZOW4B.js → chunk-XP522FFM.js} +3 -3
- package/dist/{chunk-WGNLG2W2.js → chunk-XRGJVS4P.js} +2 -2
- package/dist/{chunk-FPKVHR5L.js → chunk-XRUW7DMH.js} +2 -2
- package/dist/{chunk-IV7G7NK3.js → chunk-XZH22APJ.js} +4 -4
- package/dist/{chunk-ZL3GCUKC.js → chunk-ZAVMJL4S.js} +2 -2
- package/dist/{chunk-SV4FYSDL.js → chunk-ZDMQDTSH.js} +4 -4
- package/dist/{chunk-CKAVTWXP.js → chunk-ZGWEFOW6.js} +4 -4
- package/dist/{chunk-WC3W36AM.js → chunk-ZOUWHGV3.js} +4 -4
- package/dist/{chunk-4CBM7JNK.js → chunk-ZWIPJFUA.js} +4 -4
- package/dist/data-display/AsyncStateContainer.js +4 -4
- package/dist/data-display/Avatar.js +4 -4
- package/dist/data-display/Badge.js +8 -6
- package/dist/data-display/CardKit.js +6 -6
- package/dist/data-display/Carousel.js +10 -8
- package/dist/data-display/Chart.js +22 -20
- package/dist/data-display/DataGrid.js +7 -5
- package/dist/data-display/DataViews.js +76 -74
- package/dist/data-display/FleetMap.js +17 -15
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/Lightbox.js +6 -6
- package/dist/data-display/LoadingState.js +3 -3
- package/dist/data-display/MapPreview.js +4 -4
- package/dist/data-display/Progress.js +2 -2
- package/dist/data-display/Sheet.js +9 -7
- package/dist/data-display/StatCard.js +3 -3
- package/dist/data-display/Table.js +7 -5
- package/dist/feedback/ConfirmAction.js +3 -3
- package/dist/feedback/NotificationStatusNotice.js +3 -3
- package/dist/form/AddressAutocomplete.js +7 -7
- package/dist/form/Button.js +2 -2
- package/dist/form/Calendar.js +6 -6
- package/dist/form/CategorySelect.js +4 -4
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/Command.js +7 -5
- package/dist/form/DateRangePicker.js +7 -7
- package/dist/form/Label.js +7 -5
- package/dist/form/Menubar.js +10 -8
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/Switch.js +2 -2
- package/dist/form/total-form.js +14 -14
- package/dist/icons.js +8 -6
- package/dist/layout/Box.js +8 -6
- package/dist/layout/ContentToolbar.js +9 -9
- package/dist/layout/ScrollArea.js +3 -3
- package/dist/layout/SettingCard.js +22 -20
- package/dist/layout/SettingsLayout.js +4 -4
- package/dist/layout/Skeleton.js +2 -2
- package/dist/layout/Stack.js +9 -7
- package/dist/navigation/AppHeader.js +15 -13
- package/dist/navigation/NavigationMenu.js +5 -5
- package/dist/navigation/SectionNav.js +14 -12
- package/dist/navigation/Tabs.js +2 -2
- package/dist/provider.js +8 -6
- package/dist/social-login-button.js +3 -3
- package/dist/tokens.js +21 -5
- package/dist/types/provider/mui-bridge.d.ts.map +1 -1
- package/dist/types/tokens/density-overrides.d.ts +2 -14
- package/dist/types/tokens/density-overrides.d.ts.map +1 -1
- package/dist/types/tokens/density-overrides.navigation.d.ts +17 -0
- package/dist/types/tokens/density-overrides.navigation.d.ts.map +1 -0
- package/dist/types/tokens/density-overrides.selection.d.ts +16 -0
- package/dist/types/tokens/density-overrides.selection.d.ts.map +1 -0
- package/dist/types/tokens/density.d.ts +18 -11
- package/dist/types/tokens/density.d.ts.map +1 -1
- package/dist/types/tokens/scales.d.ts +1 -1
- package/dist/types/tokens/scales.d.ts.map +1 -1
- package/dist/user-avatar.js +7 -7
- package/dist/utility/WorkflowStep.js +5 -3
- package/package.json +1 -1
- package/src/components/data-display/LazyImage/LazyImage.md +38 -9
- package/src/components/data-display/LazyImage/LazyImage.tsx +6 -6
- package/src/provider/mui-bridge.ts +15 -3
- package/src/tokens/density-overrides.navigation.ts +226 -0
- package/src/tokens/density-overrides.selection.ts +210 -0
- package/src/tokens/density-overrides.ts +15 -208
- package/src/tokens/density.ts +30 -11
- package/src/tokens/scales.ts +10 -3
- package/dist/chunk-5D52CMNX.js.map +0 -1
- package/dist/chunk-BIDPJNCG.js.map +0 -1
- package/dist/chunk-TMOC2XUE.js.map +0 -1
- /package/dist/{chunk-ODFJTEIL.js.map → chunk-23YZEAUU.js.map} +0 -0
- /package/dist/{chunk-OBID7SOG.js.map → chunk-2GAFEQ2T.js.map} +0 -0
- /package/dist/{chunk-NRSVI23L.js.map → chunk-2T7L6ZWF.js.map} +0 -0
- /package/dist/{chunk-2YKTB2IZ.js.map → chunk-32JMSHEA.js.map} +0 -0
- /package/dist/{chunk-2NYVMLFQ.js.map → chunk-3YRPEZ3F.js.map} +0 -0
- /package/dist/{chunk-CGL7R37P.js.map → chunk-43Q6CVPB.js.map} +0 -0
- /package/dist/{chunk-G6II7SVX.js.map → chunk-44USLRMT.js.map} +0 -0
- /package/dist/{chunk-E4GTZ26X.js.map → chunk-4CDZP6KD.js.map} +0 -0
- /package/dist/{chunk-HISEWACT.js.map → chunk-4GRUNQNB.js.map} +0 -0
- /package/dist/{chunk-AOKLEE64.js.map → chunk-4NDNV45Y.js.map} +0 -0
- /package/dist/{chunk-LTJDZIYR.js.map → chunk-4O7X45T5.js.map} +0 -0
- /package/dist/{chunk-H5XKBPKK.js.map → chunk-4UQY2DUN.js.map} +0 -0
- /package/dist/{chunk-43UFSKEK.js.map → chunk-4WCYKU3S.js.map} +0 -0
- /package/dist/{chunk-JAHWFJCW.js.map → chunk-5JCGBCFJ.js.map} +0 -0
- /package/dist/{chunk-UJOFRJLX.js.map → chunk-5MW7OYBM.js.map} +0 -0
- /package/dist/{chunk-4A7PSQB5.js.map → chunk-6EPXOVY3.js.map} +0 -0
- /package/dist/{chunk-AQC67NQZ.js.map → chunk-6EXGL36F.js.map} +0 -0
- /package/dist/{chunk-CMLIWUBW.js.map → chunk-6PPHALM3.js.map} +0 -0
- /package/dist/{chunk-WHYVVKRS.js.map → chunk-6SI22JFV.js.map} +0 -0
- /package/dist/{chunk-RZPYKTOG.js.map → chunk-6SM5ML75.js.map} +0 -0
- /package/dist/{chunk-THCDUP6Q.js.map → chunk-6SXXW5GR.js.map} +0 -0
- /package/dist/{chunk-5OX6KZIZ.js.map → chunk-6TLY2E24.js.map} +0 -0
- /package/dist/{chunk-SAJ5H5VC.js.map → chunk-7JTTE4OY.js.map} +0 -0
- /package/dist/{chunk-AG3DY5TH.js.map → chunk-ADSA76T7.js.map} +0 -0
- /package/dist/{chunk-25OI5W6Y.js.map → chunk-AH4XGLE2.js.map} +0 -0
- /package/dist/{chunk-CACBJ4CR.js.map → chunk-AJAPP56P.js.map} +0 -0
- /package/dist/{chunk-GMC3F43L.js.map → chunk-AMSNWV7V.js.map} +0 -0
- /package/dist/{chunk-MWPXKZ7O.js.map → chunk-AY5MY7HJ.js.map} +0 -0
- /package/dist/{chunk-2LSJTQIL.js.map → chunk-B22NXESR.js.map} +0 -0
- /package/dist/{chunk-E32YPPF5.js.map → chunk-B4Y6W3OU.js.map} +0 -0
- /package/dist/{chunk-2K2B5QM2.js.map → chunk-BEGTLELZ.js.map} +0 -0
- /package/dist/{chunk-33NBMNTB.js.map → chunk-CF25EQFU.js.map} +0 -0
- /package/dist/{chunk-WDAEYLT5.js.map → chunk-D6ROYZ6H.js.map} +0 -0
- /package/dist/{chunk-ZVJSY2OV.js.map → chunk-EF5XUS44.js.map} +0 -0
- /package/dist/{chunk-6PU3JYVY.js.map → chunk-F3AYISXT.js.map} +0 -0
- /package/dist/{chunk-ST36ZSAN.js.map → chunk-FRIUYEXD.js.map} +0 -0
- /package/dist/{chunk-K6LNHHSH.js.map → chunk-GC5XJ7YB.js.map} +0 -0
- /package/dist/{chunk-JYLOCXMV.js.map → chunk-GI63FQEJ.js.map} +0 -0
- /package/dist/{chunk-FVKBP3UX.js.map → chunk-GLKQT2DS.js.map} +0 -0
- /package/dist/{chunk-MEYKNJNI.js.map → chunk-GT6HPOS2.js.map} +0 -0
- /package/dist/{chunk-XFAXRMWY.js.map → chunk-GUAK7QUR.js.map} +0 -0
- /package/dist/{chunk-JUKA4NY5.js.map → chunk-GWONO2ML.js.map} +0 -0
- /package/dist/{chunk-YRACC6BB.js.map → chunk-GWVJZ7SX.js.map} +0 -0
- /package/dist/{chunk-5NFQKL7C.js.map → chunk-H6K3AP42.js.map} +0 -0
- /package/dist/{chunk-VOG5IVQW.js.map → chunk-H6N7XXUB.js.map} +0 -0
- /package/dist/{chunk-PP7CDKO4.js.map → chunk-HCBGCR4N.js.map} +0 -0
- /package/dist/{chunk-5OEC546C.js.map → chunk-HDI37JLT.js.map} +0 -0
- /package/dist/{chunk-LHTEAPYG.js.map → chunk-HDQMSZA7.js.map} +0 -0
- /package/dist/{chunk-VU63PDWW.js.map → chunk-HOXWNOQV.js.map} +0 -0
- /package/dist/{chunk-KESGVMHW.js.map → chunk-HUGXO5PE.js.map} +0 -0
- /package/dist/{chunk-3CDU7DLD.js.map → chunk-IKXS2YVQ.js.map} +0 -0
- /package/dist/{chunk-BU6TCB76.js.map → chunk-INCTNS4X.js.map} +0 -0
- /package/dist/{chunk-FS7UVKEE.js.map → chunk-IR5A2BKL.js.map} +0 -0
- /package/dist/{chunk-2ZRZTGWP.js.map → chunk-ISW5K72V.js.map} +0 -0
- /package/dist/{chunk-VZ4VAQX3.js.map → chunk-IVJKILIX.js.map} +0 -0
- /package/dist/{chunk-NRI2TZDS.js.map → chunk-JNX4B3EE.js.map} +0 -0
- /package/dist/{chunk-JWJ77IMK.js.map → chunk-JRV3UFOJ.js.map} +0 -0
- /package/dist/{chunk-ZRIWMIHK.js.map → chunk-JVOV5WAJ.js.map} +0 -0
- /package/dist/{chunk-HR7YTBR7.js.map → chunk-K4N3V7YE.js.map} +0 -0
- /package/dist/{chunk-WU2KXA6I.js.map → chunk-KC733FDV.js.map} +0 -0
- /package/dist/{chunk-ZCXVTFYQ.js.map → chunk-KG64HV34.js.map} +0 -0
- /package/dist/{chunk-LB27LKG3.js.map → chunk-KUNHGNGF.js.map} +0 -0
- /package/dist/{chunk-FQT4C5R4.js.map → chunk-KWIR73YH.js.map} +0 -0
- /package/dist/{chunk-IKZSQKOE.js.map → chunk-LFHAYETO.js.map} +0 -0
- /package/dist/{chunk-NM2FLCPV.js.map → chunk-LO4M5D7T.js.map} +0 -0
- /package/dist/{chunk-CGBUWNNQ.js.map → chunk-LWFJZ3Q5.js.map} +0 -0
- /package/dist/{chunk-OCQ6GDCF.js.map → chunk-MH3XW3WR.js.map} +0 -0
- /package/dist/{chunk-3WAAL3KN.js.map → chunk-MT2OCLGT.js.map} +0 -0
- /package/dist/{chunk-QJK7BNH3.js.map → chunk-N7KUKE45.js.map} +0 -0
- /package/dist/{chunk-WAD5VL6B.js.map → chunk-NBFP645M.js.map} +0 -0
- /package/dist/{chunk-TTJTMDLI.js.map → chunk-NF42BHI5.js.map} +0 -0
- /package/dist/{chunk-6MN5KOVM.js.map → chunk-NHMFBUBK.js.map} +0 -0
- /package/dist/{chunk-N4HHFYPB.js.map → chunk-NND4UTWS.js.map} +0 -0
- /package/dist/{chunk-EMEXXAQI.js.map → chunk-NYFGFELX.js.map} +0 -0
- /package/dist/{chunk-Q2LQVYXY.js.map → chunk-OL2BEJZR.js.map} +0 -0
- /package/dist/{chunk-KTX7XME6.js.map → chunk-PAICZOL5.js.map} +0 -0
- /package/dist/{chunk-AJ4MRDKM.js.map → chunk-PAK25GQC.js.map} +0 -0
- /package/dist/{chunk-KYQ4OORF.js.map → chunk-PJNA6STF.js.map} +0 -0
- /package/dist/{chunk-BPOVRMVS.js.map → chunk-Q4PS47EB.js.map} +0 -0
- /package/dist/{chunk-YXU45AVO.js.map → chunk-QBJBKXF4.js.map} +0 -0
- /package/dist/{chunk-EKWH4LGM.js.map → chunk-QEHEYVOL.js.map} +0 -0
- /package/dist/{chunk-XNTDEQEB.js.map → chunk-QMA7TNZJ.js.map} +0 -0
- /package/dist/{chunk-P2OQ4IGP.js.map → chunk-QTMXGMM7.js.map} +0 -0
- /package/dist/{chunk-NQ7NMCRI.js.map → chunk-QTN7G5T2.js.map} +0 -0
- /package/dist/{chunk-DSDNGTH6.js.map → chunk-R4XZTIZG.js.map} +0 -0
- /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
- /package/dist/{chunk-F56VOHFW.js.map → chunk-RJTVUM5E.js.map} +0 -0
- /package/dist/{chunk-KN7C6R6L.js.map → chunk-ROG7LMPK.js.map} +0 -0
- /package/dist/{chunk-J44PPGBF.js.map → chunk-RX7J6VRI.js.map} +0 -0
- /package/dist/{chunk-FIF4RQ4S.js.map → chunk-RXLD5XS2.js.map} +0 -0
- /package/dist/{chunk-I2STNAIQ.js.map → chunk-RYWX6LK4.js.map} +0 -0
- /package/dist/{chunk-HGRC635A.js.map → chunk-RZ4SBSLP.js.map} +0 -0
- /package/dist/{chunk-S22XIXLL.js.map → chunk-SA2ERYVV.js.map} +0 -0
- /package/dist/{chunk-6VKHS2BB.js.map → chunk-SDBNXZ2S.js.map} +0 -0
- /package/dist/{chunk-KQS4ZJGS.js.map → chunk-SHAEK26Y.js.map} +0 -0
- /package/dist/{chunk-PIUQYYOM.js.map → chunk-TBDAH7WC.js.map} +0 -0
- /package/dist/{chunk-IHO2O44S.js.map → chunk-TE3XYCX7.js.map} +0 -0
- /package/dist/{chunk-6DMUVVON.js.map → chunk-TJ7NQG7E.js.map} +0 -0
- /package/dist/{chunk-Y6C4MYZE.js.map → chunk-TNQDSTIA.js.map} +0 -0
- /package/dist/{chunk-UILH4OAZ.js.map → chunk-TOEBPWKG.js.map} +0 -0
- /package/dist/{chunk-DWG5SEGW.js.map → chunk-TOMCXNAO.js.map} +0 -0
- /package/dist/{chunk-YTIUFMRM.js.map → chunk-TU7ZXJX4.js.map} +0 -0
- /package/dist/{chunk-P53KRCKW.js.map → chunk-TZASFX6G.js.map} +0 -0
- /package/dist/{chunk-3CUWQXTG.js.map → chunk-UBUT2T5B.js.map} +0 -0
- /package/dist/{chunk-ACU7LEFG.js.map → chunk-UDTA7YWD.js.map} +0 -0
- /package/dist/{chunk-VYV3JOV5.js.map → chunk-UFGPKDF4.js.map} +0 -0
- /package/dist/{chunk-WSYPM3SR.js.map → chunk-UI5O6J6R.js.map} +0 -0
- /package/dist/{chunk-JQ6HDXKA.js.map → chunk-VFLNP2ZZ.js.map} +0 -0
- /package/dist/{chunk-7PUSFB3T.js.map → chunk-W34CCOUM.js.map} +0 -0
- /package/dist/{chunk-WDQRQIT7.js.map → chunk-WCVVM66J.js.map} +0 -0
- /package/dist/{chunk-AEJ3FFNE.js.map → chunk-WQQON4RL.js.map} +0 -0
- /package/dist/{chunk-H7DVH6KD.js.map → chunk-WT5SSBTU.js.map} +0 -0
- /package/dist/{chunk-EWVJJ32N.js.map → chunk-WXAFPVMW.js.map} +0 -0
- /package/dist/{chunk-6KLDYVRY.js.map → chunk-XKYOQOZK.js.map} +0 -0
- /package/dist/{chunk-CKFZQQ6T.js.map → chunk-XNDMCT5G.js.map} +0 -0
- /package/dist/{chunk-R53ZOW4B.js.map → chunk-XP522FFM.js.map} +0 -0
- /package/dist/{chunk-WGNLG2W2.js.map → chunk-XRGJVS4P.js.map} +0 -0
- /package/dist/{chunk-FPKVHR5L.js.map → chunk-XRUW7DMH.js.map} +0 -0
- /package/dist/{chunk-IV7G7NK3.js.map → chunk-XZH22APJ.js.map} +0 -0
- /package/dist/{chunk-ZL3GCUKC.js.map → chunk-ZAVMJL4S.js.map} +0 -0
- /package/dist/{chunk-SV4FYSDL.js.map → chunk-ZDMQDTSH.js.map} +0 -0
- /package/dist/{chunk-CKAVTWXP.js.map → chunk-ZGWEFOW6.js.map} +0 -0
- /package/dist/{chunk-WC3W36AM.js.map → chunk-ZOUWHGV3.js.map} +0 -0
- /package/dist/{chunk-4CBM7JNK.js.map → chunk-ZWIPJFUA.js.map} +0 -0
|
@@ -191,15 +191,44 @@ wrapping element, rounded to match the image:
|
|
|
191
191
|
> - A **DEFINITE** set axis (a plain design-px number, or an absolute CSS
|
|
192
192
|
> length string) borrows straight onto the unset one: a square in real
|
|
193
193
|
> px/rem — e.g. `width={120}` alone gives the skeleton `120×120`.
|
|
194
|
-
> - A **RELATIVE** set axis
|
|
195
|
-
>
|
|
196
|
-
>
|
|
197
|
-
>
|
|
198
|
-
>
|
|
199
|
-
>
|
|
200
|
-
> `auto
|
|
201
|
-
>
|
|
202
|
-
> (
|
|
194
|
+
> - A **RELATIVE** set axis cannot be copied onto the other one the same way —
|
|
195
|
+
> a width-percentage and a height-percentage measure against two different
|
|
196
|
+
> boxes, so copying the value would re-create the exact 0-height/0-width
|
|
197
|
+
> collapse this default exists to fix. Instead, the set axis keeps its own
|
|
198
|
+
> value and the box squares up through CSS `aspectRatio: '1 / 1'`, with the
|
|
199
|
+
> other axis left `auto` — e.g. `width="100%"` alone gives the skeleton
|
|
200
|
+
> `width: 100%; height: auto; aspect-ratio: 1 / 1`, a square exactly as wide
|
|
201
|
+
> as its (now non-collapsing) container. A length is RELATIVE when:
|
|
202
|
+
> - it is a fraction in `(0, 1]`, or
|
|
203
|
+
> - it has a `%` **anywhere** in the string — not only a bare trailing `%`,
|
|
204
|
+
> but a `%` nested inside `calc()`/`min()`/`max()`/`clamp()` too (FUT-2869:
|
|
205
|
+
> `width="calc(100% - 8px)"` alone squares, exactly like `width="100%"`
|
|
206
|
+
> alone — a `%` still measures against the containing block no matter what
|
|
207
|
+
> it is wrapped in, and borrowing it onto the other axis still collapses
|
|
208
|
+
> to 0 against an auto-height parent), or
|
|
209
|
+
> - it has a viewport unit — `vw`/`vh`/`vmin`/`vmax`, or the small/large/
|
|
210
|
+
> dynamic variants `svw`/`svh`/`svmin`/`svmax`, `lvw`/`lvh`/`lvmin`/
|
|
211
|
+
> `lvmax`, `dvw`/`dvh`/`dvmin`/`dvmax`, or the logical `vi`/`vb` — anywhere
|
|
212
|
+
> in the string (FUT-2869: `width="50vw"` alone squares too — see below for
|
|
213
|
+
> why), or
|
|
214
|
+
> - it has a container-query unit — `cqw`/`cqh`/`cqi`/`cqb`/`cqmin`/`cqmax` —
|
|
215
|
+
> anywhere in the string: it depends on the nearest queried container, not
|
|
216
|
+
> the length itself, exactly the reasoning below.
|
|
217
|
+
>
|
|
218
|
+
> **Why viewport and container-query units square instead of borrow
|
|
219
|
+
> (FUT-2869's Decision).** Neither collapses to 0 the way a borrowed `%`
|
|
220
|
+
> does — a viewport unit resolves against the viewport, a container-query
|
|
221
|
+
> unit against its queried container, so a literally-borrowed `height: 50vw`
|
|
222
|
+
> is merely some non-zero length. But it is still wrong: the component's own
|
|
223
|
+
> promise for a single set axis is a SQUARE placeholder, and a length
|
|
224
|
+
> borrowed onto the other axis is a square only when the thing it measures
|
|
225
|
+
> against (the viewport, or the queried container) happens to be exactly the
|
|
226
|
+
> SAME size as `LazyImage`'s own container — the moment it isn't (any
|
|
227
|
+
> padding, sidebar, or max-width layout — the ordinary case), `width: 50vw`
|
|
228
|
+
> next to a borrowed `height: 50vw` is visibly not square. Squaring costs
|
|
229
|
+
> nothing extra (the same `aspectRatio` mechanism `%` already uses) and keeps
|
|
230
|
+
> one rule — "does this length depend on anything outside itself" — for
|
|
231
|
+
> every relative unit, instead of a different rule per unit family.
|
|
203
232
|
> - With **neither** axis set, both take the theme's field height
|
|
204
233
|
> (`theme.fieldHeight`, through `fieldHeight()`/`rem()` — never a raw px).
|
|
205
234
|
> - With **both** set, nothing above applies: the placeholder renders exactly
|
|
@@ -104,13 +104,13 @@ const emptyToUnset = (value: Length): Length => (value === '' ? undefined : valu
|
|
|
104
104
|
/** A length, already resolved to CSS — {@link innerLength} or {@link sxLength}. */
|
|
105
105
|
type LengthResolver = (theme: Theme, value: Length) => string | undefined;
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
// A number + `%`, a (small/large/dynamic) viewport unit, or a container-query
|
|
108
|
+
// unit, anywhere in a string, even nested in `calc()`/`min()`/`max()`/`clamp()`.
|
|
109
|
+
const RELATIVE_LENGTH_UNIT = /[\d.]+(?:%|[dsl]?v(?:w|h|i|b|min|max)|cq(?:w|h|i|b|min|max))(?![a-zA-Z])/;
|
|
110
|
+
// RELATIVE: {@link isFraction}, or that unit anywhere — borrowing it onto the
|
|
111
|
+
// OTHER axis re-creates this collapse (all these units square, `LazyImage.md`).
|
|
112
112
|
const isRelativeLength = (value: Length): boolean =>
|
|
113
|
-
isFraction(value) || (typeof value === 'string' &&
|
|
113
|
+
isFraction(value) || (typeof value === 'string' && RELATIVE_LENGTH_UNIT.test(value));
|
|
114
114
|
|
|
115
115
|
/** A resolved axis pair; `aspectRatio` is set when the OTHER axis comes from CSS, not a length. */
|
|
116
116
|
type AxisPair = { width: string | undefined; height: string | undefined; aspectRatio?: string };
|
|
@@ -5,7 +5,13 @@ import {
|
|
|
5
5
|
checkboxRadioDensityOverrides,
|
|
6
6
|
chipDensityOverrides,
|
|
7
7
|
iconButtonDensityOverrides,
|
|
8
|
+
paginationItemDensityOverrides,
|
|
9
|
+
sliderDensityOverrides,
|
|
8
10
|
switchDensityOverrides,
|
|
11
|
+
tabDensityOverrides,
|
|
12
|
+
tableCellDensityOverrides,
|
|
13
|
+
tabsIndicatorDensityOverrides,
|
|
14
|
+
toggleButtonDensityOverrides,
|
|
9
15
|
} from '../tokens/density-overrides';
|
|
10
16
|
import { densityFontSize, resolveDensityFactor } from '../tokens/density';
|
|
11
17
|
import { resolveFieldHeight } from '../tokens/field-height.core';
|
|
@@ -150,15 +156,21 @@ export function muiThemeOptionsFrom(ui: UiTheme): ThemeOptions {
|
|
|
150
156
|
shape: { borderRadius: ui.radius.md },
|
|
151
157
|
fieldRadius: ui.radius.field,
|
|
152
158
|
fieldHeight: ui.fieldHeight,
|
|
153
|
-
// Additive:
|
|
154
|
-
//
|
|
155
|
-
//
|
|
159
|
+
// Additive: FUT-2766 added IconButton's/Chip's overrides, FUT-2767 added
|
|
160
|
+
// Checkbox/Radio's and Switch's, and this PR (FUT-2768) adds
|
|
161
|
+
// ToggleButton/Tab/Tabs' indicator/TableCell/PaginationItem/Slider's.
|
|
156
162
|
components: mergeMuiComponents(
|
|
157
163
|
fieldOverrides(ui.radius.field, ui.fieldHeight),
|
|
158
164
|
iconButtonDensityOverrides(),
|
|
159
165
|
chipDensityOverrides(),
|
|
160
166
|
checkboxRadioDensityOverrides(),
|
|
161
167
|
switchDensityOverrides(),
|
|
168
|
+
toggleButtonDensityOverrides(),
|
|
169
|
+
tabDensityOverrides(),
|
|
170
|
+
tabsIndicatorDensityOverrides(),
|
|
171
|
+
tableCellDensityOverrides(),
|
|
172
|
+
paginationItemDensityOverrides(),
|
|
173
|
+
sliderDensityOverrides(),
|
|
162
174
|
),
|
|
163
175
|
spacing: ui.spacingUnit,
|
|
164
176
|
density: ui.density,
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { tableCellClasses } from '@mui/material/TableCell/index.js';
|
|
2
|
+
import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
|
+
|
|
4
|
+
import { rem, rems } from './relative';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TOGGLEBUTTON / TAB / TABLECELL / PAGINATIONITEM / SLIDER GEOMETRY,
|
|
8
|
+
* DENSITY-AWARE (FUT-2768).
|
|
9
|
+
*
|
|
10
|
+
* The remainder of the fixed-px geometry the density audit catalogued, none
|
|
11
|
+
* of it hard-coded in `@12-apps/ui`'s own source. Verified against the
|
|
12
|
+
* installed `@mui/material@6.5.0` source; each goes through the SAME
|
|
13
|
+
* per-size/per-slot `overridesResolver` key MUI itself resolves
|
|
14
|
+
* (`iconButtonDensityOverrides`/`chipDensityOverrides`'s own mechanism), so a
|
|
15
|
+
* theme value composes with MUI's baked-in `variants` instead of replacing
|
|
16
|
+
* them outright:
|
|
17
|
+
*
|
|
18
|
+
* - `ToggleButton`: `padding: 11/7/15` at medium(root)/small/large — same
|
|
19
|
+
* `root`/`sizeSmall`/`sizeLarge` shape as `iconButtonDensityOverrides`.
|
|
20
|
+
* - `Tab`: `minHeight: 48`, `padding: '12px 16px'` on the root (via `rems()`).
|
|
21
|
+
* The icon+label combo (`minHeight: 72`, `paddingTop`/`Bottom: 9`) is a
|
|
22
|
+
* SEPARATE MUI variant, exposed as the `labelIcon` key.
|
|
23
|
+
* - `TableCell`: `padding: 16` on the root, `'6px 16px'` at small, nested
|
|
24
|
+
* inside it `'0 12px 0 16px'` on the small+checkbox combo — all gated on
|
|
25
|
+
* `ownerState.padding === 'normal'` (MUI's default): `checkbox`/`none` are
|
|
26
|
+
* separate variants with their OWN unscaled padding (`'0 0 0 4px'`/`0`) an
|
|
27
|
+
* unconditional rule clobbered at every size but small (FUT-2861 review —
|
|
28
|
+
* the SAME Lesson-1 clobber the ellipsis fix above avoids, missed here).
|
|
29
|
+
* `@12-apps/ui`'s own `Table` (FUT-2769) wins regardless (two classes deep
|
|
30
|
+
* under its styled root); this reaches a BARE `<TableCell>`.
|
|
31
|
+
* - `PaginationItem`: `minWidth/height: 32/26/40` at medium(root)/small/large.
|
|
32
|
+
* The ellipsis shares the SAME slot and `minWidth` but has NO `height` of
|
|
33
|
+
* its own (`'auto'`), gated on `ownerState.type` being neither
|
|
34
|
+
* `'start-ellipsis'` nor `'end-ellipsis'` — skipping it would force a
|
|
35
|
+
* height onto the ellipsis (Lesson 1).
|
|
36
|
+
* - `Slider`: rail `height: 4/2` at `orientation="horizontal"`/`size="small"`
|
|
37
|
+
* — gated on `ownerState.orientation` since the SAME key answers for either
|
|
38
|
+
* axis (MUI sets `height` horizontal / `width` vertical, leaving the other
|
|
39
|
+
* `'100%'`). Thumb `20×20`/`12×12` needs no gate. `@12-apps/ui`'s own
|
|
40
|
+
* `Slider` already sets rail/thumb size through `rem()` and never forwards
|
|
41
|
+
* `size` — a no-op THERE, reaches a BARE `<Slider>`. The thumb's ring and
|
|
42
|
+
* the value-label offset were checked and left OUT — that story's own doc.
|
|
43
|
+
*
|
|
44
|
+
* `Avatar` is NOT in this file: `@12-apps/ui`'s own `Avatar` wraps `MuiAvatar`
|
|
45
|
+
* in a `StyledAvatar` that ALREADY sets `width`/`height` through
|
|
46
|
+
* `rem(theme, boxPx(size))` (`40` at `md`) — higher specificity than any
|
|
47
|
+
* `MuiAvatar.styleOverrides.root`, dead code here, so it ships none.
|
|
48
|
+
*
|
|
49
|
+
* Geometry-neutral at `normal`; each slot a MODULE-LEVEL function, as above.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
const toggleButtonRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 11) });
|
|
53
|
+
const toggleButtonSmallPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 7) });
|
|
54
|
+
const toggleButtonLargePadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 15) });
|
|
55
|
+
|
|
56
|
+
/** `MuiToggleButton`'s own padding, at every size MUI has. */
|
|
57
|
+
export function toggleButtonDensityOverrides(): Components<Theme> {
|
|
58
|
+
return {
|
|
59
|
+
MuiToggleButton: {
|
|
60
|
+
styleOverrides: {
|
|
61
|
+
root: toggleButtonRootPadding,
|
|
62
|
+
sizeSmall: toggleButtonSmallPadding,
|
|
63
|
+
sizeLarge: toggleButtonLargePadding,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const tabRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
70
|
+
minHeight: rem(theme, 48),
|
|
71
|
+
padding: rems(theme, 12, 16),
|
|
72
|
+
});
|
|
73
|
+
const tabLabelIconGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
74
|
+
minHeight: rem(theme, 72),
|
|
75
|
+
paddingTop: rem(theme, 9),
|
|
76
|
+
paddingBottom: rem(theme, 9),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/** `MuiTab`'s own root height/padding, and the icon+label combo's taller box. */
|
|
80
|
+
export function tabDensityOverrides(): Components<Theme> {
|
|
81
|
+
return {
|
|
82
|
+
MuiTab: {
|
|
83
|
+
styleOverrides: {
|
|
84
|
+
root: tabRootGeometry,
|
|
85
|
+
labelIcon: tabLabelIconGeometry,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface TableCellOwnerStateForOverrides {
|
|
92
|
+
padding?: 'normal' | 'checkbox' | 'none';
|
|
93
|
+
}
|
|
94
|
+
type TableCellStyleFn = (props: { theme: Theme; ownerState?: TableCellOwnerStateForOverrides }) => CSSObject;
|
|
95
|
+
const isDefaultTableCellPadding = (padding: TableCellOwnerStateForOverrides['padding']): boolean =>
|
|
96
|
+
padding === undefined || padding === 'normal';
|
|
97
|
+
|
|
98
|
+
const tableCellRootPadding: TableCellStyleFn = ({ theme, ownerState }) =>
|
|
99
|
+
isDefaultTableCellPadding(ownerState?.padding) ? { padding: rem(theme, 16) } : {};
|
|
100
|
+
|
|
101
|
+
const tableCellSmallPadding: TableCellStyleFn = ({ theme, ownerState }) => {
|
|
102
|
+
const style: CSSObject = {
|
|
103
|
+
[`&.${tableCellClasses.paddingCheckbox}`]: { padding: rems(theme, 0, 12, 0, 16) },
|
|
104
|
+
};
|
|
105
|
+
if (isDefaultTableCellPadding(ownerState?.padding)) style.padding = rems(theme, 6, 16);
|
|
106
|
+
return style;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** Reaches a BARE `<TableCell>` only — module doc comment above. */
|
|
110
|
+
export function tableCellDensityOverrides(): Components<Theme> {
|
|
111
|
+
return {
|
|
112
|
+
MuiTableCell: {
|
|
113
|
+
styleOverrides: {
|
|
114
|
+
root: tableCellRootPadding,
|
|
115
|
+
sizeSmall: tableCellSmallPadding,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** The `ownerState` field that tells the ellipsis item apart from a real button. */
|
|
122
|
+
interface PaginationItemOwnerStateForOverrides {
|
|
123
|
+
type?: 'page' | 'first' | 'last' | 'start-ellipsis' | 'end-ellipsis' | 'previous' | 'next';
|
|
124
|
+
}
|
|
125
|
+
type PaginationItemStyleFn = (props: {
|
|
126
|
+
theme: Theme;
|
|
127
|
+
ownerState?: PaginationItemOwnerStateForOverrides;
|
|
128
|
+
}) => CSSObject;
|
|
129
|
+
|
|
130
|
+
const isPaginationEllipsis = (type: PaginationItemOwnerStateForOverrides['type']): boolean =>
|
|
131
|
+
type === 'start-ellipsis' || type === 'end-ellipsis';
|
|
132
|
+
|
|
133
|
+
/** `minWidth` always; `height` only off the ellipsis, which has none of its own. */
|
|
134
|
+
function paginationItemGeometryAt(px: number): PaginationItemStyleFn {
|
|
135
|
+
return ({ theme, ownerState }) => {
|
|
136
|
+
const style: CSSObject = { minWidth: rem(theme, px) };
|
|
137
|
+
if (!isPaginationEllipsis(ownerState?.type)) style.height = rem(theme, px);
|
|
138
|
+
return style;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const paginationItemRootGeometry = paginationItemGeometryAt(32);
|
|
142
|
+
const paginationItemSmallGeometry = paginationItemGeometryAt(26);
|
|
143
|
+
const paginationItemLargeGeometry = paginationItemGeometryAt(40);
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* `MuiPaginationItem`'s own `minWidth`/`height`, at every size MUI has —
|
|
147
|
+
* `height` skipped on the ellipsis item, which has none of its own (`auto`).
|
|
148
|
+
*/
|
|
149
|
+
export function paginationItemDensityOverrides(): Components<Theme> {
|
|
150
|
+
return {
|
|
151
|
+
MuiPaginationItem: {
|
|
152
|
+
styleOverrides: {
|
|
153
|
+
root: paginationItemRootGeometry,
|
|
154
|
+
sizeSmall: paginationItemSmallGeometry,
|
|
155
|
+
sizeLarge: paginationItemLargeGeometry,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** The `ownerState` field that tells which axis the rail's `height`/`4` reads as. */
|
|
162
|
+
interface SliderOwnerStateForOverrides {
|
|
163
|
+
orientation?: 'horizontal' | 'vertical';
|
|
164
|
+
}
|
|
165
|
+
type SliderStyleFn = (props: { theme: Theme; ownerState?: SliderOwnerStateForOverrides }) => CSSObject;
|
|
166
|
+
|
|
167
|
+
/** The rail's `4`/`2` reads as `height` for a horizontal slider, `width` for a vertical one. */
|
|
168
|
+
function sliderRailAxisAt(px: number): SliderStyleFn {
|
|
169
|
+
return ({ theme, ownerState }) =>
|
|
170
|
+
ownerState?.orientation === 'vertical' ? { width: rem(theme, px) } : { height: rem(theme, px) };
|
|
171
|
+
}
|
|
172
|
+
const sliderRootGeometry = sliderRailAxisAt(4);
|
|
173
|
+
const sliderSmallGeometry = sliderRailAxisAt(2);
|
|
174
|
+
const sliderThumbGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
175
|
+
width: rem(theme, 20),
|
|
176
|
+
height: rem(theme, 20),
|
|
177
|
+
});
|
|
178
|
+
const sliderThumbSmallGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
179
|
+
width: rem(theme, 12),
|
|
180
|
+
height: rem(theme, 12),
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/** `MuiSlider`'s own rail thickness (root/sizeSmall) and thumb box (thumb/thumbSizeSmall). */
|
|
184
|
+
export function sliderDensityOverrides(): Components<Theme> {
|
|
185
|
+
return {
|
|
186
|
+
MuiSlider: {
|
|
187
|
+
styleOverrides: {
|
|
188
|
+
root: sliderRootGeometry,
|
|
189
|
+
sizeSmall: sliderSmallGeometry,
|
|
190
|
+
thumb: sliderThumbGeometry,
|
|
191
|
+
thumbSizeSmall: sliderThumbSmallGeometry,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* `MuiTabs`' own indicator thickness (`height: 2` horizontal, `width: 2`
|
|
199
|
+
* vertical) — one short of `Tab` in the ticket's own literal list, added
|
|
200
|
+
* after a FUT-2767-review pass over state/orientation-gated literals; same
|
|
201
|
+
* orientation gate as the Slider rail. `@12-apps/ui`'s own `Tabs` draws its
|
|
202
|
+
* OWN 3px indicator through `rem()` already, blocking THIS override there —
|
|
203
|
+
* `tabDensityOverrides` reaches `Tab.root`'s `minHeight` instead (both
|
|
204
|
+
* measured in `density-wrapper-reach.test.stories.tsx`).
|
|
205
|
+
*/
|
|
206
|
+
interface TabsIndicatorOwnerStateForOverrides {
|
|
207
|
+
orientation?: 'horizontal' | 'vertical';
|
|
208
|
+
}
|
|
209
|
+
type TabsIndicatorStyleFn = (props: {
|
|
210
|
+
theme: Theme;
|
|
211
|
+
ownerState?: TabsIndicatorOwnerStateForOverrides;
|
|
212
|
+
}) => CSSObject;
|
|
213
|
+
|
|
214
|
+
const tabsIndicatorAxisAt: TabsIndicatorStyleFn = ({ theme, ownerState }) =>
|
|
215
|
+
ownerState?.orientation === 'vertical' ? { width: rem(theme, 2) } : { height: rem(theme, 2) };
|
|
216
|
+
|
|
217
|
+
/** `MuiTabs`' own indicator thickness, by orientation. */
|
|
218
|
+
export function tabsIndicatorDensityOverrides(): Components<Theme> {
|
|
219
|
+
return {
|
|
220
|
+
MuiTabs: {
|
|
221
|
+
styleOverrides: {
|
|
222
|
+
indicator: tabsIndicatorAxisAt,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { switchClasses } from '@mui/material/Switch/index.js';
|
|
2
|
+
import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
|
+
|
|
4
|
+
import { rem, rems } from './relative';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* CHECKBOX / RADIO / SWITCH GEOMETRY, DENSITY-AWARE (FUT-2767).
|
|
8
|
+
*
|
|
9
|
+
* `Checkbox`/`Radio`/`Switch` are MUI's own components, unwrapped — but
|
|
10
|
+
* **only two of the three `@12-apps/ui` wrappers actually forward their
|
|
11
|
+
* geometry to MUI**, corrected here after an earlier revision of this doc
|
|
12
|
+
* comment claimed all three did.
|
|
13
|
+
*
|
|
14
|
+
* - `Checkbox.tsx`'s `StyledCheckbox` and `RadioGroup.variants.tsx`'s
|
|
15
|
+
* `DefaultRadios` (the ONLY variant rendering a raw `<Radio>` — `cards`/
|
|
16
|
+
* `buttons`/`segments` draw custom controls, outside this ticket) set NO
|
|
17
|
+
* `padding` of their own, so `checkboxRadioDensityOverrides()` reaches
|
|
18
|
+
* both directly — confirmed by a real render, same computed padding as
|
|
19
|
+
* raw `MuiCheckbox`/`MuiRadio` at both densities
|
|
20
|
+
* (`density-overrides.test.stories.tsx`'s `ui-checkbox`/`ui-radio-group`).
|
|
21
|
+
* - `Switch.styles.ts`'s `switchSx` is DIFFERENT: it draws root/switchBase/
|
|
22
|
+
* thumb geometry itself, per instance, from its own `SWITCH_SIZES` table
|
|
23
|
+
* (`Switch.metrics.ts`), every number already through `rem(theme, px)`.
|
|
24
|
+
* `Switch.parts.tsx`'s `StyledSwitch = styled(MuiSwitch, {...})(...)`
|
|
25
|
+
* composes these as an OUTER wrapper class whose nested `& .MuiSwitch-
|
|
26
|
+
* switchBase`/`& .MuiSwitch-thumb` selectors are a TWO-class compound —
|
|
27
|
+
* higher specificity than this file's `MuiSwitch.styleOverrides.
|
|
28
|
+
* switchBase`/`thumb`, which compose onto a single-class generated class.
|
|
29
|
+
* `switchDensityOverrides()` therefore has **NO effect on `@12-apps/ui`'s
|
|
30
|
+
* own `<Switch>`** — it only reaches a raw `@mui/material/Switch` consumer
|
|
31
|
+
* (a host's own `Table.tsx` density-toggle column, say). Not a gap:
|
|
32
|
+
* `switchSx` already reacts to `theme.typography.fontSize` on its own —
|
|
33
|
+
* including the CHECKED thumb's own travel distance, computed as
|
|
34
|
+
* `rem(theme, width - thumbSize - padding * 2)` from the SAME per-instance
|
|
35
|
+
* geometry, so it moves consistently with no help from this file.
|
|
36
|
+
* Confirmed by measurement, both sizes, both states, both densities
|
|
37
|
+
* (`ui-switch-*` cases); documented at `Switch.md`'s "Density" section.
|
|
38
|
+
*
|
|
39
|
+
* **The ticket's open question — does a `MuiSwitchBase` theme override reach
|
|
40
|
+
* `Checkbox`/`Radio` at all? — is NO, verified two ways.** `Checkbox`/`Radio`
|
|
41
|
+
* both render through `internal/SwitchBase.js`'s `SwitchBaseRoot`, which is
|
|
42
|
+
* `styled(ButtonBase, { name: 'MuiSwitchBase' })({ padding: 9, ... })` — with
|
|
43
|
+
* NO `slot` key. `@mui/system`'s `createStyled.js` computes
|
|
44
|
+
* `overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(slot))`,
|
|
45
|
+
* and `defaultOverridesResolver` (`if (!slot) return null`) returns `null`
|
|
46
|
+
* for an absent slot; the styled call itself then only pushes its
|
|
47
|
+
* `styleThemeOverrides` expression `if (componentName && overridesResolver)`
|
|
48
|
+
* — `null` is falsy, so for THIS styled call `theme.components.MuiSwitchBase
|
|
49
|
+
* .styleOverrides` is never read at all. (`variants` is a SEPARATE check,
|
|
50
|
+
* gated on `skipVariantsResolver` rather than `overridesResolver`, which is
|
|
51
|
+
* why the ticket's own two-part specificity proof for Chip's label — probing
|
|
52
|
+
* with `variants` — does not transfer here; `styleOverrides` is what dies.)
|
|
53
|
+
* A render-level probe confirms it: a theme with `components.MuiSwitchBase
|
|
54
|
+
* .styleOverrides.root = { padding: '999px' }`, rendering `<Switch />`,
|
|
55
|
+
* `<Checkbox />` and `<Radio />` through it, leaves EVERY ONE of `.MuiSwitch-
|
|
56
|
+
* switchBase`, `.MuiCheckbox-root` and `.MuiRadio-root` at their unthemed
|
|
57
|
+
* padding (`9px`/`4px` — see below), never `999px`. The Decision's own
|
|
58
|
+
* suggested `MuiSwitchBase` route is therefore the ticket's documented
|
|
59
|
+
* fallback in disguise: this file skips straight to duplicating the override
|
|
60
|
+
* under `MuiCheckbox` and `MuiRadio`, each independently confirmed LIVE by
|
|
61
|
+
* the same probe (`components.MuiCheckbox.styleOverrides.root.padding` DOES
|
|
62
|
+
* reach `.MuiCheckbox-root`, and the same for `MuiRadio`).
|
|
63
|
+
*
|
|
64
|
+
* - `Checkbox`/`Radio` (`internal/SwitchBase.js`, `Checkbox.js`, `Radio.js`):
|
|
65
|
+
* `padding: 9` — constant across `size="small"`/`"medium"` today (neither
|
|
66
|
+
* `CheckboxRoot` nor `RadioRoot` carries a size-conditional padding rule),
|
|
67
|
+
* so ONE `root` override, no `sizeSmall`/`sizeMedium` split, covers both
|
|
68
|
+
* sizes without disturbing the glyph-driven size difference FUT-2585 left
|
|
69
|
+
* alone.
|
|
70
|
+
* - `Switch` (`Switch.js`): root (the track) `width: 34+12*2`, `height:
|
|
71
|
+
* 14+12*2`, `padding: 12` (medium); `switchBase` (the thumb's absolutely-
|
|
72
|
+
* positioned wrapper) — its OWN literal is NOT the `12` the ticket's
|
|
73
|
+
* Decision sketch names (that `12` is `SwitchRoot`'s own padding, a
|
|
74
|
+
* DIFFERENT slot); `switchBase` inherits `internal/SwitchBase.js`'s generic
|
|
75
|
+
* `padding: 9` unmodified at medium (`SwitchSwitchBase`'s own styles never
|
|
76
|
+
* set `padding`), confirmed by the same render probe with NO theme
|
|
77
|
+
* override at all (`.MuiSwitch-switchBase` computed padding: `9px`). This
|
|
78
|
+
* file overrides `MuiSwitch.styleOverrides.switchBase` (a LIVE key —
|
|
79
|
+
* `SwitchSwitchBase = styled(SwitchBase, { name: 'MuiSwitch', slot:
|
|
80
|
+
* 'SwitchBase', ... })` DOES pass a `slot`) with `rem(theme, 9)`, the
|
|
81
|
+
* MEASURED default, not the ticket's `12` — using `12` here would move
|
|
82
|
+
* today's real 9px to 12px at `density: 'normal'`, failing the Done-when's
|
|
83
|
+
* own pixel-identical requirement, so the number is corrected against the
|
|
84
|
+
* probe rather than the sketch. `thumb`: `20×20`, unconditional.
|
|
85
|
+
* - `Switch` `size="small"` (`:82-100`, a `variants` entry on `SwitchRoot`
|
|
86
|
+
* itself): root `width: 40`, `height: 24`, `padding: 7`; a NESTED `&
|
|
87
|
+
* .${switchClasses.switchBase}` selector sets `padding: 4` (not 9); a
|
|
88
|
+
* NESTED `& .${switchClasses.thumb}` selector sets `20×20` down to
|
|
89
|
+
* `16×16`. Both nested rules are baked into `SwitchRoot`'s OWN generated
|
|
90
|
+
* class at TWO-class specificity (the size-small instance's unique class,
|
|
91
|
+
* plus `.MuiSwitch-switchBase`/`.MuiSwitch-thumb`) — exactly the Chip
|
|
92
|
+
* outlined-label shape this file already has above, and the SAME failure
|
|
93
|
+
* mode Lesson 1 warns about: a FLAT `styleOverrides.switchBase`/`thumb`
|
|
94
|
+
* (one class) cannot out-specificity it, so at `size="small"` it would
|
|
95
|
+
* silently keep rendering MUI's unthemed `4px`/`16×16` at every density,
|
|
96
|
+
* the click target and thumb staying full-size while the track around them
|
|
97
|
+
* shrank. Fixed the same way: `sizeSmall`'s OWN nested `& .${switchClasses
|
|
98
|
+
* .switchBase}` / `& .${switchClasses.thumb}` rules, read through
|
|
99
|
+
* `switchClasses` (not a hand-typed selector string) for the same
|
|
100
|
+
* `ClassNameGenerator.configure` reason `chipClasses` is above, inserted
|
|
101
|
+
* as part of the SAME `sizeSmall` override object so they land AFTER
|
|
102
|
+
* `SwitchRoot`'s own baked-in small variant in the generated class's CSS
|
|
103
|
+
* text (later wins at matching two-class specificity) rather than trying
|
|
104
|
+
* to out-specificity it from a different slot.
|
|
105
|
+
*
|
|
106
|
+
* **The checked thumb's own travel distance is a FOURTH literal, found only
|
|
107
|
+
* on adversarial review of the PR this doc comment first shipped in.**
|
|
108
|
+
* `SwitchSwitchBase`'s base style bakes in `&.Mui-checked { transform:
|
|
109
|
+
* translateX(20px) }` (medium), and `SwitchRoot`'s `size: 'small'` variant
|
|
110
|
+
* nests the same at `16px` — both bare, never run through `pxToRem`, so at
|
|
111
|
+
* `density: 'compact'` the checked thumb kept travelling the FULL, unscaled
|
|
112
|
+
* distance while the track around it shrank ×0.9 — a visible overshoot.
|
|
113
|
+
* `switchSwitchBasePadding`/`switchSizeSmall` each now carry their own
|
|
114
|
+
* `&.${switchClasses.checked}` rule (`translateX(rem(theme, 20))`/`rem(theme,
|
|
115
|
+
* 16)`), composed onto the SAME generated class, in the SAME position
|
|
116
|
+
* `padding` already occupies — so it wins by the identical mechanism, not a
|
|
117
|
+
* new one. Proven at the pixel level, both sizes/densities: `switch-md-
|
|
118
|
+
* checked`/`switch-sm-checked` measure the thumb's final position against
|
|
119
|
+
* the track's own edge, not just the transform string.
|
|
120
|
+
*
|
|
121
|
+
* At `density: 'normal'` every number above computes back to the literal it
|
|
122
|
+
* replaces (`rem(theme, 9)` is `0.5625rem`, `9px` at the 16px root — no
|
|
123
|
+
* visible change), the same geometry-neutral guarantee `iconButtonDensity
|
|
124
|
+
* Overrides`/`chipDensityOverrides` give above. The same non-default-
|
|
125
|
+
* `fontSize` caveat those two give applies here unchanged: `rem()` only ever
|
|
126
|
+
* reads `theme.typography.fontSize`, so a host adopting
|
|
127
|
+
* `checkboxRadioDensityOverrides`/`switchDensityOverrides` standalone moves
|
|
128
|
+
* every number here by that one coefficient, same as everything else `rem()`
|
|
129
|
+
* touches.
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
const checkboxRadioRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 9) });
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* `MuiCheckbox`/`MuiRadio`'s own padding — duplicated under both component
|
|
136
|
+
* keys, the ticket's own documented fallback, since `MuiSwitchBase` cannot
|
|
137
|
+
* reach either (see the module doc comment above). One module-level function
|
|
138
|
+
* shared by both keys, and by `checkboxRadioDensityOverrides()`'s own two
|
|
139
|
+
* calls across the two theme-build paths, for the same identity reason the
|
|
140
|
+
* rest of this file's slots are module-level.
|
|
141
|
+
*/
|
|
142
|
+
export function checkboxRadioDensityOverrides(): Components<Theme> {
|
|
143
|
+
return {
|
|
144
|
+
MuiCheckbox: { styleOverrides: { root: checkboxRadioRootPadding } },
|
|
145
|
+
MuiRadio: { styleOverrides: { root: checkboxRadioRootPadding } },
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const switchRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
150
|
+
width: rems(theme, 34 + 12 * 2),
|
|
151
|
+
height: rems(theme, 14 + 12 * 2),
|
|
152
|
+
padding: rem(theme, 12),
|
|
153
|
+
});
|
|
154
|
+
const switchSwitchBasePadding = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
155
|
+
padding: rem(theme, 9),
|
|
156
|
+
// FUT-2767 (adversarial-review fix) — `SwitchSwitchBase`'s OWN base style
|
|
157
|
+
// (`Switch.js`, medium) bakes in `&.Mui-checked { transform:
|
|
158
|
+
// translateX(20px) }`, a bare literal never run through `pxToRem` — at
|
|
159
|
+
// `density: 'compact'` the track/padding/thumb above all shrink ×0.9 but
|
|
160
|
+
// this offset stayed at a full 20px, so the checked thumb overshot the now-
|
|
161
|
+
// smaller track. Composed onto the SAME generated class as that base style,
|
|
162
|
+
// AFTER it (`createStyled` composes `styleThemeOverrides` after a slot's
|
|
163
|
+
// own base/variants — see the module doc comment), so this nested rule
|
|
164
|
+
// wins at the SAME (two-class, `.<hash>.Mui-checked`) specificity, the same
|
|
165
|
+
// mechanism this function's own `padding` line already relies on.
|
|
166
|
+
[`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 20)})` },
|
|
167
|
+
});
|
|
168
|
+
const switchThumbSize = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
169
|
+
width: rem(theme, 20),
|
|
170
|
+
height: rem(theme, 20),
|
|
171
|
+
});
|
|
172
|
+
const switchSizeSmall = ({ theme }: { theme: Theme }): CSSObject => ({
|
|
173
|
+
width: rem(theme, 40),
|
|
174
|
+
height: rem(theme, 24),
|
|
175
|
+
padding: rem(theme, 7),
|
|
176
|
+
// Higher (two-class) specificity than the flat `switchBase`/`thumb`
|
|
177
|
+
// overrides above, inserted as part of THIS SAME generated class — see the
|
|
178
|
+
// module doc comment for why a flat override cannot reach these at
|
|
179
|
+
// `size="small"` on its own.
|
|
180
|
+
[`& .${switchClasses.switchBase}`]: {
|
|
181
|
+
padding: rem(theme, 4),
|
|
182
|
+
// Same overshoot as medium's, at `size="small"`'s OWN literal
|
|
183
|
+
// (`SwitchRoot`'s baked-in `size: 'small'` variant, `Switch.js`:
|
|
184
|
+
// `translateX(16px)`). Nested one level deeper so the compiled selector
|
|
185
|
+
// is `.<root-hash> .MuiSwitch-switchBase.Mui-checked` — the same THREE-
|
|
186
|
+
// class descendant compound MUI's own baked-in small variant uses for
|
|
187
|
+
// this rule, composed after it in the same generated class, so it wins
|
|
188
|
+
// at matching specificity the same way the sibling `padding: rem(theme,
|
|
189
|
+
// 4)` line above already does.
|
|
190
|
+
[`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 16)})` },
|
|
191
|
+
},
|
|
192
|
+
[`& .${switchClasses.thumb}`]: { width: rem(theme, 16), height: rem(theme, 16) },
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* `MuiSwitch`'s own track (root), thumb wrapper (switchBase) and thumb
|
|
197
|
+
* (thumb) geometry, at both sizes MUI has.
|
|
198
|
+
*/
|
|
199
|
+
export function switchDensityOverrides(): Components<Theme> {
|
|
200
|
+
return {
|
|
201
|
+
MuiSwitch: {
|
|
202
|
+
styleOverrides: {
|
|
203
|
+
root: switchRootGeometry,
|
|
204
|
+
switchBase: switchSwitchBasePadding,
|
|
205
|
+
thumb: switchThumbSize,
|
|
206
|
+
sizeSmall: switchSizeSmall,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|