@multiplatform.one/components 7.53.0 → 7.54.1
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/Tabs/index.cjs +1 -1
- package/dist/cjs/Tabs/index.native.js +1 -1
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/appShell/TabBar.cjs +1 -1
- package/dist/cjs/appShell/TabBar.native.js +1 -1
- package/dist/cjs/appShell/TabBar.native.js.map +1 -1
- package/dist/cjs/images/Image/index.cjs +2 -1
- package/dist/cjs/images/Image/index.native.js +3 -1
- package/dist/cjs/images/Image/index.native.js.map +1 -1
- package/dist/cjs/images/Image/shared.cjs +2 -0
- package/dist/cjs/images/Image/shared.native.js +2 -0
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +84 -48
- package/dist/cjs/views/List.native.js +84 -48
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +1 -1
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.mjs +1 -1
- package/dist/esm/appShell/TabBar.mjs.map +1 -1
- package/dist/esm/appShell/TabBar.native.js +1 -1
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/images/Image/index.mjs +4 -3
- package/dist/esm/images/Image/index.mjs.map +1 -1
- package/dist/esm/images/Image/index.native.js +5 -3
- package/dist/esm/images/Image/index.native.js.map +1 -1
- package/dist/esm/images/Image/shared.mjs +3 -2
- package/dist/esm/images/Image/shared.mjs.map +1 -1
- package/dist/esm/images/Image/shared.native.js +3 -2
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/views/List.mjs +84 -48
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +84 -48
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +1 -1
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.mjs +1 -1
- package/dist/jsx/appShell/TabBar.mjs.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/images/Image/index.mjs +4 -3
- package/dist/jsx/images/Image/index.mjs.map +1 -1
- package/dist/jsx/images/Image/index.native.js +3 -1
- package/dist/jsx/images/Image/index.native.js.map +1 -1
- package/dist/jsx/images/Image/shared.mjs +3 -2
- package/dist/jsx/images/Image/shared.mjs.map +1 -1
- package/dist/jsx/images/Image/shared.native.js +2 -0
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +84 -48
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +84 -48
- package/dist/jsx/views/List.native.js.map +1 -1
- package/package.json +9 -9
- package/src/Tabs/index.tsx +1 -1
- package/src/Text.native.spec.tsx +11 -3
- package/src/Text.spec.tsx +10 -3
- package/src/Text.tabular.native.spec.tsx +2 -1
- package/src/appShell/TabBar.spec.tsx +6 -0
- package/src/appShell/TabBar.tsx +5 -4
- package/src/images/Image/index.native.tsx +4 -2
- package/src/images/Image/index.tsx +4 -3
- package/src/images/Image/shared.ts +8 -1
- package/src/layouts/Page.weight.spec.tsx +4 -2
- package/src/layouts/pageTitleScale.spec.tsx +1 -1
- package/src/textAccentSecondary.spec.tsx +30 -16
- package/src/views/List.secondaryInk.spec.tsx +51 -0
- package/src/views/List.spec.tsx +31 -33
- package/src/views/List.tsx +97 -52
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/appShell/TabBar.d.ts +5 -4
- package/types/appShell/TabBar.d.ts.map +1 -1
- package/types/images/Image/index.d.ts.map +1 -1
- package/types/images/Image/index.native.d.ts.map +1 -1
- package/types/images/Image/shared.d.ts +6 -0
- package/types/images/Image/shared.d.ts.map +1 -1
- package/types/views/List.d.ts +13 -4
- package/types/views/List.d.ts.map +1 -1
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* The `secondary` / `muted` keys on componentColors' text table were a static
|
|
5
5
|
* `$color11` read straight into the `color` prop, so every helper, caption and
|
|
6
6
|
* inactive label rendered the same ink at `low`, `medium` and `high`. The resolver
|
|
7
|
-
* already answers this: `knobProps.textAccentColor` is `$
|
|
8
|
-
* dim stops (
|
|
7
|
+
* already answers this: `knobProps.textAccentColor` is `$textMuted` at the
|
|
8
|
+
* two dim stops (LC-152's secondary ink, which replaced the `$color11` floor)
|
|
9
|
+
* and `$color` at `high`. Tab labels left this family under LC-152.
|
|
9
10
|
*
|
|
10
11
|
* Measurement follows the Text.spec.tsx discipline: read the TEXT NODE's
|
|
11
12
|
* `_col-` atomic class, compare between knob stops by identity, never against
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
*/
|
|
19
20
|
import { cleanup, screen } from "@testing-library/react";
|
|
20
21
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
21
|
-
import { Preset, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
22
|
+
import { createDefaultThemeConfig, Preset, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
22
23
|
import type { ReactElement } from "react";
|
|
23
24
|
import { SizableText, Theme } from "tamagui";
|
|
24
25
|
import { afterEach, describe, expect, it } from "vitest";
|
|
@@ -28,6 +29,11 @@ import { Meter } from "./Meter";
|
|
|
28
29
|
import { Quote } from "./Quote";
|
|
29
30
|
import { Tabs } from "./Tabs";
|
|
30
31
|
|
|
32
|
+
// LC-152: the dim stops paint `$textMuted`, a key only MPO's themes define.
|
|
33
|
+
// Under the stock test themes tamagui drops it to `$color` and every stop
|
|
34
|
+
// reads as the primary ink, so this file renders under MPO's own config.
|
|
35
|
+
createDefaultThemeConfig({});
|
|
36
|
+
|
|
31
37
|
afterEach(cleanup);
|
|
32
38
|
|
|
33
39
|
type Accent = "low" | "medium" | "high";
|
|
@@ -54,7 +60,10 @@ function inkOf(scheme: Scheme, accent: Accent, label: string, node: ReactElement
|
|
|
54
60
|
|
|
55
61
|
const schemes: Scheme[] = ["light", "dark"];
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
// LC-152 replaces MPO-154 for tab labels: an inactive label is the label
|
|
64
|
+
// role's secondary ink at every textAccent stop, so `high` (the Default and
|
|
65
|
+
// Bold presets) no longer paints it as loud as the active one.
|
|
66
|
+
describe("Tabs — the inactive tab label is the secondary ink at every stop (LC-152)", () => {
|
|
58
67
|
const items = [
|
|
59
68
|
{ value: "address", label: "Address & Contact", content: <>address panel</> },
|
|
60
69
|
{ value: "settings", label: "Settings", content: <>settings panel</> },
|
|
@@ -62,15 +71,14 @@ describe("Tabs — textAccent reaches the inactive tab label (MPO-154)", () => {
|
|
|
62
71
|
const tabs = <Tabs items={items} defaultValue="address" />;
|
|
63
72
|
|
|
64
73
|
for (const scheme of schemes) {
|
|
65
|
-
it(`${scheme}: the inactive label
|
|
74
|
+
it(`${scheme}: the inactive label holds $textMuted from low to high`, () => {
|
|
66
75
|
const low = inkOf(scheme, "low", "Settings", tabs);
|
|
67
76
|
const high = inkOf(scheme, "high", "Settings", tabs);
|
|
68
|
-
expect(low).
|
|
69
|
-
expect(high).
|
|
70
|
-
expect(high).not.toEqual(low);
|
|
77
|
+
expect(low).toEqual(["_col-textMuted"]);
|
|
78
|
+
expect(high).toEqual(low);
|
|
71
79
|
});
|
|
72
80
|
|
|
73
|
-
it(`${scheme}: the inactive label keeps the
|
|
81
|
+
it(`${scheme}: the inactive label keeps the secondary ink at low and medium`, () => {
|
|
74
82
|
expect(inkOf(scheme, "low", "Settings", tabs)).toEqual(
|
|
75
83
|
inkOf(scheme, "medium", "Settings", tabs),
|
|
76
84
|
);
|
|
@@ -96,9 +104,12 @@ describe("Accordion — textAccent reaches the section description (MPO-154)", (
|
|
|
96
104
|
expect(low).not.toHaveLength(0);
|
|
97
105
|
expect(high).not.toHaveLength(0);
|
|
98
106
|
expect(high).not.toEqual(low);
|
|
107
|
+
// LC-152: low is the secondary ink, high the primary.
|
|
108
|
+
expect(low).toEqual(["_col-textMuted"]);
|
|
109
|
+
expect(high).toEqual(["_col-color"]);
|
|
99
110
|
});
|
|
100
111
|
|
|
101
|
-
it(`${scheme}: the description keeps the
|
|
112
|
+
it(`${scheme}: the description keeps the secondary ink at low and medium`, () => {
|
|
102
113
|
expect(inkOf(scheme, "low", description, accordion)).toEqual(
|
|
103
114
|
inkOf(scheme, "medium", description, accordion),
|
|
104
115
|
);
|
|
@@ -129,9 +140,12 @@ describe("Quote — textAccent reaches the attribution (MPO-154)", () => {
|
|
|
129
140
|
expect(low).not.toHaveLength(0);
|
|
130
141
|
expect(high).not.toHaveLength(0);
|
|
131
142
|
expect(high).not.toEqual(low);
|
|
143
|
+
// LC-152: low is the secondary ink, high the primary.
|
|
144
|
+
expect(low).toEqual(["_col-textMuted"]);
|
|
145
|
+
expect(high).toEqual(["_col-color"]);
|
|
132
146
|
});
|
|
133
147
|
|
|
134
|
-
it(`${scheme}: the attribution keeps the
|
|
148
|
+
it(`${scheme}: the attribution keeps the secondary ink at low and medium`, () => {
|
|
135
149
|
expect(citeInk(scheme, "low")).toEqual(citeInk(scheme, "medium"));
|
|
136
150
|
});
|
|
137
151
|
}
|
|
@@ -152,9 +166,9 @@ describe("Meter — textAccent reaches the ok-zone value readout (MPO-154)", ()
|
|
|
152
166
|
}
|
|
153
167
|
|
|
154
168
|
for (const scheme of schemes) {
|
|
155
|
-
it(`${scheme}: the ok value readout rides the resolver, not a static $
|
|
156
|
-
expect(valueInk(scheme, "low")).toBe("$
|
|
157
|
-
expect(valueInk(scheme, "medium")).toBe("$
|
|
169
|
+
it(`${scheme}: the ok value readout rides the resolver, not a static step (LC-152 $textMuted)`, () => {
|
|
170
|
+
expect(valueInk(scheme, "low")).toBe("$textMuted");
|
|
171
|
+
expect(valueInk(scheme, "medium")).toBe("$textMuted");
|
|
158
172
|
expect(valueInk(scheme, "high")).toBe("$color");
|
|
159
173
|
});
|
|
160
174
|
}
|
|
@@ -226,7 +240,7 @@ function againstResolver(
|
|
|
226
240
|
return result;
|
|
227
241
|
}
|
|
228
242
|
|
|
229
|
-
describe("the dim stops paint the resolver's
|
|
243
|
+
describe("the dim stops paint the resolver's secondary ink, not a pinned step (MPO-154, LC-152)", () => {
|
|
230
244
|
const surfaces: Array<[string, ReactElement, (container: HTMLElement) => Element | null]> = [
|
|
231
245
|
[
|
|
232
246
|
"Tabs inactive label",
|
|
@@ -266,7 +280,7 @@ describe("the dim stops paint the resolver's AA floor, not a pinned step (MPO-15
|
|
|
266
280
|
for (const accent of ["low", "medium"] as const) {
|
|
267
281
|
it(`${scheme}: ${name} at ${accent} equals the resolver's textAccentColor`, () => {
|
|
268
282
|
const { surface, resolver, token } = againstResolver(scheme, accent, node, pick);
|
|
269
|
-
expect(token).toBe("$
|
|
283
|
+
expect(token).toBe("$textMuted");
|
|
270
284
|
expect(resolver).toBeDefined();
|
|
271
285
|
expect(surface).toBe(resolver);
|
|
272
286
|
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cleanup, screen } from "@testing-library/react";
|
|
2
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
3
|
+
import { createDefaultThemeConfig, Preset } from "@multiplatform.one/theme";
|
|
4
|
+
import type { ReactElement } from "react";
|
|
5
|
+
import { TamaguiProvider } from "tamagui";
|
|
6
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
7
|
+
import { ListRow, ListRowMeta } from "./List";
|
|
8
|
+
|
|
9
|
+
// $textMuted is MPO's secondary ink (LC-152); the stock test config has no
|
|
10
|
+
// such key, so these render under MPO's own theme in a file of their own.
|
|
11
|
+
const config = createDefaultThemeConfig({});
|
|
12
|
+
|
|
13
|
+
afterEach(cleanup);
|
|
14
|
+
|
|
15
|
+
function renderMpo(ui: ReactElement) {
|
|
16
|
+
return renderWithProviders(
|
|
17
|
+
<TamaguiProvider config={config.tamagui} defaultTheme="light">
|
|
18
|
+
{ui}
|
|
19
|
+
</TamaguiProvider>,
|
|
20
|
+
{ tamagui: false },
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function colorAtoms(el: Element): string[] {
|
|
25
|
+
return String((el as HTMLElement).className || "")
|
|
26
|
+
.split(" ")
|
|
27
|
+
.filter((c) => c.startsWith("_col-"))
|
|
28
|
+
.sort();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe("ListRow secondary ink (LC-152, LC-155)", () => {
|
|
32
|
+
it("paints the subtitle in the meta role's secondary ink at 400", () => {
|
|
33
|
+
renderMpo(<ListRow title="Pikachu" subtitle="Mouse Pokémon · Poke ID 25" />);
|
|
34
|
+
const subtitle = screen.getByText("Mouse Pokémon · Poke ID 25");
|
|
35
|
+
expect(colorAtoms(subtitle)).toEqual(["_col-textMuted"]);
|
|
36
|
+
expect(String(subtitle.className)).toMatch(/_fow-[^ ]*400/);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("moves ListRowMeta default ink with textAccent", () => {
|
|
40
|
+
function metaColor(label: string, accent: "high" | "low"): string[] {
|
|
41
|
+
renderMpo(
|
|
42
|
+
<Preset overrides={{ textAccent: accent }}>
|
|
43
|
+
<ListRowMeta>{label}</ListRowMeta>
|
|
44
|
+
</Preset>,
|
|
45
|
+
);
|
|
46
|
+
return colorAtoms(screen.getByText(label));
|
|
47
|
+
}
|
|
48
|
+
expect(metaColor("meta-high", "high")).toEqual(["_col-color"]);
|
|
49
|
+
expect(metaColor("meta-low", "low")).toEqual(["_col-textMuted"]);
|
|
50
|
+
});
|
|
51
|
+
});
|
package/src/views/List.spec.tsx
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
type ListRowProps,
|
|
17
17
|
} from "./List";
|
|
18
18
|
import { componentColors } from "../componentColors";
|
|
19
|
+
import { Image } from "../images/Image";
|
|
19
20
|
import * as ViewExports from "./index";
|
|
20
21
|
|
|
21
22
|
afterEach(cleanup);
|
|
@@ -53,13 +54,34 @@ describe("List named exports", () => {
|
|
|
53
54
|
});
|
|
54
55
|
});
|
|
55
56
|
|
|
56
|
-
describe("ListRow title —
|
|
57
|
-
it("
|
|
57
|
+
describe("ListRow title — the headline role on the TEXT NODE (LC-155)", () => {
|
|
58
|
+
it("paints the title at the headline weight in the primary ink", () => {
|
|
58
59
|
renderWithProviders(<ListRow title="Q3 Vendor Contract" />);
|
|
59
60
|
const textNode = screen.getByText("Q3 Vendor Contract");
|
|
60
|
-
|
|
61
|
-
expect(
|
|
62
|
-
|
|
61
|
+
expect(atoms(textNode, ["_fow-"]).join(" ")).toMatch(/600/);
|
|
62
|
+
expect(atoms(textNode, ["_col-"])).toEqual(["_col-color"]);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("a two-line row's trailing meta is a top-aligned caption", () => {
|
|
66
|
+
const { container } = renderWithProviders(
|
|
67
|
+
<ListRow title="Pikachu" subtitle="Mouse Pokémon" meta="4 d" />,
|
|
68
|
+
);
|
|
69
|
+
const slot = container.querySelector('[data-list-slot="meta"]') as HTMLElement;
|
|
70
|
+
expect(getComputedStyle(slot).alignSelf).toBe("flex-start");
|
|
71
|
+
expect(atoms(screen.getByText("4 d"), ["_fos-"]).join(" ")).toMatch(/size-1\b/);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("the media slot is a $true square whose thumbnail draws no tile", () => {
|
|
75
|
+
const { container } = renderWithProviders(
|
|
76
|
+
<ListRow
|
|
77
|
+
media={<Image src="https://example.test/a.png" alt="" size="extraSmall" />}
|
|
78
|
+
title="Raticate"
|
|
79
|
+
/>,
|
|
80
|
+
);
|
|
81
|
+
const slot = container.querySelector('[data-list-slot="media"]') as HTMLElement;
|
|
82
|
+
expect(atoms(slot, ["_w-", "_h-"])).toEqual(["_h-t-size-true", "_w-t-size-true"]);
|
|
83
|
+
const frame = slot.querySelector("[data-image-frame]") as HTMLElement;
|
|
84
|
+
expect(atoms(frame, ["_btw-"]).join(" ")).toMatch(/_btw-0px/);
|
|
63
85
|
});
|
|
64
86
|
});
|
|
65
87
|
|
|
@@ -135,7 +157,7 @@ describe("List keyboard selection chrome (LC-71)", () => {
|
|
|
135
157
|
});
|
|
136
158
|
});
|
|
137
159
|
|
|
138
|
-
describe("ListRow ink —
|
|
160
|
+
describe("ListRow ink — the title holds the primary ink, meta follows textAccent", () => {
|
|
139
161
|
function titleColor(title: string, accent: "high" | "low" | "medium"): string[] {
|
|
140
162
|
const { getByText } = renderWithProviders(
|
|
141
163
|
<Preset overrides={{ textAccent: accent }}>
|
|
@@ -145,34 +167,10 @@ describe("ListRow ink — textAccent reaches the TEXT NODE (F11 / data-chrome ho
|
|
|
145
167
|
return atoms(getByText(title), ["_col-"]);
|
|
146
168
|
}
|
|
147
169
|
|
|
148
|
-
it("
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
expect(high).not.toHaveLength(0);
|
|
152
|
-
expect(low).not.toHaveLength(0);
|
|
153
|
-
expect(high).not.toEqual(low);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it("low and medium share the AA legibility floor on the title", () => {
|
|
157
|
-
const low = titleColor("ink-floor-low", "low");
|
|
158
|
-
const medium = titleColor("ink-floor-medium", "medium");
|
|
159
|
-
expect(low).toEqual(medium);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
it("moves ListRowMeta default ink with textAccent", () => {
|
|
163
|
-
function metaColor(label: string, accent: "high" | "low"): string[] {
|
|
164
|
-
const { getByText } = renderWithProviders(
|
|
165
|
-
<Preset overrides={{ textAccent: accent }}>
|
|
166
|
-
<ListRowMeta>{label}</ListRowMeta>
|
|
167
|
-
</Preset>,
|
|
168
|
-
);
|
|
169
|
-
return atoms(getByText(label), ["_col-"]);
|
|
170
|
+
it("keeps the title in the primary ink at every textAccent stop (LC-155)", () => {
|
|
171
|
+
for (const accent of ["high", "medium", "low"] as const) {
|
|
172
|
+
expect(titleColor(`ink-${accent}`, accent)).toEqual(["_col-color"]);
|
|
170
173
|
}
|
|
171
|
-
const high = metaColor("meta-high", "high");
|
|
172
|
-
const low = metaColor("meta-low", "low");
|
|
173
|
-
expect(high).not.toHaveLength(0);
|
|
174
|
-
expect(low).not.toHaveLength(0);
|
|
175
|
-
expect(high).not.toEqual(low);
|
|
176
174
|
});
|
|
177
175
|
});
|
|
178
176
|
|
package/src/views/List.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { componentColors } from "../componentColors";
|
|
2
|
+
import { ImageFramingContext } from "../images/Image/shared";
|
|
2
3
|
import { AsyncBoundary } from "../layouts/AsyncBoundary";
|
|
3
4
|
import { Spinner } from "@multiplatform.one/forms";
|
|
4
5
|
import { FlashList, type FlashListRef } from "@shopify/flash-list";
|
|
@@ -63,6 +64,9 @@ export interface ListItemState {
|
|
|
63
64
|
selectedInk?: string;
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
/** True inside a ListRow with a subtitle: its trailing meta is a caption. */
|
|
68
|
+
const ListRowTwoLineContext = createContext(false);
|
|
69
|
+
|
|
66
70
|
const ListItemStateContext = createContext<ListItemState>({
|
|
67
71
|
selected: false,
|
|
68
72
|
focused: false,
|
|
@@ -74,13 +78,22 @@ export function useListItemState(): ListItemState {
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
|
-
* Subject-led document row (Desk list / Linear / Finder): leading glyph
|
|
78
|
-
* title (+ optional subtitle), trailing muted meta. Sits inside List's
|
|
81
|
+
* Subject-led document row (Desk list / Linear / Finder): leading glyph or
|
|
82
|
+
* media, title (+ optional subtitle), trailing muted meta. Sits inside List's
|
|
79
83
|
* stacked-group chrome — does not paint its own radius, fill, or ring.
|
|
84
|
+
*
|
|
85
|
+
* LC-155 ROW-ANATOMY: the title is the headline role, the subtitle the meta
|
|
86
|
+
* role on one line, and with a subtitle the row is a two-line Mail row whose
|
|
87
|
+
* trailing meta is a caption at the top right.
|
|
80
88
|
*/
|
|
81
89
|
export interface ListRowProps {
|
|
82
|
-
/** Leading
|
|
90
|
+
/** Leading glyph slot — fixed box so titles share one x (LC-08). */
|
|
83
91
|
icon?: ReactNode;
|
|
92
|
+
/**
|
|
93
|
+
* Leading media slot (an avatar, a thumbnail): a `$true` square, and a
|
|
94
|
+
* thumbnail inside it draws no tile of its own.
|
|
95
|
+
*/
|
|
96
|
+
media?: ReactNode;
|
|
84
97
|
title: ReactNode;
|
|
85
98
|
subtitle?: ReactNode;
|
|
86
99
|
/** Trailing Finder/Desk columns (dates, size, kind, status). */
|
|
@@ -115,7 +128,10 @@ export function ListRowMeta({
|
|
|
115
128
|
}) {
|
|
116
129
|
const { knobProps } = useResolvedKnobs();
|
|
117
130
|
const { selected, selectedInk } = useListItemState();
|
|
118
|
-
const
|
|
131
|
+
const twoLine = useContext(ListRowTwoLineContext);
|
|
132
|
+
const type = twoLine ? knobProps.textRole.caption : knobProps.label;
|
|
133
|
+
const ink = color ?? (twoLine ? knobProps.textRole.caption.color : knobProps.textAccentColor);
|
|
134
|
+
const resolved = selected && selectedInk ? selectedInk : ink;
|
|
119
135
|
if (typeof children !== "string" && typeof children !== "number") {
|
|
120
136
|
return (
|
|
121
137
|
<XStack
|
|
@@ -133,7 +149,7 @@ export function ListRowMeta({
|
|
|
133
149
|
}
|
|
134
150
|
return (
|
|
135
151
|
<Text
|
|
136
|
-
{...
|
|
152
|
+
{...type}
|
|
137
153
|
color={resolved}
|
|
138
154
|
numberOfLines={1}
|
|
139
155
|
width={width}
|
|
@@ -155,66 +171,95 @@ export function listLeadingIconSize(sizeToken: string): number {
|
|
|
155
171
|
return sizeRecipeForToken(recipeKeyAbove(recipeKeyAbove(sizeToken as SizeRecipeToken))).iconSize;
|
|
156
172
|
}
|
|
157
173
|
|
|
158
|
-
export function ListRow({ icon, title, subtitle, meta }: ListRowProps) {
|
|
174
|
+
export function ListRow({ icon, media, title, subtitle, meta }: ListRowProps) {
|
|
159
175
|
const { knobProps } = useResolvedKnobs();
|
|
160
176
|
const { selected, selectedInk } = useListItemState();
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const ink =
|
|
177
|
+
const { headline, meta: metaRole } = knobProps.textRole;
|
|
178
|
+
const selectedOverride = selected && selectedInk ? selectedInk : undefined;
|
|
179
|
+
const ink = selectedOverride ?? knobProps.textAccentColor;
|
|
164
180
|
const iconSize = listLeadingIconSize(knobProps.sizeToken);
|
|
165
181
|
const leading = icon ? <IconSlot icon={icon} size={iconSize} color={ink} /> : null;
|
|
182
|
+
const twoLine = subtitle != null && subtitle !== false;
|
|
166
183
|
|
|
167
184
|
return (
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
<ListRowTwoLineContext.Provider value={twoLine}>
|
|
186
|
+
<XStack
|
|
187
|
+
alignItems="center"
|
|
188
|
+
{...knobProps.gap}
|
|
189
|
+
flex={1}
|
|
190
|
+
minWidth={0}
|
|
191
|
+
width="100%"
|
|
192
|
+
{...(twoLine ? { paddingVertical: "$1" } : null)}
|
|
193
|
+
>
|
|
194
|
+
{media ? (
|
|
195
|
+
<View
|
|
196
|
+
width="$true"
|
|
197
|
+
height="$true"
|
|
198
|
+
flexShrink={0}
|
|
199
|
+
alignItems="center"
|
|
200
|
+
justifyContent="center"
|
|
201
|
+
overflow="hidden"
|
|
202
|
+
{...({ "data-list-slot": "media" } as Record<string, unknown>)}
|
|
203
|
+
>
|
|
204
|
+
<ImageFramingContext.Provider value={false}>{media}</ImageFramingContext.Provider>
|
|
205
|
+
</View>
|
|
206
|
+
) : null}
|
|
207
|
+
{leading ? (
|
|
208
|
+
<View
|
|
209
|
+
width={iconSize}
|
|
210
|
+
height={iconSize}
|
|
211
|
+
flexShrink={0}
|
|
212
|
+
alignItems="center"
|
|
213
|
+
justifyContent="center"
|
|
214
|
+
{...({ "data-list-slot": "icon", color: ink } as Record<string, unknown>)}
|
|
215
|
+
>
|
|
216
|
+
{leading}
|
|
217
|
+
</View>
|
|
218
|
+
) : null}
|
|
219
|
+
<YStack
|
|
220
|
+
flex={1}
|
|
221
|
+
minWidth={0}
|
|
222
|
+
{...({ "data-list-slot": "title" } as Record<string, unknown>)}
|
|
188
223
|
>
|
|
189
|
-
{title}
|
|
190
|
-
</RowText>
|
|
191
|
-
{subtitle != null && subtitle !== false ? (
|
|
192
224
|
<RowText
|
|
193
|
-
{...knobProps.
|
|
194
|
-
|
|
195
|
-
|
|
225
|
+
{...knobProps.body}
|
|
226
|
+
{...headline}
|
|
227
|
+
color={selectedOverride ?? headline.color}
|
|
196
228
|
numberOfLines={1}
|
|
197
229
|
userSelect="none"
|
|
198
230
|
>
|
|
199
|
-
{
|
|
231
|
+
{title}
|
|
200
232
|
</RowText>
|
|
233
|
+
{twoLine ? (
|
|
234
|
+
<RowText
|
|
235
|
+
{...knobProps.body}
|
|
236
|
+
{...metaRole}
|
|
237
|
+
color={selectedOverride ?? metaRole.color}
|
|
238
|
+
opacity={selected ? 0.85 : 1}
|
|
239
|
+
numberOfLines={1}
|
|
240
|
+
userSelect="none"
|
|
241
|
+
>
|
|
242
|
+
{subtitle}
|
|
243
|
+
</RowText>
|
|
244
|
+
) : null}
|
|
245
|
+
</YStack>
|
|
246
|
+
{meta != null && meta !== false ? (
|
|
247
|
+
<XStack
|
|
248
|
+
alignItems="center"
|
|
249
|
+
{...knobProps.gap}
|
|
250
|
+
flexShrink={0}
|
|
251
|
+
{...(twoLine ? { alignSelf: "flex-start" } : null)}
|
|
252
|
+
{...({ "data-list-slot": "meta" } as Record<string, unknown>)}
|
|
253
|
+
>
|
|
254
|
+
{typeof meta === "string" || typeof meta === "number" ? (
|
|
255
|
+
<ListRowMeta>{meta}</ListRowMeta>
|
|
256
|
+
) : (
|
|
257
|
+
meta
|
|
258
|
+
)}
|
|
259
|
+
</XStack>
|
|
201
260
|
) : null}
|
|
202
|
-
</
|
|
203
|
-
|
|
204
|
-
<XStack
|
|
205
|
-
alignItems="center"
|
|
206
|
-
{...knobProps.gap}
|
|
207
|
-
flexShrink={0}
|
|
208
|
-
{...({ "data-list-slot": "meta" } as Record<string, unknown>)}
|
|
209
|
-
>
|
|
210
|
-
{typeof meta === "string" || typeof meta === "number" ? (
|
|
211
|
-
<ListRowMeta>{meta}</ListRowMeta>
|
|
212
|
-
) : (
|
|
213
|
-
meta
|
|
214
|
-
)}
|
|
215
|
-
</XStack>
|
|
216
|
-
) : null}
|
|
217
|
-
</XStack>
|
|
261
|
+
</XStack>
|
|
262
|
+
</ListRowTwoLineContext.Provider>
|
|
218
263
|
);
|
|
219
264
|
}
|
|
220
265
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Tabs/index.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuBpD,4EAA4E;AAC5E,eAAO,MAAM,cAAc,KAAK,CAAC;AAIjC,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;AAC7D,gFAAgF;AAChF,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC;AAClC,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACvB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,MAAM,CAAC;I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AM,EAChB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,aAAa,EACxB,GAAG,SAAiB,GACnB,MAAM,GAAG,SAAS,CAoBpB;AA+DD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAwoBo32B,CAAC;;;;;;;;gBAAq8C,CAAC;gBAA2C,CAAC;YAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;8CAxnB155B,CAAC;AA8BH,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAqB,EACrB,YAAwB,EACxB,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,IAAI,EACJ,SAAiB,EACjB,IAAY,EACZ,cAA4B,EAC5B,IAAW,EACX,QAAgB,EAChB,SAAS,GACV,EAAE,SAAS,kDA6jBX;kBA/kBQ,QAAQ;;;AAmlBjB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOmgiB,CAAC;;;;;;;;oBAAq8C,CAAC;oBAA2C,CAAC;gBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAk1R,CAAC;;;;;;;;oBAAq8C,CAAC;oBAA2C,CAAC;gBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAH155B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -25,11 +25,12 @@ export declare const tabBarLabelMinSize = "$1";
|
|
|
25
25
|
/** One icon box for every item. */
|
|
26
26
|
export declare const tabBarIconBox = "$2";
|
|
27
27
|
/**
|
|
28
|
-
* Inactive ink: the secondary text
|
|
29
|
-
*
|
|
30
|
-
* ink, so following the knob would paint inactive tabs as loud as
|
|
28
|
+
* Inactive ink: the theme's secondary text ink (LC-152), whatever the
|
|
29
|
+
* preset's textAccent. Bold sets textAccent "high", whose text colour is the
|
|
30
|
+
* primary ink, so following the knob would paint inactive tabs as loud as
|
|
31
|
+
* body text.
|
|
31
32
|
*/
|
|
32
|
-
export declare const tabBarInactiveInk = "$
|
|
33
|
+
export declare const tabBarInactiveInk = "$textMuted";
|
|
33
34
|
/** The bar's row, above the safe-area inset. */
|
|
34
35
|
export declare const tabBarRowHeight = "$5";
|
|
35
36
|
export declare function TabBar({ items, activeKey, onTabPress, label, testID, }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/appShell/TabBar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qEAAqE;AACrE,e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@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/images/Image/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,KAAK,CAAC,EACpB,GAAQ,EACR,UAAU,EAAE,WAAW,EACvB,SAAS,EAAE,UAAU,EACrB,WAAW,EACX,aAAa,EAAE,cAAc,EAC7B,YAAY,EAAE,aAAa,EAC3B,sBAAsB,EAAE,uBAAuB,EAC/C,SAAS,EAAE,aAAa,EACxB,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,aAAa,EAAE,cAAc,EAC7B,UAAU,EACV,2BAA2B,EAAE,4BAA4B,EACzD,cAAc,EACd,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,UAAU,EAClB,GAAG,EACH,MAAM,EACN,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,UAAU,EACrB,IAAY,EACZ,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,WAAqB,EACrB,cAAc,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,QAAkB,EAClB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/images/Image/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,KAAK,CAAC,EACpB,GAAQ,EACR,UAAU,EAAE,WAAW,EACvB,SAAS,EAAE,UAAU,EACrB,WAAW,EACX,aAAa,EAAE,cAAc,EAC7B,YAAY,EAAE,aAAa,EAC3B,sBAAsB,EAAE,uBAAuB,EAC/C,SAAS,EAAE,aAAa,EACxB,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,aAAa,EAAE,cAAc,EAC7B,UAAU,EACV,2BAA2B,EAAE,4BAA4B,EACzD,cAAc,EACd,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,UAAU,EAClB,GAAG,EACH,MAAM,EACN,GAAG,EAAE,IAAI,EACT,SAAS,EAAE,UAAU,EACrB,IAAY,EACZ,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,WAAqB,EACrB,cAAc,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,QAAkB,EAClB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,UAAU,kDAuFZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/images/Image/index.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/images/Image/index.native.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAoB1C,wBAAgB,KAAK,CAAC,EACpB,GAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EAAE,YAAY,EACzB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,SAAS,EAAE,aAAa,EACxB,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,aAAa,EACb,UAAU,EACV,2BAA2B,EAC3B,cAAc,EAAE,eAAe,EAC/B,YAAY,EACZ,MAAM,EAAE,UAAU,EAClB,GAAG,EACH,MAAM,EACN,GAAG,EACH,SAAS,EACT,IAAY,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,SAAS,EACnB,WAAqB,EACrB,cAAc,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,QAAQ,EAAE,SAAS,EACnB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EAAE,eAAe,EAC5B,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,UAAU,kDAkJZ"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ImageURISource } from "react-native";
|
|
2
2
|
import type { ImageThumbnailSize } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* LC-155: a slot that owns a thumbnail's frame (a list row's media slot)
|
|
5
|
+
* provides `false`, so thumbnails inside it draw no tile of their own. An
|
|
6
|
+
* explicit `framed` prop still wins.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ImageFramingContext: import("react").Context<boolean | undefined>;
|
|
3
9
|
export declare function isThumbnailSize(size: unknown): size is ImageThumbnailSize;
|
|
4
10
|
/** Thumbnail px; below the default size token every named step draws one smaller. */
|
|
5
11
|
export declare function thumbnailPx(size: ImageThumbnailSize | number, nestedPx: number, small: boolean): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/images/Image/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,kBAAkB,CAEzE;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CACzB,IAAI,EAAE,kBAAkB,GAAG,MAAM,EACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb,MAAM,CAWR;AAED,wBAAgB,QAAQ,CAAC,GA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AG,SAAS,CAaxF"}
|
package/types/views/List.d.ts
CHANGED
|
@@ -30,13 +30,22 @@ export interface ListItemState {
|
|
|
30
30
|
/** Read the current row's selection/focus. Defaults to idle outside a List. */
|
|
31
31
|
export declare function useListItemState(): ListItemState;
|
|
32
32
|
/**
|
|
33
|
-
* Subject-led document row (Desk list / Linear / Finder): leading glyph
|
|
34
|
-
* title (+ optional subtitle), trailing muted meta. Sits inside List's
|
|
33
|
+
* Subject-led document row (Desk list / Linear / Finder): leading glyph or
|
|
34
|
+
* media, title (+ optional subtitle), trailing muted meta. Sits inside List's
|
|
35
35
|
* stacked-group chrome — does not paint its own radius, fill, or ring.
|
|
36
|
+
*
|
|
37
|
+
* LC-155 ROW-ANATOMY: the title is the headline role, the subtitle the meta
|
|
38
|
+
* role on one line, and with a subtitle the row is a two-line Mail row whose
|
|
39
|
+
* trailing meta is a caption at the top right.
|
|
36
40
|
*/
|
|
37
41
|
export interface ListRowProps {
|
|
38
|
-
/** Leading
|
|
42
|
+
/** Leading glyph slot — fixed box so titles share one x (LC-08). */
|
|
39
43
|
icon?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Leading media slot (an avatar, a thumbnail): a `$true` square, and a
|
|
46
|
+
* thumbnail inside it draws no tile of its own.
|
|
47
|
+
*/
|
|
48
|
+
media?: ReactNode;
|
|
40
49
|
title: ReactNode;
|
|
41
50
|
subtitle?: ReactNode;
|
|
42
51
|
/** Trailing Finder/Desk columns (dates, size, kind, status). */
|
|
@@ -59,7 +68,7 @@ export declare function ListRowMeta({ children, width, color, }: {
|
|
|
59
68
|
* scale so a preset restyles it with every other control icon.
|
|
60
69
|
*/
|
|
61
70
|
export declare function listLeadingIconSize(sizeToken: string): number;
|
|
62
|
-
export declare function ListRow({ icon, title, subtitle, meta }: ListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
export declare function ListRow({ icon, media, title, subtitle, meta }: ListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
63
72
|
/**
|
|
64
73
|
* A row in a scroller waits this long before it paints its press, the delay
|
|
65
74
|
* UIScrollView gives its content: a touch that becomes a scroll never fills
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/views/List.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/views/List.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAqC,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/F;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,qDAAqD;IACrD,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,6CAA6C;IAC7C,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,gDAAgD;IAChD,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAUD,+EAA+E;AAC/E,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,S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