@godxjp/ui 32.14.0 → 33.0.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 (39) hide show
  1. package/README.md +4 -4
  2. package/agent/START-HERE.md +7 -7
  3. package/agent/components/HeatmapChart.json +97 -0
  4. package/agent/components/Tabs.json +1 -1
  5. package/agent/components/Toolbar.json +2 -9
  6. package/agent/components-index.json +5 -0
  7. package/agent/components.json +100 -10
  8. package/agent/index.json +7 -7
  9. package/agent/llms.txt +6 -6
  10. package/agent/tokens.json +114 -6
  11. package/dist/components/charts/chart-summary.d.ts +32 -1
  12. package/dist/components/charts/chart-summary.js +49 -0
  13. package/dist/components/charts/heatmap-chart.d.ts +19 -0
  14. package/dist/components/charts/heatmap-chart.js +293 -0
  15. package/dist/components/charts/index.d.ts +3 -0
  16. package/dist/components/charts/index.js +2 -0
  17. package/dist/components/feedback/tooltip.d.ts +9 -0
  18. package/dist/components/feedback/tooltip.js +4 -1
  19. package/dist/components/navigation/index.d.ts +1 -1
  20. package/dist/components/navigation/toolbar.d.ts +2 -2
  21. package/dist/components/navigation/toolbar.js +0 -3
  22. package/dist/contracts/measurement.json +1 -1
  23. package/dist/i18n/messages/en.json +8 -1
  24. package/dist/i18n/messages/ja.json +8 -1
  25. package/dist/i18n/messages/vi.json +8 -1
  26. package/dist/props/components/charts.prop.d.ts +58 -0
  27. package/dist/props/components/navigation.prop.d.ts +10 -12
  28. package/dist/props/registry.d.ts +37 -5
  29. package/dist/props/registry.js +36 -5
  30. package/dist/styles/chart-layout.css +161 -0
  31. package/dist/styles/layers.json +8 -1
  32. package/dist/styles/layout.css +0 -33
  33. package/dist/styles.css +1 -1
  34. package/dist/tokens/components/chart.css +27 -0
  35. package/dist/tokens/components/navigation.css +0 -2
  36. package/dist/tokens/foundation.css +12 -0
  37. package/docs/migrations/v33.md +60 -0
  38. package/package.json +6 -2
  39. package/scripts/ui-audit.mjs +13 -0
@@ -4,11 +4,6 @@ import type { ReactNode } from "react";
4
4
  import type { AffixProp, AffixTargetProp } from "./layout.prop.js";
5
5
  import type { ActionsProp, ChildrenProp, ClassNameProp, DisabledProp, ErrorProp, HasActiveFiltersProp, IdProp, LabelProp, OnClearFiltersProp, PendingProp, PlaceholderProp, StickyProp, TextAlignProp } from "../vocabulary/index.js";
6
6
  import type { SearchSelectOptionProp } from "./data-entry.prop.js";
7
- /**
8
- * `wrap` (default) stacks on narrow viewports then wraps onto extra rows; `scroll` keeps ONE
9
- * bounded row that scrolls inline, so a wide filter set never pushes the list below the fold.
10
- */
11
- export type FilterBarOverflowProp = "wrap" | "scroll";
12
7
  /**
13
8
  * Renders the canonical SearchInput as the FIRST control of the strip, with a token-owned
14
9
  * consistent width (`--filter-bar-search-width`, full-width below 640px). Controlled by consumer
@@ -59,7 +54,15 @@ export type FilterBarChipProp = {
59
54
  label: React.ReactNode;
60
55
  disabled?: DisabledProp;
61
56
  };
62
- /** @see Toolbar */
57
+ /**
58
+ * @see Toolbar
59
+ *
60
+ * A filter bar WRAPS — stacked below 640px, extra rows above — and never scrolls sideways: a
61
+ * horizontal strip hides filters off-screen and clips labels at its edges. When the filters are
62
+ * many, keep the few common ones in the bar and put the rest behind ONE "More filters" Button that
63
+ * opens a Sheet (or Popover) holding them. The library ships no dedicated component for that; it
64
+ * is a composition of Button + Sheet + FilterBarGroup.
65
+ */
63
66
  export type ToolbarProp = {
64
67
  onClear?: OnClearFiltersProp;
65
68
  hasActiveFilters?: HasActiveFiltersProp;
@@ -68,11 +71,6 @@ export type ToolbarProp = {
68
71
  * `--filter-bar-sticky-offset` / `--filter-bar-sticky-background` theme knobs.
69
72
  */
70
73
  sticky?: StickyProp;
71
- /**
72
- * Default `wrap`. Use `scroll` for list pages with many filters (long JA/EN/VI labels) where a
73
- * wrapped 3-row strip would push the table off screen.
74
- */
75
- overflow?: FilterBarOverflowProp;
76
74
  /**
77
75
  * When ANY model prop (`search`/`filters`/`chips`/
78
76
  * `onChipRemove`/`actions`/`resultCount`/`loading`/`disabled`/`error`) is present the bar
@@ -362,7 +360,7 @@ export type TabsOnEditProp = (target: string | React.MouseEvent<HTMLButtonElemen
362
360
  * @see Tabs — what the trigger strip does when there are more tabs than fit its container.
363
361
  *
364
362
  * This is Ant Design's `more`, mapped onto the `overflow` vocabulary this package already uses
365
- * for the same question (`FilterBarOverflowProp` on Toolbar) rather than re-spelled: antd names
363
+ * for the same question (`overflow` on Topbar) rather than re-spelled: antd names
366
364
  * the AFFORDANCE it happens to draw, this library names the BEHAVIOUR and owns the affordance.
367
365
  *
368
366
  * `scroll` (the default, and what every strip does today) keeps one bounded row that scrolls its
@@ -2331,6 +2331,43 @@ export declare const COMPONENT_PROP_REGISTRY: {
2331
2331
  readonly reason: "Forwarded ref to the <figure> element.";
2332
2332
  }];
2333
2333
  };
2334
+ readonly HeatmapChartProp: {
2335
+ readonly group: "data-display";
2336
+ readonly file: "components/charts.prop.ts";
2337
+ readonly vocabulary: readonly ["LabelProp", "DescriptionProp", "SizeProp", "EmptyMessageProp", "ClassNameProp", "IdProp", {
2338
+ readonly field: "rows";
2339
+ readonly local: true;
2340
+ readonly reason: "Row categories (y axis) — key + translated label.";
2341
+ }, {
2342
+ readonly field: "columns";
2343
+ readonly local: true;
2344
+ readonly reason: "Column categories (x axis) — key + translated label.";
2345
+ }, {
2346
+ readonly field: "data";
2347
+ readonly local: true;
2348
+ readonly reason: "Cell values keyed by row + column.";
2349
+ }, {
2350
+ readonly field: "showCaption";
2351
+ readonly local: true;
2352
+ readonly reason: "Paint the caption; false keeps it sr-only so the accessible name survives.";
2353
+ }, {
2354
+ readonly field: "numberFormat";
2355
+ readonly local: true;
2356
+ readonly reason: "Intl.NumberFormat options for cell values, tooltip and legend.";
2357
+ }, {
2358
+ readonly field: "topN";
2359
+ readonly local: true;
2360
+ readonly reason: "Emphasize the N highest cells (ring + text note, never colour alone).";
2361
+ }, {
2362
+ readonly field: "showLegend";
2363
+ readonly local: true;
2364
+ readonly reason: "Chart-specific legend toggle.";
2365
+ }, {
2366
+ readonly field: "ref";
2367
+ readonly local: true;
2368
+ readonly reason: "Forwarded ref to the <figure> element.";
2369
+ }];
2370
+ };
2334
2371
  readonly AreaChartProp: {
2335
2372
  readonly group: "data-display";
2336
2373
  readonly file: "components/charts.prop.ts";
@@ -2614,11 +2651,6 @@ export declare const COMPONENT_PROP_REGISTRY: {
2614
2651
  readonly file: "components/navigation.prop.ts";
2615
2652
  readonly vocabulary: readonly [];
2616
2653
  };
2617
- readonly FilterBarOverflowProp: {
2618
- readonly group: "navigation";
2619
- readonly file: "components/navigation.prop.ts";
2620
- readonly vocabulary: readonly [];
2621
- };
2622
2654
  readonly FilterBarSearchProp: {
2623
2655
  readonly group: "navigation";
2624
2656
  readonly file: "components/navigation.prop.ts";
@@ -2762,6 +2762,42 @@ const COMPONENT_PROP_REGISTRY = {
2762
2762
  { field: "ref", local: true, reason: "Forwarded ref to the <figure> element." }
2763
2763
  ]
2764
2764
  },
2765
+ HeatmapChartProp: {
2766
+ group: "data-display",
2767
+ file: "components/charts.prop.ts",
2768
+ vocabulary: [
2769
+ "LabelProp",
2770
+ "DescriptionProp",
2771
+ "SizeProp",
2772
+ "EmptyMessageProp",
2773
+ "ClassNameProp",
2774
+ "IdProp",
2775
+ { field: "rows", local: true, reason: "Row categories (y axis) \u2014 key + translated label." },
2776
+ {
2777
+ field: "columns",
2778
+ local: true,
2779
+ reason: "Column categories (x axis) \u2014 key + translated label."
2780
+ },
2781
+ { field: "data", local: true, reason: "Cell values keyed by row + column." },
2782
+ {
2783
+ field: "showCaption",
2784
+ local: true,
2785
+ reason: "Paint the caption; false keeps it sr-only so the accessible name survives."
2786
+ },
2787
+ {
2788
+ field: "numberFormat",
2789
+ local: true,
2790
+ reason: "Intl.NumberFormat options for cell values, tooltip and legend."
2791
+ },
2792
+ {
2793
+ field: "topN",
2794
+ local: true,
2795
+ reason: "Emphasize the N highest cells (ring + text note, never colour alone)."
2796
+ },
2797
+ { field: "showLegend", local: true, reason: "Chart-specific legend toggle." },
2798
+ { field: "ref", local: true, reason: "Forwarded ref to the <figure> element." }
2799
+ ]
2800
+ },
2765
2801
  AreaChartProp: {
2766
2802
  group: "data-display",
2767
2803
  file: "components/charts.prop.ts",
@@ -3054,11 +3090,6 @@ const COMPONENT_PROP_REGISTRY = {
3054
3090
  file: "components/navigation.prop.ts",
3055
3091
  vocabulary: []
3056
3092
  },
3057
- FilterBarOverflowProp: {
3058
- group: "navigation",
3059
- file: "components/navigation.prop.ts",
3060
- vocabulary: []
3061
- },
3062
3093
  FilterBarSearchProp: {
3063
3094
  group: "navigation",
3064
3095
  file: "components/navigation.prop.ts",
@@ -165,3 +165,164 @@
165
165
  .ui-chart-canvas [tabindex="-1"]:focus:not(:focus-visible) {
166
166
  outline: none;
167
167
  }
168
+
169
+ .ui-chart-heatmap[data-size="xs"] {
170
+ --chart-heatmap-cell-size: var(--chart-heatmap-cell-size-xs);
171
+ }
172
+
173
+ .ui-chart-heatmap[data-size="sm"] {
174
+ --chart-heatmap-cell-size: var(--chart-heatmap-cell-size-sm);
175
+ }
176
+
177
+ .ui-chart-heatmap[data-size="md"] {
178
+ --chart-heatmap-cell-size: var(--chart-heatmap-cell-size-md);
179
+ }
180
+
181
+ .ui-chart-heatmap[data-size="lg"] {
182
+ --chart-heatmap-cell-size: var(--chart-heatmap-cell-size-lg);
183
+ }
184
+
185
+ .ui-chart-heatmap-scroll {
186
+ inline-size: 100%;
187
+ min-inline-size: 0;
188
+ overflow-x: auto;
189
+ overscroll-behavior-inline: contain;
190
+ }
191
+
192
+ .ui-chart-heatmap-grid {
193
+ inline-size: 100%;
194
+ border-collapse: separate;
195
+ border-spacing: var(--chart-heatmap-cell-gap);
196
+ font-size: var(--chart-heatmap-tick-font-size);
197
+ line-height: var(--line-height-normal);
198
+ }
199
+
200
+ .ui-chart-heatmap-column-header,
201
+ .ui-chart-heatmap-row-header {
202
+ padding: 0;
203
+ font-weight: var(--font-weight-normal);
204
+ color: hsl(var(--muted-foreground));
205
+ white-space: nowrap;
206
+ }
207
+
208
+ .ui-chart-heatmap-column-header {
209
+ text-align: center;
210
+ }
211
+
212
+ .ui-chart-heatmap-row-header {
213
+ position: sticky;
214
+ inset-inline-start: 0;
215
+ z-index: 1;
216
+ inline-size: 1%;
217
+ padding-inline-end: var(--space-2);
218
+ text-align: start;
219
+ background: var(--chart-heatmap-row-header-background, hsl(var(--card)));
220
+ }
221
+
222
+ .ui-chart-heatmap-corner {
223
+ padding: 0;
224
+ }
225
+
226
+ .ui-chart-heatmap-cell {
227
+ min-inline-size: var(--chart-heatmap-cell-size);
228
+ inline-size: var(--chart-heatmap-cell-size);
229
+ block-size: var(--chart-heatmap-cell-size);
230
+ padding: 0;
231
+
232
+ border: var(--stroke-hairline) solid transparent;
233
+ border-radius: var(
234
+ --chart-heatmap-cell-radius,
235
+ calc(var(--radius) / var(--radius-ratio) / var(--radius-ratio))
236
+ );
237
+ }
238
+
239
+ .ui-chart-heatmap-cell[data-step="1"],
240
+ .ui-chart-heatmap-legend-swatch[data-step="1"] {
241
+ background: var(--chart-heat-1);
242
+ }
243
+
244
+ .ui-chart-heatmap-cell[data-step="2"],
245
+ .ui-chart-heatmap-legend-swatch[data-step="2"] {
246
+ background: var(--chart-heat-2);
247
+ }
248
+
249
+ .ui-chart-heatmap-cell[data-step="3"],
250
+ .ui-chart-heatmap-legend-swatch[data-step="3"] {
251
+ background: var(--chart-heat-3);
252
+ }
253
+
254
+ .ui-chart-heatmap-cell[data-step="4"],
255
+ .ui-chart-heatmap-legend-swatch[data-step="4"] {
256
+ background: var(--chart-heat-4);
257
+ }
258
+
259
+ .ui-chart-heatmap-cell[data-step="5"],
260
+ .ui-chart-heatmap-legend-swatch[data-step="5"] {
261
+ background: var(--chart-heat-5);
262
+ }
263
+
264
+ .ui-chart-heatmap-cell[data-empty],
265
+ .ui-chart-heatmap-legend-swatch[data-empty] {
266
+ background: transparent;
267
+ border: var(
268
+ --chart-heatmap-empty-border,
269
+ var(--stroke-hairline) dashed hsl(var(--muted-foreground))
270
+ );
271
+ }
272
+
273
+ .ui-chart-heatmap-cell[data-emphasized],
274
+ .ui-chart-heatmap-legend-swatch[data-emphasized] {
275
+ box-shadow:
276
+ inset 0 0 0 var(--chart-heatmap-emphasis-width)
277
+ var(--chart-heatmap-emphasis-border, hsl(var(--foreground))),
278
+ inset 0 0 0 calc(var(--chart-heatmap-emphasis-width) * 2) hsl(var(--card));
279
+ }
280
+
281
+ .ui-chart-heatmap-tooltip {
282
+ display: flex;
283
+ flex-direction: column;
284
+ }
285
+
286
+ .ui-chart-heatmap-tooltip-title {
287
+ font-variant-numeric: tabular-nums;
288
+ }
289
+
290
+ .ui-chart-heatmap-legend {
291
+ display: flex;
292
+ flex-wrap: wrap;
293
+ align-items: center;
294
+ gap: var(--chart-heatmap-legend-gap) calc(var(--chart-heatmap-legend-gap) * 2);
295
+ font-size: var(--chart-heatmap-tick-font-size);
296
+ line-height: var(--line-height-normal);
297
+ color: hsl(var(--muted-foreground));
298
+ }
299
+
300
+ .ui-chart-heatmap-legend-scale,
301
+ .ui-chart-heatmap-legend-item {
302
+ display: inline-flex;
303
+ align-items: center;
304
+ gap: var(--chart-heatmap-legend-gap);
305
+ font-variant-numeric: tabular-nums;
306
+ }
307
+
308
+ .ui-chart-heatmap-legend-ramp {
309
+ display: flex;
310
+ margin: 0;
311
+ padding: 0;
312
+ list-style: none;
313
+ }
314
+
315
+ .ui-chart-heatmap-legend-swatch {
316
+ display: inline-block;
317
+ inline-size: calc(var(--chart-heatmap-legend-swatch-size) * 1.5);
318
+ block-size: var(--chart-heatmap-legend-swatch-size);
319
+ border: var(--stroke-hairline) solid transparent;
320
+ }
321
+
322
+ .ui-chart-heatmap-legend-item > .ui-chart-heatmap-legend-swatch {
323
+ inline-size: var(--chart-heatmap-legend-swatch-size);
324
+ border-radius: var(
325
+ --chart-heatmap-cell-radius,
326
+ calc(var(--radius) / var(--radius-ratio) / var(--radius-ratio))
327
+ );
328
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "32.14.0",
2
+ "version": "33.0.0",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -564,6 +564,13 @@
564
564
  "dialog-layout.css"
565
565
  ]
566
566
  },
567
+ "HeatmapChart": {
568
+ "layers": [
569
+ "layout.css",
570
+ "dialog-layout.css",
571
+ "chart-layout.css"
572
+ ]
573
+ },
567
574
  "Icon": {
568
575
  "layers": [
569
576
  "icon-layout.css"
@@ -1510,39 +1510,6 @@
1510
1510
  font-size: var(--filter-label-font-size);
1511
1511
  }
1512
1512
 
1513
- @media (min-width: 640px) {
1514
- .ui-toolbar[data-overflow="scroll"] {
1515
- flex-wrap: nowrap;
1516
- overflow-x: auto;
1517
- overscroll-behavior-x: contain;
1518
- scrollbar-gutter: stable;
1519
- padding-block-end: var(--filter-bar-scroll-padding-y);
1520
- }
1521
-
1522
- .ui-toolbar[data-overflow="scroll"] > .ui-toolbar-group {
1523
- flex: 0 0 auto;
1524
- }
1525
-
1526
- .ui-toolbar[data-overflow="scroll"] > .ui-toolbar-clear {
1527
- position: sticky;
1528
- inset-inline-end: 0;
1529
- margin-inline-start: auto;
1530
- flex: 0 0 auto;
1531
-
1532
- z-index: 1;
1533
- background: hsl(var(--filter-bar-sticky-background, var(--background)));
1534
- }
1535
-
1536
- .ui-toolbar[data-overflow="scroll"] > .ui-filter-bar-end {
1537
- position: sticky;
1538
- inset-inline-end: 0;
1539
- margin-inline-start: auto;
1540
- flex: 0 0 auto;
1541
- z-index: 1;
1542
- background: hsl(var(--filter-bar-sticky-background, var(--background)));
1543
- }
1544
- }
1545
-
1546
1513
  .ui-filter-bar {
1547
1514
  display: flex;
1548
1515
  flex-direction: column;