@krizaka/ui 3.46.0 → 3.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-menu.d.ts +2 -111
- package/dist/account-menu.js +39 -118
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +163 -0
- package/dist/account-settings.js +354 -0
- package/dist/account-settings.js.map +1 -0
- package/dist/agenda.d.ts +136 -0
- package/dist/agenda.js +90 -0
- package/dist/agenda.js.map +1 -0
- package/dist/avatar-iajODANU.d.ts +114 -0
- package/dist/chunk-3D2YI63L.js +27 -0
- package/dist/chunk-3D2YI63L.js.map +1 -0
- package/dist/chunk-3RVFD3UX.js +85 -0
- package/dist/chunk-3RVFD3UX.js.map +1 -0
- package/dist/chunk-S6NYGOJT.js +22 -0
- package/dist/chunk-S6NYGOJT.js.map +1 -0
- package/dist/docs-layout.js +13 -32
- package/dist/docs-layout.js.map +1 -1
- package/dist/docs-nav.js +1 -1
- package/dist/drop-overlay.d.ts +31 -0
- package/dist/drop-overlay.js +86 -0
- package/dist/drop-overlay.js.map +1 -0
- package/dist/motion.css +27 -0
- package/dist/settings-layout.d.ts +59 -4
- package/dist/settings-layout.js +229 -24
- package/dist/settings-layout.js.map +1 -1
- package/dist/upload-queue.d.ts +67 -0
- package/dist/upload-queue.js +76 -0
- package/dist/upload-queue.js.map +1 -0
- package/package.json +33 -7
- package/registry/account-menu.json +2 -2
- package/registry/account-settings.json +721 -0
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +293 -0
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chat.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +3 -3
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/drop-overlay.json +182 -0
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +2 -2
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/account-settings/avatar-picker.d.ts +4 -0
- package/registry/examples/account-settings/avatar-picker.js +15 -0
- package/registry/examples/account-settings/avatar-picker.tsx +15 -0
- package/registry/examples/account-settings/choice-cards.d.ts +4 -0
- package/registry/examples/account-settings/choice-cards.js +24 -0
- package/registry/examples/account-settings/choice-cards.tsx +20 -0
- package/registry/examples/account-settings/language-picker.d.ts +4 -0
- package/registry/examples/account-settings/language-picker.js +25 -0
- package/registry/examples/account-settings/language-picker.tsx +21 -0
- package/registry/examples/account-settings/patterns.d.ts +4 -0
- package/registry/examples/account-settings/patterns.js +29 -0
- package/registry/examples/account-settings/patterns.tsx +39 -0
- package/registry/examples/account-settings/profile.d.ts +4 -0
- package/registry/examples/account-settings/profile.js +70 -0
- package/registry/examples/account-settings/profile.tsx +80 -0
- package/registry/examples/agenda/day.d.ts +4 -0
- package/registry/examples/agenda/day.js +43 -0
- package/registry/examples/agenda/day.tsx +35 -0
- package/registry/examples/drop-overlay/default.d.ts +4 -0
- package/registry/examples/drop-overlay/default.js +20 -0
- package/registry/examples/drop-overlay/default.tsx +18 -0
- package/registry/examples/upload-queue/default.d.ts +4 -0
- package/registry/examples/upload-queue/default.js +22 -0
- package/registry/examples/upload-queue/default.tsx +20 -0
- package/registry/examples/upload-queue/tray.d.ts +4 -0
- package/registry/examples/upload-queue/tray.js +21 -0
- package/registry/examples/upload-queue/tray.tsx +19 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +3 -3
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +147 -7
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +3 -3
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +3 -3
- package/registry/mascot-state.json +3 -3
- package/registry/mascots.json +3 -3
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +93 -5
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/router.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +34 -4
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +3 -3
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +243 -0
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Where a file is: waiting, being read, being checked, finished well, or not. */
|
|
4
|
+
declare const QueueStatus: {
|
|
5
|
+
readonly Queued: "queued";
|
|
6
|
+
readonly Reading: "reading";
|
|
7
|
+
readonly Checking: "checking";
|
|
8
|
+
readonly Done: "done";
|
|
9
|
+
readonly Failed: "failed";
|
|
10
|
+
};
|
|
11
|
+
type QueueStatus = (typeof QueueStatus)[keyof typeof QueueStatus];
|
|
12
|
+
/** A row while it works: the shimmer and the live progress belong to these states only. */
|
|
13
|
+
declare function isWorking(status: QueueStatus): boolean;
|
|
14
|
+
interface QueueTally {
|
|
15
|
+
total: number;
|
|
16
|
+
working: number;
|
|
17
|
+
queued: number;
|
|
18
|
+
done: number;
|
|
19
|
+
failed: number;
|
|
20
|
+
}
|
|
21
|
+
/** What the tray's header says: how many are working, finished, failed. */
|
|
22
|
+
declare function tally(items: readonly {
|
|
23
|
+
status: QueueStatus;
|
|
24
|
+
}[]): QueueTally;
|
|
25
|
+
/** The progress of a row clamped to 0–1, or `undefined` when it has none (an indeterminate wait). */
|
|
26
|
+
declare function progressOf(value: number | undefined): number | undefined;
|
|
27
|
+
|
|
28
|
+
interface UploadQueueItem {
|
|
29
|
+
/** Its key: stable while the row updates. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** The file's name. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Where it is: queued, reading, checking, done, failed. */
|
|
34
|
+
status: QueueStatus;
|
|
35
|
+
/** What it is doing, in words (“Reading…”, “Checking the rules…”) — passed translated, from the live events. */
|
|
36
|
+
statusText: string;
|
|
37
|
+
/** 0–1 while the work reports it; absent for an indeterminate wait. */
|
|
38
|
+
progress?: number;
|
|
39
|
+
/** The result, when done: a chip (`Chip`, `Badge`) or a line. */
|
|
40
|
+
result?: React.ReactNode;
|
|
41
|
+
/** The row's one quiet action: a « keep » toggle, a retry, a dismiss. */
|
|
42
|
+
trailing?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
type UploadQueueProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
45
|
+
/** The list's accessible name (“Checks in progress”) — passed translated. */
|
|
46
|
+
label: string;
|
|
47
|
+
/** The rows, in the order they were added. */
|
|
48
|
+
items: readonly UploadQueueItem[];
|
|
49
|
+
};
|
|
50
|
+
/** The files being checked, one row each. Changes are announced politely. */
|
|
51
|
+
declare function UploadQueue({ label, items, className, ...props }: UploadQueueProps): React.JSX.Element;
|
|
52
|
+
type TaskTrayProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
53
|
+
/** The tray's name (“Checks”). */
|
|
54
|
+
title: string;
|
|
55
|
+
/** The tally in words (“1 running · 2 done”). */
|
|
56
|
+
summary: string;
|
|
57
|
+
/** The fold button's name while open (“Collapse”). */
|
|
58
|
+
toggleLabel: string;
|
|
59
|
+
/** … and while folded (“Show”). */
|
|
60
|
+
openLabel: string;
|
|
61
|
+
/** Starts open. @default true */
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** A non-blocking tray for a queue: the user keeps browsing. Bottom edge on a phone, bottom-right from `sm`. */
|
|
65
|
+
declare function TaskTray({ title, summary, toggleLabel, openLabel, defaultOpen, className, children, ...props }: TaskTrayProps): React.JSX.Element;
|
|
66
|
+
|
|
67
|
+
export { QueueStatus, type QueueTally, TaskTray, type TaskTrayProps, UploadQueue, type UploadQueueItem, type UploadQueueProps, isWorking, progressOf, tally };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-S6NYGOJT.js";
|
|
4
|
+
|
|
5
|
+
// src/upload-queue/model.ts
|
|
6
|
+
var QueueStatus = { Queued: "queued", Reading: "reading", Checking: "checking", Done: "done", Failed: "failed" };
|
|
7
|
+
function isWorking(status) {
|
|
8
|
+
return status === QueueStatus.Reading || status === QueueStatus.Checking;
|
|
9
|
+
}
|
|
10
|
+
function tally(items) {
|
|
11
|
+
const count = (test) => items.filter((item) => test(item.status)).length;
|
|
12
|
+
return {
|
|
13
|
+
total: items.length,
|
|
14
|
+
working: count(isWorking),
|
|
15
|
+
queued: count((s) => s === QueueStatus.Queued),
|
|
16
|
+
done: count((s) => s === QueueStatus.Done),
|
|
17
|
+
failed: count((s) => s === QueueStatus.Failed)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function progressOf(value) {
|
|
21
|
+
return value === void 0 || Number.isNaN(value) ? void 0 : Math.min(1, Math.max(0, value));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/upload-queue/upload-queue.tsx
|
|
25
|
+
import * as React from "react";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function UploadQueue({ label, items, className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", { "aria-live": "polite", className, ...props, children: /* @__PURE__ */ jsx("ul", { "aria-label": label, className: "m-0 flex list-none flex-col divide-y divide-border-subtle p-0", children: items.map((item) => {
|
|
29
|
+
const working = isWorking(item.status);
|
|
30
|
+
const progress = progressOf(item.progress);
|
|
31
|
+
return /* @__PURE__ */ jsxs("li", { "data-status": item.status, "data-working": working ? "" : void 0, className: "kz-queue-row flex flex-col gap-1.5 py-3", children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-fg", children: item.name }),
|
|
34
|
+
item.result ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.result }) : null,
|
|
35
|
+
item.trailing ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.trailing }) : null
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs", item.status === QueueStatus.Failed ? "text-fg-danger" : "text-fg-secondary"), children: item.statusText }),
|
|
38
|
+
working && progress !== void 0 ? /* @__PURE__ */ jsx("div", { role: "progressbar", "aria-label": item.name, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(progress * 100), className: "h-1 overflow-hidden rounded-full bg-surface-3", children: /* @__PURE__ */ jsx("div", { className: "kz-working h-full rounded-full bg-accent", style: { width: `${progress * 100}%` } }) }) : null
|
|
39
|
+
] }, item.id);
|
|
40
|
+
}) }) });
|
|
41
|
+
}
|
|
42
|
+
function TaskTray({ title, summary, toggleLabel, openLabel, defaultOpen = true, className, children, ...props }) {
|
|
43
|
+
const [open, setOpen] = React.useState(defaultOpen);
|
|
44
|
+
const id = React.useId();
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
"section",
|
|
47
|
+
{
|
|
48
|
+
"aria-labelledby": `${id}-title`,
|
|
49
|
+
"data-state": open ? "open" : "closed",
|
|
50
|
+
className: cn(
|
|
51
|
+
"kz-tray fixed inset-x-0 bottom-0 z-40 flex max-h-[70dvh] flex-col rounded-t-2xl border border-border-default bg-surface-1 shadow-lg sm:inset-x-auto sm:bottom-4 sm:right-4 sm:w-96 sm:rounded-2xl",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("header", { className: "flex items-center gap-3 px-4 py-3", children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("h2", { id: `${id}-title`, className: "m-0 text-sm font-semibold text-fg", children: title }),
|
|
59
|
+
/* @__PURE__ */ jsx("p", { className: "m-0 truncate text-xs text-fg-secondary", children: summary })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-expanded": open, "aria-controls": `${id}-body`, onClick: () => setOpen(!open), className: "rounded-md px-2 py-1 text-sm text-fg-secondary hover:text-fg focus-visible:focus-ring", children: open ? toggleLabel : openLabel })
|
|
62
|
+
] }),
|
|
63
|
+
open ? /* @__PURE__ */ jsx("div", { id: `${id}-body`, className: "kz-tray-body min-h-0 overflow-y-auto px-4 pb-2", children }) : null
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
QueueStatus,
|
|
70
|
+
TaskTray,
|
|
71
|
+
UploadQueue,
|
|
72
|
+
isWorking,
|
|
73
|
+
progressOf,
|
|
74
|
+
tally
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=upload-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/upload-queue/model.ts","../src/upload-queue/upload-queue.tsx"],"sourcesContent":["// Headless: the vocabulary and the arithmetic of an upload queue (what each row is doing, what the tray says).\n\n/** Where a file is: waiting, being read, being checked, finished well, or not. */\nexport const QueueStatus = { Queued: \"queued\", Reading: \"reading\", Checking: \"checking\", Done: \"done\", Failed: \"failed\" } as const;\nexport type QueueStatus = (typeof QueueStatus)[keyof typeof QueueStatus];\n\n/** A row while it works: the shimmer and the live progress belong to these states only. */\nexport function isWorking(status: QueueStatus): boolean {\n return status === QueueStatus.Reading || status === QueueStatus.Checking;\n}\n\nexport interface QueueTally {\n total: number;\n working: number;\n queued: number;\n done: number;\n failed: number;\n}\n\n/** What the tray's header says: how many are working, finished, failed. */\nexport function tally(items: readonly { status: QueueStatus }[]): QueueTally {\n const count = (test: (status: QueueStatus) => boolean) => items.filter((item) => test(item.status)).length;\n return {\n total: items.length,\n working: count(isWorking),\n queued: count((s) => s === QueueStatus.Queued),\n done: count((s) => s === QueueStatus.Done),\n failed: count((s) => s === QueueStatus.Failed),\n };\n}\n\n/** The progress of a row clamped to 0–1, or `undefined` when it has none (an indeterminate wait). */\nexport function progressOf(value: number | undefined): number | undefined {\n return value === undefined || Number.isNaN(value) ? undefined : Math.min(1, Math.max(0, value));\n}\n","// Client (the tray's fold). A queue of files that stays on screen: each row appears at once, says in words what it is doing,\n// shows live progress while it works (a shimmer only then), and ends in a result chip; a row may carry one quiet action (a\n// « keep » toggle). `TaskTray` is the non-blocking container: bottom-right on a desktop, a sheet on a phone's bottom edge.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { isWorking, progressOf, QueueStatus } from \"./model\";\n\nexport interface UploadQueueItem {\n /** Its key: stable while the row updates. */\n id: string;\n /** The file's name. */\n name: string;\n /** Where it is: queued, reading, checking, done, failed. */\n status: QueueStatus;\n /** What it is doing, in words (“Reading…”, “Checking the rules…”) — passed translated, from the live events. */\n statusText: string;\n /** 0–1 while the work reports it; absent for an indeterminate wait. */\n progress?: number;\n /** The result, when done: a chip (`Chip`, `Badge`) or a line. */\n result?: React.ReactNode;\n /** The row's one quiet action: a « keep » toggle, a retry, a dismiss. */\n trailing?: React.ReactNode;\n}\n\nexport type UploadQueueProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The list's accessible name (“Checks in progress”) — passed translated. */\n label: string;\n /** The rows, in the order they were added. */\n items: readonly UploadQueueItem[];\n};\n\n/** The files being checked, one row each. Changes are announced politely. */\nexport function UploadQueue({ label, items, className, ...props }: UploadQueueProps) {\n return (\n <div aria-live=\"polite\" className={className} {...props}>\n <ul aria-label={label} className=\"m-0 flex list-none flex-col divide-y divide-border-subtle p-0\">\n {items.map((item) => {\n const working = isWorking(item.status);\n const progress = progressOf(item.progress);\n return (\n <li key={item.id} data-status={item.status} data-working={working ? \"\" : undefined} className=\"kz-queue-row flex flex-col gap-1.5 py-3\">\n <div className=\"flex items-center gap-3\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium text-fg\">{item.name}</span>\n {item.result ? <span className=\"shrink-0\">{item.result}</span> : null}\n {item.trailing ? <span className=\"shrink-0\">{item.trailing}</span> : null}\n </div>\n <span className={cn(\"text-xs\", item.status === QueueStatus.Failed ? \"text-fg-danger\" : \"text-fg-secondary\")}>{item.statusText}</span>\n {working && progress !== undefined ? (\n <div role=\"progressbar\" aria-label={item.name} aria-valuemin={0} aria-valuemax={100} aria-valuenow={Math.round(progress * 100)} className=\"h-1 overflow-hidden rounded-full bg-surface-3\">\n <div className=\"kz-working h-full rounded-full bg-accent\" style={{ width: `${progress * 100}%` }} />\n </div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n\nexport type TaskTrayProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The tray's name (“Checks”). */\n title: string;\n /** The tally in words (“1 running · 2 done”). */\n summary: string;\n /** The fold button's name while open (“Collapse”). */\n toggleLabel: string;\n /** … and while folded (“Show”). */\n openLabel: string;\n /** Starts open. @default true */\n defaultOpen?: boolean;\n};\n\n/** A non-blocking tray for a queue: the user keeps browsing. Bottom edge on a phone, bottom-right from `sm`. */\nexport function TaskTray({ title, summary, toggleLabel, openLabel, defaultOpen = true, className, children, ...props }: TaskTrayProps) {\n const [open, setOpen] = React.useState(defaultOpen);\n const id = React.useId();\n return (\n <section\n aria-labelledby={`${id}-title`}\n data-state={open ? \"open\" : \"closed\"}\n className={cn(\n \"kz-tray fixed inset-x-0 bottom-0 z-40 flex max-h-[70dvh] flex-col rounded-t-2xl border border-border-default bg-surface-1 shadow-lg sm:inset-x-auto sm:bottom-4 sm:right-4 sm:w-96 sm:rounded-2xl\",\n className,\n )}\n {...props}\n >\n <header className=\"flex items-center gap-3 px-4 py-3\">\n <div className=\"min-w-0 flex-1\">\n <h2 id={`${id}-title`} className=\"m-0 text-sm font-semibold text-fg\">\n {title}\n </h2>\n <p className=\"m-0 truncate text-xs text-fg-secondary\">{summary}</p>\n </div>\n <button type=\"button\" aria-expanded={open} aria-controls={`${id}-body`} onClick={() => setOpen(!open)} className=\"rounded-md px-2 py-1 text-sm text-fg-secondary hover:text-fg focus-visible:focus-ring\">\n {open ? toggleLabel : openLabel}\n </button>\n </header>\n {open ? (\n <div id={`${id}-body`} className=\"kz-tray-body min-h-0 overflow-y-auto px-4 pb-2\">\n {children}\n </div>\n ) : null}\n </section>\n );\n}\n"],"mappings":";;;;;AAGO,IAAM,cAAc,EAAE,QAAQ,UAAU,SAAS,WAAW,UAAU,YAAY,MAAM,QAAQ,QAAQ,SAAS;AAIjH,SAAS,UAAU,QAA8B;AACtD,SAAO,WAAW,YAAY,WAAW,WAAW,YAAY;AAClE;AAWO,SAAS,MAAM,OAAuD;AAC3E,QAAM,QAAQ,CAAC,SAA2C,MAAM,OAAO,CAAC,SAAS,KAAK,KAAK,MAAM,CAAC,EAAE;AACpG,SAAO;AAAA,IACL,OAAO,MAAM;AAAA,IACb,SAAS,MAAM,SAAS;AAAA,IACxB,QAAQ,MAAM,CAAC,MAAM,MAAM,YAAY,MAAM;AAAA,IAC7C,MAAM,MAAM,CAAC,MAAM,MAAM,YAAY,IAAI;AAAA,IACzC,QAAQ,MAAM,CAAC,MAAM,MAAM,YAAY,MAAM;AAAA,EAC/C;AACF;AAGO,SAAS,WAAW,OAA+C;AACxE,SAAO,UAAU,UAAa,OAAO,MAAM,KAAK,IAAI,SAAY,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC;AAChG;;;AC/BA,YAAY,WAAW;AAuCT,SACE,KADF;AATP,SAAS,YAAY,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAqB;AACnF,SACE,oBAAC,SAAI,aAAU,UAAS,WAAuB,GAAG,OAChD,8BAAC,QAAG,cAAY,OAAO,WAAU,iEAC9B,gBAAM,IAAI,CAAC,SAAS;AACnB,UAAM,UAAU,UAAU,KAAK,MAAM;AACrC,UAAM,WAAW,WAAW,KAAK,QAAQ;AACzC,WACE,qBAAC,QAAiB,eAAa,KAAK,QAAQ,gBAAc,UAAU,KAAK,QAAW,WAAU,2CAC5F;AAAA,2BAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,UAAK,WAAU,uDAAuD,eAAK,MAAK;AAAA,QAChF,KAAK,SAAS,oBAAC,UAAK,WAAU,YAAY,eAAK,QAAO,IAAU;AAAA,QAChE,KAAK,WAAW,oBAAC,UAAK,WAAU,YAAY,eAAK,UAAS,IAAU;AAAA,SACvE;AAAA,MACA,oBAAC,UAAK,WAAW,GAAG,WAAW,KAAK,WAAW,YAAY,SAAS,mBAAmB,mBAAmB,GAAI,eAAK,YAAW;AAAA,MAC7H,WAAW,aAAa,SACvB,oBAAC,SAAI,MAAK,eAAc,cAAY,KAAK,MAAM,iBAAe,GAAG,iBAAe,KAAK,iBAAe,KAAK,MAAM,WAAW,GAAG,GAAG,WAAU,iDACxI,8BAAC,SAAI,WAAU,4CAA2C,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,GACpG,IACE;AAAA,SAXG,KAAK,EAYd;AAAA,EAEJ,CAAC,GACH,GACF;AAEJ;AAgBO,SAAS,SAAS,EAAE,OAAO,SAAS,aAAa,WAAW,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GAAkB;AACrI,QAAM,CAAC,MAAM,OAAO,IAAU,eAAS,WAAW;AAClD,QAAM,KAAW,YAAM;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,mBAAiB,GAAG,EAAE;AAAA,MACtB,cAAY,OAAO,SAAS;AAAA,MAC5B,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,6BAAC,YAAO,WAAU,qCAChB;AAAA,+BAAC,SAAI,WAAU,kBACb;AAAA,gCAAC,QAAG,IAAI,GAAG,EAAE,UAAU,WAAU,qCAC9B,iBACH;AAAA,YACA,oBAAC,OAAE,WAAU,0CAA0C,mBAAQ;AAAA,aACjE;AAAA,UACA,oBAAC,YAAO,MAAK,UAAS,iBAAe,MAAM,iBAAe,GAAG,EAAE,SAAS,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,WAAU,yFAC9G,iBAAO,cAAc,WACxB;AAAA,WACF;AAAA,QACC,OACC,oBAAC,SAAI,IAAI,GAAG,EAAE,SAAS,WAAU,kDAC9B,UACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krizaka/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.48.0",
|
|
4
4
|
"description": "The Krizaka front-end platform's components: the primitives (button, card, dialog, toast, menu, field, tabs, chip, switch, slider, command palette, theme, countdown…) on the semantic --kz-* tokens, the animated marks (Krizaka, Orazaka, Orochia, Yasakia, Yororis) and the motion signature — web and /native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"krizaka",
|
|
@@ -137,6 +137,10 @@
|
|
|
137
137
|
"types": "./dist/page-header.d.ts",
|
|
138
138
|
"import": "./dist/page-header.js"
|
|
139
139
|
},
|
|
140
|
+
"./agenda": {
|
|
141
|
+
"types": "./dist/agenda.d.ts",
|
|
142
|
+
"import": "./dist/agenda.js"
|
|
143
|
+
},
|
|
140
144
|
"./alert": {
|
|
141
145
|
"types": "./dist/alert.d.ts",
|
|
142
146
|
"import": "./dist/alert.js"
|
|
@@ -233,6 +237,18 @@
|
|
|
233
237
|
"types": "./dist/nav-bar.d.ts",
|
|
234
238
|
"import": "./dist/nav-bar.js"
|
|
235
239
|
},
|
|
240
|
+
"./account-settings": {
|
|
241
|
+
"types": "./dist/account-settings.d.ts",
|
|
242
|
+
"import": "./dist/account-settings.js"
|
|
243
|
+
},
|
|
244
|
+
"./drop-overlay": {
|
|
245
|
+
"types": "./dist/drop-overlay.d.ts",
|
|
246
|
+
"import": "./dist/drop-overlay.js"
|
|
247
|
+
},
|
|
248
|
+
"./upload-queue": {
|
|
249
|
+
"types": "./dist/upload-queue.d.ts",
|
|
250
|
+
"import": "./dist/upload-queue.js"
|
|
251
|
+
},
|
|
236
252
|
"./language-switch": {
|
|
237
253
|
"types": "./dist/language-switch.d.ts",
|
|
238
254
|
"import": "./dist/language-switch.js"
|
|
@@ -753,7 +769,7 @@
|
|
|
753
769
|
],
|
|
754
770
|
"peerDependencies": {
|
|
755
771
|
"@krizaka/query": ">=0.2.1",
|
|
756
|
-
"@krizaka/tailwind": ">=3.
|
|
772
|
+
"@krizaka/tailwind": ">=3.48.0",
|
|
757
773
|
"@maplibre/maplibre-react-native": ">=11",
|
|
758
774
|
"@shopify/flash-list": ">=2",
|
|
759
775
|
"expo-camera": ">=16",
|
|
@@ -813,8 +829,8 @@
|
|
|
813
829
|
"typescript": "^5.9.0",
|
|
814
830
|
"vitest": "^4.1.11",
|
|
815
831
|
"zod": "^4.6.5",
|
|
816
|
-
"@krizaka/
|
|
817
|
-
"@krizaka/
|
|
832
|
+
"@krizaka/config": "0.7.0",
|
|
833
|
+
"@krizaka/query": "0.2.1"
|
|
818
834
|
},
|
|
819
835
|
"engines": {
|
|
820
836
|
"node": ">=22"
|
|
@@ -1075,6 +1091,16 @@
|
|
|
1075
1091
|
"clsx"
|
|
1076
1092
|
]
|
|
1077
1093
|
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "./agenda",
|
|
1096
|
+
"path": "dist/agenda.js",
|
|
1097
|
+
"limit": "2 kB",
|
|
1098
|
+
"gzip": true,
|
|
1099
|
+
"ignore": [
|
|
1100
|
+
"tailwind-variants",
|
|
1101
|
+
"clsx"
|
|
1102
|
+
]
|
|
1103
|
+
},
|
|
1078
1104
|
{
|
|
1079
1105
|
"name": "./alert",
|
|
1080
1106
|
"path": "dist/alert.js",
|
|
@@ -2073,7 +2099,7 @@
|
|
|
2073
2099
|
{
|
|
2074
2100
|
"name": "./settings-layout",
|
|
2075
2101
|
"path": "dist/settings-layout.js",
|
|
2076
|
-
"limit": "
|
|
2102
|
+
"limit": "5 kB",
|
|
2077
2103
|
"gzip": true,
|
|
2078
2104
|
"ignore": [
|
|
2079
2105
|
"tailwind-variants",
|
|
@@ -2574,8 +2600,8 @@
|
|
|
2574
2600
|
"sonner": "^2.0.8",
|
|
2575
2601
|
"tailwind-variants": "^3.3.1",
|
|
2576
2602
|
"@krizaka/intl": "^0.2.1",
|
|
2577
|
-
"@krizaka/
|
|
2578
|
-
"@krizaka/
|
|
2603
|
+
"@krizaka/tokens": "^3.48.0",
|
|
2604
|
+
"@krizaka/pacer": "^0.1.0"
|
|
2579
2605
|
},
|
|
2580
2606
|
"scripts": {
|
|
2581
2607
|
"build": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});for(const f of fs.readdirSync('registry/examples',{recursive:true}))if(/\\.(js|d\\.ts)$/.test(f))fs.rmSync('registry/examples/'+f)\" && tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css');require('node:fs').copyFileSync('src/blocks.css','dist/blocks.css');require('node:fs').copyFileSync('src/story.css','dist/story.css')\" && node scripts/build-registry.mjs",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"files": [
|
|
168
168
|
{
|
|
169
169
|
"path": "account-menu/account-menu.tsx",
|
|
170
|
-
"content": "// Client (a portal). The signed-in person's menu under their avatar — who you are first (picture, name, e-mail), then\n// the places (profile, settings), the language as a compact submenu, the extras, and Sign out (a quiet item, not a\n// red alert). Built on DropdownMenu, so the keyboard, the focus return and the collisions are Radix's.\nimport * as React from \"react\";\n\nimport { Avatar, type AvatarProps } from \"../avatar/avatar\";\nimport { cn } from \"../cn\";\nimport { DropdownMenu } from \"../dropdown-menu/dropdown-menu\";\n\nexport interface AccountMenuLink {\n id: string;\n label: string;\n href: string;\n /** A signature icon. */\n icon?: React.ReactNode;\n}\n\nexport interface AccountMenuLanguage {\n /** The row's words (`Language`). */\n label: string;\n /** The current value (`en`). */\n value: string;\n options: readonly { value: string; label: string }[];\n onChange: (value: string) => void;\n}\n\nexport interface AccountMenuProps {\n /** The trigger's accessible name (`Account`). */\n label: string;\n /** Their name; falls back to the e-mail. */\n name?: string;\n /** Their e-mail, shown under the name. */\n email?: string;\n /** The picture: `src`, or `defaultAvatar` (`{ brand, seed }`) for the product's default person. */\n avatar?: Omit<AvatarProps, \"size\">;\n /** Show the name beside the avatar in the trigger from the `sm` breakpoint. */\n showName?: boolean;\n /** Where to go: profile, settings… */\n links?: readonly AccountMenuLink[];\n /** The app's link component (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The language, as a submenu that shows the current one. */\n language?: AccountMenuLanguage;\n /** Extra rows between the language and Sign out (a theme switch…). */\n children?: React.ReactNode;\n /** The last row: its words, what it does, an optional icon. */\n signOut: { label: string; onSelect: () => void; icon?: React.ReactNode };\n /** Classes for the trigger. */\n className?: string;\n}\n\n/** The account menu: avatar trigger → identity header, links, language submenu, Sign out. */\nexport function AccountMenu({ label, name, email, avatar, showName = true, links = [], linkAs: Link = \"a\", language, children, signOut, className }: AccountMenuProps) {\n const title = name || email || \"\";\n const current = language?.options.find((o) => o.value === language.value)?.label;\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger\n aria-label={label}\n className={cn(\"flex items-center gap-2.5 rounded-lg p-1 transition-colors duration-150 hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\", className)}\n >\n <Avatar size=\"sm\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n {/* Drawn by CSS: the name is not text of the button, so its accessible name stays `label` with no label-content-name-mismatch. */}\n {showName && title && <span aria-hidden data-name={title} className=\"hidden max-w-40 truncate text-sm font-medium text-fg-secondary after:content-[attr(data-name)] sm:inline-block\" />}\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" className=\"w-64\">\n <DropdownMenu.Label className=\"flex items-center gap-3 py-2 normal-case tracking-normal\">\n <Avatar size=\"md\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n <span className=\"min-w-0\">\n <span className=\"block truncate text-sm font-semibold text-fg\">{title}</span>\n {name && email && <span className=\"block truncate text-xs font-normal text-fg-secondary\">{email}</span>}\n </span>\n </DropdownMenu.Label>\n {links.length > 0 && <DropdownMenu.Separator />}\n {links.map((link) => (\n <DropdownMenu.Item key={link.id} asChild>\n <Link href={link.href}>\n {link.icon}\n {link.label}\n </Link>\n </DropdownMenu.Item>\n ))}\n {(language || children) && <DropdownMenu.Separator />}\n {language && (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger>\n {language.label}\n {current && <span className=\"ml-auto mr-1 text-xs text-fg-secondary\">{current}</span>}\n </DropdownMenu.SubTrigger>\n <DropdownMenu.SubContent>\n <DropdownMenu.RadioGroup value={language.value} onValueChange={language.onChange}>\n {language.options.map((o) => (\n <DropdownMenu.RadioItem key={o.value} value={o.value}>\n {o.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n )}\n {children}\n <DropdownMenu.Separator />\n <DropdownMenu.Item onSelect={() => signOut.onSelect()}>\n {signOut.icon}\n {signOut.label}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n"
|
|
170
|
+
"content": "// Client (a portal). The signed-in person's menu under their avatar — who you are first (picture, name, e-mail), then\n// the places (profile, settings), the language as a compact submenu, the extras, and Sign out (a quiet item, not a\n// red alert). Built on DropdownMenu, so the keyboard, the focus return and the collisions are Radix's.\nimport * as React from \"react\";\n\nimport { Avatar, type AvatarProps } from \"../avatar/avatar\";\nimport { cn } from \"../cn\";\nimport { DropdownMenu } from \"../dropdown-menu/dropdown-menu\";\n\nexport interface AccountMenuLink {\n id: string;\n label: string;\n href: string;\n /** A signature icon. */\n icon?: React.ReactNode;\n}\n\nexport interface AccountMenuLanguage {\n /** The row's words (`Language`). */\n label: string;\n /** The current value (`en`). */\n value: string;\n options: readonly { value: string; label: string }[];\n onChange: (value: string) => void;\n}\n\nexport interface AccountMenuProps {\n /** The trigger's accessible name (`Account`). */\n label: string;\n /** Their name; falls back to the e-mail. */\n name?: string;\n /** Their e-mail, shown under the name. */\n email?: string;\n /** The picture: `src`, or `defaultAvatar` (`{ brand, seed }`) for the product's default person. */\n avatar?: Omit<AvatarProps, \"size\">;\n /** Show the name beside the avatar in the trigger from the `sm` breakpoint. */\n showName?: boolean;\n /** Where to go: profile, settings… */\n links?: readonly AccountMenuLink[];\n /** The app's link component (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The language, as a submenu that shows the current one. */\n language?: AccountMenuLanguage;\n /** Extra rows between the language and Sign out (a theme switch…). */\n children?: React.ReactNode;\n /** The last row: its words, what it does, an optional icon. */\n signOut: { label: string; onSelect: () => void; icon?: React.ReactNode };\n /** Classes for the trigger. */\n className?: string;\n}\n\n/** The account menu: avatar trigger → identity header, links, language submenu, Sign out. */\nexport function AccountMenu({ label, name, email, avatar, showName = true, links = [], linkAs: Link = \"a\", language, children, signOut, className }: AccountMenuProps) {\n const title = name || email || \"\";\n const current = language?.options.find((o) => o.value === language.value)?.label;\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger\n aria-label={label}\n className={cn(\"flex items-center gap-2.5 rounded-lg p-1 transition-colors duration-150 hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\", className)}\n >\n <Avatar size=\"sm\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n {/* Drawn by CSS: the name is not text of the button, so its accessible name stays `label` with no label-content-name-mismatch. */}\n {showName && title && <span aria-hidden data-name={title} className=\"hidden max-w-40 truncate text-sm font-medium text-fg-secondary after:content-[attr(data-name)] sm:inline-block\" />}\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" className=\"w-64\">\n <DropdownMenu.Label className=\"flex items-center gap-3 py-2 normal-case tracking-normal\">\n <Avatar size=\"md\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n <span className=\"min-w-0\">\n <span className=\"block truncate text-sm font-semibold text-fg\">{title}</span>\n {name && email && name !== email && <span className=\"block truncate text-xs font-normal text-fg-secondary\">{email}</span>}\n </span>\n </DropdownMenu.Label>\n {links.length > 0 && <DropdownMenu.Separator />}\n {links.map((link) => (\n <DropdownMenu.Item key={link.id} asChild>\n <Link href={link.href}>\n {link.icon}\n {link.label}\n </Link>\n </DropdownMenu.Item>\n ))}\n {(language || children) && <DropdownMenu.Separator />}\n {language && (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger>\n {language.label}\n {current && <span className=\"ml-auto mr-1 text-xs text-fg-secondary\">{current}</span>}\n </DropdownMenu.SubTrigger>\n <DropdownMenu.SubContent>\n <DropdownMenu.RadioGroup value={language.value} onValueChange={language.onChange}>\n {language.options.map((o) => (\n <DropdownMenu.RadioItem key={o.value} value={o.value}>\n {o.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n )}\n {children}\n <DropdownMenu.Separator />\n <DropdownMenu.Item onSelect={() => signOut.onSelect()}>\n {signOut.icon}\n {signOut.label}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n"
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"path": "account-menu/index.ts",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"path": "meta.ts",
|
|
182
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
182
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
183
183
|
}
|
|
184
184
|
],
|
|
185
185
|
"dependencies": [],
|