@oxyhq/bloom 0.45.0 → 0.48.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 +34 -12
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/combobox/Combobox.js +3 -3
- package/lib/commonjs/combobox/Combobox.js.map +1 -1
- package/lib/commonjs/command/Command.js +3 -3
- package/lib/commonjs/command/Command.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +86 -8
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +176 -18
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +84 -29
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/dialog/DialogHeader.js +365 -0
- package/lib/commonjs/dialog/DialogHeader.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/index.js +40 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +84 -48
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/react-native-className.d.js +6 -0
- package/lib/commonjs/react-native-className.d.js.map +1 -0
- package/lib/commonjs/{search-input → search}/index.js +5 -3
- package/lib/commonjs/search/index.js.map +1 -0
- package/lib/commonjs/settings-list/SettingsList.js +5 -1
- package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
- package/lib/commonjs/surfaces/SurfaceHost.js +202 -0
- package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -0
- package/lib/commonjs/surfaces/api.js +83 -0
- package/lib/commonjs/surfaces/api.js.map +1 -0
- package/lib/commonjs/surfaces/index.js +82 -0
- package/lib/commonjs/surfaces/index.js.map +1 -0
- package/lib/commonjs/surfaces/index.web.js +77 -0
- package/lib/commonjs/surfaces/index.web.js.map +1 -0
- package/lib/commonjs/surfaces/prompts.js +154 -0
- package/lib/commonjs/surfaces/prompts.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceStore.js +172 -0
- package/lib/commonjs/surfaces/surfaceStore.js.map +1 -0
- package/lib/commonjs/surfaces/types.js +6 -0
- package/lib/commonjs/surfaces/types.js.map +1 -0
- package/lib/commonjs/surfaces/useSurface.js +36 -0
- package/lib/commonjs/surfaces/useSurface.js.map +1 -0
- package/lib/commonjs/text-field/index.js +22 -6
- package/lib/commonjs/text-field/index.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +34 -12
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/combobox/Combobox.js +3 -3
- package/lib/module/combobox/Combobox.js.map +1 -1
- package/lib/module/command/Command.js +3 -3
- package/lib/module/command/Command.js.map +1 -1
- package/lib/module/dialog/Dialog.js +88 -10
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +179 -21
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +85 -30
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/dialog/DialogHeader.js +356 -0
- package/lib/module/dialog/DialogHeader.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/index.js +7 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +7 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/react-native-className.d.js +20 -0
- package/lib/module/react-native-className.d.js.map +1 -0
- package/lib/module/{search-input → search}/index.js +6 -2
- package/lib/module/search/index.js.map +1 -0
- package/lib/module/settings-list/SettingsList.js +5 -1
- package/lib/module/settings-list/SettingsList.js.map +1 -1
- package/lib/module/surfaces/SurfaceHost.js +197 -0
- package/lib/module/surfaces/SurfaceHost.js.map +1 -0
- package/lib/module/surfaces/api.js +48 -0
- package/lib/module/surfaces/api.js.map +1 -0
- package/lib/module/surfaces/index.js +24 -0
- package/lib/module/surfaces/index.js.map +1 -0
- package/lib/module/surfaces/index.web.js +19 -0
- package/lib/module/surfaces/index.web.js.map +1 -0
- package/lib/module/surfaces/prompts.js +148 -0
- package/lib/module/surfaces/prompts.js.map +1 -0
- package/lib/module/surfaces/surfaceStore.js +159 -0
- package/lib/module/surfaces/surfaceStore.js.map +1 -0
- package/lib/module/surfaces/types.js +4 -0
- package/lib/module/surfaces/types.js.map +1 -0
- package/lib/module/surfaces/useSurface.js +31 -0
- package/lib/module/surfaces/useSurface.js.map +1 -0
- package/lib/module/text-field/index.js +22 -6
- package/lib/module/text-field/index.js.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +23 -0
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/combobox/Combobox.d.ts +1 -1
- package/lib/typescript/commonjs/command/Command.d.ts +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 +86 -0
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/index.d.ts +2 -1
- package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +85 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/common.d.ts +1 -0
- package/lib/typescript/commonjs/icons/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +5 -3
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/input-group/types.d.ts +1 -1
- package/lib/typescript/commonjs/{search-input → search}/index.d.ts +1 -1
- package/lib/typescript/commonjs/search/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts +25 -0
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/api.d.ts +41 -0
- package/lib/typescript/commonjs/surfaces/api.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/index.d.ts +25 -0
- package/lib/typescript/commonjs/surfaces/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/index.web.d.ts +20 -0
- package/lib/typescript/commonjs/surfaces/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/prompts.d.ts +13 -0
- package/lib/typescript/commonjs/surfaces/prompts.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts +51 -0
- package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/types.d.ts +161 -0
- package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/useSurface.d.ts +21 -0
- package/lib/typescript/commonjs/surfaces/useSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/text-field/index.d.ts +2 -1
- package/lib/typescript/commonjs/text-field/index.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +23 -0
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/combobox/Combobox.d.ts +1 -1
- package/lib/typescript/module/command/Command.d.ts +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 +86 -0
- package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -0
- package/lib/typescript/module/dialog/index.d.ts +2 -1
- package/lib/typescript/module/dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.web.d.ts +2 -1
- package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +85 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/icons/common.d.ts +1 -0
- package/lib/typescript/module/icons/common.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +5 -3
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/input-group/types.d.ts +1 -1
- package/lib/typescript/module/{search-input → search}/index.d.ts +1 -1
- package/lib/typescript/module/search/index.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts +25 -0
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/api.d.ts +41 -0
- package/lib/typescript/module/surfaces/api.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/index.d.ts +25 -0
- package/lib/typescript/module/surfaces/index.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/index.web.d.ts +20 -0
- package/lib/typescript/module/surfaces/index.web.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/prompts.d.ts +13 -0
- package/lib/typescript/module/surfaces/prompts.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/surfaceStore.d.ts +51 -0
- package/lib/typescript/module/surfaces/surfaceStore.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/types.d.ts +161 -0
- package/lib/typescript/module/surfaces/types.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/useSurface.d.ts +21 -0
- package/lib/typescript/module/surfaces/useSurface.d.ts.map +1 -0
- package/lib/typescript/module/text-field/index.d.ts +2 -1
- package/lib/typescript/module/text-field/index.d.ts.map +1 -1
- package/package.json +24 -8
- package/src/__tests__/BottomSheet.test.tsx +47 -0
- package/src/__tests__/DialogBottomSheet.test.tsx +30 -5
- package/src/__tests__/surfaceStore.test.ts +219 -0
- package/src/bottom-sheet/BottomSheetBase.tsx +59 -10
- package/src/combobox/Combobox.tsx +3 -3
- package/src/command/Command.tsx +3 -3
- package/src/dialog/Dialog.tsx +88 -7
- package/src/dialog/Dialog.web.tsx +179 -29
- package/src/dialog/DialogBottomSheet.tsx +90 -28
- package/src/dialog/DialogHeader.tsx +420 -0
- package/src/dialog/index.ts +2 -0
- package/src/dialog/index.web.ts +2 -0
- package/src/dialog/types.ts +86 -0
- package/src/index.ts +18 -1
- package/src/index.web.ts +18 -1
- package/src/input-group/types.ts +1 -1
- package/src/react-native-className.d.ts +38 -0
- package/src/{search-input → search}/index.tsx +8 -5
- package/src/settings-list/SettingsList.tsx +5 -1
- package/src/surfaces/SurfaceHost.tsx +222 -0
- package/src/surfaces/api.ts +55 -0
- package/src/surfaces/index.ts +38 -0
- package/src/surfaces/index.web.ts +33 -0
- package/src/surfaces/prompts.tsx +178 -0
- package/src/surfaces/surfaceStore.ts +168 -0
- package/src/surfaces/types.ts +172 -0
- package/src/surfaces/useSurface.ts +33 -0
- package/src/text-field/index.tsx +24 -5
- package/lib/commonjs/search-input/index.js.map +0 -1
- package/lib/module/search-input/index.js.map +0 -1
- package/lib/typescript/commonjs/search-input/index.d.ts.map +0 -1
- package/lib/typescript/module/search-input/index.d.ts.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { DialogHeaderConfig } from './types';
|
|
5
|
+
export type { DialogHeaderConfig } from './types';
|
|
6
|
+
/** Interactive nav-bar row height (px). Buttons + collapsed title live here. */
|
|
7
|
+
export declare const DIALOG_NAV_BAR_HEIGHT = 52;
|
|
8
|
+
/** Total gradient overlay height (bar + fade tail). */
|
|
9
|
+
export declare const DIALOG_HEADER_OVERLAY_HEIGHT: number;
|
|
10
|
+
/**
|
|
11
|
+
* Top inset applied to the Dialog's scroll content so the large title starts
|
|
12
|
+
* BELOW the whole gradient overlay (fully clear at rest, then scrolls under it).
|
|
13
|
+
*/
|
|
14
|
+
export declare const DIALOG_HEADER_CONTENT_TOP: number;
|
|
15
|
+
interface HeaderStore {
|
|
16
|
+
getSnapshot: () => DialogHeaderConfig | null;
|
|
17
|
+
setOverride: (next: DialogHeaderConfig | null) => void;
|
|
18
|
+
subscribe: (listener: () => void) => () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The per-surface header controller — the scroll offset + measured large-title
|
|
22
|
+
* height shared values plus the runtime-override store. Created once per Dialog
|
|
23
|
+
* (via {@link useDialogHeaderController}) and threaded into the scroller (writes
|
|
24
|
+
* `scrollY`), the nav bar, the large title, and the child provider.
|
|
25
|
+
*/
|
|
26
|
+
export interface DialogHeaderController {
|
|
27
|
+
scrollY: SharedValue<number>;
|
|
28
|
+
largeTitleHeight: SharedValue<number>;
|
|
29
|
+
store: HeaderStore;
|
|
30
|
+
}
|
|
31
|
+
/** Create the header controller for one Dialog. Stable for the Dialog's life. */
|
|
32
|
+
export declare function useDialogHeaderController(): DialogHeaderController;
|
|
33
|
+
/**
|
|
34
|
+
* Wraps the Dialog's scroll content so a mounted screen can contribute header
|
|
35
|
+
* slots via {@link useDialogHeader}. Only the child subtree needs this — the nav
|
|
36
|
+
* bar and large title read the same controller directly.
|
|
37
|
+
*/
|
|
38
|
+
export declare function DialogHeaderProvider({ controller, children, }: {
|
|
39
|
+
controller: DialogHeaderController;
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
}): React.ReactElement;
|
|
42
|
+
/**
|
|
43
|
+
* Contribute header content from within a Dialog surface — a dynamic title, a
|
|
44
|
+
* Save action, custom slots. Merges over the surface's static (registry) header
|
|
45
|
+
* config; unmounting clears the contribution. Slot nodes (`left`/`right`) MUST
|
|
46
|
+
* be referentially stable (memoize them) so the effect does not thrash.
|
|
47
|
+
*
|
|
48
|
+
* No-op outside a header-mode Dialog (e.g. a confirm dialog), so a screen can
|
|
49
|
+
* call it unconditionally.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useDialogHeader(config: DialogHeaderConfig | null | undefined): void;
|
|
52
|
+
/**
|
|
53
|
+
* The sticky nav bar: gradient background + left / center (collapsing title) /
|
|
54
|
+
* right slots. Absolutely positioned at the top of the Dialog surface, painted
|
|
55
|
+
* ABOVE the scroll content. Reads the scroll offset to cross-fade the small
|
|
56
|
+
* title in as the large title scrolls under it.
|
|
57
|
+
*
|
|
58
|
+
* `onDismiss` is the Dialog's own close (the default right-slot close button
|
|
59
|
+
* calls it) — passed explicitly rather than read from the dialog context because
|
|
60
|
+
* the bar is rendered as a sibling of the scroller, outside that context on the
|
|
61
|
+
* bottom-sheet path.
|
|
62
|
+
*/
|
|
63
|
+
export declare const DialogNavHeader: React.NamedExoticComponent<{
|
|
64
|
+
controller: DialogHeaderController;
|
|
65
|
+
header: DialogHeaderConfig;
|
|
66
|
+
onDismiss: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the small title cross-fades in on scroll (paired with an in-content
|
|
69
|
+
* {@link DialogLargeTitle}). Defaults to `true`. Set `false` for a surface
|
|
70
|
+
* whose content owns its own scroller (no Dialog scroll offset to drive the
|
|
71
|
+
* collapse): the small title is then always visible — a plain titled nav bar.
|
|
72
|
+
*/
|
|
73
|
+
collapse?: boolean;
|
|
74
|
+
style?: StyleProp<ViewStyle>;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* The large collapsing title, rendered at the TOP of the Dialog's scroll content
|
|
78
|
+
* (before the screen body). Owns the content top inset (so the title starts
|
|
79
|
+
* below the gradient overlay) and measures its own text height into the
|
|
80
|
+
* controller so the nav bar knows when to cross-fade the small title in.
|
|
81
|
+
*/
|
|
82
|
+
export declare const DialogLargeTitle: React.NamedExoticComponent<{
|
|
83
|
+
controller: DialogHeaderController;
|
|
84
|
+
header: DialogHeaderConfig;
|
|
85
|
+
}>;
|
|
86
|
+
//# sourceMappingURL=DialogHeader.d.ts.map
|
|
@@ -0,0 +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,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiBlD,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAKxC,uDAAuD;AACvD,eAAO,MAAM,4BAA4B,QAAwC,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAA+B,CAAC;AAkBtE,UAAU,WAAW;IACnB,WAAW,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CACjD;AAiCD;;;;;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,CAoBnF;AAaD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;gBAOd,sBAAsB;YAC1B,kBAAkB;eACf,MAAM,IAAI;IACrB;;;;;OAKG;eACQ,OAAO;YACV,SAAS,CAAC,SAAS,CAAC;EAsF5B,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;gBAIf,sBAAsB;YAC1B,kBAAkB;EA8B1B,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { Dialog, DIALOG_SHEET_BACKDROP_TESTID } from './Dialog';
|
|
|
2
2
|
export { BloomDialogProvider } from './BloomDialogProvider';
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
|
+
export { useDialogHeader } from './DialogHeader';
|
|
5
6
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
6
|
-
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
7
|
+
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
7
8
|
//# 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,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,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,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"}
|
|
@@ -2,6 +2,7 @@ export { Dialog, BLOOM_DIALOG_CSS, DIALOG_SHEET_BACKDROP_TESTID } from './Dialog
|
|
|
2
2
|
export { BloomDialogProvider } from './BloomDialogProvider.web';
|
|
3
3
|
export { alert } from './alert';
|
|
4
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
5
|
+
export { useDialogHeader } from './DialogHeader';
|
|
5
6
|
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
6
|
-
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
7
|
+
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './types';
|
|
7
8
|
//# 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,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,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,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,6 +1,47 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { ResponsiveDialogPlacement } from './placement';
|
|
3
4
|
export type { DialogPlacement, ResponsiveDialogPlacement } from './placement';
|
|
5
|
+
/**
|
|
6
|
+
* Config for the Dialog's OWN navigation header — a DISTINCT surface mode from
|
|
7
|
+
* the declarative `title`/`description`/`actions` centered-heading path. When
|
|
8
|
+
* present it turns the Dialog into a scrolling page with a sticky, gradient top
|
|
9
|
+
* bar (left + right slots) and a large collapsing title that lives in the
|
|
10
|
+
* Dialog's own scroll content; as the large title scrolls under the bar a small
|
|
11
|
+
* title cross-fades into the bar center. Screens render NO header of their own.
|
|
12
|
+
*
|
|
13
|
+
* A surface seeds this from its registry config; a mounted screen may override
|
|
14
|
+
* or augment any field at runtime via `useDialogHeader` (a dynamic title, a Save
|
|
15
|
+
* action on the right, etc.).
|
|
16
|
+
*/
|
|
17
|
+
export interface DialogHeaderConfig {
|
|
18
|
+
/** Collapsing title — rendered large in-content and small in the nav bar. */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** Supporting copy under the large title (and, optionally, in the bar). */
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to render the large collapsing title in the scroll content.
|
|
24
|
+
* Defaults to `true`. When `false`, only the small nav-bar title shows (always
|
|
25
|
+
* visible, no collapse) and the content starts flush under the bar.
|
|
26
|
+
*/
|
|
27
|
+
largeTitle?: boolean;
|
|
28
|
+
/** Custom left slot node. Overrides the default back button. */
|
|
29
|
+
left?: ReactNode;
|
|
30
|
+
/** Custom right slot node. Overrides the default close button. */
|
|
31
|
+
right?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* When set, the default left slot renders a back button that calls this. A
|
|
34
|
+
* custom `left` node still wins. Set by the surface host when the surface can
|
|
35
|
+
* navigate back.
|
|
36
|
+
*/
|
|
37
|
+
onBack?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the default right slot renders a close button (dismiss). Defaults to
|
|
40
|
+
* `true`. A custom `right` node still wins. `false` suppresses the close
|
|
41
|
+
* affordance entirely (e.g. a blocking surface).
|
|
42
|
+
*/
|
|
43
|
+
showClose?: boolean;
|
|
44
|
+
}
|
|
4
45
|
/**
|
|
5
46
|
* Side-sheet inset (px) from the root overlay's edges. Lets a host place a
|
|
6
47
|
* `left`/`right` placement "inside its own shell" — e.g. offset from the top
|
|
@@ -125,6 +166,40 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
125
166
|
inset?: DialogInset;
|
|
126
167
|
/** Whether to render the drag handle in bottom-sheet mode. Defaults to `true`. */
|
|
127
168
|
showHandle?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Turns on the Dialog's OWN navigation header (see {@link DialogHeaderConfig}).
|
|
171
|
+
* When present the Dialog renders a sticky gradient nav bar + a large
|
|
172
|
+
* collapsing title over its own scroll content, and its content is inset below
|
|
173
|
+
* the bar — a DISTINCT mode from the declarative
|
|
174
|
+
* `title`/`description`/`actions` centered heading (a confirm/alert dialog
|
|
175
|
+
* passes NO `header` and is unchanged). Screens render no header of their own;
|
|
176
|
+
* the title/slots come from this config, refined at runtime by a mounted
|
|
177
|
+
* screen's `useDialogHeader` contribution.
|
|
178
|
+
*/
|
|
179
|
+
header?: DialogHeaderConfig;
|
|
180
|
+
/**
|
|
181
|
+
* Open-INTENT seed for a freshly-mounted placement branch, distinct from the
|
|
182
|
+
* controlled `open` prop. It ONLY seeds a branch's initial visible state on
|
|
183
|
+
* mount — it never switches the dialog into controlled close semantics, so
|
|
184
|
+
* the imperative `control.close()` still owns the exit animation and fires
|
|
185
|
+
* `onClose` post-exit (no synchronous-`onClose` entry leak). Set by the
|
|
186
|
+
* surface stack so a responsive `Dialog` that swaps its inner component across
|
|
187
|
+
* a breakpoint (centered card ↔ bottom sheet on resize) re-mounts the new
|
|
188
|
+
* branch ALREADY OPEN instead of blank. Ignored when the controlled `open`
|
|
189
|
+
* prop is provided (that path seeds itself).
|
|
190
|
+
*/
|
|
191
|
+
startOpen?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether the dialog wraps its content in an internal scroll container.
|
|
194
|
+
* Defaults to `true`. Set `false` when the content owns its own scrolling
|
|
195
|
+
* primitive (a `FlatList` / `SectionList` / any VirtualizedList, or its own
|
|
196
|
+
* `ScrollView`): the surface then renders children WITHOUT a ScrollView wrap —
|
|
197
|
+
* a bounded, overflow-clipped card on the centered/side placements and a
|
|
198
|
+
* non-scrollable `BottomSheet` body on the bottom placement — so the child
|
|
199
|
+
* gets a bounded height and owns its scroll, and no "VirtualizedList inside a
|
|
200
|
+
* plain ScrollView" warning is emitted.
|
|
201
|
+
*/
|
|
202
|
+
scrollable?: boolean;
|
|
128
203
|
/**
|
|
129
204
|
* Inner padding (px) of the dialog content container, applied uniformly across
|
|
130
205
|
* every placement (centered panel, side-sheet body, bottom-sheet body).
|
|
@@ -154,6 +229,16 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
154
229
|
containerClassName?: string;
|
|
155
230
|
/** Accessibility label, applied to the dialog role on web. */
|
|
156
231
|
label?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Stacking layer index within a coordinated surface stack. Multiplies
|
|
234
|
+
* `Z_INDEX_LAYER_STEP` onto this dialog's overlay z-indices (backdrop +
|
|
235
|
+
* panel) so a dialog presented on top of another paints above it. Defaults to
|
|
236
|
+
* `0` — the single-dialog case, byte-for-byte unchanged. Set by the shared
|
|
237
|
+
* surface stack (`src/surfaces`); direct consumers rarely need it. No-op for
|
|
238
|
+
* the `bottom` placement, which already stacks in mount order (native RN
|
|
239
|
+
* `<Modal>` / the web portal), so `layer` is harmless there.
|
|
240
|
+
*/
|
|
241
|
+
layer?: number;
|
|
157
242
|
}>;
|
|
158
243
|
/**
|
|
159
244
|
* Web-only options. Native uses bloom's `BottomSheet` underneath which has
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,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;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,cAAc,EAAE,O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AC;IAC5B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -47,6 +47,7 @@ export declare function useCommonSVGProps(props: Props): {
|
|
|
47
47
|
nativeID?: string | undefined | undefined;
|
|
48
48
|
collapsable?: boolean | undefined | undefined;
|
|
49
49
|
collapsableChildren?: boolean | undefined | undefined;
|
|
50
|
+
className?: string | undefined;
|
|
50
51
|
onBlur?: ((e: import("react-native").BlurEvent) => void) | null | undefined | undefined;
|
|
51
52
|
onFocus?: ((e: import("react-native").FocusEvent) => void) | null | undefined | undefined;
|
|
52
53
|
renderToHardwareTextureAndroid?: boolean | undefined | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/icons/common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC7C"}
|
|
@@ -16,8 +16,10 @@ export { useImagePreload, preloadImage } from './hooks/useImagePreload';
|
|
|
16
16
|
export * as Icons from './icons';
|
|
17
17
|
export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from './icons/common';
|
|
18
18
|
export * from './portal';
|
|
19
|
-
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog';
|
|
20
|
-
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog';
|
|
19
|
+
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, useDialogHeader, } from './dialog';
|
|
20
|
+
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog';
|
|
21
|
+
export { surfaces, SurfaceProvider, SurfaceHost, useSurface } from './surfaces';
|
|
22
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './surfaces';
|
|
21
23
|
export * from './button';
|
|
22
24
|
export { Fab } from './fab';
|
|
23
25
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab';
|
|
@@ -61,7 +63,7 @@ export { AnimatedCheck } from './animated-check';
|
|
|
61
63
|
export type { AnimatedCheckProps, AnimatedCheckRef } from './animated-check';
|
|
62
64
|
export * from './text-field';
|
|
63
65
|
export * from './segmented-control';
|
|
64
|
-
export {
|
|
66
|
+
export { Search } from './search';
|
|
65
67
|
export { Label } from './label';
|
|
66
68
|
export type { LabelProps } from './label';
|
|
67
69
|
export { Field } from './field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAY,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACp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AAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -16,8 +16,10 @@ export { useImagePreload, preloadImage } from './hooks/useImagePreload';
|
|
|
16
16
|
export * as Icons from './icons';
|
|
17
17
|
export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from './icons/common';
|
|
18
18
|
export * from './portal/index.web';
|
|
19
|
-
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog/index.web';
|
|
20
|
-
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog/index.web';
|
|
19
|
+
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, useDialogHeader, } from './dialog/index.web';
|
|
20
|
+
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogHeaderConfig, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog/index.web';
|
|
21
|
+
export { surfaces, SurfaceProvider, SurfaceHost, useSurface } from './surfaces/index.web';
|
|
22
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './surfaces/index.web';
|
|
21
23
|
export * from './button/index.web';
|
|
22
24
|
export { Fab } from './fab/index.web';
|
|
23
25
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab/index.web';
|
|
@@ -61,7 +63,7 @@ export { AnimatedCheck } from './animated-check';
|
|
|
61
63
|
export type { AnimatedCheckProps, AnimatedCheckRef } from './animated-check';
|
|
62
64
|
export * from './text-field';
|
|
63
65
|
export * from './segmented-control';
|
|
64
|
-
export {
|
|
66
|
+
export { Search } from './search';
|
|
65
67
|
export { Label } from './label';
|
|
66
68
|
export type { LabelProps } from './label';
|
|
67
69
|
export { Field } from './field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,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place `InputGroup.Addon` elements before/after the input
|
|
22
|
-
* (a Bloom `TextFieldInput`, a `
|
|
22
|
+
* (a Bloom `TextFieldInput`, a `Search`, or any control). The middle
|
|
23
23
|
* child stretches to fill.
|
|
24
24
|
*/
|
|
25
25
|
children: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TextInput } from 'react-native';
|
|
2
2
|
import { type TextFieldInputProps } from '../text-field';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const Search: import("react").ForwardRefExoticComponent<Omit<TextFieldInputProps, "label"> & {
|
|
4
4
|
label?: TextFieldInputProps["label"];
|
|
5
5
|
/**
|
|
6
6
|
* Called when the user presses the clear (X) button.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/search/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAK9D,OAAO,EAA4C,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAenG,eAAO,MAAM,MAAM;YAPT,mBAAmB,CAAC,OAAO,CAAC;IACpC;;OAEG;kBACW,MAAM,IAAI;6CAwDzB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DialogProps } from '../dialog/types';
|
|
3
|
+
type DialogComponent = React.ComponentType<DialogProps>;
|
|
4
|
+
/**
|
|
5
|
+
* Build the `<SurfaceHost>` + `<SurfaceProvider>` bound to a platform `Dialog`.
|
|
6
|
+
*
|
|
7
|
+
* `Dialog` is platform-forked (native `BottomSheet`-backed vs. pure-DOM web
|
|
8
|
+
* overlay), so — like `createAlertDialog` — the platform entry files
|
|
9
|
+
* (`index.ts` / `index.web.ts`) inject the correct one. The stack logic below is
|
|
10
|
+
* single-source, no duplication.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createSurfaceHost(Dialog: DialogComponent): {
|
|
13
|
+
SurfaceHost: {
|
|
14
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
SurfaceProvider: {
|
|
18
|
+
({ children }: {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=SurfaceHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AA+BxD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe;;;;;;uBAqGhB;YAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;SAAE;;;EAcrE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { dismissAll, dismissToRoot, present } from './surfaceStore';
|
|
2
|
+
import { confirm, prompt } from './prompts';
|
|
3
|
+
import type { PresentOptions, SurfaceRenderFn } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Dismiss the TOP surface, resolving its `present()` promise with `result`.
|
|
6
|
+
* The public counterpart of the store's `dismissTop`.
|
|
7
|
+
*/
|
|
8
|
+
declare function dismiss(result?: unknown): void;
|
|
9
|
+
/**
|
|
10
|
+
* Dismiss a SPECIFIC surface by id, resolving its `present()` promise with
|
|
11
|
+
* `result`. Rarely needed — most call sites use `dismiss()` (top) or the
|
|
12
|
+
* per-surface `SurfaceControls.dismiss`.
|
|
13
|
+
*/
|
|
14
|
+
declare function dismissById(id: string, result?: unknown): void;
|
|
15
|
+
/**
|
|
16
|
+
* The shared imperative surface-stack API — a module singleton (mirrors
|
|
17
|
+
* `alert()`'s shape) so any consumer, in the SDK or an app, presents into the
|
|
18
|
+
* SAME coordinated Bloom stack from anywhere without threading a provider.
|
|
19
|
+
*
|
|
20
|
+
* Exposed at the package root as `surfaces` (avoids a bare `present`/`confirm`
|
|
21
|
+
* name clash with the existing `alert-dialog` `confirm`); the individual
|
|
22
|
+
* functions are also named exports of `@oxyhq/bloom/surfaces` for direct import.
|
|
23
|
+
*/
|
|
24
|
+
export declare const surfaces: {
|
|
25
|
+
/** Present a new surface on top. Resolves with the dismissal result. */
|
|
26
|
+
readonly present: <Result = unknown>(render: SurfaceRenderFn, opts?: PresentOptions) => Promise<Result>;
|
|
27
|
+
/** Dismiss the top surface. */
|
|
28
|
+
readonly dismiss: typeof dismiss;
|
|
29
|
+
/** Dismiss a specific surface by id. */
|
|
30
|
+
readonly dismissById: typeof dismissById;
|
|
31
|
+
/** Dismiss everything above the root surface. */
|
|
32
|
+
readonly dismissToRoot: typeof dismissToRoot;
|
|
33
|
+
/** Dismiss the entire stack (resolves pending awaiters with `undefined`). */
|
|
34
|
+
readonly dismissAll: typeof dismissAll;
|
|
35
|
+
/** Present a confirm surface; resolves `true`/`false`. */
|
|
36
|
+
readonly confirm: typeof confirm;
|
|
37
|
+
/** Present a prompt surface; resolves the string or `null`. */
|
|
38
|
+
readonly prompt: typeof prompt;
|
|
39
|
+
};
|
|
40
|
+
export { confirm, dismiss, dismissAll, dismissById, dismissToRoot, present, prompt };
|
|
41
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EAEb,OAAO,EAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D;;;GAGG;AACH,iBAAS,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAEvC;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;IACnB,wEAAwE;uBAC9D,MAAM,oBAAoB,eAAe,SAAS,cAAc;IAE1E,+BAA+B;;IAE/B,wCAAwC;;IAExC,iDAAiD;;IAEjD,6EAA6E;;IAE7E,0DAA0D;;IAE1D,+DAA+D;;CAEvD,CAAC;AAEX,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared, content-agnostic SURFACE STACK.
|
|
3
|
+
*
|
|
4
|
+
* `<SurfaceProvider>`/`<SurfaceHost>` render the coordinated stack; the
|
|
5
|
+
* imperative `surfaces` API (+ its named functions) present into it from
|
|
6
|
+
* anywhere; `useSurface()` gives a presented surface its own controls.
|
|
7
|
+
*
|
|
8
|
+
* `SurfaceHost`/`SurfaceProvider` are bound to the NATIVE `Dialog` here; the web
|
|
9
|
+
* fork (`./index.web`) binds the web `Dialog`. The store, imperative API, hook,
|
|
10
|
+
* and types are platform-agnostic and shared by both.
|
|
11
|
+
*/
|
|
12
|
+
declare const SurfaceHost: {
|
|
13
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
}, SurfaceProvider: {
|
|
16
|
+
({ children }: {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export { SurfaceHost, SurfaceProvider };
|
|
22
|
+
export { surfaces, present, dismiss, dismissById, dismissToRoot, dismissAll, confirm, prompt, } from './api';
|
|
23
|
+
export { useSurface } from './useSurface';
|
|
24
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './types';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,QAAA,MAAQ,WAAW;;;GAAE,eAAe;;;;;CAA8B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web variant of the surface stack barrel. Identical surface area to the native
|
|
3
|
+
* `./index.ts` — it just binds the web-fork `Dialog` (`Dialog.web.tsx`, a
|
|
4
|
+
* pure-DOM overlay) instead of the native `BottomSheet`-backed one. The store,
|
|
5
|
+
* imperative API, hook, and types are shared, platform-agnostic modules.
|
|
6
|
+
*/
|
|
7
|
+
declare const SurfaceHost: {
|
|
8
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
}, SurfaceProvider: {
|
|
11
|
+
({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export { SurfaceHost, SurfaceProvider };
|
|
17
|
+
export { surfaces, present, dismiss, dismissById, dismissToRoot, dismissAll, confirm, prompt, } from './api';
|
|
18
|
+
export { useSurface } from './useSurface';
|
|
19
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './types';
|
|
20
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/index.web.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAQ,WAAW;;;GAAE,eAAe;;;;;CAA8B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SurfaceConfirmOptions, SurfacePromptOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Present a confirm surface stacked on top of anything currently open. Resolves
|
|
4
|
+
* `true` on confirm, `false` on cancel OR on backdrop/Escape/back dismissal.
|
|
5
|
+
*/
|
|
6
|
+
export declare function confirm(options: SurfaceConfirmOptions): Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Present a prompt surface stacked on top of anything currently open. Resolves
|
|
9
|
+
* the entered string on submit, or `null` on cancel OR backdrop/Escape/back
|
|
10
|
+
* dismissal.
|
|
11
|
+
*/
|
|
12
|
+
export declare function prompt(options: SurfacePromptOptions): Promise<string | null>;
|
|
13
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/prompts.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,qBAAqB,EAErB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAyIjB;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CASxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAS5E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PresentOptions, SurfaceEntry, SurfaceRenderFn } from './types';
|
|
2
|
+
/** Subscribe to stack changes. Returns an unsubscribe fn. */
|
|
3
|
+
export declare function subscribe(listener: () => void): () => void;
|
|
4
|
+
/** Current stack snapshot (stable ref while unchanged). Bottom→top. */
|
|
5
|
+
export declare function getSnapshot(): readonly SurfaceEntry[];
|
|
6
|
+
/**
|
|
7
|
+
* Present a new surface on TOP of the stack. Returns a promise that resolves
|
|
8
|
+
* with the value passed to `dismiss(result)` (or `undefined` when the surface is
|
|
9
|
+
* dismissed without a result / by a stack-wide clear).
|
|
10
|
+
*/
|
|
11
|
+
export declare function present<Result = unknown>(render: SurfaceRenderFn, opts?: PresentOptions): Promise<Result>;
|
|
12
|
+
/**
|
|
13
|
+
* Request dismissal of a surface. RESOLVES THE PROMISE IMMEDIATELY (the exit
|
|
14
|
+
* animation that follows is cosmetic) and flips the entry to `'closing'` so the
|
|
15
|
+
* host runs its exit animation. Resolution is resolve-once via the `settled`
|
|
16
|
+
* guard — a second request (or the host's post-exit `onClose`) never re-resolves
|
|
17
|
+
* with a different value. Bumps the entry `generation` so a completion callback
|
|
18
|
+
* from a superseded cycle is inert.
|
|
19
|
+
*/
|
|
20
|
+
export declare function requestDismiss(id: string, result?: unknown): void;
|
|
21
|
+
/**
|
|
22
|
+
* Splice a surface out of the stack once its exit animation has settled. Called
|
|
23
|
+
* by the host from the `Dialog`'s post-exit `onClose`. Idempotent and gated on
|
|
24
|
+
* `'closing'` status: a stale/duplicate call — or one for an entry that is not
|
|
25
|
+
* actually closing — is a no-op, which (together with unique entry ids) is the
|
|
26
|
+
* stale-callback hygiene `BottomSheetBase`'s generation guard provides for its
|
|
27
|
+
* reused instance.
|
|
28
|
+
*/
|
|
29
|
+
export declare function finalizeClose(id: string): void;
|
|
30
|
+
/** Dismiss the TOP surface, resolving its promise with `result`. */
|
|
31
|
+
export declare function dismissTop(result?: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* Dismiss every surface ABOVE the bottom-most one, keeping the root surface
|
|
34
|
+
* open. Pending awaiters of the dismissed surfaces resolve with `undefined` so
|
|
35
|
+
* they never hang. No-op with 0 or 1 surfaces.
|
|
36
|
+
*/
|
|
37
|
+
export declare function dismissToRoot(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Dismiss the ENTIRE stack. Every pending awaiter resolves with `undefined` so
|
|
40
|
+
* none hang.
|
|
41
|
+
*/
|
|
42
|
+
export declare function dismissAll(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Hard-reset the stack synchronously (no exit animation), resolving all pending
|
|
45
|
+
* awaiters with `undefined`. Used when the host provider unmounts so no
|
|
46
|
+
* `present()` promise is stranded.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resetSurfaces(): void;
|
|
49
|
+
/** Test-only: hard-reset without notifying (drops listeners' work). */
|
|
50
|
+
export declare function __resetSurfacesForTests(): void;
|
|
51
|
+
//# sourceMappingURL=surfaceStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceStore.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/surfaceStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAoCjB,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAK1D;AAED,uEAAuE;AACvE,wBAAgB,WAAW,IAAI,SAAS,YAAY,EAAE,CAErD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,GAAG,OAAO,EACtC,MAAM,EAAE,eAAe,EACvB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAmBjE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAM9C;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAGjD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAGjC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAQpC;AAED,uEAAuE;AACvE,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C"}
|