@multiplatform.one/components 7.80.0 → 7.81.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/cjs/CheckGlyph/MenuCheckColumn.cjs +56 -0
- package/dist/cjs/CheckGlyph/MenuCheckColumn.native.js +60 -0
- package/dist/cjs/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/cjs/CheckGlyph/index.cjs +40 -0
- package/dist/cjs/CheckGlyph/index.native.js +44 -0
- package/dist/cjs/CheckGlyph/index.native.js.map +1 -0
- package/dist/cjs/ContextMenu/index.cjs +5 -22
- package/dist/cjs/ContextMenu/index.native.js +7 -25
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +5 -17
- package/dist/cjs/DropdownMenu/index.native.js +7 -19
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/Popover.cjs +2 -2
- package/dist/cjs/Popover.native.js +2 -2
- package/dist/cjs/Popover.native.js.map +1 -1
- package/dist/cjs/SchemeToggle/index.cjs +2 -2
- package/dist/cjs/SchemeToggle/index.native.js +2 -2
- package/dist/cjs/SchemeToggle/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +4 -1
- package/dist/cjs/SheetModal/index.native.js +1 -1
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +2 -6
- package/dist/cjs/TreeSelect/index.native.js +2 -6
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/appShell/AppShell.cjs +23 -17
- package/dist/cjs/appShell/AppShell.native.js +28 -22
- package/dist/cjs/appShell/AppShell.native.js.map +1 -1
- package/dist/cjs/appShell/ScopeMenu.cjs +39 -16
- package/dist/cjs/appShell/ScopeMenu.native.js +43 -17
- package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/cjs/appShell/TabHost.native.js +41 -10
- package/dist/cjs/appShell/TabHost.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +29 -8
- package/dist/cjs/layouts/sidebar.native.js +30 -8
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/CheckGlyph/MenuCheckColumn.mjs +31 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.mjs.map +1 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js +32 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/esm/CheckGlyph/index.mjs +15 -0
- package/dist/esm/CheckGlyph/index.mjs.map +1 -0
- package/dist/esm/CheckGlyph/index.native.js +16 -0
- package/dist/esm/CheckGlyph/index.native.js.map +1 -0
- package/dist/esm/ContextMenu/index.mjs +6 -23
- package/dist/esm/ContextMenu/index.mjs.map +1 -1
- package/dist/esm/ContextMenu/index.native.js +8 -26
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +6 -18
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +8 -20
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/Popover.mjs +2 -2
- package/dist/esm/Popover.mjs.map +1 -1
- package/dist/esm/Popover.native.js +2 -2
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/SchemeToggle/index.mjs +3 -3
- package/dist/esm/SchemeToggle/index.mjs.map +1 -1
- package/dist/esm/SchemeToggle/index.native.js +3 -3
- package/dist/esm/SchemeToggle/index.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +5 -2
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +2 -2
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +4 -8
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +4 -8
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +23 -17
- package/dist/esm/appShell/AppShell.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.native.js +28 -22
- package/dist/esm/appShell/AppShell.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.mjs +43 -20
- package/dist/esm/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js +47 -21
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.mjs.map +1 -1
- package/dist/esm/appShell/TabHost.native.js +41 -12
- package/dist/esm/appShell/TabHost.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +31 -10
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +32 -10
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/MenuCheckColumn.mjs +31 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.mjs.map +1 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js +60 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/jsx/CheckGlyph/index.mjs +15 -0
- package/dist/jsx/CheckGlyph/index.mjs.map +1 -0
- package/dist/jsx/CheckGlyph/index.native.js +44 -0
- package/dist/jsx/CheckGlyph/index.native.js.map +1 -0
- package/dist/jsx/ContextMenu/index.mjs +6 -23
- package/dist/jsx/ContextMenu/index.mjs.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js +7 -25
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +6 -18
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +7 -19
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/Popover.mjs +2 -2
- package/dist/jsx/Popover.mjs.map +1 -1
- package/dist/jsx/Popover.native.js +2 -2
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/SchemeToggle/index.mjs +3 -3
- package/dist/jsx/SchemeToggle/index.mjs.map +1 -1
- package/dist/jsx/SchemeToggle/index.native.js +2 -2
- package/dist/jsx/SchemeToggle/index.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +5 -2
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +1 -1
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.mjs +4 -8
- package/dist/jsx/TreeSelect/index.mjs.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +2 -6
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/appShell/AppShell.mjs +23 -17
- package/dist/jsx/appShell/AppShell.mjs.map +1 -1
- package/dist/jsx/appShell/AppShell.native.js +28 -22
- package/dist/jsx/appShell/AppShell.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.mjs +43 -20
- package/dist/jsx/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js +43 -17
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.mjs.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabHost.native.js +41 -10
- package/dist/jsx/appShell/TabHost.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.mjs +31 -10
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +30 -8
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/package.json +9 -9
- package/src/CheckGlyph/CheckGlyph.spec.tsx +46 -0
- package/src/CheckGlyph/MenuCheckColumn.tsx +32 -0
- package/src/CheckGlyph/index.tsx +12 -0
- package/src/ContextMenu/ContextMenu.spec.tsx +46 -1
- package/src/ContextMenu/index.tsx +5 -22
- package/src/DropdownMenu/DropdownMenu.avatarTrigger.spec.tsx +6 -9
- package/src/DropdownMenu/index.tsx +5 -18
- package/src/Popover.coverTrigger.spec.tsx +3 -3
- package/src/Popover.tsx +5 -5
- package/src/SchemeToggle/SchemeToggle.spec.tsx +5 -11
- package/src/SchemeToggle/SchemeToggle.stories.tsx +21 -0
- package/src/SchemeToggle/index.tsx +2 -1
- package/src/SheetModal/index.native.tsx +2 -1
- package/src/SheetModal/index.tsx +5 -2
- package/src/TreeSelect/index.tsx +2 -4
- package/src/appShell/AppShell.spec.tsx +30 -0
- package/src/appShell/AppShell.tsx +22 -13
- package/src/appShell/ScopeMenu.spec.tsx +22 -0
- package/src/appShell/ScopeMenu.tsx +57 -18
- package/src/appShell/TabBar.tsx +13 -3
- package/src/appShell/TabHost.native.spec.tsx +53 -6
- package/src/appShell/TabHost.native.tsx +50 -14
- package/src/appShell/TabHost.stories.tsx +72 -0
- package/src/layouts/PageHeader.stories.tsx +3 -3
- package/src/layouts/Sidebar.spec.tsx +61 -1
- package/src/layouts/pageActionButton.spec.tsx +7 -3
- package/src/layouts/sidebar.tsx +22 -8
- package/types/CheckGlyph/MenuCheckColumn.d.ts +11 -0
- package/types/CheckGlyph/MenuCheckColumn.d.ts.map +1 -0
- package/types/CheckGlyph/index.d.ts +10 -0
- package/types/CheckGlyph/index.d.ts.map +1 -0
- package/types/ContextMenu/index.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/Popover.d.ts +1 -1
- package/types/Popover.d.ts.map +1 -1
- package/types/SchemeToggle/index.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/appShell/AppShell.d.ts.map +1 -1
- package/types/appShell/ScopeMenu.d.ts +0 -18
- package/types/appShell/ScopeMenu.d.ts.map +1 -1
- package/types/appShell/TabBar.d.ts +12 -6
- package/types/appShell/TabBar.d.ts.map +1 -1
- package/types/appShell/TabHost.native.d.ts +23 -5
- package/types/appShell/TabHost.native.d.ts.map +1 -1
- package/types/layouts/sidebar.d.ts +7 -1
- package/types/layouts/sidebar.d.ts.map +1 -1
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* The native view ships in react-native-screens' binary half, so it is
|
|
12
12
|
* feature-detected before react-native-screens' Tabs is required: a binary
|
|
13
|
-
* without RNSTabsHost, a platform
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* without RNSTabsHost, a platform switched off in `nativeTabsPlatforms`, or
|
|
14
|
+
* an item without its platform's glyph keeps the MPO TabBar. Android's arm
|
|
15
|
+
* (Material bottom navigation, PNG template icons) is built and switched off
|
|
16
|
+
* until an Android build proves it (FZ-8140).
|
|
16
17
|
*
|
|
17
18
|
* The bar's clearance is the inset this host publishes, as with the MPO
|
|
18
19
|
* TabBar, so a Screen pads by it whether or not it scrolls. Each tab screen
|
|
@@ -20,9 +21,13 @@
|
|
|
20
21
|
* otherwise flip the first scroll view to `automatic`, and UIKit would add
|
|
21
22
|
* the bar's height a second time (FZ-8640).
|
|
22
23
|
*/
|
|
23
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
useAccentTintedSurface,
|
|
26
|
+
useGlyphColor,
|
|
27
|
+
useIdentityInkOnSurface,
|
|
28
|
+
} from "@multiplatform.one/theme";
|
|
24
29
|
import { type ComponentType, type ReactNode, useEffect, useRef, useState } from "react";
|
|
25
|
-
import { Platform, UIManager } from "react-native";
|
|
30
|
+
import { type ImageSourcePropType, Platform, UIManager } from "react-native";
|
|
26
31
|
import { setBottomChromeInset } from "./bottomChrome";
|
|
27
32
|
import { useBottomInset } from "./bottomInset";
|
|
28
33
|
import { type TabBarItem, tabBarInactiveInk } from "./TabBar";
|
|
@@ -36,7 +41,17 @@ export const nativeTabsComponents = ["RNSTabsHost", "RNSTabsScreen"] as const;
|
|
|
36
41
|
/** Points the system tab bar covers above the home-indicator band. */
|
|
37
42
|
export const nativeTabBarHeight = 49;
|
|
38
43
|
|
|
39
|
-
type
|
|
44
|
+
type ImageIcon = { type: "imageSource"; imageSource: ImageSourcePropType };
|
|
45
|
+
type IconProp = { ios?: { type: "sfSymbol"; name: string }; android?: ImageIcon };
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The platforms whose system tab bar TabHost draws. Android stays off until
|
|
49
|
+
* an emulator build shows the Material bar in light and dark (FZ-8140).
|
|
50
|
+
*/
|
|
51
|
+
export const nativeTabsPlatforms: Readonly<Record<string, boolean>> = {
|
|
52
|
+
ios: true,
|
|
53
|
+
android: false,
|
|
54
|
+
};
|
|
40
55
|
|
|
41
56
|
export interface NativeTabs {
|
|
42
57
|
Host: ComponentType<{
|
|
@@ -47,6 +62,8 @@ export interface NativeTabs {
|
|
|
47
62
|
tabBarItemIconColorActive?: string;
|
|
48
63
|
tabBarItemTitleFontColor?: string;
|
|
49
64
|
tabBarItemTitleFontColorActive?: string;
|
|
65
|
+
tabBarBackgroundColor?: string;
|
|
66
|
+
tabBarItemActiveIndicatorColor?: string;
|
|
50
67
|
experimentalControlNavigationStateInJS?: boolean;
|
|
51
68
|
onNativeFocusChange?: (event: { nativeEvent: { tabKey: string } }) => void;
|
|
52
69
|
}>;
|
|
@@ -56,7 +73,7 @@ export interface NativeTabs {
|
|
|
56
73
|
title?: string;
|
|
57
74
|
isFocused?: boolean;
|
|
58
75
|
icon?: IconProp;
|
|
59
|
-
selectedIcon?:
|
|
76
|
+
selectedIcon?: { type: "sfSymbol"; name: string };
|
|
60
77
|
tabBarItemAccessibilityLabel?: string;
|
|
61
78
|
tabBarItemTestID?: string;
|
|
62
79
|
overrideScrollViewContentInsetAdjustmentBehavior?: boolean;
|
|
@@ -74,8 +91,12 @@ const appSources: NativeTabsSources = {
|
|
|
74
91
|
};
|
|
75
92
|
|
|
76
93
|
/** react-native-screens' Tabs, or null when this platform or binary cannot draw them. */
|
|
77
|
-
export function resolveNativeTabs(
|
|
78
|
-
|
|
94
|
+
export function resolveNativeTabs(
|
|
95
|
+
sources: NativeTabsSources,
|
|
96
|
+
os: string,
|
|
97
|
+
platforms: Readonly<Record<string, boolean>> = nativeTabsPlatforms,
|
|
98
|
+
): NativeTabs | null {
|
|
99
|
+
if (!platforms[os]) return null;
|
|
79
100
|
try {
|
|
80
101
|
if (!nativeTabsComponents.every((name) => sources.hasComponent(name))) return null;
|
|
81
102
|
const tabs = sources.screens().Tabs;
|
|
@@ -92,9 +113,20 @@ function loadNativeTabs(): NativeTabs | null {
|
|
|
92
113
|
return cached;
|
|
93
114
|
}
|
|
94
115
|
|
|
95
|
-
/** True when every item names the
|
|
96
|
-
export function itemsHaveNativeIcons(items: readonly TabBarItem[]): boolean {
|
|
97
|
-
|
|
116
|
+
/** True when every item names the glyph this platform's system bar draws. */
|
|
117
|
+
export function itemsHaveNativeIcons(items: readonly TabBarItem[], os = "ios"): boolean {
|
|
118
|
+
const glyph = (item: TabBarItem) =>
|
|
119
|
+
os === "android" ? item.nativeIcon?.android : item.nativeIcon?.sfSymbol;
|
|
120
|
+
return items.length > 0 && items.every((item) => Boolean(glyph(item)));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** The item's glyphs in react-native-screens' per-platform icon shape. */
|
|
124
|
+
export function nativeIconFor(item: TabBarItem): IconProp {
|
|
125
|
+
const { sfSymbol, android } = item.nativeIcon ?? {};
|
|
126
|
+
return {
|
|
127
|
+
...(sfSymbol ? { ios: { type: "sfSymbol" as const, name: sfSymbol } } : {}),
|
|
128
|
+
...(android ? { android: { type: "imageSource" as const, imageSource: android } } : {}),
|
|
129
|
+
};
|
|
98
130
|
}
|
|
99
131
|
|
|
100
132
|
export function NativeTabHost({
|
|
@@ -107,6 +139,8 @@ export function NativeTabHost({
|
|
|
107
139
|
const { Host, Screen } = tabs;
|
|
108
140
|
const accent = useIdentityInkOnSurface();
|
|
109
141
|
const ink = useGlyphColor(tabBarInactiveInk);
|
|
142
|
+
const surface = useGlyphColor("$color2");
|
|
143
|
+
const indicator = useAccentTintedSurface();
|
|
110
144
|
const deviceInset = useBottomInset();
|
|
111
145
|
const [id] = useState(() => Symbol("native-tab-host"));
|
|
112
146
|
const lastKey = useRef(activeKey ?? items[0]?.key);
|
|
@@ -126,6 +160,8 @@ export function NativeTabHost({
|
|
|
126
160
|
tabBarItemIconColorActive={accent}
|
|
127
161
|
tabBarItemTitleFontColor={ink}
|
|
128
162
|
tabBarItemTitleFontColorActive={accent}
|
|
163
|
+
tabBarBackgroundColor={surface}
|
|
164
|
+
tabBarItemActiveIndicatorColor={indicator}
|
|
129
165
|
experimentalControlNavigationStateInJS
|
|
130
166
|
onNativeFocusChange={(event) => {
|
|
131
167
|
const key = event.nativeEvent.tabKey;
|
|
@@ -138,7 +174,7 @@ export function NativeTabHost({
|
|
|
138
174
|
tabKey={item.key}
|
|
139
175
|
title={item.label}
|
|
140
176
|
isFocused={item.key === focusedKey}
|
|
141
|
-
icon={
|
|
177
|
+
icon={nativeIconFor(item)}
|
|
142
178
|
selectedIcon={
|
|
143
179
|
item.nativeIcon?.sfSymbolSelected
|
|
144
180
|
? { type: "sfSymbol", name: item.nativeIcon.sfSymbolSelected }
|
|
@@ -157,6 +193,6 @@ export function NativeTabHost({
|
|
|
157
193
|
|
|
158
194
|
export function TabHost(props: TabHostProps) {
|
|
159
195
|
const tabs = loadNativeTabs();
|
|
160
|
-
if (!tabs || !itemsHaveNativeIcons(props.items)) return <MpoTabHost {...props} />;
|
|
196
|
+
if (!tabs || !itemsHaveNativeIcons(props.items, Platform.OS)) return <MpoTabHost {...props} />;
|
|
161
197
|
return <NativeTabHost tabs={tabs} {...props} />;
|
|
162
198
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
+
import { HouseIcon, LightningIcon, SparkleIcon, SquaresFourIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Screen } from "../layouts/page";
|
|
5
|
+
import { Text } from "../Text";
|
|
6
|
+
import type { TabBarItem } from "./TabBar";
|
|
7
|
+
import { TabHost } from "./TabHost";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof TabHost> = {
|
|
10
|
+
title: "Components/TabHost",
|
|
11
|
+
component: TabHost,
|
|
12
|
+
parameters: { status: { type: "beta" }, layout: "fullscreen" },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof TabHost>;
|
|
17
|
+
|
|
18
|
+
const items: TabBarItem[] = [
|
|
19
|
+
{
|
|
20
|
+
key: "/",
|
|
21
|
+
label: "Home",
|
|
22
|
+
icon: HouseIcon,
|
|
23
|
+
nativeIcon: { sfSymbol: "house", sfSymbolSelected: "house.fill" },
|
|
24
|
+
},
|
|
25
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon, nativeIcon: { sfSymbol: "sparkles" } },
|
|
26
|
+
{
|
|
27
|
+
key: "/moves",
|
|
28
|
+
label: "Moves",
|
|
29
|
+
icon: LightningIcon,
|
|
30
|
+
nativeIcon: { sfSymbol: "bolt", sfSymbolSelected: "bolt.fill" },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "/backoffice",
|
|
34
|
+
label: "Backoffice",
|
|
35
|
+
icon: SquaresFourIcon,
|
|
36
|
+
nativeIcon: { sfSymbol: "square.grid.2x2", sfSymbolSelected: "square.grid.2x2.fill" },
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const rows = Array.from({ length: 30 }, (_, index) => `Row ${index + 1}`);
|
|
41
|
+
|
|
42
|
+
function Sections({ initial, outside }: { initial: string; outside?: boolean }) {
|
|
43
|
+
const [active, setActive] = useState(initial);
|
|
44
|
+
const label = items.find((item) => item.key === active)?.label;
|
|
45
|
+
return (
|
|
46
|
+
<TabHost items={items} activeKey={outside ? undefined : active} onTabPress={setActive}>
|
|
47
|
+
<Screen>
|
|
48
|
+
<Text>{outside ? "A route under no tab" : label}</Text>
|
|
49
|
+
{rows.map((row) => (
|
|
50
|
+
<Text key={row}>{row}</Text>
|
|
51
|
+
))}
|
|
52
|
+
</Screen>
|
|
53
|
+
</TabHost>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* One tab config: the system tab bar on an iPhone whose binary carries
|
|
59
|
+
* native tabs, the MPO floating TabBar on the web, GNOME, Android and an
|
|
60
|
+
* older binary.
|
|
61
|
+
*/
|
|
62
|
+
export const Default: Story = {
|
|
63
|
+
render: () => <Sections initial="/pokemon" />,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A route under no tab (no `activeKey`): no bar on any platform, and the
|
|
68
|
+
* screen keeps its place. AppShell keeps the bar on routes below a tab.
|
|
69
|
+
*/
|
|
70
|
+
export const OutsideTabs: Story = {
|
|
71
|
+
render: () => <Sections initial="/pokemon" outside />,
|
|
72
|
+
};
|
|
@@ -191,9 +191,9 @@ function Meter({ label, value, detail }: { label: string; value: number; detail:
|
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
//
|
|
194
|
+
// LC-112 (FZ-8665 Round 45): each icon trigger's panel covers its button with
|
|
195
|
+
// no X, and a press outside closes it. The join panel's title sits on the
|
|
196
|
+
// panel's padding.
|
|
197
197
|
function AddNode() {
|
|
198
198
|
return (
|
|
199
199
|
<Popover anchorMode="cover-trigger">
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
3
|
import { Sidebar } from "./sidebar";
|
|
4
4
|
|
|
5
|
+
const surface = vi.hoisted(() => ({ touch: false }));
|
|
6
|
+
vi.mock("@multiplatform.one/theme", async (original) => ({
|
|
7
|
+
...(await original<typeof import("@multiplatform.one/theme")>()),
|
|
8
|
+
useTouchSurface: () => surface.touch,
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
surface.touch = false;
|
|
13
|
+
});
|
|
14
|
+
|
|
5
15
|
describe("Sidebar selection tier", () => {
|
|
6
16
|
it("paints active row labels and metadata with selection ink", () => {
|
|
7
17
|
const result = renderWithProviders(
|
|
@@ -121,6 +131,56 @@ describe("Sidebar footer", () => {
|
|
|
121
131
|
});
|
|
122
132
|
});
|
|
123
133
|
|
|
134
|
+
describe("Sidebar rows on touch (FZ-8649)", () => {
|
|
135
|
+
const sections = [{ items: [{ value: "a", label: "Alpha", onPress: () => {} }] }];
|
|
136
|
+
|
|
137
|
+
it("holds a row to the 44pt floor on a touch surface", () => {
|
|
138
|
+
surface.touch = true;
|
|
139
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
140
|
+
expect(result.container.querySelector("[data-sidebar-row]")!.className).toContain("_mih-44px");
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("keeps a pointer rail at its token height", () => {
|
|
144
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
145
|
+
expect(result.container.querySelector("[data-sidebar-row]")!.className).not.toContain(
|
|
146
|
+
"_mih-44px",
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
describe("Sidebar hug (FZ-8649)", () => {
|
|
152
|
+
const sections = [{ items: [{ value: "a", label: "Alpha" }] }];
|
|
153
|
+
// Rows sit directly in the rail's first child unless a scroller wraps them.
|
|
154
|
+
const rowsAreDirect = (rail: HTMLElement) =>
|
|
155
|
+
Array.from(rail.firstElementChild!.children).some(
|
|
156
|
+
(child) => child.getAttribute("role") === "group",
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
it("fills its column by default and scrolls its rows", () => {
|
|
160
|
+
const result = renderWithProviders(
|
|
161
|
+
<Sidebar sections={sections} testID="rail" footer={<span>Account</span>} />,
|
|
162
|
+
);
|
|
163
|
+
const rail = result.getByTestId("rail");
|
|
164
|
+
expect(rail.className).toContain("_fg-1");
|
|
165
|
+
expect(rail.className).toContain("_h-10037");
|
|
166
|
+
expect(rail.querySelector("[data-sidebar-footer]")!.className).toContain("_mah-5037");
|
|
167
|
+
expect(rowsAreDirect(rail)).toBe(false);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("takes the height of its rows and leaves scrolling to the container", () => {
|
|
171
|
+
const result = renderWithProviders(
|
|
172
|
+
<Sidebar sections={sections} testID="rail" hug footer={<span>Account</span>} />,
|
|
173
|
+
);
|
|
174
|
+
const rail = result.getByTestId("rail");
|
|
175
|
+
expect(rail.className).not.toContain("_fg-1");
|
|
176
|
+
expect(rail.className).not.toContain("_h-10037");
|
|
177
|
+
expect(rail.querySelector("[data-sidebar-footer]")!.className).not.toContain("_mah-5037");
|
|
178
|
+
expect(rowsAreDirect(rail)).toBe(true);
|
|
179
|
+
expect(result.getByText("Alpha")).toBeTruthy();
|
|
180
|
+
expect(result.getByText("Account")).toBeTruthy();
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
124
184
|
describe("Sidebar on the shell material (FZ-7996)", () => {
|
|
125
185
|
const sections = [
|
|
126
186
|
{
|
|
@@ -57,11 +57,15 @@ describe("PageActionButton (LC-128, LC-172)", () => {
|
|
|
57
57
|
|
|
58
58
|
it("inks its glyph with the accent and keeps the back control's recipe", () => {
|
|
59
59
|
const { action, menu } = renderBar();
|
|
60
|
-
// The glyph
|
|
61
|
-
//
|
|
60
|
+
// The glyph carries the bar tint on its fill and its stroke, one ink
|
|
61
|
+
// (FZ-8649). The "…" beside it takes the bar tint too (LC-145, FZ-7993).
|
|
62
62
|
expect(rest(action, "_col-")).toHaveLength(1);
|
|
63
63
|
expect(rest(menu, "_col-")).toHaveLength(1);
|
|
64
|
-
|
|
64
|
+
const glyph = action.querySelector("svg");
|
|
65
|
+
const ink = glyph?.getAttribute("fill");
|
|
66
|
+
expect(ink).toBeTruthy();
|
|
67
|
+
expect(ink).not.toBe("currentColor");
|
|
68
|
+
if (glyph?.hasAttribute("stroke")) expect(glyph.getAttribute("stroke")).toBe(ink);
|
|
65
69
|
expect(action.getAttribute("data-size-token")).toBe(menu.getAttribute("data-size-token"));
|
|
66
70
|
expect(action.getAttribute("data-mp-button-height")).toBe(
|
|
67
71
|
menu.getAttribute("data-mp-button-height"),
|
package/src/layouts/sidebar.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
useResolvedKnobs,
|
|
11
11
|
wasKeyboardFocus,
|
|
12
12
|
transitionProps,
|
|
13
|
+
useTouchSurface,
|
|
13
14
|
} from "@multiplatform.one/theme";
|
|
14
15
|
import type React from "react";
|
|
15
16
|
import { Fragment, useId, useState } from "react";
|
|
@@ -26,6 +27,7 @@ import {
|
|
|
26
27
|
import { ScrollView } from "../ScrollView";
|
|
27
28
|
import { componentColors } from "../componentColors";
|
|
28
29
|
import { Text } from "../Text";
|
|
30
|
+
import { listRowTouchProps } from "../views/ListRow";
|
|
29
31
|
|
|
30
32
|
export interface SidebarSection {
|
|
31
33
|
/**
|
|
@@ -85,6 +87,12 @@ export interface SidebarProps {
|
|
|
85
87
|
* most half the rail, so the sections always keep the other half.
|
|
86
88
|
*/
|
|
87
89
|
footer?: React.ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Take the height of the rows instead of the column's: a rail inside a sheet
|
|
92
|
+
* that sizes to its content. The container owns scrolling, so the rail draws
|
|
93
|
+
* no scroller of its own and its footer follows the rows.
|
|
94
|
+
*/
|
|
95
|
+
hug?: boolean;
|
|
88
96
|
testID?: string;
|
|
89
97
|
/** Pinned above the rows, outside their scroll (an app's name in a shell rail). */
|
|
90
98
|
header?: React.ReactNode;
|
|
@@ -128,6 +136,13 @@ function useSidebarMaterial(enabled: boolean) {
|
|
|
128
136
|
return { backgroundColor };
|
|
129
137
|
}
|
|
130
138
|
|
|
139
|
+
const columnFill = { flex: 1, height: "100%", minHeight: 0 } as const;
|
|
140
|
+
const footerCap = { flexShrink: 1, minHeight: 0, maxHeight: "50%" } as const;
|
|
141
|
+
|
|
142
|
+
function RowScroller({ hug, children }: { hug: boolean; children: React.ReactNode }) {
|
|
143
|
+
return hug ? <>{children}</> : <ScrollView flex={1}>{children}</ScrollView>;
|
|
144
|
+
}
|
|
145
|
+
|
|
131
146
|
export function Sidebar({
|
|
132
147
|
sections,
|
|
133
148
|
width = 250,
|
|
@@ -135,12 +150,14 @@ export function Sidebar({
|
|
|
135
150
|
role = "navigation",
|
|
136
151
|
divider = true,
|
|
137
152
|
footer,
|
|
153
|
+
hug = false,
|
|
138
154
|
testID,
|
|
139
155
|
header,
|
|
140
156
|
children,
|
|
141
157
|
material = false,
|
|
142
158
|
}: SidebarProps) {
|
|
143
159
|
const { knobProps } = useResolvedKnobs();
|
|
160
|
+
const touch = useTouchSurface();
|
|
144
161
|
const materialProps = useSidebarMaterial(material);
|
|
145
162
|
const headingId = useId();
|
|
146
163
|
// LC-05: active row labels and metadata share the selection ink.
|
|
@@ -159,10 +176,8 @@ export function Sidebar({
|
|
|
159
176
|
role={role}
|
|
160
177
|
aria-label={ariaLabel}
|
|
161
178
|
width={width as number}
|
|
162
|
-
|
|
179
|
+
{...(hug ? undefined : columnFill)}
|
|
163
180
|
alignSelf="stretch"
|
|
164
|
-
height="100%"
|
|
165
|
-
minHeight={0}
|
|
166
181
|
// SF-CARD fill without a four-side control border (R-NONE). The end
|
|
167
182
|
// hairline is the panel divider (Axiom 15), stretched to the rail height.
|
|
168
183
|
{...knobProps.surface}
|
|
@@ -189,7 +204,7 @@ export function Sidebar({
|
|
|
189
204
|
{header}
|
|
190
205
|
</YStack>
|
|
191
206
|
) : null}
|
|
192
|
-
<
|
|
207
|
+
<RowScroller hug={hug}>
|
|
193
208
|
<YStack
|
|
194
209
|
{...knobProps.panelPadding}
|
|
195
210
|
paddingHorizontal={material ? sidebarRailInset : 0}
|
|
@@ -288,6 +303,7 @@ export function Sidebar({
|
|
|
288
303
|
width="100%"
|
|
289
304
|
alignSelf="stretch"
|
|
290
305
|
minHeight={knobProps.sizeToken as any}
|
|
306
|
+
{...listRowTouchProps(touch)}
|
|
291
307
|
paddingHorizontal={rowPad}
|
|
292
308
|
overflow="hidden"
|
|
293
309
|
{...knobProps.gap}
|
|
@@ -397,12 +413,10 @@ export function Sidebar({
|
|
|
397
413
|
})}
|
|
398
414
|
{children}
|
|
399
415
|
</YStack>
|
|
400
|
-
</
|
|
416
|
+
</RowScroller>
|
|
401
417
|
{footer != null && footer !== false ? (
|
|
402
418
|
<YStack
|
|
403
|
-
|
|
404
|
-
minHeight={0}
|
|
405
|
-
maxHeight="50%"
|
|
419
|
+
{...(hug ? undefined : footerCap)}
|
|
406
420
|
width="100%"
|
|
407
421
|
{...(material ? { paddingHorizontal: sidebarRailInset } : null)}
|
|
408
422
|
data-sidebar-footer=""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A menu row's trailing check column (LC-262, FZ-8665). The check's end edge
|
|
3
|
+
* sits on the row's trailing padding, and beside row icons it takes the
|
|
4
|
+
* icons' glyph, so it shares their stroke. The column is an icon wide either
|
|
5
|
+
* way, so a label never shifts between a menu with icons and one without.
|
|
6
|
+
*/
|
|
7
|
+
export declare function MenuCheckColumn({ checked, iconRow }: {
|
|
8
|
+
checked: boolean;
|
|
9
|
+
iconRow: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=MenuCheckColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuCheckColumn.d.ts","sourceRoot":"","sources":["../../src/CheckGlyph/MenuCheckColumn.tsx"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,2CAgB3F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MenuRowGlyph } from "@multiplatform.one/theme";
|
|
2
|
+
/**
|
|
3
|
+
* The check on a checked menu or picker row (LC-262, FZ-8557): the theme's
|
|
4
|
+
* `menuRowCheckGlyph` recipe in the check ink. A row with an icon passes
|
|
5
|
+
* `menuRowIconGlyph`, so the check takes the icons' stroke (FZ-8557 r3). The forms twin draws Select and Combobox; `CheckGlyph.spec.tsx` keeps the two equal.
|
|
6
|
+
*/
|
|
7
|
+
export declare function CheckGlyph({ glyph }: {
|
|
8
|
+
glyph?: MenuRowGlyph;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CheckGlyph/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAsB,MAAM,0BAA0B,CAAC;AAEpG;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAyB,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,YAAY,CAAA;CAAE,2CAGjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAUL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAUL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EACL,IAAI,EASL,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAGL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D,QAAQ,CAAC,OAAO,OAAO,CAAC,EACxB,UAAU,GAAG,UAAU,CACxB;IACC,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA8LD,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC;IAC7F,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAsBD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CAAC,OAAO,aAAa,CAAC;CAAG;AAEpF,iBAAS,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAE7D;AAED,MAAM,WAAW,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAClE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAgBtE;AAED,eAAO,MAAM,WAAW;;;;;;;CAOtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAcL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAcL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAiB,KAAK,UA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AAW,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CAgBxE;AAID,eAAO,MAAM,YAAY;;;;;;;CAOvB,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
package/types/Popover.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const Popover: import("react").ForwardRefExoticComponent<Omit<imp
|
|
|
61
61
|
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("tamagui").YStackProps, "scope"> & {
|
|
62
62
|
scope?: import("tamagui").PopoverScopes;
|
|
63
63
|
} & import("react").RefAttributes<import("tamagui").TamaguiElement>, "ref"> & import("react").RefAttributes<import("react-native").View | (HTMLElement & import("@tamagui/web").TamaguiElementMethods)>>;
|
|
64
|
-
/** A panel's title row
|
|
64
|
+
/** A panel's title row, on the panel's padding (LC-112). */
|
|
65
65
|
Header: typeof PanelHeader;
|
|
66
66
|
Anchor: import("react").NamedExoticComponent<Omit<import("tamagui").YStackProps, "scope"> & {
|
|
67
67
|
scope?: import("tamagui").PopoverScopes;
|
package/types/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,WAAW,EACX,KAAK,UAAU,EAGhB,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInE,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG;IAC/C,UAAU,CAAC,EAAE,eAAe,GAAG,QAAQ,CAAC;IACxC,UAAU,CAAC,EAAE,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AC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAClF,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC,CAAC;AAyKF,eAAO,MAAM,OAAO;;;;;sCA/KR,CAAA;;;;;;;iBATG,eAAe,GAAG,QAAQ;iBAC1B,SAAS;IACtB;;;OAGG;iBACU,UAAU;;;;;;;;;;;;;;;;;;;;;IAsLvB,4DAA4D;;;;;;;sBAQ43P,GAAI;qBAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAD59P,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SchemeToggle/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SchemeToggle/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAgBlC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,CAErE;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,eAAe,EACf,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAClD;IACC,aAAa,CAAC,EAAE,MAAM,gBAAgB,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,aAAmC,EACnC,GAAG,WAAW,EACf,EAAE,iBAAiB,2CA4BnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkCD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EAAE,aAAa,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,IAAY,GACb,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkCD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EAAE,aAAa,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,IAAY,GACb,EAAE,eAAe,2CAoHjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.native.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.native.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA8CH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAwB/C,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EAAE,aAAa,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,IAAY,GACb,EAAE,eAAe,2CAsdjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TreeSelect/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TreeSelect/index.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAAqC,MAAM,EAAS,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAWlD,YAAY,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIpE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,QAAQ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E,SAAS,EACvB,GAAG,UAAU,EACd,EAAE,eAAe,2CAqFjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/appShell/AppShell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/appShell/AppShell.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAepF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAIvD,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,uEAAuE;IACvE,UAAU,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC7C,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,iGAAiG;IACjG,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,wEAAwE;AACxE,wBAAgB,aAAa,CAC3B,YAAY,EAAE,SAAS,mBAAmB,EAAE,EAC5C,IAAI,EAAE,MAAM,GACX;IAAE,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAQnE;AAiKD,wBAAgB,QAAQ,CAAC,EACvB,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAc,EACd,QAAQ,EACR,MAAoB,GACrB,EAAE,aAAa,2CA0Pf"}
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ScopeMenu — a SystemBar menu that grows out of the pressed bar item
|
|
3
|
-
* (LC-105 COVER-TRIGGER).
|
|
4
|
-
*
|
|
5
|
-
* - Built on FloatingPanel's `cover` mode: the panel's top edge sits on the
|
|
6
|
-
* trigger's top edge and the panel scales from the trigger's top start
|
|
7
|
-
* corner, so the pressed item never moves.
|
|
8
|
-
* - The pressed item is kept as the menu's FIRST row, its chevron flipped
|
|
9
|
-
* (pointing up) to show the menu is open; pressing it closes the menu.
|
|
10
|
-
* - Rows are checkable (`menuitemradio` + `aria-checked`) and carry no
|
|
11
|
-
* icons: the check mark on the checked fill (`menuRowChecked`) is the
|
|
12
|
-
* state, not decoration.
|
|
13
|
-
* - One menu per scope. Tenant and environment are two ScopeMenus side by
|
|
14
|
-
* side, never one menu with two sections.
|
|
15
|
-
*
|
|
16
|
-
* Narrow viewports and native get FloatingPanel's sheet (phones take
|
|
17
|
-
* sheets); the first-row contract holds there too.
|
|
18
|
-
*/
|
|
19
1
|
import { type PanelWidth } from "@multiplatform.one/forms";
|
|
20
2
|
export interface ScopeMenuOption {
|
|
21
3
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeMenu.d.ts","sourceRoot":"","sources":["../../src/appShell/ScopeMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScopeMenu.d.ts","sourceRoot":"","sources":["../../src/appShell/ScopeMenu.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAiB,KAAK,UAAU,EAAmB,MAAM,0BAA0B,CAAC;AAQ3F,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,mFAAmF;IACnF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsGD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,UAAU,EACV,MAAqB,GACtB,EAAE,cAAc,2CAsDhB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import type { ImageSourcePropType } from "react-native";
|
|
2
3
|
/** A phosphor-style glyph: the bar sets its size, colour and weight. */
|
|
3
4
|
export type TabBarIcon = ComponentType<{
|
|
4
5
|
size?: number;
|
|
@@ -11,13 +12,18 @@ export interface TabBarItem {
|
|
|
11
12
|
label: string;
|
|
12
13
|
icon: TabBarIcon;
|
|
13
14
|
/**
|
|
14
|
-
* The
|
|
15
|
-
* on
|
|
15
|
+
* The glyphs the system tab bar draws (TabHost): SF Symbols on iOS, a
|
|
16
|
+
* raster template image on Android (Material's bar draws no SF Symbol or
|
|
17
|
+
* SVG; a bundled PNG, so an OTA can carry it). A platform keeps the MPO
|
|
18
|
+
* TabBar unless every item names its glyph.
|
|
16
19
|
*/
|
|
17
|
-
nativeIcon?:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
nativeIcon?: TabBarNativeIcon;
|
|
21
|
+
}
|
|
22
|
+
export interface TabBarNativeIcon {
|
|
23
|
+
sfSymbol?: string;
|
|
24
|
+
sfSymbolSelected?: string;
|
|
25
|
+
/** A monochrome PNG (24dp, @2x and @3x beside it); the bar tints it. */
|
|
26
|
+
android?: ImageSourcePropType;
|
|
21
27
|
}
|
|
22
28
|
export interface TabBarProps {
|
|
23
29
|
items: readonly TabBarItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/appShell/TabBar.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/appShell/TabBar.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQxD,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,UAAU;IACzB,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