@godxjp/ui 31.12.0 → 31.13.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/agent/START-HERE.md +4 -4
- package/agent/components/Timeline.json +7 -1
- package/agent/components.json +7 -1
- package/agent/index.json +4 -4
- package/agent/llms.txt +5 -5
- package/agent/tokens.json +12 -0
- package/dist/components/data-display/timeline.d.ts +13 -1
- package/dist/components/data-display/timeline.js +2 -2
- package/dist/contracts/measurement.json +1 -1
- package/dist/props/registry.d.ts +1 -1
- package/dist/props/registry.js +1 -1
- package/dist/styles/data-display-layout.css +6 -2
- package/dist/styles/layers.json +1 -1
- package/dist/tokens/components/data-display.css +3 -0
- package/docs/DESIGN-AUTHORITY.md +6 -0
- package/docs/data-display/timeline.tsx +13 -0
- package/package.json +2 -2
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 31.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 31.13.0.** If the project you are editing has a different
|
|
7
7
|
version in its `package.json`, read the pinned catalog for THAT version instead
|
|
8
8
|
(`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
|
|
9
9
|
not exist yet; older, and it hides props that do. Neither failure announces itself.
|
|
@@ -56,10 +56,10 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
56
56
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
57
57
|
3. `rules.json` — 50 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
58
58
|
style advice.
|
|
59
|
-
4. `tokens.json` —
|
|
59
|
+
4. `tokens.json` — 2118 design tokens, each tagged with its `tier`. **If you were handed a
|
|
60
60
|
brand, read the 211 `foundation` entries first** — `--primary`, `--background`,
|
|
61
61
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
62
|
-
|
|
62
|
+
1803 `component` entries are per-part knobs; reach for one only when a role is
|
|
63
63
|
right everywhere except one component.
|
|
64
64
|
5. `anti-ai-tells.json` — 26 shapes that make generated UI look generated, each with the
|
|
65
65
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
@@ -145,7 +145,7 @@ has stopped following the brand.
|
|
|
145
145
|
|---|---|---|---|
|
|
146
146
|
| `foundation` | 211 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** Handed a brand colour, this is where it goes: `:root { --primary: <H> <S>% <L>%; }` (HSL components, no `hsl()` wrapper) |
|
|
147
147
|
| `semantic` | 104 | named roles that follow the seeds — `--ring`, `--text-link`, `--primary-hover`, `--overlay-background` | only when the seed is right and ONE role must differ. That role then stops following a later brand change |
|
|
148
|
-
| `component` |
|
|
148
|
+
| `component` | 1803 | per-part knobs, `--{component}-{part}-{property}` | rarely. Most are declared `initial` with the real default at the call site — deliberate, so a scoped override re-resolves instead of freezing at `:root` |
|
|
149
149
|
|
|
150
150
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
151
151
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"description": "Rail glyph strategy (default 'icon'). 'icon' = legacy look (Plane for current, CheckCircle2 otherwise). 'ordinal' = every glyph is its 1-based step number; status sets colour only. 'status' = glyph by status (done → check, current → filled dot, pending → step number).",
|
|
15
15
|
"name": "variant",
|
|
16
16
|
"type": "\"icon\" | \"ordinal\" | \"status\""
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Item spacing (default 'default'). Sets `--timeline-item-gap` — the space between items and between the rail and the body. 'default' = `--space-stack-md` (16px); 'compact' = `--space-stack-sm` (8px, retune with `--timeline-item-gap-compact`) for a dense activity log / issue history. antd's Timeline has no density prop (one fixed `itemPaddingBottom`, 20px), so this is a godx extension.",
|
|
20
|
+
"name": "density",
|
|
21
|
+
"type": "\"default\" | \"compact\""
|
|
17
22
|
}
|
|
18
23
|
],
|
|
19
24
|
"related": [
|
|
@@ -26,10 +31,11 @@
|
|
|
26
31
|
"storyPath": "data-display/Timeline.stories.tsx",
|
|
27
32
|
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a 3-state `status` (done/current/pending) plus an optional per-item `icon`. The whole progress column is ONE hue: done dot, current dot and travelled line all paint `--primary`, exactly as `Steps` paints `finish` and `process`.",
|
|
28
33
|
"usage": [
|
|
29
|
-
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other
|
|
34
|
+
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other props are `variant` and `density`.",
|
|
30
35
|
"DO mark the in-progress event with `current: true` (or `status: 'current'`). In the default `variant='icon'`, the current item renders a `Plane` icon and every other item a `CheckCircle2`. Use `variant='ordinal'` for a numbered route stepper (1,2,3…) or `variant='status'` for a done→check / current→dot / pending→number tracker. Pass `status: 'done' | 'current' | 'pending'` per item to drive colour and (in the status variant) the glyph; pass `icon` (a LucideIcon) to override the glyph for a single item.",
|
|
31
36
|
"DO pass `ReactNode` to `title`, `location`, `time`, and `note` — you can embed formatted text, `<Badge>`, `<Badge>`, or `<span>` inside those fields. Use `formatDate` to pre-format timestamps before passing them as `time`.",
|
|
32
37
|
"DO NOT hand-roll a vertical event list with divs, icons, and connector lines — that is exactly what Timeline ships. Do not apply extra padding or wrapping outside the component; it manages its own rail and spacing internally.",
|
|
38
|
+
"DO pass `density=\"compact\"` when the timeline is a long, dense log (issue history, audit trail) and the default 16px between items reads too airy — it drops the item gap to `--space-stack-sm` (8px). Never tighten it with your own padding/margin on the items.",
|
|
33
39
|
"DO NOT use Timeline for user-facing wizard progress (steps the user must complete in order) — use `Steps` for that. Timeline is read-only historical/status display; it has no interactive state, no `onClick`, and no concept of 'go to step'.",
|
|
34
40
|
"DO wrap Timeline in `<CardContent>` when placing it inside a `Card` — bare `Card` has no inner padding, so the rail will render flush against the card edge without `CardContent`.",
|
|
35
41
|
"THE PROGRESS COLUMN IS ONE HUE (gh#731). The done dot, the current dot and the travelled line all default to `hsl(var(--primary))` — the same contract `Steps` uses for `finish` + `process`, and antd's (only `error` leaves the primary hue). The current item is told apart by a ring (`--timeline-dot-current-ring-width`, `--steps-dot-process-ring-width`'s value), by `aria-current=\"step\"` + a localized sr-only prefix, and by a different glyph — never by a second colour role. Re-theme `--primary` and the whole rail follows. Measured light: done 2.18:1 → 6.31:1 against the card, glyph 6.31:1 on the fill; dark 7.22:1 → 9.84:1, glyph 10.72:1.",
|
package/agent/components.json
CHANGED
|
@@ -4974,6 +4974,11 @@
|
|
|
4974
4974
|
"description": "Rail glyph strategy (default 'icon'). 'icon' = legacy look (Plane for current, CheckCircle2 otherwise). 'ordinal' = every glyph is its 1-based step number; status sets colour only. 'status' = glyph by status (done → check, current → filled dot, pending → step number).",
|
|
4975
4975
|
"name": "variant",
|
|
4976
4976
|
"type": "\"icon\" | \"ordinal\" | \"status\""
|
|
4977
|
+
},
|
|
4978
|
+
{
|
|
4979
|
+
"description": "Item spacing (default 'default'). Sets `--timeline-item-gap` — the space between items and between the rail and the body. 'default' = `--space-stack-md` (16px); 'compact' = `--space-stack-sm` (8px, retune with `--timeline-item-gap-compact`) for a dense activity log / issue history. antd's Timeline has no density prop (one fixed `itemPaddingBottom`, 20px), so this is a godx extension.",
|
|
4980
|
+
"name": "density",
|
|
4981
|
+
"type": "\"default\" | \"compact\""
|
|
4977
4982
|
}
|
|
4978
4983
|
],
|
|
4979
4984
|
"related": [
|
|
@@ -4986,10 +4991,11 @@
|
|
|
4986
4991
|
"storyPath": "data-display/Timeline.stories.tsx",
|
|
4987
4992
|
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a 3-state `status` (done/current/pending) plus an optional per-item `icon`. The whole progress column is ONE hue: done dot, current dot and travelled line all paint `--primary`, exactly as `Steps` paints `finish` and `process`.",
|
|
4988
4993
|
"usage": [
|
|
4989
|
-
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other
|
|
4994
|
+
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other props are `variant` and `density`.",
|
|
4990
4995
|
"DO mark the in-progress event with `current: true` (or `status: 'current'`). In the default `variant='icon'`, the current item renders a `Plane` icon and every other item a `CheckCircle2`. Use `variant='ordinal'` for a numbered route stepper (1,2,3…) or `variant='status'` for a done→check / current→dot / pending→number tracker. Pass `status: 'done' | 'current' | 'pending'` per item to drive colour and (in the status variant) the glyph; pass `icon` (a LucideIcon) to override the glyph for a single item.",
|
|
4991
4996
|
"DO pass `ReactNode` to `title`, `location`, `time`, and `note` — you can embed formatted text, `<Badge>`, `<Badge>`, or `<span>` inside those fields. Use `formatDate` to pre-format timestamps before passing them as `time`.",
|
|
4992
4997
|
"DO NOT hand-roll a vertical event list with divs, icons, and connector lines — that is exactly what Timeline ships. Do not apply extra padding or wrapping outside the component; it manages its own rail and spacing internally.",
|
|
4998
|
+
"DO pass `density=\"compact\"` when the timeline is a long, dense log (issue history, audit trail) and the default 16px between items reads too airy — it drops the item gap to `--space-stack-sm` (8px). Never tighten it with your own padding/margin on the items.",
|
|
4993
4999
|
"DO NOT use Timeline for user-facing wizard progress (steps the user must complete in order) — use `Steps` for that. Timeline is read-only historical/status display; it has no interactive state, no `onClick`, and no concept of 'go to step'.",
|
|
4994
5000
|
"DO wrap Timeline in `<CardContent>` when placing it inside a `Card` — bare `Card` has no inner padding, so the rail will render flush against the card edge without `CardContent`.",
|
|
4995
5001
|
"THE PROGRESS COLUMN IS ONE HUE (gh#731). The done dot, the current dot and the travelled line all default to `hsl(var(--primary))` — the same contract `Steps` uses for `finish` + `process`, and antd's (only `error` leaves the primary hue). The current item is told apart by a ring (`--timeline-dot-current-ring-width`, `--steps-dot-process-ring-width`'s value), by `aria-current=\"step\"` + a localized sr-only prefix, and by a different glyph — never by a second colour role. Re-theme `--primary` and the whole rail follows. Measured light: done 2.18:1 → 6.31:1 against the card, glyph 6.31:1 on the fill; dark 7.22:1 → 9.84:1, glyph 10.72:1.",
|
package/agent/index.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"components": 178,
|
|
5
5
|
"patterns": 21,
|
|
6
6
|
"rules": 50,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2118,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
|
|
49
49
|
"read": {
|
|
50
50
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
51
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.13.0/agent/index.json"
|
|
52
52
|
},
|
|
53
53
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
54
54
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
55
55
|
"tokenTiers": {
|
|
56
56
|
"component": "per-part knobs, --{component}-{part}-{property}; usually leave these alone",
|
|
57
57
|
"counts": {
|
|
58
|
-
"component":
|
|
58
|
+
"component": 1803,
|
|
59
59
|
"foundation": 211,
|
|
60
60
|
"semantic": 104
|
|
61
61
|
},
|
|
62
62
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
63
63
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
64
64
|
},
|
|
65
|
-
"version": "31.
|
|
65
|
+
"version": "31.13.0"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system: 178 components,
|
|
4
|
-
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.
|
|
3
|
+
> A Japanese-enterprise React design system: 178 components, 2118 design tokens,
|
|
4
|
+
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.13.0.
|
|
5
5
|
|
|
6
6
|
If your client can run a process, do not read these files — run the MCP server instead
|
|
7
|
-
(`npx @godxjp/ui-mcp@31.
|
|
7
|
+
(`npx @godxjp/ui-mcp@31.13.0`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -18,7 +18,7 @@ that can only fetch URLs.
|
|
|
18
18
|
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 48 KB — all 178 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
|
|
19
19
|
- [components/<Name>.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–36 KB, median 6 KB). Read the index, then fetch only the ones you chose — this is the selective route, and the reason you do not need the blob.
|
|
20
20
|
- [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.2 MB — every entry in one file. Most URL fetchers truncate a response this size without saying so; prefer the per-component files.
|
|
21
|
-
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 104 `semantic` roles,
|
|
21
|
+
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 104 `semantic` roles, 1803 `component` knobs.
|
|
22
22
|
- [vocabulary.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json): the controlled prop vocabulary — which prop name means what, across every component.
|
|
23
23
|
- [rules.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json): 50 cardinal rules.
|
|
24
24
|
- [anti-ai-tells.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/anti-ai-tells.json): 26 shapes that make generated UI look generated, each with its fix.
|
|
@@ -26,7 +26,7 @@ that can only fetch URLs.
|
|
|
26
26
|
## Pinning
|
|
27
27
|
|
|
28
28
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
29
|
-
the tag: `.../godx-jp/godxjp-ui/v31.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v31.13.0/agent/...`. A catalog that does not match the installed
|
|
30
30
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
31
31
|
|
|
32
32
|
Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
|
package/agent/tokens.json
CHANGED
|
@@ -5675,6 +5675,18 @@
|
|
|
5675
5675
|
"tier": "component",
|
|
5676
5676
|
"value": "initial"
|
|
5677
5677
|
},
|
|
5678
|
+
{
|
|
5679
|
+
"description": "Space between items and between rail and body. `initial` so `Timeline density=\"compact\"` can retune it on the root; default = var(--space-stack-md), compact = --timeline-item-gap-compact (default var(--space-stack-sm)), resolved at the call site.",
|
|
5680
|
+
"name": "--timeline-item-gap",
|
|
5681
|
+
"tier": "component",
|
|
5682
|
+
"value": "initial"
|
|
5683
|
+
},
|
|
5684
|
+
{
|
|
5685
|
+
"description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
|
|
5686
|
+
"name": "--timeline-item-gap-compact",
|
|
5687
|
+
"tier": "component",
|
|
5688
|
+
"value": "initial"
|
|
5689
|
+
},
|
|
5678
5690
|
{
|
|
5679
5691
|
"description": "QR codes stay scanner-safe in light and dark application themes. Consumers may override these component tokens only when the resulting pair retains strong contrast.",
|
|
5680
5692
|
"name": "--qr-code-foreground",
|
|
@@ -2,6 +2,11 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import { type LucideIcon } from "lucide-react";
|
|
3
3
|
export type TimelineStatus = "done" | "current" | "pending";
|
|
4
4
|
export type TimelineVariant = "icon" | "ordinal" | "status";
|
|
5
|
+
/**
|
|
6
|
+
* A Timeline-local subset of the density vocabulary — it has no `comfortable` step, the same shape
|
|
7
|
+
* as `ListRowDensity`.
|
|
8
|
+
*/
|
|
9
|
+
export type TimelineDensity = "default" | "compact";
|
|
5
10
|
export type TimelineItem = {
|
|
6
11
|
title: ReactNode;
|
|
7
12
|
location?: ReactNode;
|
|
@@ -21,5 +26,12 @@ export type TimelineProps = {
|
|
|
21
26
|
* CheckCircle2 otherwise).
|
|
22
27
|
*/
|
|
23
28
|
variant?: TimelineVariant;
|
|
29
|
+
/**
|
|
30
|
+
* Space between items (and between the rail and the body): `--timeline-item-gap`. `default` is
|
|
31
|
+
* `--space-stack-md` (16px, today's look); `compact` is `--space-stack-sm` (8px) for a dense
|
|
32
|
+
* activity log or issue history. antd's Timeline has no density/size prop — its item spacing is
|
|
33
|
+
* one fixed token (`itemPaddingBottom`, 20px) — so this is a godx extension, not an antd port.
|
|
34
|
+
*/
|
|
35
|
+
density?: TimelineDensity;
|
|
24
36
|
};
|
|
25
|
-
export declare function Timeline({ items, variant }: TimelineProps): import("react").JSX.Element;
|
|
37
|
+
export declare function Timeline({ items, variant, density }: TimelineProps): import("react").JSX.Element;
|
|
@@ -16,9 +16,9 @@ function resolveStatus(item) {
|
|
|
16
16
|
}
|
|
17
17
|
return "done";
|
|
18
18
|
}
|
|
19
|
-
function Timeline({ items, variant = "icon" }) {
|
|
19
|
+
function Timeline({ items, variant = "icon", density = "default" }) {
|
|
20
20
|
const { t } = useTranslation();
|
|
21
|
-
return /* @__PURE__ */ jsx("ol", { className: "ui-timeline", "data-variant": variant, children: items.map((item, index) => {
|
|
21
|
+
return /* @__PURE__ */ jsx("ol", { className: "ui-timeline", "data-variant": variant, "data-density": density, children: items.map((item, index) => {
|
|
22
22
|
const status = resolveStatus(item);
|
|
23
23
|
const isCurrent = status === "current";
|
|
24
24
|
const ordinal = index + 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.13.0",
|
|
4
4
|
"targetSize": {
|
|
5
5
|
"standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
|
|
6
6
|
"min": 24,
|
package/dist/props/registry.d.ts
CHANGED
|
@@ -2996,7 +2996,7 @@ export declare const COMPONENT_PROP_REGISTRY: {
|
|
|
2996
2996
|
readonly TimelineProp: {
|
|
2997
2997
|
readonly group: "data-display";
|
|
2998
2998
|
readonly file: "components/data-display/timeline.tsx";
|
|
2999
|
-
readonly vocabulary: readonly ["ClassNameProp"];
|
|
2999
|
+
readonly vocabulary: readonly ["ClassNameProp", "DensityProp"];
|
|
3000
3000
|
};
|
|
3001
3001
|
readonly TimelineGridColumnProp: {
|
|
3002
3002
|
readonly group: "data-display";
|
package/dist/props/registry.js
CHANGED
|
@@ -3528,7 +3528,7 @@ const COMPONENT_PROP_REGISTRY = {
|
|
|
3528
3528
|
TimelineProp: {
|
|
3529
3529
|
group: "data-display",
|
|
3530
3530
|
file: "components/data-display/timeline.tsx",
|
|
3531
|
-
vocabulary: ["ClassNameProp"]
|
|
3531
|
+
vocabulary: ["ClassNameProp", "DensityProp"]
|
|
3532
3532
|
},
|
|
3533
3533
|
TimelineGridColumnProp: {
|
|
3534
3534
|
group: "data-display",
|
|
@@ -472,14 +472,18 @@
|
|
|
472
472
|
flex-direction: column;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
.ui-timeline[data-density="compact"] {
|
|
476
|
+
--timeline-item-gap: var(--timeline-item-gap-compact, var(--space-stack-sm));
|
|
477
|
+
}
|
|
478
|
+
|
|
475
479
|
.ui-timeline-item {
|
|
476
480
|
display: grid;
|
|
477
481
|
grid-template-columns: 1.5rem minmax(0, 1fr);
|
|
478
|
-
column-gap: var(--space-stack-md);
|
|
482
|
+
column-gap: var(--timeline-item-gap, var(--space-stack-md));
|
|
479
483
|
}
|
|
480
484
|
|
|
481
485
|
.ui-timeline-body {
|
|
482
|
-
padding-bottom: var(--space-stack-md);
|
|
486
|
+
padding-bottom: var(--timeline-item-gap, var(--space-stack-md));
|
|
483
487
|
}
|
|
484
488
|
|
|
485
489
|
.ui-timeline-item:last-child .ui-timeline-body {
|
package/dist/styles/layers.json
CHANGED
package/docs/DESIGN-AUTHORITY.md
CHANGED
|
@@ -399,6 +399,12 @@ bottomEnd | none` (`TablePaginationPositionProp`, default `['bottomEnd']`), the
|
|
|
399
399
|
would rule every existing tree, including the picker-sized and `size="xs"` outlines where a rule
|
|
400
400
|
every 24px is noise rather than structure. A tree used as page navigation opts in.
|
|
401
401
|
|
|
402
|
+
- **`Timeline density` has no antd counterpart.** antd's Timeline spaces items with one fixed
|
|
403
|
+
token (`itemPaddingBottom`, 20px) and offers no size or density prop. godx adds
|
|
404
|
+
`density?: "default" | "compact"` — the ListRow-shaped subset of `DensityProp` — driving one
|
|
405
|
+
token, `--timeline-item-gap`: `default` keeps `--space-stack-md` (16px), `compact` is
|
|
406
|
+
`--space-stack-sm` (8px), the step nearer antd's 20px of the two compact candidates (xs is 4px).
|
|
407
|
+
|
|
402
408
|
- **`RangeTimeline` nested rows take `Tree`'s spelling, not antd's (gh#724).** antd has no Gantt;
|
|
403
409
|
the nearest names are `Tree expandedKeys` / `defaultExpandedKeys` / `onExpand` and `Table
|
|
404
410
|
expandable.expandedRowKeys` / `onExpandedRowsChange`. This library already mapped the Tree ones
|
|
@@ -126,6 +126,19 @@ export default function Demo() {
|
|
|
126
126
|
</CardContent>
|
|
127
127
|
</Card>
|
|
128
128
|
|
|
129
|
+
<Card>
|
|
130
|
+
<CardHeader>
|
|
131
|
+
<CardTitle level={2}>density="compact"</CardTitle>
|
|
132
|
+
<CardDescription>
|
|
133
|
+
Item gap drops to --space-stack-sm (8px) for a long log such as an issue history. antd
|
|
134
|
+
has no Timeline density; this is a godx extension.
|
|
135
|
+
</CardDescription>
|
|
136
|
+
</CardHeader>
|
|
137
|
+
<CardContent>
|
|
138
|
+
<Timeline variant="status" density="compact" items={approvalItems} />
|
|
139
|
+
</CardContent>
|
|
140
|
+
</Card>
|
|
141
|
+
|
|
129
142
|
<Card>
|
|
130
143
|
<CardHeader>
|
|
131
144
|
<CardTitle level={2}>配送ルート進捗</CardTitle>
|