@cdx-ui/components 0.2.3 → 0.2.5

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 (296) hide show
  1. package/AGENTS.md +24 -0
  2. package/README.md +2 -0
  3. package/coverage.svg +1 -1
  4. package/docs/components/accordion/content.md +538 -0
  5. package/docs/components/alert/content.md +203 -0
  6. package/docs/components/alert-dialog/content.md +319 -0
  7. package/docs/components/avatar/content.md +368 -0
  8. package/docs/components/avatar/design.md +202 -0
  9. package/docs/components/badge/content.md +225 -0
  10. package/docs/components/bottom-sheet/content.md +353 -0
  11. package/docs/components/bottom-sheet/design.md +249 -0
  12. package/docs/components/box/content.md +141 -0
  13. package/docs/components/breadcrumbs/content.md +169 -0
  14. package/docs/components/button/content.md +398 -0
  15. package/docs/components/button/design.md +258 -0
  16. package/docs/components/calendar/content.md +137 -0
  17. package/docs/components/card/content.md +283 -0
  18. package/docs/components/carousel/content.md +417 -0
  19. package/docs/components/checkbox/content.md +236 -0
  20. package/docs/components/checkbox/design.md +214 -0
  21. package/docs/components/chip/content.md +439 -0
  22. package/docs/components/chip/design.md +418 -0
  23. package/docs/components/color-area/content.md +84 -0
  24. package/docs/components/color-field/content.md +132 -0
  25. package/docs/components/color-picker/content.md +209 -0
  26. package/docs/components/color-slider/content.md +118 -0
  27. package/docs/components/color-swatch/content.md +62 -0
  28. package/docs/components/color-swatch-picker/content.md +124 -0
  29. package/docs/components/content.md +98 -0
  30. package/docs/components/currency-input/content.md +205 -0
  31. package/docs/components/data-grid/content.md +521 -0
  32. package/docs/components/date-field/content.md +147 -0
  33. package/docs/components/date-picker/content.md +360 -0
  34. package/docs/components/date-range-picker/content.md +301 -0
  35. package/docs/components/date-time-field/content.md +157 -0
  36. package/docs/components/date-time-list/content.md +105 -0
  37. package/docs/components/date-time-picker/content.md +272 -0
  38. package/docs/components/dialog/content.md +436 -0
  39. package/docs/components/dialog/design.md +192 -0
  40. package/docs/components/divider/content.md +112 -0
  41. package/docs/components/drawer/content.md +428 -0
  42. package/docs/components/field/content.md +277 -0
  43. package/docs/components/form/content.md +62 -0
  44. package/docs/components/full-screen-dialog/content.md +881 -0
  45. package/docs/components/heading/content.md +55 -0
  46. package/docs/components/icon/content.md +190 -0
  47. package/docs/components/icon-button/content.md +200 -0
  48. package/docs/components/icon-button/design.md +165 -0
  49. package/docs/components/image/content.md +104 -0
  50. package/docs/components/input/content.md +346 -0
  51. package/docs/components/input/design.md +389 -0
  52. package/docs/components/insurance-disclosure/content.md +103 -0
  53. package/docs/components/link/content.md +180 -0
  54. package/docs/components/link/design.md +160 -0
  55. package/docs/components/list-item/content.md +695 -0
  56. package/docs/components/menu/content.md +1254 -0
  57. package/docs/components/month-calendar/content.md +84 -0
  58. package/docs/components/month-picker/content.md +273 -0
  59. package/docs/components/otp-input/content.md +327 -0
  60. package/docs/components/progress-bar/content.md +87 -0
  61. package/docs/components/progress-circle/content.md +176 -0
  62. package/docs/components/progress-segmented/content.md +119 -0
  63. package/docs/components/quick-action-button/content.md +154 -0
  64. package/docs/components/quick-action-button/design.md +170 -0
  65. package/docs/components/radio/content.md +224 -0
  66. package/docs/components/range-calendar/content.md +123 -0
  67. package/docs/components/reorderable-list/content.md +311 -0
  68. package/docs/components/scoped-theme/content.md +47 -0
  69. package/docs/components/scroll-shadow/content.md +693 -0
  70. package/docs/components/select/content.md +473 -0
  71. package/docs/components/select/design.md +301 -0
  72. package/docs/components/skeleton/content.md +104 -0
  73. package/docs/components/slider/content.md +423 -0
  74. package/docs/components/stack/content.md +161 -0
  75. package/docs/components/switch/content.md +150 -0
  76. package/docs/components/switch/design.md +208 -0
  77. package/docs/components/table/content.md +548 -0
  78. package/docs/components/table-pagination/content.md +177 -0
  79. package/docs/components/tabs/content.md +297 -0
  80. package/docs/components/text/content.md +142 -0
  81. package/docs/components/textarea/content.md +222 -0
  82. package/docs/components/tile/content.md +702 -0
  83. package/docs/components/toast/content.md +456 -0
  84. package/docs/components/toggle-button/content.md +505 -0
  85. package/docs/components/tooltip/content.md +350 -0
  86. package/docs/components/virtualized-list/content.md +250 -0
  87. package/docs/foundations/content.md +9 -0
  88. package/docs/foundations/expressions/icons/content.md +19 -0
  89. package/docs/foundations/styles/tokens/all-tokens/content.md +192 -0
  90. package/docs/foundations/styles/tokens/what-are-tokens/content.md +33 -0
  91. package/docs/foundations/styles/tokens/what-are-tokens/design.md +33 -0
  92. package/docs/getting-started/content.md +4 -0
  93. package/docs/getting-started/designers/content.md +13 -0
  94. package/docs/getting-started/designers/design.md +13 -0
  95. package/docs/getting-started/developers/accessibility/content.md +31 -0
  96. package/docs/getting-started/developers/content.md +612 -0
  97. package/docs/getting-started/developers/styling/content.md +195 -0
  98. package/docs/llms.txt +195 -0
  99. package/docs/patterns/account-management/content.md +75 -0
  100. package/docs/patterns/authentication/content.md +50 -0
  101. package/docs/patterns/content.md +10 -0
  102. package/docs/patterns/dashboard/content.md +34 -0
  103. package/docs/patterns/empty-states/content.md +32 -0
  104. package/docs/patterns/forms/content.md +108 -0
  105. package/docs/patterns/onboarding/content.md +69 -0
  106. package/docs/patterns/payments/content.md +35 -0
  107. package/docs/patterns/settings/content.md +72 -0
  108. package/docs/resources/content.md +9 -0
  109. package/docs/resources/figma-libraries/content.md +42 -0
  110. package/docs/resources/release-notes/0.0.1-beta.118/content.md +27 -0
  111. package/docs/resources/release-notes/0.0.1-beta.122/content.md +21 -0
  112. package/docs/resources/release-notes/0.0.1-beta.124/content.md +16 -0
  113. package/docs/resources/release-notes/0.0.1-beta.126/content.md +10 -0
  114. package/docs/resources/release-notes/0.0.1-beta.127/content.md +14 -0
  115. package/docs/resources/release-notes/0.0.1-beta.128/content.md +9 -0
  116. package/docs/resources/release-notes/0.0.1-beta.129/content.md +18 -0
  117. package/docs/resources/release-notes/0.0.1-beta.130/content.md +18 -0
  118. package/docs/resources/release-notes/0.0.1-beta.133/content.md +7 -0
  119. package/docs/resources/release-notes/0.0.1-beta.134/content.md +17 -0
  120. package/docs/resources/release-notes/0.0.1-beta.136/content.md +7 -0
  121. package/docs/resources/release-notes/0.0.1-beta.137/content.md +10 -0
  122. package/docs/resources/release-notes/0.0.1-beta.138/content.md +7 -0
  123. package/docs/resources/release-notes/0.0.1-beta.139/content.md +13 -0
  124. package/docs/resources/release-notes/0.0.1-beta.140/content.md +26 -0
  125. package/docs/resources/release-notes/0.0.1-beta.141/content.md +63 -0
  126. package/docs/resources/release-notes/0.0.1-beta.142/content.md +7 -0
  127. package/docs/resources/release-notes/0.0.1-beta.143/content.md +12 -0
  128. package/docs/resources/release-notes/0.0.1-beta.144/content.md +7 -0
  129. package/docs/resources/release-notes/0.0.1-beta.145/content.md +7 -0
  130. package/docs/resources/release-notes/0.0.1-beta.147/content.md +10 -0
  131. package/docs/resources/release-notes/0.0.1-beta.149/content.md +10 -0
  132. package/docs/resources/release-notes/0.0.1-beta.150/content.md +13 -0
  133. package/docs/resources/release-notes/0.0.1-beta.152/content.md +7 -0
  134. package/docs/resources/release-notes/0.0.1-beta.154/content.md +15 -0
  135. package/docs/resources/release-notes/0.0.1-beta.156/content.md +7 -0
  136. package/docs/resources/release-notes/0.0.1-beta.158/content.md +9 -0
  137. package/docs/resources/release-notes/0.0.1-beta.159/content.md +11 -0
  138. package/docs/resources/release-notes/0.0.1-beta.160/content.md +7 -0
  139. package/docs/resources/release-notes/0.0.1-beta.161/content.md +7 -0
  140. package/docs/resources/release-notes/0.0.1-beta.163/content.md +7 -0
  141. package/docs/resources/release-notes/0.0.1-beta.164/content.md +9 -0
  142. package/docs/resources/release-notes/0.0.1-beta.166/content.md +17 -0
  143. package/docs/resources/release-notes/0.0.1-beta.167/content.md +7 -0
  144. package/docs/resources/release-notes/0.0.1-beta.168/content.md +7 -0
  145. package/docs/resources/release-notes/0.0.1-beta.169/content.md +7 -0
  146. package/docs/resources/release-notes/0.0.1-beta.171/content.md +16 -0
  147. package/docs/resources/release-notes/0.0.1-beta.172/content.md +24 -0
  148. package/docs/resources/release-notes/0.0.1-beta.173/content.md +15 -0
  149. package/docs/resources/release-notes/0.0.1-beta.174/content.md +7 -0
  150. package/docs/resources/release-notes/0.0.1-beta.176/content.md +32 -0
  151. package/docs/resources/release-notes/0.0.1-beta.179/content.md +11 -0
  152. package/docs/resources/release-notes/0.0.1-beta.182/content.md +13 -0
  153. package/docs/resources/release-notes/0.0.1-beta.185/content.md +7 -0
  154. package/docs/resources/release-notes/0.0.1-beta.187/content.md +27 -0
  155. package/docs/resources/release-notes/0.1.1/content.md +23 -0
  156. package/docs/resources/release-notes/0.1.2/content.md +7 -0
  157. package/docs/resources/release-notes/0.1.4/content.md +19 -0
  158. package/docs/resources/release-notes/0.1.5/content.md +7 -0
  159. package/docs/resources/release-notes/0.1.6/content.md +7 -0
  160. package/docs/resources/release-notes/0.2.0/content.md +31 -0
  161. package/docs/resources/release-notes/0.2.1/content.md +17 -0
  162. package/docs/resources/release-notes/0.2.2/content.md +11 -0
  163. package/docs/resources/release-notes/0.2.3/content.md +15 -0
  164. package/docs/resources/release-notes/0.2.4/content.md +17 -0
  165. package/docs/resources/release-notes/content.md +65 -0
  166. package/lib/commonjs/components/Box/Box.js +9 -1
  167. package/lib/commonjs/components/Box/Box.js.map +1 -1
  168. package/lib/commonjs/components/Breadcrumbs/index.js +28 -3
  169. package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -1
  170. package/lib/commonjs/components/Breadcrumbs/styles.js +27 -0
  171. package/lib/commonjs/components/Breadcrumbs/styles.js.map +1 -1
  172. package/lib/commonjs/components/DateTimeList/index.js +11 -26
  173. package/lib/commonjs/components/DateTimeList/index.js.map +1 -1
  174. package/lib/commonjs/components/DateTimeList/styles.js +2 -12
  175. package/lib/commonjs/components/DateTimeList/styles.js.map +1 -1
  176. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  177. package/lib/commonjs/components/ListItem/styles.js +2 -1
  178. package/lib/commonjs/components/ListItem/styles.js.map +1 -1
  179. package/lib/commonjs/components/Menu/index.js +11 -5
  180. package/lib/commonjs/components/Menu/index.js.map +1 -1
  181. package/lib/commonjs/components/ScrollShadow/gradient.js +29 -0
  182. package/lib/commonjs/components/ScrollShadow/gradient.js.map +1 -0
  183. package/lib/commonjs/components/ScrollShadow/index.js +171 -44
  184. package/lib/commonjs/components/ScrollShadow/index.js.map +1 -1
  185. package/lib/commonjs/components/ScrollShadow/styles.js +58 -14
  186. package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -1
  187. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js +63 -0
  188. package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  189. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +48 -8
  190. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
  191. package/lib/commonjs/components/Stack/HStack.js +6 -2
  192. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  193. package/lib/commonjs/components/Stack/VStack.js +6 -2
  194. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  195. package/lib/commonjs/components/Tabs/index.js +16 -23
  196. package/lib/commonjs/components/Tabs/index.js.map +1 -1
  197. package/lib/commonjs/components/Tabs/styles.js +1 -10
  198. package/lib/commonjs/components/Tabs/styles.js.map +1 -1
  199. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +20 -5
  200. package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -1
  201. package/lib/commonjs/index.js +10 -10
  202. package/lib/commonjs/index.js.map +1 -1
  203. package/lib/module/components/Box/Box.js +9 -1
  204. package/lib/module/components/Box/Box.js.map +1 -1
  205. package/lib/module/components/Breadcrumbs/index.js +29 -4
  206. package/lib/module/components/Breadcrumbs/index.js.map +1 -1
  207. package/lib/module/components/Breadcrumbs/styles.js +26 -0
  208. package/lib/module/components/Breadcrumbs/styles.js.map +1 -1
  209. package/lib/module/components/DateTimeList/index.js +12 -27
  210. package/lib/module/components/DateTimeList/index.js.map +1 -1
  211. package/lib/module/components/DateTimeList/styles.js +1 -11
  212. package/lib/module/components/DateTimeList/styles.js.map +1 -1
  213. package/lib/module/components/ListItem/index.js.map +1 -1
  214. package/lib/module/components/ListItem/styles.js +2 -1
  215. package/lib/module/components/ListItem/styles.js.map +1 -1
  216. package/lib/module/components/Menu/index.js +11 -5
  217. package/lib/module/components/Menu/index.js.map +1 -1
  218. package/lib/module/components/ScrollShadow/gradient.js +24 -0
  219. package/lib/module/components/ScrollShadow/gradient.js.map +1 -0
  220. package/lib/module/components/ScrollShadow/index.js +170 -48
  221. package/lib/module/components/ScrollShadow/index.js.map +1 -1
  222. package/lib/module/components/ScrollShadow/styles.js +57 -13
  223. package/lib/module/components/ScrollShadow/styles.js.map +1 -1
  224. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js +57 -0
  225. package/lib/module/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
  226. package/lib/module/components/ScrollShadow/useScrollShadow.js +46 -8
  227. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
  228. package/lib/module/components/Stack/HStack.js +6 -2
  229. package/lib/module/components/Stack/HStack.js.map +1 -1
  230. package/lib/module/components/Stack/VStack.js +6 -2
  231. package/lib/module/components/Stack/VStack.js.map +1 -1
  232. package/lib/module/components/Tabs/index.js +17 -24
  233. package/lib/module/components/Tabs/index.js.map +1 -1
  234. package/lib/module/components/Tabs/styles.js +0 -9
  235. package/lib/module/components/Tabs/styles.js.map +1 -1
  236. package/lib/module/figma/ListItem.SectionHeader.figma.js +20 -5
  237. package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -1
  238. package/lib/module/index.js +6 -1
  239. package/lib/module/index.js.map +1 -1
  240. package/lib/typescript/animation/hooks/usePopupDialogContentAnimation.d.ts +2 -2
  241. package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts +2 -2
  242. package/lib/typescript/components/Box/Box.d.ts +4 -0
  243. package/lib/typescript/components/Box/Box.d.ts.map +1 -1
  244. package/lib/typescript/components/Breadcrumbs/index.d.ts +3 -1
  245. package/lib/typescript/components/Breadcrumbs/index.d.ts.map +1 -1
  246. package/lib/typescript/components/Breadcrumbs/styles.d.ts +2 -0
  247. package/lib/typescript/components/Breadcrumbs/styles.d.ts.map +1 -1
  248. package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -1
  249. package/lib/typescript/components/DateTimeList/styles.d.ts +1 -4
  250. package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -1
  251. package/lib/typescript/components/ListItem/index.d.ts +5 -4
  252. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  253. package/lib/typescript/components/ListItem/styles.d.ts +1 -1
  254. package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
  255. package/lib/typescript/components/Menu/index.d.ts.map +1 -1
  256. package/lib/typescript/components/ScrollShadow/gradient.d.ts +7 -0
  257. package/lib/typescript/components/ScrollShadow/gradient.d.ts.map +1 -0
  258. package/lib/typescript/components/ScrollShadow/index.d.ts +57 -15
  259. package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -1
  260. package/lib/typescript/components/ScrollShadow/styles.d.ts +8 -2
  261. package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -1
  262. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts +13 -0
  263. package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts.map +1 -0
  264. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +15 -2
  265. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
  266. package/lib/typescript/components/Stack/HStack.d.ts +3 -2
  267. package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
  268. package/lib/typescript/components/Stack/VStack.d.ts +3 -2
  269. package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
  270. package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
  271. package/lib/typescript/components/Tabs/styles.d.ts +0 -7
  272. package/lib/typescript/components/Tabs/styles.d.ts.map +1 -1
  273. package/lib/typescript/components/Toast/animation.d.ts +3 -3
  274. package/lib/typescript/components/Toast/animation.d.ts.map +1 -1
  275. package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -1
  276. package/lib/typescript/index.d.ts +6 -1
  277. package/lib/typescript/index.d.ts.map +1 -1
  278. package/package.json +11 -9
  279. package/src/components/Box/Box.tsx +18 -4
  280. package/src/components/Breadcrumbs/index.tsx +28 -4
  281. package/src/components/Breadcrumbs/styles.ts +30 -0
  282. package/src/components/DateTimeList/index.tsx +13 -26
  283. package/src/components/DateTimeList/styles.ts +1 -10
  284. package/src/components/ListItem/index.tsx +5 -4
  285. package/src/components/ListItem/styles.ts +1 -0
  286. package/src/components/Menu/index.tsx +11 -8
  287. package/src/components/ScrollShadow/gradient.ts +48 -0
  288. package/src/components/ScrollShadow/index.tsx +300 -69
  289. package/src/components/ScrollShadow/styles.ts +45 -28
  290. package/src/components/ScrollShadow/useComposedScrollHandler.ts +58 -0
  291. package/src/components/ScrollShadow/useScrollShadow.ts +72 -10
  292. package/src/components/Stack/HStack.tsx +8 -4
  293. package/src/components/Stack/VStack.tsx +8 -4
  294. package/src/components/Tabs/index.tsx +25 -35
  295. package/src/components/Tabs/styles.ts +0 -9
  296. package/src/index.ts +8 -1
@@ -0,0 +1,157 @@
1
+ # Date Time Field (https://design.candescent.com/docs/components/date-time-field)
2
+
3
+ Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=11787-10754)
4
+
5
+ `DateTimeField` is a segmented input for typing a date and time together. Values are `DateTimeId` strings — local ISO with no timezone, e.g. `2026-07-28T10:01`. Its `granularity` controls which time segments appear, and `hour12` toggles the AM/PM segment.
6
+
7
+ ```tsx
8
+ import { DateTimeField } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ Wrap `DateTimeField.Input` in `DateTimeField.Group` and render each segment with a `DateTimeField.Segment`. Control the value with `value` and `onValueChange`. Empty segments show localized placeholders until the user types.
14
+
15
+ ```tsx
16
+ import { useState } from 'react';
17
+ import { DateTimeField } from '@cdx-ui/components';
18
+ import type { DateTimeId } from '@cdx-ui/formatters';
19
+
20
+ export default function DateTimeFieldBasicDemo() {
21
+ const [value, setValue] = useState<DateTimeId | undefined>();
22
+
23
+ return (
24
+ <DateTimeField
25
+ value={value}
26
+ onValueChange={setValue}
27
+ granularity="minute"
28
+ hour12
29
+ aria-label="Appointment"
30
+ className="w-full max-w-xs"
31
+ >
32
+ <DateTimeField.Group>
33
+ <DateTimeField.Input>
34
+ {(segment) => <DateTimeField.Segment segment={segment} />}
35
+ </DateTimeField.Input>
36
+ </DateTimeField.Group>
37
+ </DateTimeField>
38
+ );
39
+ }
40
+ ```
41
+
42
+ ## 24-hour clock
43
+
44
+ Set `hour12` to `false` to enter the time on a 24-hour clock, which drops the AM/PM segment.
45
+
46
+ ```tsx
47
+ import { useState } from 'react';
48
+ import { DateTimeField } from '@cdx-ui/components';
49
+ import type { DateTimeId } from '@cdx-ui/formatters';
50
+
51
+ export default function DateTimeField24HourDemo() {
52
+ const [value, setValue] = useState<DateTimeId | undefined>();
53
+
54
+ return (
55
+ <DateTimeField
56
+ value={value}
57
+ onValueChange={setValue}
58
+ granularity="minute"
59
+ hour12={false}
60
+ aria-label="Appointment"
61
+ className="w-full max-w-xs"
62
+ >
63
+ <DateTimeField.Group>
64
+ <DateTimeField.Input>
65
+ {(segment) => <DateTimeField.Segment segment={segment} />}
66
+ </DateTimeField.Input>
67
+ </DateTimeField.Group>
68
+ </DateTimeField>
69
+ );
70
+ }
71
+ ```
72
+
73
+ ## API
74
+
75
+ ### DateTimeField
76
+
77
+ Root of the compound. Owns the value, `granularity`, `hour12`, and `locale`, and provides styling context to `DateTimeField.Group`. It composes the segmented parts of `DatePicker`'s sibling [`DateField`](https://design.candescent.com/docs/components/date-field/content.md) with time segments.
78
+
79
+ | Prop | Type | Default | Description |
80
+ | --- | --- | --- | --- |
81
+ | `className?` | `string` | — | — |
82
+ | `children?` | `ReactNode` | — | — |
83
+ | `variant?` | `'outline' \| null` | — | — |
84
+ | `size?` | `'default' \| 'small' \| null` | — | — |
85
+ | `fullWidth?` | `boolean` | — | When true (the default), the group stretches to fill its container; when false, it hugs the segments. |
86
+ | `asChild?` | `boolean` | — | — |
87
+ | `value?` | `DateTimeId` | — | — |
88
+ | `defaultValue?` | `DateTimeId` | — | — |
89
+ | `onValueChange?` | `((value: DateTimeId) => void)` | — | Called with the new `DateTimeId`, or `undefined` when the field is cleared. |
90
+ | `granularity?` | `'day' \| 'hour' \| 'minute' \| 'second'` | — | — |
91
+ | `locale?` | `string` | — | — |
92
+ | `hour12?` | `boolean` | — | Force a 12- or 24-hour clock. Defaults to the locale's convention when omitted. |
93
+ | `labels?` | `Partial<DateComponentLabels>` | — | — |
94
+ | `isDisabled?` | `boolean` | — | — |
95
+ | `isReadOnly?` | `boolean` | — | — |
96
+ | `isInvalid?` | `boolean` | — | — |
97
+ | `isRequired?` | `boolean` | — | — |
98
+
99
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
100
+
101
+ ## Sub-components
102
+
103
+ ### DateTimeField.Group
104
+
105
+ Input chrome that surrounds the segments, shared with [`DateField.Group`](https://design.candescent.com/docs/components/date-field/content.md). Add a trailing `DateTimeField.Suffix` inside it for a picker trigger.
106
+
107
+ | Prop | Type | Default | Description |
108
+ | --- | --- | --- | --- |
109
+ | `className?` | `string` | — | — |
110
+ | `children?` | `ReactNode` | — | — |
111
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
112
+ | `variant?` | `'outline' \| null` | — | — |
113
+ | `size?` | `'default' \| 'small' \| null` | — | — |
114
+ | `fullWidth?` | `boolean` | — | — |
115
+ | `key?` | `React.Key \| null` | — | — |
116
+
117
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
118
+
119
+ ### DateTimeField.Input
120
+
121
+ Renders the editable segments. Pass a render function as `children` that returns a `DateTimeField.Segment` for each segment.
122
+
123
+ | Prop | Type | Default | Description |
124
+ | --- | --- | --- | --- |
125
+ | `className?` | `string` | — | — |
126
+ | `children` | `(segment: import("@cdx-ui/formatters").DateSegment) => ReactNode` | — | — |
127
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
128
+ | `key?` | `React.Key \| null` | — | — |
129
+
130
+ ### DateTimeField.Segment
131
+
132
+ A single editable or literal segment, yielded to the `DateTimeField.Input` render function so a specific segment type can be styled.
133
+
134
+ | Prop | Type | Default | Description |
135
+ | --- | --- | --- | --- |
136
+ | `className?` | `string` | — | — |
137
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
138
+ | `segment` | `DateSegment` | — | — |
139
+ | `key?` | `React.Key \| null` | — | — |
140
+
141
+ ### DateTimeField.Suffix
142
+
143
+ Trailing content inside `DateTimeField.Group`, typically a picker trigger icon, shared with [`DateField.Suffix`](https://design.candescent.com/docs/components/date-field/content.md). Set `asChild` to render a custom trigger element in its place.
144
+
145
+ | Prop | Type | Default | Description |
146
+ | --- | --- | --- | --- |
147
+ | `className?` | `string` | — | — |
148
+ | `children?` | `ReactNode` | — | — |
149
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
150
+ | `asChild?` | `boolean` | — | — |
151
+ | `key?` | `React.Key \| null` | — | — |
152
+
153
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
154
+
155
+ ## Accessibility
156
+
157
+ Give the field an accessible name with `aria-label` or by pairing it with `Field.Label`; the root carries no label of its own. Each segment is individually focusable and editable with the keyboard. While `isDisabled` or `isReadOnly`, segments do not accept edits.
@@ -0,0 +1,105 @@
1
+ # Date Time List (https://design.candescent.com/docs/components/date-time-list)
2
+
3
+ `DateTimeList` presents a date and time as scrollable wheel columns. Values are `DateTimeId` strings — local ISO with no timezone, e.g. `2026-07-28T10:01`. It renders its columns from `granularity` and `hour12`, or you can compose `DateTimeList.DateColumn`, `DateTimeList.TimeColumn`, and `DateTimeList.PeriodColumn` explicitly.
4
+
5
+ ```tsx
6
+ import { DateTimeList } from '@cdx-ui/components';
7
+ ```
8
+
9
+ ## Basic
10
+
11
+ Control the value with `value` and `onValueChange`. With no children, `DateTimeList` renders the columns implied by `granularity` and `hour12` — a date column, time columns, and an AM/PM column.
12
+
13
+ ```tsx
14
+ import { useState } from 'react';
15
+ import { DateTimeList } from '@cdx-ui/components';
16
+ import type { DateTimeId } from '@cdx-ui/formatters';
17
+
18
+ export default function DateTimeListBasicDemo() {
19
+ const [value, setValue] = useState<DateTimeId | undefined>();
20
+
21
+ return (
22
+ <DateTimeList
23
+ value={value}
24
+ onValueChange={setValue}
25
+ granularity="minute"
26
+ hour12
27
+ aria-label="Appointment"
28
+ className="w-full max-w-xs"
29
+ />
30
+ );
31
+ }
32
+ ```
33
+
34
+ ## Explicit columns
35
+
36
+ Compose `DateTimeList.DateColumn`, `DateTimeList.TimeColumn`, and `DateTimeList.PeriodColumn` as children to control which columns render and in what order.
37
+
38
+ ```tsx
39
+ import { useState } from 'react';
40
+ import { DateTimeList } from '@cdx-ui/components';
41
+ import type { DateTimeId } from '@cdx-ui/formatters';
42
+
43
+ export default function DateTimeListColumnsDemo() {
44
+ const [value, setValue] = useState<DateTimeId | undefined>();
45
+
46
+ return (
47
+ <DateTimeList
48
+ value={value}
49
+ onValueChange={setValue}
50
+ granularity="minute"
51
+ hour12
52
+ aria-label="Appointment"
53
+ className="w-full max-w-xs"
54
+ >
55
+ <DateTimeList.DateColumn />
56
+ <DateTimeList.TimeColumn />
57
+ <DateTimeList.PeriodColumn />
58
+ </DateTimeList>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## API
64
+
65
+ ### DateTimeList
66
+
67
+ Root of the compound. Owns the selected value, `granularity`, `hour12`, and `locale`, and renders the wheel columns. It is the standalone surface that [`DateTimePicker`](https://design.candescent.com/docs/components/date-time-picker/content.md) presents through `DateTimePicker.List`.
68
+
69
+ | Prop | Type | Default | Description |
70
+ | --- | --- | --- | --- |
71
+ | `className?` | `string` | — | — |
72
+ | `children?` | `ReactNode` | — | — |
73
+ | `asChild?` | `boolean` | — | — |
74
+ | `value?` | `DateTimeId` | — | — |
75
+ | `defaultValue?` | `DateTimeId` | — | — |
76
+ | `onValueChange?` | `((value: DateTimeId) => void)` | — | — |
77
+ | `onUserInteract?` | `(() => void)` | — | — |
78
+ | `granularity?` | `'day' \| 'hour' \| 'minute' \| 'second'` | — | — |
79
+ | `locale?` | `string` | — | — |
80
+ | `hour12?` | `boolean` | — | Force a 12- or 24-hour clock. Defaults to the locale's convention when omitted. |
81
+ | `disabled?` | `boolean` | — | — |
82
+ | `minValue?` | `DateTimeId` | — | Earliest selectable date-time. Dates before it are hidden; times are clamped. Build with `dateTimeId(...)`. |
83
+ | `maxValue?` | `DateTimeId` | — | Latest selectable date-time. Dates after it are hidden; times are clamped. Build with `dateTimeId(...)`. |
84
+
85
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
86
+
87
+ ## Sub-components
88
+
89
+ ### DateTimeList.DateColumn
90
+
91
+ The scrollable column of dates. By default the wheel spans ±90 days around today; when the
92
+ selected date falls outside that window, the list recenters on the selected date so controlled
93
+ values remain visible and selected. Takes no own props.
94
+
95
+ ### DateTimeList.TimeColumn
96
+
97
+ The scrollable time columns. Renders an hour column, plus minute and second columns when `granularity` includes them. Takes no own props.
98
+
99
+ ### DateTimeList.PeriodColumn
100
+
101
+ The AM/PM column, meaningful only when `hour12` is set. Takes no own props.
102
+
103
+ ## Accessibility
104
+
105
+ Give the list an accessible name with `aria-label` or by pairing it with `Field.Label`. Each column is a list of pressable options that report their selected state, so a value can be chosen by scrolling the wheel or by activating an option directly. While `disabled`, the columns do not accept changes.
@@ -0,0 +1,272 @@
1
+ # Date Time Picker (https://design.candescent.com/docs/components/date-time-picker)
2
+
3
+ Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/date-time-datetimepicker--dialog)
4
+
5
+ `DateTimePicker` pairs a segmented `DateTimeField` with a scroll-wheel `DateTimeList` and coordinates the surface that presents it. Values are `DateTimeId` strings — local ISO with no timezone, e.g. `2026-07-28T10:01`.
6
+
7
+ ```tsx
8
+ import { DateTimeField, DateTimePicker, DateTimeList, Field } from '@cdx-ui/components';
9
+ ```
10
+
11
+ ## Basic
12
+
13
+ Because the date and time field is editable, keep the `DateTimePicker.Trigger` around the suffix icon only, so typing in the field does not open the columns. Then present the columns — `DateTimePicker.Popover` anchors to the field and is the preferred surface on web. For surface-driven selection with no typing, you can instead wrap the whole `DateTimeField.Group` in the trigger, as [DateRangePicker](https://design.candescent.com/docs/components/date-range-picker/content.md) and [MonthPicker](https://design.candescent.com/docs/components/month-picker/content.md) do.
14
+
15
+ ```tsx
16
+ import { useState } from 'react';
17
+ import { DateTimeField, DateTimePicker, Field } from '@cdx-ui/components';
18
+ import type { DateTimeId } from '@cdx-ui/formatters';
19
+
20
+ export default function DateTimePickerBasicDemo() {
21
+ const [value, setValue] = useState<DateTimeId | undefined>();
22
+
23
+ return (
24
+ <Field className="w-full max-w-xs">
25
+ <DateTimePicker value={value} onValueChange={setValue} granularity="minute" hour12>
26
+ <Field.Label>Appointment</Field.Label>
27
+ <DateTimeField.Group fullWidth>
28
+ <DateTimeField.Input>
29
+ {(segment) => <DateTimeField.Segment segment={segment} />}
30
+ </DateTimeField.Input>
31
+ <DateTimeField.Suffix>
32
+ <DateTimePicker.Trigger>
33
+ <DateTimePicker.TriggerIndicator />
34
+ </DateTimePicker.Trigger>
35
+ </DateTimeField.Suffix>
36
+ </DateTimeField.Group>
37
+ <DateTimePicker.Popover>
38
+ <DateTimePicker.List aria-label="Appointment" />
39
+ </DateTimePicker.Popover>
40
+ </DateTimePicker>
41
+ </Field>
42
+ );
43
+ }
44
+ ```
45
+
46
+ ## Dialog
47
+
48
+ Use `DateTimePicker.Dialog` to present the columns in a modal surface.
49
+
50
+ ```tsx
51
+ import { useState } from 'react';
52
+ import { DateTimeField, DateTimePicker, Field } from '@cdx-ui/components';
53
+ import type { DateTimeId } from '@cdx-ui/formatters';
54
+
55
+ export default function DateTimePickerDialogDemo() {
56
+ const [value, setValue] = useState<DateTimeId | undefined>();
57
+
58
+ return (
59
+ <Field className="w-full max-w-xs">
60
+ <DateTimePicker value={value} onValueChange={setValue} granularity="minute" hour12>
61
+ <Field.Label>Appointment</Field.Label>
62
+ <DateTimeField.Group fullWidth>
63
+ <DateTimeField.Input>
64
+ {(segment) => <DateTimeField.Segment segment={segment} />}
65
+ </DateTimeField.Input>
66
+ <DateTimeField.Suffix>
67
+ <DateTimePicker.Trigger>
68
+ <DateTimePicker.TriggerIndicator />
69
+ </DateTimePicker.Trigger>
70
+ </DateTimeField.Suffix>
71
+ </DateTimeField.Group>
72
+ <DateTimePicker.Dialog>
73
+ <DateTimePicker.List aria-label="Appointment" />
74
+ </DateTimePicker.Dialog>
75
+ </DateTimePicker>
76
+ </Field>
77
+ );
78
+ }
79
+ ```
80
+
81
+ ## Bottom sheet
82
+
83
+ Use `DateTimePicker.BottomSheet` to present the columns in a sheet that slides up from the bottom — the preferred surface on native. It wires open state only, so compose `BottomSheet.Header` and `BottomSheet.Content` as its children.
84
+
85
+ ```tsx
86
+ import { useState } from 'react';
87
+ import { BottomSheet, DateTimeField, DateTimePicker, Field } from '@cdx-ui/components';
88
+ import type { DateTimeId } from '@cdx-ui/formatters';
89
+ import { PickerBottomSheetFrame } from './_frame';
90
+
91
+ export default function DateTimePickerBottomSheetDemo() {
92
+ const [value, setValue] = useState<DateTimeId | undefined>();
93
+ const [open, setOpen] = useState(false);
94
+
95
+ return (
96
+ <PickerBottomSheetFrame>
97
+ <Field className="w-full max-w-xs">
98
+ <DateTimePicker
99
+ value={value}
100
+ onValueChange={setValue}
101
+ isOpen={open}
102
+ onOpenChange={setOpen}
103
+ granularity="minute"
104
+ hour12
105
+ >
106
+ <Field.Label>Appointment</Field.Label>
107
+ <DateTimeField.Group fullWidth>
108
+ <DateTimeField.Input>
109
+ {(segment) => <DateTimeField.Segment segment={segment} />}
110
+ </DateTimeField.Input>
111
+ <DateTimeField.Suffix>
112
+ <DateTimePicker.Trigger>
113
+ <DateTimePicker.TriggerIndicator />
114
+ </DateTimePicker.Trigger>
115
+ </DateTimeField.Suffix>
116
+ </DateTimeField.Group>
117
+ <DateTimePicker.BottomSheet>
118
+ <BottomSheet.Header title="Select date and time" onClose={() => setOpen(false)} />
119
+ <BottomSheet.Content>
120
+ <DateTimePicker.List aria-label="Appointment" />
121
+ </BottomSheet.Content>
122
+ </DateTimePicker.BottomSheet>
123
+ </DateTimePicker>
124
+ </Field>
125
+ </PickerBottomSheetFrame>
126
+ );
127
+ }
128
+ ```
129
+
130
+ ## Standalone
131
+
132
+ `DateTimePicker` has no inline surface. When the field and columns share the screen, render a `DateTimeList` on its own — it renders its columns from `granularity` and `hour12`, or you can compose `DateTimeList.DateColumn`, `DateTimeList.TimeColumn`, and `DateTimeList.PeriodColumn` explicitly.
133
+
134
+ ```tsx
135
+ import { useState } from 'react';
136
+ import { DateTimeList } from '@cdx-ui/components';
137
+ import type { DateTimeId } from '@cdx-ui/formatters';
138
+
139
+ export default function DateTimePickerStandaloneDemo() {
140
+ const [value, setValue] = useState<DateTimeId | undefined>();
141
+
142
+ return (
143
+ <DateTimeList
144
+ className="w-full max-w-xs"
145
+ value={value}
146
+ onValueChange={setValue}
147
+ granularity="minute"
148
+ hour12
149
+ aria-label="Appointment"
150
+ >
151
+ <DateTimeList.DateColumn />
152
+ <DateTimeList.TimeColumn />
153
+ <DateTimeList.PeriodColumn />
154
+ </DateTimeList>
155
+ );
156
+ }
157
+ ```
158
+
159
+ ## Custom trigger
160
+
161
+ Set `asChild` on `DateTimePicker.Trigger` to open the columns from a custom pressable such as an `IconButton`, keeping the segmented field for direct entry. The trigger merges its press and expanded-state accessibility props onto the child.
162
+
163
+ ```tsx
164
+ import { Box, DateTimeField, DateTimePicker, Field, IconButton } from '@cdx-ui/components';
165
+ import { Schedule } from '@cdx-ui/icons';
166
+
167
+ export default function DateTimePickerCustomTriggerDemo() {
168
+ return (
169
+ <Field className="w-full max-w-xs">
170
+ <DateTimePicker granularity="minute" hour12>
171
+ <Field.Label>Appointment</Field.Label>
172
+ <Box className="flex-row items-center gap-2">
173
+ <DateTimeField.Group fullWidth>
174
+ <DateTimeField.Input>
175
+ {(segment) => <DateTimeField.Segment segment={segment} />}
176
+ </DateTimeField.Input>
177
+ </DateTimeField.Group>
178
+ <DateTimePicker.Trigger asChild>
179
+ <IconButton as={Schedule} variant="ghost" accessibilityLabel="Open time picker" />
180
+ </DateTimePicker.Trigger>
181
+ </Box>
182
+ <DateTimePicker.Popover>
183
+ <DateTimePicker.List aria-label="Appointment" />
184
+ </DateTimePicker.Popover>
185
+ </DateTimePicker>
186
+ </Field>
187
+ );
188
+ }
189
+ ```
190
+
191
+ ## API
192
+
193
+ ### DateTimePicker
194
+
195
+ Root of the compound. Owns the selected value, open state, `granularity`, `hour12`, `locale`, and `labels`, and provides `DateTimeField` styling context to the field. Compose exactly one presentation surface — `DateTimePicker.Popover`, `DateTimePicker.Dialog`, or `DateTimePicker.BottomSheet` — per picker.
196
+
197
+ | Prop | Type | Default | Description |
198
+ | --- | --- | --- | --- |
199
+ | `className?` | `string` | — | — |
200
+ | `children?` | `ReactNode` | — | — |
201
+ | `asChild?` | `boolean` | — | — |
202
+ | `value?` | `DateTimeId` | — | — |
203
+ | `defaultValue?` | `DateTimeId` | — | — |
204
+ | `onValueChange?` | `((value: DateTimeId) => void)` | — | Called with the new `DateTimeId`, or `undefined` when the selection is cleared. |
205
+ | `isOpen?` | `boolean` | — | Controlled open state. Use `defaultOpen` for the uncontrolled variant. |
206
+ | `defaultOpen?` | `boolean` | — | — |
207
+ | `onOpenChange?` | `((open: boolean) => void)` | — | — |
208
+ | `isDisabled?` | `boolean` | — | — |
209
+ | `isReadOnly?` | `boolean` | — | — |
210
+ | `isInvalid?` | `boolean` | — | — |
211
+ | `isRequired?` | `boolean` | — | — |
212
+ | `minValue?` | `DateTimeId` | — | Earliest selectable date-time, applied to the scroll list. Build with `dateTimeId(...)`. |
213
+ | `maxValue?` | `DateTimeId` | — | Latest selectable date-time, applied to the scroll list. Build with `dateTimeId(...)`. |
214
+ | `name?` | `string` | — | — |
215
+ | `locale?` | `string` | — | — |
216
+ | `labels?` | `Partial<DateComponentLabels>` | — | — |
217
+ | `granularity?` | `'day' \| 'hour' \| 'minute' \| 'second'` | — | Which field segments and list columns to show, from coarsest (`day`) to finest (`second`). |
218
+ | `hour12?` | `boolean` | — | Force a 12-hour clock (AM/PM column) or a 24-hour clock. Defaults to the locale's convention when omitted. |
219
+
220
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
221
+
222
+ ## Sub-components
223
+
224
+ ### DateTimePicker.Trigger
225
+
226
+ Toggles the presentation surface and announces its expanded state. For an editable field, wrap only the `DateTimePicker.TriggerIndicator` inside a `DateTimeField.Suffix`; for surface-driven selection, wrap the whole `DateTimeField.Group` so the entire field is the tap target. Its accessible name defaults to the picker's `openDateTimePicker` label. Set `asChild` to merge its press and accessibility props onto a custom interactive child — for example an `IconButton` — instead of rendering the default pressable.
227
+
228
+ | Prop | Type | Default | Description |
229
+ | --- | --- | --- | --- |
230
+ | `className?` | `string` | — | — |
231
+ | `children?` | `ReactNode` | — | Either children or a render prop that receives a boolean reflecting whether the component is currently pressed. |
232
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
233
+ | `asChild?` | `boolean` | — | Merge press / a11y props onto the single child instead of rendering a `Pressable`. Use when the trigger should be another interactive host (e.g. `IconButton`). For a larger field hit target, prefer wrapping `DateField.Group` as children without `asChild` so the outer `Pressable` covers the whole input chrome. |
234
+ | `key?` | `React.Key \| null` | — | — |
235
+
236
+ Inherits all [`PressableProps`](https://reactnative.dev/docs/pressable#props).
237
+
238
+ ### DateTimePicker.TriggerIndicator
239
+
240
+ Renders the clock icon inside `DateTimePicker.Trigger`. Takes no props.
241
+
242
+ ### DateTimePicker.List
243
+
244
+ Renders the picker's `DateTimeList`, wired to the shared value, `granularity`, `hour12`, and `locale`. Accepts all `DateTimeList` props except those the picker controls (`value`, `onValueChange`, `granularity`, `hour12`, and `locale`).
245
+
246
+ | Prop | Type | Default | Description |
247
+ | --- | --- | --- | --- |
248
+ | `className?` | `string` | — | — |
249
+ | `children?` | `ReactNode` | — | — |
250
+ | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
251
+ | `asChild?` | `boolean` | — | — |
252
+ | `defaultValue?` | `DateTimeId` | — | — |
253
+ | `disabled?` | `boolean` | — | — |
254
+ | `key?` | `React.Key \| null` | — | — |
255
+
256
+ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
257
+
258
+ ### DateTimePicker.Popover
259
+
260
+ Presents the columns in an anchored popover, positioned above or below the field based on available space. Wires the surface's open state and renders its children.
261
+
262
+ ### DateTimePicker.Dialog
263
+
264
+ Presents the columns in a modal dialog. Wires the surface's open state and renders its children.
265
+
266
+ ### DateTimePicker.BottomSheet
267
+
268
+ Presents the columns in a bottom sheet, the preferred surface on native. It wires open state only — compose `BottomSheet.Header` and `BottomSheet.Content` (or any sheet layout) as its children.
269
+
270
+ ## Accessibility
271
+
272
+ Give the picker an accessible name with `Field.Label` or `aria-label`, and pass `aria-label` to `DateTimePicker.List` to name the columns. `DateTimePicker.Trigger` announces the localized `openDateTimePicker` label, which `labels` can override. Each column is a list of pressable options that report their selected state, so a value can be chosen by scrolling or by activating an option directly. While `disabled`, the trigger does not open a surface.