@godxjp/ui 20.0.0 → 20.2.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 (273) hide show
  1. package/README.md +8 -2
  2. package/dist/app/app-provider.js +37 -21
  3. package/dist/app/index.d.ts +2 -0
  4. package/dist/app/index.js +2 -0
  5. package/dist/app/storage.d.ts +17 -0
  6. package/dist/app/storage.js +28 -0
  7. package/dist/app/theme-axes.d.ts +2 -0
  8. package/dist/app/theme-axes.js +45 -0
  9. package/dist/components/charts/chart-cartesian.d.ts +2 -1
  10. package/dist/components/charts/chart-cartesian.js +52 -3
  11. package/dist/components/charts/chart-category-axis.d.ts +55 -0
  12. package/dist/components/charts/chart-category-axis.js +93 -0
  13. package/dist/components/charts/chart-frame.d.ts +10 -1
  14. package/dist/components/charts/chart-frame.js +19 -3
  15. package/dist/components/charts/compact-bar-trend.d.ts +1 -1
  16. package/dist/components/charts/compact-bar-trend.js +2 -0
  17. package/dist/components/charts/pie-chart.d.ts +1 -1
  18. package/dist/components/charts/pie-chart.js +12 -1
  19. package/dist/components/charts/recharts-peer.d.ts +49 -0
  20. package/dist/components/charts/recharts-peer.js +45 -0
  21. package/dist/components/data-display/card.d.ts +12 -1
  22. package/dist/components/data-display/card.js +22 -4
  23. package/dist/components/data-display/code-block.js +6 -2
  24. package/dist/components/data-display/data-table.d.ts +39 -4
  25. package/dist/components/data-display/data-table.js +802 -270
  26. package/dist/components/data-display/descriptions.d.ts +27 -6
  27. package/dist/components/data-display/descriptions.js +58 -17
  28. package/dist/components/data-display/index.d.ts +2 -0
  29. package/dist/components/data-display/index.js +2 -0
  30. package/dist/components/data-display/list-row.d.ts +10 -1
  31. package/dist/components/data-display/list-row.js +7 -1
  32. package/dist/components/data-display/popover.d.ts +9 -3
  33. package/dist/components/data-display/popover.js +65 -11
  34. package/dist/components/data-display/range-timeline.d.ts +38 -0
  35. package/dist/components/data-display/range-timeline.js +161 -0
  36. package/dist/components/data-display/scroll-area.js +13 -2
  37. package/dist/components/data-display/service-launcher-card.js +14 -12
  38. package/dist/components/data-display/table.d.ts +71 -3
  39. package/dist/components/data-display/table.js +56 -18
  40. package/dist/components/data-display/tree-list.js +4 -9
  41. package/dist/components/data-entry/calendar.d.ts +2 -2
  42. package/dist/components/data-entry/calendar.js +23 -3
  43. package/dist/components/data-entry/cascader.d.ts +1 -1
  44. package/dist/components/data-entry/cascader.js +188 -24
  45. package/dist/components/data-entry/color-picker.d.ts +1 -1
  46. package/dist/components/data-entry/color-picker.js +17 -5
  47. package/dist/components/data-entry/control-appearance.d.ts +64 -0
  48. package/dist/components/data-entry/control-appearance.js +39 -0
  49. package/dist/components/data-entry/control-surface.d.ts +61 -0
  50. package/dist/components/data-entry/control-surface.js +39 -0
  51. package/dist/components/data-entry/date-picker.d.ts +1 -1
  52. package/dist/components/data-entry/date-picker.js +344 -113
  53. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  54. package/dist/components/data-entry/date-range-picker.js +278 -140
  55. package/dist/components/data-entry/form-field.d.ts +1 -1
  56. package/dist/components/data-entry/form-field.js +39 -4
  57. package/dist/components/data-entry/form.d.ts +4 -0
  58. package/dist/components/data-entry/form.js +4 -2
  59. package/dist/components/data-entry/index.d.ts +7 -3
  60. package/dist/components/data-entry/index.js +10 -1
  61. package/dist/components/data-entry/input-otp.d.ts +1 -1
  62. package/dist/components/data-entry/input.d.ts +12 -34
  63. package/dist/components/data-entry/input.js +92 -24
  64. package/dist/components/data-entry/month-picker.d.ts +1 -1
  65. package/dist/components/data-entry/month-picker.js +47 -10
  66. package/dist/components/data-entry/month-range-picker.d.ts +1 -1
  67. package/dist/components/data-entry/month-range-picker.js +51 -11
  68. package/dist/components/data-entry/number-input.d.ts +7 -0
  69. package/dist/components/data-entry/number-input.js +147 -98
  70. package/dist/components/data-entry/password-input.d.ts +1 -1
  71. package/dist/components/data-entry/radio.d.ts +1 -1
  72. package/dist/components/data-entry/radio.js +61 -13
  73. package/dist/components/data-entry/search-input.d.ts +1 -1
  74. package/dist/components/data-entry/search-input.js +16 -2
  75. package/dist/components/data-entry/search-select.d.ts +2 -2
  76. package/dist/components/data-entry/search-select.js +209 -78
  77. package/dist/components/data-entry/select.d.ts +22 -4
  78. package/dist/components/data-entry/select.js +215 -163
  79. package/dist/components/data-entry/slider.d.ts +9 -1
  80. package/dist/components/data-entry/slider.js +87 -9
  81. package/dist/components/data-entry/switch.d.ts +3 -0
  82. package/dist/components/data-entry/switch.js +29 -3
  83. package/dist/components/data-entry/textarea.d.ts +14 -56
  84. package/dist/components/data-entry/textarea.js +80 -33
  85. package/dist/components/data-entry/time-picker.d.ts +2 -2
  86. package/dist/components/data-entry/time-picker.js +333 -109
  87. package/dist/components/data-entry/time-range-picker.d.ts +5 -0
  88. package/dist/components/data-entry/time-range-picker.js +89 -0
  89. package/dist/components/data-entry/transfer.d.ts +1 -1
  90. package/dist/components/data-entry/transfer.js +86 -28
  91. package/dist/components/data-entry/tree-select.d.ts +1 -1
  92. package/dist/components/data-entry/tree-select.js +201 -113
  93. package/dist/components/data-entry/tree-utils.js +7 -14
  94. package/dist/components/data-entry/upload-files.d.ts +2 -0
  95. package/dist/components/data-entry/upload-files.js +31 -0
  96. package/dist/components/data-entry/upload-request.d.ts +4 -0
  97. package/dist/components/data-entry/upload-request.js +53 -0
  98. package/dist/components/data-entry/upload-types.d.ts +28 -0
  99. package/dist/components/data-entry/upload-types.js +2 -0
  100. package/dist/components/data-entry/upload.d.ts +2 -2
  101. package/dist/components/data-entry/upload.js +475 -115
  102. package/dist/components/feedback/dialog.js +19 -19
  103. package/dist/components/feedback/sheet.js +3 -0
  104. package/dist/components/feedback/tooltip.js +3 -0
  105. package/dist/components/general/button.d.ts +2 -1
  106. package/dist/components/general/button.js +7 -1
  107. package/dist/components/general/index.d.ts +1 -0
  108. package/dist/components/general/index.js +2 -0
  109. package/dist/components/general/typography.d.ts +3 -0
  110. package/dist/components/general/typography.js +15 -1
  111. package/dist/components/general/visually-hidden.d.ts +3 -0
  112. package/dist/components/general/visually-hidden.js +9 -0
  113. package/dist/components/layout/app-launcher.d.ts +34 -0
  114. package/dist/components/layout/app-launcher.js +261 -0
  115. package/dist/components/layout/app-shell.d.ts +3 -1
  116. package/dist/components/layout/app-shell.js +34 -14
  117. package/dist/components/layout/auth-shell.d.ts +1 -1
  118. package/dist/components/layout/auth-shell.js +2 -0
  119. package/dist/components/layout/breadcrumb.d.ts +14 -2
  120. package/dist/components/layout/breadcrumb.js +46 -4
  121. package/dist/components/layout/flex.d.ts +1 -1
  122. package/dist/components/layout/flex.js +23 -2
  123. package/dist/components/layout/index.d.ts +3 -0
  124. package/dist/components/layout/index.js +5 -1
  125. package/dist/components/layout/org-switcher.js +20 -1
  126. package/dist/components/layout/page-container.d.ts +1 -1
  127. package/dist/components/layout/page-container.js +5 -3
  128. package/dist/components/layout/responsive-grid.d.ts +16 -2
  129. package/dist/components/layout/responsive-grid.js +29 -2
  130. package/dist/components/layout/sidebar.js +2 -1
  131. package/dist/components/layout/topbar-item.d.ts +3 -0
  132. package/dist/components/layout/topbar-item.js +18 -3
  133. package/dist/components/layout/topbar.d.ts +1 -1
  134. package/dist/components/layout/topbar.js +27 -6
  135. package/dist/components/navigation/dropdown-menu.d.ts +30 -2
  136. package/dist/components/navigation/dropdown-menu.js +73 -11
  137. package/dist/components/navigation/pagination.d.ts +2 -2
  138. package/dist/components/navigation/pagination.js +155 -83
  139. package/dist/components/navigation/steps.d.ts +2 -2
  140. package/dist/components/navigation/steps.js +29 -4
  141. package/dist/components/navigation/tabs.d.ts +5 -33
  142. package/dist/components/navigation/tabs.js +232 -64
  143. package/dist/components/ui/hover-card.js +3 -0
  144. package/dist/components/ui/input-otp.d.ts +26 -28
  145. package/dist/components/ui/input-otp.js +50 -7
  146. package/dist/components/ui/password-input.d.ts +36 -2
  147. package/dist/components/ui/password-input.js +27 -7
  148. package/dist/components/ui/rating.d.ts +25 -0
  149. package/dist/components/ui/rating.js +67 -27
  150. package/dist/components/ui/segmented.d.ts +9 -0
  151. package/dist/components/ui/segmented.js +17 -2
  152. package/dist/components/ui/separator.d.ts +4 -0
  153. package/dist/components/ui/separator.js +13 -0
  154. package/dist/components/ui/tag-input.d.ts +45 -0
  155. package/dist/components/ui/tag-input.js +109 -27
  156. package/dist/form/form-context.d.ts +29 -0
  157. package/dist/form/form-context.js +44 -4
  158. package/dist/form/form-field-array.d.ts +22 -0
  159. package/dist/form/form-field-array.js +50 -0
  160. package/dist/form/form-field-control.d.ts +2 -1
  161. package/dist/form/form-field-control.js +116 -40
  162. package/dist/form/form-root.d.ts +2 -1
  163. package/dist/form/form-root.js +142 -23
  164. package/dist/form/index.d.ts +3 -1
  165. package/dist/form/index.js +12 -1
  166. package/dist/i18n/index.d.ts +1 -1
  167. package/dist/i18n/index.js +3 -1
  168. package/dist/i18n/messages/en.json +59 -6
  169. package/dist/i18n/messages/ja.json +59 -6
  170. package/dist/i18n/messages/vi.json +59 -6
  171. package/dist/i18n/translate.d.ts +19 -0
  172. package/dist/i18n/translate.js +24 -0
  173. package/dist/inertia/index.d.ts +20 -0
  174. package/dist/inertia/index.js +60 -1
  175. package/dist/lib/control-styles.d.ts +25 -3
  176. package/dist/lib/control-styles.js +9 -3
  177. package/dist/lib/datetime/picker-format.d.ts +8 -0
  178. package/dist/lib/datetime/picker-format.js +54 -0
  179. package/dist/lib/overlay-portal.d.ts +18 -0
  180. package/dist/lib/overlay-portal.js +17 -0
  181. package/dist/props/components/app.prop.d.ts +13 -2
  182. package/dist/props/components/charts.prop.d.ts +21 -0
  183. package/dist/props/components/data-display.prop.d.ts +55 -4
  184. package/dist/props/components/data-entry.prop.d.ts +687 -43
  185. package/dist/props/components/form.prop.d.ts +142 -4
  186. package/dist/props/components/general.prop.d.ts +30 -1
  187. package/dist/props/components/index.d.ts +2 -2
  188. package/dist/props/components/layout.prop.d.ts +255 -8
  189. package/dist/props/components/navigation.prop.d.ts +113 -3
  190. package/dist/props/registry.d.ts +376 -10
  191. package/dist/props/registry.js +493 -9
  192. package/dist/props/vocabulary/data.prop.d.ts +179 -1
  193. package/dist/props/vocabulary/index.d.ts +4 -4
  194. package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
  195. package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
  196. package/dist/props/vocabulary/shared.prop.d.ts +33 -0
  197. package/dist/styles/badge-layout.css +2 -1
  198. package/dist/styles/card-layout.css +36 -5
  199. package/dist/styles/chart-layout.css +17 -1
  200. package/dist/styles/control.css +520 -14
  201. package/dist/styles/data-display-layout.css +248 -7
  202. package/dist/styles/data-entry-layout.css +13 -0
  203. package/dist/styles/layout.css +221 -4
  204. package/dist/styles/navigation-layout.css +230 -1
  205. package/dist/styles/shell-layout.css +690 -21
  206. package/dist/styles/table-layout.css +95 -6
  207. package/dist/styles/text-layout.css +5 -0
  208. package/dist/tokens/base.css +1 -0
  209. package/dist/tokens/components/badge.css +1 -0
  210. package/dist/tokens/components/chart.css +6 -0
  211. package/dist/tokens/components/control.css +81 -3
  212. package/dist/tokens/components/data-display.css +9 -0
  213. package/dist/tokens/components/descriptions.css +11 -0
  214. package/dist/tokens/components/flex.css +8 -0
  215. package/dist/tokens/components/navigation.css +55 -0
  216. package/dist/tokens/components/shell.css +100 -5
  217. package/dist/tokens/components/table.css +14 -0
  218. package/dist/tokens/foundation.css +2 -0
  219. package/dist/tokens/semantic/layout.css +9 -0
  220. package/docs/CONSUMER-RULES.md +13 -0
  221. package/docs/DESIGN-AUTHORITY.md +43 -6
  222. package/docs/DEVELOPMENT.md +4 -3
  223. package/docs/FORMS.md +151 -6
  224. package/docs/FRAME-COVERAGE-REPORT.md +29 -16
  225. package/docs/README.md +1 -1
  226. package/docs/STANDARDS-vocabulary-tokens.md +1 -1
  227. package/docs/TESTING.md +15 -6
  228. package/docs/charts/cjk-category-axis.tsx +81 -0
  229. package/docs/data-display/card/index.tsx +22 -0
  230. package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
  231. package/docs/data-display/data-table/index.tsx +23 -0
  232. package/docs/data-display/descriptions.tsx +41 -0
  233. package/docs/data-display/list-row.tsx +6 -6
  234. package/docs/data-display/scroll-area.tsx +31 -25
  235. package/docs/data-display/table.tsx +104 -45
  236. package/docs/data-display/timeline.tsx +41 -0
  237. package/docs/data-entry/date-picker.tsx +85 -0
  238. package/docs/data-entry/date-range-picker.tsx +26 -0
  239. package/docs/data-entry/form-dynamic-fields.tsx +199 -0
  240. package/docs/data-entry/form.tsx +74 -4
  241. package/docs/data-entry/input-otp.tsx +24 -0
  242. package/docs/data-entry/input.tsx +46 -1
  243. package/docs/data-entry/month-range-picker.tsx +1 -1
  244. package/docs/data-entry/select.tsx +27 -0
  245. package/docs/data-entry/switch.tsx +41 -0
  246. package/docs/data-entry/textarea.tsx +38 -0
  247. package/docs/data-entry/time-picker.tsx +85 -1
  248. package/docs/data-entry/time-range-picker.tsx +55 -0
  249. package/docs/data-entry/transfer.tsx +17 -0
  250. package/docs/data-entry/upload.tsx +56 -12
  251. package/docs/feedback/tooltip.tsx +1 -1
  252. package/docs/general/activity.tsx +2 -2
  253. package/docs/general/button/index.tsx +14 -1
  254. package/docs/general/typography.tsx +14 -1
  255. package/docs/layout/app-launcher.tsx +195 -0
  256. package/docs/layout/app-shell-arrangements.tsx +5 -5
  257. package/docs/layout/app-shell.tsx +11 -0
  258. package/docs/layout/flex.tsx +50 -0
  259. package/docs/layout/responsive-grid.tsx +21 -1
  260. package/docs/layout/topbar.tsx +5 -9
  261. package/docs/navigation/app-setting-picker.tsx +11 -0
  262. package/docs/navigation/breadcrumb.tsx +48 -0
  263. package/docs/navigation/dropdown-menu.tsx +21 -0
  264. package/docs/navigation/pagination.tsx +52 -0
  265. package/docs/navigation/steps.tsx +37 -0
  266. package/docs/navigation/tabs.tsx +97 -1
  267. package/docs/query/button-refetch.tsx +1 -0
  268. package/docs/showcase/settings-security-mfa.tsx +3 -3
  269. package/package.json +24 -4
  270. package/scripts/_agent-setup.mjs +76 -9
  271. package/scripts/init-guinea-pig.mjs +26 -4
  272. package/scripts/ui-audit.mjs +243 -30
  273. package/scripts/visual-audit.mjs +45 -7
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { Plus } from "lucide-react";
5
5
  import { cn } from "../../lib/utils.js";
6
6
  import { Badge } from "./badge.js";
7
- import { Card } from "./card.js";
7
+ import { Card, CardContent } from "./card.js";
8
8
  const ServiceLauncherCard = React.forwardRef(
9
9
  ({
10
10
  className,
@@ -20,7 +20,7 @@ const ServiceLauncherCard = React.forwardRef(
20
20
  ...props
21
21
  }, ref) => {
22
22
  const Heading = `h${titleLevel}`;
23
- return /* @__PURE__ */ jsxs(
23
+ return /* @__PURE__ */ jsx(
24
24
  Card,
25
25
  {
26
26
  ref,
@@ -29,24 +29,26 @@ const ServiceLauncherCard = React.forwardRef(
29
29
  "data-service-launcher": "",
30
30
  "data-unavailable": disabledReason != null ? "" : void 0,
31
31
  ...props,
32
- children: [
32
+ children: /* @__PURE__ */ jsxs(CardContent, { solo: true, children: [
33
33
  /* @__PURE__ */ jsxs("div", { "data-slot": "service-launcher-heading", children: [
34
- /* @__PURE__ */ jsx("span", { "data-slot": "service-launcher-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
35
- /* @__PURE__ */ jsx(Heading, { "data-slot": "service-launcher-title", children: title }),
34
+ /* @__PURE__ */ jsxs("div", { "data-slot": "service-launcher-identity", children: [
35
+ /* @__PURE__ */ jsx("span", { "data-slot": "service-launcher-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
36
+ /* @__PURE__ */ jsx(Heading, { "data-slot": "service-launcher-title", children: title })
37
+ ] }),
36
38
  statusLabel != null ? /* @__PURE__ */ jsx(Badge, { tone: statusTone, "data-slot": "service-launcher-status", children: statusLabel }) : null
37
39
  ] }),
38
40
  description != null ? /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-description", children: description }) : null,
39
41
  metadata != null ? /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-metadata", children: metadata }) : null,
40
42
  disabledReason != null ? /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-disabled-reason", children: disabledReason }) : null,
41
43
  /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-action", children: action })
42
- ]
44
+ ] })
43
45
  }
44
46
  );
45
47
  }
46
48
  );
47
49
  ServiceLauncherCard.displayName = "ServiceLauncherCard";
48
50
  const ServiceCatalogCta = React.forwardRef(
49
- ({ className, icon: Icon = Plus, title, action, ...props }, ref) => /* @__PURE__ */ jsxs(
51
+ ({ className, icon: Icon = Plus, title, action, ...props }, ref) => /* @__PURE__ */ jsx(
50
52
  Card,
51
53
  {
52
54
  ref,
@@ -54,11 +56,11 @@ const ServiceCatalogCta = React.forwardRef(
54
56
  className: cn("ui-service-catalog-cta", className),
55
57
  "data-service-catalog-cta": "",
56
58
  ...props,
57
- children: [
59
+ children: /* @__PURE__ */ jsxs(CardContent, { solo: true, children: [
58
60
  /* @__PURE__ */ jsx(Icon, { "data-slot": "service-catalog-icon", "aria-hidden": "true" }),
59
61
  /* @__PURE__ */ jsx("div", { "data-slot": "service-catalog-title", children: title }),
60
62
  /* @__PURE__ */ jsx("div", { "data-slot": "service-catalog-action", children: action })
61
- ]
63
+ ] })
62
64
  }
63
65
  )
64
66
  );
@@ -68,7 +70,7 @@ function ServiceLauncherCardSkeleton({
68
70
  label,
69
71
  ...props
70
72
  }) {
71
- return /* @__PURE__ */ jsxs(
73
+ return /* @__PURE__ */ jsx(
72
74
  Card,
73
75
  {
74
76
  density: "tight",
@@ -76,7 +78,7 @@ function ServiceLauncherCardSkeleton({
76
78
  "data-service-launcher": "",
77
79
  "aria-busy": "true",
78
80
  ...props,
79
- children: [
81
+ children: /* @__PURE__ */ jsxs(CardContent, { solo: true, children: [
80
82
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: label }),
81
83
  /* @__PURE__ */ jsxs("div", { "data-slot": "service-launcher-skeleton-heading", children: [
82
84
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-icon" }),
@@ -86,7 +88,7 @@ function ServiceLauncherCardSkeleton({
86
88
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-description" }),
87
89
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-metadata" }),
88
90
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-action" })
89
- ]
91
+ ] })
90
92
  }
91
93
  );
92
94
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import type { BreakpointProp, FlushProp, TableCellIndentProp, TableColumnPriorityProp, TablePresetProp } from "../../props/vocabulary/index.js";
2
+ import type { BreakpointProp, FlushProp, TableCellIndentProp, TableColumnPriorityProp, TablePresetProp, WidthProp } from "../../props/vocabulary/index.js";
3
3
  export type TableProps = React.HTMLAttributes<HTMLTableElement> & {
4
4
  /**
5
5
  * Whether the Table owns its own horizontal-scroll region (default `true`). When `true` a table
@@ -18,6 +18,36 @@ export type TableProps = React.HTMLAttributes<HTMLTableElement> & {
18
18
  * table exactly as it is.
19
19
  */
20
20
  preset?: TablePresetProp;
21
+ /**
22
+ * PER-INSTANCE column measures for `preset="action-collection"`, in place of re-pointing its
23
+ * `--table-action-collection-*` knobs from a consumer stylesheet.
24
+ *
25
+ * Those knobs are global by design, and that is exactly the problem: two collections on the same
26
+ * screen do not share a column budget. A console that widened `actions` globally so a Japanese
27
+ * status badge would stop breaking to one character per line — an SC 1.4.10 reflow failure —
28
+ * collapsed a sibling table's name column to ~15px in the same change. The only way out was a
29
+ * scoped class in consumer CSS, and the comment that shipped with it said so: "until the package
30
+ * can express a per-table measure, the retune stays on the collection needing it".
31
+ *
32
+ * Emitted as inline custom properties, the same contract `Flex width` uses for a call-site
33
+ * measurement: the value is a raw length the design system cannot know, so it rides in `style`
34
+ * and leaves `data-column-widths` on the DOM so each one stays countable.
35
+ */
36
+ columnWidths?: {
37
+ /** `--table-action-collection-actions-width` — the row-action column above the collapse step. */
38
+ actions?: string;
39
+ /** `--table-action-collection-actions-width-compact` — the same column below it. */
40
+ actionsCompact?: string;
41
+ /** `--table-action-collection-meta-width-compact` — a `meta`-priority column below the step. */
42
+ metaCompact?: string;
43
+ /**
44
+ * `--table-action-collection-min-inline-size-compact` — the legibility FLOOR the compact tier
45
+ * keeps before the wrapper scrolls. The preset sizes its compact tier for one column per
46
+ * priority; a collection carrying several of the same priority needs a wider floor or its
47
+ * free-text column is squeezed toward zero.
48
+ */
49
+ minInlineSizeCompact?: string;
50
+ };
21
51
  /** Defaults to `"sm"` (40rem). Ignored while `preset` is `"default"`. */
22
52
  collapseBelow?: BreakpointProp;
23
53
  };
@@ -39,6 +69,36 @@ export declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes
39
69
  * table exactly as it is.
40
70
  */
41
71
  preset?: TablePresetProp;
72
+ /**
73
+ * PER-INSTANCE column measures for `preset="action-collection"`, in place of re-pointing its
74
+ * `--table-action-collection-*` knobs from a consumer stylesheet.
75
+ *
76
+ * Those knobs are global by design, and that is exactly the problem: two collections on the same
77
+ * screen do not share a column budget. A console that widened `actions` globally so a Japanese
78
+ * status badge would stop breaking to one character per line — an SC 1.4.10 reflow failure —
79
+ * collapsed a sibling table's name column to ~15px in the same change. The only way out was a
80
+ * scoped class in consumer CSS, and the comment that shipped with it said so: "until the package
81
+ * can express a per-table measure, the retune stays on the collection needing it".
82
+ *
83
+ * Emitted as inline custom properties, the same contract `Flex width` uses for a call-site
84
+ * measurement: the value is a raw length the design system cannot know, so it rides in `style`
85
+ * and leaves `data-column-widths` on the DOM so each one stays countable.
86
+ */
87
+ columnWidths?: {
88
+ /** `--table-action-collection-actions-width` — the row-action column above the collapse step. */
89
+ actions?: string;
90
+ /** `--table-action-collection-actions-width-compact` — the same column below it. */
91
+ actionsCompact?: string;
92
+ /** `--table-action-collection-meta-width-compact` — a `meta`-priority column below the step. */
93
+ metaCompact?: string;
94
+ /**
95
+ * `--table-action-collection-min-inline-size-compact` — the legibility FLOOR the compact tier
96
+ * keeps before the wrapper scrolls. The preset sizes its compact tier for one column per
97
+ * priority; a collection carrying several of the same priority needs a wider floor or its
98
+ * free-text column is squeezed toward zero.
99
+ */
100
+ minInlineSizeCompact?: string;
101
+ };
42
102
  /** Defaults to `"sm"` (40rem). Ignored while `preset` is `"default"`. */
43
103
  collapseBelow?: BreakpointProp;
44
104
  } & React.RefAttributes<HTMLTableElement>>;
@@ -53,6 +113,14 @@ export declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttribu
53
113
  type TableCellPriority = {
54
114
  priority?: TableColumnPriorityProp;
55
115
  };
116
+ /** Logical column alignment, wrapping and measure, shared by header and body cells.
117
+ * Numeric cells use tabular figures and end alignment unless align is explicit. */
118
+ type TableCellAxes = {
119
+ align?: "start" | "center" | "end";
120
+ numeric?: boolean;
121
+ wrap?: boolean;
122
+ width?: WidthProp;
123
+ };
56
124
  /**
57
125
  * Rendered into the DOM unconditionally (so it exists for the preset's CSS to reveal) but visually
58
126
  * hidden above the collapse step, where the real `<th>` already carries the label — an ordinary
@@ -61,7 +129,7 @@ type TableCellPriority = {
61
129
  type TableCellLabel = {
62
130
  label?: React.ReactNode;
63
131
  };
64
- export declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & TableCellPriority & React.RefAttributes<HTMLTableCellElement>>;
132
+ export declare const TableHead: React.ForwardRefExoticComponent<Omit<React.ThHTMLAttributes<HTMLTableCellElement>, "align"> & TableCellPriority & TableCellAxes & React.RefAttributes<HTMLTableCellElement>>;
65
133
  /**
66
134
  * The cell's CONTENT owns its inset — an expanded detail panel, a nested table, a full-bleed media
67
135
  * strip. The cell drops its own padding so the child reaches the cell edges; without it the only
@@ -79,5 +147,5 @@ type TableCellFlush = {
79
147
  type TableCellIndent = {
80
148
  indent?: TableCellIndentProp;
81
149
  };
82
- export declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & TableCellPriority & TableCellLabel & TableCellFlush & TableCellIndent & React.RefAttributes<HTMLTableCellElement>>;
150
+ export declare const TableCell: React.ForwardRefExoticComponent<Omit<React.TdHTMLAttributes<HTMLTableCellElement>, "align"> & TableCellPriority & TableCellLabel & TableCellFlush & TableCellIndent & TableCellAxes & React.RefAttributes<HTMLTableCellElement>>;
83
151
  export {};
@@ -9,6 +9,7 @@ const Table = React.forwardRef(
9
9
  bordered = false,
10
10
  preset = "default",
11
11
  collapseBelow = "sm",
12
+ columnWidths,
12
13
  ...props
13
14
  }, ref) => (
14
15
  // A table wider than its container scrolls horizontally in this wrapper; keep it
@@ -27,6 +28,13 @@ const Table = React.forwardRef(
27
28
  ),
28
29
  "data-preset": preset === "default" ? void 0 : preset,
29
30
  "data-collapse-below": preset === "default" ? void 0 : collapseBelow,
31
+ "data-column-widths": columnWidths ? "" : void 0,
32
+ style: columnWidths ? {
33
+ "--table-action-collection-actions-width": columnWidths.actions,
34
+ "--table-action-collection-actions-width-compact": columnWidths.actionsCompact,
35
+ "--table-action-collection-meta-width-compact": columnWidths.metaCompact,
36
+ "--table-action-collection-min-inline-size-compact": columnWidths.minInlineSizeCompact
37
+ } : void 0,
30
38
  ...scrollable ? { tabIndex: 0 } : {},
31
39
  children: /* @__PURE__ */ jsx(
32
40
  "table",
@@ -65,34 +73,64 @@ const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
65
73
  }
66
74
  ));
67
75
  TableRow.displayName = "TableRow";
68
- const TableHead = React.forwardRef(({ className, priority, ...props }, ref) => /* @__PURE__ */ jsx(
76
+ function cellWidth(width) {
77
+ if (width === void 0) return void 0;
78
+ return typeof width === "number" ? `${width}px` : width;
79
+ }
80
+ const TableHead = React.forwardRef(({ className, priority, align, numeric, wrap, width, style, ...props }, ref) => /* @__PURE__ */ jsx(
69
81
  "th",
70
82
  {
71
83
  ref,
72
84
  "data-slot": "table-head",
73
85
  "data-priority": priority,
86
+ "data-align": align,
87
+ "data-numeric": numeric ? "" : void 0,
88
+ "data-wrap": wrap ? "" : void 0,
74
89
  className: cn(tableHeadHeightClass, className),
90
+ style: width === void 0 ? style : { ...style, inlineSize: cellWidth(width) },
75
91
  ...props
76
92
  }
77
93
  ));
78
94
  TableHead.displayName = "TableHead";
79
- const TableCell = React.forwardRef(({ className, priority, label, flush, indent, children, style, ...props }, ref) => /* @__PURE__ */ jsxs(
80
- "td",
81
- {
82
- ref,
83
- "data-slot": "table-cell",
84
- "data-priority": priority,
85
- "data-flush": flush ? "" : void 0,
86
- "data-indent": indent === void 0 ? void 0 : indent,
87
- className: cn(className),
88
- style: indent === void 0 ? style : { ...style, "--table-cell-indent-level": indent },
89
- ...props,
90
- children: [
91
- label !== void 0 ? /* @__PURE__ */ jsx("span", { className: "ui-table-stacked-collection-label", "aria-hidden": "true", children: label }) : null,
92
- children
93
- ]
94
- }
95
- ));
95
+ const TableCell = React.forwardRef(
96
+ ({
97
+ className,
98
+ priority,
99
+ label,
100
+ flush,
101
+ indent,
102
+ align,
103
+ numeric,
104
+ wrap,
105
+ width,
106
+ children,
107
+ style,
108
+ ...props
109
+ }, ref) => /* @__PURE__ */ jsxs(
110
+ "td",
111
+ {
112
+ ref,
113
+ "data-slot": "table-cell",
114
+ "data-priority": priority,
115
+ "data-flush": flush ? "" : void 0,
116
+ "data-indent": indent === void 0 ? void 0 : indent,
117
+ "data-align": align,
118
+ "data-numeric": numeric ? "" : void 0,
119
+ "data-wrap": wrap ? "" : void 0,
120
+ className: cn(className),
121
+ style: indent === void 0 && width === void 0 ? style : {
122
+ ...style,
123
+ ...indent === void 0 ? null : { "--table-cell-indent-level": indent },
124
+ ...width === void 0 ? null : { inlineSize: cellWidth(width) }
125
+ },
126
+ ...props,
127
+ children: [
128
+ label !== void 0 ? /* @__PURE__ */ jsx("span", { className: "ui-table-stacked-collection-label", "aria-hidden": "true", children: label }) : null,
129
+ children
130
+ ]
131
+ }
132
+ )
133
+ );
96
134
  TableCell.displayName = "TableCell";
97
135
  export {
98
136
  Table,
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { ChevronRight, Package } from "lucide-react";
4
3
  import { Badge } from "./badge.js";
5
4
  function TreeList({ items }) {
6
5
  return /* @__PURE__ */ jsx("ul", { className: "ui-tree-list", children: items.map((item) => /* @__PURE__ */ jsxs(
@@ -8,19 +7,15 @@ function TreeList({ items }) {
8
7
  {
9
8
  className: "ui-tree-item",
10
9
  "data-active": item.active ? "true" : void 0,
11
- "data-depth": item.depth ?? 0,
10
+ "data-depth": Math.max(0, item.depth ?? 0),
11
+ style: { "--tree-item-depth": Math.max(0, item.depth ?? 0) },
12
12
  "aria-current": item.active ? "true" : void 0,
13
13
  children: [
14
- /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" }),
15
- /* @__PURE__ */ jsx(Package, { "aria-hidden": "true" }),
16
14
  /* @__PURE__ */ jsxs("div", { className: "ui-tree-item-body", children: [
17
- /* @__PURE__ */ jsxs("div", { className: "ui-tree-item-title", children: [
18
- item.active ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Current: " }) : null,
19
- item.title
20
- ] }),
15
+ /* @__PURE__ */ jsx("div", { className: "ui-tree-item-title", children: item.title }),
21
16
  item.description ? /* @__PURE__ */ jsx("div", { className: "ui-tree-item-description", children: item.description }) : null
22
17
  ] }),
23
- item.badge ? /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: item.badge }) : null
18
+ item.badge != null ? /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: item.badge }) : null
24
19
  ]
25
20
  },
26
21
  item.id
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import type { CalendarProp } from "../../props/components/data-entry.prop.js";
3
- export type { CalendarProp, CalendarProp as CalendarProps, CalendarFooterProp, } from "../../props/components/data-entry.prop.js";
4
- export declare function Calendar({ className, classNames, showOutsideDays, "aria-label": ariaLabel, labels, showToday, showClose, onClose, footer, width, bordered, month: monthProp, onMonthChange, ...props }: CalendarProp): React.JSX.Element;
3
+ export type { CalendarProp, CalendarProp as CalendarProps, CalendarCellRenderProp, CalendarFooterProp, } from "../../props/components/data-entry.prop.js";
4
+ export declare function Calendar({ className, classNames, showOutsideDays, "aria-label": ariaLabel, labels, showToday, showClose, onClose, footer, width, bordered, cellRender, month: monthProp, onMonthChange, locale: localeProp, ...props }: CalendarProp): React.JSX.Element;
@@ -2,8 +2,8 @@
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from "lucide-react";
5
- import { DayPicker, dateMatchModifiers } from "react-day-picker";
6
- import { useTranslation } from "../../i18n/use-translation.js";
5
+ import { DayButton, DayPicker, dateMatchModifiers } from "react-day-picker";
6
+ import { usePickerLocales, useTranslation } from "../../i18n/use-translation.js";
7
7
  import { cn } from "../../lib/utils.js";
8
8
  import { controlIconSmClass } from "../../lib/control-styles.js";
9
9
  import { Button, buttonVariants } from "../general/button.js";
@@ -23,11 +23,14 @@ function Calendar({
23
23
  footer,
24
24
  width = "auto",
25
25
  bordered = false,
26
+ cellRender,
26
27
  month: monthProp,
27
28
  onMonthChange,
29
+ locale: localeProp,
28
30
  ...props
29
31
  }) {
30
32
  const { t } = useTranslation();
33
+ const { dayPickerLocale } = usePickerLocales(localeProp);
31
34
  const [month, setMonth] = React.useState(monthProp ?? props.defaultMonth);
32
35
  const today = startOfDay(props.today ?? /* @__PURE__ */ new Date());
33
36
  const todayDisabled = props.startMonth != null && today < startOfMonth(props.startMonth) || props.endMonth != null && today > endOfMonth(props.endMonth) || props.disabled != null && dateMatchModifiers(today, props.disabled);
@@ -67,6 +70,7 @@ function Calendar({
67
70
  return /* @__PURE__ */ jsx(
68
71
  DayPicker,
69
72
  {
73
+ locale: dayPickerLocale,
70
74
  showOutsideDays,
71
75
  "aria-label": ariaLabel,
72
76
  month: showToday ? monthProp ?? month : monthProp,
@@ -77,7 +81,13 @@ function Calendar({
77
81
  footer: footer ?? actions,
78
82
  labels: {
79
83
  ...labels,
80
- labelNav: labels?.labelNav ?? (() => `${ariaLabel ?? "Calendar"} navigation`)
84
+ /*
85
+ * LOCALIZED, like every other string this component renders. It was an English literal
86
+ * built by template — so a Japanese calendar announced its own month controls as "Calendar
87
+ * navigation" while the two buttons INSIDE that container said 前の月へ and 次の月へ. Nothing
88
+ * failed and nothing warned; the only reader affected was the one using a screen reader.
89
+ */
90
+ labelNav: labels?.labelNav ?? (() => t("dataEntry.calendar.nav", { label: ariaLabel ?? t("dataEntry.calendar.name") }))
81
91
  },
82
92
  className: cn("ui-calendar", className),
83
93
  "data-width": width === "full" ? "full" : void 0,
@@ -169,6 +179,16 @@ function Calendar({
169
179
  const Icon = orientation === "left" ? ChevronLeft : orientation === "up" ? ChevronUp : orientation === "down" ? ChevronDown : ChevronRight;
170
180
  return /* @__PURE__ */ jsx(Icon, { className: cn("ui-calendar-chevron", chevronClassName), "aria-hidden": "true" });
171
181
  },
182
+ /**
183
+ * `cellRender` WRAPS the library's own day button rather than replacing it (gh#390). The
184
+ * button carries the selection state, `aria-selected`, the disabled handling and its place
185
+ * in the grid's roving tabindex; handing a consumer a blank cell to rebuild would mean
186
+ * every 祝日 marker in every app re-derives all of that, and most would get it wrong.
187
+ * So the original node is passed in and the consumer decorates around it.
188
+ */
189
+ ...cellRender ? {
190
+ DayButton: (dayButtonProps) => /* @__PURE__ */ jsx(Fragment, { children: cellRender(dayButtonProps.day.date, { originNode: /* @__PURE__ */ jsx(DayButton, { ...dayButtonProps }) }) })
191
+ } : {},
172
192
  /*
173
193
  * A consumer's `components` MERGE with ours; they must not replace the object.
174
194
  *
@@ -2,4 +2,4 @@ import * as React from "react";
2
2
  import type { CascaderProp } from "../../props/components/data-entry.prop.js";
3
3
  export type { CascaderProp, CascaderProp as CascaderProps, } from "../../props/components/data-entry.prop.js";
4
4
  export type { TreeOption, TreeFieldNames } from "./tree-utils.js";
5
- export declare function Cascader({ options: optionsProp, value, defaultValue, onValueChange, multiple, changeOnSelect, showSearch, placeholder, disabled, className, id, expandTrigger, fieldNames, allowClear, ...ariaProps }: CascaderProp): React.JSX.Element;
5
+ export declare function Cascader({ options: optionsProp, value, defaultValue, onValueChange, multiple, changeOnSelect, showSearch, placeholder, disabled, readOnly, name, className, id, expandTrigger, fieldNames, allowClear, size, status, variant, loading, open: openProp, defaultOpen, onOpenChange, showCheckedStrategy, loadData, displayRender, optionRender, maxTagCount, maxTagPlaceholder, notFoundContent, autoClearSearchValue, search: searchProp, onSearchChange, ...ariaProps }: CascaderProp): React.JSX.Element;