@oxyhq/bloom 0.4.0 → 0.5.1
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/README.md +105 -90
- package/lib/commonjs/bottom-sheet/index.js +2 -2
- package/lib/commonjs/context-menu/index.js +18 -19
- package/lib/commonjs/context-menu/index.js.map +1 -1
- package/lib/commonjs/dialog/BloomDialogProvider.js +61 -0
- package/lib/commonjs/dialog/BloomDialogProvider.js.map +1 -0
- package/lib/commonjs/dialog/BloomDialogProvider.web.js +45 -0
- package/lib/commonjs/dialog/BloomDialogProvider.web.js.map +1 -0
- package/lib/commonjs/dialog/Dialog.js +197 -100
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +194 -84
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/SheetShell.js +149 -0
- package/lib/commonjs/dialog/SheetShell.js.map +1 -0
- package/lib/commonjs/dialog/alert-store.js +116 -0
- package/lib/commonjs/dialog/alert-store.js.map +1 -0
- package/lib/commonjs/dialog/alert.js +38 -0
- package/lib/commonjs/dialog/alert.js.map +1 -0
- package/lib/commonjs/dialog/context.js +10 -2
- package/lib/commonjs/dialog/context.js.map +1 -1
- package/lib/commonjs/dialog/index.js +8 -24
- package/lib/commonjs/dialog/index.js.map +1 -1
- package/lib/commonjs/dialog/index.web.js +10 -20
- package/lib/commonjs/dialog/index.web.js.map +1 -1
- package/lib/commonjs/fonts/FontLoader.js +6 -5
- package/lib/commonjs/fonts/FontLoader.js.map +1 -1
- package/lib/commonjs/fonts/apply-font-faces.js +4 -4
- package/lib/commonjs/fonts/apply-font-faces.web.js +13 -12
- package/lib/commonjs/fonts/apply-font-faces.web.js.map +1 -1
- package/lib/commonjs/fonts/font-assets.js +2 -2
- package/lib/commonjs/fonts/font-data.web.js +22 -0
- package/lib/commonjs/fonts/font-data.web.js.map +1 -0
- package/lib/commonjs/index.js +101 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +101 -66
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/menu/index.js +21 -23
- package/lib/commonjs/menu/index.js.map +1 -1
- package/lib/commonjs/select/index.js +26 -27
- package/lib/commonjs/select/index.js.map +1 -1
- package/lib/commonjs/toast/index.js +42 -13
- package/lib/commonjs/toast/index.js.map +1 -1
- package/lib/commonjs/toast/index.web.js +19 -15
- package/lib/commonjs/toast/index.web.js.map +1 -1
- package/lib/module/bottom-sheet/index.js +2 -2
- package/lib/module/context-menu/index.js +15 -16
- package/lib/module/context-menu/index.js.map +1 -1
- package/lib/module/dialog/BloomDialogProvider.js +57 -0
- package/lib/module/dialog/BloomDialogProvider.js.map +1 -0
- package/lib/module/dialog/BloomDialogProvider.web.js +41 -0
- package/lib/module/dialog/BloomDialogProvider.web.js.map +1 -0
- package/lib/module/dialog/Dialog.js +199 -87
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +195 -70
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/SheetShell.js +143 -0
- package/lib/module/dialog/SheetShell.js.map +1 -0
- package/lib/module/dialog/alert-store.js +107 -0
- package/lib/module/dialog/alert-store.js.map +1 -0
- package/lib/module/dialog/alert.js +35 -0
- package/lib/module/dialog/alert.js.map +1 -0
- package/lib/module/dialog/context.js +10 -2
- package/lib/module/dialog/context.js.map +1 -1
- package/lib/module/dialog/index.js +3 -1
- package/lib/module/dialog/index.js.map +1 -1
- package/lib/module/dialog/index.web.js +9 -7
- package/lib/module/dialog/index.web.js.map +1 -1
- package/lib/module/fonts/FontLoader.js +6 -5
- package/lib/module/fonts/FontLoader.js.map +1 -1
- package/lib/module/fonts/apply-font-faces.js +4 -4
- package/lib/module/fonts/apply-font-faces.web.js +13 -10
- package/lib/module/fonts/apply-font-faces.web.js.map +1 -1
- package/lib/module/fonts/font-assets.js +2 -2
- package/lib/module/fonts/font-data.web.js +18 -0
- package/lib/module/fonts/font-data.web.js.map +1 -0
- package/lib/module/fonts/index.web.js +4 -4
- package/lib/module/index.js +2 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -3
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/menu/index.js +11 -13
- package/lib/module/menu/index.js.map +1 -1
- package/lib/module/select/index.js +27 -28
- package/lib/module/select/index.js.map +1 -1
- package/lib/module/toast/index.js +41 -11
- package/lib/module/toast/index.js.map +1 -1
- package/lib/module/toast/index.web.js +18 -13
- package/lib/module/toast/index.web.js.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/index.d.ts +1 -1
- package/lib/typescript/commonjs/context-menu/index.d.ts +4 -3
- package/lib/typescript/commonjs/context-menu/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/BloomDialogProvider.d.ts +27 -0
- package/lib/typescript/commonjs/dialog/BloomDialogProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/BloomDialogProvider.web.d.ts +15 -0
- package/lib/typescript/commonjs/dialog/BloomDialogProvider.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/Dialog.d.ts +37 -10
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts +26 -10
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/SheetShell.d.ts +31 -0
- package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/alert-store.d.ts +70 -0
- package/lib/typescript/commonjs/dialog/alert-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/alert.d.ts +27 -0
- package/lib/typescript/commonjs/dialog/alert.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/context.d.ts +7 -0
- package/lib/typescript/commonjs/dialog/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.d.ts +5 -2
- package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts +5 -2
- package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +70 -15
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/fonts/FontLoader.d.ts.map +1 -1
- package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts +8 -1
- package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/fonts/font-data.web.d.ts +5 -0
- package/lib/typescript/commonjs/fonts/font-data.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +3 -3
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/menu/index.d.ts +4 -4
- package/lib/typescript/commonjs/menu/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/index.d.ts +32 -3
- package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/index.web.d.ts +14 -7
- package/lib/typescript/commonjs/toast/index.web.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/index.d.ts +1 -1
- package/lib/typescript/module/context-menu/index.d.ts +4 -3
- package/lib/typescript/module/context-menu/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/BloomDialogProvider.d.ts +27 -0
- package/lib/typescript/module/dialog/BloomDialogProvider.d.ts.map +1 -0
- package/lib/typescript/module/dialog/BloomDialogProvider.web.d.ts +15 -0
- package/lib/typescript/module/dialog/BloomDialogProvider.web.d.ts.map +1 -0
- package/lib/typescript/module/dialog/Dialog.d.ts +37 -10
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts +26 -10
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/SheetShell.d.ts +31 -0
- package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -0
- package/lib/typescript/module/dialog/alert-store.d.ts +70 -0
- package/lib/typescript/module/dialog/alert-store.d.ts.map +1 -0
- package/lib/typescript/module/dialog/alert.d.ts +27 -0
- package/lib/typescript/module/dialog/alert.d.ts.map +1 -0
- package/lib/typescript/module/dialog/context.d.ts +7 -0
- package/lib/typescript/module/dialog/context.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.d.ts +5 -2
- package/lib/typescript/module/dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.web.d.ts +5 -2
- package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +70 -15
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/fonts/FontLoader.d.ts.map +1 -1
- package/lib/typescript/module/fonts/apply-font-faces.web.d.ts +8 -1
- package/lib/typescript/module/fonts/apply-font-faces.web.d.ts.map +1 -1
- package/lib/typescript/module/fonts/font-data.web.d.ts +5 -0
- package/lib/typescript/module/fonts/font-data.web.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +3 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +3 -3
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/menu/index.d.ts +4 -4
- package/lib/typescript/module/menu/index.d.ts.map +1 -1
- package/lib/typescript/module/select/index.d.ts.map +1 -1
- package/lib/typescript/module/toast/index.d.ts +32 -3
- package/lib/typescript/module/toast/index.d.ts.map +1 -1
- package/lib/typescript/module/toast/index.web.d.ts +14 -7
- package/lib/typescript/module/toast/index.web.d.ts.map +1 -1
- package/package.json +38 -18
- package/src/__tests__/Dialog.test.tsx +177 -0
- package/src/avatar/Avatar.stories.tsx +69 -0
- package/src/bottom-sheet/BottomSheet.stories.tsx +92 -0
- package/src/bottom-sheet/index.tsx +3 -3
- package/src/button/Button.stories.tsx +94 -0
- package/src/context-menu/ContextMenu.stories.tsx +71 -0
- package/src/context-menu/index.tsx +12 -12
- package/src/dialog/BloomDialogProvider.tsx +61 -0
- package/src/dialog/BloomDialogProvider.web.tsx +46 -0
- package/src/dialog/Dialog.stories.tsx +112 -0
- package/src/dialog/Dialog.tsx +217 -64
- package/src/dialog/Dialog.web.tsx +240 -75
- package/src/dialog/SheetShell.tsx +154 -0
- package/src/dialog/alert-store.ts +126 -0
- package/src/dialog/alert.ts +42 -0
- package/src/dialog/context.ts +14 -3
- package/src/dialog/index.ts +14 -2
- package/src/dialog/index.web.ts +20 -8
- package/src/dialog/types.ts +73 -16
- package/src/fonts/FontLoader.tsx +6 -5
- package/src/fonts/apply-font-faces.ts +4 -4
- package/src/fonts/apply-font-faces.web.ts +18 -10
- package/src/fonts/font-assets.ts +2 -2
- package/src/fonts/font-data.web.ts +15 -0
- package/src/fonts/index.web.ts +4 -4
- package/src/index.ts +17 -3
- package/src/index.web.ts +17 -3
- package/src/loading/Loading.stories.tsx +60 -0
- package/src/menu/Menu.stories.tsx +79 -0
- package/src/menu/index.tsx +13 -17
- package/src/prompt-input/PromptInput.stories.tsx +82 -0
- package/src/select/Select.stories.tsx +84 -0
- package/src/select/index.tsx +30 -30
- package/src/settings-list/SettingsList.stories.tsx +106 -0
- package/src/text-field/TextField.stories.tsx +90 -0
- package/src/toast/Toast.stories.tsx +109 -0
- package/src/toast/index.tsx +55 -11
- package/src/toast/index.web.tsx +33 -13
- package/lib/commonjs/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
- package/lib/commonjs/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
- package/lib/commonjs/fonts/assets/GeistMono-Variable.woff2 +0 -0
- package/lib/commonjs/fonts/assets/InterVariable.woff2 +0 -0
- package/lib/commonjs/prompt/Prompt.js +0 -267
- package/lib/commonjs/prompt/Prompt.js.map +0 -1
- package/lib/commonjs/prompt/index.js +0 -61
- package/lib/commonjs/prompt/index.js.map +0 -1
- package/lib/module/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
- package/lib/module/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
- package/lib/module/fonts/assets/GeistMono-Variable.woff2 +0 -0
- package/lib/module/fonts/assets/InterVariable.woff2 +0 -0
- package/lib/module/prompt/Prompt.js +0 -250
- package/lib/module/prompt/Prompt.js.map +0 -1
- package/lib/module/prompt/index.js +0 -4
- package/lib/module/prompt/index.js.map +0 -1
- package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts +0 -5
- package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/BloomThemeProvider.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/BloomThemeProvider.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/BottomSheet.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/BottomSheet.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/Button.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/Button.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/Code.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/Code.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/Pre.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/Pre.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/SettingsList.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/SettingsList.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts +0 -5
- package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/__tests__/theme.test.d.ts +0 -2
- package/lib/typescript/commonjs/__tests__/theme.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/prompt/Prompt.d.ts +0 -42
- package/lib/typescript/commonjs/prompt/Prompt.d.ts.map +0 -1
- package/lib/typescript/commonjs/prompt/index.d.ts +0 -3
- package/lib/typescript/commonjs/prompt/index.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts +0 -5
- package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/BloomThemeProvider.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/BloomThemeProvider.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/BottomSheet.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/BottomSheet.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/Button.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/Button.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/Code.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/Code.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/Pre.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/Pre.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/SettingsList.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/SettingsList.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts +0 -5
- package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts.map +0 -1
- package/lib/typescript/module/__tests__/theme.test.d.ts +0 -2
- package/lib/typescript/module/__tests__/theme.test.d.ts.map +0 -1
- package/lib/typescript/module/prompt/Prompt.d.ts +0 -42
- package/lib/typescript/module/prompt/Prompt.d.ts.map +0 -1
- package/lib/typescript/module/prompt/index.d.ts +0 -3
- package/lib/typescript/module/prompt/index.d.ts.map +0 -1
- package/src/prompt/Prompt.tsx +0 -247
- package/src/prompt/index.ts +0 -13
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import type { DialogAction, DialogProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Native variant of `<Dialog>`.
|
|
4
|
+
*
|
|
5
|
+
* Uses bloom's own `BottomSheet` in `detached` mode as the underlying
|
|
6
|
+
* surface — a floating, dynamically-sized, content-hugging card that
|
|
7
|
+
* gracefully degrades from sheet (phone) to centered card (tablet, via the
|
|
8
|
+
* 500px max-width cap).
|
|
9
|
+
*
|
|
10
|
+
* The component accepts three rendering modes simultaneously:
|
|
11
|
+
*
|
|
12
|
+
* 1. Declarative — `title`, `description`, `actions`. Bloom renders a
|
|
13
|
+
* standard confirm/destructive/cancel layout.
|
|
14
|
+
* 2. Custom children — caller passes JSX, bloom renders the chrome (title
|
|
15
|
+
* + close behaviour) and the children fill the body.
|
|
16
|
+
* 3. Pure children — no `title`/`description`/`actions`; caller owns
|
|
17
|
+
* every pixel.
|
|
18
|
+
*
|
|
19
|
+
* All three share the same dismissal semantics: tapping the backdrop, the
|
|
20
|
+
* drag handle, swiping down, or `control.close()` runs the queued close
|
|
21
|
+
* callbacks once the sheet's exit animation has settled.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Dialog({ control, onClose, testID, title, description, actions, style, label, children, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Helper used by the imperative `alert()` API. Mounts a `<Dialog>` against
|
|
26
|
+
* a fresh control and presents it immediately. `onResolve` is invoked
|
|
27
|
+
* exactly once when the dialog finishes closing (regardless of how the
|
|
28
|
+
* dismissal happened).
|
|
29
|
+
*
|
|
30
|
+
* Kept private to the dialog module — `alert()` is the public surface.
|
|
31
|
+
*/
|
|
32
|
+
export declare function AutoMountedDialog({ title, description, actions, onResolve, }: {
|
|
33
|
+
title?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
actions: DialogAction[];
|
|
36
|
+
onResolve: () => void;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
38
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -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":"AAmBA,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,WAAW,2CA6Hb;AAqFD;;;;;;;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,13 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import type { DialogAction, DialogProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Web variant of `<Dialog>`.
|
|
4
|
+
*
|
|
5
|
+
* A centered modal card rendered into the bloom Portal at the end of
|
|
6
|
+
* `document.body`. Same prop API as native — `title`, `description`,
|
|
7
|
+
* `actions`, or arbitrary `children` — so call sites are platform
|
|
8
|
+
* agnostic.
|
|
9
|
+
*
|
|
10
|
+
* Accessibility: the panel has `role="dialog"` and the `title`/`description`
|
|
11
|
+
* props (when provided) become the `aria-labelledby` / `aria-describedby`
|
|
12
|
+
* targets. Pressing the backdrop dismisses. Pressing `Escape` dismisses.
|
|
13
|
+
* Focus is locked inside the dialog while it's open.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Dialog({ control, onClose, testID, title, description, actions, style, label, children, }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
/**
|
|
17
|
+
* Inline imperative dialog used by `alert()`. Mounts and immediately
|
|
18
|
+
* presents; resolves the host's `onResolve` once the dialog has finished
|
|
19
|
+
* its exit animation.
|
|
20
|
+
*/
|
|
21
|
+
export declare function AutoMountedDialog({ title, description, actions, onResolve, }: {
|
|
22
|
+
title?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
actions: DialogAction[];
|
|
25
|
+
onResolve: () => void;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
27
|
/**
|
|
12
28
|
* CSS keyframes required for web dialog animations.
|
|
13
29
|
* Consumers should inject this string into a <style> tag or their global CSS:
|
|
@@ -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":"AAyBA,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAQjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,WAAW,kDAwGb;AA8LD;;;;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;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,mZAK5B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal bottom-sheet shell shared by `Menu`, `Select` and `ContextMenu`.
|
|
3
|
+
*
|
|
4
|
+
* Not exported from the public `@oxyhq/bloom` surface — these three
|
|
5
|
+
* components historically used the low-level `Dialog.Outer / Inner /
|
|
6
|
+
* Handle` primitives, which are gone in 0.5.0. This shell captures the
|
|
7
|
+
* shared shape (BottomSheet + drag handle + close-on-tap context) in a
|
|
8
|
+
* single place so the three internal call sites stay symmetrical.
|
|
9
|
+
*
|
|
10
|
+
* Consumers needing the same behaviour for app code should use the public
|
|
11
|
+
* `BottomSheet` primitive directly.
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
15
|
+
import type { DialogControlProps } from './types';
|
|
16
|
+
export interface SheetShellProps {
|
|
17
|
+
control: DialogControlProps;
|
|
18
|
+
label?: string;
|
|
19
|
+
header?: React.ReactNode;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
/** Style overrides applied to the inner padded content container. */
|
|
22
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Bottom-sheet shell with an embedded drag handle. Exposes the bloom
|
|
27
|
+
* dialog `close()` context to descendants — `Menu.Item`, `Select.Item`
|
|
28
|
+
* etc. rely on it to dismiss the sheet after selection.
|
|
29
|
+
*/
|
|
30
|
+
export declare function SheetShell({ control, label, header, onClose, contentStyle, children, }: SheetShellProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=SheetShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetShell.d.ts","sourceRoot":"","sources":["../../../../src/dialog/SheetShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qEAAqE;IACrE,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,EAAE,eAAe,2CAwEjB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { DialogAction } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Imperative-alert store.
|
|
4
|
+
*
|
|
5
|
+
* The store sits in module scope so `alert()` works from anywhere — event
|
|
6
|
+
* handlers, async callbacks, top-level helpers — without threading a
|
|
7
|
+
* provider context through every call site.
|
|
8
|
+
*
|
|
9
|
+
* The visible UI is owned by a single subscriber (the `<BloomDialogProvider>`
|
|
10
|
+
* mounted inside the app's React tree). When there is no subscriber yet —
|
|
11
|
+
* because `alert()` was called before the provider mounted, or because the
|
|
12
|
+
* app forgot to mount the provider — entries accumulate in the queue and
|
|
13
|
+
* drain as soon as a subscriber attaches.
|
|
14
|
+
*
|
|
15
|
+
* Multiple subscribers are not supported by design. Two providers would
|
|
16
|
+
* race for the same alert; we instead enforce a single listener and let
|
|
17
|
+
* the most recent subscription win (the older one falls back to no-op).
|
|
18
|
+
*/
|
|
19
|
+
export type AlertButtonStyle = 'default' | 'cancel' | 'destructive';
|
|
20
|
+
export interface AlertButton {
|
|
21
|
+
/** Button label. Required. */
|
|
22
|
+
text: string;
|
|
23
|
+
/** Tap handler. Invoked after the dialog has finished its close animation. */
|
|
24
|
+
onPress?: () => void;
|
|
25
|
+
/** Visual treatment. Defaults to `'default'`. */
|
|
26
|
+
style?: AlertButtonStyle;
|
|
27
|
+
}
|
|
28
|
+
export interface AlertEntry {
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
message?: string;
|
|
32
|
+
buttons: AlertButton[];
|
|
33
|
+
}
|
|
34
|
+
type Listener = (queue: AlertEntry[]) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Enqueue an alert. Returns the generated id so callers can dismiss it
|
|
37
|
+
* imperatively (rare — usually the dialog dismisses itself via a button
|
|
38
|
+
* tap). The runtime guarantees this enqueues even before any provider
|
|
39
|
+
* mounts; the provider drains pending entries on subscribe.
|
|
40
|
+
*/
|
|
41
|
+
export declare function enqueueAlert(entry: Omit<AlertEntry, 'id'>): string;
|
|
42
|
+
/**
|
|
43
|
+
* Remove an alert from the queue. Called by the provider once the bloom
|
|
44
|
+
* Dialog has finished closing for that entry.
|
|
45
|
+
*/
|
|
46
|
+
export declare function dismissAlert(id: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Subscribe to queue changes. Replaces any previously-registered listener
|
|
49
|
+
* (single-subscriber model — see header). Returns an unsubscribe function.
|
|
50
|
+
*
|
|
51
|
+
* On subscribe, the current queue is delivered synchronously so the
|
|
52
|
+
* subscriber can render pending entries that arrived before mount.
|
|
53
|
+
*/
|
|
54
|
+
export declare function subscribeAlerts(fn: Listener): () => void;
|
|
55
|
+
/** Inspect the current queue. Used internally and by tests. */
|
|
56
|
+
export declare function getAlertQueue(): readonly AlertEntry[];
|
|
57
|
+
/**
|
|
58
|
+
* Translate an alert button to the action shape the unified `Dialog`
|
|
59
|
+
* accepts. Pure — no React, no theme — so it can be reused on web and
|
|
60
|
+
* native without forking.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buttonToAction(button: AlertButton): DialogAction;
|
|
63
|
+
/**
|
|
64
|
+
* Compute the effective button set for an alert. Mirrors React Native's
|
|
65
|
+
* `Alert.alert` semantics — an empty/omitted buttons array implies a
|
|
66
|
+
* single `OK` confirmation button.
|
|
67
|
+
*/
|
|
68
|
+
export declare function resolveButtons(buttons: AlertButton[] | undefined): AlertButton[];
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=alert-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-store.d.ts","sourceRoot":"","sources":["../../../../src/dialog/alert-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;AAS9C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,MAAM,CAKlE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK7C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,IAAI,CAQxD;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,IAAI,SAAS,UAAU,EAAE,CAErD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAWhE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,SAAS,GAAG,WAAW,EAAE,CAGhF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type AlertButton } from './alert-store';
|
|
2
|
+
/**
|
|
3
|
+
* Show a Bloom-styled confirmation dialog. Mirrors React Native's
|
|
4
|
+
* `Alert.alert(title, message?, buttons?)` signature so existing call
|
|
5
|
+
* sites migrate by changing the import only.
|
|
6
|
+
*
|
|
7
|
+
* If no buttons are passed, a single `OK` confirmation is rendered.
|
|
8
|
+
*
|
|
9
|
+
* The alert is enqueued in a module-scope store and rendered by
|
|
10
|
+
* `<BloomDialogProvider>`. Calls made before the provider mounts are
|
|
11
|
+
* queued and drained once the provider attaches — there is no fire-and-
|
|
12
|
+
* forget loss window. Calls made when no provider is ever mounted are
|
|
13
|
+
* silently queued forever; in development, mount the provider once at
|
|
14
|
+
* the app root and the queue will catch up immediately.
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* import { alert } from '@oxyhq/bloom';
|
|
18
|
+
*
|
|
19
|
+
* alert('Sign out?', 'You will need to enter your password to sign in again.', [
|
|
20
|
+
* { text: 'Cancel', style: 'cancel' },
|
|
21
|
+
* { text: 'Sign out', style: 'destructive', onPress: doSignOut },
|
|
22
|
+
* ]);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function alert(title: string, message?: string, buttons?: AlertButton[]): void;
|
|
26
|
+
export type { AlertButton, AlertButtonStyle } from './alert-store';
|
|
27
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/dialog/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,WAAW,EAAE,GACtB,IAAI,CAMN;AAED,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { DialogContextProps, DialogControlProps } from './types';
|
|
2
2
|
export declare const Context: import("react").Context<DialogContextProps>;
|
|
3
3
|
export declare function useDialogContext(): DialogContextProps;
|
|
4
|
+
/**
|
|
5
|
+
* Return a stable handle that can imperatively `open()` and `close()` a
|
|
6
|
+
* `<Dialog>` mounted with the same control.
|
|
7
|
+
*
|
|
8
|
+
* The handle survives across re-renders; mounting a different `<Dialog>`
|
|
9
|
+
* with the same control attaches the new instance via the internal ref.
|
|
10
|
+
*/
|
|
4
11
|
export declare function useDialogControl(): DialogControlProps;
|
|
5
12
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/dialog/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/dialog/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,OAAO,6CAGlB,CAAC;AAGH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAoBrD"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Dialog } from './Dialog';
|
|
2
|
+
export { BloomDialogProvider } from './BloomDialogProvider';
|
|
3
|
+
export { alert } from './alert';
|
|
2
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
3
|
-
export type {
|
|
5
|
+
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
6
|
+
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './types';
|
|
4
7
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,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,GACZ,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Dialog, BLOOM_DIALOG_CSS } from './Dialog.web';
|
|
2
|
+
export { BloomDialogProvider } from './BloomDialogProvider.web';
|
|
3
|
+
export { alert } from './alert';
|
|
2
4
|
export { useDialogContext, useDialogControl } from './context';
|
|
3
|
-
export type {
|
|
5
|
+
export type { AlertButton, AlertButtonStyle, } from './alert-store';
|
|
6
|
+
export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './types';
|
|
4
7
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxD,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,GACZ,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Imperative open/close handle returned by `useDialogControl`.
|
|
4
|
+
*
|
|
5
|
+
* Consumers receive an instance of `DialogControlProps`, which is a stable
|
|
6
|
+
* object whose `open`/`close` methods proxy to whichever `Dialog` instance
|
|
7
|
+
* has currently registered itself via the internal ref. Re-rendering the
|
|
8
|
+
* dialog under the same control does not break the handle.
|
|
9
|
+
*/
|
|
2
10
|
export type DialogControlRefProps = {
|
|
3
|
-
open: (
|
|
11
|
+
open: () => void;
|
|
4
12
|
close: (callback?: () => void) => void;
|
|
5
13
|
};
|
|
6
14
|
export type DialogControlProps = DialogControlRefProps & {
|
|
@@ -11,25 +19,72 @@ export type DialogContextProps = {
|
|
|
11
19
|
close: DialogControlProps['close'];
|
|
12
20
|
isWithinDialog: boolean;
|
|
13
21
|
};
|
|
14
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Color of a declarative `DialogAction`. Maps to bloom's theme palette:
|
|
24
|
+
*
|
|
25
|
+
* - `'default'` -> theme primary (filled CTA)
|
|
26
|
+
* - `'cancel'` -> theme secondary (auto-dismiss, no `onPress` required)
|
|
27
|
+
* - `'destructive'` -> theme negative
|
|
28
|
+
*/
|
|
29
|
+
export type DialogActionColor = 'default' | 'cancel' | 'destructive';
|
|
30
|
+
export type DialogAction = {
|
|
31
|
+
label: string;
|
|
32
|
+
onPress?: (e: GestureResponderEvent) => void;
|
|
33
|
+
color?: DialogActionColor;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Defaults to `true`. When `true`, the dialog closes (and runs the close
|
|
37
|
+
* animation) before `onPress` is invoked, which gives the surrounding
|
|
38
|
+
* screen transition a chance to start before the action's side effects
|
|
39
|
+
* (navigation, network, etc.) kick in. Set `false` to keep the dialog
|
|
40
|
+
* mounted (e.g. while an async confirmation is in flight).
|
|
41
|
+
*/
|
|
42
|
+
shouldCloseOnPress?: boolean;
|
|
43
|
+
testID?: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Props accepted by the unified `<Dialog>` component.
|
|
47
|
+
*
|
|
48
|
+
* Three usage modes — pick whichever fits the call site:
|
|
49
|
+
*
|
|
50
|
+
* 1. **Declarative (`title` / `description` / `actions`).** Most common
|
|
51
|
+
* confirm/cancel surface. Bloom renders the title, description and
|
|
52
|
+
* action row for you.
|
|
53
|
+
*
|
|
54
|
+
* 2. **Custom children.** Pass any JSX as `children` and bloom renders it
|
|
55
|
+
* verbatim inside the dialog frame. Combine with `title` to keep the
|
|
56
|
+
* header consistent.
|
|
57
|
+
*
|
|
58
|
+
* 3. **Imperative `alert()`.** Bypass the JSX layer entirely — see the
|
|
59
|
+
* module-level `alert()` helper.
|
|
60
|
+
*/
|
|
61
|
+
export type DialogProps = React.PropsWithChildren<{
|
|
15
62
|
control: DialogControlProps;
|
|
63
|
+
/** Fires after the dialog has finished closing. */
|
|
16
64
|
onClose?: () => void;
|
|
17
65
|
testID?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
66
|
+
/** Optional dialog header text. Rendered above `description` / `children`. */
|
|
67
|
+
title?: string;
|
|
68
|
+
/** Optional supporting copy, rendered below the title. */
|
|
69
|
+
description?: string;
|
|
21
70
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
|
|
71
|
+
* Optional action row. When provided, bloom renders the appropriate
|
|
72
|
+
* confirm/cancel/destructive buttons for you. Order is preserved.
|
|
73
|
+
*/
|
|
74
|
+
actions?: DialogAction[];
|
|
75
|
+
/**
|
|
76
|
+
* Style overrides applied to the inner content container on native (the
|
|
77
|
+
* floating bottom-sheet card) and to the modal panel on web.
|
|
25
78
|
*/
|
|
26
|
-
preventExpansion?: boolean;
|
|
27
|
-
};
|
|
28
|
-
export type DialogInnerProps = React.PropsWithChildren<{
|
|
29
79
|
style?: StyleProp<ViewStyle>;
|
|
80
|
+
/** Accessibility label, applied to the dialog role on web. */
|
|
30
81
|
label?: string;
|
|
31
|
-
header?: React.ReactNode;
|
|
32
|
-
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
33
|
-
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
|
|
34
82
|
}>;
|
|
83
|
+
/**
|
|
84
|
+
* Web-only options. Native uses bloom's `BottomSheet` underneath which has
|
|
85
|
+
* its own positioning model.
|
|
86
|
+
*/
|
|
87
|
+
export type DialogWebOptions = {
|
|
88
|
+
alignCenter?: boolean;
|
|
89
|
+
};
|
|
35
90
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
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;;;;;;;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,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAChD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAUtC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
|
|
@@ -3,10 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
|
|
5
5
|
* stub — Metro cannot parse `.woff2` imports, so the file split keeps
|
|
6
|
-
*
|
|
6
|
+
* the font payload out of the native bundle entirely. Idempotent: safe to
|
|
7
7
|
* call multiple times; subsequent calls early-return after the
|
|
8
8
|
* `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
|
|
9
9
|
* `typeof document === 'undefined'` guard.
|
|
10
|
+
*
|
|
11
|
+
* The font URLs come from `./font-data.web`, a generated module that
|
|
12
|
+
* embeds the woff2 bytes as base64 data URLs. Inlining (rather than
|
|
13
|
+
* relying on bundler asset loaders for `.woff2`) means consumers do not
|
|
14
|
+
* have to extend Metro's `assetExts` or add a webpack/Vite asset rule —
|
|
15
|
+
* the published JS is self-contained. See `scripts/generate-font-data.mjs`
|
|
16
|
+
* for the rationale and trade-offs.
|
|
10
17
|
*/
|
|
11
18
|
export declare function applyFontFaces(): void;
|
|
12
19
|
//# sourceMappingURL=apply-font-faces.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-data.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-data.web.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB,EAAE,MAA0oqG,CAAC;AAC/qqG,eAAO,MAAM,kBAAkB,EAAE,MAA8lqG,CAAC;AAChoqG,eAAO,MAAM,aAAa,EAAE,MAA039D,CAAC;AACv59D,eAAO,MAAM,iBAAiB,EAAE,MAA09tC,CAAC"}
|
|
@@ -9,8 +9,8 @@ export { useThrottledValue } from './hooks/useThrottledValue';
|
|
|
9
9
|
export * as Icons from './icons';
|
|
10
10
|
export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from './icons/common';
|
|
11
11
|
export * from './portal';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export { Dialog, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog';
|
|
13
|
+
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './dialog';
|
|
14
14
|
export * from './button';
|
|
15
15
|
export * from './grouped-buttons';
|
|
16
16
|
export * from './divider';
|
|
@@ -22,7 +22,7 @@ export * from './avatar';
|
|
|
22
22
|
export * from './loading';
|
|
23
23
|
export * as PromptInput from './prompt-input';
|
|
24
24
|
export * from './switch';
|
|
25
|
-
export
|
|
25
|
+
export { toast, type Toast } from './toast';
|
|
26
26
|
export * as Typography from './typography';
|
|
27
27
|
export * as Skeleton from './skeleton';
|
|
28
28
|
export * as Grid from './grid';
|
|
@@ -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,MAAM,UAAU,CAAC;AAC1C,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;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,KAAK,KAAK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AAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -9,8 +9,8 @@ export { useThrottledValue } from './hooks/useThrottledValue';
|
|
|
9
9
|
export * as Icons from './icons';
|
|
10
10
|
export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from './icons/common';
|
|
11
11
|
export * from './portal/index.web';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export { Dialog, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog/index.web';
|
|
13
|
+
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './dialog/index.web';
|
|
14
14
|
export * from './button';
|
|
15
15
|
export * from './grouped-buttons';
|
|
16
16
|
export * from './divider';
|
|
@@ -22,7 +22,7 @@ export * from './avatar';
|
|
|
22
22
|
export * from './loading';
|
|
23
23
|
export * as PromptInput from './prompt-input';
|
|
24
24
|
export * from './switch';
|
|
25
|
-
export
|
|
25
|
+
export { toast, type Toast } from './toast/index.web';
|
|
26
26
|
export * as Typography from './typography';
|
|
27
27
|
export * as Skeleton from './skeleton';
|
|
28
28
|
export * as Grid from './grid';
|
|
@@ -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,MAAM,UAAU,CAAC;AAC1C,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;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iB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KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import type { DialogControlProps } from '../dialog/types';
|
|
4
4
|
import { useMenuContext } from './context';
|
|
5
5
|
import type { GroupProps, ItemIconProps, ItemProps, ItemTextProps, TriggerProps } from './types';
|
|
6
|
-
export type { DialogControlProps as MenuControlProps } from '../dialog';
|
|
7
|
-
export { useDialogControl as useMenuControl } from '../dialog';
|
|
6
|
+
export type { DialogControlProps as MenuControlProps } from '../dialog/types';
|
|
7
|
+
export { useDialogControl as useMenuControl } from '../dialog/context';
|
|
8
8
|
export { useMenuContext };
|
|
9
9
|
export declare function Root({ children, control, }: React.PropsWithChildren<{
|
|
10
|
-
control?:
|
|
10
|
+
control?: DialogControlProps;
|
|
11
11
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare function Trigger({ children, label, role, hint, }: TriggerProps): React.ReactNode;
|
|
13
13
|
export declare function Outer({ children, showCancel, }: React.PropsWithChildren<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiF,MAAM,OAAO,CAAC;AACtG,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiF,MAAM,OAAO,CAAC;AACtG,OAAO,EAA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U,2CAsCpD;AAED,wBAAgB,OAAO,SAEtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,EAA0C,cAAc,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,SAAS,EAET,YAAY,EACZ,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,CAAC;AA8B1B,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,SAAS,2CAgB3E;AAMD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,yTAqCxD;AAMD,wBAAgB,SAAS,CAAC,EACxB,WAAW,EACX,QAAQ,EAAE,YAAkC,EAC5C,KAAK,GACN,EAAE,cAAc,2CAkBhB;AAaD,wBAAgB,IAAI,CAAC,MAAM,EAAE,SAAS,2CAGrC;AAMD,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,KAAK,EACL,cAA0C,EAC1C,GAAG,KAAK,EACT,EAAE,YAAY,CAAC,CAAC,CAAC,2CAwBjB;AAkED,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,SAAS,2CA2ChE;AAMD,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,aAAa,2CAc1D;AAMD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,kBAAkB,2CAYxE;AAMD,wBAAgB,SAAS,4CAWxB"}
|