@godxjp/ui 31.28.4 → 31.30.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.
Files changed (72) hide show
  1. package/agent/START-HERE.md +5 -5
  2. package/agent/components/AppLauncher.json +5 -0
  3. package/agent/components/Avatar.json +1 -0
  4. package/agent/components/Dialog.json +3 -1
  5. package/agent/components/Legend.json +1 -1
  6. package/agent/components/PasswordStrength.json +2 -2
  7. package/agent/components/RangeTimeline.json +28 -1
  8. package/agent/components/ResponsiveGrid.json +7 -0
  9. package/agent/components/Sidebar.json +5 -0
  10. package/agent/components/SortableList.json +78 -0
  11. package/agent/components/TopbarItem.json +1 -1
  12. package/agent/components-index.json +5 -0
  13. package/agent/components.json +131 -6
  14. package/agent/index.json +6 -6
  15. package/agent/llms.txt +6 -6
  16. package/agent/tokens.json +122 -2
  17. package/dist/components/data-display/legend.d.ts +3 -2
  18. package/dist/components/data-display/legend.js +10 -1
  19. package/dist/components/data-display/range-timeline.d.ts +93 -2
  20. package/dist/components/data-display/range-timeline.js +220 -58
  21. package/dist/components/data-entry/index.d.ts +2 -0
  22. package/dist/components/data-entry/index.js +2 -0
  23. package/dist/components/data-entry/password-strength.d.ts +15 -3
  24. package/dist/components/data-entry/password-strength.js +16 -34
  25. package/dist/components/data-entry/sortable-list.d.ts +10 -0
  26. package/dist/components/data-entry/sortable-list.js +237 -0
  27. package/dist/components/feedback/dialog.d.ts +8 -2
  28. package/dist/components/feedback/dialog.js +8 -1
  29. package/dist/components/feedback/sheet.js +1 -1
  30. package/dist/components/layout/app-launcher.d.ts +1 -1
  31. package/dist/components/layout/app-launcher.js +18 -14
  32. package/dist/components/layout/responsive-grid.d.ts +17 -2
  33. package/dist/components/layout/responsive-grid.js +17 -4
  34. package/dist/components/layout/sidebar.d.ts +1 -1
  35. package/dist/components/layout/sidebar.js +3 -0
  36. package/dist/components/layout/topbar-item.js +8 -2
  37. package/dist/components/ui/avatar.d.ts +3 -1
  38. package/dist/components/ui/avatar.js +2 -1
  39. package/dist/contracts/measurement.json +1 -1
  40. package/dist/i18n/messages/en.json +31 -1
  41. package/dist/i18n/messages/ja.json +31 -1
  42. package/dist/i18n/messages/vi.json +31 -1
  43. package/dist/props/components/data-display.prop.d.ts +18 -0
  44. package/dist/props/components/data-entry.prop.d.ts +34 -0
  45. package/dist/props/components/feedback.prop.d.ts +6 -1
  46. package/dist/props/components/layout.prop.d.ts +22 -0
  47. package/dist/props/registry.d.ts +33 -2
  48. package/dist/props/registry.js +44 -1
  49. package/dist/styles/control.css +50 -0
  50. package/dist/styles/data-display-layout.css +139 -2
  51. package/dist/styles/dialog-layout.css +14 -1
  52. package/dist/styles/layers.json +6 -1
  53. package/dist/styles/layout.css +29 -7
  54. package/dist/styles/shell-layout.css +26 -0
  55. package/dist/tokens/components/control.css +5 -0
  56. package/dist/tokens/components/data-display.css +12 -0
  57. package/dist/tokens/components/feedback.css +6 -0
  58. package/dist/tokens/components/shell.css +6 -0
  59. package/dist/tokens/semantic/layout.css +1 -4
  60. package/docs/FRAME-COVERAGE-REPORT.md +4 -3
  61. package/docs/data-display/avatar.tsx +32 -0
  62. package/docs/data-display/timeline.tsx +84 -1
  63. package/docs/data-entry/sortable-list.tsx +76 -0
  64. package/docs/feedback/dialog.tsx +37 -1
  65. package/docs/i18n/messages/en.json +62 -0
  66. package/docs/i18n/messages/ja.json +62 -0
  67. package/docs/i18n/messages/vi.json +62 -0
  68. package/docs/layout/app-launcher.tsx +17 -1
  69. package/docs/layout/responsive-grid.tsx +23 -0
  70. package/docs/layout/sidebar.tsx +24 -0
  71. package/docs/layout/topbar-item.tsx +11 -0
  72. package/package.json +2 -2
package/agent/tokens.json CHANGED
@@ -1746,10 +1746,10 @@
1746
1746
  "value": "var(--heading-h3, var(--font-size-base))"
1747
1747
  },
1748
1748
  {
1749
- "description": "PageContainer `headerScale=\"display\"` (gh#1160) — an ARTICLE's headline (a Notion / note.com page). The 4xl display step, which already scales with the viewport through `--font-size-display`'s clamp (≈25px on a phone → 42px wide), so one knob covers phone and desktop and the compact step below does not apply. CJK titles need more leading than Latin ones at this size: 1.4, not the tight 1.25 a short Latin headline gets.",
1749
+ "description": "PageContainer `headerScale=\"display\"` (gh#1160) — an ARTICLE's headline (a Notion / note.com page). The 4xl display step, which already scales with the viewport through `--font-size-display`'s clamp (≈25px on a phone → 42px wide), so one knob covers phone and desktop and the compact step below does not apply. CJK titles need more leading than Latin ones at this size: 1.4, not the tight 1.25 a short Latin headline gets. `initial` with the formula at the call site: it reads `--font-size-display`, a seed a consumer may re-scope, and a :root formula would compute once on <html> (docs/TOKENS.md · \"Role-mirror knobs MUST be initial\"). = the 4xl display step, resolved at the call site",
1750
1750
  "name": "--page-title-font-size-display",
1751
1751
  "tier": "semantic",
1752
- "value": "var( --font-size-4xl, calc(var(--font-size-display) / var(--font-size-display-ratio)) )"
1752
+ "value": "initial"
1753
1753
  },
1754
1754
  {
1755
1755
  "description": "Layout primitive tokens: page, section, stack, inline.",
@@ -4913,6 +4913,30 @@
4913
4913
  "tier": "component",
4914
4914
  "value": "16rem"
4915
4915
  },
4916
+ {
4917
+ "description": "SortableList (gh#1173): the space between items, an item's inset, its corner, and the narrowest a grid tile may get before the grid drops a column.",
4918
+ "name": "--sortable-list-gap",
4919
+ "tier": "component",
4920
+ "value": "var(--space-2)"
4921
+ },
4922
+ {
4923
+ "description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
4924
+ "name": "--sortable-list-item-padding",
4925
+ "tier": "component",
4926
+ "value": "var(--space-2)"
4927
+ },
4928
+ {
4929
+ "description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
4930
+ "name": "--sortable-list-item-radius",
4931
+ "tier": "component",
4932
+ "value": "var(--control-radius)"
4933
+ },
4934
+ {
4935
+ "description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
4936
+ "name": "--sortable-list-grid-item-min-inline-size",
4937
+ "tier": "component",
4938
+ "value": "12rem"
4939
+ },
4916
4940
  {
4917
4941
  "description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
4918
4942
  "name": "--control-height-compact",
@@ -6023,6 +6047,30 @@
6023
6047
  "tier": "component",
6024
6048
  "value": "var(--app-shell-sidebar-width)"
6025
6049
  },
6050
+ {
6051
+ "description": "Label-column resize divider (gh#1189): the hit area straddles the column border and meets WCAG 2.5.8's 24px; the visible rule is the border itself, thickened on hover/focus.",
6052
+ "name": "--range-timeline-resizer-inline-size",
6053
+ "tier": "component",
6054
+ "value": "var(--space-6)"
6055
+ },
6056
+ {
6057
+ "description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
6058
+ "name": "--range-timeline-resizer-active-width",
6059
+ "tier": "component",
6060
+ "value": "var(--stroke-md, 2px)"
6061
+ },
6062
+ {
6063
+ "description": "`busy` (gh#1189): how far the body dims while a new range loads, and the progress line.",
6064
+ "name": "--range-timeline-busy-body-alpha",
6065
+ "tier": "component",
6066
+ "value": "0.55"
6067
+ },
6068
+ {
6069
+ "description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
6070
+ "name": "--range-timeline-busy-line-block-size",
6071
+ "tier": "component",
6072
+ "value": "var(--stroke-md, 2px)"
6073
+ },
6026
6074
  {
6027
6075
  "description": "Floor for ONE axis unit, so a day column never collapses; the live knob the canvas reads. `density` re-points it per instance at the three steps below — set THIS one in a theme to move every step's baseline, set a step to retune one density.",
6028
6076
  "name": "--range-timeline-unit-width",
@@ -6059,6 +6107,30 @@
6059
6107
  "tier": "component",
6060
6108
  "value": "var(--control-height-sm)"
6061
6109
  },
6110
+ {
6111
+ "description": "Per-row bar state (gh#1189 follow-up): a done row recedes, an overdue row gets a danger edge that keeps its status colour. `--range-timeline-bar-color` / `-ink` are set per row from data.",
6112
+ "name": "--range-timeline-bar-muted-alpha",
6113
+ "tier": "component",
6114
+ "value": "0.45"
6115
+ },
6116
+ {
6117
+ "description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
6118
+ "name": "--range-timeline-bar-overdue-width",
6119
+ "tier": "component",
6120
+ "value": "var(--stroke-md)"
6121
+ },
6122
+ {
6123
+ "description": "Planned vs actual (予定 / 実績): the ghost outline of the plan, the overrun segment past it, and the early marker where the actual ends before it.",
6124
+ "name": "--range-timeline-plan-border-width",
6125
+ "tier": "component",
6126
+ "value": "var(--stroke-hairline)"
6127
+ },
6128
+ {
6129
+ "description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
6130
+ "name": "--range-timeline-early-marker-inline-size",
6131
+ "tier": "component",
6132
+ "value": "var(--stroke-md)"
6133
+ },
6062
6134
  {
6063
6135
  "description": "The OUTER FRAME of the timeline and its label-column divider — the --border tier, the same rule weight a Card edge and a DataTable row use. The grid INSIDE it now reads the same tier (see --range-timeline-grid-color), which is the point of gh#730: the day grid may never be heavier than the frame around it, and at one tier it cannot become so under any theme.",
6064
6136
  "name": "--range-timeline-border-color",
@@ -6749,6 +6821,30 @@
6749
6821
  "tier": "component",
6750
6822
  "value": "32rem"
6751
6823
  },
6824
+ {
6825
+ "description": "Per-instance width, set by DialogContent `width` (gh#1174) — `initial`, so the default above resolves at the call site; the viewport cap (minus --dialog-viewport-inset) always wins.",
6826
+ "name": "--dialog-width",
6827
+ "tier": "component",
6828
+ "value": "initial"
6829
+ },
6830
+ {
6831
+ "description": "ENTER / EXIT TIMING (gh#1178). `initial`, default `var(--duration-fast)` (150ms) at the call site, so a scoped motion retune reaches them. A full-screen overlay that takes half a second to arrive reads as lag; `prefers-reduced-motion: reduce` stops the animation outright (styles/dialog-layout.css, unlayered block).",
6832
+ "name": "--dialog-motion-duration",
6833
+ "tier": "component",
6834
+ "value": "initial"
6835
+ },
6836
+ {
6837
+ "description": "Feedback primitive tokens: dialog, alert, empty state.",
6838
+ "name": "--sheet-enter-duration",
6839
+ "tier": "component",
6840
+ "value": "initial"
6841
+ },
6842
+ {
6843
+ "description": "Feedback primitive tokens: dialog, alert, empty state.",
6844
+ "name": "--sheet-exit-duration",
6845
+ "tier": "component",
6846
+ "value": "initial"
6847
+ },
6752
6848
  {
6753
6849
  "description": "Feedback primitive tokens: dialog, alert, empty state.",
6754
6850
  "name": "--dialog-viewport-inset",
@@ -10415,6 +10511,12 @@
10415
10511
  "tier": "component",
10416
10512
  "value": "var(--space-3) var(--space-2)"
10417
10513
  },
10514
+ {
10515
+ "description": "Sidebar `action` (gh#1185): the inline inset matches the nav's, so the button's edges line up with the rows; the block end is 0 because the nav's own top padding supplies the gap below.",
10516
+ "name": "--sidebar-action-padding",
10517
+ "tier": "component",
10518
+ "value": "var(--space-3) var(--space-2) 0"
10519
+ },
10418
10520
  {
10419
10521
  "description": "Shell (sidebar / topbar / kbd) component tokens — small-by-design text knobs (rule #45/#46). A service re-tunes chrome text without moving the global scale.",
10420
10522
  "name": "--sidebar-section-gap",
@@ -10823,6 +10925,24 @@
10823
10925
  "tier": "component",
10824
10926
  "value": "8rem"
10825
10927
  },
10928
+ {
10929
+ "description": "The secondary-link row under the grid (gh#1172): hairline above, small type, inline gap.",
10930
+ "name": "--app-launcher-footer-space-block",
10931
+ "tier": "component",
10932
+ "value": "var(--space-2)"
10933
+ },
10934
+ {
10935
+ "description": "Shell (sidebar / topbar / kbd) component tokens — small-by-design text knobs (rule #45/#46). A service re-tunes chrome text without moving the global scale.",
10936
+ "name": "--app-launcher-footer-gap",
10937
+ "tier": "component",
10938
+ "value": "var(--space-3)"
10939
+ },
10940
+ {
10941
+ "description": "Shell (sidebar / topbar / kbd) component tokens — small-by-design text knobs (rule #45/#46). A service re-tunes chrome text without moving the global scale.",
10942
+ "name": "--app-launcher-footer-font-size",
10943
+ "tier": "component",
10944
+ "value": "var(--font-size-sm, var(--font-size-base))"
10945
+ },
10826
10946
  {
10827
10947
  "description": "Role-mirror knob: `initial` so a scoped theme's --background re-resolves at the call site (docs/TOKENS.md). Default = a veil of the theme's OWN background at the alpha below.",
10828
10948
  "name": "--app-launcher-launchpad-backdrop-background",
@@ -1,5 +1,6 @@
1
+ import type * as React from "react";
1
2
  import type { LegendProp } from "../../props/components/data-display.prop.js";
2
- export type { LegendItemProp, LegendProp, LegendProp as LegendProps } from "../../props/components/data-display.prop.js";
3
+ export type { LegendItemProp, LegendProp, LegendProp as LegendProps, } from "../../props/components/data-display.prop.js";
3
4
  /**
4
5
  * Legend — the KEY for a set of tones: which colour means what.
5
6
  *
@@ -12,4 +13,4 @@ export type { LegendItemProp, LegendProp, LegendProp as LegendProps } from "../.
12
13
  * reader announcing "square, overdue" twice per key is noise. What reaches assistive tech is a
13
14
  * plain list of the labels, which is exactly what the key says.
14
15
  */
15
- export declare function Legend({ items, className, ...props }: LegendProp): import("react").JSX.Element;
16
+ export declare function Legend({ items, className, ...props }: LegendProp): React.JSX.Element;
@@ -2,7 +2,16 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/utils.js";
3
3
  function Legend({ items, className, ...props }) {
4
4
  return /* @__PURE__ */ jsx("ul", { className: cn("ui-legend", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "ui-legend-item", children: [
5
- /* @__PURE__ */ jsx("span", { className: "ui-legend-swatch", "data-tone": item.tone, "aria-hidden": "true" }),
5
+ /* @__PURE__ */ jsx(
6
+ "span",
7
+ {
8
+ className: "ui-legend-swatch",
9
+ "data-tone": item.color ? void 0 : item.tone,
10
+ "data-color": item.color ? "true" : void 0,
11
+ style: item.color ? { "--legend-swatch-color": item.color } : void 0,
12
+ "aria-hidden": "true"
13
+ }
14
+ ),
6
15
  item.label
7
16
  ] }, index)) });
8
17
  }
@@ -3,8 +3,12 @@ import type { DensityProp } from "../../props/vocabulary/index.js";
3
3
  export type RangeTimelineRow = {
4
4
  id: string;
5
5
  label: React.ReactNode;
6
- start: number;
7
- end: number;
6
+ /**
7
+ * First and last unit of the bar. `null` (either) means the row has no dates yet: no bar, a
8
+ * muted "no dates" hint in its track, and no resize handles (gh#1189).
9
+ */
10
+ start: number | null;
11
+ end: number | null;
8
12
  startLabel: string;
9
13
  endLabel: string;
10
14
  /**
@@ -13,6 +17,51 @@ export type RangeTimelineRow = {
13
17
  * indent (`--range-timeline-indent-width` per level) and the disclosure.
14
18
  */
15
19
  depth?: number;
20
+ /**
21
+ * The bar's fill, a hex colour from data (the same contract as `Badge color`), e.g. the issue
22
+ * status colour. The grips' ink flips black or white from the colour's luminance, the same pivot
23
+ * `tenantTheme` uses for `--primary-foreground`; a value that is not a hex keeps the default ink.
24
+ */
25
+ color?: string;
26
+ /** De-emphasise a closed / done row's bar (`--range-timeline-bar-muted-alpha`), nothing else. */
27
+ muted?: boolean;
28
+ /**
29
+ * Mark the bar overdue: a destructive edge on its inline end that keeps `color`, plus a localized
30
+ * screen-reader "overdue" so the colour is never the only carrier.
31
+ */
32
+ overdue?: boolean;
33
+ /**
34
+ * Shown on hover and on keyboard focus of the bar (key, title, status, assignee, start → due).
35
+ * The bar gains a focusable layer named by the row label; the grips stay separate buttons.
36
+ */
37
+ tooltip?: React.ReactNode;
38
+ /**
39
+ * The PLANNED range (予定), drawn as a dashed ghost bar; `start` / `end` are then the ACTUAL range
40
+ * (実績), drawn solid. Past the planned end the actual bar carries a destructive overrun segment;
41
+ * ending before it, a small early marker. Both are also spoken.
42
+ */
43
+ plan?: {
44
+ start: number | null;
45
+ end: number | null;
46
+ } | null;
47
+ /**
48
+ * Text after an overrun segment. Default: the overrun in axis units, localized as days
49
+ * ("+3日" / "+3d" / "+3 ngày"), since a Gantt's unit is the day. `false` shows none.
50
+ */
51
+ varianceLabel?: React.ReactNode | false;
52
+ /**
53
+ * A muted note shown after the bar when the row has no `plan`, e.g. "baseline後に追加". Nothing
54
+ * is drawn for a row without a plan unless this is set.
55
+ */
56
+ planNote?: React.ReactNode;
57
+ /**
58
+ * Which grips this row offers when `onRangeChange` is set. Default `true` (both). A started-but-open
59
+ * issue whose end is "today" passes `{ end: false }`, keeping the start grip. `false` removes both.
60
+ */
61
+ editable?: boolean | {
62
+ start?: boolean;
63
+ end?: boolean;
64
+ };
16
65
  };
17
66
  export type RangeTimelineProps = React.HTMLAttributes<HTMLElement> & {
18
67
  label: string;
@@ -63,6 +112,27 @@ export type RangeTimelineProps = React.HTMLAttributes<HTMLElement> & {
63
112
  sticky?: boolean | {
64
113
  offsetHeader?: number;
65
114
  };
115
+ /**
116
+ * Let the user resize the label column by dragging a divider in the header (gh#1189): a
117
+ * `role="separator"` with aria-valuenow/min/max, ArrowLeft/Right (Shift = a bigger step),
118
+ * Home/End, RTL-aware. `true` uses min 160 / max 640 px. The width lands on
119
+ * `--range-timeline-label-width`, so the token stays the default until the user drags.
120
+ */
121
+ resizableLabel?: boolean | {
122
+ min?: number;
123
+ max?: number;
124
+ };
125
+ /** Controlled label-column width in px. Persist it per user from `onLabelWidthChange`. */
126
+ labelWidth?: number;
127
+ /** Uncontrolled initial label-column width in px. Omitted: the token's width. */
128
+ defaultLabelWidth?: number;
129
+ /** Fires with the next label-column width (px) while dragging and on every key step. */
130
+ onLabelWidthChange?: (width: number) => void;
131
+ /**
132
+ * A new range is loading while the previous rows stay on screen: dims the body, draws an
133
+ * indeterminate line under the header and sets `aria-busy` (gh#1189).
134
+ */
135
+ busy?: boolean;
66
136
  };
67
137
  /** A horizontal range axis. Units and labels are data; the design system owns all geometry. */
68
138
  export declare const RangeTimeline: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
@@ -114,4 +184,25 @@ export declare const RangeTimeline: React.ForwardRefExoticComponent<React.HTMLAt
114
184
  sticky?: boolean | {
115
185
  offsetHeader?: number;
116
186
  };
187
+ /**
188
+ * Let the user resize the label column by dragging a divider in the header (gh#1189): a
189
+ * `role="separator"` with aria-valuenow/min/max, ArrowLeft/Right (Shift = a bigger step),
190
+ * Home/End, RTL-aware. `true` uses min 160 / max 640 px. The width lands on
191
+ * `--range-timeline-label-width`, so the token stays the default until the user drags.
192
+ */
193
+ resizableLabel?: boolean | {
194
+ min?: number;
195
+ max?: number;
196
+ };
197
+ /** Controlled label-column width in px. Persist it per user from `onLabelWidthChange`. */
198
+ labelWidth?: number;
199
+ /** Uncontrolled initial label-column width in px. Omitted: the token's width. */
200
+ defaultLabelWidth?: number;
201
+ /** Fires with the next label-column width (px) while dragging and on every key step. */
202
+ onLabelWidthChange?: (width: number) => void;
203
+ /**
204
+ * A new range is loading while the previous rows stay on screen: dims the body, draws an
205
+ * indeterminate line under the header and sets `aria-busy` (gh#1189).
206
+ */
207
+ busy?: boolean;
117
208
  } & React.RefAttributes<HTMLElement>>;