@multiplatform.one/components 7.5.0 → 7.6.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/CopyField/index.cjs +4 -1
- package/dist/cjs/CopyField/index.native.js +4 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +5 -2
- package/dist/cjs/ProgressSteps/index.native.js +5 -2
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Separator/index.native.js.map +1 -1
- package/dist/cjs/Wizard/index.cjs +1 -0
- package/dist/cjs/Wizard/index.native.js +3 -12
- package/dist/cjs/Wizard/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +38 -22
- package/dist/cjs/code/CodeBlock/index.native.js +38 -22
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.native.js +1 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +30 -7
- package/dist/cjs/surfaces.native.js +30 -7
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/views/index.cjs +3 -0
- package/dist/cjs/views/index.native.js +3 -0
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/AnimateHeight/index.native.js.map +1 -1
- package/dist/esm/Avatar/getInitials.native.js.map +1 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/Card.native.js.map +1 -1
- package/dist/esm/CardFooter.native.js.map +1 -1
- package/dist/esm/CardHeader.native.js.map +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/index.mjs +4 -1
- package/dist/esm/CopyField/index.mjs.map +1 -1
- package/dist/esm/CopyField/index.native.js +4 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +5 -2
- package/dist/esm/ProgressSteps/index.mjs.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js +5 -2
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/Separator/index.mjs.map +1 -1
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/Toast/store.native.js.map +1 -1
- package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
- package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/types.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wizard/index.mjs +1 -0
- package/dist/esm/Wizard/index.mjs.map +1 -1
- package/dist/esm/Wizard/index.native.js +3 -12
- package/dist/esm/Wizard/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.native.js.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.native.js.map +1 -1
- package/dist/esm/actions/severity.native.js.map +1 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/composeChart.native.js.map +1 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/types.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.mjs +42 -26
- package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +42 -26
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Pre/index.native.js.map +1 -1
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/esm/icons/CheckRegular.native.js.map +1 -1
- package/dist/esm/icons/MinusRegular.native.js.map +1 -1
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/images/Image/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/knobImmuneExports.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/Debug/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/esm/surfaces.mjs +31 -8
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +31 -8
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/setTinted.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.mjs +2 -2
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +2 -2
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewLayout.native.js.map +1 -1
- package/dist/esm/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/CopyField/index.mjs +4 -1
- package/dist/jsx/CopyField/index.mjs.map +1 -1
- package/dist/jsx/CopyField/index.native.js +4 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +5 -2
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js +5 -2
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Separator/index.mjs.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.mjs +1 -0
- package/dist/jsx/Wizard/index.mjs.map +1 -1
- package/dist/jsx/Wizard/index.native.js +3 -12
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +42 -26
- package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +38 -22
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +1 -0
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +1 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/surfaces.mjs +31 -8
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +30 -7
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/views/index.mjs +2 -2
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +3 -0
- package/dist/jsx/views/index.native.js.map +1 -1
- package/package.json +9 -9
- package/src/CopyField/index.tsx +10 -15
- package/src/Heading.native.spec.tsx +156 -0
- package/src/Heading.spec.tsx +14 -79
- package/src/Meter/Meter.spec.tsx +9 -1
- package/src/ProgressSteps/index.tsx +18 -3
- package/src/Separator/Separator.spec.tsx +68 -32
- package/src/Separator/index.tsx +27 -9
- package/src/Text.native.spec.tsx +144 -0
- package/src/Text.spec.tsx +12 -70
- package/src/Tooltip/tooltipGapContract.spec.ts +54 -0
- package/src/Wizard/Wizard.spec.tsx +23 -1
- package/src/Wizard/index.tsx +1 -8
- package/src/code/CodeBlock/CodeBlock.spec.tsx +6 -6
- package/src/code/CodeBlock/index.tsx +44 -27
- package/src/index.ts +12 -6
- package/src/overlayElevation.spec.tsx +154 -0
- package/src/surfaces.spec.tsx +98 -1
- package/src/surfaces.tsx +28 -6
- package/src/tamagui.spec.ts +11 -2
- package/src/tamagui.ts +5 -5
- package/src/views/index.ts +15 -0
- package/types/CopyField/index.d.ts +8 -14
- package/types/CopyField/index.d.ts.map +1 -1
- package/types/ProgressSteps/index.d.ts +8 -1
- package/types/ProgressSteps/index.d.ts.map +1 -1
- package/types/Separator/index.d.ts +27 -9
- package/types/Separator/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +1 -1
- package/types/Wizard/index.d.ts.map +1 -1
- package/types/code/CodeBlock/index.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/surfaces.d.ts +6 -6
- package/types/surfaces.d.ts.map +1 -1
- package/types/views/index.d.ts +1 -1
- package/types/views/index.d.ts.map +1 -1
|
@@ -7,21 +7,28 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { LinearGradient } from "@tamagui/linear-gradient";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { ClipboardIcon } from "@phosphor-icons/react";
|
|
11
|
+
import {
|
|
12
|
+
MIN_PRESS_TARGET,
|
|
13
|
+
isTouchSurface,
|
|
14
|
+
pressTargetHitSlop,
|
|
15
|
+
sizeRecipeForToken,
|
|
16
|
+
useResolvedKnobs,
|
|
17
|
+
} from "@multiplatform.one/theme";
|
|
12
18
|
import { useEffect, useRef, useState } from "react";
|
|
13
19
|
import { useTranslation } from "../../shared/i18n";
|
|
14
20
|
import type { TamaguiElement } from "tamagui";
|
|
15
21
|
import { ScrollView } from "tamagui";
|
|
16
|
-
import { Button, zIndex } from "@multiplatform.one/forms";
|
|
17
|
-
import { Spacer,
|
|
22
|
+
import { Button, Input, zIndex } from "@multiplatform.one/forms";
|
|
23
|
+
import { Spacer, XStack, YStack } from "tamagui";
|
|
18
24
|
import { settleMs } from "../../AnimateHeight";
|
|
19
25
|
import { ErrorBoundary } from "../../ErrorBoundary";
|
|
26
|
+
import { NotifyRegion } from "../../feedback/NotifyHost";
|
|
27
|
+
import { copyAndNotify } from "../../feedback/copy";
|
|
20
28
|
import { Code } from "../Code";
|
|
21
29
|
import { HighlightedCode } from "../HighlightedCode";
|
|
22
30
|
import { useShikiTokens } from "../Highlighter";
|
|
23
31
|
import { Pre } from "../Pre";
|
|
24
|
-
import { useClipboard } from "../../hooks/useClipboard";
|
|
25
32
|
|
|
26
33
|
/** Visible lines before the "show more" clamp (content constraint, LC-18). */
|
|
27
34
|
const VISIBLE_LINES = 22;
|
|
@@ -111,7 +118,14 @@ export function CodeBlock({
|
|
|
111
118
|
}, settleMs(transition));
|
|
112
119
|
};
|
|
113
120
|
const clamped = isCutoff || expandTarget != null;
|
|
114
|
-
|
|
121
|
+
// Copy is the same Input.Button glyph-ring cap the CopyField/Password
|
|
122
|
+
// slot uses (LC-16); confirm is notify() and the glyph does not flip
|
|
123
|
+
// (DG-FB-01 — the D-copyfield verdict replaces TooltipSimple + icon-swap).
|
|
124
|
+
const showCopy = Boolean(codeText) && !disableCopy;
|
|
125
|
+
const activateCopy = () => {
|
|
126
|
+
void copyAndNotify(codeText);
|
|
127
|
+
};
|
|
128
|
+
const capSquare = sizeRecipeForToken(String(codeSize), { touch: isTouchSurface() }).height;
|
|
115
129
|
|
|
116
130
|
return (
|
|
117
131
|
<YStack position="relative" marginBottom="$4">
|
|
@@ -156,6 +170,7 @@ export function CodeBlock({
|
|
|
156
170
|
borderWidth={0}
|
|
157
171
|
{...knobProps.panelPadding}
|
|
158
172
|
size={codeSize}
|
|
173
|
+
data-register="code"
|
|
159
174
|
>
|
|
160
175
|
<HighlightedCode
|
|
161
176
|
tokens={tokens}
|
|
@@ -168,33 +183,35 @@ export function CodeBlock({
|
|
|
168
183
|
</Code>
|
|
169
184
|
</ScrollView>
|
|
170
185
|
</Pre>
|
|
171
|
-
{
|
|
172
|
-
<XStack position="absolute" top=
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
{showCopy && (
|
|
187
|
+
<XStack position="absolute" top={0} insetInlineEnd={0} zIndex={zIndex.localTop}>
|
|
188
|
+
<Input.Button
|
|
189
|
+
glyphRing
|
|
190
|
+
size={codeSize}
|
|
191
|
+
type="button"
|
|
192
|
+
aria-label="Copy to clipboard"
|
|
193
|
+
data-press-min={MIN_PRESS_TARGET}
|
|
194
|
+
hitSlop={capSquare < MIN_PRESS_TARGET ? pressTargetHitSlop(capSquare) : undefined}
|
|
195
|
+
onPress={activateCopy}
|
|
196
|
+
onKeyDown={
|
|
197
|
+
((e: KeyboardEvent) => {
|
|
198
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
199
|
+
e.preventDefault();
|
|
200
|
+
e.stopPropagation();
|
|
201
|
+
activateCopy();
|
|
202
|
+
}
|
|
203
|
+
}) as unknown as () => void
|
|
180
204
|
}
|
|
181
205
|
>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
minHeight={MIN_PRESS_TARGET}
|
|
187
|
-
data-press-min={MIN_PRESS_TARGET}
|
|
188
|
-
icon={
|
|
189
|
-
hasCopied ? CheckCircleIcon : hasCopyFailed ? WarningCircleIcon : ClipboardIcon
|
|
190
|
-
}
|
|
191
|
-
onPress={onCopy}
|
|
192
|
-
/>
|
|
193
|
-
</TooltipSimple>
|
|
206
|
+
<Input.Icon aria-hidden>
|
|
207
|
+
<ClipboardIcon />
|
|
208
|
+
</Input.Icon>
|
|
209
|
+
</Input.Button>
|
|
194
210
|
</XStack>
|
|
195
211
|
)}
|
|
196
212
|
</YStack>
|
|
197
213
|
</ErrorBoundary>
|
|
214
|
+
<NotifyRegion scope="field" compact />
|
|
198
215
|
</YStack>
|
|
199
216
|
);
|
|
200
217
|
}
|
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type {
|
|
|
15
15
|
export * from "./Badge";
|
|
16
16
|
export * from "./Carousel";
|
|
17
17
|
export * from "./Chip";
|
|
18
|
+
export * from "./CopyField";
|
|
18
19
|
export * from "./DotIndicator";
|
|
19
20
|
export * from "./DropdownMenu";
|
|
20
21
|
export * from "./ContextMenu";
|
|
@@ -154,12 +155,17 @@ export type { AnchorProps, ParagraphProps, SizableTextProps, TextProps } from ".
|
|
|
154
155
|
export { H1, H2, H3, H4, H5, H6, Heading } from "./Heading";
|
|
155
156
|
export type { HeadingProps } from "./Heading";
|
|
156
157
|
|
|
157
|
-
// Shadow tamagui Separator with the house Separator (MPO-47)
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
// The
|
|
162
|
-
//
|
|
158
|
+
// Shadow tamagui Separator with the house Separator (MPO-47). Two reasons,
|
|
159
|
+
// both measured: LC-45 / LC-70 — a bare name a house barrel exports is a
|
|
160
|
+
// catalog part, and this one resolved to a raw primitive; and DG-OVF-07 —
|
|
161
|
+
// the raw primitive is a `flex: 1` item, so the rule can absorb free space.
|
|
162
|
+
// The house rule is a painted 1px line in $borderColor (measured law §7.3:
|
|
163
|
+
// 1px never 0.5px; quiet = opacity 0.5, never a lighter colour) that cannot
|
|
164
|
+
// flex-grow. The curated ./tamagui surface no longer exports the bare name;
|
|
165
|
+
// raw stays reachable as TamaguiSeparator.
|
|
166
|
+
//
|
|
167
|
+
// Correction 2026-09-01: the ticket's "96 of 96 paint nothing" was a probe
|
|
168
|
+
// artefact, not a defect — see ./Separator/index.tsx for the measurement.
|
|
163
169
|
export { Separator } from "./Separator";
|
|
164
170
|
export type { SeparatorProps } from "./Separator";
|
|
165
171
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
3
|
+
import { cleanup } from "@testing-library/react";
|
|
4
|
+
import { AlertDialog, Dialog, Theme } from "tamagui";
|
|
5
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
6
|
+
import { Button } from "./Button";
|
|
7
|
+
import { AlertDialogContent, DialogContent } from "./surfaces";
|
|
8
|
+
|
|
9
|
+
afterEach(cleanup);
|
|
10
|
+
|
|
11
|
+
// ── What this file measures, and why not the class list ──────────────────
|
|
12
|
+
//
|
|
13
|
+
// MPO-49 AC: "DialogContent paints the reference §8 overlay shadow" and "a
|
|
14
|
+
// spec asserts the dialog shadow differs from the Button shadow".
|
|
15
|
+
//
|
|
16
|
+
// The obvious probe — read the frame's `_bxsh-*` atom — passes on a frame
|
|
17
|
+
// that paints something else entirely. `resolveKnobs.elevationPaint` emits
|
|
18
|
+
// its web paint as `style: { boxShadow }`, an INLINE style, and Tamagui only
|
|
19
|
+
// stamps `!important` on PSEUDO atoms (`getCSSStylesAtomic`: `const
|
|
20
|
+
// important = !!pseudo`). A base atom therefore loses the cascade to any
|
|
21
|
+
// inline style on the same node. Measured on `6eb0995`, before this lane:
|
|
22
|
+
//
|
|
23
|
+
// class _bxsh-0px12px24px… (the §8 value — dead)
|
|
24
|
+
// style 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px … (the `$2` value — painted)
|
|
25
|
+
//
|
|
26
|
+
// So these assert the INLINE style, which is what a browser paints, and read
|
|
27
|
+
// the class only to prove the two now agree. Reading the class alone is the
|
|
28
|
+
// same hole MPO-40 / MPO-44 / MPO-48 all fell through, one layer further in:
|
|
29
|
+
// the fragment reaches the frame and still never reaches the pixel.
|
|
30
|
+
|
|
31
|
+
/** Reference §8, tamagui-rendered-reference.md — the one dialog shadow. */
|
|
32
|
+
const referenceOverlayShadow = "0px 12px 24px rgba(0,0,0,0.12)";
|
|
33
|
+
/** Same §8 geometry and alpha, hue inverted — LC-85 forbids a dark umbra. */
|
|
34
|
+
const referenceOverlayShadowDark = "0px 12px 24px rgba(255,255,255,0.12)";
|
|
35
|
+
/** `webShadowLight.$1` — the in-page control stop every Button carries. */
|
|
36
|
+
const controlStopPaint = "0 1px 2px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.08)";
|
|
37
|
+
/** `webShadowLight.$2` — `elevatedSurface`'s own overlay paint. */
|
|
38
|
+
const elevatedSurfacePaint = "0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.10)";
|
|
39
|
+
|
|
40
|
+
function frame(id: string): HTMLElement {
|
|
41
|
+
const el = document.querySelector(`[data-testid="${id}"]`);
|
|
42
|
+
if (!el) throw new Error(`no frame rendered for ${id}`);
|
|
43
|
+
return el as HTMLElement;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** The value a browser paints: the inline style wins over every base atom. */
|
|
47
|
+
function paintedShadow(id: string): string {
|
|
48
|
+
return frame(id).style.boxShadow;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function shadowAtoms(id: string): string[] {
|
|
52
|
+
return String(frame(id).className || "")
|
|
53
|
+
.split(/\s+/)
|
|
54
|
+
.filter((c) => c.startsWith("_bxsh-"))
|
|
55
|
+
.sort();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function bgAtoms(id: string): string[] {
|
|
59
|
+
return String(frame(id).className || "")
|
|
60
|
+
.split(/\s+/)
|
|
61
|
+
.filter((c) => c.startsWith("_bg-"));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function renderDialogsBesideAButton() {
|
|
65
|
+
renderWithProviders(
|
|
66
|
+
<Preset>
|
|
67
|
+
<Button testID="control">Save</Button>
|
|
68
|
+
<Dialog modal open>
|
|
69
|
+
<Dialog.Portal>
|
|
70
|
+
<DialogContent testID="dialog">dialog</DialogContent>
|
|
71
|
+
</Dialog.Portal>
|
|
72
|
+
</Dialog>
|
|
73
|
+
<AlertDialog open>
|
|
74
|
+
<AlertDialog.Portal>
|
|
75
|
+
<AlertDialogContent testID="alertdialog">confirm</AlertDialogContent>
|
|
76
|
+
</AlertDialog.Portal>
|
|
77
|
+
</AlertDialog>
|
|
78
|
+
</Preset>,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
describe("overlay elevation is a different distance off the surface (MPO-49)", () => {
|
|
83
|
+
it("DialogContent PAINTS the reference §8 shadow, not the $2 fragment underneath it", () => {
|
|
84
|
+
renderDialogsBesideAButton();
|
|
85
|
+
expect(paintedShadow("dialog")).toBe(referenceOverlayShadow);
|
|
86
|
+
expect(paintedShadow("dialog")).not.toBe(elevatedSurfacePaint);
|
|
87
|
+
expect(paintedShadow("dialog")).not.toBe(controlStopPaint);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("the atom and the inline style agree — no dead §8 class over a live $2 paint", () => {
|
|
91
|
+
renderDialogsBesideAButton();
|
|
92
|
+
// The atom half alone does NOT discriminate: it reads `_bxsh-0px12px24px…`
|
|
93
|
+
// with the defect present too, which is why a class-only probe passes
|
|
94
|
+
// against a frame painting `$2`. Pair it with the painted value.
|
|
95
|
+
expect(shadowAtoms("dialog")).toHaveLength(1);
|
|
96
|
+
expect(shadowAtoms("dialog")[0]).toMatch(/^_bxsh-0px12px24px/);
|
|
97
|
+
expect(paintedShadow("dialog")).toContain("12px 24px");
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("the dialog shadow differs from the Button shadow, and the Button keeps the $1 stop", () => {
|
|
101
|
+
renderDialogsBesideAButton();
|
|
102
|
+
// "differs" alone does not discriminate: with the defect present the
|
|
103
|
+
// dialog paints `$2` and the Button `$1`, which also differ. The §8 value
|
|
104
|
+
// itself is pinned by the first case in this file; here the control side
|
|
105
|
+
// is pinned to `$1` so a Button regression cannot fake this one either.
|
|
106
|
+
expect(paintedShadow("control")).toBe(controlStopPaint);
|
|
107
|
+
expect(paintedShadow("dialog")).not.toBe(paintedShadow("control"));
|
|
108
|
+
expect(shadowAtoms("dialog")).not.toEqual(shadowAtoms("control"));
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it("AlertDialogContent wears the same §8 shadow — one dialog row, one distance", () => {
|
|
112
|
+
// Tamagui's AlertDialog.Content IS Dialog.Content, and reference §8
|
|
113
|
+
// carries a single dialog row. confirm-dialog-{destructive,gated,warning}
|
|
114
|
+
// render through this frame.
|
|
115
|
+
renderDialogsBesideAButton();
|
|
116
|
+
expect(paintedShadow("alertdialog")).toBe(referenceOverlayShadow);
|
|
117
|
+
expect(paintedShadow("alertdialog")).toBe(paintedShadow("dialog"));
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("dark inverts the hue and keeps the §8 geometry; the ground steps up the ramp (LC-85)", () => {
|
|
121
|
+
renderWithProviders(
|
|
122
|
+
<Preset>
|
|
123
|
+
<Dialog modal open>
|
|
124
|
+
<Dialog.Portal>
|
|
125
|
+
<DialogContent testID="dialog">dialog</DialogContent>
|
|
126
|
+
</Dialog.Portal>
|
|
127
|
+
</Dialog>
|
|
128
|
+
</Preset>,
|
|
129
|
+
);
|
|
130
|
+
expect(paintedShadow("dialog")).toBe(referenceOverlayShadow);
|
|
131
|
+
expect(bgAtoms("dialog")).toEqual(["_bg-background"]);
|
|
132
|
+
cleanup();
|
|
133
|
+
|
|
134
|
+
renderWithProviders(
|
|
135
|
+
<Theme name="dark">
|
|
136
|
+
<Preset>
|
|
137
|
+
<Dialog modal open>
|
|
138
|
+
<Dialog.Portal>
|
|
139
|
+
<DialogContent testID="dialog">dialog</DialogContent>
|
|
140
|
+
</Dialog.Portal>
|
|
141
|
+
</Dialog>
|
|
142
|
+
</Preset>
|
|
143
|
+
</Theme>,
|
|
144
|
+
);
|
|
145
|
+
// LC-85 DARK-ELEVATION-TINT: light-coloured shadow, never a black umbra.
|
|
146
|
+
expect(paintedShadow("dialog")).toBe(referenceOverlayShadowDark);
|
|
147
|
+
expect(paintedShadow("dialog")).not.toBe(referenceOverlayShadow);
|
|
148
|
+
expect(paintedShadow("dialog")).not.toMatch(/rgba\(0,\s*0,\s*0/);
|
|
149
|
+
// resolveKnobs owns the dark ground: `overlayFill` steps the filled rest
|
|
150
|
+
// fill up the ramp under dark + elevation (LC-85). Asserted so a later
|
|
151
|
+
// change to that rule shows up here rather than silently on a board.
|
|
152
|
+
expect(bgAtoms("dialog")).toEqual(["_bg-color2"]);
|
|
153
|
+
});
|
|
154
|
+
});
|
package/src/surfaces.spec.tsx
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
3
|
+
import { cleanup } from "@testing-library/react";
|
|
1
4
|
import { readFileSync } from "node:fs";
|
|
2
5
|
import { dirname, join } from "node:path";
|
|
3
6
|
import { fileURLToPath } from "node:url";
|
|
4
7
|
import { Card as TamaguiCard, Dialog, Popover, Sheet } from "tamagui";
|
|
5
|
-
import { describe, expect, it } from "vitest";
|
|
8
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
9
|
+
import { Button } from "./Button";
|
|
6
10
|
import * as pkg from "./index";
|
|
7
11
|
import {
|
|
8
12
|
Card,
|
|
@@ -21,6 +25,8 @@ import {
|
|
|
21
25
|
SheetFrame,
|
|
22
26
|
} from "./surfaces";
|
|
23
27
|
|
|
28
|
+
afterEach(cleanup);
|
|
29
|
+
|
|
24
30
|
describe("surfaces package exports", () => {
|
|
25
31
|
it("package Card is the themed surface, not the tamagui primitive", () => {
|
|
26
32
|
expect(pkg.Card).toBe(Card);
|
|
@@ -86,3 +92,94 @@ describe("DialogContent overlay elevation (MPO-49)", () => {
|
|
|
86
92
|
expect(dialog).toContain("panelPadding");
|
|
87
93
|
});
|
|
88
94
|
});
|
|
95
|
+
|
|
96
|
+
// ── Render proofs ────────────────────────────────────────────────────────
|
|
97
|
+
//
|
|
98
|
+
// The source-text assertions above prove the CALL SITE. These prove the
|
|
99
|
+
// FRAME, which is the distinction MPO-40 / MPO-44 / MPO-48 all fell through:
|
|
100
|
+
// a fragment that exists in source and dies on the way to the frame reads
|
|
101
|
+
// identical to one that never existed.
|
|
102
|
+
//
|
|
103
|
+
// happy-dom cannot cascade Tamagui's class CSS, so — as in Button.spec.tsx —
|
|
104
|
+
// these read the atomic classes the knob emits. The atom name is hashed from
|
|
105
|
+
// the VALUE, so the class IS the value, and no theme config is needed: what
|
|
106
|
+
// the fragment addresses is visible in the class name itself.
|
|
107
|
+
//
|
|
108
|
+
// Measured both ways on 2026-09-01 by reverting each defect in the working
|
|
109
|
+
// tree and re-running (see the MR description):
|
|
110
|
+
//
|
|
111
|
+
// surface addressing defect `$color1` -> `_bg-color1`
|
|
112
|
+
// fixed `$background` -> `_bg-background`
|
|
113
|
+
// dialog elevation defect Button/control `$1` -> `_bxsh-0px1px2px…`
|
|
114
|
+
// fixed reference §8 -> `_bxsh-0px12px24px…`
|
|
115
|
+
//
|
|
116
|
+
// A "differs from the Button" assertion does NOT discriminate: the Button
|
|
117
|
+
// paints `0 6px 12px` from its own source in both states, so that comparison
|
|
118
|
+
// passes with the defect present. Assert against the $1 CONTROL stop.
|
|
119
|
+
|
|
120
|
+
function atomsWithPrefix(el: Element | null, prefix: string): string[] {
|
|
121
|
+
if (!el) return [];
|
|
122
|
+
return String((el as HTMLElement).className || "")
|
|
123
|
+
.split(/\s+/)
|
|
124
|
+
.filter((c) => c.startsWith(prefix))
|
|
125
|
+
.sort();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** The `$1` control paint — `webShadowLight.$1`, "0 1px 2px …" (resolveKnobs.ts). */
|
|
129
|
+
const controlStopShadowAtom = /^_bxsh-0px1px2px/;
|
|
130
|
+
/** Rendered reference §8 DialogContent — `rgba(0,0,0,0.12) 0 12px 24px`. */
|
|
131
|
+
const overlayStopShadowAtom = /^_bxsh-0px12px24px/;
|
|
132
|
+
|
|
133
|
+
describe("surfaces address $background at the FRAME (MPO-19 X5/X6)", () => {
|
|
134
|
+
it("Card, Panel and DialogContent all paint _bg-background, never a raw ramp step", () => {
|
|
135
|
+
renderWithProviders(
|
|
136
|
+
<Preset>
|
|
137
|
+
<Card testID="mpo-card">card</Card>
|
|
138
|
+
<Panel testID="mpo-panel">panel</Panel>
|
|
139
|
+
<Dialog modal open>
|
|
140
|
+
<Dialog.Portal>
|
|
141
|
+
<DialogContent testID="mpo-dialog">dialog</DialogContent>
|
|
142
|
+
</Dialog.Portal>
|
|
143
|
+
</Dialog>
|
|
144
|
+
</Preset>,
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
for (const id of ["mpo-card", "mpo-panel", "mpo-dialog"]) {
|
|
148
|
+
const frame = document.querySelector(`[data-testid="${id}"]`);
|
|
149
|
+
expect(frame, `${id} frame`).toBeTruthy();
|
|
150
|
+
const bg = atomsWithPrefix(frame, "_bg-");
|
|
151
|
+
expect(bg, `${id} background atom`).toEqual(["_bg-background"]);
|
|
152
|
+
expect(bg.join(" "), `${id} must not address a raw ramp step`).not.toMatch(/_bg-color[12]\b/);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
describe("DialogContent paints the OVERLAY elevation stop, not the control one (MPO-49)", () => {
|
|
158
|
+
it("renders the reference §8 shadow and not the Button $1 stop", () => {
|
|
159
|
+
renderWithProviders(
|
|
160
|
+
<Preset>
|
|
161
|
+
<Button testID="mpo-button-control">Save</Button>
|
|
162
|
+
<Dialog modal open>
|
|
163
|
+
<Dialog.Portal>
|
|
164
|
+
<DialogContent testID="mpo-dialog-overlay">body</DialogContent>
|
|
165
|
+
</Dialog.Portal>
|
|
166
|
+
</Dialog>
|
|
167
|
+
</Preset>,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const dialog = document.querySelector('[data-testid="mpo-dialog-overlay"]');
|
|
171
|
+
const button = document.querySelector('[data-testid="mpo-button-control"]');
|
|
172
|
+
expect(dialog, "DialogContent frame").toBeTruthy();
|
|
173
|
+
expect(button, "Button frame").toBeTruthy();
|
|
174
|
+
|
|
175
|
+
const dialogShadow = atomsWithPrefix(dialog, "_bxsh-");
|
|
176
|
+
expect(dialogShadow, "DialogContent paints exactly one shadow atom").toHaveLength(1);
|
|
177
|
+
expect(dialogShadow[0], "dialog wears the §8 overlay shadow").toMatch(overlayStopShadowAtom);
|
|
178
|
+
expect(dialogShadow[0], "dialog must not wear the $1 control stop").not.toMatch(
|
|
179
|
+
controlStopShadowAtom,
|
|
180
|
+
);
|
|
181
|
+
expect(dialogShadow, "dialog and control are different distances off the surface").not.toEqual(
|
|
182
|
+
atomsWithPrefix(button, "_bxsh-"),
|
|
183
|
+
);
|
|
184
|
+
});
|
|
185
|
+
});
|
package/src/surfaces.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Popover,
|
|
8
8
|
Sheet,
|
|
9
9
|
View,
|
|
10
|
+
isWeb,
|
|
10
11
|
type DialogContentProps as TamaguiDialogContentProps,
|
|
11
12
|
type DialogOverlayProps as TamaguiDialogOverlayProps,
|
|
12
13
|
type TamaguiElement,
|
|
@@ -101,12 +102,31 @@ export const DialogContent = forwardRef<
|
|
|
101
102
|
);
|
|
102
103
|
});
|
|
103
104
|
|
|
104
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Reference §8 overlay shadow — rgba(0,0,0,0.12) 0 12px 24px. Not Button $1,
|
|
107
|
+
* and not the `$2` fragment `elevatedSurface` carries either: that fragment's
|
|
108
|
+
* web paint arrives as an INLINE style (`elevationPaint` emits
|
|
109
|
+
* `style.boxShadow`, and Tamagui stamps `!important` only on pseudo atoms),
|
|
110
|
+
* so a shadow expressed only as `shadow*` props is a dead class atom under a
|
|
111
|
+
* live `$2` paint. The §8 value must land on the `style` prop too, replacing
|
|
112
|
+
* the fragment's. Dark inverts the hue and keeps the geometry — LC-85
|
|
113
|
+
* DARK-ELEVATION-TINT forbids a black umbra on a dark ground.
|
|
114
|
+
*/
|
|
105
115
|
const overlayElevationShadow = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
light: {
|
|
117
|
+
shadowColor: "rgba(0,0,0,0.12)",
|
|
118
|
+
shadowOffset: { width: 0, height: 12 },
|
|
119
|
+
shadowOpacity: 1,
|
|
120
|
+
shadowRadius: 24,
|
|
121
|
+
...(isWeb ? { style: { boxShadow: "0px 12px 24px rgba(0,0,0,0.12)" } } : null),
|
|
122
|
+
},
|
|
123
|
+
dark: {
|
|
124
|
+
shadowColor: "rgba(255,255,255,0.12)",
|
|
125
|
+
shadowOffset: { width: 0, height: 12 },
|
|
126
|
+
shadowOpacity: 1,
|
|
127
|
+
shadowRadius: 24,
|
|
128
|
+
...(isWeb ? { style: { boxShadow: "0px 12px 24px rgba(255,255,255,0.12)" } } : null),
|
|
129
|
+
},
|
|
110
130
|
} as const;
|
|
111
131
|
|
|
112
132
|
const DialogContentInner = forwardRef<
|
|
@@ -126,7 +146,7 @@ const DialogContentInner = forwardRef<
|
|
|
126
146
|
{...knobProps.panelPadding}
|
|
127
147
|
{...knobProps.gap}
|
|
128
148
|
elevate={false}
|
|
129
|
-
{...overlayElevationShadow}
|
|
149
|
+
{...overlayElevationShadow[knobProps.scheme]}
|
|
130
150
|
transition={knobProps.transition}
|
|
131
151
|
enterStyle={overlayEnterExit}
|
|
132
152
|
exitStyle={overlayEnterExit}
|
|
@@ -205,6 +225,8 @@ const AlertDialogContentInner = forwardRef<
|
|
|
205
225
|
{...knobProps.containerRadius}
|
|
206
226
|
{...knobProps.panelPadding}
|
|
207
227
|
{...knobProps.gap}
|
|
228
|
+
elevate={false}
|
|
229
|
+
{...overlayElevationShadow[knobProps.scheme]}
|
|
208
230
|
transition={knobProps.transition}
|
|
209
231
|
enterStyle={overlayEnterExit}
|
|
210
232
|
exitStyle={overlayEnterExit}
|
package/src/tamagui.spec.ts
CHANGED
|
@@ -34,12 +34,19 @@ const EXCLUDED_BARE_NAMES = [
|
|
|
34
34
|
] as const;
|
|
35
35
|
|
|
36
36
|
const ALLOWLIST_VALUE_NAMES = [
|
|
37
|
-
// layout
|
|
37
|
+
// layout. Separator left this list 2026-08-28 (MPO-47): a bare catalog name
|
|
38
|
+
// may not resolve to a raw primitive (LC-45 / LC-70), and the raw one is a
|
|
39
|
+
// `flex: 1` item that can absorb free space (DG-OVF-07). Bare `Separator` is
|
|
40
|
+
// the house painted rule in ./Separator; raw rides the TamaguiSeparator
|
|
41
|
+
// hatch. (It was silently restored here by the MPO-20 typography lane, which
|
|
42
|
+
// rewrote this file from a pre-MPO-47 copy — tamagui.ts and index.ts kept
|
|
43
|
+
// the house wiring, so this guardrail was asserting the opposite of the
|
|
44
|
+
// barrel and had been red ever since. MPO-78: CI runs `turbo run build`
|
|
45
|
+
// only, so nothing caught it.)
|
|
38
46
|
"Circle",
|
|
39
47
|
"Group",
|
|
40
48
|
"ListItem",
|
|
41
49
|
"ScrollView",
|
|
42
|
-
"Separator",
|
|
43
50
|
"Spacer",
|
|
44
51
|
"Square",
|
|
45
52
|
"View",
|
|
@@ -105,6 +112,7 @@ const ESCAPE_HATCHES: ReadonlyArray<[prefixed: string, raw: string]> = [
|
|
|
105
112
|
["TamaguiProgress", "Progress"],
|
|
106
113
|
["TamaguiRadioGroup", "RadioGroup"],
|
|
107
114
|
["TamaguiSelect", "Select"],
|
|
115
|
+
["TamaguiSeparator", "Separator"],
|
|
108
116
|
["TamaguiSizableText", "SizableText"],
|
|
109
117
|
["TamaguiSlider", "Slider"],
|
|
110
118
|
["TamaguiSpinner", "Spinner"],
|
|
@@ -130,6 +138,7 @@ const HOUSE_SHADOWS = [
|
|
|
130
138
|
"Image",
|
|
131
139
|
"Menu",
|
|
132
140
|
"Paragraph",
|
|
141
|
+
"Separator",
|
|
133
142
|
"SizableText",
|
|
134
143
|
"Spinner",
|
|
135
144
|
"Tabs",
|
package/src/tamagui.ts
CHANGED
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
// - The curation is locked by tamagui.spec.ts — update both together.
|
|
24
24
|
|
|
25
25
|
// Layout primitives (no house replacement).
|
|
26
|
-
// Separator left this list 2026-08-28 (MPO-47):
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// TamaguiSeparator below.
|
|
26
|
+
// Separator left this list 2026-08-28 (MPO-47): a bare catalog name may not
|
|
27
|
+
// resolve to a raw primitive (LC-45 / LC-70), and the raw one is a `flex: 1`
|
|
28
|
+
// item that can absorb free space (DG-OVF-07). The bare name is the house
|
|
29
|
+
// Separator re-exported via index.ts (1px painted line in $borderColor,
|
|
30
|
+
// quiet = opacity 0.5). Raw stays reachable as TamaguiSeparator below.
|
|
31
31
|
export {
|
|
32
32
|
Circle,
|
|
33
33
|
Group,
|
package/src/views/index.ts
CHANGED
|
@@ -42,10 +42,18 @@ export {
|
|
|
42
42
|
type TreeViewDisplay,
|
|
43
43
|
} from "./TreeView";
|
|
44
44
|
export { ImageGrid, type ImageGridProps, type ImageGridHotkeys } from "./ImageGrid";
|
|
45
|
+
// ProgressCard/ShortcutCard/ListCard ride this barrel on purpose (MPO-53
|
|
46
|
+
// B-meter, the ProgressCard export gap): Dashboard.tsx exports them but they
|
|
47
|
+
// were reachable only through the deep path until the Meter extraction, and
|
|
48
|
+
// 5c7af7134 collaterally dropped them again. Meter.spec.tsx imports them from
|
|
49
|
+
// here so the next revert fails a test instead of shipping.
|
|
45
50
|
export {
|
|
46
51
|
Dashboard,
|
|
47
52
|
KPICard,
|
|
48
53
|
ChartCard,
|
|
54
|
+
ProgressCard,
|
|
55
|
+
ShortcutCard,
|
|
56
|
+
ListCard,
|
|
49
57
|
calculateTrend,
|
|
50
58
|
calculatePercentageChange,
|
|
51
59
|
aggregateData,
|
|
@@ -59,6 +67,13 @@ export {
|
|
|
59
67
|
type ChartDataPoint,
|
|
60
68
|
type ChartType,
|
|
61
69
|
type TrendDirection,
|
|
70
|
+
type ProgressConfig,
|
|
71
|
+
type ProgressCardProps,
|
|
72
|
+
type ShortcutConfig,
|
|
73
|
+
type ShortcutCardProps,
|
|
74
|
+
type ListConfig,
|
|
75
|
+
type ListCardProps,
|
|
76
|
+
type DashboardListItem,
|
|
62
77
|
} from "./Dashboard";
|
|
63
78
|
export {
|
|
64
79
|
ReportBuilder,
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CopyField — a read-only Input
|
|
2
|
+
* CopyField — declared copy on a read-only Input.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Second consumer of the MPO-52 reveal's Input.Button end-cap (LC-16).
|
|
5
|
+
* Confirm is notify() success → toast "Copied to clipboard." Failure is
|
|
6
|
+
* field-scoped "Copy failed." — an inline alert, never a toast.
|
|
7
7
|
*
|
|
8
|
-
* MPO-81
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* with TS2322 and blocked every release. The pass is removed rather than the
|
|
12
|
-
* props declared on `Input`, because declaring a prop nothing implements
|
|
13
|
-
* ships a lying API to every consumer.
|
|
14
|
-
*
|
|
15
|
-
* Re-add `copy onCopyResult={reportCopy}` here in the same change that
|
|
16
|
-
* implements the cap in `@multiplatform.one/forms`, not before.
|
|
8
|
+
* MPO-81 removed the copy/onCopyResult pass while the forms half was
|
|
9
|
+
* missing; the forms cap is implemented again (Input `copy` +
|
|
10
|
+
* Input.Button `glyphRing`), so the pass is back.
|
|
17
11
|
*/
|
|
18
12
|
import { type InputProps } from "@multiplatform.one/forms";
|
|
19
|
-
export type CopyFieldProps = Omit<InputProps, "secureTextEntry">;
|
|
13
|
+
export type CopyFieldProps = Omit<InputProps, "copy" | "onCopyResult" | "secureTextEntry">;
|
|
20
14
|
export declare function CopyField(props: CopyFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
21
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CopyField/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CopyField/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKlE,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,iBAAiB,CAAC,CAAC;AAE3F,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAO9C"}
|
|
@@ -36,6 +36,13 @@ export interface ProgressStepsProps extends Omit<GetProps<typeof StepsRoot>, "ch
|
|
|
36
36
|
linear?: boolean;
|
|
37
37
|
/** Compact markers + type (density compact override). */
|
|
38
38
|
compact?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Rail label treatment. `"hidden"` keeps markers (and a11y names) and
|
|
41
|
+
* drops the visible per-step label — the 390 wizard treatment; the
|
|
42
|
+
* current step's name rides the wizard legend as "Step n of m — X".
|
|
43
|
+
* @default "visible"
|
|
44
|
+
*/
|
|
45
|
+
labels?: "visible" | "hidden";
|
|
39
46
|
}
|
|
40
47
|
declare const StepsRoot: import("tamagui").TamaguiComponent<import("@tamagui/web").TamaDefer, import("tamagui").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
41
48
|
elevation?: number | import("tamagui").SizeTokens | undefined;
|
|
@@ -50,6 +57,6 @@ declare const StepsRoot: import("tamagui").TamaguiComponent<import("@tamagui/web
|
|
|
50
57
|
* helper text, error/optional, linear-by-default. Polaris has no wizard
|
|
51
58
|
* stepper — display-only when `onStepChange` is omitted.
|
|
52
59
|
*/
|
|
53
|
-
export declare function ProgressSteps({ steps, current, onStepChange, orientation, allowJump, linear, compact, ...props }: ProgressStepsProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare function ProgressSteps({ steps, current, onStepChange, orientation, allowJump, linear, compact, labels, ...props }: ProgressStepsProps): import("react/jsx-runtime").JSX.Element;
|
|
54
61
|
export {};
|
|
55
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProgressSteps/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,QAAQ,CAAC,OAAO,SAAS,CAAC,EAAE,UAAU,CAAC;IACtF,qBAAqB;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,yCAAyC;IACzC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProgressSteps/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,QAAQ,CAAC,OAAO,SAAS,CAAC,EAAE,UAAU,CAAC;IACtF,qBAAqB;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,yCAAyC;IACzC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B;AAOD,QAAA,MAAM,SAAS;;;6CAGb,CAAC;AAkDH;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,YAAY,EACZ,WAA0B,EAC1B,SAAgB,EAChB,MAAa,EACb,OAAO,EACP,MAAkB,EAClB,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAwQpB"}
|