@12-apps/ui 6.56.1 → 6.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NATIVE.md +2 -2
- package/components-catalog.md +2 -2
- package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
- package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +18 -18
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +26 -25
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +5 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +45 -0
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-selection-extra.js +3 -1
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-url-echo.js +13 -0
- package/dist/_internal/components/data-display/DataViews/data-views-url-echo.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +1 -1
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +1 -1
- package/dist/_internal/components/data-display/Progress/Progress.js +1 -1
- package/dist/_internal/components/data-display/index.js +15 -15
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/Dialog/Dialog.styles.js +1 -1
- package/dist/_internal/components/feedback/index.js +2 -2
- package/dist/_internal/components/index.js +35 -35
- package/dist/_internal/components/layout/ContentToolbar/ContentToolbar.js +1 -1
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +5 -5
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +3 -3
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +4 -4
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +4 -4
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +6 -6
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +5 -5
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +6 -6
- package/dist/_internal/components/layout/index.js +10 -10
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +9 -9
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +4 -4
- package/dist/_internal/components/navigation/index.js +12 -12
- package/dist/_internal/en-US.data-display.js +1 -1
- package/dist/_internal/icons/Icon.js +2 -2
- package/dist/_internal/icons/paths.generated.js +1 -1
- package/dist/_internal/pt-BR.data-display.js +1 -1
- package/dist/_internal/user-avatar/user-avatar.js +3 -3
- package/dist/charts.js +6 -6
- package/dist/{chunk-MKAA3YIJ.js → chunk-3K7WN2PO.js} +3 -3
- package/dist/{chunk-CLC4VIOF.js → chunk-4PYEDDYV.js} +2 -2
- package/dist/{chunk-573XC4HK.js → chunk-4QKS5Y35.js} +2 -2
- package/dist/{chunk-KX75HM5U.js → chunk-5YDS6HO3.js} +7 -2
- package/dist/{chunk-KX75HM5U.js.map → chunk-5YDS6HO3.js.map} +1 -1
- package/dist/{chunk-N4MR4EMC.js → chunk-6D2PFC5C.js} +2 -2
- package/dist/{chunk-JWXGZ4VM.js → chunk-6J27G2HT.js} +2 -2
- package/dist/{chunk-LJKWWXZD.js → chunk-6OSUK2C7.js} +28 -22
- package/dist/chunk-6OSUK2C7.js.map +1 -0
- package/dist/{chunk-ICSXPZXT.js → chunk-6QBT5TPS.js} +2 -2
- package/dist/{chunk-C67FDYG7.js → chunk-7CWZI6MQ.js} +5 -5
- package/dist/{chunk-WGFHZNFR.js → chunk-AEIJSEVV.js} +4 -1
- package/dist/{chunk-WGFHZNFR.js.map → chunk-AEIJSEVV.js.map} +1 -1
- package/dist/{chunk-JL77BSOL.js → chunk-AQI3UK6P.js} +2 -2
- package/dist/{chunk-A6EUQDRK.js → chunk-ARJIKW56.js} +4 -2
- package/dist/chunk-ARJIKW56.js.map +1 -0
- package/dist/{chunk-6E4XNOAC.js → chunk-CCCILWYZ.js} +4 -4
- package/dist/{chunk-GI24X7XA.js → chunk-DZIRCD2W.js} +2 -2
- package/dist/{chunk-53ACGKBW.js → chunk-EDBP62WG.js} +3 -3
- package/dist/{chunk-YXIVQFNW.js → chunk-EWIKSTJV.js} +4 -4
- package/dist/{chunk-LWZ2K225.js → chunk-FXZUVZON.js} +6 -6
- package/dist/chunk-G6EJLEVV.js +75 -0
- package/dist/chunk-G6EJLEVV.js.map +1 -0
- package/dist/{chunk-IK2ZVV3M.js → chunk-GK7JNSMK.js} +2 -2
- package/dist/{chunk-Y2HCYT5W.js → chunk-GRRW5NSR.js} +2 -2
- package/dist/{chunk-NZZ2BTIK.js → chunk-H7R6UKOE.js} +2 -2
- package/dist/{chunk-HFBQCJNP.js → chunk-HCYRCU4W.js} +2 -2
- package/dist/{chunk-C3BRCCHG.js → chunk-HH7PM5HT.js} +12 -24
- package/dist/chunk-HH7PM5HT.js.map +1 -0
- package/dist/{chunk-7AAJYWC3.js → chunk-HPO7PB4F.js} +2 -2
- package/dist/{chunk-WF3P7GE5.js → chunk-I3CQBEKS.js} +2 -2
- package/dist/{chunk-RREWYOKS.js → chunk-IL4FCC54.js} +2 -2
- package/dist/{chunk-7M3DRP7Q.js → chunk-ILNO4ZJ6.js} +3 -3
- package/dist/{chunk-AL3Z24VG.js → chunk-ILQVNZ5B.js} +2 -2
- package/dist/{chunk-5PN5MY2X.js → chunk-INQO5AYV.js} +3 -3
- package/dist/{chunk-2DV64INT.js → chunk-KEDZTZCV.js} +2 -2
- package/dist/{chunk-2CJZLL5Y.js → chunk-NHVL2QPG.js} +2 -1
- package/dist/{chunk-2CJZLL5Y.js.map → chunk-NHVL2QPG.js.map} +1 -1
- package/dist/{chunk-45PGSVOH.js → chunk-NTJUAPJM.js} +10 -8
- package/dist/chunk-NTJUAPJM.js.map +1 -0
- package/dist/{chunk-EUPUEMFX.js → chunk-PC4H5LVB.js} +7 -7
- package/dist/{chunk-44JLXXWQ.js → chunk-PPITQH3C.js} +2 -2
- package/dist/{chunk-KEKOPD43.js → chunk-PQ7RWH7L.js} +4 -2
- package/dist/chunk-PQ7RWH7L.js.map +1 -0
- package/dist/{chunk-HRMB72E4.js → chunk-QHP5PZNC.js} +2 -1
- package/dist/{chunk-HRMB72E4.js.map → chunk-QHP5PZNC.js.map} +1 -1
- package/dist/{chunk-GNBCSTXF.js → chunk-QKAYXAQE.js} +6 -6
- package/dist/{chunk-GNBCSTXF.js.map → chunk-QKAYXAQE.js.map} +1 -1
- package/dist/{chunk-JC244QQF.js → chunk-SEWUYHSG.js} +2 -2
- package/dist/{chunk-TZFBJ47T.js → chunk-SFLNHCA2.js} +39 -15
- package/dist/chunk-SFLNHCA2.js.map +1 -0
- package/dist/{chunk-OBMPE6PW.js → chunk-SSDYEOU4.js} +5 -5
- package/dist/{chunk-I6ESCBY3.js → chunk-TF27Z27K.js} +2 -2
- package/dist/{chunk-JF5LQOGB.js → chunk-U47KRLEW.js} +57 -45
- package/dist/chunk-U47KRLEW.js.map +1 -0
- package/dist/{chunk-RBHBJDOZ.js → chunk-UEU5NSIG.js} +4 -4
- package/dist/chunk-V4V2N6YJ.js +55 -0
- package/dist/chunk-V4V2N6YJ.js.map +1 -0
- package/dist/{chunk-XTHDWW4M.js → chunk-VAY6KESM.js} +7 -4
- package/dist/chunk-VAY6KESM.js.map +1 -0
- package/dist/{chunk-5XZEGI35.js → chunk-X7HCS3HP.js} +3 -3
- package/dist/{chunk-6ZLP7BA7.js → chunk-XC7YHO7Z.js} +3 -1
- package/dist/{chunk-6ZLP7BA7.js.map → chunk-XC7YHO7Z.js.map} +1 -1
- package/dist/{chunk-T2S7NIUG.js → chunk-XE4JVTM6.js} +2 -2
- package/dist/{chunk-G76BNXWE.js → chunk-XW5SEW3H.js} +6 -6
- package/dist/{chunk-SIWXMNQT.js → chunk-YDTCM5F6.js} +4 -4
- package/dist/{chunk-46ZATLQV.js → chunk-YIKFYWKD.js} +3 -3
- package/dist/{chunk-BQGWY577.js → chunk-ZCUVZ5PR.js} +3 -3
- package/dist/{chunk-4JBS6NOT.js → chunk-ZWBGQYVO.js} +35 -6
- package/dist/chunk-ZWBGQYVO.js.map +1 -0
- package/dist/{chunk-VWW2EXH7.js → chunk-ZYJZHXFU.js} +4 -4
- package/dist/data-display/Avatar.js +2 -2
- package/dist/data-display/Badge.js +2 -2
- package/dist/data-display/CardKit.js +10 -10
- package/dist/data-display/Carousel.js +2 -2
- package/dist/data-display/Chart.js +6 -6
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +31 -29
- package/dist/data-display/Progress.js +1 -1
- package/dist/en-US.js +1 -1
- package/dist/feedback/Dialog.js +2 -2
- package/dist/icons.js +2 -2
- package/dist/layout/ContentToolbar.js +1 -1
- package/dist/layout/SettingCard.js +9 -9
- package/dist/locales.js +2 -2
- package/dist/native/chunks/{chunk-QGTZGL7P.js → chunk-BUFQXX27.js} +2 -2
- package/dist/native/chunks/{chunk-EZO2KJF7.js → chunk-JFKH5YHF.js} +3 -1
- package/dist/native/chunks/{chunk-EZO2KJF7.js.map → chunk-JFKH5YHF.js.map} +1 -1
- package/dist/native/data-display/Alert.js +1 -1
- package/dist/native/data-display/Avatar.js +1 -1
- package/dist/native/data-display/Badge.js +1 -1
- package/dist/native/data-display/Chip.js +1 -1
- package/dist/native/data-display/EmptyState.js +2 -2
- package/dist/native/data-display/ErrorState.js +1 -1
- package/dist/native/data-display/FleetMap.js +2 -2
- package/dist/native/data-display/Progress.js +11 -5
- package/dist/native/data-display/Progress.js.map +1 -1
- package/dist/native/feedback/Dialog.js +2 -1
- package/dist/native/feedback/Dialog.js.map +1 -1
- package/dist/native/form/Checkbox.js +1 -1
- package/dist/native/form/Select.js +1 -1
- package/dist/native/icons.js +1 -1
- package/dist/navigation/AppHeader.js +3 -3
- package/dist/navigation/SectionNav.js +9 -9
- package/dist/pt-BR.js +1 -1
- package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-geometry.d.ts +29 -1
- package/dist/types/components/data-display/DataViews/base-list-card-geometry.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-layout.d.ts +46 -0
- package/dist/types/components/data-display/DataViews/base-list-card-layout.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/base-list-card-slots.d.ts +5 -2
- package/dist/types/components/data-display/DataViews/base-list-card-slots.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card.d.ts +10 -1
- package/dist/types/components/data-display/DataViews/base-list-card.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +7 -0
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-selection-extra.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/data-views-selection-extra.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts +3 -1
- package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-url-echo.d.ts +47 -0
- package/dist/types/components/data-display/DataViews/data-views-url-echo.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/list-card-rails.d.ts +17 -2
- package/dist/types/components/data-display/DataViews/list-card-rails.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.base.d.ts +8 -0
- package/dist/types/components/data-display/Progress/Progress.base.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/Dialog.base.d.ts +2 -1
- package/dist/types/components/feedback/Dialog/Dialog.base.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.d.ts +3 -2
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.types.d.ts +14 -0
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.types.d.ts.map +1 -1
- package/dist/types/en-US.data-display.d.ts.map +1 -1
- package/dist/types/icons/paths.generated.d.ts +2 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -1
- package/dist/types/pt-BR.data-display.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Progress/Progress.base.d.ts +8 -0
- package/dist/types-native/components/data-display/Progress/Progress.base.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Progress/Progress.native.d.ts.map +1 -1
- package/dist/types-native/components/feedback/Dialog/Dialog.base.d.ts +2 -1
- package/dist/types-native/components/feedback/Dialog/Dialog.base.d.ts.map +1 -1
- package/dist/types-native/components/feedback/Dialog/Dialog.look.native.d.ts.map +1 -1
- package/dist/types-native/icons/paths.generated.d.ts +2 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -1
- package/dist/user-avatar.js +3 -3
- package/package.json +1 -1
- package/src/components/data-display/DataViews/DataViewsTableBase.tsx +7 -36
- package/src/components/data-display/DataViews/base-list-card-geometry.tsx +114 -40
- package/src/components/data-display/DataViews/base-list-card-layout.tsx +104 -0
- package/src/components/data-display/DataViews/base-list-card-slots.tsx +47 -3
- package/src/components/data-display/DataViews/base-list-card.tsx +65 -68
- package/src/components/data-display/DataViews/data-views-copy.ts +7 -0
- package/src/components/data-display/DataViews/data-views-grid-parts.tsx +2 -1
- package/src/components/data-display/DataViews/data-views-selection-extra.ts +10 -1
- package/src/components/data-display/DataViews/data-views-shell-toolbar.tsx +4 -0
- package/src/components/data-display/DataViews/data-views-toolbar.tsx +4 -0
- package/src/components/data-display/DataViews/data-views-url-echo.ts +134 -0
- package/src/components/data-display/DataViews/list-card-rails.tsx +22 -6
- package/src/components/data-display/Progress/Progress.base.ts +10 -0
- package/src/components/data-display/Progress/Progress.md +23 -0
- package/src/components/data-display/Progress/Progress.native.tsx +35 -25
- package/src/components/data-display/Progress/Progress.tsx +8 -5
- package/src/components/feedback/Dialog/Dialog.base.ts +2 -1
- package/src/components/feedback/Dialog/Dialog.look.native.ts +1 -0
- package/src/components/feedback/Dialog/Dialog.md +25 -1
- package/src/components/feedback/Dialog/Dialog.styles.ts +3 -0
- package/src/components/layout/ContentToolbar/ContentToolbar.md +5 -2
- package/src/components/layout/ContentToolbar/ContentToolbar.tsx +51 -10
- package/src/components/layout/ContentToolbar/ContentToolbar.types.ts +14 -0
- package/src/en-US.data-display.ts +1 -0
- package/src/icons/Icon.md +4 -0
- package/src/icons/glyphs.json +2 -0
- package/src/icons/paths.generated.ts +2 -0
- package/src/pt-BR.data-display.ts +1 -0
- package/dist/chunk-45PGSVOH.js.map +0 -1
- package/dist/chunk-4JBS6NOT.js.map +0 -1
- package/dist/chunk-A6EUQDRK.js.map +0 -1
- package/dist/chunk-C3BRCCHG.js.map +0 -1
- package/dist/chunk-JF5LQOGB.js.map +0 -1
- package/dist/chunk-KEKOPD43.js.map +0 -1
- package/dist/chunk-LJKWWXZD.js.map +0 -1
- package/dist/chunk-TZFBJ47T.js.map +0 -1
- package/dist/chunk-XTHDWW4M.js.map +0 -1
- /package/dist/{chunk-MKAA3YIJ.js.map → chunk-3K7WN2PO.js.map} +0 -0
- /package/dist/{chunk-CLC4VIOF.js.map → chunk-4PYEDDYV.js.map} +0 -0
- /package/dist/{chunk-573XC4HK.js.map → chunk-4QKS5Y35.js.map} +0 -0
- /package/dist/{chunk-N4MR4EMC.js.map → chunk-6D2PFC5C.js.map} +0 -0
- /package/dist/{chunk-JWXGZ4VM.js.map → chunk-6J27G2HT.js.map} +0 -0
- /package/dist/{chunk-ICSXPZXT.js.map → chunk-6QBT5TPS.js.map} +0 -0
- /package/dist/{chunk-C67FDYG7.js.map → chunk-7CWZI6MQ.js.map} +0 -0
- /package/dist/{chunk-JL77BSOL.js.map → chunk-AQI3UK6P.js.map} +0 -0
- /package/dist/{chunk-6E4XNOAC.js.map → chunk-CCCILWYZ.js.map} +0 -0
- /package/dist/{chunk-GI24X7XA.js.map → chunk-DZIRCD2W.js.map} +0 -0
- /package/dist/{chunk-53ACGKBW.js.map → chunk-EDBP62WG.js.map} +0 -0
- /package/dist/{chunk-YXIVQFNW.js.map → chunk-EWIKSTJV.js.map} +0 -0
- /package/dist/{chunk-LWZ2K225.js.map → chunk-FXZUVZON.js.map} +0 -0
- /package/dist/{chunk-IK2ZVV3M.js.map → chunk-GK7JNSMK.js.map} +0 -0
- /package/dist/{chunk-Y2HCYT5W.js.map → chunk-GRRW5NSR.js.map} +0 -0
- /package/dist/{chunk-NZZ2BTIK.js.map → chunk-H7R6UKOE.js.map} +0 -0
- /package/dist/{chunk-HFBQCJNP.js.map → chunk-HCYRCU4W.js.map} +0 -0
- /package/dist/{chunk-7AAJYWC3.js.map → chunk-HPO7PB4F.js.map} +0 -0
- /package/dist/{chunk-WF3P7GE5.js.map → chunk-I3CQBEKS.js.map} +0 -0
- /package/dist/{chunk-RREWYOKS.js.map → chunk-IL4FCC54.js.map} +0 -0
- /package/dist/{chunk-7M3DRP7Q.js.map → chunk-ILNO4ZJ6.js.map} +0 -0
- /package/dist/{chunk-AL3Z24VG.js.map → chunk-ILQVNZ5B.js.map} +0 -0
- /package/dist/{chunk-5PN5MY2X.js.map → chunk-INQO5AYV.js.map} +0 -0
- /package/dist/{chunk-2DV64INT.js.map → chunk-KEDZTZCV.js.map} +0 -0
- /package/dist/{chunk-EUPUEMFX.js.map → chunk-PC4H5LVB.js.map} +0 -0
- /package/dist/{chunk-44JLXXWQ.js.map → chunk-PPITQH3C.js.map} +0 -0
- /package/dist/{chunk-JC244QQF.js.map → chunk-SEWUYHSG.js.map} +0 -0
- /package/dist/{chunk-OBMPE6PW.js.map → chunk-SSDYEOU4.js.map} +0 -0
- /package/dist/{chunk-I6ESCBY3.js.map → chunk-TF27Z27K.js.map} +0 -0
- /package/dist/{chunk-RBHBJDOZ.js.map → chunk-UEU5NSIG.js.map} +0 -0
- /package/dist/{chunk-5XZEGI35.js.map → chunk-X7HCS3HP.js.map} +0 -0
- /package/dist/{chunk-T2S7NIUG.js.map → chunk-XE4JVTM6.js.map} +0 -0
- /package/dist/{chunk-G76BNXWE.js.map → chunk-XW5SEW3H.js.map} +0 -0
- /package/dist/{chunk-SIWXMNQT.js.map → chunk-YDTCM5F6.js.map} +0 -0
- /package/dist/{chunk-46ZATLQV.js.map → chunk-YIKFYWKD.js.map} +0 -0
- /package/dist/{chunk-BQGWY577.js.map → chunk-ZCUVZ5PR.js.map} +0 -0
- /package/dist/{chunk-VWW2EXH7.js.map → chunk-ZYJZHXFU.js.map} +0 -0
- /package/dist/native/chunks/{chunk-QGTZGL7P.js.map → chunk-BUFQXX27.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmptyState
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-BUFQXX27.js";
|
|
4
4
|
import "../chunks/chunk-MU5EIZSP.js";
|
|
5
5
|
import "../chunks/chunk-3JBZE4I6.js";
|
|
6
6
|
import "../chunks/chunk-ZRQHLTYG.js";
|
|
7
7
|
import "../chunks/chunk-DN73KYIZ.js";
|
|
8
8
|
import "../chunks/chunk-5GJ5OG5R.js";
|
|
9
|
-
import "../chunks/chunk-
|
|
9
|
+
import "../chunks/chunk-JFKH5YHF.js";
|
|
10
10
|
import "../chunks/chunk-2UFNPDYT.js";
|
|
11
11
|
import "../chunks/chunk-5WLOVHKK.js";
|
|
12
12
|
import "../chunks/chunk-AR5O4BEY.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "../chunks/chunk-MJVSQXOD.js";
|
|
8
8
|
import {
|
|
9
9
|
EmptyState
|
|
10
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-BUFQXX27.js";
|
|
11
11
|
import "../chunks/chunk-MU5EIZSP.js";
|
|
12
12
|
import "../chunks/chunk-3JBZE4I6.js";
|
|
13
13
|
import "../chunks/chunk-ZRQHLTYG.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
webRole
|
|
17
17
|
} from "../chunks/chunk-DN73KYIZ.js";
|
|
18
18
|
import "../chunks/chunk-5GJ5OG5R.js";
|
|
19
|
-
import "../chunks/chunk-
|
|
19
|
+
import "../chunks/chunk-JFKH5YHF.js";
|
|
20
20
|
import {
|
|
21
21
|
MUI_FONT_WEIGHT_MEDIUM,
|
|
22
22
|
muiTypeStyle
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useLoopedProgress
|
|
3
3
|
} from "../chunks/chunk-MLQIOKQZ.js";
|
|
4
|
+
import {
|
|
5
|
+
renderTextChildren
|
|
6
|
+
} from "../chunks/chunk-5GJ5OG5R.js";
|
|
4
7
|
import {
|
|
5
8
|
MUI_TYPE
|
|
6
9
|
} from "../chunks/chunk-2UFNPDYT.js";
|
|
@@ -295,7 +298,8 @@ function CircularView({
|
|
|
295
298
|
containerRef,
|
|
296
299
|
rest,
|
|
297
300
|
thickness,
|
|
298
|
-
circularSize
|
|
301
|
+
circularSize,
|
|
302
|
+
centerContent
|
|
299
303
|
}) {
|
|
300
304
|
const theme = useUiTheme();
|
|
301
305
|
const indeterminate = value === void 0;
|
|
@@ -303,7 +307,7 @@ function CircularView({
|
|
|
303
307
|
const spin = useSpinStyle(indeterminate);
|
|
304
308
|
const diameter = circularSize || PROGRESS_SIZES[size].circularSize;
|
|
305
309
|
const box = { width: diameter, height: diameter };
|
|
306
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ jsx(View, { ref: containerRef, testID, style: [styles.inline, style], children: /* @__PURE__ */ jsxs(View, { style: [box, styles.inline], children: [
|
|
307
311
|
/* @__PURE__ */ jsx(
|
|
308
312
|
Animated.View,
|
|
309
313
|
{
|
|
@@ -323,8 +327,8 @@ function CircularView({
|
|
|
323
327
|
) })
|
|
324
328
|
}
|
|
325
329
|
),
|
|
326
|
-
showLabel && !indeterminate ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.centre], children: /* @__PURE__ */ jsx(ProgressLabel, { size, label: displayLabel, testID: `${testID}-label`, muted: true }) }) : null
|
|
327
|
-
] });
|
|
330
|
+
centerContent != null ? /* @__PURE__ */ jsx(View, { testID: `${testID}-center`, style: [StyleSheet.absoluteFill, styles.centre], children: renderTextChildren(centerContent, labelStyle(theme, size, true)) }) : showLabel && !indeterminate ? /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles.centre], children: /* @__PURE__ */ jsx(ProgressLabel, { size, label: displayLabel, testID: `${testID}-label`, muted: true }) }) : null
|
|
331
|
+
] }) });
|
|
328
332
|
}
|
|
329
333
|
function SegmentedView({
|
|
330
334
|
size,
|
|
@@ -375,6 +379,7 @@ var Progress = React.forwardRef((rawProps, ref) => {
|
|
|
375
379
|
pulse,
|
|
376
380
|
showLabel,
|
|
377
381
|
label,
|
|
382
|
+
centerContent,
|
|
378
383
|
segments,
|
|
379
384
|
thickness,
|
|
380
385
|
circularSize,
|
|
@@ -409,7 +414,8 @@ var Progress = React.forwardRef((rawProps, ref) => {
|
|
|
409
414
|
...shared,
|
|
410
415
|
elementTestID: elementId ?? `${base}-circular`,
|
|
411
416
|
thickness,
|
|
412
|
-
circularSize
|
|
417
|
+
circularSize,
|
|
418
|
+
centerContent
|
|
413
419
|
}
|
|
414
420
|
);
|
|
415
421
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/data-display/Progress/Progress.native.tsx","../../../src/components/data-display/Progress/Progress.helpers.ts","../../../src/components/data-display/Progress/Progress.metrics.ts","../../../src/components/data-display/Progress/Progress.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n StyleSheet,\n Text as RNText,\n View,\n type StyleProp,\n type ViewProps,\n type ViewStyle,\n} from 'react-native';\nimport Svg, { Circle } from 'react-native-svg';\n\nimport { progressFraction, progressLabelText, resolveProgressProps } from './Progress.helpers';\nimport {\n barStyle,\n circularGlowStyle,\n labelStyle,\n segmentStyle,\n trackStyle,\n} from './Progress.look.native';\nimport {\n CIRCULAR_INDETERMINATE,\n CIRCULAR_ROTATION_DEG,\n CIRCULAR_VIEWBOX,\n LABEL_MARGIN_TOP_UNITS,\n LINEAR_INDETERMINATE,\n PROGRESS_SIZES,\n PULSE,\n SEGMENT_GAP_UNITS,\n circularCircumference,\n circularDashOffset,\n progressPalette,\n} from './Progress.metrics';\nimport type { ProgressProps, ProgressSize, ProgressVariant } from './Progress.types.native';\nimport { useLoopedProgress } from '../../../platform/animation';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\ntype ValueAria = Pick<ViewProps, 'aria-valuenow' | 'aria-valuemin' | 'aria-valuemax'>;\n\n/** MUI names the value only when it knows it; an indeterminate bar reports none. */\nconst valueAria = (value: number | undefined): ValueAria =>\n value === undefined\n ? {}\n : { 'aria-valuenow': Math.round(value), 'aria-valuemin': 0, 'aria-valuemax': 100 };\n\n/** MUI's `pulseAnimation`, as an opacity the caller can merge into a style. */\nfunction usePulseStyle(enabled: boolean): { opacity: Animated.AnimatedInterpolation<number> } | null {\n const progress = useLoopedProgress(enabled, {\n durationMs: PULSE.durationMs,\n easing: PULSE_EASING,\n });\n if (!enabled) return null;\n return {\n opacity: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [1, PULSE.dip, 1] }),\n };\n}\n\nconst PULSE_EASING = Easing.inOut(Easing.ease);\n\ninterface ViewArgs {\n size: ProgressSize;\n color: ColorValue;\n glow: boolean;\n pulse: boolean;\n showLabel: boolean;\n displayValue: number;\n displayLabel: string;\n /** Absent means indeterminate — the bar animates rather than reporting progress. */\n value?: number;\n /** The component's own id; the parts derive theirs from it. */\n testID: string;\n /** The id the addressed element takes — the caller's `data-testid` when they gave one. */\n elementTestID: string;\n style?: StyleProp<ViewStyle>;\n containerRef?: React.Ref<View>;\n rest: ViewProps;\n}\n\nfunction ProgressLabel({\n size,\n label,\n testID,\n muted = false,\n spaced = false,\n}: {\n size: ProgressSize;\n label: string;\n testID: string;\n muted?: boolean;\n spaced?: boolean;\n}): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <RNText\n testID={testID}\n style={[\n labelStyle(theme, size, muted),\n spaced ? { marginTop: theme.spacing(LABEL_MARGIN_TOP_UNITS) } : null,\n ]}\n >\n {label}\n </RNText>\n );\n}\n\n/**\n * MUI's `bar1Indeterminate`: a third of the track crossing it every 2.1s.\n * Two bars on the web, one here — `NATIVE-NOTES.md` records the difference.\n */\nfunction useSweepStyle(enabled: boolean): Animated.WithAnimatedValue<ViewStyle> | null {\n const width = `${LINEAR_INDETERMINATE.width * 100}%` as const;\n const progress = useLoopedProgress(enabled, {\n durationMs: LINEAR_INDETERMINATE.durationMs,\n // `left` is a layout property, which the native driver cannot animate.\n useNativeDriver: false,\n });\n if (!enabled) return null;\n return {\n position: 'absolute',\n top: 0,\n bottom: 0,\n width,\n left: progress.interpolate({ inputRange: [0, 1], outputRange: [`-${width}`, '100%'] }),\n };\n}\n\nfunction LinearView({\n variant,\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n value,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n}: ViewArgs & { variant: ProgressVariant }): React.JSX.Element {\n const theme = useUiTheme();\n const pulseStyle = usePulseStyle(pulse);\n const sweep = useSweepStyle(value === undefined);\n\n return (\n <View ref={containerRef} testID={testID} style={[styles.block, style]}>\n <View\n testID={elementTestID}\n role=\"progressbar\"\n {...valueAria(value)}\n style={trackStyle(theme, size, color)}\n {...rest}\n >\n <Animated.View\n style={[\n barStyle(theme, { variant, size, color, glow }),\n sweep ?? { width: `${progressFraction(displayValue)}%` },\n pulseStyle,\n ]}\n />\n </View>\n {showLabel ? (\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} spaced />\n ) : null}\n </View>\n );\n}\n\n/** MUI's `circular-rotate`: one turn every 1.4s behind an arc that never closes. */\nfunction useSpinStyle(enabled: boolean): Animated.WithAnimatedValue<ViewStyle> {\n const progress = useLoopedProgress(enabled, {\n durationMs: CIRCULAR_INDETERMINATE.rotationMs,\n });\n if (!enabled) {\n return { transform: [{ rotate: `${CIRCULAR_ROTATION_DEG}deg` }] };\n }\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n ],\n };\n}\n\nfunction CircularDial({\n diameter,\n thickness,\n stroke,\n dashOffset,\n}: {\n diameter: number;\n thickness: number;\n stroke: string;\n dashOffset: number;\n}): React.JSX.Element {\n const half = CIRCULAR_VIEWBOX / 2;\n return (\n <Svg\n width={diameter}\n height={diameter}\n viewBox={`${half} ${half} ${CIRCULAR_VIEWBOX} ${CIRCULAR_VIEWBOX}`}\n >\n <Circle\n cx={CIRCULAR_VIEWBOX}\n cy={CIRCULAR_VIEWBOX}\n r={(CIRCULAR_VIEWBOX - thickness) / 2}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={thickness}\n strokeDasharray={circularCircumference(thickness)}\n strokeDashoffset={dashOffset}\n />\n </Svg>\n );\n}\n\nfunction CircularView({\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n value,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n thickness,\n circularSize,\n}: ViewArgs & { thickness: number; circularSize?: number }): React.JSX.Element {\n const theme = useUiTheme();\n const indeterminate = value === undefined;\n const pulseStyle = usePulseStyle(pulse);\n const spin = useSpinStyle(indeterminate);\n const diameter = circularSize || PROGRESS_SIZES[size].circularSize;\n const box = { width: diameter, height: diameter };\n\n return (\n <View ref={containerRef} testID={testID} style={[styles.inline, style]}>\n <Animated.View\n testID={elementTestID}\n role=\"progressbar\"\n {...valueAria(value)}\n style={[box, glow ? circularGlowStyle(theme, color) : null, pulseStyle]}\n {...rest}\n >\n <Animated.View style={[box, spin]}>\n <CircularDial\n diameter={diameter}\n thickness={thickness}\n stroke={progressPalette(theme, color).main}\n dashOffset={\n indeterminate\n ? circularCircumference(thickness) * (1 - CIRCULAR_INDETERMINATE.arc)\n : circularDashOffset(displayValue, thickness)\n }\n />\n </Animated.View>\n </Animated.View>\n {showLabel && !indeterminate ? (\n <View style={[StyleSheet.absoluteFill, styles.centre]}>\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} muted />\n </View>\n ) : null}\n </View>\n );\n}\n\nfunction SegmentedView({\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n segments,\n}: ViewArgs & { segments: number }): React.JSX.Element {\n const theme = useUiTheme();\n const pulseStyle = usePulseStyle(pulse);\n const filled = Math.floor((progressFraction(displayValue) / 100) * segments);\n\n return (\n <View ref={containerRef} testID={elementTestID} style={[styles.block, style]} {...rest}>\n <View\n testID={`${testID}-segments-container`}\n style={[styles.segments, { gap: theme.spacing(SEGMENT_GAP_UNITS) }]}\n >\n {Array.from({ length: segments }, (_, index) => (\n <Animated.View\n key={`segment-${index}`}\n testID={`${testID}-segment-${index}`}\n style={[\n segmentStyle(theme, { size, color, filled: index < filled, glow }),\n index < filled ? pulseStyle : null,\n ]}\n />\n ))}\n </View>\n {showLabel ? (\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} spaced />\n ) : null}\n </View>\n );\n}\n\n/**\n * The native `Progress`: the same track, bar, dial and segments the MUI half\n * draws, on `View`s and a `react-native-svg` arc.\n */\nexport const Progress = React.forwardRef<View, ProgressProps>((rawProps, ref) => {\n const {\n variant,\n size,\n color,\n glow,\n pulse,\n showLabel,\n label,\n segments,\n thickness,\n circularSize,\n value,\n dataTestId,\n testID,\n style,\n 'data-testid': elementId,\n ...rest\n } = resolveProgressProps(rawProps);\n const displayValue = value || 0;\n // `testID` is React Native's spelling of `dataTestId` and names the component;\n // `data-testid` names the ELEMENT, which is where the web puts it.\n const base = testID ?? dataTestId;\n const shared: ViewArgs = {\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel: progressLabelText(label, showLabel, displayValue),\n value,\n testID: base,\n elementTestID: base,\n style,\n containerRef: ref,\n rest,\n };\n\n if (variant === 'circular') {\n return (\n <CircularView\n {...shared}\n elementTestID={elementId ?? `${base}-circular`}\n thickness={thickness}\n circularSize={circularSize}\n />\n );\n }\n\n if (variant === 'segmented') {\n return <SegmentedView {...shared} elementTestID={elementId ?? base} segments={segments} />;\n }\n\n return <LinearView {...shared} elementTestID={elementId ?? `${base}-linear`} variant={variant} />;\n});\n\nProgress.displayName = 'Progress';\n\nconst styles = StyleSheet.create({\n block: { width: '100%' },\n /** MUI's `display: inline-flex` on the circular wrapper. */\n inline: { position: 'relative', alignSelf: 'flex-start' },\n centre: { alignItems: 'center', justifyContent: 'center' },\n segments: { flexDirection: 'row', width: '100%' },\n});\n","import type { ProgressBaseProps } from './Progress.base';\n\ntype ProgressDefaultedKeys =\n | 'variant'\n | 'size'\n | 'color'\n | 'glow'\n | 'pulse'\n | 'showLabel'\n | 'segments'\n | 'thickness'\n | 'dataTestId';\n\n/**\n * Generic over the renderer's own props: the web and the native `Progress`\n * carry different extras (MUI's `LinearProgress` props against a `View`'s), and\n * both come back out untouched.\n */\ntype ResolvedProgressProps<P extends ProgressBaseProps> = P &\n Required<Pick<ProgressBaseProps, ProgressDefaultedKeys>>;\n\nconst PROGRESS_DEFAULTS: Required<Pick<ProgressBaseProps, ProgressDefaultedKeys>> = {\n variant: 'linear',\n size: 'md',\n color: 'primary',\n glow: false,\n pulse: false,\n showLabel: false,\n segments: 10,\n thickness: 4,\n dataTestId: 'progress',\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = <P extends ProgressBaseProps>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\nexport const resolveProgressProps = <P extends ProgressBaseProps>(\n props: P,\n): ResolvedProgressProps<P> =>\n ({ ...PROGRESS_DEFAULTS, ...definedProps(props) }) as ResolvedProgressProps<P>;\n\n/**\n * The label the caller asked for, or the rounded percentage when they only\n * asked for one. Empty when there is nothing to show.\n */\nexport const progressLabelText = (\n label: string | undefined,\n showLabel: boolean,\n displayValue: number,\n): string => label || (showLabel ? `${Math.round(displayValue)}%` : '');\n\n/** How much of the track the bar covers, 0 to 100 — a value outside that is clamped. */\nexport const progressFraction = (value: number): number =>\n Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;\n","import type { ProgressSize } from './Progress.base';\nimport { contrastText, GREY, type UiPaletteColor, type UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE NUMBERS BOTH `Progress` RENDERERS DRAW WITH.\n *\n * `Progress.styles.ts` (web, emotion over MUI's `LinearProgress` and\n * `CircularProgress`) and `Progress.native.tsx` (React Native, with\n * `react-native-svg` for the arc) read this one table. The web turns the px\n * into rem and the shadows into CSS strings; native uses the numbers.\n *\n * The `CIRCULAR_*` group is MUI's OWN geometry, restated because the native\n * half draws the arc itself: a 44-unit viewBox whose circle is inset by the\n * stroke, with the value expressed as a dash offset — the same arithmetic\n * MUI's `CircularProgress` runs, so the two draw the same sweep.\n */\nexport interface ProgressSizeMetrics {\n /** The linear track's height, in px. The bar's radius is half of it. */\n height: number;\n /** The circular variant's diameter, in px. */\n circularSize: number;\n /** The label's type size, in px. */\n fontSize: number;\n}\n\nexport const PROGRESS_SIZES: Record<ProgressSize, ProgressSizeMetrics> = {\n xs: { height: 2, circularSize: 24, fontSize: 10 },\n sm: { height: 4, circularSize: 32, fontSize: 12 },\n md: { height: 6, circularSize: 40, fontSize: 14 },\n lg: { height: 8, circularSize: 48, fontSize: 16 },\n xl: { height: 10, circularSize: 56, fontSize: 18 },\n};\n\n/** The unfilled track, and an unfilled segment: the hue at a tenth. */\nexport const TRACK_ALPHA = 0.1;\n\n/** The label is MUI's `caption` at the size's own step, in semibold. */\nexport const LABEL_FONT_WEIGHT = 600;\n/** `mt: 1` between a linear or segmented bar and its label. */\nexport const LABEL_MARGIN_TOP_UNITS = 1;\n/** `gap: 0.5` between segments. */\nexport const SEGMENT_GAP_UNITS = 0.5;\n\n/** `glass`: the hue at 80% behind a 10px blur, inside a 30% hairline. */\nexport const GLASS_BAR_ALPHA = 0.8;\nexport const GLASS_BAR_BORDER_ALPHA = 0.3;\nexport const GLASS_BLUR_PX = 10;\n\n/** `glow` on a bar: `0 0 10px 2px alpha(main, 0.4)` and a 1.1 brightness lift. */\nexport const BAR_GLOW = { blur: 10, spread: 2, alpha: 0.4 } as const;\nexport const GLOW_BRIGHTNESS = 1.1;\n/** `glow` on a filled segment: the same shadow, one step tighter. */\nexport const SEGMENT_GLOW = { blur: 6, spread: 1, alpha: 0.4 } as const;\n/** `glow` on the circular arc: `drop-shadow(0 0 8px alpha(main, 0.6))`. */\nexport const CIRCULAR_GLOW = { blur: 8, alpha: 0.6 } as const;\n\n/** MUI's `pulseAnimation`: opacity 1 → 0.7 → 1, every two seconds. */\nexport const PULSE = { durationMs: 2000, dip: 0.7 } as const;\n\n/** `transition: all 0.3s ease` on the bar and on every segment. */\nexport const TRANSITION_MS = 300;\n\n/* ── MUI's `CircularProgress`, restated for the renderer that has no MUI ──── */\n\n/** MUI's `SIZE`: the arc is drawn in a 44-unit box and scaled to the px size. */\nexport const CIRCULAR_VIEWBOX = 44;\n/** MUI puts the determinate arc's start at twelve o'clock. */\nexport const CIRCULAR_ROTATION_DEG = -90;\n/** The circumference of the circle a `thickness` leaves room for. */\nexport const circularCircumference = (thickness: number): number =>\n 2 * Math.PI * ((CIRCULAR_VIEWBOX - thickness) / 2);\n/** MUI's `strokeDashoffset`: the share of the circumference still to run. */\nexport const circularDashOffset = (value: number, thickness: number): number =>\n ((100 - value) / 100) * circularCircumference(thickness);\n\n/**\n * MUI's indeterminate `CircularProgress` never closes the ring: it draws\n * roughly a fifth of it and spins. One turn every 1.4s, as MUI's\n * `circular-rotate` keyframes do.\n */\nexport const CIRCULAR_INDETERMINATE = { arc: 0.25, rotationMs: 1400 } as const;\n/** MUI's `bar1Indeterminate` keyframes: 2.1s a lap, over about a third of the track. */\nexport const LINEAR_INDETERMINATE = { width: 0.35, durationMs: 2100 } as const;\n\n/**\n * `neutral` has no palette slot of its own in MUI, so `Progress.styles.ts` has\n * always drawn it from three greys; `danger` is MUI's `error`, which is what\n * the shared theme calls `danger`. Same colours here.\n */\nexport function progressPalette(theme: UiTheme, color: ColorValue): UiPaletteColor {\n if (color === 'neutral') {\n return {\n light: GREY[300],\n main: GREY[500],\n dark: GREY[700],\n contrastText: contrastText(GREY[500]),\n };\n }\n return theme.palette[color];\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { ProgressSize, ProgressVariant } from './Progress.base';\nimport {\n BAR_GLOW,\n CIRCULAR_GLOW,\n GLASS_BAR_ALPHA,\n GLASS_BAR_BORDER_ALPHA,\n LABEL_FONT_WEIGHT,\n PROGRESS_SIZES,\n SEGMENT_GLOW,\n TRACK_ALPHA,\n progressPalette,\n} from './Progress.metrics';\nimport { MUI_TYPE } from '../../../tokens/mui-type';\nimport { alpha } from '../../../tokens/color';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/** `0 0 <blur>px <spread>px alpha(main, a)`, the string both renderers write. */\nconst glowShadow = (\n main: string,\n { blur, spread, alpha: a }: { blur: number; spread: number; alpha: number },\n): string => `0 0 ${blur}px ${spread}px ${alpha(main, a)}`;\n\n/** The unfilled track a linear bar runs in. */\nexport function trackStyle(theme: UiTheme, size: ProgressSize, color: ColorValue): ViewStyle {\n const { height } = PROGRESS_SIZES[size];\n return {\n width: '100%',\n height,\n borderRadius: height / 2,\n backgroundColor: alpha(progressPalette(theme, color).main, TRACK_ALPHA),\n // The bar inherits the track's radius on the web; here it is clipped to it.\n overflow: 'hidden',\n };\n}\n\n/**\n * What the web's `barVariantStyles` paint. `gradient` is the one honest gap:\n * React Native core has no gradient fill, so it takes the first stop.\n */\nfunction barPaint(variant: ProgressVariant, palette: UiPaletteColor): ViewStyle {\n switch (variant) {\n case 'gradient':\n return { backgroundColor: palette.main };\n case 'glass':\n return {\n backgroundColor: alpha(palette.main, GLASS_BAR_ALPHA),\n borderWidth: 1,\n borderColor: alpha(palette.main, GLASS_BAR_BORDER_ALPHA),\n };\n default:\n return { backgroundColor: palette.main };\n }\n}\n\n/** The bar itself: the variant's paint, the glow, and the height of its track. */\nexport function barStyle(\n theme: UiTheme,\n a: { variant: ProgressVariant; size: ProgressSize; color: ColorValue; glow: boolean },\n): ViewStyle {\n const palette = progressPalette(theme, a.color);\n const { height } = PROGRESS_SIZES[a.size];\n return {\n height: '100%',\n borderRadius: height / 2,\n ...barPaint(a.variant, palette),\n ...(a.glow ? { boxShadow: glowShadow(palette.main, BAR_GLOW) } : {}),\n };\n}\n\n/** One segment of the segmented variant: filled with the hue, or a tenth of it. */\nexport function segmentStyle(\n theme: UiTheme,\n a: { size: ProgressSize; color: ColorValue; filled: boolean; glow: boolean },\n): ViewStyle {\n const palette = progressPalette(theme, a.color);\n const { height } = PROGRESS_SIZES[a.size];\n return {\n flex: 1,\n height,\n borderRadius: height / 2,\n backgroundColor: a.filled ? palette.main : alpha(palette.main, TRACK_ALPHA),\n ...(a.glow && a.filled ? { boxShadow: glowShadow(palette.main, SEGMENT_GLOW) } : {}),\n };\n}\n\n/** The circular arc's glow: the web's `drop-shadow`, as a box shadow round the dial. */\nexport function circularGlowStyle(theme: UiTheme, color: ColorValue): ViewStyle {\n const main = progressPalette(theme, color).main;\n return { boxShadow: `0 0 ${CIRCULAR_GLOW.blur}px ${alpha(main, CIRCULAR_GLOW.alpha)}` };\n}\n\n/**\n * The label: MUI's `caption` ratios at the size's own step, in semibold. The\n * circular variant sets it in the muted ink, as `color=\"text.secondary\"` does.\n */\nexport function labelStyle(theme: UiTheme, size: ProgressSize, muted = false): TextStyle {\n const fontSize = PROGRESS_SIZES[size].fontSize;\n const caption = MUI_TYPE.caption;\n return {\n fontFamily: theme.typography.fontFamily,\n fontSize,\n lineHeight: fontSize * caption.lineHeight,\n letterSpacing: fontSize * caption.letterSpacingEm,\n fontWeight: String(LABEL_FONT_WEIGHT) as TextStyle['fontWeight'],\n textAlign: 'center',\n color: muted ? theme.palette.text.secondary : theme.palette.text.primary,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,OAIK;AACP,OAAO,OAAO,cAAc;;;ACU5B,IAAM,oBAA8E;AAAA,EAClF,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AACd;AAIA,IAAM,eAAe,CAA8B,UACjD,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAEK,IAAM,uBAAuB,CAClC,WAEC,EAAE,GAAG,mBAAmB,GAAG,aAAa,KAAK,EAAE;AAM3C,IAAM,oBAAoB,CAC/B,OACA,WACA,iBACW,UAAU,YAAY,GAAG,KAAK,MAAM,YAAY,CAAC,MAAM;AAG7D,IAAM,mBAAmB,CAAC,UAC/B,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,IAAI;;;AC/BxD,IAAM,iBAA4D;AAAA,EACvE,IAAI,EAAE,QAAQ,GAAG,cAAc,IAAI,UAAU,GAAG;AAAA,EAChD,IAAI,EAAE,QAAQ,GAAG,cAAc,IAAI,UAAU,GAAG;AAAA,EAChD,IAAI,EAAE,QAAQ,GAAG,cAAc,IAAI,UAAU,GAAG;AAAA,EAChD,IAAI,EAAE,QAAQ,GAAG,cAAc,I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I;AAAA,QACnC;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,MAAI,YAAY,aAAa;AAC3B,WAAO,oBAAC,iBAAe,GAAG,QAAQ,eAAe,aAAa,MAAM,UAAoB;AAAA,EAC1F;AAEA,SAAO,oBAAC,cAAY,GAAG,QAAQ,eAAe,aAAa,GAAG,IAAI,WAAW,SAAkB;AACjG,CAAC;AAED,SAAS,cAAc;AAEvB,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO,EAAE,OAAO,OAAO;AAAA;AAAA,EAEvB,QAAQ,EAAE,UAAU,YAAY,WAAW,aAAa;AAAA,EACxD,QAAQ,EAAE,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACzD,UAAU,EAAE,eAAe,OAAO,OAAO,OAAO;AAClD,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/data-display/Progress/Progress.native.tsx","../../../src/components/data-display/Progress/Progress.helpers.ts","../../../src/components/data-display/Progress/Progress.metrics.ts","../../../src/components/data-display/Progress/Progress.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n StyleSheet,\n Text as RNText,\n View,\n type StyleProp,\n type ViewProps,\n type ViewStyle,\n} from 'react-native';\nimport Svg, { Circle } from 'react-native-svg';\n\nimport { progressFraction, progressLabelText, resolveProgressProps } from './Progress.helpers';\nimport {\n barStyle,\n circularGlowStyle,\n labelStyle,\n segmentStyle,\n trackStyle,\n} from './Progress.look.native';\nimport {\n CIRCULAR_INDETERMINATE,\n CIRCULAR_ROTATION_DEG,\n CIRCULAR_VIEWBOX,\n LABEL_MARGIN_TOP_UNITS,\n LINEAR_INDETERMINATE,\n PROGRESS_SIZES,\n PULSE,\n SEGMENT_GAP_UNITS,\n circularCircumference,\n circularDashOffset,\n progressPalette,\n} from './Progress.metrics';\nimport type { ProgressProps, ProgressSize, ProgressVariant } from './Progress.types.native';\nimport { useLoopedProgress } from '../../../platform/animation';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\ntype ValueAria = Pick<ViewProps, 'aria-valuenow' | 'aria-valuemin' | 'aria-valuemax'>;\n\n/** MUI names the value only when it knows it; an indeterminate bar reports none. */\nconst valueAria = (value: number | undefined): ValueAria =>\n value === undefined\n ? {}\n : { 'aria-valuenow': Math.round(value), 'aria-valuemin': 0, 'aria-valuemax': 100 };\n\n/** MUI's `pulseAnimation`, as an opacity the caller can merge into a style. */\nfunction usePulseStyle(enabled: boolean): { opacity: Animated.AnimatedInterpolation<number> } | null {\n const progress = useLoopedProgress(enabled, {\n durationMs: PULSE.durationMs,\n easing: PULSE_EASING,\n });\n if (!enabled) return null;\n return {\n opacity: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [1, PULSE.dip, 1] }),\n };\n}\n\nconst PULSE_EASING = Easing.inOut(Easing.ease);\n\ninterface ViewArgs {\n size: ProgressSize;\n color: ColorValue;\n glow: boolean;\n pulse: boolean;\n showLabel: boolean;\n displayValue: number;\n displayLabel: string;\n /** Absent means indeterminate — the bar animates rather than reporting progress. */\n value?: number;\n /** The component's own id; the parts derive theirs from it. */\n testID: string;\n /** The id the addressed element takes — the caller's `data-testid` when they gave one. */\n elementTestID: string;\n style?: StyleProp<ViewStyle>;\n containerRef?: React.Ref<View>;\n rest: ViewProps;\n}\n\nfunction ProgressLabel({\n size,\n label,\n testID,\n muted = false,\n spaced = false,\n}: {\n size: ProgressSize;\n label: string;\n testID: string;\n muted?: boolean;\n spaced?: boolean;\n}): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <RNText\n testID={testID}\n style={[\n labelStyle(theme, size, muted),\n spaced ? { marginTop: theme.spacing(LABEL_MARGIN_TOP_UNITS) } : null,\n ]}\n >\n {label}\n </RNText>\n );\n}\n\n/**\n * MUI's `bar1Indeterminate`: a third of the track crossing it every 2.1s.\n * Two bars on the web, one here — `NATIVE-NOTES.md` records the difference.\n */\nfunction useSweepStyle(enabled: boolean): Animated.WithAnimatedValue<ViewStyle> | null {\n const width = `${LINEAR_INDETERMINATE.width * 100}%` as const;\n const progress = useLoopedProgress(enabled, {\n durationMs: LINEAR_INDETERMINATE.durationMs,\n // `left` is a layout property, which the native driver cannot animate.\n useNativeDriver: false,\n });\n if (!enabled) return null;\n return {\n position: 'absolute',\n top: 0,\n bottom: 0,\n width,\n left: progress.interpolate({ inputRange: [0, 1], outputRange: [`-${width}`, '100%'] }),\n };\n}\n\nfunction LinearView({\n variant,\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n value,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n}: ViewArgs & { variant: ProgressVariant }): React.JSX.Element {\n const theme = useUiTheme();\n const pulseStyle = usePulseStyle(pulse);\n const sweep = useSweepStyle(value === undefined);\n\n return (\n <View ref={containerRef} testID={testID} style={[styles.block, style]}>\n <View\n testID={elementTestID}\n role=\"progressbar\"\n {...valueAria(value)}\n style={trackStyle(theme, size, color)}\n {...rest}\n >\n <Animated.View\n style={[\n barStyle(theme, { variant, size, color, glow }),\n sweep ?? { width: `${progressFraction(displayValue)}%` },\n pulseStyle,\n ]}\n />\n </View>\n {showLabel ? (\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} spaced />\n ) : null}\n </View>\n );\n}\n\n/** MUI's `circular-rotate`: one turn every 1.4s behind an arc that never closes. */\nfunction useSpinStyle(enabled: boolean): Animated.WithAnimatedValue<ViewStyle> {\n const progress = useLoopedProgress(enabled, {\n durationMs: CIRCULAR_INDETERMINATE.rotationMs,\n });\n if (!enabled) {\n return { transform: [{ rotate: `${CIRCULAR_ROTATION_DEG}deg` }] };\n }\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n ],\n };\n}\n\nfunction CircularDial({\n diameter,\n thickness,\n stroke,\n dashOffset,\n}: {\n diameter: number;\n thickness: number;\n stroke: string;\n dashOffset: number;\n}): React.JSX.Element {\n const half = CIRCULAR_VIEWBOX / 2;\n return (\n <Svg\n width={diameter}\n height={diameter}\n viewBox={`${half} ${half} ${CIRCULAR_VIEWBOX} ${CIRCULAR_VIEWBOX}`}\n >\n <Circle\n cx={CIRCULAR_VIEWBOX}\n cy={CIRCULAR_VIEWBOX}\n r={(CIRCULAR_VIEWBOX - thickness) / 2}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={thickness}\n strokeDasharray={circularCircumference(thickness)}\n strokeDashoffset={dashOffset}\n />\n </Svg>\n );\n}\n\nfunction CircularView({\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n value,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n thickness,\n circularSize,\n centerContent,\n}: ViewArgs & { thickness: number; circularSize?: number; centerContent?: React.ReactNode }): React.JSX.Element {\n const theme = useUiTheme();\n const indeterminate = value === undefined;\n const pulseStyle = usePulseStyle(pulse);\n const spin = useSpinStyle(indeterminate);\n const diameter = circularSize || PROGRESS_SIZES[size].circularSize;\n const box = { width: diameter, height: diameter };\n\n return (\n <View ref={containerRef} testID={testID} style={[styles.inline, style]}>\n <View style={[box, styles.inline]}>\n <Animated.View\n testID={elementTestID}\n role=\"progressbar\"\n {...valueAria(value)}\n style={[box, glow ? circularGlowStyle(theme, color) : null, pulseStyle]}\n {...rest}\n >\n <Animated.View style={[box, spin]}>\n <CircularDial\n diameter={diameter}\n thickness={thickness}\n stroke={progressPalette(theme, color).main}\n dashOffset={\n indeterminate\n ? circularCircumference(thickness) * (1 - CIRCULAR_INDETERMINATE.arc)\n : circularDashOffset(displayValue, thickness)\n }\n />\n </Animated.View>\n </Animated.View>\n {centerContent != null ? (\n <View testID={`${testID}-center`} style={[StyleSheet.absoluteFill, styles.centre]}>\n {renderTextChildren(centerContent, labelStyle(theme, size, true))}\n </View>\n ) : showLabel && !indeterminate ? (\n <View style={[StyleSheet.absoluteFill, styles.centre]}>\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} muted />\n </View>\n ) : null}\n </View>\n </View>\n );\n}\n\nfunction SegmentedView({\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel,\n testID,\n elementTestID,\n style,\n containerRef,\n rest,\n segments,\n}: ViewArgs & { segments: number }): React.JSX.Element {\n const theme = useUiTheme();\n const pulseStyle = usePulseStyle(pulse);\n const filled = Math.floor((progressFraction(displayValue) / 100) * segments);\n\n return (\n <View ref={containerRef} testID={elementTestID} style={[styles.block, style]} {...rest}>\n <View\n testID={`${testID}-segments-container`}\n style={[styles.segments, { gap: theme.spacing(SEGMENT_GAP_UNITS) }]}\n >\n {Array.from({ length: segments }, (_, index) => (\n <Animated.View\n key={`segment-${index}`}\n testID={`${testID}-segment-${index}`}\n style={[\n segmentStyle(theme, { size, color, filled: index < filled, glow }),\n index < filled ? pulseStyle : null,\n ]}\n />\n ))}\n </View>\n {showLabel ? (\n <ProgressLabel size={size} label={displayLabel} testID={`${testID}-label`} spaced />\n ) : null}\n </View>\n );\n}\n\n/**\n * The native `Progress`: the same track, bar, dial and segments the MUI half\n * draws, on `View`s and a `react-native-svg` arc.\n */\nexport const Progress = React.forwardRef<View, ProgressProps>((rawProps, ref) => {\n const {\n variant,\n size,\n color,\n glow,\n pulse,\n showLabel,\n label,\n centerContent,\n segments,\n thickness,\n circularSize,\n value,\n dataTestId,\n testID,\n style,\n 'data-testid': elementId,\n ...rest\n } = resolveProgressProps(rawProps);\n const displayValue = value || 0;\n // `testID` is React Native's spelling of `dataTestId` and names the component;\n // `data-testid` names the ELEMENT, which is where the web puts it.\n const base = testID ?? dataTestId;\n const shared: ViewArgs = {\n size,\n color,\n glow,\n pulse,\n showLabel,\n displayValue,\n displayLabel: progressLabelText(label, showLabel, displayValue),\n value,\n testID: base,\n elementTestID: base,\n style,\n containerRef: ref,\n rest,\n };\n\n if (variant === 'circular') {\n return (\n <CircularView\n {...shared}\n elementTestID={elementId ?? `${base}-circular`}\n thickness={thickness}\n circularSize={circularSize}\n centerContent={centerContent}\n />\n );\n }\n\n if (variant === 'segmented') {\n return <SegmentedView {...shared} elementTestID={elementId ?? base} segments={segments} />;\n }\n\n return <LinearView {...shared} elementTestID={elementId ?? `${base}-linear`} variant={variant} />;\n});\n\nProgress.displayName = 'Progress';\n\nconst styles = StyleSheet.create({\n block: { width: '100%' },\n /** MUI's `display: inline-flex` on the circular wrapper. */\n inline: { position: 'relative', alignSelf: 'flex-start' },\n centre: { alignItems: 'center', justifyContent: 'center' },\n segments: { flexDirection: 'row', width: '100%' },\n});\n","import type { ProgressBaseProps } from './Progress.base';\n\ntype ProgressDefaultedKeys =\n | 'variant'\n | 'size'\n | 'color'\n | 'glow'\n | 'pulse'\n | 'showLabel'\n | 'segments'\n | 'thickness'\n | 'dataTestId';\n\n/**\n * Generic over the renderer's own props: the web and the native `Progress`\n * carry different extras (MUI's `LinearProgress` props against a `View`'s), and\n * both come back out untouched.\n */\ntype ResolvedProgressProps<P extends ProgressBaseProps> = P &\n Required<Pick<ProgressBaseProps, ProgressDefaultedKeys>>;\n\nconst PROGRESS_DEFAULTS: Required<Pick<ProgressBaseProps, ProgressDefaultedKeys>> = {\n variant: 'linear',\n size: 'md',\n color: 'primary',\n glow: false,\n pulse: false,\n showLabel: false,\n segments: 10,\n thickness: 4,\n dataTestId: 'progress',\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = <P extends ProgressBaseProps>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\nexport const resolveProgressProps = <P extends ProgressBaseProps>(\n props: P,\n): ResolvedProgressProps<P> =>\n ({ ...PROGRESS_DEFAULTS, ...definedProps(props) }) as ResolvedProgressProps<P>;\n\n/**\n * The label the caller asked for, or the rounded percentage when they only\n * asked for one. Empty when there is nothing to show.\n */\nexport const progressLabelText = (\n label: string | undefined,\n showLabel: boolean,\n displayValue: number,\n): string => label || (showLabel ? `${Math.round(displayValue)}%` : '');\n\n/** How much of the track the bar covers, 0 to 100 — a value outside that is clamped. */\nexport const progressFraction = (value: number): number =>\n Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;\n","import type { ProgressSize } from './Progress.base';\nimport { contrastText, GREY, type UiPaletteColor, type UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE NUMBERS BOTH `Progress` RENDERERS DRAW WITH.\n *\n * `Progress.styles.ts` (web, emotion over MUI's `LinearProgress` and\n * `CircularProgress`) and `Progress.native.tsx` (React Native, with\n * `react-native-svg` for the arc) read this one table. The web turns the px\n * into rem and the shadows into CSS strings; native uses the numbers.\n *\n * The `CIRCULAR_*` group is MUI's OWN geometry, restated because the native\n * half draws the arc itself: a 44-unit viewBox whose circle is inset by the\n * stroke, with the value expressed as a dash offset — the same arithmetic\n * MUI's `CircularProgress` runs, so the two draw the same sweep.\n */\nexport interface ProgressSizeMetrics {\n /** The linear track's height, in px. The bar's radius is half of it. */\n height: number;\n /** The circular variant's diameter, in px. */\n circularSize: number;\n /** The label's type size, in px. */\n fontSize: number;\n}\n\nexport const PROGRESS_SIZES: Record<ProgressSize, ProgressSizeMetrics> = {\n xs: { height: 2, circularSize: 24, fontSize: 10 },\n sm: { height: 4, circularSize: 32, fontSize: 12 },\n md: { height: 6, circularSize: 40, fontSize: 14 },\n lg: { height: 8, circularSize: 48, fontSize: 16 },\n xl: { height: 10, circularSize: 56, fontSize: 18 },\n};\n\n/** The unfilled track, and an unfilled segment: the hue at a tenth. */\nexport const TRACK_ALPHA = 0.1;\n\n/** The label is MUI's `caption` at the size's own step, in semibold. */\nexport const LABEL_FONT_WEIGHT = 600;\n/** `mt: 1` between a linear or segmented bar and its label. */\nexport const LABEL_MARGIN_TOP_UNITS = 1;\n/** `gap: 0.5` between segments. */\nexport const SEGMENT_GAP_UNITS = 0.5;\n\n/** `glass`: the hue at 80% behind a 10px blur, inside a 30% hairline. */\nexport const GLASS_BAR_ALPHA = 0.8;\nexport const GLASS_BAR_BORDER_ALPHA = 0.3;\nexport const GLASS_BLUR_PX = 10;\n\n/** `glow` on a bar: `0 0 10px 2px alpha(main, 0.4)` and a 1.1 brightness lift. */\nexport const BAR_GLOW = { blur: 10, spread: 2, alpha: 0.4 } as const;\nexport const GLOW_BRIGHTNESS = 1.1;\n/** `glow` on a filled segment: the same shadow, one step tighter. */\nexport const SEGMENT_GLOW = { blur: 6, spread: 1, alpha: 0.4 } as const;\n/** `glow` on the circular arc: `drop-shadow(0 0 8px alpha(main, 0.6))`. */\nexport const CIRCULAR_GLOW = { blur: 8, alpha: 0.6 } as const;\n\n/** MUI's `pulseAnimation`: opacity 1 → 0.7 → 1, every two seconds. */\nexport const PULSE = { durationMs: 2000, dip: 0.7 } as const;\n\n/** `transition: all 0.3s ease` on the bar and on every segment. */\nexport const TRANSITION_MS = 300;\n\n/* ── MUI's `CircularProgress`, restated for the renderer that has no MUI ──── */\n\n/** MUI's `SIZE`: the arc is drawn in a 44-unit box and scaled to the px size. */\nexport const CIRCULAR_VIEWBOX = 44;\n/** MUI puts the determinate arc's start at twelve o'clock. */\nexport const CIRCULAR_ROTATION_DEG = -90;\n/** The circumference of the circle a `thickness` leaves room for. */\nexport const circularCircumference = (thickness: number): number =>\n 2 * Math.PI * ((CIRCULAR_VIEWBOX - thickness) / 2);\n/** MUI's `strokeDashoffset`: the share of the circumference still to run. */\nexport const circularDashOffset = (value: number, thickness: number): number =>\n ((100 - value) / 100) * circularCircumference(thickness);\n\n/**\n * MUI's indeterminate `CircularProgress` never closes the ring: it draws\n * roughly a fifth of it and spins. One turn every 1.4s, as MUI's\n * `circular-rotate` keyframes do.\n */\nexport const CIRCULAR_INDETERMINATE = { arc: 0.25, rotationMs: 1400 } as const;\n/** MUI's `bar1Indeterminate` keyframes: 2.1s a lap, over about a third of the track. */\nexport const LINEAR_INDETERMINATE = { width: 0.35, durationMs: 2100 } as const;\n\n/**\n * `neutral` has no palette slot of its own in MUI, so `Progress.styles.ts` has\n * always drawn it from three greys; `danger` is MUI's `error`, which is what\n * the shared theme calls `danger`. Same colours here.\n */\nexport function progressPalette(theme: UiTheme, color: ColorValue): UiPaletteColor {\n if (color === 'neutral') {\n return {\n light: GREY[300],\n main: GREY[500],\n dark: GREY[700],\n contrastText: contrastText(GREY[500]),\n };\n }\n return theme.palette[color];\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { ProgressSize, ProgressVariant } from './Progress.base';\nimport {\n BAR_GLOW,\n CIRCULAR_GLOW,\n GLASS_BAR_ALPHA,\n GLASS_BAR_BORDER_ALPHA,\n LABEL_FONT_WEIGHT,\n PROGRESS_SIZES,\n SEGMENT_GLOW,\n TRACK_ALPHA,\n progressPalette,\n} from './Progress.metrics';\nimport { MUI_TYPE } from '../../../tokens/mui-type';\nimport { alpha } from '../../../tokens/color';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/** `0 0 <blur>px <spread>px alpha(main, a)`, the string both renderers write. */\nconst glowShadow = (\n main: string,\n { blur, spread, alpha: a }: { blur: number; spread: number; alpha: number },\n): string => `0 0 ${blur}px ${spread}px ${alpha(main, a)}`;\n\n/** The unfilled track a linear bar runs in. */\nexport function trackStyle(theme: UiTheme, size: ProgressSize, color: ColorValue): ViewStyle {\n const { height } = PROGRESS_SIZES[size];\n return {\n width: '100%',\n height,\n borderRadius: height / 2,\n backgroundColor: alpha(progressPalette(theme, color).main, TRACK_ALPHA),\n // The bar inherits the track's radius on the web; here it is clipped to it.\n overflow: 'hidden',\n };\n}\n\n/**\n * What the web's `barVariantStyles` paint. `gradient` is the one honest gap:\n * React Native core has no gradient fill, so it takes the first stop.\n */\nfunction barPaint(variant: ProgressVariant, palette: UiPaletteColor): ViewStyle {\n switch (variant) {\n case 'gradient':\n return { backgroundColor: palette.main };\n case 'glass':\n return {\n backgroundColor: alpha(palette.main, GLASS_BAR_ALPHA),\n borderWidth: 1,\n borderColor: alpha(palette.main, GLASS_BAR_BORDER_ALPHA),\n };\n default:\n return { backgroundColor: palette.main };\n }\n}\n\n/** The bar itself: the variant's paint, the glow, and the height of its track. */\nexport function barStyle(\n theme: UiTheme,\n a: { variant: ProgressVariant; size: ProgressSize; color: ColorValue; glow: boolean },\n): ViewStyle {\n const palette = progressPalette(theme, a.color);\n const { height } = PROGRESS_SIZES[a.size];\n return {\n height: '100%',\n borderRadius: height / 2,\n ...barPaint(a.variant, palette),\n ...(a.glow ? { boxShadow: glowShadow(palette.main, BAR_GLOW) } : {}),\n };\n}\n\n/** One segment of the segmented variant: filled with the hue, or a tenth of it. */\nexport function segmentStyle(\n theme: UiTheme,\n a: { size: ProgressSize; color: ColorValue; filled: boolean; glow: boolean },\n): ViewStyle {\n const palette = progressPalette(theme, a.color);\n const { height } = PROGRESS_SIZES[a.size];\n return {\n flex: 1,\n height,\n borderRadius: height / 2,\n backgroundColor: a.filled ? palette.main : alpha(palette.main, TRACK_ALPHA),\n ...(a.glow && a.filled ? { boxShadow: glowShadow(palette.main, SEGMENT_GLOW) } : {}),\n };\n}\n\n/** The circular arc's glow: the web's `drop-shadow`, as a box shadow round the dial. */\nexport function circularGlowStyle(theme: UiTheme, color: ColorValue): ViewStyle {\n const main = progressPalette(theme, color).main;\n return { boxShadow: `0 0 ${CIRCULAR_GLOW.blur}px ${alpha(main, CIRCULAR_GLOW.alpha)}` };\n}\n\n/**\n * The label: MUI's `caption` ratios at the size's own step, in semibold. The\n * circular variant sets it in the muted ink, as `color=\"text.secondary\"` does.\n */\nexport function labelStyle(theme: UiTheme, size: ProgressSize, muted = false): TextStyle {\n const fontSize = PROGRESS_SIZES[size].fontSize;\n const caption = MUI_TYPE.caption;\n return {\n fontFamily: theme.typography.fontFamily,\n fontSize,\n lineHeight: fontSize * caption.lineHeight,\n letterSpacing: fontSize * caption.letterSpacingEm,\n fontWeight: String(LABEL_FONT_WEIGHT) as TextStyle['fontWeight'],\n text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;AAAA,QACE,GAAG;AAAA,QACJ,eAAe,aAAa,GAAG,IAAI;AAAA,QACnC;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,MAAI,YAAY,aAAa;AAC3B,WAAO,oBAAC,iBAAe,GAAG,QAAQ,eAAe,aAAa,MAAM,UAAoB;AAAA,EAC1F;AAEA,SAAO,oBAAC,cAAY,GAAG,QAAQ,eAAe,aAAa,GAAG,IAAI,WAAW,SAAkB;AACjG,CAAC;AAED,SAAS,cAAc;AAEvB,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO,EAAE,OAAO,OAAO;AAAA;AAAA,EAEvB,QAAQ,EAAE,UAAU,YAAY,WAAW,aAAa;AAAA,EACxD,QAAQ,EAAE,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACzD,UAAU,EAAE,eAAe,OAAO,OAAO,OAAO;AAClD,CAAC;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "../chunks/chunk-5GJ5OG5R.js";
|
|
12
12
|
import {
|
|
13
13
|
Icon
|
|
14
|
-
} from "../chunks/chunk-
|
|
14
|
+
} from "../chunks/chunk-JFKH5YHF.js";
|
|
15
15
|
import {
|
|
16
16
|
muiTypeStyle
|
|
17
17
|
} from "../chunks/chunk-2UFNPDYT.js";
|
|
@@ -185,6 +185,7 @@ function variantPaper(theme, a, radius) {
|
|
|
185
185
|
function overlayFor(theme, variant) {
|
|
186
186
|
if (variant === "fullscreen") return { flex: 1 };
|
|
187
187
|
if (variant === "drawer") return { flex: 1, alignItems: "flex-end" };
|
|
188
|
+
if (variant === "bottom-sheet") return { ...centredOverlay(theme), justifyContent: "flex-end" };
|
|
188
189
|
return centredOverlay(theme);
|
|
189
190
|
}
|
|
190
191
|
function dialogKeyboardLift(theme, variant, overlap) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/feedback/Dialog/Dialog.native.tsx","../../../src/components/feedback/Dialog/Dialog.helpers.ts","../../../src/components/feedback/Dialog/Dialog.metrics.ts","../../../src/components/feedback/Dialog/Dialog.look.native.ts","../../../src/components/feedback/Dialog/DialogParts.native.tsx","../../../src/platform/keyboard-overlap.native.ts"],"sourcesContent":["import * as React from 'react';\nimport { Modal, Pressable, ScrollView, StyleSheet, View } from 'react-native';\n\nimport { hasSpacingSlot, withDialogDefaults } from './Dialog.helpers';\nimport { dialogBackdrop, dialogKeyboardLift, dialogLook } from './Dialog.look.native';\nimport { DIALOG_BODY_PADDING_UNITS, DIALOG_PULSE } from './Dialog.metrics';\nimport type { DialogProps } from './Dialog.types.native';\nimport {\n DialogActions,\n DialogContent,\n DialogHeader,\n DialogTitledContext,\n dialogBodyTextStyle,\n} from './DialogParts.native';\nimport { useKeyboardOverlap } from '../../../platform/keyboard-overlap.native';\nimport { PulseRing } from '../../../platform/pulse-ring.native';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport type { UiTheme } from '../../../tokens/theme';\n\n// The shared stories import all four names from `./Dialog`, which resolves here\n// under Metro and in the native Storybook; the slots live in their own file to\n// keep this one about the envelope, and are re-exported so that import works.\nexport { DialogActions, DialogContent, DialogHeader } from './DialogParts.native';\n\n/**\n * The dialog body. Consumers that pass raw children (no `DialogContent`) would\n * render them flush against the paper edges — give them comfortable default\n * padding; `DialogContent`/`DialogActions` users keep managing their own.\n *\n * The web can also catch a slot passed through a COMPONENT boundary, with a\n * `:has()` selector that asks the DOM one step after React could. React Native\n * has no such selector, so only the element-type check runs here — see\n * NATIVE-NOTES.md.\n */\nconst styles = StyleSheet.create({\n /** Same sizing `DialogParts`' content slot uses, so a raw body behaves like one. */\n rawBody: { flexGrow: 1, flexShrink: 1 },\n});\n\nfunction bodyOf(theme: UiTheme, children: React.ReactNode, hasTitle: boolean): React.ReactNode {\n if (hasSpacingSlot(children, [DialogContent, DialogActions])) return children;\n const top = hasTitle ? DIALOG_BODY_PADDING_UNITS.topUnderTitle : DIALOG_BODY_PADDING_UNITS.top;\n // A `ScrollView`, not a `View`: MUI's paper is `overflow-y: auto`, so\n // overlong raw children scroll on the web. The native paper is `maxHeight:\n // '100%'` with its overflow hidden, so a plain wrapper clipped them with no\n // way to reach the rest. `DialogContent` already gets this treatment; raw\n // children were the one path that did not.\n return (\n <ScrollView\n style={styles.rawBody}\n contentContainerStyle={{\n paddingHorizontal: theme.spacing(DIALOG_BODY_PADDING_UNITS.horizontal),\n paddingBottom: theme.spacing(DIALOG_BODY_PADDING_UNITS.bottom),\n paddingTop: theme.spacing(top),\n }}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </ScrollView>\n );\n}\n\n/**\n * Whether a `<DialogHeader>` arrived as a CHILD rather than through the `title`\n * prop.\n *\n * The web tightens a body under a title with\n * `.MuiDialogTitle-root + &.MuiDialogContent-root` — a CSS sibling selector, so\n * it fires however the title got there. Native reads a context instead, and the\n * context was set from the `title` prop alone, which is the composition nothing\n * uses: every story and `Dialog.md` write the header as a child, and those\n * bodies took the untitled 24px inset where the web gives them 12px.\n */\nfunction hasHeaderChild(children: React.ReactNode): boolean {\n return React.Children.toArray(children).some(\n (child) => React.isValidElement(child) && child.type === DialogHeader,\n );\n}\n\nexport function Dialog(rawProps: DialogProps): React.JSX.Element {\n const {\n children,\n open,\n variant,\n size,\n title,\n description,\n showCloseButton,\n backdrop: _backdrop,\n persistent,\n glass,\n gradient: _gradient,\n glow,\n pulse,\n borderRadius,\n onClose,\n ...others\n } = withDialogDefaults(rawProps);\n\n const theme = useUiTheme();\n const look = dialogLook(theme, { variant, size, borderRadius, glass, glow, pulse });\n const testID = resolveTestId(others, 'dialog');\n const { style, ...modalProps } = withoutTestIdProps(others);\n\n // A persistent dialog refuses both routes out that are not a button: the\n // backdrop and Escape (which `Modal` routes through `onRequestClose`).\n const dismiss = persistent ? undefined : onClose;\n\n // Edge-to-edge defeats the `SOFT_INPUT_ADJUST_RESIZE` that `Modal` asks for,\n // so the window never shrinks for the keyboard and nothing else moves the\n // paper: the overlay measures how much of it the keyboard covers and takes\n // that off the paper's room itself (FUT-3021).\n const keyboard = useKeyboardOverlap();\n\n return (\n <Modal visible={open} transparent onRequestClose={dismiss} {...modalProps}>\n <View\n style={[look.overlay, dialogKeyboardLift(theme, variant, keyboard.overlap)]}\n onLayout={keyboard.onLayout}\n >\n <Pressable\n aria-hidden\n tabIndex={-1}\n testID={`${testID}-backdrop`}\n onPress={dismiss}\n style={[StyleSheet.absoluteFill, dialogBackdrop(glass)]}\n />\n <View testID={testID} style={[look.paper, style]}>\n {pulse ? (\n <PulseRing\n color={theme.palette.primary.main}\n radius={look.radius}\n spread={DIALOG_PULSE.spread}\n durationMs={DIALOG_PULSE.durationMs}\n fadeAt={DIALOG_PULSE.fadeAt}\n opacity={DIALOG_PULSE.alpha}\n testID={`${testID}-pulse`}\n />\n ) : null}\n <DialogTitledContext.Provider value={Boolean(title) || hasHeaderChild(children)}>\n {title ? (\n <DialogHeader\n title={title}\n subtitle={description}\n showCloseButton={showCloseButton}\n onClose={onClose}\n dataTestId={testID}\n />\n ) : null}\n {bodyOf(theme, children, Boolean(title))}\n </DialogTitledContext.Provider>\n </View>\n </View>\n </Modal>\n );\n}\n\nDialog.displayName = 'Dialog';\n","import * as React from 'react';\n\nimport type { DialogBaseProps } from './Dialog.base';\n\n/**\n * The defaults, and the slot detection, BOTH renderers run.\n *\n * Neither imports a renderer: the defaults are plain values and the slot check\n * is told which component identities count, because `DialogContent` on the web\n * and `DialogContent` on React Native are different functions answering to the\n * same name.\n */\n\ntype DialogDefaultedKeys =\n | 'variant'\n | 'size'\n | 'showCloseButton'\n | 'backdrop'\n | 'persistent'\n | 'glass'\n | 'gradient'\n | 'glow'\n | 'pulse'\n | 'borderRadius';\n\nexport const DIALOG_DEFAULTS: Required<Pick<DialogBaseProps, DialogDefaultedKeys>> = {\n variant: 'default',\n size: 'md',\n showCloseButton: true,\n backdrop: true,\n persistent: false,\n glass: false,\n gradient: false,\n glow: false,\n pulse: false,\n borderRadius: 'lg',\n};\n\n/** The renderer's own props with every defaulted field guaranteed present. */\nexport type DialogPropsWithDefaults<P extends DialogBaseProps> = P &\n Required<Pick<DialogBaseProps, DialogDefaultedKeys>>;\n\n/**\n * Apply {@link DIALOG_DEFAULTS} exactly like parameter defaults would: only a\n * missing/`undefined` prop falls back (a loop, so the component's cyclomatic\n * complexity doesn't pay one branch per defaulted prop).\n */\nexport function withDialogDefaults<P extends DialogBaseProps>(props: P): DialogPropsWithDefaults<P> {\n const merged = { ...props } as Record<string, unknown>;\n for (const [key, value] of Object.entries(DIALOG_DEFAULTS)) {\n if (merged[key] === undefined) merged[key] = value;\n }\n return merged as unknown as DialogPropsWithDefaults<P>;\n}\n\n/**\n * Does this hand us a spacing slot? Fragments are transparent: `<>` is a way of\n * passing several children, not a child that owns them, and a consumer who\n * groups a `DialogContent` and a `DialogActions` in one has still passed both.\n *\n * Only the slots themselves count, and only at the top. A `DialogContent`\n * genuinely nested inside a `<div>` is that div's content, and the dialog\n * padding the div is right.\n *\n * `slots` is passed in rather than closed over so the two renderers can hand it\n * their own `DialogContent` / `DialogActions`.\n */\nexport function hasSpacingSlot(children: React.ReactNode, slots: readonly unknown[]): boolean {\n return React.Children.toArray(children).some((child) => {\n if (!React.isValidElement(child)) return false;\n if (slots.includes(child.type)) return true;\n if (child.type !== React.Fragment) return false;\n return hasSpacingSlot((child.props as { children?: React.ReactNode }).children, slots);\n });\n}\n","import type { DialogBorderRadius, DialogSize } from './Dialog.base';\nimport { alpha } from '../../../tokens/color';\nimport { ABSOLUTE_INK } from '../../../tokens/ink.core';\nimport type { UiShadow } from '../../../tokens/shadow';\n\n/**\n * THE NUMBERS BOTH `Dialog` RENDERERS DRAW WITH.\n *\n * `Dialog.styles.ts` / `Dialog.tsx` (MUI) and `Dialog.look.native.ts` /\n * `Dialog.native.tsx` (React Native) read this one table. Spacing is in\n * SPACING UNITS wherever the web writes `theme.spacing(n)`; everything else is\n * px, a ratio or an alpha. Shadows are `UiShadow`s — see `src/tokens/shadow.ts`\n * for why they have a shape rather than a string.\n */\n\n/* ── The paper ────────────────────────────────────────────────────────────── */\n\n/** `theme.spacing(n)` per named radius; `lg` is the default. */\nexport const DIALOG_RADIUS_UNITS: Record<DialogBorderRadius, number> = {\n none: 0,\n sm: 0.5,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\n/** How wide the paper may grow, per size, in px. Also the drawer's fixed width. */\nexport const DIALOG_MAX_WIDTH: Record<DialogSize, number> = {\n xs: 400,\n sm: 600,\n md: 800,\n lg: 1000,\n xl: 1200,\n};\n\n/** The paper is 90% of the viewport up to its max width, `theme.spacing(2)` clear of the edge. */\nexport const DIALOG_WIDTH_PERCENT = 90;\nexport const DIALOG_MARGIN_UNITS = 2;\n\n/** The hairline `glass` draws. */\nexport const DIALOG_BORDER_WIDTH = 1;\n\n/**\n * MUI's `theme.shadows[24]` — the elevation a `Dialog`'s Paper paints.\n *\n * Restated rather than derived because the web never names it: `MuiDialog`\n * passes `elevation={24}` to its Paper, and React Native has no Paper to\n * inherit that from.\n */\nexport const DIALOG_PAPER_SHADOW: readonly UiShadow[] = [\n { offsetX: 0, offsetY: 11, blurRadius: 15, spreadDistance: -7, color: alpha(ABSOLUTE_INK.black, 0.2) },\n { offsetX: 0, offsetY: 24, blurRadius: 38, spreadDistance: 3, color: alpha(ABSOLUTE_INK.black, 0.14) },\n { offsetX: 0, offsetY: 9, blurRadius: 46, spreadDistance: 8, color: alpha(ABSOLUTE_INK.black, 0.12) },\n];\n\n/* ── Variants and decorations ─────────────────────────────────────────────── */\n\n/** `glass`: a 0.1 wash of the paper behind a 20px blur, inside a primary hairline. */\nexport const DIALOG_GLASS = {\n backgroundAlpha: 0.1,\n blurPx: 20,\n borderAlpha: 0.2,\n shadow: { offsetY: 8, blurRadius: 32, alpha: 0.1 },\n} as const;\n\n/** `gradient`: a faint primary-into-secondary wash at 135°, over a 10px blur. */\nexport const DIALOG_GRADIENT = { angleDeg: 135, stopAlpha: 0.1, blurPx: 10 } as const;\n\n/** `glow`: a 40px halo of the primary hue. */\nexport const DIALOG_GLOW = { blurRadius: 40, alpha: 0.3 } as const;\n\n/**\n * `pulse`: a ring of the primary hue that grows 20px out of the paper's edge and\n * fades, every two seconds. The web draws it as an `::after` box-shadow spread\n * behind the paper (`z-index: -1`).\n */\nexport const DIALOG_PULSE = {\n alpha: 0.3,\n durationMs: 2000,\n spread: 20,\n /** The fraction of the cycle the ring is still visible for. */\n fadeAt: 0.7,\n zIndex: -1,\n} as const;\n\n/**\n * The scrim: half-black, or a fifth of it behind an 8px blur for `glass`.\n *\n * It paints on BOTH renderers whatever `backdrop` is set to. The web reads that\n * prop as `BackdropComponent={backdrop ? Backdrop : undefined}`, and `undefined`\n * is exactly what MUI falls back to `Backdrop` for — so the scrim is there\n * either way. Native mirrors that rather than inventing a difference; fixing it\n * is a web change, made once, for both.\n */\nexport const DIALOG_BACKDROP = { alpha: { plain: 0.5, glass: 0.2 }, blurPx: 8 } as const;\n\n/* ── The slots ────────────────────────────────────────────────────────────── */\n\n/** Raw children (no `DialogContent`/`DialogActions`) get this padding, in spacing units. */\nexport const DIALOG_BODY_PADDING_UNITS = {\n horizontal: 3,\n bottom: 2.5,\n top: 2.5,\n /** Tighter under a title, whose own bottom padding is most of the gap. */\n topUnderTitle: 0.5,\n} as const;\n\n/** A `DialogHeader` given raw `children` is a padded box over a hairline instead. */\nexport const DIALOG_HEADER_CHILDREN_PADDING_UNITS = 2;\n\n/**\n * The title row: MUI's `DialogTitle` padding in px, and the bottom the web\n * overrides in spacing units — tighter when a subtitle follows it.\n */\nexport const DIALOG_TITLE = {\n padding: { top: 16, horizontal: 24 },\n paddingBottomUnits: { withSubtitle: 1, plain: 2 },\n subtitleGapUnits: 0.5,\n} as const;\n\n/**\n * The close button: MUI's `IconButton` at its default 8px padding around a\n * 24px glyph, on a circular hover wash.\n */\nexport const DIALOG_CLOSE_BUTTON = { padding: 8, iconSize: 24 } as const;\n\n/** `DialogContent`: `theme.spacing(3)`, tightened by `dense`. */\nexport const DIALOG_CONTENT_PADDING_UNITS = { normal: 3, dense: 1.5 } as const;\n\n/**\n * Top padding for a body that sits directly under the title.\n *\n * MUI zeroes it there, assuming the title's own bottom padding is the whole\n * gap. That assumption breaks for a body opening with an outlined field: a\n * filled field floats its label ABOVE the input's border box, and the body is a\n * clipping box, so the label gets sliced in half (FUT-544). 12px clears the\n * shrunk label's 9px overhang and leaves the gap visually tight.\n */\nexport const DIALOG_TITLED_BODY_PADDING_TOP_UNITS = 1.5;\n\n/** `DialogActions`: `theme.spacing(2)` around, and one unit between by default. */\nexport const DIALOG_ACTIONS = { paddingUnits: 2, defaultSpacingUnits: 1 } as const;\n","import type { ViewStyle } from 'react-native';\n\nimport type { DialogBorderRadius, DialogSize, DialogVariant } from './Dialog.base';\nimport {\n DIALOG_BACKDROP,\n DIALOG_BORDER_WIDTH,\n DIALOG_GLASS,\n DIALOG_GLOW,\n DIALOG_MARGIN_UNITS,\n DIALOG_MAX_WIDTH,\n DIALOG_PAPER_SHADOW,\n DIALOG_RADIUS_UNITS,\n} from './Dialog.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { BLACK, halo } from '../../../tokens/shadow';\nimport type { UiTheme } from '../../../tokens/theme';\n\n/**\n * WHAT THE NATIVE `Dialog` PAINTS — the arithmetic, with no JSX in sight.\n *\n * `variantStylesOf` builds one `sx` by spreading base, then the decorations\n * (`glow`, `pulse`), then the variant's own surface; whichever wrote a property\n * last wins. The composition here spreads the SAME things in the SAME order, so\n * `glow` survives on a `default` paper (whose surface declares no shadow) and is\n * buried by a `glass` one, on both renderers.\n */\n\n/** The named radius as a length. */\nexport function dialogRadius(theme: UiTheme, radius: DialogBorderRadius): number {\n return theme.spacing(DIALOG_RADIUS_UNITS[radius] ?? DIALOG_RADIUS_UNITS.lg);\n}\n\n/** The scrim behind the paper: half-black, or a fifth of it for `glass`. */\nexport function dialogBackdrop(glass: boolean): ViewStyle {\n return {\n backgroundColor: alpha(BLACK, glass ? DIALOG_BACKDROP.alpha.glass : DIALOG_BACKDROP.alpha.plain),\n };\n}\n\n/** The glass surface, shared by `variant=\"glass\"` and the `glass` flag. */\nfunction glassSurface(theme: UiTheme): ViewStyle {\n return {\n backgroundColor: alpha(theme.palette.background.paper, DIALOG_GLASS.backgroundAlpha),\n borderWidth: DIALOG_BORDER_WIDTH,\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.primary.main, DIALOG_GLASS.borderAlpha),\n };\n}\n\nexport interface DialogLookArgs {\n variant: DialogVariant;\n size: DialogSize;\n borderRadius: DialogBorderRadius;\n glass: boolean;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface DialogLook {\n /** Where the paper sits inside the modal, and how far in from the edges. */\n overlay: ViewStyle;\n paper: ViewStyle;\n /** The paper's corner radius, for the pulse ring to follow. */\n radius: number;\n}\n\n/** The centred paper of `default` and `glass`, before the variant paints over it. */\nfunction centredOverlay(theme: UiTheme): ViewStyle {\n return {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n // The web gives the PAPER `margin: theme.spacing(2)`; an inset on the\n // overlay is the same gap and leaves the paper free to be `100%` wide.\n padding: theme.spacing(DIALOG_MARGIN_UNITS),\n };\n}\n\nfunction variantPaper(theme: UiTheme, a: DialogLookArgs, radius: number): ViewStyle {\n switch (a.variant) {\n case 'glass':\n return {\n ...glassSurface(theme),\n boxShadow: [\n {\n offsetX: 0,\n offsetY: DIALOG_GLASS.shadow.offsetY,\n blurRadius: DIALOG_GLASS.shadow.blurRadius,\n spreadDistance: 0,\n color: alpha(BLACK, DIALOG_GLASS.shadow.alpha),\n },\n ],\n };\n case 'fullscreen':\n return { borderRadius: 0, width: '100%', height: '100%', maxWidth: undefined };\n case 'drawer':\n return {\n // SQUARE, because that is what the web paints. Two things have to fail\n // for a drawer to have a corner there and both do: the `sx` builds\n // `${radius}px 0 0 ${radius}px` out of `theme.spacing()`, which already\n // returns a px string, so the declaration reads `16pxpx 0 0 16pxpx` and\n // the browser drops it; and that `sx` lands on a plain `Box` INSIDE the\n // Drawer, whose own Paper MUI renders with `square: true`. Nothing is\n // left to round the corners. See NATIVE-NOTES.md.\n borderRadius: 0,\n width: DIALOG_MAX_WIDTH[a.size] ?? DIALOG_MAX_WIDTH.md,\n maxWidth: '100%',\n height: '100%',\n maxHeight: undefined,\n };\n default:\n return a.glass ? { ...glassSurface(theme), borderRadius: radius } : {};\n }\n}\n\n/** `fullscreen` and `drawer` fill the screen, so neither is inset or centred. */\nfunction overlayFor(theme: UiTheme, variant: DialogVariant): ViewStyle {\n if (variant === 'fullscreen') return { flex: 1 };\n if (variant === 'drawer') return { flex: 1, alignItems: 'flex-end' };\n return centredOverlay(theme);\n}\n\n/**\n * The overlay's bottom inset while the soft keyboard covers `overlap` dp of it\n * (FUT-3021), or nothing while it covers none.\n *\n * The inset grows by exactly the overlap, on top of the margin the variant\n * already keeps, so the space the paper may fill — its `maxHeight: '100%'`, or\n * the `height: '100%'` of `fullscreen` and `drawer` — shrinks by the same\n * amount and ends where the keyboard starts. A centred paper re-centres in what\n * is left, and a body taller than that scrolls inside `DialogContent` with the\n * actions still on screen.\n */\nexport function dialogKeyboardLift(theme: UiTheme, variant: DialogVariant, overlap: number): ViewStyle | null {\n if (overlap <= 0) return null;\n const margin = variant === 'fullscreen' || variant === 'drawer' ? 0 : theme.spacing(DIALOG_MARGIN_UNITS);\n return { paddingBottom: margin + overlap };\n}\n\n/**\n * Everything the dialog paints, decided once per render.\n *\n * The base carries what MUI's `Paper` gives every dialog — the paper colour and\n * `shadows[24]` — because React Native has no Paper to inherit them from; a\n * `glow` or a variant shadow then overrides it exactly as the `sx` does.\n *\n * `overflow` clips the paper's children to its corners, as MUI's own\n * `overflow-y: auto` does — except under `pulse` or `glow`, which have to paint\n * OUTSIDE the paper and are clipped by the view's own overflow on a device.\n */\nexport function dialogLook(theme: UiTheme, a: DialogLookArgs): DialogLook {\n const radius = dialogRadius(theme, a.borderRadius);\n\n const base: ViewStyle = {\n position: 'relative',\n borderRadius: radius,\n backgroundColor: theme.palette.background.paper,\n boxShadow: DIALOG_PAPER_SHADOW,\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH[a.size] ?? DIALOG_MAX_WIDTH.md,\n maxHeight: '100%',\n overflow: a.pulse || a.glow ? 'visible' : 'hidden',\n };\n\n return {\n radius,\n overlay: overlayFor(theme, a.variant),\n paper: {\n ...base,\n ...(a.glow\n ? { boxShadow: halo(DIALOG_GLOW.blurRadius, alpha(theme.palette.primary.main, DIALOG_GLOW.alpha)) }\n : null),\n ...variantPaper(theme, a, radius),\n },\n };\n}\n","import * as React from 'react';\nimport {\n Pressable,\n ScrollView,\n StyleSheet,\n Text as RNText,\n View,\n type TextStyle,\n type ViewStyle,\n} from 'react-native';\n\nimport {\n DIALOG_ACTIONS,\n DIALOG_CLOSE_BUTTON,\n DIALOG_CONTENT_PADDING_UNITS,\n DIALOG_HEADER_CHILDREN_PADDING_UNITS,\n DIALOG_TITLE,\n DIALOG_TITLED_BODY_PADDING_TOP_UNITS,\n} from './Dialog.metrics';\nimport type {\n DialogActionsAlignment,\n DialogActionsProps,\n DialogContentProps,\n DialogHeaderProps,\n} from './Dialog.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { childTestId, slotTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\n\n/**\n * THE THREE SLOTS A DIALOG IS BUILT OUT OF, ON REACT NATIVE.\n *\n * The web overrides only padding, alignment and the dividers, so the rest of\n * the numbers are MUI's own and are restated in `Dialog.metrics.ts` rather than\n * re-invented.\n */\n\n/**\n * Is there a title above this body?\n *\n * The web asks the DOM — `.MuiDialogTitle-root + &` — because only the CSS knows\n * which `DialogContent` actually FOLLOWS the title. React Native has no sibling\n * selector, so `Dialog` says so through context instead; the difference is that\n * a second `DialogContent` further down gets the tighter top padding too.\n */\nexport const DialogTitledContext = React.createContext(false);\n\n/** The body text of a slot, in MUI's `body1`, so a bare string is not unstyled. */\nexport const dialogBodyTextStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'body1'),\n color: theme.palette.text.primary,\n});\n\n/** MUI's dialog title: `h6`, in the body ink. */\nexport const dialogTitleStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'h6'),\n color: theme.palette.text.primary,\n});\n\n/** The subtitle under it: `body2`, muted, one half-unit down. */\nexport const dialogSubtitleStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'body2'),\n color: theme.palette.text.secondary,\n marginTop: theme.spacing(DIALOG_TITLE.subtitleGapUnits),\n});\n\nfunction CloseButton({ onPress, testID }: { onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable\n role=\"button\"\n aria-label=\"close\"\n testID={testID}\n onPress={onPress}\n style={({ pressed }) => [\n styles.close,\n pressed ? { backgroundColor: theme.palette.action.hover } : null,\n ]}\n >\n <Icon name=\"Close\" size={DIALOG_CLOSE_BUTTON.iconSize} color={theme.palette.text.secondary} />\n </Pressable>\n );\n}\n\nexport function DialogHeader({\n children,\n title,\n subtitle,\n showCloseButton = true,\n onClose,\n ...others\n}: DialogHeaderProps): React.JSX.Element {\n const theme = useUiTheme();\n const { style, ...viewProps } = withoutTestIdProps(others);\n\n if (children) {\n return (\n <View\n testID={slotTestId(others, 'header', 'dialog')}\n style={[\n {\n padding: theme.spacing(DIALOG_HEADER_CHILDREN_PADDING_UNITS),\n borderBottomWidth: 1,\n borderBottomColor: theme.palette.divider,\n borderStyle: 'solid',\n },\n style,\n ]}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </View>\n );\n }\n\n const paddingBottom = theme.spacing(\n subtitle ? DIALOG_TITLE.paddingBottomUnits.withSubtitle : DIALOG_TITLE.paddingBottomUnits.plain,\n );\n\n return (\n <View\n testID={slotTestId(others, 'title', 'dialog')}\n style={[styles.header, { paddingBottom }, style]}\n {...viewProps}\n >\n <View style={styles.headerText}>\n {/*\n MUI's `DialogTitle` renders `component: \"h2\"`, so the web dialog has a\n heading and the native one had none. `role`/`aria-level` are what\n react-native-web maps to an `<h2>`; a device reads the same pair\n through `accessibilityRole=\"header\"`, which RN derives from `role`.\n */}\n <RNText role=\"heading\" aria-level={2} style={dialogTitleStyle(theme)}>\n {title}\n </RNText>\n {subtitle ? <RNText style={dialogSubtitleStyle(theme)}>{subtitle}</RNText> : null}\n </View>\n {showCloseButton && onClose ? (\n <CloseButton onPress={onClose} testID={childTestId(others, 'close', 'dialog')} />\n ) : null}\n </View>\n );\n}\n\nDialogHeader.displayName = 'DialogHeader';\n\nexport function DialogContent({\n children,\n dividers = false,\n dense = false,\n ...others\n}: DialogContentProps): React.JSX.Element {\n const theme = useUiTheme();\n const titled = React.useContext(DialogTitledContext);\n const { style, ...viewProps } = withoutTestIdProps(others);\n const padding = theme.spacing(\n dense ? DIALOG_CONTENT_PADDING_UNITS.dense : DIALOG_CONTENT_PADDING_UNITS.normal,\n );\n const paddingTop = titled\n ? theme.spacing(DIALOG_TITLED_BODY_PADDING_TOP_UNITS)\n : padding;\n\n return (\n <ScrollView\n testID={slotTestId(others, 'content', 'dialog')}\n style={[\n styles.content,\n dividers\n ? {\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n }\n : null,\n style,\n ]}\n contentContainerStyle={{ padding, paddingTop }}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </ScrollView>\n );\n}\n\nDialogContent.displayName = 'DialogContent';\n\nconst JUSTIFY: Record<DialogActionsAlignment, NonNullable<ViewStyle['justifyContent']>> = {\n left: 'flex-start',\n center: 'center',\n right: 'flex-end',\n 'space-between': 'space-between',\n};\n\nexport function DialogActions({\n children,\n alignment = 'right',\n spacing = DIALOG_ACTIONS.defaultSpacingUnits,\n ...others\n}: DialogActionsProps): React.JSX.Element {\n const theme = useUiTheme();\n const { style, ...viewProps } = withoutTestIdProps(others);\n\n return (\n <View\n testID={slotTestId(others, 'actions', 'dialog')}\n style={[\n styles.actions,\n {\n padding: theme.spacing(DIALOG_ACTIONS.paddingUnits),\n justifyContent: JUSTIFY[alignment],\n gap: theme.spacing(spacing),\n },\n style,\n ]}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </View>\n );\n}\n\nDialogActions.displayName = 'DialogActions';\n\nconst styles = StyleSheet.create({\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexGrow: 0,\n flexShrink: 0,\n paddingTop: DIALOG_TITLE.padding.top,\n paddingHorizontal: DIALOG_TITLE.padding.horizontal,\n },\n headerText: {\n flexShrink: 1,\n },\n close: {\n padding: DIALOG_CLOSE_BUTTON.padding,\n borderRadius: 9999,\n alignItems: 'center',\n justifyContent: 'center',\n },\n content: {\n flexGrow: 1,\n flexShrink: 1,\n },\n actions: {\n flexDirection: 'row',\n alignItems: 'center',\n flexGrow: 0,\n flexShrink: 0,\n },\n});\n","import * as React from 'react';\nimport {\n Keyboard,\n Platform,\n type KeyboardEvent,\n type KeyboardEventName,\n type LayoutChangeEvent,\n} from 'react-native';\n\n/**\n * HOW FAR THE SOFT KEYBOARD COVERS A FULL-WINDOW VIEW, AND NOTHING MORE.\n *\n * React Native's `Modal` asks Android for `SOFT_INPUT_ADJUST_RESIZE`, and under\n * edge-to-edge that asks for nothing: the window keeps its full height and the\n * keyboard is drawn over it. iOS never resized a modal at all. So an overlay\n * that fills the modal has its bottom under the keyboard, and whatever sits\n * there — a dialog's actions — is hidden until the keyboard goes away.\n *\n * This reads the keyboard's own top edge from the `Keyboard` events and the\n * view's own bottom edge from its layout, and answers the difference. Reading\n * the OVERLAP rather than the keyboard's height is what keeps it right when the\n * window DID resize (a host that is not edge-to-edge): the view then already\n * ends at the keyboard, the overlap is zero, and nothing is lifted twice. No\n * soft-input mode is set here, deliberately — a second one would fight the one\n * `Modal` already asks for.\n *\n * The view's layout `y` is relative to its parent, so the view is expected to\n * be the root of a window that starts at the top of the screen — which a\n * `transparent` modal is, on iOS and under Android edge-to-edge alike.\n */\nexport function keyboardOverlap(viewBottom: number | null, keyboardTop: number | null): number {\n if (viewBottom === null || keyboardTop === null) return 0;\n return Math.max(0, viewBottom - keyboardTop);\n}\n\n/** iOS announces the keyboard before it moves; Android only once it has. */\nconst KEYBOARD_EVENTS: { show: KeyboardEventName; hide: KeyboardEventName } =\n Platform.OS === 'ios'\n ? { show: 'keyboardWillShow', hide: 'keyboardWillHide' }\n : { show: 'keyboardDidShow', hide: 'keyboardDidHide' };\n\nexport interface KeyboardOverlap {\n /** How many dp of the view the keyboard covers; `0` while it is down. */\n overlap: number;\n /** Goes on the view being measured. */\n onLayout: (event: LayoutChangeEvent) => void;\n}\n\n/**\n * The keyboard's overlap with the view `onLayout` is put on. Android re-sends\n * `keyboardDidShow` when the keyboard changes height while it stays up (an\n * emoji panel, a suggestion strip), so the overlap follows those too.\n */\nexport function useKeyboardOverlap(): KeyboardOverlap {\n const [viewBottom, setViewBottom] = React.useState<number | null>(null);\n const [keyboardTop, setKeyboardTop] = React.useState<number | null>(null);\n\n React.useEffect(() => {\n const shown = Keyboard.addListener(KEYBOARD_EVENTS.show, (event: KeyboardEvent) => {\n setKeyboardTop(event.endCoordinates.screenY);\n });\n const hidden = Keyboard.addListener(KEYBOARD_EVENTS.hide, () => {\n setKeyboardTop(null);\n });\n return () => {\n shown.remove();\n hidden.remove();\n };\n }, []);\n\n const onLayout = React.useCallback((event: LayoutChangeEvent) => {\n const { y, height } = event.nativeEvent.layout;\n setViewBottom(y + height);\n }, []);\n\n return { overlap: keyboardOverlap(viewBottom, keyboardTop), onLayout };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAY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AAS;AAAA,MAEnB;AAAA,wBAAAL;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,eAAW;AAAA,YACX,UAAU;AAAA,YACV,QAAQ,GAAG,MAAM;AAAA,YACjB,SAAS;AAAA,YACT,OAAO,CAACH,YAAW,cAAc,eAAe,KAAK,CAAC;AAAA;AAAA,QACxD;AAAA,QACA,gBAAAF,MAACI,OAAA,EAAK,QAAgB,OAAO,CAAC,KAAK,OAAO,KAAK,GAC5C;AAAA,kBACC,gBAAAL;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,MAAM,QAAQ,QAAQ;AAAA,cAC7B,QAAQ,KAAK;AAAA,cACb,QAAQ,aAAa;AAAA,cACrB,YAAY,aAAa;AAAA,cACzB,QAAQ,aAAa;AAAA,cACrB,SAAS,aAAa;AAAA,cACtB,QAAQ,GAAG,MAAM;AAAA;AAAA,UACnB,IACE;AAAA,UACJ,gBAAAC,MAAC,oBAAoB,UAApB,EAA6B,OAAO,QAAQ,KAAK,KAAK,eAAe,QAAQ,GAC3E;AAAA,oBACC,gBAAAD;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,UAAU;AAAA,gBACV;AAAA,gBACA;AAAA,gBACA,YAAY;AAAA;AAAA,YACd,IACE;AAAA,YACH,OAAO,OAAO,UAAU,QAAQ,KAAK,CAAC;AAAA,aACzC;AAAA,WACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,OAAO,cAAc;","names":["React","Pressable","ScrollView","StyleSheet","View","React","React","jsx","jsxs","styles","StyleSheet","ScrollView","View","Pressable"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/feedback/Dialog/Dialog.native.tsx","../../../src/components/feedback/Dialog/Dialog.helpers.ts","../../../src/components/feedback/Dialog/Dialog.metrics.ts","../../../src/components/feedback/Dialog/Dialog.look.native.ts","../../../src/components/feedback/Dialog/DialogParts.native.tsx","../../../src/platform/keyboard-overlap.native.ts"],"sourcesContent":["import * as React from 'react';\nimport { Modal, Pressable, ScrollView, StyleSheet, View } from 'react-native';\n\nimport { hasSpacingSlot, withDialogDefaults } from './Dialog.helpers';\nimport { dialogBackdrop, dialogKeyboardLift, dialogLook } from './Dialog.look.native';\nimport { DIALOG_BODY_PADDING_UNITS, DIALOG_PULSE } from './Dialog.metrics';\nimport type { DialogProps } from './Dialog.types.native';\nimport {\n DialogActions,\n DialogContent,\n DialogHeader,\n DialogTitledContext,\n dialogBodyTextStyle,\n} from './DialogParts.native';\nimport { useKeyboardOverlap } from '../../../platform/keyboard-overlap.native';\nimport { PulseRing } from '../../../platform/pulse-ring.native';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport type { UiTheme } from '../../../tokens/theme';\n\n// The shared stories import all four names from `./Dialog`, which resolves here\n// under Metro and in the native Storybook; the slots live in their own file to\n// keep this one about the envelope, and are re-exported so that import works.\nexport { DialogActions, DialogContent, DialogHeader } from './DialogParts.native';\n\n/**\n * The dialog body. Consumers that pass raw children (no `DialogContent`) would\n * render them flush against the paper edges — give them comfortable default\n * padding; `DialogContent`/`DialogActions` users keep managing their own.\n *\n * The web can also catch a slot passed through a COMPONENT boundary, with a\n * `:has()` selector that asks the DOM one step after React could. React Native\n * has no such selector, so only the element-type check runs here — see\n * NATIVE-NOTES.md.\n */\nconst styles = StyleSheet.create({\n /** Same sizing `DialogParts`' content slot uses, so a raw body behaves like one. */\n rawBody: { flexGrow: 1, flexShrink: 1 },\n});\n\nfunction bodyOf(theme: UiTheme, children: React.ReactNode, hasTitle: boolean): React.ReactNode {\n if (hasSpacingSlot(children, [DialogContent, DialogActions])) return children;\n const top = hasTitle ? DIALOG_BODY_PADDING_UNITS.topUnderTitle : DIALOG_BODY_PADDING_UNITS.top;\n // A `ScrollView`, not a `View`: MUI's paper is `overflow-y: auto`, so\n // overlong raw children scroll on the web. The native paper is `maxHeight:\n // '100%'` with its overflow hidden, so a plain wrapper clipped them with no\n // way to reach the rest. `DialogContent` already gets this treatment; raw\n // children were the one path that did not.\n return (\n <ScrollView\n style={styles.rawBody}\n contentContainerStyle={{\n paddingHorizontal: theme.spacing(DIALOG_BODY_PADDING_UNITS.horizontal),\n paddingBottom: theme.spacing(DIALOG_BODY_PADDING_UNITS.bottom),\n paddingTop: theme.spacing(top),\n }}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </ScrollView>\n );\n}\n\n/**\n * Whether a `<DialogHeader>` arrived as a CHILD rather than through the `title`\n * prop.\n *\n * The web tightens a body under a title with\n * `.MuiDialogTitle-root + &.MuiDialogContent-root` — a CSS sibling selector, so\n * it fires however the title got there. Native reads a context instead, and the\n * context was set from the `title` prop alone, which is the composition nothing\n * uses: every story and `Dialog.md` write the header as a child, and those\n * bodies took the untitled 24px inset where the web gives them 12px.\n */\nfunction hasHeaderChild(children: React.ReactNode): boolean {\n return React.Children.toArray(children).some(\n (child) => React.isValidElement(child) && child.type === DialogHeader,\n );\n}\n\nexport function Dialog(rawProps: DialogProps): React.JSX.Element {\n const {\n children,\n open,\n variant,\n size,\n title,\n description,\n showCloseButton,\n backdrop: _backdrop,\n persistent,\n glass,\n gradient: _gradient,\n glow,\n pulse,\n borderRadius,\n onClose,\n ...others\n } = withDialogDefaults(rawProps);\n\n const theme = useUiTheme();\n const look = dialogLook(theme, { variant, size, borderRadius, glass, glow, pulse });\n const testID = resolveTestId(others, 'dialog');\n const { style, ...modalProps } = withoutTestIdProps(others);\n\n // A persistent dialog refuses both routes out that are not a button: the\n // backdrop and Escape (which `Modal` routes through `onRequestClose`).\n const dismiss = persistent ? undefined : onClose;\n\n // Edge-to-edge defeats the `SOFT_INPUT_ADJUST_RESIZE` that `Modal` asks for,\n // so the window never shrinks for the keyboard and nothing else moves the\n // paper: the overlay measures how much of it the keyboard covers and takes\n // that off the paper's room itself (FUT-3021).\n const keyboard = useKeyboardOverlap();\n\n return (\n <Modal visible={open} transparent onRequestClose={dismiss} {...modalProps}>\n <View\n style={[look.overlay, dialogKeyboardLift(theme, variant, keyboard.overlap)]}\n onLayout={keyboard.onLayout}\n >\n <Pressable\n aria-hidden\n tabIndex={-1}\n testID={`${testID}-backdrop`}\n onPress={dismiss}\n style={[StyleSheet.absoluteFill, dialogBackdrop(glass)]}\n />\n <View testID={testID} style={[look.paper, style]}>\n {pulse ? (\n <PulseRing\n color={theme.palette.primary.main}\n radius={look.radius}\n spread={DIALOG_PULSE.spread}\n durationMs={DIALOG_PULSE.durationMs}\n fadeAt={DIALOG_PULSE.fadeAt}\n opacity={DIALOG_PULSE.alpha}\n testID={`${testID}-pulse`}\n />\n ) : null}\n <DialogTitledContext.Provider value={Boolean(title) || hasHeaderChild(children)}>\n {title ? (\n <DialogHeader\n title={title}\n subtitle={description}\n showCloseButton={showCloseButton}\n onClose={onClose}\n dataTestId={testID}\n />\n ) : null}\n {bodyOf(theme, children, Boolean(title))}\n </DialogTitledContext.Provider>\n </View>\n </View>\n </Modal>\n );\n}\n\nDialog.displayName = 'Dialog';\n","import * as React from 'react';\n\nimport type { DialogBaseProps } from './Dialog.base';\n\n/**\n * The defaults, and the slot detection, BOTH renderers run.\n *\n * Neither imports a renderer: the defaults are plain values and the slot check\n * is told which component identities count, because `DialogContent` on the web\n * and `DialogContent` on React Native are different functions answering to the\n * same name.\n */\n\ntype DialogDefaultedKeys =\n | 'variant'\n | 'size'\n | 'showCloseButton'\n | 'backdrop'\n | 'persistent'\n | 'glass'\n | 'gradient'\n | 'glow'\n | 'pulse'\n | 'borderRadius';\n\nexport const DIALOG_DEFAULTS: Required<Pick<DialogBaseProps, DialogDefaultedKeys>> = {\n variant: 'default',\n size: 'md',\n showCloseButton: true,\n backdrop: true,\n persistent: false,\n glass: false,\n gradient: false,\n glow: false,\n pulse: false,\n borderRadius: 'lg',\n};\n\n/** The renderer's own props with every defaulted field guaranteed present. */\nexport type DialogPropsWithDefaults<P extends DialogBaseProps> = P &\n Required<Pick<DialogBaseProps, DialogDefaultedKeys>>;\n\n/**\n * Apply {@link DIALOG_DEFAULTS} exactly like parameter defaults would: only a\n * missing/`undefined` prop falls back (a loop, so the component's cyclomatic\n * complexity doesn't pay one branch per defaulted prop).\n */\nexport function withDialogDefaults<P extends DialogBaseProps>(props: P): DialogPropsWithDefaults<P> {\n const merged = { ...props } as Record<string, unknown>;\n for (const [key, value] of Object.entries(DIALOG_DEFAULTS)) {\n if (merged[key] === undefined) merged[key] = value;\n }\n return merged as unknown as DialogPropsWithDefaults<P>;\n}\n\n/**\n * Does this hand us a spacing slot? Fragments are transparent: `<>` is a way of\n * passing several children, not a child that owns them, and a consumer who\n * groups a `DialogContent` and a `DialogActions` in one has still passed both.\n *\n * Only the slots themselves count, and only at the top. A `DialogContent`\n * genuinely nested inside a `<div>` is that div's content, and the dialog\n * padding the div is right.\n *\n * `slots` is passed in rather than closed over so the two renderers can hand it\n * their own `DialogContent` / `DialogActions`.\n */\nexport function hasSpacingSlot(children: React.ReactNode, slots: readonly unknown[]): boolean {\n return React.Children.toArray(children).some((child) => {\n if (!React.isValidElement(child)) return false;\n if (slots.includes(child.type)) return true;\n if (child.type !== React.Fragment) return false;\n return hasSpacingSlot((child.props as { children?: React.ReactNode }).children, slots);\n });\n}\n","import type { DialogBorderRadius, DialogSize } from './Dialog.base';\nimport { alpha } from '../../../tokens/color';\nimport { ABSOLUTE_INK } from '../../../tokens/ink.core';\nimport type { UiShadow } from '../../../tokens/shadow';\n\n/**\n * THE NUMBERS BOTH `Dialog` RENDERERS DRAW WITH.\n *\n * `Dialog.styles.ts` / `Dialog.tsx` (MUI) and `Dialog.look.native.ts` /\n * `Dialog.native.tsx` (React Native) read this one table. Spacing is in\n * SPACING UNITS wherever the web writes `theme.spacing(n)`; everything else is\n * px, a ratio or an alpha. Shadows are `UiShadow`s — see `src/tokens/shadow.ts`\n * for why they have a shape rather than a string.\n */\n\n/* ── The paper ────────────────────────────────────────────────────────────── */\n\n/** `theme.spacing(n)` per named radius; `lg` is the default. */\nexport const DIALOG_RADIUS_UNITS: Record<DialogBorderRadius, number> = {\n none: 0,\n sm: 0.5,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\n/** How wide the paper may grow, per size, in px. Also the drawer's fixed width. */\nexport const DIALOG_MAX_WIDTH: Record<DialogSize, number> = {\n xs: 400,\n sm: 600,\n md: 800,\n lg: 1000,\n xl: 1200,\n};\n\n/** The paper is 90% of the viewport up to its max width, `theme.spacing(2)` clear of the edge. */\nexport const DIALOG_WIDTH_PERCENT = 90;\nexport const DIALOG_MARGIN_UNITS = 2;\n\n/** The hairline `glass` draws. */\nexport const DIALOG_BORDER_WIDTH = 1;\n\n/**\n * MUI's `theme.shadows[24]` — the elevation a `Dialog`'s Paper paints.\n *\n * Restated rather than derived because the web never names it: `MuiDialog`\n * passes `elevation={24}` to its Paper, and React Native has no Paper to\n * inherit that from.\n */\nexport const DIALOG_PAPER_SHADOW: readonly UiShadow[] = [\n { offsetX: 0, offsetY: 11, blurRadius: 15, spreadDistance: -7, color: alpha(ABSOLUTE_INK.black, 0.2) },\n { offsetX: 0, offsetY: 24, blurRadius: 38, spreadDistance: 3, color: alpha(ABSOLUTE_INK.black, 0.14) },\n { offsetX: 0, offsetY: 9, blurRadius: 46, spreadDistance: 8, color: alpha(ABSOLUTE_INK.black, 0.12) },\n];\n\n/* ── Variants and decorations ─────────────────────────────────────────────── */\n\n/** `glass`: a 0.1 wash of the paper behind a 20px blur, inside a primary hairline. */\nexport const DIALOG_GLASS = {\n backgroundAlpha: 0.1,\n blurPx: 20,\n borderAlpha: 0.2,\n shadow: { offsetY: 8, blurRadius: 32, alpha: 0.1 },\n} as const;\n\n/** `gradient`: a faint primary-into-secondary wash at 135°, over a 10px blur. */\nexport const DIALOG_GRADIENT = { angleDeg: 135, stopAlpha: 0.1, blurPx: 10 } as const;\n\n/** `glow`: a 40px halo of the primary hue. */\nexport const DIALOG_GLOW = { blurRadius: 40, alpha: 0.3 } as const;\n\n/**\n * `pulse`: a ring of the primary hue that grows 20px out of the paper's edge and\n * fades, every two seconds. The web draws it as an `::after` box-shadow spread\n * behind the paper (`z-index: -1`).\n */\nexport const DIALOG_PULSE = {\n alpha: 0.3,\n durationMs: 2000,\n spread: 20,\n /** The fraction of the cycle the ring is still visible for. */\n fadeAt: 0.7,\n zIndex: -1,\n} as const;\n\n/**\n * The scrim: half-black, or a fifth of it behind an 8px blur for `glass`.\n *\n * It paints on BOTH renderers whatever `backdrop` is set to. The web reads that\n * prop as `BackdropComponent={backdrop ? Backdrop : undefined}`, and `undefined`\n * is exactly what MUI falls back to `Backdrop` for — so the scrim is there\n * either way. Native mirrors that rather than inventing a difference; fixing it\n * is a web change, made once, for both.\n */\nexport const DIALOG_BACKDROP = { alpha: { plain: 0.5, glass: 0.2 }, blurPx: 8 } as const;\n\n/* ── The slots ────────────────────────────────────────────────────────────── */\n\n/** Raw children (no `DialogContent`/`DialogActions`) get this padding, in spacing units. */\nexport const DIALOG_BODY_PADDING_UNITS = {\n horizontal: 3,\n bottom: 2.5,\n top: 2.5,\n /** Tighter under a title, whose own bottom padding is most of the gap. */\n topUnderTitle: 0.5,\n} as const;\n\n/** A `DialogHeader` given raw `children` is a padded box over a hairline instead. */\nexport const DIALOG_HEADER_CHILDREN_PADDING_UNITS = 2;\n\n/**\n * The title row: MUI's `DialogTitle` padding in px, and the bottom the web\n * overrides in spacing units — tighter when a subtitle follows it.\n */\nexport const DIALOG_TITLE = {\n padding: { top: 16, horizontal: 24 },\n paddingBottomUnits: { withSubtitle: 1, plain: 2 },\n subtitleGapUnits: 0.5,\n} as const;\n\n/**\n * The close button: MUI's `IconButton` at its default 8px padding around a\n * 24px glyph, on a circular hover wash.\n */\nexport const DIALOG_CLOSE_BUTTON = { padding: 8, iconSize: 24 } as const;\n\n/** `DialogContent`: `theme.spacing(3)`, tightened by `dense`. */\nexport const DIALOG_CONTENT_PADDING_UNITS = { normal: 3, dense: 1.5 } as const;\n\n/**\n * Top padding for a body that sits directly under the title.\n *\n * MUI zeroes it there, assuming the title's own bottom padding is the whole\n * gap. That assumption breaks for a body opening with an outlined field: a\n * filled field floats its label ABOVE the input's border box, and the body is a\n * clipping box, so the label gets sliced in half (FUT-544). 12px clears the\n * shrunk label's 9px overhang and leaves the gap visually tight.\n */\nexport const DIALOG_TITLED_BODY_PADDING_TOP_UNITS = 1.5;\n\n/** `DialogActions`: `theme.spacing(2)` around, and one unit between by default. */\nexport const DIALOG_ACTIONS = { paddingUnits: 2, defaultSpacingUnits: 1 } as const;\n","import type { ViewStyle } from 'react-native';\n\nimport type { DialogBorderRadius, DialogSize, DialogVariant } from './Dialog.base';\nimport {\n DIALOG_BACKDROP,\n DIALOG_BORDER_WIDTH,\n DIALOG_GLASS,\n DIALOG_GLOW,\n DIALOG_MARGIN_UNITS,\n DIALOG_MAX_WIDTH,\n DIALOG_PAPER_SHADOW,\n DIALOG_RADIUS_UNITS,\n} from './Dialog.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { BLACK, halo } from '../../../tokens/shadow';\nimport type { UiTheme } from '../../../tokens/theme';\n\n/**\n * WHAT THE NATIVE `Dialog` PAINTS — the arithmetic, with no JSX in sight.\n *\n * `variantStylesOf` builds one `sx` by spreading base, then the decorations\n * (`glow`, `pulse`), then the variant's own surface; whichever wrote a property\n * last wins. The composition here spreads the SAME things in the SAME order, so\n * `glow` survives on a `default` paper (whose surface declares no shadow) and is\n * buried by a `glass` one, on both renderers.\n */\n\n/** The named radius as a length. */\nexport function dialogRadius(theme: UiTheme, radius: DialogBorderRadius): number {\n return theme.spacing(DIALOG_RADIUS_UNITS[radius] ?? DIALOG_RADIUS_UNITS.lg);\n}\n\n/** The scrim behind the paper: half-black, or a fifth of it for `glass`. */\nexport function dialogBackdrop(glass: boolean): ViewStyle {\n return {\n backgroundColor: alpha(BLACK, glass ? DIALOG_BACKDROP.alpha.glass : DIALOG_BACKDROP.alpha.plain),\n };\n}\n\n/** The glass surface, shared by `variant=\"glass\"` and the `glass` flag. */\nfunction glassSurface(theme: UiTheme): ViewStyle {\n return {\n backgroundColor: alpha(theme.palette.background.paper, DIALOG_GLASS.backgroundAlpha),\n borderWidth: DIALOG_BORDER_WIDTH,\n borderStyle: 'solid',\n borderColor: alpha(theme.palette.primary.main, DIALOG_GLASS.borderAlpha),\n };\n}\n\nexport interface DialogLookArgs {\n variant: DialogVariant;\n size: DialogSize;\n borderRadius: DialogBorderRadius;\n glass: boolean;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface DialogLook {\n /** Where the paper sits inside the modal, and how far in from the edges. */\n overlay: ViewStyle;\n paper: ViewStyle;\n /** The paper's corner radius, for the pulse ring to follow. */\n radius: number;\n}\n\n/** The centred paper of `default` and `glass`, before the variant paints over it. */\nfunction centredOverlay(theme: UiTheme): ViewStyle {\n return {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n // The web gives the PAPER `margin: theme.spacing(2)`; an inset on the\n // overlay is the same gap and leaves the paper free to be `100%` wide.\n padding: theme.spacing(DIALOG_MARGIN_UNITS),\n };\n}\n\nfunction variantPaper(theme: UiTheme, a: DialogLookArgs, radius: number): ViewStyle {\n switch (a.variant) {\n case 'glass':\n return {\n ...glassSurface(theme),\n boxShadow: [\n {\n offsetX: 0,\n offsetY: DIALOG_GLASS.shadow.offsetY,\n blurRadius: DIALOG_GLASS.shadow.blurRadius,\n spreadDistance: 0,\n color: alpha(BLACK, DIALOG_GLASS.shadow.alpha),\n },\n ],\n };\n case 'fullscreen':\n return { borderRadius: 0, width: '100%', height: '100%', maxWidth: undefined };\n case 'drawer':\n return {\n // SQUARE, because that is what the web paints. Two things have to fail\n // for a drawer to have a corner there and both do: the `sx` builds\n // `${radius}px 0 0 ${radius}px` out of `theme.spacing()`, which already\n // returns a px string, so the declaration reads `16pxpx 0 0 16pxpx` and\n // the browser drops it; and that `sx` lands on a plain `Box` INSIDE the\n // Drawer, whose own Paper MUI renders with `square: true`. Nothing is\n // left to round the corners. See NATIVE-NOTES.md.\n borderRadius: 0,\n width: DIALOG_MAX_WIDTH[a.size] ?? DIALOG_MAX_WIDTH.md,\n maxWidth: '100%',\n height: '100%',\n maxHeight: undefined,\n };\n default:\n return a.glass ? { ...glassSurface(theme), borderRadius: radius } : {};\n }\n}\n\n/** `fullscreen` and `drawer` fill the screen, so neither is inset or centred. */\nfunction overlayFor(theme: UiTheme, variant: DialogVariant): ViewStyle {\n if (variant === 'fullscreen') return { flex: 1 };\n if (variant === 'drawer') return { flex: 1, alignItems: 'flex-end' };\n if (variant === 'bottom-sheet') return { ...centredOverlay(theme), justifyContent: 'flex-end' };\n return centredOverlay(theme);\n}\n\n/**\n * The overlay's bottom inset while the soft keyboard covers `overlap` dp of it\n * (FUT-3021), or nothing while it covers none.\n *\n * The inset grows by exactly the overlap, on top of the margin the variant\n * already keeps, so the space the paper may fill — its `maxHeight: '100%'`, or\n * the `height: '100%'` of `fullscreen` and `drawer` — shrinks by the same\n * amount and ends where the keyboard starts. A centred paper re-centres in what\n * is left, and a body taller than that scrolls inside `DialogContent` with the\n * actions still on screen.\n */\nexport function dialogKeyboardLift(theme: UiTheme, variant: DialogVariant, overlap: number): ViewStyle | null {\n if (overlap <= 0) return null;\n const margin = variant === 'fullscreen' || variant === 'drawer' ? 0 : theme.spacing(DIALOG_MARGIN_UNITS);\n return { paddingBottom: margin + overlap };\n}\n\n/**\n * Everything the dialog paints, decided once per render.\n *\n * The base carries what MUI's `Paper` gives every dialog — the paper colour and\n * `shadows[24]` — because React Native has no Paper to inherit them from; a\n * `glow` or a variant shadow then overrides it exactly as the `sx` does.\n *\n * `overflow` clips the paper's children to its corners, as MUI's own\n * `overflow-y: auto` does — except under `pulse` or `glow`, which have to paint\n * OUTSIDE the paper and are clipped by the view's own overflow on a device.\n */\nexport function dialogLook(theme: UiTheme, a: DialogLookArgs): DialogLook {\n const radius = dialogRadius(theme, a.borderRadius);\n\n const base: ViewStyle = {\n position: 'relative',\n borderRadius: radius,\n backgroundColor: theme.palette.background.paper,\n boxShadow: DIALOG_PAPER_SHADOW,\n width: '100%',\n maxWidth: DIALOG_MAX_WIDTH[a.size] ?? DIALOG_MAX_WIDTH.md,\n maxHeight: '100%',\n overflow: a.pulse || a.glow ? 'visible' : 'hidden',\n };\n\n return {\n radius,\n overlay: overlayFor(theme, a.variant),\n paper: {\n ...base,\n ...(a.glow\n ? { boxShadow: halo(DIALOG_GLOW.blurRadius, alpha(theme.palette.primary.main, DIALOG_GLOW.alpha)) }\n : null),\n ...variantPaper(theme, a, radius),\n },\n };\n}\n","import * as React from 'react';\nimport {\n Pressable,\n ScrollView,\n StyleSheet,\n Text as RNText,\n View,\n type TextStyle,\n type ViewStyle,\n} from 'react-native';\n\nimport {\n DIALOG_ACTIONS,\n DIALOG_CLOSE_BUTTON,\n DIALOG_CONTENT_PADDING_UNITS,\n DIALOG_HEADER_CHILDREN_PADDING_UNITS,\n DIALOG_TITLE,\n DIALOG_TITLED_BODY_PADDING_TOP_UNITS,\n} from './Dialog.metrics';\nimport type {\n DialogActionsAlignment,\n DialogActionsProps,\n DialogContentProps,\n DialogHeaderProps,\n} from './Dialog.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { childTestId, slotTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\n\n/**\n * THE THREE SLOTS A DIALOG IS BUILT OUT OF, ON REACT NATIVE.\n *\n * The web overrides only padding, alignment and the dividers, so the rest of\n * the numbers are MUI's own and are restated in `Dialog.metrics.ts` rather than\n * re-invented.\n */\n\n/**\n * Is there a title above this body?\n *\n * The web asks the DOM — `.MuiDialogTitle-root + &` — because only the CSS knows\n * which `DialogContent` actually FOLLOWS the title. React Native has no sibling\n * selector, so `Dialog` says so through context instead; the difference is that\n * a second `DialogContent` further down gets the tighter top padding too.\n */\nexport const DialogTitledContext = React.createContext(false);\n\n/** The body text of a slot, in MUI's `body1`, so a bare string is not unstyled. */\nexport const dialogBodyTextStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'body1'),\n color: theme.palette.text.primary,\n});\n\n/** MUI's dialog title: `h6`, in the body ink. */\nexport const dialogTitleStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'h6'),\n color: theme.palette.text.primary,\n});\n\n/** The subtitle under it: `body2`, muted, one half-unit down. */\nexport const dialogSubtitleStyle = (theme: UiTheme): TextStyle => ({\n ...muiTypeStyle(theme, 'body2'),\n color: theme.palette.text.secondary,\n marginTop: theme.spacing(DIALOG_TITLE.subtitleGapUnits),\n});\n\nfunction CloseButton({ onPress, testID }: { onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable\n role=\"button\"\n aria-label=\"close\"\n testID={testID}\n onPress={onPress}\n style={({ pressed }) => [\n styles.close,\n pressed ? { backgroundColor: theme.palette.action.hover } : null,\n ]}\n >\n <Icon name=\"Close\" size={DIALOG_CLOSE_BUTTON.iconSize} color={theme.palette.text.secondary} />\n </Pressable>\n );\n}\n\nexport function DialogHeader({\n children,\n title,\n subtitle,\n showCloseButton = true,\n onClose,\n ...others\n}: DialogHeaderProps): React.JSX.Element {\n const theme = useUiTheme();\n const { style, ...viewProps } = withoutTestIdProps(others);\n\n if (children) {\n return (\n <View\n testID={slotTestId(others, 'header', 'dialog')}\n style={[\n {\n padding: theme.spacing(DIALOG_HEADER_CHILDREN_PADDING_UNITS),\n borderBottomWidth: 1,\n borderBottomColor: theme.palette.divider,\n borderStyle: 'solid',\n },\n style,\n ]}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </View>\n );\n }\n\n const paddingBottom = theme.spacing(\n subtitle ? DIALOG_TITLE.paddingBottomUnits.withSubtitle : DIALOG_TITLE.paddingBottomUnits.plain,\n );\n\n return (\n <View\n testID={slotTestId(others, 'title', 'dialog')}\n style={[styles.header, { paddingBottom }, style]}\n {...viewProps}\n >\n <View style={styles.headerText}>\n {/*\n MUI's `DialogTitle` renders `component: \"h2\"`, so the web dialog has a\n heading and the native one had none. `role`/`aria-level` are what\n react-native-web maps to an `<h2>`; a device reads the same pair\n through `accessibilityRole=\"header\"`, which RN derives from `role`.\n */}\n <RNText role=\"heading\" aria-level={2} style={dialogTitleStyle(theme)}>\n {title}\n </RNText>\n {subtitle ? <RNText style={dialogSubtitleStyle(theme)}>{subtitle}</RNText> : null}\n </View>\n {showCloseButton && onClose ? (\n <CloseButton onPress={onClose} testID={childTestId(others, 'close', 'dialog')} />\n ) : null}\n </View>\n );\n}\n\nDialogHeader.displayName = 'DialogHeader';\n\nexport function DialogContent({\n children,\n dividers = false,\n dense = false,\n ...others\n}: DialogContentProps): React.JSX.Element {\n const theme = useUiTheme();\n const titled = React.useContext(DialogTitledContext);\n const { style, ...viewProps } = withoutTestIdProps(others);\n const padding = theme.spacing(\n dense ? DIALOG_CONTENT_PADDING_UNITS.dense : DIALOG_CONTENT_PADDING_UNITS.normal,\n );\n const paddingTop = titled\n ? theme.spacing(DIALOG_TITLED_BODY_PADDING_TOP_UNITS)\n : padding;\n\n return (\n <ScrollView\n testID={slotTestId(others, 'content', 'dialog')}\n style={[\n styles.content,\n dividers\n ? {\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n }\n : null,\n style,\n ]}\n contentContainerStyle={{ padding, paddingTop }}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </ScrollView>\n );\n}\n\nDialogContent.displayName = 'DialogContent';\n\nconst JUSTIFY: Record<DialogActionsAlignment, NonNullable<ViewStyle['justifyContent']>> = {\n left: 'flex-start',\n center: 'center',\n right: 'flex-end',\n 'space-between': 'space-between',\n};\n\nexport function DialogActions({\n children,\n alignment = 'right',\n spacing = DIALOG_ACTIONS.defaultSpacingUnits,\n ...others\n}: DialogActionsProps): React.JSX.Element {\n const theme = useUiTheme();\n const { style, ...viewProps } = withoutTestIdProps(others);\n\n return (\n <View\n testID={slotTestId(others, 'actions', 'dialog')}\n style={[\n styles.actions,\n {\n padding: theme.spacing(DIALOG_ACTIONS.paddingUnits),\n justifyContent: JUSTIFY[alignment],\n gap: theme.spacing(spacing),\n },\n style,\n ]}\n {...viewProps}\n >\n {renderTextChildren(children, dialogBodyTextStyle(theme))}\n </View>\n );\n}\n\nDialogActions.displayName = 'DialogActions';\n\nconst styles = StyleSheet.create({\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexGrow: 0,\n flexShrink: 0,\n paddingTop: DIALOG_TITLE.padding.top,\n paddingHorizontal: DIALOG_TITLE.padding.horizontal,\n },\n headerText: {\n flexShrink: 1,\n },\n close: {\n padding: DIALOG_CLOSE_BUTTON.padding,\n borderRadius: 9999,\n alignItems: 'center',\n justifyContent: 'center',\n },\n content: {\n flexGrow: 1,\n flexShrink: 1,\n },\n actions: {\n flexDirection: 'row',\n alignItems: 'center',\n flexGrow: 0,\n flexShrink: 0,\n },\n});\n","import * as React from 'react';\nimport {\n Keyboard,\n Platform,\n type KeyboardEvent,\n type KeyboardEventName,\n type LayoutChangeEvent,\n} from 'react-native';\n\n/**\n * HOW FAR THE SOFT KEYBOARD COVERS A FULL-WINDOW VIEW, AND NOTHING MORE.\n *\n * React Native's `Modal` asks Android for `SOFT_INPUT_ADJUST_RESIZE`, and under\n * edge-to-edge that asks for nothing: the window keeps its full height and the\n * keyboard is drawn over it. iOS never resized a modal at all. So an overlay\n * that fills the modal has its bottom under the keyboard, and whatever sits\n * there — a dialog's actions — is hidden until the keyboard goes away.\n *\n * This reads the keyboard's own top edge from the `Keyboard` events and the\n * view's own bottom edge from its layout, and answers the difference. Reading\n * the OVERLAP rather than the keyboard's height is what keeps it right when the\n * window DID resize (a host that is not edge-to-edge): the view then already\n * ends at the keyboard, the overlap is zero, and nothing is lifted twice. No\n * soft-input mode is set here, deliberately — a second one would fight the one\n * `Modal` already asks for.\n *\n * The view's layout `y` is relative to its parent, so the view is expected to\n * be the root of a window that starts at the top of the screen — which a\n * `transparent` modal is, on iOS and under Android edge-to-edge alike.\n */\nexport function keyboardOverlap(viewBottom: number | null, keyboardTop: number | null): number {\n if (viewBottom === null || keyboardTop === null) return 0;\n return Math.max(0, viewBottom - keyboardTop);\n}\n\n/** iOS announces the keyboard before it moves; Android only once it has. */\nconst KEYBOARD_EVENTS: { show: KeyboardEventName; hide: KeyboardEventName } =\n Platform.OS === 'ios'\n ? { show: 'keyboardWillShow', hide: 'keyboardWillHide' }\n : { show: 'keyboardDidShow', hide: 'keyboardDidHide' };\n\nexport interface KeyboardOverlap {\n /** How many dp of the view the keyboard covers; `0` while it is down. */\n overlap: number;\n /** Goes on the view being measured. */\n onLayout: (event: LayoutChangeEvent) => void;\n}\n\n/**\n * The keyboard's overlap with the view `onLayout` is put on. Android re-sends\n * `keyboardDidShow` when the keyboard changes height while it stays up (an\n * emoji panel, a suggestion strip), so the overlap follows those too.\n */\nexport function useKeyboardOverlap(): KeyboardOverlap {\n const [viewBottom, setViewBottom] = React.useState<number | null>(null);\n const [keyboardTop, setKeyboardTop] = React.useState<number | null>(null);\n\n React.useEffect(() => {\n const shown = Keyboard.addListener(KEYBOARD_EVENTS.show, (event: KeyboardEvent) => {\n setKeyboardTop(event.endCoordinates.screenY);\n });\n const hidden = Keyboard.addListener(KEYBOARD_EVENTS.hide, () => {\n setKeyboardTop(null);\n });\n return () => {\n shown.remove();\n hidden.remove();\n };\n }, []);\n\n const onLayout = React.useCallback((event: LayoutChangeEvent) => {\n const { y, height } = event.nativeEvent.layout;\n setViewBottom(y + height);\n }, []);\n\n return { overlap: keyboardOverlap(viewBottom, keyboardTop), onLayout };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAYA,YAAW;AACvB,SAAS,OAAO,aAAAC,YAAW,cAAAC,aAAY,cAAAC,aAAY,QAAAC,aAAY;;;ACD/D,YAAY,WAAW;AAyBhB,IAAM,kBAAwE;AAA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AAA;AAAA,YACC,eAAW;AAAA,YACX,UAAU;AAAA,YACV,QAAQ,GAAG,MAAM;AAAA,YACjB,SAAS;AAAA,YACT,OAAO,CAACH,YAAW,cAAc,eAAe,KAAK,CAAC;AAAA;AAAA,QACxD;AAAA,QACA,gBAAAF,MAACI,OAAA,EAAK,QAAgB,OAAO,CAAC,KAAK,OAAO,KAAK,GAC5C;AAAA,kBACC,gBAAAL;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,MAAM,QAAQ,QAAQ;AAAA,cAC7B,QAAQ,KAAK;AAAA,cACb,QAAQ,aAAa;AAAA,cACrB,YAAY,aAAa;AAAA,cACzB,QAAQ,aAAa;AAAA,cACrB,SAAS,aAAa;AAAA,cACtB,QAAQ,GAAG,MAAM;AAAA;AAAA,UACnB,IACE;AAAA,UACJ,gBAAAC,MAAC,oBAAoB,UAApB,EAA6B,OAAO,QAAQ,KAAK,KAAK,eAAe,QAAQ,GAC3E;AAAA,oBACC,gBAAAD;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,UAAU;AAAA,gBACV;AAAA,gBACA;AAAA,gBACA,YAAY;AAAA;AAAA,YACd,IACE;AAAA,YACH,OAAO,OAAO,UAAU,QAAQ,KAAK,CAAC;AAAA,aACzC;AAAA,WACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,OAAO,cAAc;","names":["React","Pressable","ScrollView","StyleSheet","View","React","React","jsx","jsxs","styles","StyleSheet","ScrollView","View","Pressable"]}
|
package/dist/native/icons.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../chunk-47VRDPR2.js";
|
|
10
10
|
import {
|
|
11
11
|
AppHeaderDetails
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-XE4JVTM6.js";
|
|
13
13
|
import {
|
|
14
14
|
AppHeaderBrand
|
|
15
15
|
} from "../chunk-GWFAINQ7.js";
|
|
@@ -25,9 +25,9 @@ import "../chunk-CRN4KKNI.js";
|
|
|
25
25
|
import "../chunk-26DSSWTT.js";
|
|
26
26
|
import "../chunk-BDQCCW4N.js";
|
|
27
27
|
import "../chunk-IM4DMKH4.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-ILQVNZ5B.js";
|
|
29
29
|
import "../chunk-GYXUCS37.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-AEIJSEVV.js";
|
|
31
31
|
import "../chunk-AL5E624U.js";
|
|
32
32
|
import "../chunk-Z2JH5KW5.js";
|
|
33
33
|
import "../chunk-LV7LSPBF.js";
|