@dloizides/ui-nav 1.29.0 → 1.31.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/dist/index.d.mts +29 -19
- package/dist/index.d.ts +29 -19
- package/dist/index.js +89 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle, StyleProp } from 'react-native';
|
|
2
|
+
import { ViewStyle, ImageSourcePropType, StyleProp } from 'react-native';
|
|
3
3
|
import { UiTheme } from '@dloizides/ui-feedback';
|
|
4
4
|
import { DropdownVariant } from '@dloizides/ui-layout';
|
|
5
5
|
import { resolveAccessibleRoutes, RoleRouteTable, RoleRoute } from '@dloizides/auth-web';
|
|
@@ -155,7 +155,7 @@ interface SidebarProps {
|
|
|
155
155
|
/** Navigation callback — receives a `NavItem.route`. */
|
|
156
156
|
onNavigate: (route: string) => void;
|
|
157
157
|
/** Localized menu title (heading). */
|
|
158
|
-
title:
|
|
158
|
+
title: React.ReactNode;
|
|
159
159
|
/** Localized accessibility label for the navigation landmark. */
|
|
160
160
|
regionLabel: string;
|
|
161
161
|
/** a11y hint for a leaf item, given its label. Defaults to the label. */
|
|
@@ -471,6 +471,18 @@ interface BrandHomeLinkProps {
|
|
|
471
471
|
/** The app logo as a link to the app's home route, for `NavBar` and apps with their own header. */
|
|
472
472
|
declare const BrandHomeLink: ({ route, label, onNavigate, children }: BrandHomeLinkProps) => React.ReactElement;
|
|
473
473
|
|
|
474
|
+
interface BrandMarkProps {
|
|
475
|
+
source: ImageSourcePropType;
|
|
476
|
+
name: string;
|
|
477
|
+
route: string;
|
|
478
|
+
label: string;
|
|
479
|
+
onNavigate: (route: string) => void;
|
|
480
|
+
size?: number;
|
|
481
|
+
iconOnly?: boolean;
|
|
482
|
+
}
|
|
483
|
+
/** The app icon with its name, as a link to the app's home route. */
|
|
484
|
+
declare const BrandMark: ({ source, name, route, label, onNavigate, size, iconOnly, }: BrandMarkProps) => React.ReactElement;
|
|
485
|
+
|
|
474
486
|
/**
|
|
475
487
|
* `Nav` — ONE component that renders EITHER the horizontal top bar (`NavBar`) or the
|
|
476
488
|
* vertical rail (`Sidebar`) from the same `NavItem[]`, chosen by a single
|
|
@@ -699,6 +711,13 @@ interface AppShellProps {
|
|
|
699
711
|
}
|
|
700
712
|
declare const AppShell: ({ header, nav, sidebar, collapsedSidebar, collapsedRailRange, mobileMenu, banner, width, contentPadding, chromeAlignment, gate, state, testID, children, }: AppShellProps) => React.ReactElement | null;
|
|
701
713
|
|
|
714
|
+
interface NavShellCollapsedRail {
|
|
715
|
+
items?: NavItem[];
|
|
716
|
+
header?: React.ReactNode;
|
|
717
|
+
footer?: React.ReactNode;
|
|
718
|
+
range?: CollapsedRailRange;
|
|
719
|
+
}
|
|
720
|
+
|
|
702
721
|
/**
|
|
703
722
|
* NavShell — the ONE first-class navigation shell that renders a **top bar**, a
|
|
704
723
|
* **side rail**, or **BOTH together**, chosen by a single `layout` prop
|
|
@@ -774,22 +793,7 @@ interface NavShellTopBar {
|
|
|
774
793
|
*/
|
|
775
794
|
barTheme?: UiTheme;
|
|
776
795
|
}
|
|
777
|
-
|
|
778
|
-
* Config for the intermediate COLLAPSED (icon-only) rail — opts the side layout
|
|
779
|
-
* into a THREE-tier responsive scheme (full rail → collapsed rail → drawer). When
|
|
780
|
-
* present, NavShell builds a `<CollapsedRail>` and hands it to `AppShell` for the
|
|
781
|
-
* tablet band; omit it and the layout stays two-tier.
|
|
782
|
-
*/
|
|
783
|
-
interface NavShellCollapsedRail {
|
|
784
|
-
/** Items for the icon rail. Defaults to the full rail's `items`. */
|
|
785
|
-
items?: NavItem[];
|
|
786
|
-
/** Optional header slot (e.g. a home shortcut). */
|
|
787
|
-
header?: React.ReactNode;
|
|
788
|
-
/** Optional footer slot (dark-mode toggle, logout). */
|
|
789
|
-
footer?: React.ReactNode;
|
|
790
|
-
/** The `[min, max)` viewport band for the collapsed rail (default `{ min: 768, max: 1024 }`). */
|
|
791
|
-
range?: CollapsedRailRange;
|
|
792
|
-
}
|
|
796
|
+
|
|
793
797
|
/**
|
|
794
798
|
* Config for the SIDE rail (rendered as a `Sidebar` in `AppShell`'s sidebar
|
|
795
799
|
* slot). Used when `layout` is `'side'` or `'both'`.
|
|
@@ -797,6 +801,7 @@ interface NavShellCollapsedRail {
|
|
|
797
801
|
interface NavShellSideRail {
|
|
798
802
|
/** Side-rail nav entries (sections — leaf + expandable). */
|
|
799
803
|
items: NavItem[];
|
|
804
|
+
brand?: React.ReactNode;
|
|
800
805
|
/** Localized menu title (heading). */
|
|
801
806
|
title: string;
|
|
802
807
|
/** Optional header slot rendered above the items (e.g. a Home shortcut). */
|
|
@@ -1135,6 +1140,8 @@ declare const NAV_TEST_IDS: {
|
|
|
1135
1140
|
/** the optional middle slot of `Topbar` (rendered only when `center` is passed). */
|
|
1136
1141
|
readonly topbarCenter: "topbar-center";
|
|
1137
1142
|
readonly brandHome: "nav-brand-home";
|
|
1143
|
+
readonly brandMarkIcon: "nav-brand-mark-icon";
|
|
1144
|
+
readonly brandMarkName: "nav-brand-mark-name";
|
|
1138
1145
|
};
|
|
1139
1146
|
/** Suffixes appended to an `AppShell`'s required `testID` to name its regions. */
|
|
1140
1147
|
declare const APP_SHELL_SUFFIX: {
|
|
@@ -1358,6 +1365,9 @@ declare const navStyles: {
|
|
|
1358
1365
|
borderRightWidth: number;
|
|
1359
1366
|
height: "100%";
|
|
1360
1367
|
};
|
|
1368
|
+
sidebarBrand: {
|
|
1369
|
+
marginBottom: number;
|
|
1370
|
+
};
|
|
1361
1371
|
sidebarTitle: {
|
|
1362
1372
|
fontWeight: "700";
|
|
1363
1373
|
marginBottom: number;
|
|
@@ -1653,4 +1663,4 @@ interface BottomTabBarProps {
|
|
|
1653
1663
|
/** Phone tab bar; `tabFeedback` picks the press feedback, `Default` adds no motion. */
|
|
1654
1664
|
declare const BottomTabBar: ({ items, pathname, onNavigate, tabFeedback, navigateHint, regionLabel, containerStyle, testID, }: BottomTabBarProps) => React.ReactElement;
|
|
1655
1665
|
|
|
1656
|
-
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
1666
|
+
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle, StyleProp } from 'react-native';
|
|
2
|
+
import { ViewStyle, ImageSourcePropType, StyleProp } from 'react-native';
|
|
3
3
|
import { UiTheme } from '@dloizides/ui-feedback';
|
|
4
4
|
import { DropdownVariant } from '@dloizides/ui-layout';
|
|
5
5
|
import { resolveAccessibleRoutes, RoleRouteTable, RoleRoute } from '@dloizides/auth-web';
|
|
@@ -155,7 +155,7 @@ interface SidebarProps {
|
|
|
155
155
|
/** Navigation callback — receives a `NavItem.route`. */
|
|
156
156
|
onNavigate: (route: string) => void;
|
|
157
157
|
/** Localized menu title (heading). */
|
|
158
|
-
title:
|
|
158
|
+
title: React.ReactNode;
|
|
159
159
|
/** Localized accessibility label for the navigation landmark. */
|
|
160
160
|
regionLabel: string;
|
|
161
161
|
/** a11y hint for a leaf item, given its label. Defaults to the label. */
|
|
@@ -471,6 +471,18 @@ interface BrandHomeLinkProps {
|
|
|
471
471
|
/** The app logo as a link to the app's home route, for `NavBar` and apps with their own header. */
|
|
472
472
|
declare const BrandHomeLink: ({ route, label, onNavigate, children }: BrandHomeLinkProps) => React.ReactElement;
|
|
473
473
|
|
|
474
|
+
interface BrandMarkProps {
|
|
475
|
+
source: ImageSourcePropType;
|
|
476
|
+
name: string;
|
|
477
|
+
route: string;
|
|
478
|
+
label: string;
|
|
479
|
+
onNavigate: (route: string) => void;
|
|
480
|
+
size?: number;
|
|
481
|
+
iconOnly?: boolean;
|
|
482
|
+
}
|
|
483
|
+
/** The app icon with its name, as a link to the app's home route. */
|
|
484
|
+
declare const BrandMark: ({ source, name, route, label, onNavigate, size, iconOnly, }: BrandMarkProps) => React.ReactElement;
|
|
485
|
+
|
|
474
486
|
/**
|
|
475
487
|
* `Nav` — ONE component that renders EITHER the horizontal top bar (`NavBar`) or the
|
|
476
488
|
* vertical rail (`Sidebar`) from the same `NavItem[]`, chosen by a single
|
|
@@ -699,6 +711,13 @@ interface AppShellProps {
|
|
|
699
711
|
}
|
|
700
712
|
declare const AppShell: ({ header, nav, sidebar, collapsedSidebar, collapsedRailRange, mobileMenu, banner, width, contentPadding, chromeAlignment, gate, state, testID, children, }: AppShellProps) => React.ReactElement | null;
|
|
701
713
|
|
|
714
|
+
interface NavShellCollapsedRail {
|
|
715
|
+
items?: NavItem[];
|
|
716
|
+
header?: React.ReactNode;
|
|
717
|
+
footer?: React.ReactNode;
|
|
718
|
+
range?: CollapsedRailRange;
|
|
719
|
+
}
|
|
720
|
+
|
|
702
721
|
/**
|
|
703
722
|
* NavShell — the ONE first-class navigation shell that renders a **top bar**, a
|
|
704
723
|
* **side rail**, or **BOTH together**, chosen by a single `layout` prop
|
|
@@ -774,22 +793,7 @@ interface NavShellTopBar {
|
|
|
774
793
|
*/
|
|
775
794
|
barTheme?: UiTheme;
|
|
776
795
|
}
|
|
777
|
-
|
|
778
|
-
* Config for the intermediate COLLAPSED (icon-only) rail — opts the side layout
|
|
779
|
-
* into a THREE-tier responsive scheme (full rail → collapsed rail → drawer). When
|
|
780
|
-
* present, NavShell builds a `<CollapsedRail>` and hands it to `AppShell` for the
|
|
781
|
-
* tablet band; omit it and the layout stays two-tier.
|
|
782
|
-
*/
|
|
783
|
-
interface NavShellCollapsedRail {
|
|
784
|
-
/** Items for the icon rail. Defaults to the full rail's `items`. */
|
|
785
|
-
items?: NavItem[];
|
|
786
|
-
/** Optional header slot (e.g. a home shortcut). */
|
|
787
|
-
header?: React.ReactNode;
|
|
788
|
-
/** Optional footer slot (dark-mode toggle, logout). */
|
|
789
|
-
footer?: React.ReactNode;
|
|
790
|
-
/** The `[min, max)` viewport band for the collapsed rail (default `{ min: 768, max: 1024 }`). */
|
|
791
|
-
range?: CollapsedRailRange;
|
|
792
|
-
}
|
|
796
|
+
|
|
793
797
|
/**
|
|
794
798
|
* Config for the SIDE rail (rendered as a `Sidebar` in `AppShell`'s sidebar
|
|
795
799
|
* slot). Used when `layout` is `'side'` or `'both'`.
|
|
@@ -797,6 +801,7 @@ interface NavShellCollapsedRail {
|
|
|
797
801
|
interface NavShellSideRail {
|
|
798
802
|
/** Side-rail nav entries (sections — leaf + expandable). */
|
|
799
803
|
items: NavItem[];
|
|
804
|
+
brand?: React.ReactNode;
|
|
800
805
|
/** Localized menu title (heading). */
|
|
801
806
|
title: string;
|
|
802
807
|
/** Optional header slot rendered above the items (e.g. a Home shortcut). */
|
|
@@ -1135,6 +1140,8 @@ declare const NAV_TEST_IDS: {
|
|
|
1135
1140
|
/** the optional middle slot of `Topbar` (rendered only when `center` is passed). */
|
|
1136
1141
|
readonly topbarCenter: "topbar-center";
|
|
1137
1142
|
readonly brandHome: "nav-brand-home";
|
|
1143
|
+
readonly brandMarkIcon: "nav-brand-mark-icon";
|
|
1144
|
+
readonly brandMarkName: "nav-brand-mark-name";
|
|
1138
1145
|
};
|
|
1139
1146
|
/** Suffixes appended to an `AppShell`'s required `testID` to name its regions. */
|
|
1140
1147
|
declare const APP_SHELL_SUFFIX: {
|
|
@@ -1358,6 +1365,9 @@ declare const navStyles: {
|
|
|
1358
1365
|
borderRightWidth: number;
|
|
1359
1366
|
height: "100%";
|
|
1360
1367
|
};
|
|
1368
|
+
sidebarBrand: {
|
|
1369
|
+
marginBottom: number;
|
|
1370
|
+
};
|
|
1361
1371
|
sidebarTitle: {
|
|
1362
1372
|
fontWeight: "700";
|
|
1363
1373
|
marginBottom: number;
|
|
@@ -1653,4 +1663,4 @@ interface BottomTabBarProps {
|
|
|
1653
1663
|
/** Phone tab bar; `tabFeedback` picks the press feedback, `Default` adds no motion. */
|
|
1654
1664
|
declare const BottomTabBar: ({ items, pathname, onNavigate, tabFeedback, navigateHint, regionLabel, containerStyle, testID, }: BottomTabBarProps) => React.ReactElement;
|
|
1655
1665
|
|
|
1656
|
-
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
1666
|
+
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,9 @@ var navStyles = reactNative.StyleSheet.create({
|
|
|
34
34
|
borderRightWidth: 1,
|
|
35
35
|
height: "100%"
|
|
36
36
|
},
|
|
37
|
+
sidebarBrand: {
|
|
38
|
+
marginBottom: 12
|
|
39
|
+
},
|
|
37
40
|
sidebarTitle: {
|
|
38
41
|
fontWeight: "700",
|
|
39
42
|
marginBottom: 12
|
|
@@ -821,7 +824,7 @@ var Sidebar = ({
|
|
|
821
824
|
containerStyle
|
|
822
825
|
],
|
|
823
826
|
children: [
|
|
824
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [navStyles.sidebarTitle, { color: colors.text }], children: title }),
|
|
827
|
+
typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [navStyles.sidebarTitle, { color: colors.text }], children: title }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: navStyles.sidebarBrand, children: title }),
|
|
825
828
|
showInlineSearch && search !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
826
829
|
SidebarSearch,
|
|
827
830
|
{
|
|
@@ -884,7 +887,9 @@ var NAV_TEST_IDS = {
|
|
|
884
887
|
pillNavMenu: "pill-nav-menu",
|
|
885
888
|
/** the optional middle slot of `Topbar` (rendered only when `center` is passed). */
|
|
886
889
|
topbarCenter: "topbar-center",
|
|
887
|
-
brandHome: "nav-brand-home"
|
|
890
|
+
brandHome: "nav-brand-home",
|
|
891
|
+
brandMarkIcon: "nav-brand-mark-icon",
|
|
892
|
+
brandMarkName: "nav-brand-mark-name"
|
|
888
893
|
};
|
|
889
894
|
var APP_SHELL_SUFFIX = {
|
|
890
895
|
content: "-content",
|
|
@@ -1572,6 +1577,44 @@ var BrandHomeLink = ({ route, label, onNavigate, children }) => {
|
|
|
1572
1577
|
}
|
|
1573
1578
|
);
|
|
1574
1579
|
};
|
|
1580
|
+
var DEFAULT_ICON_SIZE = 32;
|
|
1581
|
+
var NAME_FONT_SIZE = 16;
|
|
1582
|
+
var NAME_GAP = 8;
|
|
1583
|
+
var styles4 = reactNative.StyleSheet.create({
|
|
1584
|
+
name: { flexShrink: 1, fontSize: NAME_FONT_SIZE, fontWeight: "700" },
|
|
1585
|
+
row: { alignItems: "center", flexDirection: "row", gap: NAME_GAP }
|
|
1586
|
+
});
|
|
1587
|
+
var BrandMark = ({
|
|
1588
|
+
source,
|
|
1589
|
+
name,
|
|
1590
|
+
route,
|
|
1591
|
+
label,
|
|
1592
|
+
onNavigate,
|
|
1593
|
+
size = DEFAULT_ICON_SIZE,
|
|
1594
|
+
iconOnly = false
|
|
1595
|
+
}) => {
|
|
1596
|
+
const { theme } = uiFeedback.useUi();
|
|
1597
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BrandHomeLink, { label, route, onNavigate, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles4.row, children: [
|
|
1598
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1599
|
+
reactNative.Image,
|
|
1600
|
+
{
|
|
1601
|
+
accessibilityElementsHidden: true,
|
|
1602
|
+
source,
|
|
1603
|
+
style: { height: size, width: size },
|
|
1604
|
+
testID: NAV_TEST_IDS.brandMarkIcon
|
|
1605
|
+
}
|
|
1606
|
+
),
|
|
1607
|
+
iconOnly ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1608
|
+
reactNative.Text,
|
|
1609
|
+
{
|
|
1610
|
+
numberOfLines: 1,
|
|
1611
|
+
style: [styles4.name, { color: theme.colors.text }],
|
|
1612
|
+
testID: NAV_TEST_IDS.brandMarkName,
|
|
1613
|
+
children: name
|
|
1614
|
+
}
|
|
1615
|
+
)
|
|
1616
|
+
] }) });
|
|
1617
|
+
};
|
|
1575
1618
|
var Nav = (props) => {
|
|
1576
1619
|
if (props.orientation === "vertical") {
|
|
1577
1620
|
return /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { ...props });
|
|
@@ -1589,7 +1632,7 @@ function resolveRailMode({ viewport, hasSidebar, hasCollapsed, range }) {
|
|
|
1589
1632
|
}
|
|
1590
1633
|
return viewport >= RAIL_FULL_BREAKPOINT ? "full" : "drawer";
|
|
1591
1634
|
}
|
|
1592
|
-
var
|
|
1635
|
+
var styles5 = reactNative.StyleSheet.create({
|
|
1593
1636
|
band: { left: 0, position: "absolute", right: 0, top: 0 }
|
|
1594
1637
|
});
|
|
1595
1638
|
function readBackdrop(theme) {
|
|
@@ -1612,7 +1655,7 @@ function resolveShellBackdrop(theme, viewport, contentPadding, testID) {
|
|
|
1612
1655
|
reactNative.View,
|
|
1613
1656
|
{
|
|
1614
1657
|
pointerEvents: "none",
|
|
1615
|
-
style: [
|
|
1658
|
+
style: [styles5.band, { backgroundColor: band.color, height: contentPadding + overlap }],
|
|
1616
1659
|
testID: `${testID}${APP_SHELL_SUFFIX.band}`
|
|
1617
1660
|
}
|
|
1618
1661
|
);
|
|
@@ -1624,7 +1667,7 @@ var CARD_BORDER_WIDTH = 1;
|
|
|
1624
1667
|
var CARD_TITLE_FONT_SIZE = 16;
|
|
1625
1668
|
var CARD_MESSAGE_FONT_SIZE = 14;
|
|
1626
1669
|
var CARD_TITLE_MARGIN_BOTTOM = 8;
|
|
1627
|
-
var
|
|
1670
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
1628
1671
|
// Loading is a TRANSITIONAL state: the spinner is an absolute overlay ON TOP of
|
|
1629
1672
|
// stably-mounted children, never a replacement for them. Replacing children here
|
|
1630
1673
|
// would unmount whatever they host (e.g. a navigator), and on remount React
|
|
@@ -1656,9 +1699,9 @@ function MessageCard({
|
|
|
1656
1699
|
}) {
|
|
1657
1700
|
const { theme } = uiFeedback.useUi();
|
|
1658
1701
|
const colors = theme.colors;
|
|
1659
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1660
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1661
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1702
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles6.card, { backgroundColor: colors.surface, borderColor: accentColor }], testID, children: [
|
|
1703
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.cardTitle, { color: accentColor }], children: message.titleText }),
|
|
1704
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.cardMessage, { color: colors.textSecondary }], children: message.messageText })
|
|
1662
1705
|
] });
|
|
1663
1706
|
}
|
|
1664
1707
|
function useContentBody(state, children, testID) {
|
|
@@ -1670,12 +1713,12 @@ function useContentBody(state, children, testID) {
|
|
|
1670
1713
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageCard, { accentColor: errorColor, message: state.forbidden, testID: `${testID}${APP_SHELL_SUFFIX.forbidden}` });
|
|
1671
1714
|
if (state.error)
|
|
1672
1715
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageCard, { accentColor: errorColor, message: state.error, testID: `${testID}${APP_SHELL_SUFFIX.error}` });
|
|
1673
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles6.loadingHost, children: [
|
|
1674
1717
|
children,
|
|
1675
1718
|
state.loading === true ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1676
1719
|
reactNative.View,
|
|
1677
1720
|
{
|
|
1678
|
-
style: [
|
|
1721
|
+
style: [styles6.loadingOverlay, { backgroundColor: theme.colors.background }],
|
|
1679
1722
|
testID: `${testID}${APP_SHELL_SUFFIX.loading}`,
|
|
1680
1723
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: primary, size: "large" })
|
|
1681
1724
|
}
|
|
@@ -1702,7 +1745,7 @@ var DEFAULT_DRAWER_LABELS = {
|
|
|
1702
1745
|
closeLabel: "Close menu",
|
|
1703
1746
|
closeHint: "Close the navigation menu"
|
|
1704
1747
|
};
|
|
1705
|
-
var
|
|
1748
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
1706
1749
|
overlay: { ...reactNative.StyleSheet.absoluteFillObject, zIndex: DRAWER_Z_INDEX },
|
|
1707
1750
|
// The scrim's tap-to-close hit area is anchored to the RIGHT of the panel
|
|
1708
1751
|
// (`left: DRAWER_WIDTH`), so it NEVER overlaps the panel: nav-item taps always
|
|
@@ -1737,10 +1780,10 @@ var MenuToggle = ({ label, hint, onOpen, testID }) => {
|
|
|
1737
1780
|
accessibilityHint: hint,
|
|
1738
1781
|
accessibilityLabel: label,
|
|
1739
1782
|
ringColor: theme.palette.primary["500"],
|
|
1740
|
-
style:
|
|
1783
|
+
style: styles7.menuToggle,
|
|
1741
1784
|
testID,
|
|
1742
1785
|
onPress: onOpen,
|
|
1743
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1786
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles7.menuToggleGlyph, { color: theme.colors.text }], children: MENU_GLYPH2 })
|
|
1744
1787
|
}
|
|
1745
1788
|
);
|
|
1746
1789
|
};
|
|
@@ -1766,14 +1809,14 @@ var MobileDrawer = ({
|
|
|
1766
1809
|
node.addEventListener("click", handleClick);
|
|
1767
1810
|
return () => node.removeEventListener("click", handleClick);
|
|
1768
1811
|
}, [onClose]);
|
|
1769
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1812
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles7.overlay, children: [
|
|
1770
1813
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
1814
|
reactNative.Pressable,
|
|
1772
1815
|
{
|
|
1773
1816
|
accessibilityHint: labels.closeHint,
|
|
1774
1817
|
accessibilityLabel: labels.closeLabel,
|
|
1775
1818
|
accessibilityRole: "button",
|
|
1776
|
-
style:
|
|
1819
|
+
style: styles7.scrim,
|
|
1777
1820
|
testID: scrimTestID,
|
|
1778
1821
|
onPress: onClose
|
|
1779
1822
|
}
|
|
@@ -1784,7 +1827,7 @@ var MobileDrawer = ({
|
|
|
1784
1827
|
ref: panelRef,
|
|
1785
1828
|
"aria-modal": true,
|
|
1786
1829
|
role: "dialog",
|
|
1787
|
-
style: [
|
|
1830
|
+
style: [styles7.panel, { backgroundColor: theme.colors.surface }],
|
|
1788
1831
|
testID: drawerTestID,
|
|
1789
1832
|
children: renderTextSlot(sidebar, { color: theme.colors.text })
|
|
1790
1833
|
}
|
|
@@ -1802,7 +1845,7 @@ function useContentMaxWidth(width) {
|
|
|
1802
1845
|
return resolveContentMaxWidth(width, viewport);
|
|
1803
1846
|
}
|
|
1804
1847
|
var DEFAULT_CONTENT_PADDING = 24;
|
|
1805
|
-
var
|
|
1848
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
1806
1849
|
root: { flex: 1 },
|
|
1807
1850
|
// Auth-pending spinner: an opaque absolute overlay over the mounted shell, so
|
|
1808
1851
|
// `children` (and any navigator they host) are never unmounted while the gate
|
|
@@ -1864,13 +1907,13 @@ var AppShell = ({
|
|
|
1864
1907
|
}, [isUnauthenticated, gate]);
|
|
1865
1908
|
const gatePending = gate?.pending === true;
|
|
1866
1909
|
if (isUnauthenticated) return null;
|
|
1867
|
-
const columnStyle = maxWidth === "full" ?
|
|
1868
|
-
const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [
|
|
1910
|
+
const columnStyle = maxWidth === "full" ? styles8.columnFull : [styles8.columnCapped, { maxWidth }];
|
|
1911
|
+
const navInnerStyle = chromeAlignment === "content" && maxWidth !== "full" ? [styles8.chromeCapped, { maxWidth, paddingHorizontal: contentPadding }] : void 0;
|
|
1869
1912
|
const scroller = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1870
1913
|
reactNative.ScrollView,
|
|
1871
1914
|
{
|
|
1872
|
-
contentContainerStyle: [
|
|
1873
|
-
style:
|
|
1915
|
+
contentContainerStyle: [styles8.scrollContent, { padding: contentPadding }],
|
|
1916
|
+
style: styles8.scroll,
|
|
1874
1917
|
testID: `${testID}${APP_SHELL_SUFFIX.content}`,
|
|
1875
1918
|
children: [
|
|
1876
1919
|
look.band,
|
|
@@ -1878,7 +1921,7 @@ var AppShell = ({
|
|
|
1878
1921
|
]
|
|
1879
1922
|
}
|
|
1880
1923
|
);
|
|
1881
|
-
const headerRegion = useDrawer ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1924
|
+
const headerRegion = useDrawer ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles8.headerRow, look.chrome], testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: [
|
|
1882
1925
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1883
1926
|
MenuToggle,
|
|
1884
1927
|
{
|
|
@@ -1888,14 +1931,14 @@ var AppShell = ({
|
|
|
1888
1931
|
onOpen: openDrawer
|
|
1889
1932
|
}
|
|
1890
1933
|
),
|
|
1891
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
1934
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles8.headerFill, children: renderTextSlot(header, { color: look.chromeText }) })
|
|
1892
1935
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: look.chrome, testID: `${testID}${APP_SHELL_SUFFIX.header}`, children: renderTextSlot(header, { color: look.chromeText }) });
|
|
1893
1936
|
const railRegion = railMode === "full" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}${APP_SHELL_SUFFIX.sidebar}`, children: renderTextSlot(sidebar, { color: theme.colors.text }) }) : railMode === "collapsed" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}${APP_SHELL_SUFFIX.collapsedSidebar}`, children: renderTextSlot(collapsedSidebar, { color: theme.colors.text }) }) : null;
|
|
1894
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1937
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles8.root, look.root], testID, children: [
|
|
1895
1938
|
headerRegion,
|
|
1896
1939
|
nav !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: look.chrome, testID: `${testID}${APP_SHELL_SUFFIX.nav}`, children: navInnerStyle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: navInnerStyle, children: renderTextSlot(nav, { color: look.chromeText }) }) : renderTextSlot(nav, { color: look.chromeText }) }) : null,
|
|
1897
1940
|
banner !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { testID: `${testID}${APP_SHELL_SUFFIX.banner}`, children: renderTextSlot(banner, { color: theme.colors.text }) }) : null,
|
|
1898
|
-
railRegion !== null ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1941
|
+
railRegion !== null ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.bodyRow, children: [
|
|
1899
1942
|
railRegion,
|
|
1900
1943
|
scroller
|
|
1901
1944
|
] }) : scroller,
|
|
@@ -1912,7 +1955,7 @@ var AppShell = ({
|
|
|
1912
1955
|
gatePending ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
1956
|
reactNative.View,
|
|
1914
1957
|
{
|
|
1915
|
-
style: [
|
|
1958
|
+
style: [styles8.pendingOverlay, { backgroundColor: theme.colors.background }],
|
|
1916
1959
|
testID: `${testID}${APP_SHELL_SUFFIX.pending}`,
|
|
1917
1960
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: primary, size: "large" })
|
|
1918
1961
|
}
|
|
@@ -2033,7 +2076,7 @@ var NavShell = ({
|
|
|
2033
2076
|
renderChevron: sideRail.renderChevron,
|
|
2034
2077
|
search: sideRail.search,
|
|
2035
2078
|
searchQuery: sideRail.searchQuery,
|
|
2036
|
-
title: sideRail.title,
|
|
2079
|
+
title: sideRail.brand ?? sideRail.title,
|
|
2037
2080
|
onNavigate,
|
|
2038
2081
|
onSearchChange: sideRail.onSearchChange
|
|
2039
2082
|
}
|
|
@@ -2279,7 +2322,7 @@ var KEY_DOWN = "ArrowDown";
|
|
|
2279
2322
|
var KEY_UP = "ArrowUp";
|
|
2280
2323
|
var KEY_ENTER = "Enter";
|
|
2281
2324
|
var KEY_ESCAPE = "Escape";
|
|
2282
|
-
var
|
|
2325
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
2283
2326
|
overlay: { ...reactNative.StyleSheet.absoluteFillObject, zIndex: OVERLAY_Z_INDEX, alignItems: "center" },
|
|
2284
2327
|
scrim: { ...reactNative.StyleSheet.absoluteFillObject, backgroundColor: SCRIM_COLOR2 },
|
|
2285
2328
|
panel: {
|
|
@@ -2308,14 +2351,14 @@ var PaletteRow = ({ item, selected, onChoose }) => {
|
|
|
2308
2351
|
accessibilityLabel: item.label,
|
|
2309
2352
|
accessibilityRole: "button",
|
|
2310
2353
|
accessibilityState: { selected },
|
|
2311
|
-
style: [
|
|
2354
|
+
style: [styles9.row, selected ? { backgroundColor: colors.border } : void 0],
|
|
2312
2355
|
testID: item.testID ?? item.key,
|
|
2313
2356
|
onPress: () => onChoose(item),
|
|
2314
2357
|
children: [
|
|
2315
2358
|
typeof item.renderIcon === "function" ? item.renderIcon(colors.textSecondary, NAV_ICON_SIZE) : null,
|
|
2316
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2317
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2318
|
-
item.hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2359
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.rowText, children: [
|
|
2360
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.rowLabel, { color: colors.text }], children: item.label }),
|
|
2361
|
+
item.hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.rowHint, { color: colors.textSecondary }], children: item.hint }) : null
|
|
2319
2362
|
] })
|
|
2320
2363
|
]
|
|
2321
2364
|
}
|
|
@@ -2355,14 +2398,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2355
2398
|
[results, selected, choose, onClose]
|
|
2356
2399
|
);
|
|
2357
2400
|
if (!open) return null;
|
|
2358
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2401
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.overlay, children: [
|
|
2359
2402
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2360
2403
|
reactNative.Pressable,
|
|
2361
2404
|
{
|
|
2362
2405
|
accessibilityHint: labels.closeHint,
|
|
2363
2406
|
accessibilityLabel: labels.closeLabel,
|
|
2364
2407
|
accessibilityRole: "button",
|
|
2365
|
-
style:
|
|
2408
|
+
style: styles9.scrim,
|
|
2366
2409
|
testID: `${testID ?? "command-palette"}-scrim`,
|
|
2367
2410
|
onPress: onClose
|
|
2368
2411
|
}
|
|
@@ -2373,7 +2416,7 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2373
2416
|
"aria-modal": true,
|
|
2374
2417
|
"aria-label": labels.regionLabel,
|
|
2375
2418
|
role: "dialog",
|
|
2376
|
-
style: [
|
|
2419
|
+
style: [styles9.panel, { backgroundColor: colors.surface, borderColor: colors.border }],
|
|
2377
2420
|
testID: testID ?? "command-palette",
|
|
2378
2421
|
children: [
|
|
2379
2422
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2383,14 +2426,14 @@ var CommandPalette = ({ open, items, onClose, labels, testID }) => {
|
|
|
2383
2426
|
accessibilityLabel: labels.placeholder,
|
|
2384
2427
|
placeholder: labels.placeholder,
|
|
2385
2428
|
placeholderTextColor: colors.textSecondary,
|
|
2386
|
-
style: [
|
|
2429
|
+
style: [styles9.input, { color: colors.text, borderBottomColor: colors.border }],
|
|
2387
2430
|
testID: `${testID ?? "command-palette"}-input`,
|
|
2388
2431
|
value: query,
|
|
2389
2432
|
onChangeText: setQuery,
|
|
2390
2433
|
onKeyPress
|
|
2391
2434
|
}
|
|
2392
2435
|
),
|
|
2393
|
-
results.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2436
|
+
results.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.empty, { color: colors.textSecondary }], children: labels.emptyText }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", style: styles9.list, children: results.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(PaletteRow, { item, selected: index === selected, onChoose: choose }, item.key)) })
|
|
2394
2437
|
]
|
|
2395
2438
|
}
|
|
2396
2439
|
)
|
|
@@ -2495,7 +2538,7 @@ var TAB_MIN_HEIGHT = 56;
|
|
|
2495
2538
|
var LABEL_SIZE = 12;
|
|
2496
2539
|
var LABEL_GAP = 2;
|
|
2497
2540
|
var TAB_PADDING = 4;
|
|
2498
|
-
var
|
|
2541
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
2499
2542
|
tab: {
|
|
2500
2543
|
flex: 1,
|
|
2501
2544
|
minHeight: TAB_MIN_HEIGHT,
|
|
@@ -2532,31 +2575,31 @@ var BottomTab = ({
|
|
|
2532
2575
|
accessibilityLabel: item.label,
|
|
2533
2576
|
accessibilityRole: "link",
|
|
2534
2577
|
accessibilityState: { selected: isActive },
|
|
2535
|
-
style: [
|
|
2578
|
+
style: [styles10.tab, { opacity: feedback.opacity }],
|
|
2536
2579
|
testID: item.testID ?? item.key,
|
|
2537
2580
|
onPress: () => onPress(item.route),
|
|
2538
2581
|
onPressIn: () => setPressed(true),
|
|
2539
2582
|
onPressOut: () => setPressed(false),
|
|
2540
2583
|
...ariaCurrentProps3(isActive),
|
|
2541
2584
|
children: [
|
|
2542
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Animated.View, { style: [
|
|
2585
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Animated.View, { style: [styles10.iconWrap, { transform: [{ scale }] }], children: [
|
|
2543
2586
|
feedback.pillScale === null ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
2587
|
reactNative.View,
|
|
2545
2588
|
{
|
|
2546
2589
|
pointerEvents: "none",
|
|
2547
|
-
style: [
|
|
2590
|
+
style: [styles10.pill, { backgroundColor: colors.pill, transform: [{ scale: feedback.pillScale }] }, motion]
|
|
2548
2591
|
}
|
|
2549
2592
|
),
|
|
2550
2593
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [{ transform: feedback.iconTransform }, motion], children: item.renderIcon?.(color, ICON_SIZE) })
|
|
2551
2594
|
] }),
|
|
2552
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2595
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.label, { color }], children: item.label })
|
|
2553
2596
|
]
|
|
2554
2597
|
}
|
|
2555
2598
|
);
|
|
2556
2599
|
};
|
|
2557
2600
|
var DEFAULT_TEST_ID = "bottom-tab-bar";
|
|
2558
2601
|
var SLIDER_HEIGHT = 3;
|
|
2559
|
-
var
|
|
2602
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
2560
2603
|
bar: { flexDirection: "row", borderTopWidth: reactNative.StyleSheet.hairlineWidth },
|
|
2561
2604
|
slider: { position: "absolute", top: 0, height: SLIDER_HEIGHT }
|
|
2562
2605
|
});
|
|
@@ -2583,14 +2626,14 @@ var BottomTabBar = ({
|
|
|
2583
2626
|
{
|
|
2584
2627
|
"aria-label": regionLabel,
|
|
2585
2628
|
role: "navigation",
|
|
2586
|
-
style: [
|
|
2629
|
+
style: [styles11.bar, { backgroundColor: theme.colors.surface, borderTopColor: theme.colors.border }, containerStyle],
|
|
2587
2630
|
testID,
|
|
2588
2631
|
children: [
|
|
2589
2632
|
bar === null ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2590
2633
|
reactNative.View,
|
|
2591
2634
|
{
|
|
2592
2635
|
pointerEvents: "none",
|
|
2593
|
-
style: [
|
|
2636
|
+
style: [styles11.slider, { left: bar.left, width: bar.width, backgroundColor: primary }, webTransition("left", barMs, reducedMotion)]
|
|
2594
2637
|
}
|
|
2595
2638
|
),
|
|
2596
2639
|
items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2618,6 +2661,7 @@ exports.AppShell = AppShell;
|
|
|
2618
2661
|
exports.BASE_INDENT = BASE_INDENT;
|
|
2619
2662
|
exports.BottomTabBar = BottomTabBar;
|
|
2620
2663
|
exports.BrandHomeLink = BrandHomeLink;
|
|
2664
|
+
exports.BrandMark = BrandMark;
|
|
2621
2665
|
exports.CHEVRON_ICON_SIZE = CHEVRON_ICON_SIZE;
|
|
2622
2666
|
exports.CollapsedRail = CollapsedRail;
|
|
2623
2667
|
exports.CommandPalette = CommandPalette;
|