@multiplatform.one/forms 7.47.1 → 7.47.3

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.
Files changed (56) hide show
  1. package/dist/cjs/Button/index.cjs +11 -0
  2. package/dist/cjs/Button/index.native.js +13 -0
  3. package/dist/cjs/Button/index.native.js.map +1 -1
  4. package/dist/cjs/ContextualSaveBar/index.cjs +2 -2
  5. package/dist/cjs/ContextualSaveBar/index.native.js +2 -2
  6. package/dist/cjs/ContextualSaveBar/index.native.js.map +1 -1
  7. package/dist/cjs/fields/Progress/index.cjs +2 -7
  8. package/dist/cjs/fields/Progress/index.native.js +2 -7
  9. package/dist/cjs/fields/Progress/index.native.js.map +1 -1
  10. package/dist/cjs/shared/utils.cjs +3 -2
  11. package/dist/cjs/shared/utils.native.js +3 -2
  12. package/dist/cjs/shared/utils.native.js.map +1 -1
  13. package/dist/esm/Button/index.mjs +13 -3
  14. package/dist/esm/Button/index.mjs.map +1 -1
  15. package/dist/esm/Button/index.native.js +15 -3
  16. package/dist/esm/Button/index.native.js.map +1 -1
  17. package/dist/esm/ContextualSaveBar/index.mjs +2 -2
  18. package/dist/esm/ContextualSaveBar/index.mjs.map +1 -1
  19. package/dist/esm/ContextualSaveBar/index.native.js +2 -2
  20. package/dist/esm/ContextualSaveBar/index.native.js.map +1 -1
  21. package/dist/esm/fields/Progress/index.mjs +2 -7
  22. package/dist/esm/fields/Progress/index.mjs.map +1 -1
  23. package/dist/esm/fields/Progress/index.native.js +2 -7
  24. package/dist/esm/fields/Progress/index.native.js.map +1 -1
  25. package/dist/esm/shared/utils.mjs +3 -2
  26. package/dist/esm/shared/utils.mjs.map +1 -1
  27. package/dist/esm/shared/utils.native.js +3 -2
  28. package/dist/esm/shared/utils.native.js.map +1 -1
  29. package/dist/jsx/Button/index.mjs +13 -3
  30. package/dist/jsx/Button/index.mjs.map +1 -1
  31. package/dist/jsx/Button/index.native.js +13 -0
  32. package/dist/jsx/Button/index.native.js.map +1 -1
  33. package/dist/jsx/ContextualSaveBar/index.mjs +2 -2
  34. package/dist/jsx/ContextualSaveBar/index.mjs.map +1 -1
  35. package/dist/jsx/ContextualSaveBar/index.native.js +2 -2
  36. package/dist/jsx/ContextualSaveBar/index.native.js.map +1 -1
  37. package/dist/jsx/fields/Progress/index.mjs +2 -7
  38. package/dist/jsx/fields/Progress/index.mjs.map +1 -1
  39. package/dist/jsx/fields/Progress/index.native.js +2 -7
  40. package/dist/jsx/fields/Progress/index.native.js.map +1 -1
  41. package/dist/jsx/shared/utils.mjs +3 -2
  42. package/dist/jsx/shared/utils.mjs.map +1 -1
  43. package/dist/jsx/shared/utils.native.js +3 -2
  44. package/dist/jsx/shared/utils.native.js.map +1 -1
  45. package/package.json +8 -8
  46. package/src/Button/Button.dynamicType.native.spec.tsx +62 -0
  47. package/src/Button/index.tsx +34 -0
  48. package/src/ContextualSaveBar/index.tsx +6 -2
  49. package/src/elevationHookCount.spec.tsx +145 -0
  50. package/src/fields/Progress/index.tsx +6 -6
  51. package/src/shared/utils.ts +12 -5
  52. package/types/Button/index.d.ts +5 -0
  53. package/types/Button/index.d.ts.map +1 -1
  54. package/types/ContextualSaveBar/index.d.ts.map +1 -1
  55. package/types/shared/utils.d.ts +5 -0
  56. package/types/shared/utils.d.ts.map +1 -1
@@ -0,0 +1,145 @@
1
+ /**
2
+ * FZ-7865: switching the elevation knob at runtime must not change a
3
+ * component's hook count (React #310).
4
+ *
5
+ * Tamagui runs a part's animation hooks (`usePresence`, the driver's
6
+ * `useAnimations`) when the `transition` KEY is in its props, and keeps them
7
+ * once on. `getElevationWrapperProps` returned `{}` at none/small and a
8
+ * fragment carrying `transition` at medium/large, so a part spreading it
9
+ * called more hooks after the switch and React threw "Rendered more hooks than
10
+ * during the previous render". Progress made it worse: its flat branch was a
11
+ * second `<View>` with no spread at all, the same element type in the same
12
+ * slot, so React reused the fiber and hit the new hooks.
13
+ *
14
+ * The sequence walks none → small → medium → large → none → large on ONE
15
+ * mounted tree, the way a knob, preset or theme switch does.
16
+ */
17
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
18
+ import { type Elevation, Preset, useResolvedKnobs } from "@multiplatform.one/theme";
19
+ import { cleanup } from "@testing-library/react";
20
+ import type { ReactElement } from "react";
21
+ import { View } from "tamagui";
22
+ import { afterEach, describe, expect, it, vi } from "vitest";
23
+ import { Button } from "./Button";
24
+ import { ContextualSaveBar } from "./ContextualSaveBar";
25
+ import { ControlGroup } from "./ControlGroup";
26
+ import { Checkbox } from "./fields/Checkbox";
27
+ import { Input } from "./fields/Input";
28
+ import { Progress } from "./fields/Progress";
29
+ import { RadioGroup } from "./fields/RadioGroup";
30
+ import { Slider } from "./fields/Slider";
31
+ import { Switch } from "./fields/Switch";
32
+ import { ToggleGroup } from "./fields/ToggleGroup";
33
+ import { Form } from "./Form";
34
+ import { getElevationWrapperProps } from "./shared/utils";
35
+
36
+ afterEach(cleanup);
37
+
38
+ const sequence: Elevation[] = ["none", "small", "medium", "large", "none", "large"];
39
+ const options = [
40
+ { label: "One", value: "one" },
41
+ { label: "Two", value: "two" },
42
+ ];
43
+
44
+ /** One raw part spreading the shared fragment, as every caller does. */
45
+ function ElevatedPart() {
46
+ const { knobProps, elevation } = useResolvedKnobs({});
47
+ return <View testID="elevated-part" {...getElevationWrapperProps(knobProps, elevation)} />;
48
+ }
49
+
50
+ const cases: Array<[string, () => ReactElement]> = [
51
+ ["getElevationWrapperProps on a View", () => <ElevatedPart />],
52
+ ["Progress", () => <Progress label="Done" value={40} />],
53
+ ["Progress (intent)", () => <Progress label="Done" value={40} intent="success" />],
54
+ ["Checkbox", () => <Checkbox label="Agree" />],
55
+ ["RadioGroup", () => <RadioGroup label="Pick" options={options} />],
56
+ ["Switch", () => <Switch label="On" />],
57
+ ["Slider", () => <Slider label="Level" defaultValue={[30]} />],
58
+ ["ToggleGroup", () => <ToggleGroup label="Pick" options={options} />],
59
+ ["Input", () => <Input label="Name" />],
60
+ ["Button", () => <Button>Save</Button>],
61
+ [
62
+ "ControlGroup",
63
+ () => (
64
+ <ControlGroup>
65
+ <Button>One</Button>
66
+ <Button>Two</Button>
67
+ </ControlGroup>
68
+ ),
69
+ ],
70
+ [
71
+ "ContextualSaveBar",
72
+ () => (
73
+ <Form>
74
+ <ContextualSaveBar forceVisible />
75
+ </Form>
76
+ ),
77
+ ],
78
+ ];
79
+
80
+ function hookCountErrors(calls: unknown[][]): string[] {
81
+ return calls
82
+ .map((args) => args.map(String).join(" "))
83
+ .filter((line) => /#310|more hooks|fewer hooks|order of Hooks/i.test(line));
84
+ }
85
+
86
+ describe("FZ-7865 elevation switches keep every hook in place", () => {
87
+ it.each(cases)("%s re-renders across every elevation without React #310", (_name, ui) => {
88
+ const spy = vi.spyOn(console, "error").mockImplementation(() => {});
89
+ const uncaught: string[] = [];
90
+ const onError = (event: ErrorEvent) => uncaught.push(String(event.error?.message ?? event));
91
+ window.addEventListener("error", onError);
92
+ try {
93
+ const view = renderWithProviders(
94
+ <Preset overrides={{ elevation: sequence[0] }}>{ui()}</Preset>,
95
+ );
96
+ for (const elevation of sequence.slice(1)) {
97
+ view.rerender(<Preset overrides={{ elevation }}>{ui()}</Preset>);
98
+ expect(view.container.childElementCount, `tree unmounted at ${elevation}`).toBe(1);
99
+ }
100
+ expect([...hookCountErrors(spy.mock.calls), ...hookCountErrors([uncaught])]).toEqual([]);
101
+ } finally {
102
+ window.removeEventListener("error", onError);
103
+ spy.mockRestore();
104
+ }
105
+ });
106
+
107
+ // The compiler flattens a static `<View>` to a plain element in this suite,
108
+ // which hides the fiber reuse that crashes Storybook and native. The track
109
+ // wrapper keeping its node across switches is the same contract seen here:
110
+ // one element whose props change, never a second element swapped in.
111
+ it("Progress keeps one track wrapper node across every elevation", () => {
112
+ const view = renderWithProviders(
113
+ <Preset overrides={{ elevation: sequence[0] }}>
114
+ <Progress label="Done" value={40} />
115
+ </Preset>,
116
+ );
117
+ // progressbar → its Progress sub-theme span → the track wrapper.
118
+ const wrapper = () =>
119
+ view.container.querySelector("[role='progressbar']")?.parentElement?.parentElement;
120
+ const first = wrapper();
121
+ expect(first).toBeTruthy();
122
+ for (const elevation of sequence.slice(1)) {
123
+ view.rerender(
124
+ <Preset overrides={{ elevation }}>
125
+ <Progress label="Done" value={40} />
126
+ </Preset>,
127
+ );
128
+ expect(wrapper(), `track wrapper replaced at ${elevation}`).toBe(first);
129
+ }
130
+ });
131
+ });
132
+
133
+ describe("getElevationWrapperProps holds its keys at every elevation", () => {
134
+ it("returns `transition` whether the part is flat or raised", () => {
135
+ const motion = { control: { transition: "quick", animateOnly: ["opacity"] } };
136
+ const flat = getElevationWrapperProps({ motion, elevation: undefined } as any, {} as any);
137
+ const raised = getElevationWrapperProps(
138
+ { motion, elevation: 4, elevationChrome: { elevation: 4 } } as any,
139
+ {} as any,
140
+ );
141
+ expect("transition" in flat).toBe("transition" in raised);
142
+ expect(flat.elevation).toBeUndefined();
143
+ expect(raised.elevation).toBe(4);
144
+ });
145
+ });
@@ -218,20 +218,20 @@ function ProgressTrack({
218
218
  </ProgressFrame>
219
219
  );
220
220
 
221
- const bar = elevationWrapperProps.elevation ? (
221
+ // One wrapper at every elevation (FZ-7865): two `<View>` branches share a
222
+ // fiber, so the flat one meeting the raised one's motion keys threw #310.
223
+ const bar = (
222
224
  <View
223
225
  {...elevationWrapperProps}
224
- borderRadius={knobProps.borderRadius.borderRadius}
226
+ borderRadius={
227
+ elevationWrapperProps.elevation ? knobProps.borderRadius.borderRadius : undefined
228
+ }
225
229
  flex={1}
226
230
  minWidth={0}
227
231
  width="100%"
228
232
  >
229
233
  {progressElement}
230
234
  </View>
231
- ) : (
232
- <View flex={1} minWidth={0} width="100%">
233
- {progressElement}
234
- </View>
235
235
  );
236
236
 
237
237
  return (
@@ -96,11 +96,21 @@ export function getOTPCellRadius(radiusToken: string | undefined, heightPx: numb
96
96
  * Tamagui's create* HOC chains (createCheckbox, createSwitch, etc.) swallow
97
97
  * the elevation variant. Spread the complete `elevationChrome` fragment from
98
98
  * resolveKnobs (LC-85). Surface sub-themes own the fill.
99
+ *
100
+ * The motion keys come back at EVERY elevation, flat included (FZ-7865).
101
+ * Tamagui runs its animation hooks when `transition` is among a part's props,
102
+ * so a fragment that gains the key only once raised changes the hook count
103
+ * when the knob, a preset or a theme switches live (React #310).
99
104
  */
100
105
  export function getElevationWrapperProps(
101
106
  knobProps: KnobProps,
102
107
  elevationRecipe: KnobRecipe<ElevationStateProps>,
103
108
  ): Record<string, any> {
109
+ const motion = transitionProps(knobProps.motion.control, [
110
+ "boxShadow",
111
+ "shadowOpacity",
112
+ "shadowRadius",
113
+ ]);
104
114
  const elevation = knobProps.elevation;
105
115
  if (
106
116
  !elevation &&
@@ -108,7 +118,7 @@ export function getElevationWrapperProps(
108
118
  !elevationRecipe.pressKnobProps?.elevation &&
109
119
  !elevationRecipe.focusVisibleKnobProps?.elevation
110
120
  ) {
111
- return {};
121
+ return motion;
112
122
  }
113
123
  const props: Record<string, any> = {
114
124
  overflow: "visible" as const,
@@ -123,10 +133,7 @@ export function getElevationWrapperProps(
123
133
  if (elevationRecipe.focusVisibleKnobProps) {
124
134
  props.focusVisibleStyle = elevationRecipe.focusVisibleKnobProps;
125
135
  }
126
- Object.assign(
127
- props,
128
- transitionProps(knobProps.motion.control, ["boxShadow", "shadowOpacity", "shadowRadius"]),
129
- );
136
+ Object.assign(props, motion);
130
137
  return props;
131
138
  }
132
139
 
@@ -18,6 +18,11 @@ import type { SizeTokens } from "@tamagui/web";
18
18
  export type ButtonSizeRecipe = SizeRecipe;
19
19
  export declare const buttonSizeRecipes: Record<string, ButtonSizeRecipe>;
20
20
  export declare function resolveButtonSizeRecipe(size: SizeTokens | number | undefined, family?: RecipeFamilyName, touch?: boolean): ButtonSizeRecipe;
21
+ /**
22
+ * The line a label takes from SizableText's `$true` size variant: the label
23
+ * passes a fontSize and no size, so its line height stays the family's `$true`.
24
+ */
25
+ export declare function labelLinePx(fontFamily: unknown): number | undefined;
21
26
  /** DG-ACT-01 role within an ActionBar / action region. */
22
27
  export type ButtonActionRole = "primary" | "secondary" | "chrome";
23
28
  type IconLike = ReactNode | ComponentType<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Button/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAeL,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAEhB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAEL,KAAK,WAAW,IAAI,kBAAkB,EAUvC,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,cAAc,CAAC;AAMpE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAkC,CAAC;AAElG,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,EACrC,MAAM,GAAE,gBAA4B,EACpC,KAAK,UAAQ,GACZ,gBAAgB,CAOlB;AAaD,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElE,KAAK,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AA2F7E,eAAO,MAAM,WAAW;;;;;;;;6CA2DtB,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,kBAAkB,EAClB,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAC1C;IACC,MAAM,CAAC,EAAE,QAAQ,GA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B,EACvB,UAAU,EACV,OAAO,EACP,OAAO,GACR,EAAE,sBAAsB,2CA8MxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextualSaveBar/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAExF,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACpD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyFD,wBAAgB,iBAAiB,CAAC,EAChC,YAAoB,EACpB,eAAuB,EACvB,UAAU,EACV,OAAO,EACP,OAAO,GACR,EAAE,sBAAsB,2CAkNxB"}
@@ -33,6 +33,11 @@ export declare function getOTPCellRadius(radiusToken: string | undefined, height
33
33
  * Tamagui's create* HOC chains (createCheckbox, createSwitch, etc.) swallow
34
34
  * the elevation variant. Spread the complete `elevationChrome` fragment from
35
35
  * resolveKnobs (LC-85). Surface sub-themes own the fill.
36
+ *
37
+ * The motion keys come back at EVERY elevation, flat included (FZ-7865).
38
+ * Tamagui runs its animation hooks when `transition` is among a part's props,
39
+ * so a fragment that gains the key only once raised changes the hook count
40
+ * when the knob, a preset or a theme switches live (React #310).
36
41
  */
37
42
  export declare function getElevationWrapperProps(knobProps: KnobProps, elevationRecipe: KnobRecipe<ElevationStateProps>): Record<string, any>;
38
43
  export declare function useFormField(props: {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAEV,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,aAAa,EACd,MAAM,0BAA0B,CAAC;AAQlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,SAAI,EAAE,KAAK,UAAmB,GAAG,MAAM,CAEhG;AAgBD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,SAAI,GACd,MAAM,GAAG,CAAC,CAEZ;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,SAAI,GACd,MAAM,GAAG,CAAC,CAEZ;AAgBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAC/C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA4BrB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,UAAU,CAAC;IAAC,EAAE,CAAC,E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