@multiplatform.one/components 7.85.0 → 7.86.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/Avatar/index.cjs +17 -1
- package/dist/cjs/Avatar/index.native.js +17 -1
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Dialog.cjs +86 -3
- package/dist/cjs/Dialog.native.js +94 -3
- package/dist/cjs/Dialog.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.cjs +15 -2
- package/dist/cjs/feedback/ConfirmDialog.native.js +16 -2
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/feedback/index.cjs +1 -0
- package/dist/cjs/feedback/index.native.js +1 -0
- package/dist/cjs/feedback/index.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.cjs +70 -21
- package/dist/cjs/layouts/AsyncBoundary.native.js +72 -21
- package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/cjs/layouts/asyncFailure.cjs +104 -0
- package/dist/cjs/layouts/asyncFailure.native.js +133 -0
- package/dist/cjs/layouts/asyncFailure.native.js.map +1 -0
- package/dist/cjs/layouts/index.cjs +4 -1
- package/dist/cjs/layouts/index.native.js +3 -0
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/tamagui.cjs +1 -0
- package/dist/cjs/tamagui.native.js +1 -0
- package/dist/cjs/tamagui.native.js.map +1 -1
- package/dist/esm/Avatar/index.mjs +16 -2
- package/dist/esm/Avatar/index.mjs.map +1 -1
- package/dist/esm/Avatar/index.native.js +16 -2
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Dialog.mjs +88 -6
- package/dist/esm/Dialog.mjs.map +1 -1
- package/dist/esm/Dialog.native.js +96 -6
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs +14 -2
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js +15 -2
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/index.mjs +2 -2
- package/dist/esm/feedback/index.mjs.map +1 -1
- package/dist/esm/feedback/index.native.js +2 -2
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.mjs +70 -21
- package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js +72 -21
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/asyncFailure.mjs +78 -0
- package/dist/esm/layouts/asyncFailure.mjs.map +1 -0
- package/dist/esm/layouts/asyncFailure.native.js +104 -0
- package/dist/esm/layouts/asyncFailure.native.js.map +1 -0
- package/dist/esm/layouts/index.mjs +2 -1
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +2 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/tamagui.mjs +2 -2
- package/dist/esm/tamagui.mjs.map +1 -1
- package/dist/esm/tamagui.native.js +2 -2
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/jsx/Avatar/index.mjs +16 -2
- package/dist/jsx/Avatar/index.mjs.map +1 -1
- package/dist/jsx/Avatar/index.native.js +17 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Dialog.mjs +88 -6
- package/dist/jsx/Dialog.mjs.map +1 -1
- package/dist/jsx/Dialog.native.js +94 -3
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs +14 -2
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js +16 -2
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/index.mjs +2 -2
- package/dist/jsx/feedback/index.mjs.map +1 -1
- package/dist/jsx/feedback/index.native.js +1 -0
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.mjs +70 -21
- package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +72 -21
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/asyncFailure.mjs +78 -0
- package/dist/jsx/layouts/asyncFailure.mjs.map +1 -0
- package/dist/jsx/layouts/asyncFailure.native.js +133 -0
- package/dist/jsx/layouts/asyncFailure.native.js.map +1 -0
- package/dist/jsx/layouts/index.mjs +2 -1
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -0
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/tamagui.mjs +2 -2
- package/dist/jsx/tamagui.mjs.map +1 -1
- package/dist/jsx/tamagui.native.js +1 -0
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/package.json +9 -9
- package/src/Avatar/Avatar.spec.tsx +62 -1
- package/src/Avatar/index.tsx +39 -2
- package/src/Dialog.phoneSheet.spec.tsx +186 -0
- package/src/Dialog.tsx +143 -5
- package/src/feedback/ConfirmDialog.tsx +26 -2
- package/src/feedback/index.ts +1 -1
- package/src/layouts/AsyncBoundary.reason.spec.tsx +161 -0
- package/src/layouts/AsyncBoundary.stories.tsx +26 -0
- package/src/layouts/AsyncBoundary.tsx +107 -25
- package/src/layouts/asyncFailure.ts +110 -0
- package/src/layouts/index.tsx +7 -0
- package/src/layouts/pageTitleOneLine.spec.tsx +26 -0
- package/src/overlayStack.native-press.spec.tsx +34 -0
- package/src/surfaces.spec.tsx +42 -0
- package/src/tamagui.ts +8 -2
- package/types/Avatar/index.d.ts +11 -0
- package/types/Avatar/index.d.ts.map +1 -1
- package/types/Dialog.d.ts +262 -2
- package/types/Dialog.d.ts.map +1 -1
- package/types/feedback/ConfirmDialog.d.ts +13 -1
- package/types/feedback/ConfirmDialog.d.ts.map +1 -1
- package/types/feedback/index.d.ts +1 -1
- package/types/feedback/index.d.ts.map +1 -1
- package/types/layouts/AsyncBoundary.d.ts +16 -1
- package/types/layouts/AsyncBoundary.d.ts.map +1 -1
- package/types/layouts/asyncFailure.d.ts +21 -0
- package/types/layouts/asyncFailure.d.ts.map +1 -0
- package/types/layouts/index.d.ts +1 -0
- package/types/layouts/index.d.ts.map +1 -1
- package/types/tamagui.d.ts +2 -2
- package/types/tamagui.d.ts.map +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export interface AsyncFailureReason {
|
|
2
|
+
cause: string;
|
|
3
|
+
retry?: boolean;
|
|
4
|
+
next?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface AsyncFailure {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
retry: boolean;
|
|
11
|
+
refusal: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AsyncFailureOptions {
|
|
15
|
+
subject?: string;
|
|
16
|
+
reason?: string | null;
|
|
17
|
+
retry?: boolean;
|
|
18
|
+
live?: boolean;
|
|
19
|
+
reasons?: Record<string, AsyncFailureReason>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const defaultReasons: Record<string, AsyncFailureReason> = {
|
|
23
|
+
timeout: { cause: "The server took too long to answer." },
|
|
24
|
+
busy: { cause: "The server is busy." },
|
|
25
|
+
unreachable: { cause: "Can't reach the server." },
|
|
26
|
+
down: { cause: "The server is down." },
|
|
27
|
+
failed: { cause: "The server couldn't finish the request." },
|
|
28
|
+
too_large: {
|
|
29
|
+
cause: "The response is too large to load.",
|
|
30
|
+
retry: false,
|
|
31
|
+
next: "Retrying won't help until the view asks for less.",
|
|
32
|
+
},
|
|
33
|
+
credentials_refused: {
|
|
34
|
+
cause: "The server turned down its login.",
|
|
35
|
+
retry: false,
|
|
36
|
+
next: "Retrying won't help until its login is fixed.",
|
|
37
|
+
},
|
|
38
|
+
session_ended: {
|
|
39
|
+
cause: "Your session ended.",
|
|
40
|
+
retry: false,
|
|
41
|
+
next: "Sign out and back in.",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const families: [RegExp, string][] = [
|
|
46
|
+
[/timeout|timed_out/, "timeout"],
|
|
47
|
+
[/too_large|payload_large/, "too_large"],
|
|
48
|
+
[/denied_login|credentials|source_denied/, "credentials_refused"],
|
|
49
|
+
[/authentication|session_expired|session_ended|unauthori[sz]ed|login_required/, "session_ended"],
|
|
50
|
+
[/unreachable|connection_refused|network/, "unreachable"],
|
|
51
|
+
[/busy|overloaded|rate_limit/, "busy"],
|
|
52
|
+
[/_down$|^down$|unavailable/, "down"],
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const refusals = /permission|forbidden|not_permitted|not_allowed/;
|
|
56
|
+
|
|
57
|
+
const codeShape = /^[a-z0-9_.:-]+$/;
|
|
58
|
+
|
|
59
|
+
export function isReasonCode(value: unknown): value is string {
|
|
60
|
+
if (typeof value !== "string" || !codeShape.test(value)) return false;
|
|
61
|
+
if (/[_.:-]/.test(value) || value in defaultReasons) return true;
|
|
62
|
+
return refusals.test(value) || families.some(([pattern]) => pattern.test(value));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function lookup(
|
|
66
|
+
code: string,
|
|
67
|
+
reasons: Record<string, AsyncFailureReason> | undefined,
|
|
68
|
+
): AsyncFailureReason {
|
|
69
|
+
const own = reasons?.[code];
|
|
70
|
+
if (own) return own;
|
|
71
|
+
const exact = defaultReasons[code];
|
|
72
|
+
if (exact) return exact;
|
|
73
|
+
for (const [pattern, family] of families) {
|
|
74
|
+
if (pattern.test(code)) return reasons?.[family] ?? defaultReasons[family]!;
|
|
75
|
+
}
|
|
76
|
+
return reasons?.failed ?? defaultReasons.failed!;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function asyncFailure({
|
|
80
|
+
subject,
|
|
81
|
+
reason,
|
|
82
|
+
retry = false,
|
|
83
|
+
live = false,
|
|
84
|
+
reasons,
|
|
85
|
+
}: AsyncFailureOptions): AsyncFailure {
|
|
86
|
+
const code = typeof reason === "string" && codeShape.test(reason) ? reason : "failed";
|
|
87
|
+
if (refusals.test(code) && !reasons?.[code]) {
|
|
88
|
+
return {
|
|
89
|
+
title: subject ? `${subject} isn't open to this account` : "This isn't open to this account",
|
|
90
|
+
description: "Ask an admin for access.",
|
|
91
|
+
retry: false,
|
|
92
|
+
refusal: true,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const entry = lookup(code, reasons);
|
|
96
|
+
const retryable = entry.retry !== false;
|
|
97
|
+
const next =
|
|
98
|
+
entry.next ??
|
|
99
|
+
(retryable && retry
|
|
100
|
+
? live
|
|
101
|
+
? "It will retry; tap Retry to try now."
|
|
102
|
+
: "Tap Retry to try again."
|
|
103
|
+
: "Try again later.");
|
|
104
|
+
return {
|
|
105
|
+
title: subject ? `${subject} didn't load` : "Couldn't load data",
|
|
106
|
+
description: `${entry.cause} ${next}`,
|
|
107
|
+
retry: retryable && retry,
|
|
108
|
+
refusal: false,
|
|
109
|
+
};
|
|
110
|
+
}
|
package/src/layouts/index.tsx
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* once squeezed the title column until it broke one letter per line.
|
|
5
5
|
*/
|
|
6
6
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
7
|
+
import {
|
|
8
|
+
dynamicTypeFit,
|
|
9
|
+
effectiveFontScale,
|
|
10
|
+
headingMaxFontScale,
|
|
11
|
+
Preset,
|
|
12
|
+
} from "@multiplatform.one/theme";
|
|
7
13
|
import { cleanup, screen } from "@testing-library/react";
|
|
8
14
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
9
15
|
import { PageHeader } from "./page";
|
|
@@ -34,6 +40,26 @@ describe("page title width (LC-143)", () => {
|
|
|
34
40
|
expect(style.whiteSpace).toBe("nowrap");
|
|
35
41
|
});
|
|
36
42
|
|
|
43
|
+
// FZ-9027: Kitchen Sink's "Wheel" broke "Whee / l" under hero at iOS
|
|
44
|
+
// accessibility-extra-large (font scale 3.118) on a 390pt phone.
|
|
45
|
+
it("keeps hero's display title on one line at accessibility-extra-large", () => {
|
|
46
|
+
layout.size = "compact";
|
|
47
|
+
renderWithProviders(
|
|
48
|
+
<Preset preset="hero">
|
|
49
|
+
<PageHeader title="Wheel" />
|
|
50
|
+
</Preset>,
|
|
51
|
+
);
|
|
52
|
+
const style = getComputedStyle(screen.getByRole("heading", { name: "Wheel" }));
|
|
53
|
+
expect(style.whiteSpace).toBe("nowrap");
|
|
54
|
+
expect(style.textOverflow).toBe("ellipsis");
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("caps the page title's Dynamic Type growth at the large-title curve", () => {
|
|
58
|
+
const cap = headingMaxFontScale(52, 52);
|
|
59
|
+
expect(cap).toBe(dynamicTypeFit.titleMaxScale);
|
|
60
|
+
expect(effectiveFontScale(3.118, cap)).toBe(1.5);
|
|
61
|
+
});
|
|
62
|
+
|
|
37
63
|
it("lets a wide screen's page title wrap", () => {
|
|
38
64
|
renderWithProviders(header());
|
|
39
65
|
const style = getComputedStyle(screen.getByRole("heading", { name: "Pokemon" }));
|
|
@@ -175,6 +175,40 @@ describe("an overlay opened from another stacks above it on native (FZ-7869)", (
|
|
|
175
175
|
).toBe(true);
|
|
176
176
|
});
|
|
177
177
|
|
|
178
|
+
it("a confirm opened from a phone content dialog, a sheet under LC-269, stacks one step above it", () => {
|
|
179
|
+
const onConfirm = vi.fn();
|
|
180
|
+
function ApplyInDialog() {
|
|
181
|
+
const [confirming, setConfirming] = useState(false);
|
|
182
|
+
return (
|
|
183
|
+
<Dialog modal open>
|
|
184
|
+
<Dialog.Portal>
|
|
185
|
+
<DialogContent>
|
|
186
|
+
<SizableText>Content dialog body</SizableText>
|
|
187
|
+
<Button onPress={() => setConfirming(true)}>Apply</Button>
|
|
188
|
+
<ConfirmDialog
|
|
189
|
+
open={confirming}
|
|
190
|
+
onOpenChange={setConfirming}
|
|
191
|
+
title="Apply from the dialog sheet?"
|
|
192
|
+
body="Sure?"
|
|
193
|
+
confirmLabel="Apply now"
|
|
194
|
+
onConfirm={onConfirm}
|
|
195
|
+
/>
|
|
196
|
+
</DialogContent>
|
|
197
|
+
</Dialog.Portal>
|
|
198
|
+
</Dialog>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
mount(<ApplyInDialog />);
|
|
202
|
+
const body = screen.getByText("Content dialog body");
|
|
203
|
+
tap(screen.getByText("Apply"));
|
|
204
|
+
const title = screen.getByText("Apply from the dialog sheet?");
|
|
205
|
+
expect(paintsAbove(title, body)).toBe(true);
|
|
206
|
+
const { upper, lower } = branches(title, body);
|
|
207
|
+
expect(zOf(upper) - zOf(lower)).toBe(overlayStackStep());
|
|
208
|
+
tap(screen.getByText("Apply now"));
|
|
209
|
+
expect(onConfirm).toHaveBeenCalledTimes(1);
|
|
210
|
+
});
|
|
211
|
+
|
|
178
212
|
it("a dialog over a plain page still shows above the page", () => {
|
|
179
213
|
mount(
|
|
180
214
|
<View>
|
package/src/surfaces.spec.tsx
CHANGED
|
@@ -365,6 +365,48 @@ describe("DialogContent keeps the sheet's content inset on a phone (FZ-8020)", (
|
|
|
365
365
|
});
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
+
// FZ-8924: the window fit replaced a caller's narrower maxWidth with the
|
|
369
|
+
// window's room, so ConfirmDialog's 420pt alert (and Jump to field) spread to
|
|
370
|
+
// 90% of a 1440 window.
|
|
371
|
+
describe("DialogContent keeps a caller's narrower maxWidth on a wide window (FZ-8924)", () => {
|
|
372
|
+
let savedWidth = 0;
|
|
373
|
+
beforeEach(() => {
|
|
374
|
+
savedWidth = window.innerWidth;
|
|
375
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, value: 1440 });
|
|
376
|
+
Object.defineProperty(document.documentElement, "clientWidth", {
|
|
377
|
+
configurable: true,
|
|
378
|
+
value: 1440,
|
|
379
|
+
});
|
|
380
|
+
window.dispatchEvent(new Event("resize"));
|
|
381
|
+
});
|
|
382
|
+
afterEach(() => {
|
|
383
|
+
cleanup();
|
|
384
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, value: savedWidth });
|
|
385
|
+
delete (document.documentElement as { clientWidth?: number }).clientWidth;
|
|
386
|
+
window.dispatchEvent(new Event("resize"));
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
it("an alert asking 420 stays 420 at 1440", () => {
|
|
390
|
+
render(
|
|
391
|
+
<TamaguiProvider config={overlayCapConfig} defaultTheme="light">
|
|
392
|
+
<Preset>
|
|
393
|
+
<Dialog modal open>
|
|
394
|
+
<Dialog.Portal>
|
|
395
|
+
<DialogContent testID="alert-width" width="90%" maxWidth={420}>
|
|
396
|
+
alert
|
|
397
|
+
</DialogContent>
|
|
398
|
+
</Dialog.Portal>
|
|
399
|
+
</Dialog>
|
|
400
|
+
</Preset>
|
|
401
|
+
</TamaguiProvider>,
|
|
402
|
+
);
|
|
403
|
+
const dialog = getComputedStyle(
|
|
404
|
+
document.querySelector('[data-testid="alert-width"]') as Element,
|
|
405
|
+
);
|
|
406
|
+
expect(dialog.maxWidth).toBe("420px");
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
|
|
368
410
|
// MPO-452: tamagui's FocusScope checks "focus already inside?" before an idle
|
|
369
411
|
// wait of up to 200 ms, then focuses the first tabbable that does not hold
|
|
370
412
|
// focus. A click into the name field during that wait had focus moved on to
|
package/src/tamagui.ts
CHANGED
|
@@ -84,7 +84,14 @@ export { Sheet } from "./Sheet";
|
|
|
84
84
|
export { Popover, type PopoverProps } from "./Popover";
|
|
85
85
|
// Dialog and AlertDialog are the tamagui roots with house close parts: raw
|
|
86
86
|
// Close names every button it wraps "Dialog Close" (MPO-476, ./Dialog.tsx).
|
|
87
|
-
|
|
87
|
+
// The house Dialog is a content dialog: a sheet at phone width (LC-269).
|
|
88
|
+
export {
|
|
89
|
+
AlertDialog,
|
|
90
|
+
Dialog,
|
|
91
|
+
useDialogPresentsAsSheet,
|
|
92
|
+
type DialogPhonePresentation,
|
|
93
|
+
type DialogProps,
|
|
94
|
+
} from "./Dialog";
|
|
88
95
|
|
|
89
96
|
// Providers / theme / animation
|
|
90
97
|
export { AnimatePresence, TamaguiProvider, Theme } from "tamagui";
|
|
@@ -118,7 +125,6 @@ export {
|
|
|
118
125
|
export type {
|
|
119
126
|
CircleProps,
|
|
120
127
|
ColorTokens,
|
|
121
|
-
DialogProps,
|
|
122
128
|
FontSizeTokens,
|
|
123
129
|
GetProps,
|
|
124
130
|
GetRef,
|
package/types/Avatar/index.d.ts
CHANGED
|
@@ -60,6 +60,17 @@ export interface InitialsMetrics {
|
|
|
60
60
|
* whatever line height the label knob carries, and the LC-158 Dynamic Type cap.
|
|
61
61
|
*/
|
|
62
62
|
export declare function initialsMetrics(px: number): InitialsMetrics;
|
|
63
|
+
/**
|
|
64
|
+
* LC-276: the widest capital's advance in em. Two of them at the initials em
|
|
65
|
+
* set the box a covered initials face must keep clear of the face on top.
|
|
66
|
+
*/
|
|
67
|
+
export declare const initialsCapAdvance = 0.84;
|
|
68
|
+
export type AvatarGroupCovered = "photo" | "initials";
|
|
69
|
+
/**
|
|
70
|
+
* LC-276: how far each face slides under the next. A covered photo keeps the
|
|
71
|
+
* Primer 32% stack; a covered initials face gives way until both letters clear.
|
|
72
|
+
*/
|
|
73
|
+
export declare function avatarGroupOverlapPx(px: number, covered: AvatarGroupCovered): number;
|
|
63
74
|
declare function AvatarRoot({ src, name, alt, initials, fallbackBackgroundColor, fallbackColor, fallback, size: sizeProp, circular: circularProp, nested: nestedProp, status, children, backgroundColor, onPress, focusStyle, focusVisibleStyle, hitSlop: hitSlopProp, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
64
75
|
declare function AvatarGroup({ children, max, size, circular, nested, overlap, }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
65
76
|
export declare const Avatar: typeof AvatarRoot & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.tsx"],"names":[],"mappings":"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"}
|
package/types/Dialog.d.ts
CHANGED
|
@@ -1,4 +1,264 @@
|
|
|
1
|
-
import { AlertDialog as TamaguiAlertDialog, Dialog as TamaguiDialog } from "tamagui";
|
|
2
|
-
|
|
1
|
+
import { AlertDialog as TamaguiAlertDialog, Dialog as TamaguiDialog, type DialogProps as TamaguiDialogProps } from "tamagui";
|
|
2
|
+
/**
|
|
3
|
+
* How a house Dialog presents at phone width (LC-269). `"sheet"`, the
|
|
4
|
+
* default, is a content dialog: SheetModal at the overlay pivot and below.
|
|
5
|
+
* `"dialog"` ejects and keeps the centred dialog at every width.
|
|
6
|
+
*/
|
|
7
|
+
export type DialogPhonePresentation = "sheet" | "dialog";
|
|
8
|
+
export type DialogProps = TamaguiDialogProps & {
|
|
9
|
+
phonePresentation?: DialogPhonePresentation;
|
|
10
|
+
};
|
|
11
|
+
type DialogHandle = {
|
|
12
|
+
open: (open: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
/** True where a house Dialog with this presentation draws as a sheet (LC-269). */
|
|
15
|
+
export declare function useDialogPresentsAsSheet(presentation?: DialogPhonePresentation): boolean;
|
|
16
|
+
export declare const Dialog: import("react").ForwardRefExoticComponent<{
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
keepChildrenMounted?: boolean;
|
|
21
|
+
onOpenChange?(open: boolean): void;
|
|
22
|
+
modal?: boolean;
|
|
23
|
+
disableRemoveScroll?: boolean;
|
|
24
|
+
onAnimationComplete?: (info: {
|
|
25
|
+
open: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
} & {
|
|
28
|
+
scope?: import("tamagui").DialogScopes;
|
|
29
|
+
} & {
|
|
30
|
+
phonePresentation?: DialogPhonePresentation;
|
|
31
|
+
} & import("react").RefAttributes<DialogHandle>> & {
|
|
32
|
+
Trigger: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {}>, "scope"> & {
|
|
33
|
+
scope?: import("tamagui").DialogScopes;
|
|
34
|
+
}, import("tamagui").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & {
|
|
35
|
+
scope?: import("tamagui").DialogScopes;
|
|
36
|
+
}, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
|
|
37
|
+
Portal: typeof TamaguiDialog.Portal;
|
|
38
|
+
Overlay: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
39
|
+
open?: boolean | undefined;
|
|
40
|
+
unstyled?: boolean | undefined;
|
|
41
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
42
|
+
fullscreen?: boolean | undefined;
|
|
43
|
+
}>, "scope" | "forceMount"> & {
|
|
44
|
+
forceMount?: boolean;
|
|
45
|
+
} & {
|
|
46
|
+
scope?: import("tamagui").DialogScopes;
|
|
47
|
+
}, import("tamagui").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & {
|
|
48
|
+
forceMount?: boolean;
|
|
49
|
+
} & {
|
|
50
|
+
scope?: import("tamagui").DialogScopes;
|
|
51
|
+
}, import("@tamagui/web").StackStyleBase, {
|
|
52
|
+
open?: boolean | undefined;
|
|
53
|
+
unstyled?: boolean | undefined;
|
|
54
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
55
|
+
fullscreen?: boolean | undefined;
|
|
56
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
57
|
+
Content: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
58
|
+
unstyled?: boolean | undefined;
|
|
59
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
60
|
+
fullscreen?: boolean | undefined;
|
|
61
|
+
transparent?: boolean | undefined;
|
|
62
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
63
|
+
circular?: boolean | undefined;
|
|
64
|
+
elevate?: boolean | undefined;
|
|
65
|
+
bordered?: boolean | undefined;
|
|
66
|
+
chromeless?: boolean | "all" | undefined;
|
|
67
|
+
}>, "children" | "style" | "className" | "theme" | "debug" | "size" | "elevation" | `$${string}` | "id" | "transparent" | "scope" | "disabled" | "group" | "onChange" | "onMouseEnter" | "onMouseLeave" | "onClick" | "role" | "download" | "rel" | "target" | `$${number}` | "elevationAndroid" | "onPress" | "onLongPress" | "onPressIn" | "onPressOut" | "onMouseDown" | "onMouseUp" | "onMouseMove" | "onMouseOver" | "onMouseOut" | "onFocus" | "onBlur" | "onDoubleClick" | "onContextMenu" | "onWheel" | "onKeyDown" | "onKeyUp" | "onInput" | "onBeforeInput" | "onScroll" | "onCopy" | "onCut" | "onPaste" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop" | "onPointerDown" | "onPointerMove" | "onPointerUp" | "onPointerCancel" | "onStartShouldSetResponder" | "onScrollShouldSetResponder" | "onScrollShouldSetResponderCapture" | "onSelectionChangeShouldSetResponder" | "onSelectionChangeShouldSetResponderCapture" | "onLayout" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "htmlFor" | "asChild" | "dangerouslySetInnerHTML" | "themeShallow" | "unstyled" | "render" | "untilMeasured" | "componentName" | "tabIndex" | "disableOptimization" | "forceStyle" | "disableClassName" | "hitSlop" | "animatedBy" | import("@tamagui/web").GroupMediaKeys | "circular" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancelCapture" | "onPointerUpCapture" | "onOpenAutoFocus" | keyof import("@tamagui/web").StackStyleBase | "fullscreen" | "elevate" | "bordered" | "chromeless" | "disableOutsidePointerEvents" | "branches" | "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "forceUnmount" | "onBlurCapture" | "onFocusCapture" | "trapFocus" | "onCloseAutoFocus" | keyof import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
68
|
+
unstyled?: boolean | undefined;
|
|
69
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
70
|
+
fullscreen?: boolean | undefined;
|
|
71
|
+
transparent?: boolean | undefined;
|
|
72
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
73
|
+
circular?: boolean | undefined;
|
|
74
|
+
elevate?: boolean | undefined;
|
|
75
|
+
bordered?: boolean | undefined;
|
|
76
|
+
chromeless?: boolean | "all" | undefined;
|
|
77
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>>> & Omit<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "size" | "elevation" | "transparent" | "unstyled" | "circular" | keyof import("@tamagui/web").StackStyleBase | "fullscreen" | "elevate" | "bordered" | "chromeless"> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
78
|
+
unstyled?: boolean | undefined;
|
|
79
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
80
|
+
fullscreen?: boolean | undefined;
|
|
81
|
+
transparent?: boolean | undefined;
|
|
82
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
83
|
+
circular?: boolean | undefined;
|
|
84
|
+
elevate?: boolean | undefined;
|
|
85
|
+
bordered?: boolean | undefined;
|
|
86
|
+
chromeless?: boolean | "all" | undefined;
|
|
87
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
88
|
+
unstyled?: boolean | undefined;
|
|
89
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
90
|
+
fullscreen?: boolean | undefined;
|
|
91
|
+
transparent?: boolean | undefined;
|
|
92
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
93
|
+
circular?: boolean | undefined;
|
|
94
|
+
elevate?: boolean | undefined;
|
|
95
|
+
bordered?: boolean | undefined;
|
|
96
|
+
chromeless?: boolean | "all" | undefined;
|
|
97
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>> & import("@tamagui/web").WithMediaProps<import("@tamagui/web").WithThemeShorthandsAndPseudos<import("@tamagui/web").StackStyleBase, {
|
|
98
|
+
unstyled?: boolean | undefined;
|
|
99
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
100
|
+
fullscreen?: boolean | undefined;
|
|
101
|
+
transparent?: boolean | undefined;
|
|
102
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
103
|
+
circular?: boolean | undefined;
|
|
104
|
+
elevate?: boolean | undefined;
|
|
105
|
+
bordered?: boolean | undefined;
|
|
106
|
+
chromeless?: boolean | "all" | undefined;
|
|
107
|
+
}>> & Omit<import("@tamagui/dismissable").DismissableProps, "onDismiss"> & {
|
|
108
|
+
trapFocus?: import("@tamagui/focus-scope").FocusScopeProps["trapped"];
|
|
109
|
+
onOpenAutoFocus?: import("@tamagui/focus-scope").FocusScopeProps["onMountAutoFocus"];
|
|
110
|
+
onCloseAutoFocus?: import("@tamagui/focus-scope").FocusScopeProps["onUnmountAutoFocus"];
|
|
111
|
+
context: {
|
|
112
|
+
forceMount?: boolean;
|
|
113
|
+
keepChildrenMounted?: boolean;
|
|
114
|
+
disableRemoveScroll?: boolean;
|
|
115
|
+
triggerRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
116
|
+
contentRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
117
|
+
contentId: string;
|
|
118
|
+
titleId: string;
|
|
119
|
+
descriptionId: string;
|
|
120
|
+
onOpenToggle(): void;
|
|
121
|
+
open: boolean;
|
|
122
|
+
onOpenChange: (open: boolean) => void;
|
|
123
|
+
modal: boolean;
|
|
124
|
+
dialogScope: import("tamagui").DialogScopes;
|
|
125
|
+
adaptScope: string;
|
|
126
|
+
onAnimationComplete?: TamaguiDialogProps["onAnimationComplete"];
|
|
127
|
+
};
|
|
128
|
+
} & {
|
|
129
|
+
context: {
|
|
130
|
+
forceMount?: boolean;
|
|
131
|
+
keepChildrenMounted?: boolean;
|
|
132
|
+
disableRemoveScroll?: boolean;
|
|
133
|
+
triggerRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
134
|
+
contentRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
135
|
+
contentId: string;
|
|
136
|
+
titleId: string;
|
|
137
|
+
descriptionId: string;
|
|
138
|
+
onOpenToggle(): void;
|
|
139
|
+
open: boolean;
|
|
140
|
+
onOpenChange: (open: boolean) => void;
|
|
141
|
+
modal: boolean;
|
|
142
|
+
dialogScope: import("tamagui").DialogScopes;
|
|
143
|
+
adaptScope: string;
|
|
144
|
+
onAnimationComplete?: TamaguiDialogProps["onAnimationComplete"];
|
|
145
|
+
};
|
|
146
|
+
}, "onPointerDownCapture" | "context"> & {
|
|
147
|
+
scope?: import("tamagui").DialogScopes;
|
|
148
|
+
}, import("tamagui").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & Omit<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "size" | "elevation" | "transparent" | "unstyled" | "circular" | keyof import("@tamagui/web").StackStyleBase | "fullscreen" | "elevate" | "bordered" | "chromeless"> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
149
|
+
unstyled?: boolean | undefined;
|
|
150
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
151
|
+
fullscreen?: boolean | undefined;
|
|
152
|
+
transparent?: boolean | undefined;
|
|
153
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
154
|
+
circular?: boolean | undefined;
|
|
155
|
+
elevate?: boolean | undefined;
|
|
156
|
+
bordered?: boolean | undefined;
|
|
157
|
+
chromeless?: boolean | "all" | undefined;
|
|
158
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
|
|
159
|
+
unstyled?: boolean | undefined;
|
|
160
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
161
|
+
fullscreen?: boolean | undefined;
|
|
162
|
+
transparent?: boolean | undefined;
|
|
163
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
164
|
+
circular?: boolean | undefined;
|
|
165
|
+
elevate?: boolean | undefined;
|
|
166
|
+
bordered?: boolean | undefined;
|
|
167
|
+
chromeless?: boolean | "all" | undefined;
|
|
168
|
+
} & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>> & import("@tamagui/web").WithMediaProps<import("@tamagui/web").WithThemeShorthandsAndPseudos<import("@tamagui/web").StackStyleBase, {
|
|
169
|
+
unstyled?: boolean | undefined;
|
|
170
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
171
|
+
fullscreen?: boolean | undefined;
|
|
172
|
+
transparent?: boolean | undefined;
|
|
173
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
174
|
+
circular?: boolean | undefined;
|
|
175
|
+
elevate?: boolean | undefined;
|
|
176
|
+
bordered?: boolean | undefined;
|
|
177
|
+
chromeless?: boolean | "all" | undefined;
|
|
178
|
+
}>> & Omit<import("@tamagui/dismissable").DismissableProps, "onDismiss"> & {
|
|
179
|
+
trapFocus?: import("@tamagui/focus-scope").FocusScopeProps["trapped"];
|
|
180
|
+
onOpenAutoFocus?: import("@tamagui/focus-scope").FocusScopeProps["onMountAutoFocus"];
|
|
181
|
+
onCloseAutoFocus?: import("@tamagui/focus-scope").FocusScopeProps["onUnmountAutoFocus"];
|
|
182
|
+
context: {
|
|
183
|
+
forceMount?: boolean;
|
|
184
|
+
keepChildrenMounted?: boolean;
|
|
185
|
+
disableRemoveScroll?: boolean;
|
|
186
|
+
triggerRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
187
|
+
contentRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
188
|
+
contentId: string;
|
|
189
|
+
titleId: string;
|
|
190
|
+
descriptionId: string;
|
|
191
|
+
onOpenToggle(): void;
|
|
192
|
+
open: boolean;
|
|
193
|
+
onOpenChange: (open: boolean) => void;
|
|
194
|
+
modal: boolean;
|
|
195
|
+
dialogScope: import("tamagui").DialogScopes;
|
|
196
|
+
adaptScope: string;
|
|
197
|
+
onAnimationComplete?: TamaguiDialogProps["onAnimationComplete"];
|
|
198
|
+
};
|
|
199
|
+
} & {
|
|
200
|
+
context: {
|
|
201
|
+
forceMount?: boolean;
|
|
202
|
+
keepChildrenMounted?: boolean;
|
|
203
|
+
disableRemoveScroll?: boolean;
|
|
204
|
+
triggerRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
205
|
+
contentRef: React.RefObject<import("tamagui").TamaguiElement | null>;
|
|
206
|
+
contentId: string;
|
|
207
|
+
titleId: string;
|
|
208
|
+
descriptionId: string;
|
|
209
|
+
onOpenToggle(): void;
|
|
210
|
+
open: boolean;
|
|
211
|
+
onOpenChange: (open: boolean) => void;
|
|
212
|
+
modal: boolean;
|
|
213
|
+
dialogScope: import("tamagui").DialogScopes;
|
|
214
|
+
adaptScope: string;
|
|
215
|
+
onAnimationComplete?: TamaguiDialogProps["onAnimationComplete"];
|
|
216
|
+
};
|
|
217
|
+
}, "onPointerDownCapture" | "context"> & {
|
|
218
|
+
scope?: import("tamagui").DialogScopes;
|
|
219
|
+
}, import("@tamagui/web").StackStyleBase, {
|
|
220
|
+
unstyled?: boolean | undefined;
|
|
221
|
+
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
222
|
+
fullscreen?: boolean | undefined;
|
|
223
|
+
transparent?: boolean | undefined;
|
|
224
|
+
size?: import("tamagui").SizeTokens | undefined;
|
|
225
|
+
circular?: boolean | undefined;
|
|
226
|
+
elevate?: boolean | undefined;
|
|
227
|
+
bordered?: boolean | undefined;
|
|
228
|
+
chromeless?: boolean | "all" | undefined;
|
|
229
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
230
|
+
Title: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("tamagui").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
|
|
231
|
+
unstyled?: boolean | undefined;
|
|
232
|
+
size?: import("tamagui").FontSizeTokens | undefined;
|
|
233
|
+
}>, "scope"> & {
|
|
234
|
+
scope?: import("tamagui").DialogScopes;
|
|
235
|
+
}, import("tamagui").TamaguiTextElement, import("tamagui").TextNonStyleProps & {
|
|
236
|
+
scope?: import("tamagui").DialogScopes;
|
|
237
|
+
}, import("@tamagui/web").TextStylePropsBase, {
|
|
238
|
+
unstyled?: boolean | undefined;
|
|
239
|
+
size?: import("tamagui").FontSizeTokens | undefined;
|
|
240
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
241
|
+
Description: import("tamagui").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("tamagui").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
|
|
242
|
+
unstyled?: boolean | undefined;
|
|
243
|
+
size?: import("tamagui").FontSizeTokens | undefined;
|
|
244
|
+
}>, "scope"> & {
|
|
245
|
+
scope?: import("tamagui").DialogScopes;
|
|
246
|
+
}, import("tamagui").TamaguiTextElement, import("tamagui").TextNonStyleProps & {
|
|
247
|
+
scope?: import("tamagui").DialogScopes;
|
|
248
|
+
}, import("@tamagui/web").TextStylePropsBase, {
|
|
249
|
+
unstyled?: boolean | undefined;
|
|
250
|
+
size?: import("tamagui").FontSizeTokens | undefined;
|
|
251
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
252
|
+
Close: {
|
|
253
|
+
(props: Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {}>, "scope" | "displayWhenAdapted"> & {
|
|
254
|
+
displayWhenAdapted?: boolean;
|
|
255
|
+
} & {
|
|
256
|
+
scope?: import("tamagui").DialogScopes;
|
|
257
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
258
|
+
displayName: string;
|
|
259
|
+
};
|
|
260
|
+
FocusScope: (props: import("@tamagui/focus-scope/types/types").ScopedProps<import("@tamagui/focus-scope").FocusScopeControllerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
261
|
+
};
|
|
3
262
|
export declare const AlertDialog: typeof TamaguiAlertDialog;
|
|
263
|
+
export {};
|
|
4
264
|
//# sourceMappingURL=Dialog.d.ts.map
|
package/types/Dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":"AAqDA,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,MAAM,IAAI,aAAa,EAGvB,KAAK,WAAW,IAAI,kBAAkB,EAEvC,MAAM,SAAS,CAAC;AAmDjB;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG;IAC7C,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,CAAC;AAEF,KAAK,YAAY,GAAG;IAAE,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,CAAC;AAEtD,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,YAAY,GAAE,uBAAiC,GAAG,OAAO,CAIjG;AAgFD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;wBA1FG,uBAAuB;;;;;;;YA4FR,OAAO,aAAa,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO9D,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,OAAO,kBAK/B,CAAC"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* `dialog-too-many-actions` unless `allowManyActions` ejects (DG-OVL-04).
|
|
18
18
|
*/
|
|
19
19
|
import { type ReactNode } from "react";
|
|
20
|
+
import { type DialogPhonePresentation } from "../Dialog";
|
|
20
21
|
export interface ConfirmDialogProps {
|
|
21
22
|
open: boolean;
|
|
22
23
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -63,6 +64,17 @@ export interface ConfirmDialogProps {
|
|
|
63
64
|
* `dialog-too-many-actions` DEV warn.
|
|
64
65
|
*/
|
|
65
66
|
allowManyActions?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* LC-269. A confirm with a title, at most one line of `body` and its two
|
|
69
|
+
* actions is alert-shaped and stays a centred alert at every width, as
|
|
70
|
+
* UIAlertController does. One whose `children` hold content (a form, a
|
|
71
|
+
* picker, a list, a search) is a content dialog and presents as a sheet at
|
|
72
|
+
* phone width. Pass `"dialog"` to keep the centred dialog, `"sheet"` to
|
|
73
|
+
* force the sheet.
|
|
74
|
+
*/
|
|
75
|
+
phonePresentation?: DialogPhonePresentation;
|
|
66
76
|
}
|
|
67
|
-
|
|
77
|
+
/** LC-269: content in `children` (not a string `body`) makes a content dialog. */
|
|
78
|
+
export declare function confirmDialogPresentation({ body, children, }: Pick<ConfirmDialogProps, "body" | "children">): DialogPhonePresentation;
|
|
79
|
+
export declare function ConfirmDialog({ open, onOpenChange, title, body, children, confirmLabel: confirmLabelProp, cancelLabel: cancelLabelProp, onConfirm, onCancel, destructive, warning, confirmDisabled, confirmDisabledReason, cancelDisabled, allowManyActions, phonePresentation, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
68
80
|
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/feedback/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAUH,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/feedback/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAUH,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAU,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAmDjE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED,kFAAkF;AAClF,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,QAAQ,GACT,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,uBAAuB,CAGzE;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,EAC5B,SAAS,EACT,QAAQ,EACR,WAAmB,EACnB,OAAe,EACf,eAAuB,EACvB,qBAAqB,EACrB,cAAsB,EACtB,gBAAwB,EACxB,iBAAiB,GAClB,EAAE,kBAAkB,2CAmKpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { routeNotify, type NotifyAction, type NotifyEvent, type NotifyRoute, type NotifyScope, type NotifySeverity, type NotifySurface, type NotifyToastIntent, } from "./route";
|
|
2
2
|
export { notify } from "./notify";
|
|
3
3
|
export { NotifyHost, NotifyRegion, type NotifyHostProps } from "./NotifyHost";
|
|
4
|
-
export { ConfirmDialog, type ConfirmDialogProps } from "./ConfirmDialog";
|
|
4
|
+
export { ConfirmDialog, confirmDialogPresentation, type ConfirmDialogProps } from "./ConfirmDialog";
|
|
5
5
|
export { dismissFeedback, dismissFeedbackByRegion, dismissFeedbackBySurface, getFeedback, pushFeedback, resetFeedback, subscribeFeedback, type FeedbackEntry, } from "./store";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feedback/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feedback/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,SAAS,CAAC"}
|