@multiplatform.one/components 9.1.0 → 9.2.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/SheetModal/SheetBodyRegion.cjs +44 -0
- package/dist/cjs/SheetModal/SheetBodyRegion.native.js +48 -0
- package/dist/cjs/SheetModal/SheetBodyRegion.native.js.map +1 -0
- package/dist/cjs/SheetModal/SheetHeader.cjs +11 -14
- package/dist/cjs/SheetModal/SheetHeader.native.js +11 -14
- package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +57 -18
- package/dist/cjs/SheetModal/index.native.js +87 -65
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/actions/StandardAction.cjs +62 -1
- package/dist/cjs/actions/StandardAction.native.js +63 -1
- package/dist/cjs/actions/StandardAction.native.js.map +1 -1
- package/dist/cjs/appShell/TabHost.native.js +24 -3
- package/dist/cjs/appShell/TabHost.native.js.map +1 -1
- package/dist/cjs/appShell/bottomChrome.cjs +3 -0
- package/dist/cjs/appShell/bottomChrome.native.js +3 -0
- package/dist/cjs/appShell/bottomChrome.native.js.map +1 -1
- package/dist/cjs/appShell/index.cjs +2 -1
- package/dist/cjs/appShell/index.native.js +2 -1
- package/dist/cjs/appShell/index.native.js.map +1 -1
- package/dist/cjs/charts/ChartDataView.cjs +0 -1
- package/dist/cjs/charts/ChartDataView.native.js +0 -1
- package/dist/cjs/charts/ChartDataView.native.js.map +1 -1
- package/dist/cjs/icons/lucide.cjs +16 -8
- package/dist/cjs/icons/lucide.native.js +16 -8
- package/dist/cjs/icons/lucide.native.js.map +1 -1
- package/dist/cjs/icons/themed.cjs +4 -1
- package/dist/cjs/icons/themed.native.js +4 -1
- package/dist/cjs/icons/themed.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +25 -2
- package/dist/cjs/layouts/page.native.js +27 -2
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +4 -3
- package/dist/cjs/layouts/timeline.native.js +4 -3
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +1 -1
- package/dist/cjs/surfaces.native.js +1 -1
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/views/FilePreview.cjs +1 -1
- package/dist/cjs/views/FilePreview.native.js +1 -1
- package/dist/cjs/views/FilePreview.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetBodyRegion.mjs +19 -0
- package/dist/esm/SheetModal/SheetBodyRegion.mjs.map +1 -0
- package/dist/esm/SheetModal/SheetBodyRegion.native.js +20 -0
- package/dist/esm/SheetModal/SheetBodyRegion.native.js.map +1 -0
- package/dist/esm/SheetModal/SheetHeader.mjs +11 -14
- package/dist/esm/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js +11 -14
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +61 -22
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +89 -67
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/actions/StandardAction.mjs +63 -2
- package/dist/esm/actions/StandardAction.mjs.map +1 -1
- package/dist/esm/actions/StandardAction.native.js +64 -2
- package/dist/esm/actions/StandardAction.native.js.map +1 -1
- package/dist/esm/appShell/TabHost.native.js +26 -5
- package/dist/esm/appShell/TabHost.native.js.map +1 -1
- package/dist/esm/appShell/bottomChrome.mjs +2 -1
- package/dist/esm/appShell/bottomChrome.mjs.map +1 -1
- package/dist/esm/appShell/bottomChrome.native.js +2 -1
- package/dist/esm/appShell/bottomChrome.native.js.map +1 -1
- package/dist/esm/appShell/index.mjs +2 -2
- package/dist/esm/appShell/index.mjs.map +1 -1
- package/dist/esm/appShell/index.native.js +2 -2
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.mjs +0 -1
- package/dist/esm/charts/ChartDataView.mjs.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js +0 -1
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/icons/lucide.mjs +11 -3
- package/dist/esm/icons/lucide.mjs.map +1 -1
- package/dist/esm/icons/lucide.native.js +11 -3
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.mjs +4 -1
- package/dist/esm/icons/themed.mjs.map +1 -1
- package/dist/esm/icons/themed.native.js +4 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +26 -3
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +28 -3
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +2 -1
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +2 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/surfaces.mjs +1 -1
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +1 -1
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/views/FilePreview.mjs +1 -1
- package/dist/esm/views/FilePreview.mjs.map +1 -1
- package/dist/esm/views/FilePreview.native.js +1 -1
- package/dist/esm/views/FilePreview.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetBodyRegion.mjs +19 -0
- package/dist/jsx/SheetModal/SheetBodyRegion.mjs.map +1 -0
- package/dist/jsx/SheetModal/SheetBodyRegion.native.js +48 -0
- package/dist/jsx/SheetModal/SheetBodyRegion.native.js.map +1 -0
- package/dist/jsx/SheetModal/SheetHeader.mjs +11 -14
- package/dist/jsx/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js +11 -14
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +61 -22
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +87 -65
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/actions/StandardAction.mjs +63 -2
- package/dist/jsx/actions/StandardAction.mjs.map +1 -1
- package/dist/jsx/actions/StandardAction.native.js +63 -1
- package/dist/jsx/actions/StandardAction.native.js.map +1 -1
- package/dist/jsx/appShell/TabHost.native.js +24 -3
- package/dist/jsx/appShell/TabHost.native.js.map +1 -1
- package/dist/jsx/appShell/bottomChrome.mjs +2 -1
- package/dist/jsx/appShell/bottomChrome.mjs.map +1 -1
- package/dist/jsx/appShell/bottomChrome.native.js +3 -0
- package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
- package/dist/jsx/appShell/index.mjs +2 -2
- package/dist/jsx/appShell/index.mjs.map +1 -1
- package/dist/jsx/appShell/index.native.js +2 -1
- package/dist/jsx/charts/ChartDataView.mjs +0 -1
- package/dist/jsx/charts/ChartDataView.mjs.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +0 -1
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/icons/lucide.mjs +11 -3
- package/dist/jsx/icons/lucide.mjs.map +1 -1
- package/dist/jsx/icons/lucide.native.js +16 -8
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.mjs +4 -1
- package/dist/jsx/icons/themed.mjs.map +1 -1
- package/dist/jsx/icons/themed.native.js +4 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +26 -3
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +27 -2
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +2 -1
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +4 -3
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/surfaces.mjs +1 -1
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +1 -1
- package/dist/jsx/views/FilePreview.mjs +1 -1
- package/dist/jsx/views/FilePreview.mjs.map +1 -1
- package/dist/jsx/views/FilePreview.native.js +1 -1
- package/dist/jsx/views/FilePreview.native.js.map +1 -1
- package/package.json +7 -7
- package/src/SheetFrame.stories.tsx +2 -2
- package/src/SheetModal/SheetBodyRegion.tsx +19 -0
- package/src/SheetModal/SheetHeader.tsx +23 -27
- package/src/SheetModal/SheetModal.grabber.spec.tsx +52 -10
- package/src/SheetModal/SheetModal.native.spec.tsx +90 -6
- package/src/SheetModal/SheetModal.noHeaderBar.spec.tsx +103 -0
- package/src/SheetModal/SheetModal.onDismiss.spec.tsx +35 -0
- package/src/SheetModal/SheetModal.stories.spec.tsx +11 -13
- package/src/SheetModal/SheetModal.stories.tsx +2 -6
- package/src/SheetModal/SheetModal.titleRow.spec.tsx +203 -0
- package/src/SheetModal/index.native.tsx +83 -54
- package/src/SheetModal/index.tsx +99 -25
- package/src/SheetScrollView/SheetScrollView.stories.tsx +2 -2
- package/src/actions/StandardAction.tsx +72 -4
- package/src/appShell/TabHost.native.tsx +50 -5
- package/src/appShell/TabHost.nestedScroll.spec.tsx +177 -0
- package/src/appShell/bottomChrome.ts +2 -0
- package/src/appShell/index.ts +1 -1
- package/src/charts/ChartDataView.tsx +0 -1
- package/src/charts/Charts.stories.tsx +20 -0
- package/src/icons/lucide.glyphGrid.spec.tsx +41 -0
- package/src/icons/lucide.ts +21 -2
- package/src/icons/themed.tsx +6 -2
- package/src/layouts/page.tsx +35 -2
- package/src/layouts/severityShape.spec.tsx +31 -0
- package/src/layouts/timeline.tsx +1 -1
- package/src/surfaces.spec.tsx +6 -2
- package/src/surfaces.tsx +1 -1
- package/src/views/FilePreview.tsx +1 -8
- package/src/views/filePreview.spec.tsx +3 -4
- package/types/Chip/index.d.ts +1 -1
- package/types/Collapsible.d.ts +1 -1
- package/types/Dialog.d.ts +3 -3
- package/types/SheetModal/SheetBodyRegion.d.ts +9 -0
- package/types/SheetModal/SheetBodyRegion.d.ts.map +1 -0
- package/types/SheetModal/SheetHeader.d.ts +4 -4
- package/types/SheetModal/SheetHeader.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts +12 -4
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/actions/StandardAction.d.ts +4 -3
- package/types/actions/StandardAction.d.ts.map +1 -1
- package/types/appShell/TabHost.native.d.ts.map +1 -1
- package/types/appShell/bottomChrome.d.ts +1 -0
- package/types/appShell/bottomChrome.d.ts.map +1 -1
- package/types/appShell/index.d.ts +1 -1
- package/types/appShell/index.d.ts.map +1 -1
- package/types/charts/ChartDataView.d.ts.map +1 -1
- package/types/icons/lucide.d.ts +7 -3
- package/types/icons/lucide.d.ts.map +1 -1
- package/types/icons/themed.d.ts.map +1 -1
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/views/FilePreview.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@floating-ui/react": "^0.27.20",
|
|
73
|
-
"@multiplatform.one/forms": "^9.
|
|
74
|
-
"@multiplatform.one/platform": "^9.
|
|
75
|
-
"@multiplatform.one/theme": "^9.
|
|
73
|
+
"@multiplatform.one/forms": "^9.2.0",
|
|
74
|
+
"@multiplatform.one/platform": "^9.2.0",
|
|
75
|
+
"@multiplatform.one/theme": "^9.2.0",
|
|
76
76
|
"@phosphor-icons/react": "^2.1.10",
|
|
77
77
|
"@shopify/flash-list": "^2.3.1",
|
|
78
78
|
"@tamagui/colors": "2.7.6",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"tamagui": "2.7.6"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@multiplatform.one/config": "9.
|
|
103
|
-
"@multiplatform.one/storybook": "9.
|
|
104
|
-
"@multiplatform.one/test-utils": "9.
|
|
102
|
+
"@multiplatform.one/config": "9.2.0",
|
|
103
|
+
"@multiplatform.one/storybook": "9.2.0",
|
|
104
|
+
"@multiplatform.one/test-utils": "9.2.0",
|
|
105
105
|
"@tamagui/build": "2.7.6",
|
|
106
106
|
"@testing-library/jest-dom": "^7.0.1",
|
|
107
107
|
"@testing-library/react": "^16.3.3",
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
|
-
import {
|
|
5
|
+
import { sheetHandle } from "@multiplatform.one/theme";
|
|
6
6
|
import { isWeb, Sheet, YStack } from "tamagui";
|
|
7
7
|
import { ScrollView } from "./ScrollView";
|
|
8
8
|
import { SheetModal } from "./SheetModal";
|
|
@@ -84,7 +84,7 @@ function TabsInSheetHarness() {
|
|
|
84
84
|
onPositionChange={setPosition}
|
|
85
85
|
dismissOnSnapToBottom={false}
|
|
86
86
|
>
|
|
87
|
-
<Sheet.Handle {...
|
|
87
|
+
<Sheet.Handle {...sheetHandle} aria-label="Resize" />
|
|
88
88
|
<SheetFrame borderBottomLeftRadius={0} borderBottomRightRadius={0}>
|
|
89
89
|
<SizableText fontWeight="600">Stack</SizableText>
|
|
90
90
|
<Tabs
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SheetBodyProvider } from "@multiplatform.one/theme";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { DialogRegionContext } from "../surfaces";
|
|
4
|
+
|
|
5
|
+
const IN_DIALOG_REGION = { inDialogRegion: true } as const;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A sheet's body: a dialog region (DG-OVL-04) and a sheet body (FZ-11418), so
|
|
9
|
+
* an `OverlayHeader` inside draws its title as content with no ✕.
|
|
10
|
+
*/
|
|
11
|
+
export function SheetBodyRegion({ children }: { children?: ReactNode }) {
|
|
12
|
+
return (
|
|
13
|
+
<SheetBodyProvider value>
|
|
14
|
+
<DialogRegionContext.Provider value={IN_DIALOG_REGION}>
|
|
15
|
+
{children}
|
|
16
|
+
</DialogRegionContext.Provider>
|
|
17
|
+
</SheetBodyProvider>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -31,10 +31,10 @@ export function isOverlayHeader(node: ReactNode): node is ReactElement<OverlayHe
|
|
|
31
31
|
* icon buttons in the trailing area (LC-262 DIRECT-ACTIONS), never hidden in a
|
|
32
32
|
* menu. The actions are a bar (LC-153), so they take the bar tint (LC-176).
|
|
33
33
|
*
|
|
34
|
-
* An `OverlayHeader` is the sheet's
|
|
35
|
-
* the accent ✓ trailing, and `actions` between the title
|
|
36
|
-
* confirm keeps the trailing edge. A lone action is not a
|
|
37
|
-
*
|
|
34
|
+
* An `OverlayHeader` is the sheet's title row, content rather than a bar
|
|
35
|
+
* (FZ-11418): no ✕, the accent ✓ trailing, and `actions` between the title
|
|
36
|
+
* and the ✓, so the confirm keeps the trailing edge. A lone action is not a
|
|
37
|
+
* group: on iOS its glass is a circle, not a capsule.
|
|
38
38
|
*/
|
|
39
39
|
export function SheetHeader({
|
|
40
40
|
header,
|
|
@@ -48,29 +48,25 @@ export function SheetHeader({
|
|
|
48
48
|
}) {
|
|
49
49
|
if (isOverlayHeader(header)) {
|
|
50
50
|
const own = header.props.actions;
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
actions
|
|
56
|
-
<
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})
|
|
71
|
-
: header}
|
|
72
|
-
</Surface>
|
|
73
|
-
);
|
|
51
|
+
return actions
|
|
52
|
+
? cloneElement(header, {
|
|
53
|
+
actions: (
|
|
54
|
+
<XStack testID="sheet-modal-header-actions" flexShrink={0} alignItems="center">
|
|
55
|
+
{countItems(own) + countItems(actions) > 1 ? (
|
|
56
|
+
<IconButtonGroup>
|
|
57
|
+
{own}
|
|
58
|
+
{actions}
|
|
59
|
+
</IconButtonGroup>
|
|
60
|
+
) : (
|
|
61
|
+
<>
|
|
62
|
+
{own}
|
|
63
|
+
{actions}
|
|
64
|
+
</>
|
|
65
|
+
)}
|
|
66
|
+
</XStack>
|
|
67
|
+
),
|
|
68
|
+
})
|
|
69
|
+
: header;
|
|
74
70
|
}
|
|
75
71
|
if (!actions) return <>{header}</>;
|
|
76
72
|
return (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FZ-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* FZ-11418: SheetModal draws tamagui's Sheet.Handle, the theme's
|
|
3
|
+
* `sheetHandle`, as a pill detached ABOVE the frame on the scrim, on the web
|
|
4
|
+
* and on native, and rounds the frame's top at the sheet radius on both.
|
|
5
|
+
* FloatingPanel's sheet keeps `sheetGrabber` (`public/forms/.../sheetGrabber.spec.tsx`).
|
|
5
6
|
*/
|
|
6
7
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
7
|
-
import {
|
|
8
|
+
import { sheetHandle, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
8
9
|
import { describe, expect, it, vi } from "vitest";
|
|
9
10
|
import { Text, View } from "tamagui";
|
|
10
11
|
import { SheetModal as NativeSheetModal } from "./index.native";
|
|
@@ -19,25 +20,63 @@ vi.mock("react-native-web", async (importOriginal) => ({
|
|
|
19
20
|
const atoms = (node: Element) => String(node.className).split(/\s+/).filter(Boolean);
|
|
20
21
|
|
|
21
22
|
function recipeAtoms() {
|
|
22
|
-
const view = renderWithProviders(<View testID="recipe" {...
|
|
23
|
+
const view = renderWithProviders(<View testID="recipe" {...sheetHandle} />);
|
|
23
24
|
const list = atoms(view.getByTestId("recipe"));
|
|
24
25
|
view.unmount();
|
|
25
26
|
return list;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
function TopCorners() {
|
|
30
|
+
const { knobProps } = useResolvedKnobs();
|
|
31
|
+
return (
|
|
32
|
+
<View
|
|
33
|
+
testID="corners"
|
|
34
|
+
borderTopLeftRadius={knobProps.sheetRadius.borderRadius}
|
|
35
|
+
borderTopRightRadius={knobProps.sheetRadius.borderRadius}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function cornerAtoms() {
|
|
41
|
+
const view = renderWithProviders(<TopCorners />);
|
|
42
|
+
const list = atoms(view.getByTestId("corners"));
|
|
43
|
+
view.unmount();
|
|
44
|
+
return list;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const precedes = (a: Element, b: Element) =>
|
|
48
|
+
(a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;
|
|
49
|
+
|
|
50
|
+
describe("SheetModal handle (FZ-11418, tamagui's Sheet.Handle)", () => {
|
|
51
|
+
it("draws the handle recipe above the native frame, outside it", () => {
|
|
30
52
|
const recipe = recipeAtoms();
|
|
31
53
|
const result = renderWithProviders(
|
|
32
54
|
<NativeSheetModal open onOpenChange={() => {}}>
|
|
33
55
|
<Text>Body</Text>
|
|
34
56
|
</NativeSheetModal>,
|
|
35
57
|
);
|
|
36
|
-
const
|
|
37
|
-
|
|
58
|
+
const zone = result.getByTestId("sheet-modal-grabber");
|
|
59
|
+
const surface = result.getByTestId("sheet-modal-surface");
|
|
60
|
+
const pill = zone.firstElementChild as Element;
|
|
61
|
+
expect(atoms(pill)).toEqual(expect.arrayContaining(recipe));
|
|
62
|
+
expect(surface.contains(zone)).toBe(false);
|
|
63
|
+
expect(precedes(zone, surface)).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("rounds the native frame's top at the sheet radius", () => {
|
|
67
|
+
const corners = cornerAtoms();
|
|
68
|
+
const result = renderWithProviders(
|
|
69
|
+
<NativeSheetModal open onOpenChange={() => {}}>
|
|
70
|
+
<Text>Body</Text>
|
|
71
|
+
</NativeSheetModal>,
|
|
72
|
+
);
|
|
73
|
+
expect(atoms(result.getByTestId("sheet-modal-surface"))).toEqual(
|
|
74
|
+
expect.arrayContaining(corners),
|
|
75
|
+
);
|
|
76
|
+
expect(atoms(result.getByTestId("sheet-modal-clip"))).toEqual(expect.arrayContaining(corners));
|
|
38
77
|
});
|
|
39
78
|
|
|
40
|
-
it("draws the recipe
|
|
79
|
+
it("draws the handle recipe above the web frame, outside it, with no transform", async () => {
|
|
41
80
|
const recipe = recipeAtoms();
|
|
42
81
|
const result = renderWithProviders(
|
|
43
82
|
<SheetModal open onOpenChange={() => {}}>
|
|
@@ -45,7 +84,10 @@ describe("SheetModal grabber (FZ-8648)", () => {
|
|
|
45
84
|
</SheetModal>,
|
|
46
85
|
);
|
|
47
86
|
const handle = await result.findByLabelText("Resize");
|
|
87
|
+
const frame = document.querySelector("[role='dialog']") as Element;
|
|
48
88
|
expect(atoms(handle)).toEqual(expect.arrayContaining(recipe));
|
|
49
89
|
expect(handle.getAttribute("style") ?? "").not.toMatch(/transform/);
|
|
90
|
+
expect(frame.contains(handle)).toBe(false);
|
|
91
|
+
expect(precedes(handle, frame)).toBe(true);
|
|
50
92
|
});
|
|
51
93
|
});
|
|
@@ -2,22 +2,44 @@ import { Preset } from "@multiplatform.one/theme";
|
|
|
2
2
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
3
3
|
import { act } from "@testing-library/react";
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { Animated, PanResponder } from "react-native";
|
|
5
|
+
import { Animated, PanResponder, Platform } from "react-native";
|
|
6
6
|
import { Text } from "tamagui";
|
|
7
7
|
import { useSheetNavigation } from "@multiplatform.one/forms";
|
|
8
8
|
import { fireEvent } from "@testing-library/react";
|
|
9
9
|
import { SheetModal } from "./index.native";
|
|
10
10
|
|
|
11
|
-
const modal = vi.hoisted(() => ({
|
|
11
|
+
const modal = vi.hoisted(() => ({
|
|
12
|
+
onShow: undefined as undefined | (() => void),
|
|
13
|
+
onDismiss: undefined as undefined | (() => void),
|
|
14
|
+
animationType: undefined as undefined | string,
|
|
15
|
+
}));
|
|
12
16
|
vi.mock("react-native-web", async (importOriginal) => ({
|
|
13
17
|
...(await importOriginal<typeof import("react-native")>()),
|
|
14
18
|
ActionSheetIOS: undefined,
|
|
15
|
-
Modal: ({
|
|
19
|
+
Modal: ({
|
|
20
|
+
children,
|
|
21
|
+
onShow,
|
|
22
|
+
onDismiss,
|
|
23
|
+
animationType,
|
|
24
|
+
}: {
|
|
25
|
+
children: import("react").ReactNode;
|
|
26
|
+
onShow?: () => void;
|
|
27
|
+
onDismiss?: () => void;
|
|
28
|
+
animationType?: string;
|
|
29
|
+
}) => {
|
|
16
30
|
modal.onShow = onShow;
|
|
31
|
+
modal.onDismiss = onDismiss;
|
|
32
|
+
modal.animationType = animationType;
|
|
17
33
|
return children;
|
|
18
34
|
},
|
|
19
35
|
}));
|
|
20
36
|
|
|
37
|
+
function slideCalls() {
|
|
38
|
+
return vi
|
|
39
|
+
.mocked(Animated.timing)
|
|
40
|
+
.mock.calls.filter(([, config]) => (config as { toValue: number }).toValue === 0);
|
|
41
|
+
}
|
|
42
|
+
|
|
21
43
|
const onOpenChange = vi.fn();
|
|
22
44
|
let dismissCompletion: (result: { finished: boolean }) => void;
|
|
23
45
|
let release: () => void;
|
|
@@ -26,6 +48,8 @@ beforeEach(() => {
|
|
|
26
48
|
vi.useFakeTimers();
|
|
27
49
|
completions = [];
|
|
28
50
|
modal.onShow = undefined;
|
|
51
|
+
modal.onDismiss = undefined;
|
|
52
|
+
modal.animationType = undefined;
|
|
29
53
|
onOpenChange.mockReset();
|
|
30
54
|
vi.spyOn(PanResponder, "create").mockImplementation((config) => {
|
|
31
55
|
release = () => config.onPanResponderRelease?.({} as never, { dy: 1000, vy: 2 } as never);
|
|
@@ -76,10 +100,10 @@ describe("SheetModal native presentation lifecycle", () => {
|
|
|
76
100
|
});
|
|
77
101
|
it("enters without onShow and ignores onShow for the same presentation", () => {
|
|
78
102
|
renderWithProviders(panel(true));
|
|
79
|
-
expect(
|
|
103
|
+
expect(slideCalls()).toHaveLength(1);
|
|
80
104
|
expect(modal.onShow).toBeTypeOf("function");
|
|
81
105
|
act(() => modal.onShow?.());
|
|
82
|
-
expect(
|
|
106
|
+
expect(slideCalls()).toHaveLength(1);
|
|
83
107
|
});
|
|
84
108
|
it("keeps an open presentation in place when animation changes and uses it on the next open", () => {
|
|
85
109
|
const { rerender } = renderWithProviders(
|
|
@@ -87,7 +111,7 @@ describe("SheetModal native presentation lifecycle", () => {
|
|
|
87
111
|
);
|
|
88
112
|
const writes = vi.spyOn(Animated.Value.prototype, "setValue");
|
|
89
113
|
rerender(<Preset overrides={{ animation: "slow" }}>{panel(true)}</Preset>);
|
|
90
|
-
expect(
|
|
114
|
+
expect(slideCalls()).toHaveLength(1);
|
|
91
115
|
expect(writes).not.toHaveBeenCalled();
|
|
92
116
|
rerender(<Preset overrides={{ animation: "slow" }}>{panel(false)}</Preset>);
|
|
93
117
|
rerender(<Preset overrides={{ animation: "slow" }}>{panel(true)}</Preset>);
|
|
@@ -169,6 +193,66 @@ describe("SheetModal native presentation lifecycle", () => {
|
|
|
169
193
|
});
|
|
170
194
|
});
|
|
171
195
|
|
|
196
|
+
describe("SheetModal native latency (FZ-11084)", () => {
|
|
197
|
+
function sheet(open: boolean, onDismiss?: () => void) {
|
|
198
|
+
return (
|
|
199
|
+
<SheetModal open={open} onOpenChange={onOpenChange} onDismiss={onDismiss}>
|
|
200
|
+
<Text>row</Text>
|
|
201
|
+
</SheetModal>
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
it("presents without a cross-dissolve, so the slide is the only transition", () => {
|
|
206
|
+
renderWithProviders(sheet(true));
|
|
207
|
+
expect(modal.animationType).toBe("none");
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it("dims the scrim in place on the JS driver over the scrim duration", () => {
|
|
211
|
+
renderWithProviders(sheet(true));
|
|
212
|
+
expect(Animated.timing).toHaveBeenCalledWith(
|
|
213
|
+
expect.anything(),
|
|
214
|
+
expect.objectContaining({ toValue: 1, useNativeDriver: false }),
|
|
215
|
+
);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it("closes on an outside press in the first frame, with no arming delay", () => {
|
|
219
|
+
const view = renderWithProviders(sheet(true));
|
|
220
|
+
act(() => {
|
|
221
|
+
fireEvent.click(view.getByRole("button", { name: "Close" }));
|
|
222
|
+
});
|
|
223
|
+
expect(onOpenChange).toHaveBeenCalledExactlyOnceWith(false);
|
|
224
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("forwards the iOS modal dismissal to onDismiss, once, only after a close", () => {
|
|
228
|
+
const os = Platform.OS;
|
|
229
|
+
Object.defineProperty(Platform, "OS", { value: "ios", configurable: true });
|
|
230
|
+
try {
|
|
231
|
+
const onDismiss = vi.fn();
|
|
232
|
+
const { rerender } = renderWithProviders(sheet(true, onDismiss));
|
|
233
|
+
act(() => modal.onDismiss?.());
|
|
234
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
235
|
+
rerender(sheet(false, onDismiss));
|
|
236
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
237
|
+
act(() => modal.onDismiss?.());
|
|
238
|
+
act(() => modal.onDismiss?.());
|
|
239
|
+
expect(onDismiss).toHaveBeenCalledTimes(1);
|
|
240
|
+
} finally {
|
|
241
|
+
Object.defineProperty(Platform, "OS", { value: os, configurable: true });
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it("fires onDismiss once the close commits where the modal has no dismissal event", () => {
|
|
246
|
+
const onDismiss = vi.fn();
|
|
247
|
+
const { rerender } = renderWithProviders(sheet(false, onDismiss));
|
|
248
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
249
|
+
rerender(sheet(true, onDismiss));
|
|
250
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
251
|
+
rerender(sheet(false, onDismiss));
|
|
252
|
+
expect(onDismiss).toHaveBeenCalledTimes(1);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
172
256
|
describe("SheetModal native navigation stack (FZ-7830 round 3)", () => {
|
|
173
257
|
function Pusher() {
|
|
174
258
|
const store = useSheetNavigation();
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-11418: a sheet has no header bar and no ✕, as tamagui's Sheet has none.
|
|
3
|
+
* An `OverlayHeader` passed to SheetModal draws its title as the body's first
|
|
4
|
+
* line; the sheet still closes by Escape on the web and by the scrim, which
|
|
5
|
+
* is the screen reader's "Close" on native, beside its accessibility escape.
|
|
6
|
+
* A centred dialog opened from a sheet keeps its own ✕.
|
|
7
|
+
*/
|
|
8
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
9
|
+
import { DialogContent, SheetBodyProvider } from "@multiplatform.one/theme";
|
|
10
|
+
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
11
|
+
import { readFileSync } from "node:fs";
|
|
12
|
+
import { dirname, join } from "node:path";
|
|
13
|
+
import { fileURLToPath } from "node:url";
|
|
14
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
15
|
+
import { Dialog, Text } from "tamagui";
|
|
16
|
+
import { OverlayHeader } from "../actions/StandardAction";
|
|
17
|
+
import { SheetModal as NativeSheetModal } from "./index.native";
|
|
18
|
+
import { SheetModal } from "./index";
|
|
19
|
+
|
|
20
|
+
vi.mock("react-native-web", async (importOriginal) => ({
|
|
21
|
+
...(await importOriginal<typeof import("react-native")>()),
|
|
22
|
+
ActionSheetIOS: undefined,
|
|
23
|
+
Modal: ({ children }: { children: import("react").ReactNode }) => children,
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
afterEach(cleanup);
|
|
27
|
+
|
|
28
|
+
const header = <OverlayHeader title="Move to project" onClose={() => {}} />;
|
|
29
|
+
|
|
30
|
+
describe("SheetModal draws no header bar and no ✕ (FZ-11418)", () => {
|
|
31
|
+
it("web: the title is content and no close button is drawn", async () => {
|
|
32
|
+
renderWithProviders(
|
|
33
|
+
<SheetModal open onOpenChange={() => {}} header={header}>
|
|
34
|
+
<Text>Body</Text>
|
|
35
|
+
</SheetModal>,
|
|
36
|
+
);
|
|
37
|
+
const frame = (await screen.findAllByRole("dialog"))[0]!;
|
|
38
|
+
const row = frame.querySelector("[data-mp-overlay-header]")!;
|
|
39
|
+
expect(row.getAttribute("data-mp-overlay-face")).toBe("sheet");
|
|
40
|
+
expect(row.textContent).toBe("Move to project");
|
|
41
|
+
expect(frame.querySelectorAll("[role='button']")).toHaveLength(0);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("native: the only Close is the scrim, outside the sheet's surface", () => {
|
|
45
|
+
renderWithProviders(
|
|
46
|
+
<NativeSheetModal open onOpenChange={() => {}} header={header}>
|
|
47
|
+
<Text>Body</Text>
|
|
48
|
+
</NativeSheetModal>,
|
|
49
|
+
);
|
|
50
|
+
const surface = screen.getByTestId("sheet-modal-surface");
|
|
51
|
+
expect(surface.textContent).toContain("Move to project");
|
|
52
|
+
const closes = screen.getAllByRole("button", { name: "Close" });
|
|
53
|
+
expect(closes).toHaveLength(1);
|
|
54
|
+
expect(surface.contains(closes[0]!)).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("web: Escape still dismisses", async () => {
|
|
58
|
+
const onOpenChange = vi.fn();
|
|
59
|
+
renderWithProviders(
|
|
60
|
+
<SheetModal open onOpenChange={onOpenChange} header={header}>
|
|
61
|
+
<Text>Body</Text>
|
|
62
|
+
</SheetModal>,
|
|
63
|
+
);
|
|
64
|
+
await screen.findAllByRole("dialog");
|
|
65
|
+
fireEvent.keyDown(window, { key: "Escape" });
|
|
66
|
+
expect(onOpenChange).toHaveBeenCalledWith(false);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it("native: the surface keeps VoiceOver's escape and modal scope", () => {
|
|
70
|
+
const src = readFileSync(
|
|
71
|
+
join(dirname(fileURLToPath(import.meta.url)), "index.native.tsx"),
|
|
72
|
+
"utf8",
|
|
73
|
+
);
|
|
74
|
+
expect(src).toContain("onAccessibilityEscape={close}");
|
|
75
|
+
expect(src).toContain("accessibilityViewIsModal");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("an OverlayHeader with nothing to show draws nothing in a sheet", () => {
|
|
79
|
+
const { container } = renderWithProviders(
|
|
80
|
+
<SheetBodyProvider value>
|
|
81
|
+
<OverlayHeader onClose={() => {}} />
|
|
82
|
+
</SheetBodyProvider>,
|
|
83
|
+
);
|
|
84
|
+
expect(container.querySelector("[data-mp-overlay-header]")).toBeNull();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("a centred dialog opened from a sheet keeps its ✕", async () => {
|
|
88
|
+
renderWithProviders(
|
|
89
|
+
<SheetBodyProvider value>
|
|
90
|
+
<Dialog modal open>
|
|
91
|
+
<Dialog.Portal>
|
|
92
|
+
<DialogContent>
|
|
93
|
+
<OverlayHeader title="About" onClose={() => {}} />
|
|
94
|
+
</DialogContent>
|
|
95
|
+
</Dialog.Portal>
|
|
96
|
+
</Dialog>
|
|
97
|
+
</SheetBodyProvider>,
|
|
98
|
+
);
|
|
99
|
+
const close = await screen.findByRole("button", { name: "Close" });
|
|
100
|
+
const row = close.closest("[data-mp-overlay-header]")!;
|
|
101
|
+
expect(row.getAttribute("data-mp-overlay-face")).toBeNull();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { Text } from "tamagui";
|
|
5
|
+
import { SheetModal } from "./index";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* FZ-11084: a consumer that presents something after a sheet closes needs to
|
|
9
|
+
* know when the sheet is gone, not guess at a delay. The web twin reports it
|
|
10
|
+
* when the exit slide completes, once per close, never for a sheet that was
|
|
11
|
+
* never open.
|
|
12
|
+
*/
|
|
13
|
+
function sheet(open: boolean, onDismiss: () => void) {
|
|
14
|
+
return (
|
|
15
|
+
<SheetModal open={open} onOpenChange={() => {}} onDismiss={onDismiss}>
|
|
16
|
+
<Text>row</Text>
|
|
17
|
+
</SheetModal>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe("SheetModal web onDismiss (FZ-11084)", () => {
|
|
22
|
+
it("fires once after a close and not for a sheet that never opened", async () => {
|
|
23
|
+
const onDismiss = vi.fn();
|
|
24
|
+
const { rerender } = renderWithProviders(sheet(false, onDismiss));
|
|
25
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
26
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
27
|
+
rerender(sheet(true, onDismiss));
|
|
28
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
29
|
+
expect(onDismiss).not.toHaveBeenCalled();
|
|
30
|
+
rerender(sheet(false, onDismiss));
|
|
31
|
+
await waitFor(() => expect(onDismiss).toHaveBeenCalledTimes(1));
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
33
|
+
expect(onDismiss).toHaveBeenCalledTimes(1);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -48,22 +48,23 @@ describe("SheetModal stories", () => {
|
|
|
48
48
|
for (const frame of frames) expect(frame.getAttribute("aria-modal")).toBe("true");
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
it("the
|
|
51
|
+
it("FZ-11418: the title row carries the confirm as a symbol and draws no ✕ or Cancel", () => {
|
|
52
52
|
renderWithProviders(<>{OpenOnMount.render?.({} as never, {} as never)}</>);
|
|
53
|
-
const cancel = screen.getAllByRole("button", { name: "Cancel" });
|
|
54
53
|
const move = screen.getAllByRole("button", { name: "Move" });
|
|
55
|
-
expect(cancel.length).toBeGreaterThan(0);
|
|
56
54
|
expect(move.length).toBeGreaterThan(0);
|
|
57
|
-
for (const button of
|
|
55
|
+
for (const button of move) expect(button.textContent).toBe("");
|
|
58
56
|
expect(move[0]!.getAttribute("data-mp-icon-button")).toBe("primary");
|
|
57
|
+
expect(screen.queryAllByRole("button", { name: "Cancel" })).toHaveLength(0);
|
|
58
|
+
expect(screen.queryAllByRole("button", { name: "Close" })).toHaveLength(0);
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
it("FZ-
|
|
61
|
+
it("FZ-11418: the title leads as content, the accent ✓ trails, and the body has no Cancel/confirm row", () => {
|
|
62
62
|
renderWithProviders(<>{OpenOnMount.render?.({} as never, {} as never)}</>);
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
expect(buttons.
|
|
63
|
+
const row = document.querySelector('[data-mp-overlay-header="confirm"]')!;
|
|
64
|
+
expect(row.getAttribute("data-mp-overlay-face")).toBe("sheet");
|
|
65
|
+
const buttons = Array.from(row.querySelectorAll('[role="button"]'));
|
|
66
|
+
expect(buttons.map((button) => button.getAttribute("aria-label"))).toEqual(["Move"]);
|
|
67
|
+
expect(row.firstElementChild?.textContent).toBe("Move to project");
|
|
67
68
|
expect(screen.queryAllByText(/^(Cancel|Move)$/)).toHaveLength(0);
|
|
68
69
|
});
|
|
69
70
|
|
|
@@ -73,10 +74,7 @@ describe("SheetModal stories", () => {
|
|
|
73
74
|
const names = Array.from(header.querySelectorAll('[role="button"]')).map((button) =>
|
|
74
75
|
button.getAttribute("aria-label"),
|
|
75
76
|
);
|
|
76
|
-
expect(names
|
|
77
|
-
expect(names.at(-1)).toBe("Save");
|
|
78
|
-
expect(names.indexOf("Share")).toBeGreaterThan(0);
|
|
79
|
-
expect(names.indexOf("Share")).toBeLessThan(names.length - 1);
|
|
77
|
+
expect(names).toEqual(["Share", "Save"]);
|
|
80
78
|
expect(screen.getAllByRole("dialog", { name: "Edit document" }).length).toBeGreaterThan(0);
|
|
81
79
|
});
|
|
82
80
|
|
|
@@ -67,8 +67,6 @@ function Harness({
|
|
|
67
67
|
header={
|
|
68
68
|
<OverlayHeader
|
|
69
69
|
title="Move to project"
|
|
70
|
-
closeKind="cancel"
|
|
71
|
-
onClose={() => setOpen(false)}
|
|
72
70
|
onConfirm={() => setOpen(false)}
|
|
73
71
|
confirmLabel="Move"
|
|
74
72
|
/>
|
|
@@ -102,7 +100,7 @@ const meta: Meta<typeof SheetModal> = {
|
|
|
102
100
|
docs: {
|
|
103
101
|
description: {
|
|
104
102
|
component:
|
|
105
|
-
"Modal bottom sheet. Anatomy follows the
|
|
103
|
+
"Modal bottom sheet. Anatomy follows tamagui's Sheet (FZ-11418): a handle detached above the frame, a rounded top, no header bar and no ✕, closed by drag, scrim tap or Escape. Radix Dialog semantics: `role=dialog`, `aria-modal`, focus moved in, trapped, and returned on close, and Escape dismissal wired here because tamagui's Sheet has no key handling of its own. A sheet that confirms passes `OverlayHeader`, which draws the title as the body's first line with the accent ✓ trailing, never a Cancel/confirm row in the body (FZ-8439). Web renders tamagui's Sheet; the native twin is an RN Modal, because a raw Sheet cannot re-present from a trigger tap on device.",
|
|
106
104
|
},
|
|
107
105
|
},
|
|
108
106
|
},
|
|
@@ -157,7 +155,7 @@ export const OpenOnMount: Story = {
|
|
|
157
155
|
};
|
|
158
156
|
|
|
159
157
|
/**
|
|
160
|
-
* FZ-8439: a confirming sheet with frequent actions.
|
|
158
|
+
* FZ-8439: a confirming sheet with frequent actions. The title leads, Share
|
|
161
159
|
* sits between the title and the ✓, and Save keeps the trailing edge.
|
|
162
160
|
*/
|
|
163
161
|
function ConfirmWithActionsHarness() {
|
|
@@ -172,8 +170,6 @@ function ConfirmWithActionsHarness() {
|
|
|
172
170
|
header={
|
|
173
171
|
<OverlayHeader
|
|
174
172
|
title="Edit document"
|
|
175
|
-
closeKind="cancel"
|
|
176
|
-
onClose={() => setOpen(false)}
|
|
177
173
|
onConfirm={() => setOpen(false)}
|
|
178
174
|
confirmKind="save"
|
|
179
175
|
/>
|