@dqa-ai-solutions/ui-runtime 0.0.0-stage → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +49 -2
  2. package/dist/_types/ui-kit/index.d.ts +4 -0
  3. package/dist/_types/ui-kit/lens/action.d.ts +76 -0
  4. package/dist/_types/ui-kit/lens/cell.d.ts +79 -0
  5. package/dist/_types/ui-kit/lens/diagnostic.d.ts +49 -0
  6. package/dist/_types/ui-kit/lens/format.d.ts +32 -0
  7. package/dist/_types/ui-kit/lens/index.d.ts +12 -0
  8. package/dist/_types/ui-kit/lens/list.d.ts +223 -0
  9. package/dist/_types/ui-kit/lens/milestone.d.ts +112 -0
  10. package/dist/_types/ui-kit/lens/pattern.d.ts +38 -0
  11. package/dist/_types/ui-kit/lens/queue.d.ts +30 -0
  12. package/dist/_types/ui-kit/lens/record.d.ts +110 -0
  13. package/dist/_types/ui-kit/lens/registry.d.ts +9 -0
  14. package/dist/_types/ui-kit/lens/shape.d.ts +27 -0
  15. package/dist/_types/ui-kit/lens/timeline.d.ts +36 -0
  16. package/dist/_types/ui-kit/primitives/action.d.ts +263 -0
  17. package/dist/_types/ui-kit/primitives/component-css.d.ts +10 -0
  18. package/dist/_types/ui-kit/primitives/index.d.ts +5 -0
  19. package/dist/_types/ui-kit/primitives/spec.d.ts +102 -0
  20. package/dist/_types/ui-kit/primitives/state.d.ts +148 -0
  21. package/dist/_types/ui-kit/primitives/stylesheet.d.ts +37 -0
  22. package/dist/_types/ui-kit/shell/index.d.ts +2 -0
  23. package/dist/_types/ui-kit/shell/nav.d.ts +142 -0
  24. package/dist/_types/ui-kit/shell/trail.d.ts +85 -0
  25. package/dist/_types/ui-kit/tokens/emit.d.ts +70 -0
  26. package/dist/_types/ui-kit/tokens/index.d.ts +6 -0
  27. package/dist/_types/ui-kit/tokens/oklch.d.ts +53 -0
  28. package/dist/_types/ui-kit/tokens/resolve.d.ts +4 -0
  29. package/dist/_types/ui-kit/tokens/scales.d.ts +325 -0
  30. package/dist/_types/ui-kit/tokens/theme.dqa.d.ts +2 -0
  31. package/dist/_types/ui-kit/tokens/types.d.ts +252 -0
  32. package/dist/_types/ui-react/elements/action-bar.d.ts +32 -0
  33. package/dist/_types/ui-react/elements/action-scope.d.ts +9 -0
  34. package/dist/_types/ui-react/elements/button.d.ts +42 -0
  35. package/dist/_types/ui-react/elements/choice.d.ts +40 -0
  36. package/dist/_types/ui-react/elements/columns.d.ts +82 -0
  37. package/dist/_types/ui-react/elements/dialog-scope.d.ts +15 -0
  38. package/dist/_types/ui-react/elements/dialog.d.ts +67 -0
  39. package/dist/_types/ui-react/elements/disclosure.d.ts +305 -0
  40. package/dist/_types/ui-react/elements/field-attributes.d.ts +39 -0
  41. package/dist/_types/ui-react/elements/field.d.ts +628 -0
  42. package/dist/_types/ui-react/elements/file.d.ts +82 -0
  43. package/dist/_types/ui-react/elements/filter.d.ts +61 -0
  44. package/dist/_types/ui-react/elements/link.d.ts +38 -0
  45. package/dist/_types/ui-react/elements/menu.d.ts +56 -0
  46. package/dist/_types/ui-react/elements/milestone.d.ts +119 -0
  47. package/dist/_types/ui-react/elements/nav.d.ts +73 -0
  48. package/dist/_types/ui-react/elements/pop.d.ts +14 -0
  49. package/dist/_types/ui-react/elements/record.d.ts +174 -0
  50. package/dist/_types/ui-react/elements/segmented.d.ts +59 -0
  51. package/dist/_types/ui-react/elements/suggest.d.ts +11 -0
  52. package/dist/_types/ui-react/elements/surface.d.ts +354 -0
  53. package/dist/_types/ui-react/elements/table.d.ts +72 -0
  54. package/dist/_types/ui-react/elements/toast.d.ts +69 -0
  55. package/dist/_types/ui-react/index.d.ts +22 -0
  56. package/dist/_types/ui-react/prefix/index.d.ts +8 -0
  57. package/dist/chunks/chunk-5NTG4J62.js +11 -0
  58. package/dist/chunks/chunk-66DQVLFK.js +5 -0
  59. package/dist/chunks/chunk-7WHYHIUX.js +1 -0
  60. package/dist/chunks/chunk-JOIDPECM.js +3 -0
  61. package/dist/chunks/chunk-MS2W22ER.js +3 -0
  62. package/dist/index.d.ts +1 -0
  63. package/dist/index.js +1 -0
  64. package/dist/kit.css +2291 -0
  65. package/dist/lens.d.ts +1 -0
  66. package/dist/lens.js +1 -0
  67. package/dist/primitives.d.ts +1 -0
  68. package/dist/primitives.js +1 -0
  69. package/dist/react.d.ts +1 -0
  70. package/dist/react.js +1 -0
  71. package/dist/shell.d.ts +1 -0
  72. package/dist/shell.js +1 -0
  73. package/dist/tokens.css +160 -0
  74. package/dist/tokens.d.ts +1 -0
  75. package/dist/tokens.dark.css +98 -0
  76. package/dist/tokens.generated.css +98 -0
  77. package/dist/tokens.high.css +98 -0
  78. package/dist/tokens.js +1 -0
  79. package/package.json +61 -4
@@ -0,0 +1,82 @@
1
+ import type { InputHTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * TAKES A DOCUMENT — the whole area, click or drop.
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ⛔ WHY A BARE `<input type="file">` IS NOT AN OPTION
7
+ *
8
+ * It renders the BROWSER's label — "Choose File / No file chosen" on an
9
+ * English machine — and no attribute changes it. A form in any other language
10
+ * ends up with one English button in the middle of it. So the real input is
11
+ * hidden (visually, not from the keyboard or a screen reader) and the label
12
+ * around it is what a person sees.
13
+ *
14
+ * ⚠️ AND THE MISTAKE THE EARLIER VERSION MADE, KEPT HERE SO IT IS NOT REMADE
15
+ *
16
+ * A dashed frame is a settled convention: *drop a file here, or click here*.
17
+ * The earlier cut drew that frame but only the BUTTON INSIDE it was
18
+ * clickable. People clicked the empty space, nothing happened, and concluded
19
+ * the screen was broken. The frame promised one thing and did another.
20
+ *
21
+ * So the whole area is the `<label>`: a click anywhere in the frame opens the
22
+ * picker, and a dropped file is accepted. There is no button.
23
+ *
24
+ * ⛔ THE PICKER'S `accept` IS A SUGGESTION, AND A DROP SKIPS IT ENTIRELY.
25
+ * The file dialog greys out other kinds (and a person can switch it to "All
26
+ * files"); a dropped file never meets the attribute at all. There is no
27
+ * HTML attribute for size. So this box judges every file it is handed —
28
+ * picked or dropped — by `accept` and `maxBytes`, with the same rule
29
+ * `@dqa-ai-solutions/core-runtime`'s `fileViolation` applies at the upload (the parity
30
+ * test holds them together). A file turned away is not put on the input,
31
+ * and `refused` says why: silence here is the dashed-frame mistake again.
32
+ *
33
+ * ⛔ NO WORDS OF ITS OWN. `main`, `hint` and `clear` are required props with no
34
+ * defaults: the kernel is language-neutral, and a default English string
35
+ * would ship silently into every screen that forgot to pass one.
36
+ * ═══════════════════════════════════════════════════════════════════════════
37
+ */
38
+ export interface FileFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'children'> {
39
+ /** What the empty area says. */
40
+ main: ReactNode;
41
+ /** What it says once a file is chosen — receives the file. */
42
+ chosenMain?: (file: File) => ReactNode;
43
+ /** The line under it, empty state. */
44
+ hint?: ReactNode;
45
+ /** The line under it, once a file is chosen. */
46
+ chosenHint?: ReactNode;
47
+ /** Label for the remove control. Omit it and no remove control is drawn. */
48
+ clearLabel?: ReactNode;
49
+ /** The two glyphs. Given by the app: the kernel draws no icons. */
50
+ mark?: ReactNode;
51
+ chosenMark?: ReactNode;
52
+ /** Called with the picked file, or `null` when it is cleared. */
53
+ onPick?: (file: File | null) => void;
54
+ /** The largest file taken, in bytes — the property's `maxBytes`. */
55
+ maxBytes?: number;
56
+ /** What the hint line says when a file is turned away. Required once `accept` or `maxBytes` is set. */
57
+ refused?: (why: FileRefusal) => ReactNode;
58
+ /** Told when a file is turned away. */
59
+ onRefuse?: (why: FileRefusal) => void;
60
+ invalid?: boolean;
61
+ className?: string;
62
+ }
63
+ /** Why a file was turned away — the keyword and limit `fileViolation` reports. */
64
+ export type FileRefusal = {
65
+ keyword: 'maxBytes';
66
+ limit: number;
67
+ file: File;
68
+ } | {
69
+ keyword: 'accept';
70
+ limit: string[];
71
+ file: File;
72
+ };
73
+ /**
74
+ * Is this file one the box takes? Same order and same matching as
75
+ * `fileViolation` in `@dqa-ai-solutions/core-runtime`: size first; then `.ext` by name,
76
+ * `type/*` by MIME family, `type/subtype` exactly. A file with no MIME type is
77
+ * judged by its extension alone — and refused if no listed extension fits.
78
+ */
79
+ export declare function fileRefusal(file: File, accept: string | string[] | undefined, maxBytes: number | undefined): FileRefusal | null;
80
+ export declare function FileField({ main, chosenMain, hint, chosenHint, clearLabel, mark, chosenMark, onPick, maxBytes, refused, onRefuse, invalid, className, id: idProp, disabled, ...rest }: FileFieldProps): import("react").JSX.Element;
81
+ /** `1.4 MB` · `812 KB` — a magnitude, not a sentence. No locale in it. */
82
+ export declare const fileSize: (bytes: number) => string;
@@ -0,0 +1,61 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * ONE FACET OF A LIST FILTER — and it takes almost no room until it is used.
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ⛔ WHAT THIS REPLACES, AND WHY THE FIRST TWO TRIES WERE BOTH WRONG
7
+ *
8
+ * ① A "lifecycle band": a title, a stacked proportion bar, and a row of count
9
+ * chips, sitting above every list. It answered *what is the ratio* while
10
+ * the person was asking *show me the ones that are stuck* — and it took the
11
+ * top of the screen to do it.
12
+ *
13
+ * ② A segmented control: the same values, one line lower. Better, and still
14
+ * wrong for the same reason — every choice is on screen before anyone has
15
+ * asked for any of them. On a list with twelve states it is a wall.
16
+ *
17
+ * ⭐ THE THING BOTH MISSED IS NOT A NICER WIDGET. IT IS LESS FURNITURE.
18
+ *
19
+ * not filtering → one small `+ Filter` button, and nothing else
20
+ * filtering → one pill reading `State: In draft ×`
21
+ * choosing → a list, opened on purpose, with counts
22
+ *
23
+ * The twelve states of a roster are NOT VISIBLE until someone opens them.
24
+ * ═══════════════════════════════════════════════════════════════════════════
25
+ *
26
+ * ⚠️ SINGLE CHOICE, DELIBERATELY. Multi-select is what a person expects in
27
+ * 2026, and the list endpoints behind this take ONE value. Drawing tick
28
+ * boxes over an API that cannot honour them builds a promise that breaks on
29
+ * the second tick. When the endpoint takes an array, this grows a `values`
30
+ * prop and the popover grows a search box — not before.
31
+ */
32
+ export interface FilterOption {
33
+ /** Empty string means "no filter" — the entry that clears the facet. */
34
+ value: string;
35
+ label: ReactNode;
36
+ /** How many records sit behind this choice. `0` is worth showing. */
37
+ count?: number;
38
+ }
39
+ export interface FilterSelectProps {
40
+ /** The facet's name — "State", "Kind". Read out, and shown once chosen. */
41
+ label: string;
42
+ /** Empty string = not filtering. */
43
+ value: string;
44
+ options: FilterOption[];
45
+ onPick: (value: string) => void;
46
+ /** What the unset button says. No default: the kernel carries no language. */
47
+ addLabel: ReactNode;
48
+ /** Accessible name for the control that clears this facet. */
49
+ clearLabel: string;
50
+ /**
51
+ * The glyph inside that control.
52
+ *
53
+ * ⛔ The kernel draws no icons — it does not know the app's icon set, and a
54
+ * hard-coded `×` is a different weight and a different vertical rhythm from
55
+ * every other icon on the screen. Falls back to `×` only so the control is
56
+ * never invisible.
57
+ */
58
+ clearIcon?: ReactNode;
59
+ className?: string;
60
+ }
61
+ export declare function FilterSelect({ label, value, options, onPick, addLabel, clearLabel, clearIcon, className, }: FilterSelectProps): import("react").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import type { AnchorHTMLAttributes, ElementType, ReactNode } from 'react';
2
+ /**
3
+ * A LINK — goes somewhere, and never commits.
4
+ *
5
+ * ⚠️ The kit is explicit that this is a different thing from a button, and says
6
+ * why in the stylesheet itself: *"drawn as a button, a reader cannot tell
7
+ * which one is safe to press twice."* So this component refuses to be one —
8
+ * it has no `type`, no tier, and no busy state.
9
+ *
10
+ * ⛔ WHAT `as` IS FOR, AND WHAT IT IS NOT FOR
11
+ *
12
+ * A React app almost always routes with something — `react-router`'s `Link`,
13
+ * a framework's own. The kernel must not know which, so the caller passes it:
14
+ *
15
+ * <Link as={RouterLink} to="/plans">Kế hoạch</Link>
16
+ *
17
+ * It is an escape hatch for the ROUTER, not for the tag. Passing `as="button"`
18
+ * defeats the distinction this element exists to hold, so the disabled path
19
+ * below ignores `as` entirely.
20
+ */
21
+ export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
22
+ href?: string;
23
+ /** The router's own link component. Anything else is a mistake — see above. */
24
+ as?: ElementType;
25
+ /**
26
+ * Reachable, but not now.
27
+ *
28
+ * ⛔ NOT `<a disabled>` — that attribute does nothing on an anchor, and a
29
+ * "disabled" link written that way stays clickable, stays focusable, and
30
+ * stays announced as a link. The kit's rule targets
31
+ * `[aria-disabled="true"]` for exactly this reason, so that is what gets
32
+ * written, and the `href` is removed so the platform stops treating it as
33
+ * a destination at all.
34
+ */
35
+ disabled?: boolean;
36
+ children?: ReactNode;
37
+ }
38
+ export declare function Link({ as, disabled, className, href, onClick, ...rest }: LinkProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1,56 @@
1
+ import type { ButtonHTMLAttributes, ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * A MENU IS A LIST, AND ITS ITEMS ARE LIST ITEMS.
4
+ *
5
+ * ⛔ A stack of `<button>`s in a `<div>` announces "button, button, button" and
6
+ * never says how many there are or which one you are on. `<ul role="menu">`
7
+ * with `role="menuitem"` children says "menu, 4 items, item 2 of 4" — the
8
+ * two facts that make a menu usable without sight.
9
+ *
10
+ * ⚠️ Container and item are declared as two elements in the kit for the same
11
+ * reason `table` has `th` and `td`: the container owns no hover and no
12
+ * focus, and asking it for those left four cells of the coverage matrix
13
+ * unanswered until they were split.
14
+ */
15
+ export interface MenuProps extends Omit<HTMLAttributes<HTMLUListElement>, 'role'> {
16
+ /** Names the menu for anyone who cannot see what opened it. */
17
+ label: string;
18
+ children?: ReactNode;
19
+ }
20
+ export declare const Menu: ({ label, className, children, ...rest }: MenuProps) => import("react").JSX.Element;
21
+ export interface MenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
22
+ /** Dấu của mục này. Bắt buộc — xem `doiHinh`. */
23
+ icon: ReactNode;
24
+ /** This is where you are. Drawn by the kit through `[aria-current="page"]`. */
25
+ current?: boolean;
26
+ /**
27
+ * ⭐ A menu item that GOES SOMEWHERE is a link, not a button.
28
+ *
29
+ * "Sign out" is a command and stays a `<button>`; "Switch workspace" is a
30
+ * destination, and a destination the platform cannot open in a new tab,
31
+ * cannot copy, and does not announce as a link is a destination in
32
+ * disguise. Pass `"a"` or the router's own component.
33
+ */
34
+ as?: ElementType;
35
+ /**
36
+ * ⚠️ Khoá tự do cho thẻ mà `as` chỉ tới — `href`, `to`, `target`… Gói không
37
+ * biết trước bộ định tuyến của app dùng khoá nào, và liệt kê hết là khoá
38
+ * cứng gói vào một thư viện.
39
+ */
40
+ [key: string]: unknown;
41
+ children?: ReactNode;
42
+ }
43
+ /**
44
+ * ⛔ `type="button"` IS NOT OPTIONAL. A `<button>` with no type inside a form
45
+ * is a SUBMIT button, so a menu opened from a form submits it on the way to
46
+ * doing whatever the item was for.
47
+ */
48
+ export declare function MenuItem({ icon, current, as, className, children, ...rest }: MenuItemProps): import("react").JSX.Element;
49
+ /**
50
+ * A rule between groups of items.
51
+ *
52
+ * ⚠️ NO CLASS OF ITS OWN. The kit draws it as a descendant rule on the menu —
53
+ * a PART of the menu, anchored to the role a screen reader actually reads.
54
+ * A dedicated class would let someone draw the line and forget the role.
55
+ */
56
+ export declare const MenuSeparator: () => import("react").JSX.Element;
@@ -0,0 +1,119 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * A ROUTE, AND WHERE ON IT THE RECORD IS.
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ⛔ THIS DRAWS. IT DECIDES NOTHING, AND IT NAMES NOTHING.
7
+ *
8
+ * `milestoneModel` in `@dqa-ai-solutions/ui-kit` works out which points exist, what order
9
+ * they come in, which one the record is on, and which gate it is waiting for.
10
+ * Every word printed here — a point's label, an actor's name — arrives as a
11
+ * prop from the application. Same law as `Badge`: it takes children, it never
12
+ * invents "Đang xử lý".
13
+ *
14
+ * ⚠️ SO `standing` IS NOT A COLOUR CHOICE. It is the model's answer, and the
15
+ * kit already has CSS for all three. A caller passing the standing it wishes
16
+ * were true rather than the one the model computed will draw a route that
17
+ * disagrees with the record it sits above, and nothing will say so.
18
+ *
19
+ * ⭐ NOT `<ol>`, AND THE REASON IS ASSISTIVE, NOT VISUAL. An ordered list
20
+ * announces "list, 6 items, item 1 of 6" and stops — a reader hears the
21
+ * positions and never hears which one is CURRENT, which is the single thing
22
+ * the strip exists to say. `<nav>` was wrong too: nothing here navigates.
23
+ * A group with an accessible name, and one `aria-current` on the point the
24
+ * record is on, is what actually reads back correctly.
25
+ * ═══════════════════════════════════════════════════════════════════════════
26
+ */
27
+ export interface MilestonesProps extends HTMLAttributes<HTMLDivElement> {
28
+ /**
29
+ * What this route is a route THROUGH — a record's name, a process's label.
30
+ *
31
+ * ⚠️ Required, because a group with no name is announced as "group" and a
32
+ * screen with two of them is announced as "group, group".
33
+ */
34
+ label: string;
35
+ children?: ReactNode;
36
+ }
37
+ export declare function Milestones({ label, className, children, ...rest }: MilestonesProps): import("react").JSX.Element;
38
+ /** Where a point sits relative to the record — see `MilestoneStanding` in the kit. */
39
+ export type Standing = 'past' | 'current' | 'ahead';
40
+ /**
41
+ * How a gate was ruled on — the only two answers a picture can hold.
42
+ *
43
+ * ⚠️ `passed`/`refused` rather than `approved`/`rejected`: a gate is not always
44
+ * an approval. A test passed, a condition met, a check that came back clean
45
+ * are all the same shape, and the word must not narrow them to one domain.
46
+ */
47
+ export type Settlement = 'passed' | 'refused';
48
+ export interface MilestoneProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
49
+ /** The point's own word — a state's label, or the label of the step opening a gate. */
50
+ label: ReactNode;
51
+ standing: Standing;
52
+ /**
53
+ * A gate rather than a state: a condition standing between two points.
54
+ *
55
+ * ⛔ DRAWN DIFFERENTLY BECAUSE IT IS DIFFERENT, and the reader must not have
56
+ * to read the label to find out. A record is never *in* a gate.
57
+ */
58
+ gate?: boolean;
59
+ awaiting?: boolean;
60
+ /**
61
+ * This gate has been RULED ON, and which way it went.
62
+ *
63
+ * ⛔ WITHOUT THIS, AN APPROVED GATE GOES ON WEARING THE WAITING COLOUR. On a
64
+ * cross-level line the record deliberately does not move when the level
65
+ * above decides, so the kit stands the gate `past` on the verdict alone —
66
+ * but `--gate` repaints the dot after `--past` does, and the reader is left
67
+ * with a warn-coloured ring sitting under the words "already approved".
68
+ * Reported on the reference app 9/9/2026, in those words.
69
+ *
70
+ * ⚠️ TWO VALUES, NOT THE VERDICT ITSELF. `Milestone.verdict` in the kit is the
71
+ * application's own word — `approve`, `RETURNED`, whatever the domain
72
+ * says — and this package must not learn to read domain vocabulary. The
73
+ * app maps its word onto one of these two; drawing is ours, naming is not.
74
+ */
75
+ settled?: Settlement;
76
+ /** Whose move it is here, and when it happened. The application's words. */
77
+ who?: ReactNode;
78
+ /**
79
+ * What goes in the point itself: a tick, an index, a verdict mark.
80
+ *
81
+ * ⚠️ Never load-bearing on its own. Standing is carried by colour AND by the
82
+ * connector AND by `aria-current`; the mark is the fourth channel, not the
83
+ * first. Absent is fine.
84
+ */
85
+ mark?: ReactNode;
86
+ }
87
+ export declare function Milestone({ label, standing, gate, awaiting, settled, who, mark, className, ...rest }: MilestoneProps): import("react").JSX.Element;
88
+ /**
89
+ * WORK THAT HAS NO POSITION ON THE ROUTE, gathered under the rail.
90
+ *
91
+ * ⛔ THREE KINDS FAIL TO BE A POINT, AND ALL THREE ARE ORDINARY.
92
+ *
93
+ * return walks the record backward — 22 of 54 processes have one
94
+ * parallel another role's work, running alongside, blocking nobody
95
+ * optional outside the sequence, taken only when needed
96
+ *
97
+ * Drawn as another point, each asserts an order it does not hold: a return
98
+ * would read as coming AFTER the state it returns to, and parallel work as a
99
+ * step everyone must pass through.
100
+ *
101
+ * ⚠️ GREW FROM `MilestonesReturn`, WHICH KNEW ONLY THE FIRST KIND. The second
102
+ * screen to want a route had three lines of the other two, and stacking three
103
+ * `MilestonesReturn` gave three dividers for one seam — the foot owns the
104
+ * rule, its lines do not.
105
+ */
106
+ export declare function MilestonesFoot({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
107
+ export interface MilestoneNoteProps extends HTMLAttributes<HTMLParagraphElement> {
108
+ /**
109
+ * The mark that says which kind this is.
110
+ *
111
+ * ⚠️ REQUIRED, and it is not decoration. These three lines sit together and
112
+ * read alike; without a mark apiece, "you can go back" and "somebody else
113
+ * is doing this" are one undifferentiated grey paragraph. The application
114
+ * supplies the mark — naming what a kind LOOKS like is ours, naming the
115
+ * kinds is not.
116
+ */
117
+ mark: ReactNode;
118
+ }
119
+ export declare function MilestoneNote({ mark, className, children, ...rest }: MilestoneNoteProps): import("react").JSX.Element;
@@ -0,0 +1,73 @@
1
+ import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ReactNode } from 'react';
2
+ /**
3
+ * ĐIỀU HƯỚNG — và ba thứ ở đây KHÔNG phải một thứ với ba kiểu dáng.
4
+ *
5
+ * ═══════════════════════════════════════════════════════════════════════════
6
+ * ⭐ `tab` · `rail-item` · `segmented-item` KHÁC NHAU Ở CÂU HỎI CHÚNG TRẢ LỜI
7
+ *
8
+ * rail-item ĐI TỚI MỘT MÀN KHÁC — đường dẫn đổi, cả trang đổi
9
+ * tab ĐỔI LÁT NÀO CỦA MÀN NÀY — nội dung thay, vẫn một màn
10
+ * segmented-item ĐỔI CÁCH NHÌN CÙNG NỘI DUNG — danh sách y nguyên, lọc lại
11
+ *
12
+ * Vẽ giống nhau thì người đọc không đoán được một cú bấm sẽ đưa họ đi xa bao
13
+ * nhiêu. Nhân đánh dấu chúng khác nhau có chủ ý — thẻ gạch chân dưới, lát tô
14
+ * nền — và đó là lý do chúng là ba phần tử, không phải một cái có cờ.
15
+ *
16
+ * ⚠️ `aria-current` KHÔNG PHẢI `:active`. Nhân đã tách hai trạng thái ấy trong
17
+ * chuẩn: `active` là NGÓN TAY ĐANG ĐÈ, `current` là ĐANG Ở ĐÂY và nó sống
18
+ * sau khi mọi ngón tay đã rời. Gộp một chữ là bỏ sót một trạng thái thật —
19
+ * lần trước gộp làm ba phần tử không được vẽ trạng thái nào.
20
+ * ═══════════════════════════════════════════════════════════════════════════
21
+ */
22
+ export interface TabsProps {
23
+ /** ⛔ Bắt buộc: một hàng thẻ không tên thì đọc lên là mấy cái nút rời rạc. */
24
+ label: string;
25
+ children?: ReactNode;
26
+ className?: string;
27
+ }
28
+ export declare const Tabs: ({ label, className, children }: TabsProps) => import("react").JSX.Element;
29
+ export interface TabProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
30
+ /** Dấu của lát này. Bắt buộc — xem `doiHinh`. */
31
+ icon: ReactNode;
32
+ /** Lát đang xem. */
33
+ current?: boolean;
34
+ /**
35
+ * Bao nhiêu ở sau lát này.
36
+ *
37
+ * ⛔ SỐ 0 VẪN HIỆN. "Đã ghi 0 người" là một câu trả lời; ẩn đi thì cán bộ
38
+ * không biết mình đã mở bảng ấy ra hay chưa.
39
+ */
40
+ count?: number;
41
+ /** Đường dẫn — truyền `Link` của bộ định tuyến khi lát sống trong URL. */
42
+ as?: ElementType;
43
+ children?: ReactNode;
44
+ }
45
+ export declare function Tab({ icon, current, count, as, className, children, ...rest }: TabProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
46
+ export interface RailItemProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className'> {
47
+ /** Màn đang đứng. */
48
+ current?: boolean;
49
+ /** Bộ định tuyến của app — `NavLink`, `Link`. */
50
+ as?: ElementType;
51
+ /**
52
+ * ⛔ NHẬN CẢ MỘT HÀM, và đó không phải sự chiều chuộng.
53
+ *
54
+ * `NavLink` của `react-router` gọi `className` VỚI trạng thái của chính nó
55
+ * (`{ isActive, isPending }`) — đó là cách nó nói "đang ở đây" mà không bắt
56
+ * nơi gọi tự so đường dẫn. Ghép thẳng bằng chuỗi thì một hàm bị đổi thành
57
+ * chuỗi `"(state) => ..."` và rơi nguyên vào thuộc tính `class`.
58
+ *
59
+ * Không lỗi nào nổ. Mục rãnh mất sạch kiểu dáng và mang một cái class dài
60
+ * ba dòng — thứ chỉ thấy khi mở thanh tra phần tử ra xem.
61
+ */
62
+ className?: string | ((state: Record<string, unknown>) => string | undefined);
63
+ /**
64
+ * Rãnh dài — hạ chiều cao mục xuống bậc điều khiển.
65
+ *
66
+ * ⚠️ Ô chạm 44px đúng cho một điều khiển đứng riêng; với một rãnh 45 mục nó
67
+ * nhân thành 3,1 màn cuộn và cán bộ mất khả năng QUÉT. Cùng ngoại lệ, cùng
68
+ * lý do đã ghi cho nút trong bảng — và vẫn trên sàn WCAG 2.2 §2.5.8.
69
+ */
70
+ dense?: boolean;
71
+ children?: ReactNode;
72
+ }
73
+ export declare function RailItem({ current, as, dense, className, children, ...rest }: RailItemProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Chỗ mở của một lớp nổi thả từ một cái nút — đo LÚC MỞ, không đo lúc dựng.
3
+ *
4
+ * ⭐ Tách ra khi phần tử nổi thứ hai (`ColumnPicker`) cần đúng phép đo mà
5
+ * `FilterSelect` đã có. Hai bản chép thì một ngày hai bản lệch: một cái mở
6
+ * ngược lên ở hàng cuối bảng, cái kia vẫn tràn khung nhìn.
7
+ *
8
+ * ⚠️ Một nút ở hàng cuối bảng dài thì mở xuống là tràn khung nhìn, và chỗ đứng
9
+ * của nó đổi theo lúc người ta cuộn — nên đo mỗi lần mở.
10
+ */
11
+ export declare function placePop(trigger: HTMLElement | null): {
12
+ up: boolean;
13
+ end: boolean;
14
+ };
@@ -0,0 +1,174 @@
1
+ import type { ElementType, HTMLAttributes, ImgHTMLAttributes, ReactNode } from 'react';
2
+ import type { Tone } from './surface.js';
3
+ /**
4
+ * WHAT A RECORD LOOKS LIKE — card, its parts, its values, and the small marks.
5
+ *
6
+ * ═══════════════════════════════════════════════════════════════════════════
7
+ * ⛔ THE KIT HAS DRAWN ALL OF THIS SINCE `0.30`. WHAT WAS MISSING WAS A MOULD.
8
+ *
9
+ * Every rule below already exists in `component-css.ts` — `.fos-card`,
10
+ * `.fos-card-head`, `.fos-facts`, `.fos-badge`, `.fos-count`, `.fos-tag`,
11
+ * `.fos-meter`, `.fos-avatar`, `.fos-provenance`. What did not exist was any
12
+ * way to REACH them except by typing the class name.
13
+ *
14
+ * Measured on the application this was extracted from, the day this file was
15
+ * written: **1.719 hand-typed `fos-*` class names across 33 classes**, and
16
+ * **1.087 of them wrote the kernel class AND an application class for the
17
+ * same idea side by side** — `class="fos-card card"`. Two names for one
18
+ * thing, in two stylesheets, one of which loads last and wins.
19
+ *
20
+ * ⚠️ SO THE POINT OF THIS FILE IS SUBTRACTION, NOT ADDITION. It adds no rule,
21
+ * no token and no decision. It removes the only way the two could disagree.
22
+ *
23
+ * ⛔ AND NOT ONE OF THESE CARRIES A WORD — same law as `surface.tsx`. `Badge`
24
+ * takes children; it never invents "Đang xử lý". Naming a state is the
25
+ * application's job, and a grammar that names states is a grammar that only
26
+ * fits the application it was cut from.
27
+ * ═══════════════════════════════════════════════════════════════════════════
28
+ */
29
+ /**
30
+ * GROUPS THINGS THAT BELONG TOGETHER.
31
+ *
32
+ * ⭐ `head` and `body` are PARTS, the way `th` and `td` are parts — the kit
33
+ * says so, and drops the card's own padding via `:has(> .card-head)` the
34
+ * moment it is given a head. So a bare `<Card>` with no parts still works,
35
+ * and a card with parts does not double its padding.
36
+ */
37
+ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
38
+ /**
39
+ * ⭐ THẺ KHÁC — và đây không phải sở thích, đo trên ứng dụng gốc ra 73 chỗ.
40
+ *
41
+ * Một thẻ có tiêu đề đọc lên đúng hơn khi là `<section>`; một thẻ hỏi người
42
+ * dùng điền gì đó LÀ một `<form>`. Ép cả hai thành `<div>` là ném đi ngữ
43
+ * nghĩa nền tảng đã cho không, và chỗ gọi sẽ đi vòng bằng cách gõ lại tên
44
+ * lớp — đúng thứ tệp này dựng ra để dẹp.
45
+ *
46
+ * ⚠️ Lối thoát cho THẺ, không phải cho hình dáng: `as="button"` biến một mặt
47
+ * phẳng thành một thứ bấm được mà không mang một luật nào của nút.
48
+ */
49
+ as?: ElementType;
50
+ children?: ReactNode;
51
+ }
52
+ export declare const Card: ({ as, className, children, ...rest }: CardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
53
+ /**
54
+ * WHAT A CARD IS, AND WHAT CAN BE DONE TO IT.
55
+ *
56
+ * ⚠️ The kit gives the LAST child `margin-left: auto` — the trailing slot, for
57
+ * a count, a state, an action. Never the title. So order the children the
58
+ * way they read: title first, trailing thing last.
59
+ */
60
+ export declare const CardHead: ({ as, className, children, ...rest }: CardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
61
+ /** What the card holds. */
62
+ export declare const CardBody: ({ as, className, children, ...rest }: CardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
63
+ /**
64
+ * NAME BESIDE VALUE — and it is a `<dl>`, which is the whole reason it exists.
65
+ *
66
+ * ⛔ IT IS NOT A GRID OF `<div>`s. The kit styles `> dt` and `> dd` directly,
67
+ * so anything else gets the geometry and none of the type. And a description
68
+ * list is the one element the platform already understands as name/value:
69
+ * a screen reader can walk it pair by pair, which a stack of divs cannot
70
+ * offer at any price.
71
+ *
72
+ * ⚠️ `stacked` for long values — the kit's own variant. A long sentence squeezed
73
+ * into a second column reads worse than the same sentence under its name.
74
+ */
75
+ export interface FactsProps extends HTMLAttributes<HTMLDListElement> {
76
+ /** Long values read better under their name than beside it. */
77
+ stacked?: boolean;
78
+ children?: ReactNode;
79
+ }
80
+ export declare function Facts({ stacked, className, children, ...rest }: FactsProps): import("react").JSX.Element;
81
+ /**
82
+ * ONE PAIR.
83
+ *
84
+ * ⭐ It returns a FRAGMENT of `<dt>` + `<dd>`, not a wrapper. The kit's grid is
85
+ * on the `<dl>` and its children are the cells; wrapping each pair in a
86
+ * `<div>` puts a box between the grid and its cells, and the columns stop
87
+ * lining up — the exact failure that makes people give up on `<dl>` and
88
+ * hand-roll a grid.
89
+ */
90
+ export interface FactProps {
91
+ name: ReactNode;
92
+ children?: ReactNode;
93
+ }
94
+ export declare function Fact({ name, children }: FactProps): import("react").JSX.Element;
95
+ /**
96
+ * A STATE, IN ONE WORD — and the colour is a DOT, not a filled pill.
97
+ *
98
+ * ⚠️ `bare` is a dot with no word, and it is the dangerous one: colour alone is
99
+ * a channel roughly one man in twelve cannot read. So `bare` DEMANDS a
100
+ * `label`, the way an icon-only button demands one, and there is a `Legend`
101
+ * below because a dot with no word needs somewhere its meaning is written.
102
+ */
103
+ export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
104
+ tone?: Tone | 'plain';
105
+ children?: ReactNode;
106
+ /** The word, for a `bare` badge that shows none. */
107
+ label?: string;
108
+ }
109
+ export declare function Badge({ tone, className, children, label, ...rest }: BadgeProps): import("react").JSX.Element;
110
+ /** Where the bare dots are explained. */
111
+ export declare function Legend({ as, className, children, ...rest }: CardProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
112
+ /**
113
+ * HOW MANY — never a state.
114
+ *
115
+ * ⚠️ A count borrows the badge TYPE SIZE and nothing else: no dot, no tone. The
116
+ * kit says why in the stylesheet — draw "how many" with a tone and the reader
117
+ * starts looking for a meaning that is not there, which is how a screen ends
118
+ * up with fourteen coloured things and no signal.
119
+ */
120
+ export declare function Count({ as, className, children, ...rest }: CardProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
121
+ /** WHAT KIND — a classification, never a state. Same warning as `Count`. */
122
+ export declare function Tag({ as, className, children, ...rest }: CardProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
123
+ /**
124
+ * HOW FAR ALONG, AGAINST A TARGET.
125
+ *
126
+ * ⛔ `role="meter"` WITH THE REAL NUMBERS, not a decorative bar. A bare number
127
+ * cannot say "0 of 240" at a glance across forty rows; a bar can — but only
128
+ * for someone who can see it. The numbers go in the ARIA so the value is
129
+ * there for everyone else, and they are the SAME numbers that size the fill,
130
+ * so the bar and the announcement can never drift apart.
131
+ *
132
+ * ⚠️ `max` of 0 is not an error and not a crash — it is a target nobody set
133
+ * yet. The bar reads empty and says so.
134
+ */
135
+ export interface MeterProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
136
+ value: number;
137
+ max: number;
138
+ tone?: Tone;
139
+ /** What is being measured — `role="meter"` is unreadable without a name. */
140
+ label: string;
141
+ }
142
+ export declare function Meter({ value, max, tone, label, className, ...rest }: MeterProps): import("react").JSX.Element;
143
+ /**
144
+ * WHO — a face, or the initials standing for one.
145
+ *
146
+ * ⚠️ Initials are NOT computed here. Which letters stand for a person is a
147
+ * naming convention, and naming conventions are not the same in every
148
+ * language the kernel will be read in — a Vietnamese name gives its initials
149
+ * from the last two syllables, not the first letters of the first two words.
150
+ * The caller passes what it wants shown.
151
+ *
152
+ * ⛔ AND IT IS NEVER THE ONLY THING SAYING WHO. Two letters in a circle is not
153
+ * a name; `label` goes onto the element so it is announced, and the row is
154
+ * expected to carry the person's name in words as well.
155
+ */
156
+ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
157
+ /** A picture, if there is one. */
158
+ src?: string;
159
+ /** The letters shown when there is no picture. */
160
+ initials?: string;
161
+ /** The person's name. Required — see above. */
162
+ label: string;
163
+ imgProps?: ImgHTMLAttributes<HTMLImageElement>;
164
+ }
165
+ export declare function Avatar({ src, initials, label, imgProps, className, ...rest }: AvatarProps): import("react").JSX.Element;
166
+ /**
167
+ * WHERE THIS NUMBER CAME FROM.
168
+ *
169
+ * ⚠️ THE CONTRACT DOES NOT CARRY THIS — the kit says so where it draws it. What
170
+ * `@dqa-ai-solutions/ontology-view` carries is `notes` / `ResolvedField.note`: the
171
+ * authority behind ONE FIELD. This is the RECORD-level block, and it has no
172
+ * contract behind it today. The mould is here because the shape is general.
173
+ */
174
+ export declare function Provenance({ as, className, children, ...rest }: CardProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;