@oxyhq/bloom 0.15.0 → 0.16.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.
Files changed (208) hide show
  1. package/lib/commonjs/alert-dialog/AlertDialog.js +35 -27
  2. package/lib/commonjs/alert-dialog/AlertDialog.js.map +1 -1
  3. package/lib/commonjs/alert-dialog/index.js +1 -1
  4. package/lib/commonjs/alert-dialog/index.js.map +1 -1
  5. package/lib/commonjs/alert-dialog/index.web.js +1 -1
  6. package/lib/commonjs/alert-dialog/index.web.js.map +1 -1
  7. package/lib/commonjs/command/Command.js +27 -16
  8. package/lib/commonjs/command/Command.js.map +1 -1
  9. package/lib/commonjs/command/index.js +1 -1
  10. package/lib/commonjs/command/index.js.map +1 -1
  11. package/lib/commonjs/command/index.web.js +1 -1
  12. package/lib/commonjs/command/index.web.js.map +1 -1
  13. package/lib/commonjs/dialog/Dialog.js +39 -152
  14. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  15. package/lib/commonjs/dialog/Dialog.web.js +61 -196
  16. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  17. package/lib/commonjs/dialog/DialogBottomSheet.js +205 -0
  18. package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -0
  19. package/lib/commonjs/dialog/DialogContent.js +155 -0
  20. package/lib/commonjs/dialog/DialogContent.js.map +1 -0
  21. package/lib/commonjs/dialog/index.js +0 -13
  22. package/lib/commonjs/dialog/index.js.map +1 -1
  23. package/lib/commonjs/dialog/index.web.js +0 -19
  24. package/lib/commonjs/dialog/index.web.js.map +1 -1
  25. package/lib/commonjs/index.js +0 -29
  26. package/lib/commonjs/index.js.map +1 -1
  27. package/lib/commonjs/index.web.js +6 -35
  28. package/lib/commonjs/index.web.js.map +1 -1
  29. package/lib/module/alert-dialog/AlertDialog.js +35 -27
  30. package/lib/module/alert-dialog/AlertDialog.js.map +1 -1
  31. package/lib/module/alert-dialog/index.js +2 -2
  32. package/lib/module/alert-dialog/index.js.map +1 -1
  33. package/lib/module/alert-dialog/index.web.js +2 -2
  34. package/lib/module/alert-dialog/index.web.js.map +1 -1
  35. package/lib/module/command/Command.js +27 -16
  36. package/lib/module/command/Command.js.map +1 -1
  37. package/lib/module/command/index.js +2 -2
  38. package/lib/module/command/index.js.map +1 -1
  39. package/lib/module/command/index.web.js +2 -2
  40. package/lib/module/command/index.web.js.map +1 -1
  41. package/lib/module/dialog/Dialog.js +42 -155
  42. package/lib/module/dialog/Dialog.js.map +1 -1
  43. package/lib/module/dialog/Dialog.web.js +63 -198
  44. package/lib/module/dialog/Dialog.web.js.map +1 -1
  45. package/lib/module/dialog/DialogBottomSheet.js +200 -0
  46. package/lib/module/dialog/DialogBottomSheet.js.map +1 -0
  47. package/lib/module/dialog/DialogContent.js +148 -0
  48. package/lib/module/dialog/DialogContent.js.map +1 -0
  49. package/lib/module/dialog/index.js +0 -1
  50. package/lib/module/dialog/index.js.map +1 -1
  51. package/lib/module/dialog/index.web.js +0 -1
  52. package/lib/module/dialog/index.web.js.map +1 -1
  53. package/lib/module/index.js +1 -3
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/index.web.js +1 -3
  56. package/lib/module/index.web.js.map +1 -1
  57. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts +13 -12
  58. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/alert-dialog/index.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/alert-dialog/index.web.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/command/Command.d.ts +8 -8
  62. package/lib/typescript/commonjs/command/Command.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/command/index.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/command/index.web.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/dialog/Dialog.d.ts +2 -3
  66. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts +11 -8
  68. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +29 -0
  70. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -0
  71. package/lib/typescript/commonjs/dialog/DialogContent.d.ts +32 -0
  72. package/lib/typescript/commonjs/dialog/DialogContent.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/dialog/index.d.ts +0 -2
  74. package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/dialog/index.web.d.ts +0 -2
  76. package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/index.d.ts +2 -4
  78. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/index.web.d.ts +2 -4
  80. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  81. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts +13 -12
  82. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts.map +1 -1
  83. package/lib/typescript/module/alert-dialog/index.d.ts.map +1 -1
  84. package/lib/typescript/module/alert-dialog/index.web.d.ts.map +1 -1
  85. package/lib/typescript/module/command/Command.d.ts +8 -8
  86. package/lib/typescript/module/command/Command.d.ts.map +1 -1
  87. package/lib/typescript/module/command/index.d.ts.map +1 -1
  88. package/lib/typescript/module/command/index.web.d.ts.map +1 -1
  89. package/lib/typescript/module/dialog/Dialog.d.ts +2 -3
  90. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  91. package/lib/typescript/module/dialog/Dialog.web.d.ts +11 -8
  92. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  93. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +29 -0
  94. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -0
  95. package/lib/typescript/module/dialog/DialogContent.d.ts +32 -0
  96. package/lib/typescript/module/dialog/DialogContent.d.ts.map +1 -0
  97. package/lib/typescript/module/dialog/index.d.ts +0 -2
  98. package/lib/typescript/module/dialog/index.d.ts.map +1 -1
  99. package/lib/typescript/module/dialog/index.web.d.ts +0 -2
  100. package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
  101. package/lib/typescript/module/index.d.ts +2 -4
  102. package/lib/typescript/module/index.d.ts.map +1 -1
  103. package/lib/typescript/module/index.web.d.ts +2 -4
  104. package/lib/typescript/module/index.web.d.ts.map +1 -1
  105. package/package.json +1 -18
  106. package/src/__tests__/AlertDialog.test.tsx +122 -0
  107. package/src/__tests__/BottomSheetGesture.test.tsx +135 -0
  108. package/src/__tests__/Command.test.tsx +107 -0
  109. package/src/__tests__/DialogBottomSheet.test.tsx +130 -0
  110. package/src/alert-dialog/AlertDialog.tsx +46 -36
  111. package/src/alert-dialog/index.ts +2 -2
  112. package/src/alert-dialog/index.web.ts +2 -2
  113. package/src/command/Command.tsx +30 -19
  114. package/src/command/index.ts +2 -2
  115. package/src/command/index.web.ts +2 -2
  116. package/src/dialog/Dialog.tsx +35 -168
  117. package/src/dialog/Dialog.web.tsx +52 -209
  118. package/src/dialog/DialogBottomSheet.tsx +235 -0
  119. package/src/dialog/DialogContent.tsx +157 -0
  120. package/src/dialog/index.ts +0 -2
  121. package/src/dialog/index.web.ts +0 -6
  122. package/src/index.ts +0 -11
  123. package/src/index.web.ts +0 -11
  124. package/lib/commonjs/dialog/CenteredDialog.js +0 -252
  125. package/lib/commonjs/dialog/CenteredDialog.js.map +0 -1
  126. package/lib/commonjs/dialog/CenteredDialog.web.js +0 -330
  127. package/lib/commonjs/dialog/CenteredDialog.web.js.map +0 -1
  128. package/lib/commonjs/dialog/centered-dialog-tokens.js +0 -62
  129. package/lib/commonjs/dialog/centered-dialog-tokens.js.map +0 -1
  130. package/lib/commonjs/dialog/centered-dialog-types.js +0 -6
  131. package/lib/commonjs/dialog/centered-dialog-types.js.map +0 -1
  132. package/lib/commonjs/responsive-sheet/ResponsiveSheet.js +0 -97
  133. package/lib/commonjs/responsive-sheet/ResponsiveSheet.js.map +0 -1
  134. package/lib/commonjs/responsive-sheet/ResponsiveSheet.web.js +0 -84
  135. package/lib/commonjs/responsive-sheet/ResponsiveSheet.web.js.map +0 -1
  136. package/lib/commonjs/responsive-sheet/index.js +0 -19
  137. package/lib/commonjs/responsive-sheet/index.js.map +0 -1
  138. package/lib/commonjs/responsive-sheet/index.web.js +0 -19
  139. package/lib/commonjs/responsive-sheet/index.web.js.map +0 -1
  140. package/lib/commonjs/responsive-sheet/types.js +0 -6
  141. package/lib/commonjs/responsive-sheet/types.js.map +0 -1
  142. package/lib/module/dialog/CenteredDialog.js +0 -246
  143. package/lib/module/dialog/CenteredDialog.js.map +0 -1
  144. package/lib/module/dialog/CenteredDialog.web.js +0 -324
  145. package/lib/module/dialog/CenteredDialog.web.js.map +0 -1
  146. package/lib/module/dialog/centered-dialog-tokens.js +0 -58
  147. package/lib/module/dialog/centered-dialog-tokens.js.map +0 -1
  148. package/lib/module/dialog/centered-dialog-types.js +0 -4
  149. package/lib/module/dialog/centered-dialog-types.js.map +0 -1
  150. package/lib/module/responsive-sheet/ResponsiveSheet.js +0 -90
  151. package/lib/module/responsive-sheet/ResponsiveSheet.js.map +0 -1
  152. package/lib/module/responsive-sheet/ResponsiveSheet.web.js +0 -77
  153. package/lib/module/responsive-sheet/ResponsiveSheet.web.js.map +0 -1
  154. package/lib/module/responsive-sheet/index.js +0 -4
  155. package/lib/module/responsive-sheet/index.js.map +0 -1
  156. package/lib/module/responsive-sheet/index.web.js +0 -12
  157. package/lib/module/responsive-sheet/index.web.js.map +0 -1
  158. package/lib/module/responsive-sheet/types.js +0 -4
  159. package/lib/module/responsive-sheet/types.js.map +0 -1
  160. package/lib/typescript/commonjs/dialog/CenteredDialog.d.ts +0 -22
  161. package/lib/typescript/commonjs/dialog/CenteredDialog.d.ts.map +0 -1
  162. package/lib/typescript/commonjs/dialog/CenteredDialog.web.d.ts +0 -31
  163. package/lib/typescript/commonjs/dialog/CenteredDialog.web.d.ts.map +0 -1
  164. package/lib/typescript/commonjs/dialog/centered-dialog-tokens.d.ts +0 -47
  165. package/lib/typescript/commonjs/dialog/centered-dialog-tokens.d.ts.map +0 -1
  166. package/lib/typescript/commonjs/dialog/centered-dialog-types.d.ts +0 -74
  167. package/lib/typescript/commonjs/dialog/centered-dialog-types.d.ts.map +0 -1
  168. package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.d.ts +0 -22
  169. package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.d.ts.map +0 -1
  170. package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.web.d.ts +0 -16
  171. package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.web.d.ts.map +0 -1
  172. package/lib/typescript/commonjs/responsive-sheet/index.d.ts +0 -3
  173. package/lib/typescript/commonjs/responsive-sheet/index.d.ts.map +0 -1
  174. package/lib/typescript/commonjs/responsive-sheet/index.web.d.ts +0 -3
  175. package/lib/typescript/commonjs/responsive-sheet/index.web.d.ts.map +0 -1
  176. package/lib/typescript/commonjs/responsive-sheet/types.d.ts +0 -58
  177. package/lib/typescript/commonjs/responsive-sheet/types.d.ts.map +0 -1
  178. package/lib/typescript/module/dialog/CenteredDialog.d.ts +0 -22
  179. package/lib/typescript/module/dialog/CenteredDialog.d.ts.map +0 -1
  180. package/lib/typescript/module/dialog/CenteredDialog.web.d.ts +0 -31
  181. package/lib/typescript/module/dialog/CenteredDialog.web.d.ts.map +0 -1
  182. package/lib/typescript/module/dialog/centered-dialog-tokens.d.ts +0 -47
  183. package/lib/typescript/module/dialog/centered-dialog-tokens.d.ts.map +0 -1
  184. package/lib/typescript/module/dialog/centered-dialog-types.d.ts +0 -74
  185. package/lib/typescript/module/dialog/centered-dialog-types.d.ts.map +0 -1
  186. package/lib/typescript/module/responsive-sheet/ResponsiveSheet.d.ts +0 -22
  187. package/lib/typescript/module/responsive-sheet/ResponsiveSheet.d.ts.map +0 -1
  188. package/lib/typescript/module/responsive-sheet/ResponsiveSheet.web.d.ts +0 -16
  189. package/lib/typescript/module/responsive-sheet/ResponsiveSheet.web.d.ts.map +0 -1
  190. package/lib/typescript/module/responsive-sheet/index.d.ts +0 -3
  191. package/lib/typescript/module/responsive-sheet/index.d.ts.map +0 -1
  192. package/lib/typescript/module/responsive-sheet/index.web.d.ts +0 -3
  193. package/lib/typescript/module/responsive-sheet/index.web.d.ts.map +0 -1
  194. package/lib/typescript/module/responsive-sheet/types.d.ts +0 -58
  195. package/lib/typescript/module/responsive-sheet/types.d.ts.map +0 -1
  196. package/src/__tests__/CenteredDialog.test.tsx +0 -108
  197. package/src/__tests__/ResponsiveSheet.test.tsx +0 -88
  198. package/src/dialog/CenteredDialog.stories.tsx +0 -125
  199. package/src/dialog/CenteredDialog.tsx +0 -305
  200. package/src/dialog/CenteredDialog.web.tsx +0 -374
  201. package/src/dialog/centered-dialog-tokens.ts +0 -68
  202. package/src/dialog/centered-dialog-types.ts +0 -74
  203. package/src/responsive-sheet/ResponsiveSheet.stories.tsx +0 -54
  204. package/src/responsive-sheet/ResponsiveSheet.tsx +0 -88
  205. package/src/responsive-sheet/ResponsiveSheet.web.tsx +0 -76
  206. package/src/responsive-sheet/index.ts +0 -6
  207. package/src/responsive-sheet/index.web.ts +0 -14
  208. package/src/responsive-sheet/types.ts +0 -60
@@ -0,0 +1,157 @@
1
+ import React, { useCallback } from 'react';
2
+ import {
3
+ Text,
4
+ TouchableOpacity,
5
+ View,
6
+ type GestureResponderEvent,
7
+ } from 'react-native';
8
+
9
+ import type { ThemeColors } from '../theme/types';
10
+ import { useTheme } from '../theme/use-theme';
11
+ import { useDialogContext } from './context';
12
+ import type { DialogAction, DialogActionColor } from './types';
13
+
14
+ /**
15
+ * Shared dialog content primitives used by every `<Dialog>` placement on both
16
+ * platforms — the centered panel, the side-sheets, and the `BottomSheet`-backed
17
+ * bottom placement. Keeping them here is the single source of truth for the
18
+ * declarative `title` / `description` / `actions` chrome, so the surfaces never
19
+ * drift in spacing, typography, or action-button behaviour.
20
+ */
21
+
22
+ /**
23
+ * Renders the dialog's body: optional declarative title + description, any
24
+ * `children`, then the action row. The `titleId`/`descriptionId` are wired by
25
+ * the caller onto the dialog role element for `aria-labelledby` /
26
+ * `aria-describedby`.
27
+ */
28
+ export function DialogBody({
29
+ titleId,
30
+ descriptionId,
31
+ title,
32
+ description,
33
+ actions,
34
+ children,
35
+ }: {
36
+ titleId: string;
37
+ descriptionId: string;
38
+ title?: string;
39
+ description?: string;
40
+ actions?: DialogAction[];
41
+ children?: React.ReactNode;
42
+ }) {
43
+ const theme = useTheme();
44
+ return (
45
+ <>
46
+ {title ? (
47
+ <Text
48
+ nativeID={titleId}
49
+ style={{
50
+ fontSize: 22,
51
+ fontWeight: '600',
52
+ color: theme.colors.text,
53
+ paddingBottom: description ? 4 : 16,
54
+ lineHeight: 30,
55
+ }}
56
+ >
57
+ {title}
58
+ </Text>
59
+ ) : null}
60
+ {description ? (
61
+ <Text
62
+ nativeID={descriptionId}
63
+ style={{
64
+ fontSize: 16,
65
+ color: theme.colors.textSecondary,
66
+ paddingBottom: 16,
67
+ lineHeight: 22,
68
+ }}
69
+ >
70
+ {description}
71
+ </Text>
72
+ ) : null}
73
+ {children}
74
+ {actions && actions.length > 0 ? <ActionRow actions={actions} /> : null}
75
+ </>
76
+ );
77
+ }
78
+
79
+ export function ActionRow({ actions }: { actions: DialogAction[] }) {
80
+ return (
81
+ <View style={{ width: '100%', gap: 8, justifyContent: 'flex-end' }}>
82
+ {actions.map((action, idx) => (
83
+ <ActionButton key={`${action.label}-${idx}`} action={action} />
84
+ ))}
85
+ </View>
86
+ );
87
+ }
88
+
89
+ function ActionButton({ action }: { action: DialogAction }) {
90
+ const { close } = useDialogContext();
91
+ const theme = useTheme();
92
+ const color: DialogActionColor = action.color ?? 'default';
93
+ const shouldCloseOnPress = action.shouldCloseOnPress ?? true;
94
+
95
+ const { background, foreground } = getActionPalette(color, theme.colors);
96
+
97
+ const handlePress = useCallback(
98
+ (e: GestureResponderEvent) => {
99
+ const onPress = action.onPress;
100
+ if (color === 'cancel') {
101
+ // Cancel always dismisses; consumer's onPress (rare) runs after.
102
+ close(onPress ? () => onPress(e) : undefined);
103
+ return;
104
+ }
105
+ if (shouldCloseOnPress) {
106
+ close(onPress ? () => onPress(e) : undefined);
107
+ } else {
108
+ onPress?.(e);
109
+ }
110
+ },
111
+ [action.onPress, close, color, shouldCloseOnPress],
112
+ );
113
+
114
+ return (
115
+ <TouchableOpacity
116
+ style={{
117
+ borderRadius: 9999,
118
+ alignItems: 'center',
119
+ justifyContent: 'center',
120
+ backgroundColor: background,
121
+ opacity: action.disabled ? 0.5 : 1,
122
+ paddingVertical: 12,
123
+ paddingHorizontal: 24,
124
+ }}
125
+ onPress={handlePress}
126
+ disabled={action.disabled}
127
+ activeOpacity={0.7}
128
+ testID={action.testID}
129
+ >
130
+ <Text style={{ fontSize: 16, fontWeight: '500', color: foreground }}>
131
+ {action.label}
132
+ </Text>
133
+ </TouchableOpacity>
134
+ );
135
+ }
136
+
137
+ export function getActionPalette(
138
+ color: DialogActionColor,
139
+ colors: ThemeColors,
140
+ ): { background: string; foreground: string } {
141
+ switch (color) {
142
+ case 'destructive':
143
+ return {
144
+ background: colors.negative,
145
+ foreground: colors.negativeForeground,
146
+ };
147
+ case 'cancel':
148
+ return { background: colors.contrast50, foreground: colors.text };
149
+ case 'default':
150
+ return { background: colors.primary, foreground: colors.primaryForeground };
151
+ /* c8 ignore next 3 -- TS exhaustiveness check guards this branch */
152
+ default: {
153
+ const _exhaustive: never = color;
154
+ return { background: colors.primary, foreground: colors.primaryForeground };
155
+ }
156
+ }
157
+ }
@@ -1,5 +1,4 @@
1
1
  export { Dialog, DIALOG_SHEET_BACKDROP_TESTID } from './Dialog';
2
- export { CenteredDialog, CENTERED_DIALOG_BACKDROP_TESTID } from './CenteredDialog';
3
2
  export { BloomDialogProvider } from './BloomDialogProvider';
4
3
  export { alert } from './alert';
5
4
  export { useDialogContext, useDialogControl } from './context';
@@ -17,4 +16,3 @@ export type {
17
16
  DialogProps,
18
17
  ResponsiveDialogPlacement,
19
18
  } from './types';
20
- export type { CenteredDialogProps } from './centered-dialog-types';
@@ -9,11 +9,6 @@
9
9
  // `package.json`'s `exports['./dialog']`; native bundlers fall through to
10
10
  // the React Native build above.
11
11
  export { Dialog, BLOOM_DIALOG_CSS, DIALOG_SHEET_BACKDROP_TESTID } from './Dialog.web';
12
- export {
13
- CenteredDialog,
14
- BLOOM_CENTERED_DIALOG_CSS,
15
- CENTERED_DIALOG_BACKDROP_TESTID,
16
- } from './CenteredDialog.web';
17
12
  export { BloomDialogProvider } from './BloomDialogProvider.web';
18
13
  export { alert } from './alert';
19
14
  export { useDialogContext, useDialogControl } from './context';
@@ -31,4 +26,3 @@ export type {
31
26
  DialogProps,
32
27
  ResponsiveDialogPlacement,
33
28
  } from './types';
34
- export type { CenteredDialogProps } from './centered-dialog-types';
package/src/index.ts CHANGED
@@ -21,8 +21,6 @@ export * from './portal';
21
21
  export {
22
22
  Dialog,
23
23
  DIALOG_SHEET_BACKDROP_TESTID,
24
- CenteredDialog,
25
- CENTERED_DIALOG_BACKDROP_TESTID,
26
24
  BloomDialogProvider,
27
25
  alert,
28
26
  useDialogContext,
@@ -31,7 +29,6 @@ export {
31
29
  export type {
32
30
  AlertButton,
33
31
  AlertButtonStyle,
34
- CenteredDialogProps,
35
32
  DialogAction,
36
33
  DialogActionColor,
37
34
  DialogContextProps,
@@ -92,14 +89,6 @@ export type { ComboboxProps, ComboboxOption } from './combobox';
92
89
  export { BottomSheet } from './bottom-sheet';
93
90
  export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
94
91
 
95
- // Responsive sheet — side-sheet on wide screens, bottom-sheet on narrow.
96
- export { ResponsiveSheet, RESPONSIVE_SHEET_BACKDROP_TESTID } from './responsive-sheet';
97
- export type {
98
- ResponsiveSheetProps,
99
- ResponsiveSheetSide,
100
- ResponsiveSheetInset,
101
- } from './responsive-sheet';
102
-
103
92
  // Data display
104
93
  export * from './card';
105
94
  export * from './badge';
package/src/index.web.ts CHANGED
@@ -26,8 +26,6 @@ export * from './portal/index.web';
26
26
  export {
27
27
  Dialog,
28
28
  DIALOG_SHEET_BACKDROP_TESTID,
29
- CenteredDialog,
30
- CENTERED_DIALOG_BACKDROP_TESTID,
31
29
  BloomDialogProvider,
32
30
  alert,
33
31
  useDialogContext,
@@ -36,7 +34,6 @@ export {
36
34
  export type {
37
35
  AlertButton,
38
36
  AlertButtonStyle,
39
- CenteredDialogProps,
40
37
  DialogAction,
41
38
  DialogActionColor,
42
39
  DialogContextProps,
@@ -97,14 +94,6 @@ export type { ComboboxProps, ComboboxOption } from './combobox/index.web';
97
94
  export { BottomSheet } from './bottom-sheet';
98
95
  export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
99
96
 
100
- // Responsive sheet — side-sheet on wide screens, bottom-sheet on narrow.
101
- export { ResponsiveSheet, RESPONSIVE_SHEET_BACKDROP_TESTID } from './responsive-sheet/index.web';
102
- export type {
103
- ResponsiveSheetProps,
104
- ResponsiveSheetSide,
105
- ResponsiveSheetInset,
106
- } from './responsive-sheet/index.web';
107
-
108
97
  // Data display
109
98
  export * from './card';
110
99
  export * from './badge';
@@ -1,252 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CENTERED_DIALOG_BACKDROP_TESTID = void 0;
7
- exports.CenteredDialog = CenteredDialog;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactNative = require("react-native");
10
- var _useInteractionState = require("../hooks/useInteractionState.js");
11
- var _Times = require("../icons/Times.js");
12
- var _useTheme = require("../theme/use-theme.js");
13
- var _index = require("../typography/index.js");
14
- var _centeredDialogTokens = require("./centered-dialog-tokens.js");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
- const CLOSE_HIT_SLOP = {
18
- top: 8,
19
- bottom: 8,
20
- left: 8,
21
- right: 8
22
- };
23
-
24
- /** Stable testID for the dimmed backdrop. Overridden when a `testID` is set. */
25
- const CENTERED_DIALOG_BACKDROP_TESTID = exports.CENTERED_DIALOG_BACKDROP_TESTID = 'bloom-centered-dialog-backdrop';
26
-
27
- /**
28
- * @deprecated Use `<Dialog placement="center">` instead.
29
- *
30
- * Native variant of `<CenteredDialog>`.
31
- *
32
- * A controlled, centered modal: a transparent RN `Modal` (fade animation,
33
- * own native window) hosting a dimmed full-screen backdrop and a centered,
34
- * rounded card styled entirely from Bloom theme tokens.
35
- *
36
- * The backdrop is a sibling `Pressable` rendered BEHIND the card (absolute
37
- * filled), never a parent of it — so a tap on the card never bubbles to the
38
- * backdrop's close handler and the card never ends up nested inside the
39
- * backdrop's pressable on web.
40
- *
41
- * Dismissal: backdrop tap (when `dismissible`), the header close button, and
42
- * the Android hardware back button (`onRequestClose`) all call `onClose`.
43
- */
44
- function CenteredDialog({
45
- visible,
46
- onClose,
47
- title,
48
- dismissible = true,
49
- maxWidth = _centeredDialogTokens.DEFAULT_MAX_WIDTH,
50
- compact = true,
51
- showClose,
52
- children,
53
- footer,
54
- accessibilityLabel,
55
- closeAccessibilityLabel = 'Close dialog',
56
- backdropAccessibilityLabel = 'Dismiss dialog',
57
- cardStyle,
58
- contentStyle,
59
- testID
60
- }) {
61
- const theme = (0, _useTheme.useTheme)();
62
- const backdropPress = (0, _useInteractionState.useInteractionState)();
63
- const spacing = (0, _react.useMemo)(() => (0, _centeredDialogTokens.resolveSpacing)(compact), [compact]);
64
- const resolvedShowClose = showClose ?? Boolean(title);
65
- const hasHeader = Boolean(title) || resolvedShowClose;
66
- const handleBackdropPress = dismissible ? onClose : undefined;
67
- // Android's hardware back must always be answerable; when the dialog is
68
- // non-dismissible we still need a handler (RN requires one for transparent
69
- // modals) — make it a no-op so back does nothing rather than crash.
70
- const handleRequestClose = dismissible ? onClose : noop;
71
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
72
- visible: visible,
73
- transparent: true,
74
- animationType: "fade",
75
- statusBarTranslucent: true,
76
- onRequestClose: handleRequestClose,
77
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
78
- style: [styles.root, {
79
- padding: _centeredDialogTokens.VIEWPORT_GUTTER
80
- }],
81
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
82
- testID: testID ? `${testID}-backdrop` : CENTERED_DIALOG_BACKDROP_TESTID,
83
- style: [styles.backdrop, {
84
- backgroundColor: theme.colors.overlay
85
- }, backdropPress.state && styles.backdropPressed],
86
- onPress: handleBackdropPress,
87
- onPressIn: backdropPress.onIn,
88
- onPressOut: backdropPress.onOut,
89
- disabled: !dismissible,
90
- accessibilityRole: "button",
91
- accessibilityLabel: backdropAccessibilityLabel
92
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
93
- testID: testID,
94
- accessibilityLabel: accessibilityLabel ?? title,
95
- style: [styles.card, {
96
- maxWidth,
97
- maxHeight: `${_centeredDialogTokens.MAX_HEIGHT_FRACTION * 100}%`,
98
- backgroundColor: theme.colors.card,
99
- borderColor: theme.colors.border,
100
- shadowColor: theme.colors.shadow
101
- }, cardStyle],
102
- children: [hasHeader ? /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogHeader, {
103
- title: title,
104
- showClose: resolvedShowClose,
105
- padding: spacing.pad,
106
- gap: spacing.headerGap,
107
- closeAccessibilityLabel: closeAccessibilityLabel,
108
- onClose: onClose
109
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
110
- style: styles.bodyScroll,
111
- contentContainerStyle: [{
112
- padding: spacing.pad,
113
- paddingTop: hasHeader ? spacing.headerGap : spacing.pad,
114
- gap: spacing.contentGap
115
- }, contentStyle],
116
- showsVerticalScrollIndicator: false,
117
- keyboardShouldPersistTaps: "handled",
118
- children: children
119
- }), footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
120
- style: [styles.footer, {
121
- padding: spacing.pad,
122
- paddingTop: spacing.footerGap,
123
- borderTopColor: theme.colors.borderLight
124
- }],
125
- children: footer
126
- }) : null]
127
- })]
128
- })
129
- });
130
- }
131
- function DialogHeader({
132
- title,
133
- showClose,
134
- padding,
135
- gap,
136
- closeAccessibilityLabel,
137
- onClose
138
- }) {
139
- const theme = (0, _useTheme.useTheme)();
140
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
141
- style: [styles.header, {
142
- paddingHorizontal: padding,
143
- paddingTop: padding,
144
- gap
145
- }],
146
- children: [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
147
- accessibilityRole: "header",
148
- numberOfLines: 2,
149
- style: [styles.title, {
150
- color: theme.colors.text
151
- }],
152
- children: title
153
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
154
- style: styles.titleSpacer
155
- }), showClose ? /*#__PURE__*/(0, _jsxRuntime.jsx)(CloseButton, {
156
- accessibilityLabel: closeAccessibilityLabel,
157
- onPress: onClose
158
- }) : null]
159
- });
160
- }
161
- function CloseButton({
162
- accessibilityLabel,
163
- onPress
164
- }) {
165
- const theme = (0, _useTheme.useTheme)();
166
- const press = (0, _useInteractionState.useInteractionState)();
167
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
168
- onPress: onPress,
169
- onPressIn: press.onIn,
170
- onPressOut: press.onOut,
171
- hitSlop: CLOSE_HIT_SLOP,
172
- accessibilityRole: "button",
173
- accessibilityLabel: accessibilityLabel,
174
- style: [styles.closeButton, {
175
- backgroundColor: theme.colors.contrast50
176
- }, press.state && styles.closeButtonPressed],
177
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Times.TimesLarge_Stroke2_Corner0_Rounded, {
178
- size: "sm",
179
- fill: theme.colors.textSecondary
180
- })
181
- });
182
- }
183
- function noop() {
184
- /* non-dismissible: hardware back is intentionally inert */
185
- }
186
- const styles = _reactNative.StyleSheet.create({
187
- root: {
188
- flex: 1,
189
- alignItems: 'center',
190
- justifyContent: 'center'
191
- },
192
- backdrop: {
193
- // Spell out the absolute-fill rect (matches `Fill`'s canonical style)
194
- // rather than spreading the deprecated `StyleSheet.absoluteFillObject`,
195
- // which RN 0.83's generated types no longer surface on the `StyleSheet`
196
- // namespace and which downstream type-checks reject.
197
- position: 'absolute',
198
- top: 0,
199
- right: 0,
200
- bottom: 0,
201
- left: 0
202
- },
203
- // A subtle deepening on press confirms the tap-to-dismiss affordance.
204
- backdropPressed: {
205
- opacity: 0.92
206
- },
207
- card: {
208
- width: '100%',
209
- borderRadius: _centeredDialogTokens.CARD_RADIUS,
210
- borderWidth: _reactNative.StyleSheet.hairlineWidth,
211
- overflow: 'hidden',
212
- shadowOpacity: 0.18,
213
- shadowRadius: 24,
214
- shadowOffset: {
215
- width: 0,
216
- height: 8
217
- },
218
- elevation: 12
219
- },
220
- header: {
221
- flexDirection: 'row',
222
- alignItems: 'flex-start',
223
- justifyContent: 'space-between'
224
- },
225
- title: {
226
- flex: 1,
227
- fontSize: 17,
228
- fontWeight: '700',
229
- lineHeight: 22
230
- },
231
- titleSpacer: {
232
- flex: 1
233
- },
234
- closeButton: {
235
- width: 28,
236
- height: 28,
237
- borderRadius: 14,
238
- alignItems: 'center',
239
- justifyContent: 'center'
240
- },
241
- closeButtonPressed: {
242
- opacity: 0.7
243
- },
244
- bodyScroll: {
245
- flexGrow: 0,
246
- flexShrink: 1
247
- },
248
- footer: {
249
- borderTopWidth: _reactNative.StyleSheet.hairlineWidth
250
- }
251
- });
252
- //# sourceMappingURL=CenteredDialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useInteractionState","_Times","_useTheme","_index","_centeredDialogTokens","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CLOSE_HIT_SLOP","top","bottom","left","right","CENTERED_DIALOG_BACKDROP_TESTID","exports","CenteredDialog","visible","onClose","title","dismissible","maxWidth","DEFAULT_MAX_WIDTH","compact","showClose","children","footer","accessibilityLabel","closeAccessibilityLabel","backdropAccessibilityLabel","cardStyle","contentStyle","testID","theme","useTheme","backdropPress","useInteractionState","spacing","useMemo","resolveSpacing","resolvedShowClose","Boolean","hasHeader","handleBackdropPress","undefined","handleRequestClose","noop","jsx","Modal","transparent","animationType","statusBarTranslucent","onRequestClose","jsxs","View","style","styles","root","padding","VIEWPORT_GUTTER","Pressable","backdrop","backgroundColor","colors","overlay","state","backdropPressed","onPress","onPressIn","onIn","onPressOut","onOut","disabled","accessibilityRole","card","maxHeight","MAX_HEIGHT_FRACTION","borderColor","border","shadowColor","shadow","DialogHeader","pad","gap","headerGap","ScrollView","bodyScroll","contentContainerStyle","paddingTop","contentGap","showsVerticalScrollIndicator","keyboardShouldPersistTaps","footerGap","borderTopColor","borderLight","header","paddingHorizontal","Text","numberOfLines","color","text","titleSpacer","CloseButton","press","hitSlop","closeButton","contrast50","closeButtonPressed","TimesLarge_Stroke2_Corner0_Rounded","size","fill","textSecondary","StyleSheet","create","flex","alignItems","justifyContent","position","opacity","width","borderRadius","CARD_RADIUS","borderWidth","hairlineWidth","overflow","shadowOpacity","shadowRadius","shadowOffset","height","elevation","flexDirection","fontSize","fontWeight","lineHeight","flexGrow","flexShrink","borderTopWidth"],"sourceRoot":"../../../src","sources":["dialog/CenteredDialog.tsx"],"mappings":";;;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