@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
/** Panel reshape duration (ms) between two content frames. */
|
|
4
|
+
export declare const DIALOG_MORPH_DURATION = 260;
|
|
5
|
+
/**
|
|
6
|
+
* Incoming-frame fade-in (ms). Deliberately shorter than the reshape so the new
|
|
7
|
+
* content has landed by the time the panel finishes settling.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DIALOG_MORPH_FADE_DURATION = 150;
|
|
10
|
+
/**
|
|
11
|
+
* The identity of the content currently rendered inside a Dialog surface,
|
|
12
|
+
* declared by that content via {@link useDialogFrame}.
|
|
13
|
+
*/
|
|
14
|
+
export interface DialogFrame {
|
|
15
|
+
/**
|
|
16
|
+
* Stable identity of the current content. A CHANGE while the surface stays
|
|
17
|
+
* open is what marks an in-place swap and triggers the morph.
|
|
18
|
+
*/
|
|
19
|
+
key: string;
|
|
20
|
+
/**
|
|
21
|
+
* Opt this frame OUT of the size morph — the panel keeps its normal sizing
|
|
22
|
+
* and the swap hard-cuts (the incoming content still fades in). Defaults to
|
|
23
|
+
* `true`. Use it for content that must not be resized into, e.g. a full-bleed
|
|
24
|
+
* picker that always fills the surface.
|
|
25
|
+
*/
|
|
26
|
+
morph?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* An EXPLICIT target size the panel morphs TO for this frame, instead of the
|
|
29
|
+
* measured natural height / the surface `maxWidth`. This is what lets an
|
|
30
|
+
* own-scroller frame (whose content owns its own scroll, so the panel cannot
|
|
31
|
+
* measure it) still GROW its container to a large declared size — the panel
|
|
32
|
+
* animates up to `height`/`maxWidth` on entry and back down when the next frame
|
|
33
|
+
* declares (or measures) a smaller size, while the frame's own list scrolls
|
|
34
|
+
* within. Both fields are px; either may be omitted (the omitted axis keeps its
|
|
35
|
+
* normal behaviour). `height` is clamped to the viewport; `maxWidth` is honoured
|
|
36
|
+
* only on width-varying placements (the centered card).
|
|
37
|
+
*/
|
|
38
|
+
size?: {
|
|
39
|
+
height?: number;
|
|
40
|
+
maxWidth?: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
type FrameHandler = (next: DialogFrame, previous: DialogFrame) => void;
|
|
44
|
+
/**
|
|
45
|
+
* The bridge between a surface's content (which knows WHEN it swapped) and the
|
|
46
|
+
* surface (which owns the panel). Deliberately not a React store: the surface
|
|
47
|
+
* does not need to re-render on a frame change — it drives shared values.
|
|
48
|
+
*/
|
|
49
|
+
export interface DialogFrameChannel {
|
|
50
|
+
/** Declare the frame currently rendered. Called from the content's layout phase. */
|
|
51
|
+
setFrame: (frame: DialogFrame) => void;
|
|
52
|
+
/** Register the surface's morph runner (fires on a KEY CHANGE — the animation). */
|
|
53
|
+
setHandler: (handler: FrameHandler) => () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Register a listener that fires on EVERY `setFrame` (every render/layout, not
|
|
56
|
+
* only a key change). The surface uses it to keep the active frame's declared
|
|
57
|
+
* target size (its `size`) as DERIVED state, so the panel re-settles at that
|
|
58
|
+
* size after a placement swap re-lays it out (a swap does not change the key,
|
|
59
|
+
* so the key-change handler never re-runs). Fires immediately with the current
|
|
60
|
+
* frame on register so a freshly-mounted surface (a placement swap remounts it)
|
|
61
|
+
* picks up the active frame's size without waiting for the next render.
|
|
62
|
+
*/
|
|
63
|
+
setFrameListener: (listener: (frame: DialogFrame) => void) => () => void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Declare the identity of the content currently rendered inside a Dialog
|
|
67
|
+
* surface. When the `key` changes while the surface stays open, the surface
|
|
68
|
+
* MORPHS its panel from the outgoing content's size to the incoming one's
|
|
69
|
+
* instead of hard-cutting.
|
|
70
|
+
*
|
|
71
|
+
* Called by the host that owns the surface's content (the SDK's `SurfaceScreen`
|
|
72
|
+
* declares `route#step`). No-op outside a morph-capable Dialog surface — a side
|
|
73
|
+
* sheet, or a plain confirm dialog — so a host can call it unconditionally.
|
|
74
|
+
*
|
|
75
|
+
* EXACTLY ONE host per surface may declare frames: two writers with different
|
|
76
|
+
* identities would each read the other's key as a swap and morph on every
|
|
77
|
+
* render. A screen that wants its own sub-views to morph must fold them into
|
|
78
|
+
* the surface host's key rather than declaring a second frame.
|
|
79
|
+
*/
|
|
80
|
+
export declare function useDialogFrame(frame: DialogFrame | null | undefined): void;
|
|
81
|
+
/** Options a surface passes when it wires up morphing for its panel. */
|
|
82
|
+
export interface DialogMorphOptions {
|
|
83
|
+
/** Surface-level enable — the `Dialog` `morph` prop (defaults to `true`). */
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether this surface can measure the NATURAL height of its content, i.e.
|
|
87
|
+
* whether the Dialog owns the scroll container (`scrollable !== false`). A
|
|
88
|
+
* surface whose content owns its own scroller also owns its own size, so
|
|
89
|
+
* there is nothing for the panel to measure — those surfaces cross-fade the
|
|
90
|
+
* incoming frame but never pin/resize the panel.
|
|
91
|
+
*/
|
|
92
|
+
measurable: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Hard upper bound (px) for the reshape target — pass the viewport height.
|
|
95
|
+
*
|
|
96
|
+
* This is deliberately NOT the panel's exact size cap: that cap is a
|
|
97
|
+
* percentage/inset mix which resolves differently per platform, and guessing
|
|
98
|
+
* it low leaves a visible snap when the pin is released. The panel's own
|
|
99
|
+
* `maxHeight` style already clamps the RENDERED height at every frame, so a
|
|
100
|
+
* target above the cap simply lands on the cap and releases onto it — the
|
|
101
|
+
* bound here only keeps the animation from chasing a runaway content height.
|
|
102
|
+
*/
|
|
103
|
+
maxHeight: number;
|
|
104
|
+
/**
|
|
105
|
+
* The panel's `maxWidth` (px) when the placement lets width vary (the centered
|
|
106
|
+
* card). A surface that changes it per frame gets a width morph alongside the
|
|
107
|
+
* height one. `undefined` on placements whose width is fixed.
|
|
108
|
+
*/
|
|
109
|
+
maxWidth?: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Wire size morphing into one Dialog surface. Returns the panel/content styles
|
|
113
|
+
* and the two measurement callbacks the surface must attach.
|
|
114
|
+
*
|
|
115
|
+
* While idle the panel style resolves to `height: 'auto'` — byte-for-byte the
|
|
116
|
+
* natural sizing every placement had before morphing existed — so first open,
|
|
117
|
+
* dismissal, and a responsive placement swap are untouched. The height is only
|
|
118
|
+
* driven for the ~260ms of an actual reshape, then released back to natural.
|
|
119
|
+
*
|
|
120
|
+
* A frame that declares an explicit `size` is different: that size is DERIVED
|
|
121
|
+
* state the panel rests at at EVERY layout (`declaredHeight`/`declaredMaxWidth`),
|
|
122
|
+
* not a one-shot animation target — so a placement swap (which re-lays the panel
|
|
123
|
+
* out WITHOUT a key change, so the animation never re-runs) still settles at the
|
|
124
|
+
* declared size instead of falling back to natural.
|
|
125
|
+
*/
|
|
126
|
+
export declare function useDialogMorph({ enabled, measurable, maxHeight, maxWidth, }: DialogMorphOptions): {
|
|
127
|
+
channel: DialogFrameChannel;
|
|
128
|
+
onPanelLayout: (event: LayoutChangeEvent) => void;
|
|
129
|
+
onContentLayout: (event: LayoutChangeEvent) => void;
|
|
130
|
+
panelStyle: ViewStyle;
|
|
131
|
+
contentStyle: ViewStyle;
|
|
132
|
+
};
|
|
133
|
+
export type DialogMorph = ReturnType<typeof useDialogMorph>;
|
|
134
|
+
/**
|
|
135
|
+
* Wraps a surface's content: publishes the frame channel to it (so it can
|
|
136
|
+
* declare swaps via {@link useDialogFrame}), measures the content's natural
|
|
137
|
+
* height, and carries the incoming-frame fade.
|
|
138
|
+
*
|
|
139
|
+
* MUST be rendered inside the surface's scroll content and MUST NOT be given a
|
|
140
|
+
* growing/stretching style: it is sized by its own content, which is what lets
|
|
141
|
+
* it report the incoming frame's natural height while the panel is still pinned
|
|
142
|
+
* at the outgoing one.
|
|
143
|
+
*/
|
|
144
|
+
export declare function DialogMorphContent({ morph, style, children, }: {
|
|
145
|
+
morph: DialogMorph;
|
|
146
|
+
style?: StyleProp<ViewStyle>;
|
|
147
|
+
children: React.ReactNode;
|
|
148
|
+
}): React.ReactElement;
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=DialogMorph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogMorph.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogMorph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmC5E,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,MAAM,C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BAAiB;6BAcjB,iBAAiB;;;EAmD5B;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,KAAK,CAAC,YAAY,CAQrB"}
|
|
@@ -3,6 +3,8 @@ export { BloomDialogProvider } from './BloomDialogProvider';
|
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
5
|
export { useDialogHeader } from './DialogHeader';
|
|
6
|
+
export { useDialogFrame } from './DialogMorph';
|
|
6
7
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
8
|
+
export type { DialogFrame } from './DialogMorph';
|
|
7
9
|
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -3,6 +3,8 @@ export { BloomDialogProvider } from './BloomDialogProvider.web';
|
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
5
|
export { useDialogHeader } from './DialogHeader';
|
|
6
|
+
export { useDialogFrame } from './DialogMorph';
|
|
6
7
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
8
|
+
export type { DialogFrame } from './DialogMorph';
|
|
7
9
|
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
8
10
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -17,6 +17,15 @@ export type { DialogPlacement, ResponsiveDialogPlacement } from './placement';
|
|
|
17
17
|
export interface DialogHeaderConfig {
|
|
18
18
|
/** Collapsing title — rendered large in-content and small in the nav bar. */
|
|
19
19
|
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* A branded node rendered centered in the nav bar INSTEAD of the collapsing
|
|
22
|
+
* text title — e.g. a product wordmark. Always visible (it never collapses),
|
|
23
|
+
* and it suppresses the large in-content title/subtitle entirely, so the
|
|
24
|
+
* surface starts flush under the bar. `title`/`subtitle` are ignored while
|
|
25
|
+
* this is set. Must be referentially stable (memoize it) so the header does
|
|
26
|
+
* not thrash.
|
|
27
|
+
*/
|
|
28
|
+
titleContent?: ReactNode;
|
|
20
29
|
/** Supporting copy under the large title (and, optionally, in the bar). */
|
|
21
30
|
subtitle?: string;
|
|
22
31
|
/**
|
|
@@ -214,6 +223,27 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
214
223
|
contentPadding?: number;
|
|
215
224
|
/** Whether tapping the backdrop dismisses the dialog. Defaults to `true`. */
|
|
216
225
|
dismissOnBackdrop?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Whether the panel MORPHS across an in-place content swap. Defaults to
|
|
228
|
+
* `true`.
|
|
229
|
+
*
|
|
230
|
+
* When the content inside an OPEN dialog is replaced (a nav-within drill-in,
|
|
231
|
+
* as opposed to presenting a new surface on top), the panel animates from the
|
|
232
|
+
* outgoing content's size to the incoming one's while the incoming content
|
|
233
|
+
* fades in, instead of hard-cutting. The swap is signalled by the content
|
|
234
|
+
* itself through `useDialogFrame` — a dialog whose content never declares a
|
|
235
|
+
* frame is unaffected either way.
|
|
236
|
+
*
|
|
237
|
+
* The centered card morphs its height (about its centre) and its `maxWidth`;
|
|
238
|
+
* the bottom sheet morphs its height from its anchored edge; side sheets have
|
|
239
|
+
* fixed geometry and never morph. Morphing also requires the Dialog to own the
|
|
240
|
+
* scroll container: a `scrollable={false}` surface owns its own size, so its
|
|
241
|
+
* content only cross-fades.
|
|
242
|
+
*
|
|
243
|
+
* Set `false` for content that must never be resized into — e.g. a full-bleed
|
|
244
|
+
* picker that always fills the surface.
|
|
245
|
+
*/
|
|
246
|
+
morph?: boolean;
|
|
217
247
|
/**
|
|
218
248
|
* Style overrides applied to the inner content container on native (the
|
|
219
249
|
* floating bottom-sheet card) and to the modal panel on web.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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M,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD,KAAK,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceHost.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/SurfaceHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD,KAAK,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AAgCxD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe;;;;;;uBAqGhB;YAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;SAAE;;;EAcrE"}
|
|
@@ -53,6 +53,15 @@ export interface SurfacePresentation {
|
|
|
53
53
|
* to `Dialog`.
|
|
54
54
|
*/
|
|
55
55
|
scrollable?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the surface MORPHS its panel when its content is swapped in place —
|
|
58
|
+
* navigation WITHIN this surface, as opposed to presenting a new surface on
|
|
59
|
+
* top. Defaults to `true`. The content signals the swap through
|
|
60
|
+
* `useDialogFrame`; a surface whose content never declares a frame is
|
|
61
|
+
* unaffected. Set `false` for content that must never be resized into (a
|
|
62
|
+
* full-bleed picker). Forwarded to `Dialog`.
|
|
63
|
+
*/
|
|
64
|
+
morph?: boolean;
|
|
56
65
|
/** Style overrides applied to the inner content container. */
|
|
57
66
|
style?: StyleProp<ViewStyle>;
|
|
58
67
|
/** Style overrides for the side/bottom placement panel surface. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,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AAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4EAA4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACvC;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { type ViewStyle, type StyleProp } from 'react-native';
|
|
2
|
+
import { type LayoutChangeEvent, type ViewStyle, type StyleProp } from 'react-native';
|
|
3
3
|
import { type SharedValue } from 'react-native-reanimated';
|
|
4
4
|
export interface BottomSheetRef {
|
|
5
5
|
present: () => void;
|
|
@@ -112,6 +112,13 @@ export interface BottomSheetProps {
|
|
|
112
112
|
* Dialog to float its sticky nav header over the sheet's scroll content.
|
|
113
113
|
*/
|
|
114
114
|
headerOverlay?: React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* Layout callback for the SHEET CARD — the same box `style` targets. Lets a
|
|
117
|
+
* host observe the card's rendered size (the Dialog measures it to morph the
|
|
118
|
+
* sheet between two content frames). Fires on every size change, including
|
|
119
|
+
* while a host animates the card's height.
|
|
120
|
+
*/
|
|
121
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
115
122
|
}
|
|
116
123
|
/**
|
|
117
124
|
* Props consumed by a platform Shell — the outermost wrapper that hosts the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomSheetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAMH,KAAK,SAAS,EACd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAGtB,OAAiB,EAGb,KAAK,WAAW,EAMnB,MAAM,yBAAyB,CAAC;AAwBjC,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,oBAAoB,CAAC,EAAE,O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M,CAAC;IACzB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACxC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACjD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IAClC,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC1D,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,eAAe,6FAmmB1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAIL,4BAA4B,EAK7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,2CAab;AAwfD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAoBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AAmCA,OAAO,EAOL,4BAA4B,EAM7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAqCjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAazD;AAiaD,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAsQxC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAgBA;AA8BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,mZAK5B,CAAC"}
|
|
@@ -19,11 +19,11 @@ import type { DialogProps } from './types';
|
|
|
19
19
|
* so a host's CSS-var theme scope (`vars()`) still applies to descendants
|
|
20
20
|
* - `title` / `description` / `actions` / `children` → declarative body
|
|
21
21
|
*/
|
|
22
|
-
export declare function DialogBottomSheet({ control, open: controlledOpen, startOpen, onClose, testID, title, description, actions, header, maxHeightRatio, showHandle, dismissOnBackdrop, contentPadding, scrollable, style, panelStyle, panelClassName, containerStyle, containerClassName, label, children, }: DialogBottomSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DialogBottomSheet({ control, open: controlledOpen, startOpen, onClose, testID, title, description, actions, header, maxHeightRatio, showHandle, dismissOnBackdrop, contentPadding, scrollable, morph, style, panelStyle, panelClassName, containerStyle, containerClassName, label, children, }: DialogBottomSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
/**
|
|
24
24
|
* Props the shared bottom-sheet surface consumes — the `bottom`-relevant subset
|
|
25
25
|
* of `DialogProps`. `width`, `maxWidth`, and `inset` are placement-specific to
|
|
26
26
|
* the side/centered surfaces and intentionally excluded.
|
|
27
27
|
*/
|
|
28
|
-
export type DialogBottomSheetProps = Pick<DialogProps, 'control' | 'open' | 'startOpen' | 'onClose' | 'testID' | 'title' | 'description' | 'actions' | 'header' | 'maxHeightRatio' | 'showHandle' | 'dismissOnBackdrop' | 'contentPadding' | 'scrollable' | 'style' | 'panelStyle' | 'panelClassName' | 'containerStyle' | 'containerClassName' | 'label' | 'children'>;
|
|
28
|
+
export type DialogBottomSheetProps = Pick<DialogProps, 'control' | 'open' | 'startOpen' | 'onClose' | 'testID' | 'title' | 'description' | 'actions' | 'header' | 'maxHeightRatio' | 'showHandle' | 'dismissOnBackdrop' | 'contentPadding' | 'scrollable' | 'morph' | 'style' | 'panelStyle' | 'panelClassName' | 'containerStyle' | 'containerClassName' | 'label' | 'children'>;
|
|
29
29
|
//# sourceMappingURL=DialogBottomSheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,cAAyC,EACzC,UAAiB,EACjB,iBAAwB,EACxB,cAA+C,EAC/C,UAAU,EACV,KAAK,EACL,KAAK,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,QAAQ,GACT,EAAE,sBAAsB,2CAmPxB;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,WAAW,EACT,SAAS,GACT,MAAM,GACN,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,aAAa,GACb,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,YAAY,GACZ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,OAAO,GACP,UAAU,CACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAKf,KAAK,WAAW,EACjB,MA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IAAI,KAAK,MAAM,IAAI,CAAC;CACjD;AAkCD;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,iFAAiF;AACjF,wBAAgB,yBAAyB,IAAI,sBAAsB,CAQlE;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,sBAAsB,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,KAAK,CAAC,YAAY,CAMrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAqBnF;AAaD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;gBAOd,sBAAsB;YAC1B,kBAAkB;eACf,MAAM,IAAI;IACrB;;;;;OAKG;eACQ,OAAO;YACV,SAAS,CAAC,SAAS,CAAC;EA2F5B,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;gBAIf,sBAAsB;YAC1B,kBAAkB;EAgC1B,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
/** Panel reshape duration (ms) between two content frames. */
|
|
4
|
+
export declare const DIALOG_MORPH_DURATION = 260;
|
|
5
|
+
/**
|
|
6
|
+
* Incoming-frame fade-in (ms). Deliberately shorter than the reshape so the new
|
|
7
|
+
* content has landed by the time the panel finishes settling.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DIALOG_MORPH_FADE_DURATION = 150;
|
|
10
|
+
/**
|
|
11
|
+
* The identity of the content currently rendered inside a Dialog surface,
|
|
12
|
+
* declared by that content via {@link useDialogFrame}.
|
|
13
|
+
*/
|
|
14
|
+
export interface DialogFrame {
|
|
15
|
+
/**
|
|
16
|
+
* Stable identity of the current content. A CHANGE while the surface stays
|
|
17
|
+
* open is what marks an in-place swap and triggers the morph.
|
|
18
|
+
*/
|
|
19
|
+
key: string;
|
|
20
|
+
/**
|
|
21
|
+
* Opt this frame OUT of the size morph — the panel keeps its normal sizing
|
|
22
|
+
* and the swap hard-cuts (the incoming content still fades in). Defaults to
|
|
23
|
+
* `true`. Use it for content that must not be resized into, e.g. a full-bleed
|
|
24
|
+
* picker that always fills the surface.
|
|
25
|
+
*/
|
|
26
|
+
morph?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* An EXPLICIT target size the panel morphs TO for this frame, instead of the
|
|
29
|
+
* measured natural height / the surface `maxWidth`. This is what lets an
|
|
30
|
+
* own-scroller frame (whose content owns its own scroll, so the panel cannot
|
|
31
|
+
* measure it) still GROW its container to a large declared size — the panel
|
|
32
|
+
* animates up to `height`/`maxWidth` on entry and back down when the next frame
|
|
33
|
+
* declares (or measures) a smaller size, while the frame's own list scrolls
|
|
34
|
+
* within. Both fields are px; either may be omitted (the omitted axis keeps its
|
|
35
|
+
* normal behaviour). `height` is clamped to the viewport; `maxWidth` is honoured
|
|
36
|
+
* only on width-varying placements (the centered card).
|
|
37
|
+
*/
|
|
38
|
+
size?: {
|
|
39
|
+
height?: number;
|
|
40
|
+
maxWidth?: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
type FrameHandler = (next: DialogFrame, previous: DialogFrame) => void;
|
|
44
|
+
/**
|
|
45
|
+
* The bridge between a surface's content (which knows WHEN it swapped) and the
|
|
46
|
+
* surface (which owns the panel). Deliberately not a React store: the surface
|
|
47
|
+
* does not need to re-render on a frame change — it drives shared values.
|
|
48
|
+
*/
|
|
49
|
+
export interface DialogFrameChannel {
|
|
50
|
+
/** Declare the frame currently rendered. Called from the content's layout phase. */
|
|
51
|
+
setFrame: (frame: DialogFrame) => void;
|
|
52
|
+
/** Register the surface's morph runner (fires on a KEY CHANGE — the animation). */
|
|
53
|
+
setHandler: (handler: FrameHandler) => () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Register a listener that fires on EVERY `setFrame` (every render/layout, not
|
|
56
|
+
* only a key change). The surface uses it to keep the active frame's declared
|
|
57
|
+
* target size (its `size`) as DERIVED state, so the panel re-settles at that
|
|
58
|
+
* size after a placement swap re-lays it out (a swap does not change the key,
|
|
59
|
+
* so the key-change handler never re-runs). Fires immediately with the current
|
|
60
|
+
* frame on register so a freshly-mounted surface (a placement swap remounts it)
|
|
61
|
+
* picks up the active frame's size without waiting for the next render.
|
|
62
|
+
*/
|
|
63
|
+
setFrameListener: (listener: (frame: DialogFrame) => void) => () => void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Declare the identity of the content currently rendered inside a Dialog
|
|
67
|
+
* surface. When the `key` changes while the surface stays open, the surface
|
|
68
|
+
* MORPHS its panel from the outgoing content's size to the incoming one's
|
|
69
|
+
* instead of hard-cutting.
|
|
70
|
+
*
|
|
71
|
+
* Called by the host that owns the surface's content (the SDK's `SurfaceScreen`
|
|
72
|
+
* declares `route#step`). No-op outside a morph-capable Dialog surface — a side
|
|
73
|
+
* sheet, or a plain confirm dialog — so a host can call it unconditionally.
|
|
74
|
+
*
|
|
75
|
+
* EXACTLY ONE host per surface may declare frames: two writers with different
|
|
76
|
+
* identities would each read the other's key as a swap and morph on every
|
|
77
|
+
* render. A screen that wants its own sub-views to morph must fold them into
|
|
78
|
+
* the surface host's key rather than declaring a second frame.
|
|
79
|
+
*/
|
|
80
|
+
export declare function useDialogFrame(frame: DialogFrame | null | undefined): void;
|
|
81
|
+
/** Options a surface passes when it wires up morphing for its panel. */
|
|
82
|
+
export interface DialogMorphOptions {
|
|
83
|
+
/** Surface-level enable — the `Dialog` `morph` prop (defaults to `true`). */
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether this surface can measure the NATURAL height of its content, i.e.
|
|
87
|
+
* whether the Dialog owns the scroll container (`scrollable !== false`). A
|
|
88
|
+
* surface whose content owns its own scroller also owns its own size, so
|
|
89
|
+
* there is nothing for the panel to measure — those surfaces cross-fade the
|
|
90
|
+
* incoming frame but never pin/resize the panel.
|
|
91
|
+
*/
|
|
92
|
+
measurable: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Hard upper bound (px) for the reshape target — pass the viewport height.
|
|
95
|
+
*
|
|
96
|
+
* This is deliberately NOT the panel's exact size cap: that cap is a
|
|
97
|
+
* percentage/inset mix which resolves differently per platform, and guessing
|
|
98
|
+
* it low leaves a visible snap when the pin is released. The panel's own
|
|
99
|
+
* `maxHeight` style already clamps the RENDERED height at every frame, so a
|
|
100
|
+
* target above the cap simply lands on the cap and releases onto it — the
|
|
101
|
+
* bound here only keeps the animation from chasing a runaway content height.
|
|
102
|
+
*/
|
|
103
|
+
maxHeight: number;
|
|
104
|
+
/**
|
|
105
|
+
* The panel's `maxWidth` (px) when the placement lets width vary (the centered
|
|
106
|
+
* card). A surface that changes it per frame gets a width morph alongside the
|
|
107
|
+
* height one. `undefined` on placements whose width is fixed.
|
|
108
|
+
*/
|
|
109
|
+
maxWidth?: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Wire size morphing into one Dialog surface. Returns the panel/content styles
|
|
113
|
+
* and the two measurement callbacks the surface must attach.
|
|
114
|
+
*
|
|
115
|
+
* While idle the panel style resolves to `height: 'auto'` — byte-for-byte the
|
|
116
|
+
* natural sizing every placement had before morphing existed — so first open,
|
|
117
|
+
* dismissal, and a responsive placement swap are untouched. The height is only
|
|
118
|
+
* driven for the ~260ms of an actual reshape, then released back to natural.
|
|
119
|
+
*
|
|
120
|
+
* A frame that declares an explicit `size` is different: that size is DERIVED
|
|
121
|
+
* state the panel rests at at EVERY layout (`declaredHeight`/`declaredMaxWidth`),
|
|
122
|
+
* not a one-shot animation target — so a placement swap (which re-lays the panel
|
|
123
|
+
* out WITHOUT a key change, so the animation never re-runs) still settles at the
|
|
124
|
+
* declared size instead of falling back to natural.
|
|
125
|
+
*/
|
|
126
|
+
export declare function useDialogMorph({ enabled, measurable, maxHeight, maxWidth, }: DialogMorphOptions): {
|
|
127
|
+
channel: DialogFrameChannel;
|
|
128
|
+
onPanelLayout: (event: LayoutChangeEvent) => void;
|
|
129
|
+
onContentLayout: (event: LayoutChangeEvent) => void;
|
|
130
|
+
panelStyle: ViewStyle;
|
|
131
|
+
contentStyle: ViewStyle;
|
|
132
|
+
};
|
|
133
|
+
export type DialogMorph = ReturnType<typeof useDialogMorph>;
|
|
134
|
+
/**
|
|
135
|
+
* Wraps a surface's content: publishes the frame channel to it (so it can
|
|
136
|
+
* declare swaps via {@link useDialogFrame}), measures the content's natural
|
|
137
|
+
* height, and carries the incoming-frame fade.
|
|
138
|
+
*
|
|
139
|
+
* MUST be rendered inside the surface's scroll content and MUST NOT be given a
|
|
140
|
+
* growing/stretching style: it is sized by its own content, which is what lets
|
|
141
|
+
* it report the incoming frame's natural height while the panel is still pinned
|
|
142
|
+
* at the outgoing one.
|
|
143
|
+
*/
|
|
144
|
+
export declare function DialogMorphContent({ morph, style, children, }: {
|
|
145
|
+
morph: DialogMorph;
|
|
146
|
+
style?: StyleProp<ViewStyle>;
|
|
147
|
+
children: React.ReactNode;
|
|
148
|
+
}): React.ReactElement;
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=DialogMorph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogMorph.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogMorph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmC5E,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;GAGG;AACH,e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EAmD5B;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,KAAK,CAAC,YAAY,CAQrB"}
|
|
@@ -3,6 +3,8 @@ export { BloomDialogProvider } from './BloomDialogProvider';
|
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
5
|
export { useDialogHeader } from './DialogHeader';
|
|
6
|
+
export { useDialogFrame } from './DialogMorph';
|
|
6
7
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
8
|
+
export type { DialogFrame } from './DialogMorph';
|
|
7
9
|
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -3,6 +3,8 @@ export { BloomDialogProvider } from './BloomDialogProvider.web';
|
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
5
|
export { useDialogHeader } from './DialogHeader';
|
|
6
|
+
export { useDialogFrame } from './DialogMorph';
|
|
6
7
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
8
|
+
export type { DialogFrame } from './DialogMorph';
|
|
7
9
|
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
8
10
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,GAC1B,MAAM,SAAS,CAAC"}
|
|
@@ -17,6 +17,15 @@ export type { DialogPlacement, ResponsiveDialogPlacement } from './placement';
|
|
|
17
17
|
export interface DialogHeaderConfig {
|
|
18
18
|
/** Collapsing title — rendered large in-content and small in the nav bar. */
|
|
19
19
|
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* A branded node rendered centered in the nav bar INSTEAD of the collapsing
|
|
22
|
+
* text title — e.g. a product wordmark. Always visible (it never collapses),
|
|
23
|
+
* and it suppresses the large in-content title/subtitle entirely, so the
|
|
24
|
+
* surface starts flush under the bar. `title`/`subtitle` are ignored while
|
|
25
|
+
* this is set. Must be referentially stable (memoize it) so the header does
|
|
26
|
+
* not thrash.
|
|
27
|
+
*/
|
|
28
|
+
titleContent?: ReactNode;
|
|
20
29
|
/** Supporting copy under the large title (and, optionally, in the bar). */
|
|
21
30
|
subtitle?: string;
|
|
22
31
|
/**
|
|
@@ -214,6 +223,27 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
214
223
|
contentPadding?: number;
|
|
215
224
|
/** Whether tapping the backdrop dismisses the dialog. Defaults to `true`. */
|
|
216
225
|
dismissOnBackdrop?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Whether the panel MORPHS across an in-place content swap. Defaults to
|
|
228
|
+
* `true`.
|
|
229
|
+
*
|
|
230
|
+
* When the content inside an OPEN dialog is replaced (a nav-within drill-in,
|
|
231
|
+
* as opposed to presenting a new surface on top), the panel animates from the
|
|
232
|
+
* outgoing content's size to the incoming one's while the incoming content
|
|
233
|
+
* fades in, instead of hard-cutting. The swap is signalled by the content
|
|
234
|
+
* itself through `useDialogFrame` — a dialog whose content never declares a
|
|
235
|
+
* frame is unaffected either way.
|
|
236
|
+
*
|
|
237
|
+
* The centered card morphs its height (about its centre) and its `maxWidth`;
|
|
238
|
+
* the bottom sheet morphs its height from its anchored edge; side sheets have
|
|
239
|
+
* fixed geometry and never morph. Morphing also requires the Dialog to own the
|
|
240
|
+
* scroll container: a `scrollable={false}` surface owns its own size, so its
|
|
241
|
+
* content only cross-fades.
|
|
242
|
+
*
|
|
243
|
+
* Set `false` for content that must never be resized into — e.g. a full-bleed
|
|
244
|
+
* picker that always fills the surface.
|
|
245
|
+
*/
|
|
246
|
+
morph?: boolean;
|
|
217
247
|
/**
|
|
218
248
|
* Style overrides applied to the inner content container on native (the
|
|
219
249
|
* floating bottom-sheet card) and to the modal panel on web.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CA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