@oxyhq/bloom 0.46.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 +74 -5
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +153 -10
- 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 +11 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +11 -4
- 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 +22 -9
- package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -1
- 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 +75 -6
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +156 -13
- 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 +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -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 +22 -9
- package/lib/module/surfaces/SurfaceHost.js.map +1 -1
- 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 +75 -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 +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/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.map +1 -1
- package/lib/typescript/commonjs/surfaces/types.d.ts +17 -1
- package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -1
- 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 +75 -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 +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/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.map +1 -1
- package/lib/typescript/module/surfaces/types.d.ts +17 -1
- package/lib/typescript/module/surfaces/types.d.ts.map +1 -1
- 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 +8 -8
- package/src/__tests__/BottomSheet.test.tsx +47 -0
- package/src/__tests__/DialogBottomSheet.test.tsx +30 -5
- 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 +74 -4
- package/src/dialog/Dialog.web.tsx +154 -23
- 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 +76 -0
- package/src/index.ts +3 -1
- package/src/index.web.ts +3 -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 +16 -1
- package/src/surfaces/types.ts +17 -1
- 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
|
@@ -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,EA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,CAAC;AAGxB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,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,8 @@ 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
21
|
export { surfaces, SurfaceProvider, SurfaceHost, useSurface } from './surfaces/index.web';
|
|
22
22
|
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './surfaces/index.web';
|
|
23
23
|
export * from './button/index.web';
|
|
@@ -63,7 +63,7 @@ export { AnimatedCheck } from './animated-check';
|
|
|
63
63
|
export type { AnimatedCheckProps, AnimatedCheckRef } from './animated-check';
|
|
64
64
|
export * from './text-field';
|
|
65
65
|
export * from './segmented-control';
|
|
66
|
-
export {
|
|
66
|
+
export { Search } from './search';
|
|
67
67
|
export { Label } from './label';
|
|
68
68
|
export type { LabelProps } from './label';
|
|
69
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,iB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Group children. 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"}
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type { DialogInset, ResponsiveDialogPlacement } from '../dialog/types';
|
|
3
|
+
import type { DialogHeaderConfig, DialogInset, ResponsiveDialogPlacement } from '../dialog/types';
|
|
4
4
|
/**
|
|
5
5
|
* How a surface renders — the placement + the `Dialog` sizing/chrome options a
|
|
6
6
|
* surface needs. This is the CONTENT-AGNOSTIC presentation config: it never
|
|
@@ -37,6 +37,22 @@ export interface SurfacePresentation {
|
|
|
37
37
|
dismissOnBackdrop?: boolean;
|
|
38
38
|
/** Inner padding (px) of the surface content container. Forwarded to `Dialog`. */
|
|
39
39
|
contentPadding?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Turns on the Dialog's OWN navigation header for this surface (sticky gradient
|
|
42
|
+
* nav bar + large collapsing title over the surface's scroll content). Seeds
|
|
43
|
+
* the header content; a mounted screen refines it at runtime via
|
|
44
|
+
* `useDialogHeader`. Omit for a plain surface (a confirm/alert dialog). Forwarded
|
|
45
|
+
* to `Dialog`.
|
|
46
|
+
*/
|
|
47
|
+
header?: DialogHeaderConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the surface wraps its content in an internal scroll container.
|
|
50
|
+
* Defaults to `true`. Set `false` when the surface's content owns its own
|
|
51
|
+
* scrolling primitive (a `FlatList` / `SectionList` / VirtualizedList, or its
|
|
52
|
+
* own `ScrollView`) so the host does not nest it in a ScrollView. Forwarded
|
|
53
|
+
* to `Dialog`.
|
|
54
|
+
*/
|
|
55
|
+
scrollable?: boolean;
|
|
40
56
|
/** Style overrides applied to the inner content container. */
|
|
41
57
|
style?: StyleProp<ViewStyle>;
|
|
42
58
|
/** Style overrides for the side/bottom placement panel surface. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAElG;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;;;;;OAMG;IACH,UAA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AAED,4EAA4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACvC;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACvC"}
|
|
@@ -3,8 +3,9 @@ import { type TextStyleProp, type ViewStyleProp } from '../styles';
|
|
|
3
3
|
import { type Props as SVGIconProps } from '../icons/common';
|
|
4
4
|
export type TextFieldProps = React.PropsWithChildren<{
|
|
5
5
|
isInvalid?: boolean;
|
|
6
|
+
radius?: number;
|
|
6
7
|
} & ViewStyleProp>;
|
|
7
|
-
export declare function TextField({ children, isInvalid, style }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TextField({ children, isInvalid, radius, style }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export declare function useSharedInputStyles(): {
|
|
9
10
|
chromeHover: ViewStyle;
|
|
10
11
|
chromeFocus: ViewStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/text-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAIvB,SAAS,EACT,KAAK,cAAc,EAGnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAkB,KAAK,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/text-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAIvB,SAAS,EACT,KAAK,cAAc,EAGnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAkB,KAAK,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAwC7E,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAClD;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CACzD,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAiB,EAAE,MAAW,EAAE,KAAK,EAAE,EAAE,cAAc,2CA2C5F;AAED,wBAAgB,oBAAoB;;;;;EA0BnC;AAED,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,cAAc,EACd,OAAO,GAAG,cAAc,GAAG,aAAa,CACzC,GAA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EAAE,MAAM,CAAC;CACf,2CAkDA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/bloom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -617,15 +617,15 @@
|
|
|
617
617
|
"default": "./lib/commonjs/segmented-control/index.js"
|
|
618
618
|
}
|
|
619
619
|
},
|
|
620
|
-
"./search
|
|
621
|
-
"react-native": "./src/search
|
|
620
|
+
"./search": {
|
|
621
|
+
"react-native": "./src/search/index.tsx",
|
|
622
622
|
"import": {
|
|
623
|
-
"types": "./lib/typescript/module/search
|
|
624
|
-
"default": "./lib/module/search
|
|
623
|
+
"types": "./lib/typescript/module/search/index.d.ts",
|
|
624
|
+
"default": "./lib/module/search/index.js"
|
|
625
625
|
},
|
|
626
626
|
"require": {
|
|
627
|
-
"types": "./lib/typescript/commonjs/search
|
|
628
|
-
"default": "./lib/commonjs/search
|
|
627
|
+
"types": "./lib/typescript/commonjs/search/index.d.ts",
|
|
628
|
+
"default": "./lib/commonjs/search/index.js"
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
631
|
"./admonition": {
|
|
@@ -1043,7 +1043,7 @@
|
|
|
1043
1043
|
"grid",
|
|
1044
1044
|
"text-field",
|
|
1045
1045
|
"segmented-control",
|
|
1046
|
-
"search
|
|
1046
|
+
"search",
|
|
1047
1047
|
"admonition",
|
|
1048
1048
|
"menu",
|
|
1049
1049
|
"tooltip",
|
|
@@ -248,6 +248,53 @@ describe('BottomSheet', () => {
|
|
|
248
248
|
});
|
|
249
249
|
});
|
|
250
250
|
|
|
251
|
+
describe('unmount-while-open does not fire onDismiss (responsive placement swap)', () => {
|
|
252
|
+
it('skips onDismiss when a fully-open sheet is unmounted (yanked, not closing)', () => {
|
|
253
|
+
// A responsive Dialog crossing its breakpoint swaps its bottom-sheet branch
|
|
254
|
+
// for the centered-card branch, unmounting this sheet while it is still
|
|
255
|
+
// fully OPEN. That is NOT a dismissal — firing onDismiss here would tear the
|
|
256
|
+
// surface down mid-swap. The unmount-safety only flushes when a close was
|
|
257
|
+
// already underway (visible=false).
|
|
258
|
+
const onDismiss = jest.fn();
|
|
259
|
+
const ref = createRef<BottomSheetRef>();
|
|
260
|
+
const { unmount } = renderWithTheme(
|
|
261
|
+
<BottomSheet ref={ref} onDismiss={onDismiss}>
|
|
262
|
+
<React.Fragment>Open content</React.Fragment>
|
|
263
|
+
</BottomSheet>,
|
|
264
|
+
);
|
|
265
|
+
act(() => {
|
|
266
|
+
ref.current?.present();
|
|
267
|
+
});
|
|
268
|
+
act(() => {
|
|
269
|
+
unmount();
|
|
270
|
+
});
|
|
271
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
it('still flushes onDismiss when unmounted mid-close (visible already false)', () => {
|
|
275
|
+
// The original guard's purpose: a sheet yanked mid-close-animation must
|
|
276
|
+
// still flush its onDismiss so queued post-close callbacks are not lost.
|
|
277
|
+
const onDismiss = jest.fn();
|
|
278
|
+
const ref = createRef<BottomSheetRef>();
|
|
279
|
+
const { unmount } = renderWithTheme(
|
|
280
|
+
<BottomSheet ref={ref} onDismiss={onDismiss}>
|
|
281
|
+
<React.Fragment>Closing content</React.Fragment>
|
|
282
|
+
</BottomSheet>,
|
|
283
|
+
);
|
|
284
|
+
act(() => {
|
|
285
|
+
ref.current?.present();
|
|
286
|
+
});
|
|
287
|
+
// Start the close (visible → false), then yank before the exit settles.
|
|
288
|
+
act(() => {
|
|
289
|
+
ref.current?.dismiss();
|
|
290
|
+
});
|
|
291
|
+
act(() => {
|
|
292
|
+
unmount();
|
|
293
|
+
});
|
|
294
|
+
expect(onDismiss).toHaveBeenCalledTimes(1);
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
|
|
251
298
|
describe('close generation tracking', () => {
|
|
252
299
|
it('re-opening the sheet after dismiss does not throw or get stuck', () => {
|
|
253
300
|
// Regression test for the "tap to open does nothing" bug: when the
|
|
@@ -206,7 +206,7 @@ describe('Dialog bottom placement delegates to BottomSheet', () => {
|
|
|
206
206
|
expect(flattened.padding).toBe(0);
|
|
207
207
|
});
|
|
208
208
|
|
|
209
|
-
it('
|
|
209
|
+
it('wraps pure custom children in the internal scroll container by default (Dialog owns scroll)', () => {
|
|
210
210
|
let control: ReturnType<typeof useDialogControl> | undefined;
|
|
211
211
|
const result = renderWithTheme(
|
|
212
212
|
<Harness>
|
|
@@ -214,7 +214,7 @@ describe('Dialog bottom placement delegates to BottomSheet', () => {
|
|
|
214
214
|
control = c;
|
|
215
215
|
return (
|
|
216
216
|
<Dialog control={c} placement="bottom">
|
|
217
|
-
<Text>Custom children
|
|
217
|
+
<Text>Custom children scroll inside the sheet by default</Text>
|
|
218
218
|
</Dialog>
|
|
219
219
|
);
|
|
220
220
|
}}
|
|
@@ -223,9 +223,34 @@ describe('Dialog bottom placement delegates to BottomSheet', () => {
|
|
|
223
223
|
act(() => {
|
|
224
224
|
control?.open();
|
|
225
225
|
});
|
|
226
|
-
// Pure custom children
|
|
227
|
-
//
|
|
228
|
-
//
|
|
226
|
+
// Pure custom children default to `scrollable` (undefined → true), so the
|
|
227
|
+
// sheet DOES add its internal ScrollView and the screen — stripped of its
|
|
228
|
+
// own scroller — scrolls inside it. The Dialog owns the scroll boundary.
|
|
229
|
+
const tree: RenderedNode | RenderedNode[] | null = result.toJSON();
|
|
230
|
+
expect(countNodesByType(tree, 'Animated.ScrollView')).toBe(1);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it('opts custom children OUT of the internal scroll container when scrollable={false}', () => {
|
|
234
|
+
let control: ReturnType<typeof useDialogControl> | undefined;
|
|
235
|
+
const result = renderWithTheme(
|
|
236
|
+
<Harness>
|
|
237
|
+
{(c) => {
|
|
238
|
+
control = c;
|
|
239
|
+
return (
|
|
240
|
+
<Dialog control={c} placement="bottom" scrollable={false}>
|
|
241
|
+
<Text>Owns its own FlatList</Text>
|
|
242
|
+
</Dialog>
|
|
243
|
+
);
|
|
244
|
+
}}
|
|
245
|
+
</Harness>,
|
|
246
|
+
);
|
|
247
|
+
act(() => {
|
|
248
|
+
control?.open();
|
|
249
|
+
});
|
|
250
|
+
// A surface whose content owns its own scroller (a FlatList / VirtualizedList)
|
|
251
|
+
// passes `scrollable={false}`, so the sheet does NOT add its internal
|
|
252
|
+
// ScrollView — the child is then the ONLY scroll container (no scroll-in-
|
|
253
|
+
// scroll, no "VirtualizedList inside a plain ScrollView" warning).
|
|
229
254
|
const tree: RenderedNode | RenderedNode[] | null = result.toJSON();
|
|
230
255
|
expect(countNodesByType(tree, 'Animated.ScrollView')).toBe(0);
|
|
231
256
|
});
|
|
@@ -55,6 +55,16 @@ export interface BottomSheetRef {
|
|
|
55
55
|
|
|
56
56
|
export interface BottomSheetProps {
|
|
57
57
|
children: React.ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* Controlled open state. When provided, the sheet mounts already-open if
|
|
60
|
+
* `true` (seeding its internal visible/rendered state) instead of relying on
|
|
61
|
+
* an imperative `present()` after mount. This is what makes a responsive
|
|
62
|
+
* `Dialog` survive a placement swap (centered card ↔ bottom sheet on resize):
|
|
63
|
+
* the freshly-mounted sheet is visible on its first commit, with no
|
|
64
|
+
* present()-in-effect race that would otherwise leave it blank. Omit for the
|
|
65
|
+
* purely imperative `present()`/`dismiss()` API.
|
|
66
|
+
*/
|
|
67
|
+
open?: boolean;
|
|
58
68
|
onDismiss?: () => void;
|
|
59
69
|
enablePanDownToClose?: boolean;
|
|
60
70
|
backgroundComponent?: (props: { style?: StyleProp<ViewStyle> }) => React.ReactElement | null;
|
|
@@ -128,6 +138,19 @@ export interface BottomSheetProps {
|
|
|
128
138
|
* `showHandle` is `true`.
|
|
129
139
|
*/
|
|
130
140
|
handleComponent?: () => React.ReactNode;
|
|
141
|
+
/**
|
|
142
|
+
* External shared value the internal scroll handler mirrors the content
|
|
143
|
+
* offset into (in addition to its own gesture-gating offset). Lets a host —
|
|
144
|
+
* e.g. a Dialog nav-header — drive a collapse from the sheet's OWN scroller
|
|
145
|
+
* without owning the ScrollView. Optional; the standalone sheet ignores it.
|
|
146
|
+
*/
|
|
147
|
+
scrollY?: SharedValue<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Overlay slot rendered absolutely at the TOP of the sheet card, painted
|
|
150
|
+
* above the scrolling body (clipped to the sheet's rounded top). Used by the
|
|
151
|
+
* Dialog to float its sticky nav header over the sheet's scroll content.
|
|
152
|
+
*/
|
|
153
|
+
headerOverlay?: React.ReactNode;
|
|
131
154
|
}
|
|
132
155
|
|
|
133
156
|
/**
|
|
@@ -169,6 +192,7 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
169
192
|
const {
|
|
170
193
|
Shell,
|
|
171
194
|
children,
|
|
195
|
+
open,
|
|
172
196
|
onDismiss,
|
|
173
197
|
enablePanDownToClose = true,
|
|
174
198
|
backgroundComponent,
|
|
@@ -183,14 +207,19 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
183
207
|
manualActivation = false,
|
|
184
208
|
dynamicBackdrop = false,
|
|
185
209
|
handleComponent,
|
|
210
|
+
scrollY: externalScrollY,
|
|
211
|
+
headerOverlay,
|
|
186
212
|
} = props;
|
|
187
213
|
|
|
188
214
|
const insets = useSafeAreaInsets();
|
|
189
215
|
const theme = useTheme();
|
|
190
216
|
const { colors } = theme;
|
|
191
217
|
const { height: screenHeight } = useScreenDimensions();
|
|
192
|
-
|
|
193
|
-
|
|
218
|
+
// Seed from the controlled `open` prop so a sheet that should be open is
|
|
219
|
+
// visible on its FIRST commit (no present()-in-effect race) — this is what
|
|
220
|
+
// lets a responsive Dialog survive a resize placement swap without going blank.
|
|
221
|
+
const [visible, setVisible] = useState(() => open ?? false);
|
|
222
|
+
const [rendered, setRendered] = useState(() => open ?? false); // keep mounted for exit animation
|
|
194
223
|
const closeTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
195
224
|
const hasClosedRef = useRef(false);
|
|
196
225
|
const scrollViewRef = useRef<Animated.ScrollView>(null);
|
|
@@ -266,6 +295,12 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
266
295
|
useEffect(() => {
|
|
267
296
|
renderedRef.current = rendered;
|
|
268
297
|
}, [rendered]);
|
|
298
|
+
// Mirror `visible` so the unmount cleanup can tell "closing" (visible=false,
|
|
299
|
+
// animating out) from "fully open" (visible=true) at teardown time.
|
|
300
|
+
const visibleRef = useRef(visible);
|
|
301
|
+
useEffect(() => {
|
|
302
|
+
visibleRef.current = visible;
|
|
303
|
+
}, [visible]);
|
|
269
304
|
|
|
270
305
|
/**
|
|
271
306
|
* Commit a close. Two guards prevent stale callbacks from firing:
|
|
@@ -325,18 +360,24 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
325
360
|
}, [visible, rendered, finishClose, screenHeight, closeGeneration, opacity, translateY]);
|
|
326
361
|
|
|
327
362
|
// On unmount: ensure pending close callbacks (e.g. consumer's `onDismiss`)
|
|
328
|
-
// still fire if the BS is yanked mid-animation by a parent re-render
|
|
329
|
-
// Without this, `Dialog`'s `handleDismiss` never runs
|
|
330
|
-
// callbacks (post-close handlers) are silently lost.
|
|
331
|
-
//
|
|
332
|
-
//
|
|
333
|
-
//
|
|
363
|
+
// still fire if the BS is yanked mid-animation by a parent re-render while a
|
|
364
|
+
// close is IN PROGRESS. Without this, `Dialog`'s `handleDismiss` never runs
|
|
365
|
+
// and queued callbacks (post-close handlers) are silently lost.
|
|
366
|
+
//
|
|
367
|
+
// Guarded on `!visibleRef.current`: only flush when a close was already
|
|
368
|
+
// underway (visible=false → closing/animating out). A sheet yanked while
|
|
369
|
+
// still FULLY OPEN (visible=true) is not closing — it is being swapped out by
|
|
370
|
+
// a parent, e.g. a responsive `Dialog` crossing its breakpoint between the
|
|
371
|
+
// bottom-sheet and centered-card branches. Firing onDismiss there would
|
|
372
|
+
// wrongly dismiss the surface mid-swap (there are no pending close callbacks
|
|
373
|
+
// to flush anyway), so the new branch can take over still-open. Refs are read
|
|
374
|
+
// inside the cleanup, so the latest values are captured.
|
|
334
375
|
useEffect(() => () => {
|
|
335
376
|
if (closeTimeoutRef.current) {
|
|
336
377
|
clearTimeout(closeTimeoutRef.current);
|
|
337
378
|
closeTimeoutRef.current = null;
|
|
338
379
|
}
|
|
339
|
-
if (renderedRef.current && !hasClosedRef.current) {
|
|
380
|
+
if (renderedRef.current && !hasClosedRef.current && !visibleRef.current) {
|
|
340
381
|
hasClosedRef.current = true;
|
|
341
382
|
safeCloseRef.current();
|
|
342
383
|
}
|
|
@@ -639,8 +680,12 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
639
680
|
onScroll: (event) => {
|
|
640
681
|
scrollOffsetY.value = event.contentOffset.y;
|
|
641
682
|
isScrollAtTop.value = event.contentOffset.y <= 0;
|
|
683
|
+
// Mirror into the host's collapse offset (a Dialog nav header) when
|
|
684
|
+
// provided. Listed in deps so the RN-Web (no worklets plugin) handler
|
|
685
|
+
// re-binds if the shared value identity changes.
|
|
686
|
+
if (externalScrollY) externalScrollY.value = event.contentOffset.y;
|
|
642
687
|
},
|
|
643
|
-
}, []);
|
|
688
|
+
}, [externalScrollY]);
|
|
644
689
|
|
|
645
690
|
const dynamicStyles = useMemo(() => {
|
|
646
691
|
return StyleSheet.create({
|
|
@@ -741,6 +786,10 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
741
786
|
{handleSlot}
|
|
742
787
|
|
|
743
788
|
{bodyContent}
|
|
789
|
+
|
|
790
|
+
{/* Sticky nav-header overlay (Dialog nav-header mode): floats
|
|
791
|
+
above the scroll body, clipped to the sheet's rounded top. */}
|
|
792
|
+
{headerOverlay}
|
|
744
793
|
</Animated.View>
|
|
745
794
|
</GestureDetector>
|
|
746
795
|
</View>
|
|
@@ -12,7 +12,7 @@ import { useTheme } from '../theme/use-theme';
|
|
|
12
12
|
import { useControllableState } from '../hooks/useControllableState';
|
|
13
13
|
import { Text } from '../typography';
|
|
14
14
|
import { Item } from '../item';
|
|
15
|
-
import {
|
|
15
|
+
import { Search } from '../search';
|
|
16
16
|
import { borderRadius, fontSize, space } from '../styles/tokens';
|
|
17
17
|
import {
|
|
18
18
|
ChevronTopBottom_Stroke2_Corner0_Rounded as ChevronUpDownIcon,
|
|
@@ -55,7 +55,7 @@ function defaultFilter<T>(option: ComboboxOption<T>, query: string): boolean {
|
|
|
55
55
|
* `.web` resolution. The combobox logic is single-source.
|
|
56
56
|
*
|
|
57
57
|
* `Combobox` is a filterable autocomplete select that delegates its overlay to
|
|
58
|
-
* Bloom's `Popover` and composes `
|
|
58
|
+
* Bloom's `Popover` and composes `Search` + `Item`. The trigger + panel
|
|
59
59
|
* read the overlay control from `Popover` context (via an inner component) so
|
|
60
60
|
* selecting an option reliably closes the overlay on every platform.
|
|
61
61
|
*/
|
|
@@ -153,7 +153,7 @@ export function createCombobox(PopoverImpl: PopoverModule) {
|
|
|
153
153
|
|
|
154
154
|
<PopoverImpl.PopoverContent label={accessibleLabel} placement="bottom-start" minWidth={240}>
|
|
155
155
|
<View style={styles.searchWrap}>
|
|
156
|
-
<
|
|
156
|
+
<Search
|
|
157
157
|
ref={searchRef}
|
|
158
158
|
label={label ?? 'Search'}
|
|
159
159
|
value={query}
|
package/src/command/Command.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import { useControllableState } from '../hooks/useControllableState';
|
|
|
12
12
|
import { Text } from '../typography';
|
|
13
13
|
import { Item } from '../item';
|
|
14
14
|
import { Kbd } from '../kbd';
|
|
15
|
-
import {
|
|
15
|
+
import { Search } from '../search';
|
|
16
16
|
import { fontSize, space } from '../styles/tokens';
|
|
17
17
|
import type { DialogProps } from '../dialog';
|
|
18
18
|
import { useDialogControl } from '../dialog/context';
|
|
@@ -46,7 +46,7 @@ interface FlatEntry {
|
|
|
46
46
|
* relies on implicit `.web` resolution. The body is single-source.
|
|
47
47
|
*
|
|
48
48
|
* `Command` is a ⌘K command palette built on `<Dialog placement="center">`,
|
|
49
|
-
* `
|
|
49
|
+
* `Search`, an `Item` results list and `Kbd` shortcut hints. Items group
|
|
50
50
|
* by their `group` field (ungrouped first). On web the list is
|
|
51
51
|
* keyboard-navigable (Up/Down/Enter); on native, tap to select.
|
|
52
52
|
*
|
|
@@ -231,7 +231,7 @@ export function createCommand(Dialog: DialogComponent) {
|
|
|
231
231
|
testID={testID}>
|
|
232
232
|
<View {...webKeyHandler}>
|
|
233
233
|
<View style={[styles.searchWrap, { borderBottomColor: theme.colors.borderLight }]}>
|
|
234
|
-
<
|
|
234
|
+
<Search
|
|
235
235
|
ref={searchRef}
|
|
236
236
|
label={placeholder}
|
|
237
237
|
placeholder={placeholder}
|