@godxjp/ui 19.6.0 → 20.1.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 (326) hide show
  1. package/README.md +8 -2
  2. package/dist/app/theme-axes.d.ts +2 -0
  3. package/dist/app/theme-axes.js +45 -0
  4. package/dist/components/charts/chart-cartesian.d.ts +2 -1
  5. package/dist/components/charts/chart-cartesian.js +52 -3
  6. package/dist/components/charts/chart-category-axis.d.ts +55 -0
  7. package/dist/components/charts/chart-category-axis.js +93 -0
  8. package/dist/components/charts/chart-frame.d.ts +10 -1
  9. package/dist/components/charts/chart-frame.js +19 -3
  10. package/dist/components/charts/compact-bar-trend.d.ts +1 -1
  11. package/dist/components/charts/compact-bar-trend.js +2 -0
  12. package/dist/components/charts/pie-chart.d.ts +1 -1
  13. package/dist/components/charts/pie-chart.js +12 -1
  14. package/dist/components/charts/recharts-peer.d.ts +49 -0
  15. package/dist/components/charts/recharts-peer.js +45 -0
  16. package/dist/components/data-display/card.d.ts +14 -3
  17. package/dist/components/data-display/card.js +22 -4
  18. package/dist/components/data-display/code-block.js +6 -2
  19. package/dist/components/data-display/collapsible.d.ts +23 -4
  20. package/dist/components/data-display/collapsible.js +119 -4
  21. package/dist/components/data-display/data-table.d.ts +39 -4
  22. package/dist/components/data-display/data-table.js +802 -270
  23. package/dist/components/data-display/descriptions.d.ts +27 -6
  24. package/dist/components/data-display/descriptions.js +58 -17
  25. package/dist/components/data-display/index.d.ts +5 -1
  26. package/dist/components/data-display/index.js +4 -0
  27. package/dist/components/data-display/legend.d.ts +15 -0
  28. package/dist/components/data-display/legend.js +11 -0
  29. package/dist/components/data-display/list-row.d.ts +10 -1
  30. package/dist/components/data-display/list-row.js +8 -2
  31. package/dist/components/data-display/popover.d.ts +60 -7
  32. package/dist/components/data-display/popover.js +268 -39
  33. package/dist/components/data-display/progress.d.ts +50 -2
  34. package/dist/components/data-display/progress.js +57 -9
  35. package/dist/components/data-display/range-timeline.d.ts +38 -0
  36. package/dist/components/data-display/range-timeline.js +161 -0
  37. package/dist/components/data-display/scroll-area.js +13 -2
  38. package/dist/components/data-display/service-launcher-card.js +10 -10
  39. package/dist/components/data-display/table.d.ts +11 -3
  40. package/dist/components/data-display/table.js +48 -18
  41. package/dist/components/data-display/tree-list.js +4 -9
  42. package/dist/components/data-entry/calendar.d.ts +2 -2
  43. package/dist/components/data-entry/calendar.js +79 -33
  44. package/dist/components/data-entry/cascader.d.ts +1 -1
  45. package/dist/components/data-entry/cascader.js +188 -24
  46. package/dist/components/data-entry/checkbox.d.ts +19 -6
  47. package/dist/components/data-entry/checkbox.js +55 -16
  48. package/dist/components/data-entry/choice-option.d.ts +1 -1
  49. package/dist/components/data-entry/color-picker.d.ts +1 -1
  50. package/dist/components/data-entry/color-picker.js +17 -5
  51. package/dist/components/data-entry/control-appearance.d.ts +64 -0
  52. package/dist/components/data-entry/control-appearance.js +39 -0
  53. package/dist/components/data-entry/control-surface.d.ts +61 -0
  54. package/dist/components/data-entry/control-surface.js +39 -0
  55. package/dist/components/data-entry/date-picker.d.ts +1 -1
  56. package/dist/components/data-entry/date-picker.js +344 -113
  57. package/dist/components/data-entry/date-range-picker.d.ts +2 -2
  58. package/dist/components/data-entry/date-range-picker.js +278 -140
  59. package/dist/components/data-entry/field.js +0 -1
  60. package/dist/components/data-entry/form-field.d.ts +1 -1
  61. package/dist/components/data-entry/form-field.js +39 -4
  62. package/dist/components/data-entry/form.d.ts +4 -0
  63. package/dist/components/data-entry/form.js +5 -3
  64. package/dist/components/data-entry/index.d.ts +7 -3
  65. package/dist/components/data-entry/index.js +10 -1
  66. package/dist/components/data-entry/input-otp.d.ts +1 -1
  67. package/dist/components/data-entry/input.d.ts +12 -34
  68. package/dist/components/data-entry/input.js +92 -24
  69. package/dist/components/data-entry/label.d.ts +3 -2
  70. package/dist/components/data-entry/label.js +23 -10
  71. package/dist/components/data-entry/month-picker.d.ts +2 -2
  72. package/dist/components/data-entry/month-picker.js +47 -10
  73. package/dist/components/data-entry/month-range-picker.d.ts +2 -2
  74. package/dist/components/data-entry/month-range-picker.js +51 -11
  75. package/dist/components/data-entry/number-input.d.ts +7 -0
  76. package/dist/components/data-entry/number-input.js +147 -98
  77. package/dist/components/data-entry/password-input.d.ts +1 -1
  78. package/dist/components/data-entry/radio.d.ts +1 -1
  79. package/dist/components/data-entry/radio.js +61 -13
  80. package/dist/components/data-entry/search-input.d.ts +1 -1
  81. package/dist/components/data-entry/search-input.js +16 -2
  82. package/dist/components/data-entry/search-select.d.ts +2 -2
  83. package/dist/components/data-entry/search-select.js +209 -78
  84. package/dist/components/data-entry/select.d.ts +22 -4
  85. package/dist/components/data-entry/select.js +215 -163
  86. package/dist/components/data-entry/slider.d.ts +9 -1
  87. package/dist/components/data-entry/slider.js +87 -9
  88. package/dist/components/data-entry/switch.d.ts +3 -0
  89. package/dist/components/data-entry/switch.js +29 -3
  90. package/dist/components/data-entry/textarea.d.ts +14 -56
  91. package/dist/components/data-entry/textarea.js +80 -33
  92. package/dist/components/data-entry/time-picker.d.ts +2 -2
  93. package/dist/components/data-entry/time-picker.js +333 -109
  94. package/dist/components/data-entry/time-range-picker.d.ts +5 -0
  95. package/dist/components/data-entry/time-range-picker.js +89 -0
  96. package/dist/components/data-entry/transfer.d.ts +1 -1
  97. package/dist/components/data-entry/transfer.js +99 -31
  98. package/dist/components/data-entry/tree-select-strategy.d.ts +1 -1
  99. package/dist/components/data-entry/tree-select.d.ts +1 -1
  100. package/dist/components/data-entry/tree-select.js +197 -92
  101. package/dist/components/data-entry/tree-utils.d.ts +1 -1
  102. package/dist/components/data-entry/tree-utils.js +7 -14
  103. package/dist/components/data-entry/upload-files.d.ts +2 -0
  104. package/dist/components/data-entry/upload-files.js +31 -0
  105. package/dist/components/data-entry/upload-request.d.ts +4 -0
  106. package/dist/components/data-entry/upload-request.js +53 -0
  107. package/dist/components/data-entry/upload-types.d.ts +28 -0
  108. package/dist/components/data-entry/upload-types.js +2 -0
  109. package/dist/components/data-entry/upload.d.ts +2 -2
  110. package/dist/components/data-entry/upload.js +482 -117
  111. package/dist/components/feedback/dialog.d.ts +105 -38
  112. package/dist/components/feedback/dialog.js +268 -193
  113. package/dist/components/feedback/overlay-close-focus.d.ts +31 -0
  114. package/dist/components/feedback/overlay-close-focus.js +31 -0
  115. package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
  116. package/dist/components/feedback/sheet.d.ts +53 -11
  117. package/dist/components/feedback/sheet.js +150 -81
  118. package/dist/components/feedback/tooltip.d.ts +51 -7
  119. package/dist/components/feedback/tooltip.js +107 -25
  120. package/dist/components/general/button.d.ts +1 -1
  121. package/dist/components/general/button.js +7 -3
  122. package/dist/components/general/index.d.ts +1 -0
  123. package/dist/components/general/index.js +2 -0
  124. package/dist/components/general/logo.d.ts +17 -0
  125. package/dist/components/general/logo.js +22 -16
  126. package/dist/components/general/typography.d.ts +3 -0
  127. package/dist/components/general/typography.js +15 -1
  128. package/dist/components/general/visually-hidden.d.ts +3 -0
  129. package/dist/components/general/visually-hidden.js +9 -0
  130. package/dist/components/layout/app-launcher.d.ts +34 -0
  131. package/dist/components/layout/app-launcher.js +228 -0
  132. package/dist/components/layout/app-shell.d.ts +3 -1
  133. package/dist/components/layout/app-shell.js +69 -12
  134. package/dist/components/layout/aspect-ratio.js +0 -1
  135. package/dist/components/layout/auth-divider.js +0 -1
  136. package/dist/components/layout/breadcrumb.d.ts +14 -2
  137. package/dist/components/layout/breadcrumb.js +46 -4
  138. package/dist/components/layout/flex.d.ts +1 -1
  139. package/dist/components/layout/flex.js +41 -3
  140. package/dist/components/layout/index.d.ts +3 -0
  141. package/dist/components/layout/index.js +5 -1
  142. package/dist/components/layout/nav-surface.d.ts +26 -0
  143. package/dist/components/layout/nav-surface.js +17 -0
  144. package/dist/components/layout/org-switcher.d.ts +5 -1
  145. package/dist/components/layout/org-switcher.js +25 -4
  146. package/dist/components/layout/page-container.d.ts +1 -1
  147. package/dist/components/layout/page-container.js +5 -3
  148. package/dist/components/layout/responsive-grid.d.ts +16 -2
  149. package/dist/components/layout/responsive-grid.js +29 -2
  150. package/dist/components/layout/separator.js +0 -1
  151. package/dist/components/layout/sidebar.js +4 -1
  152. package/dist/components/layout/split-pane.d.ts +14 -1
  153. package/dist/components/layout/split-pane.js +26 -13
  154. package/dist/components/layout/topbar-item.d.ts +3 -0
  155. package/dist/components/layout/topbar-item.js +19 -5
  156. package/dist/components/layout/topbar.d.ts +1 -1
  157. package/dist/components/layout/topbar.js +27 -6
  158. package/dist/components/navigation/app-setting-picker.js +21 -2
  159. package/dist/components/navigation/app-setting-toggle.d.ts +16 -0
  160. package/dist/components/navigation/app-setting-toggle.js +96 -0
  161. package/dist/components/navigation/dropdown-menu.d.ts +227 -18
  162. package/dist/components/navigation/dropdown-menu.js +402 -118
  163. package/dist/components/navigation/index.d.ts +2 -0
  164. package/dist/components/navigation/index.js +2 -0
  165. package/dist/components/navigation/pagination-utils.d.ts +2 -1
  166. package/dist/components/navigation/pagination.d.ts +2 -2
  167. package/dist/components/navigation/pagination.js +155 -83
  168. package/dist/components/navigation/steps.d.ts +2 -2
  169. package/dist/components/navigation/steps.js +29 -4
  170. package/dist/components/navigation/tabs.d.ts +29 -16
  171. package/dist/components/navigation/tabs.js +374 -144
  172. package/dist/components/ui/accordion.d.ts +50 -5
  173. package/dist/components/ui/accordion.js +239 -33
  174. package/dist/components/ui/aspect-ratio.d.ts +23 -2
  175. package/dist/components/ui/aspect-ratio.js +15 -13
  176. package/dist/components/ui/avatar.d.ts +29 -4
  177. package/dist/components/ui/avatar.js +111 -25
  178. package/dist/components/ui/hover-card.d.ts +42 -4
  179. package/dist/components/ui/hover-card.js +183 -27
  180. package/dist/components/ui/input-otp.d.ts +26 -28
  181. package/dist/components/ui/input-otp.js +50 -7
  182. package/dist/components/ui/label.js +0 -1
  183. package/dist/components/ui/password-input.d.ts +36 -2
  184. package/dist/components/ui/password-input.js +27 -7
  185. package/dist/components/ui/rating.d.ts +25 -0
  186. package/dist/components/ui/rating.js +67 -27
  187. package/dist/components/ui/segmented.d.ts +12 -3
  188. package/dist/components/ui/segmented.js +17 -2
  189. package/dist/components/ui/separator.d.ts +12 -2
  190. package/dist/components/ui/separator.js +30 -9
  191. package/dist/components/ui/tag-input.d.ts +45 -0
  192. package/dist/components/ui/tag-input.js +109 -27
  193. package/dist/components/ui/toggle-group.d.ts +50 -5
  194. package/dist/components/ui/toggle-group.js +79 -20
  195. package/dist/components/ui/toggle.d.ts +31 -5
  196. package/dist/components/ui/toggle.js +42 -3
  197. package/dist/form/form-context.d.ts +29 -0
  198. package/dist/form/form-context.js +44 -4
  199. package/dist/form/form-field-array.d.ts +22 -0
  200. package/dist/form/form-field-array.js +50 -0
  201. package/dist/form/form-field-control.d.ts +2 -1
  202. package/dist/form/form-field-control.js +116 -40
  203. package/dist/form/form-root.d.ts +2 -1
  204. package/dist/form/form-root.js +142 -23
  205. package/dist/form/index.d.ts +3 -1
  206. package/dist/form/index.js +12 -1
  207. package/dist/i18n/messages/en.json +64 -5
  208. package/dist/i18n/messages/ja.json +64 -5
  209. package/dist/i18n/messages/vi.json +64 -5
  210. package/dist/inertia/index.d.ts +20 -0
  211. package/dist/inertia/index.js +60 -1
  212. package/dist/lib/control-styles.d.ts +25 -3
  213. package/dist/lib/control-styles.js +9 -3
  214. package/dist/lib/datetime/picker-format.d.ts +8 -0
  215. package/dist/lib/datetime/picker-format.js +54 -0
  216. package/dist/lib/slot.d.ts +32 -0
  217. package/dist/lib/slot.js +22 -0
  218. package/dist/lib/variants.d.ts +22 -3
  219. package/dist/lib/variants.js +56 -1
  220. package/dist/props/components/app.prop.d.ts +25 -1
  221. package/dist/props/components/charts.prop.d.ts +21 -0
  222. package/dist/props/components/data-display.prop.d.ts +72 -4
  223. package/dist/props/components/data-entry.prop.d.ts +718 -46
  224. package/dist/props/components/form.prop.d.ts +142 -4
  225. package/dist/props/components/general.prop.d.ts +17 -1
  226. package/dist/props/components/index.d.ts +3 -3
  227. package/dist/props/components/layout.prop.d.ts +281 -11
  228. package/dist/props/components/navigation.prop.d.ts +114 -4
  229. package/dist/props/registry.d.ts +397 -11
  230. package/dist/props/registry.js +526 -11
  231. package/dist/props/vocabulary/content.prop.d.ts +1 -1
  232. package/dist/props/vocabulary/data.prop.d.ts +179 -1
  233. package/dist/props/vocabulary/index.d.ts +5 -5
  234. package/dist/props/vocabulary/interaction.prop.d.ts +68 -3
  235. package/dist/props/vocabulary/layout.prop.d.ts +57 -1
  236. package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
  237. package/dist/props/vocabulary/shared.prop.d.ts +33 -0
  238. package/dist/styles/badge-layout.css +2 -1
  239. package/dist/styles/card-layout.css +26 -4
  240. package/dist/styles/chart-layout.css +15 -0
  241. package/dist/styles/control.css +657 -15
  242. package/dist/styles/core.css +5 -2
  243. package/dist/styles/data-display-layout.css +313 -6
  244. package/dist/styles/data-entry-layout.css +13 -0
  245. package/dist/styles/focus-ring.css +4 -0
  246. package/dist/styles/index.css +5 -2
  247. package/dist/styles/layout.css +327 -4
  248. package/dist/styles/navigation-layout.css +227 -0
  249. package/dist/styles/shell-layout.css +369 -13
  250. package/dist/styles/table-layout.css +95 -6
  251. package/dist/styles/text-layout.css +10 -4
  252. package/dist/tokens/base.css +2 -1
  253. package/dist/tokens/components/badge.css +1 -0
  254. package/dist/tokens/components/chart.css +6 -0
  255. package/dist/tokens/components/control.css +79 -2
  256. package/dist/tokens/components/data-display.css +20 -0
  257. package/dist/tokens/components/descriptions.css +11 -0
  258. package/dist/tokens/components/flex.css +8 -0
  259. package/dist/tokens/components/navigation.css +55 -0
  260. package/dist/tokens/components/shell.css +53 -3
  261. package/dist/tokens/components/table.css +14 -0
  262. package/dist/tokens/foundation.css +2 -0
  263. package/dist/tokens/semantic/layout.css +9 -0
  264. package/docs/COMPONENTS.md +9 -3
  265. package/docs/CONSUMER-RULES.md +13 -0
  266. package/docs/DESIGN-AUTHORITY.md +145 -83
  267. package/docs/DEVELOPMENT.md +4 -3
  268. package/docs/FORMS.md +151 -6
  269. package/docs/FRAME-COVERAGE-REPORT.md +32 -17
  270. package/docs/README.md +15 -15
  271. package/docs/STANDARDS-vocabulary-tokens.md +1 -1
  272. package/docs/TESTING.md +15 -6
  273. package/docs/WHAT-BELONGS-HERE.md +179 -0
  274. package/docs/charts/cjk-category-axis.tsx +81 -0
  275. package/docs/data-display/card/index.tsx +22 -0
  276. package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
  277. package/docs/data-display/data-table/index.tsx +23 -0
  278. package/docs/data-display/descriptions.tsx +41 -0
  279. package/docs/data-display/legend.tsx +145 -0
  280. package/docs/data-display/progress.tsx +32 -0
  281. package/docs/data-display/scroll-area.tsx +31 -25
  282. package/docs/data-display/table.tsx +104 -45
  283. package/docs/data-display/timeline.tsx +41 -0
  284. package/docs/data-entry/date-picker.tsx +85 -0
  285. package/docs/data-entry/date-range-picker.tsx +26 -0
  286. package/docs/data-entry/form-dynamic-fields.tsx +199 -0
  287. package/docs/data-entry/form.tsx +74 -4
  288. package/docs/data-entry/input-otp.tsx +24 -0
  289. package/docs/data-entry/input.tsx +46 -1
  290. package/docs/data-entry/month-range-picker.tsx +1 -1
  291. package/docs/data-entry/segmented.tsx +1 -1
  292. package/docs/data-entry/select.tsx +29 -2
  293. package/docs/data-entry/switch.tsx +41 -0
  294. package/docs/data-entry/textarea.tsx +38 -0
  295. package/docs/data-entry/time-picker.tsx +85 -1
  296. package/docs/data-entry/time-range-picker.tsx +55 -0
  297. package/docs/data-entry/transfer.tsx +17 -0
  298. package/docs/data-entry/upload.tsx +56 -12
  299. package/docs/feedback/sheet.tsx +1 -1
  300. package/docs/feedback/tooltip.tsx +1 -1
  301. package/docs/general/activity.tsx +2 -2
  302. package/docs/general/button/index.tsx +14 -1
  303. package/docs/general/typography.tsx +14 -1
  304. package/docs/layout/app-launcher.tsx +151 -0
  305. package/docs/layout/app-shell-arrangements.tsx +225 -0
  306. package/docs/layout/app-shell.tsx +11 -0
  307. package/docs/layout/aspect-ratio.tsx +1 -1
  308. package/docs/layout/flex.tsx +50 -0
  309. package/docs/layout/responsive-grid.tsx +21 -1
  310. package/docs/layout/topbar.tsx +5 -9
  311. package/docs/navigation/app-setting-picker.tsx +37 -1
  312. package/docs/navigation/app-setting-toggle.tsx +111 -0
  313. package/docs/navigation/breadcrumb.tsx +48 -0
  314. package/docs/navigation/dropdown-menu.tsx +21 -0
  315. package/docs/navigation/pagination.tsx +52 -0
  316. package/docs/navigation/steps.tsx +37 -0
  317. package/docs/navigation/tabs.tsx +97 -1
  318. package/docs/query/button-refetch.tsx +1 -0
  319. package/package.json +28 -8
  320. package/scripts/_agent-setup.mjs +182 -3
  321. package/scripts/consumer-rule.md +98 -0
  322. package/scripts/guinea-pig-skill.md +322 -0
  323. package/scripts/init-guinea-pig.mjs +84 -0
  324. package/scripts/postinstall.mjs +13 -2
  325. package/scripts/ui-audit.mjs +351 -37
  326. /package/dist/tokens/{antd.generated.css → derived.css} +0 -0
@@ -113,7 +113,16 @@ function useBottomAnchor(viewport, enabled, offset, onAnchoredChange) {
113
113
  }, [viewport, enabled, offset]);
114
114
  }
115
115
  const ScrollArea = React.forwardRef(
116
- ({ className, children, viewportRef, anchor = "none", anchorOffset, onAnchoredChange, ...props }, ref) => {
116
+ ({
117
+ className,
118
+ children,
119
+ viewportRef,
120
+ anchor = "none",
121
+ anchorOffset,
122
+ onAnchoredChange,
123
+ orientation = "vertical",
124
+ ...props
125
+ }, ref) => {
117
126
  const [viewport, setViewport] = React.useState(null);
118
127
  const attachViewport = React.useCallback(
119
128
  (node) => {
@@ -139,11 +148,13 @@ const ScrollArea = React.forwardRef(
139
148
  tabIndex: 0,
140
149
  "data-slot": "scroll-area-viewport",
141
150
  "data-anchor": anchor,
151
+ "data-orientation": orientation,
142
152
  className: "size-full rounded-[inherit]",
143
153
  children
144
154
  }
145
155
  ),
146
- /* @__PURE__ */ jsx(ScrollBar, {}),
156
+ orientation !== "horizontal" && /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
157
+ orientation !== "vertical" && /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
147
158
  /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
148
159
  ]
149
160
  }
@@ -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,7 +29,7 @@ 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
34
  /* @__PURE__ */ jsx("span", { "data-slot": "service-launcher-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
35
35
  /* @__PURE__ */ jsx(Heading, { "data-slot": "service-launcher-title", children: title }),
@@ -39,14 +39,14 @@ const ServiceLauncherCard = React.forwardRef(
39
39
  metadata != null ? /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-metadata", children: metadata }) : null,
40
40
  disabledReason != null ? /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-disabled-reason", children: disabledReason }) : null,
41
41
  /* @__PURE__ */ jsx("div", { "data-slot": "service-launcher-action", children: action })
42
- ]
42
+ ] })
43
43
  }
44
44
  );
45
45
  }
46
46
  );
47
47
  ServiceLauncherCard.displayName = "ServiceLauncherCard";
48
48
  const ServiceCatalogCta = React.forwardRef(
49
- ({ className, icon: Icon = Plus, title, action, ...props }, ref) => /* @__PURE__ */ jsxs(
49
+ ({ className, icon: Icon = Plus, title, action, ...props }, ref) => /* @__PURE__ */ jsx(
50
50
  Card,
51
51
  {
52
52
  ref,
@@ -54,11 +54,11 @@ const ServiceCatalogCta = React.forwardRef(
54
54
  className: cn("ui-service-catalog-cta", className),
55
55
  "data-service-catalog-cta": "",
56
56
  ...props,
57
- children: [
57
+ children: /* @__PURE__ */ jsxs(CardContent, { solo: true, children: [
58
58
  /* @__PURE__ */ jsx(Icon, { "data-slot": "service-catalog-icon", "aria-hidden": "true" }),
59
59
  /* @__PURE__ */ jsx("div", { "data-slot": "service-catalog-title", children: title }),
60
60
  /* @__PURE__ */ jsx("div", { "data-slot": "service-catalog-action", children: action })
61
- ]
61
+ ] })
62
62
  }
63
63
  )
64
64
  );
@@ -68,7 +68,7 @@ function ServiceLauncherCardSkeleton({
68
68
  label,
69
69
  ...props
70
70
  }) {
71
- return /* @__PURE__ */ jsxs(
71
+ return /* @__PURE__ */ jsx(
72
72
  Card,
73
73
  {
74
74
  density: "tight",
@@ -76,7 +76,7 @@ function ServiceLauncherCardSkeleton({
76
76
  "data-service-launcher": "",
77
77
  "aria-busy": "true",
78
78
  ...props,
79
- children: [
79
+ children: /* @__PURE__ */ jsxs(CardContent, { solo: true, children: [
80
80
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: label }),
81
81
  /* @__PURE__ */ jsxs("div", { "data-slot": "service-launcher-skeleton-heading", children: [
82
82
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-icon" }),
@@ -86,7 +86,7 @@ function ServiceLauncherCardSkeleton({
86
86
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-description" }),
87
87
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-metadata" }),
88
88
  /* @__PURE__ */ jsx("span", { className: "ui-skeleton-block", "data-slot": "service-launcher-skeleton-action" })
89
- ]
89
+ ] })
90
90
  }
91
91
  );
92
92
  }
@@ -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
@@ -53,6 +53,14 @@ export declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttribu
53
53
  type TableCellPriority = {
54
54
  priority?: TableColumnPriorityProp;
55
55
  };
56
+ /** Logical column alignment, wrapping and measure, shared by header and body cells.
57
+ * Numeric cells use tabular figures and end alignment unless align is explicit. */
58
+ type TableCellAxes = {
59
+ align?: "start" | "center" | "end";
60
+ numeric?: boolean;
61
+ wrap?: boolean;
62
+ width?: WidthProp;
63
+ };
56
64
  /**
57
65
  * Rendered into the DOM unconditionally (so it exists for the preset's CSS to reveal) but visually
58
66
  * hidden above the collapse step, where the real `<th>` already carries the label — an ordinary
@@ -61,7 +69,7 @@ type TableCellPriority = {
61
69
  type TableCellLabel = {
62
70
  label?: React.ReactNode;
63
71
  };
64
- export declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & TableCellPriority & React.RefAttributes<HTMLTableCellElement>>;
72
+ export declare const TableHead: React.ForwardRefExoticComponent<Omit<React.ThHTMLAttributes<HTMLTableCellElement>, "align"> & TableCellPriority & TableCellAxes & React.RefAttributes<HTMLTableCellElement>>;
65
73
  /**
66
74
  * The cell's CONTENT owns its inset — an expanded detail panel, a nested table, a full-bleed media
67
75
  * strip. The cell drops its own padding so the child reaches the cell edges; without it the only
@@ -79,5 +87,5 @@ type TableCellFlush = {
79
87
  type TableCellIndent = {
80
88
  indent?: TableCellIndentProp;
81
89
  };
82
- export declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & TableCellPriority & TableCellLabel & TableCellFlush & TableCellIndent & React.RefAttributes<HTMLTableCellElement>>;
90
+ export declare const TableCell: React.ForwardRefExoticComponent<Omit<React.TdHTMLAttributes<HTMLTableCellElement>, "align"> & TableCellPriority & TableCellLabel & TableCellFlush & TableCellIndent & TableCellAxes & React.RefAttributes<HTMLTableCellElement>>;
83
91
  export {};
@@ -65,34 +65,64 @@ const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
65
65
  }
66
66
  ));
67
67
  TableRow.displayName = "TableRow";
68
- const TableHead = React.forwardRef(({ className, priority, ...props }, ref) => /* @__PURE__ */ jsx(
68
+ function cellWidth(width) {
69
+ if (width === void 0) return void 0;
70
+ return typeof width === "number" ? `${width}px` : width;
71
+ }
72
+ const TableHead = React.forwardRef(({ className, priority, align, numeric, wrap, width, style, ...props }, ref) => /* @__PURE__ */ jsx(
69
73
  "th",
70
74
  {
71
75
  ref,
72
76
  "data-slot": "table-head",
73
77
  "data-priority": priority,
78
+ "data-align": align,
79
+ "data-numeric": numeric ? "" : void 0,
80
+ "data-wrap": wrap ? "" : void 0,
74
81
  className: cn(tableHeadHeightClass, className),
82
+ style: width === void 0 ? style : { ...style, inlineSize: cellWidth(width) },
75
83
  ...props
76
84
  }
77
85
  ));
78
86
  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
- ));
87
+ const TableCell = React.forwardRef(
88
+ ({
89
+ className,
90
+ priority,
91
+ label,
92
+ flush,
93
+ indent,
94
+ align,
95
+ numeric,
96
+ wrap,
97
+ width,
98
+ children,
99
+ style,
100
+ ...props
101
+ }, ref) => /* @__PURE__ */ jsxs(
102
+ "td",
103
+ {
104
+ ref,
105
+ "data-slot": "table-cell",
106
+ "data-priority": priority,
107
+ "data-flush": flush ? "" : void 0,
108
+ "data-indent": indent === void 0 ? void 0 : indent,
109
+ "data-align": align,
110
+ "data-numeric": numeric ? "" : void 0,
111
+ "data-wrap": wrap ? "" : void 0,
112
+ className: cn(className),
113
+ style: indent === void 0 && width === void 0 ? style : {
114
+ ...style,
115
+ ...indent === void 0 ? null : { "--table-cell-indent-level": indent },
116
+ ...width === void 0 ? null : { inlineSize: cellWidth(width) }
117
+ },
118
+ ...props,
119
+ children: [
120
+ label !== void 0 ? /* @__PURE__ */ jsx("span", { className: "ui-table-stacked-collection-label", "aria-hidden": "true", children: label }) : null,
121
+ children
122
+ ]
123
+ }
124
+ )
125
+ );
96
126
  TableCell.displayName = "TableCell";
97
127
  export {
98
128
  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, 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, ...props }: CalendarProp): React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { ChevronLeft, ChevronRight } from "lucide-react";
5
- import { DayPicker, dateMatchModifiers } from "react-day-picker";
4
+ import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from "lucide-react";
5
+ import { DayButton, DayPicker, dateMatchModifiers } from "react-day-picker";
6
6
  import { useTranslation } from "../../i18n/use-translation.js";
7
7
  import { cn } from "../../lib/utils.js";
8
8
  import { controlIconSmClass } from "../../lib/control-styles.js";
@@ -21,6 +21,9 @@ function Calendar({
21
21
  showClose = false,
22
22
  onClose,
23
23
  footer,
24
+ width = "auto",
25
+ bordered = false,
26
+ cellRender,
24
27
  month: monthProp,
25
28
  onMonthChange,
26
29
  ...props
@@ -78,6 +81,8 @@ function Calendar({
78
81
  labelNav: labels?.labelNav ?? (() => `${ariaLabel ?? "Calendar"} navigation`)
79
82
  },
80
83
  className: cn("ui-calendar", className),
84
+ "data-width": width === "full" ? "full" : void 0,
85
+ "data-bordered": bordered ? "true" : void 0,
81
86
  classNames: {
82
87
  months: cn("ui-calendar-months", classNames?.months),
83
88
  month: cn("ui-calendar-month", classNames?.month),
@@ -100,51 +105,92 @@ function Calendar({
100
105
  classNames?.button_next
101
106
  ),
102
107
  month_grid: cn("ui-calendar-grid", classNames?.month_grid),
103
- weekdays: cn("flex", classNames?.weekdays),
108
+ /*
109
+ * The weekday row needs a DS class of its own. It only ever carried `flex`, so any rule
110
+ * written for it — the ruled grid's end edge, the header tint — matched nothing and failed
111
+ * silently while looking correct in the stylesheet.
112
+ */
113
+ weekdays: cn("ui-calendar-weekdays flex", classNames?.weekdays),
114
+ /*
115
+ * Named for the same reason the weekday row is: a slot with no DS class cannot be styled
116
+ * from this package, and a rule written for one fails silently. These two only render with
117
+ * `showWeekNumber`, which is exactly why the gap went unnoticed.
118
+ */
119
+ week_number: cn("ui-calendar-week-number", classNames?.week_number),
120
+ week_number_header: cn("ui-calendar-week-number-header", classNames?.week_number_header),
104
121
  weekday: cn("ui-calendar-weekday", classNames?.weekday),
105
122
  week: cn("ui-calendar-week", classNames?.week),
106
- day: cn(
107
- "ui-calendar-day",
108
- "[&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50",
109
- "[&:has([aria-selected].day-range-end)]:rounded-e-md",
110
- classNames?.day
111
- ),
123
+ /*
124
+ * ONE ELEMENT OWNS THE DAY SURFACE, and it is the `<button>`.
125
+ *
126
+ * It used to be split: hover painted the button, selection painted the `<td>`. Measured on
127
+ * a real page — the selected day came out a SHARP blue square (td, border-radius 0) while
128
+ * hover was a rounded grey (button, 3.71px). Same for `outside`: `text-muted-foreground`
129
+ * sat on the td while the ghost button set its own colour underneath, so days from the
130
+ * neighbouring month were not greyed at all. Two symptoms, one cause.
131
+ *
132
+ * So the `td` keeps ONLY grid duties — column width, the row it sits in — and every state
133
+ * (hover, selected, today, outside, disabled, range) is expressed on the button, where the
134
+ * radius and the padding already live. Adding a state later means adding it in one place;
135
+ * that was the part that kept going wrong.
136
+ */
137
+ day: cn("ui-calendar-day", classNames?.day),
112
138
  day_button: cn(
113
139
  buttonVariants({ variant: "ghost" }),
114
140
  "ui-calendar-day-button",
115
141
  classNames?.day_button
116
142
  ),
117
- range_start: cn("day-range-start rounded-s-md", classNames?.range_start),
118
- range_end: cn("day-range-end rounded-e-md", classNames?.range_end),
119
- range_middle: cn(
120
- "aria-selected:bg-accent aria-selected:text-accent-foreground",
121
- classNames?.range_middle
122
- ),
123
- selected: cn(
124
- "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
125
- // The day is a ghost <button> that sets its OWN (dark --foreground) text colour, which
126
- // overrides the cell's text-primary-foreground and fails contrast on the blue fill
127
- // (axe color-contrast). Force the button label to primary-foreground through hover/focus.
128
- "[&>button]:text-primary-foreground [&>button:hover]:bg-primary [&>button:hover]:text-primary-foreground [&>button:focus]:text-primary-foreground",
129
- classNames?.selected
130
- ),
131
- today: cn("bg-accent text-accent-foreground", classNames?.today),
132
- outside: cn(
133
- "day-outside text-muted-foreground aria-selected:text-muted-foreground",
134
- classNames?.outside
135
- ),
143
+ range_start: cn("day-range-start", classNames?.range_start),
144
+ range_end: cn("day-range-end", classNames?.range_end),
145
+ range_middle: cn("day-range-middle", classNames?.range_middle),
146
+ selected: cn("day-selected", classNames?.selected),
147
+ today: cn("day-today", classNames?.today),
148
+ outside: cn("day-outside", classNames?.outside),
136
149
  disabled: cn("ui-calendar-day-disabled", classNames?.disabled),
137
150
  hidden: cn("invisible", classNames?.hidden),
138
- footer: cn("ui-calendar-footer", classNames?.footer),
139
- ...classNames
151
+ footer: cn("ui-calendar-footer", classNames?.footer)
152
+ /*
153
+ * NO `...classNames` here. Spreading the consumer's object last REPLACED each slot that it
154
+ * names, so `classNames={{ day: "my-class" }}` dropped `.ui-calendar-day` — and with it
155
+ * every state selector, because they all key on that class. The slots above already merge
156
+ * the consumer's value through `cn()`; this line only ever un-merged them.
157
+ *
158
+ * A slot this component does not name still passes straight through: react-day-picker
159
+ * reads its own defaults for anything absent from this object.
160
+ */
140
161
  },
162
+ ...props,
141
163
  components: {
164
+ /*
165
+ * FOUR orientations, not two. `Nav` asks for left/right, but `Dropdown` asks for "down" —
166
+ * and mapping everything that is not "left" to ChevronRight pointed the month and year
167
+ * selects sideways. react-day-picker's own Chevron handles all four; ours has to as well.
168
+ */
142
169
  Chevron: ({ orientation, className: chevronClassName }) => {
143
- const Icon = orientation === "left" ? ChevronLeft : ChevronRight;
170
+ const Icon = orientation === "left" ? ChevronLeft : orientation === "up" ? ChevronUp : orientation === "down" ? ChevronDown : ChevronRight;
144
171
  return /* @__PURE__ */ jsx(Icon, { className: cn("ui-calendar-chevron", chevronClassName), "aria-hidden": "true" });
145
- }
172
+ },
173
+ /**
174
+ * `cellRender` WRAPS the library's own day button rather than replacing it (gh#390). The
175
+ * button carries the selection state, `aria-selected`, the disabled handling and its place
176
+ * in the grid's roving tabindex; handing a consumer a blank cell to rebuild would mean
177
+ * every 祝日 marker in every app re-derives all of that, and most would get it wrong.
178
+ * So the original node is passed in and the consumer decorates around it.
179
+ */
180
+ ...cellRender ? {
181
+ DayButton: (dayButtonProps) => /* @__PURE__ */ jsx(Fragment, { children: cellRender(dayButtonProps.day.date, { originNode: /* @__PURE__ */ jsx(DayButton, { ...dayButtonProps }) }) })
182
+ } : {},
183
+ /*
184
+ * A consumer's `components` MERGE with ours; they must not replace the object.
185
+ *
186
+ * `{...props}` used to sit after this block, so `components={{ DayButton: Custom }}` — the
187
+ * documented way to put a marker on a day — silently deleted our `Chevron` too. Measured
188
+ * on a live page: the nav arrows came back as react-day-picker's own polygon chevron,
189
+ * which needs a `fill` and therefore picked up `--rdp-accent-color: blue`. The consumer
190
+ * replaced one component and lost an unrelated one, with no error.
191
+ */
192
+ ...props.components
146
193
  },
147
- ...props,
148
194
  ...rangeDefaults
149
195
  }
150
196
  );
@@ -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;