@eifi1/ui-kit 0.41.0 → 0.42.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 +19 -6
- package/dist/admin/admin-area-labels.d.ts +55 -0
- package/dist/admin/admin-area-labels.js +33 -0
- package/dist/admin/admin-area-labels.js.map +1 -0
- package/dist/admin/admin-forbidden.d.ts +35 -0
- package/dist/admin/admin-forbidden.js +36 -0
- package/dist/admin/admin-forbidden.js.map +1 -0
- package/dist/admin/admin-overview.d.ts +93 -0
- package/dist/admin/admin-overview.js +69 -0
- package/dist/admin/admin-overview.js.map +1 -0
- package/dist/admin/admin-sections.d.ts +63 -0
- package/dist/admin/admin-sections.js +64 -0
- package/dist/admin/admin-sections.js.map +1 -0
- package/dist/admin/admin-tool-links.d.ts +48 -0
- package/dist/admin/admin-tool-links.js +31 -0
- package/dist/admin/admin-tool-links.js.map +1 -0
- package/dist/billing/billing-banner.d.ts +25 -2
- package/dist/billing/billing-banner.js +5 -2
- package/dist/billing/billing-banner.js.map +1 -1
- package/dist/billing/billing-labels.d.ts +32 -0
- package/dist/billing/billing-labels.js +9 -0
- package/dist/billing/billing-labels.js.map +1 -1
- package/dist/billing/billing-overview.d.ts +33 -0
- package/dist/billing/billing-overview.js +6 -0
- package/dist/billing/billing-overview.js.map +1 -1
- package/dist/billing/billing-standing.d.ts +8 -0
- package/dist/billing/billing-standing.js.map +1 -1
- package/dist/billing/cancel-subscription.d.ts +46 -0
- package/dist/billing/cancel-subscription.js +57 -0
- package/dist/billing/cancel-subscription.js.map +1 -0
- package/dist/billing/plan-card.d.ts +45 -1
- package/dist/billing/plan-card.js +53 -2
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-switch.d.ts +10 -1
- package/dist/billing/plan-switch.js +22 -13
- package/dist/billing/plan-switch.js.map +1 -1
- package/dist/billing/subscription-actions.d.ts +37 -4
- package/dist/billing/subscription-actions.js +10 -3
- package/dist/billing/subscription-actions.js.map +1 -1
- package/dist/components/account-chips.d.ts +42 -1
- package/dist/components/account-chips.js +33 -0
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/empty-state.d.ts +2 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/i18n/defaults.js +5 -1
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +79 -0
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +9 -0
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +93 -1
- package/dist/i18n/locales/en.js.map +3 -3
- package/dist/i18n/locales/es.js +76 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +75 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +76 -0
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +76 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +75 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +20 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/settings/settings-layout.d.ts +7 -1
- package/dist/settings/settings-layout.js +35 -27
- package/dist/settings/settings-layout.js.map +1 -1
- package/dist/shell/account-menu-language.d.ts +46 -0
- package/dist/shell/account-menu-language.js +64 -0
- package/dist/shell/account-menu-language.js.map +1 -0
- package/dist/shell/admin-menu.d.ts +46 -0
- package/dist/shell/admin-menu.js +60 -0
- package/dist/shell/admin-menu.js.map +1 -0
- package/dist/shell/app-shell.d.ts +10 -0
- package/dist/shell/app-shell.js +22 -4
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/dev-switchers.d.ts +53 -0
- package/dist/shell/dev-switchers.js +102 -0
- package/dist/shell/dev-switchers.js.map +1 -0
- package/dist/shell/sync-status-indicator.d.ts +86 -0
- package/dist/shell/sync-status-indicator.js +170 -0
- package/dist/shell/sync-status-indicator.js.map +1 -0
- package/dist/shell/top-bar-actions.d.ts +49 -0
- package/dist/shell/top-bar-actions.js +31 -0
- package/dist/shell/top-bar-actions.js.map +1 -0
- package/dist/shell/top-bar-parts-labels.d.ts +84 -0
- package/dist/shell/top-bar-parts-labels.js +48 -0
- package/dist/shell/top-bar-parts-labels.js.map +1 -0
- package/dist/shell/topbar-action-menu.d.ts +13 -1
- package/dist/shell/topbar-action-menu.js +5 -2
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.d.ts +16 -3
- package/dist/shell/topbar-controls.js +5 -1
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/shell/tour-menu.d.ts +58 -0
- package/dist/shell/tour-menu.js +73 -0
- package/dist/shell/tour-menu.js.map +1 -0
- package/dist/shell.d.ts +14 -0
- package/dist/shell.js +19 -0
- package/dist/shell.js.map +1 -1
- package/package.json +1 -1
- package/src/admin/admin-area-labels.ts +85 -0
- package/src/admin/admin-forbidden.tsx +75 -0
- package/src/admin/admin-overview.tsx +166 -0
- package/src/admin/admin-sections.tsx +137 -0
- package/src/admin/admin-tool-links.tsx +84 -0
- package/src/billing/billing-banner.tsx +32 -4
- package/src/billing/billing-labels.ts +53 -0
- package/src/billing/billing-overview.ts +37 -0
- package/src/billing/billing-standing.ts +8 -0
- package/src/billing/cancel-subscription.tsx +102 -0
- package/src/billing/plan-card.tsx +97 -1
- package/src/billing/plan-switch.tsx +16 -0
- package/src/billing/subscription-actions.tsx +64 -15
- package/src/components/account-chips.tsx +81 -1
- package/src/components/empty-state.tsx +2 -1
- package/src/i18n/defaults.ts +4 -0
- package/src/i18n/german.ts +92 -0
- package/src/i18n/kit-labels.tsx +9 -0
- package/src/i18n/locales/en.ts +19 -0
- package/src/i18n/locales/es.ts +86 -0
- package/src/i18n/locales/fr.ts +86 -0
- package/src/i18n/locales/hu.ts +84 -0
- package/src/i18n/locales/it.ts +87 -0
- package/src/i18n/locales/zh.ts +79 -0
- package/src/i18n/review.ts +19 -0
- package/src/index.ts +30 -2
- package/src/settings/settings-layout.tsx +58 -34
- package/src/shell/account-menu-language.tsx +116 -0
- package/src/shell/admin-menu.tsx +117 -0
- package/src/shell/app-shell.tsx +44 -3
- package/src/shell/dev-switchers.tsx +171 -0
- package/src/shell/sync-status-indicator.tsx +301 -0
- package/src/shell/top-bar-actions.tsx +79 -0
- package/src/shell/top-bar-parts-labels.ts +133 -0
- package/src/shell/topbar-action-menu.tsx +15 -2
- package/src/shell/topbar-controls.tsx +20 -3
- package/src/shell/tour-menu.tsx +144 -0
- package/src/shell.ts +24 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/billing/subscription-actions.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"../components/button\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\nimport type { PortalTarget } from \"./billing-overview\";\n\nexport interface SubscriptionActionsProps extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n /** \"Payment and invoices\", as a link — or {@link onManage}. Without either, none. */\n manageHref?: string;\n /** \"Payment and invoices\", as the app's call: `POST /billing/portal` with\n * `{target: \"overview\"}`, then off to its `url` (§4, §14.5). The kit sends no\n * request. */\n onManage?: () => void;\n /** \"Cancel subscription\", as a link — or {@link onCancel}. Without either, none. */\n cancelHref?: string;\n /** \"Cancel subscription\", as the app's call: the portal again, with `{target:\n * \"cancel\"}` — its cancel link, where the provider's cancel and withdrawal functions\n * are (§12.26, §14.5). Not the overview. */\n onCancel?: () => void;\n /**\n * Both, as one call that says where to ({@link PortalTarget}, the body of\n * `POST /billing/portal`): `\"overview\"` for \"Payment and invoices\",\n * `\"cancel\"` for \"Cancel subscription\" — so the target can't be mixed up (kastlan's\n * cancel opened the overview). {@link onManage} and {@link onCancel} win over it.\n */\n onPortal?: (target: PortalTarget) => void;\n /**\n * The overview's `at_provider` (§14.5): whether the payer has reached the provider.\n * `false`: no customer there yet, so nothing to open — a caption (`notAtProvider`)\n * stands in place of both actions. `true`: both show, WHATEVER the status or source —\n * a payer who bought under a grant keeps the way to the invoices and to \"Cancel\"\n * (§12.26). Default true (0.32's behaviour).\n */\n atProvider?: boolean;\n /**
|
|
1
|
+
{"version":3,"sources":["../../src/billing/subscription-actions.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"../components/button\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\nimport type { BillingPortalAccess, PortalTarget } from \"./billing-overview\";\n\nexport interface SubscriptionActionsProps extends Omit<ComponentPropsWithRef<\"div\">, \"children\"> {\n /** \"Payment and invoices\", as a link — or {@link onManage}. Without either, none. */\n manageHref?: string;\n /** \"Payment and invoices\", as the app's call: `POST /billing/portal` with\n * `{target: \"overview\"}`, then off to its `url` (§4, §14.5). The kit sends no\n * request. */\n onManage?: () => void;\n /** \"Cancel subscription\", as a link — or {@link onCancel}. Without either, none. */\n cancelHref?: string;\n /** \"Cancel subscription\", as the app's call: the portal again, with `{target:\n * \"cancel\"}` — its cancel link, where the provider's cancel and withdrawal functions\n * are (§12.26, §14.5). Not the overview. */\n onCancel?: () => void;\n /**\n * Both, as one call that says where to ({@link PortalTarget}, the body of\n * `POST /billing/portal`): `\"overview\"` for \"Payment and invoices\",\n * `\"cancel\"` for \"Cancel subscription\" — so the target can't be mixed up (kastlan's\n * cancel opened the overview). {@link onManage} and {@link onCancel} win over it.\n */\n onPortal?: (target: PortalTarget) => void;\n /**\n * The overview's `at_provider` (§14.5): whether the payer has reached the provider.\n * `false`: no customer there yet, so nothing to open — a caption (`notAtProvider`)\n * stands in place of both actions. `true`: both show, WHATEVER the status or source —\n * a payer who bought under a grant keeps the way to the invoices and to \"Cancel\"\n * (§12.26). Default true (0.32's behaviour).\n */\n atProvider?: boolean;\n /**\n * 0.42 (§16.2, server-kit 0.14): the overview's `portal`. `\"buyer_only\"` — the row has\n * a buyer and the viewer isn't them, so the portal would answer `403\n * billing_portal_buyer_only`: \"Payment and invoices\" becomes a caption naming the buyer\n * (`buyerHolds`, no button), and \"Cancel subscription\" calls {@link onCancelInApp}\n * (no portal at all — `cancelHref`, `onCancel` and `onPortal` are not used). `\"open\"`\n * (default): as before.\n */\n portal?: BillingPortalAccess;\n /** 0.42: the overview's `buyer_name`, for the caption under `\"buyer_only\"`. Empty: \"…with\n * the admin who bought the subscription\". */\n buyerName?: string | null;\n /**\n * 0.42 (§16.2 decision 2): \"Cancel subscription\" in the app — open\n * `CancelSubscriptionConfirm`, whose Confirm is `POST /billing/cancel`. The cancel under\n * `\"buyer_only\"`. Under `\"open\"` it is the last resort, used only when no portal cancel\n * (`cancelHref`, `onCancel`, `onPortal`) is given — a person-payer app that mounts the\n * route and not the portal's cancel.\n */\n onCancelInApp?: () => void;\n /** 0.42 (§16.7 C): the overview's `cancel_at_period_end` — a cancel is scheduled. With\n * {@link onResume}, \"Keep subscription\" takes the cancel's place. */\n cancelAtPeriodEnd?: boolean;\n /** 0.42 (§16.7 C): \"Keep subscription\", the app's `POST /billing/resume` — shown in\n * the cancel's place while {@link cancelAtPeriodEnd} is true. Without it, the cancel\n * stays as before. */\n onResume?: () => void;\n /** Which one is under way: its spinner, no second press. `\"resume\"` since 0.42. */\n pending?: \"manage\" | \"cancel\" | \"resume\" | null;\n /** Prop > `<UiKitProvider labels={{ billing }}>` > English. */\n labels?: LabelOverride<BillingLabels>;\n}\n\n/**\n * The two ways to the provider's hosted portal on the subscription page\n * (docs/billing-harmonization.md §2.8, §7, §12.26): \"Payment and invoices\" — the payment\n * method and the invoices live there, never in the app — and a VISIBLE \"Cancel\n * subscription\". Consumer law wants the second in plain sight: Germany's cancellation\n * button (§312k BGB) and the EU withdrawal function (Directive (EU) 2023/2673, from\n * 19 June 2026) are in the portal, and the app's page must not hide the way there behind\n * \"manage\".\n *\n * Neither takes the write lock: a read-only payer must be able to pay, leave or cancel\n * (§3.3).\n *\n * Before the payer has reached the provider (`atProvider={false}`, a trial without a\n * card, a beta) there is no portal to open: the part says so in a caption instead of\n * offering two buttons that could only end in `409 billing_not_at_provider`.\n *\n * 0.42 (§16): where the company's buyer is another admin (`portal=\"buyer_only\"`), the\n * portal stays the buyer's — \"Payment and invoices\" is a caption that names them, and\n * \"Cancel subscription\" is the in-app cancel (`onCancelInApp`). While a cancel is\n * scheduled (`cancelAtPeriodEnd`) and `onResume` is given, \"Keep subscription\" stands in\n * the cancel's place, whoever the viewer is.\n */\nexport function SubscriptionActions({\n manageHref,\n onManage,\n cancelHref,\n onCancel,\n onPortal,\n atProvider = true,\n portal = \"open\",\n buyerName,\n onCancelInApp,\n cancelAtPeriodEnd = false,\n onResume,\n pending,\n labels: labelsProp,\n className,\n ...rest\n}: SubscriptionActionsProps) {\n const labels = useBillingLabels(labelsProp);\n if (!atProvider) {\n return (\n <div {...rest} data-at-provider=\"false\" className={cn(\"text-sm text-muted\", className)}>\n <p>{labels.notAtProvider}</p>\n </div>\n );\n }\n const buyerOnly = portal === \"buyer_only\";\n const manageCall = onManage ?? (onPortal ? () => onPortal(\"overview\") : undefined);\n const portalCancel = onCancel ?? (onPortal ? () => onPortal(\"cancel\") : undefined);\n // Under \"buyer_only\" the in-app cancel only; under \"open\" the portal's first, the\n // in-app cancel only where no way to the portal's is given.\n const cancelCall = buyerOnly ? onCancelInApp : (portalCancel ?? (cancelHref === undefined ? onCancelInApp : undefined));\n const manage = buyerOnly ? (\n <p className=\"basis-full text-sm text-muted\" data-buyer-holds=\"\">\n {labels.buyerHolds(buyerName || undefined)}\n </p>\n ) : manageHref !== undefined ? (\n <Button href={manageHref} variant=\"secondary\">\n {labels.manage}\n </Button>\n ) : manageCall !== undefined ? (\n <Button type=\"button\" variant=\"secondary\" onClick={manageCall} pending={pending === \"manage\"}>\n {labels.manage}\n </Button>\n ) : null;\n const cancel =\n cancelAtPeriodEnd && onResume !== undefined ? (\n <Button type=\"button\" variant=\"link\" onClick={onResume} pending={pending === \"resume\"} data-keep-subscription=\"\">\n {labels.keepSubscription}\n </Button>\n ) : cancelHref !== undefined && !buyerOnly ? (\n <Button href={cancelHref} variant=\"link\" tone=\"danger\">\n {labels.cancel}\n </Button>\n ) : cancelCall !== undefined ? (\n <Button type=\"button\" variant=\"link\" tone=\"danger\" onClick={cancelCall} pending={pending === \"cancel\"}>\n {labels.cancel}\n </Button>\n ) : null;\n if (!manage && !cancel) return null;\n return (\n <div {...rest} className={cn(\"flex flex-wrap items-center gap-x-4 gap-y-2\", className)}>\n {manage}\n {cancel}\n </div>\n );\n}\n"],"mappings":";AAiHQ,cAuCJ,YAvCI;AA9GR,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,wBAAwB;AAuF1B,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,SAAS,iBAAiB,UAAU;AAC1C,MAAI,CAAC,YAAY;AACf,WACE,oBAAC,SAAK,GAAG,MAAM,oBAAiB,SAAQ,WAAW,GAAG,sBAAsB,SAAS,GACnF,8BAAC,OAAG,iBAAO,eAAc,GAC3B;AAAA,EAEJ;AACA,QAAM,YAAY,WAAW;AAC7B,QAAM,aAAa,aAAa,WAAW,MAAM,SAAS,UAAU,IAAI;AACxE,QAAM,eAAe,aAAa,WAAW,MAAM,SAAS,QAAQ,IAAI;AAGxE,QAAM,aAAa,YAAY,gBAAiB,iBAAiB,eAAe,SAAY,gBAAgB;AAC5G,QAAM,SAAS,YACb,oBAAC,OAAE,WAAU,iCAAgC,oBAAiB,IAC3D,iBAAO,WAAW,aAAa,MAAS,GAC3C,IACE,eAAe,SACjB,oBAAC,UAAO,MAAM,YAAY,SAAQ,aAC/B,iBAAO,QACV,IACE,eAAe,SACjB,oBAAC,UAAO,MAAK,UAAS,SAAQ,aAAY,SAAS,YAAY,SAAS,YAAY,UACjF,iBAAO,QACV,IACE;AACJ,QAAM,SACJ,qBAAqB,aAAa,SAChC,oBAAC,UAAO,MAAK,UAAS,SAAQ,QAAO,SAAS,UAAU,SAAS,YAAY,UAAU,0BAAuB,IAC3G,iBAAO,kBACV,IACE,eAAe,UAAa,CAAC,YAC/B,oBAAC,UAAO,MAAM,YAAY,SAAQ,QAAO,MAAK,UAC3C,iBAAO,QACV,IACE,eAAe,SACjB,oBAAC,UAAO,MAAK,UAAS,SAAQ,QAAO,MAAK,UAAS,SAAS,YAAY,SAAS,YAAY,UAC1F,iBAAO,QACV,IACE;AACN,MAAI,CAAC,UAAU,CAAC,OAAQ,QAAO;AAC/B,SACE,qBAAC,SAAK,GAAG,MAAM,WAAW,GAAG,+CAA+C,SAAS,GAClF;AAAA;AAAA,IACA;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -2,7 +2,7 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import type { LucideIcon } from "lucide-react";
|
|
3
3
|
import type { DateInput, FormatDateStyle, FormatRelativeTimeOptions } from "../lib/format.js";
|
|
4
4
|
import { type LabelOverride } from "../i18n/kit-labels.js";
|
|
5
|
-
import type { ChipShape, ChipSize, ChipTone, ChipVariant } from "./chip.js";
|
|
5
|
+
import type { ChipLinkProps, ChipShape, ChipSize, ChipTone, ChipVariant } from "./chip.js";
|
|
6
6
|
import type { DataTableColumn } from "./data-table.js";
|
|
7
7
|
import { DEFAULT_ACCOUNT_STATE_LABELS } from "./account-chips-labels.js";
|
|
8
8
|
/**
|
|
@@ -40,6 +40,20 @@ export interface RoleDefinition {
|
|
|
40
40
|
tone?: ChipTone;
|
|
41
41
|
/** A lucide component or an element — Kurvenschmiede marks its admins with a shield. */
|
|
42
42
|
icon?: LucideIcon | ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* 0.42.0 (docs/admin-harmonization.md §2.1, settings §12.3): the role's tool — an
|
|
45
|
+
* admin's `/admin`, a reviewer's `/translations`. {@link AccountRoleChip} is a link to
|
|
46
|
+
* it; a role without one gets a plain chip. {@link RoleChip} ignores it: a roster's
|
|
47
|
+
* chips name a role, they are not a way in.
|
|
48
|
+
*/
|
|
49
|
+
href?: string;
|
|
50
|
+
/**
|
|
51
|
+
* 0.42.0 (keksdose build review): this role's look in {@link AccountRoleChip} — keksdose
|
|
52
|
+
* draws only ADMIN `solid` and its REVIEWER and MEMBER `soft`. Default `solid`, the
|
|
53
|
+
* header's look; the chip's own `variant` prop wins over it. {@link RoleChip} ignores
|
|
54
|
+
* it: a roster's column keeps one look, set on the column.
|
|
55
|
+
*/
|
|
56
|
+
variant?: ChipVariant;
|
|
43
57
|
}
|
|
44
58
|
/**
|
|
45
59
|
* Every role an app has, keyed by the value its API sends. Annotate the app's table
|
|
@@ -67,6 +81,33 @@ export interface RoleChipProps<R extends string = string> extends AccountChipLoo
|
|
|
67
81
|
* style hook.
|
|
68
82
|
*/
|
|
69
83
|
export declare function RoleChip<R extends string = string>({ value: role, roles, size, variant, shape, caps, className, ...rest }: RoleChipProps<R>): import("react").JSX.Element | null;
|
|
84
|
+
export interface AccountRoleChipProps<R extends string = string> extends RoleChipProps<R> {
|
|
85
|
+
/**
|
|
86
|
+
* Runs on the way to the role's tool — the account menu's `close`, so the panel does
|
|
87
|
+
* not stay open over the page it just navigated to (keksdose F7). Only called on a
|
|
88
|
+
* link chip.
|
|
89
|
+
*/
|
|
90
|
+
onNavigate?: () => void;
|
|
91
|
+
/** Your router's link for the role's `href`. Default: the `<UiKitProvider
|
|
92
|
+
* linkComponent>`, then `<a>` — {@link Chip}'s `renderLink`. */
|
|
93
|
+
renderLink?: (props: ChipLinkProps) => ReactElement;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The role in the account menu's header (0.42.0, docs/admin-harmonization.md §2.1, §7):
|
|
97
|
+
* {@link RoleChip} in keksdose's look — `solid`, `sm`, `square`, `caps`, the role's icon
|
|
98
|
+
* and tone — made for `TopBarActionMenu`'s `header.extra`:
|
|
99
|
+
*
|
|
100
|
+
* extra: (close) => <AccountRoleChip value={me.role} roles={ROLES} onNavigate={close} />
|
|
101
|
+
*
|
|
102
|
+
* A role whose {@link RoleDefinition.href} is set is a shortcut to its tool: the chip is a
|
|
103
|
+
* link (through `renderLink`, else the provider's link, as {@link Chip} draws links) and
|
|
104
|
+
* calls `onNavigate` on the click. Any other role is a plain chip — every account shows
|
|
105
|
+
* its role (§7, "Always a badge"). The words and tones are the app's vocabulary; the kit
|
|
106
|
+
* adds none. `solid` stays the default, so a role the app gives no look still reads as
|
|
107
|
+
* the header's tag; a role that should sit quieter (keksdose's MEMBER and REVIEWER) sets
|
|
108
|
+
* {@link RoleDefinition.variant} `soft` in the vocabulary. Carries `data-role` with the key.
|
|
109
|
+
*/
|
|
110
|
+
export declare function AccountRoleChip<R extends string = string>({ value: role, roles, onNavigate, renderLink, size, variant, shape, caps, className, ...rest }: AccountRoleChipProps<R>): import("react").JSX.Element | null;
|
|
70
111
|
/**
|
|
71
112
|
* The states both rosters show, each as the app's own flag maps onto it:
|
|
72
113
|
*
|
|
@@ -34,6 +34,38 @@ function RoleChip({
|
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
+
function AccountRoleChip({
|
|
38
|
+
value: role,
|
|
39
|
+
roles,
|
|
40
|
+
onNavigate,
|
|
41
|
+
renderLink,
|
|
42
|
+
size = "sm",
|
|
43
|
+
variant,
|
|
44
|
+
shape = "square",
|
|
45
|
+
caps = true,
|
|
46
|
+
className,
|
|
47
|
+
...rest
|
|
48
|
+
}) {
|
|
49
|
+
if (role === null || role === void 0 || role === "") return null;
|
|
50
|
+
const def = roles[role];
|
|
51
|
+
const look = {
|
|
52
|
+
...rest,
|
|
53
|
+
"data-role": role,
|
|
54
|
+
tone: def?.tone ?? "neutral",
|
|
55
|
+
icon: def?.icon,
|
|
56
|
+
size,
|
|
57
|
+
// The prop, then the role's own look, then the header's `solid`.
|
|
58
|
+
variant: variant ?? def?.variant ?? "solid",
|
|
59
|
+
shape,
|
|
60
|
+
caps,
|
|
61
|
+
className
|
|
62
|
+
};
|
|
63
|
+
const label = def?.label ?? role;
|
|
64
|
+
if (def?.href) {
|
|
65
|
+
return /* @__PURE__ */ jsx(Chip, { ...look, href: def.href, renderLink, onClick: onNavigate ? () => onNavigate() : void 0, children: label });
|
|
66
|
+
}
|
|
67
|
+
return /* @__PURE__ */ jsx(Chip, { ...look, children: label });
|
|
68
|
+
}
|
|
37
69
|
const ACCOUNT_STATE_TONES = {
|
|
38
70
|
active: "success",
|
|
39
71
|
inactive: "danger",
|
|
@@ -158,6 +190,7 @@ function dateColumn({
|
|
|
158
190
|
}
|
|
159
191
|
export {
|
|
160
192
|
ACCOUNT_STATE_TONES,
|
|
193
|
+
AccountRoleChip,
|
|
161
194
|
AccountStateChip,
|
|
162
195
|
DEFAULT_ACCOUNT_STATE_LABELS,
|
|
163
196
|
DateMark,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/account-chips.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime, toDate, EMPTY_FORMATTED_VALUE } from \"../lib/format\";\nimport type { DateInput, FormatDateStyle, FormatRelativeTimeOptions } from \"../lib/format\";\nimport { useKitDateFormatter, useKitLabels, useKitLocale, type LabelOverride } from \"../i18n/kit-labels\";\nimport { toLocalIso } from \"../lib/dates\";\nimport { Chip } from \"./chip\";\nimport type { ChipShape, ChipSize, ChipTone, ChipVariant } from \"./chip\";\nimport type { DataTableColumn } from \"./data-table\";\nimport { DEFAULT_ACCOUNT_STATE_LABELS } from \"./account-chips-labels\";\n\n/**\n * The parts an admin roster repeats (0.18.0) — and only those.\n *\n * Kurvenschmiede (features/admin/users-panel.tsx, allowlist-panel.tsx) and keksdose\n * (features/admin/users-panel.tsx, the allowlist card in admin-page.tsx) each built the\n * same table: name over email, a role, whether the account is active, created, last\n * login, a row of actions, and an allowlist with a note. What they share is not the\n * table — the columns around it (keksdose's plan and privacy mode, Kurvenschmiede's\n * owned-work counts and its role SELECT), the actions and every rule about who may do\n * what are each app's own. What they share is the vocabulary: both spelled the same\n * square, uppercase status chip by hand (keksdose's `Badge` with its own tone map,\n * Kurvenschmiede's inline `<Chip size=\"xs\" shape=\"square\" caps>`), and both formatted\n * their two date columns by hand (`toLocaleDateString` in one, a \"3 days ago\" helper\n * in the other). So: {@link RoleChip}, {@link AccountStateChip} and\n * {@link dateColumn}, and the roster stays the app's `DataTable`.\n */\n\n/** The chip look both rosters use: a square, uppercase status tag. Each can be changed. */\ninterface AccountChipLook {\n /** Default `sm` — keksdose's roster; Kurvenschmiede's denser lists pass `xs`. */\n size?: ChipSize;\n /** Default `soft`. `dot` for a column of them that should not outshout the names. */\n variant?: ChipVariant;\n /** Default `square`: a chip in a table cell, beside square controls. */\n shape?: ChipShape;\n /** Default true — the status-badge type. */\n caps?: boolean;\n className?: string;\n [key: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/* ── RoleChip ──────────────────────────────────────────────────────────────── */\n\n/** How one role is drawn. `label` is the app's, translated. */\nexport interface RoleDefinition {\n label: string;\n tone?: ChipTone;\n /** A lucide component or an element — Kurvenschmiede marks its admins with a shield. */\n icon?: LucideIcon | ReactElement;\n}\n\n/**\n * Every role an app has, keyed by the value its API sends. Annotate the app's table\n * with it (`const ROLES: RoleVocabulary<UserRole> = {…}`) and TypeScript asks for a\n * label when a role is added.\n */\nexport type RoleVocabulary<R extends string = string> = Readonly<Record<R, RoleDefinition>>;\n\nexport interface RoleChipProps<R extends string = string> extends AccountChipLook {\n /**\n * The role key as the API sends it. `null` / `undefined` renders nothing. Named\n * `value`, not `role`, because `role` on a JSX element is the ARIA role — the lint\n * rule and every reader would take it for one.\n */\n value: R | null | undefined;\n /** What each key is called and how it is toned. A key missing here is shown as the\n * key itself, in `neutral`: an unknown role is still a fact the admin should see. */\n roles: Readonly<Partial<Record<R, RoleDefinition>>>;\n}\n\n/**\n * A role as a chip: the API's key looked up in the app's {@link RoleVocabulary}.\n *\n * The vocabulary is a prop and not kit English, because the roles are the app's —\n * Kurvenschmiede has admin, member and customer, keksdose admin and user, kastlan its\n * own — and so are their names. Carries `data-role` with the key, for a test or a\n * style hook.\n */\nexport function RoleChip<R extends string = string>({\n value: role,\n roles,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n ...rest\n}: RoleChipProps<R>) {\n if (role === null || role === undefined || role === \"\") return null;\n const def = roles[role];\n return (\n <Chip\n {...rest}\n data-role={role}\n tone={def?.tone ?? \"neutral\"}\n icon={def?.icon}\n size={size}\n variant={variant}\n shape={shape}\n caps={caps}\n className={className}\n >\n {def?.label ?? role}\n </Chip>\n );\n}\n\n/* ── AccountStateChip ──────────────────────────────────────────────────────── */\n\n/**\n * The states both rosters show, each as the app's own flag maps onto it:\n *\n * - `active` / `inactive` — the account may sign in, or an admin switched it off\n * (both apps' `is_active`).\n * - `invited` — on the allowlist and mailed, not registered yet (an allowlist row).\n * - `registered` — an allowlist row whose address has an account now (Kurvenschmiede).\n * - `unverified` — the email address is not confirmed (keksdose).\n * - `passwordChange` — must set a new password at the next sign-in (keksdose).\n * - `deletion` — 0.30.0: the user asked for the account to be deleted\n * (docs/user-admin-harmonization.md §2.1, §6.4). It is deactivated at once and erased\n * on a date (`after_days`: keksdose, Kurvenschmiede) or by an operator (kastlan). The\n * chip says the date when there is one ({@link AccountStateChipProps.date}), and\n * \"Deletion requested\" when there is none. It stands IN PLACE of `inactive`: an\n * account marked for deletion is always deactivated, and two chips would say it twice.\n *\n * An account can be several at once (inactive AND unverified): render one chip per\n * state, as keksdose's state column does.\n */\nexport type AccountState =\n | \"active\"\n | \"inactive\"\n | \"invited\"\n | \"registered\"\n | \"unverified\"\n | \"passwordChange\"\n | \"deletion\";\n\n/**\n * The `accountState` namespace. One word per state, plus the two forms of `deletion`.\n *\n * The 0.30 keys are OPTIONAL, like every key added to a namespace an app annotates\n * (`const L: AccountStateLabels = {…}`): a new required key would be a compile error in\n * each app on its next update. Left out, they fall back to the provider's, then English.\n */\nexport interface AccountStateLabels extends Record<Exclude<AccountState, \"deletion\">, string> {\n /** 0.30.0: an account marked for deletion with no date — kastlan's `operator` mode,\n * where an operator erases it (§6.4). \"Deletion requested\". */\n deletion?: string;\n /** 0.30.0: an account that will be erased on `date`, already formatted in the\n * reader's locale — the `after_days` mode. \"Deletion on 6 Nov 2026\". */\n deletionOn?: (date: string) => string;\n}\n\n// Defined in ./account-chips-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_ACCOUNT_STATE_LABELS };\n\n/** The default tone of each state: green for the normal case, red for switched off\n * (and for going, `deletion`), amber for something the user still has to do, blue for\n * an open invitation. */\nexport const ACCOUNT_STATE_TONES: Readonly<Record<AccountState, ChipTone>> = {\n active: \"success\",\n inactive: \"danger\",\n invited: \"info\",\n registered: \"neutral\",\n unverified: \"warning\",\n passwordChange: \"warning\",\n // Red like `inactive`, which it replaces: the account cannot sign in, and it is going.\n deletion: \"danger\",\n};\n\nexport interface AccountStateChipProps extends AccountChipLook {\n state: AccountState;\n /**\n * 0.30.0, `state=\"deletion\"` only: the day the account will be erased — the row's\n * `deletion_scheduled_at` (§3.2, §6.4). Formatted as a date in the reader's locale\n * (\"Deletion on 6 Nov 2026\"), through the provider's `formatDate` when the app set\n * one, as {@link DateMark} does. Missing or `null` — an operator erases it, so there\n * is no date — the chip says \"Deletion requested\". Ignored for every other state.\n */\n date?: DateInput;\n /** Over the provider's locale, for the `deletion` date. */\n locale?: string;\n /** Over {@link ACCOUNT_STATE_TONES} — Kurvenschmiede draws `inactive` neutral. */\n tone?: ChipTone;\n /** Over the label, for an app whose word for the state is its own (\"Deactivated\"). */\n children?: ReactNode;\n /** Prop > `<UiKitProvider labels={{ accountState }}>` > English. */\n labels?: LabelOverride<AccountStateLabels>;\n}\n\n/**\n * An account's state as a chip, in the kit's words and tones. Carries `data-state`\n * with the key.\n */\nexport function AccountStateChip({\n state,\n date,\n locale: localeProp,\n tone,\n children,\n labels: labelsProp,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n ...rest\n}: AccountStateChipProps) {\n // An `undefined` in the prop is skipped (the provider's merge does that), so an\n // optional value cannot blank a default.\n const labels = useKitLabels(\"accountState\", DEFAULT_ACCOUNT_STATE_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const fromProvider = useKitDateFormatter();\n const when = state === \"deletion\" ? toDate(date ?? null) : null;\n let text: ReactNode;\n if (state !== \"deletion\") text = labels[state];\n else if (when) {\n // A date in a SENTENCE, so no weekday (keksdose's rule, KitDateFormatContext).\n const day =\n (fromProvider && fromProvider(toLocalIso(when), { unit: \"day\", source: \"dateMark\", locale, weekday: false })) ||\n formatDate(when, \"medium\", { locale });\n text = (labels.deletionOn ?? DEFAULT_ACCOUNT_STATE_LABELS.deletionOn)(day);\n } else text = labels.deletion ?? DEFAULT_ACCOUNT_STATE_LABELS.deletion;\n return (\n <Chip\n {...rest}\n data-state={state}\n data-date={when ? toLocalIso(when) : undefined}\n tone={tone ?? ACCOUNT_STATE_TONES[state]}\n size={size}\n variant={variant}\n shape={shape}\n caps={caps}\n className={className}\n >\n {children ?? text}\n </Chip>\n );\n}\n\n/* ── Date columns ──────────────────────────────────────────────────────────── */\n\nexport interface DateMarkProps {\n value: DateInput;\n /**\n * `\"date\"` (default): the date in `dateStyle` — \"Created\". `\"relative\"`: how long\n * ago — \"Last login\", where the question is \"recently?\" — with the full date and\n * time beside it (keksdose's last-seen column; see `absolute`).\n */\n display?: \"date\" | \"relative\";\n /**\n * Where a `\"relative\"` mark puts the exact date and time (0.32,\n * docs/text-size-harmonization.md §4: \"relative dates show the absolute one beside\n * them\", at every size — a touch screen never opens the tooltip it used to live in):\n * `\"below\"` (default), a muted second line under the words, so a table column keeps\n * its width; `\"inline\"`, after them on the same line, for a sentence or a wide cell.\n */\n absolute?: \"below\" | \"inline\";\n /** Default `medium`. Under `\"relative\"`, the style of the exact date beside it (default\n * `dateTime`) and of the date `relative.absoluteAfterDays` switches to. Given, it wins\n * over the provider's `formatDate`. */\n dateStyle?: FormatDateStyle | Intl.DateTimeFormatOptions;\n /** `formatRelativeTime` options: `numeric`, `style`, `absoluteAfterDays`, `now`. */\n relative?: Omit<FormatRelativeTimeOptions, \"locale\" | \"empty\" | \"absoluteStyle\">;\n /** What a missing value reads as. Default \"—\"; a last-login column passes its\n * translated \"Never\". */\n empty?: ReactNode;\n /** Over the provider's locale. */\n locale?: string;\n className?: string;\n}\n\n/**\n * A date in a table cell: a `<time>` with a machine-readable `dateTime`, nowrap and\n * tabular figures, in the provider's locale — or `empty` when there is none.\n *\n * `display=\"date\"` without a `dateStyle` is written by `<UiKitProvider formatDate>` when\n * the app set one (keksdose K12: its `DateCell` exists to put every column's date in the\n * app's date-format preference, weekday and all — dev#546), called with the LOCAL\n * calendar day of the value as `\"YYYY-MM-DD\"` and `weekday: true`. Without one, or for\n * an empty answer, it is `Intl`'s `medium` date as before. The relative display is not\n * a calendar day and keeps `formatRelativeTime`.\n */\nexport function DateMark({\n value,\n display = \"date\",\n dateStyle,\n relative,\n absolute = \"below\",\n empty = EMPTY_FORMATTED_VALUE,\n locale: localeProp,\n className,\n}: DateMarkProps) {\n const locale = useKitLocale(localeProp);\n const fromProvider = useKitDateFormatter();\n const date = toDate(value);\n const cls = cn(\"whitespace-nowrap tabular-nums\", className);\n if (!date) return <span className={cn(cls, \"text-muted\")}>{empty}</span>;\n if (display === \"date\") {\n const own =\n dateStyle === undefined && fromProvider\n ? fromProvider(toLocalIso(date), { unit: \"day\", source: \"dateMark\", locale, weekday: true })\n : \"\";\n return (\n <time dateTime={date.toISOString()} className={cls}>\n {own || formatDate(date, dateStyle ?? \"medium\", { locale })}\n </time>\n );\n }\n const text = formatRelativeTime(date, { ...relative, locale, absoluteStyle: dateStyle ?? \"medium\" });\n const exact = formatDate(date, dateStyle ?? \"dateTime\", { locale });\n // Past `absoluteAfterDays` the relative words already ARE the date; then the exact\n // line alone, rather than the same day twice.\n const sameDay = text === formatDate(date, dateStyle ?? \"medium\", { locale });\n const iso = date.toISOString();\n if (sameDay) {\n return (\n <time dateTime={iso} className={cls}>\n {exact}\n </time>\n );\n }\n // The exact date and time in the layout, never only in a tooltip (§4). Still no tab\n // stop: a roster of fifty rows would be fifty more of them.\n return (\n <time\n dateTime={iso}\n data-slot=\"date-mark\"\n className={cn(absolute === \"below\" ? \"inline-flex flex-col leading-tight\" : \"inline\", className)}\n >\n <span className=\"whitespace-nowrap tabular-nums\">{text}</span>\n {absolute === \"inline\" && \" · \"}\n <span className={cn(\"whitespace-nowrap tabular-nums text-muted\", absolute === \"below\" && \"text-xs\")}>\n {exact}\n </span>\n </time>\n );\n}\n\nexport interface DateColumnOptions<T> extends Omit<DateMarkProps, \"value\" | \"className\"> {\n key: string;\n header: ReactNode;\n /** The value of this row: an ISO string, epoch ms, a Date, or null for none. */\n value: (row: T) => DateInput;\n /** Sortable by the instant; rows with no date sort last either way. Default true. */\n sortable?: boolean;\n /** Default `desc` — a date column is sorted to find the newest. */\n firstSort?: \"asc\" | \"desc\";\n /** Add the table's from–to date filter over the column. Default false. */\n filter?: boolean;\n /** Further column settings (`mobileHidden`, `headClassName`, …), merged over. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A {@link DataTableColumn} for a date: {@link DateMark} cells, sorted by the instant\n * (newest first on the first click), optionally the date filter. The roster's\n * \"Created\" is `dateColumn({ key, header, value })`; its \"Last login\" adds\n * `display: \"relative\", empty: t(\"never\")`.\n */\nexport function dateColumn<T>({\n key,\n header,\n value,\n sortable = true,\n firstSort = \"desc\",\n filter = false,\n column,\n ...mark\n}: DateColumnOptions<T>): DataTableColumn<T> {\n return {\n key,\n header,\n cell: (row) => <DateMark value={value(row)} {...mark} />,\n sortBy: sortable ? (row) => toDate(value(row))?.getTime() ?? null : undefined,\n firstSort: sortable ? firstSort : undefined,\n filter: filter\n ? {\n type: \"date\",\n // A string goes as it is: the filter reads a timestamp's local day itself.\n // A Date or epoch value goes as its LOCAL day, the one the cell shows —\n // `toISOString()` handed over the UTC day, and in Berlin a 00:30 row was\n // filtered under the day before (round 0.34 BUG-2).\n getValue: (row) => {\n const raw = value(row);\n if (typeof raw === \"string\") return raw;\n const date = toDate(raw);\n return date ? toLocalIso(date) : null;\n },\n }\n : undefined,\n ...column,\n };\n}\n"],"mappings":";AA6FI,cA0OA,YA1OA;AA3FJ,SAAS,UAAU;AACnB,SAAS,YAAY,oBAAoB,QAAQ,6BAA6B;AAE9E,SAAS,qBAAqB,cAAc,oBAAwC;AACpF,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAGrB,SAAS,oCAAoC;AAsEtC,SAAS,SAAoC;AAAA,EAClD,OAAO;AAAA,EACP;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,MAAI,SAAS,QAAQ,SAAS,UAAa,SAAS,GAAI,QAAO;AAC/D,QAAM,MAAM,MAAM,IAAI;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAW;AAAA,MACX,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC,eAAK,SAAS;AAAA;AAAA,EACjB;AAEJ;AAsDO,MAAM,sBAAgE;AAAA,EAC3E,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AA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O,MAAM,GAAG,GAAI,GAAG,MAAM;AAAA,IACtD,QAAQ,WAAW,CAAC,QAAQ,OAAO,MAAM,GAAG,CAAC,GAAG,QAAQ,KAAK,OAAO;AAAA,IACpE,WAAW,WAAW,YAAY;AAAA,IAClC,QAAQ,SACJ;AAAA,MACE,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,MAKN,UAAU,CAAC,QAAQ;AACjB,cAAM,MAAM,MAAM,GAAG;AACrB,YAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,cAAM,OAAO,OAAO,GAAG;AACvB,eAAO,OAAO,WAAW,IAAI,IAAI;AAAA,MACnC;AAAA,IACF,IACA;AAAA,IACJ,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/account-chips.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from \"react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime, toDate, EMPTY_FORMATTED_VALUE } from \"../lib/format\";\nimport type { DateInput, FormatDateStyle, FormatRelativeTimeOptions } from \"../lib/format\";\nimport { useKitDateFormatter, useKitLabels, useKitLocale, type LabelOverride } from \"../i18n/kit-labels\";\nimport { toLocalIso } from \"../lib/dates\";\nimport { Chip } from \"./chip\";\nimport type { ChipLinkProps, ChipShape, ChipSize, ChipTone, ChipVariant } from \"./chip\";\nimport type { DataTableColumn } from \"./data-table\";\nimport { DEFAULT_ACCOUNT_STATE_LABELS } from \"./account-chips-labels\";\n\n/**\n * The parts an admin roster repeats (0.18.0) — and only those.\n *\n * Kurvenschmiede (features/admin/users-panel.tsx, allowlist-panel.tsx) and keksdose\n * (features/admin/users-panel.tsx, the allowlist card in admin-page.tsx) each built the\n * same table: name over email, a role, whether the account is active, created, last\n * login, a row of actions, and an allowlist with a note. What they share is not the\n * table — the columns around it (keksdose's plan and privacy mode, Kurvenschmiede's\n * owned-work counts and its role SELECT), the actions and every rule about who may do\n * what are each app's own. What they share is the vocabulary: both spelled the same\n * square, uppercase status chip by hand (keksdose's `Badge` with its own tone map,\n * Kurvenschmiede's inline `<Chip size=\"xs\" shape=\"square\" caps>`), and both formatted\n * their two date columns by hand (`toLocaleDateString` in one, a \"3 days ago\" helper\n * in the other). So: {@link RoleChip}, {@link AccountStateChip} and\n * {@link dateColumn}, and the roster stays the app's `DataTable`.\n */\n\n/** The chip look both rosters use: a square, uppercase status tag. Each can be changed. */\ninterface AccountChipLook {\n /** Default `sm` — keksdose's roster; Kurvenschmiede's denser lists pass `xs`. */\n size?: ChipSize;\n /** Default `soft`. `dot` for a column of them that should not outshout the names. */\n variant?: ChipVariant;\n /** Default `square`: a chip in a table cell, beside square controls. */\n shape?: ChipShape;\n /** Default true — the status-badge type. */\n caps?: boolean;\n className?: string;\n [key: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/* ── RoleChip ──────────────────────────────────────────────────────────────── */\n\n/** How one role is drawn. `label` is the app's, translated. */\nexport interface RoleDefinition {\n label: string;\n tone?: ChipTone;\n /** A lucide component or an element — Kurvenschmiede marks its admins with a shield. */\n icon?: LucideIcon | ReactElement;\n /**\n * 0.42.0 (docs/admin-harmonization.md §2.1, settings §12.3): the role's tool — an\n * admin's `/admin`, a reviewer's `/translations`. {@link AccountRoleChip} is a link to\n * it; a role without one gets a plain chip. {@link RoleChip} ignores it: a roster's\n * chips name a role, they are not a way in.\n */\n href?: string;\n /**\n * 0.42.0 (keksdose build review): this role's look in {@link AccountRoleChip} — keksdose\n * draws only ADMIN `solid` and its REVIEWER and MEMBER `soft`. Default `solid`, the\n * header's look; the chip's own `variant` prop wins over it. {@link RoleChip} ignores\n * it: a roster's column keeps one look, set on the column.\n */\n variant?: ChipVariant;\n}\n\n/**\n * Every role an app has, keyed by the value its API sends. Annotate the app's table\n * with it (`const ROLES: RoleVocabulary<UserRole> = {…}`) and TypeScript asks for a\n * label when a role is added.\n */\nexport type RoleVocabulary<R extends string = string> = Readonly<Record<R, RoleDefinition>>;\n\nexport interface RoleChipProps<R extends string = string> extends AccountChipLook {\n /**\n * The role key as the API sends it. `null` / `undefined` renders nothing. Named\n * `value`, not `role`, because `role` on a JSX element is the ARIA role — the lint\n * rule and every reader would take it for one.\n */\n value: R | null | undefined;\n /** What each key is called and how it is toned. A key missing here is shown as the\n * key itself, in `neutral`: an unknown role is still a fact the admin should see. */\n roles: Readonly<Partial<Record<R, RoleDefinition>>>;\n}\n\n/**\n * A role as a chip: the API's key looked up in the app's {@link RoleVocabulary}.\n *\n * The vocabulary is a prop and not kit English, because the roles are the app's —\n * Kurvenschmiede has admin, member and customer, keksdose admin and user, kastlan its\n * own — and so are their names. Carries `data-role` with the key, for a test or a\n * style hook.\n */\nexport function RoleChip<R extends string = string>({\n value: role,\n roles,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n ...rest\n}: RoleChipProps<R>) {\n if (role === null || role === undefined || role === \"\") return null;\n const def = roles[role];\n return (\n <Chip\n {...rest}\n data-role={role}\n tone={def?.tone ?? \"neutral\"}\n icon={def?.icon}\n size={size}\n variant={variant}\n shape={shape}\n caps={caps}\n className={className}\n >\n {def?.label ?? role}\n </Chip>\n );\n}\n\n/* ── AccountRoleChip ───────────────────────────────────────────────────────── */\n\nexport interface AccountRoleChipProps<R extends string = string> extends RoleChipProps<R> {\n /**\n * Runs on the way to the role's tool — the account menu's `close`, so the panel does\n * not stay open over the page it just navigated to (keksdose F7). Only called on a\n * link chip.\n */\n onNavigate?: () => void;\n /** Your router's link for the role's `href`. Default: the `<UiKitProvider\n * linkComponent>`, then `<a>` — {@link Chip}'s `renderLink`. */\n renderLink?: (props: ChipLinkProps) => ReactElement;\n}\n\n/**\n * The role in the account menu's header (0.42.0, docs/admin-harmonization.md §2.1, §7):\n * {@link RoleChip} in keksdose's look — `solid`, `sm`, `square`, `caps`, the role's icon\n * and tone — made for `TopBarActionMenu`'s `header.extra`:\n *\n * extra: (close) => <AccountRoleChip value={me.role} roles={ROLES} onNavigate={close} />\n *\n * A role whose {@link RoleDefinition.href} is set is a shortcut to its tool: the chip is a\n * link (through `renderLink`, else the provider's link, as {@link Chip} draws links) and\n * calls `onNavigate` on the click. Any other role is a plain chip — every account shows\n * its role (§7, \"Always a badge\"). The words and tones are the app's vocabulary; the kit\n * adds none. `solid` stays the default, so a role the app gives no look still reads as\n * the header's tag; a role that should sit quieter (keksdose's MEMBER and REVIEWER) sets\n * {@link RoleDefinition.variant} `soft` in the vocabulary. Carries `data-role` with the key.\n */\nexport function AccountRoleChip<R extends string = string>({\n value: role,\n roles,\n onNavigate,\n renderLink,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n ...rest\n}: AccountRoleChipProps<R>) {\n if (role === null || role === undefined || role === \"\") return null;\n const def = roles[role];\n const look = {\n ...rest,\n \"data-role\": role,\n tone: def?.tone ?? \"neutral\",\n icon: def?.icon,\n size,\n // The prop, then the role's own look, then the header's `solid`.\n variant: variant ?? def?.variant ?? \"solid\",\n shape,\n caps,\n className,\n } as const;\n const label = def?.label ?? role;\n if (def?.href) {\n return (\n <Chip {...look} href={def.href} renderLink={renderLink} onClick={onNavigate ? () => onNavigate() : undefined}>\n {label}\n </Chip>\n );\n }\n return <Chip {...look}>{label}</Chip>;\n}\n\n/* ── AccountStateChip ──────────────────────────────────────────────────────── */\n\n/**\n * The states both rosters show, each as the app's own flag maps onto it:\n *\n * - `active` / `inactive` — the account may sign in, or an admin switched it off\n * (both apps' `is_active`).\n * - `invited` — on the allowlist and mailed, not registered yet (an allowlist row).\n * - `registered` — an allowlist row whose address has an account now (Kurvenschmiede).\n * - `unverified` — the email address is not confirmed (keksdose).\n * - `passwordChange` — must set a new password at the next sign-in (keksdose).\n * - `deletion` — 0.30.0: the user asked for the account to be deleted\n * (docs/user-admin-harmonization.md §2.1, §6.4). It is deactivated at once and erased\n * on a date (`after_days`: keksdose, Kurvenschmiede) or by an operator (kastlan). The\n * chip says the date when there is one ({@link AccountStateChipProps.date}), and\n * \"Deletion requested\" when there is none. It stands IN PLACE of `inactive`: an\n * account marked for deletion is always deactivated, and two chips would say it twice.\n *\n * An account can be several at once (inactive AND unverified): render one chip per\n * state, as keksdose's state column does.\n */\nexport type AccountState =\n | \"active\"\n | \"inactive\"\n | \"invited\"\n | \"registered\"\n | \"unverified\"\n | \"passwordChange\"\n | \"deletion\";\n\n/**\n * The `accountState` namespace. One word per state, plus the two forms of `deletion`.\n *\n * The 0.30 keys are OPTIONAL, like every key added to a namespace an app annotates\n * (`const L: AccountStateLabels = {…}`): a new required key would be a compile error in\n * each app on its next update. Left out, they fall back to the provider's, then English.\n */\nexport interface AccountStateLabels extends Record<Exclude<AccountState, \"deletion\">, string> {\n /** 0.30.0: an account marked for deletion with no date — kastlan's `operator` mode,\n * where an operator erases it (§6.4). \"Deletion requested\". */\n deletion?: string;\n /** 0.30.0: an account that will be erased on `date`, already formatted in the\n * reader's locale — the `after_days` mode. \"Deletion on 6 Nov 2026\". */\n deletionOn?: (date: string) => string;\n}\n\n// Defined in ./account-chips-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_ACCOUNT_STATE_LABELS };\n\n/** The default tone of each state: green for the normal case, red for switched off\n * (and for going, `deletion`), amber for something the user still has to do, blue for\n * an open invitation. */\nexport const ACCOUNT_STATE_TONES: Readonly<Record<AccountState, ChipTone>> = {\n active: \"success\",\n inactive: \"danger\",\n invited: \"info\",\n registered: \"neutral\",\n unverified: \"warning\",\n passwordChange: \"warning\",\n // Red like `inactive`, which it replaces: the account cannot sign in, and it is going.\n deletion: \"danger\",\n};\n\nexport interface AccountStateChipProps extends AccountChipLook {\n state: AccountState;\n /**\n * 0.30.0, `state=\"deletion\"` only: the day the account will be erased — the row's\n * `deletion_scheduled_at` (§3.2, §6.4). Formatted as a date in the reader's locale\n * (\"Deletion on 6 Nov 2026\"), through the provider's `formatDate` when the app set\n * one, as {@link DateMark} does. Missing or `null` — an operator erases it, so there\n * is no date — the chip says \"Deletion requested\". Ignored for every other state.\n */\n date?: DateInput;\n /** Over the provider's locale, for the `deletion` date. */\n locale?: string;\n /** Over {@link ACCOUNT_STATE_TONES} — Kurvenschmiede draws `inactive` neutral. */\n tone?: ChipTone;\n /** Over the label, for an app whose word for the state is its own (\"Deactivated\"). */\n children?: ReactNode;\n /** Prop > `<UiKitProvider labels={{ accountState }}>` > English. */\n labels?: LabelOverride<AccountStateLabels>;\n}\n\n/**\n * An account's state as a chip, in the kit's words and tones. Carries `data-state`\n * with the key.\n */\nexport function AccountStateChip({\n state,\n date,\n locale: localeProp,\n tone,\n children,\n labels: labelsProp,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n ...rest\n}: AccountStateChipProps) {\n // An `undefined` in the prop is skipped (the provider's merge does that), so an\n // optional value cannot blank a default.\n const labels = useKitLabels(\"accountState\", DEFAULT_ACCOUNT_STATE_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const fromProvider = useKitDateFormatter();\n const when = state === \"deletion\" ? toDate(date ?? null) : null;\n let text: ReactNode;\n if (state !== \"deletion\") text = labels[state];\n else if (when) {\n // A date in a SENTENCE, so no weekday (keksdose's rule, KitDateFormatContext).\n const day =\n (fromProvider && fromProvider(toLocalIso(when), { unit: \"day\", source: \"dateMark\", locale, weekday: false })) ||\n formatDate(when, \"medium\", { locale });\n text = (labels.deletionOn ?? DEFAULT_ACCOUNT_STATE_LABELS.deletionOn)(day);\n } else text = labels.deletion ?? DEFAULT_ACCOUNT_STATE_LABELS.deletion;\n return (\n <Chip\n {...rest}\n data-state={state}\n data-date={when ? toLocalIso(when) : undefined}\n tone={tone ?? ACCOUNT_STATE_TONES[state]}\n size={size}\n variant={variant}\n shape={shape}\n caps={caps}\n className={className}\n >\n {children ?? text}\n </Chip>\n );\n}\n\n/* ── Date columns ──────────────────────────────────────────────────────────── */\n\nexport interface DateMarkProps {\n value: DateInput;\n /**\n * `\"date\"` (default): the date in `dateStyle` — \"Created\". `\"relative\"`: how long\n * ago — \"Last login\", where the question is \"recently?\" — with the full date and\n * time beside it (keksdose's last-seen column; see `absolute`).\n */\n display?: \"date\" | \"relative\";\n /**\n * Where a `\"relative\"` mark puts the exact date and time (0.32,\n * docs/text-size-harmonization.md §4: \"relative dates show the absolute one beside\n * them\", at every size — a touch screen never opens the tooltip it used to live in):\n * `\"below\"` (default), a muted second line under the words, so a table column keeps\n * its width; `\"inline\"`, after them on the same line, for a sentence or a wide cell.\n */\n absolute?: \"below\" | \"inline\";\n /** Default `medium`. Under `\"relative\"`, the style of the exact date beside it (default\n * `dateTime`) and of the date `relative.absoluteAfterDays` switches to. Given, it wins\n * over the provider's `formatDate`. */\n dateStyle?: FormatDateStyle | Intl.DateTimeFormatOptions;\n /** `formatRelativeTime` options: `numeric`, `style`, `absoluteAfterDays`, `now`. */\n relative?: Omit<FormatRelativeTimeOptions, \"locale\" | \"empty\" | \"absoluteStyle\">;\n /** What a missing value reads as. Default \"—\"; a last-login column passes its\n * translated \"Never\". */\n empty?: ReactNode;\n /** Over the provider's locale. */\n locale?: string;\n className?: string;\n}\n\n/**\n * A date in a table cell: a `<time>` with a machine-readable `dateTime`, nowrap and\n * tabular figures, in the provider's locale — or `empty` when there is none.\n *\n * `display=\"date\"` without a `dateStyle` is written by `<UiKitProvider formatDate>` when\n * the app set one (keksdose K12: its `DateCell` exists to put every column's date in the\n * app's date-format preference, weekday and all — dev#546), called with the LOCAL\n * calendar day of the value as `\"YYYY-MM-DD\"` and `weekday: true`. Without one, or for\n * an empty answer, it is `Intl`'s `medium` date as before. The relative display is not\n * a calendar day and keeps `formatRelativeTime`.\n */\nexport function DateMark({\n value,\n display = \"date\",\n dateStyle,\n relative,\n absolute = \"below\",\n empty = EMPTY_FORMATTED_VALUE,\n locale: localeProp,\n className,\n}: DateMarkProps) {\n const locale = useKitLocale(localeProp);\n const fromProvider = useKitDateFormatter();\n const date = toDate(value);\n const cls = cn(\"whitespace-nowrap tabular-nums\", className);\n if (!date) return <span className={cn(cls, \"text-muted\")}>{empty}</span>;\n if (display === \"date\") {\n const own =\n dateStyle === undefined && fromProvider\n ? fromProvider(toLocalIso(date), { unit: \"day\", source: \"dateMark\", locale, weekday: true })\n : \"\";\n return (\n <time dateTime={date.toISOString()} className={cls}>\n {own || formatDate(date, dateStyle ?? \"medium\", { locale })}\n </time>\n );\n }\n const text = formatRelativeTime(date, { ...relative, locale, absoluteStyle: dateStyle ?? \"medium\" });\n const exact = formatDate(date, dateStyle ?? \"dateTime\", { locale });\n // Past `absoluteAfterDays` the relative words already ARE the date; then the exact\n // line alone, rather than the same day twice.\n const sameDay = text === formatDate(date, dateStyle ?? \"medium\", { locale });\n const iso = date.toISOString();\n if (sameDay) {\n return (\n <time dateTime={iso} className={cls}>\n {exact}\n </time>\n );\n }\n // The exact date and time in the layout, never only in a tooltip (§4). Still no tab\n // stop: a roster of fifty rows would be fifty more of them.\n return (\n <time\n dateTime={iso}\n data-slot=\"date-mark\"\n className={cn(absolute === \"below\" ? \"inline-flex flex-col leading-tight\" : \"inline\", className)}\n >\n <span className=\"whitespace-nowrap tabular-nums\">{text}</span>\n {absolute === \"inline\" && \" · \"}\n <span className={cn(\"whitespace-nowrap tabular-nums text-muted\", absolute === \"below\" && \"text-xs\")}>\n {exact}\n </span>\n </time>\n );\n}\n\nexport interface DateColumnOptions<T> extends Omit<DateMarkProps, \"value\" | \"className\"> {\n key: string;\n header: ReactNode;\n /** The value of this row: an ISO string, epoch ms, a Date, or null for none. */\n value: (row: T) => DateInput;\n /** Sortable by the instant; rows with no date sort last either way. Default true. */\n sortable?: boolean;\n /** Default `desc` — a date column is sorted to find the newest. */\n firstSort?: \"asc\" | \"desc\";\n /** Add the table's from–to date filter over the column. Default false. */\n filter?: boolean;\n /** Further column settings (`mobileHidden`, `headClassName`, …), merged over. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A {@link DataTableColumn} for a date: {@link DateMark} cells, sorted by the instant\n * (newest first on the first click), optionally the date filter. The roster's\n * \"Created\" is `dateColumn({ key, header, value })`; its \"Last login\" adds\n * `display: \"relative\", empty: t(\"never\")`.\n */\nexport function dateColumn<T>({\n key,\n header,\n value,\n sortable = true,\n firstSort = \"desc\",\n filter = false,\n column,\n ...mark\n}: DateColumnOptions<T>): DataTableColumn<T> {\n return {\n key,\n header,\n cell: (row) => <DateMark value={value(row)} {...mark} />,\n sortBy: sortable ? (row) => toDate(value(row))?.getTime() ?? null : undefined,\n firstSort: sortable ? firstSort : undefined,\n filter: filter\n ? {\n type: \"date\",\n // A string goes as it is: the filter reads a timestamp's local day itself.\n // A Date or epoch value goes as its LOCAL day, the one the cell shows —\n // `toISOString()` handed over the UTC day, and in Berlin a 00:30 row was\n // filtered under the day before (round 0.34 BUG-2).\n getValue: (row) => {\n const raw = value(row);\n if (typeof raw === \"string\") return raw;\n const date = toDate(raw);\n return date ? toLocalIso(date) : null;\n },\n }\n : undefined,\n ...column,\n };\n}\n"],"mappings":";AA2GI,cA4SA,YA5SA;AAzGJ,SAAS,UAAU;AACnB,SAAS,YAAY,oBAAoB,QAAQ,6BAA6B;AAE9E,SAAS,qBAAqB,cAAc,oBAAwC;AACpF,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAGrB,SAAS,oCAAoC;AAoFtC,SAAS,SAAoC;AAAA,EAClD,OAAO;AAAA,EACP;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,MAAI,SAAS,QAAQ,SAAS,UAAa,SAAS,GAAI,QAAO;AAC/D,QAAM,MAAM,MAAM,IAAI;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAW;AAAA,MACX,MAAM,KAAK,QAAQ;AAAA,MACnB,MAAM,KAAK;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC,eAAK,SAAS;AAAA;AAAA,EACjB;AAEJ;AA+BO,SAAS,gBAA2C;AAAA,EACzD,OAAO;AAAA,EACP;AA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Props extends Omit<ComponentPropsWithRef<"div">, "chi
|
|
|
15
15
|
* keksdose's error boundary IS the page when it trips, and its `<h2>` went missing
|
|
16
16
|
* when it moved onto EmptyState — so the page's heading outline lost the one line
|
|
17
17
|
* that says what happened. Only the element changes; the look is the box's.
|
|
18
|
+
* `h1` (0.42.0) for an empty state that is the whole page — `AdminForbidden`.
|
|
18
19
|
*/
|
|
19
|
-
headingAs?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
20
|
+
headingAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
20
21
|
/** A glyph ABOVE the title — kastlan's InboxEmptyState (an inbox), keksdose's
|
|
21
22
|
* offline card (a cloud with a slash). Sized by the box (`[&_svg]:size-8`) and
|
|
22
23
|
* muted, so five call sites cannot pick five sizes; hidden from assistive tech,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport interface EmptyStateProps extends Omit<ComponentPropsWithRef<\"div\">, \"children\" | \"title\"> {\n /** The box renders `title` and `hint` in its own two-line rhythm, which is what makes\n * every empty state in three apps look like the same thing — so there is no\n * `children` slot to put arbitrary content in. The two slots below are the only\n * other things an empty state has turned out to need, and each has a fixed place. */\n /** Nodes rather than strings, so a title can carry a code, a link or an emphasised\n * word — keksdose's error boundary shows the error's name in `<code>` — while the\n * box still sets the type. */\n title: ReactNode;\n hint?: ReactNode;\n /**\n * Render the title as a heading of this level. Left out it is a `<div>`, as before:\n * most empty states are a message inside a section that already has its heading.\n * keksdose's error boundary IS the page when it trips, and its `<h2>` went missing\n * when it moved onto EmptyState — so the page's heading outline lost the one line\n * that says what happened. Only the element changes; the look is the box's.\n */\n headingAs?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n /** A glyph ABOVE the title — kastlan's InboxEmptyState (an inbox), keksdose's\n * offline card (a cloud with a slash). Sized by the box (`[&_svg]:size-8`) and\n * muted, so five call sites cannot pick five sizes; hidden from assistive tech,\n * because the title already says what it shows. */\n icon?: ReactNode;\n /** What to do about it, BELOW the hint: keksdose's query-state cards (Retry), its\n * error boundary (Retry / Reload / Go home — pass all three in a fragment, they\n * wrap and centre as one row), kastlan's \"Create a rule\". Buttons or links the\n * caller renders; the box only places them. */\n action?: ReactNode;\n /**\n * `box` (default): the dashed, padded card that stands in for a whole section.\n * `inline`: one quiet line with no box — for the empty state INSIDE something that\n * already has its own frame, where a dashed card would be a box in a box. keksdose\n * writes that line by hand five times as a muted `<p className=\"py-6 text-center\">`:\n * the notification inbox (notification-inbox:140), a support thread\n * (support-thread:144), the assistant (assistant-page:321), the admin support panel\n * (support-panel:265) and the funding dialog (funding-dialog:89). The icon shrinks\n * to the text's size and sits before the title, the hint follows on the same line,\n * and the row wraps only when it must. Centred like the box; `className=\"justify-start\"`\n * for a list that reads from the start edge (funding-dialog).\n */\n variant?: \"box\" | \"inline\";\n /**\n * Colour the icon and the title: `danger` for an error standing where the content\n * should be — kastlan's ErrorState (shared/components/feedback/error-state.tsx) and\n * its error boundary's fallback (error-boundary.tsx:16), both a red triangle over a\n * message — and `success` for an empty state that is GOOD news, kastlan's \"No defects\n * recorded for this room\" (handover defects-step.tsx:142, a green check). Left out,\n * both stay muted. The hint stays muted either way: it is the explanation, not the\n * verdict.\n */\n tone?: \"danger\" | \"success\";\n /**\n * `inline` only (0.11.0). `sm`: 12px, start-aligned and tight (`py-1`) — the empty\n * line INSIDE a detail panel, under a panel heading and among `text-xs` rows, where\n * the default's 14px centred line with `py-4` read as a section of its own.\n * keksdose's holdings panel (holdings-panel:563), asset-loan panel\n * (asset-loan-panel:108) and loan-payment panel (loan-payment-panel:191) each wrote\n * `className=\"justify-start py-1\"` over it and still got body-size text. Default `md`,\n * the look it had. Ignored by the box.\n */\n size?: \"sm\" | \"md\";\n}\n\nconst EMPTY_STATE_TONE: Record<\"danger\" | \"success\", string> = {\n danger: \"text-danger\",\n success: \"text-success\",\n};\n\nexport function EmptyState({\n title,\n hint,\n icon,\n action,\n headingAs,\n variant = \"box\",\n tone,\n size = \"md\",\n className,\n ...rest\n}: EmptyStateProps) {\n const Title = headingAs ?? \"div\";\n const toneClass = tone ? EMPTY_STATE_TONE[tone] : undefined;\n const hasHint = hint != null && hint !== false && hint !== \"\";\n if (variant === \"inline\") {\n const sm = size === \"sm\";\n return (\n <div\n {...rest}\n className={cn(\n \"flex flex-wrap items-center text-muted\",\n sm\n ? \"justify-start gap-x-1.5 gap-y-0.5 py-1 text-start text-xs\"\n : \"justify-center gap-x-2 gap-y-1 py-4 text-center text-sm\",\n className,\n )}\n >\n {icon != null && (\n <span\n aria-hidden\n className={cn(\"flex text-placeholder\", sm ? \"[&_svg]:size-3.5\" : \"[&_svg]:size-4\", toneClass)}\n >\n {icon}\n </span>\n )}\n {/* No weight of its own: one muted line is what these sites were, and a\n bold title would turn a quiet \"nothing here\" into a heading. */}\n <Title className={cn(sm ? \"text-xs\" : \"text-sm\", toneClass)}>{title}</Title>\n {hasHint && <span className=\"text-xs\">{hint}</span>}\n {action != null && <span className=\"flex flex-wrap items-center gap-2\">{action}</span>}\n </div>\n );\n }\n return (\n <div\n {...rest}\n className={cn(\n \"flex flex-col items-center justify-center rounded-lg border border-dashed border-strong bg-surface-2 px-4 py-10 text-center text-sm text-muted\",\n className,\n )}\n >\n {icon != null && (\n <div aria-hidden className={cn(\"mb-3 text-placeholder [&_svg]:size-8\", toneClass)}>\n {icon}\n </div>\n )}\n {/* `text-sm`: a heading keeps the box's size, not whatever a stylesheet gives h2. */}\n <Title className={cn(\"text-sm font-medium text-secondary\", toneClass)}>{title}</Title>\n {hasHint && <div className=\"mt-1 text-xs\">{hint}</div>}\n {action != null && (\n <div className=\"mt-4 flex flex-wrap items-center justify-center gap-2\">{action}</div>\n )}\n </div>\n );\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\n\nexport interface EmptyStateProps extends Omit<ComponentPropsWithRef<\"div\">, \"children\" | \"title\"> {\n /** The box renders `title` and `hint` in its own two-line rhythm, which is what makes\n * every empty state in three apps look like the same thing — so there is no\n * `children` slot to put arbitrary content in. The two slots below are the only\n * other things an empty state has turned out to need, and each has a fixed place. */\n /** Nodes rather than strings, so a title can carry a code, a link or an emphasised\n * word — keksdose's error boundary shows the error's name in `<code>` — while the\n * box still sets the type. */\n title: ReactNode;\n hint?: ReactNode;\n /**\n * Render the title as a heading of this level. Left out it is a `<div>`, as before:\n * most empty states are a message inside a section that already has its heading.\n * keksdose's error boundary IS the page when it trips, and its `<h2>` went missing\n * when it moved onto EmptyState — so the page's heading outline lost the one line\n * that says what happened. Only the element changes; the look is the box's.\n * `h1` (0.42.0) for an empty state that is the whole page — `AdminForbidden`.\n */\n headingAs?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n /** A glyph ABOVE the title — kastlan's InboxEmptyState (an inbox), keksdose's\n * offline card (a cloud with a slash). Sized by the box (`[&_svg]:size-8`) and\n * muted, so five call sites cannot pick five sizes; hidden from assistive tech,\n * because the title already says what it shows. */\n icon?: ReactNode;\n /** What to do about it, BELOW the hint: keksdose's query-state cards (Retry), its\n * error boundary (Retry / Reload / Go home — pass all three in a fragment, they\n * wrap and centre as one row), kastlan's \"Create a rule\". Buttons or links the\n * caller renders; the box only places them. */\n action?: ReactNode;\n /**\n * `box` (default): the dashed, padded card that stands in for a whole section.\n * `inline`: one quiet line with no box — for the empty state INSIDE something that\n * already has its own frame, where a dashed card would be a box in a box. keksdose\n * writes that line by hand five times as a muted `<p className=\"py-6 text-center\">`:\n * the notification inbox (notification-inbox:140), a support thread\n * (support-thread:144), the assistant (assistant-page:321), the admin support panel\n * (support-panel:265) and the funding dialog (funding-dialog:89). The icon shrinks\n * to the text's size and sits before the title, the hint follows on the same line,\n * and the row wraps only when it must. Centred like the box; `className=\"justify-start\"`\n * for a list that reads from the start edge (funding-dialog).\n */\n variant?: \"box\" | \"inline\";\n /**\n * Colour the icon and the title: `danger` for an error standing where the content\n * should be — kastlan's ErrorState (shared/components/feedback/error-state.tsx) and\n * its error boundary's fallback (error-boundary.tsx:16), both a red triangle over a\n * message — and `success` for an empty state that is GOOD news, kastlan's \"No defects\n * recorded for this room\" (handover defects-step.tsx:142, a green check). Left out,\n * both stay muted. The hint stays muted either way: it is the explanation, not the\n * verdict.\n */\n tone?: \"danger\" | \"success\";\n /**\n * `inline` only (0.11.0). `sm`: 12px, start-aligned and tight (`py-1`) — the empty\n * line INSIDE a detail panel, under a panel heading and among `text-xs` rows, where\n * the default's 14px centred line with `py-4` read as a section of its own.\n * keksdose's holdings panel (holdings-panel:563), asset-loan panel\n * (asset-loan-panel:108) and loan-payment panel (loan-payment-panel:191) each wrote\n * `className=\"justify-start py-1\"` over it and still got body-size text. Default `md`,\n * the look it had. Ignored by the box.\n */\n size?: \"sm\" | \"md\";\n}\n\nconst EMPTY_STATE_TONE: Record<\"danger\" | \"success\", string> = {\n danger: \"text-danger\",\n success: \"text-success\",\n};\n\nexport function EmptyState({\n title,\n hint,\n icon,\n action,\n headingAs,\n variant = \"box\",\n tone,\n size = \"md\",\n className,\n ...rest\n}: EmptyStateProps) {\n const Title = headingAs ?? \"div\";\n const toneClass = tone ? EMPTY_STATE_TONE[tone] : undefined;\n const hasHint = hint != null && hint !== false && hint !== \"\";\n if (variant === \"inline\") {\n const sm = size === \"sm\";\n return (\n <div\n {...rest}\n className={cn(\n \"flex flex-wrap items-center text-muted\",\n sm\n ? \"justify-start gap-x-1.5 gap-y-0.5 py-1 text-start text-xs\"\n : \"justify-center gap-x-2 gap-y-1 py-4 text-center text-sm\",\n className,\n )}\n >\n {icon != null && (\n <span\n aria-hidden\n className={cn(\"flex text-placeholder\", sm ? \"[&_svg]:size-3.5\" : \"[&_svg]:size-4\", toneClass)}\n >\n {icon}\n </span>\n )}\n {/* No weight of its own: one muted line is what these sites were, and a\n bold title would turn a quiet \"nothing here\" into a heading. */}\n <Title className={cn(sm ? \"text-xs\" : \"text-sm\", toneClass)}>{title}</Title>\n {hasHint && <span className=\"text-xs\">{hint}</span>}\n {action != null && <span className=\"flex flex-wrap items-center gap-2\">{action}</span>}\n </div>\n );\n }\n return (\n <div\n {...rest}\n className={cn(\n \"flex flex-col items-center justify-center rounded-lg border border-dashed border-strong bg-surface-2 px-4 py-10 text-center text-sm text-muted\",\n className,\n )}\n >\n {icon != null && (\n <div aria-hidden className={cn(\"mb-3 text-placeholder [&_svg]:size-8\", toneClass)}>\n {icon}\n </div>\n )}\n {/* `text-sm`: a heading keeps the box's size, not whatever a stylesheet gives h2. */}\n <Title className={cn(\"text-sm font-medium text-secondary\", toneClass)}>{title}</Title>\n {hasHint && <div className=\"mt-1 text-xs\">{hint}</div>}\n {action != null && (\n <div className=\"mt-4 flex flex-wrap items-center justify-center gap-2\">{action}</div>\n )}\n </div>\n );\n}\n"],"mappings":";AA0FM,SAWI,KAXJ;AAzFN,SAAS,UAAU;AAkEnB,MAAM,mBAAyD;AAAA,EAC7D,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,QAAQ,aAAa;AAC3B,QAAM,YAAY,OAAO,iBAAiB,IAAI,IAAI;AAClD,QAAM,UAAU,QAAQ,QAAQ,SAAS,SAAS,SAAS;AAC3D,MAAI,YAAY,UAAU;AACxB,UAAM,KAAK,SAAS;AACpB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA,KACI,8DACA;AAAA,UACJ;AAAA,QACF;AAAA,QAEC;AAAA,kBAAQ,QACP;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,cACX,WAAW,GAAG,yBAAyB,KAAK,qBAAqB,kBAAkB,SAAS;AAAA,cAE3F;AAAA;AAAA,UACH;AAAA,UAIF,oBAAC,SAAM,WAAW,GAAG,KAAK,YAAY,WAAW,SAAS,GAAI,iBAAM;AAAA,UACnE,WAAW,oBAAC,UAAK,WAAU,WAAW,gBAAK;AAAA,UAC3C,UAAU,QAAQ,oBAAC,UAAK,WAAU,qCAAqC,kBAAO;AAAA;AAAA;AAAA,IACjF;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA,gBAAQ,QACP,oBAAC,SAAI,eAAW,MAAC,WAAW,GAAG,wCAAwC,SAAS,GAC7E,gBACH;AAAA,QAGF,oBAAC,SAAM,WAAW,GAAG,sCAAsC,SAAS,GAAI,iBAAM;AAAA,QAC7E,WAAW,oBAAC,SAAI,WAAU,gBAAgB,gBAAK;AAAA,QAC/C,UAAU,QACT,oBAAC,SAAI,WAAU,yDAAyD,kBAAO;AAAA;AAAA;AAAA,EAEnF;AAEJ;","names":[]}
|
package/dist/eslint/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const roleUtilities = {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
const VERSION = true ? "0.
|
|
50
|
+
const VERSION = true ? "0.42.0" : "0.0.0-source";
|
|
51
51
|
const recommended = {
|
|
52
52
|
name: "@eifi1/ui-kit/recommended",
|
|
53
53
|
// Not the tests, as check:tokens skips the kit's: a test names the old class to assert it
|
package/dist/i18n/defaults.js
CHANGED
|
@@ -99,6 +99,8 @@ import { DEFAULT_DEVICE_RESET_LABELS } from "../settings/device-reset-setting-la
|
|
|
99
99
|
import { DEFAULT_ROW_ACTIONS_LABELS } from "../components/row-actions-labels.js";
|
|
100
100
|
import { DEFAULT_APP_SHELL_MORE_LABELS } from "../shell/app-shell-labels.js";
|
|
101
101
|
import { DEFAULT_ACCOUNT_STATE_LABELS } from "../components/account-chips-labels.js";
|
|
102
|
+
import { DEFAULT_ADMIN_AREA_LABELS } from "../admin/admin-area-labels.js";
|
|
103
|
+
import { DEFAULT_TOP_BAR_PARTS_LABELS } from "../shell/top-bar-parts-labels.js";
|
|
102
104
|
import { DEFAULT_SHARE_CARD_LABELS } from "../components/share-card-labels.js";
|
|
103
105
|
import { DEFAULT_REAUTH_DIALOG_LABELS } from "../components/reauth-dialog-labels.js";
|
|
104
106
|
import { DEFAULT_SERVER_WAKE_LABELS } from "../components/server-wake-labels.js";
|
|
@@ -237,7 +239,9 @@ const DEFAULT_UI_KIT_LABELS = {
|
|
|
237
239
|
phoneInput: DEFAULT_PHONE_INPUT_LABELS,
|
|
238
240
|
signChip: DEFAULT_SIGN_CHIP_LABELS,
|
|
239
241
|
columnMapper: DEFAULT_COLUMN_MAPPER_LABELS,
|
|
240
|
-
notifications: DEFAULT_NOTIFICATIONS_LABELS
|
|
242
|
+
notifications: DEFAULT_NOTIFICATIONS_LABELS,
|
|
243
|
+
adminArea: DEFAULT_ADMIN_AREA_LABELS,
|
|
244
|
+
topBarParts: DEFAULT_TOP_BAR_PARTS_LABELS
|
|
241
245
|
};
|
|
242
246
|
export {
|
|
243
247
|
DEFAULT_UI_KIT_LABELS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/defaults.ts"],"sourcesContent":["import { DEFAULT_DATA_TABLE_LABELS } from \"../components/data-table-labels\";\nimport { DEFAULT_MINI_CALENDAR_LABELS } from \"../components/mini-calendar-labels\";\nimport { DEFAULT_CALENDAR_HEATMAP_LABELS } from \"../components/calendar-heatmap-labels\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"../components/month-picker-labels\";\nimport { DEFAULT_PAGE_CONTENTS_LABELS } from \"../components/page-contents-labels\";\nimport { DEFAULT_POPOVER_LABELS } from \"../components/popover-labels\";\nimport { DEFAULT_CHIP_INPUT_LABELS } from \"../components/chip-labels\";\nimport { DEFAULT_FIELD_SYNC_LABELS } from \"../components/field-sync-labels\";\nimport {\n DEFAULT_CHARACTER_COUNT_LABELS,\n DEFAULT_PASSWORD_REVEAL_LABELS,\n DEFAULT_TABS_LABELS,\n} from \"../components/ui-labels\";\nimport { DEFAULT_WIZARD_LABELS } from \"../wizard/wizard-labels\";\nimport { DEFAULT_TOUR_LABELS } from \"../tour/tour-labels\";\nimport { DEFAULT_COMMAND_PALETTE_LABELS } from \"../search/command-palette-labels\";\nimport { DEFAULT_GLOBAL_SEARCH_LABELS } from \"../search/global-search-labels\";\nimport { DEFAULT_SERIES_CHART_LABELS } from \"../components/series-chart-labels\";\nimport { DEFAULT_PIE_CHART_LABELS } from \"../components/pie-chart-labels\";\nimport { DEFAULT_SPARKLINE_LABELS } from \"../components/sparkline-labels\";\nimport { DEFAULT_STAT_TILE_LABELS } from \"../components/stat-tile-labels\";\nimport { DEFAULT_SIGNATURE_PAD_LABELS } from \"../components/signature-pad-labels\";\nimport { DEFAULT_PASSWORD_STRENGTH_LABELS } from \"../components/password-strength-labels\";\nimport { DEFAULT_DANGER_CONFIRM_LABELS } from \"../components/danger-confirm-labels\";\nimport { DEFAULT_SWATCH_PICKER_LABELS } from \"../components/swatch-picker-labels\";\nimport { DEFAULT_ICON_PICKER_LABELS } from \"../components/icon-picker-labels\";\nimport { DEFAULT_DIALOG_FRAME_LABELS } from \"../components/dialog-frame-labels\";\nimport { DEFAULT_FILE_PICKER_LABELS } from \"../hooks/use-file-picker-labels\";\nimport { DEFAULT_MEASURED_GRID_LABELS } from \"../components/measured-grid-labels\";\nimport { DEFAULT_CONFIRM_DIALOG_LABELS } from \"../components/confirm-dialog-labels\";\nimport { DEFAULT_FLOATING_PANEL_LABELS } from \"../components/floating-panel-labels\";\nimport { DEFAULT_FEEDBACK_ATTACHMENT_LABELS } from \"../feedback/feedback-attachment-labels\";\nimport { DEFAULT_FEEDBACK_DIALOG_LABELS } from \"../feedback/feedback-dialog-labels\";\nimport {\n DEFAULT_FEEDBACK_COMPOSER_LABELS,\n DEFAULT_FEEDBACK_THREAD_LABELS,\n} from \"../feedback/feedback-thread-labels\";\nimport {\n DEFAULT_FEEDBACK_CATEGORY_LABELS,\n DEFAULT_FEEDBACK_STATUS_LABELS,\n DEFAULT_FEEDBACK_TOAST_LABELS,\n} from \"../feedback/feedback-labels\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"../feedback/feedback-menu-labels\";\nimport { DEFAULT_FEEDBACK_PUBLIC_LABELS } from \"../feedback/feedback-public-labels\";\nimport { DEFAULT_FEEDBACK_NOTIFICATION_TYPES_LABELS } from \"../notifications/feedback-notification-types-labels\";\nimport { DEFAULT_FEEDBACK_CONTEXT_LABELS } from \"../feedback/feedback-context-labels\";\nimport { DEFAULT_FEEDBACK_PAGE_LABELS } from \"../feedback/feedback-table-labels\";\nimport { DEFAULT_FEEDBACK_DETAIL_LABELS } from \"../feedback/feedback-row-detail-labels\";\nimport {\n DEFAULT_FEEDBACK_COMMENTS_LABELS,\n DEFAULT_FEEDBACK_REPLIES_LABELS,\n DEFAULT_FEEDBACK_VOTE_LABELS,\n} from \"../feedback/feedback-thread-parts-labels\";\nimport { DEFAULT_ACCOUNT_SETTINGS_LABELS } from \"../account/account-settings-labels\";\nimport { DEFAULT_COPY_BUTTON_LABELS } from \"../components/copy-button-labels\";\nimport { DEFAULT_BULK_ACTION_BAR_LABELS } from \"../components/bulk-action-bar-labels\";\nimport { DEFAULT_LIST_LABELS } from \"../components/list-labels\";\nimport { DEFAULT_BREADCRUMBS_LABELS } from \"../components/breadcrumbs-labels\";\nimport { DEFAULT_TOAST_LABELS } from \"../components/toast-labels\";\nimport { DEFAULT_FORM_ACTIONS_LABELS } from \"../components/form-actions-labels\";\nimport { DEFAULT_DESCRIPTION_LIST_LABELS } from \"../components/description-list-labels\";\nimport { DEFAULT_LINE_ITEMS_LABELS } from \"../components/line-items-labels\";\nimport { DEFAULT_PROGRESS_BAR_LABELS } from \"../components/progress-bar-labels\";\nimport { DEFAULT_SIGNED_AMOUNT_LABELS } from \"../components/signed-amount-labels\";\nimport { DEFAULT_ERROR_BOUNDARY_LABELS } from \"../components/error-boundary-labels\";\nimport { DEFAULT_AUTHED_IMAGE_LABELS } from \"../components/authed-image-labels\";\nimport { DEFAULT_IMAGE_GRID_LABELS } from \"../components/image-grid-labels\";\nimport { DEFAULT_LIGHTBOX_LABELS } from \"../components/lightbox-labels\";\nimport { DEFAULT_WRITE_LOCK_LABELS } from \"../components/write-lock-labels\";\nimport { DEFAULT_LEGAL_LABELS } from \"../components/legal-labels\";\nimport { DEFAULT_SIGN_IN_LABELS } from \"../auth/sign-in-form-labels\";\nimport { DEFAULT_REGISTER_LABELS } from \"../auth/register-form-labels\";\nimport { DEFAULT_COMPLETE_NAME_LABELS } from \"../auth/complete-name-dialog-labels\";\nimport { DEFAULT_FORGOT_PASSWORD_LABELS } from \"../auth/forgot-password-form-labels\";\nimport { DEFAULT_RESET_PASSWORD_LABELS } from \"../auth/reset-password-form-labels\";\nimport { DEFAULT_VERIFY_EMAIL_LABELS } from \"../auth/verify-email-labels\";\nimport { DEFAULT_NOT_FOUND_LABELS } from \"../auth/not-found-page-labels\";\nimport { DEFAULT_ACCEPT_INVITATION_LABELS } from \"../auth/accept-invitation-labels\";\nimport { DEFAULT_COMPANY_SWITCHER_LABELS } from \"../shell/company-switcher-labels\";\nimport { DEFAULT_EMAIL_CHANGE_LABELS } from \"../account/email-change-setting-labels\";\nimport { DEFAULT_SESSIONS_LABELS } from \"../account/sessions-setting-labels\";\nimport { DEFAULT_DELETE_ACCOUNT_LABELS } from \"../account/delete-account-setting-labels\";\nimport { DEFAULT_DATA_EXPORT_LABELS } from \"../account/data-export-setting-labels\";\nimport { DEFAULT_USER_ROSTER_LABELS } from \"../admin/user-roster-labels\";\nimport { DEFAULT_ROLE_SELECT_LABELS } from \"../admin/role-select-labels\";\nimport { DEFAULT_REVIEWER_SCOPE_LABELS } from \"../admin/reviewer-scope-editor-labels\";\nimport { DEFAULT_ADMIN_ACTION_LABELS } from \"../admin/admin-action-confirm-labels\";\nimport { DEFAULT_ADMIN_ACTION_LOG_LABELS } from \"../admin/admin-action-log-labels\";\nimport { DEFAULT_TRANSFER_OWNERSHIP_LABELS } from \"../admin/transfer-ownership-dialog-labels\";\nimport { DEFAULT_INVITATIONS_LABELS } from \"../admin/invitations-panel-labels\";\nimport { DEFAULT_SETTINGS_LABELS } from \"../settings/settings-labels\";\nimport { DEFAULT_LANDING_LABELS } from \"../landing/landing-labels\";\nimport { DEFAULT_DEMO_LABELS } from \"../demo/demo-labels\";\nimport { DEFAULT_BILLING_LABELS } from \"../billing/billing-labels\";\nimport { DEFAULT_PLAN_CHANGE_LABELS } from \"../admin/plan-change-labels\";\nimport { DEFAULT_APPEARANCE_LABELS } from \"../components/appearance-labels\";\nimport { DEFAULT_DEVICE_RESET_LABELS } from \"../settings/device-reset-setting-labels\";\nimport { DEFAULT_ROW_ACTIONS_LABELS } from \"../components/row-actions-labels\";\nimport { DEFAULT_APP_SHELL_MORE_LABELS } from \"../shell/app-shell-labels\";\nimport { DEFAULT_ACCOUNT_STATE_LABELS } from \"../components/account-chips-labels\";\nimport { DEFAULT_SHARE_CARD_LABELS } from \"../components/share-card-labels\";\nimport { DEFAULT_REAUTH_DIALOG_LABELS } from \"../components/reauth-dialog-labels\";\nimport { DEFAULT_SERVER_WAKE_LABELS } from \"../components/server-wake-labels\";\nimport { DEFAULT_TRANSLATION_REVIEW_LABELS } from \"../components/translation-review-labels\";\nimport { DEFAULT_COUNTRY_SELECT_LABELS } from \"../components/country-select-labels\";\nimport { DEFAULT_INLINE_EDIT_LABELS } from \"../components/inline-edit-field-labels\";\nimport { DEFAULT_IBAN_INPUT_LABELS } from \"../components/iban-input-labels\";\nimport { DEFAULT_PHONE_INPUT_LABELS } from \"../components/phone-input-labels\";\nimport { DEFAULT_SIGN_CHIP_LABELS } from \"../components/sign-chip-labels\";\nimport { DEFAULT_COLUMN_MAPPER_LABELS } from \"../components/column-mapper-labels\";\nimport { DEFAULT_NOTIFICATIONS_LABELS } from \"../notifications/notifications-labels\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n} from \"./shared-labels\";\nimport type { UiKitLabels } from \"./kit-labels\";\n\n/**\n * The whole English tree in one object: what a translation is written against, and\n * the `reference` for {@link missingKitLabels}.\n *\n * A separate module from the provider on purpose. Components import the provider's\n * hooks; this file imports the components' defaults. Kept together they would be an\n * import cycle through every component in the kit.\n *\n * Every import here is a module of WORDS — a `*-labels.ts` beside its component, which\n * the component re-exports (`shared-labels` for the namespaces the provider types\n * itself, which `kit-labels` re-exports) — never a component. The\n * English catalogue (`locales/en.ts`) is built on this object, so a component imported\n * here rides along with English: in 0.33 that was 79 of them, and an app fetching `en`\n * lazily fetched ~40 chunks of component code with it, where every other language is one\n * (0.34, KS U8). `__tests__/english-catalogue-graph.test.ts` holds the line, and the\n * build makes `dist/i18n/locales/en.js` one file (scripts/flatten-en.mjs).\n */\nexport const DEFAULT_UI_KIT_LABELS: UiKitLabels = {\n common: DEFAULT_COMMON_LABELS,\n dataTable: DEFAULT_DATA_TABLE_LABELS,\n miniCalendar: DEFAULT_MINI_CALENDAR_LABELS,\n calendarHeatmap: DEFAULT_CALENDAR_HEATMAP_LABELS,\n datePicker: DEFAULT_DATE_PICKER_LABELS,\n monthPicker: DEFAULT_MONTH_PICKER_LABELS,\n popover: DEFAULT_POPOVER_LABELS,\n combobox: DEFAULT_COMBOBOX_LABELS,\n multiSelect: DEFAULT_MULTI_SELECT_LABELS,\n calculator: DEFAULT_CALCULATOR_LABELS,\n currency: DEFAULT_CURRENCY_LABELS,\n chipInput: DEFAULT_CHIP_INPUT_LABELS,\n fieldSync: DEFAULT_FIELD_SYNC_LABELS,\n passwordReveal: DEFAULT_PASSWORD_REVEAL_LABELS,\n tabs: DEFAULT_TABS_LABELS,\n appShell: DEFAULT_APP_SHELL_LABELS,\n pageContents: DEFAULT_PAGE_CONTENTS_LABELS,\n topBar: DEFAULT_TOP_BAR_LABELS,\n pickerSheet: DEFAULT_PICKER_SHEET_LABELS,\n swipeableRow: DEFAULT_SWIPEABLE_ROW_LABELS,\n file: DEFAULT_FILE_LABELS,\n wizard: DEFAULT_WIZARD_LABELS,\n tour: DEFAULT_TOUR_LABELS,\n commandPalette: DEFAULT_COMMAND_PALETTE_LABELS,\n globalSearch: DEFAULT_GLOBAL_SEARCH_LABELS,\n seriesChart: DEFAULT_SERIES_CHART_LABELS,\n pieChart: DEFAULT_PIE_CHART_LABELS,\n sparkline: DEFAULT_SPARKLINE_LABELS,\n statTile: DEFAULT_STAT_TILE_LABELS,\n signaturePad: DEFAULT_SIGNATURE_PAD_LABELS,\n passwordStrength: DEFAULT_PASSWORD_STRENGTH_LABELS,\n dangerConfirm: DEFAULT_DANGER_CONFIRM_LABELS,\n swatchPicker: DEFAULT_SWATCH_PICKER_LABELS,\n iconPicker: DEFAULT_ICON_PICKER_LABELS,\n dialogFrame: DEFAULT_DIALOG_FRAME_LABELS,\n filePicker: DEFAULT_FILE_PICKER_LABELS,\n measuredGrid: DEFAULT_MEASURED_GRID_LABELS,\n feedbackAttachment: DEFAULT_FEEDBACK_ATTACHMENT_LABELS,\n feedbackDialog: DEFAULT_FEEDBACK_DIALOG_LABELS,\n feedbackThread: DEFAULT_FEEDBACK_THREAD_LABELS,\n feedbackComposer: DEFAULT_FEEDBACK_COMPOSER_LABELS,\n feedbackStatus: DEFAULT_FEEDBACK_STATUS_LABELS,\n feedbackCategory: DEFAULT_FEEDBACK_CATEGORY_LABELS,\n feedbackToast: DEFAULT_FEEDBACK_TOAST_LABELS,\n feedbackMenu: DEFAULT_FEEDBACK_MENU_LABELS,\n feedbackPublic: DEFAULT_FEEDBACK_PUBLIC_LABELS,\n feedbackNotificationTypes: DEFAULT_FEEDBACK_NOTIFICATION_TYPES_LABELS,\n feedbackContext: DEFAULT_FEEDBACK_CONTEXT_LABELS,\n feedbackPage: DEFAULT_FEEDBACK_PAGE_LABELS,\n feedbackDetail: DEFAULT_FEEDBACK_DETAIL_LABELS,\n feedbackVote: DEFAULT_FEEDBACK_VOTE_LABELS,\n feedbackComments: DEFAULT_FEEDBACK_COMMENTS_LABELS,\n feedbackReplies: DEFAULT_FEEDBACK_REPLIES_LABELS,\n accountSettings: DEFAULT_ACCOUNT_SETTINGS_LABELS,\n confirmDialog: DEFAULT_CONFIRM_DIALOG_LABELS,\n floatingPanel: DEFAULT_FLOATING_PANEL_LABELS,\n copyButton: DEFAULT_COPY_BUTTON_LABELS,\n bulkActionBar: DEFAULT_BULK_ACTION_BAR_LABELS,\n list: DEFAULT_LIST_LABELS,\n breadcrumbs: DEFAULT_BREADCRUMBS_LABELS,\n toast: DEFAULT_TOAST_LABELS,\n form: DEFAULT_FORM_ACTIONS_LABELS,\n descriptionList: DEFAULT_DESCRIPTION_LIST_LABELS,\n lineItems: DEFAULT_LINE_ITEMS_LABELS,\n progressBar: DEFAULT_PROGRESS_BAR_LABELS,\n signedAmount: DEFAULT_SIGNED_AMOUNT_LABELS,\n errorBoundary: DEFAULT_ERROR_BOUNDARY_LABELS,\n authedImage: DEFAULT_AUTHED_IMAGE_LABELS,\n imageGrid: DEFAULT_IMAGE_GRID_LABELS,\n lightbox: DEFAULT_LIGHTBOX_LABELS,\n writeLock: DEFAULT_WRITE_LOCK_LABELS,\n accountState: DEFAULT_ACCOUNT_STATE_LABELS,\n shareCard: DEFAULT_SHARE_CARD_LABELS,\n reauthDialog: DEFAULT_REAUTH_DIALOG_LABELS,\n serverWake: DEFAULT_SERVER_WAKE_LABELS,\n translationReview: DEFAULT_TRANSLATION_REVIEW_LABELS,\n legal: DEFAULT_LEGAL_LABELS,\n signIn: DEFAULT_SIGN_IN_LABELS,\n register: DEFAULT_REGISTER_LABELS,\n completeName: DEFAULT_COMPLETE_NAME_LABELS,\n forgotPassword: DEFAULT_FORGOT_PASSWORD_LABELS,\n resetPassword: DEFAULT_RESET_PASSWORD_LABELS,\n verifyEmail: DEFAULT_VERIFY_EMAIL_LABELS,\n notFound: DEFAULT_NOT_FOUND_LABELS,\n acceptInvitation: DEFAULT_ACCEPT_INVITATION_LABELS,\n companySwitcher: DEFAULT_COMPANY_SWITCHER_LABELS,\n emailChange: DEFAULT_EMAIL_CHANGE_LABELS,\n sessions: DEFAULT_SESSIONS_LABELS,\n deleteAccount: DEFAULT_DELETE_ACCOUNT_LABELS,\n dataExport: DEFAULT_DATA_EXPORT_LABELS,\n userRoster: DEFAULT_USER_ROSTER_LABELS,\n roleSelect: DEFAULT_ROLE_SELECT_LABELS,\n reviewerScope: DEFAULT_REVIEWER_SCOPE_LABELS,\n adminAction: DEFAULT_ADMIN_ACTION_LABELS,\n adminActionLog: DEFAULT_ADMIN_ACTION_LOG_LABELS,\n transferOwnership: DEFAULT_TRANSFER_OWNERSHIP_LABELS,\n invitations: DEFAULT_INVITATIONS_LABELS,\n settings: DEFAULT_SETTINGS_LABELS,\n landing: DEFAULT_LANDING_LABELS,\n demo: DEFAULT_DEMO_LABELS,\n billing: DEFAULT_BILLING_LABELS,\n planChange: DEFAULT_PLAN_CHANGE_LABELS,\n appearance: DEFAULT_APPEARANCE_LABELS,\n deviceReset: DEFAULT_DEVICE_RESET_LABELS,\n rowActions: DEFAULT_ROW_ACTIONS_LABELS,\n appShellMore: DEFAULT_APP_SHELL_MORE_LABELS,\n characterCount: DEFAULT_CHARACTER_COUNT_LABELS,\n countrySelect: DEFAULT_COUNTRY_SELECT_LABELS,\n inlineEdit: DEFAULT_INLINE_EDIT_LABELS,\n ibanIn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ACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AACjB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/defaults.ts"],"sourcesContent":["import { DEFAULT_DATA_TABLE_LABELS } from \"../components/data-table-labels\";\nimport { DEFAULT_MINI_CALENDAR_LABELS } from \"../components/mini-calendar-labels\";\nimport { DEFAULT_CALENDAR_HEATMAP_LABELS } from \"../components/calendar-heatmap-labels\";\nimport { DEFAULT_MONTH_PICKER_LABELS } from \"../components/month-picker-labels\";\nimport { DEFAULT_PAGE_CONTENTS_LABELS } from \"../components/page-contents-labels\";\nimport { DEFAULT_POPOVER_LABELS } from \"../components/popover-labels\";\nimport { DEFAULT_CHIP_INPUT_LABELS } from \"../components/chip-labels\";\nimport { DEFAULT_FIELD_SYNC_LABELS } from \"../components/field-sync-labels\";\nimport {\n DEFAULT_CHARACTER_COUNT_LABELS,\n DEFAULT_PASSWORD_REVEAL_LABELS,\n DEFAULT_TABS_LABELS,\n} from \"../components/ui-labels\";\nimport { DEFAULT_WIZARD_LABELS } from \"../wizard/wizard-labels\";\nimport { DEFAULT_TOUR_LABELS } from \"../tour/tour-labels\";\nimport { DEFAULT_COMMAND_PALETTE_LABELS } from \"../search/command-palette-labels\";\nimport { DEFAULT_GLOBAL_SEARCH_LABELS } from \"../search/global-search-labels\";\nimport { DEFAULT_SERIES_CHART_LABELS } from \"../components/series-chart-labels\";\nimport { DEFAULT_PIE_CHART_LABELS } from \"../components/pie-chart-labels\";\nimport { DEFAULT_SPARKLINE_LABELS } from \"../components/sparkline-labels\";\nimport { DEFAULT_STAT_TILE_LABELS } from \"../components/stat-tile-labels\";\nimport { DEFAULT_SIGNATURE_PAD_LABELS } from \"../components/signature-pad-labels\";\nimport { DEFAULT_PASSWORD_STRENGTH_LABELS } from \"../components/password-strength-labels\";\nimport { DEFAULT_DANGER_CONFIRM_LABELS } from \"../components/danger-confirm-labels\";\nimport { DEFAULT_SWATCH_PICKER_LABELS } from \"../components/swatch-picker-labels\";\nimport { DEFAULT_ICON_PICKER_LABELS } from \"../components/icon-picker-labels\";\nimport { DEFAULT_DIALOG_FRAME_LABELS } from \"../components/dialog-frame-labels\";\nimport { DEFAULT_FILE_PICKER_LABELS } from \"../hooks/use-file-picker-labels\";\nimport { DEFAULT_MEASURED_GRID_LABELS } from \"../components/measured-grid-labels\";\nimport { DEFAULT_CONFIRM_DIALOG_LABELS } from \"../components/confirm-dialog-labels\";\nimport { DEFAULT_FLOATING_PANEL_LABELS } from \"../components/floating-panel-labels\";\nimport { DEFAULT_FEEDBACK_ATTACHMENT_LABELS } from \"../feedback/feedback-attachment-labels\";\nimport { DEFAULT_FEEDBACK_DIALOG_LABELS } from \"../feedback/feedback-dialog-labels\";\nimport {\n DEFAULT_FEEDBACK_COMPOSER_LABELS,\n DEFAULT_FEEDBACK_THREAD_LABELS,\n} from \"../feedback/feedback-thread-labels\";\nimport {\n DEFAULT_FEEDBACK_CATEGORY_LABELS,\n DEFAULT_FEEDBACK_STATUS_LABELS,\n DEFAULT_FEEDBACK_TOAST_LABELS,\n} from \"../feedback/feedback-labels\";\nimport { DEFAULT_FEEDBACK_MENU_LABELS } from \"../feedback/feedback-menu-labels\";\nimport { DEFAULT_FEEDBACK_PUBLIC_LABELS } from \"../feedback/feedback-public-labels\";\nimport { DEFAULT_FEEDBACK_NOTIFICATION_TYPES_LABELS } from \"../notifications/feedback-notification-types-labels\";\nimport { DEFAULT_FEEDBACK_CONTEXT_LABELS } from \"../feedback/feedback-context-labels\";\nimport { DEFAULT_FEEDBACK_PAGE_LABELS } from \"../feedback/feedback-table-labels\";\nimport { DEFAULT_FEEDBACK_DETAIL_LABELS } from \"../feedback/feedback-row-detail-labels\";\nimport {\n DEFAULT_FEEDBACK_COMMENTS_LABELS,\n DEFAULT_FEEDBACK_REPLIES_LABELS,\n DEFAULT_FEEDBACK_VOTE_LABELS,\n} from \"../feedback/feedback-thread-parts-labels\";\nimport { DEFAULT_ACCOUNT_SETTINGS_LABELS } from \"../account/account-settings-labels\";\nimport { DEFAULT_COPY_BUTTON_LABELS } from \"../components/copy-button-labels\";\nimport { DEFAULT_BULK_ACTION_BAR_LABELS } from \"../components/bulk-action-bar-labels\";\nimport { DEFAULT_LIST_LABELS } from \"../components/list-labels\";\nimport { DEFAULT_BREADCRUMBS_LABELS } from \"../components/breadcrumbs-labels\";\nimport { DEFAULT_TOAST_LABELS } from \"../components/toast-labels\";\nimport { DEFAULT_FORM_ACTIONS_LABELS } from \"../components/form-actions-labels\";\nimport { DEFAULT_DESCRIPTION_LIST_LABELS } from \"../components/description-list-labels\";\nimport { DEFAULT_LINE_ITEMS_LABELS } from \"../components/line-items-labels\";\nimport { DEFAULT_PROGRESS_BAR_LABELS } from \"../components/progress-bar-labels\";\nimport { DEFAULT_SIGNED_AMOUNT_LABELS } from \"../components/signed-amount-labels\";\nimport { DEFAULT_ERROR_BOUNDARY_LABELS } from \"../components/error-boundary-labels\";\nimport { DEFAULT_AUTHED_IMAGE_LABELS } from \"../components/authed-image-labels\";\nimport { DEFAULT_IMAGE_GRID_LABELS } from \"../components/image-grid-labels\";\nimport { DEFAULT_LIGHTBOX_LABELS } from \"../components/lightbox-labels\";\nimport { DEFAULT_WRITE_LOCK_LABELS } from \"../components/write-lock-labels\";\nimport { DEFAULT_LEGAL_LABELS } from \"../components/legal-labels\";\nimport { DEFAULT_SIGN_IN_LABELS } from \"../auth/sign-in-form-labels\";\nimport { DEFAULT_REGISTER_LABELS } from \"../auth/register-form-labels\";\nimport { DEFAULT_COMPLETE_NAME_LABELS } from \"../auth/complete-name-dialog-labels\";\nimport { DEFAULT_FORGOT_PASSWORD_LABELS } from \"../auth/forgot-password-form-labels\";\nimport { DEFAULT_RESET_PASSWORD_LABELS } from \"../auth/reset-password-form-labels\";\nimport { DEFAULT_VERIFY_EMAIL_LABELS } from \"../auth/verify-email-labels\";\nimport { DEFAULT_NOT_FOUND_LABELS } from \"../auth/not-found-page-labels\";\nimport { DEFAULT_ACCEPT_INVITATION_LABELS } from \"../auth/accept-invitation-labels\";\nimport { DEFAULT_COMPANY_SWITCHER_LABELS } from \"../shell/company-switcher-labels\";\nimport { DEFAULT_EMAIL_CHANGE_LABELS } from \"../account/email-change-setting-labels\";\nimport { DEFAULT_SESSIONS_LABELS } from \"../account/sessions-setting-labels\";\nimport { DEFAULT_DELETE_ACCOUNT_LABELS } from \"../account/delete-account-setting-labels\";\nimport { DEFAULT_DATA_EXPORT_LABELS } from \"../account/data-export-setting-labels\";\nimport { DEFAULT_USER_ROSTER_LABELS } from \"../admin/user-roster-labels\";\nimport { DEFAULT_ROLE_SELECT_LABELS } from \"../admin/role-select-labels\";\nimport { DEFAULT_REVIEWER_SCOPE_LABELS } from \"../admin/reviewer-scope-editor-labels\";\nimport { DEFAULT_ADMIN_ACTION_LABELS } from \"../admin/admin-action-confirm-labels\";\nimport { DEFAULT_ADMIN_ACTION_LOG_LABELS } from \"../admin/admin-action-log-labels\";\nimport { DEFAULT_TRANSFER_OWNERSHIP_LABELS } from \"../admin/transfer-ownership-dialog-labels\";\nimport { DEFAULT_INVITATIONS_LABELS } from \"../admin/invitations-panel-labels\";\nimport { DEFAULT_SETTINGS_LABELS } from \"../settings/settings-labels\";\nimport { DEFAULT_LANDING_LABELS } from \"../landing/landing-labels\";\nimport { DEFAULT_DEMO_LABELS } from \"../demo/demo-labels\";\nimport { DEFAULT_BILLING_LABELS } from \"../billing/billing-labels\";\nimport { DEFAULT_PLAN_CHANGE_LABELS } from \"../admin/plan-change-labels\";\nimport { DEFAULT_APPEARANCE_LABELS } from \"../components/appearance-labels\";\nimport { DEFAULT_DEVICE_RESET_LABELS } from \"../settings/device-reset-setting-labels\";\nimport { DEFAULT_ROW_ACTIONS_LABELS } from \"../components/row-actions-labels\";\nimport { DEFAULT_APP_SHELL_MORE_LABELS } from \"../shell/app-shell-labels\";\nimport { DEFAULT_ACCOUNT_STATE_LABELS } from \"../components/account-chips-labels\";\nimport { DEFAULT_ADMIN_AREA_LABELS } from \"../admin/admin-area-labels\";\nimport { DEFAULT_TOP_BAR_PARTS_LABELS } from \"../shell/top-bar-parts-labels\";\nimport { DEFAULT_SHARE_CARD_LABELS } from \"../components/share-card-labels\";\nimport { DEFAULT_REAUTH_DIALOG_LABELS } from \"../components/reauth-dialog-labels\";\nimport { DEFAULT_SERVER_WAKE_LABELS } from \"../components/server-wake-labels\";\nimport { DEFAULT_TRANSLATION_REVIEW_LABELS } from \"../components/translation-review-labels\";\nimport { DEFAULT_COUNTRY_SELECT_LABELS } from \"../components/country-select-labels\";\nimport { DEFAULT_INLINE_EDIT_LABELS } from \"../components/inline-edit-field-labels\";\nimport { DEFAULT_IBAN_INPUT_LABELS } from \"../components/iban-input-labels\";\nimport { DEFAULT_PHONE_INPUT_LABELS } from \"../components/phone-input-labels\";\nimport { DEFAULT_SIGN_CHIP_LABELS } from \"../components/sign-chip-labels\";\nimport { DEFAULT_COLUMN_MAPPER_LABELS } from \"../components/column-mapper-labels\";\nimport { DEFAULT_NOTIFICATIONS_LABELS } from \"../notifications/notifications-labels\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n} from \"./shared-labels\";\nimport type { UiKitLabels } from \"./kit-labels\";\n\n/**\n * The whole English tree in one object: what a translation is written against, and\n * the `reference` for {@link missingKitLabels}.\n *\n * A separate module from the provider on purpose. Components import the provider's\n * hooks; this file imports the components' defaults. Kept together they would be an\n * import cycle through every component in the kit.\n *\n * Every import here is a module of WORDS — a `*-labels.ts` beside its component, which\n * the component re-exports (`shared-labels` for the namespaces the provider types\n * itself, which `kit-labels` re-exports) — never a component. The\n * English catalogue (`locales/en.ts`) is built on this object, so a component imported\n * here rides along with English: in 0.33 that was 79 of them, and an app fetching `en`\n * lazily fetched ~40 chunks of component code with it, where every other language is one\n * (0.34, KS U8). `__tests__/english-catalogue-graph.test.ts` holds the line, and the\n * build makes `dist/i18n/locales/en.js` one file (scripts/flatten-en.mjs).\n */\nexport const DEFAULT_UI_KIT_LABELS: UiKitLabels = {\n common: DEFAULT_COMMON_LABELS,\n dataTable: DEFAULT_DATA_TABLE_LABELS,\n miniCalendar: DEFAULT_MINI_CALENDAR_LABELS,\n calendarHeatmap: DEFAULT_CALENDAR_HEATMAP_LABELS,\n datePicker: DEFAULT_DATE_PICKER_LABELS,\n monthPicker: DEFAULT_MONTH_PICKER_LABELS,\n popover: DEFAULT_POPOVER_LABELS,\n combobox: DEFAULT_COMBOBOX_LABELS,\n multiSelect: DEFAULT_MULTI_SELECT_LABELS,\n calculator: DEFAULT_CALCULATOR_LABELS,\n currency: DEFAULT_CURRENCY_LABELS,\n chipInput: DEFAULT_CHIP_INPUT_LABELS,\n fieldSync: DEFAULT_FIELD_SYNC_LABELS,\n passwordReveal: DEFAULT_PASSWORD_REVEAL_LABELS,\n tabs: DEFAULT_TABS_LABELS,\n appShell: DEFAULT_APP_SHELL_LABELS,\n pageContents: DEFAULT_PAGE_CONTENTS_LABELS,\n topBar: DEFAULT_TOP_BAR_LABELS,\n pickerSheet: DEFAULT_PICKER_SHEET_LABELS,\n swipeableRow: DEFAULT_SWIPEABLE_ROW_LABELS,\n file: DEFAULT_FILE_LABELS,\n wizard: DEFAULT_WIZARD_LABELS,\n tour: DEFAULT_TOUR_LABELS,\n commandPalette: DEFAULT_COMMAND_PALETTE_LABELS,\n globalSearch: DEFAULT_GLOBAL_SEARCH_LABELS,\n seriesChart: DEFAULT_SERIES_CHART_LABELS,\n pieChart: DEFAULT_PIE_CHART_LABELS,\n sparkline: DEFAULT_SPARKLINE_LABELS,\n statTile: DEFAULT_STAT_TILE_LABELS,\n signaturePad: DEFAULT_SIGNATURE_PAD_LABELS,\n passwordStrength: DEFAULT_PASSWORD_STRENGTH_LABELS,\n dangerConfirm: DEFAULT_DANGER_CONFIRM_LABELS,\n swatchPicker: DEFAULT_SWATCH_PICKER_LABELS,\n iconPicker: DEFAULT_ICON_PICKER_LABELS,\n dialogFrame: DEFAULT_DIALOG_FRAME_LABELS,\n filePicker: DEFAULT_FILE_PICKER_LABELS,\n measuredGrid: DEFAULT_MEASURED_GRID_LABELS,\n feedbackAttachment: DEFAULT_FEEDBACK_ATTACHMENT_LABELS,\n feedbackDialog: DEFAULT_FEEDBACK_DIALOG_LABELS,\n feedbackThread: DEFAULT_FEEDBACK_THREAD_LABELS,\n feedbackComposer: DEFAULT_FEEDBACK_COMPOSER_LABELS,\n feedbackStatus: DEFAULT_FEEDBACK_STATUS_LABELS,\n feedbackCategory: DEFAULT_FEEDBACK_CATEGORY_LABELS,\n feedbackToast: DEFAULT_FEEDBACK_TOAST_LABELS,\n feedbackMenu: DEFAULT_FEEDBACK_MENU_LABELS,\n feedbackPublic: DEFAULT_FEEDBACK_PUBLIC_LABELS,\n feedbackNotificationTypes: DEFAULT_FEEDBACK_NOTIFICATION_TYPES_LABELS,\n feedbackContext: DEFAULT_FEEDBACK_CONTEXT_LABELS,\n feedbackPage: DEFAULT_FEEDBACK_PAGE_LABELS,\n feedbackDetail: DEFAULT_FEEDBACK_DETAIL_LABELS,\n feedbackVote: DEFAULT_FEEDBACK_VOTE_LABELS,\n feedbackComments: DEFAULT_FEEDBACK_COMMENTS_LABELS,\n feedbackReplies: DEFAULT_FEEDBACK_REPLIES_LABELS,\n accountSettings: DEFAULT_ACCOUNT_SETTINGS_LABELS,\n confirmDialog: DEFAULT_CONFIRM_DIALOG_LABELS,\n floatingPanel: DEFAULT_FLOATING_PANEL_LABELS,\n copyButton: DEFAULT_COPY_BUTTON_LABELS,\n bulkActionBar: DEFAULT_BULK_ACTION_BAR_LABELS,\n list: DEFAULT_LIST_LABELS,\n breadcrumbs: DEFAULT_BREADCRUMBS_LABELS,\n toast: DEFAULT_TOAST_LABELS,\n form: DEFAULT_FORM_ACTIONS_LABELS,\n descriptionList: DEFAULT_DESCRIPTION_LIST_LABELS,\n lineItems: DEFAULT_LINE_ITEMS_LABELS,\n progressBar: DEFAULT_PROGRESS_BAR_LABELS,\n signedAmount: DEFAULT_SIGNED_AMOUNT_LABELS,\n errorBoundary: DEFAULT_ERROR_BOUNDARY_LABELS,\n authedImage: DEFAULT_AUTHED_IMAGE_LABELS,\n imageGrid: DEFAULT_IMAGE_GRID_LABELS,\n lightbox: DEFAULT_LIGHTBOX_LABELS,\n writeLock: DEFAULT_WRITE_LOCK_LABELS,\n accountState: DEFAULT_ACCOUNT_STATE_LABELS,\n shareCard: DEFAULT_SHARE_CARD_LABELS,\n reauthDialog: DEFAULT_REAUTH_DIALOG_LABELS,\n serverWake: DEFAULT_SERVER_WAKE_LABELS,\n translationReview: DEFAULT_TRANSLATION_REVIEW_LABELS,\n legal: DEFAULT_LEGAL_LABELS,\n signIn: DEFAULT_SIGN_IN_LABELS,\n register: DEFAULT_REGISTER_LABELS,\n completeName: DEFAULT_COMPLETE_NAME_LABELS,\n forgotPassword: DEFAULT_FORGOT_PASSWORD_LABELS,\n resetPassword: DEFAULT_RESET_PASSWORD_LABELS,\n verifyEmail: DEFAULT_VERIFY_EMAIL_LABELS,\n notFound: DEFAULT_NOT_FOUND_LABELS,\n acceptInvitation: DEFAULT_ACCEPT_INVITATION_LABELS,\n companySwitcher: DEFAULT_COMPANY_SWITCHER_LABELS,\n emailChange: DEFAULT_EMAIL_CHANGE_LABELS,\n sessions: DEFAULT_SESSIONS_LABELS,\n deleteAccount: DEFAULT_DELETE_ACCOUNT_LABELS,\n dataExport: DEFAULT_DATA_EXPORT_LABELS,\n userRoster: DEFAULT_USER_ROSTER_LABELS,\n roleSelect: DEFAULT_ROLE_SELECT_LABELS,\n reviewerScope: DEFAULT_REVIEWER_SCOPE_LABELS,\n adminAction: DEFAULT_ADMIN_ACTION_LABELS,\n adminActionLog: DEFAULT_ADMIN_ACTION_LOG_LABELS,\n transferOwnership: DEFAULT_TRANSFER_OWNERSHIP_LABELS,\n invitations: DEFAULT_INVITATIONS_LABELS,\n settings: DEFAULT_SETTINGS_LABELS,\n landing: DEFAULT_LANDING_LABELS,\n demo: DEFAULT_DEMO_LABELS,\n billing: DEFAULT_BILLING_LABELS,\n planChange: DEFAULT_PLAN_CHANGE_LABELS,\n appearance: DEFAULT_APPEARANCE_LABELS,\n deviceReset: DEFAULT_DEVICE_RESET_LABELS,\n rowActions: DEFAULT_ROW_ACTIONS_LABELS,\n appShellMore: DEFAULT_APP_SHELL_MORE_LABELS,\n characterCount: DEFAULT_CHARACTER_COUNT_LABELS,\n countrySelect: DEFAULT_COUNTRY_SELECT_LABELS,\n inlineEdit: DEFAULT_INLINE_EDIT_LABELS,\n ibanInput: DEFAULT_IBAN_INPUT_LABELS,\n phoneInput: DEFAULT_PHONE_INPUT_LABELS,\n signChip: DEFAULT_SIGN_CHIP_LABELS,\n columnMapper: DEFAULT_COLUMN_MAPPER_LABELS,\n notifications: DEFAULT_NOTIFICATIONS_LABELS,\n adminArea: DEFAULT_ADMIN_AREA_LABELS,\n topBarParts: DEFAULT_TOP_BAR_PARTS_LABELS,\n};\n"],"mappings":";AAAA,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAC7C,SAAS,uCAAuC;AAChD,SAAS,mCAAmC;AAC5C,SAAS,oCAAoC;AAC7C,SAAS,8BAA8B;AACvC,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,sCAAsC;AAC/C,SAAS,oCAAoC;AAC7C,SAAS,mCAAmC;AAC5C,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC,SAAS,oCAAoC;AAC7C,SAAS,wCAAwC;AACjD,SAAS,qCAAqC;AAC9C,SAAS,oCAAoC;AAC7C,SAAS,kCAAkC;AAC3C,SAAS,mCAAmC;AAC5C,SAAS,kCAAkC;AAC3C,SAAS,oCAAoC;AAC7C,SAAS,qCAAqC;AAC9C,SAAS,qCAAqC;AAC9C,SAAS,0CAA0C;AACnD,SAAS,sCAAsC;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oCAAoC;AAC7C,SAAS,sCAAsC;AAC/C,SAAS,kDAAkD;AAC3D,SAAS,uCAAuC;AAChD,SAAS,oCAAoC;AAC7C,SAAS,sCAAsC;AAC/C;AAAA,EACE;AAAA,EACA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eAAe;AAAA,EACf,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AAAA,EACX,aAAa;AACf;","names":[]}
|
package/dist/i18n/german.js
CHANGED
|
@@ -1611,6 +1611,9 @@ Die vollst\xE4ndige Postanschrift wird betroffenen Personen und Aufsichtsbeh\xF6
|
|
|
1611
1611
|
processing: "Ihre Zahlung wird verarbeitet. Ihr Tarif beginnt, sobald sie best\xE4tigt ist; diese Seite aktualisiert sich von selbst.",
|
|
1612
1612
|
choosePlan: "Tarif w\xE4hlen",
|
|
1613
1613
|
updatePayment: "Zahlungsmethode aktualisieren",
|
|
1614
|
+
// 0.42 (§16.7 A): for an admin who isn't the buyer. "Das Admin-Konto", which gives the
|
|
1615
|
+
// reader no gender.
|
|
1616
|
+
paymentFailedAskBuyer: (buyer) => buyer ? `Die Zahlung ist fehlgeschlagen. ${buyer} kann die Zahlungsmethode aktualisieren.` : "Die Zahlung ist fehlgeschlagen. Die Zahlungsmethode kann \xFCber das Admin-Konto aktualisiert werden, mit dem das Abonnement abgeschlossen wurde.",
|
|
1614
1617
|
checkAgain: "Erneut pr\xFCfen",
|
|
1615
1618
|
lockReason: "Ihr Tarif ist abgelaufen. W\xE4hlen Sie einen Tarif, um wieder \xC4nderungen vorzunehmen.",
|
|
1616
1619
|
// As `characterCount.limitReached` ("Zeichenlimit erreicht").
|
|
@@ -1642,6 +1645,16 @@ Die vollst\xE4ndige Postanschrift wird betroffenen Personen und Aufsichtsbeh\xF6
|
|
|
1642
1645
|
switchCredited: "Gutschrift auf die n\xE4chsten Belastungen",
|
|
1643
1646
|
switchNextCharge: (date) => `N\xE4chste Belastung am ${date}`,
|
|
1644
1647
|
switchConfirm: "Tarif \xE4ndern",
|
|
1648
|
+
// 0.42 (§16): the portal for the buyer only, the in-app cancel, the grant warning.
|
|
1649
|
+
buyerHolds: (buyer) => buyer ? `Zahlungsmethode und Rechnungen liegen bei ${buyer}: Das Abonnement wurde \xFCber dieses Konto abgeschlossen.` : "Zahlungsmethode und Rechnungen liegen beim Admin-Konto, mit dem das Abonnement abgeschlossen wurde.",
|
|
1650
|
+
cancelConfirmTitle: "Abonnement k\xFCndigen",
|
|
1651
|
+
cancelConfirmBody: (date) => `Ihr Abonnement endet am ${date}. Bis dahin funktioniert alles wie bisher.`,
|
|
1652
|
+
// §312k BGB: the confirmation button says exactly this.
|
|
1653
|
+
cancelConfirmAction: "Jetzt k\xFCndigen",
|
|
1654
|
+
keepSubscription: "Abonnement behalten",
|
|
1655
|
+
grantWarningTitle: "Ihr kostenloser Zugang l\xE4uft weiter",
|
|
1656
|
+
grantWarningBody: "Ihr kostenloser Zugang hat kein Enddatum. Solange er l\xE4uft, \xE4ndert ein Kauf Ihren Tarif nicht: Sie w\xFCrden f\xFCr einen Tarif bezahlen, der nicht gilt.",
|
|
1657
|
+
grantWarningAction: "Trotzdem kaufen",
|
|
1645
1658
|
waitingChanges: (count) => count === 1 ? `${n(count)} \xC4nderung wartet auf einen Tarif` : `${n(count)} \xC4nderungen warten auf einen Tarif`,
|
|
1646
1659
|
// "Verwerfen", as `wizard.cancelConfirmLabel`.
|
|
1647
1660
|
discardWaiting: "Wartende \xC4nderungen verwerfen",
|
|
@@ -1708,6 +1721,72 @@ Die vollst\xE4ndige Postanschrift wird betroffenen Personen und Aufsichtsbeh\xF6
|
|
|
1708
1721
|
appShellMore: {
|
|
1709
1722
|
more: "Mehr",
|
|
1710
1723
|
moreTitle: "Weitere Seiten"
|
|
1724
|
+
},
|
|
1725
|
+
// 0.42.0 — docs/admin-harmonization.md §3.1: the admin area's shared words. "Verwaltung"
|
|
1726
|
+
// as settings §5 names the page; "mit Administratorrechten" rather than "für
|
|
1727
|
+
// Administratoren", which would give the reader a gender (as `transferOwnership`).
|
|
1728
|
+
adminArea: {
|
|
1729
|
+
title: "Verwaltung",
|
|
1730
|
+
waiting: (count) => `${n(count)} offen`,
|
|
1731
|
+
forbiddenTitle: "Nur mit Administratorrechten",
|
|
1732
|
+
forbiddenBody: (appName) => `Hier wird ${appName} verwaltet. Ihr Konto kann diese Seite nicht \xF6ffnen.`,
|
|
1733
|
+
forbiddenHome: "Zur Startseite",
|
|
1734
|
+
forbiddenReviewer: "\xDCbersetzungen pr\xFCfen",
|
|
1735
|
+
sections: {
|
|
1736
|
+
overview: { title: "\xDCbersicht", help: "Was gerade wartet, auf einen Blick." },
|
|
1737
|
+
users: { title: "Benutzer", help: "Wer ein Konto hat und was jede Person darf." },
|
|
1738
|
+
invitations: { title: "Einladungen", help: "Die Links, mit denen neue Personen dazukommen." },
|
|
1739
|
+
billing: { title: "Abrechnung", help: "Tarif, Zahlung und Rechnungen." },
|
|
1740
|
+
activity: { title: "Aktivit\xE4t", help: "Was in der Verwaltung getan wurde, das Neueste zuerst." }
|
|
1741
|
+
},
|
|
1742
|
+
tiles: {
|
|
1743
|
+
feedbackWaiting: "Zu sichten",
|
|
1744
|
+
deletionRequests: "L\xF6schanfragen",
|
|
1745
|
+
invitationsPending: "Offene Einladungen",
|
|
1746
|
+
users: "Benutzer",
|
|
1747
|
+
usersNew: (count) => `${n(count)} neu in 7 Tagen`
|
|
1748
|
+
},
|
|
1749
|
+
tools: "Werkzeuge"
|
|
1750
|
+
},
|
|
1751
|
+
// 0.42.0 — docs/top-bar-harmonization.md §3.1: the top bar's shared parts. keksdose's
|
|
1752
|
+
// reviewed sync words where they are not about its budgets; "Tarif" as `billing`.
|
|
1753
|
+
topBarParts: {
|
|
1754
|
+
tours: {
|
|
1755
|
+
menu: "Gef\xFChrte Touren",
|
|
1756
|
+
newDot: "Neue Touren",
|
|
1757
|
+
thisPage: "Auf dieser Seite",
|
|
1758
|
+
newTours: "Neue Touren",
|
|
1759
|
+
allTours: "Alle Touren\u2026",
|
|
1760
|
+
badgeNew: "Neu",
|
|
1761
|
+
completed: "Abgeschlossen"
|
|
1762
|
+
},
|
|
1763
|
+
sync: {
|
|
1764
|
+
blocked: (count) => count === 1 ? `${n(count)} \xC4nderung kann von diesem Ger\xE4t nicht gesendet werden` : `${n(count)} \xC4nderungen k\xF6nnen von diesem Ger\xE4t nicht gesendet werden`,
|
|
1765
|
+
offline: "Offline \u2013 \xC4nderungen werden auf diesem Ger\xE4t gespeichert und bei erneuter Verbindung synchronisiert",
|
|
1766
|
+
refused: "Der Server hat den letzten Abgleich abgelehnt",
|
|
1767
|
+
syncing: "Wird synchronisiert\u2026",
|
|
1768
|
+
pending: (count) => count === 1 ? `${n(count)} \xC4nderung wartet auf Synchronisierung` : `${n(count)} \xC4nderungen warten auf Synchronisierung`,
|
|
1769
|
+
syncedAt: (time) => `Synchronisiert um ${time}`,
|
|
1770
|
+
idle: "Aktuell",
|
|
1771
|
+
syncHint: "Tippen, um jetzt zu synchronisieren",
|
|
1772
|
+
offlineHint: "offline gibt es nichts zu synchronisieren",
|
|
1773
|
+
withHint: (state, hint) => `${state} \u2013 ${hint}`,
|
|
1774
|
+
scoped: (scope, state) => `${scope}: ${state}`,
|
|
1775
|
+
offlineShort: "Offline",
|
|
1776
|
+
syncingShort: "Sync l\xE4uft\u2026",
|
|
1777
|
+
waitingShort: (count) => `${n(count)} ausstehend`,
|
|
1778
|
+
refusedShort: "Nicht synchronisiert",
|
|
1779
|
+
offlineUnsaved: "Offline \u2013 \xC4nderungen k\xF6nnen erst nach erneuter Verbindung gespeichert werden",
|
|
1780
|
+
saving: "Wird gespeichert\u2026"
|
|
1781
|
+
},
|
|
1782
|
+
dev: {
|
|
1783
|
+
roleHeading: "Dev \xB7 Rolle",
|
|
1784
|
+
switchPlan: "Tarif wechseln",
|
|
1785
|
+
plan: (value) => `Tarif: ${value}`,
|
|
1786
|
+
planHeading: "Dev \xB7 Tarif",
|
|
1787
|
+
backTo: (role) => `Zur\xFCck zu ${role}`,
|
|
1788
|
+
billingOff: "Die Abrechnung ist lokal aus: Tarife \xE4ndern nichts"
|
|
1789
|
+
}
|
|
1711
1790
|
}
|
|
1712
1791
|
};
|
|
1713
1792
|
}
|