@eifi1/ui-kit 0.27.0 → 0.28.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 +7 -5
- package/dist/chart.d.ts +1 -2
- package/dist/components/amount-input.d.ts +1 -2
- package/dist/components/button-group.d.ts +1 -2
- package/dist/components/calculator.d.ts +1 -2
- package/dist/components/confirm-dialog.d.ts +1 -2
- package/dist/components/copy-button.d.ts +1 -2
- package/dist/components/danger-confirm.d.ts +1 -2
- package/dist/components/facing-pair.d.ts +1 -2
- package/dist/components/file-button.d.ts +1 -2
- package/dist/components/file-dropzone.d.ts +1 -2
- package/dist/components/form-actions.d.ts +1 -2
- package/dist/components/iban-input.d.ts +1 -2
- package/dist/components/language-select.d.ts +1 -2
- package/dist/components/legal-page.d.ts +261 -0
- package/dist/components/legal-page.js +253 -0
- package/dist/components/legal-page.js.map +1 -0
- package/dist/components/legal.d.ts +70 -84
- package/dist/components/legal.js +190 -19
- package/dist/components/legal.js.map +1 -1
- package/dist/components/money-field.d.ts +1 -2
- package/dist/components/number-field.d.ts +1 -2
- package/dist/components/number-input.d.ts +1 -2
- package/dist/components/numpad-sheet.d.ts +1 -2
- package/dist/components/phone-input.d.ts +1 -2
- package/dist/components/series-chart.d.ts +1 -2
- package/dist/components/settings-fields.d.ts +1 -2
- package/dist/components/share-card.d.ts +1 -2
- package/dist/components/text-link.d.ts +1 -2
- package/dist/components/time-input.d.ts +1 -2
- package/dist/components/translation-review.d.ts +2 -1
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/ui.d.ts +1 -2
- package/dist/feedback/feedback-attachment.d.ts +1 -2
- package/dist/feedback/feedback-context.d.ts +1 -2
- package/dist/feedback/feedback-crash.d.ts +1 -2
- package/dist/feedback/feedback-dialog.d.ts +1 -2
- package/dist/feedback/feedback-inbox.d.ts +1 -2
- package/dist/feedback/feedback-labels.d.ts +1 -2
- package/dist/feedback/feedback-menu.d.ts +1 -2
- package/dist/feedback/feedback-record.d.ts +1 -2
- package/dist/feedback/feedback-row-detail.d.ts +1 -2
- package/dist/feedback/feedback-status-undo.d.ts +1 -2
- package/dist/feedback/feedback-submit.d.ts +1 -2
- package/dist/feedback/feedback-swipe.d.ts +1 -2
- package/dist/feedback/feedback-table.d.ts +1 -2
- package/dist/feedback/feedback-thread.d.ts +1 -2
- package/dist/feedback.d.ts +1 -2
- package/dist/hooks/use-file-drop.d.ts +1 -2
- package/dist/hooks/use-noindex.d.ts +26 -0
- package/dist/hooks/use-noindex.js +18 -0
- package/dist/hooks/use-noindex.js.map +1 -0
- package/dist/i18n/defaults.d.ts +1 -2
- package/dist/i18n/german.d.ts +1 -2
- package/dist/i18n/german.js +87 -1
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +1 -2
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +1 -2
- package/dist/i18n/locales/de-CH.d.ts +1 -2
- package/dist/i18n/locales/en.d.ts +1 -2
- package/dist/i18n/locales/es.d.ts +1 -2
- package/dist/i18n/locales/es.js +87 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -2
- package/dist/i18n/locales/fr.js +89 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +1 -2
- package/dist/i18n/locales/hu.js +90 -1
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -2
- package/dist/i18n/locales/it.js +90 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -2
- package/dist/i18n/locales/zh.js +87 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +24 -5
- package/dist/i18n/review.js +24 -3
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/{kit-labels-DQg82eHB.d.ts → kit-labels-SBN0biPl.d.ts} +305 -3
- package/dist/lib/translation-review.d.ts +26 -3
- package/dist/lib/translation-review.js +10 -2
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/rhf/fields.d.ts +1 -2
- package/dist/rhf/form.d.ts +1 -2
- package/dist/rhf.d.ts +1 -2
- package/dist/shell/app-shell.d.ts +1 -2
- package/dist/shell/top-bar-brand.d.ts +1 -2
- package/dist/shell.d.ts +1 -2
- package/dist/wizard/stepper-nav.d.ts +1 -2
- package/dist/wizard.d.ts +1 -2
- package/package.json +1 -1
- package/src/components/legal-page.tsx +566 -0
- package/src/components/legal.tsx +458 -49
- package/src/components/translation-review.tsx +2 -1
- package/src/hooks/use-noindex.ts +37 -0
- package/src/i18n/german.ts +81 -0
- package/src/i18n/kit-labels.tsx +4 -1
- package/src/i18n/locales/es.ts +81 -0
- package/src/i18n/locales/fr.ts +83 -0
- package/src/i18n/locales/hu.ts +84 -0
- package/src/i18n/locales/it.ts +84 -0
- package/src/i18n/locales/zh.ts +81 -0
- package/src/i18n/review.ts +56 -3
- package/src/index.ts +32 -2
- package/src/lib/translation-review.ts +43 -4
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment, isValidElement, useContext, useMemo } from "react";
|
|
4
|
+
import { ArrowLeft } from "lucide-react";
|
|
5
|
+
import { UiKitProvider, useKitLocale } from "../i18n/kit-labels.js";
|
|
6
|
+
import { useNoIndex } from "../hooks/use-noindex.js";
|
|
7
|
+
import { cn } from "../lib/cn.js";
|
|
8
|
+
import { Checkbox } from "./checkbox.js";
|
|
9
|
+
import {
|
|
10
|
+
LEGAL_HREFS,
|
|
11
|
+
LegalFooter,
|
|
12
|
+
LegalLayout,
|
|
13
|
+
LegalPageContext,
|
|
14
|
+
LegalSection,
|
|
15
|
+
LegalSlotContext,
|
|
16
|
+
LegalText,
|
|
17
|
+
legalOperatorText,
|
|
18
|
+
useLegalLabels,
|
|
19
|
+
warnLegalOnce
|
|
20
|
+
} from "./legal.js";
|
|
21
|
+
import { TextLink } from "./text-link.js";
|
|
22
|
+
const LEGAL_SKELETON = Object.freeze({
|
|
23
|
+
impressum: Object.freeze({
|
|
24
|
+
numbered: false,
|
|
25
|
+
sections: Object.freeze([
|
|
26
|
+
{ key: "operator", owner: "kit" },
|
|
27
|
+
{ key: "contact", owner: "kit" },
|
|
28
|
+
{ key: "disclaimer", owner: "kit" },
|
|
29
|
+
{ key: "*", owner: "app" }
|
|
30
|
+
])
|
|
31
|
+
}),
|
|
32
|
+
privacy: Object.freeze({
|
|
33
|
+
numbered: true,
|
|
34
|
+
sections: Object.freeze([
|
|
35
|
+
{ key: "controller", owner: "kit" },
|
|
36
|
+
{ key: "data", owner: "app" },
|
|
37
|
+
{ key: "legal_basis", owner: "kit+app" },
|
|
38
|
+
{ key: "third_parties", owner: "app" },
|
|
39
|
+
{ key: "*", owner: "app" },
|
|
40
|
+
{ key: "browser", owner: "kit+app" },
|
|
41
|
+
{ key: "transfers", owner: "app" },
|
|
42
|
+
{ key: "retention", owner: "app" },
|
|
43
|
+
{ key: "rights", owner: "kit+app" },
|
|
44
|
+
{ key: "contact", owner: "kit" }
|
|
45
|
+
])
|
|
46
|
+
}),
|
|
47
|
+
terms: Object.freeze({
|
|
48
|
+
numbered: true,
|
|
49
|
+
sections: Object.freeze([
|
|
50
|
+
{ key: "scope", owner: "app" },
|
|
51
|
+
{ key: "no_advice", owner: "app" },
|
|
52
|
+
{ key: "*", owner: "app" },
|
|
53
|
+
{ key: "warranty", owner: "kit" },
|
|
54
|
+
{ key: "liability", owner: "kit" },
|
|
55
|
+
{ key: "changes", owner: "kit" },
|
|
56
|
+
{ key: "law", owner: "kit" }
|
|
57
|
+
])
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
function kitSectionsOf(page) {
|
|
61
|
+
return LEGAL_SKELETON[page].sections.filter((s) => s.owner !== "app").map((s) => s.key);
|
|
62
|
+
}
|
|
63
|
+
const PAGES = ["impressum", "privacy", "terms"];
|
|
64
|
+
function appPart(children) {
|
|
65
|
+
if (children === void 0 || children === null || children === false) return null;
|
|
66
|
+
if (typeof children === "string") return /* @__PURE__ */ jsx(LegalText, { text: children }, "app");
|
|
67
|
+
return /* @__PURE__ */ jsx(Fragment, { children }, "app");
|
|
68
|
+
}
|
|
69
|
+
function LegalKitSection(props) {
|
|
70
|
+
const { section, headingAs, labels: labelsProp } = props;
|
|
71
|
+
const context = useContext(LegalPageContext);
|
|
72
|
+
const labels = useLegalLabels(labelsProp);
|
|
73
|
+
const kitLocale = useKitLocale();
|
|
74
|
+
const page = props.page ?? context?.page ?? onlyPageOf(section);
|
|
75
|
+
const kitSections = kitSectionsOf(page);
|
|
76
|
+
if (!kitSections.includes(section)) {
|
|
77
|
+
throw new Error(
|
|
78
|
+
`LegalKitSection: "${section}" is not one of the kit's sections of the ${page} page (${kitSections.join(", ")}).`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
const entry = labels.sections[page][section];
|
|
82
|
+
const operator = props.operator ? legalOperatorText(props.operator, kitLocale) : context?.operator;
|
|
83
|
+
const fill = (body) => {
|
|
84
|
+
if (typeof body === "string") return body;
|
|
85
|
+
if (!operator) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`LegalKitSection "${section}" names the operator: render it inside <LegalPage operator={\u2026}>, or pass operator.`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return body(operator);
|
|
91
|
+
};
|
|
92
|
+
const app = appPart(props.children);
|
|
93
|
+
let parts;
|
|
94
|
+
if ("lead" in entry) {
|
|
95
|
+
const lead = /* @__PURE__ */ jsx(LegalText, { text: entry.lead }, "lead");
|
|
96
|
+
const tail = /* @__PURE__ */ jsx(LegalText, { text: entry.tail }, "tail");
|
|
97
|
+
if (props.section === "browser") {
|
|
98
|
+
const list = props.entries.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "list-disc space-y-1 ps-5", children: props.entries.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }, "entries") : null;
|
|
99
|
+
parts = [lead, list, tail, app];
|
|
100
|
+
} else {
|
|
101
|
+
parts = [lead, app, tail];
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
parts = [/* @__PURE__ */ jsx(LegalText, { text: fill(entry.body) }, "body"), app];
|
|
105
|
+
}
|
|
106
|
+
return /* @__PURE__ */ jsx(LegalSection, { id: section, heading: entry.title, headingAs, children: /* @__PURE__ */ jsx("div", { className: "space-y-[1lh]", children: parts }) });
|
|
107
|
+
}
|
|
108
|
+
function onlyPageOf(section) {
|
|
109
|
+
const pages = PAGES.filter((p) => kitSectionsOf(p).includes(section));
|
|
110
|
+
if (pages.length === 1) return pages[0];
|
|
111
|
+
throw new Error(
|
|
112
|
+
pages.length === 0 ? `LegalKitSection: "${section}" is not one of the kit's sections.` : `LegalKitSection: "${section}" is on more than one page (${pages.join(", ")}) \u2014 render it inside a LegalPage, or pass page.`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function flatten(node, path, out) {
|
|
116
|
+
if (node === null || node === void 0 || typeof node === "boolean") return;
|
|
117
|
+
if (isValidElement(node)) {
|
|
118
|
+
if (node.type === Fragment) {
|
|
119
|
+
flatten(node.props.children, path, out);
|
|
120
|
+
} else {
|
|
121
|
+
out.push({ node, path: path || "/" });
|
|
122
|
+
}
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (typeof node === "object" && Symbol.iterator in node) {
|
|
126
|
+
Array.from(node).forEach((child, i) => {
|
|
127
|
+
const step = isValidElement(child) && child.key !== null ? `$${child.key}` : `#${i}`;
|
|
128
|
+
flatten(child, `${path}/${step}`, out);
|
|
129
|
+
});
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
out.push({ node, path: path || "/" });
|
|
133
|
+
}
|
|
134
|
+
function sectionOf(node, page, labels) {
|
|
135
|
+
if (!isValidElement(node)) return null;
|
|
136
|
+
if (node.type === LegalKitSection) {
|
|
137
|
+
const { section } = node.props;
|
|
138
|
+
const entry = labels.sections[page][section];
|
|
139
|
+
return { key: section, heading: entry?.title ?? section };
|
|
140
|
+
}
|
|
141
|
+
if (node.type === LegalSection) {
|
|
142
|
+
const props = node.props;
|
|
143
|
+
return { key: props.id ?? node.key ?? void 0, heading: props.heading };
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
function slotSections(children, page, labels) {
|
|
148
|
+
const flat = [];
|
|
149
|
+
flatten(children, "", flat);
|
|
150
|
+
const numbered = LEGAL_SKELETON[page].numbered;
|
|
151
|
+
const targets = /* @__PURE__ */ new Map();
|
|
152
|
+
let count = 0;
|
|
153
|
+
const nodes = flat.map(({ node, path }) => {
|
|
154
|
+
const section = sectionOf(node, page, labels);
|
|
155
|
+
if (!section) return /* @__PURE__ */ jsx(Fragment, { children: node }, path);
|
|
156
|
+
count += 1;
|
|
157
|
+
const number = numbered ? count : void 0;
|
|
158
|
+
if (section.key !== void 0) {
|
|
159
|
+
if (targets.has(section.key)) {
|
|
160
|
+
warnLegalOnce(`two sections of the ${page} page share the key "${section.key}"; {ref:${section.key}} names the first.`);
|
|
161
|
+
} else {
|
|
162
|
+
targets.set(section.key, { number, heading: section.heading });
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return /* @__PURE__ */ jsx(LegalSlotContext.Provider, { value: { id: section.key, number }, children: node }, path);
|
|
166
|
+
});
|
|
167
|
+
return { nodes, targets };
|
|
168
|
+
}
|
|
169
|
+
function LegalPage({
|
|
170
|
+
page,
|
|
171
|
+
operator,
|
|
172
|
+
children,
|
|
173
|
+
header,
|
|
174
|
+
footer,
|
|
175
|
+
homeHref = "/",
|
|
176
|
+
notice,
|
|
177
|
+
locale: localeProp,
|
|
178
|
+
headingAs = "h1",
|
|
179
|
+
landmark = true,
|
|
180
|
+
noIndex = true,
|
|
181
|
+
className,
|
|
182
|
+
labels: labelsProp
|
|
183
|
+
}) {
|
|
184
|
+
useNoIndex(noIndex);
|
|
185
|
+
const labels = useLegalLabels(labelsProp);
|
|
186
|
+
const locale = useKitLocale(localeProp) ?? "en";
|
|
187
|
+
const operatorText = legalOperatorText(operator, locale);
|
|
188
|
+
const overrides = useMemo(
|
|
189
|
+
() => labelsProp ? { legal: labelsProp } : void 0,
|
|
190
|
+
[labelsProp]
|
|
191
|
+
);
|
|
192
|
+
const { nodes, targets } = slotSections(children, page, labels);
|
|
193
|
+
const context = {
|
|
194
|
+
page,
|
|
195
|
+
operator: operatorText,
|
|
196
|
+
sectionHeading: headingAs === "h1" ? "h2" : "h3",
|
|
197
|
+
targets
|
|
198
|
+
};
|
|
199
|
+
const Main = landmark ? "main" : "div";
|
|
200
|
+
const shownNotice = notice !== void 0 ? notice : page === "privacy" ? labels.notice.privacy : labels.notice.beta;
|
|
201
|
+
return /* @__PURE__ */ jsx(UiKitProvider, { labels: overrides, children: /* @__PURE__ */ jsxs("div", { className: cn("flex min-h-full flex-col", className), children: [
|
|
202
|
+
header,
|
|
203
|
+
/* @__PURE__ */ jsx(Main, { className: "flex-1", children: /* @__PURE__ */ jsx(LegalPageContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
204
|
+
LegalLayout,
|
|
205
|
+
{
|
|
206
|
+
back: /* @__PURE__ */ jsx(TextLink, { href: homeHref, icon: ArrowLeft, children: labels.backHome }),
|
|
207
|
+
title: labels.titles[page],
|
|
208
|
+
notice: shownNotice,
|
|
209
|
+
headingAs,
|
|
210
|
+
children: nodes
|
|
211
|
+
}
|
|
212
|
+
) }) }),
|
|
213
|
+
footer === void 0 ? /* @__PURE__ */ jsx(LegalFooter, { currentHref: LEGAL_HREFS[page] }) : footer
|
|
214
|
+
] }) });
|
|
215
|
+
}
|
|
216
|
+
function acceptLabel(labels, termsHref, privacyHref) {
|
|
217
|
+
const template = labels.accept;
|
|
218
|
+
for (const placeholder of ["{terms}", "{privacy}"]) {
|
|
219
|
+
if (!template.includes(placeholder)) warnLegalOnce(`legal.accept has no ${placeholder}: "${template}".`);
|
|
220
|
+
}
|
|
221
|
+
return template.split(/(\{terms\}|\{privacy\})/).filter((part) => part !== "").map(
|
|
222
|
+
(part, i) => part === "{terms}" ? /* @__PURE__ */ jsx(TextLink, { href: termsHref, tone: "primary", children: labels.titles.terms }, i) : part === "{privacy}" ? /* @__PURE__ */ jsx(TextLink, { href: privacyHref, tone: "primary", children: labels.titles.privacy }, i) : part
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
function LegalAcceptCheckbox({
|
|
226
|
+
checked,
|
|
227
|
+
onCheckedChange,
|
|
228
|
+
termsHref = LEGAL_HREFS.terms,
|
|
229
|
+
privacyHref = LEGAL_HREFS.privacy,
|
|
230
|
+
labels: labelsProp,
|
|
231
|
+
ref,
|
|
232
|
+
...rest
|
|
233
|
+
}) {
|
|
234
|
+
const labels = useLegalLabels(labelsProp);
|
|
235
|
+
return /* @__PURE__ */ jsx(
|
|
236
|
+
Checkbox,
|
|
237
|
+
{
|
|
238
|
+
...rest,
|
|
239
|
+
ref,
|
|
240
|
+
checked,
|
|
241
|
+
onCheckedChange,
|
|
242
|
+
required: true,
|
|
243
|
+
label: acceptLabel(labels, termsHref, privacyHref)
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
export {
|
|
248
|
+
LEGAL_SKELETON,
|
|
249
|
+
LegalAcceptCheckbox,
|
|
250
|
+
LegalKitSection,
|
|
251
|
+
LegalPage
|
|
252
|
+
};
|
|
253
|
+
//# sourceMappingURL=legal-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/legal-page.tsx"],"sourcesContent":["import { Fragment, isValidElement, useContext, useMemo } from \"react\";\nimport type { ReactNode, Ref } from \"react\";\nimport { ArrowLeft } from \"lucide-react\";\n\nimport { UiKitProvider, useKitLocale } from \"../i18n/kit-labels\";\nimport type { LabelOverride, UiKitLabelOverrides } from \"../i18n/kit-labels\";\nimport { useNoIndex } from \"../hooks/use-noindex\";\nimport { cn } from \"../lib/cn\";\nimport { Checkbox } from \"./checkbox\";\nimport type { CheckboxProps } from \"./checkbox\";\nimport {\n LEGAL_HREFS,\n LegalFooter,\n LegalLayout,\n LegalPageContext,\n LegalSection,\n LegalSlotContext,\n LegalText,\n legalOperatorText,\n useLegalLabels,\n warnLegalOnce,\n} from \"./legal\";\nimport type {\n LegalFramedSectionLabels,\n LegalLabels,\n LegalOperator,\n LegalOperatorSectionLabels,\n LegalOperatorText,\n LegalPageContextValue,\n LegalPageKey,\n LegalRefTarget,\n LegalSectionProps,\n LegalTextSectionLabels,\n} from \"./legal\";\nimport { TextLink } from \"./text-link\";\n\n/**\n * The legal pages' frame and the kit's own sections — docs/legal-harmonization.md §3\n * and §4, the 0.28 round. The labels, the column, `LegalSection`, the links and the\n * footer are in `./legal`.\n */\n\n// ── The skeleton (§4.2) ───────────────────────────────────────────────────────\n\n/** Who writes a section: the kit's wording, the app's own, or the kit's wording with an\n * app paragraph in a fixed slot. */\nexport type LegalSectionOwner = \"kit\" | \"app\" | \"kit+app\";\n\nexport interface LegalSkeletonEntry {\n /** The section key — its `id` and its catalogue key. `\"*\"` is the slot where the\n * app's own sections go (zero or more: keksdose's `credits`, `price_pool`, …). */\n key: string;\n owner: LegalSectionOwner;\n}\n\nexport interface LegalSkeletonPage {\n /** Whether the page numbers its sections (\"3. Legal basis\"). The imprint does not. */\n numbered: boolean;\n /** The sections in their order. */\n sections: readonly LegalSkeletonEntry[];\n}\n\n/**\n * The section order every app's legal pages follow (§4.2), as data — so an app's test\n * can assert that its pages do, and so the order lives in one place, not in three apps'\n * reading of a table. `LegalPage` reads `numbered` from it.\n *\n * An app's test, given the section ids its page rendered in order:\n *\n * const fixed = LEGAL_SKELETON.privacy.sections.map((s) => s.key).filter((k) => k !== \"*\");\n * expect(ids.filter((id) => fixed.includes(id))).toEqual(fixed);\n *\n * Every fixed key is there, in the skeleton's order; the ids that are not in it are the\n * app's own sections, which belong where `\"*\"` stands.\n */\nexport const LEGAL_SKELETON: Readonly<Record<LegalPageKey, LegalSkeletonPage>> = Object.freeze({\n impressum: Object.freeze({\n numbered: false,\n sections: Object.freeze([\n { key: \"operator\", owner: \"kit\" },\n { key: \"contact\", owner: \"kit\" },\n { key: \"disclaimer\", owner: \"kit\" },\n { key: \"*\", owner: \"app\" },\n ] as const),\n }),\n privacy: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"controller\", owner: \"kit\" },\n { key: \"data\", owner: \"app\" },\n { key: \"legal_basis\", owner: \"kit+app\" },\n { key: \"third_parties\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"browser\", owner: \"kit+app\" },\n { key: \"transfers\", owner: \"app\" },\n { key: \"retention\", owner: \"app\" },\n { key: \"rights\", owner: \"kit+app\" },\n { key: \"contact\", owner: \"kit\" },\n ] as const),\n }),\n terms: Object.freeze({\n numbered: true,\n sections: Object.freeze([\n { key: \"scope\", owner: \"app\" },\n { key: \"no_advice\", owner: \"app\" },\n { key: \"*\", owner: \"app\" },\n { key: \"warranty\", owner: \"kit\" },\n { key: \"liability\", owner: \"kit\" },\n { key: \"changes\", owner: \"kit\" },\n { key: \"law\", owner: \"kit\" },\n ] as const),\n }),\n});\n\n/** The sections the kit writes (§4.3), on whichever page they sit. `contact` is on two\n * pages, with two texts; the page decides which. */\nexport type LegalKitSectionKey =\n | \"operator\"\n | \"contact\"\n | \"disclaimer\"\n | \"controller\"\n | \"legal_basis\"\n | \"browser\"\n | \"rights\"\n | \"warranty\"\n | \"liability\"\n | \"changes\"\n | \"law\";\n\n/** The kit's sections of one page, in the skeleton's order. */\nfunction kitSectionsOf(page: LegalPageKey): string[] {\n return LEGAL_SKELETON[page].sections.filter((s) => s.owner !== \"app\").map((s) => s.key);\n}\n\nconst PAGES: readonly LegalPageKey[] = [\"impressum\", \"privacy\", \"terms\"];\n\n// ── Kit sections ──────────────────────────────────────────────────────────────\n\ninterface LegalKitSectionBase {\n /** Default: the enclosing {@link LegalPage}'s page — needed outside one, and for\n * `contact` only (it is on two pages). */\n page?: LegalPageKey;\n /** Default: the enclosing {@link LegalPage}'s operator — needed outside one, by the\n * sections that name it (operator, both contacts, controller, law). */\n operator?: LegalOperator;\n /** Default: one level below the page's title (`h2` under an `h1`). */\n headingAs?: \"h2\" | \"h3\";\n labels?: LabelOverride<LegalLabels>;\n}\n\n/**\n * One of the kit's sections, by key. `children` is the app's paragraph where §4.2 says\n * \"kit + app\" — and only there, which the type holds an app to: the other sections'\n * wording is identical in every app, and an app that needs to say more says it in a\n * section of its own. `browser` takes the app's list of what it keeps, as `entries`.\n */\nexport type LegalKitSectionProps = LegalKitSectionBase &\n (\n | {\n section: \"browser\";\n /** What this app keeps in the browser, one entry per item — rendered as a `<ul>`\n * between the kit's two sentences. The app's words, in every language it serves. */\n entries: readonly string[];\n /** After the kit's text: what sign-out removes beyond the tokens, what stays. */\n children?: ReactNode;\n }\n | {\n section: \"legal_basis\" | \"rights\";\n entries?: never;\n /** `legal_basis`: after the kit's paragraph (consent, where an app relies on\n * it). `rights`: between the list of rights and the supervisory authorities\n * (how to export, how to delete). A plain string keeps its line breaks and has\n * its `{ref:key}` tokens resolved. */\n children?: ReactNode;\n }\n | {\n section: Exclude<LegalKitSectionKey, \"browser\" | \"legal_basis\" | \"rights\">;\n entries?: never;\n children?: never;\n }\n );\n\n/** The app's paragraph: a plain string as running text (line breaks kept, refs\n * resolved), anything else as it is. */\nfunction appPart(children: ReactNode): ReactNode {\n if (children === undefined || children === null || children === false) return null;\n if (typeof children === \"string\") return <LegalText key=\"app\" text={children} />;\n return <Fragment key=\"app\">{children}</Fragment>;\n}\n\n/**\n * One of the kit's sections (§4.3) — `<LegalKitSection section=\"warranty\" />` — with its\n * heading, its `id` (the key: `/terms#warranty`) and, on a numbered page, its number.\n *\n * The words are the kit's, in the `legal` labels, filled in with the operator; an app\n * adds only what §4.2 gives it a slot for. Inside a {@link LegalPage} the page and the\n * operator come from it, so a page reads as its section list:\n *\n * <LegalPage page=\"privacy\" operator={OPERATOR}>\n * <LegalKitSection section=\"controller\" />\n * <LegalSection key=\"data\" heading={t(\"legal.privacy.data.title\")} body={…} />\n * <LegalKitSection section=\"legal_basis\">{t(\"legal.privacy.legal_basis.app\")}</LegalKitSection>\n * …\n * </LegalPage>\n *\n * A key that is not one of the page's kit sections throws, naming the ones that are: it\n * is a typo in code, not a state a user can reach.\n */\nexport function LegalKitSection(props: LegalKitSectionProps) {\n const { section, headingAs, labels: labelsProp } = props;\n const context = useContext(LegalPageContext);\n const labels = useLegalLabels(labelsProp);\n const kitLocale = useKitLocale();\n\n const page = props.page ?? context?.page ?? onlyPageOf(section);\n const kitSections = kitSectionsOf(page);\n if (!kitSections.includes(section)) {\n throw new Error(\n `LegalKitSection: \"${section}\" is not one of the kit's sections of the ${page} page (${kitSections.join(\", \")}).`,\n );\n }\n const entry = (labels.sections[page] as Record<string, SectionLabels>)[section];\n const operator = props.operator ? legalOperatorText(props.operator, kitLocale) : context?.operator;\n const fill = (body: string | ((o: LegalOperatorText) => string)): string => {\n if (typeof body === \"string\") return body;\n if (!operator) {\n throw new Error(\n `LegalKitSection \"${section}\" names the operator: render it inside <LegalPage operator={…}>, or pass operator.`,\n );\n }\n return body(operator);\n };\n\n const app = appPart(props.children);\n let parts: ReactNode[];\n if (\"lead\" in entry) {\n const lead = <LegalText key=\"lead\" text={entry.lead} />;\n const tail = <LegalText key=\"tail\" text={entry.tail} />;\n if (props.section === \"browser\") {\n const list =\n props.entries.length > 0 ? (\n <ul key=\"entries\" className=\"list-disc space-y-1 ps-5\">\n {props.entries.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n ) : null;\n parts = [lead, list, tail, app];\n } else {\n // `rights`: the app's paragraph sits between the rights and the authorities.\n parts = [lead, app, tail];\n }\n } else {\n parts = [<LegalText key=\"body\" text={fill(entry.body)} />, app];\n }\n\n return (\n <LegalSection id={section} heading={entry.title} headingAs={headingAs}>\n <div className=\"space-y-[1lh]\">{parts}</div>\n </LegalSection>\n );\n}\n\ntype SectionLabels = LegalTextSectionLabels | LegalOperatorSectionLabels | LegalFramedSectionLabels;\n\n/** The one page a kit section key is on; `contact` is on two, so it needs the page. */\nfunction onlyPageOf(section: string): LegalPageKey {\n const pages = PAGES.filter((p) => kitSectionsOf(p).includes(section));\n if (pages.length === 1) return pages[0];\n throw new Error(\n pages.length === 0\n ? `LegalKitSection: \"${section}\" is not one of the kit's sections.`\n : `LegalKitSection: \"${section}\" is on more than one page (${pages.join(\", \")}) — render it inside a LegalPage, or pass page.`,\n );\n}\n\n// ── The page ──────────────────────────────────────────────────────────────────\n\nexport interface LegalPageProps {\n /** Which page: the title, the default notice, whether the sections are numbered. */\n page: LegalPageKey;\n /** Who runs the app — the values the kit's sections name. The same in every app's\n * three pages; the kit holds none (§5). */\n operator: LegalOperator;\n /**\n * The sections, in reading order: {@link LegalKitSection}s and {@link LegalSection}s.\n *\n * They must be DIRECT children — or inside fragments, or in an array\n * (`SECTIONS.map(…)`). The page reads them before they render, to know every\n * section's number in advance: that is what lets a `{ref:key}` point forward\n * (keksdose's section 2 refers to section 10). A section wrapped in a component of the\n * app's own is invisible to that walk and renders unnumbered, with no key.\n */\n children: ReactNode;\n /** The app's public header — the one a signed-out visitor already sees (keksdose's\n * `LandingHeader`, Kurvenschmiede's `AppTopBar` without the shell). */\n header?: ReactNode;\n /** Default: `<LegalFooter />` with this page marked. `null` for none. */\n footer?: ReactNode;\n /** The back link's target. Default `/`, which takes a signed-in user into the app and\n * a signed-out one to the landing or sign-in page. */\n homeHref?: string;\n /** Default: the kit's beta notice on the imprint and the terms, its privacy notice on\n * the privacy policy (§3.2). `null` for none. */\n notice?: ReactNode;\n /** The language the operator's country is named in. Default: the `<UiKitProvider\n * locale>`, else English. */\n locale?: string;\n /** The title's element. Default `h1`; `h2` for a page shown inside another (a\n * preview), whose sections then take `h3`. */\n headingAs?: \"h1\" | \"h2\";\n /** `false` draws the column as a `<div>` instead of `<main>` — for a page embedded in\n * one that has its own `<main>`. Default true. */\n landmark?: boolean;\n /** Default true: {@link useNoIndex}. `false` only where the page is not the page — a\n * preview inside another page. */\n noIndex?: boolean;\n /** On the outermost element (a full-height column). */\n className?: string;\n /** The `legal` labels for this page and everything in it — sections, footer,\n * checkbox — on top of the provider's. */\n labels?: LabelOverride<LegalLabels>;\n}\n\ninterface FlatNode {\n node: ReactNode;\n /** A stable React key from the node's place in the tree the app wrote. */\n path: string;\n}\n\n/** The children as a flat list, arrays and fragments opened — the sections the page can\n * see, in render order. */\nfunction flatten(node: ReactNode, path: string, out: FlatNode[]): void {\n if (node === null || node === undefined || typeof node === \"boolean\") return;\n if (isValidElement(node)) {\n if (node.type === Fragment) {\n flatten((node.props as { children?: ReactNode }).children, path, out);\n } else {\n out.push({ node, path: path || \"/\" });\n }\n return;\n }\n if (typeof node === \"object\" && Symbol.iterator in node) {\n Array.from(node as Iterable<ReactNode>).forEach((child, i) => {\n const step = isValidElement(child) && child.key !== null ? `$${child.key}` : `#${i}`;\n flatten(child, `${path}/${step}`, out);\n });\n return;\n }\n out.push({ node, path: path || \"/\" });\n}\n\n/** A section the walk found: its key (`undefined` when it has none) and heading. */\nfunction sectionOf(\n node: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { key: string | undefined; heading: ReactNode } | null {\n if (!isValidElement(node)) return null;\n if (node.type === LegalKitSection) {\n const { section } = node.props as LegalKitSectionProps;\n const entry = (labels.sections[page] as Record<string, SectionLabels | undefined>)[section];\n return { key: section, heading: entry?.title ?? section };\n }\n if (node.type === LegalSection) {\n const props = node.props as LegalSectionProps;\n return { key: props.id ?? node.key ?? undefined, heading: props.heading };\n }\n return null;\n}\n\n/**\n * The page's sections, each in a slot that tells it its key and number, and the map a\n * `{ref:key}` is resolved from — built from the children BEFORE they render.\n */\nfunction slotSections(\n children: ReactNode,\n page: LegalPageKey,\n labels: LegalLabels,\n): { nodes: ReactNode[]; targets: Map<string, LegalRefTarget> } {\n const flat: FlatNode[] = [];\n flatten(children, \"\", flat);\n const numbered = LEGAL_SKELETON[page].numbered;\n const targets = new Map<string, LegalRefTarget>();\n let count = 0;\n const nodes = flat.map(({ node, path }) => {\n const section = sectionOf(node, page, labels);\n if (!section) return <Fragment key={path}>{node}</Fragment>;\n count += 1;\n const number = numbered ? count : undefined;\n if (section.key !== undefined) {\n if (targets.has(section.key)) {\n warnLegalOnce(`two sections of the ${page} page share the key \"${section.key}\"; {ref:${section.key}} names the first.`);\n } else {\n targets.set(section.key, { number, heading: section.heading });\n }\n }\n return (\n <LegalSlotContext.Provider key={path} value={{ id: section.key, number }}>\n {node}\n </LegalSlotContext.Provider>\n );\n });\n return { nodes, targets };\n}\n\n/**\n * A legal page — Imprint, Privacy Policy or Terms — in the frame every app uses (§3.2):\n * the app's public header, the kit's column (back link, title, notice, sections) and the\n * public footer. keksdose's `features/legal/legal-layout.tsx`, the reference: its\n * `LegalPage` drew exactly this around the kit's `LegalLayout`, and kastlan and\n * Kurvenschmiede each drew a different frame (an auth card, the signed-in app shell).\n * Signed-in users see the same frame: the pages are public and outside the app shell.\n *\n * What it adds to the column:\n * - the title, from `legal.titles`, and \"← Back to home\" pointing at `homeHref`;\n * - the default notice per page — the beta notice, or the privacy notice on the privacy\n * policy, whose technical sections describe running code (§3.2, §7.3);\n * - numbers: the privacy and terms sections are \"N. Title\" in render order, the\n * imprint's are not (§4.1). The titles in the catalogues carry no number, so a\n * section added in the middle renumbers the rest instead of leaving them wrong;\n * - ids: every section's `id` is its key (`/privacy#rights`), which keeps\n * Kurvenschmiede's deep links working;\n * - `{ref:key}` in a section's text becomes that section's number, linked — forward\n * references included, since the page knows the order before any section renders\n * (see `children` for what that asks of the tree);\n * - `useNoIndex()`.\n */\nexport function LegalPage({\n page,\n operator,\n children,\n header,\n footer,\n homeHref = \"/\",\n notice,\n locale: localeProp,\n headingAs = \"h1\",\n landmark = true,\n noIndex = true,\n className,\n labels: labelsProp,\n}: LegalPageProps) {\n useNoIndex(noIndex);\n const labels = useLegalLabels(labelsProp);\n const locale = useKitLocale(localeProp) ?? \"en\";\n // Not memoised: `countryName` keeps one `Intl.DisplayNames` per locale, so naming the\n // country again is a lookup, and the context is rebuilt with the children anyway.\n const operatorText = legalOperatorText(operator, locale);\n const overrides = useMemo<UiKitLabelOverrides | undefined>(\n () => (labelsProp ? { legal: labelsProp } : undefined),\n [labelsProp],\n );\n\n const { nodes, targets } = slotSections(children, page, labels);\n const context: LegalPageContextValue = {\n page,\n operator: operatorText,\n sectionHeading: headingAs === \"h1\" ? \"h2\" : \"h3\",\n targets,\n };\n const Main = landmark ? \"main\" : \"div\";\n const shownNotice =\n notice !== undefined ? notice : page === \"privacy\" ? labels.notice.privacy : labels.notice.beta;\n\n return (\n <UiKitProvider labels={overrides}>\n <div className={cn(\"flex min-h-full flex-col\", className)}>\n {header}\n <Main className=\"flex-1\">\n <LegalPageContext.Provider value={context}>\n <LegalLayout\n back={\n <TextLink href={homeHref} icon={ArrowLeft}>\n {labels.backHome}\n </TextLink>\n }\n title={labels.titles[page]}\n notice={shownNotice}\n headingAs={headingAs}\n >\n {nodes}\n </LegalLayout>\n </LegalPageContext.Provider>\n </Main>\n {footer === undefined ? <LegalFooter currentHref={LEGAL_HREFS[page]} /> : footer}\n </div>\n </UiKitProvider>\n );\n}\n\n// ── Terms acceptance (§3.4) ───────────────────────────────────────────────────\n\nexport interface LegalAcceptCheckboxProps\n extends Omit<CheckboxProps, \"label\" | \"checked\" | \"onCheckedChange\" | \"required\"> {\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n /** Default `/terms`. */\n termsHref?: string;\n /** Default `/privacy`. */\n privacyHref?: string;\n labels?: LabelOverride<LegalLabels>;\n ref?: Ref<HTMLInputElement>;\n}\n\n/** `legal.accept` with its `{terms}` and `{privacy}` as links named by the page titles.\n * Split, not interpolated: the text between the placeholders is the template's own,\n * to the character — nothing is added around a link. */\nfunction acceptLabel(labels: LegalLabels, termsHref: string, privacyHref: string): ReactNode[] {\n const template = labels.accept;\n for (const placeholder of [\"{terms}\", \"{privacy}\"]) {\n if (!template.includes(placeholder)) warnLegalOnce(`legal.accept has no ${placeholder}: \"${template}\".`);\n }\n return template\n .split(/(\\{terms\\}|\\{privacy\\})/)\n .filter((part) => part !== \"\")\n .map((part, i) =>\n part === \"{terms}\" ? (\n <TextLink key={i} href={termsHref} tone=\"primary\">\n {labels.titles.terms}\n </TextLink>\n ) : part === \"{privacy}\" ? (\n <TextLink key={i} href={privacyHref} tone=\"primary\">\n {labels.titles.privacy}\n </TextLink>\n ) : (\n part\n ),\n );\n}\n\n/**\n * The register page's \"I accept the [Terms of Service] and the [Privacy Policy]\" (§3.4):\n * keksdose's checkbox (features/auth/register-page.tsx), for every app.\n *\n * A REQUIRED kit `Checkbox` — not a Switch: a form answer that waits for the submit\n * button. The app keeps its submit disabled while it is unticked, so there is never a\n * failed attempt and no `error` to show. Nothing is sent to the backend: no stored\n * version, no re-acceptance (Marcel, §2.4).\n *\n * The label is ONE template, `legal.accept`, so a language puts the links where its\n * grammar needs them, articles included — fr \"J’accepte les {terms} et la {privacy}\",\n * it \"Accetto le {terms} e l’{privacy}\" with no space after the elided article. The link\n * texts are the page titles (`legal.titles`), as on the pages themselves.\n */\nexport function LegalAcceptCheckbox({\n checked,\n onCheckedChange,\n termsHref = LEGAL_HREFS.terms,\n privacyHref = LEGAL_HREFS.privacy,\n labels: labelsProp,\n ref,\n ...rest\n}: LegalAcceptCheckboxProps) {\n const labels = useLegalLabels(labelsProp);\n return (\n <Checkbox\n {...rest}\n ref={ref}\n checked={checked}\n onCheckedChange={onCheckedChange}\n required\n label={acceptLabel(labels, termsHref, privacyHref)}\n />\n );\n}\n"],"mappings":";AA0L2C,cAyRrC,YAzRqC;AA1L3C,SAAS,UAAU,gBAAgB,YAAY,eAAe;AAE9D,SAAS,iBAAiB;AAE1B,SAAS,eAAe,oBAAoB;AAE5C,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,EACA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":[]}
|
|
@@ -1,84 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
children: ReactNode;
|
|
72
|
-
/** The three pages, linked at the end of the column with the current one marked.
|
|
73
|
-
* Leave out when the page's chrome already shows them (kastlan's AuthLayout footer). */
|
|
74
|
-
links?: readonly LegalLink[];
|
|
75
|
-
currentHref?: string;
|
|
76
|
-
/** Default `h1`: the page's heading. */
|
|
77
|
-
headingAs?: "h1" | "h2";
|
|
78
|
-
/** Extra classes on the column — `px-0 py-0` inside a chrome that pads already. */
|
|
79
|
-
className?: string;
|
|
80
|
-
labels?: Partial<LegalLabels>;
|
|
81
|
-
}
|
|
82
|
-
declare function LegalLayout({ title, back, notice, children, links, currentHref, headingAs: Heading, className, labels, }: LegalLayoutProps): react.JSX.Element;
|
|
83
|
-
|
|
84
|
-
export { DEFAULT_LEGAL_LABELS, type LegalLabels, LegalLayout, type LegalLayoutProps, type LegalLink, LegalLinks, type LegalLinksProps, LegalSection, type LegalSectionProps };
|
|
1
|
+
import 'react';
|
|
2
|
+
export { cm as DEFAULT_LEGAL_LABELS, eG as LEGAL_HREFS, dq as LegalFooter, dr as LegalFooterProps, ds as LegalFramedSectionLabels, dt as LegalLabels, du as LegalLayout, dv as LegalLayoutProps, dw as LegalLink, dx as LegalLinks, dy as LegalLinksProps, dz as LegalOperator, dA as LegalOperatorSectionLabels, dB as LegalOperatorText, eH as LegalPageContext, eI as LegalPageContextValue, dC as LegalPageKey, eJ as LegalRefTarget, dD as LegalSection, dE as LegalSectionProps, eK as LegalSectionSlot, eL as LegalSlotContext, eM as LegalText, dF as LegalTextSectionLabels, eN as legalOperatorText, eO as resolveLegalRefs, eP as useLegalLabels, eQ as warnLegalOnce } from '../kit-labels-SBN0biPl.js';
|
|
3
|
+
import '../data-table-labels-DUELeXpa.js';
|
|
4
|
+
import './data-table-sort.js';
|
|
5
|
+
import './swipeable-row.js';
|
|
6
|
+
import './mini-calendar.js';
|
|
7
|
+
import './calendar-heatmap.js';
|
|
8
|
+
import './popover.js';
|
|
9
|
+
import './chip.js';
|
|
10
|
+
import 'lucide-react';
|
|
11
|
+
import './field-sync.js';
|
|
12
|
+
import './tooltip.js';
|
|
13
|
+
import '../hooks/use-anchored-rect.js';
|
|
14
|
+
import '../lib/clipping.js';
|
|
15
|
+
import '../wizard/types.js';
|
|
16
|
+
import '../tour/tour.js';
|
|
17
|
+
import '../search/command-palette.js';
|
|
18
|
+
import '../search/global-search.js';
|
|
19
|
+
import '../search/search-index.js';
|
|
20
|
+
import './month-picker.js';
|
|
21
|
+
import './page-contents.js';
|
|
22
|
+
import './series-chart-labels.js';
|
|
23
|
+
import './pie-chart-labels.js';
|
|
24
|
+
import './sparkline.js';
|
|
25
|
+
import './stat-tile.js';
|
|
26
|
+
import './signature-pad.js';
|
|
27
|
+
import './password-strength.js';
|
|
28
|
+
import './swatch-picker.js';
|
|
29
|
+
import './tile-radio.js';
|
|
30
|
+
import './icon-picker.js';
|
|
31
|
+
import './dialog-frame.js';
|
|
32
|
+
import './modal.js';
|
|
33
|
+
import '../hooks/use-search-param-state.js';
|
|
34
|
+
import './measured-grid.js';
|
|
35
|
+
import './user-avatar.js';
|
|
36
|
+
import './status-dot.js';
|
|
37
|
+
import './progress-bar.js';
|
|
38
|
+
import './signed-amount.js';
|
|
39
|
+
import '../shell/topbar-action-menu.js';
|
|
40
|
+
import './menu-item.js';
|
|
41
|
+
import './floating-panel.js';
|
|
42
|
+
import '../hooks/use-authed-src.js';
|
|
43
|
+
import './account-settings-labels.js';
|
|
44
|
+
import './bulk-action-bar.js';
|
|
45
|
+
import './list.js';
|
|
46
|
+
import './breadcrumbs.js';
|
|
47
|
+
import './toast.js';
|
|
48
|
+
import './description-list.js';
|
|
49
|
+
import './line-items.js';
|
|
50
|
+
import './error-boundary.js';
|
|
51
|
+
import './authed-image.js';
|
|
52
|
+
import './image-grid.js';
|
|
53
|
+
import './lightbox.js';
|
|
54
|
+
import './write-lock.js';
|
|
55
|
+
import './account-chips.js';
|
|
56
|
+
import '../lib/format.js';
|
|
57
|
+
import './reauth-dialog.js';
|
|
58
|
+
import './server-wake.js';
|
|
59
|
+
import '../lib/server-wake.js';
|
|
60
|
+
import './translation-review-labels.js';
|
|
61
|
+
import '../lib/translation-review.js';
|
|
62
|
+
import './country-select.js';
|
|
63
|
+
import './inline-edit-field.js';
|
|
64
|
+
import '../lib/iban.js';
|
|
65
|
+
import '../lib/phone.js';
|
|
66
|
+
import './sign-chip.js';
|
|
67
|
+
import './column-mapper.js';
|
|
68
|
+
import '../lib/column-mapping.js';
|
|
69
|
+
import '../lib/table-text.js';
|
|
70
|
+
import './field-parts.js';
|