@tailor-platform/app-shell 1.16.0 → 1.18.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/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +762 -51
- package/dist/app-shell.js +7642 -5636
- package/dist/{appshell-B0wh5Lq0.js → appshell-Y1AYCuVJ.js} +323 -304
- package/dist/semantic-contrast.test.ts +227 -0
- package/dist/style-entry.d.ts +61 -26
- package/dist/testing.d.ts +66 -29
- package/dist/testing.js +1 -1
- package/dist/theme-bridge.test.ts +124 -1
- package/dist/theme.bridge.css +178 -0
- package/dist/theme.css +8 -2
- package/dist/themes/_template.css +8 -3
- package/dist/themes/bloom.css +0 -8
- package/dist/themes/cream.css +0 -8
- package/dist/themes/default.css +458 -103
- package/dist/vite-plugin.d.ts +61 -26
- package/package.json +2 -2
- package/skills/app-shell-patterns/SKILL.md +48 -37
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +123 -91
- package/skills/app-shell-patterns/references/api/define-module.md +4 -6
- package/skills/app-shell-patterns/references/api/define-resource.md +2 -2
- package/skills/app-shell-patterns/references/api/use-app-shell-config.md +53 -47
- package/skills/app-shell-patterns/references/api/use-app-shell-data.md +30 -26
- package/skills/app-shell-patterns/references/api/use-app-shell.md +37 -30
- package/skills/app-shell-patterns/references/api/use-toast.md +28 -31
- package/skills/app-shell-patterns/references/components/app-shell.md +4 -4
- package/skills/app-shell-patterns/references/components/card.md +79 -7
- package/skills/app-shell-patterns/references/components/data-table.md +599 -77
- package/skills/app-shell-patterns/references/components/date-picker.md +32 -21
- package/skills/app-shell-patterns/references/components/filter-rail.md +165 -0
- package/skills/app-shell-patterns/references/components/sidebar-group.md +12 -6
- package/skills/app-shell-patterns/references/components/sidebar-section.md +114 -0
- package/skills/app-shell-patterns/references/components/text.md +198 -0
- package/skills/app-shell-patterns/references/concepts/custom-components.md +1 -1
- package/skills/app-shell-patterns/references/concepts/file-based-routing.md +7 -1
- package/skills/app-shell-patterns/references/concepts/graphql.md +20 -14
- package/skills/app-shell-patterns/references/concepts/routing-navigation.md +41 -3
- package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +32 -0
- package/skills/app-shell-patterns/references/concepts/styling-theming.md +278 -65
- package/skills/app-shell-patterns/references/migrations.md +43 -1
- package/skills/app-shell-patterns/references/pages/document-detail.md +6 -6
- package/skills/app-shell-patterns/references/patterns/form-modal.md +26 -20
- package/skills/app-shell-patterns/references/patterns/i18n-labels.md +139 -0
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +129 -118
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +5 -4
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WCAG 1.4.3 contrast checks for the semantic colour roles, computed from
|
|
8
|
+
* `themes/default.css` itself. Nothing is copied into the test, so a change to
|
|
9
|
+
* a hue step or an alias that breaks a pair fails here.
|
|
10
|
+
*
|
|
11
|
+
* Scope of the guarantee: the default state of each pair, on the default
|
|
12
|
+
* palette's `--card` and `--background`. Not covered on purpose:
|
|
13
|
+
* - hover states (`surface-hover`) against 4.5:1: subtle-badge hover text is
|
|
14
|
+
* below 4.5:1 for some roles (danger and success in light mode). They are held
|
|
15
|
+
* at a documented floor (MIN_HOVER_TEXT) so they cannot get worse unnoticed,
|
|
16
|
+
* see decisions/semantic-color-roles.md;
|
|
17
|
+
* - branded palettes (cream, bloom) and their tinted shell backgrounds;
|
|
18
|
+
* - the neutral intent, whose values are the pre-existing system tokens;
|
|
19
|
+
* - the warning `solid` fill against the card (a fill, not a text pair).
|
|
20
|
+
*/
|
|
21
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
const css = readFileSync(join(here, "themes/default.css"), "utf8").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
23
|
+
|
|
24
|
+
type Rgba = { r: number; g: number; b: number; a: number };
|
|
25
|
+
type Mode = "light" | "dark";
|
|
26
|
+
|
|
27
|
+
/** Custom properties in effect on <html> for a mode, applying rules in source order. */
|
|
28
|
+
function variablesFor(mode: Mode): Map<string, string> {
|
|
29
|
+
const vars = new Map<string, string>();
|
|
30
|
+
for (const rule of css.matchAll(/([^{}]+)\{([^{}]*)\}/g)) {
|
|
31
|
+
const selectors = rule[1].split(",").map((s) => s.trim());
|
|
32
|
+
// <html class="dark"> matches both `:root` and `.dark`; light matches `:root` only.
|
|
33
|
+
const applies = selectors.some((s) => s === ":root" || (mode === "dark" && s === ".dark"));
|
|
34
|
+
if (!applies) continue;
|
|
35
|
+
for (const decl of rule[2].matchAll(/(--[a-z0-9-]+)\s*:\s*([^;]+);/g)) {
|
|
36
|
+
vars.set(decl[1], decl[2].replace(/\s+/g, " ").trim());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return vars;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function parseColor(value: string, vars: Map<string, string>): Rgba {
|
|
43
|
+
const v = value.trim();
|
|
44
|
+
const ref = /^var\((--[a-z0-9-]+)\)$/.exec(v);
|
|
45
|
+
if (ref) {
|
|
46
|
+
const target = vars.get(ref[1]);
|
|
47
|
+
if (target === undefined) throw new Error(`Undefined variable ${ref[1]}`);
|
|
48
|
+
return parseColor(target, vars);
|
|
49
|
+
}
|
|
50
|
+
const hex = /^#([0-9a-f]{3,8})$/i.exec(v);
|
|
51
|
+
if (hex) {
|
|
52
|
+
let h = hex[1];
|
|
53
|
+
if (h.length === 3 || h.length === 4) h = [...h].map((c) => c + c).join("");
|
|
54
|
+
if (h.length !== 6 && h.length !== 8) throw new Error(`Bad hex colour ${v}`);
|
|
55
|
+
return {
|
|
56
|
+
r: parseInt(h.slice(0, 2), 16),
|
|
57
|
+
g: parseInt(h.slice(2, 4), 16),
|
|
58
|
+
b: parseInt(h.slice(4, 6), 16),
|
|
59
|
+
a: h.length === 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const fn = /^rgba?\(([^)]+)\)$/.exec(v);
|
|
63
|
+
if (fn) {
|
|
64
|
+
const [r, g, b, a = "1"] = fn[1].split(",").map((p) => p.trim());
|
|
65
|
+
return { r: Number(r), g: Number(g), b: Number(b), a: Number(a) };
|
|
66
|
+
}
|
|
67
|
+
throw new Error(`Unsupported colour syntax: ${v}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function over(top: Rgba, base: Rgba): Rgba {
|
|
71
|
+
const a = top.a + base.a * (1 - top.a);
|
|
72
|
+
const mix = (t: number, b: number) => (t * top.a + b * base.a * (1 - top.a)) / a;
|
|
73
|
+
return { r: mix(top.r, base.r), g: mix(top.g, base.g), b: mix(top.b, base.b), a };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function linearize(channel: number): number {
|
|
77
|
+
const s = channel / 255;
|
|
78
|
+
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function luminance({ r, g, b }: Rgba): number {
|
|
82
|
+
return 0.2126 * linearize(r) + 0.7152 * linearize(g) + 0.0722 * linearize(b);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function contrast(a: Rgba, b: Rgba): number {
|
|
86
|
+
const [hi, lo] = [luminance(a), luminance(b)].toSorted((x, y) => y - x);
|
|
87
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const MIN_TEXT = 4.5;
|
|
91
|
+
/** WCAG 1.4.11 non-text contrast, for the invalid-input border. */
|
|
92
|
+
const MIN_NON_TEXT = 3;
|
|
93
|
+
/** Known and accepted: subtle hover text is below AA for some roles. A floor, not a pass. */
|
|
94
|
+
const MIN_HOVER_TEXT = 4.2;
|
|
95
|
+
const modes: Mode[] = ["light", "dark"];
|
|
96
|
+
const intents = ["info", "success", "warning", "danger"] as const;
|
|
97
|
+
const alertVariantFor = { info: "info", success: "success", warning: "warning", danger: "error" };
|
|
98
|
+
const pages = ["--card", "--background"] as const;
|
|
99
|
+
|
|
100
|
+
describe.each(modes)("semantic colour contrast (%s)", (mode) => {
|
|
101
|
+
const vars = variablesFor(mode);
|
|
102
|
+
const color = (name: string) => parseColor(`var(${name})`, vars);
|
|
103
|
+
/** Foreground drawn on a translucent surface that sits on a page colour. */
|
|
104
|
+
const pair = (fg: string, surface: string, page: string) => {
|
|
105
|
+
const base = color(page);
|
|
106
|
+
const bg = over(color(surface), base);
|
|
107
|
+
return contrast(over(color(fg), bg), bg);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
it("resolves the page colours to opaque values", () => {
|
|
111
|
+
for (const page of pages) expect(color(page).a).toBe(1);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe.each(intents)("%s", (intent) => {
|
|
115
|
+
const role = (name: string) => `--${intent}-${name}`;
|
|
116
|
+
|
|
117
|
+
it("the contrast role meets 4.5:1 on solid", () => {
|
|
118
|
+
expect(contrast(color(role("contrast")), color(role("solid")))).toBeGreaterThanOrEqual(
|
|
119
|
+
MIN_TEXT,
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it("the contrast role meets 4.5:1 on solid-hover", () => {
|
|
124
|
+
expect(contrast(color(role("contrast")), color(role("solid-hover")))).toBeGreaterThanOrEqual(
|
|
125
|
+
MIN_TEXT,
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it.each(pages)("text meets 4.5:1 on surface over %s", (page) => {
|
|
130
|
+
expect(pair(role("text"), role("surface"), page)).toBeGreaterThanOrEqual(MIN_TEXT);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it.each(pages)(
|
|
134
|
+
"text stays above the documented hover floor on surface-hover over %s",
|
|
135
|
+
(page) => {
|
|
136
|
+
expect(pair(role("text"), role("surface-hover"), page)).toBeGreaterThanOrEqual(
|
|
137
|
+
MIN_HOVER_TEXT,
|
|
138
|
+
);
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
const variant = alertVariantFor[intent];
|
|
143
|
+
|
|
144
|
+
it.each(pages)("alert foreground meets 4.5:1 on alert background over %s", (page) => {
|
|
145
|
+
expect(
|
|
146
|
+
pair(`--alert-${variant}-foreground`, `--alert-${variant}-background`, page),
|
|
147
|
+
).toBeGreaterThanOrEqual(MIN_TEXT);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it.each(pages)("alert description meets 4.5:1 on alert background over %s", (page) => {
|
|
151
|
+
expect(
|
|
152
|
+
pair(`--alert-${variant}-foreground-muted`, `--alert-${variant}-background`, page),
|
|
153
|
+
).toBeGreaterThanOrEqual(MIN_TEXT);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
describe("destructive aliases", () => {
|
|
158
|
+
it.each([
|
|
159
|
+
["--destructive", "--danger-solid"],
|
|
160
|
+
["--destructive-foreground", "--danger-contrast"],
|
|
161
|
+
])("%s resolves to %s", (alias, role) => {
|
|
162
|
+
expect(vars.get(alias)).toBe(`var(${role})`);
|
|
163
|
+
expect(color(alias)).toEqual(color(role));
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it.each(pages)("danger solid meets 3:1 against %s (invalid-input border)", (page) => {
|
|
167
|
+
expect(contrast(color("--danger-solid"), color(page))).toBeGreaterThanOrEqual(MIN_NON_TEXT);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe("default palette neutral tokens", () => {
|
|
173
|
+
// Pinned when the BRAND and SYSTEM tokens moved from literals onto the gray,
|
|
174
|
+
// white and alpha scales. That move was meant to keep every value, so a step
|
|
175
|
+
// change that alters one of these colours fails here.
|
|
176
|
+
const expected: Record<Mode, Record<string, string>> = {
|
|
177
|
+
light: {
|
|
178
|
+
"--foreground": "#0a0a0a",
|
|
179
|
+
"--muted-foreground": "#737373",
|
|
180
|
+
"--primary": "#171717",
|
|
181
|
+
"--primary-foreground": "#fafafa",
|
|
182
|
+
"--secondary": "#f5f5f5",
|
|
183
|
+
"--secondary-foreground": "#171717",
|
|
184
|
+
"--accent-foreground": "#0a0a0a",
|
|
185
|
+
"--background": "#fafafa",
|
|
186
|
+
"--card": "#ffffff",
|
|
187
|
+
"--card-foreground": "#0a0a0a",
|
|
188
|
+
"--popover": "#ffffff",
|
|
189
|
+
"--popover-foreground": "#0a0a0a",
|
|
190
|
+
"--muted": "#f5f5f5",
|
|
191
|
+
"--border": "#e5e5e5",
|
|
192
|
+
"--input": "#e5e5e5",
|
|
193
|
+
"--sidebar": "#fafafa",
|
|
194
|
+
"--sidebar-foreground": "#0a0a0a",
|
|
195
|
+
"--sidebar-border": "#e5e5e5",
|
|
196
|
+
"--backdrop": "rgba(0, 0, 0, 0.5)",
|
|
197
|
+
},
|
|
198
|
+
dark: {
|
|
199
|
+
"--foreground": "#fafafa",
|
|
200
|
+
"--muted-foreground": "#a3a3a3",
|
|
201
|
+
"--primary": "#e5e5e5",
|
|
202
|
+
"--primary-foreground": "#171717",
|
|
203
|
+
"--secondary": "#262626",
|
|
204
|
+
"--secondary-foreground": "#fafafa",
|
|
205
|
+
"--accent-foreground": "#fafafa",
|
|
206
|
+
"--background": "#0a0a0a",
|
|
207
|
+
"--card": "#171717",
|
|
208
|
+
"--card-foreground": "#fafafa",
|
|
209
|
+
"--popover": "#262626",
|
|
210
|
+
"--popover-foreground": "#fafafa",
|
|
211
|
+
"--muted": "#262626",
|
|
212
|
+
"--border": "rgba(255, 255, 255, 0.1)",
|
|
213
|
+
"--input": "rgba(255, 255, 255, 0.15)",
|
|
214
|
+
"--sidebar": "#0a0a0a",
|
|
215
|
+
"--sidebar-foreground": "#fafafa",
|
|
216
|
+
"--sidebar-border": "rgba(255, 255, 255, 0.1)",
|
|
217
|
+
"--backdrop": "rgba(0, 0, 0, 0.5)",
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
describe.each(["light", "dark"] as const)("%s mode", (mode) => {
|
|
222
|
+
const vars = variablesFor(mode);
|
|
223
|
+
it.each(Object.entries(expected[mode]))("%s resolves to %s", (token, value) => {
|
|
224
|
+
expect(parseColor(`var(${token})`, vars)).toEqual(parseColor(value, vars));
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
});
|
package/dist/style-entry.d.ts
CHANGED
|
@@ -31,12 +31,12 @@ declare namespace Root {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
declare namespace
|
|
34
|
+
declare namespace Image {
|
|
35
35
|
var displayName: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
declare namespace
|
|
39
|
+
declare namespace Fallback {
|
|
40
40
|
var displayName: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -46,17 +46,17 @@ declare namespace Root {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
declare namespace
|
|
49
|
+
declare namespace Title {
|
|
50
50
|
var displayName: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
declare namespace
|
|
54
|
+
declare namespace Description {
|
|
55
55
|
var displayName: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
declare namespace
|
|
59
|
+
declare namespace Provider {
|
|
60
60
|
var displayName: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -66,12 +66,27 @@ declare namespace Root {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
declare namespace
|
|
69
|
+
declare namespace Header {
|
|
70
70
|
var displayName: string;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
declare namespace
|
|
74
|
+
declare namespace ClearAll {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
declare namespace Sections {
|
|
80
|
+
var displayName: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
declare namespace Trigger {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
declare namespace Settings {
|
|
75
90
|
var displayName: string;
|
|
76
91
|
}
|
|
77
92
|
|
|
@@ -86,47 +101,47 @@ declare namespace Header {
|
|
|
86
101
|
}
|
|
87
102
|
|
|
88
103
|
|
|
89
|
-
declare namespace
|
|
104
|
+
declare namespace Content {
|
|
90
105
|
var displayName: string;
|
|
91
106
|
}
|
|
92
107
|
|
|
93
108
|
|
|
94
|
-
declare namespace
|
|
109
|
+
declare namespace Root {
|
|
95
110
|
var displayName: string;
|
|
96
111
|
}
|
|
97
112
|
|
|
98
113
|
|
|
99
|
-
declare namespace
|
|
114
|
+
declare namespace Header {
|
|
100
115
|
var displayName: string;
|
|
101
116
|
}
|
|
102
117
|
|
|
103
118
|
|
|
104
|
-
declare namespace
|
|
119
|
+
declare namespace Body {
|
|
105
120
|
var displayName: string;
|
|
106
121
|
}
|
|
107
122
|
|
|
108
123
|
|
|
109
|
-
declare namespace
|
|
124
|
+
declare namespace Footer {
|
|
110
125
|
var displayName: string;
|
|
111
126
|
}
|
|
112
127
|
|
|
113
128
|
|
|
114
|
-
declare namespace
|
|
129
|
+
declare namespace Row {
|
|
115
130
|
var displayName: string;
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
|
|
119
|
-
declare namespace
|
|
134
|
+
declare namespace Head {
|
|
120
135
|
var displayName: string;
|
|
121
136
|
}
|
|
122
137
|
|
|
123
138
|
|
|
124
|
-
declare namespace
|
|
139
|
+
declare namespace Cell {
|
|
125
140
|
var displayName: string;
|
|
126
141
|
}
|
|
127
142
|
|
|
128
143
|
|
|
129
|
-
declare namespace
|
|
144
|
+
declare namespace Caption {
|
|
130
145
|
var displayName: string;
|
|
131
146
|
}
|
|
132
147
|
|
|
@@ -331,6 +346,26 @@ declare namespace Root {
|
|
|
331
346
|
}
|
|
332
347
|
|
|
333
348
|
|
|
349
|
+
declare namespace List {
|
|
350
|
+
var displayName: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
declare namespace Tab {
|
|
355
|
+
var displayName: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
declare namespace Panel {
|
|
360
|
+
var displayName: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
declare namespace Root {
|
|
365
|
+
var displayName: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
|
|
334
369
|
declare namespace Row {
|
|
335
370
|
var displayName: string;
|
|
336
371
|
}
|
|
@@ -491,16 +526,6 @@ declare namespace ComboboxCollection {
|
|
|
491
526
|
}
|
|
492
527
|
|
|
493
528
|
|
|
494
|
-
declare namespace AutocompleteStandalone {
|
|
495
|
-
var displayName: string;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
declare namespace AutocompleteAsyncStandalone {
|
|
500
|
-
var displayName: string;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
529
|
declare namespace AutocompleteRoot {
|
|
505
530
|
var displayName: string;
|
|
506
531
|
}
|
|
@@ -571,6 +596,16 @@ declare namespace AutocompleteStatus {
|
|
|
571
596
|
}
|
|
572
597
|
|
|
573
598
|
|
|
599
|
+
declare namespace AutocompleteStandalone {
|
|
600
|
+
var displayName: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
declare namespace AutocompleteAsyncStandalone {
|
|
605
|
+
var displayName: string;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
|
|
574
609
|
declare namespace DataTableRoot {
|
|
575
610
|
var displayName: string;
|
|
576
611
|
}
|
package/dist/testing.d.ts
CHANGED
|
@@ -52,9 +52,11 @@ declare type AppShellPageProps = {
|
|
|
52
52
|
icon?: ReactNode;
|
|
53
53
|
/**
|
|
54
54
|
* Custom breadcrumb segment title for this page.
|
|
55
|
-
* Can be a static string or a
|
|
55
|
+
* Can be a static string or a `labels.t("key")` translation function.
|
|
56
|
+
* Other callbacks receive the URL segment and may return a LocalizedString
|
|
57
|
+
* (e.g. `(segment) => labels.t("order", { id: segment })`), resolved using the current locale.
|
|
56
58
|
*/
|
|
57
|
-
breadcrumbTitle?: string | ((segment: string) =>
|
|
59
|
+
breadcrumbTitle?: string | ((segment: string) => LocalizedString);
|
|
58
60
|
};
|
|
59
61
|
/**
|
|
60
62
|
* Guards to control access to this page.
|
|
@@ -160,7 +162,7 @@ declare type CommonPageResource = {
|
|
|
160
162
|
meta: {
|
|
161
163
|
title: LocalizedString;
|
|
162
164
|
icon?: ReactNode;
|
|
163
|
-
breadcrumbTitle?: string | ((segment: string) =>
|
|
165
|
+
breadcrumbTitle?: string | ((segment: string) => LocalizedString);
|
|
164
166
|
};
|
|
165
167
|
};
|
|
166
168
|
|
|
@@ -570,12 +572,12 @@ declare namespace Root {
|
|
|
570
572
|
}
|
|
571
573
|
|
|
572
574
|
|
|
573
|
-
declare namespace
|
|
575
|
+
declare namespace Image {
|
|
574
576
|
var displayName: string;
|
|
575
577
|
}
|
|
576
578
|
|
|
577
579
|
|
|
578
|
-
declare namespace
|
|
580
|
+
declare namespace Fallback {
|
|
579
581
|
var displayName: string;
|
|
580
582
|
}
|
|
581
583
|
|
|
@@ -585,17 +587,17 @@ declare namespace Root {
|
|
|
585
587
|
}
|
|
586
588
|
|
|
587
589
|
|
|
588
|
-
declare namespace
|
|
590
|
+
declare namespace Title {
|
|
589
591
|
var displayName: string;
|
|
590
592
|
}
|
|
591
593
|
|
|
592
594
|
|
|
593
|
-
declare namespace
|
|
595
|
+
declare namespace Description {
|
|
594
596
|
var displayName: string;
|
|
595
597
|
}
|
|
596
598
|
|
|
597
599
|
|
|
598
|
-
declare namespace
|
|
600
|
+
declare namespace Provider {
|
|
599
601
|
var displayName: string;
|
|
600
602
|
}
|
|
601
603
|
|
|
@@ -605,12 +607,27 @@ declare namespace Root {
|
|
|
605
607
|
}
|
|
606
608
|
|
|
607
609
|
|
|
608
|
-
declare namespace
|
|
610
|
+
declare namespace Header {
|
|
609
611
|
var displayName: string;
|
|
610
612
|
}
|
|
611
613
|
|
|
612
614
|
|
|
613
|
-
declare namespace
|
|
615
|
+
declare namespace ClearAll {
|
|
616
|
+
var displayName: string;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
declare namespace Sections {
|
|
621
|
+
var displayName: string;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
declare namespace Trigger {
|
|
626
|
+
var displayName: string;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
declare namespace Settings {
|
|
614
631
|
var displayName: string;
|
|
615
632
|
}
|
|
616
633
|
|
|
@@ -625,47 +642,47 @@ declare namespace Header {
|
|
|
625
642
|
}
|
|
626
643
|
|
|
627
644
|
|
|
628
|
-
declare namespace
|
|
645
|
+
declare namespace Content {
|
|
629
646
|
var displayName: string;
|
|
630
647
|
}
|
|
631
648
|
|
|
632
649
|
|
|
633
|
-
declare namespace
|
|
650
|
+
declare namespace Root {
|
|
634
651
|
var displayName: string;
|
|
635
652
|
}
|
|
636
653
|
|
|
637
654
|
|
|
638
|
-
declare namespace
|
|
655
|
+
declare namespace Header {
|
|
639
656
|
var displayName: string;
|
|
640
657
|
}
|
|
641
658
|
|
|
642
659
|
|
|
643
|
-
declare namespace
|
|
660
|
+
declare namespace Body {
|
|
644
661
|
var displayName: string;
|
|
645
662
|
}
|
|
646
663
|
|
|
647
664
|
|
|
648
|
-
declare namespace
|
|
665
|
+
declare namespace Footer {
|
|
649
666
|
var displayName: string;
|
|
650
667
|
}
|
|
651
668
|
|
|
652
669
|
|
|
653
|
-
declare namespace
|
|
670
|
+
declare namespace Row {
|
|
654
671
|
var displayName: string;
|
|
655
672
|
}
|
|
656
673
|
|
|
657
674
|
|
|
658
|
-
declare namespace
|
|
675
|
+
declare namespace Head {
|
|
659
676
|
var displayName: string;
|
|
660
677
|
}
|
|
661
678
|
|
|
662
679
|
|
|
663
|
-
declare namespace
|
|
680
|
+
declare namespace Cell {
|
|
664
681
|
var displayName: string;
|
|
665
682
|
}
|
|
666
683
|
|
|
667
684
|
|
|
668
|
-
declare namespace
|
|
685
|
+
declare namespace Caption {
|
|
669
686
|
var displayName: string;
|
|
670
687
|
}
|
|
671
688
|
|
|
@@ -870,6 +887,26 @@ declare namespace Root {
|
|
|
870
887
|
}
|
|
871
888
|
|
|
872
889
|
|
|
890
|
+
declare namespace List {
|
|
891
|
+
var displayName: string;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
declare namespace Tab {
|
|
896
|
+
var displayName: string;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
declare namespace Panel {
|
|
901
|
+
var displayName: string;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
declare namespace Root {
|
|
906
|
+
var displayName: string;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
|
|
873
910
|
declare namespace Row {
|
|
874
911
|
var displayName: string;
|
|
875
912
|
}
|
|
@@ -1030,16 +1067,6 @@ declare namespace ComboboxCollection {
|
|
|
1030
1067
|
}
|
|
1031
1068
|
|
|
1032
1069
|
|
|
1033
|
-
declare namespace AutocompleteStandalone {
|
|
1034
|
-
var displayName: string;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
declare namespace AutocompleteAsyncStandalone {
|
|
1039
|
-
var displayName: string;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
1070
|
declare namespace AutocompleteRoot {
|
|
1044
1071
|
var displayName: string;
|
|
1045
1072
|
}
|
|
@@ -1110,6 +1137,16 @@ declare namespace AutocompleteStatus {
|
|
|
1110
1137
|
}
|
|
1111
1138
|
|
|
1112
1139
|
|
|
1140
|
+
declare namespace AutocompleteStandalone {
|
|
1141
|
+
var displayName: string;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
declare namespace AutocompleteAsyncStandalone {
|
|
1146
|
+
var displayName: string;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
|
|
1113
1150
|
declare namespace DataTableRoot {
|
|
1114
1151
|
var displayName: string;
|
|
1115
1152
|
}
|
package/dist/testing.js
CHANGED