@multiplatform.one/theme 10.27.4 → 11.1.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/README.md +6 -4
- package/dist/cjs/index.gnome.cjs +2 -1
- package/dist/cjs/index.gnome.native.cjs +2 -1
- package/dist/cjs/index.gnome.native.js +2 -1
- package/dist/cjs/index.gnome.native.js.map +1 -1
- package/dist/cjs/theme/createThemes.cjs +0 -4
- package/dist/cjs/theme/createThemes.native.cjs +0 -4
- package/dist/cjs/theme/createThemes.native.js +0 -4
- package/dist/cjs/theme/createThemes.native.js.map +1 -1
- package/dist/cjs/theme/overlaySurfaces.cjs +18 -31
- package/dist/cjs/theme/overlaySurfaces.native.cjs +18 -32
- package/dist/cjs/theme/overlaySurfaces.native.js +18 -32
- package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -1
- package/dist/cjs/theme/unknownTokenGuard.cjs +32 -1
- package/dist/cjs/theme/unknownTokenGuard.native.cjs +70 -1
- package/dist/cjs/theme/unknownTokenGuard.native.js +70 -1
- package/dist/cjs/theme/unknownTokenGuard.native.js.map +1 -1
- package/dist/esm/index.gnome.mjs +2 -2
- package/dist/esm/index.gnome.native.js +2 -2
- package/dist/esm/theme/createThemes.mjs +0 -4
- package/dist/esm/theme/createThemes.mjs.map +1 -1
- package/dist/esm/theme/createThemes.native.js +0 -4
- package/dist/esm/theme/createThemes.native.js.map +1 -1
- package/dist/esm/theme/overlaySurfaces.mjs +19 -33
- package/dist/esm/theme/overlaySurfaces.mjs.map +1 -1
- package/dist/esm/theme/overlaySurfaces.native.js +19 -34
- package/dist/esm/theme/overlaySurfaces.native.js.map +1 -1
- package/dist/esm/theme/unknownTokenGuard.mjs +32 -1
- package/dist/esm/theme/unknownTokenGuard.mjs.map +1 -1
- package/dist/esm/theme/unknownTokenGuard.native.js +70 -1
- package/dist/esm/theme/unknownTokenGuard.native.js.map +1 -1
- package/package.json +5 -5
- package/src/index.gnome.ts +2 -1
- package/src/theme/controlEdges.spec.ts +2 -2
- package/src/theme/createDefaultThemeConfig.spec.ts +6 -14
- package/src/theme/createThemes.ts +0 -4
- package/src/theme/overlaySurfaces.focus.spec.tsx +0 -48
- package/src/theme/overlaySurfaces.tsx +29 -67
- package/src/theme/rampRoles.spec.ts +1 -1
- package/src/theme/rowStates.spec.ts +1 -1
- package/src/theme/selectedState.spec.ts +1 -2
- package/src/theme/sheetFrameHandle.spec.ts +8 -0
- package/src/theme/sheetHandle.spec.ts +16 -16
- package/src/theme/subsetThemes.spec.ts +3 -3
- package/src/theme/unknownTokenGuard.spec.tsx +35 -1
- package/src/theme/unknownTokenGuard.ts +54 -3
- package/types/index.gnome.d.ts +1 -1
- package/types/index.gnome.d.ts.map +1 -1
- package/types/theme/createThemes.d.ts +0 -12
- package/types/theme/createThemes.d.ts.map +1 -1
- package/types/theme/overlaySurfaces.d.ts +23 -32
- package/types/theme/overlaySurfaces.d.ts.map +1 -1
- package/types/theme/unknownTokenGuard.d.ts +3 -2
- package/types/theme/unknownTokenGuard.d.ts.map +1 -1
|
@@ -41,7 +41,7 @@ describe("LC-299 CONTROL-EDGE: control edges clear WCAG 1.4.11's 3:1", () => {
|
|
|
41
41
|
for (const scope of hueScopes) {
|
|
42
42
|
it(`${scope}: field edges hold 3:1 on the page and on their own fill`, () => {
|
|
43
43
|
const page = resolve(scope);
|
|
44
|
-
for (const control of ["Input", "TextArea", "
|
|
44
|
+
for (const control of ["Input", "TextArea", "InputContainerFrame"]) {
|
|
45
45
|
const field = resolve(`${scope}_${control}`);
|
|
46
46
|
for (const key of ["border-color-field", "border-color-field-hover"]) {
|
|
47
47
|
expect(
|
|
@@ -81,7 +81,7 @@ describe("LC-299 CONTROL-EDGE: control edges clear WCAG 1.4.11's 3:1", () => {
|
|
|
81
81
|
const scheme = scope.split("_")[0]!;
|
|
82
82
|
const own = Array.from({ length: 12 }, (_, index) => themes[scope]![`color-${index + 1}`]);
|
|
83
83
|
const pages = hueScopes.filter((name) => name.startsWith(`${scheme}_`)).concat(scheme);
|
|
84
|
-
for (const control of ["Input", "TextArea", "
|
|
84
|
+
for (const control of ["Input", "TextArea", "InputContainerFrame"]) {
|
|
85
85
|
const field = resolve(`${scope}_${control}`);
|
|
86
86
|
for (const key of ["border-color-field", "border-color-field-hover"]) {
|
|
87
87
|
expect(own, `${control} ${key}`).toContain(field[key]);
|
|
@@ -403,21 +403,13 @@ describe("the v5 theme matrix", () => {
|
|
|
403
403
|
const config = createDefaultThemeConfig();
|
|
404
404
|
const themes = config.tamagui.themes as unknown as RawThemes;
|
|
405
405
|
|
|
406
|
-
// LC-151 SURFACE-LADDER: the grouped step. Light lifts cards
|
|
406
|
+
// LC-151 SURFACE-LADDER: the grouped step. Light lifts cards
|
|
407
407
|
// and fields to white on the grey page; dark drops the page to $color1 and
|
|
408
408
|
// lifts them to $color4, iOS's grouped step (FZ-8400). The grouped step is
|
|
409
409
|
// surface1 itself, so it costs no CSS; tracks move to surface2 to stay off
|
|
410
410
|
// a white card.
|
|
411
|
-
it("puts cards
|
|
412
|
-
for (const component of [
|
|
413
|
-
"Card",
|
|
414
|
-
"ListItem",
|
|
415
|
-
"Input",
|
|
416
|
-
"TextArea",
|
|
417
|
-
"InputContainerFrame",
|
|
418
|
-
"SelectTrigger",
|
|
419
|
-
"SelectItem",
|
|
420
|
-
]) {
|
|
411
|
+
it("puts cards and fields on the grouped step", () => {
|
|
412
|
+
for (const component of ["Card", "Input", "TextArea", "InputContainerFrame"]) {
|
|
421
413
|
expect(themes[`light_${component}`].background, `light_${component}`).toBe(
|
|
422
414
|
themes.light["color-1"],
|
|
423
415
|
);
|
|
@@ -438,7 +430,7 @@ describe("the v5 theme matrix", () => {
|
|
|
438
430
|
expect(themes.light_orange_Card.background).toBe(themes.light_orange["color-1"]);
|
|
439
431
|
});
|
|
440
432
|
|
|
441
|
-
const edgeSurfaces = ["_Card", "
|
|
433
|
+
const edgeSurfaces = ["_Card", "_Input", "_TextArea"];
|
|
442
434
|
|
|
443
435
|
// FZ-9281 / LC-148: iOS's dark opaqueSeparator #38383A over its grouped cell
|
|
444
436
|
// #1C1C1E is 1.454:1. Every dark ramp theme's hairline clears that against
|
|
@@ -654,10 +646,10 @@ describe("the v5 theme matrix", () => {
|
|
|
654
646
|
// blocks, which moved it to 424 KB.
|
|
655
647
|
// FZ-9260 adds the sky and plum scopes ocean and paper wear (76 themes,
|
|
656
648
|
// +34,881 bytes when measured on 2026-11-03), and the budget moves to 492 KB.
|
|
657
|
-
it("ships
|
|
649
|
+
it("ships 634 themes and the heading-scope category fonts in under 584 KB of CSS (the v4 matrix and stock spread shipped 913 KB)", async () => {
|
|
658
650
|
const { createTamagui: build } = await vi.importActual<typeof import("tamagui")>("tamagui");
|
|
659
651
|
const css = build(config.tamagui).getCSS();
|
|
660
|
-
expect(Object.keys(themes)).toHaveLength(
|
|
652
|
+
expect(Object.keys(themes)).toHaveLength(634);
|
|
661
653
|
expect(Buffer.byteLength(css, "utf8")).toBeLessThan(584_000);
|
|
662
654
|
});
|
|
663
655
|
});
|
|
@@ -213,13 +213,9 @@ export const houseComponentThemes = {
|
|
|
213
213
|
Progress: { template: "surface2" },
|
|
214
214
|
ProgressIndicator: { template: "surface3" },
|
|
215
215
|
Slider: { template: "surface2" },
|
|
216
|
-
SliderActive: { template: "surface3" },
|
|
217
216
|
SliderThumb: { template: "surface1" },
|
|
218
217
|
Switch: { template: "surface2" },
|
|
219
218
|
Card: { template: "surface1" },
|
|
220
|
-
ListItem: { template: "surface1" },
|
|
221
|
-
SelectTrigger: { template: "surface1" },
|
|
222
|
-
SelectItem: { template: "surface1" },
|
|
223
219
|
InputContainerFrame: { template: "surface1" },
|
|
224
220
|
} as const;
|
|
225
221
|
|
|
@@ -50,7 +50,6 @@ const {
|
|
|
50
50
|
AlertDialogOverlay,
|
|
51
51
|
DialogContent,
|
|
52
52
|
DialogOverlay,
|
|
53
|
-
DialogShowFocus,
|
|
54
53
|
dialogScrim,
|
|
55
54
|
useIsInDialogRegion,
|
|
56
55
|
} = await import("./overlaySurfaces");
|
|
@@ -151,53 +150,6 @@ describe("house open focus (MPO-452, LC-71)", () => {
|
|
|
151
150
|
});
|
|
152
151
|
});
|
|
153
152
|
|
|
154
|
-
describe("<dialog>.show() focus (MPO-470)", () => {
|
|
155
|
-
function content(focusable: HTMLElement) {
|
|
156
|
-
const node = el("div", { id: "dialog-1" });
|
|
157
|
-
const field = el("input", { type: "text" });
|
|
158
|
-
node.append(focusable, field);
|
|
159
|
-
document.body.append(node);
|
|
160
|
-
focusable.focus();
|
|
161
|
-
return { node, field };
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
it("moves focus off a frame show() left it on, after the caller's handler", () => {
|
|
165
|
-
const { field } = content(el("div", { tabindex: "-1" }));
|
|
166
|
-
seen.dialog = { open: true, contentId: "dialog-1" };
|
|
167
|
-
const caller = vi.fn();
|
|
168
|
-
render(<DialogShowFocus onOpenAutoFocus={caller} />);
|
|
169
|
-
expect(caller).toHaveBeenCalledTimes(1);
|
|
170
|
-
expect(document.activeElement).toBe(field);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
it("keeps a keyboard user's tab stop, and does nothing while closed", () => {
|
|
174
|
-
const button = el("button");
|
|
175
|
-
content(button);
|
|
176
|
-
keyboard();
|
|
177
|
-
seen.dialog = { open: true, contentId: "dialog-1" };
|
|
178
|
-
const caller = vi.fn();
|
|
179
|
-
render(<DialogShowFocus onOpenAutoFocus={caller} />);
|
|
180
|
-
seen.dialog = { open: false, contentId: "dialog-1" };
|
|
181
|
-
render(<DialogShowFocus onOpenAutoFocus={caller} />);
|
|
182
|
-
expect(caller).not.toHaveBeenCalled();
|
|
183
|
-
expect(document.activeElement).toBe(button);
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
it("ignores focus outside the content and a content id that is not in the page", () => {
|
|
187
|
-
const outside = el("button");
|
|
188
|
-
document.body.append(outside);
|
|
189
|
-
content(el("div", { tabindex: "-1" }));
|
|
190
|
-
outside.focus();
|
|
191
|
-
const caller = vi.fn();
|
|
192
|
-
seen.dialog = { open: true, contentId: "dialog-1" };
|
|
193
|
-
render(<DialogShowFocus onOpenAutoFocus={caller} />);
|
|
194
|
-
seen.dialog = { open: true, contentId: "missing" };
|
|
195
|
-
render(<DialogShowFocus onOpenAutoFocus={caller} />);
|
|
196
|
-
expect(caller).not.toHaveBeenCalled();
|
|
197
|
-
expect(document.activeElement).toBe(outside);
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
|
|
201
153
|
describe("dialog frames", () => {
|
|
202
154
|
it("fit a numeric width to the window less one panel inset each side (FZ-8020)", () => {
|
|
203
155
|
seen.width = 390;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { focusOnOpen
|
|
1
|
+
import { focusOnOpen } from "../keyboardFocusRing";
|
|
2
2
|
import { scrimFor } from "./motion";
|
|
3
3
|
import { transitionProps } from "./transitionProps";
|
|
4
4
|
import { Surface } from "./Surface";
|
|
@@ -6,8 +6,8 @@ import { useResolvedKnobs } from "./useResolvedKnobs";
|
|
|
6
6
|
import { ALERT_READABLE_WIDTH } from "./layoutTokens";
|
|
7
7
|
import { panelPaddingPx } from "./resolveKnobs";
|
|
8
8
|
import type { ReactNode } from "react";
|
|
9
|
-
import { createContext, forwardRef, useContext
|
|
10
|
-
import {
|
|
9
|
+
import { createContext, forwardRef, useContext } from "react";
|
|
10
|
+
import type { TamaguiChangeEventDetails } from "@tamagui/web";
|
|
11
11
|
import {
|
|
12
12
|
AlertDialog,
|
|
13
13
|
Dialog,
|
|
@@ -60,49 +60,47 @@ export const sheetGrabberZone = {
|
|
|
60
60
|
height: 21,
|
|
61
61
|
} as const;
|
|
62
62
|
|
|
63
|
-
/**
|
|
63
|
+
/** Legacy proportional width; the house handle now uses the fixed 36pt recipe. */
|
|
64
64
|
export const sheetHandleWidthRatio = 0.3;
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* A sheet's handle (FZ-
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* 8pt above a 16pt top corner. Every sheet but FloatingPanel's draws it:
|
|
67
|
+
* A sheet's handle (FZ-13310), a 36×5 capsule 5pt inside the frame's edge.
|
|
68
|
+
* Its margins net to no height, placing the following frame behind the
|
|
69
|
+
* grabber instead of leaving a detached gap. Every sheet draws it:
|
|
71
70
|
* SheetModal on both platforms, AdaptivePopup's sheet and the house Dialog's
|
|
72
71
|
* phone sheet. Spread it, then `sheetHandleTone(scheme)`, on `Sheet.Handle`
|
|
73
|
-
* (web) or inside `sheetHandleZone` (native)
|
|
74
|
-
*
|
|
75
|
-
* the panel.
|
|
72
|
+
* (web) or inside `sheetHandleZone` (native), at the same fixed width on
|
|
73
|
+
* a phone and a regular-width panel.
|
|
76
74
|
*/
|
|
77
75
|
export const sheetHandle = {
|
|
78
|
-
width:
|
|
79
|
-
height:
|
|
76
|
+
width: 36,
|
|
77
|
+
height: 5,
|
|
80
78
|
borderRadius: 100,
|
|
81
|
-
backgroundColor: "$color-
|
|
82
|
-
opacity:
|
|
79
|
+
backgroundColor: "$color-12",
|
|
80
|
+
opacity: 0.3,
|
|
83
81
|
alignSelf: "center",
|
|
84
82
|
marginHorizontal: 0,
|
|
85
|
-
marginTop:
|
|
86
|
-
marginBottom:
|
|
83
|
+
marginTop: 5,
|
|
84
|
+
marginBottom: -10,
|
|
87
85
|
zIndex: 10,
|
|
88
86
|
} as const;
|
|
89
87
|
|
|
90
88
|
/**
|
|
91
|
-
* A native sheet's grab zone around `sheetHandle
|
|
92
|
-
* with room
|
|
89
|
+
* A native sheet's grab zone around `sheetHandle`, inside the frame,
|
|
90
|
+
* with room around the pill so a finger finds it.
|
|
93
91
|
*/
|
|
94
92
|
export const sheetHandleZone = {
|
|
95
93
|
alignSelf: "stretch",
|
|
96
94
|
alignItems: "center",
|
|
97
|
-
paddingTop:
|
|
95
|
+
paddingTop: 0,
|
|
96
|
+
height: 21,
|
|
98
97
|
} as const;
|
|
99
98
|
|
|
100
|
-
const sheetHandleToneOpen = { backgroundColor: "$color-
|
|
99
|
+
const sheetHandleToneOpen = { backgroundColor: "$color-12", opacity: 0.3 } as const;
|
|
101
100
|
|
|
102
101
|
/**
|
|
103
|
-
* The handle's tone per scheme (FZ-
|
|
104
|
-
* schemes take
|
|
105
|
-
* tamagui.dev's dark handle measures that same #333 grey.
|
|
102
|
+
* The handle's tone per scheme (FZ-13310), spread after `sheetHandle`. Both
|
|
103
|
+
* schemes take the shared capsule's theme-relative ink at 30% opacity.
|
|
106
104
|
*/
|
|
107
105
|
export function sheetHandleTone(_scheme: "light" | "dark") {
|
|
108
106
|
return sheetHandleToneOpen;
|
|
@@ -124,12 +122,7 @@ const overlayFrameFocus = {
|
|
|
124
122
|
// already hold focus: a click into a field during that wait had focus
|
|
125
123
|
// moved to another control, so the typing that followed went there. The
|
|
126
124
|
// house handler checks and focuses in one step. With no tabbable yet,
|
|
127
|
-
// tamagui's deferred path still runs.
|
|
128
|
-
// <dialog> whose show() puts focus inside before the check in browsers,
|
|
129
|
-
// so there FocusScope never calls the handler; useDialogShowFocus does
|
|
130
|
-
// when show() left focus on something that is not a tab stop (MPO-470), or
|
|
131
|
-
// on any control after a non-keyboard open, which Chromium would ring
|
|
132
|
-
// (LC-71, FZ-7944).
|
|
125
|
+
// tamagui's deferred path still runs.
|
|
133
126
|
|
|
134
127
|
function isTabbableWithin(node: HTMLElement, container: HTMLElement): boolean {
|
|
135
128
|
if (node.tabIndex < 0 || node.hidden || node.tagName === "A") return false;
|
|
@@ -181,40 +174,6 @@ function contentById(contentId: string | undefined): Element | null {
|
|
|
181
174
|
return document.getElementById(contentId);
|
|
182
175
|
}
|
|
183
176
|
|
|
184
|
-
/**
|
|
185
|
-
* Chromium and WebKit's `<dialog>.show()` focuses the first focusable
|
|
186
|
-
* descendant, so a tabIndex -1 frame (the house Input's group frame, a
|
|
187
|
-
* tabIndex -1 panel) takes focus; Firefox and the HTML spec take the first
|
|
188
|
-
* tab stop. When focus sits on something that is not a tab stop, run
|
|
189
|
-
* `onOpenAutoFocus` against the content the way FocusScope would. The
|
|
190
|
-
* content is found by its id because FocusScope clones it with its own ref,
|
|
191
|
-
* so a ref passed to `Dialog.Content` never attaches on web. Passive effects
|
|
192
|
-
* run after the portal's layout-effect `show()`.
|
|
193
|
-
*/
|
|
194
|
-
function useDialogShowFocus(onOpenAutoFocus: OpenAutoFocus): void {
|
|
195
|
-
const { open, contentId } = useDialogContext();
|
|
196
|
-
useEffect(() => {
|
|
197
|
-
if (!open || !contentId || !isWeb || typeof document === "undefined") return;
|
|
198
|
-
const content = document.getElementById(contentId);
|
|
199
|
-
const focused = document.activeElement;
|
|
200
|
-
if (!content || typeof HTMLElement === "undefined" || !(focused instanceof HTMLElement)) return;
|
|
201
|
-
if (!content.contains(focused) || (focused.tabIndex >= 0 && wasKeyboardFocus())) return;
|
|
202
|
-
onOpenAutoFocus(createChangeEventDetails("trigger-focus"));
|
|
203
|
-
}, [open, contentId]);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* The house open focus for a raw `Dialog.Content`, which `DialogContent` and
|
|
208
|
-
* `AlertDialogContent` already run: render it inside the content. When
|
|
209
|
-
* `<dialog>.show()` left focus off a tab stop, the caller's `onOpenAutoFocus`
|
|
210
|
-
* runs, then the first tabbable takes focus (MPO-470).
|
|
211
|
-
*/
|
|
212
|
-
export function DialogShowFocus({ onOpenAutoFocus }: { onOpenAutoFocus?: OpenAutoFocus }): null {
|
|
213
|
-
const { contentId } = useDialogContext();
|
|
214
|
-
useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
177
|
// ── Dialog region context (DG-OVL-04) ───────────────────────────────────
|
|
219
178
|
|
|
220
179
|
export interface DialogRegionContextValue {
|
|
@@ -244,6 +203,12 @@ const IN_DIALOG_REGION: DialogRegionContextValue = { inDialogRegion: true };
|
|
|
244
203
|
// ── Sheet body (FZ-11418) ───────────────────────────────────────────────
|
|
245
204
|
|
|
246
205
|
const SheetBodyContext = createContext(false);
|
|
206
|
+
const SheetBodyInsetContext = createContext<string | number>(0);
|
|
207
|
+
export const SheetBodyInsetProvider = SheetBodyInsetContext.Provider;
|
|
208
|
+
|
|
209
|
+
export function useSheetBodyInset(): string | number {
|
|
210
|
+
return useContext(SheetBodyInsetContext);
|
|
211
|
+
}
|
|
247
212
|
|
|
248
213
|
/**
|
|
249
214
|
* Marks a subtree as a sheet's body (FZ-11418): SheetModal on both platforms
|
|
@@ -342,7 +307,6 @@ const DialogContentInner = forwardRef<
|
|
|
342
307
|
const { knobProps } = useResolvedKnobs({ component: "DialogContent" });
|
|
343
308
|
const { contentId } = useDialogContext();
|
|
344
309
|
const openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);
|
|
345
|
-
useDialogShowFocus(openFocus);
|
|
346
310
|
const windowFit = useWindowFit(props);
|
|
347
311
|
return (
|
|
348
312
|
<Dialog.Content
|
|
@@ -423,8 +387,6 @@ const AlertDialogContentInner = forwardRef<
|
|
|
423
387
|
TamaguiDialogContentProps & { children?: ReactNode }
|
|
424
388
|
>(function AlertDialogContentInner({ children, ...props }, ref) {
|
|
425
389
|
const { knobProps } = useResolvedKnobs({ component: "AlertDialogContent" });
|
|
426
|
-
const { contentId } = useDialogContext();
|
|
427
|
-
useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));
|
|
428
390
|
const windowFit = useWindowFit(props, ALERT_READABLE_WIDTH);
|
|
429
391
|
return (
|
|
430
392
|
<AlertDialog.Content
|
|
@@ -21,7 +21,7 @@ import { resolveThemeThroughParents } from "./dedupeInherited";
|
|
|
21
21
|
|
|
22
22
|
type RawThemes = Record<string, Record<string, string>>;
|
|
23
23
|
|
|
24
|
-
const surfaceComponents = ["Card", "
|
|
24
|
+
const surfaceComponents = ["Card", "Button", "Input", "TextArea"] as const;
|
|
25
25
|
|
|
26
26
|
function buildThemes(options: Parameters<typeof createDefaultThemeConfig>[0] = {}): RawThemes {
|
|
27
27
|
const config = createDefaultThemeConfig(options) as unknown as {
|
|
@@ -44,7 +44,7 @@ describe("LC-280 ROW-STATE-LADDER (FZ-9232)", () => {
|
|
|
44
44
|
it("knows a surface1 theme from its name", () => {
|
|
45
45
|
expect(rowGroundOfTheme("dark_blue_Card")).toEqual({ ground: "card", scheme: "dark" });
|
|
46
46
|
expect(rowGroundOfTheme("dark_purple_alt1")).toEqual({ ground: "card", scheme: "dark" });
|
|
47
|
-
expect(rowGroundOfTheme("
|
|
47
|
+
expect(rowGroundOfTheme("light_Input")).toEqual({ ground: "card", scheme: "light" });
|
|
48
48
|
expect(rowGroundOfTheme("dark_blue")).toEqual({ ground: "page", scheme: "dark" });
|
|
49
49
|
expect(rowGroundOfTheme("dark_blue_Button")).toEqual({ ground: "page", scheme: "dark" });
|
|
50
50
|
});
|
|
@@ -174,7 +174,6 @@ describe("LC-05 ONE-EMPHASIS: the selected row separates from its page", () => {
|
|
|
174
174
|
|
|
175
175
|
it("repaints the list row and card under the blue colour theme's page", () => {
|
|
176
176
|
const scope = paint("light", "light_blue", "$color-4");
|
|
177
|
-
|
|
178
|
-
expect(paint("light", child, "$color-4"), child).toBe(scope);
|
|
177
|
+
expect(paint("light", "light_blue_Card", "$color-4")).toBe(scope);
|
|
179
178
|
});
|
|
180
179
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { expect, it } from "vitest";
|
|
2
|
+
import { sheetHandle, sheetHandleTone } from "./overlaySurfaces";
|
|
3
|
+
|
|
4
|
+
it("places the shared 36x5 grabber five points inside the frame without a detached gap", () => {
|
|
5
|
+
expect(sheetHandle).toMatchObject({ width: 36, height: 5, marginTop: 5, marginBottom: -10 });
|
|
6
|
+
expect(sheetHandle.height + sheetHandle.marginTop + sheetHandle.marginBottom).toBe(0);
|
|
7
|
+
expect(sheetHandleTone("dark")).toEqual(sheetHandleTone("light"));
|
|
8
|
+
});
|
|
@@ -8,34 +8,34 @@ import {
|
|
|
8
8
|
sheetHandleZone,
|
|
9
9
|
} from "./overlaySurfaces";
|
|
10
10
|
|
|
11
|
-
describe("sheetHandle (FZ-
|
|
12
|
-
it("is
|
|
11
|
+
describe("sheetHandle (FZ-13310)", () => {
|
|
12
|
+
it("is a fixed 36x5 pill at phone and regular widths", () => {
|
|
13
13
|
expect(sheetHandle).toMatchObject({
|
|
14
|
-
height:
|
|
15
|
-
width:
|
|
14
|
+
height: 5,
|
|
15
|
+
width: 36,
|
|
16
16
|
borderRadius: 100,
|
|
17
17
|
alignSelf: "center",
|
|
18
18
|
});
|
|
19
19
|
expect(sheetHandleWidthRatio).toBe(0.3);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it("paints
|
|
23
|
-
expect(sheetHandle).toMatchObject({ backgroundColor: "$color-
|
|
22
|
+
it("paints theme-relative ink at the shared grabber tone", () => {
|
|
23
|
+
expect(sheetHandle).toMatchObject({ backgroundColor: "$color-12", opacity: 0.3 });
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
it("sits
|
|
27
|
-
expect(sheetHandle.marginTop).toBe(
|
|
28
|
-
expect(sheetHandle.marginBottom).toBe(
|
|
26
|
+
it("sits inside the frame with no detached gap", () => {
|
|
27
|
+
expect(sheetHandle.marginTop).toBe(5);
|
|
28
|
+
expect(sheetHandle.marginBottom).toBe(-10);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
it("gives a native finger
|
|
31
|
+
it("gives a native finger a zone around the pill", () => {
|
|
32
32
|
expect(sheetHandleZone).toMatchObject({ alignSelf: "stretch", alignItems: "center" });
|
|
33
|
-
expect(sheetHandleZone.
|
|
33
|
+
expect(sheetHandleZone.height).toBeGreaterThan(sheetHandle.height);
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it("
|
|
36
|
+
it("shares FloatingPanel's existing capsule geometry", () => {
|
|
37
37
|
expect(sheetHandle).toBeDefined();
|
|
38
|
-
expect(sheetHandle).
|
|
38
|
+
expect(sheetHandle).toEqual(sheetGrabber);
|
|
39
39
|
expect(sheetGrabber).toMatchObject({ width: 36, height: 5 });
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -46,9 +46,9 @@ describe("sheetHandle (FZ-11418, tamagui's Sheet.Handle)", () => {
|
|
|
46
46
|
expect(theme.sheetHandleWidthRatio).toBe(sheetHandleWidthRatio);
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
it("takes
|
|
50
|
-
expect(sheetHandleTone("light")).toEqual({ backgroundColor: "$color-
|
|
51
|
-
expect(sheetHandleTone("dark")).toEqual({ backgroundColor: "$color-
|
|
49
|
+
it("takes the shared theme-relative tone in both schemes", () => {
|
|
50
|
+
expect(sheetHandleTone("light")).toEqual({ backgroundColor: "$color-12", opacity: 0.3 });
|
|
51
|
+
expect(sheetHandleTone("dark")).toEqual({ backgroundColor: "$color-12", opacity: 0.3 });
|
|
52
52
|
expect(theme.sheetHandleTone).toBe(sheetHandleTone);
|
|
53
53
|
});
|
|
54
54
|
});
|
|
@@ -118,7 +118,7 @@ describe("subsetThemes over the house matrix", () => {
|
|
|
118
118
|
components: ["Button"],
|
|
119
119
|
tints: ["accent", "active", "alt1", "alt2", "error", "success", "warning"],
|
|
120
120
|
});
|
|
121
|
-
expect(Object.keys(built)).toHaveLength(
|
|
121
|
+
expect(Object.keys(built)).toHaveLength(634);
|
|
122
122
|
expect(Object.keys(kept)).toHaveLength(44);
|
|
123
123
|
for (const name of ["light", "dark", "light_accent", "light_Button", "dark_error_Button"]) {
|
|
124
124
|
expect(kept).toHaveProperty(name);
|
|
@@ -149,7 +149,7 @@ describe("subsetThemes over the house matrix", () => {
|
|
|
149
149
|
});
|
|
150
150
|
expect(limited).toEqual(onButtonsOnly);
|
|
151
151
|
expect(limited.length).toBeLessThan(crossed.length);
|
|
152
|
-
expect([crossed.length, limited.length]).toEqual([
|
|
152
|
+
expect([crossed.length, limited.length]).toEqual([284, 176]);
|
|
153
153
|
for (const name of [
|
|
154
154
|
"light_red",
|
|
155
155
|
"dark_green_accent",
|
|
@@ -158,7 +158,7 @@ describe("subsetThemes over the house matrix", () => {
|
|
|
158
158
|
]) {
|
|
159
159
|
expect(limited).toContain(name);
|
|
160
160
|
}
|
|
161
|
-
for (const name of ["light_red_Input", "
|
|
161
|
+
for (const name of ["light_red_Input", "dark_green_Card", "light_yellow_Switch"]) {
|
|
162
162
|
expect(crossed).toContain(name);
|
|
163
163
|
expect(limited).not.toContain(name);
|
|
164
164
|
}
|
|
@@ -50,6 +50,27 @@ function UnboundedRow() {
|
|
|
50
50
|
return <YStack height={halfStepHeight} />;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
const camelInk = "$textMuted";
|
|
54
|
+
const camelEdge = "$borderColorHairline";
|
|
55
|
+
|
|
56
|
+
function NineXCard() {
|
|
57
|
+
return (
|
|
58
|
+
<YStack borderColor={camelEdge}>
|
|
59
|
+
<Paragraph color={camelInk}>muted</Paragraph>
|
|
60
|
+
</YStack>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function TenXCard() {
|
|
65
|
+
return (
|
|
66
|
+
<YStack borderColor="$border-color-hairline" backgroundColor="transparent">
|
|
67
|
+
<Paragraph color="$text-muted">muted</Paragraph>
|
|
68
|
+
<Paragraph color="$color-11">ink</Paragraph>
|
|
69
|
+
<Paragraph color="rebeccaPurple">css</Paragraph>
|
|
70
|
+
</YStack>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
53
74
|
let warn: ReturnType<typeof vi.spyOn>;
|
|
54
75
|
|
|
55
76
|
beforeEach(() => {
|
|
@@ -84,6 +105,19 @@ describe("guardUnknownTokens", () => {
|
|
|
84
105
|
]);
|
|
85
106
|
});
|
|
86
107
|
|
|
108
|
+
it("catches a 9.x camelCase theme key and names the hyphenated one (FZ-12695)", () => {
|
|
109
|
+
render(inApp(<NineXCard />));
|
|
110
|
+
expect(unknownTokenWarnings(warn).sort()).toEqual([
|
|
111
|
+
"[theme] unknown-token (component=NineXCard, value=$borderColorHairline, suggest=$border-color-hairline)",
|
|
112
|
+
"[theme] unknown-token (component=Paragraph in NineXCard, value=$textMuted, suggest=$text-muted)",
|
|
113
|
+
]);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("stays quiet for hyphenated theme keys and CSS colour names (FZ-12695)", () => {
|
|
117
|
+
render(inApp(<TenXCard />));
|
|
118
|
+
expect(unknownTokenWarnings(warn)).toEqual([]);
|
|
119
|
+
});
|
|
120
|
+
|
|
87
121
|
it("guards every scale the config builds", () => {
|
|
88
122
|
const dense = themeConfig.scales?.dense?.tamagui() as unknown as {
|
|
89
123
|
tokensParsed: Record<string, Record<string, unknown>>;
|
|
@@ -99,7 +133,7 @@ describe("guardUnknownTokens", () => {
|
|
|
99
133
|
it("does no work in production", () => {
|
|
100
134
|
vi.stubEnv("NODE_ENV", "production");
|
|
101
135
|
try {
|
|
102
|
-
const read = vi.fn(() => ({ space: {}, size: {} }));
|
|
136
|
+
const read = vi.fn(() => ({ space: {}, size: {}, color: {} }));
|
|
103
137
|
const config = Object.defineProperty({}, "tokensParsed", { get: read });
|
|
104
138
|
expect(guardUnknownTokens(config)).toBe(config);
|
|
105
139
|
expect(read).not.toHaveBeenCalled();
|
|
@@ -75,18 +75,69 @@ function guardTable(table: TokenTable): TokenTable {
|
|
|
75
75
|
return proxy;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
function kebabThemeKey(key: string): string {
|
|
79
|
+
return key
|
|
80
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
81
|
+
.replace(/([A-Za-z])(\d)/g, "$1-$2")
|
|
82
|
+
.toLowerCase();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function themeKeysOf(themes: Record<string, object> | undefined): Set<string> {
|
|
86
|
+
const keys = new Set<string>();
|
|
87
|
+
for (const theme of Object.values(themes ?? {})) {
|
|
88
|
+
for (const key of Object.keys(theme)) keys.add(key);
|
|
89
|
+
}
|
|
90
|
+
return keys;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* FZ-12695: MPO 10's theme keys are hyphenated (`text-muted`, `color-11`,
|
|
95
|
+
* `border-color-hairline`), and a 9.x camelCase key (`$textMuted`, `$color11`)
|
|
96
|
+
* matches none, so Tamagui drops the colour. A colour prop asks the colour
|
|
97
|
+
* token table before the theme, so the miss passes through here: a key no
|
|
98
|
+
* theme defines whose hyphenated spelling one does warns once per key and
|
|
99
|
+
* component. A key some theme defines and a CSS colour name never do.
|
|
100
|
+
*/
|
|
101
|
+
function guardColorTable(table: TokenTable, themes: () => Set<string>): TokenTable {
|
|
102
|
+
if (guarded.has(table)) return table;
|
|
103
|
+
let keys: Set<string> | undefined;
|
|
104
|
+
const proxy = new Proxy(table, {
|
|
105
|
+
get(target, key, receiver) {
|
|
106
|
+
const value = Reflect.get(target, key, receiver);
|
|
107
|
+
if (value !== undefined || typeof key !== "string" || key in target) return value;
|
|
108
|
+
const meant = kebabThemeKey(key);
|
|
109
|
+
if (meant === key) return value;
|
|
110
|
+
keys ??= themes();
|
|
111
|
+
if (keys.has(key) || !keys.has(meant)) return value;
|
|
112
|
+
devWarn("unknown-token", {
|
|
113
|
+
component: renderingComponent(),
|
|
114
|
+
value: `$${key}`,
|
|
115
|
+
suggest: `$${meant}`,
|
|
116
|
+
});
|
|
117
|
+
return value;
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
guarded.add(proxy);
|
|
121
|
+
return proxy;
|
|
122
|
+
}
|
|
123
|
+
|
|
78
124
|
/**
|
|
79
125
|
* Outside production, warn when an MPO app's config is asked for a size or
|
|
80
|
-
* space token its scale doesn't define,
|
|
81
|
-
*
|
|
126
|
+
* space token its scale doesn't define, or for a theme key by its 9.x
|
|
127
|
+
* camelCase spelling, naming the token and the component. Returns the config
|
|
128
|
+
* it was given; production returns it untouched.
|
|
82
129
|
*/
|
|
83
130
|
export function guardUnknownTokens<T>(config: T): T {
|
|
84
131
|
if (process.env.NODE_ENV === "production") return config;
|
|
85
|
-
const tables =
|
|
132
|
+
const { tokensParsed: tables, themes } = config as {
|
|
133
|
+
tokensParsed?: Record<string, TokenTable | undefined>;
|
|
134
|
+
themes?: Record<string, object>;
|
|
135
|
+
};
|
|
86
136
|
if (!tables) return config;
|
|
87
137
|
for (const category of guardedCategories) {
|
|
88
138
|
const table = tables[category];
|
|
89
139
|
if (table) tables[category] = guardTable(table);
|
|
90
140
|
}
|
|
141
|
+
if (tables.color) tables.color = guardColorTable(tables.color, () => themeKeysOf(themes));
|
|
91
142
|
return config;
|
|
92
143
|
}
|
package/types/index.gnome.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export { bySizeToken, clampSurfaceSize, compareSizeTokens, sizeTokenBelow, sizeT
|
|
|
23
23
|
export type { SurfaceIntent, SurfaceSize } from "./theme/Surface";
|
|
24
24
|
export { controlTierDisabled, controlTierPaint, controlTierWash, controlTrackFill, isDarkThemeName, } from "./theme/controlTiers";
|
|
25
25
|
export type { ControlTier, ControlTierPaint } from "./theme/controlTiers";
|
|
26
|
-
export { AlertDialogContent, AlertDialogOverlay, DialogContent, dialogScrim, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider,
|
|
26
|
+
export { AlertDialogContent, AlertDialogOverlay, DialogContent, dialogScrim, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider, overlayScrim, PopoverContent, sheetGrabber, sheetGrabberClearance, sheetGrabberZone, sheetScrim, sheetHandle, sheetHandleTone, sheetHandleWidthRatio, sheetHandleZone, SheetBodyProvider, SheetBodyInsetProvider, useSheetBodyInset, useDialogRegionContext, useDialogSheetFace, useIsInDialogRegion, useIsInSheetBody, } from "./theme/overlaySurfaces";
|
|
27
27
|
export type { DialogContentProps, DialogRegionContextValue, OpenAutoFocus, } from "./theme/overlaySurfaces";
|
|
28
28
|
export { boldPreset, consolePreset, defaultPreset, densePreset, heroPreset, roomyPreset, storefrontPreset, } from "./theme/presets";
|
|
29
29
|
export { IntentAccentTokensContext, IntentContext, solidButtonIntents, solidPaletteThemes, useIntentAccentTokens, useIntentContext, useResolvedKnobs, } from "./theme/useResolvedKnobs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.gnome.d.ts","sourceRoot":"","sources":["../src/index.gnome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,UAAU,GACX,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EACb,OAAO,EACP,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,cAAc,EACd,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,s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AAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"index.gnome.d.ts","sourceRoot":"","sources":["../src/index.gnome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,UAAU,GACX,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EACb,OAAO,EACP,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,cAAc,EACd,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EACV,aAAa,EACb,iBAAiB,E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