@oxy.so/bloom 2.1.0 → 2.3.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/README.md +3 -3
- package/docs/page-header.mdx +101 -0
- package/docs/sidebar.mdx +20 -0
- package/lib/commonjs/index.js +128 -116
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +128 -116
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +286 -0
- package/lib/commonjs/page-header/PageHeader.js.map +1 -0
- package/lib/commonjs/page-header/index.js +13 -0
- package/lib/commonjs/page-header/index.js.map +1 -0
- package/lib/commonjs/page-header/types.js +6 -0
- package/lib/commonjs/page-header/types.js.map +1 -0
- package/lib/commonjs/sidebar/Sidebar.js +15 -2
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarModeSwitcher.js +193 -0
- package/lib/commonjs/sidebar/SidebarModeSwitcher.js.map +1 -0
- package/lib/commonjs/sidebar/index.js +7 -0
- package/lib/commonjs/sidebar/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +281 -0
- package/lib/module/page-header/PageHeader.js.map +1 -0
- package/lib/module/page-header/index.js +4 -0
- package/lib/module/page-header/index.js.map +1 -0
- package/lib/module/page-header/types.js +4 -0
- package/lib/module/page-header/types.js.map +1 -0
- package/lib/module/sidebar/Sidebar.js +15 -2
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/sidebar/SidebarModeSwitcher.js +188 -0
- package/lib/module/sidebar/SidebarModeSwitcher.js.map +1 -0
- package/lib/module/sidebar/index.js +1 -0
- package/lib/module/sidebar/index.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts +6 -0
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/page-header/index.d.ts +3 -0
- package/lib/typescript/commonjs/page-header/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/page-header/types.d.ts +55 -0
- package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/SidebarModeSwitcher.d.ts +4 -0
- package/lib/typescript/commonjs/sidebar/SidebarModeSwitcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/sidebar/index.d.ts +2 -1
- package/lib/typescript/commonjs/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts +30 -0
- package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +1 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts +6 -0
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -0
- package/lib/typescript/module/page-header/index.d.ts +3 -0
- package/lib/typescript/module/page-header/index.d.ts.map +1 -0
- package/lib/typescript/module/page-header/types.d.ts +55 -0
- package/lib/typescript/module/page-header/types.d.ts.map +1 -0
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/SidebarModeSwitcher.d.ts +4 -0
- package/lib/typescript/module/sidebar/SidebarModeSwitcher.d.ts.map +1 -0
- package/lib/typescript/module/sidebar/index.d.ts +2 -1
- package/lib/typescript/module/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/types.d.ts +30 -0
- package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
- package/package.json +15 -1
- package/src/index.ts +1 -0
- package/src/index.web.ts +1 -0
- package/src/page-header/PageHeader.tsx +319 -0
- package/src/page-header/index.ts +3 -0
- package/src/page-header/types.ts +62 -0
- package/src/sidebar/Sidebar.tsx +19 -0
- package/src/sidebar/SidebarModeSwitcher.tsx +183 -0
- package/src/sidebar/index.ts +3 -0
- package/src/sidebar/types.ts +32 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
/** Where the title sits: after the back button, or centred on the bar. */
|
|
5
|
+
export type PageHeaderTitleAlign = 'start' | 'center';
|
|
6
|
+
/**
|
|
7
|
+
* The bottom separator: `auto` fades it in once the page has scrolled past
|
|
8
|
+
* `scrollThreshold`, `always` draws it at rest, `none` never draws it.
|
|
9
|
+
*/
|
|
10
|
+
export type PageHeaderBorder = 'auto' | 'always' | 'none';
|
|
11
|
+
export interface PageHeaderProps {
|
|
12
|
+
/** A string renders as the heading; a node renders as-is (and owns its own semantics). */
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/** A string renders as a secondary line under the title; a node renders as-is. */
|
|
15
|
+
subtitle?: ReactNode;
|
|
16
|
+
/** Default `start`. */
|
|
17
|
+
titleAlign?: PageHeaderTitleAlign;
|
|
18
|
+
/** The title's heading level. Default 1. */
|
|
19
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
20
|
+
/**
|
|
21
|
+
* Renders the back button and is called when it is pressed. The header is
|
|
22
|
+
* router-agnostic: pass `router.back`, or your app's safe-back helper.
|
|
23
|
+
*/
|
|
24
|
+
onBack?: () => void;
|
|
25
|
+
/** The back button's accessible name. Default "Back". */
|
|
26
|
+
backLabel?: string;
|
|
27
|
+
/** Rendered after the back button, before the title (an avatar, a logo). */
|
|
28
|
+
leading?: ReactNode;
|
|
29
|
+
/** Rendered at the end of the bar, 10 apart — typically Bloom `Button`s. */
|
|
30
|
+
actions?: ReactNode;
|
|
31
|
+
/** Default `auto`. */
|
|
32
|
+
border?: PageHeaderBorder;
|
|
33
|
+
/**
|
|
34
|
+
* The bar's background, shadow and title fade in with scroll instead of
|
|
35
|
+
* showing at rest — for a header over media. The back button and actions
|
|
36
|
+
* stay visible (their own fill reads over any image).
|
|
37
|
+
*/
|
|
38
|
+
transparent?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The scroll offset driving `border="auto"`, `transparent` and the shadow.
|
|
41
|
+
* Pass it from a Reanimated scroll handler on native or for any scroll
|
|
42
|
+
* container. Omitted on web, the header follows `window.scrollY`; omitted on
|
|
43
|
+
* native, the header stays at rest.
|
|
44
|
+
*/
|
|
45
|
+
scrollY?: SharedValue<number>;
|
|
46
|
+
/** The offset (px) over which border, background and shadow fade in. Default 20. */
|
|
47
|
+
scrollThreshold?: number;
|
|
48
|
+
/** Web only: pin the bar to the top of its scroll container. Default true. */
|
|
49
|
+
sticky?: boolean;
|
|
50
|
+
/** Pad the top by the safe-area inset. Default true on native, false on web. */
|
|
51
|
+
safeArea?: boolean;
|
|
52
|
+
style?: StyleProp<ViewStyle>;
|
|
53
|
+
testID?: string;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/page-header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uBAAuB;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAErC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,sBAAsB;IACtB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AAoCvF,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAsmB5D,eAAO,MAAM,OAAO,0CAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarModeSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/SidebarModeSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAkB/C,OAAO,KAAK,EAAe,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmKrE,eAAO,MAAM,mBAAmB,sDAAqC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { Sidebar } from './Sidebar';
|
|
2
2
|
export { SidebarFolder } from './SidebarFolder';
|
|
3
3
|
export { SidebarItem } from './SidebarItem';
|
|
4
|
+
export { SidebarModeSwitcher } from './SidebarModeSwitcher';
|
|
4
5
|
export { SidebarPlanCard } from './SidebarPlanCard';
|
|
5
6
|
export { SIDEBAR_RAIL_WIDTH } from './SidebarRail';
|
|
6
7
|
export { SidebarRailItem } from './SidebarRailItem';
|
|
7
8
|
export { SidebarTeamMenu } from './SidebarTeamMenu';
|
|
8
9
|
export { SidebarAccountMenuContent, SidebarUserMenu } from './SidebarUserMenu';
|
|
9
|
-
export type { SidebarAccount, SidebarAccountUser, SidebarAvatar, SidebarAvatarColor, SidebarFolderProps, SidebarIcon, SidebarItemProps, SidebarMenuGroup, SidebarMenuItem, SidebarNavItem, SidebarPlan, SidebarPlanCardProps, SidebarProps, SidebarRailItemProps, SidebarTeam, SidebarTeamMenuProps, SidebarTree, SidebarTreeFolder, SidebarTreeItem, SidebarUserMenuProps, SidebarVariant, } from './types';
|
|
10
|
+
export type { SidebarAccount, SidebarAccountUser, SidebarAvatar, SidebarAvatarColor, SidebarFolderProps, SidebarIcon, SidebarItemProps, SidebarMenuGroup, SidebarMenuItem, SidebarMode, SidebarModeSwitcherProps, SidebarNavItem, SidebarPlan, SidebarPlanCardProps, SidebarProps, SidebarRailItemProps, SidebarTeam, SidebarTeamMenuProps, SidebarTree, SidebarTreeFolder, SidebarTreeItem, SidebarUserMenuProps, SidebarVariant, } from './types';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/E,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/E,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -34,6 +34,26 @@ export interface SidebarNavItem {
|
|
|
34
34
|
*/
|
|
35
35
|
onPress?: () => void;
|
|
36
36
|
}
|
|
37
|
+
/** One mode of a {@link SidebarModeSwitcherProps.modes} switcher. */
|
|
38
|
+
export interface SidebarMode {
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
icon: SidebarIcon;
|
|
42
|
+
/** A shortcut hint shown on hover (web), e.g. `⌥⌃1`. */
|
|
43
|
+
shortcut?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface SidebarModeSwitcherProps {
|
|
46
|
+
modes: ReadonlyArray<SidebarMode>;
|
|
47
|
+
/** Key of the selected mode. */
|
|
48
|
+
value: string;
|
|
49
|
+
onValueChange: (key: string) => void;
|
|
50
|
+
/** Collapses the labels and hints, leaving the icons. */
|
|
51
|
+
collapsed?: boolean;
|
|
52
|
+
/** The radio group's accessible name. Defaults to `"Mode"`. */
|
|
53
|
+
accessibilityLabel?: string;
|
|
54
|
+
style?: StyleProp<ViewStyle>;
|
|
55
|
+
testID?: string;
|
|
56
|
+
}
|
|
37
57
|
export interface SidebarItemProps {
|
|
38
58
|
icon: SidebarIcon;
|
|
39
59
|
label: string;
|
|
@@ -135,6 +155,16 @@ export interface SidebarProps {
|
|
|
135
155
|
variant?: SidebarVariant;
|
|
136
156
|
/** Primary navigation rows. */
|
|
137
157
|
items?: SidebarNavItem[];
|
|
158
|
+
/**
|
|
159
|
+
* A mode switcher under the header (Search / Computer): a vertical segmented
|
|
160
|
+
* control of icon + label rows. Rendered when given; see `SidebarModeSwitcher`.
|
|
161
|
+
*/
|
|
162
|
+
modes?: ReadonlyArray<SidebarMode>;
|
|
163
|
+
/** Key of the selected mode. */
|
|
164
|
+
mode?: string;
|
|
165
|
+
onModeChange?: (key: string) => void;
|
|
166
|
+
/** The mode group's accessible name. Defaults to `"Mode"`. */
|
|
167
|
+
modesLabel?: string;
|
|
138
168
|
/** Rows pinned to the bottom above the team card (Support, Settings). */
|
|
139
169
|
secondaryItems?: SidebarNavItem[];
|
|
140
170
|
/** Key of the selected row. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,uDAAuD;AACvD,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5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CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,CAAC;IAClB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/bloom",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -590,6 +590,20 @@
|
|
|
590
590
|
"default": "./lib/commonjs/app-shell/index.js"
|
|
591
591
|
}
|
|
592
592
|
},
|
|
593
|
+
"./page-header": {
|
|
594
|
+
"react-native": {
|
|
595
|
+
"types": "./lib/typescript/module/page-header/index.d.ts",
|
|
596
|
+
"default": "./src/page-header/index.ts"
|
|
597
|
+
},
|
|
598
|
+
"import": {
|
|
599
|
+
"types": "./lib/typescript/module/page-header/index.d.ts",
|
|
600
|
+
"default": "./lib/module/page-header/index.js"
|
|
601
|
+
},
|
|
602
|
+
"require": {
|
|
603
|
+
"types": "./lib/typescript/commonjs/page-header/index.d.ts",
|
|
604
|
+
"default": "./lib/commonjs/page-header/index.js"
|
|
605
|
+
}
|
|
606
|
+
},
|
|
593
607
|
"./notification-center": {
|
|
594
608
|
"react-native": {
|
|
595
609
|
"types": "./lib/typescript/module/notification-center/index.d.ts",
|
package/src/index.ts
CHANGED
|
@@ -187,6 +187,7 @@ export * from './important-alerts-card';
|
|
|
187
187
|
export * from './patient-info-card';
|
|
188
188
|
export * from './sidebar';
|
|
189
189
|
export * from './app-shell';
|
|
190
|
+
export * from './page-header';
|
|
190
191
|
export * from './notification-center';
|
|
191
192
|
export * from './theme-toggle';
|
|
192
193
|
export * from './settings-modal';
|
package/src/index.web.ts
CHANGED
|
@@ -192,6 +192,7 @@ export * from './important-alerts-card';
|
|
|
192
192
|
export * from './patient-info-card';
|
|
193
193
|
export * from './sidebar';
|
|
194
194
|
export * from './app-shell';
|
|
195
|
+
export * from './page-header';
|
|
195
196
|
export * from './notification-center';
|
|
196
197
|
export * from './theme-toggle';
|
|
197
198
|
export * from './settings-modal';
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import React, { memo, useContext, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Platform,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
View,
|
|
6
|
+
useWindowDimensions,
|
|
7
|
+
type LayoutChangeEvent,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import Animated, {
|
|
10
|
+
Extrapolation,
|
|
11
|
+
interpolate,
|
|
12
|
+
useAnimatedStyle,
|
|
13
|
+
useSharedValue,
|
|
14
|
+
} from 'react-native-reanimated';
|
|
15
|
+
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
16
|
+
|
|
17
|
+
import { Button } from '../button';
|
|
18
|
+
import { BUTTON_SHADOW, mixColor, resolveButtonRamps } from '../button/shared';
|
|
19
|
+
import { RiArrowLeftLine } from '../icons/remix';
|
|
20
|
+
import { BREAKPOINTS } from '../styles/breakpoints';
|
|
21
|
+
import { WEB_POSITION_STICKY, type WebCssStyle } from '../styles/web-view-style';
|
|
22
|
+
import { Z_INDEX } from '../styles/z-index';
|
|
23
|
+
import { useTheme } from '../theme/use-theme';
|
|
24
|
+
import { Text } from '../typography';
|
|
25
|
+
import type { PageHeaderProps } from './types';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* `PageHeader`: a screen's top bar — back button, title (+ subtitle), leading
|
|
29
|
+
* node and actions, composed from the vocabulary Bloom's template headers and
|
|
30
|
+
* the settings modal's compact header use:
|
|
31
|
+
*
|
|
32
|
+
* bar min-height 56, side inset 16 (below `sm`) / 24, gap 8
|
|
33
|
+
* back secondary medium icon button (36, pill, shadow-xs), RiArrowLeftLine 20
|
|
34
|
+
* start group gap 6 (template header `gap-1.5`)
|
|
35
|
+
* title headline-medium, text-primary, px 4 (template `px-1`), one line
|
|
36
|
+
* subtitle body-2-regular, text-secondary (neutral-500), one line
|
|
37
|
+
* actions gap 10 (template `gap-2.5`)
|
|
38
|
+
* background background/full — card / dark neutral-925
|
|
39
|
+
* separator 1px separator-border — neutral-200 / dark neutral-800
|
|
40
|
+
* shadow shadow-xs, fading in with scroll
|
|
41
|
+
*
|
|
42
|
+
* Scroll-linked, not timed: border (`auto`), background (`transparent`) and
|
|
43
|
+
* shadow (and, when `transparent`, the title) interpolate over `[0, scrollThreshold]` of `scrollY` — the caller's
|
|
44
|
+
* shared value, else `window.scrollY` on web. No press scale.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
const BAR_HEIGHT = 56;
|
|
48
|
+
const INSET_COMPACT = 16;
|
|
49
|
+
const INSET_WIDE = 24;
|
|
50
|
+
const START_GAP = 6;
|
|
51
|
+
const ROW_GAP = 8;
|
|
52
|
+
const ACTIONS_GAP = 10;
|
|
53
|
+
const TITLE_PADDING = 4;
|
|
54
|
+
const DEFAULT_THRESHOLD = 20;
|
|
55
|
+
|
|
56
|
+
const NO_INSETS = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
57
|
+
|
|
58
|
+
function PageHeaderComponent({
|
|
59
|
+
title,
|
|
60
|
+
subtitle,
|
|
61
|
+
titleAlign = 'start',
|
|
62
|
+
headingLevel = 1,
|
|
63
|
+
onBack,
|
|
64
|
+
backLabel = 'Back',
|
|
65
|
+
leading,
|
|
66
|
+
actions,
|
|
67
|
+
border = 'auto',
|
|
68
|
+
transparent = false,
|
|
69
|
+
scrollY: externalScrollY,
|
|
70
|
+
scrollThreshold = DEFAULT_THRESHOLD,
|
|
71
|
+
sticky = true,
|
|
72
|
+
safeArea,
|
|
73
|
+
style,
|
|
74
|
+
testID,
|
|
75
|
+
}: PageHeaderProps) {
|
|
76
|
+
const isWeb = Platform.OS === 'web';
|
|
77
|
+
const theme = useTheme();
|
|
78
|
+
const { width } = useWindowDimensions();
|
|
79
|
+
const insets = useContext(SafeAreaInsetsContext) ?? NO_INSETS;
|
|
80
|
+
const padTop = (safeArea ?? !isWeb) ? insets.top : 0;
|
|
81
|
+
const sideInset = width >= BREAKPOINTS.sm ? INSET_WIDE : INSET_COMPACT;
|
|
82
|
+
|
|
83
|
+
const paint = useMemo(() => {
|
|
84
|
+
const { neutral } = resolveButtonRamps(theme);
|
|
85
|
+
return theme.isDark
|
|
86
|
+
? {
|
|
87
|
+
background: mixColor(neutral[900], neutral[950], 0.4),
|
|
88
|
+
separator: neutral[800],
|
|
89
|
+
textSecondary: neutral[500],
|
|
90
|
+
shadow: BUTTON_SHADOW.dark,
|
|
91
|
+
}
|
|
92
|
+
: {
|
|
93
|
+
background: theme.colors.card,
|
|
94
|
+
separator: neutral[200],
|
|
95
|
+
textSecondary: neutral[500],
|
|
96
|
+
shadow: BUTTON_SHADOW.light,
|
|
97
|
+
};
|
|
98
|
+
}, [theme]);
|
|
99
|
+
|
|
100
|
+
const internalScrollY = useSharedValue(0);
|
|
101
|
+
const scrollY = externalScrollY ?? internalScrollY;
|
|
102
|
+
|
|
103
|
+
// Web fallback: the document is the scroll owner, as in the fleet headers.
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (!isWeb || externalScrollY || typeof window === 'undefined') return undefined;
|
|
106
|
+
const onScroll = () => {
|
|
107
|
+
internalScrollY.value = window.scrollY;
|
|
108
|
+
};
|
|
109
|
+
onScroll();
|
|
110
|
+
window.addEventListener('scroll', onScroll, { passive: true });
|
|
111
|
+
return () => window.removeEventListener('scroll', onScroll);
|
|
112
|
+
}, [isWeb, externalScrollY, internalScrollY]);
|
|
113
|
+
|
|
114
|
+
const threshold = Math.max(1, scrollThreshold);
|
|
115
|
+
|
|
116
|
+
const shadowStyle = useAnimatedStyle(() => ({
|
|
117
|
+
opacity: interpolate(scrollY.value, [0, threshold], [0, 1], Extrapolation.CLAMP),
|
|
118
|
+
}), [scrollY, threshold]);
|
|
119
|
+
|
|
120
|
+
const backgroundStyle = useAnimatedStyle(() => ({
|
|
121
|
+
opacity: transparent
|
|
122
|
+
? interpolate(scrollY.value, [0, threshold], [0, 1], Extrapolation.CLAMP)
|
|
123
|
+
: 1,
|
|
124
|
+
}), [scrollY, threshold, transparent]);
|
|
125
|
+
|
|
126
|
+
// Over media the title would sit on the photo; it arrives with the bar.
|
|
127
|
+
const titleStyle = useAnimatedStyle(() => ({
|
|
128
|
+
opacity: transparent
|
|
129
|
+
? interpolate(scrollY.value, [0, threshold], [0, 1], Extrapolation.CLAMP)
|
|
130
|
+
: 1,
|
|
131
|
+
}), [scrollY, threshold, transparent]);
|
|
132
|
+
|
|
133
|
+
const borderStyle = useAnimatedStyle(() => ({
|
|
134
|
+
opacity:
|
|
135
|
+
border === 'always'
|
|
136
|
+
? 1
|
|
137
|
+
: border === 'none'
|
|
138
|
+
? 0
|
|
139
|
+
: interpolate(scrollY.value, [0, threshold], [0, 1], Extrapolation.CLAMP),
|
|
140
|
+
}), [scrollY, threshold, border]);
|
|
141
|
+
|
|
142
|
+
// Centred title: inset it by the wider side so it sits on the bar's centre
|
|
143
|
+
// whatever the two sides hold.
|
|
144
|
+
const [startWidth, setStartWidth] = useState(0);
|
|
145
|
+
const [endWidth, setEndWidth] = useState(0);
|
|
146
|
+
const centered = titleAlign === 'center';
|
|
147
|
+
const onStartLayout = (e: LayoutChangeEvent) => setStartWidth(e.nativeEvent.layout.width);
|
|
148
|
+
const onEndLayout = (e: LayoutChangeEvent) => setEndWidth(e.nativeEvent.layout.width);
|
|
149
|
+
const centerInset = Math.max(startWidth, endWidth) + ROW_GAP;
|
|
150
|
+
|
|
151
|
+
const titleBlock =
|
|
152
|
+
title != null || subtitle != null ? (
|
|
153
|
+
<Animated.View
|
|
154
|
+
style={[
|
|
155
|
+
styles.titleBlock,
|
|
156
|
+
centered ? styles.titleBlockCentered : styles.titleBlockStart,
|
|
157
|
+
titleStyle,
|
|
158
|
+
]}
|
|
159
|
+
testID={testID ? `${testID}-title-block` : undefined}
|
|
160
|
+
>
|
|
161
|
+
{typeof title === 'string' || typeof title === 'number' ? (
|
|
162
|
+
<Text
|
|
163
|
+
role="heading"
|
|
164
|
+
aria-level={headingLevel}
|
|
165
|
+
variant="headline-medium"
|
|
166
|
+
numberOfLines={1}
|
|
167
|
+
style={{ color: theme.colors.text, textAlign: centered ? 'center' : 'left' }}
|
|
168
|
+
testID={testID ? `${testID}-title` : undefined}
|
|
169
|
+
>
|
|
170
|
+
{title}
|
|
171
|
+
</Text>
|
|
172
|
+
) : (
|
|
173
|
+
title
|
|
174
|
+
)}
|
|
175
|
+
{typeof subtitle === 'string' || typeof subtitle === 'number' ? (
|
|
176
|
+
<Text
|
|
177
|
+
variant="body-2-regular"
|
|
178
|
+
numberOfLines={1}
|
|
179
|
+
style={{ color: paint.textSecondary, textAlign: centered ? 'center' : 'left' }}
|
|
180
|
+
testID={testID ? `${testID}-subtitle` : undefined}
|
|
181
|
+
>
|
|
182
|
+
{subtitle}
|
|
183
|
+
</Text>
|
|
184
|
+
) : (
|
|
185
|
+
subtitle
|
|
186
|
+
)}
|
|
187
|
+
</Animated.View>
|
|
188
|
+
) : null;
|
|
189
|
+
|
|
190
|
+
const containerWeb: WebCssStyle | null =
|
|
191
|
+
isWeb && sticky ? { position: WEB_POSITION_STICKY, top: 0, zIndex: Z_INDEX.floating } : null;
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<View
|
|
195
|
+
testID={testID}
|
|
196
|
+
style={[styles.container, { paddingTop: padTop }, containerWeb, style]}
|
|
197
|
+
>
|
|
198
|
+
<Animated.View
|
|
199
|
+
pointerEvents="none"
|
|
200
|
+
style={[StyleSheet.absoluteFill, { boxShadow: paint.shadow }, shadowStyle]}
|
|
201
|
+
testID={testID ? `${testID}-shadow` : undefined}
|
|
202
|
+
/>
|
|
203
|
+
<Animated.View
|
|
204
|
+
pointerEvents="none"
|
|
205
|
+
style={[StyleSheet.absoluteFill, { backgroundColor: paint.background }, backgroundStyle]}
|
|
206
|
+
testID={testID ? `${testID}-background` : undefined}
|
|
207
|
+
/>
|
|
208
|
+
<Animated.View
|
|
209
|
+
pointerEvents="none"
|
|
210
|
+
style={[styles.border, { backgroundColor: paint.separator }, borderStyle]}
|
|
211
|
+
testID={testID ? `${testID}-border` : undefined}
|
|
212
|
+
/>
|
|
213
|
+
<View
|
|
214
|
+
style={[styles.bar, { paddingLeft: sideInset, paddingRight: sideInset }]}
|
|
215
|
+
testID={testID ? `${testID}-bar` : undefined}
|
|
216
|
+
>
|
|
217
|
+
<View
|
|
218
|
+
style={[styles.start, !centered && styles.startFill]}
|
|
219
|
+
onLayout={centered ? onStartLayout : undefined}
|
|
220
|
+
testID={testID ? `${testID}-start` : undefined}
|
|
221
|
+
>
|
|
222
|
+
{onBack ? (
|
|
223
|
+
<Button
|
|
224
|
+
variant="secondary"
|
|
225
|
+
size="medium"
|
|
226
|
+
iconOnly
|
|
227
|
+
leadingIcon={RiArrowLeftLine}
|
|
228
|
+
accessibilityLabel={backLabel}
|
|
229
|
+
onPress={onBack}
|
|
230
|
+
testID={testID ? `${testID}-back` : undefined}
|
|
231
|
+
/>
|
|
232
|
+
) : null}
|
|
233
|
+
{leading}
|
|
234
|
+
{centered ? null : titleBlock}
|
|
235
|
+
</View>
|
|
236
|
+
{centered ? <View style={styles.spacer} /> : null}
|
|
237
|
+
{actions ? (
|
|
238
|
+
<View
|
|
239
|
+
style={styles.actions}
|
|
240
|
+
onLayout={centered ? onEndLayout : undefined}
|
|
241
|
+
testID={testID ? `${testID}-actions` : undefined}
|
|
242
|
+
>
|
|
243
|
+
{actions}
|
|
244
|
+
</View>
|
|
245
|
+
) : null}
|
|
246
|
+
{centered && titleBlock ? (
|
|
247
|
+
<View
|
|
248
|
+
pointerEvents="box-none"
|
|
249
|
+
style={[styles.centerSlot, { left: sideInset + centerInset, right: sideInset + centerInset }]}
|
|
250
|
+
testID={testID ? `${testID}-center` : undefined}
|
|
251
|
+
>
|
|
252
|
+
{titleBlock}
|
|
253
|
+
</View>
|
|
254
|
+
) : null}
|
|
255
|
+
</View>
|
|
256
|
+
</View>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const styles = StyleSheet.create({
|
|
261
|
+
container: {
|
|
262
|
+
width: '100%',
|
|
263
|
+
position: 'relative',
|
|
264
|
+
},
|
|
265
|
+
border: {
|
|
266
|
+
position: 'absolute',
|
|
267
|
+
left: 0,
|
|
268
|
+
right: 0,
|
|
269
|
+
bottom: 0,
|
|
270
|
+
height: 1,
|
|
271
|
+
},
|
|
272
|
+
bar: {
|
|
273
|
+
minHeight: BAR_HEIGHT,
|
|
274
|
+
flexDirection: 'row',
|
|
275
|
+
alignItems: 'center',
|
|
276
|
+
gap: ROW_GAP,
|
|
277
|
+
paddingTop: 8,
|
|
278
|
+
paddingBottom: 8,
|
|
279
|
+
},
|
|
280
|
+
start: {
|
|
281
|
+
flexDirection: 'row',
|
|
282
|
+
alignItems: 'center',
|
|
283
|
+
gap: START_GAP,
|
|
284
|
+
minWidth: 0,
|
|
285
|
+
},
|
|
286
|
+
startFill: {
|
|
287
|
+
flex: 1,
|
|
288
|
+
},
|
|
289
|
+
spacer: {
|
|
290
|
+
flex: 1,
|
|
291
|
+
},
|
|
292
|
+
titleBlock: {
|
|
293
|
+
minWidth: 0,
|
|
294
|
+
paddingLeft: TITLE_PADDING,
|
|
295
|
+
paddingRight: TITLE_PADDING,
|
|
296
|
+
},
|
|
297
|
+
titleBlockStart: {
|
|
298
|
+
flex: 1,
|
|
299
|
+
},
|
|
300
|
+
titleBlockCentered: {
|
|
301
|
+
alignItems: 'center',
|
|
302
|
+
},
|
|
303
|
+
centerSlot: {
|
|
304
|
+
position: 'absolute',
|
|
305
|
+
top: 0,
|
|
306
|
+
bottom: 0,
|
|
307
|
+
justifyContent: 'center',
|
|
308
|
+
},
|
|
309
|
+
actions: {
|
|
310
|
+
flexDirection: 'row',
|
|
311
|
+
alignItems: 'center',
|
|
312
|
+
justifyContent: 'flex-end',
|
|
313
|
+
gap: ACTIONS_GAP,
|
|
314
|
+
flexShrink: 0,
|
|
315
|
+
},
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
export const PageHeader = memo(PageHeaderComponent);
|
|
319
|
+
PageHeader.displayName = 'PageHeader';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
/** Where the title sits: after the back button, or centred on the bar. */
|
|
6
|
+
export type PageHeaderTitleAlign = 'start' | 'center';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The bottom separator: `auto` fades it in once the page has scrolled past
|
|
10
|
+
* `scrollThreshold`, `always` draws it at rest, `none` never draws it.
|
|
11
|
+
*/
|
|
12
|
+
export type PageHeaderBorder = 'auto' | 'always' | 'none';
|
|
13
|
+
|
|
14
|
+
export interface PageHeaderProps {
|
|
15
|
+
/** A string renders as the heading; a node renders as-is (and owns its own semantics). */
|
|
16
|
+
title?: ReactNode;
|
|
17
|
+
/** A string renders as a secondary line under the title; a node renders as-is. */
|
|
18
|
+
subtitle?: ReactNode;
|
|
19
|
+
/** Default `start`. */
|
|
20
|
+
titleAlign?: PageHeaderTitleAlign;
|
|
21
|
+
/** The title's heading level. Default 1. */
|
|
22
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Renders the back button and is called when it is pressed. The header is
|
|
26
|
+
* router-agnostic: pass `router.back`, or your app's safe-back helper.
|
|
27
|
+
*/
|
|
28
|
+
onBack?: () => void;
|
|
29
|
+
/** The back button's accessible name. Default "Back". */
|
|
30
|
+
backLabel?: string;
|
|
31
|
+
|
|
32
|
+
/** Rendered after the back button, before the title (an avatar, a logo). */
|
|
33
|
+
leading?: ReactNode;
|
|
34
|
+
/** Rendered at the end of the bar, 10 apart — typically Bloom `Button`s. */
|
|
35
|
+
actions?: ReactNode;
|
|
36
|
+
|
|
37
|
+
/** Default `auto`. */
|
|
38
|
+
border?: PageHeaderBorder;
|
|
39
|
+
/**
|
|
40
|
+
* The bar's background, shadow and title fade in with scroll instead of
|
|
41
|
+
* showing at rest — for a header over media. The back button and actions
|
|
42
|
+
* stay visible (their own fill reads over any image).
|
|
43
|
+
*/
|
|
44
|
+
transparent?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The scroll offset driving `border="auto"`, `transparent` and the shadow.
|
|
47
|
+
* Pass it from a Reanimated scroll handler on native or for any scroll
|
|
48
|
+
* container. Omitted on web, the header follows `window.scrollY`; omitted on
|
|
49
|
+
* native, the header stays at rest.
|
|
50
|
+
*/
|
|
51
|
+
scrollY?: SharedValue<number>;
|
|
52
|
+
/** The offset (px) over which border, background and shadow fade in. Default 20. */
|
|
53
|
+
scrollThreshold?: number;
|
|
54
|
+
|
|
55
|
+
/** Web only: pin the bar to the top of its scroll container. Default true. */
|
|
56
|
+
sticky?: boolean;
|
|
57
|
+
/** Pad the top by the safe-area inset. Default true on native, false on web. */
|
|
58
|
+
safeArea?: boolean;
|
|
59
|
+
|
|
60
|
+
style?: StyleProp<ViewStyle>;
|
|
61
|
+
testID?: string;
|
|
62
|
+
}
|
package/src/sidebar/Sidebar.tsx
CHANGED
|
@@ -29,6 +29,7 @@ import { useSidebarPalette, type SidebarPalette } from './palette';
|
|
|
29
29
|
import { Collapsible, CollapseProvider, IS_WEB, MORPH_MS, useSidebarWebCss } from './parts';
|
|
30
30
|
import { SidebarFolder } from './SidebarFolder';
|
|
31
31
|
import { SidebarItem } from './SidebarItem';
|
|
32
|
+
import { SidebarModeSwitcher } from './SidebarModeSwitcher';
|
|
32
33
|
import { SidebarPlanCard } from './SidebarPlanCard';
|
|
33
34
|
import { SidebarRail } from './SidebarRail';
|
|
34
35
|
import { SidebarTeamMenu } from './SidebarTeamMenu';
|
|
@@ -132,6 +133,10 @@ function SearchField({
|
|
|
132
133
|
const SidebarPanel: React.FC<SidebarProps> = ({
|
|
133
134
|
items = [],
|
|
134
135
|
secondaryItems = [],
|
|
136
|
+
modes,
|
|
137
|
+
mode,
|
|
138
|
+
onModeChange,
|
|
139
|
+
modesLabel,
|
|
135
140
|
selected,
|
|
136
141
|
onNavigate,
|
|
137
142
|
collapsed: collapsedProp,
|
|
@@ -459,6 +464,18 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
459
464
|
shownItems.length === 0 && shownSecondary.length === 0 && shownFolders.length === 0 && !collapsed;
|
|
460
465
|
const hasTree = !!tree;
|
|
461
466
|
|
|
467
|
+
const modeSwitcher =
|
|
468
|
+
modes && modes.length > 0 ? (
|
|
469
|
+
<SidebarModeSwitcher
|
|
470
|
+
modes={modes}
|
|
471
|
+
value={mode ?? modes[0]!.key}
|
|
472
|
+
onValueChange={(key) => onModeChange?.(key)}
|
|
473
|
+
collapsed={collapsed}
|
|
474
|
+
accessibilityLabel={modesLabel}
|
|
475
|
+
testID={testID ? `${testID}-modes` : 'sidebar-modes'}
|
|
476
|
+
/>
|
|
477
|
+
) : null;
|
|
478
|
+
|
|
462
479
|
const headerRow = (
|
|
463
480
|
<View
|
|
464
481
|
style={
|
|
@@ -521,6 +538,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
521
538
|
// 24 between the primary rows and the tree section.
|
|
522
539
|
<View style={{ width: '100%', minHeight: 0, flexShrink: 1, gap: 12 }}>
|
|
523
540
|
{headerRow}
|
|
541
|
+
{modeSwitcher}
|
|
524
542
|
{showSearch && !flat ? searchButton : null}
|
|
525
543
|
<ScrollView
|
|
526
544
|
{...(IS_WEB ? { dataSet: { bloomSidebarScroll: 'none' } } : {})}
|
|
@@ -569,6 +587,7 @@ const SidebarPanel: React.FC<SidebarProps> = ({
|
|
|
569
587
|
showsVerticalScrollIndicator={false}
|
|
570
588
|
>
|
|
571
589
|
{headerRow}
|
|
590
|
+
{modeSwitcher}
|
|
572
591
|
|
|
573
592
|
<View style={{ width: '100%', gap: 12 }}>
|
|
574
593
|
{showSearch && !flat ? searchButton : null}
|