@oxyhq/bloom 0.48.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +3 -1
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +30 -4
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +48 -14
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +30 -5
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/dialog/DialogHeader.js +12 -6
- package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
- package/lib/commonjs/dialog/DialogMorph.js +458 -0
- package/lib/commonjs/dialog/DialogMorph.js.map +1 -0
- package/lib/commonjs/dialog/index.js +7 -0
- package/lib/commonjs/dialog/index.js.map +1 -1
- package/lib/commonjs/dialog/index.web.js +7 -0
- package/lib/commonjs/dialog/index.web.js.map +1 -1
- package/lib/commonjs/settings-list/SettingsList.js +1 -1
- package/lib/commonjs/surfaces/SurfaceHost.js +1 -0
- package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +3 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/dialog/Dialog.js +30 -4
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +48 -15
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +31 -6
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/dialog/DialogHeader.js +12 -6
- package/lib/module/dialog/DialogHeader.js.map +1 -1
- package/lib/module/dialog/DialogMorph.js +451 -0
- package/lib/module/dialog/DialogMorph.js.map +1 -0
- package/lib/module/dialog/index.js +1 -0
- package/lib/module/dialog/index.js.map +1 -1
- package/lib/module/dialog/index.web.js +1 -0
- package/lib/module/dialog/index.web.js.map +1 -1
- package/lib/module/settings-list/SettingsList.js +1 -1
- package/lib/module/surfaces/SurfaceHost.js +1 -0
- package/lib/module/surfaces/SurfaceHost.js.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +8 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogMorph.d.ts +150 -0
- package/lib/typescript/commonjs/dialog/DialogMorph.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/index.d.ts +2 -0
- package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +30 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/surfaces/types.d.ts +9 -0
- package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +8 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogMorph.d.ts +150 -0
- package/lib/typescript/module/dialog/DialogMorph.d.ts.map +1 -0
- package/lib/typescript/module/dialog/index.d.ts +2 -0
- package/lib/typescript/module/dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.web.d.ts +2 -0
- package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +30 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -1
- package/lib/typescript/module/surfaces/types.d.ts +9 -0
- package/lib/typescript/module/surfaces/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/DialogMorph.test.tsx +230 -0
- package/src/bottom-sheet/BottomSheetBase.tsx +13 -1
- package/src/dialog/Dialog.tsx +38 -11
- package/src/dialog/Dialog.web.tsx +40 -10
- package/src/dialog/DialogBottomSheet.tsx +35 -5
- package/src/dialog/DialogHeader.tsx +14 -5
- package/src/dialog/DialogMorph.tsx +576 -0
- package/src/dialog/index.ts +2 -0
- package/src/dialog/index.web.ts +2 -0
- package/src/dialog/types.ts +30 -0
- package/src/settings-list/SettingsList.tsx +1 -1
- package/src/surfaces/SurfaceHost.tsx +1 -0
- package/src/surfaces/types.ts +9 -0
package/src/dialog/types.ts
CHANGED
|
@@ -20,6 +20,15 @@ export type { DialogPlacement, ResponsiveDialogPlacement } from './placement';
|
|
|
20
20
|
export interface DialogHeaderConfig {
|
|
21
21
|
/** Collapsing title — rendered large in-content and small in the nav bar. */
|
|
22
22
|
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A branded node rendered centered in the nav bar INSTEAD of the collapsing
|
|
25
|
+
* text title — e.g. a product wordmark. Always visible (it never collapses),
|
|
26
|
+
* and it suppresses the large in-content title/subtitle entirely, so the
|
|
27
|
+
* surface starts flush under the bar. `title`/`subtitle` are ignored while
|
|
28
|
+
* this is set. Must be referentially stable (memoize it) so the header does
|
|
29
|
+
* not thrash.
|
|
30
|
+
*/
|
|
31
|
+
titleContent?: ReactNode;
|
|
23
32
|
/** Supporting copy under the large title (and, optionally, in the bar). */
|
|
24
33
|
subtitle?: string;
|
|
25
34
|
/**
|
|
@@ -224,6 +233,27 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
224
233
|
contentPadding?: number;
|
|
225
234
|
/** Whether tapping the backdrop dismisses the dialog. Defaults to `true`. */
|
|
226
235
|
dismissOnBackdrop?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Whether the panel MORPHS across an in-place content swap. Defaults to
|
|
238
|
+
* `true`.
|
|
239
|
+
*
|
|
240
|
+
* When the content inside an OPEN dialog is replaced (a nav-within drill-in,
|
|
241
|
+
* as opposed to presenting a new surface on top), the panel animates from the
|
|
242
|
+
* outgoing content's size to the incoming one's while the incoming content
|
|
243
|
+
* fades in, instead of hard-cutting. The swap is signalled by the content
|
|
244
|
+
* itself through `useDialogFrame` — a dialog whose content never declares a
|
|
245
|
+
* frame is unaffected either way.
|
|
246
|
+
*
|
|
247
|
+
* The centered card morphs its height (about its centre) and its `maxWidth`;
|
|
248
|
+
* the bottom sheet morphs its height from its anchored edge; side sheets have
|
|
249
|
+
* fixed geometry and never morph. Morphing also requires the Dialog to own the
|
|
250
|
+
* scroll container: a `scrollable={false}` surface owns its own size, so its
|
|
251
|
+
* content only cross-fades.
|
|
252
|
+
*
|
|
253
|
+
* Set `false` for content that must never be resized into — e.g. a full-bleed
|
|
254
|
+
* picker that always fills the surface.
|
|
255
|
+
*/
|
|
256
|
+
morph?: boolean;
|
|
227
257
|
/**
|
|
228
258
|
* Style overrides applied to the inner content container on native (the
|
|
229
259
|
* floating bottom-sheet card) and to the modal panel on web.
|
package/src/surfaces/types.ts
CHANGED
|
@@ -55,6 +55,15 @@ export interface SurfacePresentation {
|
|
|
55
55
|
* to `Dialog`.
|
|
56
56
|
*/
|
|
57
57
|
scrollable?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the surface MORPHS its panel when its content is swapped in place —
|
|
60
|
+
* navigation WITHIN this surface, as opposed to presenting a new surface on
|
|
61
|
+
* top. Defaults to `true`. The content signals the swap through
|
|
62
|
+
* `useDialogFrame`; a surface whose content never declares a frame is
|
|
63
|
+
* unaffected. Set `false` for content that must never be resized into (a
|
|
64
|
+
* full-bleed picker). Forwarded to `Dialog`.
|
|
65
|
+
*/
|
|
66
|
+
morph?: boolean;
|
|
58
67
|
/** Style overrides applied to the inner content container. */
|
|
59
68
|
style?: StyleProp<ViewStyle>;
|
|
60
69
|
/** Style overrides for the side/bottom placement panel surface. */
|